diff --git a/src/communication/HISTORY.rst b/src/communication/HISTORY.rst index 8a0507db6e3..c43f5a91b97 100644 --- a/src/communication/HISTORY.rst +++ b/src/communication/HISTORY.rst @@ -3,6 +3,12 @@ Release History =============== +1.2.1 +++++++ + * Update command helps + * Fix bugs preview and deprecated flags + + 1.2.0 ++++++ * Add communication chat command group in preview mode. diff --git a/src/communication/azext_communication/__init__.py b/src/communication/azext_communication/__init__.py index 92b97658278..3112cedbc87 100644 --- a/src/communication/azext_communication/__init__.py +++ b/src/communication/azext_communication/__init__.py @@ -66,7 +66,7 @@ def _register_data_plane_account_arguments(self, command_name, arguments): if not command: return - group_name = 'communication' + group_name = 'Communication' if 'connection_string' in arguments: command.add_argument('connection_string', '--connection-string', required=False, default=None, validator=validate_client_parameters, arg_group=group_name, diff --git a/src/communication/azext_communication/manual/_help.py b/src/communication/azext_communication/manual/_help.py index a75a17fa68a..ce5a66f9321 100644 --- a/src/communication/azext_communication/manual/_help.py +++ b/src/communication/azext_communication/manual/_help.py @@ -19,8 +19,7 @@ helps['communication list'] = """ type: command - short-summary: "Handles requests to list all resources in a resource group. And Handles requests to list all \ -resources in a subscription." + short-summary: "Handles requests to list all resources in a resource group or a subscription." examples: - name: List by resource group text: |- @@ -32,7 +31,7 @@ helps['communication show'] = """ type: command - short-summary: "Get the CommunicationService and its properties." + short-summary: "Gets the Communication Service and its properties." examples: - name: Get resource text: |- @@ -41,7 +40,7 @@ helps['communication create'] = """ type: command - short-summary: "Create a new CommunicationService or update an existing CommunicationService." + short-summary: "Creates a new Communication Service or update an existing one." examples: - name: Create or update resource text: |- @@ -51,7 +50,7 @@ helps['communication update'] = """ type: command - short-summary: "Operation to update an existing CommunicationService." + short-summary: "Updates an existing Communication Service." examples: - name: Update resource text: |- @@ -61,7 +60,7 @@ helps['communication delete'] = """ type: command - short-summary: "Operation to delete a CommunicationService." + short-summary: "Deletes an existing Communication Service." examples: - name: Delete resource text: |- @@ -82,7 +81,7 @@ helps['communication list-key'] = """ type: command - short-summary: "Get the access keys of the CommunicationService resource." + short-summary: "Gets the access keys of the Communication Service resource." examples: - name: List keys text: |- @@ -91,7 +90,7 @@ helps['communication regenerate-key'] = """ type: command - short-summary: "Regenerate CommunicationService access key. PrimaryKey and SecondaryKey cannot be regenerated at \ + short-summary: "Regenerates Communication Service access key. PrimaryKey and SecondaryKey cannot be regenerated at \ the same time." examples: - name: Regenerate key @@ -102,7 +101,7 @@ helps['communication wait'] = """ type: command - short-summary: Place the CLI in a waiting state until a condition of the communication is met. + short-summary: Places the CLI in a waiting state until a condition of the communication is met. examples: - name: Pause executing next line of CLI script until the communication is successfully created. text: |- @@ -114,28 +113,28 @@ helps['communication identity'] = """ type: group - short-summary: Commands to manage user identities and their tokens for a CommunicationService resource. + short-summary: Commands to manage user identities and their tokens for a Communication Service resource. """ helps['communication identity user'] = """ type: group - short-summary: Commands to manage user Identities for a CommunicationService resource. + short-summary: Commands to manage user identities for a Communication Service resource. """ helps['communication identity user create'] = """ type: command - short-summary: "Craetes a new ACS identity." + short-summary: "Creates a new ACS Identity." examples: - - name: create + - name: Create ACS user text: |- az communication identity user create """ helps['communication identity user delete'] = """ type: command - short-summary: "Deletes the ACS identity, revokes all tokens for the identity and deletes all associated data." + short-summary: "Deletes an existing ACS Identity, revokes all tokens for that ACS Identity and deletes all associated data." examples: - - name: delete + - name: Delete ACS user text: |- az communication identity user delete --user "8:acs:xxxxxx" """ @@ -144,59 +143,59 @@ type: command short-summary: "Issues a new access token with the specified scopes for a given User Identity. If no User Identity is specified, creates a new User Identity as well." examples: - - name: issue-access-token + - name: Issue access token text: |- az communication identity issue-access-token --scope chat - - name: issue access-token with multiple scopes and user + - name: Issue access token with multiple scopes and user text: |- az communication identity issue-access-token --scope chat voip --userid "8:acs:xxxxxx" """ helps['communication identity token'] = """ type: group - short-summary: Commands to manage user tokens for a CommunicationService resource. + short-summary: Commands to manage user tokens for a Communication Service resource. """ helps['communication identity token issue'] = """ type: command short-summary: "Issues a new access token with the specified scopes for a given User Identity. If no User Identity is specified, creates a new User Identity as well." examples: - - name: issue access-token + - name: Issue access token text: |- az communication identity token issue --scope chat - - name: issue access-token with multiple scopes and user + - name: Issue access token with multiple scopes and user text: |- az communication identity token issue --scope chat voip --user "8:acs:xxxxxx" """ helps['communication identity token revoke'] = """ type: command - short-summary: "Revokes all access tokens for the specific identity." + short-summary: "Revokes all access tokens for the specific ACS Identity." examples: - - name: revoke access-tokens + - name: Revoke access tokens text: |- az communication identity token revoke --user "8:acs:xxxxxx" """ helps['communication identity token get-for-teams-user'] = """ type: command - short-summary: "Exchanges an Azure Active Directory (Azure AD) access token of a Teams user for a new Communication Identity access token with a matching expiration time." + short-summary: "Exchanges an Azure Active Directory (Azure AD) access token of a Teams user for a new ACS Identity access token with a matching expiration time." examples: - - name: token get-for-teams-user + - name: Get token for teams user text: |- az communication identity token get-for-teams-user --aad-token "aad-123-xyz" --client "app-id-123-xyz" --aad-user "uid" """ helps['communication sms'] = """ type: group - short-summary: Commands to manage SMS for a CommunicationService resource. + short-summary: Commands to manage SMS for a Communication Service resource. """ helps['communication sms send'] = """ type: command - short-summary: "Sends an SMS from the sender phone number to the recipient(s) phone number." + short-summary: "Sends an SMS from the sender phone number to the recipient(s) phone number(s)." examples: - - name: send sms + - name: Send sms text: |- az communication sms send --sender "+1833xxxxxxx" \ --recipient "+1425xxxxxxx" "+1426xxxxxxx" "+1427xxxxxxx" --message "Hello there!!" @@ -204,9 +203,9 @@ helps['communication sms send-sms'] = """ type: command - short-summary: "Sends an SMS from the sender phone number to the recipient(s) phone number." + short-summary: "Sends an SMS from the sender phone number to the recipient(s) phone number(s)." examples: - - name: send-sms + - name: Send sms text: |- az communication sms send-sms --sender "+1833xxxxxxx" \ --recipient "+1425xxxxxxx" "+1426xxxxxxx" "+1427xxxxxxx" --message "Hello there!!" @@ -214,46 +213,46 @@ helps['communication phonenumbers'] = """ type: group - short-summary: Commands to manage phone numbers for a CommunicationService resource. + short-summary: Commands to manage phone numbers for a Communication Service resource. """ helps['communication phonenumbers list-phonenumbers'] = """ type: command - short-summary: "Lists all phone numbers associated with the CommunicationService resource." + short-summary: "Lists all phone numbers associated with the Communication Service resource." examples: - - name: list-phonenumbers + - name: List phonenumbers text: |- az communication phonenumbers list-phonenumbers """ helps['communication phonenumbers show-phonenumber'] = """ type: command - short-summary: "Shows the details for a phone number associated with the CommunicationService resource." + short-summary: "Shows the details for a phone number associated with the Communication Service resource." examples: - - name: show-phonenumber + - name: Show phonenumber text: |- az communication phonenumbers show-phonenumber --phonenumber "+1833xxxxxxx" """ helps['communication phonenumber'] = """ type: group - short-summary: Commands to manage phone numbers for a CommunicationService resource. + short-summary: Commands to manage phone numbers for a Communication Service resource. """ helps['communication phonenumber list'] = """ type: command - short-summary: "Lists all phone numbers associated with the CommunicationService resource." + short-summary: "Lists all phone numbers associated with the Communication Service resource." examples: - - name: list phonenumbers + - name: List phonenumbers text: |- az communication phonenumber list """ helps['communication phonenumber show'] = """ type: command - short-summary: "Shows the details for a phone number associated with the CommunicationService resource." + short-summary: "Shows the details for a phone number associated with the Communication Service resource." examples: - - name: show phonenumber + - name: Show phonenumber text: |- az communication phonenumber show --phonenumber "+1833xxxxxxx" """ @@ -265,14 +264,14 @@ helps['communication chat thread'] = """ type: group - short-summary: Commands to manage chat thread of a CommunicationService resource. + short-summary: Commands to manage chat thread of a Communication Service resource. """ helps['communication chat thread list'] = """ type: command short-summary: "Gets the list of chat threads of a user." examples: - - name: chat list threads + - name: List chat threads text: |- az communication chat thread list """ @@ -281,7 +280,7 @@ type: command short-summary: "Creates a chat thread." examples: - - name: chat create thread + - name: Create chat thread text: |- az communication chat thread create --topic "chat-topic" """ @@ -290,7 +289,7 @@ type: command short-summary: "Deletes a chat thread." examples: - - name: chat delete thread + - name: Delete chat thread text: |- az communication chat thread delete --thread "19:a-bcd=xyz" """ @@ -299,21 +298,21 @@ type: command short-summary: "Updates the topic of a chat thread." examples: - - name: chat update-topic + - name: Update chat thread topic text: |- az communication chat thread update-topic --thread "19:a-bcd=xyz" --topic "New topic!" """ helps['communication chat participant'] = """ type: group - short-summary: Commands to manage participants in a chat thread of a CommunicationService resource. + short-summary: Commands to manage participants in a chat thread of a Communication Service resource. """ helps['communication chat participant list'] = """ type: command short-summary: "Gets the participants of a chat thread." examples: - - name: chat list participants + - name: List participants text: |- az communication chat participant list --thread "19:a-bcd=xyz" --skip "4" """ @@ -322,7 +321,7 @@ type: command short-summary: "Adds a participant to a chat thread." examples: - - name: chat add participant + - name: Add participant text: |- az communication chat participant add --thread "19:a-bcd=xyz" --user "8:acs:xxxxxx" --display-name "John Doe" --start-time "2022-07-14T10:21" """ @@ -331,21 +330,21 @@ type: command short-summary: "Removes a participant from a chat thread." examples: - - name: chat remove participant + - name: Remove participant text: |- az communication chat participant remove --thread "19:a-bcd=xyz" --user "8:acs:xxxxxx" """ helps['communication chat message'] = """ type: group - short-summary: Commands to manage messages in a chat thread of a CommunicationService resource. + short-summary: Commands to manage messages in a chat thread of a Communication Service resource. """ helps['communication chat message send'] = """ type: command short-summary: "Sends a message to a chat thread." examples: - - name: chat send message + - name: Send message text: |- az communication chat message send --thread "19:a-bcd=xyz" --display-name "John Doe" --content "Hello there!" --message-type "text" """ @@ -354,7 +353,7 @@ type: command short-summary: "Gets list of messages from a chat thread." examples: - - name: chat list messages + - name: List messages text: |- az communication chat message list --thread "19:a-bcd=xyz" --start-time "2022-07-14T10:21" """ @@ -363,7 +362,7 @@ type: command short-summary: "Gets a message from a chat thread by id." examples: - - name: chat get message + - name: Get message text: |- az communication chat message get --thread "19:a-bcd=xyz" --message-id "12345678" """ @@ -372,7 +371,7 @@ type: command short-summary: "Updates a message." examples: - - name: chat update message + - name: Update message text: |- az communication chat message update --thread "19:a-bcd=xyz" --message-id "12345678" --content "Hello, there!" """ @@ -381,21 +380,21 @@ type: command short-summary: "Deletes a message from a chat thread by id." examples: - - name: chat delete message + - name: Delete message text: |- az communication chat message delete --thread "19:a-bcd=xyz" --message-id "12345678" """ helps['communication chat message receipt'] = """ type: group - short-summary: Commands to manage message read-receipts in a chat thread of a CommunicationService resource. + short-summary: Commands to manage message read-receipts in a chat thread of a Communication Service resource. """ helps['communication chat message receipt list'] = """ type: command short-summary: "Gets read receipts of a chat thread." examples: - - name: chat list read-receipts + - name: List read receipts text: |- az communication chat message receipt list --thread "19:a-bcd=xyz" --skip "4" """ @@ -404,7 +403,7 @@ type: command short-summary: "Posts a read receipt event to a chat thread, on behalf of a user." examples: - - name: chat send read-receipt + - name: Send read receipt text: |- az communication chat message receipt send --thread "19:a-bcd=xyz" --message-id "12345678" """ diff --git a/src/communication/azext_communication/manual/commands.py b/src/communication/azext_communication/manual/commands.py index 427f3cce8ae..393a5c6416e 100644 --- a/src/communication/azext_communication/manual/commands.py +++ b/src/communication/azext_communication/manual/commands.py @@ -27,9 +27,8 @@ def load_command_table(self, _): g.communication_custom_command('get-for-teams-user', "communication_identity_get_token_for_teams_user", identity_arguments, client_factory=cf_communication_identity) sms_arguments = ['connection_string'] - with self.command_group('communication sms', client_factory=cf_communication_sms, is_preview=True) as g: - g.communication_custom_command('send', 'communication_send_sms', sms_arguments) with self.command_group('communication sms', client_factory=cf_communication_sms) as g: + g.communication_custom_command('send', 'communication_send_sms', sms_arguments, is_preview=True) g.communication_custom_command('send-sms', 'communication_send_sms', sms_arguments, deprecate_info=self.deprecate(redirect='send', hide=True)) @@ -37,13 +36,16 @@ def load_command_table(self, _): with self.command_group('communication phonenumber', client_factory=cf_communication_phonenumbers, is_preview=True) as g: g.communication_custom_command('list', 'communication_list_phonenumbers', phonenumber_arguments) g.communication_custom_command('show', 'communication_show_phonenumber', phonenumber_arguments) - with self.command_group('communication phonenumbers', client_factory=cf_communication_phonenumbers) as g: + with self.command_group('communication phonenumbers', client_factory=cf_communication_phonenumbers, + deprecate_info=self.deprecate(redirect='phonenumber', hide=True)) as g: g.communication_custom_command('list-phonenumbers', 'communication_list_phonenumbers', phonenumber_arguments, deprecate_info=self.deprecate(redirect='list', hide=True)) g.communication_custom_command('show-phonenumber', 'communication_show_phonenumber', phonenumber_arguments, deprecate_info=self.deprecate(redirect='show', hide=True)) chat_arguments = ['endpoint', 'access_token'] + self.command_group('communication chat', is_preview=True) + # thread management with self.command_group('communication chat thread', client_factory=cf_communication_chat, is_preview=True) as g: g.communication_custom_command('list', 'communication_chat_list_threads', chat_arguments) diff --git a/src/communication/setup.py b/src/communication/setup.py index 42523aca151..13a9f6eca8c 100644 --- a/src/communication/setup.py +++ b/src/communication/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # HISTORY.rst entry. -VERSION = '1.2.0' +VERSION = '1.2.1' try: from azext_communication.manual.version import VERSION except ImportError: