From be97d2dadac97a1f6898925df3d5031e59bac257 Mon Sep 17 00:00:00 2001 From: 0rlanand0Wats0n Date: Tue, 13 Apr 2021 14:55:56 -0700 Subject: [PATCH 1/5] dedupe test code --- ...ding_can_get_a_purchased_phone_number.json | 4 +- ...ding_errors_if_phone_number_not_found.json | 2 +- ..._can_list_all_purchased_phone_numbers.json | 4 +- .../recording_can_cancel_search_polling.json | 2 +- ...r_1_available_phone_number_by_default.json | 36 +--- ...ding_throws_on_invalid_search_request.json | 2 +- .../recording_can_cancel_update_polling.json | 6 +- ...n_update_a_phone_numbers_capabilities.json | 72 +------ ...ording_can_get_a_purchased_phone_number.js | 12 +- ...ording_errors_if_phone_number_not_found.js | 10 +- ...ording_can_get_a_purchased_phone_number.js | 22 +-- ...ording_errors_if_phone_number_not_found.js | 16 +- ...ng_can_list_all_purchased_phone_numbers.js | 12 +- ...ng_can_list_all_purchased_phone_numbers.js | 22 +-- .../recording_can_cancel_search_polling.js | 10 +- ...for_1_available_phone_number_by_default.js | 66 ++----- ...ording_throws_on_invalid_search_request.js | 10 +- .../recording_can_cancel_search_polling.js | 20 +- ...for_1_available_phone_number_by_default.js | 76 +++----- ...ording_throws_on_invalid_search_request.js | 16 +- .../recording_can_cancel_update_polling.js | 22 +-- ...can_update_a_phone_numbers_capabilities.js | 134 ++++--------- .../recording_can_cancel_update_polling.js | 28 +-- ...can_update_a_phone_numbers_capabilities.js | 182 ++++-------------- .../test/get.aad.spec.ts | 50 ----- .../test/get.spec.ts | 69 ++++--- .../test/list.aad.spec.ts | 43 ----- .../test/list.spec.ts | 55 ++++-- .../test/lro.purchaseAndRelease.aad.spec.ts | 85 -------- .../test/lro.purchaseAndRelease.spec.ts | 119 +++++++----- .../test/lro.search.aad.spec.ts | 82 -------- .../test/lro.search.spec.ts | 117 ++++++----- .../test/lro.update.aad.spec.ts | 68 ------- .../test/lro.update.spec.ts | 103 +++++----- .../test/utils/index.ts | 2 +- .../test/utils/matrix.ts | 47 +++++ .../test/utils/recordedClient.ts | 21 +- 37 files changed, 568 insertions(+), 1079 deletions(-) delete mode 100644 sdk/communication/communication-phone-numbers/test/get.aad.spec.ts delete mode 100644 sdk/communication/communication-phone-numbers/test/list.aad.spec.ts delete mode 100644 sdk/communication/communication-phone-numbers/test/lro.purchaseAndRelease.aad.spec.ts delete mode 100644 sdk/communication/communication-phone-numbers/test/lro.search.aad.spec.ts delete mode 100644 sdk/communication/communication-phone-numbers/test/lro.update.aad.spec.ts create mode 100644 sdk/communication/communication-phone-numbers/test/utils/matrix.ts diff --git a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__get_phone_number/recording_can_get_a_purchased_phone_number.json b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__get_phone_number/recording_can_get_a_purchased_phone_number.json index 1e8d44f2be9f..519b96c8a11c 100644 --- a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__get_phone_number/recording_can_get_a_purchased_phone_number.json +++ b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__get_phone_number/recording_can_get_a_purchased_phone_number.json @@ -8,7 +8,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T22:41:03.6935096+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}}", + "response": "{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T22:41:03.6935096+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}}", "responseHeaders": { "content-type": "application/json; charset=utf-8" } @@ -18,5 +18,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "253a24ed4ecb28e5359013fe95fd92ac" + "hash": "9b48c99747b8d694d1693146c9f46244" } \ No newline at end of file diff --git a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__get_phone_number/recording_errors_if_phone_number_not_found.json b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__get_phone_number/recording_errors_if_phone_number_not_found.json index b04adfebb06f..0ad97d1c302e 100644 --- a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__get_phone_number/recording_errors_if_phone_number_not_found.json +++ b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__get_phone_number/recording_errors_if_phone_number_not_found.json @@ -18,5 +18,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "3d962a09442619758fe236ff7b6b5f37" + "hash": "b2f9e435061a983cbe93b0b5d3cc32d1" } \ No newline at end of file diff --git a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lists/recording_can_list_all_purchased_phone_numbers.json b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lists/recording_can_list_all_purchased_phone_numbers.json index 91d3d9b75f03..e0bac799ce5d 100644 --- a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lists/recording_can_list_all_purchased_phone_numbers.json +++ b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lists/recording_can_list_all_purchased_phone_numbers.json @@ -9,7 +9,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"phoneNumbers\":[{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-02-10T17:51:13.4876763+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-02-10T17:52:41.818335+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-02-10T18:01:46.4199999+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-09T15:01:55.0949003+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-09T15:03:04.7513808+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T21:13:23.5677014+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T20:48:35.6663829+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T22:41:03.6935096+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-29T20:13:20.1694649+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-30T23:10:20.4361699+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-06T17:35:42.8155189+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-06T21:36:18.8554333+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2000-01-01T00:00:00+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}}]}", + "response": "{\"phoneNumbers\":[{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"geographic\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-06T23:27:52.858607+00:00\",\"cost\":{\"amount\":1.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"geographic\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"none\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-06T23:48:49.38583+00:00\",\"cost\":{\"amount\":1.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-02-10T17:51:13.4876763+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-02-10T17:52:41.818335+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-02-10T18:01:46.4199999+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-09T15:01:55.0949003+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-09T15:03:04.7513808+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T21:13:23.5677014+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T20:48:35.6663829+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T22:41:03.6935096+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-29T20:13:20.1694649+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-30T23:10:20.4361699+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-06T17:35:42.8155189+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-06T23:15:56.8228107+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-06T23:32:06.9113399+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-06T21:36:18.8554333+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-06T23:02:07.935429+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-06T23:14:21.7956616+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-06T23:19:11.9095127+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"inbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-06T23:40:02.0410712+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-07T16:37:03.918591+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-08T16:18:38.5365335+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-08T19:48:38.3328121+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-04-08T20:56:52.3906615+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}},{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2000-01-01T00:00:00+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}}]}", "responseHeaders": { "content-type": "application/json; charset=utf-8" } @@ -19,5 +19,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "e3952eb20d0b24c34925e515f4ff9242" + "hash": "b5b5bc3aa53df9cf7b960ec1c7c85595" } \ No newline at end of file diff --git a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_cancel_search_polling.json b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_cancel_search_polling.json index 2ea6b901b2e0..e37ed27c05d9 100644 --- a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_cancel_search_polling.json +++ b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_cancel_search_polling.json @@ -22,5 +22,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "48d61257c7861eb047666a8765386d49" + "hash": "f09fe7cd91a228be4526bef6f8292679" } \ No newline at end of file diff --git a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.json b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.json index 5d9ff5d41956..34473e7e0132 100644 --- a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.json +++ b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.json @@ -25,7 +25,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"status\":\"notStarted\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-06T22:06:50.0541063+00:00\",\"id\":\"search_sanitized\",\"operationType\":\"search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "response": "{\"status\":\"notStarted\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-13T21:19:59.7107018+00:00\",\"id\":\"search_sanitized\",\"operationType\":\"search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", "responseHeaders": { "content-type": "application/json; charset=utf-8", "location": "/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07" @@ -39,35 +39,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"status\":\"notStarted\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-06T22:06:50.0541063+00:00\",\"id\":\"search_sanitized\",\"operationType\":\"search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", - "responseHeaders": { - "content-type": "application/json; charset=utf-8", - "location": "/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07" - } - }, - { - "method": "GET", - "url": "https://endpoint/phoneNumbers/operations/search_sanitized", - "query": { - "api-version": "2021-03-07" - }, - "requestBody": null, - "status": 200, - "response": "{\"status\":\"running\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-06T22:06:50.0541063+00:00\",\"id\":\"search_sanitized\",\"operationType\":\"search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", - "responseHeaders": { - "content-type": "application/json; charset=utf-8", - "location": "/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07" - } - }, - { - "method": "GET", - "url": "https://endpoint/phoneNumbers/operations/search_sanitized", - "query": { - "api-version": "2021-03-07" - }, - "requestBody": null, - "status": 200, - "response": "{\"status\":\"succeeded\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-06T22:06:50.0541063+00:00\",\"id\":\"search_sanitized\",\"operationType\":\"search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "response": "{\"status\":\"succeeded\",\"resourceLocation\":\"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-13T21:19:59.7107018+00:00\",\"id\":\"search_sanitized\",\"operationType\":\"search\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", "responseHeaders": { "content-type": "application/json; charset=utf-8", "location": "/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07" @@ -81,7 +53,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"searchId\":\"sanitized\",\"phoneNumbers\":[\"+14155550100\"],\"phoneNumberType\":\"tollFree\",\"assignmentType\":\"application\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"},\"searchExpiresBy\":\"2021-04-06T22:22:55.7600090+00:00\"}", + "response": "{\"searchId\":\"sanitized\",\"phoneNumbers\":[\"+14155550100\"],\"phoneNumberType\":\"tollFree\",\"assignmentType\":\"application\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"},\"searchExpiresBy\":\"2021-04-13T21:36:02.8085754+00:00\"}", "responseHeaders": { "content-type": "application/json; charset=utf-8" } @@ -91,5 +63,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "f0cf8b547146eb2f88ad85639943e11a" + "hash": "0ffca6a1d0eb0737c769d14361532cd8" } \ No newline at end of file diff --git a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_throws_on_invalid_search_request.json b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_throws_on_invalid_search_request.json index b3787970f4c0..0b1f46cc758d 100644 --- a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_throws_on_invalid_search_request.json +++ b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_throws_on_invalid_search_request.json @@ -18,5 +18,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "878287a1f48ad2632c994dc4ce5ff9bb" + "hash": "3e08c47962194f8a87528e88f091ed7a" } \ No newline at end of file diff --git a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__update/recording_can_cancel_update_polling.json b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__update/recording_can_cancel_update_polling.json index 9b5d4aa21857..e004f23b0974 100644 --- a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__update/recording_can_cancel_update_polling.json +++ b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__update/recording_can_cancel_update_polling.json @@ -8,7 +8,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T22:41:03.6935096+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}}", + "response": "{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T22:41:03.6935096+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}}", "responseHeaders": { "content-type": "application/json; charset=utf-8" } @@ -19,7 +19,7 @@ "query": { "api-version": "2021-03-07" }, - "requestBody": "{\"calling\":\"inbound\",\"sms\":\"outbound\"}", + "requestBody": "{\"calling\":\"outbound\",\"sms\":\"inbound+outbound\"}", "status": 202, "response": "{\"capabilitiesUpdateId\":\"sanitized\"}", "responseHeaders": { @@ -35,5 +35,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "0d1167424fb074cde4ee058f9569fff1" + "hash": "ade22a01faa7444771c83a30f821abab" } \ No newline at end of file diff --git a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__update/recording_can_update_a_phone_numbers_capabilities.json b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__update/recording_can_update_a_phone_numbers_capabilities.json index ca4c82bba3de..f7cef5f1de1c 100644 --- a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__update/recording_can_update_a_phone_numbers_capabilities.json +++ b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__update/recording_can_update_a_phone_numbers_capabilities.json @@ -8,7 +8,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T22:41:03.6935096+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}}", + "response": "{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T22:41:03.6935096+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}}", "responseHeaders": { "content-type": "application/json; charset=utf-8" } @@ -19,7 +19,7 @@ "query": { "api-version": "2021-03-07" }, - "requestBody": "{\"calling\":\"inbound+outbound\",\"sms\":\"inbound\"}", + "requestBody": "{\"calling\":\"none\",\"sms\":\"outbound\"}", "status": 202, "response": "{\"capabilitiesUpdateId\":\"sanitized\"}", "responseHeaders": { @@ -38,7 +38,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"status\":\"notStarted\",\"resourceLocation\":\"/phoneNumbers/+14155550100?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-06T22:07:10.2766366+00:00\",\"id\":\"capabilities_sanitized\",\"operationType\":\"updatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "response": "{\"status\":\"notStarted\",\"resourceLocation\":\"/phoneNumbers/+14155550100?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-13T21:20:14.8752717+00:00\",\"id\":\"capabilities_sanitized\",\"operationType\":\"updatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", "responseHeaders": { "content-type": "application/json; charset=utf-8", "location": "/phoneNumbers/+14155550100?api-version=2021-03-07" @@ -52,7 +52,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"status\":\"running\",\"resourceLocation\":\"/phoneNumbers/+14155550100?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-06T22:07:10.2766366+00:00\",\"id\":\"capabilities_sanitized\",\"operationType\":\"updatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "response": "{\"status\":\"running\",\"resourceLocation\":\"/phoneNumbers/+14155550100?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-13T21:20:14.8752717+00:00\",\"id\":\"capabilities_sanitized\",\"operationType\":\"updatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", "responseHeaders": { "content-type": "application/json; charset=utf-8", "location": "/phoneNumbers/+14155550100?api-version=2021-03-07" @@ -66,7 +66,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"status\":\"running\",\"resourceLocation\":\"/phoneNumbers/+14155550100?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-06T22:07:10.2766366+00:00\",\"id\":\"capabilities_sanitized\",\"operationType\":\"updatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "response": "{\"status\":\"running\",\"resourceLocation\":\"/phoneNumbers/+14155550100?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-13T21:20:14.8752717+00:00\",\"id\":\"capabilities_sanitized\",\"operationType\":\"updatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", "responseHeaders": { "content-type": "application/json; charset=utf-8", "location": "/phoneNumbers/+14155550100?api-version=2021-03-07" @@ -80,63 +80,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"status\":\"running\",\"resourceLocation\":\"/phoneNumbers/+14155550100?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-06T22:07:10.2766366+00:00\",\"id\":\"capabilities_sanitized\",\"operationType\":\"updatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", - "responseHeaders": { - "content-type": "application/json; charset=utf-8", - "location": "/phoneNumbers/+14155550100?api-version=2021-03-07" - } - }, - { - "method": "GET", - "url": "https://endpoint/phoneNumbers/operations/capabilities_sanitized", - "query": { - "api-version": "2021-03-07" - }, - "requestBody": null, - "status": 200, - "response": "{\"status\":\"running\",\"resourceLocation\":\"/phoneNumbers/+14155550100?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-06T22:07:10.2766366+00:00\",\"id\":\"capabilities_sanitized\",\"operationType\":\"updatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", - "responseHeaders": { - "content-type": "application/json; charset=utf-8", - "location": "/phoneNumbers/+14155550100?api-version=2021-03-07" - } - }, - { - "method": "GET", - "url": "https://endpoint/phoneNumbers/operations/capabilities_sanitized", - "query": { - "api-version": "2021-03-07" - }, - "requestBody": null, - "status": 200, - "response": "{\"status\":\"running\",\"resourceLocation\":\"/phoneNumbers/+14155550100?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-06T22:07:10.2766366+00:00\",\"id\":\"capabilities_sanitized\",\"operationType\":\"updatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", - "responseHeaders": { - "content-type": "application/json; charset=utf-8", - "location": "/phoneNumbers/+14155550100?api-version=2021-03-07" - } - }, - { - "method": "GET", - "url": "https://endpoint/phoneNumbers/operations/capabilities_sanitized", - "query": { - "api-version": "2021-03-07" - }, - "requestBody": null, - "status": 200, - "response": "{\"status\":\"running\",\"resourceLocation\":\"/phoneNumbers/+14155550100?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-06T22:07:10.2766366+00:00\",\"id\":\"capabilities_sanitized\",\"operationType\":\"updatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", - "responseHeaders": { - "content-type": "application/json; charset=utf-8", - "location": "/phoneNumbers/+14155550100?api-version=2021-03-07" - } - }, - { - "method": "GET", - "url": "https://endpoint/phoneNumbers/operations/capabilities_sanitized", - "query": { - "api-version": "2021-03-07" - }, - "requestBody": null, - "status": 200, - "response": "{\"status\":\"succeeded\",\"resourceLocation\":\"/phoneNumbers/+14155550100?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-06T22:07:10.2766366+00:00\",\"id\":\"capabilities_sanitized\",\"operationType\":\"updatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", + "response": "{\"status\":\"succeeded\",\"resourceLocation\":\"/phoneNumbers/+14155550100?api-version=2021-03-07\",\"createdDateTime\":\"2021-04-13T21:20:14.8752717+00:00\",\"id\":\"capabilities_sanitized\",\"operationType\":\"updatePhoneNumberCapabilities\",\"lastActionDateTime\":\"0001-01-01T00:00:00+00:00\"}", "responseHeaders": { "content-type": "application/json; charset=utf-8", "location": "/phoneNumbers/+14155550100?api-version=2021-03-07" @@ -150,7 +94,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound+outbound\",\"sms\":\"inbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T22:41:03.6935096+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}}", + "response": "{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T22:41:03.6935096+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}}", "responseHeaders": { "content-type": "application/json; charset=utf-8" } @@ -160,5 +104,5 @@ "uniqueName": {}, "newDate": {} }, - "hash": "b276a8805ede3864322f565670fb9614" + "hash": "bdbfff79222b0e4d5f678236391c881a" } \ No newline at end of file diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number/recording_can_get_a_purchased_phone_number.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number/recording_can_get_a_purchased_phone_number.js index c4834d72d4f8..8dd09888c35f 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number/recording_can_get_a_purchased_phone_number.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number/recording_can_get_a_purchased_phone_number.js @@ -1,13 +1,13 @@ let nock = require('nock'); -module.exports.hash = "3739dc8b8d7e4683ccfcebc0489ae499"; +module.exports.hash = "8c038731046781a9e29a78b4d4a229af"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/%2B14155550100') .query(true) - .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ + .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound+outbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -15,13 +15,13 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'cD/M3wHw0kmZg80cAq4mag.0', + 'RnzqByS8OkCOLvNwq7DjCQ.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '1061ms', + '1179ms', 'X-Azure-Ref', - '0rddsYAAAAAD9+YW8bMiGSoj5feP5btOCWVZSMzBFREdFMDQxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0GAZ2YAAAAABbIGZLwSbpR4VgHPOsLBqDWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:50:38 GMT' + 'Tue, 13 Apr 2021 20:59:05 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number/recording_errors_if_phone_number_not_found.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number/recording_errors_if_phone_number_not_found.js index 2e9277056124..4f30547be91e 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number/recording_errors_if_phone_number_not_found.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number/recording_errors_if_phone_number_not_found.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "b0bd89c3f5f4e7f0b3ac8d2a117e7888"; +module.exports.hash = "549b167dc03a3cf6dae04aefb3aae12b"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -15,13 +15,13 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - '+WoFOJ3lIUCabXCqtwuujw.0', + 'MQcqFgpZNk+fdVb4DMSkrQ.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '308ms', + '317ms', 'X-Azure-Ref', - '0rtdsYAAAAADEk070zGJRTpBd49NfTcjqWVZSMzBFREdFMDQxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0GQZ2YAAAAAA1fvTcallKQ5K+BA3+W+EHWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:50:38 GMT' + 'Tue, 13 Apr 2021 20:59:05 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number_aad/recording_can_get_a_purchased_phone_number.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number_aad/recording_can_get_a_purchased_phone_number.js index e649123f0c08..648375621bb8 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number_aad/recording_can_get_a_purchased_phone_number.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number_aad/recording_can_get_a_purchased_phone_number.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "3739dc8b8d7e4683ccfcebc0489ae499"; +module.exports.hash = "8c038731046781a9e29a78b4d4a229af"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -11,8 +11,6 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'no-store, no-cache', 'Pragma', 'no-cache', - 'Content-Length', - '1327', 'Content-Type', 'application/json; charset=utf-8', 'Expires', @@ -26,21 +24,23 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'x-ms-request-id', 'sanitized', 'x-ms-ests-server', - '2.1.11562.10 - EUS ProdSlices', + '2.1.11622.22 - EUS ProdSlices', 'Set-Cookie', - 'fpc=AsQAeBrzM5BMrQugOAtJnNZWyo4SAQAAAKrO_tcOAAAA; expires=Thu, 06-May-2021 21:50:35 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AhuoueNwlX1KtEq5fHxGsQhWyo4SAQAAABX9B9gOAAAA; expires=Thu, 13-May-2021 20:59:02 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', 'Set-Cookie', 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', 'Date', - 'Tue, 06 Apr 2021 21:50:34 GMT' + 'Tue, 13 Apr 2021 20:59:01 GMT', + 'Content-Length', + '1327' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/%2B14155550100') .query(true) - .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ + .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound+outbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -48,13 +48,13 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'EAEQRvn+KUGYNzJqn8mmnQ.0', + '5tgjCFAA602vIgZHIPsZEQ.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '1502ms', + '1731ms', 'X-Azure-Ref', - '0q9dsYAAAAABcmIXfQsjPTKd92R0jUoMBWVZSMzBFREdFMDQxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0FgZ2YAAAAAB8ebc4BD8JTa0k3PRQZrVdWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:50:36 GMT' + 'Tue, 13 Apr 2021 20:59:03 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number_aad/recording_errors_if_phone_number_not_found.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number_aad/recording_errors_if_phone_number_not_found.js index 1332c53c7163..62aa7b0445d1 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number_aad/recording_errors_if_phone_number_not_found.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__get_phone_number_aad/recording_errors_if_phone_number_not_found.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "b0bd89c3f5f4e7f0b3ac8d2a117e7888"; +module.exports.hash = "549b167dc03a3cf6dae04aefb3aae12b"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -24,15 +24,15 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'x-ms-request-id', 'sanitized', 'x-ms-ests-server', - '2.1.11562.10 - EUS ProdSlices', + '2.1.11622.22 - EUS ProdSlices', 'Set-Cookie', - 'fpc=AsQAeBrzM5BMrQugOAtJnNZWyo4SAgAAAKrO_tcOAAAA; expires=Thu, 06-May-2021 21:50:36 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AhuoueNwlX1KtEq5fHxGsQhWyo4SAgAAABX9B9gOAAAA; expires=Thu, 13-May-2021 20:59:04 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', 'Set-Cookie', 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', 'Date', - 'Tue, 06 Apr 2021 21:50:36 GMT', + 'Tue, 13 Apr 2021 20:59:04 GMT', 'Content-Length', '1327' ]); @@ -48,13 +48,13 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'YfcBuWFfF0SbMwBMXM4ZQQ.0', + 'jwrEJRUuhkGtuQsNb2M+mQ.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '304ms', + '359ms', 'X-Azure-Ref', - '0rddsYAAAAAAx7wW414SSTZCurno1N8biWVZSMzBFREdFMDQxMwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0GAZ2YAAAAABYbw2ik6XPTaIfI13wOIZJWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:50:37 GMT' + 'Tue, 13 Apr 2021 20:59:04 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lists/recording_can_list_all_purchased_phone_numbers.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lists/recording_can_list_all_purchased_phone_numbers.js index 51e9ee5a9eba..b10c95d48e43 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lists/recording_can_list_all_purchased_phone_numbers.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lists/recording_can_list_all_purchased_phone_numbers.js @@ -1,13 +1,13 @@ let nock = require('nock'); -module.exports.hash = "a26ff02d359638c7b0bfb2c5b6c430dd"; +module.exports.hash = "abe2e819f7fadb19bc1a53535c53a6a0"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers') .query(true) - .reply(200, {"phoneNumbers":[{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-02-10T17:51:13.4876763+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-02-10T17:52:41.818335+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-02-10T18:01:46.4199999+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-09T15:01:55.0949003+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-09T15:03:04.7513808+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T21:13:23.5677014+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T20:48:35.6663829+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"outbound","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-29T20:13:20.1694649+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-30T23:10:20.4361699+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T17:35:42.8155189+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T21:36:18.8554333+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2000-01-01T00:00:00+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}]}, [ + .reply(200, {"phoneNumbers":[{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"geographic","capabilities":{"calling":"outbound","sms":"none"},"assignmentType":"application","purchaseDate":"2021-04-06T23:27:52.858607+00:00","cost":{"amount":1,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"geographic","capabilities":{"calling":"inbound","sms":"none"},"assignmentType":"application","purchaseDate":"2021-04-06T23:48:49.38583+00:00","cost":{"amount":1,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-02-10T17:51:13.4876763+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-02-10T17:52:41.818335+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-02-10T18:01:46.4199999+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-09T15:01:55.0949003+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-09T15:03:04.7513808+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T21:13:23.5677014+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T20:48:35.6663829+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound+outbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-29T20:13:20.1694649+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-30T23:10:20.4361699+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T17:35:42.8155189+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"outbound","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T23:15:56.8228107+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-04-06T23:32:06.9113399+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T21:36:18.8554333+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T23:02:07.935429+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T23:14:21.7956616+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T23:19:11.9095127+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"outbound","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-04-06T23:40:02.0410712+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-07T16:37:03.918591+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-08T16:18:38.5365335+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-08T19:48:38.3328121+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-08T20:56:52.3906615+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2000-01-01T00:00:00+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}]}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -15,13 +15,13 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'AeKbt6UOXkiE/7c4USq7bQ.0', + 'r+6J+BKQwEmPEwtGKo+shA.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '6987ms', + '13853ms', 'X-Azure-Ref', - '0G9dsYAAAAAAuTjAktQFqSqmF5Qg3xQDeWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0KAZ2YAAAAADtfsOdk6rJQYrE8vpZGQMUWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:48:17 GMT' + 'Tue, 13 Apr 2021 20:59:33 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lists_aad/recording_can_list_all_purchased_phone_numbers.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lists_aad/recording_can_list_all_purchased_phone_numbers.js index 8be602fe78a7..60afc0b5c51f 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lists_aad/recording_can_list_all_purchased_phone_numbers.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lists_aad/recording_can_list_all_purchased_phone_numbers.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "a26ff02d359638c7b0bfb2c5b6c430dd"; +module.exports.hash = "abe2e819f7fadb19bc1a53535c53a6a0"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -11,8 +11,6 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'no-store, no-cache', 'Pragma', 'no-cache', - 'Content-Length', - '1327', 'Content-Type', 'application/json; charset=utf-8', 'Expires', @@ -26,21 +24,23 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'x-ms-request-id', 'sanitized', 'x-ms-ests-server', - '2.1.11562.10 - EUS ProdSlices', + '2.1.11654.13 - WUS2 ProdSlices', 'Set-Cookie', - 'fpc=AgQHD2i3hVZClNkbY0AOlKtWyo4SBAAAAPrN_tcOAAAA; expires=Thu, 06-May-2021 21:47:43 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AhuoueNwlX1KtEq5fHxGsQhWyo4SBAAAABX9B9gOAAAA; expires=Thu, 13-May-2021 20:59:06 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', 'Set-Cookie', 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', 'Date', - 'Tue, 06 Apr 2021 21:47:43 GMT' + 'Tue, 13 Apr 2021 20:59:06 GMT', + 'Content-Length', + '1327' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers') .query(true) - .reply(200, {"phoneNumbers":[{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-02-10T17:51:13.4876763+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-02-10T17:52:41.818335+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-02-10T18:01:46.4199999+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-09T15:01:55.0949003+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-09T15:03:04.7513808+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T21:13:23.5677014+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T20:48:35.6663829+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"outbound","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-29T20:13:20.1694649+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-30T23:10:20.4361699+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T17:35:42.8155189+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T21:36:18.8554333+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2000-01-01T00:00:00+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}]}, [ + .reply(200, {"phoneNumbers":[{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"geographic","capabilities":{"calling":"outbound","sms":"none"},"assignmentType":"application","purchaseDate":"2021-04-06T23:27:52.858607+00:00","cost":{"amount":1,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"geographic","capabilities":{"calling":"inbound","sms":"none"},"assignmentType":"application","purchaseDate":"2021-04-06T23:48:49.38583+00:00","cost":{"amount":1,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-02-10T17:51:13.4876763+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-02-10T17:52:41.818335+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-02-10T18:01:46.4199999+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-09T15:01:55.0949003+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-09T15:03:04.7513808+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T21:13:23.5677014+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T20:48:35.6663829+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound+outbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-29T20:13:20.1694649+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-30T23:10:20.4361699+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T17:35:42.8155189+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"outbound","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T23:15:56.8228107+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-04-06T23:32:06.9113399+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T21:36:18.8554333+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T23:02:07.935429+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T23:14:21.7956616+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-04-06T23:19:11.9095127+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"outbound","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-04-06T23:40:02.0410712+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-07T16:37:03.918591+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-08T16:18:38.5365335+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-08T19:48:38.3328121+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-04-08T20:56:52.3906615+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}},{"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2000-01-01T00:00:00+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}]}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -48,13 +48,13 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'Mo58FNnofE+p/0xKxfIp5g.0', + 'BmClnmGY5UOm7gFT2Ib9og.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '7306ms', + '14084ms', 'X-Azure-Ref', - '0/9ZsYAAAAADDh1qylW2dR5IYuhmeS7SrWVZSMzBFREdFMDMyMAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0GgZ2YAAAAABCiHIJZoBtQre3OEwQy7ApWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:47:50 GMT' + 'Tue, 13 Apr 2021 20:59:20 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_cancel_search_polling.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_cancel_search_polling.js index 9ce3a4e822f4..8ee1f305fe0a 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_cancel_search_polling.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_cancel_search_polling.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "58c0d6d8d019a17b041af464506a0011"; +module.exports.hash = "eda1f822cedbcd5d3605248e629a8354"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -15,7 +15,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'WIVSE6SBDEmIpy2tVmNzGw.0', + 'mL+26r8uR0m+CZ4guTEy4A.0', 'Operation-Location', '/phoneNumbers/operations/search_sanitized?api-version=2021-03-07', 'operation-id', @@ -25,11 +25,11 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '2755ms', + '2258ms', 'X-Azure-Ref', - '0XtVsYAAAAADCHGs6zCVOSY6gs6RanZXmWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0UQZ2YAAAAACFkKC2/7FgSbufLSmMEchxWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:40:48 GMT', + 'Tue, 13 Apr 2021 21:00:03 GMT', 'Content-Length', '0' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.js index f0df5220d992..af6e16b34a49 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "8b6ea67f52e41ae17187be04ff2cb30d"; +module.exports.hash = "8018e7a3e03e1b24fcb95ca7061259d1"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -15,7 +15,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'nNDZU6yD7UCQu7841il43A.0', + 'L7vZQ4ije0GBiokTBG0qwg.0', 'Operation-Location', '/phoneNumbers/operations/search_sanitized?api-version=2021-03-07', 'operation-id', @@ -25,11 +25,11 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '2232ms', + '2270ms', 'X-Azure-Ref', - '0TtVsYAAAAAAhZfRpRTVSTZb0/KYFcFINWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0RQZ2YAAAAACee4IoBpDoSYnP3xyaGgpRWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:40:32 GMT', + 'Tue, 13 Apr 2021 20:59:50 GMT', 'Content-Length', '0' ]); @@ -37,7 +37,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/search_sanitized') .query(true) - .reply(200, {"status":"notStarted","resourceLocation":"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07","createdDateTime":"2021-04-06T21:40:31.9319433+00:00","id":"search_sanitized","operationType":"search","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"notStarted","resourceLocation":"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07","createdDateTime":"2021-04-13T20:59:50.8896657+00:00","id":"search_sanitized","operationType":"search","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -49,21 +49,21 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'hUp9obIOyEau4Y5s72oprA.0', + 'aC2QFy0dnkiIE9xC4/zavA.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '301ms', + '644ms', 'X-Azure-Ref', - '0UNVsYAAAAAD0jEnjMVRsSrKU6NTDgQtTWVZSMzBFREdFMDQxNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0RwZ2YAAAAABaV0WEuIOST4M+PezJEcGMWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:40:32 GMT' + 'Tue, 13 Apr 2021 20:59:52 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/search_sanitized') .query(true) - .reply(200, {"status":"running","resourceLocation":"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07","createdDateTime":"2021-04-06T21:40:31.9319433+00:00","id":"search_sanitized","operationType":"search","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"succeeded","resourceLocation":"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07","createdDateTime":"2021-04-13T20:59:50.8896657+00:00","id":"search_sanitized","operationType":"search","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -75,47 +75,21 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'XVbBVy2ca0y6JtgY9EHgQQ.0', + '9cTTHx9IHEmQl+zPTxyfeg.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '2782ms', - 'X-Azure-Ref', - '0UtVsYAAAAACC2NxWPhJtQIYkPUqAJLLIWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 06 Apr 2021 21:40:37 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/phoneNumbers/operations/search_sanitized') - .query(true) - .reply(200, {"status":"succeeded","resourceLocation":"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07","createdDateTime":"2021-04-06T21:40:31.9319433+00:00","id":"search_sanitized","operationType":"search","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Location', - '/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07', - 'Access-Control-Expose-Headers', - 'Location', - 'Request-Context', - 'appId=', - 'MS-CV', - 'e6EfdOIFak6dcmfK4sMiFw.0', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '314ms', + '301ms', 'X-Azure-Ref', - '0V9VsYAAAAABY2spZq07dQKiUi7QLAGK+WVZSMzBFREdFMDQxNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0SgZ2YAAAAAD/715GZ/2qToECMsbUtIOcWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:40:39 GMT' + 'Tue, 13 Apr 2021 20:59:54 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/availablePhoneNumbers/searchResults/sanitized') .query(true) - .reply(200, {"searchId":"sanitized","phoneNumbers":["+14155550100"],"phoneNumberType":"tollFree","assignmentType":"application","capabilities":{"calling":"none","sms":"inbound+outbound"},"cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"},"searchExpiresBy":"2021-04-06T21:56:38.0848459+00:00"}, [ + .reply(200, {"searchId":"sanitized","phoneNumbers":["+14155550100"],"phoneNumberType":"tollFree","assignmentType":"application","capabilities":{"calling":"none","sms":"inbound+outbound"},"cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"},"searchExpiresBy":"2021-04-13T21:15:53.3681276+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -123,13 +97,13 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'QZD17rGtZ0K6W7PfYIYVqg.0', + 'vXyqjPHvPkiBvp3SyfnjiQ.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '861ms', + '1546ms', 'X-Azure-Ref', - '0WtVsYAAAAACfCvxDzdyTRZNeKEnL97L/WVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0TAZ2YAAAAAAwNB0BXFg5QL8nEbHpDVwqWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:40:42 GMT' + 'Tue, 13 Apr 2021 20:59:57 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_throws_on_invalid_search_request.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_throws_on_invalid_search_request.js index 9c4805742ddd..42edfb8e3300 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_throws_on_invalid_search_request.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_throws_on_invalid_search_request.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "b64a8c93e95970054ede9c66155c7333"; +module.exports.hash = "ea194035e8c8171fc5cab96f8ca9719a"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -15,13 +15,13 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'TB4UrhQPQUu/qESVMjyBzw.0', + 'Gzg5lEuNK0G+gSyKWMcGXg.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '1199ms', + '1285ms', 'X-Azure-Ref', - '0XNVsYAAAAACLnMZE90ojRK7OvNuSdEKbWVZSMzBFREdFMDQxNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0UAZ2YAAAAAAVJYwTVXRTQqeUM4icfkb8WVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:40:45 GMT' + 'Tue, 13 Apr 2021 21:00:01 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_cancel_search_polling.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_cancel_search_polling.js index bd15102e1f47..5326b693efb8 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_cancel_search_polling.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_cancel_search_polling.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "58c0d6d8d019a17b041af464506a0011"; +module.exports.hash = "eda1f822cedbcd5d3605248e629a8354"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -11,8 +11,6 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'no-store, no-cache', 'Pragma', 'no-cache', - 'Content-Length', - '1327', 'Content-Type', 'application/json; charset=utf-8', 'Expires', @@ -26,15 +24,17 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'x-ms-request-id', 'sanitized', 'x-ms-ests-server', - '2.1.11562.11 - WUS2 ProdSlices', + '2.1.11622.22 - NCUS ProdSlices', 'Set-Cookie', - 'fpc=AmaFr2-Cs2VCtiSCzRkBTexWyo4SCAAAAG3L_tcOAAAA; expires=Thu, 06-May-2021 21:40:24 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AhuoueNwlX1KtEq5fHxGsQhWyo4SBgAAABX9B9gOAAAA; expires=Thu, 13-May-2021 20:59:46 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', 'Set-Cookie', 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', 'Date', - 'Tue, 06 Apr 2021 21:40:23 GMT' + 'Tue, 13 Apr 2021 20:59:46 GMT', + 'Content-Length', + '1327' ]); nock('https://endpoint', {"encodedQueryParams":true}) @@ -48,7 +48,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'FTUgPMxB4EWfMd/GcXDZDg.0', + 'x2ANwEie80KI6d/qpoQy/A.0', 'Operation-Location', '/phoneNumbers/operations/search_sanitized?api-version=2021-03-07', 'operation-id', @@ -58,11 +58,11 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '5185ms', + '2522ms', 'X-Azure-Ref', - '0SdVsYAAAAABvPMd2jxueRrk+16EYE7cNWVZSMzBFREdFMDQxNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0QgZ2YAAAAADXCjvpqDxJR6Gtu0ZXzGFTWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:40:30 GMT', + 'Tue, 13 Apr 2021 20:59:48 GMT', 'Content-Length', '0' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_search_for_1_available_phone_number_by_default.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_search_for_1_available_phone_number_by_default.js index 45317c5ac5b5..940387427ded 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_search_for_1_available_phone_number_by_default.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_search_for_1_available_phone_number_by_default.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "8b6ea67f52e41ae17187be04ff2cb30d"; +module.exports.hash = "8018e7a3e03e1b24fcb95ca7061259d1"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -11,6 +11,8 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'no-store, no-cache', 'Pragma', 'no-cache', + 'Content-Length', + '1327', 'Content-Type', 'application/json; charset=utf-8', 'Expires', @@ -24,17 +26,15 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'x-ms-request-id', 'sanitized', 'x-ms-ests-server', - '2.1.11562.11 - WUS2 ProdSlices', + '2.1.11622.22 - SCUS ProdSlices', 'Set-Cookie', - 'fpc=AmaFr2-Cs2VCtiSCzRkBTexWyo4SBwAAAG3L_tcOAAAA; expires=Thu, 06-May-2021 21:40:10 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AhuoueNwlX1KtEq5fHxGsQhWyo4SBAAAABX9B9gOAAAA; expires=Thu, 13-May-2021 20:59:34 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', 'Set-Cookie', 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', 'Date', - 'Tue, 06 Apr 2021 21:40:09 GMT', - 'Content-Length', - '1327' + 'Tue, 13 Apr 2021 20:59:34 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) @@ -48,7 +48,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'paWlojITwUKaC6pefOXa2g.0', + 'GCRj4VdGTk2Jv2UY1gZRsg.0', 'Operation-Location', '/phoneNumbers/operations/search_sanitized?api-version=2021-03-07', 'operation-id', @@ -58,11 +58,11 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '2697ms', + '2307ms', 'X-Azure-Ref', - '0OtVsYAAAAABQgrxGfBNHQJVZQWAjyvG5WVZSMzBFREdFMDQxNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0NgZ2YAAAAAD3uSiAC+Y0Q6vP1DjC3Ln6WVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:40:12 GMT', + 'Tue, 13 Apr 2021 20:59:36 GMT', 'Content-Length', '0' ]); @@ -70,33 +70,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/search_sanitized') .query(true) - .reply(200, {"status":"notStarted","resourceLocation":"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07","createdDateTime":"2021-04-06T21:40:12.393234+00:00","id":"search_sanitized","operationType":"search","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Location', - '/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07', - 'Access-Control-Expose-Headers', - 'Location', - 'Request-Context', - 'appId=', - 'MS-CV', - 'Yb2vLrYbGU6YU6+G82juJg.0', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '289ms', - 'X-Azure-Ref', - '0PNVsYAAAAACZLyzwFlqCSJT26CBxQidqWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 06 Apr 2021 21:40:13 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/phoneNumbers/operations/search_sanitized') - .query(true) - .reply(200, {"status":"notStarted","resourceLocation":"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07","createdDateTime":"2021-04-06T21:40:12.393234+00:00","id":"search_sanitized","operationType":"search","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"notStarted","resourceLocation":"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07","createdDateTime":"2021-04-13T20:59:36.7926024+00:00","id":"search_sanitized","operationType":"search","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -108,21 +82,21 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'h/UCpaU8lkGvaSauO15jLA.0', + '6IU2c/6O30aNETi66h7/rw.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '435ms', + '415ms', 'X-Azure-Ref', - '0P9VsYAAAAADRq+nA0rn1TYxHKNN0faekWVZSMzBFREdFMDQxNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0OQZ2YAAAAACE/axU4jIJTKgAjfYsc4+KWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:40:15 GMT' + 'Tue, 13 Apr 2021 20:59:36 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/search_sanitized') .query(true) - .reply(200, {"status":"succeeded","resourceLocation":"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07","createdDateTime":"2021-04-06T21:40:12.393234+00:00","id":"search_sanitized","operationType":"search","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"succeeded","resourceLocation":"/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07","createdDateTime":"2021-04-13T20:59:36.7926024+00:00","id":"search_sanitized","operationType":"search","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -134,21 +108,21 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'lSvtDz01wU6CxTusymHMqQ.0', + '8lKmIpNoCkCvfQpOv9LXmA.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '317ms', + '346ms', 'X-Azure-Ref', - '0QdVsYAAAAAAEehGTLKVqQp/wPvKV1wTEWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0OwZ2YAAAAADNnwXb6KhRRp5S/DCnSh7PWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:40:18 GMT' + 'Tue, 13 Apr 2021 20:59:39 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/availablePhoneNumbers/searchResults/sanitized') .query(true) - .reply(200, {"searchId":"sanitized","phoneNumbers":["+14155550100"],"phoneNumberType":"tollFree","assignmentType":"application","capabilities":{"calling":"none","sms":"inbound+outbound"},"cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"},"searchExpiresBy":"2021-04-06T21:56:16.8569289+00:00"}, [ + .reply(200, {"searchId":"sanitized","phoneNumbers":["+14155550100"],"phoneNumberType":"tollFree","assignmentType":"application","capabilities":{"calling":"none","sms":"inbound+outbound"},"cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"},"searchExpiresBy":"2021-04-13T21:15:39.7401524+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -156,13 +130,13 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'RxJ8pA/CbEW1ikyteLxMbQ.0', + 'xuPw6EDklkayEQpZbtWwPg.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '1169ms', + '844ms', 'X-Azure-Ref', - '0RNVsYAAAAAD/hzNOQhhEQqtidp+uMXvSWVZSMzBFREdFMDQxNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0PgZ2YAAAAACrWwFusHeKTLKjTNMyRrWfWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:40:21 GMT' + 'Tue, 13 Apr 2021 20:59:42 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_throws_on_invalid_search_request.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_throws_on_invalid_search_request.js index 0b4a42a0db79..da56ae4f2501 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_throws_on_invalid_search_request.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_throws_on_invalid_search_request.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "b64a8c93e95970054ede9c66155c7333"; +module.exports.hash = "ea194035e8c8171fc5cab96f8ca9719a"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -24,15 +24,15 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'x-ms-request-id', 'sanitized', 'x-ms-ests-server', - '2.1.11562.10 - EUS ProdSlices', + '2.1.11622.22 - SCUS ProdSlices', 'Set-Cookie', - 'fpc=AmaFr2-Cs2VCtiSCzRkBTexWyo4SCAAAAG3L_tcOAAAA; expires=Thu, 06-May-2021 21:40:23 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AhuoueNwlX1KtEq5fHxGsQhWyo4SBQAAABX9B9gOAAAA; expires=Thu, 13-May-2021 20:59:45 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', 'Set-Cookie', 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', 'Date', - 'Tue, 06 Apr 2021 21:40:22 GMT', + 'Tue, 13 Apr 2021 20:59:44 GMT', 'Content-Length', '1327' ]); @@ -48,13 +48,13 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'DSM3IaiJ9kafscIaMJX+Ow.0', + 'EuZQsDKvtE6tnKGiFjtesA.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '1356ms', + '1138ms', 'X-Azure-Ref', - '0R9VsYAAAAADfVgcqdsegT5kJ5YjfSdEIWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0QQZ2YAAAAAAmYrmXsVJpTodAd8oi/7SiWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:40:24 GMT' + 'Tue, 13 Apr 2021 20:59:45 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update/recording_can_cancel_update_polling.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update/recording_can_cancel_update_polling.js index ab376dc3a8e1..28bdc54c76df 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update/recording_can_cancel_update_polling.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update/recording_can_cancel_update_polling.js @@ -1,13 +1,13 @@ let nock = require('nock'); -module.exports.hash = "d7ae80ea43ba6bda2531404a502cdd4b"; +module.exports.hash = "ec6136b6e06377c3081366dea1ecef48"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/%2B14155550100') .query(true) - .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound+outbound","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ + .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound+outbound","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -15,19 +15,19 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'ksh8goAcrUGGWEbMs54ecA.0', + 'UEcrLqAeXEu6GCSpIF2VhA.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '1047ms', + '1136ms', 'X-Azure-Ref', - '0ZtdsYAAAAACGGNb2lA+mQoK0/M3pQv7rWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0agh2YAAAAADZ8oOJajZoTpXvtyFC0UbBWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:49:27 GMT' + 'Tue, 13 Apr 2021 21:08:59 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) - .patch('/phoneNumbers/%2B14155550100/capabilities', {"calling":"inbound","sms":"outbound"}) + .patch('/phoneNumbers/%2B14155550100/capabilities', {"calling":"outbound","sms":"inbound+outbound"}) .query(true) .reply(202, {"capabilitiesUpdateId":"sanitized"}, [ 'Transfer-Encoding', @@ -41,7 +41,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'XP75jK3TQUCplyeY+lLbRA.0', + 'h7OfD1ZR9063UqUIWmdjKQ.0', 'Operation-Location', '/phoneNumbers/operations/capabilities_sanitized?api-version=2021-03-07', 'operation-id', @@ -51,9 +51,9 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '902ms', + '986ms', 'X-Azure-Ref', - '0Z9dsYAAAAACWmNRbtVXxQ6/1n4o9k6/0WVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0awh2YAAAAAC2z2SciLQ0T7xupiwjySf3WVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:49:28 GMT' + 'Tue, 13 Apr 2021 21:09:00 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update/recording_can_update_a_phone_numbers_capabilities.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update/recording_can_update_a_phone_numbers_capabilities.js index a53187bca3e8..a7dcc65c9cde 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update/recording_can_update_a_phone_numbers_capabilities.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update/recording_can_update_a_phone_numbers_capabilities.js @@ -1,13 +1,13 @@ let nock = require('nock'); -module.exports.hash = "a67c24fb83fa73c79347edba2e1c864a"; +module.exports.hash = "52d1543835be98a0fb78af6f1a431564"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/%2B14155550100') .query(true) - .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ + .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -15,19 +15,19 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'ATtBYKyn2Eufkrycv6sGvg.0', + 'RM2px1wxi0CAEjvxmNUIFg.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '1023ms', + '1845ms', 'X-Azure-Ref', - '0UNdsYAAAAADgS3NO2F2eSK5lgnrObjV/WVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0Vwh2YAAAAACKfzkuh8JjQom2Ot+IQD/RWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:49:04 GMT' + 'Tue, 13 Apr 2021 21:08:40 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) - .patch('/phoneNumbers/%2B14155550100/capabilities', {"calling":"inbound+outbound","sms":"inbound"}) + .patch('/phoneNumbers/%2B14155550100/capabilities', {"calling":"none","sms":"outbound"}) .query(true) .reply(202, {"capabilitiesUpdateId":"sanitized"}, [ 'Transfer-Encoding', @@ -41,7 +41,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'FfxylwVGL0uTYsP9K1dWbQ.0', + '31eqp1DDH0OKdmVH50FDng.0', 'Operation-Location', '/phoneNumbers/operations/capabilities_sanitized?api-version=2021-03-07', 'operation-id', @@ -51,43 +51,17 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '844ms', - 'X-Azure-Ref', - '0UddsYAAAAADsYWXT94gqSrkgc+SaN3SiWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 06 Apr 2021 21:49:05 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/phoneNumbers/operations/capabilities_sanitized') - .query(true) - .reply(200, {"status":"notStarted","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:49:06.4573758+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Location', - '/phoneNumbers/+14155550100?api-version=2021-03-07', - 'Access-Control-Expose-Headers', - 'Location', - 'Request-Context', - 'appId=', - 'MS-CV', - 'ZTSw3WFAo0y/pPFJigSRTQ.0', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '262ms', + '937ms', 'X-Azure-Ref', - '0UtdsYAAAAAA2TcEmkn5JTK3ZiqKzLT7HWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0WQh2YAAAAACckf5YgLXXSZunSJzSDC3uWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:49:06 GMT' + 'Tue, 13 Apr 2021 21:08:41 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/capabilities_sanitized') .query(true) - .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:49:06.4573758+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"notStarted","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-13T21:08:42.1982322+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -99,21 +73,21 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'LIce0nZHgEOUATqKouY7wQ.0', + 'gR3QsEz6F0qnwJJpGsLpuA.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '265ms', + '268ms', 'X-Azure-Ref', - '0VddsYAAAAABuimdfKJWUSYyWmFXnjwPRWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0Wgh2YAAAAAC4nSyz4DuTQ4mRI6K878gDWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:49:08 GMT' + 'Tue, 13 Apr 2021 21:08:42 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/capabilities_sanitized') .query(true) - .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:49:06.4573758+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-13T21:08:42.1982322+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -125,21 +99,21 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'qE9tqSF7K0uFqIllOCj4Tw.0', + 'LR2KFpAXwUe9xrrd6UmMag.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '271ms', + '276ms', 'X-Azure-Ref', - '0V9dsYAAAAADuOIYlypzxQYwjws5w6BeBWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0XAh2YAAAAAA9HiEM5aglToc1yvhPl5fxWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:49:10 GMT' + 'Tue, 13 Apr 2021 21:08:44 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/capabilities_sanitized') .query(true) - .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:49:06.4573758+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-13T21:08:42.1982322+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -151,21 +125,21 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'eB+x5sqLCEeLypmD6CiT6Q.0', + 'dCoNGgD7kkyLEzJUSRxt/g.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '260ms', + '346ms', 'X-Azure-Ref', - '0WddsYAAAAAC6p5o5069ZS5a5i4K3dJ5rWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0Xwh2YAAAAAD61cKnxM2nSqYYxGYGoR52WVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:49:14 GMT' + 'Tue, 13 Apr 2021 21:08:46 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/capabilities_sanitized') .query(true) - .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:49:06.4573758+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-13T21:08:42.1982322+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -177,21 +151,21 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - '/Resct4h1k+HDkayWpEYfw.0', + 'I+9HUbLlN0OPO60s+65/Fw.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '258ms', + '274ms', 'X-Azure-Ref', - '0XNdsYAAAAAAh2X4bo9eBT7DvG8127IyrWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0YQh2YAAAAADbgI1AmfK2Q5zHYPKVI7qhWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:49:16 GMT' + 'Tue, 13 Apr 2021 21:08:49 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/capabilities_sanitized') .query(true) - .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:49:06.4573758+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"succeeded","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-13T21:08:42.1982322+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -203,47 +177,21 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'QhuZxD5xskOR2mF+W37phQ.0', + 'qjYTLKOivkGnUdCr1jIrPw.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '285ms', + '291ms', 'X-Azure-Ref', - '0XtdsYAAAAABdccYO7f/LTaSZtAiyL1hUWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0Ywh2YAAAAABYERP6S4uTSL7hzKtYuuZNWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:49:18 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/phoneNumbers/operations/capabilities_sanitized') - .query(true) - .reply(200, {"status":"succeeded","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:49:06.4573758+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Location', - '/phoneNumbers/+14155550100?api-version=2021-03-07', - 'Access-Control-Expose-Headers', - 'Location', - 'Request-Context', - 'appId=', - 'MS-CV', - 'Og4VnPeXokmsILWgN7oPVQ.0', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '664ms', - 'X-Azure-Ref', - '0YNdsYAAAAABMaZ1U76J9S6TXo0LdqixkWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 06 Apr 2021 21:49:21 GMT' + 'Tue, 13 Apr 2021 21:08:51 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/+14155550100') .query(true) - .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound+outbound","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ + .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -251,13 +199,13 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'wOSUAIx9kU20RHksGfhHvg.0', + '20YdCP0QlUaUODBJ/dB2EQ.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '1338ms', + '2446ms', 'X-Azure-Ref', - '0Y9dsYAAAAAAmlibB5PAATZxWlMsnp5iuWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0Zgh2YAAAAADRg7yvck8SQ6SSm1NkJG2dWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:49:24 GMT' + 'Tue, 13 Apr 2021 21:08:55 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update_aad/recording_can_cancel_update_polling.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update_aad/recording_can_cancel_update_polling.js index bda742f889a9..9134619efc8a 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update_aad/recording_can_cancel_update_polling.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update_aad/recording_can_cancel_update_polling.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "d7ae80ea43ba6bda2531404a502cdd4b"; +module.exports.hash = "ec6136b6e06377c3081366dea1ecef48"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -24,15 +24,15 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'x-ms-request-id', 'sanitized', 'x-ms-ests-server', - '2.1.11562.10 - NCUS ProdSlices', + '2.1.11622.22 - SCUS ProdSlices', 'Set-Cookie', - 'fpc=AgQHD2i3hVZClNkbY0AOlKtWyo4SBwAAAPrN_tcOAAAA; expires=Thu, 06-May-2021 21:49:02 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AqFuH3jUh41BkqszcUX-Ti5Wyo4SAgAAAEH_B9gOAAAA; expires=Thu, 13-May-2021 21:08:35 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', 'Set-Cookie', 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', 'Date', - 'Tue, 06 Apr 2021 21:49:01 GMT', + 'Tue, 13 Apr 2021 21:08:34 GMT', 'Content-Length', '1327' ]); @@ -40,7 +40,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/%2B14155550100') .query(true) - .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ + .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -48,19 +48,19 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'ji5gVD6DN0mzysgDrc9QDA.0', + 'AJ3T7k/Cvk2Si9Q8HiaNVQ.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '1157ms', + '3060ms', 'X-Azure-Ref', - '0TtdsYAAAAAAYv9w3w8FMRpQuCd3UwZ1hWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0Uwh2YAAAAAAhalvVEXbzSp/gv/r298nYWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:49:03 GMT' + 'Tue, 13 Apr 2021 21:08:37 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) - .patch('/phoneNumbers/%2B14155550100/capabilities', {"calling":"outbound","sms":"inbound"}) + .patch('/phoneNumbers/%2B14155550100/capabilities', {"calling":"outbound","sms":"inbound+outbound"}) .query(true) .reply(202, {"capabilitiesUpdateId":"sanitized"}, [ 'Transfer-Encoding', @@ -74,7 +74,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'CMR79WI8TUyd6ky0mZ9r6A.0', + 'bvS9ZaOCE0qZgdTO9UK1IQ.0', 'Operation-Location', '/phoneNumbers/operations/capabilities_sanitized?api-version=2021-03-07', 'operation-id', @@ -84,9 +84,9 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '872ms', + '1078ms', 'X-Azure-Ref', - '0T9dsYAAAAAAvEsEr/+pcRqE5w9VfBu7HWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0Vgh2YAAAAAB5Z/SixWkBSolODWamx+sNWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:49:03 GMT' + 'Tue, 13 Apr 2021 21:08:39 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update_aad/recording_can_update_a_phone_numbers_capabilities.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update_aad/recording_can_update_a_phone_numbers_capabilities.js index fda070ca3e54..da017f636c4b 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update_aad/recording_can_update_a_phone_numbers_capabilities.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update_aad/recording_can_update_a_phone_numbers_capabilities.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "a67c24fb83fa73c79347edba2e1c864a"; +module.exports.hash = "52d1543835be98a0fb78af6f1a431564"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -11,8 +11,6 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'no-store, no-cache', 'Pragma', 'no-cache', - 'Content-Length', - '1327', 'Content-Type', 'application/json; charset=utf-8', 'Expires', @@ -26,21 +24,23 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'x-ms-request-id', 'sanitized', 'x-ms-ests-server', - '2.1.11562.10 - EUS ProdSlices', + '2.1.11622.22 - SCUS ProdSlices', 'Set-Cookie', - 'fpc=AgQHD2i3hVZClNkbY0AOlKtWyo4SBgAAAPrN_tcOAAAA; expires=Thu, 06-May-2021 21:48:38 GMT; path=/; secure; HttpOnly; SameSite=None', + 'fpc=AqFuH3jUh41BkqszcUX-Ti5Wyo4SAQAAAEH_B9gOAAAA; expires=Thu, 13-May-2021 21:08:18 GMT; path=/; secure; HttpOnly; SameSite=None', 'Set-Cookie', 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', 'Set-Cookie', 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', 'Date', - 'Tue, 06 Apr 2021 21:48:38 GMT' + 'Tue, 13 Apr 2021 21:08:17 GMT', + 'Content-Length', + '1327' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/%2B14155550100') .query(true) - .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"outbound","sms":"inbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ + .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound+outbound","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -48,15 +48,15 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'QxdMoRauQkqYxkSWZYPSTg.0', + 'bIrLHqoRT0aLh7A+tLY31A.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '1009ms', + '1537ms', 'X-Azure-Ref', - '0NtdsYAAAAAA6hUeI4B2mR53T0mEFqgIKWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0Qgh2YAAAAABbVXHbtlUQRrf23LcVhVPHWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:48:39 GMT' + 'Tue, 13 Apr 2021 21:08:19 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) @@ -74,7 +74,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'KkGIUX9FLUuljIPK44Z3sQ.0', + 'uoCrQGZF00edHNFByIS91Q.0', 'Operation-Location', '/phoneNumbers/operations/capabilities_sanitized?api-version=2021-03-07', 'operation-id', @@ -84,121 +84,17 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '1035ms', - 'X-Azure-Ref', - '0N9dsYAAAAABacZFBGLgxT6sZGayxkKYgWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 06 Apr 2021 21:48:40 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/phoneNumbers/operations/capabilities_sanitized') - .query(true) - .reply(200, {"status":"notStarted","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:48:40.664753+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Location', - '/phoneNumbers/+14155550100?api-version=2021-03-07', - 'Access-Control-Expose-Headers', - 'Location', - 'Request-Context', - 'appId=', - 'MS-CV', - 'l7kvE51MP0eNtzbO8UHDrA.0', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '286ms', - 'X-Azure-Ref', - '0OddsYAAAAACPLneHrTAtSrKjOmdR6aqmWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 06 Apr 2021 21:48:40 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/phoneNumbers/operations/capabilities_sanitized') - .query(true) - .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:48:40.664753+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Location', - '/phoneNumbers/+14155550100?api-version=2021-03-07', - 'Access-Control-Expose-Headers', - 'Location', - 'Request-Context', - 'appId=', - 'MS-CV', - 'iV5jjIqU0UmpqZcPh2sEHA.0', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '261ms', - 'X-Azure-Ref', - '0O9dsYAAAAAC6dm6ifAV5QbdQGPHwFBx+WVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 06 Apr 2021 21:48:42 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/phoneNumbers/operations/capabilities_sanitized') - .query(true) - .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:48:40.664753+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Location', - '/phoneNumbers/+14155550100?api-version=2021-03-07', - 'Access-Control-Expose-Headers', - 'Location', - 'Request-Context', - 'appId=', - 'MS-CV', - 'vInxTBTVKEKRsx/Mw1JXZw.0', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '262ms', - 'X-Azure-Ref', - '0PddsYAAAAAD5tWkt5pFBRJz5p7LLrcmXWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 06 Apr 2021 21:48:45 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/phoneNumbers/operations/capabilities_sanitized') - .query(true) - .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:48:40.664753+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Location', - '/phoneNumbers/+14155550100?api-version=2021-03-07', - 'Access-Control-Expose-Headers', - 'Location', - 'Request-Context', - 'appId=', - 'MS-CV', - 'DPNgTlXRNkCHAMbvMAobOA.0', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '267ms', + '1031ms', 'X-Azure-Ref', - '0P9dsYAAAAACNeDEY0f+KTbDXMo+qB+9WWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0Qwh2YAAAAABq49QmaWw8QZA9XkNac/xIWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:48:47 GMT' + 'Tue, 13 Apr 2021 21:08:20 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/capabilities_sanitized') .query(true) - .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:48:40.664753+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"notStarted","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-13T21:08:20.4693894+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -210,21 +106,21 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'yqNyS6/tB02oZYaXhUIsJg.0', + 'EsoIVVlRBEeTrTIsHkiTvw.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '327ms', + '269ms', 'X-Azure-Ref', - '0QtdsYAAAAAAhK0QGBWEyTrxYDgzzcKQ4WVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0RAh2YAAAAADzEZjrL8LQRZkn4Xh9ZZUJWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:48:49 GMT' + 'Tue, 13 Apr 2021 21:08:20 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/capabilities_sanitized') .query(true) - .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:48:40.664753+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-13T21:08:20.4693894+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -236,21 +132,21 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'eeOUr/2WD06A2/YKDQNfJQ.0', + 'bmerFJLT20qtLcCOGuB+pg.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '267ms', + '256ms', 'X-Azure-Ref', - '0RNdsYAAAAABZDYqHsH6YTqsFRoAw2rsbWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0Rwh2YAAAAABtqVtFQwHuS7y/5Sq3tr4HWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:48:52 GMT' + 'Tue, 13 Apr 2021 21:08:22 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/capabilities_sanitized') .query(true) - .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:48:40.664753+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"running","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-13T21:08:20.4693894+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -262,21 +158,21 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'ho7t690wski7xV5myl8T7Q.0', + 'M7Rsbx4uEkun1dt1klctXQ.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '261ms', + '293ms', 'X-Azure-Ref', - '0RtdsYAAAAADXcjtBvPcuQLsouA6YS7EwWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0SQh2YAAAAACUd4+7Z/tpSLQp2+e/AHWAWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:48:54 GMT' + 'Tue, 13 Apr 2021 21:08:25 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) .get('/phoneNumbers/operations/capabilities_sanitized') .query(true) - .reply(200, {"status":"succeeded","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-06T21:48:40.664753+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ + .reply(200, {"status":"succeeded","resourceLocation":"/phoneNumbers/+14155550100?api-version=2021-03-07","createdDateTime":"2021-04-13T21:08:20.4693894+00:00","id":"capabilities_sanitized","operationType":"updatePhoneNumberCapabilities","lastActionDateTime":"0001-01-01T00:00:00+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -288,15 +184,15 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'eHw0vJxW0ES5RRxfPBM6EQ.0', + '3v+hn5wcnkSMwEbWuNrD+g.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '274ms', + '249ms', 'X-Azure-Ref', - '0SddsYAAAAAC8G71Mf44dTaahvXAibb7mWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0Swh2YAAAAACuVouLvtuJSKOZM18EE2vyWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:48:56 GMT' + 'Tue, 13 Apr 2021 21:08:27 GMT' ]); nock('https://endpoint', {"encodedQueryParams":true}) @@ -310,13 +206,13 @@ nock('https://endpoint', {"encodedQueryParams":true}) 'Request-Context', 'appId=', 'MS-CV', - 'bazU4pWTX02t8823Zw5tqQ.0', + '/LlnZDBrBECn1tV6wCammg.0', 'api-supported-versions', '2021-03-07', 'X-Processing-Time', - '1019ms', + '3239ms', 'X-Azure-Ref', - '0S9dsYAAAAAB83s4Xv8QTQI2WqtnjRv4AWVZSMzBFREdFMDQwNgA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', + '0Tgh2YAAAAAB3bLwZQ8UDT5acA/aCi97CWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', 'Date', - 'Tue, 06 Apr 2021 21:48:59 GMT' + 'Tue, 13 Apr 2021 21:08:32 GMT' ]); diff --git a/sdk/communication/communication-phone-numbers/test/get.aad.spec.ts b/sdk/communication/communication-phone-numbers/test/get.aad.spec.ts deleted file mode 100644 index 5adaf8a55ba1..000000000000 --- a/sdk/communication/communication-phone-numbers/test/get.aad.spec.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder, env, isPlaybackMode } from "@azure/test-utils-recorder"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { PhoneNumbersClient } from "../src/phoneNumbersClient"; -import { - canCreateRecordedClientWithToken, - createRecordedClientWithToken -} from "./utils/recordedClient"; - -describe("PhoneNumbersClient - get phone number [AAD]", function() { - let recorder: Recorder; - let client: PhoneNumbersClient; - - before(function(this: Context) { - if (!canCreateRecordedClientWithToken()) { - this.skip(); - } - }); - - beforeEach(function(this: Context) { - const recordedClient = createRecordedClientWithToken(this); - ({ client, recorder } = recordedClient!); - }); - - afterEach(async function(this: Context) { - if (!this.currentTest?.isPending()) { - await recorder.stop(); - } - }); - - it("can get a purchased phone number", async function(this: Context) { - const purchasedPhoneNumber = isPlaybackMode() ? "+14155550100" : env.AZURE_PHONE_NUMBER; - const { phoneNumber } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); - - assert.strictEqual(purchasedPhoneNumber, phoneNumber); - }).timeout(5000); - - it("errors if phone number not found", async function() { - const fake = "+14155550100"; - try { - await client.getPurchasedPhoneNumber(fake); - } catch (e) { - assert.strictEqual(e.code, "PhoneNumberNotFound"); - assert.strictEqual(e.message, "The specified phone number +14155550100 cannot be found."); - } - }); -}); diff --git a/sdk/communication/communication-phone-numbers/test/get.spec.ts b/sdk/communication/communication-phone-numbers/test/get.spec.ts index aa23205f6887..f511affeb9f1 100644 --- a/sdk/communication/communication-phone-numbers/test/get.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/get.spec.ts @@ -5,36 +5,51 @@ import { Recorder, env, isPlaybackMode } from "@azure/test-utils-recorder"; import { assert } from "chai"; import { Context } from "mocha"; import { PhoneNumbersClient } from "../src/phoneNumbersClient"; -import { createRecordedClient } from "./utils/recordedClient"; +import { matrix } from "./utils/matrix"; +import { + canCreateRecordedClientWithToken, + createRecordedClient, + createRecordedClientWithToken +} from "./utils/recordedClient"; -describe("PhoneNumbersClient - get phone number", function() { - let recorder: Recorder; - let client: PhoneNumbersClient; +matrix([[true, false]], async function(useAad) { + describe(`PhoneNumbersClient - get phone number${useAad ? " [AAD]" : ""}`, function() { + let recorder: Recorder; + let client: PhoneNumbersClient; - beforeEach(function(this: Context) { - ({ client, recorder } = createRecordedClient(this)); - }); + before(function(this: Context) { + if (useAad && !canCreateRecordedClientWithToken()) { + this.skip(); + } + }); - afterEach(async function(this: Context) { - if (!this.currentTest?.isPending()) { - await recorder.stop(); - } - }); + beforeEach(function(this: Context) { + ({ client, recorder } = useAad + ? createRecordedClientWithToken(this)! + : createRecordedClient(this)); + }); + + afterEach(async function(this: Context) { + if (!this.currentTest?.isPending()) { + await recorder.stop(); + } + }); + + it("can get a purchased phone number", async function(this: Context) { + const purchasedPhoneNumber = isPlaybackMode() ? "+14155550100" : env.AZURE_PHONE_NUMBER; + const { phoneNumber } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); + + assert.strictEqual(purchasedPhoneNumber, phoneNumber); + }).timeout(7000); - it("can get a purchased phone number", async function(this: Context) { - const purchasedPhoneNumber = isPlaybackMode() ? "+14155550100" : env.AZURE_PHONE_NUMBER; - const { phoneNumber } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); - - assert.strictEqual(purchasedPhoneNumber, phoneNumber); - }).timeout(5000); - - it("errors if phone number not found", async function() { - const fake = "+14155550100"; - try { - await client.getPurchasedPhoneNumber(fake); - } catch (e) { - assert.strictEqual(e.code, "PhoneNumberNotFound"); - assert.strictEqual(e.message, "The specified phone number +14155550100 cannot be found."); - } + it("errors if phone number not found", async function() { + const fake = "+14155550100"; + try { + await client.getPurchasedPhoneNumber(fake); + } catch (e) { + assert.strictEqual(e.code, "PhoneNumberNotFound"); + assert.strictEqual(e.message, "The specified phone number +14155550100 cannot be found."); + } + }); }); }); diff --git a/sdk/communication/communication-phone-numbers/test/list.aad.spec.ts b/sdk/communication/communication-phone-numbers/test/list.aad.spec.ts deleted file mode 100644 index 32c3d8cc5486..000000000000 --- a/sdk/communication/communication-phone-numbers/test/list.aad.spec.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder } from "@azure/test-utils-recorder"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { PhoneNumbersClient } from "../src/phoneNumbersClient"; -import { - canCreateRecordedClientWithToken, - createRecordedClientWithToken -} from "./utils/recordedClient"; - -describe("PhoneNumbersClient - lists [AAD]", function() { - let recorder: Recorder; - let client: PhoneNumbersClient; - - before(function(this: Context) { - if (!canCreateRecordedClientWithToken()) { - this.skip(); - } - }); - - beforeEach(function(this: Context) { - const recordedClient = createRecordedClientWithToken(this); - ({ client, recorder } = recordedClient!); - }); - - afterEach(async function(this: Context) { - if (!this.currentTest?.isPending()) { - await recorder.stop(); - } - }); - - it("can list all purchased phone numbers", async function() { - let all = 0; - for await (const purchased of client.listPurchasedPhoneNumbers()) { - assert.match(purchased.phoneNumber, /\+\d{1}\d{3}\d{3}\d{4}/g); - all++; - } - - assert.isTrue(all > 0); - }).timeout(20000); -}); diff --git a/sdk/communication/communication-phone-numbers/test/list.spec.ts b/sdk/communication/communication-phone-numbers/test/list.spec.ts index 6d9c0de9a199..e0dbc025a689 100644 --- a/sdk/communication/communication-phone-numbers/test/list.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/list.spec.ts @@ -5,29 +5,44 @@ import { Recorder } from "@azure/test-utils-recorder"; import { assert } from "chai"; import { Context } from "mocha"; import { PhoneNumbersClient } from "../src/phoneNumbersClient"; -import { createRecordedClient } from "./utils/recordedClient"; +import { matrix } from "./utils/matrix"; +import { + canCreateRecordedClientWithToken, + createRecordedClient, + createRecordedClientWithToken +} from "./utils/recordedClient"; -describe("PhoneNumbersClient - lists", function() { - let recorder: Recorder; - let client: PhoneNumbersClient; +matrix([[true, false]], async function(useAad) { + describe(`PhoneNumbersClient - lists${useAad ? " [AAD]" : ""}`, function() { + let recorder: Recorder; + let client: PhoneNumbersClient; - beforeEach(function(this: Context) { - ({ client, recorder } = createRecordedClient(this)); - }); + before(function(this: Context) { + if (useAad && !canCreateRecordedClientWithToken()) { + this.skip(); + } + }); - afterEach(async function(this: Context) { - if (!this.currentTest?.isPending()) { - await recorder.stop(); - } - }); + beforeEach(function(this: Context) { + ({ client, recorder } = useAad + ? createRecordedClientWithToken(this)! + : createRecordedClient(this)); + }); - it("can list all purchased phone numbers", async function() { - let all = 0; - for await (const purchased of client.listPurchasedPhoneNumbers()) { - assert.match(purchased.phoneNumber, /\+\d{1}\d{3}\d{3}\d{4}/g); - all++; - } + afterEach(async function(this: Context) { + if (!this.currentTest?.isPending()) { + await recorder.stop(); + } + }); - assert.isTrue(all > 0); - }).timeout(20000); + it("can list all purchased phone numbers", async function() { + let all = 0; + for await (const purchased of client.listPurchasedPhoneNumbers()) { + assert.match(purchased.phoneNumber, /\+\d{1}\d{3}\d{3}\d{4}/g); + all++; + } + + assert.isTrue(all > 0); + }).timeout(20000); + }); }); diff --git a/sdk/communication/communication-phone-numbers/test/lro.purchaseAndRelease.aad.spec.ts b/sdk/communication/communication-phone-numbers/test/lro.purchaseAndRelease.aad.spec.ts deleted file mode 100644 index fa07ce7a359e..000000000000 --- a/sdk/communication/communication-phone-numbers/test/lro.purchaseAndRelease.aad.spec.ts +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder, env, isPlaybackMode } from "@azure/test-utils-recorder"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { SearchAvailablePhoneNumbersRequest } from "../src"; -import { PhoneNumbersClient } from "../src/phoneNumbersClient"; -import { - canCreateRecordedClientWithToken, - createRecordedClientWithToken -} from "./utils/recordedClient"; - -describe("PhoneNumbersClient - lro - purchase and release [AAD]", function() { - let recorder: Recorder; - let client: PhoneNumbersClient; - - before(function(this: Context) { - const includePhoneNumberLiveTests = env.INCLUDE_PHONENUMBER_LIVE_TESTS === "true"; - const shouldSkip = - !canCreateRecordedClientWithToken() || (!isPlaybackMode() && !includePhoneNumberLiveTests); - - if (shouldSkip) { - this.skip(); - } - }); - - beforeEach(function(this: Context) { - const recordedClient = createRecordedClientWithToken(this); - if (recordedClient) { - ({ client, recorder } = recordedClient); - } - }); - - afterEach(async function(this: Context) { - if (!this.currentTest?.isPending()) { - await recorder.stop(); - } - }); - - it("can purchase and release a phone number", async function(this: Context) { - // search for phone number - const searchRequest: SearchAvailablePhoneNumbersRequest = { - countryCode: "US", - phoneNumberType: "tollFree", - assignmentType: "application", - capabilities: { - sms: "inbound+outbound", - calling: "none" - } - }; - const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest); - const searchResults = await searchPoller.pollUntilDone(); - - assert.ok(searchPoller.getOperationState().isCompleted); - assert.isNotEmpty(searchResults.searchId); - assert.isNotEmpty(searchResults.phoneNumbers); - assert.equal(searchResults.phoneNumbers.length, 1); - - const purchasedPhoneNumber = searchResults.phoneNumbers[0]; - assert.isNotEmpty(purchasedPhoneNumber); - - // purchase phone number - const purchasePoller = await client.beginPurchasePhoneNumbers(searchResults.searchId); - - await purchasePoller.pollUntilDone(); - assert.ok(purchasePoller.getOperationState().isCompleted); - - console.log(`Purchased ${purchasedPhoneNumber}`); - - // get phone number to ensure it was purchased - const { phoneNumber } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); - assert.equal(purchasedPhoneNumber, phoneNumber); - - // release phone number - console.log(`Will release ${purchasedPhoneNumber}`); - - const releasePoller = await client.beginReleasePhoneNumber(purchasedPhoneNumber as string); - - await releasePoller.pollUntilDone(); - assert.ok(releasePoller.getOperationState().isCompleted); - - console.log(`Released: ${purchasedPhoneNumber}`); - }).timeout(60000); -}); diff --git a/sdk/communication/communication-phone-numbers/test/lro.purchaseAndRelease.spec.ts b/sdk/communication/communication-phone-numbers/test/lro.purchaseAndRelease.spec.ts index 4c069922b4f7..5e43ac774fd5 100644 --- a/sdk/communication/communication-phone-numbers/test/lro.purchaseAndRelease.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/lro.purchaseAndRelease.spec.ts @@ -6,71 +6,84 @@ import { assert } from "chai"; import { Context } from "mocha"; import { SearchAvailablePhoneNumbersRequest } from "../src"; import { PhoneNumbersClient } from "../src/phoneNumbersClient"; -import { createRecordedClient } from "./utils/recordedClient"; - -describe("PhoneNumbersClient - lro - purchase and release", function() { - let recorder: Recorder; - let client: PhoneNumbersClient; - - before(function(this: Context) { - const includePhoneNumberLiveTests = env.INCLUDE_PHONENUMBER_LIVE_TESTS === "true"; - if (!includePhoneNumberLiveTests && !isPlaybackMode()) { - this.skip(); - } - }); +import { matrix } from "./utils/matrix"; +import { + canCreateRecordedClientWithToken, + createRecordedClient, + createRecordedClientWithToken +} from "./utils/recordedClient"; + +matrix([[true, false]], async function(useAad) { + describe(`PhoneNumbersClient - lro - purchase and release${useAad ? " [AAD]" : ""}`, function() { + let recorder: Recorder; + let client: PhoneNumbersClient; + + before(function(this: Context) { + if (useAad && !canCreateRecordedClientWithToken()) { + this.skip(); + } - beforeEach(function(this: Context) { - ({ client, recorder } = createRecordedClient(this)); - }); + const includePhoneNumberLiveTests = env.INCLUDE_PHONENUMBER_LIVE_TESTS === "true"; + if (!includePhoneNumberLiveTests && !isPlaybackMode()) { + this.skip(); + } + }); - afterEach(async function(this: Context) { - if (!this.currentTest?.isPending()) { - await recorder.stop(); - } - }); + beforeEach(function(this: Context) { + ({ client, recorder } = useAad + ? createRecordedClientWithToken(this)! + : createRecordedClient(this)); + }); - it("can purchase and release a phone number", async function(this: Context) { - // search for phone number - const searchRequest: SearchAvailablePhoneNumbersRequest = { - countryCode: "US", - phoneNumberType: "tollFree", - assignmentType: "application", - capabilities: { - sms: "inbound+outbound", - calling: "none" + afterEach(async function(this: Context) { + if (!this.currentTest?.isPending()) { + await recorder.stop(); } - }; - const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest); - const searchResults = await searchPoller.pollUntilDone(); + }); - assert.ok(searchPoller.getOperationState().isCompleted); - assert.isNotEmpty(searchResults.searchId); - assert.isNotEmpty(searchResults.phoneNumbers); - assert.equal(searchResults.phoneNumbers.length, 1); + it("can purchase and release a phone number", async function(this: Context) { + // search for phone number + const searchRequest: SearchAvailablePhoneNumbersRequest = { + countryCode: "US", + phoneNumberType: "tollFree", + assignmentType: "application", + capabilities: { + sms: "inbound+outbound", + calling: "none" + } + }; + const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest); + const searchResults = await searchPoller.pollUntilDone(); - const purchasedPhoneNumber = searchResults.phoneNumbers[0]; - assert.isNotEmpty(purchasedPhoneNumber); + assert.ok(searchPoller.getOperationState().isCompleted); + assert.isNotEmpty(searchResults.searchId); + assert.isNotEmpty(searchResults.phoneNumbers); + assert.equal(searchResults.phoneNumbers.length, 1); - // purchase phone number - const purchasePoller = await client.beginPurchasePhoneNumbers(searchResults.searchId); + const purchasedPhoneNumber = searchResults.phoneNumbers[0]; + assert.isNotEmpty(purchasedPhoneNumber); - await purchasePoller.pollUntilDone(); - assert.ok(purchasePoller.getOperationState().isCompleted); + // purchase phone number + const purchasePoller = await client.beginPurchasePhoneNumbers(searchResults.searchId); - console.log(`Purchased ${purchasedPhoneNumber}`); + await purchasePoller.pollUntilDone(); + assert.ok(purchasePoller.getOperationState().isCompleted); - // get phone number to ensure it was purchased - const { phoneNumber } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); - assert.equal(purchasedPhoneNumber, phoneNumber); + console.log(`Purchased ${purchasedPhoneNumber}`); - // release phone number - console.log(`Will release ${purchasedPhoneNumber}`); + // get phone number to ensure it was purchased + const { phoneNumber } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); + assert.equal(purchasedPhoneNumber, phoneNumber); - const releasePoller = await client.beginReleasePhoneNumber(purchasedPhoneNumber as string); + // release phone number + console.log(`Will release ${purchasedPhoneNumber}`); - await releasePoller.pollUntilDone(); - assert.ok(releasePoller.getOperationState().isCompleted); + const releasePoller = await client.beginReleasePhoneNumber(purchasedPhoneNumber as string); - console.log(`Released: ${purchasedPhoneNumber}`); - }).timeout(60000); + await releasePoller.pollUntilDone(); + assert.ok(releasePoller.getOperationState().isCompleted); + + console.log(`Released: ${purchasedPhoneNumber}`); + }).timeout(60000); + }); }); diff --git a/sdk/communication/communication-phone-numbers/test/lro.search.aad.spec.ts b/sdk/communication/communication-phone-numbers/test/lro.search.aad.spec.ts deleted file mode 100644 index 03201b1b9a32..000000000000 --- a/sdk/communication/communication-phone-numbers/test/lro.search.aad.spec.ts +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder } from "@azure/test-utils-recorder"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { SearchAvailablePhoneNumbersRequest } from "../src"; -import { PhoneNumbersClient } from "../src/phoneNumbersClient"; -import { - canCreateRecordedClientWithToken, - createRecordedClientWithToken -} from "./utils/recordedClient"; - -describe("PhoneNumbersClient - lro - search [AAD]", function() { - let recorder: Recorder; - let client: PhoneNumbersClient; - const searchRequest: SearchAvailablePhoneNumbersRequest = { - countryCode: "US", - phoneNumberType: "tollFree", - assignmentType: "application", - capabilities: { - sms: "inbound+outbound", - calling: "none" - } - }; - - before(function(this: Context) { - if (!canCreateRecordedClientWithToken()) { - this.skip(); - } - }); - - beforeEach(function(this: Context) { - const recordedClient = createRecordedClientWithToken(this); - ({ client, recorder } = recordedClient!); - }); - - afterEach(async function(this: Context) { - if (!this.currentTest?.isPending()) { - await recorder.stop(); - } - }); - - it("can search for 1 available phone number by default", async function() { - const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest); - - const results = await searchPoller.pollUntilDone(); - assert.equal(results.phoneNumbers.length, 1); - assert.ok(searchPoller.getOperationState().isCompleted); - }).timeout(20000); - - it("throws on invalid search request", async function() { - // person and toll free is an invalid combination - const invalidSearchRequest: SearchAvailablePhoneNumbersRequest = { - countryCode: "US", - phoneNumberType: "tollFree", - assignmentType: "person", - capabilities: { - sms: "inbound+outbound", - calling: "none" - } - }; - - try { - const searchPoller = await client.beginSearchAvailablePhoneNumbers(invalidSearchRequest); - await searchPoller.pollUntilDone(); - } catch (error) { - assert.equal(error.statusCode, 400); - return; - } - - assert.fail("beginSearchAvailablePhoneNumbers should have thrown an exception."); - }); - - it("can cancel search polling", async function() { - const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest); - - await searchPoller.cancelOperation(); - assert.ok(searchPoller.isStopped); - assert.ok(searchPoller.getOperationState().isCancelled); - }).timeout(20000); -}); diff --git a/sdk/communication/communication-phone-numbers/test/lro.search.spec.ts b/sdk/communication/communication-phone-numbers/test/lro.search.spec.ts index 6b18a20d1aa4..b635c609ceeb 100644 --- a/sdk/communication/communication-phone-numbers/test/lro.search.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/lro.search.spec.ts @@ -6,67 +6,82 @@ import { assert } from "chai"; import { Context } from "mocha"; import { SearchAvailablePhoneNumbersRequest } from "../src"; import { PhoneNumbersClient } from "../src/phoneNumbersClient"; -import { createRecordedClient } from "./utils/recordedClient"; +import { matrix } from "./utils/matrix"; +import { + canCreateRecordedClientWithToken, + createRecordedClient, + createRecordedClientWithToken +} from "./utils/recordedClient"; -describe("PhoneNumbersClient - lro - search", function() { - let recorder: Recorder; - let client: PhoneNumbersClient; - const searchRequest: SearchAvailablePhoneNumbersRequest = { - countryCode: "US", - phoneNumberType: "tollFree", - assignmentType: "application", - capabilities: { - sms: "inbound+outbound", - calling: "none" - } - }; - - beforeEach(function(this: Context) { - ({ client, recorder } = createRecordedClient(this)); - }); - - afterEach(async function(this: Context) { - if (!this.currentTest?.isPending()) { - await recorder.stop(); - } - }); - - it("can search for 1 available phone number by default", async function() { - const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest); - - const results = await searchPoller.pollUntilDone(); - assert.equal(results.phoneNumbers.length, 1); - assert.ok(searchPoller.getOperationState().isCompleted); - }).timeout(20000); - - it("throws on invalid search request", async function() { - // person and toll free is an invalid combination - const invalidSearchRequest: SearchAvailablePhoneNumbersRequest = { +matrix([[true, false]], async function(useAad) { + describe(`PhoneNumbersClient - lro - search${useAad ? " [AAD]" : ""}`, function() { + let recorder: Recorder; + let client: PhoneNumbersClient; + const searchRequest: SearchAvailablePhoneNumbersRequest = { countryCode: "US", phoneNumberType: "tollFree", - assignmentType: "person", + assignmentType: "application", capabilities: { sms: "inbound+outbound", calling: "none" } }; - try { - const searchPoller = await client.beginSearchAvailablePhoneNumbers(invalidSearchRequest); - await searchPoller.pollUntilDone(); - } catch (error) { - assert.equal(error.statusCode, 400); - return; - } + before(function(this: Context) { + if (useAad && !canCreateRecordedClientWithToken()) { + this.skip(); + } + }); - assert.fail("beginSearchAvailablePhoneNumbers should have thrown an exception."); - }); + beforeEach(function(this: Context) { + ({ client, recorder } = useAad + ? createRecordedClientWithToken(this)! + : createRecordedClient(this)); + }); - it("can cancel search polling", async function() { - const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest); + afterEach(async function(this: Context) { + if (!this.currentTest?.isPending()) { + await recorder.stop(); + } + }); + + it("can search for 1 available phone number by default", async function() { + const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest); + + const results = await searchPoller.pollUntilDone(); + assert.equal(results.phoneNumbers.length, 1); + assert.ok(searchPoller.getOperationState().isCompleted); + }).timeout(20000); - await searchPoller.cancelOperation(); - assert.ok(searchPoller.isStopped); - assert.ok(searchPoller.getOperationState().isCancelled); - }).timeout(20000); + it("throws on invalid search request", async function() { + // person and toll free is an invalid combination + const invalidSearchRequest: SearchAvailablePhoneNumbersRequest = { + countryCode: "US", + phoneNumberType: "tollFree", + assignmentType: "person", + capabilities: { + sms: "inbound+outbound", + calling: "none" + } + }; + + try { + const searchPoller = await client.beginSearchAvailablePhoneNumbers(invalidSearchRequest); + await searchPoller.pollUntilDone(); + } catch (error) { + assert.equal(error.statusCode, 400); + return; + } + + assert.fail("beginSearchAvailablePhoneNumbers should have thrown an exception."); + }); + + it("can cancel search polling", async function() { + const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest); + + await searchPoller.cancelOperation(); + assert.ok(searchPoller.isStopped); + assert.ok(searchPoller.getOperationState().isCancelled); + }).timeout(20000); + }); }); diff --git a/sdk/communication/communication-phone-numbers/test/lro.update.aad.spec.ts b/sdk/communication/communication-phone-numbers/test/lro.update.aad.spec.ts deleted file mode 100644 index 35864a7b4996..000000000000 --- a/sdk/communication/communication-phone-numbers/test/lro.update.aad.spec.ts +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder, env, isPlaybackMode } from "@azure/test-utils-recorder"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { PhoneNumberCapabilitiesRequest } from "../src"; -import { PhoneNumbersClient } from "../src/phoneNumbersClient"; -import { buildCapabilityUpdate } from "./utils"; -import { - canCreateRecordedClientWithToken, - createRecordedClientWithToken -} from "./utils/recordedClient"; - -describe("PhoneNumbersClient - lro - update [AAD]", function() { - const purchasedPhoneNumber = isPlaybackMode() ? "+14155550100" : env.AZURE_PHONE_NUMBER; - let recorder: Recorder; - let client: PhoneNumbersClient; - - before(function(this: Context) { - if (!canCreateRecordedClientWithToken()) { - this.skip(); - } - }); - - beforeEach(function(this: Context) { - const recordedClient = createRecordedClientWithToken(this); - ({ client, recorder } = recordedClient!); - }); - - afterEach(async function(this: Context) { - if (!this.currentTest?.isPending()) { - await recorder.stop(); - } - }); - - it("can update a phone number's capabilities", async function() { - const { capabilities } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); - const update: PhoneNumberCapabilitiesRequest = isPlaybackMode() - ? { calling: "none", sms: "outbound" } - : buildCapabilityUpdate(capabilities); - - const updatePoller = await client.beginUpdatePhoneNumberCapabilities( - purchasedPhoneNumber, - update - ); - - const phoneNumber = await updatePoller.pollUntilDone(); - assert.notDeepEqual(phoneNumber.capabilities, capabilities); - assert.deepEqual(phoneNumber.capabilities, update); - }).timeout(30000); - - it("can cancel update polling", async function() { - const { capabilities } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); - const update: PhoneNumberCapabilitiesRequest = isPlaybackMode() - ? { calling: "outbound", sms: "inbound" } - : buildCapabilityUpdate(capabilities); - - const updatePoller = await client.beginUpdatePhoneNumberCapabilities( - purchasedPhoneNumber, - update - ); - - await updatePoller.cancelOperation(); - assert.ok(updatePoller.isStopped); - assert.ok(updatePoller.getOperationState().isCancelled); - }).timeout(5000); -}); diff --git a/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts b/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts index ac7f673534f2..9d47f52c6856 100644 --- a/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts @@ -7,52 +7,67 @@ import { Context } from "mocha"; import { PhoneNumberCapabilitiesRequest } from "../src"; import { PhoneNumbersClient } from "../src/phoneNumbersClient"; import { buildCapabilityUpdate } from "./utils"; -import { createRecordedClient } from "./utils/recordedClient"; +import { matrix } from "./utils/matrix"; +import { + canCreateRecordedClientWithToken, + createRecordedClient, + createRecordedClientWithToken +} from "./utils/recordedClient"; -describe("PhoneNumbersClient - lro - update", function() { - const purchasedPhoneNumber = isPlaybackMode() ? "+14155550100" : env.AZURE_PHONE_NUMBER; - let recorder: Recorder; - let client: PhoneNumbersClient; +matrix([[true, false]], async function(useAad) { + describe(`PhoneNumbersClient - lro - update${useAad ? " [AAD]" : ""}`, function() { + const purchasedPhoneNumber = isPlaybackMode() ? "+14155550100" : env.AZURE_PHONE_NUMBER; + let recorder: Recorder; + let client: PhoneNumbersClient; - beforeEach(function(this: Context) { - ({ client, recorder } = createRecordedClient(this)); - }); + before(function(this: Context) { + if (useAad && !canCreateRecordedClientWithToken()) { + this.skip(); + } + }); - afterEach(async function(this: Context) { - if (!this.currentTest?.isPending()) { - await recorder.stop(); - } - }); + beforeEach(function(this: Context) { + ({ client, recorder } = useAad + ? createRecordedClientWithToken(this)! + : createRecordedClient(this)); + }); + + afterEach(async function(this: Context) { + if (!this.currentTest?.isPending()) { + await recorder.stop(); + } + }); + + it("can update a phone number's capabilities", async function() { + const { capabilities } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); + const update: PhoneNumberCapabilitiesRequest = isPlaybackMode() + ? { calling: "none", sms: "outbound" } + : buildCapabilityUpdate(capabilities); + + const updatePoller = await client.beginUpdatePhoneNumberCapabilities( + purchasedPhoneNumber, + update + ); - it("can update a phone number's capabilities", async function() { - const { capabilities } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); - const update: PhoneNumberCapabilitiesRequest = isPlaybackMode() - ? { calling: "inbound+outbound", sms: "inbound" } - : buildCapabilityUpdate(capabilities); - - const updatePoller = await client.beginUpdatePhoneNumberCapabilities( - purchasedPhoneNumber, - update - ); - - const phoneNumber = await updatePoller.pollUntilDone(); - assert.notDeepEqual(phoneNumber.capabilities, capabilities); - assert.deepEqual(phoneNumber.capabilities, update); - }).timeout(30000); - - it("can cancel update polling", async function() { - const { capabilities } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); - const update: PhoneNumberCapabilitiesRequest = isPlaybackMode() - ? { calling: "inbound", sms: "outbound" } - : buildCapabilityUpdate(capabilities); - - const updatePoller = await client.beginUpdatePhoneNumberCapabilities( - purchasedPhoneNumber, - update - ); - - await updatePoller.cancelOperation(); - assert.ok(updatePoller.isStopped); - assert.ok(updatePoller.getOperationState().isCancelled); - }).timeout(5000); + const phoneNumber = await updatePoller.pollUntilDone(); + assert.notDeepEqual(phoneNumber.capabilities, capabilities); + assert.deepEqual(phoneNumber.capabilities, update); + }).timeout(30000); + + it("can cancel update polling", async function() { + const { capabilities } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); + const update: PhoneNumberCapabilitiesRequest = isPlaybackMode() + ? { calling: "outbound", sms: "inbound+outbound" } + : buildCapabilityUpdate(capabilities); + + const updatePoller = await client.beginUpdatePhoneNumberCapabilities( + purchasedPhoneNumber, + update + ); + + await updatePoller.cancelOperation(); + assert.ok(updatePoller.isStopped); + assert.ok(updatePoller.getOperationState().isCancelled); + }).timeout(5000); + }); }); diff --git a/sdk/communication/communication-phone-numbers/test/utils/index.ts b/sdk/communication/communication-phone-numbers/test/utils/index.ts index 0bbb920e317e..156a2b2a7285 100644 --- a/sdk/communication/communication-phone-numbers/test/utils/index.ts +++ b/sdk/communication/communication-phone-numbers/test/utils/index.ts @@ -21,7 +21,7 @@ export const buildCapabilityUpdate = ( const values: PhoneNumberCapabilityType[] = ["none", "inbound", "outbound", "inbound+outbound"]; return { - sms: shuffle(values).find((val) => val !== capabilities.sms && val !== "inbound"), + sms: shuffle(values).find((val) => val !== capabilities.sms && val !== "inbound" && val !== "none"), calling: shuffle(values).find((val) => val !== capabilities.calling) }; }; diff --git a/sdk/communication/communication-phone-numbers/test/utils/matrix.ts b/sdk/communication/communication-phone-numbers/test/utils/matrix.ts new file mode 100644 index 000000000000..f3dccbc23e19 --- /dev/null +++ b/sdk/communication/communication-phone-numbers/test/utils/matrix.ts @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * @internal + * Takes a jagged 2D array and a function and runs the function with every + * possible combination of elements of each of the arrays + * + * For strong type-checking, it is important that the `matrix` have a strong + * type, such as a `const` literal. + * + * @param values - jagged 2D array specifying the arguments and their possible + * values + * @param handler - the function to run with the different argument combinations + * + * @example + * ```typescript + * matrix([ + * [true, false], + * [1, 2, 3] + * ] as const, + * (useLabels: boolean, attempts: number) => { + * // This body will run six times with the following parameters: + * // - true, 1 + * // - true, 2 + * // - true, 3 + * // - false, 1 + * // - false, 2 + * // - false, 3 + * }); + * ``` + */ +export function matrix>( + values: T, + handler: ( + ...args: { [idx in keyof T]: T[idx] extends ReadonlyArray ? U : never } + ) => Promise +): void { + // Classic recursive approach + if (values.length === 0) { + (handler as () => Promise)(); + } else { + for (const v of values[0]) { + matrix(values.slice(1), (...args) => (handler as any)(v, ...args)); + } + } +} diff --git a/sdk/communication/communication-phone-numbers/test/utils/recordedClient.ts b/sdk/communication/communication-phone-numbers/test/utils/recordedClient.ts index c1a24d4a866d..8e6e9b4e5646 100644 --- a/sdk/communication/communication-phone-numbers/test/utils/recordedClient.ts +++ b/sdk/communication/communication-phone-numbers/test/utils/recordedClient.ts @@ -46,17 +46,12 @@ export const environmentSetup: RecorderEnvironmentSetup = { queryParametersToSkip: [] }; -export function createRecordedClient( - context: Context -): RecordedClient & { - includePhoneNumberLiveTests: boolean; -} { +export function createRecordedClient(context: Context): RecordedClient { const recorder = record(context, environmentSetup); return { client: new PhoneNumbersClient(env.AZURE_COMMUNICATION_LIVETEST_CONNECTION_STRING), - recorder, - includePhoneNumberLiveTests: env.INCLUDE_PHONENUMBER_LIVE_TESTS === "true" + recorder }; } @@ -71,11 +66,7 @@ export const canCreateRecordedClientWithToken = (): boolean => { export function createRecordedClientWithToken( context: Context -): - | (RecordedClient & { - includePhoneNumberLiveTests: boolean; - }) - | undefined { +): RecordedClient | undefined { const recorder = record(context, environmentSetup); let credential: TokenCredential; const endpoint = parseConnectionString(env.AZURE_COMMUNICATION_LIVETEST_CONNECTION_STRING) @@ -89,8 +80,7 @@ export function createRecordedClientWithToken( return { client: new PhoneNumbersClient(endpoint, credential), - recorder, - includePhoneNumberLiveTests: env.INCLUDE_PHONENUMBER_LIVE_TESTS === "true" + recorder }; } @@ -102,8 +92,7 @@ export function createRecordedClientWithToken( return { client: new PhoneNumbersClient(endpoint, credential), - recorder, - includePhoneNumberLiveTests: env.INCLUDE_PHONENUMBER_LIVE_TESTS === "true" + recorder }; } From 5b424b316401a4eee5564a158e9de00e9ad079d4 Mon Sep 17 00:00:00 2001 From: 0rlanand0Wats0n Date: Tue, 13 Apr 2021 14:57:18 -0700 Subject: [PATCH 2/5] . --- .../communication-phone-numbers/test/utils/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/communication/communication-phone-numbers/test/utils/index.ts b/sdk/communication/communication-phone-numbers/test/utils/index.ts index 156a2b2a7285..c794208369ef 100644 --- a/sdk/communication/communication-phone-numbers/test/utils/index.ts +++ b/sdk/communication/communication-phone-numbers/test/utils/index.ts @@ -21,7 +21,9 @@ export const buildCapabilityUpdate = ( const values: PhoneNumberCapabilityType[] = ["none", "inbound", "outbound", "inbound+outbound"]; return { - sms: shuffle(values).find((val) => val !== capabilities.sms && val !== "inbound" && val !== "none"), + sms: shuffle(values).find( + (val) => val !== capabilities.sms && val !== "inbound" && val !== "none" + ), calling: shuffle(values).find((val) => val !== capabilities.calling) }; }; From 97c34b362a98fb5aaf7fed9f9ff2ea0f16bbc155 Mon Sep 17 00:00:00 2001 From: 0rlanand0Wats0n Date: Wed, 14 Apr 2021 10:58:16 -0700 Subject: [PATCH 3/5] delete cancel lro tests --- .../recording_can_cancel_search_polling.json | 26 ------ ...r_1_available_phone_number_by_default.json | 4 +- .../recording_can_cancel_update_polling.json | 39 -------- .../recording_can_cancel_search_polling.js | 35 ------- ...for_1_available_phone_number_by_default.js | 4 +- .../recording_can_cancel_search_polling.js | 68 -------------- ...for_1_available_phone_number_by_default.js | 2 +- .../recording_can_cancel_update_polling.js | 59 ------------ .../recording_can_cancel_update_polling.js | 92 ------------------- .../test/headers.spec.ts | 3 +- .../test/lro.search.spec.ts | 16 ++-- .../test/lro.update.spec.ts | 16 ---- 12 files changed, 13 insertions(+), 351 deletions(-) delete mode 100644 sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_cancel_search_polling.json delete mode 100644 sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__update/recording_can_cancel_update_polling.json delete mode 100644 sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_cancel_search_polling.js delete mode 100644 sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_cancel_search_polling.js delete mode 100644 sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update/recording_can_cancel_update_polling.js delete mode 100644 sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update_aad/recording_can_cancel_update_polling.js diff --git a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_cancel_search_polling.json b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_cancel_search_polling.json deleted file mode 100644 index e37ed27c05d9..000000000000 --- a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_cancel_search_polling.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/availablePhoneNumbers/countries/US/:search", - "query": { - "api-version": "2021-03-07" - }, - "requestBody": "{\"phoneNumberType\":\"tollFree\",\"assignmentType\":\"application\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"quantity\":1}", - "status": 202, - "response": "", - "responseHeaders": { - "content-length": "0", - "location": "/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07", - "operation-id": "search_sanitized", - "operation-location": "/phoneNumbers/operations/search_sanitized?api-version=2021-03-07", - "search-id": "sanitized" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "f09fe7cd91a228be4526bef6f8292679" -} \ No newline at end of file diff --git a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.json b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.json index 34473e7e0132..5b058bbf92dc 100644 --- a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.json +++ b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.json @@ -6,7 +6,7 @@ "query": { "api-version": "2021-03-07" }, - "requestBody": "{\"phoneNumberType\":\"tollFree\",\"assignmentType\":\"application\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"quantity\":1}", + "requestBody": "{\"phoneNumberType\":\"tollFree\",\"assignmentType\":\"application\",\"capabilities\":{\"calling\":\"outbound\",\"sms\":\"none\"},\"quantity\":1}", "status": 202, "response": "", "responseHeaders": { @@ -53,7 +53,7 @@ }, "requestBody": null, "status": 200, - "response": "{\"searchId\":\"sanitized\",\"phoneNumbers\":[\"+14155550100\"],\"phoneNumberType\":\"tollFree\",\"assignmentType\":\"application\",\"capabilities\":{\"calling\":\"none\",\"sms\":\"inbound+outbound\"},\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"},\"searchExpiresBy\":\"2021-04-13T21:36:02.8085754+00:00\"}", + "response": "{\"searchId\":\"sanitized\",\"phoneNumbers\":[\"+14155550100\"],\"phoneNumberType\":\"tollFree\",\"assignmentType\":\"application\",\"capabilities\":{\"calling\":\"outboubd\",\"sms\":\"none\"},\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"},\"searchExpiresBy\":\"2021-04-13T21:36:02.8085754+00:00\"}", "responseHeaders": { "content-type": "application/json; charset=utf-8" } diff --git a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__update/recording_can_cancel_update_polling.json b/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__update/recording_can_cancel_update_polling.json deleted file mode 100644 index e004f23b0974..000000000000 --- a/sdk/communication/communication-phone-numbers/recordings/browsers/phonenumbersclient__lro__update/recording_can_cancel_update_polling.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "recordings": [ - { - "method": "GET", - "url": "https://endpoint/phoneNumbers/%2B14155550100", - "query": { - "api-version": "2021-03-07" - }, - "requestBody": null, - "status": 200, - "response": "{\"id\":\"14155550100\",\"phoneNumber\":\"+14155550100\",\"countryCode\":\"US\",\"phoneNumberType\":\"tollFree\",\"capabilities\":{\"calling\":\"inbound\",\"sms\":\"outbound\"},\"assignmentType\":\"application\",\"purchaseDate\":\"2021-03-26T22:41:03.6935096+00:00\",\"cost\":{\"amount\":2.0,\"currencyCode\":\"USD\",\"billingFrequency\":\"monthly\"}}", - "responseHeaders": { - "content-type": "application/json; charset=utf-8" - } - }, - { - "method": "PATCH", - "url": "https://endpoint/phoneNumbers/%2B14155550100/capabilities", - "query": { - "api-version": "2021-03-07" - }, - "requestBody": "{\"calling\":\"outbound\",\"sms\":\"inbound+outbound\"}", - "status": 202, - "response": "{\"capabilitiesUpdateId\":\"sanitized\"}", - "responseHeaders": { - "capabilities-id": "sanitized", - "content-type": "application/json; charset=utf-8", - "location": "/phoneNumbers/+14155550100?api-version=2021-03-07", - "operation-id": "capabilities_sanitized", - "operation-location": "/phoneNumbers/operations/capabilities_sanitized?api-version=2021-03-07" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "ade22a01faa7444771c83a30f821abab" -} \ No newline at end of file diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_cancel_search_polling.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_cancel_search_polling.js deleted file mode 100644 index 8ee1f305fe0a..000000000000 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_cancel_search_polling.js +++ /dev/null @@ -1,35 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "eda1f822cedbcd5d3605248e629a8354"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/availablePhoneNumbers/countries/US/:search', {"phoneNumberType":"tollFree","assignmentType":"application","capabilities":{"calling":"none","sms":"inbound+outbound"},"quantity":1}) - .query(true) - .reply(202, "", [ - 'Location', - '/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07', - 'Access-Control-Expose-Headers', - 'Location,Operation-Location,operation-id,search-id', - 'Request-Context', - 'appId=', - 'MS-CV', - 'mL+26r8uR0m+CZ4guTEy4A.0', - 'Operation-Location', - '/phoneNumbers/operations/search_sanitized?api-version=2021-03-07', - 'operation-id', - 'search_sanitized', - 'search-id', - 'sanitized', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '2258ms', - 'X-Azure-Ref', - '0UQZ2YAAAAACFkKC2/7FgSbufLSmMEchxWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 13 Apr 2021 21:00:03 GMT', - 'Content-Length', - '0' -]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.js index af6e16b34a49..13c3f6be9905 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search/recording_can_search_for_1_available_phone_number_by_default.js @@ -5,7 +5,7 @@ module.exports.hash = "8018e7a3e03e1b24fcb95ca7061259d1"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} nock('https://endpoint', {"encodedQueryParams":true}) - .post('/availablePhoneNumbers/countries/US/:search', {"phoneNumberType":"tollFree","assignmentType":"application","capabilities":{"calling":"none","sms":"inbound+outbound"},"quantity":1}) + .post('/availablePhoneNumbers/countries/US/:search', {"phoneNumberType":"tollFree","assignmentType":"application","capabilities":{"calling":"outbound","sms":"none"},"quantity":1}) .query(true) .reply(202, "", [ 'Location', @@ -89,7 +89,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) nock('https://endpoint', {"encodedQueryParams":true}) .get('/availablePhoneNumbers/searchResults/sanitized') .query(true) - .reply(200, {"searchId":"sanitized","phoneNumbers":["+14155550100"],"phoneNumberType":"tollFree","assignmentType":"application","capabilities":{"calling":"none","sms":"inbound+outbound"},"cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"},"searchExpiresBy":"2021-04-13T21:15:53.3681276+00:00"}, [ + .reply(200, {"searchId":"sanitized","phoneNumbers":["+14155550100"],"phoneNumberType":"tollFree","assignmentType":"application","capabilities":{"calling":"outbound","sms":"none"},"cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"},"searchExpiresBy":"2021-04-13T21:15:53.3681276+00:00"}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_cancel_search_polling.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_cancel_search_polling.js deleted file mode 100644 index 5326b693efb8..000000000000 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_cancel_search_polling.js +++ /dev/null @@ -1,68 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "eda1f822cedbcd5d3605248e629a8354"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=SomeClientSecret&scope=https%3A%2F%2Fcommunication.azure.com%2F%2F.default") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'sanitized', - 'x-ms-ests-server', - '2.1.11622.22 - NCUS ProdSlices', - 'Set-Cookie', - 'fpc=AhuoueNwlX1KtEq5fHxGsQhWyo4SBgAAABX9B9gOAAAA; expires=Thu, 13-May-2021 20:59:46 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 13 Apr 2021 20:59:46 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/availablePhoneNumbers/countries/US/:search', {"phoneNumberType":"tollFree","assignmentType":"application","capabilities":{"calling":"none","sms":"inbound+outbound"},"quantity":1}) - .query(true) - .reply(202, "", [ - 'Location', - '/availablePhoneNumbers/searchResults/sanitized?api-version=2021-03-07', - 'Access-Control-Expose-Headers', - 'Location,Operation-Location,operation-id,search-id', - 'Request-Context', - 'appId=', - 'MS-CV', - 'x2ANwEie80KI6d/qpoQy/A.0', - 'Operation-Location', - '/phoneNumbers/operations/search_sanitized?api-version=2021-03-07', - 'operation-id', - 'search_sanitized', - 'search-id', - 'sanitized', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '2522ms', - 'X-Azure-Ref', - '0QgZ2YAAAAADXCjvpqDxJR6Gtu0ZXzGFTWVZSMzBFREdFMDQxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 13 Apr 2021 20:59:48 GMT', - 'Content-Length', - '0' -]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_search_for_1_available_phone_number_by_default.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_search_for_1_available_phone_number_by_default.js index 940387427ded..59f05f233079 100644 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_search_for_1_available_phone_number_by_default.js +++ b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__search_aad/recording_can_search_for_1_available_phone_number_by_default.js @@ -38,7 +38,7 @@ nock('https://endpoint', {"encodedQueryParams":true}) ]); nock('https://endpoint', {"encodedQueryParams":true}) - .post('/availablePhoneNumbers/countries/US/:search', {"phoneNumberType":"tollFree","assignmentType":"application","capabilities":{"calling":"none","sms":"inbound+outbound"},"quantity":1}) + .post('/availablePhoneNumbers/countries/US/:search', {"phoneNumberType":"tollFree","assignmentType":"application","capabilities":{"calling":"outbound","sms":"none"},"quantity":1}) .query(true) .reply(202, "", [ 'Location', diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update/recording_can_cancel_update_polling.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update/recording_can_cancel_update_polling.js deleted file mode 100644 index 28bdc54c76df..000000000000 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update/recording_can_cancel_update_polling.js +++ /dev/null @@ -1,59 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "ec6136b6e06377c3081366dea1ecef48"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/phoneNumbers/%2B14155550100') - .query(true) - .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"inbound+outbound","sms":"outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'UEcrLqAeXEu6GCSpIF2VhA.0', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '1136ms', - 'X-Azure-Ref', - '0agh2YAAAAADZ8oOJajZoTpXvtyFC0UbBWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 13 Apr 2021 21:08:59 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .patch('/phoneNumbers/%2B14155550100/capabilities', {"calling":"outbound","sms":"inbound+outbound"}) - .query(true) - .reply(202, {"capabilitiesUpdateId":"sanitized"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Location', - '/phoneNumbers/+14155550100?api-version=2021-03-07', - 'Access-Control-Expose-Headers', - 'Operation-Location,Location,operation-id,capabilities-id', - 'Request-Context', - 'appId=', - 'MS-CV', - 'h7OfD1ZR9063UqUIWmdjKQ.0', - 'Operation-Location', - '/phoneNumbers/operations/capabilities_sanitized?api-version=2021-03-07', - 'operation-id', - 'capabilities_sanitized', - 'capabilities-id', - 'sanitized', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '986ms', - 'X-Azure-Ref', - '0awh2YAAAAAC2z2SciLQ0T7xupiwjySf3WVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 13 Apr 2021 21:09:00 GMT' -]); diff --git a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update_aad/recording_can_cancel_update_polling.js b/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update_aad/recording_can_cancel_update_polling.js deleted file mode 100644 index 9134619efc8a..000000000000 --- a/sdk/communication/communication-phone-numbers/recordings/node/phonenumbersclient__lro__update_aad/recording_can_cancel_update_polling.js +++ /dev/null @@ -1,92 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "ec6136b6e06377c3081366dea1ecef48"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=SomeClientSecret&scope=https%3A%2F%2Fcommunication.azure.com%2F%2F.default") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'sanitized', - 'x-ms-ests-server', - '2.1.11622.22 - SCUS ProdSlices', - 'Set-Cookie', - 'fpc=AqFuH3jUh41BkqszcUX-Ti5Wyo4SAgAAAEH_B9gOAAAA; expires=Thu, 13-May-2021 21:08:35 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 13 Apr 2021 21:08:34 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/phoneNumbers/%2B14155550100') - .query(true) - .reply(200, {"id":"14155550100","phoneNumber":"+14155550100","countryCode":"US","phoneNumberType":"tollFree","capabilities":{"calling":"none","sms":"inbound+outbound"},"assignmentType":"application","purchaseDate":"2021-03-26T22:41:03.6935096+00:00","cost":{"amount":2,"currencyCode":"USD","billingFrequency":"monthly"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'AJ3T7k/Cvk2Si9Q8HiaNVQ.0', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '3060ms', - 'X-Azure-Ref', - '0Uwh2YAAAAAAhalvVEXbzSp/gv/r298nYWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 13 Apr 2021 21:08:37 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .patch('/phoneNumbers/%2B14155550100/capabilities', {"calling":"outbound","sms":"inbound+outbound"}) - .query(true) - .reply(202, {"capabilitiesUpdateId":"sanitized"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Location', - '/phoneNumbers/+14155550100?api-version=2021-03-07', - 'Access-Control-Expose-Headers', - 'Operation-Location,Location,operation-id,capabilities-id', - 'Request-Context', - 'appId=', - 'MS-CV', - 'bvS9ZaOCE0qZgdTO9UK1IQ.0', - 'Operation-Location', - '/phoneNumbers/operations/capabilities_sanitized?api-version=2021-03-07', - 'operation-id', - 'capabilities_sanitized', - 'capabilities-id', - 'sanitized', - 'api-supported-versions', - '2021-03-07', - 'X-Processing-Time', - '1078ms', - 'X-Azure-Ref', - '0Vgh2YAAAAAB5Z/SixWkBSolODWamx+sNWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Tue, 13 Apr 2021 21:08:39 GMT' -]); diff --git a/sdk/communication/communication-phone-numbers/test/headers.spec.ts b/sdk/communication/communication-phone-numbers/test/headers.spec.ts index cd98dcf548c2..a46c44603170 100644 --- a/sdk/communication/communication-phone-numbers/test/headers.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/headers.spec.ts @@ -11,6 +11,7 @@ import { PhoneNumbersClient } from "../src/phoneNumbersClient"; import { getPhoneNumberHttpClient } from "./utils/mockHttpClients"; import { SDK_VERSION } from "../src/utils/constants"; import { Context } from "mocha"; +import { canCreateRecordedClientWithToken } from "./utils/recordedClient"; describe("PhoneNumbersClient - headers", function() { const endpoint = "https://contoso.spool.azure.local"; @@ -78,7 +79,7 @@ describe("PhoneNumbersClient - headers", function() { }); it("sets bearer authorization header with TokenCredential", async function(this: Context) { - if (!isNode || isPlaybackMode()) { + if (!canCreateRecordedClientWithToken() || isPlaybackMode()) { this.skip(); } diff --git a/sdk/communication/communication-phone-numbers/test/lro.search.spec.ts b/sdk/communication/communication-phone-numbers/test/lro.search.spec.ts index b635c609ceeb..b6dc6ec91245 100644 --- a/sdk/communication/communication-phone-numbers/test/lro.search.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/lro.search.spec.ts @@ -22,12 +22,16 @@ matrix([[true, false]], async function(useAad) { phoneNumberType: "tollFree", assignmentType: "application", capabilities: { - sms: "inbound+outbound", - calling: "none" + sms: "none", + calling: "outbound" } }; before(function(this: Context) { + // SKIPPING BECAUSE TOLL-FREE ACQUISITION IS DISABLED + // STOP SKIPPING WHEN SERVICE ENABLES ACQUISITION + this.skip(); + if (useAad && !canCreateRecordedClientWithToken()) { this.skip(); } @@ -75,13 +79,5 @@ matrix([[true, false]], async function(useAad) { assert.fail("beginSearchAvailablePhoneNumbers should have thrown an exception."); }); - - it("can cancel search polling", async function() { - const searchPoller = await client.beginSearchAvailablePhoneNumbers(searchRequest); - - await searchPoller.cancelOperation(); - assert.ok(searchPoller.isStopped); - assert.ok(searchPoller.getOperationState().isCancelled); - }).timeout(20000); }); }); diff --git a/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts b/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts index 9d47f52c6856..706dd010bf88 100644 --- a/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts @@ -53,21 +53,5 @@ matrix([[true, false]], async function(useAad) { assert.notDeepEqual(phoneNumber.capabilities, capabilities); assert.deepEqual(phoneNumber.capabilities, update); }).timeout(30000); - - it("can cancel update polling", async function() { - const { capabilities } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); - const update: PhoneNumberCapabilitiesRequest = isPlaybackMode() - ? { calling: "outbound", sms: "inbound+outbound" } - : buildCapabilityUpdate(capabilities); - - const updatePoller = await client.beginUpdatePhoneNumberCapabilities( - purchasedPhoneNumber, - update - ); - - await updatePoller.cancelOperation(); - assert.ok(updatePoller.isStopped); - assert.ok(updatePoller.getOperationState().isCancelled); - }).timeout(5000); }); }); From 27e9101abf830cc2dee94e1cc38bc1f108909c35 Mon Sep 17 00:00:00 2001 From: 0rlanand0Wats0n Date: Wed, 14 Apr 2021 13:27:05 -0700 Subject: [PATCH 4/5] =?UTF-8?q?remove=20buildCapabilityUpdate=20?= =?UTF-8?q?=F0=9F=98=AD=F0=9F=98=AD=F0=9F=98=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/lro.update.spec.ts | 9 ++---- .../test/utils/index.ts | 29 ------------------- 2 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 sdk/communication/communication-phone-numbers/test/utils/index.ts diff --git a/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts b/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts index 706dd010bf88..ef4d46e9af32 100644 --- a/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts @@ -6,7 +6,6 @@ import { assert } from "chai"; import { Context } from "mocha"; import { PhoneNumberCapabilitiesRequest } from "../src"; import { PhoneNumbersClient } from "../src/phoneNumbersClient"; -import { buildCapabilityUpdate } from "./utils"; import { matrix } from "./utils/matrix"; import { canCreateRecordedClientWithToken, @@ -39,18 +38,14 @@ matrix([[true, false]], async function(useAad) { }); it("can update a phone number's capabilities", async function() { - const { capabilities } = await client.getPurchasedPhoneNumber(purchasedPhoneNumber); - const update: PhoneNumberCapabilitiesRequest = isPlaybackMode() - ? { calling: "none", sms: "outbound" } - : buildCapabilityUpdate(capabilities); - + const update: PhoneNumberCapabilitiesRequest = { calling: "none", sms: "outbound" } const updatePoller = await client.beginUpdatePhoneNumberCapabilities( purchasedPhoneNumber, update ); const phoneNumber = await updatePoller.pollUntilDone(); - assert.notDeepEqual(phoneNumber.capabilities, capabilities); + assert.ok(updatePoller.getOperationState().isCompleted); assert.deepEqual(phoneNumber.capabilities, update); }).timeout(30000); }); diff --git a/sdk/communication/communication-phone-numbers/test/utils/index.ts b/sdk/communication/communication-phone-numbers/test/utils/index.ts deleted file mode 100644 index c794208369ef..000000000000 --- a/sdk/communication/communication-phone-numbers/test/utils/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { PhoneNumberCapabilitiesRequest, PhoneNumberCapabilityType } from "../../src"; - -// Fisher-Yates Shuffle algo implementation -const shuffle = (list: T[]): T[] => { - for (let i = list.length - 1; i > 0; i--) { - const j = Math.floor(Math.random() * i); - const temp = list[i]; - list[i] = list[j]; - list[j] = temp; - } - - return list; -}; - -export const buildCapabilityUpdate = ( - capabilities: PhoneNumberCapabilitiesRequest -): PhoneNumberCapabilitiesRequest => { - const values: PhoneNumberCapabilityType[] = ["none", "inbound", "outbound", "inbound+outbound"]; - - return { - sms: shuffle(values).find( - (val) => val !== capabilities.sms && val !== "inbound" && val !== "none" - ), - calling: shuffle(values).find((val) => val !== capabilities.calling) - }; -}; From bc0b1b23847f0ed0dce229aab8d2d2c080b2ab8c Mon Sep 17 00:00:00 2001 From: 0rlanand0Wats0n Date: Wed, 14 Apr 2021 13:27:13 -0700 Subject: [PATCH 5/5] . --- .../communication-phone-numbers/test/lro.update.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts b/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts index ef4d46e9af32..22d75b4e460d 100644 --- a/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts +++ b/sdk/communication/communication-phone-numbers/test/lro.update.spec.ts @@ -38,7 +38,7 @@ matrix([[true, false]], async function(useAad) { }); it("can update a phone number's capabilities", async function() { - const update: PhoneNumberCapabilitiesRequest = { calling: "none", sms: "outbound" } + const update: PhoneNumberCapabilitiesRequest = { calling: "none", sms: "outbound" }; const updatePoller = await client.beginUpdatePhoneNumberCapabilities( purchasedPhoneNumber, update