diff --git a/sdk/communication/azure-communication-chat/README.md b/sdk/communication/azure-communication-chat/README.md index bff18e82150c..4c9d7c9791e5 100644 --- a/sdk/communication/azure-communication-chat/README.md +++ b/sdk/communication/azure-communication-chat/README.md @@ -44,10 +44,12 @@ it with this token. It is because the initiator of the create request must be in This will allow you to create, get, list or delete chat threads. ```python -from azure.communication.chat import ChatClient, CommunicationTokenCredential +from azure.communication.chat import ChatClient +from azure.communication.identity._shared.user_credential import CommunicationTokenCredential +from azure.communication.identity._shared.user_token_refresh_options import CommunicationTokenRefreshOptions + # Your unique Azure Communication service endpoint endpoint = "https://.communcationservices.azure.com" -token = "" refresh_options = CommunicationTokenRefreshOptions(token) chat_client = ChatClient(endpoint, CommunicationTokenCredential(refresh_options)) ``` @@ -60,7 +62,8 @@ the chat thread topic, add participants to chat thread, etc. You can get it by creating a new chat thread using ChatClient: ```python -chat_thread_client = chat_client.create_chat_thread(topic, thread_participants) +create_chat_thread_result = chat_client.create_chat_thread(topic) +chat_thread_client = chat_client.get_chat_thread_client(create_chat_thread_result.chat_thread.id) ``` Additionally, the client can also direct so that the request is repeatable; that is, if the client makes the @@ -69,25 +72,34 @@ the server executing the request multiple times. The value of the Repeatability- representing a client-generated, globally unique for all time, identifier for the request. ```python -chat_thread_client = chat_client.create_chat_thread(topic, thread_participants, repeatability_request_id) +create_chat_thread_result = chat_client.create_chat_thread( + topic, + thread_participants=thread_participants, + repeatability_request_id=repeatability_request_id +) +chat_thread_client = chat_client.get_chat_thread_client(create_chat_thread_result.chat_thread.id) ``` Alternatively, if you have created a chat thread before and you have its thread_id, you can create it by: ```python -chat_thread_client = chat_client.get_chat_thread_client(thread_id) +chat_thread_client = chat_client.get_chat_thread_client(thread_id) # thread_id is the id of an existing chat thread ``` # Key concepts -A chat conversation is represented by a chat thread. Each user in the thread is called a thread participant. Thread participants can chat with one another privately in a 1:1 chat or huddle up in a 1:N group chat. Users also get near real-time updates for when others are typing and when they have read the messages. +A chat conversation is represented by a chat thread. Each user in the thread is called a thread participant. +Thread participants can chat with one another privately in a 1:1 chat or huddle up in a 1:N group chat. +Users also get near real-time updates for when others are typing and when they have read the messages. Once you initialized a `ChatClient` class, you can do the following chat operations: ## Create, get, update, and delete threads +Perform CRD(Create-Read-Delete) operations on thread participants + ```Python -create_chat_thread(topic, thread_participants, **kwargs) +create_chat_thread(topic, **kwargs) get_chat_thread(thread_id, **kwargs) list_chat_threads(**kwargs) delete_chat_thread(thread_id, **kwargs) @@ -97,12 +109,16 @@ Once you initialized a `ChatThreadClient` class, you can do the following chat o ## Update thread +Perform Update operation on thread topic + ```python update_topic(topic, **kwargs) ``` ## Send, get, update, and delete messages +Perform CRUD(Create-Read-Update-Delete) operations on messages + ```Python send_message(content, **kwargs) get_message(message_id, **kwargs) @@ -113,14 +129,19 @@ delete_message(message_id, **kwargs) ## Get, add, and remove participants +Perform CRD(Create-Read-Delete) operations on thread participants + ```Python list_participants(**kwargs) +add_participant(thread_participant, **kwargs) add_participants(thread_participants, **kwargs) remove_participant(participant_id, **kwargs) ``` ## Send typing notification +Notify the service of typing notification + ```python send_typing_notification(**kwargs) ``` @@ -147,43 +168,47 @@ The following sections provide several code snippets covering some of the most c ### Create a thread -Use the `create_chat_thread` method to create a chat thread client object. +Use the `create_chat_thread` method to create a chat thread. -- Use `topic` to give a thread topic; -- Use `thread_participants` to list the `ChatThreadParticipant` to be added to the thread; -- Use `repeatability_request_id` to specify the unique identifier for the request. -- `user`, required, it is the `CommunicationUserIdentifier` you created by CommunicationIdentityClient.create_user() from User Access Tokens - -- `display_name`, optional, is the display name for the thread participant. -- `share_history_time`, optional, time from which the chat history is shared with the participant. +- Use `topic`, required, to give a thread topic; +- Use `thread_participants`, optional, to provide a list the `ChatThreadParticipant` to be added to the thread; + - `user`, required, it is the `CommunicationUserIdentifier` you created by CommunicationIdentityClient.create_user() + from User Access Tokens + + - `display_name`, optional, is the display name for the thread participant. + - `share_history_time`, optional, time from which the chat history is shared with the participant. +- Use `repeatability_request_id`, optional, to specify the unique identifier for the request. -`ChatThreadClient` is the result returned from creating a thread, you can use it to perform other chat operations to this chat thread -```Python -# Without repeatability_request_id +`CreateChatThreadResult` is the result returned from creating a thread, you can use it to fetch the `id` of +the chat thread that got created. This `id` can then be used to fetch a `ChatThreadClient` object using +the `get_chat_thread_client` method. `ChatThreadClient` can be used to perform other chat operations to this chat thread. -from azure.communication.chat import ChatThreadParticipant +```Python +# Without repeatability_request_id and thread_participants topic = "test topic" -thread_participants = [ChatThreadParticipant( - user='', - display_name='name', - share_history_time=datetime.utcnow() -)] - -chat_thread_client = chat_client.create_chat_thread(topic, thread_participants) -thread_id = chat_thread_client.thread_id +create_chat_thread_result = chat_client.create_chat_thread(topic) +chat_thread_client = chat_client.get_chat_thread_client(create_chat_thread_result.chat_thread.id) ``` ```Python -# With repeatability_request_id - +# With repeatability_request_id and thread_participants +from azure.communication.identity import CommunicationIdentityClient from azure.communication.chat import ChatThreadParticipant import uuid +# create an user +identity_client = CommunicationIdentityClient.from_connection_string('') +user = identity_client.create_user() + +## OR pass existing user +# from azure.communication.identity import CommunicationUserIdentifier +# user_id = 'some_user_id' +# user = CommunicationUserIdentifier(user_id) + + # modify function to implement customer logic def get_unique_identifier_for_request(**kwargs): - res = None - # implement custom logic here res = uuid.uuid4() return res @@ -194,95 +219,135 @@ thread_participants = [ChatThreadParticipant( share_history_time=datetime.utcnow() )] -chat_thread_client = chat_client.create_chat_thread(topic, thread_participants, repeatability_request_id) -thread_id = chat_thread_client.thread_id +# obtains repeatability_request_id using some customer logic +repeatability_request_id = get_unique_identifier_for_request() + +create_chat_thread_result = chat_client.create_chat_thread( + topic, + thread_participants=thread_participants, + repeatability_request_id=repeatability_request_id) +thread_id = create_chat_thread_result.chat_thread.id + +# fetch ChatThreadClient +chat_thread_client = chat_client.get_chat_thread_client(create_chat_thread_result.chat_thread.id) + +# Additionally, you can also check if all participants were successfully added or not +# and subsequently retry adding the failed participants again +def decide_to_retry(error, **kwargs): + """ + Insert some custom logic to decide if retry is applicable based on error + """ + return True + +retry = [thread_participant for thread_participant, error in create_chat_thread_result.errors if decide_to_retry(error)] +chat_thread_client.add_participants(retry) ``` ### Get a thread -The `get_chat_thread` method retrieves a thread from the service. -`thread_id` is the unique ID of the thread. - +Use `get_chat_thread` method retrieves a `ChatThread` from the service; `thread_id` is the unique ID of the thread. +- Use `thread_id`, required, to specify the unique ID of the thread. ```Python -thread = chat_client.get_chat_thread(thread_id) +chat_thread = chat_client.get_chat_thread(thread_id=thread_id) ``` ### List chat threads -The `list_chat_threads` method retrieves the list of created chat threads +Use `list_chat_threads` method retrieves the list of created chat threads -- `results_per_page`, optional, The maximum number of messages to be returned per page. -- `start_time`, optional, The start time where the range query. +- Use `results_per_page`, optional, The maximum number of messages to be returned per page. +- Use `start_time`, optional, The start time where the range query. An iterator of `[ChatThreadInfo]` is the response returned from listing threads ```python from datetime import datetime, timedelta -chat_client = ChatClient(self.endpoint, self.token) start_time = datetime.utcnow() - timedelta(days=2) start_time = start_time.replace(tzinfo=pytz.utc) + chat_thread_infos = chat_client.list_chat_threads(results_per_page=5, start_time=start_time) +for chat_thread_info_page in chat_thread_infos.by_page(): + for chat_thread_info in chat_thread_info_page: + print(chat_thread_info) ``` -### Update a thread - -Use `update_chat_thread` method to update a thread's properties -`thread_id` is the unique ID of the thread. -`topic` is used to describe the change of the thread topic +### Update a thread topic +Use `update_topic` method to update a thread's properties. `topic` is used to describe the change of the thread topic - Use `topic` to give thread a new topic; ```python topic="new topic" -chat_thread_client.update_chat_thread(topic=topic) +chat_thread_client.update_topic(topic=topic) + +chat_thread = chat_client.get_chat_thread(thread_id) + +assert chat_thread.topic == topic ``` ### Delete a thread -Use `delete_chat_thread` method to delete a thread -`thread_id` is the unique ID of the thread. - +Use `delete_chat_thread` method to delete a thread; `thread_id` is the unique ID of the thread. +- Use `thread_id`, required, to specify the unique ID of the thread. ```Python -chat_client.delete_chat_thread(thread_id) +chat_client.delete_chat_thread(thread_id=thread_id) ``` ## Message Operations ### Send a message -Use `send_message` method to sends a message to a thread identified by threadId. +Use `send_message` method to sends a message to a thread identified by `thread_id`. -- Use `content` to provide the chat message content, it is required -- Use `chat_message_type` to provide the chat message type. Possible values include: `ChatMessageType.TEXT`, `ChatMessageType.HTML`, `ChatMessageType.TOPIC_UPDATED`, `ChatMessageType.PARTICIPANT_ADDED`, `ChatMessageType.PARTICIPANT_REMOVED` -- Use `sender_display_name` to specify the display name of the sender, if not specified, empty name will be set +- Use `content`, required, to provide the chat message content. +- Use `chat_message_type`, optional, to provide the chat message type. Possible values include: `ChatMessageType.TEXT`, + `ChatMessageType.HTML`, `'text'`, `'html'`; if not specified, `ChatMessageType.TEXT` will be set +- Use `sender_display_name`,optional, to specify the display name of the sender, if not specified, empty name will be set `SendChatMessageResult` is the response returned from sending a message, it contains an id, which is the unique ID of the message. ```Python -from azure.communication.chat import ChatMessagePriority +from azure.communication.chat import ChatMessageType + +topic = "test topic" +create_chat_thread_result = chat_client.create_chat_thread(topic) +thread_id = create_chat_thread_result.chat_thread.id +chat_thread_client = chat_client.get_chat_thread_client(create_chat_thread_result.chat_thread.id) + content='hello world' sender_display_name='sender name' - -send_message_result = chat_thread_client.send_message(content, sender_display_name=sender_display_name) +chat_message_type = ChatMessageType.TEXT + +# without specifying sender_display_name and chat_message_type +send_message_result_id = chat_thread_client.send_message(content) +print("Message sent: id: ", send_message_result_id) + +# specifying sender_display_name and chat_message_type +send_message_result_w_type_id = chat_thread_client.send_message( + content, + sender_display_name=sender_display_name, + chat_message_type=chat_message_type # equivalent to chat_message_type = 'text' +) +print("Message sent: id: ", send_message_result_w_type_id) ``` ### Get a message -The `get_message` method retrieves a message from the service. -`message_id` is the unique ID of the message. - +Use `get_message` method retrieves a message from the service; `message_id` is the unique ID of the message. +- Use `message_id`,required, to specify message id of an existing message `ChatMessage` is the response returned from getting a message, it contains an id, which is the unique ID of the message, and other fields please refer to azure.communication.chat.ChatMessage ```python -chat_message = chat_thread_client.get_message(message_id) +chat_message = chat_thread_client.get_message(message_id=send_message_result_id) +print("get_chat_message succeeded, message id:", chat_message.id, "content: ", chat_message.content) ``` -### Get messages +### List messages -The `list_messages` method retrieves messages from the service. -- `results_per_page`, optional, The maximum number of messages to be returned per page. -- `start_time`, optional, The start time where the range query. +Use `list_messages` method retrieves messages from the service. +- Use `results_per_page`, optional, The maximum number of messages to be returned per page. +- Use `start_time`, optional, The start time where the range query. An iterator of `[ChatMessage]` is the response returned from listing messages @@ -292,65 +357,155 @@ start_time = datetime.utcnow() - timedelta(days=1) start_time = start_time.replace(tzinfo=pytz.utc) chat_messages = chat_thread_client.list_messages(results_per_page=1, start_time=start_time) for chat_message_page in chat_messages.by_page(): - l = list(chat_message_page) - print("page size: ", len(l)) + for chat_message in chat_message_page: + print("ChatMessage: Id=", chat_message.id, "; Content=", chat_message.content) ``` ### Update a message Use `update_message` to update a message identified by threadId and messageId. -`message_id` is the unique ID of the message. -`content` is the message content to be updated. - -- Use `content` to provide a new chat message content; +- Use `message_id`,required, is the unique ID of the message. +- Use `content`, optional, is the message content to be updated; if not specified it is assigned to be empty ```Python content = "updated message content" -chat_thread_client.update_message(message_id, content=content) +chat_thread_client.update_message(send_message_result_id, content=content) + +chat_message = chat_thread_client.get_message(message_id=send_message_result_id) + +assert chat_message.content == content ``` ### Delete a message Use `delete_message` to delete a message. -`message_Id` is the unique ID of the message. +- Use `message_id`, required, is the unique ID of the message. ```python -chat_thread_client.delete_message(message_id) +chat_thread_client.delete_message(message_id=send_message_result_id) ``` ## Thread Participant Operations -### Get thread participants +### List thread participants Use `list_participants` to retrieve the participants of the thread. +- Use `results_per_page`, optional, The maximum number of participants to be returned per page. +- Use `skip`, optional, to skips participants up to a specified position in response. An iterator of `[ChatThreadParticipant]` is the response returned from listing participants ```python chat_thread_participants = chat_thread_client.list_participants(results_per_page=5, skip=5) -for chat_thread_participant in chat_thread_participants: - print(chat_thread_participant) +for chat_thread_participant_page in chat_thread_participants.by_page(): + for chat_thread_participant in chat_thread_participant_page: + print("ChatThreadParticipant: ", chat_thread_participant) ``` +### Add single thread participant +Use `add_participant` method to add a single thread participants to the thread. + +- Use `thread_participant`, required, to specify the `ChatThreadParticipant` to be added to the thread; + - `user`, required, it is the `CommunicationUserIdentifier` you created by CommunicationIdentityClient.create_user() from User Access Tokens + + - `display_name`, optional, is the display name for the thread participant. + - `share_history_time`, optional, time from which the chat history is shared with the participant. + +A `tuple(ChatThreadParticipant, CommunicationError)` is returned. When participant is successfully added, +`(None, None)` is expected. In case of an error encountered while adding participant, the tuple is populated +with the participant along with the error that was encountered. +```python +from azure.communication.identity import CommunicationIdentityClient +from azure.communication.chat import ChatThreadParticipant +from datetime import datetime + +# create an user +identity_client = CommunicationIdentityClient.from_connection_string('') +new_user = identity_client.create_user() + +# # conversely, you can also add an existing user to a chat thread; provided the user_id is known +# from azure.communication.identity import CommunicationUserIdentifier +# +# user_id = 'some user id' +# user_display_name = "Wilma Flinstone" +# new_user = CommunicationUserIdentifier(user_id) +# participant = ChatThreadParticipant( +# user=new_user, +# display_name=user_display_name, +# share_history_time=datetime.utcnow()) + +def decide_to_retry(error, **kwargs): + """ + Insert some custom logic to decide if retry is applicable based on error + """ + return True + +participant = ChatThreadParticipant( + user=new_user, + display_name='Fred Flinstone', + share_history_time=datetime.utcnow()) + +try: + chat_thread_client.add_participant(thread_participant=participant) +except RuntimeError as e: + if e is not None and decide_to_retry(error=e): + chat_thread_client.add_participant(thread_participant=participant) + +``` ### Add thread participants Use `add_participants` method to add thread participants to the thread. -- Use `thread_participants` to list the `ChatThreadParticipant` to be added to the thread; -- `user`, required, it is the `CommunicationUserIdentifier` you created by CommunicationIdentityClient.create_user() from User Access Tokens - -- `display_name`, optional, is the display name for the thread participant. -- `share_history_time`, optional, time from which the chat history is shared with the participant. +- Use `thread_participants`, required, to list the `ChatThreadParticipant` to be added to the thread; + - `user`, required, it is the `CommunicationUserIdentifier` you created by CommunicationIdentityClient.create_user() from User Access Tokens + + - `display_name`, optional, is the display name for the thread participant. + - `share_history_time`, optional, time from which the chat history is shared with the participant. +A `list(tuple(ChatThreadParticipant, CommunicationError))` is returned. When participant is successfully added, +an empty list is expected. In case of an error encountered while adding participant, the list is populated +with the failed participants along with the error that was encountered. ```Python +from azure.communication.identity import CommunicationIdentityClient from azure.communication.chat import ChatThreadParticipant from datetime import datetime -participant = ChatThreadParticipant( - user='', - display_name='name', - share_history_time=datetime.utcnow()) -thread_participants = [participant] -chat_thread_client.add_participants(thread_participants) + +# create 2 users +identity_client = CommunicationIdentityClient.from_connection_string('') +new_users = [identity_client.create_user() for i in range(2)] + +# # conversely, you can also add an existing user to a chat thread; provided the user_id is known +# from azure.communication.identity import CommunicationUserIdentifier +# +# user_id = 'some user id' +# user_display_name = "Wilma Flinstone" +# new_user = CommunicationUserIdentifier(user_id) +# participant = ChatThreadParticipant( +# user=new_user, +# display_name=user_display_name, +# share_history_time=datetime.utcnow()) + +participants = [] +for _user in new_users: + chat_thread_participant = ChatThreadParticipant( + user=_user, + display_name='Fred Flinstone', + share_history_time=datetime.utcnow() + ) + participants.append(chat_thread_participant) + +response = chat_thread_client.add_participants(thread_participants=participants) + +def decide_to_retry(error, **kwargs): + """ + Insert some custom logic to decide if retry is applicable based on error + """ + return True + +# verify if all users has been successfully added or not +# in case of partial failures, you can retry to add all the failed participants +retry = [p for p, e in response if decide_to_retry(e)] +chat_thread_client.add_participants(retry) ``` ### Remove thread participant @@ -359,9 +514,16 @@ Use `remove_participant` method to remove thread participant from the thread ide `user` is the `CommunicationUserIdentifier` you created by CommunicationIdentityClient.create_user() from User Access Tokens and was added into this chat thread. - +- Use `user` to specify the `CommunicationUserIdentifier` you created ```python -chat_thread_client.remove_participant(user) +chat_thread_client.remove_participant(user=new_user) + +# # converesely you can also do the following; provided the user_id is known +# from azure.communication.identity import CommunicationUserIdentifier +# +# user_id = 'some user id' +# chat_thread_client.remove_participant(user=CommunincationUserIdentfier(new_user)) + ``` ## Events Operations @@ -377,24 +539,29 @@ chat_thread_client.send_typing_notification() ### Send read receipt Use `send_read_receipt` method to post a read receipt event to a thread, on behalf of a user. - +- Use `message_id` to specify the id of the message whose read receipt is to be sent ```python -chat_thread_client.send_read_receipt(message_id) +content='hello world' +send_message_result_id = chat_thread_client.send_message(content) +chat_thread_client.send_read_receipt(message_id=send_message_result_id) ``` -### Get read receipts +### List read receipts -`list_read_receipts` method retrieves read receipts for a thread. +Use `list_read_receipts` method retrieves read receipts for a thread. +- Use `results_per_page`, optional, The maximum number of read receipts to be returned per page. +- Use `skip`,optional, to skips read receipts up to a specified position in response. An iterator of `[ChatMessageReadReceipt]` is the response returned from listing read receipts ```python read_receipts = chat_thread_client.list_read_receipts(results_per_page=5, skip=5) -for read_receipt in read_receipts: - print(read_receipt) - print(read_receipt.sender) - print(read_receipt.chat_message_id) - print(read_receipt.read_on) +for read_receipt_page in read_receipts.by_page(): + for read_receipt in read_receipt_page: + print(read_receipt) + print(read_receipt.sender) + print(read_receipt.chat_message_id) + print(read_receipt.read_on) ``` ## Sample Code diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/__init__.py b/sdk/communication/azure-communication-chat/azure/communication/chat/__init__.py index b96a16e4aff7..94266498df10 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/__init__.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/__init__.py @@ -4,18 +4,18 @@ from ._generated.models import ( SendChatMessageResult, ChatThreadInfo, - ChatMessageType + ChatMessageType, + CommunicationError ) -from ._shared.user_credential import CommunicationTokenCredential -from ._shared.user_token_refresh_options import CommunicationTokenRefreshOptions + from ._models import ( ChatThreadParticipant, ChatMessage, ChatThread, ChatMessageReadReceipt, - ChatMessageContent + ChatMessageContent, + CreateChatThreadResult ) -from ._shared.models import CommunicationUserIdentifier __all__ = [ 'ChatClient', @@ -26,10 +26,9 @@ 'SendChatMessageResult', 'ChatThread', 'ChatThreadInfo', - 'CommunicationTokenCredential', - 'CommunicationTokenRefreshOptions', - 'CommunicationUserIdentifier', 'ChatThreadParticipant', - 'ChatMessageType' + 'ChatMessageType', + 'CreateChatThreadResult', + 'CommunicationError' ] __version__ = VERSION diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_client.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_client.py index af1ad4f897a2..48364bbe1713 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_client.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_client.py @@ -19,9 +19,13 @@ from ._generated.models import CreateChatThreadRequest from ._models import ( ChatThread, - ChatThreadParticipant + CreateChatThreadResult +) +from ._utils import ( # pylint: disable=unused-import + _to_utc_datetime, + return_response, + CommunicationErrorResponseConverter ) -from ._utils import _to_utc_datetime, return_response # pylint: disable=unused-import from ._version import SDK_MONIKER if TYPE_CHECKING: @@ -119,26 +123,24 @@ def get_chat_thread_client( @distributed_trace def create_chat_thread( self, topic, # type: str - thread_participants, # type: list[ChatThreadParticipant] - repeatability_request_id=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> ChatThreadClient + # type: (...) -> CreateChatThreadResult """Creates a chat thread. :param topic: Required. The thread topic. :type topic: str - :param thread_participants: Required. Participants to be added to the thread. - :type thread_participants: list[~azure.communication.chat.ChatThreadParticipant] - :param repeatability_request_id: If specified, the client directs that the request is + :keyword thread_participants: Optional. Participants to be added to the thread. + :paramtype thread_participants: list[~azure.communication.chat.ChatThreadParticipant] + :keyword repeatability_request_id: Optional. 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. If not specified, a new unique id would be generated. - :type repeatability_request_id: str - :return: ChatThreadClient - :rtype: ~azure.communication.chat.ChatThreadClient + :paramtype repeatability_request_id: str + :return: CreateChatThreadResult + :rtype: ~azure.communication.chat.CreateChatThreadResult :raises: ~azure.core.exceptions.HttpResponseError, ValueError .. admonition:: Example: @@ -148,40 +150,45 @@ def create_chat_thread( :end-before: [END create_thread] :language: python :dedent: 8 - :caption: Creating ChatThreadClient by creating a new chat thread. + :caption: Creating ChatThread by creating a new chat thread. """ if not topic: raise ValueError("topic cannot be None.") - if not thread_participants: - raise ValueError("List of ChatThreadParticipant cannot be None.") + + repeatability_request_id = kwargs.pop('repeatability_request_id', None) if repeatability_request_id is None: repeatability_request_id = str(uuid4()) - participants = [m._to_generated() for m in thread_participants] # pylint:disable=protected-access - create_thread_request = \ - CreateChatThreadRequest(topic=topic, participants=participants) + thread_participants = kwargs.pop('thread_participants', None) + participants = [] + if thread_participants is not None: + participants = [m._to_generated() for m in thread_participants] # pylint:disable=protected-access + + create_thread_request = CreateChatThreadRequest(topic=topic, participants=participants) create_chat_thread_result = self._client.chat.create_chat_thread( create_chat_thread_request=create_thread_request, repeatability_request_id=repeatability_request_id, **kwargs) + + errors = None if hasattr(create_chat_thread_result, 'errors') and \ create_chat_thread_result.errors is not None: - participants = \ - create_chat_thread_result.errors.invalid_participants - errors = [] - for participant in participants: - errors.append('participant ' + participant.target + - ' failed to join thread due to: ' + participant.message) - raise RuntimeError(errors) - thread_id = create_chat_thread_result.chat_thread.id - return ChatThreadClient( - endpoint=self._endpoint, - credential=self._credential, - thread_id=thread_id, - **kwargs + errors = CommunicationErrorResponseConverter._convert( # pylint:disable=protected-access + participants=[thread_participants], + communication_errors=create_chat_thread_result.errors.invalid_participants + ) + + chat_thread = ChatThread._from_generated( # pylint:disable=protected-access + create_chat_thread_result.chat_thread) + + create_chat_thread_result = CreateChatThreadResult( + chat_thread=chat_thread, + errors=errors ) + return create_chat_thread_result + @distributed_trace def get_chat_thread( self, thread_id, # type: str @@ -192,8 +199,7 @@ def get_chat_thread( :param thread_id: Required. Thread id to get. :type thread_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ChatThread, or the result of cls(response) + :return: ChatThread :rtype: ~azure.communication.chat.ChatThread :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -254,8 +260,7 @@ def delete_chat_thread( :param thread_id: Required. Thread id to delete. :type thread_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_thread_client.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_thread_client.py index 1e3095997cf6..056895bf803d 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_thread_client.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_thread_client.py @@ -29,7 +29,11 @@ ChatMessageReadReceipt ) -from ._utils import _to_utc_datetime # pylint: disable=unused-import +from ._utils import ( # pylint: disable=unused-import + _to_utc_datetime, + CommunicationUserIdentifierConverter, + CommunicationErrorResponseConverter +) from ._version import SDK_MONIKER if TYPE_CHECKING: @@ -125,8 +129,7 @@ def update_topic( :param topic: Thread topic. If topic is not specified, the update will succeeded but chat thread properties will not be changed. :type topic: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -157,8 +160,7 @@ def send_read_receipt( :param message_id: Required. Id of the latest message read by current user. :type message_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -190,7 +192,6 @@ def list_read_receipts( :keyword int results_per_page: The maximum number of chat message read receipts to be returned per page. :keyword int skip: Skips chat message read receipts up to a specified position in response. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of ChatMessageReadReceipt :rtype: ~azure.core.paging.ItemPaged[~azure.communication.chat.ChatMessageReadReceipt] :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -222,8 +223,7 @@ def send_typing_notification( # type: (...) -> None """Posts a typing event to a thread, on behalf of a user. - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -254,8 +254,7 @@ def send_message( :type chat_message_type: str or ~azure.communication.chat.models.ChatMessageType :keyword str sender_display_name: The display name of the message sender. This property is used to populate sender name for push notifications. - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) + :return: str :rtype: str :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -310,8 +309,7 @@ def get_message( :param message_id: Required. The message id. :type message_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ChatMessage, or the result of cls(response) + :return: ChatMessage :rtype: ~azure.communication.chat.ChatMessage :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -339,8 +337,8 @@ def list_messages( """Gets a list of messages from a thread. :keyword int results_per_page: The maximum number of messages to be returned per page. - :keyword ~datetime.datetime start_time: The start time where the range query. - :keyword callable cls: A custom type or function that will be passed the direct response + :keyword ~datetime.datetime start_time: The earliest point in time to get messages up to. + The timestamp should be in RFC3339 format: ``yyyy-MM-ddTHH:mm:ssZ``. :return: An iterator like instance of ChatMessage :rtype: ~azure.core.paging.ItemPaged[~azure.communication.chat.ChatMessage] :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -379,8 +377,7 @@ def update_message( :type message_id: str :param content: Chat message content. :type content: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -396,7 +393,7 @@ def update_message( if not message_id: raise ValueError("message_id cannot be None.") - update_message_request = UpdateChatMessageRequest(content=content, priority=None) + update_message_request = UpdateChatMessageRequest(content=content) return self._client.chat_thread.update_chat_message( chat_thread_id=self._thread_id, @@ -415,8 +412,7 @@ def delete_message( :param message_id: Required. The message id. :type message_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -447,7 +443,6 @@ def list_participants( :keyword int results_per_page: The maximum number of participants to be returned per page. :keyword int skip: Skips participants up to a specified position in response. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of ChatThreadParticipant :rtype: ~azure.core.paging.ItemPaged[~azure.communication.chat.ChatThreadParticipant] :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -481,12 +476,14 @@ def add_participant( # type: (...) -> None """Adds single thread participant to a thread. If participant already exist, no change occurs. + If participant is added successfully, a tuple of (None, None) is expected. + Failure to add participant to thread returns tuple of (chat_thread_participant, communication_error). + :param thread_participant: Required. Single thread participant to be added to the thread. :type thread_participant: ~azure.communication.chat.ChatThreadParticipant - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError, ValueError + :raises: ~azure.core.exceptions.HttpResponseError, ValueError, RuntimeError .. admonition:: Example: @@ -503,26 +500,43 @@ def add_participant( participants = [thread_participant._to_generated()] # pylint:disable=protected-access add_thread_participants_request = AddChatParticipantsRequest(participants=participants) - return self._client.chat_thread.add_chat_participants( + add_chat_participants_result = self._client.chat_thread.add_chat_participants( chat_thread_id=self._thread_id, add_chat_participants_request=add_thread_participants_request, **kwargs) + response = [] + if hasattr(add_chat_participants_result, 'errors') and \ + add_chat_participants_result.errors is not None: + response = CommunicationErrorResponseConverter._convert( # pylint:disable=protected-access + participants=[thread_participant], + communication_errors=add_chat_participants_result.errors.invalid_participants + ) + + if len(response) != 0: + failed_participant = response[0][0] + communication_error = response[0][1] + raise RuntimeError('Participant: ', failed_participant, ' failed to join thread due to: ', + communication_error.message) + @distributed_trace def add_participants( self, thread_participants, # type: list[ChatThreadParticipant] **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> list[(ChatThreadParticipant, CommunicationError)] """Adds thread participants to a thread. If participants already exist, no change occurs. + If all participants are added successfully, then an empty list is returned; + otherwise, a list of tuple(chat_thread_participant, communincation_error) is returned, + of failed participants and its respective error + :param thread_participants: Required. Thread participants to be added to the thread. :type thread_participants: list[~azure.communication.chat.ChatThreadParticipant] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError, ValueError + :return: List[Tuple(ChatThreadParticipant, CommunicationError)] + :rtype: list[(~azure.communication.chat.ChatThreadParticipant, ~azure.communication.chat.CommunicationError)] + :raises: ~azure.core.exceptions.HttpResponseError, ValueError, RuntimeError .. admonition:: Example: @@ -539,11 +553,21 @@ def add_participants( participants = [m._to_generated() for m in thread_participants] # pylint:disable=protected-access add_thread_participants_request = AddChatParticipantsRequest(participants=participants) - return self._client.chat_thread.add_chat_participants( + add_chat_participants_result = self._client.chat_thread.add_chat_participants( chat_thread_id=self._thread_id, add_chat_participants_request=add_thread_participants_request, **kwargs) + response = [] + if hasattr(add_chat_participants_result, 'errors') and \ + add_chat_participants_result.errors is not None: + response = CommunicationErrorResponseConverter._convert( # pylint:disable=protected-access + participants=thread_participants, + communication_errors=add_chat_participants_result.errors.invalid_participants + ) + + return response + @distributed_trace def remove_participant( self, @@ -555,8 +579,7 @@ def remove_participant( :param user: Required. User identity of the thread participant to remove from the thread. :type user: ~azure.communication.chat.CommunicationUserIdentifier - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -574,7 +597,7 @@ def remove_participant( return self._client.chat_thread.remove_chat_participant( chat_thread_id=self._thread_id, - chat_participant_id=user.identifier, + participant_communication_identifier=CommunicationUserIdentifierConverter.to_identifier_model(user), **kwargs) def close(self): diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/_configuration.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/_configuration.py index ffeba8865187..3b061acc042c 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/_configuration.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/_configuration.py @@ -38,7 +38,7 @@ def __init__( super(AzureCommunicationChatServiceConfiguration, self).__init__(**kwargs) self.endpoint = endpoint - self.api_version = "2020-11-01-preview3" + self.api_version = "2021-01-27-preview4" kwargs.setdefault('sdk_moniker', 'azurecommunicationchatservice/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/_configuration.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/_configuration.py index ccd461ebf21b..f9848e62fb00 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/_configuration.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/_configuration.py @@ -33,7 +33,7 @@ def __init__( super(AzureCommunicationChatServiceConfiguration, self).__init__(**kwargs) self.endpoint = endpoint - self.api_version = "2020-11-01-preview3" + self.api_version = "2021-01-27-preview4" kwargs.setdefault('sdk_moniker', 'azurecommunicationchatservice/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/operations/_chat_operations.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/operations/_chat_operations.py index f4c03ab7678e..27015c87e6b7 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/operations/_chat_operations.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/operations/_chat_operations.py @@ -55,8 +55,8 @@ async def create_chat_thread( :type create_chat_thread_request: ~azure.communication.chat.models.CreateChatThreadRequest :param repeatability_request_id: 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 + 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 repeatability_request_id: str @@ -75,7 +75,7 @@ async def create_chat_thread( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -93,7 +93,7 @@ async def create_chat_thread( # Construct headers header_parameters = {} # type: Dict[str, Any] if repeatability_request_id is not None: - header_parameters['repeatability-Request-ID'] = self._serialize.header("repeatability_request_id", repeatability_request_id, 'str') + header_parameters['repeatability-Request-Id'] = self._serialize.header("repeatability_request_id", repeatability_request_id, 'str') header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') @@ -146,7 +146,7 @@ def list_chat_threads( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" def prepare_request(next_link=None): @@ -230,7 +230,7 @@ async def get_chat_thread( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" # Construct URL @@ -291,7 +291,7 @@ async def delete_chat_thread( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" # Construct URL diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/operations/_chat_thread_operations.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/operations/_chat_thread_operations.py index c0310c0e14a0..ef8b605e8af4 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/operations/_chat_thread_operations.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/aio/operations/_chat_thread_operations.py @@ -73,7 +73,7 @@ def list_chat_read_receipts( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" def prepare_request(next_link=None): @@ -162,7 +162,7 @@ async def send_chat_read_receipt( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -228,7 +228,7 @@ async def send_chat_message( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -301,7 +301,7 @@ def list_chat_messages( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" def prepare_request(next_link=None): @@ -390,7 +390,7 @@ async def get_chat_message( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" # Construct URL @@ -458,7 +458,7 @@ async def update_chat_message( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" content_type = kwargs.pop("content_type", "application/merge-patch+json") accept = "application/json" @@ -525,7 +525,7 @@ async def delete_chat_message( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" # Construct URL @@ -584,7 +584,7 @@ async def send_typing_notification( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" # Construct URL @@ -648,7 +648,7 @@ def list_chat_participants( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" def prepare_request(next_link=None): @@ -711,7 +711,7 @@ async def get_next(next_link=None): async def remove_chat_participant( self, chat_thread_id: str, - chat_participant_id: str, + participant_communication_identifier: "_models.CommunicationIdentifierModel", **kwargs ) -> None: """Remove a participant from a thread. @@ -720,8 +720,9 @@ async def remove_chat_participant( :param chat_thread_id: Thread id to remove the participant from. :type chat_thread_id: str - :param chat_participant_id: Id of the thread participant to remove from the thread. - :type chat_participant_id: str + :param participant_communication_identifier: Id of the thread participant to remove from the + thread. + :type participant_communication_identifier: ~azure.communication.chat.models.CommunicationIdentifierModel :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -737,7 +738,8 @@ async def remove_chat_participant( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL @@ -745,7 +747,6 @@ async def remove_chat_participant( path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'chatThreadId': self._serialize.url("chat_thread_id", chat_thread_id, 'str'), - 'chatParticipantId': self._serialize.url("chat_participant_id", chat_participant_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -755,9 +756,13 @@ async def remove_chat_participant( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(participant_communication_identifier, 'CommunicationIdentifierModel') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -768,7 +773,7 @@ async def remove_chat_participant( if cls: return cls(pipeline_response, None, {}) - remove_chat_participant.metadata = {'url': '/chat/threads/{chatThreadId}/participants/{chatParticipantId}'} # type: ignore + remove_chat_participant.metadata = {'url': '/chat/threads/{chatThreadId}/participants/:remove'} # type: ignore async def add_chat_participants( self, @@ -799,7 +804,7 @@ async def add_chat_participants( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -868,7 +873,7 @@ async def update_chat_thread( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" content_type = kwargs.pop("content_type", "application/merge-patch+json") accept = "application/json" diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/__init__.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/__init__.py index 5a3c0ca85620..eea4119d9489 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/__init__.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/__init__.py @@ -22,9 +22,13 @@ from ._models_py3 import ChatThreadsInfoCollection from ._models_py3 import CommunicationError from ._models_py3 import CommunicationErrorResponse + from ._models_py3 import CommunicationIdentifierModel + from ._models_py3 import CommunicationUserIdentifierModel from ._models_py3 import CreateChatThreadErrors from ._models_py3 import CreateChatThreadRequest from ._models_py3 import CreateChatThreadResult + from ._models_py3 import MicrosoftTeamsUserIdentifierModel + from ._models_py3 import PhoneNumberIdentifierModel from ._models_py3 import SendChatMessageRequest from ._models_py3 import SendChatMessageResult from ._models_py3 import SendReadReceiptRequest @@ -46,9 +50,13 @@ from ._models import ChatThreadsInfoCollection # type: ignore from ._models import CommunicationError # type: ignore from ._models import CommunicationErrorResponse # type: ignore + from ._models import CommunicationIdentifierModel # type: ignore + from ._models import CommunicationUserIdentifierModel # type: ignore from ._models import CreateChatThreadErrors # type: ignore from ._models import CreateChatThreadRequest # type: ignore from ._models import CreateChatThreadResult # type: ignore + from ._models import MicrosoftTeamsUserIdentifierModel # type: ignore + from ._models import PhoneNumberIdentifierModel # type: ignore from ._models import SendChatMessageRequest # type: ignore from ._models import SendChatMessageResult # type: ignore from ._models import SendReadReceiptRequest # type: ignore @@ -57,6 +65,7 @@ from ._azure_communication_chat_service_enums import ( ChatMessageType, + CommunicationCloudEnvironmentModel, ) __all__ = [ @@ -75,13 +84,18 @@ 'ChatThreadsInfoCollection', 'CommunicationError', 'CommunicationErrorResponse', + 'CommunicationIdentifierModel', + 'CommunicationUserIdentifierModel', 'CreateChatThreadErrors', 'CreateChatThreadRequest', 'CreateChatThreadResult', + 'MicrosoftTeamsUserIdentifierModel', + 'PhoneNumberIdentifierModel', 'SendChatMessageRequest', 'SendChatMessageResult', 'SendReadReceiptRequest', 'UpdateChatMessageRequest', 'UpdateChatThreadRequest', 'ChatMessageType', + 'CommunicationCloudEnvironmentModel', ] diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_azure_communication_chat_service_enums.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_azure_communication_chat_service_enums.py index 9370f9fec0d7..0a32c53074ba 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_azure_communication_chat_service_enums.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_azure_communication_chat_service_enums.py @@ -35,3 +35,11 @@ class ChatMessageType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): TOPIC_UPDATED = "topicUpdated" PARTICIPANT_ADDED = "participantAdded" PARTICIPANT_REMOVED = "participantRemoved" + +class CommunicationCloudEnvironmentModel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The cloud that the identifier belongs to. + """ + + PUBLIC = "public" + DOD = "dod" + GCCH = "gcch" diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_models.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_models.py index 999437af07cb..fba77405c47d 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_models.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_models.py @@ -103,8 +103,12 @@ class ChatMessage(msrest.serialization.Model): :param created_on: Required. The timestamp when the chat message arrived at the server. The timestamp is in RFC3339 format: ``yyyy-MM-ddTHH:mm:ssZ``. :type created_on: ~datetime.datetime - :param sender_id: The id of the chat message sender. - :type sender_id: str + :param sender_communication_identifier: Identifies a participant in Azure Communication + services. A participant is, for example, a phone number or an Azure communication user. This + model must be interpreted as a union: Apart from rawId, at most one further property may be + set. + :type sender_communication_identifier: + ~azure.communication.chat.models.CommunicationIdentifierModel :param deleted_on: The timestamp (if applicable) when the message was deleted. The timestamp is in RFC3339 format: ``yyyy-MM-ddTHH:mm:ssZ``. :type deleted_on: ~datetime.datetime @@ -129,7 +133,7 @@ class ChatMessage(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'ChatMessageContent'}, 'sender_display_name': {'key': 'senderDisplayName', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'sender_id': {'key': 'senderId', 'type': 'str'}, + 'sender_communication_identifier': {'key': 'senderCommunicationIdentifier', 'type': 'CommunicationIdentifierModel'}, 'deleted_on': {'key': 'deletedOn', 'type': 'iso-8601'}, 'edited_on': {'key': 'editedOn', 'type': 'iso-8601'}, } @@ -146,7 +150,7 @@ def __init__( self.content = kwargs.get('content', None) self.sender_display_name = kwargs.get('sender_display_name', None) self.created_on = kwargs['created_on'] - self.sender_id = kwargs.get('sender_id', None) + self.sender_communication_identifier = kwargs.get('sender_communication_identifier', None) self.deleted_on = kwargs.get('deleted_on', None) self.edited_on = kwargs.get('edited_on', None) @@ -161,16 +165,19 @@ class ChatMessageContent(msrest.serialization.Model): :param participants: Chat message content for messages of types participantAdded or participantRemoved. :type participants: list[~azure.communication.chat.models.ChatParticipant] - :param initiator: Chat message content for messages of types participantAdded or - participantRemoved. - :type initiator: str + :param initiator_communication_identifier: Identifies a participant in Azure Communication + services. A participant is, for example, a phone number or an Azure communication user. This + model must be interpreted as a union: Apart from rawId, at most one further property may be + set. + :type initiator_communication_identifier: + ~azure.communication.chat.models.CommunicationIdentifierModel """ _attribute_map = { 'message': {'key': 'message', 'type': 'str'}, 'topic': {'key': 'topic', 'type': 'str'}, 'participants': {'key': 'participants', 'type': '[ChatParticipant]'}, - 'initiator': {'key': 'initiator', 'type': 'str'}, + 'initiator_communication_identifier': {'key': 'initiatorCommunicationIdentifier', 'type': 'CommunicationIdentifierModel'}, } def __init__( @@ -181,7 +188,7 @@ def __init__( self.message = kwargs.get('message', None) self.topic = kwargs.get('topic', None) self.participants = kwargs.get('participants', None) - self.initiator = kwargs.get('initiator', None) + self.initiator_communication_identifier = kwargs.get('initiator_communication_identifier', None) class ChatMessageReadReceipt(msrest.serialization.Model): @@ -189,8 +196,12 @@ class ChatMessageReadReceipt(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param sender_id: Required. Id of the participant who read the message. - :type sender_id: str + :param sender_communication_identifier: Required. Identifies a participant in Azure + Communication services. A participant is, for example, a phone number or an Azure communication + user. This model must be interpreted as a union: Apart from rawId, at most one further property + may be set. + :type sender_communication_identifier: + ~azure.communication.chat.models.CommunicationIdentifierModel :param chat_message_id: Required. Id of the chat message that has been read. This id is generated by the server. :type chat_message_id: str @@ -200,13 +211,13 @@ class ChatMessageReadReceipt(msrest.serialization.Model): """ _validation = { - 'sender_id': {'required': True}, + 'sender_communication_identifier': {'required': True}, 'chat_message_id': {'required': True}, 'read_on': {'required': True}, } _attribute_map = { - 'sender_id': {'key': 'senderId', 'type': 'str'}, + 'sender_communication_identifier': {'key': 'senderCommunicationIdentifier', 'type': 'CommunicationIdentifierModel'}, 'chat_message_id': {'key': 'chatMessageId', 'type': 'str'}, 'read_on': {'key': 'readOn', 'type': 'iso-8601'}, } @@ -216,7 +227,7 @@ def __init__( **kwargs ): super(ChatMessageReadReceipt, self).__init__(**kwargs) - self.sender_id = kwargs['sender_id'] + self.sender_communication_identifier = kwargs['sender_communication_identifier'] self.chat_message_id = kwargs['chat_message_id'] self.read_on = kwargs['read_on'] @@ -292,8 +303,11 @@ class ChatParticipant(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. The id of the chat participant. - :type id: str + :param communication_identifier: Required. Identifies a participant in Azure Communication + services. A participant is, for example, a phone number or an Azure communication user. This + model must be interpreted as a union: Apart from rawId, at most one further property may be + set. + :type communication_identifier: ~azure.communication.chat.models.CommunicationIdentifierModel :param display_name: Display name for the chat participant. :type display_name: str :param share_history_time: Time from which the chat history is shared with the participant. The @@ -302,11 +316,11 @@ class ChatParticipant(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, + 'communication_identifier': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'communication_identifier': {'key': 'communicationIdentifier', 'type': 'CommunicationIdentifierModel'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'share_history_time': {'key': 'shareHistoryTime', 'type': 'iso-8601'}, } @@ -316,7 +330,7 @@ def __init__( **kwargs ): super(ChatParticipant, self).__init__(**kwargs) - self.id = kwargs['id'] + self.communication_identifier = kwargs['communication_identifier'] self.display_name = kwargs.get('display_name', None) self.share_history_time = kwargs.get('share_history_time', None) @@ -366,8 +380,12 @@ class ChatThread(msrest.serialization.Model): :param created_on: Required. The timestamp when the chat thread was created. The timestamp is in RFC3339 format: ``yyyy-MM-ddTHH:mm:ssZ``. :type created_on: ~datetime.datetime - :param created_by: Required. Id of the chat thread owner. - :type created_by: str + :param created_by_communication_identifier: Required. Identifies a participant in Azure + Communication services. A participant is, for example, a phone number or an Azure communication + user. This model must be interpreted as a union: Apart from rawId, at most one further property + may be set. + :type created_by_communication_identifier: + ~azure.communication.chat.models.CommunicationIdentifierModel :param deleted_on: The timestamp when the chat thread was deleted. The timestamp is in RFC3339 format: ``yyyy-MM-ddTHH:mm:ssZ``. :type deleted_on: ~datetime.datetime @@ -377,14 +395,14 @@ class ChatThread(msrest.serialization.Model): 'id': {'required': True}, 'topic': {'required': True}, 'created_on': {'required': True}, - 'created_by': {'required': True}, + 'created_by_communication_identifier': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'topic': {'key': 'topic', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_communication_identifier': {'key': 'createdByCommunicationIdentifier', 'type': 'CommunicationIdentifierModel'}, 'deleted_on': {'key': 'deletedOn', 'type': 'iso-8601'}, } @@ -396,7 +414,7 @@ def __init__( self.id = kwargs['id'] self.topic = kwargs['topic'] self.created_on = kwargs['created_on'] - self.created_by = kwargs['created_by'] + self.created_by_communication_identifier = kwargs['created_by_communication_identifier'] self.deleted_on = kwargs.get('deleted_on', None) @@ -548,6 +566,62 @@ def __init__( self.error = kwargs['error'] +class CommunicationIdentifierModel(msrest.serialization.Model): + """Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. + + :param raw_id: Raw Id of the identifier. Optional in requests, required in responses. + :type raw_id: str + :param communication_user: The communication user. + :type communication_user: ~azure.communication.chat.models.CommunicationUserIdentifierModel + :param phone_number: The phone number. + :type phone_number: ~azure.communication.chat.models.PhoneNumberIdentifierModel + :param microsoft_teams_user: The Microsoft Teams user. + :type microsoft_teams_user: ~azure.communication.chat.models.MicrosoftTeamsUserIdentifierModel + """ + + _attribute_map = { + 'raw_id': {'key': 'rawId', 'type': 'str'}, + 'communication_user': {'key': 'communicationUser', 'type': 'CommunicationUserIdentifierModel'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'PhoneNumberIdentifierModel'}, + 'microsoft_teams_user': {'key': 'microsoftTeamsUser', 'type': 'MicrosoftTeamsUserIdentifierModel'}, + } + + def __init__( + self, + **kwargs + ): + super(CommunicationIdentifierModel, self).__init__(**kwargs) + self.raw_id = kwargs.get('raw_id', None) + self.communication_user = kwargs.get('communication_user', None) + self.phone_number = kwargs.get('phone_number', None) + self.microsoft_teams_user = kwargs.get('microsoft_teams_user', None) + + +class CommunicationUserIdentifierModel(msrest.serialization.Model): + """A user that got created with an Azure Communication Services resource. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The Id of the communication user. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CommunicationUserIdentifierModel, self).__init__(**kwargs) + self.id = kwargs['id'] + + class CreateChatThreadErrors(msrest.serialization.Model): """Errors encountered during the creation of the chat thread. @@ -626,6 +700,67 @@ def __init__( self.errors = kwargs.get('errors', None) +class MicrosoftTeamsUserIdentifierModel(msrest.serialization.Model): + """A Microsoft Teams user. + + All required parameters must be populated in order to send to Azure. + + :param user_id: Required. The Id of the Microsoft Teams user. If not anonymous, this is the AAD + object Id of the user. + :type user_id: str + :param is_anonymous: True if the Microsoft Teams user is anonymous. By default false if + missing. + :type is_anonymous: bool + :param cloud: The cloud that the Microsoft Teams user belongs to. By default 'public' if + missing. Possible values include: "public", "dod", "gcch". + :type cloud: str or ~azure.communication.chat.models.CommunicationCloudEnvironmentModel + """ + + _validation = { + 'user_id': {'required': True}, + } + + _attribute_map = { + 'user_id': {'key': 'userId', 'type': 'str'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'cloud': {'key': 'cloud', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MicrosoftTeamsUserIdentifierModel, self).__init__(**kwargs) + self.user_id = kwargs['user_id'] + self.is_anonymous = kwargs.get('is_anonymous', None) + self.cloud = kwargs.get('cloud', None) + + +class PhoneNumberIdentifierModel(msrest.serialization.Model): + """A phone number. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. The phone number in E.164 format. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PhoneNumberIdentifierModel, self).__init__(**kwargs) + self.value = kwargs['value'] + + class SendChatMessageRequest(msrest.serialization.Model): """Details of the message to send. diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_models_py3.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_models_py3.py index 8da8a31bc35c..0c52e6d120b3 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_models_py3.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/_models_py3.py @@ -114,8 +114,12 @@ class ChatMessage(msrest.serialization.Model): :param created_on: Required. The timestamp when the chat message arrived at the server. The timestamp is in RFC3339 format: ``yyyy-MM-ddTHH:mm:ssZ``. :type created_on: ~datetime.datetime - :param sender_id: The id of the chat message sender. - :type sender_id: str + :param sender_communication_identifier: Identifies a participant in Azure Communication + services. A participant is, for example, a phone number or an Azure communication user. This + model must be interpreted as a union: Apart from rawId, at most one further property may be + set. + :type sender_communication_identifier: + ~azure.communication.chat.models.CommunicationIdentifierModel :param deleted_on: The timestamp (if applicable) when the message was deleted. The timestamp is in RFC3339 format: ``yyyy-MM-ddTHH:mm:ssZ``. :type deleted_on: ~datetime.datetime @@ -140,7 +144,7 @@ class ChatMessage(msrest.serialization.Model): 'content': {'key': 'content', 'type': 'ChatMessageContent'}, 'sender_display_name': {'key': 'senderDisplayName', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'sender_id': {'key': 'senderId', 'type': 'str'}, + 'sender_communication_identifier': {'key': 'senderCommunicationIdentifier', 'type': 'CommunicationIdentifierModel'}, 'deleted_on': {'key': 'deletedOn', 'type': 'iso-8601'}, 'edited_on': {'key': 'editedOn', 'type': 'iso-8601'}, } @@ -155,7 +159,7 @@ def __init__( created_on: datetime.datetime, content: Optional["ChatMessageContent"] = None, sender_display_name: Optional[str] = None, - sender_id: Optional[str] = None, + sender_communication_identifier: Optional["CommunicationIdentifierModel"] = None, deleted_on: Optional[datetime.datetime] = None, edited_on: Optional[datetime.datetime] = None, **kwargs @@ -168,7 +172,7 @@ def __init__( self.content = content self.sender_display_name = sender_display_name self.created_on = created_on - self.sender_id = sender_id + self.sender_communication_identifier = sender_communication_identifier self.deleted_on = deleted_on self.edited_on = edited_on @@ -183,16 +187,19 @@ class ChatMessageContent(msrest.serialization.Model): :param participants: Chat message content for messages of types participantAdded or participantRemoved. :type participants: list[~azure.communication.chat.models.ChatParticipant] - :param initiator: Chat message content for messages of types participantAdded or - participantRemoved. - :type initiator: str + :param initiator_communication_identifier: Identifies a participant in Azure Communication + services. A participant is, for example, a phone number or an Azure communication user. This + model must be interpreted as a union: Apart from rawId, at most one further property may be + set. + :type initiator_communication_identifier: + ~azure.communication.chat.models.CommunicationIdentifierModel """ _attribute_map = { 'message': {'key': 'message', 'type': 'str'}, 'topic': {'key': 'topic', 'type': 'str'}, 'participants': {'key': 'participants', 'type': '[ChatParticipant]'}, - 'initiator': {'key': 'initiator', 'type': 'str'}, + 'initiator_communication_identifier': {'key': 'initiatorCommunicationIdentifier', 'type': 'CommunicationIdentifierModel'}, } def __init__( @@ -201,14 +208,14 @@ def __init__( message: Optional[str] = None, topic: Optional[str] = None, participants: Optional[List["ChatParticipant"]] = None, - initiator: Optional[str] = None, + initiator_communication_identifier: Optional["CommunicationIdentifierModel"] = None, **kwargs ): super(ChatMessageContent, self).__init__(**kwargs) self.message = message self.topic = topic self.participants = participants - self.initiator = initiator + self.initiator_communication_identifier = initiator_communication_identifier class ChatMessageReadReceipt(msrest.serialization.Model): @@ -216,8 +223,12 @@ class ChatMessageReadReceipt(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param sender_id: Required. Id of the participant who read the message. - :type sender_id: str + :param sender_communication_identifier: Required. Identifies a participant in Azure + Communication services. A participant is, for example, a phone number or an Azure communication + user. This model must be interpreted as a union: Apart from rawId, at most one further property + may be set. + :type sender_communication_identifier: + ~azure.communication.chat.models.CommunicationIdentifierModel :param chat_message_id: Required. Id of the chat message that has been read. This id is generated by the server. :type chat_message_id: str @@ -227,13 +238,13 @@ class ChatMessageReadReceipt(msrest.serialization.Model): """ _validation = { - 'sender_id': {'required': True}, + 'sender_communication_identifier': {'required': True}, 'chat_message_id': {'required': True}, 'read_on': {'required': True}, } _attribute_map = { - 'sender_id': {'key': 'senderId', 'type': 'str'}, + 'sender_communication_identifier': {'key': 'senderCommunicationIdentifier', 'type': 'CommunicationIdentifierModel'}, 'chat_message_id': {'key': 'chatMessageId', 'type': 'str'}, 'read_on': {'key': 'readOn', 'type': 'iso-8601'}, } @@ -241,13 +252,13 @@ class ChatMessageReadReceipt(msrest.serialization.Model): def __init__( self, *, - sender_id: str, + sender_communication_identifier: "CommunicationIdentifierModel", chat_message_id: str, read_on: datetime.datetime, **kwargs ): super(ChatMessageReadReceipt, self).__init__(**kwargs) - self.sender_id = sender_id + self.sender_communication_identifier = sender_communication_identifier self.chat_message_id = chat_message_id self.read_on = read_on @@ -327,8 +338,11 @@ class ChatParticipant(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. The id of the chat participant. - :type id: str + :param communication_identifier: Required. Identifies a participant in Azure Communication + services. A participant is, for example, a phone number or an Azure communication user. This + model must be interpreted as a union: Apart from rawId, at most one further property may be + set. + :type communication_identifier: ~azure.communication.chat.models.CommunicationIdentifierModel :param display_name: Display name for the chat participant. :type display_name: str :param share_history_time: Time from which the chat history is shared with the participant. The @@ -337,11 +351,11 @@ class ChatParticipant(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, + 'communication_identifier': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'communication_identifier': {'key': 'communicationIdentifier', 'type': 'CommunicationIdentifierModel'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'share_history_time': {'key': 'shareHistoryTime', 'type': 'iso-8601'}, } @@ -349,13 +363,13 @@ class ChatParticipant(msrest.serialization.Model): def __init__( self, *, - id: str, + communication_identifier: "CommunicationIdentifierModel", display_name: Optional[str] = None, share_history_time: Optional[datetime.datetime] = None, **kwargs ): super(ChatParticipant, self).__init__(**kwargs) - self.id = id + self.communication_identifier = communication_identifier self.display_name = display_name self.share_history_time = share_history_time @@ -407,8 +421,12 @@ class ChatThread(msrest.serialization.Model): :param created_on: Required. The timestamp when the chat thread was created. The timestamp is in RFC3339 format: ``yyyy-MM-ddTHH:mm:ssZ``. :type created_on: ~datetime.datetime - :param created_by: Required. Id of the chat thread owner. - :type created_by: str + :param created_by_communication_identifier: Required. Identifies a participant in Azure + Communication services. A participant is, for example, a phone number or an Azure communication + user. This model must be interpreted as a union: Apart from rawId, at most one further property + may be set. + :type created_by_communication_identifier: + ~azure.communication.chat.models.CommunicationIdentifierModel :param deleted_on: The timestamp when the chat thread was deleted. The timestamp is in RFC3339 format: ``yyyy-MM-ddTHH:mm:ssZ``. :type deleted_on: ~datetime.datetime @@ -418,14 +436,14 @@ class ChatThread(msrest.serialization.Model): 'id': {'required': True}, 'topic': {'required': True}, 'created_on': {'required': True}, - 'created_by': {'required': True}, + 'created_by_communication_identifier': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'topic': {'key': 'topic', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_communication_identifier': {'key': 'createdByCommunicationIdentifier', 'type': 'CommunicationIdentifierModel'}, 'deleted_on': {'key': 'deletedOn', 'type': 'iso-8601'}, } @@ -435,7 +453,7 @@ def __init__( id: str, topic: str, created_on: datetime.datetime, - created_by: str, + created_by_communication_identifier: "CommunicationIdentifierModel", deleted_on: Optional[datetime.datetime] = None, **kwargs ): @@ -443,7 +461,7 @@ def __init__( self.id = id self.topic = topic self.created_on = created_on - self.created_by = created_by + self.created_by_communication_identifier = created_by_communication_identifier self.deleted_on = deleted_on @@ -606,6 +624,69 @@ def __init__( self.error = error +class CommunicationIdentifierModel(msrest.serialization.Model): + """Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. + + :param raw_id: Raw Id of the identifier. Optional in requests, required in responses. + :type raw_id: str + :param communication_user: The communication user. + :type communication_user: ~azure.communication.chat.models.CommunicationUserIdentifierModel + :param phone_number: The phone number. + :type phone_number: ~azure.communication.chat.models.PhoneNumberIdentifierModel + :param microsoft_teams_user: The Microsoft Teams user. + :type microsoft_teams_user: ~azure.communication.chat.models.MicrosoftTeamsUserIdentifierModel + """ + + _attribute_map = { + 'raw_id': {'key': 'rawId', 'type': 'str'}, + 'communication_user': {'key': 'communicationUser', 'type': 'CommunicationUserIdentifierModel'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'PhoneNumberIdentifierModel'}, + 'microsoft_teams_user': {'key': 'microsoftTeamsUser', 'type': 'MicrosoftTeamsUserIdentifierModel'}, + } + + def __init__( + self, + *, + raw_id: Optional[str] = None, + communication_user: Optional["CommunicationUserIdentifierModel"] = None, + phone_number: Optional["PhoneNumberIdentifierModel"] = None, + microsoft_teams_user: Optional["MicrosoftTeamsUserIdentifierModel"] = None, + **kwargs + ): + super(CommunicationIdentifierModel, self).__init__(**kwargs) + self.raw_id = raw_id + self.communication_user = communication_user + self.phone_number = phone_number + self.microsoft_teams_user = microsoft_teams_user + + +class CommunicationUserIdentifierModel(msrest.serialization.Model): + """A user that got created with an Azure Communication Services resource. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The Id of the communication user. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + **kwargs + ): + super(CommunicationUserIdentifierModel, self).__init__(**kwargs) + self.id = id + + class CreateChatThreadErrors(msrest.serialization.Model): """Errors encountered during the creation of the chat thread. @@ -690,6 +771,73 @@ def __init__( self.errors = errors +class MicrosoftTeamsUserIdentifierModel(msrest.serialization.Model): + """A Microsoft Teams user. + + All required parameters must be populated in order to send to Azure. + + :param user_id: Required. The Id of the Microsoft Teams user. If not anonymous, this is the AAD + object Id of the user. + :type user_id: str + :param is_anonymous: True if the Microsoft Teams user is anonymous. By default false if + missing. + :type is_anonymous: bool + :param cloud: The cloud that the Microsoft Teams user belongs to. By default 'public' if + missing. Possible values include: "public", "dod", "gcch". + :type cloud: str or ~azure.communication.chat.models.CommunicationCloudEnvironmentModel + """ + + _validation = { + 'user_id': {'required': True}, + } + + _attribute_map = { + 'user_id': {'key': 'userId', 'type': 'str'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'cloud': {'key': 'cloud', 'type': 'str'}, + } + + def __init__( + self, + *, + user_id: str, + is_anonymous: Optional[bool] = None, + cloud: Optional[Union[str, "CommunicationCloudEnvironmentModel"]] = None, + **kwargs + ): + super(MicrosoftTeamsUserIdentifierModel, self).__init__(**kwargs) + self.user_id = user_id + self.is_anonymous = is_anonymous + self.cloud = cloud + + +class PhoneNumberIdentifierModel(msrest.serialization.Model): + """A phone number. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. The phone number in E.164 format. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + value: str, + **kwargs + ): + super(PhoneNumberIdentifierModel, self).__init__(**kwargs) + self.value = value + + class SendChatMessageRequest(msrest.serialization.Model): """Details of the message to send. diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/operations/_chat_operations.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/operations/_chat_operations.py index c6c3e06c9d72..8aa4a16656e7 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/operations/_chat_operations.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/operations/_chat_operations.py @@ -60,8 +60,8 @@ def create_chat_thread( :type create_chat_thread_request: ~azure.communication.chat.models.CreateChatThreadRequest :param repeatability_request_id: 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 + 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 repeatability_request_id: str @@ -80,7 +80,7 @@ def create_chat_thread( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -98,7 +98,7 @@ def create_chat_thread( # Construct headers header_parameters = {} # type: Dict[str, Any] if repeatability_request_id is not None: - header_parameters['repeatability-Request-ID'] = self._serialize.header("repeatability_request_id", repeatability_request_id, 'str') + header_parameters['repeatability-Request-Id'] = self._serialize.header("repeatability_request_id", repeatability_request_id, 'str') header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') @@ -152,7 +152,7 @@ def list_chat_threads( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" def prepare_request(next_link=None): @@ -237,7 +237,7 @@ def get_chat_thread( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" # Construct URL @@ -299,7 +299,7 @@ def delete_chat_thread( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" # Construct URL diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/operations/_chat_thread_operations.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/operations/_chat_thread_operations.py index 46c22d82b4b5..5055a11869c1 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/operations/_chat_thread_operations.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_generated/operations/_chat_thread_operations.py @@ -78,7 +78,7 @@ def list_chat_read_receipts( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" def prepare_request(next_link=None): @@ -168,7 +168,7 @@ def send_chat_read_receipt( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -235,7 +235,7 @@ def send_chat_message( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -309,7 +309,7 @@ def list_chat_messages( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" def prepare_request(next_link=None): @@ -399,7 +399,7 @@ def get_chat_message( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" # Construct URL @@ -468,7 +468,7 @@ def update_chat_message( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" content_type = kwargs.pop("content_type", "application/merge-patch+json") accept = "application/json" @@ -536,7 +536,7 @@ def delete_chat_message( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" # Construct URL @@ -596,7 +596,7 @@ def send_typing_notification( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" # Construct URL @@ -661,7 +661,7 @@ def list_chat_participants( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" accept = "application/json" def prepare_request(next_link=None): @@ -724,7 +724,7 @@ def get_next(next_link=None): def remove_chat_participant( self, chat_thread_id, # type: str - chat_participant_id, # type: str + participant_communication_identifier, # type: "_models.CommunicationIdentifierModel" **kwargs # type: Any ): # type: (...) -> None @@ -734,8 +734,9 @@ def remove_chat_participant( :param chat_thread_id: Thread id to remove the participant from. :type chat_thread_id: str - :param chat_participant_id: Id of the thread participant to remove from the thread. - :type chat_participant_id: str + :param participant_communication_identifier: Id of the thread participant to remove from the + thread. + :type participant_communication_identifier: ~azure.communication.chat.models.CommunicationIdentifierModel :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -751,7 +752,8 @@ def remove_chat_participant( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL @@ -759,7 +761,6 @@ def remove_chat_participant( path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'chatThreadId': self._serialize.url("chat_thread_id", chat_thread_id, 'str'), - 'chatParticipantId': self._serialize.url("chat_participant_id", chat_participant_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -769,9 +770,13 @@ def remove_chat_participant( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(participant_communication_identifier, 'CommunicationIdentifierModel') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -782,7 +787,7 @@ def remove_chat_participant( if cls: return cls(pipeline_response, None, {}) - remove_chat_participant.metadata = {'url': '/chat/threads/{chatThreadId}/participants/{chatParticipantId}'} # type: ignore + remove_chat_participant.metadata = {'url': '/chat/threads/{chatThreadId}/participants/:remove'} # type: ignore def add_chat_participants( self, @@ -814,7 +819,7 @@ def add_chat_participants( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -884,7 +889,7 @@ def update_chat_thread( 503: lambda response: HttpResponseError(response=response, model=self._deserialize(_models.CommunicationErrorResponse, response)), } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview3" + api_version = "2021-01-27-preview4" content_type = kwargs.pop("content_type", "application/merge-patch+json") accept = "application/json" diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_models.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_models.py index 5055b1c40369..9ec7d7d5a17c 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_models.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_models.py @@ -5,19 +5,22 @@ # ------------------------------------ from ._generated.models import ChatParticipant as ChatParticipantAutorest -from ._shared.models import CommunicationUserIdentifier from ._generated.models import ChatMessageType +from ._utils import CommunicationUserIdentifierConverter + +# pylint: disable=unused-import,ungrouped-imports +from ._shared.models import CommunicationUserIdentifier class ChatThreadParticipant(object): """A participant of the chat thread. All required parameters must be populated in order to send to Azure. - :param user: Required. The CommunicationUserIdentifier. + :ivar user: Required. The CommunicationUserIdentifier. :type user: CommunicationUserIdentifier - :param display_name: Display name for the chat thread participant. + :ivar display_name: Display name for the chat thread participant. :type display_name: str - :param share_history_time: Time from which the chat history is shared with the participant. The + :ivar share_history_time: Time from which the chat history is shared with the participant. The timestamp is in ISO8601 format: ``yyyy-MM-ddTHH:mm:ssZ``. :type share_history_time: ~datetime.datetime """ @@ -35,14 +38,15 @@ def __init__( @classmethod def _from_generated(cls, chat_thread_participant): return cls( - user=CommunicationUserIdentifier(chat_thread_participant.id), + user=CommunicationUserIdentifierConverter.from_identifier_model( + chat_thread_participant.communication_identifier), display_name=chat_thread_participant.display_name, share_history_time=chat_thread_participant.share_history_time ) def _to_generated(self): return ChatParticipantAutorest( - id=self.user.identifier, + communication_identifier=CommunicationUserIdentifierConverter.to_identifier_model(self.user), display_name=self.display_name, share_history_time=self.share_history_time ) @@ -70,8 +74,8 @@ class ChatMessage(object): :ivar created_on: The timestamp when the chat message arrived at the server. The timestamp is in RFC3339 format: ``yyyy-MM-ddTHH:mm:ssZ``. :type created_on: ~datetime.datetime - :ivar sender_id: The chat message sender. - :type sender_id: CommunicationUserIdentifier + :ivar sender_communication_identifier: The chat message sender. + :type sender_communication_identifier: CommunicationUserIdentifier :ivar deleted_on: The timestamp when the chat message was deleted. The timestamp is in RFC3339 format: ``yyyy-MM-ddTHH:mm:ssZ``. :type deleted_on: ~datetime.datetime @@ -93,7 +97,7 @@ def __init__( self.content = kwargs['content'] self.sender_display_name = kwargs['sender_display_name'] self.created_on = kwargs['created_on'] - self.sender_id = kwargs['sender_id'] + self.sender_communication_identifier = kwargs['sender_communication_identifier'] self.deleted_on = kwargs['deleted_on'] self.edited_on = kwargs['edited_on'] @@ -107,6 +111,12 @@ def _get_message_type(cls, chat_message_type): @classmethod def _from_generated(cls, chat_message): + + sender_communication_identifier = chat_message.sender_communication_identifier + if sender_communication_identifier is not None: + sender_communication_identifier = CommunicationUserIdentifierConverter.from_identifier_model( + chat_message.sender_communication_identifier) + return cls( id=chat_message.id, type=cls._get_message_type(chat_message.type), @@ -115,7 +125,7 @@ def _from_generated(cls, chat_message): content=ChatMessageContent._from_generated(chat_message.content), # pylint:disable=protected-access sender_display_name=chat_message.sender_display_name, created_on=chat_message.created_on, - sender_id=CommunicationUserIdentifier(chat_message.sender_id), + sender_communication_identifier=sender_communication_identifier, deleted_on=chat_message.deleted_on, edited_on=chat_message.edited_on ) @@ -124,16 +134,16 @@ def _from_generated(cls, chat_message): class ChatMessageContent(object): """Content of a chat message. - :param message: Chat message content for messages of types text or html. + :ivar message: Chat message content for messages of types text or html. :type message: str - :param topic: Chat message content for messages of type topicUpdated. + :ivar topic: Chat message content for messages of type topicUpdated. :type topic: str - :param participants: Chat message content for messages of types participantAdded or + :ivar participants: Chat message content for messages of types participantAdded or participantRemoved. :type participants: list[~azure.communication.chat.models.ChatParticipant] - :param initiator: Chat message content for messages of types participantAdded or + :ivar initiator_communication_identifier: Chat message content for messages of types participantAdded or participantRemoved. - :type initiator: str + :type initiator_communication_identifier: CommunicationUserIdentifier """ def __init__( @@ -151,14 +161,24 @@ def __init__( def _from_generated(cls, chat_message_content): participants_list = chat_message_content.participants if participants_list is not None and len(participants_list) > 0: - participants = [ChatThreadParticipant._from_generated(participant) for participant in participants_list] # pylint:disable=protected-access + participants = [ + ChatThreadParticipant._from_generated(participant) for participant in # pylint:disable=protected-access + participants_list + ] else: participants = [] + + initiator = chat_message_content.initiator_communication_identifier + # check if initiator is populated + if initiator is not None: + initiator = CommunicationUserIdentifierConverter.from_identifier_model( + chat_message_content.initiator_communication_identifier) + return cls( message=chat_message_content.message, topic=chat_message_content.topic, participants=participants, - initiator=chat_message_content.initiator + initiator=initiator ) @@ -169,15 +189,13 @@ class ChatThread(object): :ivar id: Chat thread id. :vartype id: str - :param topic: Chat thread topic. + :ivar topic: Chat thread topic. :type topic: str :ivar created_on: The timestamp when the chat thread was created. The timestamp is in ISO8601 format: ``yyyy-MM-ddTHH:mm:ssZ``. :vartype created_on: ~datetime.datetime :ivar created_by: the chat thread owner. :vartype created_by: CommunicationUserIdentifier - :param participants: Chat thread participants. - :type participants: list[~azure.communication.chat.ChatThreadParticipant] """ # pylint:disable=protected-access @@ -191,15 +209,20 @@ def __init__( self.topic = kwargs.get('topic', None) self.created_on = kwargs['created_on'] self.created_by = kwargs['created_by'] - self.participants = kwargs.get('participants', None) @classmethod def _from_generated(cls, chat_thread): + + created_by = chat_thread.created_by_communication_identifier + if created_by is not None: + created_by = CommunicationUserIdentifierConverter.from_identifier_model( + chat_thread.created_by_communication_identifier) + return cls( id=chat_thread.id, topic=chat_thread.topic, created_on=chat_thread.created_on, - created_by=CommunicationUserIdentifier(chat_thread.created_by) + created_by=created_by ) @@ -209,7 +232,7 @@ class ChatMessageReadReceipt(object): Variables are only populated by the server, and will be ignored when sending a request. :ivar sender: Read receipt sender. - :vartype sender_id: CommunicationUserIdentifier + :vartype sender: CommunicationUserIdentifier :ivar chat_message_id: Id for the chat message that has been read. This id is generated by the server. :vartype chat_message_id: str @@ -229,8 +252,31 @@ def __init__( @classmethod def _from_generated(cls, read_receipt): + + sender = read_receipt.sender_communication_identifier + if sender is not None: + sender = CommunicationUserIdentifierConverter.from_identifier_model( + read_receipt.sender_communication_identifier) + return cls( - sender=CommunicationUserIdentifier(read_receipt.sender_id), + sender=sender, chat_message_id=read_receipt.chat_message_id, read_on=read_receipt.read_on ) + +class CreateChatThreadResult(object): + """Result of the create chat thread operation. + + :ivar chat_thread: Chat thread. + :type chat_thread: ~azure.communication.chat.ChatThread + :ivar errors: Errors encountered during the creation of the chat thread. + :type errors: list((~azure.communication.chat.ChatThreadParticipant, ~azure.communication.chat.CommunicationError)) + """ + + def __init__( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.chat_thread = kwargs['chat_thread'] + self.errors = kwargs.get('errors', None) diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/__init__.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/__init__.py index 5c8510f6128a..e69de29bb2d1 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/__init__.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/__init__.py @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6369, generator: {generator}) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import CommunicationError - from ._models_py3 import CommunicationErrorResponse - from ._models_py3 import CommunicationIdentifierModel - from ._models_py3 import CommunicationUserIdentifierModel - from ._models_py3 import MicrosoftTeamsUserIdentifierModel - from ._models_py3 import PhoneNumberIdentifierModel -except (SyntaxError, ImportError): - from .models import CommunicationError # type: ignore - from .models import CommunicationErrorResponse # type: ignore - from .models import CommunicationIdentifierModel # type: ignore - from .models import CommunicationUserIdentifierModel # type: ignore - from .models import MicrosoftTeamsUserIdentifierModel # type: ignore - from .models import PhoneNumberIdentifierModel # type: ignore - -from .models import ( - CommunicationCloudEnvironmentModel, -) - -__all__ = [ - 'CommunicationError', - 'CommunicationErrorResponse', - 'CommunicationIdentifierModel', - 'CommunicationUserIdentifierModel', - 'MicrosoftTeamsUserIdentifierModel', - 'PhoneNumberIdentifierModel', - 'CommunicationCloudEnvironmentModel', -] diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/_models_py3.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/_models_py3.py deleted file mode 100644 index 9fda61e303f5..000000000000 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/_models_py3.py +++ /dev/null @@ -1,219 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6369, generator: {generator}) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: skip-file - -from typing import Optional, Union - -import msrest.serialization - -from ._communication_enums import * - - -class CommunicationError(msrest.serialization.Model): - """The Communication Services error. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. The error code. - :type code: str - :param message: Required. The error message. - :type message: str - :ivar target: The error target. - :vartype target: str - :ivar details: Further details about specific errors that led to this error. - :vartype details: list[~communication.models.CommunicationError] - :ivar inner_error: The inner error if any. - :vartype inner_error: ~communication.models.CommunicationError - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'inner_error': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CommunicationError]'}, - 'inner_error': {'key': 'innererror', 'type': 'CommunicationError'}, - } - - def __init__( - self, - *, - code: str, - message: str, - **kwargs - ): - super(CommunicationError, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = None - self.details = None - self.inner_error = None - - -class CommunicationErrorResponse(msrest.serialization.Model): - """The Communication Services error. - - All required parameters must be populated in order to send to Azure. - - :param error: Required. The Communication Services error. - :type error: ~communication.models.CommunicationError - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CommunicationError'}, - } - - def __init__( - self, - *, - error: "CommunicationError", - **kwargs - ): - super(CommunicationErrorResponse, self).__init__(**kwargs) - self.error = error - - -class CommunicationIdentifierModel(msrest.serialization.Model): - """Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. - - :param raw_id: Raw Id of the identifier. Optional in requests, required in responses. - :type raw_id: str - :param communication_user: The communication user. - :type communication_user: ~communication.models.CommunicationUserIdentifierModel - :param phone_number: The phone number. - :type phone_number: ~communication.models.PhoneNumberIdentifierModel - :param microsoft_teams_user: The Microsoft Teams user. - :type microsoft_teams_user: ~communication.models.MicrosoftTeamsUserIdentifierModel - """ - - _attribute_map = { - 'raw_id': {'key': 'rawId', 'type': 'str'}, - 'communication_user': {'key': 'communicationUser', 'type': 'CommunicationUserIdentifierModel'}, - 'phone_number': {'key': 'phoneNumber', 'type': 'PhoneNumberIdentifierModel'}, - 'microsoft_teams_user': {'key': 'microsoftTeamsUser', 'type': 'MicrosoftTeamsUserIdentifierModel'}, - } - - def __init__( - self, - *, - raw_id: Optional[str] = None, - communication_user: Optional["CommunicationUserIdentifierModel"] = None, - phone_number: Optional["PhoneNumberIdentifierModel"] = None, - microsoft_teams_user: Optional["MicrosoftTeamsUserIdentifierModel"] = None, - **kwargs - ): - super(CommunicationIdentifierModel, self).__init__(**kwargs) - self.raw_id = raw_id - self.communication_user = communication_user - self.phone_number = phone_number - self.microsoft_teams_user = microsoft_teams_user - - -class CommunicationUserIdentifierModel(msrest.serialization.Model): - """A user that got created with an Azure Communication Services resource. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The Id of the communication user. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - *, - id: str, - **kwargs - ): - super(CommunicationUserIdentifierModel, self).__init__(**kwargs) - self.id = id - - -class MicrosoftTeamsUserIdentifierModel(msrest.serialization.Model): - """A Microsoft Teams user. - - All required parameters must be populated in order to send to Azure. - - :param user_id: Required. The Id of the Microsoft Teams user. If not anonymous, this is the AAD - object Id of the user. - :type user_id: str - :param is_anonymous: True if the Microsoft Teams user is anonymous. By default false if - missing. - :type is_anonymous: bool - :param cloud: The cloud that the Microsoft Teams user belongs to. By default 'public' if - missing. Possible values include: "public", "dod", "gcch". - :type cloud: str or ~communication.models.CommunicationCloudEnvironmentModel - """ - - _validation = { - 'user_id': {'required': True}, - } - - _attribute_map = { - 'user_id': {'key': 'userId', 'type': 'str'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'cloud': {'key': 'cloud', 'type': 'str'}, - } - - def __init__( - self, - *, - user_id: str, - is_anonymous: Optional[bool] = None, - cloud: Optional[Union[str, "CommunicationCloudEnvironmentModel"]] = None, - **kwargs - ): - super(MicrosoftTeamsUserIdentifierModel, self).__init__(**kwargs) - self.user_id = user_id - self.is_anonymous = is_anonymous - self.cloud = cloud - - -class PhoneNumberIdentifierModel(msrest.serialization.Model): - """A phone number. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. The phone number in E.164 format. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - value: str, - **kwargs - ): - super(PhoneNumberIdentifierModel, self).__init__(**kwargs) - self.value = value diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/models.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/models.py index 4508542d92ae..30fa9d3327ac 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/models.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/models.py @@ -108,128 +108,13 @@ class UnknownIdentifier(object): Represents an identifier of an unknown type. It will be encountered in communications with endpoints that are not identifiable by this version of the SDK. - :ivar identifier: Unknown communication identifier. - :vartype identifier: str + :ivar raw_id: Unknown communication identifier. + :vartype raw_id: str :param identifier: Value to initialize UnknownIdentifier. :type identifier: str """ def __init__(self, identifier): - self.identifier = identifier - -class CommunicationIdentifierModel(msrest.serialization.Model): - """Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. - - :param raw_id: Raw Id of the identifier. Optional in requests, required in responses. - :type raw_id: str - :param communication_user: The communication user. - :type communication_user: ~communication.models.CommunicationUserIdentifierModel - :param phone_number: The phone number. - :type phone_number: ~communication.models.PhoneNumberIdentifierModel - :param microsoft_teams_user: The Microsoft Teams user. - :type microsoft_teams_user: ~communication.models.MicrosoftTeamsUserIdentifierModel - """ - - _attribute_map = { - 'raw_id': {'key': 'rawId', 'type': 'str'}, - 'communication_user': {'key': 'communicationUser', 'type': 'CommunicationUserIdentifierModel'}, - 'phone_number': {'key': 'phoneNumber', 'type': 'PhoneNumberIdentifierModel'}, - 'microsoft_teams_user': {'key': 'microsoftTeamsUser', 'type': 'MicrosoftTeamsUserIdentifierModel'}, - } - - def __init__( - self, - **kwargs - ): - super(CommunicationIdentifierModel, self).__init__(**kwargs) - self.raw_id = kwargs.get('raw_id', None) - self.communication_user = kwargs.get('communication_user', None) - self.phone_number = kwargs.get('phone_number', None) - self.microsoft_teams_user = kwargs.get('microsoft_teams_user', None) - -class CommunicationUserIdentifierModel(msrest.serialization.Model): - """A user that got created with an Azure Communication Services resource. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The Id of the communication user. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CommunicationUserIdentifierModel, self).__init__(**kwargs) - self.id = kwargs['id'] - - -class MicrosoftTeamsUserIdentifierModel(msrest.serialization.Model): - """A Microsoft Teams user. - - All required parameters must be populated in order to send to Azure. - - :param user_id: Required. The Id of the Microsoft Teams user. If not anonymous, this is the AAD - object Id of the user. - :type user_id: str - :param is_anonymous: True if the Microsoft Teams user is anonymous. By default false if - missing. - :type is_anonymous: bool - :param cloud: The cloud that the Microsoft Teams user belongs to. By default 'public' if - missing. Possible values include: "public", "dod", "gcch". - :type cloud: str or ~communication.models.CommunicationCloudEnvironmentModel - """ - - _validation = { - 'user_id': {'required': True}, - } - - _attribute_map = { - 'user_id': {'key': 'userId', 'type': 'str'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'cloud': {'key': 'cloud', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(MicrosoftTeamsUserIdentifierModel, self).__init__(**kwargs) - self.user_id = kwargs['user_id'] - self.is_anonymous = kwargs.get('is_anonymous', None) - self.cloud = kwargs.get('cloud', None) - - -class PhoneNumberIdentifierModel(msrest.serialization.Model): - """A phone number. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. The phone number in E.164 format. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PhoneNumberIdentifierModel, self).__init__(**kwargs) - self.value = kwargs['value'] + self.raw_id = identifier class _CaseInsensitiveEnumMeta(EnumMeta): def __getitem__(self, name): @@ -247,14 +132,6 @@ def __getattr__(cls, name): except KeyError: raise AttributeError(name) -class CommunicationCloudEnvironmentModel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The cloud that the identifier belongs to. - """ - - PUBLIC = "public" - DOD = "dod" - GCCH = "gcch" - class CommunicationCloudEnvironment(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """ The cloud enviornment that the identifier belongs to @@ -271,7 +148,7 @@ class MicrosoftTeamsUserIdentifier(object): :vartype user_id: str :param user_id: Value to initialize MicrosoftTeamsUserIdentifier. :type user_id: str - :ivar rawId: Raw id of the Microsoft Teams user. + :ivar raw_id: Raw id of the Microsoft Teams user. :vartype raw_id: str :ivar cloud: Cloud environment that this identifier belongs to :vartype cloud: CommunicationCloudEnvironment diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_utils.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_utils.py index 5311e8979cc3..11fcd38bbd0e 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_utils.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_utils.py @@ -3,9 +3,89 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- +from .communication_identifier_serializer import CommunicationUserIdentifierSerializer def _to_utc_datetime(value): return value.strftime('%Y-%m-%dT%H:%M:%SZ') def return_response(response, deserialized, _): # pylint: disable=unused-argument return response, deserialized + +class CommunicationUserIdentifierConverter(object): + """ + utility class to interact with CommunicationUserIdentifierSerializer + + """ + @classmethod + def to_identifier_model(cls, communicationIdentifier): + """ + Util function to convert the Communication identifier into CommunicationIdentifierModel + + :param communicationIdentifier: Identifier object + :type communicationIdentifier: Union[CommunicationUserIdentifier, + PhoneNumberIdentifier, MicrosoftTeamsUserIdentifier, UnknownIdentifier] + :return: CommunicationIdentifierModel + :rtype: ~azure.communication.chat.CommunicationIdentifierModel + :raises Union[TypeError, ValueError] + """ + return CommunicationUserIdentifierSerializer.serialize(communicationIdentifier) + + @classmethod + def from_identifier_model(cls, identifierModel): + """ + Util function to convert the CommunicationIdentifierModel into Communication Identifier + + :param identifierModel: CommunicationIdentifierModel + :type identifierModel: CommunicationIdentifierModel + :return: Union[CommunicationUserIdentifier, CommunicationPhoneNumberIdentifier] + :rtype: Union[CommunicationUserIdentifier, CommunicationPhoneNumberIdentifier] + :rasies: ValueError + """ + return CommunicationUserIdentifierSerializer.deserialize(identifierModel) + +class CommunicationErrorResponseConverter(object): + """ + Util to convert to List[Tuple[ChatThreadParticipant, Optional[AddChatParticipantsErrors]] + + This is a one-way converter for converting the follwing: + - AddChatParticipantsResult -> List[Tuple[ChatThreadParticipant, AddChatParticipantsErrors] + - CreateChatThreadResult -> List[Tuple[ChatThreadParticipant, AddChatParticipantsErrors] + """ + + @classmethod + def _convert(cls, participants, communication_errors): + # type: (...) -> list[(ChatThreadParticipant, CommunicationError)] + """ + Util function to convert AddChatParticipantsResult. + + Function used to consolidate List[ChatThreadParticipant] and AddChatParticipantsResult + into a list of tuples of ChatThreadParticipant -> CommunicationError. In case of no error, empty + list is returned + + :param participants: Request object for adding participants to thread + :type: participants: list(~azure.communication.chat.ChatThreadParticipant) + :param communication_errors: list of CommunicationError + :type communication_errors: list[~azure.communication.chat.CommunicationError] + :return: A list of (ChatThreadParticipant, CommunicationError) + :rtype: list[(~azure.communication.chat.ChatThreadParticipant, ~azure.communication.chat.CommunicationError)] + """ + def create_dict(participants): + # type: (...) -> Dict(str, ChatThreadParticipant) + """ + Create dictionary of id -> ChatThreadParticipant + """ + result = {} + for participant in participants: + result[participant.user.identifier] = participant + return result + + _thread_participants_dict = create_dict(participants=participants) + + failed_chat_thread_participants = [] + + if communication_errors is not None: + for communication_error in communication_errors: + _thread_participant = _thread_participants_dict.get(communication_error.target) + failed_chat_thread_participants.append((_thread_participant, communication_error)) + + return failed_chat_thread_participants diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/aio/__init__.py b/sdk/communication/azure-communication-chat/azure/communication/chat/aio/__init__.py index 0cdbb1f11b3c..40356a5edc3a 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/aio/__init__.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/aio/__init__.py @@ -4,12 +4,8 @@ # ------------------------------------ from ._chat_client_async import ChatClient from ._chat_thread_client_async import ChatThreadClient -from .._shared.user_credential_async import CommunicationTokenCredential -from .._shared.user_token_refresh_options import CommunicationTokenRefreshOptions __all__ = [ "ChatClient", - "ChatThreadClient", - "CommunicationTokenCredential", - "CommunicationTokenRefreshOptions" + "ChatThreadClient" ] diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_client_async.py b/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_client_async.py index afd984be57ff..3d901816a9d1 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_client_async.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_client_async.py @@ -29,9 +29,14 @@ ) from .._models import ( ChatThread, - ChatThreadParticipant + ChatThreadParticipant, + CreateChatThreadResult +) +from .._utils import ( # pylint: disable=unused-import + _to_utc_datetime, + return_response, + CommunicationErrorResponseConverter ) -from .._utils import _to_utc_datetime, return_response # pylint: disable=unused-import from .._version import SDK_MONIKER @@ -123,28 +128,26 @@ def get_chat_thread_client( @distributed_trace_async async def create_chat_thread( self, topic: str, - thread_participants: List[ChatThreadParticipant], - repeatability_request_id: Optional[str] = None, **kwargs - ) -> ChatThreadClient: + ) -> CreateChatThreadResult: - # type: (...) -> ChatThreadClient + # type: (...) -> CreateChatThreadResult """Creates a chat thread. :param topic: Required. The thread topic. :type topic: str - :param thread_participants: Required. Participants to be added to the thread. - :type thread_participants: list[~azure.communication.chat.ChatThreadParticipant] - :param repeatability_request_id: If specified, the client directs that the request is + :keyword thread_participants: Optional. Participants to be added to the thread. + :paramtype thread_participants: list[~azure.communication.chat.ChatThreadParticipant] + :keyword repeatability_request_id: Optional. 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. If not specified, a new unique id would be generated. - :type repeatability_request_id: str - :return: ChatThreadClient - :rtype: ~azure.communication.chat.aio.ChatThreadClient + :paramtype repeatability_request_id: str + :return: CreateChatThreadResult + :rtype: ~azure.communication.chat.CreateChatThreadResult :raises: ~azure.core.exceptions.HttpResponseError, ValueError .. admonition:: Example: @@ -158,12 +161,16 @@ async def create_chat_thread( """ if not topic: raise ValueError("topic cannot be None.") - if not thread_participants: - raise ValueError("List of ThreadParticipant cannot be None.") + + repeatability_request_id = kwargs.pop('repeatability_request_id', None) if repeatability_request_id is None: repeatability_request_id = str(uuid4()) - participants = [m._to_generated() for m in thread_participants] # pylint:disable=protected-access + thread_participants = kwargs.pop('thread_participants', None) + participants = [] + if thread_participants is not None: + participants = [m._to_generated() for m in thread_participants] # pylint:disable=protected-access + create_thread_request = \ CreateChatThreadRequest(topic=topic, participants=participants) @@ -171,23 +178,25 @@ async def create_chat_thread( create_chat_thread_request=create_thread_request, repeatability_request_id=repeatability_request_id, **kwargs) - if hasattr(create_chat_thread_result, 'errors') \ - and create_chat_thread_result.errors is not None: - participants = \ - create_chat_thread_result.errors.invalid_participants - errors = [] - for participant in participants: - errors.append('participant ' + participant.target + - ' failed to join thread due to: ' + participant.message) - raise RuntimeError(errors) - thread_id = create_chat_thread_result.chat_thread.id - return ChatThreadClient( - endpoint=self._endpoint, - credential=self._credential, - thread_id=thread_id, - **kwargs + + errors = None + if hasattr(create_chat_thread_result, 'errors') and \ + create_chat_thread_result.errors is not None: + errors = CommunicationErrorResponseConverter._convert( # pylint:disable=protected-access + participants=[thread_participants], + communication_errors=create_chat_thread_result.errors.invalid_participants + ) + + chat_thread = ChatThread._from_generated( # pylint:disable=protected-access + create_chat_thread_result.chat_thread) + + create_chat_thread_result = CreateChatThreadResult( + chat_thread=chat_thread, + errors=errors ) + return create_chat_thread_result + @distributed_trace_async async def get_chat_thread( self, thread_id: str, @@ -198,8 +207,7 @@ async def get_chat_thread( :param thread_id: Required. Thread id to get. :type thread_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ChatThread, or the result of cls(response) + :return: ChatThread :rtype: ~azure.communication.chat.ChatThread :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -227,7 +235,6 @@ def list_chat_threads( :keyword int results_per_page: The maximum number of chat threads to be returned per page. :keyword ~datetime.datetime start_time: The earliest point in time to get chat threads up to. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of ChatThreadInfo :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.communication.chat.ChatThreadInfo] :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -259,8 +266,7 @@ async def delete_chat_thread( :param thread_id: Required. Thread id to delete. :type thread_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_thread_client_async.py b/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_thread_client_async.py index aa057f11dd6f..18909456258a 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_thread_client_async.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_thread_client_async.py @@ -27,7 +27,8 @@ UpdateChatMessageRequest, UpdateChatThreadRequest, SendChatMessageResult, - ChatMessageType + ChatMessageType, + CommunicationError ) from .._models import ( ChatThreadParticipant, @@ -35,7 +36,11 @@ ChatMessageReadReceipt ) from .._shared.models import CommunicationUserIdentifier -from .._utils import _to_utc_datetime # pylint: disable=unused-import +from .._utils import ( # pylint: disable=unused-import + _to_utc_datetime, + CommunicationUserIdentifierConverter, + CommunicationErrorResponseConverter +) from .._version import SDK_MONIKER @@ -114,7 +119,6 @@ def thread_id(self): @distributed_trace_async async def update_topic( self, - *, topic: str = None, **kwargs ) -> None: @@ -123,8 +127,7 @@ async def update_topic( :param topic: Thread topic. If topic is not specified, the update will succeeded but chat thread properties will not be changed. :type topic: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -154,8 +157,7 @@ async def send_read_receipt( :param message_id: Required. Id of the latest message read by current user. :type message_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -216,8 +218,7 @@ async def send_typing_notification( ) -> None: """Posts a typing event to a thread, on behalf of a user. - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -247,8 +248,7 @@ async def send_message( :type chat_message_type: str or ~azure.communication.chat.models.ChatMessageType :keyword str sender_display_name: The display name of the message sender. This property is used to populate sender name for push notifications. - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) + :return: str :rtype: str :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -302,8 +302,7 @@ async def get_message( :param message_id: Required. The message id. :type message_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ChatMessage, or the result of cls(response) + :return: ChatMessage :rtype: ~azure.communication.chat.ChatMessage :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -331,7 +330,6 @@ def list_messages( :keyword int results_per_page: The maximum number of messages to be returned per page. :keyword ~datetime.datetime start_time: The start time where the range query. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of ChatMessage :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.communication.chat.ChatMessage] :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -359,7 +357,6 @@ def list_messages( async def update_message( self, message_id: str, - *, content: str = None, **kwargs ) -> None: @@ -369,8 +366,7 @@ async def update_message( :type message_id: str :param content: Chat message content. :type content: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -386,7 +382,7 @@ async def update_message( if not message_id: raise ValueError("message_id cannot be None.") - update_message_request = UpdateChatMessageRequest(content=content, priority=None) + update_message_request = UpdateChatMessageRequest(content=content) return await self._client.chat_thread.update_chat_message( chat_thread_id=self._thread_id, @@ -404,8 +400,7 @@ async def delete_message( :param message_id: Required. The message id. :type message_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -435,7 +430,6 @@ def list_participants( :keyword int results_per_page: The maximum number of participants to be returned per page. :keyword int skip: Skips participants up to a specified position in response. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of ChatThreadParticipant :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.communication.chat.ChatThreadParticipant] :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -468,12 +462,14 @@ async def add_participant( ) -> None: """Adds single thread participant to a thread. If participant already exist, no change occurs. + If participant is added successfully, a tuple of (None, None) is expected. + Failure to add participant to thread returns tuple of (thread_participant, communication_error). + :param thread_participant: Required. Single thread participant to be added to the thread. :type thread_participant: ~azure.communication.chat.ChatThreadParticipant - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError, ValueError + :raises: ~azure.core.exceptions.HttpResponseError, ValueError, RuntimeError .. admonition:: Example: @@ -490,25 +486,44 @@ async def add_participant( participants = [thread_participant._to_generated()] # pylint:disable=protected-access add_thread_participants_request = AddChatParticipantsRequest(participants=participants) - return await self._client.chat_thread.add_chat_participants( + add_chat_participants_result = await self._client.chat_thread.add_chat_participants( chat_thread_id=self._thread_id, add_chat_participants_request=add_thread_participants_request, **kwargs) + response = [] + if hasattr(add_chat_participants_result, 'errors') and \ + add_chat_participants_result.errors is not None: + response = CommunicationErrorResponseConverter._convert( # pylint:disable=protected-access + participants=[thread_participant], + communication_errors=add_chat_participants_result.errors.invalid_participants + ) + + if len(response) != 0: + failed_participant = response[0][0] + communication_error = response[0][1] + raise RuntimeError('Participant: ', failed_participant, ' failed to join thread due to: ', + communication_error.message) + @distributed_trace_async async def add_participants( self, thread_participants: List[ChatThreadParticipant], **kwargs - ) -> None: + ) -> list((ChatThreadParticipant, CommunicationError)): + + # type: (...) -> list[(ChatThreadParticipant, CommunicationError)] """Adds thread participants to a thread. If participants already exist, no change occurs. + If all participants are added successfully, then an empty list is returned; + otherwise, a list of tuple(chat_thread_participant, communincation_error) is returned, + of failed participants and its respective error + :param thread_participants: Required. Thread participants to be added to the thread. :type thread_participants: list[~azure.communication.chat.ChatThreadParticipant] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError, ValueError + :return: List[(ChatThreadParticipant, CommunicationError)] + :rtype: list((~azure.communication.chat.ChatThreadParticipant, ~azure.communication.chat.CommunicationError)) + :raises: ~azure.core.exceptions.HttpResponseError, ValueError, RuntimeError .. admonition:: Example: @@ -525,11 +540,21 @@ async def add_participants( participants = [m._to_generated() for m in thread_participants] # pylint:disable=protected-access add_thread_participants_request = AddChatParticipantsRequest(participants=participants) - return await self._client.chat_thread.add_chat_participants( + add_chat_participants_result = await self._client.chat_thread.add_chat_participants( chat_thread_id=self._thread_id, add_chat_participants_request=add_thread_participants_request, **kwargs) + response = [] + if hasattr(add_chat_participants_result, 'errors') and \ + add_chat_participants_result.errors is not None: + response = CommunicationErrorResponseConverter._convert( # pylint:disable=protected-access + participants=thread_participants, + communication_errors=add_chat_participants_result.errors.invalid_participants + ) + + return response + @distributed_trace_async async def remove_participant( self, @@ -540,8 +565,7 @@ async def remove_participant( :param user: Required. User identity of the thread participant to remove from the thread. :type user: ~azure.communication.chat.CommunicationUserIdentifier - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) + :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError, ValueError @@ -559,7 +583,7 @@ async def remove_participant( return await self._client.chat_thread.remove_chat_participant( chat_thread_id=self._thread_id, - chat_participant_id=user.identifier, + participant_communication_identifier=CommunicationUserIdentifierConverter.to_identifier_model(user), **kwargs) async def close(self) -> None: diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/communication_identifier_serializer.py b/sdk/communication/azure-communication-chat/azure/communication/chat/communication_identifier_serializer.py similarity index 75% rename from sdk/communication/azure-communication-chat/azure/communication/chat/_shared/communication_identifier_serializer.py rename to sdk/communication/azure-communication-chat/azure/communication/chat/communication_identifier_serializer.py index 1081930782bf..13e540c7a67c 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_shared/communication_identifier_serializer.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/communication_identifier_serializer.py @@ -3,24 +3,32 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- +from enum import Enum -from .models import ( +from ._generated.models import ( CommunicationIdentifierModel, + CommunicationUserIdentifierModel, + PhoneNumberIdentifierModel, + MicrosoftTeamsUserIdentifierModel +) +from ._shared.models import ( CommunicationUserIdentifier, PhoneNumberIdentifier, MicrosoftTeamsUserIdentifier, UnknownIdentifier, - CommunicationUserIdentifierModel, - PhoneNumberIdentifierModel, - MicrosoftTeamsUserIdentifierModel ) +class _IdentifierType(Enum): + COMMUNICATION_USER_IDENTIFIER = "COMMUNICATION_USER_IDENTIFIER" + PHONE_NUMBER_IDENTIFIER = "PHONE_NUMBER_IDENTIFIER" + UNKNOWN_IDENTIFIER = "UNKNOWN_IDENTIFIER" + MICROSOFT_TEAMS_IDENTIFIER = "MICROSOFT_TEAMS_IDENTIFIER" + class CommunicationUserIdentifierSerializer(object): @classmethod def serialize(cls, communicationIdentifier): """ Serialize the Communication identifier into CommunicationIdentifierModel - :param identifier: Identifier object :type identifier: Union[CommunicationUserIdentifier, PhoneNumberIdentifier, MicrosoftTeamsUserIdentifier, UnknownIdentifier] @@ -28,16 +36,18 @@ def serialize(cls, communicationIdentifier): :rtype: ~azure.communication.chat.CommunicationIdentifierModel :raises Union[TypeError, ValueError] """ - if isinstance(communicationIdentifier, CommunicationUserIdentifier): + identifierType = CommunicationUserIdentifierSerializer._getIdentifierType(communicationIdentifier) + + if identifierType == _IdentifierType.COMMUNICATION_USER_IDENTIFIER: return CommunicationIdentifierModel( communication_user=CommunicationUserIdentifierModel(id=communicationIdentifier.identifier) ) - if isinstance(communicationIdentifier, PhoneNumberIdentifier): + if identifierType == _IdentifierType.PHONE_NUMBER_IDENTIFIER: return CommunicationIdentifierModel( raw_id=communicationIdentifier.raw_id, phone_number=PhoneNumberIdentifierModel(value=communicationIdentifier.phone_number) ) - if isinstance(communicationIdentifier, MicrosoftTeamsUserIdentifier): + if identifierType == _IdentifierType.MICROSOFT_TEAMS_IDENTIFIER: return CommunicationIdentifierModel( raw_id=communicationIdentifier.raw_id, microsoft_teams_user=MicrosoftTeamsUserIdentifierModel(user_id=communicationIdentifier.user_id, @@ -45,9 +55,9 @@ def serialize(cls, communicationIdentifier): cloud=communicationIdentifier.cloud) ) - if isinstance(communicationIdentifier, UnknownIdentifier): + if identifierType == _IdentifierType.UNKNOWN_IDENTIFIER: return CommunicationIdentifierModel( - raw_id=communicationIdentifier.identifier + raw_id=communicationIdentifier.raw_id ) raise TypeError("Unsupported identifier type " + communicationIdentifier.__class__.__name__) @@ -69,7 +79,6 @@ def assertMaximumOneNestedModel(cls, identifierModel): def deserialize(cls, identifierModel): """ Deserialize the CommunicationIdentifierModel into Communication Identifier - :param identifierModel: CommunicationIdentifierModel :type identifierModel: CommunicationIdentifierModel :return: Union[CommunicationUserIdentifier, CommunicationPhoneNumberIdentifier] @@ -104,3 +113,20 @@ def deserialize(cls, identifierModel): ) return UnknownIdentifier(raw_id) + + @classmethod + def _getIdentifierType(cls, communicationIdentifier): + def has_attributes(obj, attributes): + return all([hasattr(obj, attr) for attr in attributes]) + + if has_attributes(communicationIdentifier, ["identifier"]): + return _IdentifierType.COMMUNICATION_USER_IDENTIFIER + + if has_attributes(communicationIdentifier, ['phone_number', 'raw_id']): + return _IdentifierType.PHONE_NUMBER_IDENTIFIER + + if has_attributes(communicationIdentifier, ["raw_id", "user_id", "is_anonymous", "cloud"]): + return _IdentifierType.MICROSOFT_TEAMS_IDENTIFIER + + if has_attributes(communicationIdentifier, ["raw_id"]): + return _IdentifierType.UNKNOWN_IDENTIFIER diff --git a/sdk/communication/azure-communication-chat/samples/chat_client_sample.py b/sdk/communication/azure-communication-chat/samples/chat_client_sample.py index c5884f31a035..63b55c3ebd97 100644 --- a/sdk/communication/azure-communication-chat/samples/chat_client_sample.py +++ b/sdk/communication/azure-communication-chat/samples/chat_client_sample.py @@ -45,7 +45,9 @@ class ChatClientSamples(object): def create_chat_client(self): # [START create_chat_client] - from azure.communication.chat import ChatClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions + from azure.communication.chat import ChatClient + from azure.communication.identity._shared.user_credential import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions refresh_options = CommunicationTokenRefreshOptions(self.token) chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) # [END create_chat_client] @@ -53,11 +55,13 @@ def create_chat_client(self): def create_thread(self): # [START create_thread] from datetime import datetime + + from azure.communication.identity import CommunicationUserIdentifier + from azure.communication.identity._shared.user_credential import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions + from azure.communication.chat import( ChatClient, - CommunicationUserIdentifier, - CommunicationTokenCredential, - CommunicationTokenRefreshOptions ChatThreadParticipant ) @@ -72,21 +76,25 @@ def create_thread(self): )] # creates a new chat_thread everytime - chat_thread_client = chat_client.create_chat_thread(topic, participants) + create_chat_thread_result = chat_client.create_chat_thread(topic, thread_participants=participants) # creates a new chat_thread if not exists repeatability_request_id = 'b66d6031-fdcc-41df-8306-e524c9f226b8' # unique identifier - chat_thread_client_w_repeatability_id = chat_client.create_chat_thread(topic, - participants, - repeatability_request_id) + create_chat_thread_result_w_repeatability_id = chat_client.create_chat_thread( + topic, + thread_participants=participants, + repeatability_request_id=repeatability_request_id + ) # [END create_thread] - self._thread_id = chat_thread_client.thread_id + self._thread_id = create_chat_thread_result.chat_thread.id print("thread created, id: " + self._thread_id) def get_chat_thread_client(self): # [START get_chat_thread_client] - from azure.communication.chat import ChatClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions + from azure.communication.chat import ChatClient + from azure.communication.identity._shared.user_credential import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions refresh_options = CommunicationTokenRefreshOptions(self.token) chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) @@ -97,7 +105,9 @@ def get_chat_thread_client(self): def get_thread(self): # [START get_thread] - from azure.communication.chat import ChatClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions + from azure.communication.chat import ChatClient + from azure.communication.identity._shared.user_credential import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions refresh_options = CommunicationTokenRefreshOptions(self.token) chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) @@ -108,7 +118,9 @@ def get_thread(self): def list_threads(self): # [START list_threads] - from azure.communication.chat import ChatClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions + from azure.communication.chat import ChatClient + from azure.communication.identity._shared.user_credential import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions from datetime import datetime, timedelta import pytz @@ -119,13 +131,16 @@ def list_threads(self): chat_thread_infos = chat_client.list_chat_threads(results_per_page=5, start_time=start_time) print("list_threads succeeded with results_per_page is 5, and were created since 2 days ago.") - for info in chat_thread_infos: - print("thread id:", info.id) + for chat_thread_info_page in chat_thread_infos.by_page(): + for chat_thread_info in chat_thread_info_page: + print("thread id:", chat_thread_info.id) # [END list_threads] def delete_thread(self): # [START delete_thread] - from azure.communication.chat import ChatClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions + from azure.communication.chat import ChatClient + from azure.communication.identity._shared.user_credential import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions refresh_options = CommunicationTokenRefreshOptions(self.token) chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) diff --git a/sdk/communication/azure-communication-chat/samples/chat_client_sample_async.py b/sdk/communication/azure-communication-chat/samples/chat_client_sample_async.py index f9d7503fa098..094347c5a262 100644 --- a/sdk/communication/azure-communication-chat/samples/chat_client_sample_async.py +++ b/sdk/communication/azure-communication-chat/samples/chat_client_sample_async.py @@ -45,7 +45,9 @@ class ChatClientSamplesAsync(object): def create_chat_client(self): # [START create_chat_client] - from azure.communication.chat.aio import ChatClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions + from azure.communication.chat.aio import ChatClient + from azure.communication.identity._shared.user_credential_async import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions refresh_options = CommunicationTokenRefreshOptions(self.token) chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) @@ -54,8 +56,10 @@ def create_chat_client(self): async def create_thread_async(self): from datetime import datetime - from azure.communication.chat.aio import ChatClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - from azure.communication.chat import ChatThreadParticipant, CommunicationUserIdentifier + from azure.communication.chat.aio import ChatClient + from azure.communication.identity._shared.user_credential_async import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions + from azure.communication.chat import ChatThreadParticipant refresh_options = CommunicationTokenRefreshOptions(self.token) chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) @@ -68,21 +72,24 @@ async def create_thread_async(self): share_history_time=datetime.utcnow() )] # creates a new chat_thread everytime - chat_thread_client = await chat_client.create_chat_thread(topic, participants) + create_chat_thread_result = await chat_client.create_chat_thread(topic, thread_participants=participants) # creates a new chat_thread if not exists repeatability_request_id = 'b66d6031-fdcc-41df-8306-e524c9f226b8' # unique identifier - chat_thread_client_w_repeatability_id = await chat_client.create_chat_thread(topic, - participants, - repeatability_request_id) + create_chat_thread_result_w_repeatability_id = await chat_client.create_chat_thread( + topic, + thread_participants=participants, + repeatability_request_id=repeatability_request_id) # [END create_thread] - self._thread_id = chat_thread_client.thread_id + self._thread_id = create_chat_thread_result.chat_thread.id print("thread created, id: " + self._thread_id) def get_chat_thread_client(self): # [START get_chat_thread_client] - from azure.communication.chat.aio import ChatClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions + from azure.communication.chat.aio import ChatClient + from azure.communication.identity._shared.user_credential_async import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions refresh_options = CommunicationTokenRefreshOptions(self.token) chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) @@ -92,7 +99,9 @@ def get_chat_thread_client(self): print("chat_thread_client created with thread id: ", chat_thread_client.thread_id) async def get_thread_async(self): - from azure.communication.chat.aio import ChatClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions + from azure.communication.chat.aio import ChatClient + from azure.communication.identity._shared.user_credential_async import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions refresh_options = CommunicationTokenRefreshOptions(self.token) chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) @@ -103,7 +112,9 @@ async def get_thread_async(self): print("get_thread succeeded, thread id: " + chat_thread.id + ", thread topic: " + chat_thread.topic) async def list_threads_async(self): - from azure.communication.chat.aio import ChatClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions + from azure.communication.chat.aio import ChatClient + from azure.communication.identity._shared.user_credential_async import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions refresh_options = CommunicationTokenRefreshOptions(self.token) chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) @@ -115,12 +126,15 @@ async def list_threads_async(self): start_time = start_time.replace(tzinfo=pytz.utc) chat_thread_infos = chat_client.list_chat_threads(results_per_page=5, start_time=start_time) print("list_threads succeeded with results_per_page is 5, and were created since 2 days ago.") - async for info in chat_thread_infos: - print("thread id: ", info.id) + async for chat_thread_info_page in chat_thread_infos.by_page(): + async for chat_thread_info in chat_thread_info_page: + print("thread id: ", chat_thread_info.id) # [END list_threads] async def delete_thread_async(self): - from azure.communication.chat.aio import ChatClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions + from azure.communication.chat.aio import ChatClient + from azure.communication.identity._shared.user_credential_async import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions refresh_options = CommunicationTokenRefreshOptions(self.token) chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) diff --git a/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample.py b/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample.py index 2dcd11236147..c79b9fa0cd56 100644 --- a/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample.py +++ b/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample.py @@ -28,6 +28,11 @@ class ChatThreadClientSamples(object): from azure.communication.identity import CommunicationIdentityClient + from azure.communication.identity._shared.user_credential import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions + from azure.communication.chat import ( + ChatClient + ) connection_string = os.environ.get("AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING", None) if not connection_string: raise ValueError("Set AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING env before run this sample.") @@ -45,202 +50,347 @@ class ChatThreadClientSamples(object): _message_id = None new_user = identity_client.create_user() + refresh_options = CommunicationTokenRefreshOptions(token) + _chat_client = ChatClient(endpoint, CommunicationTokenCredential(refresh_options)) + def create_chat_thread_client(self): + token = self.token + endpoint = self.endpoint + user = self.user # [START create_chat_thread_client] from datetime import datetime + from azure.communication.identity import CommunicationUserIdentifier + from azure.communication.identity._shared.user_credential import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions from azure.communication.chat import ( ChatClient, - CommunicationUserIdentifier, - CommunicationTokenCredential, - CommunicationTokenRefreshOptions, ChatThreadParticipant ) - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) + # retrieve `token` using CommunicationIdentityClient.get_token method + # set `endpoint` to ACS service endpoint + # create `user` using CommunicationIdentityClient.create_user method for new users; + # else for existing users set `user` = CommunicationUserIdentifier(some_user_id) + refresh_options = CommunicationTokenRefreshOptions(token) + chat_client = ChatClient(endpoint, CommunicationTokenCredential(refresh_options)) topic = "test topic" participants = [ChatThreadParticipant( - user=self.user, + user=user, display_name='name', share_history_time=datetime.utcnow() )] - chat_thread_client = chat_client.create_chat_thread(topic, participants) + create_chat_thread_result = chat_client.create_chat_thread(topic, thread_participants=participants) + chat_thread_client = chat_client.get_chat_thread_client(create_chat_thread_result.chat_thread.id) # [END create_chat_thread_client] - self._thread_id = chat_thread_client.thread_id + self._thread_id = create_chat_thread_result.chat_thread.id print("chat_thread_client created") def update_topic(self): - from azure.communication.chat import ChatThreadClient - from azure.communication.chat import CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client # [START update_topic] + # set `thread_id` to an existing thread id + chat_thread = chat_client.get_chat_thread(thread_id=thread_id) + previous_topic = chat_thread.topic + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + topic = "updated thread topic" chat_thread_client.update_topic(topic=topic) + + chat_thread = chat_client.get_chat_thread(thread_id=thread_id) + updated_topic = chat_thread.topic + print("Chat Thread Topic Update: Previous value: ", previous_topic, ", Current value: ", updated_topic) # [END update_topic] print("update_chat_thread succeeded") def send_message(self): - from azure.communication.chat import ChatThreadClient - from azure.communication.chat import CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client # [START send_message] - from azure.communication.chat import ChatMessagePriority + from azure.communication.chat import ChatMessageType - content = 'hello world' - sender_display_name = 'sender name' + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + # Scenario 1: Send message without specifying chat_message_type send_message_result_id = chat_thread_client.send_message( - content, - sender_display_name=sender_display_name) + "Hello! My name is Fred Flinstone", + sender_display_name="Fred Flinstone") + # Scenario 2: Send message specifying chat_message_type send_message_result_w_type_id = chat_thread_client.send_message( - content, - sender_display_name=sender_display_name, chat_message_type=ChatMessageType.TEXT) + "Hello! My name is Wilma Flinstone", + sender_display_name="Wilma Flinstone", + chat_message_type=ChatMessageType.TEXT) # equivalent to setting chat_message_type='text' + + # Verify message content + print("First Message:", chat_thread_client.get_message(send_message_result_id).content.message) + print("Second Message:", chat_thread_client.get_message(send_message_result_w_type_id).content.message) # [END send_message] self._message_id = send_message_result_id - print("send_chat_message succeeded, message id:", self._message_id) - print("send_message succeeded with type specified, message id:", send_message_result_w_type_id) + print("send_message succeeded, message_id=", send_message_result_id) + print("send_message succeeded with type specified, message_id:", send_message_result_w_type_id) def get_message(self): - from azure.communication.chat import ChatThreadClient - from azure.communication.chat import CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client + message_id = self._message_id # [START get_message] - chat_message = chat_thread_client.get_message(self._message_id) + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + + # set `message_id` to an existing message id + chat_message = chat_thread_client.get_message(message_id) + + print("Message received: ChatMessage: content=", chat_message.content.message, ", id=", chat_message.id) # [END get_message] - print("get_chat_message succeeded, message id:", chat_message.id, \ - "content: ", chat_message.content) + print("get_message succeeded, message id:", chat_message.id, \ + "content: ", chat_message.content.message) def list_messages(self): - from azure.communication.chat import ChatThreadClient - from azure.communication.chat import CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client # [START list_messages] from datetime import datetime, timedelta + + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + start_time = datetime.utcnow() - timedelta(days=1) chat_messages = chat_thread_client.list_messages(results_per_page=1, start_time=start_time) print("list_messages succeeded with results_per_page is 1, and start time is yesterday UTC") for chat_message_page in chat_messages.by_page(): - l = list(chat_message_page) - print("page size: ", len(l)) + for chat_message in chat_message_page: + print("ChatMessage: message=", chat_message.content.message) # [END list_messages] + print("list_messages succeeded") def update_message(self): - from azure.communication.chat import ChatThreadClient - from azure.communication.chat import CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client + message_id = self._message_id # [START update_message] + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + + # set `message_id` to an existing message id + previous_content = chat_thread_client.get_message(message_id).content.message content = "updated content" - chat_thread_client.update_message(self._message_id, content=content) + chat_thread_client.update_message(message_id, content=content) + + current_content = chat_thread_client.get_message(message_id).content.message + + print("Chat Message Updated: Previous value: ", previous_content, ", Current value: ", current_content) # [END update_message] - print("update_chat_message succeeded") + print("update_message succeeded") def send_read_receipt(self): - from azure.communication.chat import ChatThreadClient - from azure.communication.chat import CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client + message_id = self._message_id # [START send_read_receipt] - chat_thread_client.send_read_receipt(self._message_id) + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + + # set `message_id` to an existing message id + chat_thread_client.send_read_receipt(message_id) # [END send_read_receipt] print("send_read_receipt succeeded") def list_read_receipts(self): - from azure.communication.chat import ChatThreadClient - from azure.communication.chat import CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client + # [START list_read_receipts] + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + read_receipts = chat_thread_client.list_read_receipts() - print("list_read_receipts succeeded, receipts:") - for read_receipt in read_receipts: - print(read_receipt) + + for read_receipt_page in read_receipts.by_page(): + for read_receipt in read_receipt_page: + print(read_receipt) # [END list_read_receipts] + print("list_read_receipts succeeded") def delete_message(self): - from azure.communication.chat import ChatThreadClient - from azure.communication.chat import CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client + message_id = self._message_id + # [START delete_message] - chat_thread_client.delete_message(self._message_id) + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + + # set `message_id` to an existing message id + chat_thread_client.delete_message(message_id) # [END delete_message] - print("delete_chat_message succeeded") + print("delete_message succeeded") def list_participants(self): - from azure.communication.chat import ChatThreadClient - from azure.communication.chat import CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client + # [START list_participants] + + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + chat_thread_participants = chat_thread_client.list_participants() - print("list_chat_participants succeeded, participants: ") - for chat_thread_participant in chat_thread_participants: - print(chat_thread_participant) + + for chat_thread_participant_page in chat_thread_participants.by_page(): + for chat_thread_participant in chat_thread_participant_page: + print("ChatThreadParticipant: ", chat_thread_participant) # [END list_participants] + print("list_participants succeeded") + + def add_participant_w_check(self): + # initially remove already added user + thread_id = self._thread_id + chat_client = self._chat_client + user = self.new_user + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + + chat_thread_client.remove_participant(user) - def add_participant(self): - from azure.communication.chat import ChatThreadClient, CommunicationTokenCredential, \ - CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), - self._thread_id) # [START add_participant] from azure.communication.chat import ChatThreadParticipant from datetime import datetime + + def decide_to_retry(error): + """ + Custom logic to decide whether to retry to add or not + """ + return True + + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + + # create `user` using CommunicationIdentityClient.create_user method for new users; + # else for existing users set `user` = CommunicationUserIdentifier(some_user_id) new_chat_thread_participant = ChatThreadParticipant( - user=self.new_user, - display_name='name', - share_history_time=datetime.utcnow()) - chat_thread_client.add_participant(new_chat_thread_participant) + user=user, + display_name='name', + share_history_time=datetime.utcnow()) + + # check if participant has been added successfully + try: + chat_thread_client.add_participant(new_chat_thread_participant) + except RuntimeError as e: + if e is not None and decide_to_retry(error=e): + chat_thread_client.add_participant(new_chat_thread_participant) # [END add_participant] - print("add_chat_participant succeeded") + print("add_participant_w_check succeeded") + + def add_participants_w_check(self): + # initially remove already added user + thread_id = self._thread_id + chat_client = self._chat_client + user = self.new_user + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) - def add_participants(self): - from azure.communication.chat import ChatThreadClient, CommunicationTokenCredential, \ - CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + chat_thread_client.remove_participant(user) # [START add_participants] from azure.communication.chat import ChatThreadParticipant from datetime import datetime + + def decide_to_retry(error): + """ + Custom logic to decide whether to retry to add or not + """ + return True + + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + + # create `user` using CommunicationIdentityClient.create_user method for new users; + # else for existing users set `user` = CommunicationUserIdentifier(some_user_id) new_participant = ChatThreadParticipant( - user=self.new_user, - display_name='name', - share_history_time=datetime.utcnow()) + user=user, + display_name='name', + share_history_time=datetime.utcnow()) + + # create list containing one or more participants thread_participants = [new_participant] - chat_thread_client.add_participants(thread_participants) + result = chat_thread_client.add_participants(thread_participants) + + # list of participants which were unsuccessful to be added to chat thread + retry = [p for p, e in result if decide_to_retry(e)] + if len(retry) > 0: + chat_thread_client.add_participants(retry) # [END add_participants] - print("add_chat_participants succeeded") + print("add_participants_w_check succeeded") + + def remove_participant(self): - from azure.communication.chat import ChatThreadClient - from azure.communication.chat import CommunicationTokenCredential, CommunicationUserIdentifier, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client + identity_client = self.identity_client # [START remove_participant] - chat_thread_client.remove_participant(self.new_user) + from azure.communication.chat import ChatThreadParticipant + from azure.communication.identity import CommunicationUserIdentifier + from datetime import datetime + + # create 2 new users using CommunicationIdentityClient.create_user method + user1 = identity_client.create_user() + user2 = identity_client.create_user() + + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + + # add user1 and user2 to chat thread + participant1 = ChatThreadParticipant( + user=user1, + display_name='Fred Flinstone', + share_history_time=datetime.utcnow()) + + participant2 = ChatThreadParticipant( + user=user2, + display_name='Wilma Flinstone', + share_history_time=datetime.utcnow()) + + thread_participants = [participant1, participant2] + chat_thread_client.add_participants(thread_participants) + + # Option 1 : Iterate through all participants, find and delete Fred Flinstone + chat_thread_participants = chat_thread_client.list_participants() + + for chat_thread_participant_page in chat_thread_participants.by_page(): + for chat_thread_participant in chat_thread_participant_page: + print("ChatThreadParticipant: ", chat_thread_participant) + if chat_thread_participant.user.identifier == user1.identifier: + print("Found Fred!") + chat_thread_client.remove_participant(chat_thread_participant.user) + print("Fred has been removed from the thread...") + break + + # Option 2: Directly remove Wilma Flinstone + unique_identifier = user2.identifier # in real scenario the identifier would need to be retrieved from elsewhere + chat_thread_client.remove_participant(CommunicationUserIdentifier(unique_identifier)) + print("Wilma has been removed from the thread...") # [END remove_participant] + # clean up temporary users + self.identity_client.delete_user(user1) + self.identity_client.delete_user(user2) print("remove_chat_participant succeeded") def send_typing_notification(self): - from azure.communication.chat import ChatThreadClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client + # [START send_typing_notification] + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + chat_thread_client.send_typing_notification() # [END send_typing_notification] @@ -262,8 +412,8 @@ def clean_up(self): sample.send_read_receipt() sample.list_read_receipts() sample.delete_message() - sample.add_participant() - sample.add_participants() + sample.add_participant_w_check() + sample.add_participants_w_check() sample.list_participants() sample.remove_participant() sample.send_typing_notification() diff --git a/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample_async.py b/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample_async.py index 58d5aaa2eb51..c006b7bc805b 100644 --- a/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample_async.py +++ b/sdk/communication/azure-communication-chat/samples/chat_thread_client_sample_async.py @@ -28,7 +28,11 @@ class ChatThreadClientSamplesAsync(object): + from azure.communication.chat.aio import ChatClient from azure.communication.identity import CommunicationIdentityClient + from azure.communication.identity._shared.user_credential_async import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions + connection_string = os.environ.get("AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING", None) if not connection_string: raise ValueError("Set AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING env before run this sample.") @@ -46,11 +50,17 @@ class ChatThreadClientSamplesAsync(object): _message_id = None new_user = identity_client.create_user() + refresh_options = CommunicationTokenRefreshOptions(token) + _chat_client = ChatClient(endpoint, CommunicationTokenCredential(refresh_options)) + async def create_chat_thread_client_async(self): # [START create_chat_thread_client] from datetime import datetime - from azure.communication.chat.aio import ChatClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - from azure.communication.chat import ChatThreadParticipant, CommunicationUserIdentifier + from azure.communication.chat.aio import ChatClient + from azure.communication.chat import ChatThreadParticipant + from azure.communication.identity import CommunicationUserIdentifier + from azure.communication.identity._shared.user_credential_async import CommunicationTokenCredential + from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions refresh_options = CommunicationTokenRefreshOptions(self.token) chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) @@ -62,200 +72,313 @@ async def create_chat_thread_client_async(self): display_name='name', share_history_time=datetime.utcnow() )] - chat_thread_client = await chat_client.create_chat_thread(topic, participants) + create_chat_thread_result = await chat_client.create_chat_thread(topic, thread_participants=participants) + chat_thread_client = chat_client.get_chat_thread_client(create_chat_thread_result.chat_thread.id) # [END create_chat_thread_client] - self._thread_id = chat_thread_client.thread_id + self._thread_id = create_chat_thread_result.chat_thread.id print("thread created, id: " + self._thread_id) + print("create_chat_thread_client_async succeeded") async def update_topic_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, \ - CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), - self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client - async with chat_thread_client: - # [START update_topic] - topic = "updated thread topic" - await chat_thread_client.update_topic(topic=topic) - # [END update_topic] + # [START update_topic] + # set `thread_id` to an existing thread id + async with chat_client: + chat_thread = await chat_client.get_chat_thread(thread_id=thread_id) + previous_topic = chat_thread.topic + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) - print("update_topic succeeded") + async with chat_thread_client: + topic = "updated thread topic" + await chat_thread_client.update_topic(topic=topic) + + chat_thread = await chat_client.get_chat_thread(thread_id=thread_id) + updated_topic = chat_thread.topic + print("Chat Thread Topic Update: Previous value: ", previous_topic, ", Current value: ", updated_topic) + # [END update_topic] + + print("update_topic_async succeeded") async def send_message_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) - - async with chat_thread_client: - # [START send_message] - from azure.communication.chat import ChatMessagePriority - - priority=ChatMessagePriority.NORMAL - content='hello world' - sender_display_name='sender name' - - send_message_result_id = await chat_thread_client.send_message( - content, - priority=priority, - sender_display_name=sender_display_name) - - send_message_result_w_type_id = await chat_thread_client.send_message( - content, - sender_display_name=sender_display_name, chat_message_type=ChatMessageType.TEXT) - # [END send_message] - self._message_id = send_message_result_id + thread_id = self._thread_id + chat_client = self._chat_client + + # [START send_message] + from azure.communication.chat import ChatMessageType + async with chat_client: + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + async with chat_thread_client: + # Scenario 1: Send message without specifying chat_message_type + send_message_result_id = await chat_thread_client.send_message( + "Hello! My name is Fred Flinstone", + sender_display_name="Fred Flinstone") + + # Scenario 2: Send message specifying chat_message_type + send_message_result_w_type_id = await chat_thread_client.send_message( + "Hello! My name is Wilma Flinstone", + sender_display_name="Wilma Flinstone", + chat_message_type=ChatMessageType.TEXT) # equivalent to setting chat_message_type='text' + + # Verify message content + print("First Message:", (await chat_thread_client.get_message(send_message_result_id)).content.message) + print("Second Message:", (await chat_thread_client.get_message(send_message_result_w_type_id)).content.message) + # [END send_message] + self._message_id = send_message_result_id print("send_message succeeded, message id:", self._message_id) print("send_message succeeded with type specified, message id:", send_message_result_w_type_id) + print("send_message_async succeeded") async def get_message_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client + message_id = self._message_id - async with chat_thread_client: - # [START get_message] - chat_message = await chat_thread_client.get_message(self._message_id) - # [END get_message] - print("get_message succeeded, message id:", chat_message.id, \ - "content: ", chat_message.content) + # [START get_message] + async with chat_client: + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + async with chat_thread_client: + # set `message_id` to an existing message id + chat_message = await chat_thread_client.get_message(message_id) + + print("Message received: ChatMessage: content=", chat_message.content.message, ", id=", chat_message.id) + # [END get_message] + print("get_message_async succeeded") async def list_messages_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) - - async with chat_thread_client: - # [START list_messages] - from datetime import datetime, timedelta - start_time = datetime.utcnow() - timedelta(days=1) - chat_messages = chat_thread_client.list_messages(results_per_page=1, start_time=start_time) - print("list_messages succeeded with results_per_page is 1, and start time is yesterday UTC") - async for chat_message_page in chat_messages.by_page(): - l = [ i async for i in chat_message_page] - print("page size: ", len(l)) - # [END list_messages] + thread_id = self._thread_id + chat_client = self._chat_client + + # [START list_messages] + from datetime import datetime, timedelta + async with chat_client: + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + async with chat_thread_client: + start_time = datetime.utcnow() - timedelta(days=1) + chat_messages = chat_thread_client.list_messages(results_per_page=1, start_time=start_time) + print("list_messages succeeded with results_per_page is 1, and start time is yesterday UTC") + async for chat_message_page in chat_messages.by_page(): + async for chat_message in chat_message_page: + print("ChatMessage: message=", chat_message.content.message) + # [END list_messages] + print("list_messages_async succeeded") async def update_message_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client + message_id = self._message_id - async with chat_thread_client: - # [START update_message] - content = "updated message content" - await chat_thread_client.update_message(self._message_id, content=content) - # [END update_message] - print("update_message succeeded") + # [START update_message] + async with chat_client: + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + async with chat_thread_client: + # set `message_id` to an existing message id + previous_content = (await chat_thread_client.get_message(message_id)).content.message - async def send_read_receipt_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + content = "updated message content" + await chat_thread_client.update_message(self._message_id, content=content) - async with chat_thread_client: - # [START send_read_receipt] - await chat_thread_client.send_read_receipt(self._message_id) - # [END send_read_receipt] + current_content = (await chat_thread_client.get_message(message_id)).content.message - print("send_read_receipt succeeded") + print("Chat Message Updated: Previous value: ", previous_content, ", Current value: ", current_content) + # [END update_message] + print("update_message_async succeeded") + + async def send_read_receipt_async(self): + thread_id = self._thread_id + chat_client = self._chat_client + message_id = self._message_id + # [START send_read_receipt] + async with chat_client: + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + async with chat_thread_client: + # set `message_id` to an existing message id + await chat_thread_client.send_read_receipt(message_id) + # [END send_read_receipt] + + print("send_read_receipt_async succeeded") async def list_read_receipts_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + thread_id = self._thread_id + chat_client = self._chat_client - async with chat_thread_client: - # [START list_read_receipts] - read_receipts = chat_thread_client.list_read_receipts() - # [END list_read_receipts] - print("list_read_receipts succeeded, receipts:") - async for read_receipt in read_receipts: - print(read_receipt) + # [START list_read_receipts] + async with chat_client: + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + async with chat_thread_client: + read_receipts = chat_thread_client.list_read_receipts() + print("list_read_receipts succeeded, receipts:") + async for read_receipt_page in read_receipts.by_page(): + async for read_receipt in read_receipt_page: + print(read_receipt) + # [END list_read_receipts] + print("list_read_receipts_async succeeded") async def delete_message_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) - - async with chat_thread_client: - # [START delete_message] - await chat_thread_client.delete_message(self._message_id) - # [END delete_message] - print("delete_message succeeded") + thread_id = self._thread_id + chat_client = self._chat_client + message_id = self._message_id + # [START delete_message] + async with chat_client: + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + async with chat_thread_client: + # set `message_id` to an existing message id + await chat_thread_client.delete_message(message_id) + # [END delete_message] + print("delete_message_async succeeded") async def list_participants_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) - - async with chat_thread_client: - # [START list_participants] - chat_thread_participants = chat_thread_client.list_participants() - print("list_participants succeeded, participants:") - async for chat_thread_participant in chat_thread_participants: - print(chat_thread_participant) - # [END list_participants] - - async def add_participant_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) - - async with chat_thread_client: - # [START add_participant] - from azure.communication.chat import ChatThreadParticipant, CommunicationUserIdentifier - from datetime import datetime - new_chat_thread_participant = ChatThreadParticipant( - user=self.new_user, - display_name='name', + thread_id = self._thread_id + chat_client = self._chat_client + # [START list_participants] + async with chat_client: + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + async with chat_thread_client: + chat_thread_participants = chat_thread_client.list_participants() + print("list_participants succeeded, participants:") + async for chat_thread_participant_page in chat_thread_participants.by_page(): + async for chat_thread_participant in chat_thread_participant_page: + print("ChatThreadParticipant: ", chat_thread_participant) + # [END list_participants] + print("list_participants_async succeeded") + + async def add_participant_w_check_async(self): + thread_id = self._thread_id + chat_client = self._chat_client + user = self.new_user + # [START add_participant] + def decide_to_retry(error): + """ + Custom logic to decide whether to retry to add or not + """ + return True + + async with chat_client: + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + async with chat_thread_client: + from azure.communication.chat import ChatThreadParticipant + from datetime import datetime + new_chat_thread_participant = ChatThreadParticipant( + user=user, + display_name='name', + share_history_time=datetime.utcnow()) + try: + await chat_thread_client.add_participant(new_chat_thread_participant) + except RuntimeError as e: + if e is not None and decide_to_retry(error=e): + await chat_thread_client.add_participant(new_chat_thread_participant) + # [END add_participant] + print("add_participant_w_check_async succeeded") + + async def add_participants_w_check_async(self): + thread_id = self._thread_id + chat_client = self._chat_client + user = self.new_user + + # [START add_participants] + def decide_to_retry(error): + """ + Custom logic to decide whether to retry to add or not + """ + return True + + async with chat_client: + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + async with chat_thread_client: + from azure.communication.chat import ChatThreadParticipant + from datetime import datetime + new_participant = ChatThreadParticipant( + user=self.new_user, + display_name='name', + share_history_time=datetime.utcnow()) + thread_participants = [new_participant] + result = await chat_thread_client.add_participants(thread_participants) + + # list of participants which were unsuccessful to be added to chat thread + retry = [p for p, e in result if decide_to_retry(e)] + if len(retry) > 0: + chat_thread_client.add_participants(retry) + + # [END add_participants] + print("add_participants_w_check_async succeeded") + + async def remove_participant_async(self): + thread_id = self._thread_id + chat_client = self._chat_client + identity_client = self.identity_client + # [START remove_participant] + from azure.communication.chat import ChatThreadParticipant + from azure.communication.identity import CommunicationUserIdentifier + from datetime import datetime + + async with chat_client: + # create 2 new users using CommunicationIdentityClient.create_user method + user1 = identity_client.create_user() + user2 = identity_client.create_user() + + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + + async with chat_thread_client: + # add user1 and user2 to chat thread + participant1 = ChatThreadParticipant( + user=user1, + display_name='Fred Flinstone', share_history_time=datetime.utcnow()) - await chat_thread_client.add_participant(new_chat_thread_participant) - # [END add_participant] - print("add_participant succeeded") - async def add_participants_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) - - async with chat_thread_client: - # [START add_participants] - from azure.communication.chat import ChatThreadParticipant, CommunicationUserIdentifier - from datetime import datetime - new_participant = ChatThreadParticipant( - user=self.new_user, - display_name='name', + participant2 = ChatThreadParticipant( + user=user2, + display_name='Wilma Flinstone', share_history_time=datetime.utcnow()) - participants = [new_participant] - await chat_thread_client.add_participants(participants) - # [END add_participants] - print("add_participants succeeded") - async def remove_participant_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, \ - CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), - self._thread_id) + thread_participants = [participant1, participant2] + await chat_thread_client.add_participants(thread_participants) - async with chat_thread_client: - # [START remove_participant] - await chat_thread_client.remove_participant(self.new_user) - # [END remove_participant] - print("remove_participant_async succeeded") + # Option 1 : Iterate through all participants, find and delete Fred Flinstone + chat_thread_participants = chat_thread_client.list_participants() - async def send_typing_notification_async(self): - from azure.communication.chat.aio import ChatThreadClient, CommunicationTokenCredential, CommunicationTokenRefreshOptions - refresh_options = CommunicationTokenRefreshOptions(self.token) - chat_thread_client = ChatThreadClient(self.endpoint, CommunicationTokenCredential(refresh_options), self._thread_id) + async for chat_thread_participant_page in chat_thread_participants.by_page(): + async for chat_thread_participant in chat_thread_participant_page: + print("ChatThreadParticipant: ", chat_thread_participant) + if chat_thread_participant.user.identifier == user1.identifier: + print("Found Fred!") + await chat_thread_client.remove_participant(chat_thread_participant.user) + print("Fred has been removed from the thread...") + break + + # Option 2: Directly remove Wilma Flinstone + unique_identifier = user2.identifier # in real scenario the identifier would need to be retrieved from elsewhere + await chat_thread_client.remove_participant(CommunicationUserIdentifier(unique_identifier)) + print("Wilma has been removed from the thread...") + # [END remove_participant] - async with chat_thread_client: - # [START send_typing_notification] - await chat_thread_client.send_typing_notification() - # [END send_typing_notification] - print("send_typing_notification succeeded") + # clean up temporary users + self.identity_client.delete_user(user1) + self.identity_client.delete_user(user2) + print("remove_participant_async succeeded") + + async def send_typing_notification_async(self): + thread_id = self._thread_id + chat_client = self._chat_client + # [START send_typing_notification] + async with chat_client: + # set `thread_id` to an existing thread id + chat_thread_client = chat_client.get_chat_thread_client(thread_id=thread_id) + async with chat_thread_client: + await chat_thread_client.send_typing_notification() + # [END send_typing_notification] + print("send_typing_notification_async succeeded") def clean_up(self): print("cleaning up: deleting created users.") @@ -274,8 +397,8 @@ async def main(): await sample.send_read_receipt_async() await sample.list_read_receipts_async() await sample.delete_message_async() - await sample.add_participant_async() - await sample.add_participants_async() + await sample.add_participant_w_check_async() + await sample.add_participants_w_check_async() await sample.list_participants_async() await sample.remove_participant_async() await sample.send_typing_notification_async() diff --git a/sdk/communication/azure-communication-chat/swagger/SWAGGER.md b/sdk/communication/azure-communication-chat/swagger/SWAGGER.md index 655be82ec88a..5bb778b2210f 100644 --- a/sdk/communication/azure-communication-chat/swagger/SWAGGER.md +++ b/sdk/communication/azure-communication-chat/swagger/SWAGGER.md @@ -15,7 +15,7 @@ autorest SWAGGER.md ### Settings ``` yaml -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/communication/data-plane/Microsoft.CommunicationServicesChat/preview/2020-11-01-preview3/communicationserviceschat.json +input-file: https://int.chatgateway.trafficmanager.net/swagger/2021-01-27-preview4/swagger.json output-folder: ../azure/communication/chat/_generated namespace: azure.communication.chat no-namespace-folders: true diff --git a/sdk/communication/azure-communication-chat/tests/_shared/test_communication_identifier_serializer.py b/sdk/communication/azure-communication-chat/tests/_shared/test_communication_identifier_serializer.py index 16b521218906..b6888d2f3826 100644 --- a/sdk/communication/azure-communication-chat/tests/_shared/test_communication_identifier_serializer.py +++ b/sdk/communication/azure-communication-chat/tests/_shared/test_communication_identifier_serializer.py @@ -4,17 +4,19 @@ # license information. # ------------------------------------------------------------------------- import unittest -from azure.communication.chat._shared.communication_identifier_serializer import CommunicationUserIdentifierSerializer -from azure.communication.chat._shared.models import( +from azure.communication.chat.communication_identifier_serializer import CommunicationUserIdentifierSerializer +from azure.communication.chat._generated.models import( CommunicationIdentifierModel, + MicrosoftTeamsUserIdentifierModel, + CommunicationUserIdentifierModel, + PhoneNumberIdentifierModel +) +from azure.communication.chat._shared.models import( CommunicationUserIdentifier, CommunicationCloudEnvironment, UnknownIdentifier, PhoneNumberIdentifier, - MicrosoftTeamsUserIdentifier, - MicrosoftTeamsUserIdentifierModel, - CommunicationUserIdentifierModel, - PhoneNumberIdentifierModel + MicrosoftTeamsUserIdentifier ) class CommunicationUserIdentifierSerializerTest(unittest.TestCase): @@ -92,7 +94,7 @@ def test_deserialize_unknown_identifier(self): unknown_identifier_expected = UnknownIdentifier("an id") assert isinstance(unknown_identifier_actual, UnknownIdentifier) - assert unknown_identifier_actual.identifier == unknown_identifier_expected.identifier + assert unknown_identifier_actual.raw_id == unknown_identifier_expected.raw_id def test_serialize_phone_number(self): phone_number_identifier_model = CommunicationUserIdentifierSerializer.serialize( diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_access_token_validation.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_access_token_validation.yaml new file mode 100644 index 000000000000..aa5d0e431598 --- /dev/null +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_access_token_validation.yaml @@ -0,0 +1,200 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + Date: + - Mon, 01 Mar 2021 23:10:59 GMT + User-Agent: + - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 + response: + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff0-c6d8-dbb7-3a3a0d00fe2b"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-03-07 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 01 Mar 2021 23:10:59 GMT + ms-cv: + - bW6n9WIC+0e3lIIMYxZQag.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-processing-time: + - 65ms + status: + code: 201 + message: Created +- request: + body: '{"scopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + Date: + - Mon, 01 Mar 2021 23:10:59 GMT + User-Agent: + - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + response: + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:10:58.9306776+00:00"}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-03-07 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 01 Mar 2021 23:10:59 GMT + ms-cv: + - MQ5CNrfwpk2ldAK6FpvF1w.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-processing-time: + - 85ms + status: + code: 200 + message: OK +- request: + body: '{"topic": "test topic1", "participants": "sanitized"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '44' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + repeatability-Request-Id: + - fa747021-f9a3-4253-a19f-939cce81b174 + method: POST + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 + response: + body: '{"chatThread": {"id": "19:Ky3TqpBBlrcv99Nzo6k7PnHAF24hHJe4NCu9_Hm6bfA1@thread.v2", + "topic": "test topic1", "createdOn": "2021-03-01T23:11:00Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff0-c6d8-dbb7-3a3a0d00fe2b", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff0-c6d8-dbb7-3a3a0d00fe2b"}}}}' + headers: + api-supported-versions: + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 01 Mar 2021 23:11:00 GMT + ms-cv: + - WxWXXsh1f0684VuhjaktZQ.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-processing-time: + - 906ms + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Mon, 01 Mar 2021 23:11:00 GMT + User-Agent: + - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + x-ms-return-client-request-id: + - 'true' + method: DELETE + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 + response: + body: + string: '' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-03-07 + date: + - Mon, 01 Mar 2021 23:11:17 GMT + ms-cv: + - /rPqTLNSV0mkKNWE1XECBQ.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-processing-time: + - 16329ms + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 + response: + body: + string: '' + headers: + api-supported-versions: + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 + date: + - Mon, 01 Mar 2021 23:11:17 GMT + ms-cv: + - 58gpvEda/k+1SmXVYyCBhw.0 + strict-transport-security: + - max-age=2592000 + x-processing-time: + - 303ms + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_create_chat_thread.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_create_chat_thread.yaml index 53597211f34c..2d7ba1da247d 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_create_chat_thread.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_create_chat_thread.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:05:51 GMT + - Mon, 01 Mar 2021 23:11:17 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-0eab-b0b7-3a3a0d00fd2c"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:05:49 GMT + - Mon, 01 Mar 2021 23:11:18 GMT ms-cv: - - ZnvUuj0XsUmdCSvrKAuq/Q.0 + - o1Q2S+OZaUWwVrObri2lbQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 83ms + - 12ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,30 +56,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:05:51 GMT + - Mon, 01 Mar 2021 23:11:18 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:05:49.906379+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:11:17.344548+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:05:50 GMT + - Mon, 01 Mar 2021 23:11:18 GMT ms-cv: - - cCElD8gOXkyn78SC7PR2xA.0 + - 9RQB/Fte0UOjmyNDyi8r4w.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 133ms + - 96ms status: code: 200 message: OK @@ -89,33 +95,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - ee5399fe-a8b4-4f81-b022-eb5271820855 + repeatability-Request-Id: + - 6a1eae11-2bd1-46b9-ad31-4422fcbd69a7 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:1DwYpmFor6fm6d9B-KPvnaKt1GDCbGkphgtJGLw6qMY1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:05:51Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffb9-ff5a-1655-373a0d0025bf"}}' + body: '{"chatThread": {"id": "19:gOes8DCyipHncgQGhWh4pTzjs4dn1NslXhbSeFjZPEQ1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:11:18Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-0eab-b0b7-3a3a0d00fd2c", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-0eab-b0b7-3a3a0d00fd2c"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:05:52 GMT + - Mon, 01 Mar 2021 23:11:19 GMT ms-cv: - - TO71ajX/1EiaJuJJQ5vqJw.0 + - tJ6u6UlFrEiDWyEaiGfi5g.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 1318ms + - 821ms status: code: 201 message: Created @@ -123,7 +131,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -131,13 +139,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:05:53 GMT + - Mon, 01 Mar 2021 23:11:19 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -145,13 +153,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:06:09 GMT + - Mon, 01 Mar 2021 23:11:35 GMT ms-cv: - - w8dY644PGkyY7+bBkOXYHQ.0 + - LPSpK61oGEOdTG/7cce39w.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16808ms + - 16690ms status: code: 204 message: No Content @@ -169,21 +179,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:06:09 GMT + - Mon, 01 Mar 2021 23:11:35 GMT ms-cv: - - qsobGe1ye0iPmeq6xTNEXA.0 + - bEvdrAQxO0+Waa8482A+og.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 345ms + - 290ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_create_chat_thread_w_no_participants.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_create_chat_thread_w_no_participants.yaml new file mode 100644 index 000000000000..bd2f06714368 --- /dev/null +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_create_chat_thread_w_no_participants.yaml @@ -0,0 +1,200 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + Date: + - Mon, 01 Mar 2021 23:11:36 GMT + User-Agent: + - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 + response: + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-5786-1db7-3a3a0d00052e"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-03-07 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 01 Mar 2021 23:11:36 GMT + ms-cv: + - gBTv8xkWEkG5akiDGE7Shw.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-processing-time: + - 63ms + status: + code: 201 + message: Created +- request: + body: '{"scopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + Date: + - Mon, 01 Mar 2021 23:11:36 GMT + User-Agent: + - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + response: + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:11:35.9936998+00:00"}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-03-07 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 01 Mar 2021 23:11:36 GMT + ms-cv: + - DrKW5FHR1UGUJoNWItcxDQ.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-processing-time: + - 91ms + status: + code: 200 + message: OK +- request: + body: '{"topic": "test topic", "participants": "sanitized"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '43' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + repeatability-Request-Id: + - a084ed5e-af68-4831-923f-b566eea88949 + method: POST + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 + response: + body: '{"chatThread": {"id": "19:_MTvpgDZ0sQ1x8NmI0nIp_oDV6cntpWSFjFSNlrMpT81@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:11:37Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-5786-1db7-3a3a0d00052e", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-5786-1db7-3a3a0d00052e"}}}}' + headers: + api-supported-versions: + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 01 Mar 2021 23:11:37 GMT + ms-cv: + - 3ivl6phbnEesWJVRH3pmmQ.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-processing-time: + - 829ms + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Mon, 01 Mar 2021 23:11:37 GMT + User-Agent: + - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + x-ms-return-client-request-id: + - 'true' + method: DELETE + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 + response: + body: + string: '' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-03-07 + date: + - Mon, 01 Mar 2021 23:11:53 GMT + ms-cv: + - dKgIMmLihE+Cw+39dbDuug.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-processing-time: + - 16550ms + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 + response: + body: + string: '' + headers: + api-supported-versions: + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 + date: + - Mon, 01 Mar 2021 23:11:54 GMT + ms-cv: + - SK3uz76dJUiMg4TPA9RdUQ.0 + strict-transport-security: + - max-age=2592000 + x-processing-time: + - 292ms + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_create_chat_thread_w_repeatability_request_id.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_create_chat_thread_w_repeatability_request_id.yaml index d6ea61b26cd2..0b2992214e66 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_create_chat_thread_w_repeatability_request_id.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_create_chat_thread_w_repeatability_request_id.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:06:10 GMT + - Mon, 01 Mar 2021 23:11:54 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-9ef9-1db7-3a3a0d000530"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:06:09 GMT + - Mon, 01 Mar 2021 23:11:54 GMT ms-cv: - - 8aH3ZE1jlUSY/zW87XGWVg.0 + - boKHZHPBfU6YQ4YkHh+3uQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 36ms + - 52ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,30 +56,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:06:10 GMT + - Mon, 01 Mar 2021 23:11:54 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:06:09.4122919+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:11:54.2812766+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:06:09 GMT + - Mon, 01 Mar 2021 23:11:54 GMT ms-cv: - - FlQlge6m9E699iT/tDaOfQ.0 + - X++gUGblR0yomDL/mV0OUg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 314ms + - 89ms status: code: 200 message: OK @@ -89,33 +95,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 3226b945-d88e-4c7e-abee-7468608ec067 + repeatability-Request-Id: + - dc104471-80e0-4aa0-aa43-f5891407d977 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:x5mqfZ2VXhexu1xRl38J_IthJWFc78uWfSJ7_fQ49qs1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:06:10Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffba-4adc-1db7-3a3a0d002ba2"}}' + body: '{"chatThread": {"id": "19:eNSEjghJllwmTm-39qenUverVnQUDWlvOD47fBoDbOE1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:11:55Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-9ef9-1db7-3a3a0d000530", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-9ef9-1db7-3a3a0d000530"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:06:10 GMT + - Mon, 01 Mar 2021 23:11:56 GMT ms-cv: - - BQidqaje0kytcwLvtImyhw.0 + - gFqhRqzKv0Wm4k8jUPryrg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 913ms + - 843ms status: code: 201 message: Created @@ -129,33 +137,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 3226b945-d88e-4c7e-abee-7468608ec067 + repeatability-Request-Id: + - dc104471-80e0-4aa0-aa43-f5891407d977 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:x5mqfZ2VXhexu1xRl38J_IthJWFc78uWfSJ7_fQ49qs1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:06:10Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffba-4adc-1db7-3a3a0d002ba2"}}' + body: '{"chatThread": {"id": "19:eNSEjghJllwmTm-39qenUverVnQUDWlvOD47fBoDbOE1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:11:55Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-9ef9-1db7-3a3a0d000530", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-9ef9-1db7-3a3a0d000530"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:06:11 GMT + - Mon, 01 Mar 2021 23:11:56 GMT ms-cv: - - QzgDF9PqIUOb1VmJ/WDwBQ.0 + - M5WkU9xpwEeue7p6AWMKTQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 731ms + - 663ms status: code: 201 message: Created @@ -163,7 +173,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -171,13 +181,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:06:13 GMT + - Mon, 01 Mar 2021 23:11:56 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -185,13 +195,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:06:28 GMT + - Mon, 01 Mar 2021 23:12:13 GMT ms-cv: - - HRni64wz5EG6rPYVVX/BvA.0 + - HKzdmGO8x0GCD6B4RJcGlQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16015ms + - 16291ms status: code: 204 message: No Content @@ -209,21 +221,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:06:27 GMT + - Mon, 01 Mar 2021 23:12:13 GMT ms-cv: - - 9/q+DwwLaky0HTNC9m/YSw.0 + - xK61zT18s06HRgGF8FiP3Q.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 313ms + - 293ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_delete_chat_thread.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_delete_chat_thread.yaml index d41a415a6555..72316fe58a06 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_delete_chat_thread.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_delete_chat_thread.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:06:29 GMT + - Mon, 01 Mar 2021 23:12:13 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-e86a-b0b7-3a3a0d00fd2d"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:06:28 GMT + - Mon, 01 Mar 2021 23:12:12 GMT ms-cv: - - +o8WsDMOs0uqL5EJG1EhCA.0 + - uCRjJw16UUW2PVmRc45Bfw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 269ms + - 20ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,30 +56,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:06:30 GMT + - Mon, 01 Mar 2021 23:12:13 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:06:28.6577603+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:12:13.0870762+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:06:29 GMT + - Mon, 01 Mar 2021 23:12:13 GMT ms-cv: - - NXs+b7gabkGQbpFj6Ob9jw.0 + - v/O8d6Jdg0Sjc6Hn4g1mRQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 162ms + - 96ms status: code: 200 message: OK @@ -89,33 +95,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - e249507a-f040-419b-b197-3e2585182bc0 + repeatability-Request-Id: + - 61096283-6efc-4469-8352-98fb47975c67 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:j9pZbUVFcG0UIKClamuE8fPBzDr7o2szKbPsuRRuH6M1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:06:30Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffba-95de-1655-373a0d0025c3"}}' + body: '{"chatThread": {"id": "19:divZF8vf-ddqTxf4aWBgBqJgmQsKkqDnUL00NT8qN2s1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:12:14Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-e86a-b0b7-3a3a0d00fd2d", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff1-e86a-b0b7-3a3a0d00fd2d"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:06:30 GMT + - Mon, 01 Mar 2021 23:12:14 GMT ms-cv: - - OtyGkQBz0k+TjFJiC9qciw.0 + - xLBaimEFxE2YIOm0y+HVWA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 919ms + - 853ms status: code: 201 message: Created @@ -133,21 +141,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:06:31 GMT + - Mon, 01 Mar 2021 23:12:14 GMT ms-cv: - - mQ+gq8vICEGXJsrvlW4nNw.0 + - YQjYStjZ/kakJ1gQUFuFyg.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 338ms + - 296ms status: code: 204 message: No Content @@ -155,7 +163,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -163,13 +171,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:06:32 GMT + - Mon, 01 Mar 2021 23:12:15 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -177,13 +185,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:06:47 GMT + - Mon, 01 Mar 2021 23:12:32 GMT ms-cv: - - jgtU2RpRuECz0gcDM385Lw.0 + - FUX1VjJC1kS1q8iXH6JsYA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16385ms + - 16638ms status: code: 204 message: No Content @@ -201,21 +211,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:06:47 GMT + - Mon, 01 Mar 2021 23:12:32 GMT ms-cv: - - vXn1GQn/UkO+84loyHanjQ.0 + - HoESK/Lyr0Odx8VeWgLz2A.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 262ms + - 272ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_get_chat_thread.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_get_chat_thread.yaml index 1dcfd729d18e..470ff21446d1 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_get_chat_thread.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_get_chat_thread.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:06:48 GMT + - Mon, 01 Mar 2021 23:12:32 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff2-3452-1db7-3a3a0d000532"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:06:47 GMT + - Mon, 01 Mar 2021 23:12:33 GMT ms-cv: - - UQWpMrfQB0uptNVSVeWXWg.0 + - bXYCcZLD5Uao4dsugnJt2A.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 76ms + - 15ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,30 +56,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:06:49 GMT + - Mon, 01 Mar 2021 23:12:33 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:06:47.4035307+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:12:32.51274+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:06:47 GMT + - Mon, 01 Mar 2021 23:12:33 GMT ms-cv: - - tOyEJ/wQQE6lS3vi6YLgkg.0 + - dAxmslV0MkambGDyUvT6xQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 96ms + - 100ms status: code: 200 message: OK @@ -89,33 +95,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 8967dc15-d604-4257-bb87-44d8058b01a6 + repeatability-Request-Id: + - 9f1e4ccd-8e37-4df1-8b82-55f39aba00a2 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:iAnuf61IaCSlEJsC8O3VbYqM-AMHX8L_wUgpMocRTHs1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:06:48Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffba-e02e-9c58-373a0d002dd6"}}' + body: '{"chatThread": {"id": "19:L607LTa1QYFQoVI2DdPwmPhHE5eAOMSmEPTLPfQGsUo1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:12:33Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff2-3452-1db7-3a3a0d000532", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff2-3452-1db7-3a3a0d000532"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:06:48 GMT + - Mon, 01 Mar 2021 23:12:34 GMT ms-cv: - - /X7nkGa+NUmOrDElQS1Bvw.0 + - /D4N8bkckEyTTcjLy+SDmw.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 899ms + - 840ms status: code: 201 message: Created @@ -131,25 +139,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: - body: '{"id": "sanitized", "topic": "test topic", "createdOn": "2021-02-01T23:06:48Z", - "createdBy": "sanitized"}' + body: '{"id": "sanitized", "topic": "test topic", "createdOn": "2021-03-01T23:12:33Z", + "createdByCommunicationIdentifier": {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff2-3452-1db7-3a3a0d000532", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff2-3452-1db7-3a3a0d000532"}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:06:49 GMT + - Mon, 01 Mar 2021 23:12:34 GMT ms-cv: - - LLJhSl5tYEaCJ4F/58GCqQ.0 + - hTOqvc+qDUW9zlBhJboGaA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 264ms + - 252ms status: code: 200 message: OK @@ -157,7 +166,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -165,13 +174,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:06:50 GMT + - Mon, 01 Mar 2021 23:12:34 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -179,13 +188,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:07:05 GMT + - Mon, 01 Mar 2021 23:12:50 GMT ms-cv: - - xsILKS7K+0yTmDu48f13FQ.0 + - HTdezt3MMEemJzrPHVshnw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16893ms + - 16336ms status: code: 204 message: No Content @@ -203,21 +214,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:07:06 GMT + - Mon, 01 Mar 2021 23:12:51 GMT ms-cv: - - RtDlEf0Z3k6b2K0CyU/63Q.0 + - Cw4/PlUnREWG16S5jmH6AA.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 310ms + - 292ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_get_thread_client.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_get_thread_client.yaml index 3b1b97458bd3..2d880f37750a 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_get_thread_client.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_get_thread_client.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:07:08 GMT + - Mon, 01 Mar 2021 23:12:51 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff2-7d55-9c58-373a0d00f9fc"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:07:06 GMT + - Mon, 01 Mar 2021 23:12:51 GMT ms-cv: - - ZU5arxpcBkuN+tm5herHCg.0 + - Btvll0RNs0KNo4lhs0zKeg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 29ms + - 15ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,30 +56,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:07:08 GMT + - Mon, 01 Mar 2021 23:12:51 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:07:06.4449462+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:12:51.1946354+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:07:06 GMT + - Mon, 01 Mar 2021 23:12:51 GMT ms-cv: - - lzLWBxG1nEeff221x5eFDQ.0 + - cYB8tbUtx0m96YdACDBv8g.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 100ms + - 93ms status: code: 200 message: OK @@ -89,33 +95,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - c6bb2f2d-0896-4cb7-86b5-00d9d5761055 + repeatability-Request-Id: + - e802eabc-4f80-4aac-9ffa-5bc199001af5 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:Uiuh6FNzmfVS0c2HNkr_QCX0gEk1FFjcr-zn-VrTnhc1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:07:07Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbb-2aa0-1db7-3a3a0d002ba6"}}' + body: '{"chatThread": {"id": "19:xPDM5_hzLZs8kiMbGwNpJgR05YwtQ9VskwYoUHtBJCo1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:12:52Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff2-7d55-9c58-373a0d00f9fc", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff2-7d55-9c58-373a0d00f9fc"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:07:08 GMT + - Mon, 01 Mar 2021 23:12:53 GMT ms-cv: - - U0QyAn/ugU6H0ZxvqbdNDg.0 + - hdCt6oYchEGWO1adjMn+XA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 862ms + - 837ms status: code: 201 message: Created @@ -123,7 +131,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -131,13 +139,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:07:09 GMT + - Mon, 01 Mar 2021 23:12:53 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -145,13 +153,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:07:25 GMT + - Mon, 01 Mar 2021 23:13:08 GMT ms-cv: - - XHNTij4AikOzSly2DQRMZg.0 + - mbJHP13ODkqJWjH55rDsbQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16828ms + - 15931ms status: code: 204 message: No Content @@ -169,21 +179,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:07:25 GMT + - Mon, 01 Mar 2021 23:13:09 GMT ms-cv: - - GrF9Je9SjE+2uzKFZKSfRg.0 + - C3hlPfnluEKVeZm2B/rQwA.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 303ms + - 298ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_list_chat_threads.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_list_chat_threads.yaml index 6040674e2923..03c9b721798c 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_list_chat_threads.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e.test_list_chat_threads.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:07:26 GMT + - Mon, 01 Mar 2021 23:13:09 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff2-c2b1-1655-373a0d00ffdc"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:07:25 GMT + - Mon, 01 Mar 2021 23:13:09 GMT ms-cv: - - ZBImGh7ZAESko20q+2GvXg.0 + - L33MBngY1E6iLzKIgkT2Sw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 23ms + - 18ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,30 +56,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:07:26 GMT + - Mon, 01 Mar 2021 23:13:09 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:07:25.0879986+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:13:08.9632617+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:07:25 GMT + - Mon, 01 Mar 2021 23:13:09 GMT ms-cv: - - 31MYXxPAMEexuRXuhapk4w.0 + - kOxiWnfMq0CYDmyRKGMFpQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 102ms + - 92ms status: code: 200 message: OK @@ -89,33 +95,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - ca9c6cf2-f753-45b3-9a76-d7d86a6f318f + repeatability-Request-Id: + - 49a07a02-a8b6-43b6-8591-9d7970eb5f44 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:bl8DP2LGHPRhk7ZPZ9GAlUpS4szKweh-3VPudlijLUg1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:07:26Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbb-7371-1655-373a0d0025c4"}}' + body: '{"chatThread": {"id": "19:Ytg-Ey6wVK8GuxaPsqrAAgyIdZm7lpyEljG2KPpisZM1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:13:10Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff2-c2b1-1655-373a0d00ffdc", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff2-c2b1-1655-373a0d00ffdc"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:07:27 GMT + - Mon, 01 Mar 2021 23:13:10 GMT ms-cv: - - VqZOxX2c4kqTFVEHLa77Fw.0 + - aeHvgXwy30WraKp3O0IusQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 1038ms + - 851ms status: code: 201 message: Created @@ -131,24 +139,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads?maxPageSize=1&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?maxPageSize=1&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:07:29 GMT + - Mon, 01 Mar 2021 23:13:12 GMT ms-cv: - - gFdW35Os30Guz6FRRnR6Qg.0 + - XN2XcZeEmEu4FeJR0Od+1Q.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 325ms + - 385ms status: code: 200 message: OK @@ -156,7 +164,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -164,13 +172,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:07:30 GMT + - Mon, 01 Mar 2021 23:13:13 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -178,13 +186,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:07:45 GMT + - Mon, 01 Mar 2021 23:13:28 GMT ms-cv: - - tZLG0lJIv0C4eg3da882Bw.0 + - 76QCTGERQUm1w67q+iFD5A.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16461ms + - 15730ms status: code: 204 message: No Content @@ -202,21 +212,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:07:46 GMT + - Mon, 01 Mar 2021 23:13:28 GMT ms-cv: - - YuU0xKQrIU6+YkzfDMRpgQ.0 + - UnTRmhKNJUSJEPNwtPOFrQ.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 303ms + - 286ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_create_chat_thread_async.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_create_chat_thread_async.yaml index d42052238e76..a1097832b684 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_create_chat_thread_async.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_create_chat_thread_async.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:07:47 GMT + - Mon, 01 Mar 2021 23:13:29 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-109b-dbb7-3a3a0d00fe37"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:07:46 GMT + - Mon, 01 Mar 2021 23:13:29 GMT ms-cv: - - J++BLQqKNkWICPCA+9xZ5A.0 + - HuPP1ThDDU2SgTpma7095Q.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 46ms + - 63ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,30 +56,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:07:47 GMT + - Mon, 01 Mar 2021 23:13:29 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:07:47.0289732+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:13:28.895824+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:07:47 GMT + - Mon, 01 Mar 2021 23:13:29 GMT ms-cv: - - 5pAZRPWRe0i48Hg8Jb+jrQ.0 + - bOnA0dDdbkWXYCU/VhyZKA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 926ms + - 94ms status: code: 200 message: OK @@ -85,30 +91,33 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 3d1ef516-d70b-44ca-9923-fbb0a98f85ce + repeatability-Request-Id: + - 0ceb21b6-60ec-4180-ae51-699957c2e204 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:yt2KMiiytdERIiWZQFH0bAjzO6rOwAPinaLi0mrDGb01@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:07:48Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbb-c5cc-b0b7-3a3a0d002fc4"}}' + body: '{"chatThread": {"id": "19:-i0uFpmWwsQpFoaWG4En3Oil8WphbzovDCSkdZUhsL41@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:13:30Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-109b-dbb7-3a3a0d00fe37", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-109b-dbb7-3a3a0d00fe37"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:07:48 GMT - ms-cv: mJTbpNZw80uaQIaKPqktTw.0 + date: Mon, 01 Mar 2021 23:13:30 GMT + ms-cv: Y6woGsmZoE2ukkbCcCsO+g.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 851ms + x-processing-time: 839ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: null headers: @@ -117,25 +126,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:07:48 GMT - ms-cv: gVvHOsLZu0K6aBGua2aZbQ.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:13:30 GMT + ms-cv: Gz3XzHmp8UqOnLNHJgWfbg.0 strict-transport-security: max-age=2592000 - x-processing-time: 298ms + x-processing-time: 296ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -143,13 +153,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:07:50 GMT + - Mon, 01 Mar 2021 23:13:31 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -157,13 +167,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:08:04 GMT + - Mon, 01 Mar 2021 23:13:48 GMT ms-cv: - - QCpe+2PiPE2cp9pwMDjx+w.0 + - sL7w0ec2cESw/NOo6QT8/w.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16313ms + - 17183ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_create_chat_thread_w_no_participants_async.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_create_chat_thread_w_no_participants_async.yaml new file mode 100644 index 000000000000..3091dc683c5a --- /dev/null +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_create_chat_thread_w_no_participants_async.yaml @@ -0,0 +1,182 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + Date: + - Mon, 01 Mar 2021 23:13:48 GMT + User-Agent: + - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 + response: + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-5abc-b0b7-3a3a0d00fd3a"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-03-07 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 01 Mar 2021 23:13:48 GMT + ms-cv: + - P5SCqAHmoE6spN0fTu7Q4w.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-processing-time: + - 71ms + status: + code: 201 + message: Created +- request: + body: '{"scopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + Date: + - Mon, 01 Mar 2021 23:13:48 GMT + User-Agent: + - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + response: + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:13:47.8924518+00:00"}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-03-07 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 01 Mar 2021 23:13:48 GMT + ms-cv: + - Meew9aPM2kWFfcDy8ApB0w.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-processing-time: + - 98ms + status: + code: 200 + message: OK +- request: + body: '{"topic": "test topic", "participants": "sanitized"}' + headers: + Accept: + - application/json + Content-Length: + - '43' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + repeatability-Request-Id: + - a63a8805-27d5-40e0-9927-4409b5947575 + method: POST + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 + response: + body: '{"chatThread": {"id": "19:fyiLTLG61FU0clc7XDYHU4JGxni4V6ie1ZeOl2I7Kqw1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:13:49Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-5abc-b0b7-3a3a0d00fd3a", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-5abc-b0b7-3a3a0d00fd3a"}}}}' + headers: + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + content-type: application/json; charset=utf-8 + date: Mon, 01 Mar 2021 23:13:49 GMT + ms-cv: SqzmjFPtzkmjeYynYuak8Q.0 + strict-transport-security: max-age=2592000 + transfer-encoding: chunked + x-processing-time: 821ms + status: + code: 201 + message: Created + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 + response: + body: + string: '' + headers: + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:13:50 GMT + ms-cv: Qzc/BwblME69WjvC0+D+EA.0 + strict-transport-security: max-age=2592000 + x-processing-time: 289ms + status: + code: 204 + message: No Content + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Mon, 01 Mar 2021 23:13:50 GMT + User-Agent: + - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) + x-ms-return-client-request-id: + - 'true' + method: DELETE + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 + response: + body: + string: '' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-03-07 + date: + - Mon, 01 Mar 2021 23:14:05 GMT + ms-cv: + - Nih3hqxtjUynhS88uR95pQ.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-processing-time: + - 16327ms + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_create_chat_thread_w_repeatability_request_id_async.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_create_chat_thread_w_repeatability_request_id_async.yaml index 0c3d8a323d7a..ac7e7afbe8e1 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_create_chat_thread_w_repeatability_request_id_async.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_create_chat_thread_w_repeatability_request_id_async.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:08:06 GMT + - Mon, 01 Mar 2021 23:14:06 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-a1ef-b0b7-3a3a0d00fd3b"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:08:05 GMT + - Mon, 01 Mar 2021 23:14:06 GMT ms-cv: - - BmO2rJliKkacnw64wuz7Qg.0 + - i4yILdubt0WIG45+vXc9Ag.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 31ms + - 16ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,30 +56,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:08:06 GMT + - Mon, 01 Mar 2021 23:14:06 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:08:05.2241522+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:14:06.1177615+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:08:05 GMT + - Mon, 01 Mar 2021 23:14:07 GMT ms-cv: - - lXr3PgaBu0ukIDdpT998MQ.0 + - XILY7nn670CAuxPvrYit4A.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 109ms + - 108ms status: code: 200 message: OK @@ -85,60 +91,66 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - d22a1da5-d171-48c2-b7cb-b4454a7213dd + repeatability-Request-Id: + - 1b8fc3c0-4178-4c8d-8129-9ca08d4f5d8c method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:pxayKUZkmv_fcL_6rAq9aBuZpsJDHOxMmT6t0uTv8pU1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:08:06Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbc-101f-1655-373a0d0025c6"}}' + body: '{"chatThread": {"id": "19:B-ynYDZgUs8AkHAio97-dvc6UaXwMQeoxMKW4D7FnlU1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:14:07Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-a1ef-b0b7-3a3a0d00fd3b", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-a1ef-b0b7-3a3a0d00fd3b"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:08:07 GMT - ms-cv: Z6uZ+gz1OkmUVgLK+F5oUw.0 + date: Mon, 01 Mar 2021 23:14:07 GMT + ms-cv: e2fPLpJA9UKGCt2TJiivXQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 845ms + x-processing-time: 831ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"topic": "test topic", "participants": "sanitized"}' headers: Accept: - application/json Content-Length: - - '206' + - '257' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - d22a1da5-d171-48c2-b7cb-b4454a7213dd + repeatability-Request-Id: + - 1b8fc3c0-4178-4c8d-8129-9ca08d4f5d8c method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:pxayKUZkmv_fcL_6rAq9aBuZpsJDHOxMmT6t0uTv8pU1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:08:06Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbc-101f-1655-373a0d0025c6"}}' + body: '{"chatThread": {"id": "19:B-ynYDZgUs8AkHAio97-dvc6UaXwMQeoxMKW4D7FnlU1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:14:07Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-a1ef-b0b7-3a3a0d00fd3b", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-a1ef-b0b7-3a3a0d00fd3b"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:08:07 GMT - ms-cv: 2HnWsHW3e0O7piyoPIQ+hw.0 + date: Mon, 01 Mar 2021 23:14:08 GMT + ms-cv: ZJ1uDD51jkCic9qAAkw1Aw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 668ms + x-processing-time: 642ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: null headers: @@ -147,25 +159,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:08:08 GMT - ms-cv: sTmUo3kaV0KXVzuFhaOF6g.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:14:08 GMT + ms-cv: 5RUFVqC7LU2wPtHL3NYwGQ.0 strict-transport-security: max-age=2592000 - x-processing-time: 295ms + x-processing-time: 287ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -173,13 +186,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:08:09 GMT + - Mon, 01 Mar 2021 23:14:08 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -187,13 +200,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:08:23 GMT + - Mon, 01 Mar 2021 23:14:25 GMT ms-cv: - - 6qXDz5fHa0yRI9HIVUTylQ.0 + - p9yP8tmYgkGK3ubw4CuS3g.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 15711ms + - 16898ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_delete_chat_thread.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_delete_chat_thread.yaml index 7aed4a167227..ade243436527 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_delete_chat_thread.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_delete_chat_thread.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:08:25 GMT + - Mon, 01 Mar 2021 23:14:25 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-ed6e-9c58-373a0d00f9fe"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:08:24 GMT + - Mon, 01 Mar 2021 23:14:25 GMT ms-cv: - - AmpnCZx48EeezdIwB3zhpg.0 + - 7+l9g9Wr206DDRri7UQLLw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 20ms + - 15ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,30 +56,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:08:25 GMT + - Mon, 01 Mar 2021 23:14:26 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:08:23.5482813+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:14:25.4209728+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:08:24 GMT + - Mon, 01 Mar 2021 23:14:25 GMT ms-cv: - - T5Q0LnhnQ0mohxkku8vP7A.0 + - MOJhXcYyLU6sO9B3rrEP4A.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 99ms + - 90ms status: code: 200 message: OK @@ -85,30 +91,33 @@ interactions: Accept: - application/json Content-Length: - - '205' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 16c202bb-5dd3-4daf-b26b-b63f9aa04882 + repeatability-Request-Id: + - b8131d30-db2d-4f74-8ac7-fcb8cdaa8232 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:d7OEHcAwW1jzyloZ0VWwSrhuUVhBbQmt_ywPGPE9RLc1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:08:24Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbc-57cb-1655-373a0d0025c7"}}' + body: '{"chatThread": {"id": "19:W5HTQ6iUB6OMQ5rYPm4XMs_N1rk3QF3kO1y-TMpw_qI1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:14:26Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-ed6e-9c58-373a0d00f9fe", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff3-ed6e-9c58-373a0d00f9fe"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:08:25 GMT - ms-cv: lgrgiV1N4k6IBhGbDZcUlQ.0 + date: Mon, 01 Mar 2021 23:14:27 GMT + ms-cv: GaOWQ1/Oa0yFjl98q33P1A.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 1153ms + x-processing-time: 834ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: null headers: @@ -117,20 +126,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:08:25 GMT - ms-cv: kcGpQt5nZUKT0JqV1KNlog.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:14:27 GMT + ms-cv: KcxiQpMpXkG8SieVt3kROg.0 strict-transport-security: max-age=2592000 x-processing-time: 288ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: @@ -139,25 +149,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:08:26 GMT - ms-cv: eJfhBClL/0OOCTRfYO+rPQ.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:14:27 GMT + ms-cv: ho1aWOX2rkCt3idPXjMcyQ.0 strict-transport-security: max-age=2592000 - x-processing-time: 259ms + x-processing-time: 304ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -165,13 +176,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:08:27 GMT + - Mon, 01 Mar 2021 23:14:27 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -179,13 +190,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:08:42 GMT + - Mon, 01 Mar 2021 23:14:43 GMT ms-cv: - - A5I5fzDO+0uC5mmCzYlPSg.0 + - 2ILlZCUFjkKgR1Ipg7VqpA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16432ms + - 16135ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_get_chat_thread.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_get_chat_thread.yaml index 80c0f4e673ab..cde34857232f 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_get_chat_thread.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_get_chat_thread.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:08:43 GMT + - Mon, 01 Mar 2021 23:14:44 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff4-3492-b0b7-3a3a0d00fd4d"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:08:43 GMT + - Mon, 01 Mar 2021 23:14:44 GMT ms-cv: - - N2xJrSbqm0KEwZJcYEFSKw.0 + - RsQhh2DfPkGA68jXi9/hmA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 21ms + - 14ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,30 +56,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:08:44 GMT + - Mon, 01 Mar 2021 23:14:44 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:08:42.3776314+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:14:43.6241158+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:08:43 GMT + - Mon, 01 Mar 2021 23:14:44 GMT ms-cv: - - SauqYXgsqUGA1REpr0qJ/Q.0 + - 04pJyTQMqEqsD9qLSCB+dg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 106ms + - 85ms status: code: 200 message: OK @@ -85,30 +91,33 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 51e80716-553e-416f-ab88-ca2ae1385f19 + repeatability-Request-Id: + - 63601889-68b1-4d8d-aba9-b40f14cda32c method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:EQXoydWlPLxGgkYqZp4tqWuhxAwLbEnnf2E_h58XqtQ1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:08:44Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbc-a155-9c58-373a0d002dd8"}}' + body: '{"chatThread": {"id": "19:TQ2jo8KCLgwuuoxUOUVSSKHaOur6xhoi0JUxkjW3D-g1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:14:45Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff4-3492-b0b7-3a3a0d00fd4d", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff4-3492-b0b7-3a3a0d00fd4d"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:08:45 GMT - ms-cv: OVJtV5UbHE2/2zFrj6wpQA.0 + date: Mon, 01 Mar 2021 23:14:45 GMT + ms-cv: CP8CvI+t0U2j+H9YDAT6sg.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 1616ms + x-processing-time: 837ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: null headers: @@ -117,22 +126,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: - body: '{"id": "sanitized", "topic": "test topic", "createdOn": "2021-02-01T23:08:44Z", - "createdBy": "sanitized"}' + body: '{"id": "sanitized", "topic": "test topic", "createdOn": "2021-03-01T23:14:45Z", + "createdByCommunicationIdentifier": {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff4-3492-b0b7-3a3a0d00fd4d", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff4-3492-b0b7-3a3a0d00fd4d"}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:08:45 GMT - ms-cv: WA+vAGOIwUWpGifBnrlzsA.0 + date: Mon, 01 Mar 2021 23:14:45 GMT + ms-cv: xl3Ck2aef0CZDps6w77twg.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 257ms + x-processing-time: 250ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: @@ -141,25 +152,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:08:46 GMT - ms-cv: jBgMdj97NUePvbeakFOeJg.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:14:46 GMT + ms-cv: ZM/NAd6N/Ei0y8xnnocovA.0 strict-transport-security: max-age=2592000 - x-processing-time: 298ms + x-processing-time: 287ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -167,13 +179,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:08:47 GMT + - Mon, 01 Mar 2021 23:14:46 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -181,13 +193,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:09:01 GMT + - Mon, 01 Mar 2021 23:15:02 GMT ms-cv: - - T9QT5+k0kka/dj9zVpdDiA.0 + - zQbPSoz7ZEyJF/NUucPJ3g.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 15968ms + - 16817ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_get_thread_client.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_get_thread_client.yaml index 0d5423613171..02e79a19bc7f 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_get_thread_client.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_get_thread_client.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:09:03 GMT + - Mon, 01 Mar 2021 23:15:03 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff4-7ee8-dbb7-3a3a0d00fe38"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:09:02 GMT + - Mon, 01 Mar 2021 23:15:03 GMT ms-cv: - - YM8icpnay0K7KP/XVMKYDA.0 + - OAFcFU2uIEiLgm2Bd8kz3g.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 70ms + - 64ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,30 +56,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:09:03 GMT + - Mon, 01 Mar 2021 23:15:03 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:09:01.7993412+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:15:02.6587392+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:09:02 GMT + - Mon, 01 Mar 2021 23:15:03 GMT ms-cv: - - AsBe+PS7pkSntXxIXRC3dw.0 + - ofdweUZE2EmxTaNnzix1Kw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 102ms + - 89ms status: code: 200 message: OK @@ -85,30 +91,33 @@ interactions: Accept: - application/json Content-Length: - - '203' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 94e5888e-3f56-4368-ab96-048141497269 + repeatability-Request-Id: + - 14d82eb0-26f5-4aec-ba2d-5b233446b277 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:Sk-2ikAf1aYAs5MIdC2t_ErQdkR5_lMEEca7q57mY4s1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:09:03Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbc-ed34-1655-373a0d0025c8"}}' + body: '{"chatThread": {"id": "19:6LA8hfvYZ6blgcoIXWOaP_fBbD6sCze7SgaoIij2BoM1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:15:04Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff4-7ee8-dbb7-3a3a0d00fe38", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff4-7ee8-dbb7-3a3a0d00fe38"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:09:03 GMT - ms-cv: EdWDWRBkg0mOtjPozclZOA.0 + date: Mon, 01 Mar 2021 23:15:04 GMT + ms-cv: Ok4S5AoSa06hW4Obu3I0JQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 1101ms + x-processing-time: 835ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: null headers: @@ -117,25 +126,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:09:04 GMT - ms-cv: AtFPBYlxXUuxBgHl/KzW0w.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:15:04 GMT + ms-cv: jSC8ZnL1x0OnODJ4gBbcZg.0 strict-transport-security: max-age=2592000 - x-processing-time: 298ms + x-processing-time: 287ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -143,13 +153,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:09:05 GMT + - Mon, 01 Mar 2021 23:15:04 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -157,13 +167,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:09:20 GMT + - Mon, 01 Mar 2021 23:15:20 GMT ms-cv: - - 4bLlDL2gOEy1RxPNZZQJFA.0 + - 80jrq7PPEkWyjE0aDjSoyw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16561ms + - 15802ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_list_chat_threads.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_list_chat_threads.yaml index 46a1988cb526..84f758df3c54 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_list_chat_threads.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_client_e2e_async.test_list_chat_threads.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:09:22 GMT + - Mon, 01 Mar 2021 23:15:20 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff4-c42d-b0b7-3a3a0d00fd4e"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:09:20 GMT + - Mon, 01 Mar 2021 23:15:20 GMT ms-cv: - - 2ytELSchtUOns4PQf5VYpg.0 + - ZbaA6oMtgUeyd5aD++s6YQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 24ms + - 85ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,30 +56,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:09:22 GMT + - Mon, 01 Mar 2021 23:15:21 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:09:20.4937887+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:15:20.4423646+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:09:20 GMT + - Mon, 01 Mar 2021 23:15:21 GMT ms-cv: - - 2+VKkuNu7ECuTx736cL1mg.0 + - 1IPKNQVVO0uswbXRU4snQg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 93ms + - 133ms status: code: 200 message: OK @@ -85,30 +91,33 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 6476c094-a85d-48b1-abbf-698215352a79 + repeatability-Request-Id: + - 44001336-f972-4c2f-b99f-eadb6e05adf2 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:BRQy_EyPZ9vT_-b0HaF9oeQBo3yzuo8CzWuAfziqakU1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:09:22Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbd-3640-1655-373a0d0025cb"}}' + body: '{"chatThread": {"id": "19:0kiJcqIc9H8Yq_uvcbthgt4fLPvcX33J17SwULgHTxE1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:15:21Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff4-c42d-b0b7-3a3a0d00fd4e", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-8ff4-c42d-b0b7-3a3a0d00fd4e"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:09:22 GMT - ms-cv: Ckm0ytRMXEmyDhevDxPr3Q.0 + date: Mon, 01 Mar 2021 23:15:22 GMT + ms-cv: S4CxBYLDxEmISblspQy3Pw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 1296ms + x-processing-time: 910ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: null headers: @@ -117,21 +126,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads?maxPageSize=1&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?maxPageSize=1&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:09:24 GMT - ms-cv: zE0P4+XPxkCOPdXe7HaI2w.0 + date: Mon, 01 Mar 2021 23:15:24 GMT + ms-cv: cuKBu6wh1kyXnKNJd/gYHw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 327ms + x-processing-time: 384ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads?maxPageSize=1&api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?maxPageSize=1&api-version=2021-01-27-preview4 - request: body: null headers: @@ -140,25 +150,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:09:24 GMT - ms-cv: IEQc0iCyH0O6clHor+VS2A.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:15:25 GMT + ms-cv: gPRd7szgSk2eEupIEjrnJA.0 strict-transport-security: max-age=2592000 - x-processing-time: 293ms + x-processing-time: 332ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -166,13 +177,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:09:26 GMT + - Mon, 01 Mar 2021 23:15:25 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -180,13 +191,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:09:41 GMT + - Mon, 01 Mar 2021 23:15:40 GMT ms-cv: - - 5tsI71dnaUim68qiB9QwjQ.0 + - UP0S0SwFIUqnnHuhzWQ4wg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16117ms + - 16075ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_add_participant.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_add_participant.yaml index 11cd2528dab9..90cbadc643f7 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_add_participant.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_add_participant.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:09:42 GMT + - Mon, 01 Mar 2021 23:37:05 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9008-ab29-dbb7-3a3a0d00fe9e"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:09:42 GMT + - Mon, 01 Mar 2021 23:37:05 GMT ms-cv: - - 2c7RaiilYEKo/QBxlOa6/A.0 + - gXtrzXPH30KtjuOoLBNOGg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 85ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:09:43 GMT + - Mon, 01 Mar 2021 23:37:05 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:09:41.4212749+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:37:04.7108628+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:09:42 GMT + - Mon, 01 Mar 2021 23:37:05 GMT ms-cv: - - 1havVHtCV0yHbpuESV588Q.0 + - hjlQRLz3AEqVaallePfMJg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 99ms + - 91ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:09:43 GMT + - Mon, 01 Mar 2021 23:37:05 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9008-abf3-dbb7-3a3a0d00fe9f"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:09:42 GMT + - Mon, 01 Mar 2021 23:37:05 GMT ms-cv: - - /M2sVMEVAUWnORXdkKQOXw.0 + - iUDBGaPYWk2nMlQrUuOa6A.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 18ms + - 22ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:09:43 GMT + - Mon, 01 Mar 2021 23:37:05 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:09:41.6322038+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:37:04.9275414+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:09:42 GMT + - Mon, 01 Mar 2021 23:37:05 GMT ms-cv: - - KTOc0xa2fkGcuoYlBMXEvA.0 + - oyCbT20vWECg9E9Wadk7LQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 87ms + - 92ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 7e90ce67-21ed-42cc-bf70-003c2085c634 + repeatability-Request-Id: + - 89e458a7-c505-467e-9463-d7397ca3f538 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:_WtuTI_rGzHlkgbImP27Kb8Uab-pnuHZgheUB-bv5lc1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:09:43Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbd-87fb-b0b7-3a3a0d002fc8"}}' + body: '{"chatThread": {"id": "19:g0zKu49XaeWtx0TVnp6FDGragFUUYZdguvAR6mtYFqU1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:37:06Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9008-ab29-dbb7-3a3a0d00fe9e", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9008-ab29-dbb7-3a3a0d00fe9e"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:09:42 GMT + - Mon, 01 Mar 2021 23:37:06 GMT ms-cv: - - aW7nLTKynEm/mwhkshfxpA.0 + - ficKTp3r3UWHaaQH6CwRrQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 843ms + - 821ms status: code: 201 message: Created @@ -209,30 +223,30 @@ interactions: Connection: - keep-alive Content-Length: - - '183' + - '235' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2021-01-27-preview4 response: body: '{}' headers: api-supported-versions: - - 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:09:44 GMT + - Mon, 01 Mar 2021 23:37:07 GMT ms-cv: - - b/eV8VUWJUWJQ7AbCfiYPQ.0 + - X979MlT0z02B4KUemNeAPw.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 947ms + - 435ms status: code: 201 message: Created @@ -240,7 +254,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -248,13 +262,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:09:45 GMT + - Mon, 01 Mar 2021 23:37:07 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -262,13 +276,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:10:01 GMT + - Mon, 01 Mar 2021 23:37:23 GMT ms-cv: - - 9DcGZ6EiiUW1Zpm/1eVRsw.0 + - HtjZgKlc1UanF7Ui1byjbQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 17040ms + - 16557ms status: code: 204 message: No Content @@ -276,7 +292,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -284,13 +300,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:10:02 GMT + - Mon, 01 Mar 2021 23:37:24 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -298,13 +314,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:10:17 GMT + - Mon, 01 Mar 2021 23:37:40 GMT ms-cv: - - Lz9BP2/4P02Ec0l+GwE0Ow.0 + - fH7QEG7m70+n2MDBv4SxlQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16112ms + - 16455ms status: code: 204 message: No Content @@ -322,21 +340,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:10:18 GMT + - Mon, 01 Mar 2021 23:37:40 GMT ms-cv: - - rgDG1g19qU6WrLCSOHrZ/g.0 + - kCFjckXRBUaHomhB0bhOnQ.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 340ms + - 345ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_add_participants.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_add_participants.yaml index 2ff85ba3988c..ef95e246386e 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_add_participants.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_add_participants.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:10:19 GMT + - Mon, 01 Mar 2021 23:37:41 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9009-3828-dbb7-3a3a0d00fea1"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:10:18 GMT + - Mon, 01 Mar 2021 23:37:40 GMT ms-cv: - - vnzmRKwuUUu1xgU9C2ezJQ.0 + - i3CVlr/9G0qJTKSZps5igw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 132ms + - 14ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:10:20 GMT + - Mon, 01 Mar 2021 23:37:41 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:10:18.2618513+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:37:40.8281983+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:10:18 GMT + - Mon, 01 Mar 2021 23:37:40 GMT ms-cv: - - Fe4oLYvJCkm5Ee1bjG/Bwg.0 + - EVPMoFQYiUStLfnO9BsCsA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 98ms + - 92ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:10:20 GMT + - Mon, 01 Mar 2021 23:37:41 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9009-38fd-dbb7-3a3a0d00fea2"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:10:18 GMT + - Mon, 01 Mar 2021 23:37:41 GMT ms-cv: - - /FONHcKKiE2oHcBiUWbxsg.0 + - Q7pvVRLpfkGVzol9L1MsvA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 50ms + - 12ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:10:20 GMT + - Mon, 01 Mar 2021 23:37:41 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:10:18.5020576+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:37:41.0377672+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:10:18 GMT + - Mon, 01 Mar 2021 23:37:41 GMT ms-cv: - - AcDUKjvclE2JBfuYphiGaQ.0 + - FE9CGyRix0WIiYZ8yqKi6Q.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 101ms + - 88ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 14285cb5-b1f8-4bad-ad13-0891f94d4aea + repeatability-Request-Id: + - 77cb732e-1549-45ab-8904-965a7368d4c7 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:n3cu_jYMVs8O4UZUxccMnQLv0W0E7M-JSHy8a4EmPqU1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:10:19Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbe-17e9-1db7-3a3a0d002bab"}}' + body: '{"chatThread": {"id": "19:5lDYmahmJ-kcqYXJQjlLnks4t1VyQ2bdkJwZlnf2s881@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:37:42Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9009-3828-dbb7-3a3a0d00fea1", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9009-3828-dbb7-3a3a0d00fea1"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:10:20 GMT + - Mon, 01 Mar 2021 23:37:42 GMT ms-cv: - - uZB4rB4UW0GUpZR04jf0dg.0 + - 1ygQQbtsUkmkzuBI11GaNw.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 859ms + - 822ms status: code: 201 message: Created @@ -209,30 +223,30 @@ interactions: Connection: - keep-alive Content-Length: - - '183' + - '235' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2021-01-27-preview4 response: body: '{}' headers: api-supported-versions: - - 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:10:20 GMT + - Mon, 01 Mar 2021 23:37:43 GMT ms-cv: - - gc3qX2jTCk6ZMnH3AbdYHA.0 + - hS8KziZTjEynG2AkZ3rsdg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 401ms + - 388ms status: code: 201 message: Created @@ -240,7 +254,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -248,13 +262,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:10:21 GMT + - Mon, 01 Mar 2021 23:37:43 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -262,13 +276,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:10:38 GMT + - Mon, 01 Mar 2021 23:38:00 GMT ms-cv: - - T3lD6L81kEO42dkUQwlsiQ.0 + - iXjTsx7fQkOJw54k/tRtOQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 17069ms + - 16348ms status: code: 204 message: No Content @@ -276,7 +292,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -284,13 +300,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:10:39 GMT + - Mon, 01 Mar 2021 23:37:59 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -298,13 +314,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:10:53 GMT + - Mon, 01 Mar 2021 23:38:16 GMT ms-cv: - - cEBOvK1OT0Wm2DQoII6g8g.0 + - TCsoffG12EeelApm0k07mA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 15783ms + - 16472ms status: code: 204 message: No Content @@ -322,21 +340,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:10:53 GMT + - Mon, 01 Mar 2021 23:38:16 GMT ms-cv: - - t2qznUOa5km2Fzbh1vp9EA.0 + - ZnB4Gj/nf0O0eFAQc8bYhg.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 309ms + - 341ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_delete_message.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_delete_message.yaml index fe14a30d334c..7c5329ecbbf8 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_delete_message.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_delete_message.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:10:55 GMT + - Mon, 01 Mar 2021 23:38:16 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9009-c418-dbb7-3a3a0d00fea6"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:10:54 GMT + - Mon, 01 Mar 2021 23:38:17 GMT ms-cv: - - Y5yKxdi/pEWTDIC1tIcd1A.0 + - cnmakXO+MUCewBJyugutDQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 20ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:10:55 GMT + - Mon, 01 Mar 2021 23:38:17 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:10:53.6424333+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:38:16.6474118+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:10:54 GMT + - Mon, 01 Mar 2021 23:38:17 GMT ms-cv: - - N96mc7wlvkOqhmk40buU9g.0 + - yZ802S/Go0+HnsKE/8OSlA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 94ms + - 90ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:10:55 GMT + - Mon, 01 Mar 2021 23:38:17 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9009-c508-dbb7-3a3a0d00fea7"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:10:54 GMT + - Mon, 01 Mar 2021 23:38:17 GMT ms-cv: - - G0rrJaH1hEaiBCtU03c0cA.0 + - 1OWhJZ8yOE+nsQBOTZLHmA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 24ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:10:55 GMT + - Mon, 01 Mar 2021 23:38:17 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:10:53.869524+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:38:16.8769217+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:10:54 GMT + - Mon, 01 Mar 2021 23:38:17 GMT ms-cv: - - Ls8LRrez3kOUSj8ID/Bjjg.0 + - 71U+LISZ8kK4J8TPEn9Hcg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 93ms + - 90ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '205' + - '256' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - c2bdbe6c-1c1f-4643-82d2-9dc9ecdf9e70 + repeatability-Request-Id: + - f60179a9-248a-4c74-9749-a5a3acee56ba method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:CQMbb5qBbsYoqTG4zXgK40nGmD3XxvbtL8kE1IJc0oM1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:10:55Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbe-a225-1655-373a0d0025d2"}}' + body: '{"chatThread": {"id": "19:YujF15fkVJuRtggRYt4KameG6OwonokA3m88i2TvqTs1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:38:18Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9009-c418-dbb7-3a3a0d00fea6", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9009-c418-dbb7-3a3a0d00fea6"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:10:55 GMT + - Mon, 01 Mar 2021 23:38:18 GMT ms-cv: - - 1A3OuOir9Uix9v+YFAycdA.0 + - Sa5kIZSNv0ebXZu+pvD9Xg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 832ms + - 880ms status: code: 201 message: Created @@ -216,24 +230,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:10:56 GMT + - Mon, 01 Mar 2021 23:38:18 GMT ms-cv: - - CDgQSn5I2ECFyxmOTxQs1w.0 + - RfwxKd2KD0S2QHpJShA1pg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 370ms + - 382ms status: code: 201 message: Created @@ -251,21 +265,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:10:56 GMT + - Mon, 01 Mar 2021 23:38:19 GMT ms-cv: - - xbXo/aeDukOL02oLhahF0g.0 + - GeUDIIzOS0a3rywCcO/drg.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 420ms + - 416ms status: code: 204 message: No Content @@ -273,7 +287,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -281,13 +295,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:10:57 GMT + - Mon, 01 Mar 2021 23:38:19 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -295,13 +309,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:11:12 GMT + - Mon, 01 Mar 2021 23:38:36 GMT ms-cv: - - CBsVjaIEnU2H6p8B4eDqWA.0 + - FokxClbFeUCprObrIAPhjw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16445ms + - 17157ms status: code: 204 message: No Content @@ -309,7 +325,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -317,13 +333,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:11:14 GMT + - Mon, 01 Mar 2021 23:38:37 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -331,13 +347,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:11:28 GMT + - Mon, 01 Mar 2021 23:38:53 GMT ms-cv: - - eoZnGb1h0USW14/XPmmdNA.0 + - 4Ylb28Tk0kiVY5TmRMC6Nw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 15983ms + - 16629ms status: code: 204 message: No Content @@ -355,21 +373,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:11:29 GMT + - Mon, 01 Mar 2021 23:38:54 GMT ms-cv: - - iq/zfgeleUa5YgulN7LQWg.0 + - xpI1n12by06p3u2XJmSIAQ.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 331ms + - 788ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_get_message.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_get_message.yaml index eb451dc038aa..218e89406c51 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_get_message.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_get_message.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:11:30 GMT + - Mon, 01 Mar 2021 23:38:54 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900a-5721-dbb7-3a3a0d00fead"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:11:29 GMT + - Mon, 01 Mar 2021 23:38:54 GMT ms-cv: - - lZuK0EZcm0Wwy5U0VdV7Sw.0 + - oWoBnyHqn0W6jGwHgnsFpw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 22ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,24 +56,26 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:11:31 GMT + - Mon, 01 Mar 2021 23:38:54 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:11:29.2886281+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:38:54.2911193+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:11:29 GMT + - Mon, 01 Mar 2021 23:38:54 GMT ms-cv: - - 6NkyAQX4uUew4rCbVgZFPw.0 + - o3vGjiBfXkeQPq2TEjYSIQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: @@ -80,7 +86,7 @@ interactions: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:11:31 GMT + - Mon, 01 Mar 2021 23:38:55 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900a-57f1-dbb7-3a3a0d00feae"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:11:29 GMT + - Mon, 01 Mar 2021 23:38:54 GMT ms-cv: - - zhnlFrwTK0uTglkFRWdGTQ.0 + - bNnsgiy0u0yaxtVgPrz0Iw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 18ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:11:31 GMT + - Mon, 01 Mar 2021 23:38:55 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:11:29.4909482+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:38:54.6769934+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:11:29 GMT + - Mon, 01 Mar 2021 23:38:54 GMT ms-cv: - - e+z0oVH/HUORsypwrRor1g.0 + - WzN8vxhHbECFo868nq3pWQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 94ms + - 284ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '205' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 830a9723-1096-457b-9f39-d010d9f63ea3 + repeatability-Request-Id: + - 07761d5d-2492-43cf-8277-26ce2b8a54ab method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:ahNeeGqZrXgnPY919SOdVpRk0s5o8Ry7ko7igr6YGVk1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:11:30Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbf-2d5f-1655-373a0d0025d6"}}' + body: '{"chatThread": {"id": "19:Mv4la1Z6NSSWD00FTwTot_k7TqWyif0eRyCxBgFqeb01@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:38:56Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900a-5721-dbb7-3a3a0d00fead", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900a-5721-dbb7-3a3a0d00fead"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:11:30 GMT + - Mon, 01 Mar 2021 23:38:56 GMT ms-cv: - - P43c9Lc7tEeOLnAY8G+3mg.0 + - AD04oxtaUkKFL95f5yKuEQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 857ms + - 1171ms status: code: 201 message: Created @@ -216,24 +230,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:11:31 GMT + - Mon, 01 Mar 2021 23:38:57 GMT ms-cv: - - Np4p+Sh6Z0iUMg49MZ5h+w.0 + - 1U2jtpMBuU+1UZ/vKBoHQg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 376ms + - 656ms status: code: 201 message: Created @@ -249,26 +263,27 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2021-01-27-preview4 response: - body: '{"id": "sanitized", "type": "text", "sequenceId": "3", "version": "1612221091980", + body: '{"id": "sanitized", "type": "text", "sequenceId": "3", "version": "1614641937705", "content": {"message": "hello world"}, "senderDisplayName": "sender name", "createdOn": - "2021-02-01T23:11:31Z", "senderId": "sanitized"}' + "2021-03-01T23:38:57Z", "senderCommunicationIdentifier": {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900a-5721-dbb7-3a3a0d00fead", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900a-5721-dbb7-3a3a0d00fead"}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:11:32 GMT + - Mon, 01 Mar 2021 23:38:57 GMT ms-cv: - - 7h18nFkBjUGxMSdJls5/yA.0 + - 3GaJ2qPTT0KKoEC4IV2K1w.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 261ms + - 250ms status: code: 200 message: OK @@ -276,7 +291,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -284,13 +299,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:11:33 GMT + - Mon, 01 Mar 2021 23:38:58 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -298,13 +313,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:11:49 GMT + - Mon, 01 Mar 2021 23:39:14 GMT ms-cv: - - BG9bH+KKnUKVYv606zg7lw.0 + - c6OdctE0Y0GMuOKphp8nZA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16675ms + - 16283ms status: code: 204 message: No Content @@ -312,7 +329,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -320,13 +337,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:11:50 GMT + - Mon, 01 Mar 2021 23:39:14 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -334,13 +351,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:12:05 GMT + - Mon, 01 Mar 2021 23:39:30 GMT ms-cv: - - PtxnGmASLE29V1z+TTQKIQ.0 + - yGkV2NOJIku0pOmCn2bajA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16754ms + - 16304ms status: code: 204 message: No Content @@ -358,21 +377,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:12:06 GMT + - Mon, 01 Mar 2021 23:39:30 GMT ms-cv: - - ujHEeveqfUSyStNeUhdt2g.0 + - ErvLFTeJbkuwezIvnGzHEA.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 291ms + - 333ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_list_messages.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_list_messages.yaml index 15297c7be324..0055b08c15b1 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_list_messages.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_list_messages.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:12:07 GMT + - Mon, 01 Mar 2021 23:39:31 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900a-e5a9-9c58-373a0d00fa52"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:06 GMT + - Mon, 01 Mar 2021 23:39:30 GMT ms-cv: - - Sj7h3LbAl0i9hyvAE6L6RA.0 + - cTr9K59za0KQfMbbjrfsug.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 56ms + - 82ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:12:07 GMT + - Mon, 01 Mar 2021 23:39:31 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:12:05.9542699+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:39:30.7646426+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:06 GMT + - Mon, 01 Mar 2021 23:39:30 GMT ms-cv: - - K235FSgb1kidl5278N5ziw.0 + - 3cqjRTV1nkWzDOOZLwDavQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 96ms + - 89ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:12:07 GMT + - Mon, 01 Mar 2021 23:39:31 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900a-e66c-9c58-373a0d00fa53"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:06 GMT + - Mon, 01 Mar 2021 23:39:30 GMT ms-cv: - - w2/fYfVxi0mPbtHuAWLq7A.0 + - yvPMpfyfFkSXiRF93Dnbdw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 21ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:12:07 GMT + - Mon, 01 Mar 2021 23:39:31 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:12:06.153305+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:39:30.9775643+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:06 GMT + - Mon, 01 Mar 2021 23:39:31 GMT ms-cv: - - CLtEXxBHgkyvn1tnNFijoA.0 + - EK2T6/ZBP0OZLCDhvLIceg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 90ms + - 91ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 15be76a1-7003-4647-a1fc-cc05d462a289 + repeatability-Request-Id: + - f9acc625-655d-4921-93ce-49bdc8195034 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:QiwZiY15O_F3chKHC9waSQP57ESVljAUkKeEW-yoQx41@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:12:07Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffbf-bc7b-b0b7-3a3a0d002fd1"}}' + body: '{"chatThread": {"id": "19:E2tBzEeWrsmVOAHa3QKvqwj7nsFkK-I4vXacT2CBjIU1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:39:32Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900a-e5a9-9c58-373a0d00fa52", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900a-e5a9-9c58-373a0d00fa52"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:07 GMT + - Mon, 01 Mar 2021 23:39:32 GMT ms-cv: - - jsCsMRBiPkiHEwSVHT+osA.0 + - Aw0V800krkixMY5qeb5R/g.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 836ms + - 893ms status: code: 201 message: Created @@ -216,24 +230,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:08 GMT + - Mon, 01 Mar 2021 23:39:32 GMT ms-cv: - - d7I+ZkOHlkS5dLbp580JqQ.0 + - Xh3HiaGu9k6QpbsUFaI10g.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 837ms + - 386ms status: code: 201 message: Created @@ -249,24 +263,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?maxPageSize=1&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?maxPageSize=1&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized", "nextLink": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:09 GMT + - Mon, 01 Mar 2021 23:39:33 GMT ms-cv: - - c0gVf1/fTEya3/2+70xxkQ.0 + - 32f+Qc71b06SDyrLK4LJyQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 289ms + - 258ms status: code: 200 message: OK @@ -282,24 +296,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1%2F1%2F1970%2012%3A00%3A00%20AM%20%2B00%3A00&maxPageSize=1&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1%2F1%2F1970%2012%3A00%3A00%20AM%20%2B00%3A00&maxPageSize=1&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized", "nextLink": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:09 GMT + - Mon, 01 Mar 2021 23:39:33 GMT ms-cv: - - vNK5whUAeUmf4w+/X8el2A.0 + - jjpqdiZLP0mN+raEvl7WUw.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 364ms + - 357ms status: code: 200 message: OK @@ -315,24 +329,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1%2F1%2F1970%2012%3A00%3A00%20AM%20%2B00%3A00&maxPageSize=1&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1%2F1%2F1970%2012%3A00%3A00%20AM%20%2B00%3A00&maxPageSize=1&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized", "nextLink": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:09 GMT + - Mon, 01 Mar 2021 23:39:34 GMT ms-cv: - - tF3JqAjl+kSWPNp3V0MwPQ.0 + - E8I+7AMWeU+dcjbt7XM2eg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 365ms + - 349ms status: code: 200 message: OK @@ -348,24 +362,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1%2F1%2F1970%2012%3A00%3A00%20AM%20%2B00%3A00&maxPageSize=1&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1%2F1%2F1970%2012%3A00%3A00%20AM%20%2B00%3A00&maxPageSize=1&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:10 GMT + - Mon, 01 Mar 2021 23:39:34 GMT ms-cv: - - p9xt/RFcfE+scTMdUQInhA.0 + - ox8RSrXHX0K+Cy2DaYqxdw.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 359ms + - 349ms status: code: 200 message: OK @@ -373,7 +387,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -381,13 +395,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:12:11 GMT + - Mon, 01 Mar 2021 23:39:34 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -395,13 +409,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:12:26 GMT + - Mon, 01 Mar 2021 23:39:51 GMT ms-cv: - - qlR3Xdmn5Uekc2Jr1WkZVg.0 + - D7iOW0sPAkuxavl6oJKNWw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16116ms + - 16863ms status: code: 204 message: No Content @@ -409,7 +425,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -417,13 +433,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:12:27 GMT + - Mon, 01 Mar 2021 23:39:51 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -431,13 +447,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:12:42 GMT + - Mon, 01 Mar 2021 23:40:08 GMT ms-cv: - - vk/5JNIo7UmqX8dnj969ng.0 + - 0v5KoFVk90KOgoJnk/xgRg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 15951ms + - 17051ms status: code: 204 message: No Content @@ -455,21 +473,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:12:43 GMT + - Mon, 01 Mar 2021 23:40:09 GMT ms-cv: - - BiUEsvuFh0G9dHU3dkZv7w.0 + - EFF4AUQds0K1zGt+ht+Stw.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 291ms + - 329ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_list_participants.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_list_participants.yaml index 4c25a1c4bfc2..dfe56ea9d9bb 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_list_participants.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_list_participants.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:12:44 GMT + - Mon, 01 Mar 2021 23:40:09 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900b-7b72-b0b7-3a3a0d00fdf7"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:42 GMT + - Mon, 01 Mar 2021 23:40:09 GMT ms-cv: - - kIbPaGMRjkmQka1S4ARAUw.0 + - WolNF2sJMkWR0gpETIbgCQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 18ms + - 35ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:12:44 GMT + - Mon, 01 Mar 2021 23:40:09 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:12:42.7369269+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:40:09.1426016+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:42 GMT + - Mon, 01 Mar 2021 23:40:09 GMT ms-cv: - - i8Cy1HDlcECm+g75iVPGrg.0 + - uXM+XgvwJUaP5e4QhxstRw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 90ms + - 104ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:12:44 GMT + - Mon, 01 Mar 2021 23:40:09 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900b-7c5b-b0b7-3a3a0d00fdf8"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:43 GMT + - Mon, 01 Mar 2021 23:40:09 GMT ms-cv: - - 50WUMurQfUG8dsRwwthCFw.0 + - pxVty6Wn7EuXo/CLMcIg+g.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 16ms + - 18ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:12:44 GMT + - Mon, 01 Mar 2021 23:40:10 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:12:42.9313819+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:40:09.3493873+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:43 GMT + - Mon, 01 Mar 2021 23:40:09 GMT ms-cv: - - hDlObaBR30SimCm+AhSwTg.0 + - zUa8aSJpyk6sgg1Xu22rOg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 91ms + - 97ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 7b0b36b3-3d23-4101-a02c-6a053a88b3d7 + repeatability-Request-Id: + - 33062ce9-5106-4f66-b327-3d5378d29e30 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:PvBn6mixYhQtG3hwCn7KwxcVy1X5r-28IHnpnh-nbdI1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:12:44Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc0-4c3c-1655-373a0d0025d9"}}' + body: '{"chatThread": {"id": "19:k4dY9Rl5kEaWrlP2CmVJQp2oenWpreXU0H4S_opUqcQ1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:40:10Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900b-7b72-b0b7-3a3a0d00fdf7", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900b-7b72-b0b7-3a3a0d00fdf7"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:44 GMT + - Mon, 01 Mar 2021 23:40:10 GMT ms-cv: - - SMzZYWyKtkOfdw2y8m9RXg.0 + - 3ZsBOsuXnU68tvVkWaOGXQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 834ms + - 882ms status: code: 201 message: Created @@ -209,30 +223,30 @@ interactions: Connection: - keep-alive Content-Length: - - '183' + - '235' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2021-01-27-preview4 response: body: '{}' headers: api-supported-versions: - - 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:45 GMT + - Mon, 01 Mar 2021 23:40:11 GMT ms-cv: - - gUsyB6vyQkCaNrJIUn0rtQ.0 + - pBksuiJwekaFD+IwUyFV+A.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 943ms + - 405ms status: code: 201 message: Created @@ -248,24 +262,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants?maxPageSize=1&skip=1&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants?maxPageSize=1&skip=1&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: api-supported-versions: - - 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:12:45 GMT + - Mon, 01 Mar 2021 23:40:11 GMT ms-cv: - - t55a2NIJUkmUufTeg5kiDw.0 + - agBbhnwywUidYjKEnNyKDQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 269ms + - 256ms status: code: 200 message: OK @@ -273,7 +287,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -281,13 +295,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:12:47 GMT + - Mon, 01 Mar 2021 23:40:12 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -295,13 +309,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:13:03 GMT + - Mon, 01 Mar 2021 23:40:29 GMT ms-cv: - - APzhq35/xEe6tGdAjTFtzw.0 + - xMyX+YZ8ZUOse+kiK6XbmA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16705ms + - 16834ms status: code: 204 message: No Content @@ -309,7 +325,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -317,13 +333,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:13:04 GMT + - Mon, 01 Mar 2021 23:40:29 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -331,13 +347,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:13:19 GMT + - Mon, 01 Mar 2021 23:40:45 GMT ms-cv: - - 0y4kz4W45kqOIc0iDXED/w.0 + - HAeDMcAwcUCieVHGZqVY9Q.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16310ms + - 16720ms status: code: 204 message: No Content @@ -355,21 +373,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:13:19 GMT + - Mon, 01 Mar 2021 23:40:46 GMT ms-cv: - - c4S5WfoS6U2LnxE7igMe/w.0 + - y87I4ohHwE6il0AmXh9Gag.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 335ms + - 396ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_list_read_receipts.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_list_read_receipts.yaml index 3fb3bb1c4a20..959af76a6bad 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_list_read_receipts.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_list_read_receipts.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:13:20 GMT + - Mon, 01 Mar 2021 23:40:46 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900c-0b40-1db7-3a3a0d0005c4"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:13:20 GMT + - Mon, 01 Mar 2021 23:40:46 GMT ms-cv: - - n0qQns0Hsk+5aIGutsAdxg.0 + - grhoCd/Kg0uxfe/bFxoRmg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 32ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:13:21 GMT + - Mon, 01 Mar 2021 23:40:46 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:13:19.501485+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:40:45.9201893+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:13:20 GMT + - Mon, 01 Mar 2021 23:40:46 GMT ms-cv: - - jZvlWXnZR0iUs4jC/0/vnQ.0 + - IqCieV/1L0CoczmL2ZxuVg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 262ms + - 89ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:13:21 GMT + - Mon, 01 Mar 2021 23:40:46 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900c-0bfb-1db7-3a3a0d0005c5"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:13:20 GMT + - Mon, 01 Mar 2021 23:40:46 GMT ms-cv: - - 6XqwUaeyhkS76K9l5V3Ylg.0 + - XPjgscGygkqbMA/NzvPRPQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 49ms + - 10ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:13:21 GMT + - Mon, 01 Mar 2021 23:40:46 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:13:19.7825279+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:40:46.110204+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:13:20 GMT + - Mon, 01 Mar 2021 23:40:46 GMT ms-cv: - - Igp/5UmZjEi/byP4MnXjZA.0 + - uN1mNQcEDUG4dhPOA8+TDQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 110ms + - 92ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '371' + - '475' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 25ee9edf-3c7c-45ec-bf01-65eaed8b9fbb + repeatability-Request-Id: + - 19deb45c-7efc-40fa-89b1-a423bbd9ebff method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:OPtWDy6R6cNXXozGaPaBAVysKRxa6er8SZ2o6lOTEIw1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:13:21Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc0-db3c-b0b7-3a3a0d002fd5"}}' + body: '{"chatThread": {"id": "19:DlVadwcymFJhPI5iD-c9qJ9WsmcTYAY7pJzyDXivBKk1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:40:47Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900c-0b40-1db7-3a3a0d0005c4", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900c-0b40-1db7-3a3a0d0005c4"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:13:21 GMT + - Mon, 01 Mar 2021 23:40:48 GMT ms-cv: - - 1OkOyIraVkmYNurO83SfGw.0 + - WtRF4OLcbk+g7HkJ4wAKWg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 850ms + - 1450ms status: code: 201 message: Created @@ -216,24 +230,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:13:21 GMT + - Mon, 01 Mar 2021 23:40:48 GMT ms-cv: - - bYxpzFv6N0KkUdUjZdVlCg.0 + - 95Vax+OUP0uAfhOTe7nytQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 373ms + - 386ms status: code: 201 message: Created @@ -253,23 +267,23 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-length: - '0' date: - - Mon, 01 Feb 2021 23:13:22 GMT + - Mon, 01 Mar 2021 23:40:49 GMT ms-cv: - - T6MjZ2ekxEinUStlOzfaXg.0 + - fddTXIAlCEG2bZZMDqk8+g.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 898ms + - 1078ms status: code: 200 message: OK @@ -285,24 +299,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:13:23 GMT + - Mon, 01 Mar 2021 23:40:50 GMT ms-cv: - - opHZex5MWESNjsY80GUijg.0 + - Thze5ZrJn0SgCIr2ANWBww.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 260ms + - 712ms status: code: 200 message: OK @@ -323,24 +337,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:13:23 GMT + - Mon, 01 Mar 2021 23:40:51 GMT ms-cv: - - yqZuC3B260GKgRFW7OaWfA.0 + - KyPOXrmmpESJu+77Ouc0vA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 384ms + - 368ms status: code: 201 message: Created @@ -360,23 +374,23 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-length: - '0' date: - - Mon, 01 Feb 2021 23:13:23 GMT + - Mon, 01 Mar 2021 23:40:51 GMT ms-cv: - - gXjY7VV/8kmcPf0nJ8mVWg.0 + - 3Y7QN5pk/0+MJUvyYmegag.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 498ms + - 752ms status: code: 200 message: OK @@ -392,24 +406,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:13:25 GMT + - Mon, 01 Mar 2021 23:40:52 GMT ms-cv: - - 9K0uoDIxJE2fdvj7B03SIw.0 + - 7AXtM5NOVEC1hfFJjiPNFw.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 694ms + - 252ms status: code: 200 message: OK @@ -430,18 +444,18 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:13:25 GMT + - Mon, 01 Mar 2021 23:40:53 GMT ms-cv: - - LwIYTspikEiHp9s/opWxYg.0 + - vyzPBjDEFkm0k5ZIF0kfSg.0 strict-transport-security: - max-age=2592000 transfer-encoding: @@ -467,23 +481,23 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-length: - '0' date: - - Mon, 01 Feb 2021 23:13:25 GMT + - Mon, 01 Mar 2021 23:40:53 GMT ms-cv: - - 1Zh447p3CEmKerITJM7JbA.0 + - SCqvZeDDZUKjY/wXuc7dQw.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 474ms + - 599ms status: code: 200 message: OK @@ -499,24 +513,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:13:26 GMT + - Mon, 01 Mar 2021 23:40:54 GMT ms-cv: - - Cwy2WeHt4EK+saImRu94aA.0 + - NDyBxoWqxEyqiVQcER2Klg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 249ms + - 277ms status: code: 200 message: OK @@ -532,24 +546,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?maxPageSize=2&skip=0&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?maxPageSize=2&skip=0&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:13:26 GMT + - Mon, 01 Mar 2021 23:40:54 GMT ms-cv: - - i4qQAKxMvkGrCKeSzyI0Pw.0 + - jIgKb0IEZ0islUt+zw+Q+w.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 261ms + - 249ms status: code: 200 message: OK @@ -557,7 +571,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -565,13 +579,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:13:28 GMT + - Mon, 01 Mar 2021 23:40:55 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -579,13 +593,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:13:43 GMT + - Mon, 01 Mar 2021 23:41:11 GMT ms-cv: - - seA/Ib8X5EOcHNn4mUD/xw.0 + - JGgfGTlz0kiO5rVYClqslw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16722ms + - 16733ms status: code: 204 message: No Content @@ -593,7 +609,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -601,13 +617,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:13:45 GMT + - Mon, 01 Mar 2021 23:41:12 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -615,13 +631,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:13:59 GMT + - Mon, 01 Mar 2021 23:41:27 GMT ms-cv: - - eg5Zna69MUelcOMGYB9PoA.0 + - 3+dAUBSphUi/ggI0bb6wwQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 15933ms + - 16673ms status: code: 204 message: No Content @@ -639,21 +657,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:14:00 GMT + - Mon, 01 Mar 2021 23:41:28 GMT ms-cv: - - c3gjQEc5w0q/9/MG90WUxQ.0 + - w/AKvfDCY0e3RWGODMvjFQ.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 292ms + - 293ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_remove_participant.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_remove_participant.yaml index 770e66674e0b..b262ab6df0f4 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_remove_participant.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_remove_participant.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:14:01 GMT + - Mon, 01 Mar 2021 23:41:29 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900c-b223-b0b7-3a3a0d00fdfd"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:14:00 GMT + - Mon, 01 Mar 2021 23:41:29 GMT ms-cv: - - EZm4ZV97KEm0bmO5QoCf5A.0 + - GOWVmkmFP0mjue2kW8hTRQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 38ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:14:01 GMT + - Mon, 01 Mar 2021 23:41:29 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:14:00.2599102+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:41:28.6699723+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:14:00 GMT + - Mon, 01 Mar 2021 23:41:29 GMT ms-cv: - - U+n9c5UM90OQyXf+d0GRyg.0 + - FvABCZjgdkKAhBIZFLe2gg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 115ms + - 112ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:14:02 GMT + - Mon, 01 Mar 2021 23:41:29 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900c-b314-b0b7-3a3a0d00fdfe"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:14:00 GMT + - Mon, 01 Mar 2021 23:41:29 GMT ms-cv: - - iwwv12Y4QkqWRRqH0P3zQA.0 + - t5aRpeRZQ0m6HhohZJ2tCw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 23ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:14:02 GMT + - Mon, 01 Mar 2021 23:41:29 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:14:00.4581206+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:41:28.8913447+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:14:00 GMT + - Mon, 01 Mar 2021 23:41:29 GMT ms-cv: - - /bW3cAQSkU+YKFSZdCQC4A.0 + - CnAqxlInwUWoOdL9+NoWPw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 91ms + - 97ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - e99db6c4-bef1-481d-8e92-528e8a290d0b + repeatability-Request-Id: + - ba9bbb8d-97a1-4b4a-842f-83c779d2a671 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:4E8s1hIQeP0NL5a4RI5MHuFwoSUNhnLIm84cb-6qJtk1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:14:01Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc1-7abd-b0b7-3a3a0d002fd9"}}' + body: '{"chatThread": {"id": "19:mhmbttQOEIiMyq0hD60dHmJQa7M4D4dDQVgcCgYa_vA1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:41:30Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900c-b223-b0b7-3a3a0d00fdfd", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900c-b223-b0b7-3a3a0d00fdfd"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:14:02 GMT + - Mon, 01 Mar 2021 23:41:30 GMT ms-cv: - - 7RNEOUTHk0GR//bh61Mcwg.0 + - rdYilk4o9ka+9ejcnUFarA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 849ms + - 839ms status: code: 201 message: Created @@ -209,35 +223,35 @@ interactions: Connection: - keep-alive Content-Length: - - '183' + - '235' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2021-01-27-preview4 response: body: '{}' headers: api-supported-versions: - - 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:14:02 GMT + - Mon, 01 Mar 2021 23:41:31 GMT ms-cv: - - WTe/ZJvW/UW+XLlyxEnIRQ.0 + - L4Vh50x3MkODVVUvApqf0A.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 405ms + - 690ms status: code: 201 message: Created - request: - body: null + body: '{"communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900c-b314-b0b7-3a3a0d00fdfe"}}' headers: Accept: - application/json @@ -246,25 +260,27 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '112' + Content-Type: + - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/8%3Aacs%3A46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc1-7be5-b0b7-3a3a0d002fda?api-version=2020-11-01-preview3 + method: POST + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:remove?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:14:03 GMT + - Mon, 01 Mar 2021 23:41:31 GMT ms-cv: - - jkB6wPDKmUeaim9wAvflbg.0 + - XwhZwhogF0yJaNHL6it/oQ.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 452ms + - 455ms status: code: 204 message: No Content @@ -272,7 +288,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -280,13 +296,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:14:04 GMT + - Mon, 01 Mar 2021 23:41:32 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -294,13 +310,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:14:19 GMT + - Mon, 01 Mar 2021 23:41:48 GMT ms-cv: - - oT4lJ//RSUahLSYWY6yTWw.0 + - GBMwKgmCZ0u+3gjcJlC5uQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16000ms + - 16892ms status: code: 204 message: No Content @@ -308,7 +326,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -316,13 +334,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:14:20 GMT + - Mon, 01 Mar 2021 23:41:49 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -330,13 +348,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:14:35 GMT + - Mon, 01 Mar 2021 23:42:05 GMT ms-cv: - - qg30GEqn+EWOdc+u9Nf7Ow.0 + - YoIaiobTgEWHYwjsf97CdA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16565ms + - 16924ms status: code: 204 message: No Content @@ -354,21 +374,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:14:36 GMT + - Mon, 01 Mar 2021 23:42:06 GMT ms-cv: - - lDW3jg3eiEqYxIvtlsTOxg.0 + - ldHUM4f7+UqQeW2gnoJOWQ.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 329ms + - 334ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_send_message.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_send_message.yaml index 669aba8894b2..c4d8fcaef1cd 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_send_message.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_send_message.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:14:37 GMT + - Mon, 01 Mar 2021 23:42:06 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900d-445c-dbb7-3a3a0d00feb7"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:14:36 GMT + - Mon, 01 Mar 2021 23:42:06 GMT ms-cv: - - PUk9KXg0hkO+CkCLwWzbdg.0 + - o+we9yzWRECAOumpeYMfFg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 144ms + - 15ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:14:38 GMT + - Mon, 01 Mar 2021 23:42:06 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:14:36.2310025+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:42:06.0735811+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:14:36 GMT + - Mon, 01 Mar 2021 23:42:06 GMT ms-cv: - - i7Qr/LEEekyNydS6xC4pZg.0 + - SiM5P6cRyE6CT2AMB394ZQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 130ms + - 87ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:14:38 GMT + - Mon, 01 Mar 2021 23:42:06 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900d-451b-dbb7-3a3a0d00feb8"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:14:36 GMT + - Mon, 01 Mar 2021 23:42:06 GMT ms-cv: - - Ww2NQm7lVESaKwXycU5e5w.0 + - vAzfuf18YEuTgJdjCudnJg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 21ms + - 15ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:14:38 GMT + - Mon, 01 Mar 2021 23:42:06 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:14:36.4924069+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:42:06.2793838+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:14:36 GMT + - Mon, 01 Mar 2021 23:42:06 GMT ms-cv: - - rNpbJx8+3U6OUrimTrsi2A.0 + - piP9wYNZ0kSst8IeS+SUnw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 143ms + - 87ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 40db38f0-3b14-4697-9513-4ab0d5de5bb0 + repeatability-Request-Id: + - 3bcf9f50-5578-4b7f-bb6b-8a18b2a25555 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:2L9d8Kv3-nhipybg6fHvSKVtRcXPcmdDbTF4fi7fQP01@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:14:37Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc2-077b-1db7-3a3a0d002bb5"}}' + body: '{"chatThread": {"id": "19:CjkcPZIyD_-CMxlXczT00roXzd7YTAhm4b75Ef4L5Es1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:42:07Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900d-445c-dbb7-3a3a0d00feb7", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900d-445c-dbb7-3a3a0d00feb7"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:14:37 GMT + - Mon, 01 Mar 2021 23:42:07 GMT ms-cv: - - uWe3kVXQ6UOGBYAnbGxrqQ.0 + - FxrVG9fKLkSPqRVSgjrbxA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 834ms + - 902ms status: code: 201 message: Created @@ -216,24 +230,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:14:39 GMT + - Mon, 01 Mar 2021 23:42:08 GMT ms-cv: - - IJrEaNKVAkOUChnJIeg1jg.0 + - RP5KcGGF9UCuZd+4oIYhkA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 370ms + - 387ms status: code: 201 message: Created @@ -241,7 +255,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -249,13 +263,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:14:40 GMT + - Mon, 01 Mar 2021 23:42:08 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -263,13 +277,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:14:55 GMT + - Mon, 01 Mar 2021 23:42:24 GMT ms-cv: - - YfMJXVUq90mBonU+4Kqmmg.0 + - xu/3CgTE/0mvtlW/9hMa1Q.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16170ms + - 16770ms status: code: 204 message: No Content @@ -277,7 +293,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -285,13 +301,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:14:56 GMT + - Mon, 01 Mar 2021 23:42:25 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -299,13 +315,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:15:10 GMT + - Mon, 01 Mar 2021 23:42:41 GMT ms-cv: - - QygpUV62dU2p3dQH1i9EFw.0 + - dSImIT3goEWYV1Tns4Jt4w.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 15771ms + - 16272ms status: code: 204 message: No Content @@ -323,21 +341,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:15:11 GMT + - Mon, 01 Mar 2021 23:42:42 GMT ms-cv: - - SLGQK/S7UUiOyxLecoVsvg.0 + - QFbpuI18REKGJ3YvyMdMVg.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 296ms + - 325ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_send_read_receipt.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_send_read_receipt.yaml index 5e4eb0b092dc..e83dc1240c30 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_send_read_receipt.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_send_read_receipt.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:15:12 GMT + - Mon, 01 Mar 2021 23:42:42 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900d-d06c-9c58-373a0d00fa67"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:15:11 GMT + - Mon, 01 Mar 2021 23:42:42 GMT ms-cv: - - tSA9Uj5DZUW3a9cE/9Mf/Q.0 + - m/n2ej5fAE2OYBQbu/hm3Q.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 17ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,24 +56,26 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:15:12 GMT + - Mon, 01 Mar 2021 23:42:42 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:15:11.1099766+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:42:41.9269488+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:15:11 GMT + - Mon, 01 Mar 2021 23:42:42 GMT ms-cv: - - VgBXYbYf9UurxmT5dzATFg.0 + - 2/5MphOs40m9O9epJhcBmA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: @@ -80,7 +86,7 @@ interactions: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:15:13 GMT + - Mon, 01 Mar 2021 23:42:42 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900d-d12a-9c58-373a0d00fa68"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:15:11 GMT + - Mon, 01 Mar 2021 23:42:42 GMT ms-cv: - - DbJCn67mX0aWj8C6ortl0A.0 + - r5wsIFBgv0OreRzh/8K7bQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 17ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:15:13 GMT + - Mon, 01 Mar 2021 23:42:42 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:15:11.320505+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:42:42.1231387+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:15:11 GMT + - Mon, 01 Mar 2021 23:42:42 GMT ms-cv: - - zjn4ayBwyke1loffvhkcKA.0 + - Qi6zhA3+pEW6ObYtj3p72Q.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 87ms + - 88ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 474491e3-6187-4de9-9d8a-28f6d540d871 + repeatability-Request-Id: + - 93500e09-6ea5-4cd3-9b20-7f9d81a621ad method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:t_E0OeuCTWPldGmzOPeMP1S_mSN6F6VTus185SOfXhM1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:15:12Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc2-8fe4-1db7-3a3a0d002bb7"}}' + body: '{"chatThread": {"id": "19:TdUWBFU4mvlGataTLuWOC599yTPug1CYYyN_VnLk0HE1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:42:44Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900d-d06c-9c58-373a0d00fa67", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900d-d06c-9c58-373a0d00fa67"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:15:13 GMT + - Mon, 01 Mar 2021 23:42:45 GMT ms-cv: - - r9Rq5GDG70a4hFfGeGY4Pg.0 + - JQvWyIRJGkCsFB92gibT4g.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 827ms + - 897ms status: code: 201 message: Created @@ -216,24 +230,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:15:13 GMT + - Mon, 01 Mar 2021 23:42:46 GMT ms-cv: - - PWZQZDAcBkCuAJZAkO8FGQ.0 + - cskFOzv5Ikuwhi2LAdJZCQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 371ms + - 386ms status: code: 201 message: Created @@ -253,23 +267,23 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-length: - '0' date: - - Mon, 01 Feb 2021 23:15:14 GMT + - Mon, 01 Mar 2021 23:42:46 GMT ms-cv: - - Dmex4TI3t0KRUU5gjpnk0A.0 + - MDNs58QFiE6lkDAT96/5NA.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 474ms + - 620ms status: code: 200 message: OK @@ -277,7 +291,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -285,13 +299,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:15:15 GMT + - Mon, 01 Mar 2021 23:42:46 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -299,13 +313,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:15:30 GMT + - Mon, 01 Mar 2021 23:43:03 GMT ms-cv: - - SmoIgTczqk2E5claXN641g.0 + - SfEERkDutk2727zYQFb8fQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16560ms + - 17021ms status: code: 204 message: No Content @@ -313,7 +329,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -321,13 +337,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:15:32 GMT + - Mon, 01 Mar 2021 23:43:03 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -335,13 +351,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:15:47 GMT + - Mon, 01 Mar 2021 23:43:19 GMT ms-cv: - - Y6csz9/irk6fnMs7V1j1kQ.0 + - WtHjXwpauEmeIejI99lrJQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16651ms + - 16148ms status: code: 204 message: No Content @@ -359,21 +377,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:15:47 GMT + - Mon, 01 Mar 2021 23:43:19 GMT ms-cv: - - vCDX2DXOBkalGHB9+mXItQ.0 + - IE0VLuAVNkiPKuVqBZx3lg.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 330ms + - 319ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_send_typing_notification.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_send_typing_notification.yaml index 4f03008f9db2..a862b496150e 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_send_typing_notification.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_send_typing_notification.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:15:49 GMT + - Mon, 01 Mar 2021 23:43:20 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900e-6509-9c58-373a0d00fa6b"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:15:47 GMT + - Mon, 01 Mar 2021 23:43:20 GMT ms-cv: - - XwHJSNWA7UqNR7ibkb9bbA.0 + - +8ZWqUyIckaLYJIxdORTTw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 31ms + - 18ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:15:49 GMT + - Mon, 01 Mar 2021 23:43:20 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:15:47.7123057+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:43:19.9932822+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:15:47 GMT + - Mon, 01 Mar 2021 23:43:20 GMT ms-cv: - - REHPP3i3bUSlTyS+tP9MWQ.0 + - lei8eIhdk02BDJIwh6FQQw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 88ms + - 90ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:15:49 GMT + - Mon, 01 Mar 2021 23:43:20 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900e-65e5-9c58-373a0d00fa6c"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:15:47 GMT + - Mon, 01 Mar 2021 23:43:20 GMT ms-cv: - - 1wfO7BOee0etC6vNcd4TbQ.0 + - bCG+fZm8vkKHs+p16zNAGQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 18ms + - 14ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:15:49 GMT + - Mon, 01 Mar 2021 23:43:20 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:15:47.9042925+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:43:20.2174719+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:15:48 GMT + - Mon, 01 Mar 2021 23:43:20 GMT ms-cv: - - VAMXZsDHB0KnHjUxlKLzsg.0 + - Zf/0lMF1yUmOJk1WKN+qDQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 84ms + - 94ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 332f1d84-d70a-41c9-896f-06ce225c9800 + repeatability-Request-Id: + - b6d4befb-a5fe-466d-a823-140e57714113 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:Fx3tz3AWBkwB0rNJLdwYEp93BWn9LDnjENQr-r6Q1tc1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:15:49Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc3-1ede-1db7-3a3a0d002bbb"}}' + body: '{"chatThread": {"id": "19:pmT_uawfXpDA9uyTVp-wMGfWQaGQ5ZOSjeK7OsEh-fA1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:43:21Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900e-6509-9c58-373a0d00fa6b", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900e-6509-9c58-373a0d00fa6b"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:15:49 GMT + - Mon, 01 Mar 2021 23:43:21 GMT ms-cv: - - 2ibp7R9uik+hT85AQshldw.0 + - nR9CMxS470KCrogeoBK9LA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 835ms + - 887ms status: code: 201 message: Created @@ -213,23 +227,23 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/typing?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/typing?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-length: - '0' date: - - Mon, 01 Feb 2021 23:15:49 GMT + - Mon, 01 Mar 2021 23:43:22 GMT ms-cv: - - 0206Ij0Tk02wqj686Ri0bw.0 + - erIFwU494UyW8EPk0lQ9aA.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 380ms + - 370ms status: code: 200 message: OK @@ -237,7 +251,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -245,13 +259,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:15:51 GMT + - Mon, 01 Mar 2021 23:43:22 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -259,13 +273,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:16:06 GMT + - Mon, 01 Mar 2021 23:43:38 GMT ms-cv: - - N6ZajPTp80iFBwopP6HvJw.0 + - wYrM4nEWwk6B5Hpy0c0jMg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16195ms + - 16347ms status: code: 204 message: No Content @@ -273,7 +289,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -281,13 +297,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:16:07 GMT + - Mon, 01 Mar 2021 23:43:39 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -295,13 +311,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:16:22 GMT + - Mon, 01 Mar 2021 23:43:55 GMT ms-cv: - - NgU0httyhECRLttIx+ALRg.0 + - od0nkIycT06u1nPmCLTGbg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16433ms + - 16632ms status: code: 204 message: No Content @@ -319,21 +337,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:16:22 GMT + - Mon, 01 Mar 2021 23:43:55 GMT ms-cv: - - r/yFRd7inkO5ZrdEaxelHQ.0 + - CCwrwbkiwEy9t6VH23ZIPA.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 328ms + - 319ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_update_message.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_update_message.yaml index dec30f9dcf65..481393a64346 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_update_message.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_update_message.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:16:24 GMT + - Mon, 01 Mar 2021 23:43:56 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900e-f1d1-b0b7-3a3a0d00fe05"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:16:23 GMT + - Mon, 01 Mar 2021 23:43:56 GMT ms-cv: - - 2MymiP7VJ0OXSvRRMY2dyw.0 + - KNeQN4SiFEeCkn23Bp6xrw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 68ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:16:24 GMT + - Mon, 01 Mar 2021 23:43:56 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:16:23.1422355+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:43:56.0301261+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:16:23 GMT + - Mon, 01 Mar 2021 23:43:56 GMT ms-cv: - - 465Iq26z10GzxzZc6yHNwA.0 + - nA1TKOnWdEGdV5nmMuHmjQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 104ms + - 101ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:16:25 GMT + - Mon, 01 Mar 2021 23:43:56 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900e-f29f-b0b7-3a3a0d00fe06"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:16:23 GMT + - Mon, 01 Mar 2021 23:43:56 GMT ms-cv: - - JRpcxWLlK0yMKlUHiEFbMw.0 + - OTKrAmSA4kykhohJiwVeZw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 21ms + - 14ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:16:25 GMT + - Mon, 01 Mar 2021 23:43:56 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:16:23.3432968+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:43:56.2286132+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:16:23 GMT + - Mon, 01 Mar 2021 23:43:56 GMT ms-cv: - - xhPcqG0KFUyk3F3rjxjZ0w.0 + - azxUDAzK4U6D7fiHcTy6EQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 91ms + - 96ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 7fc2e51d-55b0-40b2-a245-3c2dc6ceedc5 + repeatability-Request-Id: + - 734fd4fd-0ea7-47c5-abc6-83d6e4128e92 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:3x3XmwNlVkuiiXHmbSCmYuQ8JxeiRazrEShqq-oR3To1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:16:25Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc3-a929-9c58-373a0d002de1"}}' + body: '{"chatThread": {"id": "19:Ba0XSo1RLpr5LhcEwcjhD_cw31gy0KottJAAVcpTObE1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:43:57Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900e-f1d1-b0b7-3a3a0d00fe05", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900e-f1d1-b0b7-3a3a0d00fe05"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:16:26 GMT + - Mon, 01 Mar 2021 23:43:57 GMT ms-cv: - - yu7GP5ErZ0yDgI2tJvJ7aA.0 + - PstsUqZl0ki5Xj5Xqpk5cg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 848ms + - 885ms status: code: 201 message: Created @@ -216,24 +230,24 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:16:27 GMT + - Mon, 01 Mar 2021 23:43:58 GMT ms-cv: - - OdIc18bb8kigrXOy5U4LKg.0 + - iWeOcEjoRkO+B6OWU5VVsg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 666ms + - 381ms status: code: 201 message: Created @@ -253,21 +267,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: PATCH - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:16:27 GMT + - Mon, 01 Mar 2021 23:43:59 GMT ms-cv: - - LPkc4PDmrkaytAz03cTGBg.0 + - rzmgfs1znU+8Hcr8kbxEqw.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 755ms + - 677ms status: code: 204 message: No Content @@ -275,7 +289,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -283,13 +297,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:16:28 GMT + - Mon, 01 Mar 2021 23:43:59 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -297,13 +311,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:16:43 GMT + - Mon, 01 Mar 2021 23:44:15 GMT ms-cv: - - tasO5sWXeEK9zfka3B0tyg.0 + - ko3NRFDJDE+hRFQitVEmlQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16485ms + - 16638ms status: code: 204 message: No Content @@ -311,7 +327,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -319,13 +335,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:16:45 GMT + - Mon, 01 Mar 2021 23:44:16 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -333,13 +349,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:17:00 GMT + - Mon, 01 Mar 2021 23:44:32 GMT ms-cv: - - QV0+4+sWg0O2D5wOmS9L2g.0 + - vzGHZyEftEK4nWHdOj5Yuw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16183ms + - 16802ms status: code: 204 message: No Content @@ -357,21 +375,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:17:00 GMT + - Mon, 01 Mar 2021 23:44:33 GMT ms-cv: - - tBMt51eRjkW0VBp/PLpN/A.0 + - jn71eGpcSkGqxxKVtXEzrw.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 294ms + - 764ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_update_topic.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_update_topic.yaml index ef81731f6a30..622ac853cef0 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_update_topic.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e.test_update_topic.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:17:02 GMT + - Mon, 01 Mar 2021 23:44:33 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900f-83d3-b0b7-3a3a0d00fe09"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:17:01 GMT + - Mon, 01 Mar 2021 23:44:33 GMT ms-cv: - - 4k4KwAmJEEWEHj0zcLzq6g.0 + - kyKMfcDELU6/kBKDSplo0Q.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 60ms + - 64ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:17:02 GMT + - Mon, 01 Mar 2021 23:44:34 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:17:00.8453508+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:44:33.4038746+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:17:01 GMT + - Mon, 01 Mar 2021 23:44:34 GMT ms-cv: - - rObRoGlwDUeiFVukiGVOqw.0 + - zD5rDIFvUE+zlzkFw/5NQg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 103ms + - 101ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:17:02 GMT + - Mon, 01 Mar 2021 23:44:34 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900f-849f-b0b7-3a3a0d00fe0a"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:17:01 GMT + - Mon, 01 Mar 2021 23:44:34 GMT ms-cv: - - pFkPISUMA0q49e0tmLJH7w.0 + - 4TsGFCnKKECl5hhgu2ySsw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 24ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:17:02 GMT + - Mon, 01 Mar 2021 23:44:34 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:17:00.0712662+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:44:33.6051914+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:17:01 GMT + - Mon, 01 Mar 2021 23:44:34 GMT ms-cv: - - sP2KdfioK0mo8hlWKGtfCA.0 + - v22aOuA0Ak6fGUEtq8d30g.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 92ms + - 99ms status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: Connection: - keep-alive Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 21dee0d5-0f45-4e22-8e21-ff7a831076ee + repeatability-Request-Id: + - cbcb06a1-b572-42f1-8f7f-d19856ad1bde method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:MYM8rFp9eERFM1j8IRDD7gCnk7B0fmgKBh0GgAxYouU1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:17:02Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc4-3c30-9c58-373a0d002de3"}}' + body: '{"chatThread": {"id": "19:gQY_1yN2EgV7Pm9h_6j7TbCg4z-DF4NoYZGCi2r8mjw1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:44:34Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900f-83d3-b0b7-3a3a0d00fe09", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-900f-83d3-b0b7-3a3a0d00fe09"}}}}' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:17:02 GMT + - Mon, 01 Mar 2021 23:44:34 GMT ms-cv: - - mSXw7JSS2kqOtiKUIwWUIA.0 + - aOVDyqojZUW7HJwu10ne3w.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 875ms + - 886ms status: code: 201 message: Created @@ -215,21 +229,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: PATCH - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:17:03 GMT + - Mon, 01 Mar 2021 23:44:35 GMT ms-cv: - - 15a+lb6U6EiowJbUL4xxpg.0 + - bXX0kM8mYUGMWWJ7CE8BuA.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 387ms + - 429ms status: code: 204 message: No Content @@ -237,7 +251,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -245,13 +259,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:17:04 GMT + - Mon, 01 Mar 2021 23:44:36 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -259,13 +273,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:17:20 GMT + - Mon, 01 Mar 2021 23:44:51 GMT ms-cv: - - 7G+YH3zbsEiZiQC6pR+q9w.0 + - QH2hJ12H+0+aRb/hwQsRsg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 17151ms + - 15993ms status: code: 204 message: No Content @@ -273,7 +289,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -281,13 +297,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:17:21 GMT + - Mon, 01 Mar 2021 23:44:52 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -295,13 +311,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:17:36 GMT + - Mon, 01 Mar 2021 23:45:09 GMT ms-cv: - - xguohH3MNUSNItwjGBWWXA.0 + - eDuxz/hXw0G3L7P4BdOkQA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16713ms + - 16565ms status: code: 204 message: No Content @@ -319,21 +337,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: api-supported-versions: - - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + - 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 date: - - Mon, 01 Feb 2021 23:17:37 GMT + - Mon, 01 Mar 2021 23:45:09 GMT ms-cv: - - y7AhM8HUi0md4+LXkmghqw.0 + - dWSE9SOZQEC9uTdPyXekFQ.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 338ms + - 292ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_add_participant.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_add_participant.yaml index b2bd1b1654c0..852f382e9531 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_add_participant.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_add_participant.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:17:38 GMT + - Mon, 01 Mar 2021 23:45:24 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9010-497b-1655-373a0d000069"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:17:37 GMT + - Mon, 01 Mar 2021 23:45:24 GMT ms-cv: - - wiJNOcMEe0y2M7VRao265A.0 + - cf7jnSO9AUuf/atBhGHi6w.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 22ms + - 16ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:17:39 GMT + - Mon, 01 Mar 2021 23:45:24 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:17:37.4364651+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:45:24.0013541+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:17:37 GMT + - Mon, 01 Mar 2021 23:45:24 GMT ms-cv: - - 7jJJuoxd7ESniv5K0rURVw.0 + - SMSl4Tn6akec5gh7C9JpVQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 87ms + - 92ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,26 +95,30 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:17:39 GMT + - Mon, 01 Mar 2021 23:45:24 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9010-4a4b-1655-373a0d00006a"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:17:37 GMT + - Mon, 01 Mar 2021 23:45:25 GMT ms-cv: - - 0aYZgAfC30agjwajckap0Q.0 + - +gFeapLED06g0uyqX+CGMw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: @@ -116,8 +126,8 @@ interactions: x-processing-time: - 22ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:17:39 GMT + - Mon, 01 Mar 2021 23:45:24 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:17:37.6483825+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:45:24.2018736+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:17:38 GMT + - Mon, 01 Mar 2021 23:45:25 GMT ms-cv: - - WZi9Z5P+mkmIXTZm+QF2Qg.0 + - yNDLHo+7706hD4WhTXHWYg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 87ms + - 89ms status: code: 200 message: OK @@ -165,57 +177,60 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 8c32fba3-7d4e-4fc7-b934-9cc05e49c3ed + repeatability-Request-Id: + - 8ad20314-7443-494f-88ae-97e051c9f8ae method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:aJmsyuJMYvoVvmtOiLuUT5R6rkKFRZvli7ahPU-bJaU1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:17:39Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc4-cb7b-9c58-373a0d002de5"}}' + body: '{"chatThread": {"id": "19:IL9g-Fi0oBkYpaQ7odYqUdDRkiCecihVM3MC4DAxkLw1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:45:25Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9010-497b-1655-373a0d000069", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9010-497b-1655-373a0d000069"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:17:39 GMT - ms-cv: ERPPmkWQc0SxCaIDt7lYNw.0 + date: Mon, 01 Mar 2021 23:45:25 GMT + ms-cv: +KMMckzi+kGQbXpzUGpRSg.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 836ms + x-processing-time: 827ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"participants": "sanitized"}' headers: Accept: - application/json Content-Length: - - '183' + - '235' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2021-01-27-preview4 response: body: '{}' headers: - api-supported-versions: 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:17:40 GMT - ms-cv: +e5us/5vjUOFTQKkdfzraQ.0 + date: Mon, 01 Mar 2021 23:45:26 GMT + ms-cv: D7fyg3OtakOh+qw78BQwQg.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 842ms + x-processing-time: 927ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2021-01-27-preview4 - request: body: null headers: @@ -224,25 +239,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:17:40 GMT - ms-cv: ExECFOZRLkSrucWivvZvBw.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:45:27 GMT + ms-cv: Sr8t56jEuk20xhYeBluufQ.0 strict-transport-security: max-age=2592000 - x-processing-time: 309ms + x-processing-time: 298ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -250,13 +266,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:17:41 GMT + - Mon, 01 Mar 2021 23:45:27 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -264,13 +280,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:17:57 GMT + - Mon, 01 Mar 2021 23:45:43 GMT ms-cv: - - pCklXNjJmEKS1gEqsrPa3A.0 + - HAQTYeGExES7OfJI3IFSWg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16640ms + - 16460ms status: code: 204 message: No Content @@ -278,7 +296,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -286,13 +304,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:17:58 GMT + - Mon, 01 Mar 2021 23:45:43 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -300,13 +318,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:18:14 GMT + - Mon, 01 Mar 2021 23:46:00 GMT ms-cv: - - 2GSUOVKyNkudmSv9EM2ibA.0 + - nU9tislMrEyrHckqZQbEMg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16693ms + - 16976ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_add_participants.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_add_participants.yaml index 893d7f5b0fdc..8d6071a0026a 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_add_participants.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_add_participants.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:18:15 GMT + - Mon, 01 Mar 2021 23:46:01 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9010-d89e-dbb7-3a3a0d00fed0"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:18:13 GMT + - Mon, 01 Mar 2021 23:46:01 GMT ms-cv: - - cuNmsy7nv0G1p/9GsngMgA.0 + - i34KqPnOzEa5thfVvL5jyw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 26ms + - 16ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:18:15 GMT + - Mon, 01 Mar 2021 23:46:01 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:18:13.8878372+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:46:00.6357953+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:18:14 GMT + - Mon, 01 Mar 2021 23:46:01 GMT ms-cv: - - tog85bh5u0aSJG6kumCQJg.0 + - QM3v0KYCTECLKousDvUrNg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 104ms + - 89ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:18:15 GMT + - Mon, 01 Mar 2021 23:46:01 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9010-d963-dbb7-3a3a0d00fed1"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:18:14 GMT + - Mon, 01 Mar 2021 23:46:01 GMT ms-cv: - - 1zN9zRgwr0KAcqCHZ2BMJQ.0 + - g6wapJY3dEuOeLXcRUfwoQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 18ms + - 16ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:18:15 GMT + - Mon, 01 Mar 2021 23:46:01 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:18:14.0825193+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:46:00.8345957+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:18:14 GMT + - Mon, 01 Mar 2021 23:46:01 GMT ms-cv: - - kblWrQzk+U6GNVsVxya2pA.0 + - OabeMqdYXkKaQ5AnDSoj7w.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 87ms + - 91ms status: code: 200 message: OK @@ -165,57 +177,60 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 3ad78fb8-0e55-4ace-b55b-445e910f95dd + repeatability-Request-Id: + - 0d070e8c-b0b2-4ab1-807a-0b47a9400ae9 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:dY2LFZUfMSYMlUgFHOBK6JL5YCBEnV_7z6C1T5DyfvE1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:18:15Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc5-59cd-dbb7-3a3a0d002e3d"}}' + body: '{"chatThread": {"id": "19:DpcikdQ3hkGa8FPKa41f56HiE04uhuZEGaPcGVJFx1Q1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:46:02Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9010-d89e-dbb7-3a3a0d00fed0", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9010-d89e-dbb7-3a3a0d00fed0"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:18:15 GMT - ms-cv: EpZGMSKCI027wfbMuz2U0w.0 + date: Mon, 01 Mar 2021 23:46:02 GMT + ms-cv: 8hWRht+5EkSnQWWkAH5K/A.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 840ms + x-processing-time: 873ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"participants": "sanitized"}' headers: Accept: - application/json Content-Length: - - '183' + - '235' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2021-01-27-preview4 response: body: '{}' headers: - api-supported-versions: 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:18:16 GMT - ms-cv: wrwsS4U4RkOTn7KepcXvdw.0 + date: Mon, 01 Mar 2021 23:46:03 GMT + ms-cv: 2G4BUv60DUqvQSF1apnTJA.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 867ms + x-processing-time: 819ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2021-01-27-preview4 - request: body: null headers: @@ -224,25 +239,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:18:16 GMT - ms-cv: XST1go/ahU6EyGpm+A2sXQ.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:46:03 GMT + ms-cv: jQwLQ/DAgEOFGuA1Uq02Qw.0 strict-transport-security: max-age=2592000 - x-processing-time: 344ms + x-processing-time: 334ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -250,13 +266,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:18:18 GMT + - Mon, 01 Mar 2021 23:46:04 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -264,13 +280,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:18:33 GMT + - Mon, 01 Mar 2021 23:46:19 GMT ms-cv: - - I1E/tzvZYUuzELOe3JTxLQ.0 + - v8N67i9vOEC/9jws5Swh9A.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16410ms + - 16442ms status: code: 204 message: No Content @@ -278,7 +296,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -286,13 +304,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:18:34 GMT + - Mon, 01 Mar 2021 23:46:20 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -300,13 +318,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:18:49 GMT + - Mon, 01 Mar 2021 23:46:35 GMT ms-cv: - - RzK4RXdR3EWzhN+5jVzmcA.0 + - P694XHjNKUKSZ/BAK4cTPg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 15990ms + - 16036ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_delete_message.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_delete_message.yaml index 4038781d3dcc..b603c6c8fdb2 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_delete_message.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_delete_message.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:18:50 GMT + - Mon, 01 Mar 2021 23:46:36 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9011-63c8-1db7-3a3a0d0005e5"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:18:49 GMT + - Mon, 01 Mar 2021 23:46:36 GMT ms-cv: - - 31OWtmSn3EiOkJXY25BbiQ.0 + - veZZsvVyqEmBJcjQqHVL3w.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 19ms + - 45ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:18:51 GMT + - Mon, 01 Mar 2021 23:46:36 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:18:49.4008201+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:46:36.2865251+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:18:49 GMT + - Mon, 01 Mar 2021 23:46:36 GMT ms-cv: - - nHqbbboWNUGZB8iLXcDEJA.0 + - uSqo3pSX7E6mEymf05vgmw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 84ms + - 93ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:18:51 GMT + - Mon, 01 Mar 2021 23:46:37 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9011-64b0-1db7-3a3a0d0005e6"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:18:50 GMT + - Mon, 01 Mar 2021 23:46:36 GMT ms-cv: - - wXZ/WKcf4k2NFRHHTQD5Sw.0 + - ILIauNn1zkaVs4+BCxSZUg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 105ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:18:51 GMT + - Mon, 01 Mar 2021 23:46:37 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:18:49.7426359+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:46:36.5055253+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:18:50 GMT + - Mon, 01 Mar 2021 23:46:37 GMT ms-cv: - - yUabNjFxEkSSBdprrS/EVw.0 + - dLiJ37GpKUq+btSLOoZqRw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 123ms + - 90ms status: code: 200 message: OK @@ -165,30 +177,33 @@ interactions: Accept: - application/json Content-Length: - - '205' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 11076cec-3eed-4e04-a50a-7de1f5fa86cf + repeatability-Request-Id: + - 6ecd09ff-7033-41c8-9355-1dc8d2bf0b28 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:hmrEwhvqrMyzs4L4bmVEFpa02a2DGHP3nK-1lIVbDgk1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:18:51Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc5-e49b-dbb7-3a3a0d002e42"}}' + body: '{"chatThread": {"id": "19:zJTyR9uzSM4KG300cqp6LTjj4jjZc5w6866wcaSSZ2I1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:46:37Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9011-63c8-1db7-3a3a0d0005e5", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9011-63c8-1db7-3a3a0d0005e5"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:18:51 GMT - ms-cv: /D11Li2mXUePQ+ea7zB/4A.0 + date: Mon, 01 Mar 2021 23:46:38 GMT + ms-cv: T2pToxL5f0Gv7N+g59sR6g.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 1301ms + x-processing-time: 897ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"content": "hello world", "senderDisplayName": "sender name", "type": "text"}' @@ -202,21 +217,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:18:52 GMT - ms-cv: 0Rab5ME8YU+cr/32hQOi4g.0 + date: Mon, 01 Mar 2021 23:46:38 GMT + ms-cv: GssvZhIUVkyT9x3jA/IEvg.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 839ms + x-processing-time: 402ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 - request: body: null headers: @@ -225,20 +241,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:18:52 GMT - ms-cv: VuWN90lDMUSIprmudU5tfw.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:46:39 GMT + ms-cv: zzMGoGX18EuM+dVqzNUYcA.0 strict-transport-security: max-age=2592000 - x-processing-time: 413ms + x-processing-time: 417ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: @@ -247,25 +264,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:18:53 GMT - ms-cv: As0acV4b/k2CWp8oO6NWnA.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:46:39 GMT + ms-cv: 9CqT6fV8jkSHPr7V47B0gQ.0 strict-transport-security: max-age=2592000 - x-processing-time: 296ms + x-processing-time: 320ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -273,13 +291,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:18:54 GMT + - Mon, 01 Mar 2021 23:46:39 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -287,13 +305,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:19:08 GMT + - Mon, 01 Mar 2021 23:46:55 GMT ms-cv: - - 3TV+emzQ70KIiKWt3yytEg.0 + - pWIGIyLG7EK0wsBM7Sv3wA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 15749ms + - 16038ms status: code: 204 message: No Content @@ -301,7 +321,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -309,13 +329,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:19:10 GMT + - Mon, 01 Mar 2021 23:46:55 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -323,13 +343,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:19:25 GMT + - Mon, 01 Mar 2021 23:47:11 GMT ms-cv: - - 1txET329UkqLiKnywtlx+Q.0 + - HxQmHxmWbk+dFbVnUy0VZw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16088ms + - 16023ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_get_message.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_get_message.yaml index 4ae3fc2723f6..83f78d1c8d51 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_get_message.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_get_message.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:19:26 GMT + - Mon, 01 Mar 2021 23:47:11 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9011-ed9a-1db7-3a3a0d0005e8"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:19:25 GMT + - Mon, 01 Mar 2021 23:47:12 GMT ms-cv: - - V2iZBGO0mkSTbnFTez9x4g.0 + - 5ZtOtGeEg0iCquyHzkQgVQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 25ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:19:27 GMT + - Mon, 01 Mar 2021 23:47:12 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:19:25.7173945+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:47:11.5647541+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:19:26 GMT + - Mon, 01 Mar 2021 23:47:12 GMT ms-cv: - - so9sekwPGE2NMvzGzqVRNw.0 + - 4BRepLGv+UyuMYm8Bm+1bQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 471ms + - 92ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:19:27 GMT + - Mon, 01 Mar 2021 23:47:12 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9011-ee6b-1db7-3a3a0d0005e9"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:19:26 GMT + - Mon, 01 Mar 2021 23:47:12 GMT ms-cv: - - clPvopIe3UesWCd2Wj25sw.0 + - tiVmr3oQf0irZQod4MB3jg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 21ms + - 12ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:19:27 GMT + - Mon, 01 Mar 2021 23:47:12 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:19:25.9587324+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:47:11.7734486+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:19:26 GMT + - Mon, 01 Mar 2021 23:47:12 GMT ms-cv: - - d58oeSyc6UmvhH2AX50Srg.0 + - ZQhXOXBPTEGKHh7qanMVIA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 123ms + - 93ms status: code: 200 message: OK @@ -165,30 +177,33 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - e2efabfd-9369-47bd-ba13-97a39cfe8dda + repeatability-Request-Id: + - 1124d9d9-2b48-41b8-b9f1-e874bc9786d3 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:sT4EAyNNsPFIlxwKDRvELElOjSy031rfHMJ9uDfCF1M1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:19:27Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc6-70f4-dbb7-3a3a0d002e44"}}' + body: '{"chatThread": {"id": "19:XRPl_HSC_BxL1gIMfUA4u2obpn75--1BXpv-ycIO0sc1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:47:13Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9011-ed9a-1db7-3a3a0d0005e8", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9011-ed9a-1db7-3a3a0d0005e8"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:19:27 GMT - ms-cv: oCcekLH9MkqjgXrV83zVsQ.0 + date: Mon, 01 Mar 2021 23:47:13 GMT + ms-cv: c/vhqBy8lkO3fd87XiVcYA.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 887ms + x-processing-time: 895ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"content": "hello world", "senderDisplayName": "sender name", "type": "text"}' @@ -202,21 +217,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:19:27 GMT - ms-cv: 8MxAY6OdU06P126LeQNbmA.0 + date: Mon, 01 Mar 2021 23:47:14 GMT + ms-cv: Bc/sQ+yCg0S7644v8s30IA.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked x-processing-time: 386ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 - request: body: null headers: @@ -225,23 +241,25 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2021-01-27-preview4 response: - body: '{"id": "sanitized", "type": "text", "sequenceId": "3", "version": "1612221568314", + body: '{"id": "sanitized", "type": "text", "sequenceId": "3", "version": "1614642434421", "content": {"message": "hello world"}, "senderDisplayName": "sender name", "createdOn": - "2021-02-01T23:19:28Z", "senderId": "sanitized"}' + "2021-03-01T23:47:14Z", "senderCommunicationIdentifier": {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9011-ed9a-1db7-3a3a0d0005e8", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9011-ed9a-1db7-3a3a0d0005e8"}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:19:27 GMT - ms-cv: fAu0ovNwVUSs4266LM03ow.0 + date: Mon, 01 Mar 2021 23:47:14 GMT + ms-cv: iSUySknNFEOftXf2ZGhAOw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 252ms + x-processing-time: 254ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: @@ -250,25 +268,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:19:28 GMT - ms-cv: Dm1GewpLpkCW3li1QTQmew.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:47:15 GMT + ms-cv: XOMtEelNWUqcl+EWUncG9A.0 strict-transport-security: max-age=2592000 x-processing-time: 325ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -276,13 +295,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:19:30 GMT + - Mon, 01 Mar 2021 23:47:15 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -290,13 +309,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:19:44 GMT + - Mon, 01 Mar 2021 23:47:32 GMT ms-cv: - - fPF+rtnel0uXE6gx+3Ygcg.0 + - 9QrcVqtPdEaxf7zYces34A.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16405ms + - 17099ms status: code: 204 message: No Content @@ -304,7 +325,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -312,13 +333,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:19:46 GMT + - Mon, 01 Mar 2021 23:47:32 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -326,13 +347,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:20:01 GMT + - Mon, 01 Mar 2021 23:47:48 GMT ms-cv: - - s8cK09kHJkGx8kD54uNCug.0 + - 2NiBVP1W3EmGepIsShtR/Q.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16382ms + - 16467ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_list_messages.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_list_messages.yaml index aaf00437b769..e667a80d0ee1 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_list_messages.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_list_messages.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:20:02 GMT + - Mon, 01 Mar 2021 23:47:48 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9012-7d84-dbb7-3a3a0d00fedd"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:20:02 GMT + - Mon, 01 Mar 2021 23:47:49 GMT ms-cv: - - HbOjX7CMD0yIeSBDX2zgNQ.0 + - F0Vu+8b2v0e5qoukthEHIA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 47ms + - 16ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:20:03 GMT + - Mon, 01 Mar 2021 23:47:49 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:20:01.5625672+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:47:48.3924433+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:20:02 GMT + - Mon, 01 Mar 2021 23:47:49 GMT ms-cv: - - hQOqUjNxi0Odwu9Ddv6Ikw.0 + - ij1Q40yGS0iUqHFIS1155w.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 125ms + - 91ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:20:03 GMT + - Mon, 01 Mar 2021 23:47:49 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9012-7e50-dbb7-3a3a0d00fede"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:20:02 GMT + - Mon, 01 Mar 2021 23:47:49 GMT ms-cv: - - D1V4moi670yS3GAi9fxS0Q.0 + - JVEVWMCMtEu66IB4orn2Uw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 37ms + - 14ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:20:03 GMT + - Mon, 01 Mar 2021 23:47:49 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:20:01.798267+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:47:48.5934229+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:20:02 GMT + - Mon, 01 Mar 2021 23:47:49 GMT ms-cv: - - Kpvd90J+E0ahUbg1233i/A.0 + - Y2XIQDVzvEmf7VdZT7hpjw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 92ms + - 88ms status: code: 200 message: OK @@ -165,30 +177,33 @@ interactions: Accept: - application/json Content-Length: - - '205' + - '257' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - ffed4204-b2d0-4c79-a2b9-167ea6ec6675 + repeatability-Request-Id: + - 14bd6e7a-b6eb-4e10-a0cc-d2573a68aceb method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:HAql5yFMs-s5ggcoC6lvfy4lMfV3CLDj02pJz5siXgM1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:20:03Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc6-fe3e-1db7-3a3a0d002bbe"}}' + body: '{"chatThread": {"id": "19:w9yEd4WpzRccXmpybFLwaSzbCWvst71zHbHCOBEflzk1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:47:50Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9012-7d84-dbb7-3a3a0d00fedd", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9012-7d84-dbb7-3a3a0d00fedd"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:20:03 GMT - ms-cv: /DgfnofHcUSj7KMGEjtVVw.0 + date: Mon, 01 Mar 2021 23:47:50 GMT + ms-cv: m0YFH6okYU+pnVxLb1kGuQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 878ms + x-processing-time: 925ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"content": "hello world", "senderDisplayName": "sender name", "type": "text"}' @@ -202,21 +217,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:20:03 GMT - ms-cv: l7iB83AiV0m0NcpVNhUF9w.0 + date: Mon, 01 Mar 2021 23:47:52 GMT + ms-cv: j2ZwmEyAeUeFea/9tOit3g.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 401ms + x-processing-time: 1051ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 - request: body: null headers: @@ -225,21 +241,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?maxPageSize=1&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?maxPageSize=1&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized", "nextLink": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:20:04 GMT - ms-cv: mUgKEDWKiUqzo52QfMm3Ig.0 + date: Mon, 01 Mar 2021 23:47:52 GMT + ms-cv: LTWxkGgX90aufqBeB/7dpQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 266ms + x-processing-time: 305ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?maxPageSize=1&api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?maxPageSize=1&api-version=2021-01-27-preview4 - request: body: null headers: @@ -248,21 +265,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1/1/1970%2012:00:00%20AM%20%2B00:00&maxPageSize=1&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1/1/1970%2012:00:00%20AM%20%2B00:00&maxPageSize=1&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized", "nextLink": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:20:04 GMT - ms-cv: zGVUvEodWUW6VGCXzhsssQ.0 + date: Mon, 01 Mar 2021 23:47:53 GMT + ms-cv: +VsCZA5nOUSxhdnmWoQdbA.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 352ms + x-processing-time: 370ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1/1/1970%2012:00:00%20AM%20%2B00:00&maxPageSize=1&api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1/1/1970%2012:00:00%20AM%20%2B00:00&maxPageSize=1&api-version=2021-01-27-preview4 - request: body: null headers: @@ -271,21 +289,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1/1/1970%2012:00:00%20AM%20%2B00:00&maxPageSize=1&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1/1/1970%2012:00:00%20AM%20%2B00:00&maxPageSize=1&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized", "nextLink": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:20:05 GMT - ms-cv: SJPKrSIwAk2eQS3jEUH62w.0 + date: Mon, 01 Mar 2021 23:47:54 GMT + ms-cv: mkM0hnkEj0SIQAjaLew8Eg.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 362ms + x-processing-time: 829ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1/1/1970%2012:00:00%20AM%20%2B00:00&maxPageSize=1&api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1/1/1970%2012:00:00%20AM%20%2B00:00&maxPageSize=1&api-version=2021-01-27-preview4 - request: body: null headers: @@ -294,21 +313,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1/1/1970%2012:00:00%20AM%20%2B00:00&maxPageSize=1&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1/1/1970%2012:00:00%20AM%20%2B00:00&maxPageSize=1&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:20:05 GMT - ms-cv: zI4V2XnPNEWEc8ZMNL8EBw.0 + date: Mon, 01 Mar 2021 23:47:54 GMT + ms-cv: UXPMeVcFeUqzWB3k9pyr4Q.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 365ms + x-processing-time: 406ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1/1/1970%2012:00:00%20AM%20%2B00:00&maxPageSize=1&api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?syncState=sanitized&startTime=1/1/1970%2012:00:00%20AM%20%2B00:00&maxPageSize=1&api-version=2021-01-27-preview4 - request: body: null headers: @@ -317,25 +337,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:20:05 GMT - ms-cv: ZytCWmbx2kGM8kb86OFniQ.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:47:54 GMT + ms-cv: q9EWcPIMukS7JCT3QhlN/g.0 strict-transport-security: max-age=2592000 - x-processing-time: 325ms + x-processing-time: 336ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -343,13 +364,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:20:07 GMT + - Mon, 01 Mar 2021 23:47:54 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -357,13 +378,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:20:21 GMT + - Mon, 01 Mar 2021 23:48:10 GMT ms-cv: - - bBPNdiKgjEOOG4rufGohUQ.0 + - 2PkIgGANyEm2tFYBleZ5/g.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 15825ms + - 16148ms status: code: 204 message: No Content @@ -371,7 +394,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -379,13 +402,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:20:23 GMT + - Mon, 01 Mar 2021 23:48:10 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -393,13 +416,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:20:38 GMT + - Mon, 01 Mar 2021 23:48:26 GMT ms-cv: - - 9UV3osczJUioYNOWrKK/3w.0 + - Qz1EIJzFwE+S0kIi2ldARw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16641ms + - 16258ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_list_participants.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_list_participants.yaml index dec731d6e8e0..83a6c0f7f91a 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_list_participants.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_list_participants.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:20:40 GMT + - Mon, 01 Mar 2021 23:48:27 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9013-1420-9c58-373a0d00fa82"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:20:39 GMT + - Mon, 01 Mar 2021 23:48:27 GMT ms-cv: - - f4Px5pwNZk6orW3lopLZZQ.0 + - Sk8GCihPOEOsUhJcDc4zhQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 23ms + - 28ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:20:40 GMT + - Mon, 01 Mar 2021 23:48:27 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:20:38.5900315+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:48:26.994978+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:20:39 GMT + - Mon, 01 Mar 2021 23:48:27 GMT ms-cv: - - N2d84HZid06e2vITK6BKBA.0 + - wzcC27Zmb0e5mPu7SNLyZw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 87ms + - 118ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:20:40 GMT + - Mon, 01 Mar 2021 23:48:27 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9013-152a-9c58-373a0d00fa83"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:20:39 GMT + - Mon, 01 Mar 2021 23:48:27 GMT ms-cv: - - Her44Xo2o0Gmx7P7HW8t1w.0 + - vYdzb+4ELEKscpDnJccX+w.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 20ms + - 18ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:20:40 GMT + - Mon, 01 Mar 2021 23:48:27 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:20:38.7820752+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:48:27.2285036+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:20:39 GMT + - Mon, 01 Mar 2021 23:48:28 GMT ms-cv: - - I6P3k0H5n0e2XRkPODLJLQ.0 + - Oqxz5sOBbEaIaq75nG5L5g.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 86ms + - 90ms status: code: 200 message: OK @@ -165,57 +177,60 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 848b50dd-5e67-407f-8905-3e0e5b22f14b + repeatability-Request-Id: + - 6ce29f0d-8e55-47a1-8635-65587293013a method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:GHb4oV86Az3F4uT726U95jqsiEAXGu7_2Ks3dXUzfPg1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:20:40Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc7-8f1a-dbb7-3a3a0d002e49"}}' + body: '{"chatThread": {"id": "19:9gKAaRpIqH7mxjXuFZQgN-oi5e_BCpygpN6h2OLJavA1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:48:28Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9013-1420-9c58-373a0d00fa82", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9013-1420-9c58-373a0d00fa82"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:20:40 GMT - ms-cv: PXXBFYPP30+ZG4uFJS7zvA.0 + date: Mon, 01 Mar 2021 23:48:28 GMT + ms-cv: Tu3rFdlztUOuEPL/tPIkBQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 899ms + x-processing-time: 870ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"participants": "sanitized"}' headers: Accept: - application/json Content-Length: - - '183' + - '235' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2021-01-27-preview4 response: body: '{}' headers: - api-supported-versions: 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:20:41 GMT - ms-cv: Ngd8yj412UyG9R7fF3NR5g.0 + date: Mon, 01 Mar 2021 23:48:29 GMT + ms-cv: yYKfE9zJ/U2r4CkXQA5Ctg.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 901ms + x-processing-time: 862ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2021-01-27-preview4 - request: body: null headers: @@ -224,21 +239,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants?maxPageSize=1&skip=1&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants?maxPageSize=1&skip=1&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: - api-supported-versions: 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:20:41 GMT - ms-cv: 7KvbKhAA50anUYAFvRsQVA.0 + date: Mon, 01 Mar 2021 23:48:30 GMT + ms-cv: ak1/pWOl1kiiHZcqRJvcvA.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 317ms + x-processing-time: 271ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants?maxPageSize=1&skip=1&api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants?maxPageSize=1&skip=1&api-version=2021-01-27-preview4 - request: body: null headers: @@ -247,25 +262,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:20:42 GMT - ms-cv: dJqxi4yQFUKlLySz39PCwA.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:48:29 GMT + ms-cv: cz/d0llIt0iHDeOpkIbjhA.0 strict-transport-security: max-age=2592000 - x-processing-time: 335ms + x-processing-time: 318ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -273,13 +289,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:20:43 GMT + - Mon, 01 Mar 2021 23:48:30 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -287,13 +303,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:20:59 GMT + - Mon, 01 Mar 2021 23:48:46 GMT ms-cv: - - 921TROcHdkyOp7Xidgq8SQ.0 + - +SiPb5xiFUGPa+TUEaAZvA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16773ms + - 16349ms status: code: 204 message: No Content @@ -301,7 +319,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -309,13 +327,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:21:00 GMT + - Mon, 01 Mar 2021 23:48:47 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -323,13 +341,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:21:14 GMT + - Mon, 01 Mar 2021 23:49:02 GMT ms-cv: - - w4LueWX/ZE6W7/oW0oef7w.0 + - 1fvAII+/a0Ghnigg7wQ5tg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16020ms + - 15991ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_list_read_receipts.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_list_read_receipts.yaml index 72ea19e4dd18..ab75b1249de6 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_list_read_receipts.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_list_read_receipts.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:21:16 GMT + - Mon, 01 Mar 2021 23:49:03 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9013-a052-1db7-3a3a0d0005f3"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:21:15 GMT + - Mon, 01 Mar 2021 23:49:03 GMT ms-cv: - - Y73NycmljUGoS+Fw5kOCxA.0 + - ZZs42DpX606fzqytJFwQIg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 30ms + - 68ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:21:16 GMT + - Mon, 01 Mar 2021 23:49:03 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:21:14.9303274+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:49:02.8352134+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:21:15 GMT + - Mon, 01 Mar 2021 23:49:03 GMT ms-cv: - - 8Rerr61n40O65GFy48Yfpw.0 + - RlOnT+pRhEixP5tJxmRFfw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 85ms + - 94ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:21:16 GMT + - Mon, 01 Mar 2021 23:49:03 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9013-a128-1db7-3a3a0d0005f4"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:21:15 GMT + - Mon, 01 Mar 2021 23:49:03 GMT ms-cv: - - S1xoSIQBSka4DV2LM4DnpQ.0 + - i03oQo2kRUGwBk+DUO0z/Q.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 23ms + - 33ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:21:16 GMT + - Mon, 01 Mar 2021 23:49:03 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:21:15.1228654+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:49:02.0488806+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:21:15 GMT + - Mon, 01 Mar 2021 23:49:03 GMT ms-cv: - - iEOfTZ9KsEG2sI4FO1ga6g.0 + - ZI6JHC5hYU6T00E/SmbHKw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 87ms + - 93ms status: code: 200 message: OK @@ -165,30 +177,33 @@ interactions: Accept: - application/json Content-Length: - - '369' + - '475' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - c605e6a2-8215-4f6b-9d5a-fe07213ad68f + repeatability-Request-Id: + - 45c2f1f1-132e-4e78-b2ea-fd904da06a32 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:0nqHY0ienC2Fh3pX6izGvIIr1UoHjJnLIj6kP3pNlD41@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:21:16Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc8-1d16-dbb7-3a3a0d002e4d"}}' + body: '{"chatThread": {"id": "19:rp_7aHcGKxhAjRWriRRbmd2nN_X9R6spPrZsW1JUfos1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:49:04Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9013-a052-1db7-3a3a0d0005f3", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9013-a052-1db7-3a3a0d0005f3"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:21:16 GMT - ms-cv: ohL958/JBkCZsObnMAC+Gg.0 + date: Mon, 01 Mar 2021 23:49:04 GMT + ms-cv: gz5hZyc8p0uiJjEVSPo5ZA.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 924ms + x-processing-time: 890ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"content": "hello world", "senderDisplayName": "sender name", "type": "text"}' @@ -202,21 +217,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:21:16 GMT - ms-cv: w+gQAUFmUUWPWkZ6BFJyXg.0 + date: Mon, 01 Mar 2021 23:49:04 GMT + ms-cv: 5Ko9AJvGBUuhfINdaonT9Q.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 381ms + x-processing-time: 389ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 - request: body: '{"chatMessageId": "sanitized"}' headers: @@ -229,21 +245,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-length: '0' - date: Mon, 01 Feb 2021 23:21:17 GMT - ms-cv: cFA048twuE6yynApi/p7iQ.0 + date: Mon, 01 Mar 2021 23:49:05 GMT + ms-cv: sGS+0k5pjU+B2C8BaNpUtw.0 strict-transport-security: max-age=2592000 - x-processing-time: 485ms + x-processing-time: 493ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 - request: body: null headers: @@ -252,21 +269,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:21:18 GMT - ms-cv: VAVsQp2XWEi13VL5yHn3OQ.0 + date: Mon, 01 Mar 2021 23:49:05 GMT + ms-cv: HCQAXxQnpESjgDyuOQhS0g.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 721ms + x-processing-time: 278ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 - request: body: '{"content": "hello world", "senderDisplayName": "sender name", "type": "text"}' @@ -280,21 +298,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:21:18 GMT - ms-cv: KvHKUxhRAEesoAW7DQPTvA.0 + date: Mon, 01 Mar 2021 23:49:06 GMT + ms-cv: mSLq6YDFyEOnHsAOXmLUyw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 389ms + x-processing-time: 393ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 - request: body: '{"chatMessageId": "sanitized"}' headers: @@ -307,21 +326,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-length: '0' - date: Mon, 01 Feb 2021 23:21:19 GMT - ms-cv: Kb6zsCFNk0SgwzOiNN7DxQ.0 + date: Mon, 01 Mar 2021 23:49:06 GMT + ms-cv: lnGDyOhA/UygzyIwT1wd0w.0 strict-transport-security: max-age=2592000 - x-processing-time: 493ms + x-processing-time: 495ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 - request: body: null headers: @@ -330,21 +350,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:21:20 GMT - ms-cv: pTOwHhOssEq/bgvMPw4DBA.0 + date: Mon, 01 Mar 2021 23:49:07 GMT + ms-cv: Y11022tp3UG30cnzEVrRdg.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 735ms + x-processing-time: 252ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 - request: body: '{"content": "content", "senderDisplayName": "sender_display_name", "type": "text"}' @@ -358,21 +379,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:21:21 GMT - ms-cv: TCjoJnr0F0ylKEzBDmJ7aw.0 + date: Mon, 01 Mar 2021 23:49:08 GMT + ms-cv: hYupyjsj/EWDOoNFvW2LHw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 403ms + x-processing-time: 401ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 - request: body: '{"chatMessageId": "sanitized"}' headers: @@ -385,21 +407,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-length: '0' - date: Mon, 01 Feb 2021 23:21:22 GMT - ms-cv: UqrPfAD6mk2xLTla3gk72g.0 + date: Mon, 01 Mar 2021 23:49:08 GMT + ms-cv: A8Pb0GcFBkm1/p4TJQeRMw.0 strict-transport-security: max-age=2592000 - x-processing-time: 1002ms + x-processing-time: 462ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 - request: body: null headers: @@ -408,21 +431,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:21:22 GMT - ms-cv: w2knKYvDIkOg1tpARtJPPw.0 + date: Mon, 01 Mar 2021 23:49:08 GMT + ms-cv: p/mC0h/aU0eERqpJgyG+OQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 250ms + x-processing-time: 254ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 - request: body: null headers: @@ -431,21 +455,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?maxPageSize=2&skip=0&api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?maxPageSize=2&skip=0&api-version=2021-01-27-preview4 response: body: '{"value": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:21:22 GMT - ms-cv: bJGKQXjTz0G0vwtPXKB4Hg.0 + date: Mon, 01 Mar 2021 23:49:09 GMT + ms-cv: ZnON+koGkUinwYbO1z1voQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 283ms + x-processing-time: 250ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?maxPageSize=2&skip=0&api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?maxPageSize=2&skip=0&api-version=2021-01-27-preview4 - request: body: null headers: @@ -454,25 +479,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:21:22 GMT - ms-cv: ACuZGQSCyEerBjQBmkDQag.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:49:09 GMT + ms-cv: RMkRra/KMUuKXvHFRAFWpw.0 strict-transport-security: max-age=2592000 - x-processing-time: 348ms + x-processing-time: 322ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -480,13 +506,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:21:24 GMT + - Mon, 01 Mar 2021 23:49:10 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -494,13 +520,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:21:40 GMT + - Mon, 01 Mar 2021 23:49:26 GMT ms-cv: - - VBZIaGGgCkaB7VHTdOjuow.0 + - HpZg2nvrR0ibU4j9TyX5yw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 17051ms + - 16333ms status: code: 204 message: No Content @@ -508,7 +536,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -516,13 +544,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:21:41 GMT + - Mon, 01 Mar 2021 23:49:26 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -530,13 +558,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:21:57 GMT + - Mon, 01 Mar 2021 23:49:42 GMT ms-cv: - - ey5vQHS020CIGdf+9PNl8A.0 + - 7Pc4FdAjX0mbXkl5frpwcA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16877ms + - 16058ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_remove_participant.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_remove_participant.yaml index 951f045d7e04..6302f92eb627 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_remove_participant.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_remove_participant.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:21:58 GMT + - Mon, 01 Mar 2021 23:49:42 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9014-3a65-b0b7-3a3a0d00fe1b"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:21:58 GMT + - Mon, 01 Mar 2021 23:49:42 GMT ms-cv: - - IR8qAgkkJkKbpyNsfz9ZFQ.0 + - NELhiRGK10qeYQJoWyKinQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 43ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:21:59 GMT + - Mon, 01 Mar 2021 23:49:42 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:21:57.4850953+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:49:42.2798242+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:21:58 GMT + - Mon, 01 Mar 2021 23:49:42 GMT ms-cv: - - 6B5ozE6YiEuTvLaQmQuqcg.0 + - zg0jXt8JGUSx/1mWVei7Aw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 253ms + - 96ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:21:59 GMT + - Mon, 01 Mar 2021 23:49:43 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9014-3b29-b0b7-3a3a0d00fe1c"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:21:58 GMT + - Mon, 01 Mar 2021 23:49:43 GMT ms-cv: - - 4oXicPYGIEqwMQL31CyFmA.0 + - pncZOuLhWUaWgd3spui8Lg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 34ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:21:59 GMT + - Mon, 01 Mar 2021 23:49:43 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:21:57.9083946+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:49:42.4831942+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:21:58 GMT + - Mon, 01 Mar 2021 23:49:43 GMT ms-cv: - - zn2JZowMz0mTvt9WTVRIQw.0 + - UHZF14o2eU6eX9KVquJiBw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 171ms + - 95ms status: code: 200 message: OK @@ -165,79 +177,86 @@ interactions: Accept: - application/json Content-Length: - - '204' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 4e005603-2996-4d73-9185-054a2f9de6ec + repeatability-Request-Id: + - 38a56f20-a227-4f16-bd45-af8cd845f384 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:QUVZHhXp9SwSg5OPq6PY8cBLtExh1Iy7xtkPahjchvk1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:21:59Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc8-c2a0-dbb7-3a3a0d002e52"}}' + body: '{"chatThread": {"id": "19:Zdt7w9S1Dlrn_yHy2vpaWv5DzppECsDWzRF9QRJwzX81@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:49:43Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9014-3a65-b0b7-3a3a0d00fe1b", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9014-3a65-b0b7-3a3a0d00fe1b"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:21:59 GMT - ms-cv: 1rikER0eHk+1ImKysJ5OAA.0 + date: Mon, 01 Mar 2021 23:49:44 GMT + ms-cv: DqCdBem3L0ebVuHrMjGQwg.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 913ms + x-processing-time: 887ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"participants": "sanitized"}' headers: Accept: - application/json Content-Length: - - '182' + - '235' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2021-01-27-preview4 response: body: '{}' headers: - api-supported-versions: 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:21:59 GMT - ms-cv: /EUWgZhWNUCZxw9/fFlqcQ.0 + date: Mon, 01 Mar 2021 23:49:44 GMT + ms-cv: tEc+j5z7BEGF9INTIW8TaQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 458ms + x-processing-time: 888ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:add?api-version=2021-01-27-preview4 - request: - body: null + body: '{"communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9014-3b29-b0b7-3a3a0d00fe1c"}}' headers: Accept: - application/json + Content-Length: + - '112' + Content-Type: + - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc8-c494-b0b7-3a3a0d002fec?api-version=2020-11-01-preview3 + method: POST + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:remove?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:22:00 GMT - ms-cv: DK6rkh0u+ESV4EeUpATcXg.0 + api-supported-versions: 2020-11-01-preview3, 2021-01-27-preview4, 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:49:45 GMT + ms-cv: tfZShi2DY0Wv81RqpdSi+Q.0 strict-transport-security: max-age=2592000 - x-processing-time: 514ms + x-processing-time: 539ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc8-c494-b0b7-3a3a0d002fec?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/participants/:remove?api-version=2021-01-27-preview4 - request: body: null headers: @@ -246,25 +265,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:22:01 GMT - ms-cv: LYAa3yRCpkSle1X1IUcmhA.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:49:46 GMT + ms-cv: TSZsKpQ+BUi38+Pox9pV5w.0 strict-transport-security: max-age=2592000 - x-processing-time: 338ms + x-processing-time: 332ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -272,13 +292,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:22:02 GMT + - Mon, 01 Mar 2021 23:49:46 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -286,13 +306,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:22:18 GMT + - Mon, 01 Mar 2021 23:50:02 GMT ms-cv: - - MFVGBbxcOUGCZXhAtKIbGA.0 + - jDPN04guD0GCED0YqrOY/A.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16909ms + - 16986ms status: code: 204 message: No Content @@ -300,7 +322,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -308,13 +330,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:22:19 GMT + - Mon, 01 Mar 2021 23:50:03 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -322,13 +344,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:22:34 GMT + - Mon, 01 Mar 2021 23:50:19 GMT ms-cv: - - 3JviFuM7yUSGV0KU+tzvAw.0 + - JJQcAJVTLUeKpdRY4V/nNQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16381ms + - 16148ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_send_message.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_send_message.yaml index 8536bdd64ea2..a2d2549b766b 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_send_message.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_send_message.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:22:35 GMT + - Mon, 01 Mar 2021 23:50:19 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9014-cb1c-1db7-3a3a0d0005fc"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:22:34 GMT + - Mon, 01 Mar 2021 23:50:19 GMT ms-cv: - - vJ5pkAVuH0+w/zW8LYsK6w.0 + - 7oGBAXRiC0GPOWGR6h4yVg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 19ms + - 21ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:22:36 GMT + - Mon, 01 Mar 2021 23:50:20 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:22:34.6115112+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:50:19.3299596+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:22:35 GMT + - Mon, 01 Mar 2021 23:50:19 GMT ms-cv: - - LRDW4x+ecUCNLMnP9KrgQA.0 + - GbUvgr2LmUO0z5I+2po2cg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 91ms + - 98ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:22:36 GMT + - Mon, 01 Mar 2021 23:50:20 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9014-cbdf-1db7-3a3a0d0005fd"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:22:35 GMT + - Mon, 01 Mar 2021 23:50:19 GMT ms-cv: - - pFA2WIfndUSfRe7QQEp71w.0 + - k1Y8FFj7+EWR/AnABsC9zg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 22ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:22:36 GMT + - Mon, 01 Mar 2021 23:50:20 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:22:34.812464+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:50:19.5176972+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:22:35 GMT + - Mon, 01 Mar 2021 23:50:19 GMT ms-cv: - - +CjMpFq/d0mW021QBABxVw.0 + - tz5RqQNCpkyS/I8jgC0wbQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 93ms + - 92ms status: code: 200 message: OK @@ -165,30 +177,33 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - bc786b1c-d597-48ec-b853-a0c14973341e + repeatability-Request-Id: + - 8e83b285-400b-4332-9d93-f5dd777ae4d2 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:VVUbRAlWVhs2m5fmK1yxiA8-cIipUadN6HVJCSQ0X7w1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:22:36Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc9-544c-9c58-373a0d002def"}}' + body: '{"chatThread": {"id": "19:JcCT-ldDxH_7I04HomqxPtxVAjHoS-sRoqdWgo4zX0Q1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:50:20Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9014-cb1c-1db7-3a3a0d0005fc", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9014-cb1c-1db7-3a3a0d0005fc"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:22:36 GMT - ms-cv: 2QadoNBVw0+1kmPGyToDlA.0 + date: Mon, 01 Mar 2021 23:50:21 GMT + ms-cv: JxKvjXTWs0WwFPgc2C/X5g.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 1433ms + x-processing-time: 915ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"content": "hello world", "senderDisplayName": "sender name", "type": "text"}' @@ -202,21 +217,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:22:37 GMT - ms-cv: uQU0u5jR6EaupuKhQI9AnA.0 + date: Mon, 01 Mar 2021 23:50:21 GMT + ms-cv: tGYBKid4ik+Z6zjowcDnIw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 385ms + x-processing-time: 388ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 - request: body: null headers: @@ -225,25 +241,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:22:37 GMT - ms-cv: 3oVt89CM6EKRxcnf/8Osdw.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:50:22 GMT + ms-cv: n8p5gwq8ukK2lHAiyksX5w.0 strict-transport-security: max-age=2592000 - x-processing-time: 353ms + x-processing-time: 338ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -251,13 +268,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:22:39 GMT + - Mon, 01 Mar 2021 23:50:22 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -265,13 +282,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:22:54 GMT + - Mon, 01 Mar 2021 23:50:38 GMT ms-cv: - - Bfl9O3aTg0mhInatUkltCg.0 + - 2f7eceQwnkK4rl8oZsnnGQ.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16542ms + - 16775ms status: code: 204 message: No Content @@ -279,7 +298,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -287,13 +306,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:22:55 GMT + - Mon, 01 Mar 2021 23:50:39 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -301,13 +320,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:23:11 GMT + - Mon, 01 Mar 2021 23:50:55 GMT ms-cv: - - ieTBbeMSNE2DUYblodJyzA.0 + - eJdVkb3NuE29w7MuX3iv/g.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16338ms + - 16159ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_send_read_receipt.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_send_read_receipt.yaml index 314d10e97bb7..755f854c27c2 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_send_read_receipt.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_send_read_receipt.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:23:12 GMT + - Mon, 01 Mar 2021 23:50:55 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9015-562e-9c58-373a0d00fa89"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:23:10 GMT + - Mon, 01 Mar 2021 23:50:55 GMT ms-cv: - - 1PQm5xA2xEaSXsV8I18+iw.0 + - R/YTjstVjE+yIqhXFdnjlw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 23ms + - 14ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:23:12 GMT + - Mon, 01 Mar 2021 23:50:55 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:23:10.7955443+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:50:54.9263986+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:23:10 GMT + - Mon, 01 Mar 2021 23:50:55 GMT ms-cv: - - QXZoCTJ+2k+xn7a2sjEcJg.0 + - goVuj1jb30u9fLLpKe/4Rw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 124ms + - 90ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:23:12 GMT + - Mon, 01 Mar 2021 23:50:55 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9015-56f2-9c58-373a0d00fa8a"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:23:10 GMT + - Mon, 01 Mar 2021 23:50:55 GMT ms-cv: - - QisxI+Bpgk6Jn/2IGZPgRQ.0 + - ZgTZ7Gz+LkK6TTj0F5RcFA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 23ms + - 16ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:23:12 GMT + - Mon, 01 Mar 2021 23:50:55 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:23:10.9940038+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:50:55.1442058+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:23:11 GMT + - Mon, 01 Mar 2021 23:50:55 GMT ms-cv: - - 9W15esyoC02p75dxwK8onQ.0 + - zw36/4KUW0u7NQ56Q8FeWA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 90ms + - 92ms status: code: 200 message: OK @@ -165,30 +177,33 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 1c1f2397-e606-4f51-88c4-d4f1d8245f84 + repeatability-Request-Id: + - d6955177-c78b-459b-b7e8-81d6b5330116 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:BgfIWLP2boNcEYEZzzLs69MML9TI7T55P8BisDSQR-Q1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:23:12Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffc9-e181-9c58-373a0d002df1"}}' + body: '{"chatThread": {"id": "19:txDI0D40meJYj4Y9ibm1M6qw-x-Aey_V6YQG-upIW5o1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:50:56Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9015-562e-9c58-373a0d00fa89", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9015-562e-9c58-373a0d00fa89"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:23:12 GMT - ms-cv: STB7amyigkKPCp3dLVeX2w.0 + date: Mon, 01 Mar 2021 23:50:56 GMT + ms-cv: zQ7N7d1tPkeMNPmA8HmRwA.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 913ms + x-processing-time: 886ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"content": "hello world", "senderDisplayName": "sender name", "type": "text"}' @@ -202,21 +217,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:23:13 GMT - ms-cv: ReCQ1NoYvkebEh2MVnaTuQ.0 + date: Mon, 01 Mar 2021 23:50:57 GMT + ms-cv: 9bSaHtGmb0+4tANly4hwTw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 740ms + x-processing-time: 379ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 - request: body: '{"chatMessageId": "sanitized"}' headers: @@ -229,21 +245,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-length: '0' - date: Mon, 01 Feb 2021 23:23:14 GMT - ms-cv: bckuD4xjEkSVT16+MYV33w.0 + date: Mon, 01 Mar 2021 23:50:57 GMT + ms-cv: rZAPg7w090+cxNIC77q+2A.0 strict-transport-security: max-age=2592000 - x-processing-time: 983ms + x-processing-time: 485ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/readReceipts?api-version=2021-01-27-preview4 - request: body: null headers: @@ -252,25 +269,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:23:14 GMT - ms-cv: opHMk4nMwEWG8PnnjtulCA.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:50:57 GMT + ms-cv: l+Tbt+erGk2EN1pZX8GDyA.0 strict-transport-security: max-age=2592000 x-processing-time: 321ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -278,13 +296,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:23:16 GMT + - Mon, 01 Mar 2021 23:50:58 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -292,13 +310,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:23:31 GMT + - Mon, 01 Mar 2021 23:51:14 GMT ms-cv: - - kIDhxGSX1U+VB09tCJ0++w.0 + - EyPQnRiNv0K9Jg7vzYs0ag.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16190ms + - 16560ms status: code: 204 message: No Content @@ -306,7 +326,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -314,13 +334,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:23:32 GMT + - Mon, 01 Mar 2021 23:51:15 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -328,13 +348,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:23:47 GMT + - Mon, 01 Mar 2021 23:51:31 GMT ms-cv: - - fOvspotyjEO9ckTKVxfhSA.0 + - /kqTZRkM3E2wZ4RD7+b7Hg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 15997ms + - 16585ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_send_typing_notification.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_send_typing_notification.yaml index fc3420758429..d28766af7de9 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_send_typing_notification.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_send_typing_notification.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:23:48 GMT + - Mon, 01 Mar 2021 23:51:31 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9015-e497-9c58-373a0d00fa91"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:23:47 GMT + - Mon, 01 Mar 2021 23:51:31 GMT ms-cv: - - z9cXxjKO3kq2FNRq9Ut2nw.0 + - vBy6NHLlXUmh1r69ndd9Dg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 25ms + - 13ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:23:48 GMT + - Mon, 01 Mar 2021 23:51:32 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:23:46.9704687+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:51:31.3858105+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:23:47 GMT + - Mon, 01 Mar 2021 23:51:32 GMT ms-cv: - - ZDEm3qYXdECk2ZT/OOe1Uw.0 + - kCdlhHMh5k2oLraulL2www.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 112ms + - 91ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:23:48 GMT + - Mon, 01 Mar 2021 23:51:32 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9015-e556-9c58-373a0d00fa92"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:23:47 GMT + - Mon, 01 Mar 2021 23:51:32 GMT ms-cv: - - cOJDgcuScESmBfAU8nR/KQ.0 + - v6Pi5IjbQkysln2Q5qVplA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 20ms + - 12ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:23:48 GMT + - Mon, 01 Mar 2021 23:51:32 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:23:47.250249+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:51:31.5730644+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:23:48 GMT + - Mon, 01 Mar 2021 23:51:32 GMT ms-cv: - - p8xayfoxmUKKyCjvuAx7Ng.0 + - QyzJZHRecU+sMbmhVBWApg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 153ms + - 88ms status: code: 200 message: OK @@ -165,30 +177,33 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 7aabb880-06f2-45e1-b093-018d3df07ce0 + repeatability-Request-Id: + - b10b2977-9312-4b1c-983c-de26c915640d method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:tEPkqgR1t_KWJSQMF31NKlB9SlRBgLnh3MsMO-pxdcw1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:23:48Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffca-6edb-dbb7-3a3a0d002e56"}}' + body: '{"chatThread": {"id": "19:4SEkETC1N01snLf3gO9_zdh5B_UjorsAt1cub2K1aPY1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:51:32Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9015-e497-9c58-373a0d00fa91", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9015-e497-9c58-373a0d00fa91"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:23:48 GMT - ms-cv: 7j8MQyBdkkuL/uA8vZ2J7A.0 + date: Mon, 01 Mar 2021 23:51:33 GMT + ms-cv: MAKBY/5O4EGX0Awiz4yFdQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 882ms + x-processing-time: 887ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: null headers: @@ -197,21 +212,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/typing?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/typing?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-length: '0' - date: Mon, 01 Feb 2021 23:23:49 GMT - ms-cv: Krzp39HLdE20CGu8gO5XZw.0 + date: Mon, 01 Mar 2021 23:51:34 GMT + ms-cv: YMVT5jGPO0uQv+YJz4nohg.0 strict-transport-security: max-age=2592000 - x-processing-time: 383ms + x-processing-time: 785ms status: code: 200 message: OK - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/typing?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/typing?api-version=2021-01-27-preview4 - request: body: null headers: @@ -220,25 +236,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:23:49 GMT - ms-cv: xeRX+l4sQ0CKg5zWWLrF0g.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:51:34 GMT + ms-cv: oRoeQclaIEqb/asiVL3iHA.0 strict-transport-security: max-age=2592000 - x-processing-time: 327ms + x-processing-time: 334ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -246,13 +263,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:23:51 GMT + - Mon, 01 Mar 2021 23:51:34 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -260,13 +277,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:24:06 GMT + - Mon, 01 Mar 2021 23:51:50 GMT ms-cv: - - GF9toK+rIUOudaKkjzDpVw.0 + - Z4ZSnJUN602qxFMGE4xXsg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16644ms + - 16582ms status: code: 204 message: No Content @@ -274,7 +293,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -282,13 +301,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:24:07 GMT + - Mon, 01 Mar 2021 23:51:51 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -296,13 +315,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:24:22 GMT + - Mon, 01 Mar 2021 23:52:06 GMT ms-cv: - - 6C5qXWa4E0WTbHl2lwG5RQ.0 + - bCK2v2qG20mFNvnQGwAx6w.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16673ms + - 16182ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_update_message.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_update_message.yaml index 8f7ab1f345ea..00999eb1bc4d 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_update_message.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_update_message.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,26 +9,30 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:24:24 GMT + - Mon, 01 Mar 2021 23:52:07 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9016-70c2-1655-373a0d00008d"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:24:23 GMT + - Mon, 01 Mar 2021 23:52:07 GMT ms-cv: - - NQueO+R7EkOZVyAtuON4yQ.0 + - UgXw83MPE06nbdICN75hxw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: @@ -36,8 +40,8 @@ interactions: x-processing-time: - 20ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:24:24 GMT + - Mon, 01 Mar 2021 23:52:07 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:24:22.0437936+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:52:07.2873642+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:24:23 GMT + - Mon, 01 Mar 2021 23:52:08 GMT ms-cv: - - vkN9GtijPUq1zJMp5XnuAw.0 + - T3EEi3+N70WEfzl1V1az8A.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 90ms + - 87ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:24:24 GMT + - Mon, 01 Mar 2021 23:52:08 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9016-7198-1655-373a0d00008e"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:24:23 GMT + - Mon, 01 Mar 2021 23:52:08 GMT ms-cv: - - a/aMXilVbEy+ubNKyuKsQA.0 + - FTDEw6dbo0aBRnU2gVbQGg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 20ms + - 12ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,30 +142,32 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:24:25 GMT + - Mon, 01 Mar 2021 23:52:08 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:24:23.2449312+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:52:07.479129+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:24:23 GMT + - Mon, 01 Mar 2021 23:52:08 GMT ms-cv: - - MnmfPeTv+Ums0E1JwYDWYg.0 + - ZpKgLhthIEaBnqEmJ9S59g.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 90ms + - 91ms status: code: 200 message: OK @@ -165,30 +177,33 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 3a6dd79b-034a-4896-8ee7-323f65ddbecd + repeatability-Request-Id: + - 50af969b-7c6a-4f81-a37a-0a5ad60f9223 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:2MTI6PTB0PTcFtLheTgRhizt-Nj8t_tXmaC40HyGsUs1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:24:25Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffca-fbd8-9c58-373a0d002df3"}}' + body: '{"chatThread": {"id": "19:0kJom_4X_Lgb-H3EKF9YxEqelZ9dY574UOjvnLHuN501@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:52:09Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9016-70c2-1655-373a0d00008d", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9016-70c2-1655-373a0d00008d"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:24:25 GMT - ms-cv: AeoCrhUwQEm7knUWoXsJmw.0 + date: Mon, 01 Mar 2021 23:52:09 GMT + ms-cv: tkBA4C4OSkKPXIsOoKF6BQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 1348ms + x-processing-time: 1086ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"content": "hello world", "senderDisplayName": "sender name", "type": "text"}' @@ -202,21 +217,22 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 response: body: '{"id": "sanitized"}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:24:25 GMT - ms-cv: RaphM8ii4E62Td9Vy3tRzg.0 + date: Mon, 01 Mar 2021 23:52:09 GMT + ms-cv: aMbQpbzl8UyA5ET2zFHEZw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 378ms + x-processing-time: 373ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages?api-version=2021-01-27-preview4 - request: body: '{"content": "updated message content"}' headers: @@ -229,20 +245,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: PATCH - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:24:26 GMT - ms-cv: 3UNeoTGzQU2LgfF85fTEJw.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:52:10 GMT + ms-cv: SRzqfq26gkOpFtAtH7y4Bw.0 strict-transport-security: max-age=2592000 - x-processing-time: 689ms + x-processing-time: 673ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized/messages/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: @@ -251,25 +268,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:24:26 GMT - ms-cv: j0yeH8iha0aYMv7WFDihbQ.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:52:11 GMT + ms-cv: hoPDAyfV4EO9ctW5m+abiQ.0 strict-transport-security: max-age=2592000 - x-processing-time: 292ms + x-processing-time: 324ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -277,13 +295,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:24:28 GMT + - Mon, 01 Mar 2021 23:52:11 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -291,13 +309,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:24:42 GMT + - Mon, 01 Mar 2021 23:52:27 GMT ms-cv: - - BHz24HBbQUqWOnI43uiBmA.0 + - sbSjvSFVzUONY+ovW+lQxw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16392ms + - 16219ms status: code: 204 message: No Content @@ -305,7 +325,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -313,13 +333,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:24:44 GMT + - Mon, 01 Mar 2021 23:52:27 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -327,13 +347,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:25:00 GMT + - Mon, 01 Mar 2021 23:52:43 GMT ms-cv: - - T7RlBrl7pk2oGnwnOm3tgw.0 + - EIPLS/3CHUWF1SdG5VhM5g.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16807ms + - 16855ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_update_topic.yaml b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_update_topic.yaml index 08d69a5868bb..58597fb2d86e 100644 --- a/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_update_topic.yaml +++ b/sdk/communication/azure-communication-chat/tests/recordings/test_chat_thread_client_e2e_async.test_update_topic.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: null + body: '{}' headers: Accept: - application/json @@ -9,35 +9,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:25:01 GMT + - Mon, 01 Mar 2021 23:52:44 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9017-003d-b0b7-3a3a0d00fe26"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:25:00 GMT + - Mon, 01 Mar 2021 23:52:44 GMT ms-cv: - - 2dcZKwGztEOEKkZAsul9eQ.0 + - vPjhuJLGWESWkqufzVtC4g.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 17ms + - 15ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -52,35 +56,37 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:25:01 GMT + - Mon, 01 Mar 2021 23:52:44 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:24:59.2464733+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:52:43.9998701+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:25:00 GMT + - Mon, 01 Mar 2021 23:52:44 GMT ms-cv: - - fjhnvlxBckyB76BFwWBzDA.0 + - bUpr+IDIUEG9GWYzKs1Akw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 313ms + - 96ms status: code: 200 message: OK - request: - body: null + body: '{}' headers: Accept: - application/json @@ -89,35 +95,39 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '2' + Content-Type: + - application/json Date: - - Mon, 01 Feb 2021 23:25:02 GMT + - Mon, 01 Mar 2021 23:52:44 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities?api-version=2021-03-07 response: - body: '{"id": "sanitized"}' + body: '{"identity": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9017-0117-b0b7-3a3a0d00fe27"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:25:00 GMT + - Mon, 01 Mar 2021 23:52:44 GMT ms-cv: - - 9xbaB/WHXkKzoHd2WO9bWA.0 + - ytftr5ElQUKfw1t/bWyZvw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 18ms + - 31ms status: - code: 200 - message: OK + code: 201 + message: Created - request: body: '{"scopes": ["chat"]}' headers: @@ -132,24 +142,26 @@ interactions: Content-Type: - application/json Date: - - Mon, 01 Feb 2021 23:25:02 GMT + - Mon, 01 Mar 2021 23:52:44 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.int.communication.azure.net/identities/sanitized/token?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: - body: '{"id": "sanitized", "token": "sanitized", "expiresOn": "2021-02-02T23:25:00.4460578+00:00"}' + body: '{"token": "sanitized", "expiresOn": "2021-03-02T23:52:44.238236+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Mon, 01 Feb 2021 23:25:01 GMT + - Mon, 01 Mar 2021 23:52:45 GMT ms-cv: - - S9tEyVnz6UCRoXkZtHAmJQ.0 + - NI6uHNWQDUqU7jbG3s3Zzw.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 transfer-encoding: @@ -165,30 +177,33 @@ interactions: Accept: - application/json Content-Length: - - '206' + - '258' Content-Type: - application/json User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) - repeatability-Request-ID: - - 5344baaa-3075-4ee4-8584-1f1266d2f48f + repeatability-Request-Id: + - 4d924b9d-ea29-4804-b780-3d3fb573e9b8 method: POST - uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 response: - body: '{"chatThread": {"id": "19:c1g_oYg7_vPsF712L8A4rTSaGthY3oPMWbFopDEKJ-Q1@thread.v2", - "topic": "test topic", "createdOn": "2021-02-01T23:25:02Z", "createdBy": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-ffcb-8c56-1db7-3a3a0d002bc4"}}' + body: '{"chatThread": {"id": "19:fctDn9IhlhkUyeEIWRgKSbP0LBD3mZ4Mr6b1Lp31N2o1@thread.v2", + "topic": "test topic", "createdOn": "2021-03-01T23:52:45Z", "createdByCommunicationIdentifier": + {"rawId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9017-003d-b0b7-3a3a0d00fe26", + "communicationUser": {"id": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000008-9017-003d-b0b7-3a3a0d00fe26"}}}}' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 content-type: application/json; charset=utf-8 - date: Mon, 01 Feb 2021 23:25:02 GMT - ms-cv: 8nmV+pdLDUajx3HByK3wAw.0 + date: Mon, 01 Mar 2021 23:52:45 GMT + ms-cv: AiRR0T77mUmnfb/1zIWdaw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 1336ms + x-processing-time: 875ms status: code: 201 message: Created - url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads?api-version=2021-01-27-preview4 - request: body: '{"topic": "update topic"}' headers: @@ -201,20 +216,21 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: PATCH - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:25:03 GMT - ms-cv: fCHD61AmB0iauk0cKu51jA.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:52:46 GMT + ms-cv: 4F6kOYhgk0+T5R5k+0bpGg.0 strict-transport-security: max-age=2592000 - x-processing-time: 519ms + x-processing-time: 432ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: @@ -223,25 +239,26 @@ interactions: User-Agent: - azsdk-python-communication-chat/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + uri: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 response: body: string: '' headers: - api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4 - date: Mon, 01 Feb 2021 23:25:03 GMT - ms-cv: 622slNwA/0GD/HwYJmKGyg.0 + api-supported-versions: 2020-09-21-preview2, 2020-11-01-preview3, 2021-01-27-preview4, + 2021-03-01-preview5 + date: Mon, 01 Mar 2021 23:52:46 GMT + ms-cv: Kzz/LzDpyE2vy7vycpexTQ.0 strict-transport-security: max-age=2592000 - x-processing-time: 343ms + x-processing-time: 289ms status: code: 204 message: No Content - url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2020-11-01-preview3 + url: https://sanitized.int.communication.azure.net/chat/threads/sanitized?api-version=2021-01-27-preview4 - request: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -249,13 +266,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:25:04 GMT + - Mon, 01 Mar 2021 23:52:47 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -263,13 +280,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:25:20 GMT + - Mon, 01 Mar 2021 23:53:03 GMT ms-cv: - - 425u9POIzUiVuM3AMJf4sw.0 + - Qhy8fsiWfEGx6A/eH+tDqA.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16594ms + - 16698ms status: code: 204 message: No Content @@ -277,7 +296,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: @@ -285,13 +304,13 @@ interactions: Content-Length: - '0' Date: - - Mon, 01 Feb 2021 23:25:21 GMT + - Mon, 01 Mar 2021 23:53:03 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.7.9 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2020-07-20-preview2 + uri: https://sanitized.int.communication.azure.net/identities/sanitized?api-version=2021-03-07 response: body: string: '' @@ -299,13 +318,15 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Mon, 01 Feb 2021 23:25:37 GMT + - Mon, 01 Mar 2021 23:53:19 GMT ms-cv: - - ooMUGjkXbkqGD3G4ZsL8tg.0 + - Y9vON9Bu50u7OgnvSq6yBg.0 + request-context: + - appId= strict-transport-security: - max-age=2592000 x-processing-time: - - 16964ms + - 16418ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_client.py b/sdk/communication/azure-communication-chat/tests/test_chat_client.py index 4c6d5e2affd3..3c9bcd0f2d34 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_client.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_client.py @@ -11,10 +11,12 @@ from msrest.serialization import TZ_UTC from azure.communication.chat import ( ChatClient, - ChatThreadParticipant, - CommunicationUserIdentifier, - CommunicationTokenCredential + ChatThreadParticipant ) +from azure.communication.chat._shared.models import( + CommunicationUserIdentifier +) + from unittest_helpers import mock_response from datetime import datetime @@ -26,7 +28,7 @@ class TestChatClient(unittest.TestCase): @classmethod - @patch('azure.communication.chat.CommunicationTokenCredential') + @patch('azure.communication.identity._shared.user_credential.CommunicationTokenCredential') def setUpClass(cls, credential): credential.get_token = Mock(return_value=AccessToken("some_token", datetime.now().replace(tzinfo=TZ_UTC))) TestChatClient.credential = credential @@ -56,13 +58,13 @@ def mock_send(*_, **__): share_history_time=datetime.utcnow() )] try: - chat_thread_client = chat_client.create_chat_thread(topic, participants) + create_chat_thread_result = chat_client.create_chat_thread(topic, thread_participants=participants) except: raised = True raise self.assertFalse(raised, 'Expected is no excpetion raised') - assert chat_thread_client.thread_id == thread_id + assert create_chat_thread_result.chat_thread.id == thread_id def test_create_chat_thread_w_repeatability_request_id(self): thread_id = "19:bcaebfba0d314c2aa3e920d38fa3df08@thread.v2" @@ -90,7 +92,7 @@ def mock_send(*_, **__): share_history_time=datetime.utcnow() )] try: - chat_thread_client = chat_client.create_chat_thread(topic=topic, + create_chat_thread_result = chat_client.create_chat_thread(topic=topic, thread_participants=participants, repeatability_request_id=repeatability_request_id) except: @@ -98,7 +100,7 @@ def mock_send(*_, **__): raise self.assertFalse(raised, 'Expected is no excpetion raised') - assert chat_thread_client.thread_id == thread_id + assert create_chat_thread_result.chat_thread.id == thread_id def test_create_chat_thread_raises_error(self): def mock_send(*_, **__): @@ -137,8 +139,10 @@ def test_get_chat_thread(self): def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "id": thread_id, - "created_by": "8:acs:resource_user", - "participants": [{"id": "", "display_name": "name", "share_history_time": "1970-01-01T00:00:00Z"}] + "topic": "Lunch Chat thread", + "createdOn": "2020-10-30T10:50:50Z", + "deletedOn": "2020-10-30T10:50:50Z", + "createdByCommunicationIdentifier": {"rawId": "string", "communicationUser": {"id": "string"}} }) chat_client = ChatClient("https://endpoint", TestChatClient.credential, transport=Mock(send=mock_send)) diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_client_async.py b/sdk/communication/azure-communication-chat/tests/test_chat_client_async.py index e76a0810ca56..482075cb50cf 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_client_async.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_client_async.py @@ -7,8 +7,9 @@ from azure.communication.chat.aio import ( ChatClient ) -from azure.communication.chat import ( - ChatThreadParticipant, +from azure.communication.chat import ChatThreadParticipant + +from azure.communication.chat._shared.models import( CommunicationUserIdentifier ) from unittest_helpers import mock_response @@ -49,8 +50,8 @@ async def mock_send(*_, **__): display_name='name', share_history_time=datetime.utcnow() )] - chat_thread_client = await chat_client.create_chat_thread(topic, participants) - assert chat_thread_client.thread_id == thread_id + create_chat_thread_result = await chat_client.create_chat_thread(topic, thread_participants=participants) + assert create_chat_thread_result.chat_thread.id == thread_id @pytest.mark.asyncio async def test_create_chat_thread_w_repeatability_request_id(): @@ -75,10 +76,10 @@ async def mock_send(*_, **__): display_name='name', share_history_time=datetime.utcnow() )] - chat_thread_client = await chat_client.create_chat_thread(topic=topic, + create_chat_thread_result = await chat_client.create_chat_thread(topic=topic, thread_participants=participants, repeatability_request_id=repeatability_request_id) - assert chat_thread_client.thread_id == thread_id + assert create_chat_thread_result.chat_thread.id == thread_id @pytest.mark.asyncio async def test_create_chat_thread_raises_error(): @@ -127,8 +128,10 @@ async def test_get_chat_thread(): async def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "id": thread_id, - "created_by": "8:acs:resource_user", - "participants": [{"id": "", "display_name": "name", "share_history_time": "1970-01-01T00:00:00Z"}] + "topic": "Lunch Chat thread", + "createdOn": "2020-10-30T10:50:50Z", + "deletedOn": "2020-10-30T10:50:50Z", + "createdByCommunicationIdentifier": {"rawId": "string", "communicationUser": {"id": "string"}} }) chat_client = ChatClient("https://endpoint", credential, transport=Mock(send=mock_send)) diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_client_e2e.py b/sdk/communication/azure-communication-chat/tests/test_chat_client_e2e.py index 92877aa72f92..221afd927561 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_client_e2e.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_client_e2e.py @@ -12,10 +12,10 @@ from uuid import uuid4 from azure.communication.identity import CommunicationIdentityClient +from azure.communication.identity._shared.user_credential import CommunicationTokenCredential +from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions from azure.communication.chat import ( ChatClient, - CommunicationTokenCredential, - CommunicationTokenRefreshOptions, ChatThreadParticipant ) from azure.communication.chat._shared.utils import parse_connection_str @@ -71,14 +71,60 @@ def _create_thread(self, repeatability_request_id=None): display_name='name', share_history_time=share_history_time )] - chat_thread_client = self.chat_client.create_chat_thread(topic, participants, repeatability_request_id) - self.thread_id = chat_thread_client.thread_id + create_chat_thread_result = self.chat_client.create_chat_thread(topic, + thread_participants=participants, + repeatability_request_id=repeatability_request_id) + self.thread_id = create_chat_thread_result.chat_thread.id + + @pytest.mark.live_test_only + def test_access_token_validation(self): + """ + This is to make sure that consecutive calls made using the same chat_client or chat_thread_client + does not throw an exception due to mismatch in the generation of azure.core.credentials.AccessToken + """ + from azure.communication.identity._shared.user_token_refresh_options import \ + CommunicationTokenRefreshOptions as IdentityCommunicationTokenRefreshOptions + + # create ChatClient + refresh_options = IdentityCommunicationTokenRefreshOptions(self.token) + chat_client = ChatClient(self.endpoint, CommunicationTokenCredential(refresh_options)) + raised = False + try: + # create chat thread + topic1 = "test topic1" + create_chat_thread1_result = chat_client.create_chat_thread(topic1) + self.thread_id = create_chat_thread1_result.chat_thread.id + + # get chat thread + chat_thread1 = chat_client.get_chat_thread(create_chat_thread1_result.chat_thread.id) + + # get chat thread client + chat_thread1_client = chat_client.get_chat_thread_client(self.thread_id) + + # list all chat threads + chat_thead_infos = chat_client.list_chat_threads() + for chat_threads_info_page in chat_thead_infos.by_page(): + for chat_thread_info in chat_threads_info_page: + print("ChatThreadInfo: ", chat_thread_info) + except: + raised = True + + assert raised is True @pytest.mark.live_test_only def test_create_chat_thread(self): self._create_thread() assert self.thread_id is not None + @pytest.mark.live_test_only + def test_create_chat_thread_w_no_participants(self): + # create chat thread + topic = "test topic" + create_chat_thread_result = self.chat_client.create_chat_thread(topic) + self.thread_id = create_chat_thread_result.chat_thread.id + assert create_chat_thread_result.chat_thread is not None + assert create_chat_thread_result.errors is None + @pytest.mark.live_test_only def test_create_chat_thread_w_repeatability_request_id(self): repeatability_request_id = str(uuid4()) diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_client_e2e_async.py b/sdk/communication/azure-communication-chat/tests/test_chat_client_e2e_async.py index a9af97f0a116..0b2fe07c045d 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_client_e2e_async.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_client_e2e_async.py @@ -11,10 +11,10 @@ from uuid import uuid4 from azure.communication.identity import CommunicationIdentityClient +from azure.communication.identity._shared.user_credential_async import CommunicationTokenCredential +from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions from azure.communication.chat.aio import ( - ChatClient, - CommunicationTokenCredential, - CommunicationTokenRefreshOptions + ChatClient ) from azure.communication.chat import ( ChatThreadParticipant @@ -68,8 +68,10 @@ async def _create_thread(self, repeatability_request_id=None): display_name='name', share_history_time=share_history_time )] - chat_thread_client = await self.chat_client.create_chat_thread(topic, participants, repeatability_request_id) - self.thread_id = chat_thread_client.thread_id + create_chat_thread_result = await self.chat_client.create_chat_thread(topic, + thread_participants=participants, + repeatability_request_id=repeatability_request_id) + self.thread_id = create_chat_thread_result.chat_thread.id @pytest.mark.live_test_only @AsyncCommunicationTestCase.await_prepared_test @@ -82,6 +84,21 @@ async def test_create_chat_thread_async(self): if not self.is_playback(): await self.chat_client.delete_chat_thread(self.thread_id) + @pytest.mark.live_test_only + @AsyncCommunicationTestCase.await_prepared_test + async def test_create_chat_thread_w_no_participants_async(self): + async with self.chat_client: + # create chat thread + topic = "test topic" + create_chat_thread_result = await self.chat_client.create_chat_thread(topic) + + assert create_chat_thread_result.chat_thread is not None + assert create_chat_thread_result.errors is None + + # delete created users and chat threads + if not self.is_playback(): + await self.chat_client.delete_chat_thread(create_chat_thread_result.chat_thread.id) + @pytest.mark.live_test_only @AsyncCommunicationTestCase.await_prepared_test async def test_create_chat_thread_w_repeatability_request_id_async(self): diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client.py b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client.py index c4778586c2cc..26083b722474 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client.py @@ -12,10 +12,11 @@ from azure.communication.chat import ( ChatThreadClient, ChatThreadParticipant, - CommunicationUserIdentifier, - CommunicationTokenCredential, ChatMessageType ) +from azure.communication.chat._shared.models import( + CommunicationUserIdentifier +) from unittest_helpers import mock_response try: @@ -25,7 +26,7 @@ class TestChatThreadClient(unittest.TestCase): @classmethod - @patch('azure.communication.chat.CommunicationTokenCredential') + @patch('azure.communication.identity._shared.user_credential.CommunicationTokenCredential') def setUpClass(cls, credential): credential.get_token = Mock(return_value=AccessToken("some_token", datetime.now().replace(tzinfo=TZ_UTC))) TestChatThreadClient.credential = credential @@ -168,16 +169,21 @@ def mock_send(*_, **__): "topic": "Lunch Chat thread", "participants": [ { - "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, "displayName": "Bob", "shareHistoryTime": "2020-10-30T10:50:50Z" } ], - "initiator": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + "initiatorCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}} }, "senderDisplayName": "Bob", "createdOn": "2021-01-27T01:37:33Z", - "senderId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-e155-1f06-1db7-3a3a0d00004b" + "senderCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, + "deletedOn": "2021-01-27T01:37:33Z", + "editedOn": "2021-01-27T01:37:33Z" }) chat_thread_client = ChatThreadClient("https://endpoint", TestChatThreadClient.credential, thread_id, transport=Mock(send=mock_send)) @@ -196,21 +202,36 @@ def mock_send(*_, **__): def test_list_messages(self): thread_id = "19:bcaebfba0d314c2aa3e920d38fa3df08@thread.v2" message_id='1596823919339' + message_str = "Hi I am Bob." raised = False def mock_send(*_, **__): return mock_response(status_code=200, json_payload={"value": [{ - "id": message_id, - "type": "text", - "sequenceId": "3", - "version": message_id, - "content": { - "message": "Hi I am Bob." - }, - "senderDisplayName": "Bob", - "createdOn": "2021-01-27T01:37:33Z", - "senderId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-e155-1f06-1db7-3a3a0d00004b" - }]}) + "id": message_id, + "type": "text", + "sequenceId": "3", + "version": message_id, + "content": { + "message": message_str, + "topic": "Lunch Chat thread", + "participants": [ + { + "communicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, + "displayName": "Bob", + "shareHistoryTime": "2020-10-30T10:50:50Z" + } + ], + "initiatorCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}} + }, + "senderDisplayName": "Bob", + "createdOn": "2021-01-27T01:37:33Z", + "senderCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, + "deletedOn": "2021-01-27T01:37:33Z", + "editedOn": "2021-01-27T01:37:33Z" + }]}) chat_thread_client = ChatThreadClient("https://endpoint", TestChatThreadClient.credential, thread_id, transport=Mock(send=mock_send)) chat_messages = None @@ -229,6 +250,7 @@ def test_list_messages_with_start_time(self): thread_id = "19:bcaebfba0d314c2aa3e920d38fa3df08@thread.v2" raised = False message_id = '1596823919339' + message_str = "Hi I am Bob." def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ @@ -236,14 +258,28 @@ def mock_send(*_, **__): { "id": message_id, "type": "text", - "sequenceId": "3", + "sequenceId": "2", "version": message_id, "content": { - "message": "Hi I am Bob." + "message": message_str, + "topic": "Lunch Chat thread", + "participants": [ + { + "communicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, + "displayName": "Bob", + "shareHistoryTime": "2020-10-30T10:50:50Z" + } + ], + "initiatorCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}} }, "senderDisplayName": "Bob", "createdOn": "2021-01-27T01:37:33Z", - "senderId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-e155-1f06-1db7-3a3a0d00004b" + "senderCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, + "deletedOn": "2021-01-27T01:37:33Z", + "editedOn": "2021-01-27T01:37:33Z" }, { "id": message_id, @@ -251,20 +287,25 @@ def mock_send(*_, **__): "sequenceId": "3", "version": message_id, "content": { - "message": "Come one guys, lets go for lunch together.", + "message": message_str, "topic": "Lunch Chat thread", "participants": [ { - "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, "displayName": "Bob", "shareHistoryTime": "2020-10-30T10:50:50Z" } ], - "initiator": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + "initiatorCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}} }, "senderDisplayName": "Bob", "createdOn": "2021-01-27T01:37:33Z", - "senderId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-e155-1f06-1db7-3a3a0d00004b" + "senderCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, + "deletedOn": "2021-01-27T01:37:33Z", + "editedOn": "2021-01-27T01:37:33Z" } ]}) chat_thread_client = ChatThreadClient("https://endpoint", TestChatThreadClient.credential, thread_id, transport=Mock(send=mock_send)) @@ -321,7 +362,18 @@ def test_list_participants(self): raised = False def mock_send(*_, **__): - return mock_response(status_code=200, json_payload={"value": [{"id": participant_id}]}) + return mock_response(status_code=200, json_payload={"value": [ + { + "communicationIdentifier": { + "rawId": participant_id, + "communicationUser": { + "id": participant_id + } + }, + "displayName": "Bob", + "shareHistoryTime": "2020-10-30T10:50:50Z" + } + ]}) chat_thread_client = ChatThreadClient("https://endpoint", TestChatThreadClient.credential, thread_id, transport=Mock(send=mock_send)) chat_thread_participants = None @@ -345,8 +397,26 @@ def test_list_participants_with_results_per_page(self): def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "value": [ - {"id": participant_id_1}, - {"id": participant_id_2} + { + "communicationIdentifier": { + "rawId": participant_id_1, + "communicationUser": { + "id": participant_id_1 + } + }, + "displayName": "Bob", + "shareHistoryTime": "2020-10-30T10:50:50Z" + }, + { + "communicationIdentifier": { + "rawId": participant_id_2, + "communicationUser": { + "id": participant_id_2 + } + }, + "displayName": "Bob", + "shareHistoryTime": "2020-10-30T10:50:50Z" + } ]}) chat_thread_client = ChatThreadClient("https://endpoint", TestChatThreadClient.credential, thread_id, @@ -384,6 +454,39 @@ def mock_send(*_, **__): self.assertFalse(raised, 'Expected is no excpetion raised') + def test_add_participant_w_failed_participants(self): + thread_id = "19:bcaebfba0d314c2aa3e920d38fa3df08@thread.v2" + new_participant_id="8:acs:57b9bac9-df6c-4d39-a73b-26e944adf6ea_9b0110-08007f1041" + raised = False + error_message = "some error message" + + def mock_send(*_, **__): + return mock_response(status_code=201, json_payload={ + "errors": { + "invalidParticipants": [ + { + "code": "string", + "message": error_message, + "target": new_participant_id, + "details": [] + } + ] + } + }) + chat_thread_client = ChatThreadClient("https://endpoint", TestChatThreadClient.credential, thread_id, transport=Mock(send=mock_send)) + + new_participant = ChatThreadParticipant( + user=CommunicationUserIdentifier(new_participant_id), + display_name='name', + share_history_time=datetime.utcnow()) + + try: + chat_thread_client.add_participant(new_participant) + except: + raised = True + + self.assertTrue(raised, 'Expected is no excpetion raised') + def test_add_participants(self): thread_id = "19:bcaebfba0d314c2aa3e920d38fa3df08@thread.v2" new_participant_id="8:acs:57b9bac9-df6c-4d39-a73b-26e944adf6ea_9b0110-08007f1041" @@ -400,11 +503,56 @@ def mock_send(*_, **__): participants = [new_participant] try: - chat_thread_client.add_participants(participants) + result = chat_thread_client.add_participants(participants) except: raised = True self.assertFalse(raised, 'Expected is no excpetion raised') + self.assertTrue(len(result) == 0) + + def test_add_participants_w_failed_participants_returns_nonempty_list(self): + thread_id = "19:bcaebfba0d314c2aa3e920d38fa3df08@thread.v2" + new_participant_id="8:acs:57b9bac9-df6c-4d39-a73b-26e944adf6ea_9b0110-08007f1041" + raised = False + error_message = "some error message" + + def mock_send(*_, **__): + return mock_response(status_code=201,json_payload={ + "errors": { + "invalidParticipants": [ + { + "code": "string", + "message": error_message, + "target": new_participant_id, + "details": [] + } + ] + } + }) + chat_thread_client = ChatThreadClient("https://endpoint", TestChatThreadClient.credential, thread_id, transport=Mock(send=mock_send)) + + new_participant = ChatThreadParticipant( + user=CommunicationUserIdentifier(new_participant_id), + display_name='name', + share_history_time=datetime.utcnow()) + participants = [new_participant] + + try: + result = chat_thread_client.add_participants(participants) + except: + raised = True + + self.assertFalse(raised, 'Expected is no excpetion raised') + self.assertTrue(len(result) == 1) + + failed_participant = result[0][0] + communication_error = result[0][1] + + self.assertEqual(new_participant.user.identifier, failed_participant.user.identifier) + self.assertEqual(new_participant.display_name, failed_participant.display_name) + self.assertEqual(new_participant.share_history_time, failed_participant.share_history_time) + self.assertEqual(error_message, communication_error.message) + def test_remove_participant(self): thread_id = "19:bcaebfba0d314c2aa3e920d38fa3df08@thread.v2" @@ -459,7 +607,19 @@ def test_list_read_receipts(self): raised = False def mock_send(*_, **__): - return mock_response(status_code=200, json_payload={"value": [{"chatMessageId": message_id}]}) + return mock_response(status_code=200, json_payload={ + "value": [ + { + "chatMessageId": message_id, + "senderCommunicationIdentifier": { + "rawId": "string", + "communicationUser": { + "id": "string" + } + } + } + ] + }) chat_thread_client = ChatThreadClient("https://endpoint", TestChatThreadClient.credential, thread_id, transport=Mock(send=mock_send)) read_receipts = None @@ -482,8 +642,24 @@ def test_list_read_receipts_with_results_per_page(self): def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "value": [ - {"chatMessageId": message_id_1}, - {"chatMessageId": message_id_2} + { + "chatMessageId": message_id_1, + "senderCommunicationIdentifier": { + "rawId": "string", + "communicationUser": { + "id": "string" + } + } + }, + { + "chatMessageId": message_id_2, + "senderCommunicationIdentifier": { + "rawId": "string", + "communicationUser": { + "id": "string" + } + } + } ]}) chat_thread_client = ChatThreadClient("https://endpoint", TestChatThreadClient.credential, thread_id, transport=Mock(send=mock_send)) diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_async.py b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_async.py index bf404b459930..5439e45fcfcb 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_async.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_async.py @@ -9,9 +9,11 @@ from azure.communication.chat.aio import ChatThreadClient from azure.communication.chat import ( ChatThreadParticipant, - CommunicationUserIdentifier, ChatMessageType ) +from azure.communication.chat._shared.models import( + CommunicationUserIdentifier +) from unittest_helpers import mock_response from azure.core.exceptions import HttpResponseError @@ -170,16 +172,21 @@ async def mock_send(*_, **__): "topic": "Lunch Chat thread", "participants": [ { - "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, "displayName": "Bob", "shareHistoryTime": "2020-10-30T10:50:50Z" } ], - "initiator": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + "initiatorCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}} }, "senderDisplayName": "Bob", "createdOn": "2021-01-27T01:37:33Z", - "senderId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-e155-1f06-1db7-3a3a0d00004b" + "senderCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, + "deletedOn": "2021-01-27T01:37:33Z", + "editedOn": "2021-01-27T01:37:33Z" }) chat_thread_client = ChatThreadClient("https://endpoint", credential, thread_id, transport=Mock(send=mock_send)) @@ -212,16 +219,21 @@ async def mock_send(*_, **__): "topic": "Lunch Chat thread", "participants": [ { - "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, "displayName": "Bob", "shareHistoryTime": "2020-10-30T10:50:50Z" } ], - "initiator": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + "initiatorCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}} }, "senderDisplayName": "Bob", "createdOn": "2021-01-27T01:37:33Z", - "senderId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-e155-1f06-1db7-3a3a0d00004b" + "senderCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, + "deletedOn": "2021-01-27T01:37:33Z", + "editedOn": "2021-01-27T01:37:33Z" }]}) chat_thread_client = ChatThreadClient("https://endpoint", credential, thread_id, transport=Mock(send=mock_send)) @@ -250,46 +262,56 @@ async def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "value": [ { - "id": "message_id1", + "id": "message_id_1", "type": "text", "sequenceId": "3", - "version": "message_id1", + "version": "message_id_1", "content": { "message": "message_str", "topic": "Lunch Chat thread", "participants": [ { - "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, "displayName": "Bob", "shareHistoryTime": "2020-10-30T10:50:50Z" } ], - "initiator": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + "initiatorCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}} }, "senderDisplayName": "Bob", - "createdOn": "2020-08-17T18:05:44Z", - "senderId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-e155-1f06-1db7-3a3a0d00004b" + "createdOn": "2021-01-27T01:37:33Z", + "senderCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, + "deletedOn": "2021-01-27T01:37:33Z", + "editedOn": "2021-01-27T01:37:33Z" }, { - "id": "message_id2", + "id": "message_id_2", "type": "text", "sequenceId": "3", - "version": "message_id2", + "version": "message_id_2", "content": { "message": "message_str", "topic": "Lunch Chat thread", "participants": [ { - "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b", + "communicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, "displayName": "Bob", "shareHistoryTime": "2020-10-30T10:50:50Z" } ], - "initiator": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + "initiatorCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}} }, "senderDisplayName": "Bob", - "createdOn": "2020-08-17T23:13:33Z", - "senderId": "8:acs:46849534-eb08-4ab7-bde7-c36928cd1547_00000007-e155-1f06-1db7-3a3a0d00004b" + "createdOn": "2021-01-27T01:37:33Z", + "senderCommunicationIdentifier": {"rawId": "string", "communicationUser": { + "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"}}, + "deletedOn": "2021-01-27T01:37:33Z", + "editedOn": "2021-01-27T01:37:33Z" }]}) chat_thread_client = ChatThreadClient("https://endpoint", credential, thread_id, transport=Mock(send=mock_send)) @@ -351,7 +373,18 @@ async def test_list_participants(): raised = False async def mock_send(*_, **__): - return mock_response(status_code=200, json_payload={"value": [{"id": participant_id}]}) + return mock_response(status_code=200, json_payload={"value": [ + { + "communicationIdentifier": { + "rawId": participant_id, + "communicationUser": { + "id": participant_id + } + }, + "displayName": "Bob", + "shareHistoryTime": "2020-10-30T10:50:50Z" + } + ]}) chat_thread_client = ChatThreadClient("https://endpoint", credential, thread_id, transport=Mock(send=mock_send)) chat_thread_participants = None @@ -378,8 +411,26 @@ async def test_list_participants_with_results_per_page(): async def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "value": [ - {"id": participant_id_1}, - {"id": participant_id_2} + { + "communicationIdentifier": { + "rawId": participant_id_1, + "communicationUser": { + "id": participant_id_1 + } + }, + "displayName": "Bob", + "shareHistoryTime": "2020-10-30T10:50:50Z" + }, + { + "communicationIdentifier": { + "rawId": participant_id_2, + "communicationUser": { + "id": participant_id_2 + } + }, + "displayName": "Bob", + "shareHistoryTime": "2020-10-30T10:50:50Z" + } ]}) chat_thread_client = ChatThreadClient("https://endpoint", credential, thread_id, transport=Mock(send=mock_send)) @@ -420,6 +471,40 @@ async def mock_send(*_, **__): assert raised == False +@pytest.mark.asyncio +async def test_add_participant_w_failed_participants(): + thread_id = "19:bcaebfba0d314c2aa3e920d38fa3df08@thread.v2" + new_participant_id="8:acs:57b9bac9-df6c-4d39-a73b-26e944adf6ea_9b0110-08007f1041" + raised = False + error_message = "some error message" + + async def mock_send(*_, **__): + return mock_response(status_code=201, json_payload={ + "errors": { + "invalidParticipants": [ + { + "code": "string", + "message": error_message, + "target": new_participant_id, + "details": [] + } + ] + } + }) + chat_thread_client = ChatThreadClient("https://endpoint", credential, thread_id, transport=Mock(send=mock_send)) + + new_participant = ChatThreadParticipant( + user=CommunicationUserIdentifier(new_participant_id), + display_name='name', + share_history_time=datetime.utcnow()) + + try: + await chat_thread_client.add_participant(new_participant) + except: + raised = True + + assert raised == True + @pytest.mark.asyncio async def test_add_participants(): thread_id = "19:bcaebfba0d314c2aa3e920d38fa3df08@thread.v2" @@ -443,6 +528,50 @@ async def mock_send(*_, **__): assert raised == False +@pytest.mark.asyncio +async def test_add_participants_w_failed_participants_returns_nonempty_list(): + thread_id = "19:bcaebfba0d314c2aa3e920d38fa3df08@thread.v2" + new_participant_id="8:acs:57b9bac9-df6c-4d39-a73b-26e944adf6ea_9b0110-08007f1041" + raised = False + error_message = "some error message" + + async def mock_send(*_, **__): + return mock_response(status_code=201, json_payload={ + "errors": { + "invalidParticipants": [ + { + "code": "string", + "message": error_message, + "target": new_participant_id, + "details": [] + } + ] + } + }) + chat_thread_client = ChatThreadClient("https://endpoint", credential, thread_id, transport=Mock(send=mock_send)) + + new_participant = ChatThreadParticipant( + user=CommunicationUserIdentifier(new_participant_id), + display_name='name', + share_history_time=datetime.utcnow()) + participants = [new_participant] + + try: + result = await chat_thread_client.add_participants(participants) + except: + raised = True + + assert raised == False + assert len(result) == 1 + + failed_participant = result[0][0] + communication_error = result[0][1] + + assert new_participant.user.identifier == failed_participant.user.identifier + assert new_participant.display_name == failed_participant.display_name + assert new_participant.share_history_time == failed_participant.share_history_time + assert error_message == communication_error.message + @pytest.mark.asyncio async def test_remove_participant(): thread_id = "19:bcaebfba0d314c2aa3e920d38fa3df08@thread.v2" @@ -500,7 +629,17 @@ async def test_list_read_receipts(): raised = False async def mock_send(*_, **__): - return mock_response(status_code=200, json_payload={"value": [{"chatMessageId": message_id}]}) + return mock_response(status_code=200, json_payload={"value": [ + { + "chatMessageId": message_id, + "senderCommunicationIdentifier": { + "rawId": "string", + "communicationUser": { + "id": "string" + } + } + } + ]}) chat_thread_client = ChatThreadClient("https://endpoint", credential, thread_id, transport=Mock(send=mock_send)) read_receipts = None @@ -527,8 +666,24 @@ async def test_list_read_receipts_with_results_per_page(): async def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "value": [ - {"chatMessageId": message_id_1}, - {"chatMessageId": message_id_2} + { + "chatMessageId": message_id_1, + "senderCommunicationIdentifier": { + "rawId": "string", + "communicationUser": { + "id": "string" + } + } + }, + { + "chatMessageId": message_id_2, + "senderCommunicationIdentifier": { + "rawId": "string", + "communicationUser": { + "id": "string" + } + } + } ]}) chat_thread_client = ChatThreadClient("https://endpoint", credential, thread_id, transport=Mock(send=mock_send)) @@ -555,7 +710,15 @@ async def test_list_read_receipts_with_results_per_page_and_skip(): async def mock_send(*_, **__): return mock_response(status_code=200, json_payload={ "value": [ - {"chatMessageId": message_id_1} + { + "chatMessageId": message_id_1, + "senderCommunicationIdentifier": { + "rawId": "string", + "communicationUser": { + "id": "string" + } + } + } ]}) chat_thread_client = ChatThreadClient("https://endpoint", credential, thread_id, transport=Mock(send=mock_send)) diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e.py b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e.py index 536267bc08fd..bf26081d5616 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e.py @@ -11,10 +11,10 @@ from msrest.serialization import TZ_UTC from azure.communication.identity import CommunicationIdentityClient +from azure.communication.identity._shared.user_credential import CommunicationTokenCredential +from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions from azure.communication.chat import ( ChatClient, - CommunicationTokenCredential, - CommunicationTokenRefreshOptions, ChatThreadParticipant, ChatMessageType ) @@ -81,7 +81,8 @@ def _create_thread( display_name='name', share_history_time=share_history_time )] - self.chat_thread_client = self.chat_client.create_chat_thread(topic, participants) + create_chat_thread_result = self.chat_client.create_chat_thread(topic, thread_participants=participants) + self.chat_thread_client = self.chat_client.get_chat_thread_client(create_chat_thread_result.chat_thread.id) self.thread_id = self.chat_thread_client.thread_id def _create_thread_w_two_users( @@ -104,7 +105,8 @@ def _create_thread_w_two_users( share_history_time=share_history_time ) ] - self.chat_thread_client = self.chat_client.create_chat_thread(topic, participants) + create_chat_thread_result = self.chat_client.create_chat_thread(topic, thread_participants=participants) + self.chat_thread_client = self.chat_client.get_chat_thread_client(create_chat_thread_result.chat_thread.id) self.thread_id = self.chat_thread_client.thread_id def _send_message(self): @@ -207,8 +209,14 @@ def test_add_participant(self): user=self.new_user, display_name='name', share_history_time=share_history_time) + raised = False - self.chat_thread_client.add_participant(new_participant) + try: + self.chat_thread_client.add_participant(new_participant) + except RuntimeError as e: + raised = True + + assert raised is False @pytest.mark.live_test_only def test_add_participants(self): @@ -222,7 +230,11 @@ def test_add_participants(self): share_history_time=share_history_time) participants = [new_participant] - self.chat_thread_client.add_participants(participants) + failed_participants = self.chat_thread_client.add_participants(participants) + + # no error occured while adding participants + assert len(failed_participants) == 0 + @pytest.mark.live_test_only def test_remove_participant(self): diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e_async.py b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e_async.py index 6245f8733702..de3228ef62ff 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e_async.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_e2e_async.py @@ -10,10 +10,10 @@ from msrest.serialization import TZ_UTC from azure.communication.identity import CommunicationIdentityClient +from azure.communication.identity._shared.user_credential_async import CommunicationTokenCredential +from azure.communication.chat._shared.user_token_refresh_options import CommunicationTokenRefreshOptions from azure.communication.chat.aio import ( - ChatClient, - CommunicationTokenCredential, - CommunicationTokenRefreshOptions + ChatClient ) from azure.communication.chat import ( ChatThreadParticipant, @@ -80,7 +80,8 @@ async def _create_thread(self): display_name='name', share_history_time=share_history_time )] - self.chat_thread_client = await self.chat_client.create_chat_thread(topic, participants) + create_chat_thread_result = await self.chat_client.create_chat_thread(topic, thread_participants=participants) + self.chat_thread_client = self.chat_client.get_chat_thread_client(create_chat_thread_result.chat_thread.id) self.thread_id = self.chat_thread_client.thread_id async def _create_thread_w_two_users(self): @@ -100,7 +101,8 @@ async def _create_thread_w_two_users(self): share_history_time=share_history_time ) ] - self.chat_thread_client = await self.chat_client.create_chat_thread(topic, participants) + create_chat_thread_result = await self.chat_client.create_chat_thread(topic, thread_participants=participants) + self.chat_thread_client = self.chat_client.get_chat_thread_client(create_chat_thread_result.chat_thread.id) self.thread_id = self.chat_thread_client.thread_id @@ -259,8 +261,13 @@ async def test_add_participant(self): user=self.new_user, display_name='name', share_history_time=share_history_time) + raised = False + try: + await self.chat_thread_client.add_participant(new_participant) + except RuntimeError as e: + raised = True - await self.chat_thread_client.add_participant(new_participant) + assert raised is False if not self.is_playback(): await self.chat_client.delete_chat_thread(self.thread_id) @@ -280,7 +287,10 @@ async def test_add_participants(self): share_history_time=share_history_time) participants = [new_participant] - await self.chat_thread_client.add_participants(participants) + failed_participants = await self.chat_thread_client.add_participants(participants) + + # no error occured while adding participants + assert len(failed_participants) == 0 if not self.is_playback(): await self.chat_client.delete_chat_thread(self.thread_id) diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_shared/models.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_shared/models.py index 2e64b18dc068..67e0a1ff6e2b 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_shared/models.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_shared/models.py @@ -37,57 +37,13 @@ class UnknownIdentifier(object): Represents an identifier of an unknown type. It will be encountered in communications with endpoints that are not identifiable by this version of the SDK. - :ivar identifier: Unknown communication identifier. - :vartype identifier: str + :ivar raw_id: Unknown communication identifier. + :vartype raw_id: str :param identifier: Value to initialize UnknownIdentifier. :type identifier: str """ def __init__(self, identifier): - self.identifier = identifier - -class CommunicationIdentifierModel(msrest.serialization.Model): - """Communication Identifier Model. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Kind of Communication Identifier. - :type kind: CommunicationIdentifierKind - :param id: Full id of the identifier. - :type id: str - :param phone_number: phone number in case the identifier is a phone number. - :type phone_number: str - :param is_anonymous: True if the identifier is anonymous. - :type is_anonymous: bool - :param microsoft_teams_user_id: Microsoft Teams user id. - :type microsoft_teams_user_id: str - :param communication_cloud_environment: Cloud environment that the user belongs to. - :type communication_cloud_environment: CommunicationCloudEnvironment - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'microsoft_teams_user_id': {'key': 'microsoftTeamsUserId', 'type': 'str'}, - 'communication_cloud_environment': {'key': 'communicationCloudEnvironment', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CommunicationIdentifierModel, self).__init__(**kwargs) - self.kind = kwargs['kind'] - self.id = kwargs.get('id', None) - self.phone_number = kwargs.get('phone_number', None) - self.is_anonymous = kwargs.get('is_anonymous', None) - self.microsoft_teams_user_id = kwargs.get('microsoft_teams_user_id', None) - self.communication_cloud_environment = kwargs.get('communication_cloud_environment', None) + self.raw_id = identifier class _CaseInsensitiveEnumMeta(EnumMeta): def __getitem__(cls, name): diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_shared/models.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_shared/models.py index 2e64b18dc068..67e0a1ff6e2b 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_shared/models.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_shared/models.py @@ -37,57 +37,13 @@ class UnknownIdentifier(object): Represents an identifier of an unknown type. It will be encountered in communications with endpoints that are not identifiable by this version of the SDK. - :ivar identifier: Unknown communication identifier. - :vartype identifier: str + :ivar raw_id: Unknown communication identifier. + :vartype raw_id: str :param identifier: Value to initialize UnknownIdentifier. :type identifier: str """ def __init__(self, identifier): - self.identifier = identifier - -class CommunicationIdentifierModel(msrest.serialization.Model): - """Communication Identifier Model. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Kind of Communication Identifier. - :type kind: CommunicationIdentifierKind - :param id: Full id of the identifier. - :type id: str - :param phone_number: phone number in case the identifier is a phone number. - :type phone_number: str - :param is_anonymous: True if the identifier is anonymous. - :type is_anonymous: bool - :param microsoft_teams_user_id: Microsoft Teams user id. - :type microsoft_teams_user_id: str - :param communication_cloud_environment: Cloud environment that the user belongs to. - :type communication_cloud_environment: CommunicationCloudEnvironment - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'microsoft_teams_user_id': {'key': 'microsoftTeamsUserId', 'type': 'str'}, - 'communication_cloud_environment': {'key': 'communicationCloudEnvironment', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CommunicationIdentifierModel, self).__init__(**kwargs) - self.kind = kwargs['kind'] - self.id = kwargs.get('id', None) - self.phone_number = kwargs.get('phone_number', None) - self.is_anonymous = kwargs.get('is_anonymous', None) - self.microsoft_teams_user_id = kwargs.get('microsoft_teams_user_id', None) - self.communication_cloud_environment = kwargs.get('communication_cloud_environment', None) + self.raw_id = identifier class _CaseInsensitiveEnumMeta(EnumMeta): def __getitem__(cls, name): diff --git a/sdk/communication/azure-communication-sms/azure/communication/sms/_shared/models.py b/sdk/communication/azure-communication-sms/azure/communication/sms/_shared/models.py index 2e64b18dc068..adb6f909dd23 100644 --- a/sdk/communication/azure-communication-sms/azure/communication/sms/_shared/models.py +++ b/sdk/communication/azure-communication-sms/azure/communication/sms/_shared/models.py @@ -37,13 +37,13 @@ class UnknownIdentifier(object): Represents an identifier of an unknown type. It will be encountered in communications with endpoints that are not identifiable by this version of the SDK. - :ivar identifier: Unknown communication identifier. - :vartype identifier: str + :ivar raw_id: Unknown communication identifier. + :vartype raw_id: str :param identifier: Value to initialize UnknownIdentifier. :type identifier: str """ def __init__(self, identifier): - self.identifier = identifier + self.raw_id = identifier class CommunicationIdentifierModel(msrest.serialization.Model): """Communication Identifier Model.