From 77ce169e68849b708961fb216419a3ea69a6efd9 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 9 Dec 2021 10:49:49 +0000 Subject: [PATCH] CodeGen from PR 16882 in Azure/azure-rest-api-specs Merge d2959ed2308f3f04c11c443ffe290a7a14cd90c4 into 85d11472e0e6d69603edb824b40f5fee71e87d2d --- sdk/botservice/arm-botservice/CHANGELOG.md | 29 +- sdk/botservice/arm-botservice/README.md | 2 +- sdk/botservice/arm-botservice/_meta.json | 6 +- sdk/botservice/arm-botservice/package.json | 16 +- .../recording_bots_create_test.js | 143 ------ .../recording_bots_delete_test.js | 173 ------- .../recording_bots_get_test.js | 147 ------ .../recording_bots_list_test.js | 179 ------- .../recording_msteamschannel_create_test.js | 143 ------ .../recording_msteamschannel_delete_test.js | 173 ------- .../recording_msteamschannel_get_test.js | 147 ------ .../recording_msteamschannel_list_test.js | 145 ------ .../review/arm-botservice.api.md | 60 ++- .../arm-botservice/src/azureBotService.ts | 49 +- .../src/azureBotServiceContext.ts | 70 --- sdk/botservice/arm-botservice/src/index.ts | 1 - .../arm-botservice/src/models/index.ts | 199 +++---- .../arm-botservice/src/models/mappers.ts | 485 ++++++++++-------- .../src/operations/botConnection.ts | 6 +- .../arm-botservice/src/operations/bots.ts | 6 +- .../arm-botservice/src/operations/channels.ts | 8 +- .../src/operations/directLine.ts | 6 +- .../src/operations/hostSettings.ts | 6 +- .../src/operations/operationResults.ts | 6 +- .../src/operations/operations.ts | 6 +- .../operations/privateEndpointConnections.ts | 6 +- .../src/operations/privateLinkResources.ts | 6 +- .../test/botservice_examples.ts | 142 ----- .../arm-botservice/test/sampleTest.ts | 48 ++ 29 files changed, 561 insertions(+), 1852 deletions(-) delete mode 100644 sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_create_test.js delete mode 100644 sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_delete_test.js delete mode 100644 sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_get_test.js delete mode 100644 sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_list_test.js delete mode 100644 sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_create_test.js delete mode 100644 sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_delete_test.js delete mode 100644 sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_get_test.js delete mode 100644 sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_list_test.js delete mode 100644 sdk/botservice/arm-botservice/src/azureBotServiceContext.ts delete mode 100644 sdk/botservice/arm-botservice/test/botservice_examples.ts create mode 100644 sdk/botservice/arm-botservice/test/sampleTest.ts diff --git a/sdk/botservice/arm-botservice/CHANGELOG.md b/sdk/botservice/arm-botservice/CHANGELOG.md index 01a3b8bd4bdb..0fcd8d1ef423 100644 --- a/sdk/botservice/arm-botservice/CHANGELOG.md +++ b/sdk/botservice/arm-botservice/CHANGELOG.md @@ -1,26 +1,11 @@ -## Release History +# Release History + +## 4.0.0-beta.2 (2021-12-09) -### 4.0.0-beta.2 (Unreleased) +The package of @azure/arm-botservice is using our next generation design principles since version 4.0.0-beta.2, which contains breaking changes. -#### Features Added +To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). -#### Breaking Changes +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -#### Bugs Fixed - -#### Other Changes - -### 4.0.0-beta.1 (2021-11-23) - -This is the first preview for the new version of the `@azure/arm-botservice` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services. - -While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/). - -Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies. - -**Noteworthy changes and features** -- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice. -- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead. -- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page. -- Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`. -- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6. +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/botservice/arm-botservice/README.md b/sdk/botservice/arm-botservice/README.md index 7c617cc93cf4..45984ef5bf4e 100644 --- a/sdk/botservice/arm-botservice/README.md +++ b/sdk/botservice/arm-botservice/README.md @@ -6,7 +6,7 @@ Azure Bot Service is a platform for creating smart conversational agents. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/botservice/arm-botservice) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-botservice) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-botservice?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-botservice) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/botservice/arm-botservice/_meta.json b/sdk/botservice/arm-botservice/_meta.json index 433057a15e72..970e815bf540 100644 --- a/sdk/botservice/arm-botservice/_meta.json +++ b/sdk/botservice/arm-botservice/_meta.json @@ -1,7 +1,7 @@ { - "commit": "b81af692dbb8395672116d85805cbc9ad1432f3b", + "commit": "892aa6e4d8ec4f7ada876f38687ad303a4c25396", "readme": "specification/botservice/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/botservice/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.15.20211116.1", + "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/botservice/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.15.20211116.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1" } \ No newline at end of file diff --git a/sdk/botservice/arm-botservice/package.json b/sdk/botservice/arm-botservice/package.json index 01799a46614d..b258a330857b 100644 --- a/sdk/botservice/arm-botservice/package.json +++ b/sdk/botservice/arm-botservice/package.json @@ -4,9 +4,7 @@ "author": "Microsoft Corporation", "description": "A generated SDK for AzureBotService.", "version": "4.0.0-beta.2", - "engines": { - "node": ">=12.0.0" - }, + "engines": { "node": ">=12.0.0" }, "dependencies": { "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", @@ -16,13 +14,7 @@ "@azure/core-rest-pipeline": "^1.1.0", "tslib": "^2.2.0" }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], + "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], "license": "MIT", "main": "./dist/index.js", "module": "./dist-esm/src/index.js", @@ -49,9 +41,7 @@ "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, + "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", "dist/**/*.js.map", diff --git a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_create_test.js b/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_create_test.js deleted file mode 100644 index 0122a4cdd509..000000000000 --- a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_create_test.js +++ /dev/null @@ -1,143 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "08f00ff4f43f33bc0869e66299dddd86"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'a288a99e-516f-4e68-bc6a-f011bd451500', - 'x-ms-ests-server', - '2.1.12249.14 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=Ali-4mlgtgBPhS2m3YEadG4; expires=Fri, 24-Dec-2021 02:02:43 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr3qmlIa0JbBTkylcNEI5Oewpnug0eEAU00EX-mHAzi9wI_GhbZc5haV08gjBqcYxjMFX7FIiydusddfBNJZwvzaPDikyOe9op3baDSNgHCsdVrO28iXXS5DdbfNiDsVQZe_7vGPab94v2ERwKVqoXaDhqwuvgsRVDw-si8eF_HNkgAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:02:42 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '055667e2-b61d-41bf-855f-5896296b1600', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=Auc_POZU7QBBoHT9BDQH7UM; expires=Fri, 24-Dec-2021 02:02:44 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr9XTZms8MTZGcFWQLVmjnciZCq0_Bepz7jDSgbQaKiTweCjHPz_f0jzxh7SU1uhATRV_0W9HIGDM5sHjojBdg13A0ZtkKbhjo5w6QbL-f1A_LW4NhN5an3KaOATi721x1tNui7gypMvYZzqErlNWYtwGdcKb-FQSGEEs7bxTG0vQgAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:02:43 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.3&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=d5f8b504-5cd7-4088-ab72-16a4b2d98ba4&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .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', - 'd4c5ebe5-a43d-402b-a22f-9192047c1600', - 'x-ms-ests-server', - '2.1.12249.14 - SEASLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AoKdoEEgmrhOuHxWySW7ze8WPr5BAQAAAESUL9kOAAAA; expires=Fri, 24-Dec-2021 02:02:44 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', - 'Wed, 24 Nov 2021 02:02:43 GMT', - 'Content-Length', - '1374' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.BotService/botServices/mybotxxx', {"location":"global","tags":{"tag1":"value1","tag2":"value2"},"sku":{"name":"S1"},"kind":"sdk","etag":"etag1","properties":{"displayName":"this is a test bot","description":"The description of the bot","endpoint":"https://bing.com/messages/","msaAppId":"41a220b9-6571-4f0b-bbd2-43f1c1d82f51","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af52a","developerAppInsightsApiKey":"w24iw5ocbhcig71su7ibaj63hey5ieaozeuwdv2r","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a2b"}}) - .query(true) - .reply(201, {"id":"/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.BotService/botServices/mybotxxx","name":"mybotxxx","type":"Microsoft.BotService/botServices","etag":"\"0b005103-0000-1800-0000-619d9d4f0000\"","location":"global","sku":{"name":"S1"},"kind":"sdk","tags":{"tag1":"value1","tag2":"value2"},"properties":{"displayName":"this is a test bot","description":"The description of the bot","iconUrl":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"41a220b9-6571-4f0b-bbd2-43f1c1d82f51","msaAppTenantId":null,"msaAppType":null,"msaAppMSIResourceId":null,"developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af52a","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a2b","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"isStreamingSupported":false,"schemaTransformationVersion":"1.3","publishingCredentials":null,"parameters":null,"allSettings":null,"manifestUrl":null,"storageResourceId":null,"migrationToken":null,"isCmekEnabled":false,"cmekKeyVaultUrl":null,"openWithHint":null,"appPasswordHint":null,"isIsolated":false,"disableLocalAuth":false,"cmekEncryptionStatus":"Off","provisioningState":"Succeeded"},"zones":[]}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '1384', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'ETag', - '"0b005103-0000-1800-0000-619d9d4f0000"', - 'x-ms-request-id', - 'c4a13e28-9594-49f0-ace7-4142c5d42495', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-writes', - '1199', - 'x-ms-correlation-request-id', - '6f588a49-bdf4-477f-8239-cb296051ee7a', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211124T020257Z:6f588a49-bdf4-477f-8239-cb296051ee7a', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Wed, 24 Nov 2021 02:02:57 GMT' -]); diff --git a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_delete_test.js b/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_delete_test.js deleted file mode 100644 index 4d555b241710..000000000000 --- a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_delete_test.js +++ /dev/null @@ -1,173 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "030abc87a77386bc21f76e2f6e345757"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'a288a99e-516f-4e68-bc6a-f011bb461500', - 'x-ms-ests-server', - '2.1.12249.14 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AhmrsokyBkZFnsZysqNONpk; expires=Fri, 24-Dec-2021 02:03:14 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevroHhOpzOy2oBoPTtjoW50g9hVAIi3xVOKu2l2GTHaVxTfjh7tz_VfNmHhPX0gSmtYny5WVafHxF-LwQ10NHahOVCkiL2qRvdKT6tid4LpMPM_8wvSbobLnTCDYO_GXsE4TM8MiABMLIQ8zaakpTOZbiF6cNOC3ruIh3e0BMcjhm4gAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:03:13 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'd4c5ebe5-a43d-402b-a22f-9192f87c1600', - 'x-ms-ests-server', - '2.1.12249.14 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AlT0lIBf3J5EiiwMvSddfpk; expires=Fri, 24-Dec-2021 02:03:14 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr8_TOdjhqt0dhUR2kjPXjKR-FMQGFiNTBafFdfrRRTjgRF-8gi7UdMzImJL4j1e-hK0bElhDkbFe6UymEMOekKX08O0ywXu1Lcdl1XeBJ-07PWNt7uWrI_E1Hi7AEEJAl6hXHNAVBjXmpjn7c2afyBADSvp3zCf5rFXIP3rF5LzMgAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:03:13 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.3&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=7bc89e97-74d1-487f-b8f4-3a5ae200e393&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .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', - '055667e2-b61d-41bf-855f-5896256c1600', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AmqeZYBr2yZImwdyY0NUrNUWPr5BAQAAAGGUL9kOAAAA; expires=Fri, 24-Dec-2021 02:03:14 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', - 'Wed, 24 Nov 2021 02:03:13 GMT', - 'Content-Length', - '1374' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.BotService/botServices/mybotxxx') - .query(true) - .reply(200, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14998', - 'x-ms-request-id', - '119448c4-8977-445b-9c79-bfabd7e15573', - 'x-ms-correlation-request-id', - '119448c4-8977-445b-9c79-bfabd7e15573', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211124T020323Z:119448c4-8977-445b-9c79-bfabd7e15573', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Wed, 24 Nov 2021 02:03:23 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.BotService/botServices') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bdefff","92ff0742ea40440c000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'x-ms-ratelimit-remaining-subscription-reads', - '11993', - 'x-ms-request-id', - 'dc055665-8f8a-4e00-a842-68a140df3ae4', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-correlation-request-id', - '0e4877ce-2d2b-43d1-8b33-421e5babba01', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211124T020325Z:0e4877ce-2d2b-43d1-8b33-421e5babba01', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Wed, 24 Nov 2021 02:03:25 GMT' -]); diff --git a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_get_test.js b/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_get_test.js deleted file mode 100644 index 16e588bede73..000000000000 --- a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_get_test.js +++ /dev/null @@ -1,147 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "d2d5601de1b21e4768cb30d5c7d7ad30"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '8cb4563b-d447-431d-9dfd-46c4dd021600', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AsZ2ZFJRpuBEkrQfnBwviZc; expires=Fri, 24-Dec-2021 02:02:58 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrttuuGMOP1HXcAKpaFfKA9qXlgotSped-oDRoEyKShJ7zRcp8Uen7zZwPO7JliDmhsZErNpBunsn6Fma0cm58-3yXqTLIXdmILtN7l0vr-LtYjfsW-SDLKv3GXFBH6ss1cW5HWZbACnkNAvC2GaifkvRcy3dBeQZnwla03FMTDJsgAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:02:57 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '5b83d9e2-0c83-43e0-8b24-d76be63e1600', - 'x-ms-ests-server', - '2.1.12249.14 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=ArdN6O0_UppIuFjv7txQvgY; expires=Fri, 24-Dec-2021 02:02:58 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrGREa5QQC0pThVKheWFkBEPnbo8X1Y-iggR1xzLZTTssMuHS-wLbfmuDMgIpGWEpyqcRrrGwuvbXWTgCFHZlgxGnBz9LIroiAUFA3bRGCqXZF9EcZTMaNW-e3b-hyOAPqIMi6x86iFQrPJanenTwOX02zaS-cQXuVu4owr4OeHIsgAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:02:57 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.3&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=e3c46ac1-61cd-4eac-945b-d82c6bbe37ea&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .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', - '8cb4563b-d447-431d-9dfd-46c4df021600', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AmG77Rh9mI1Psd8s4vTUKhAWPr5BAQAAAFGUL9kOAAAA; expires=Fri, 24-Dec-2021 02:02:58 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', - 'Wed, 24 Nov 2021 02:02:57 GMT', - 'Content-Length', - '1374' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.BotService/botServices/mybotxxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e9f54edebbcbe2ca6f9dd89fd15efd05fefdebdfb68f4d1325be48488f7497bbdc2273701a196799b5d50cbdff7a39dc9cecefddd9d7bdb3bf46cef1ed03ff4cbcef6a7bb0f670f67fbe7f4fbceeffb11bd5156d30c43a5b72eca6a9295f459f376fdd1a35f6c1079bdfbd12f197df4b658823ccdec2d35a05e1ab4a09fbbf4e16556aef35df97ccffcbd87b78802abbc6e0b428e9acf8a665566d72f3286dbce8b26a5ff65298895d24008c22cb7c4a7266fe679ea7d9256e7694b1f49d3625a2dbfaa4b6a366fdb55f3e8eedd59356dc6f4e5794d3d5c55f5dbf1b45adc6d5a1ae0f4ee2cbf5c55759b9577a765912fdbbbc522bbc81b1070dbbeb03dcbcfb375d98e57cb0bea225fce5655b16cbd3e26c5f282c12ef2a66100d46ed164c7abd51908b4bf9bededed4c1e6e7f7affc1ee36117ab23d99ccf6b6f7ef9def4e7767077be7f7412979e34dbecc962dde5baecbd27ecad3ed7ff2c5ebb357ca63ae310d282f415e6a70b66c8a8b79fb7be5d784c2fd87f777ef4db2d9f6ee4e463c3bdbdfdd9eeccf76b627bbd37bfbd34fb3f3fb7b19a11079bfa15fcb4218021d7d445c7e6fff603fdfbe773e9b6cef4feee7db0fb3d983ed87fb93597e6f2fbf9fed4d0854b92ef0ead98ca6f97bdf7774fbc9bc6e081401ba37dea1763463e7c5c5bace6727f36cb9cc4bb4ffe82a9f4ce759fb11bf984dcaf8b7847051e7d3b62c96399a16cdd3e8000a22c2eb9ca6acadd7399abd6eeb3c5bd0b4bd5eafc001390dec3c2b1bfab299cef345f6a6ce96cd79552f78dc0ee7ddf13dea75b59e944533a7f74f086f629c82de3573b0cac0392dbd623ec9ca927a6fa9b9fd68912d8b7362716656f9a869ab9a98a73fa98be2a26634de546f7342423e2d9a9345fef674c9c4b1d84fe9331aec4f82613dd84491e5778b76fe6d9a00f359b65abdcc9a86587ce67f5c34674d55663e494846d1cb73520be5f1ba9ddb2fd0dbe9725a5fb328be26a15ad3083ffaf2fc1c4482a603d968dcf88af8f7a3d7ebe934278acda0087e502da103bef7fd5f","f2ff00ba81ddfe68050000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'ETag', - '"0b005103-0000-1800-0000-619d9d4f0000"', - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'x-ms-ratelimit-remaining-subscription-reads', - '11999', - 'x-ms-request-id', - '2888a206-b4af-4738-9a6b-a243262ff0b0', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-correlation-request-id', - '5578c7bc-9344-4e01-bb15-8cab168ae188', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211124T020258Z:5578c7bc-9344-4e01-bb15-8cab168ae188', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Wed, 24 Nov 2021 02:02:57 GMT' -]); diff --git a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_list_test.js b/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_list_test.js deleted file mode 100644 index c921b06fea6c..000000000000 --- a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_bots_list_test.js +++ /dev/null @@ -1,179 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "921a80cf66449e6fc2f4f4b3a3533fd9"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'd4c5ebe5-a43d-402b-a22f-91925e7c1600', - 'x-ms-ests-server', - '2.1.12249.14 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AhaoVslxxRZLgIurZ6-gwvI; expires=Fri, 24-Dec-2021 02:02:58 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrOgdfu17YmTsf4OJWTd2ie0pbdy52tLTTxwDMUIJ4XaXJ_MqqKRI4Wdx7XowFKoTbNzy0m80NAYpRDkphQ5J-XI8PMf4Gb2jyQodRyccoBmZ4Ez4bZWukOOwz8lYku-hJfV0LLweN5qNT-5KiMieWZVZGrOMoWx3YgpgzdU-KPJwgAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:02:57 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '5b488c79-f9a8-47a9-a65f-6a88fc861200', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AqBrjBxXfz9NnBYg4SvDohk; expires=Fri, 24-Dec-2021 02:02:59 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrNGXGT57IaR2PeqpG9xTs2R0EqKAQ-fWqxCdmU6OiMHSvYNH3IrTEiuW9T0FHrjKVOpr8UFfOiY3I3xiUmvfycGBQmX5NiThcEFcohwyd4IuRkVFCXhbegsZHQVzpTAv_5H6tjK9Tf6GryHkaGLavDnljnp7Mzs7VeT1FHQ_JjTwgAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:02:58 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.3&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=bd72e382-842e-4f35-80ff-9ee50214189b&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .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', - '5b83d9e2-0c83-43e0-8b24-d76bed3e1600', - 'x-ms-ests-server', - '2.1.12249.14 - SEASLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AtZRNC7pn29KlwXRsPNYUyoWPr5BAQAAAFOUL9kOAAAA; expires=Fri, 24-Dec-2021 02:02:59 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', - 'Wed, 24 Nov 2021 02:02:58 GMT', - 'Content-Length', - '1374' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.BotService/botServices') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffc5131fbe8d147779bf5a499d6c5aa2daa6573f7e1def9c3fbb383f3ed7bd34f1f6cefefeeed6f3fdc9d3ed83e989eef3c98ce26e77bfbbb77ebbca9d6f534ffbcaed6abe6eee2faa79b366fdabbabbaba2c6679dddcfda298d655539db7e32755fb3aaf2f8b697e77627fc53bf4d7bb77ef3e1a7db4cc1684cf47de27edf50a9fdc04845ae66d76412d7fdf8f76263b3bf77777ee6defd0b3bd7b40ffd02f3bdb9fee3e9c3d9ced9fd3ef3bbfef47f446594d330c95deba28ab4956d267cddbf5478f7eb141e4f5ee47bf64f4d1db6209f234b3b7d4807a69d0827eeed2874cc25df97ccffcbd87b78802abbc6e0b428e9acf8a665566d72f3286dbce8b26a5ff65298895d24008c22cb7c4a7266fe679ea7d9256e7694b1f49d3625a2dbfaa4b6a366fdb55f3e8eedd59356dc6f4e5794d3d5c55f5dbf1b45adc6d5a1ae0f4ee2cbf5c55759b9577a765912fdbbbc522bbc81b1070dbbeb03dcbcfb375d98e57cb0bea225fce5655b16cbd3e26c5f282c12ef2a66100d46ed164c7abd51908b4bf9bededed4c1e6e7f7affc1ee36117ab23d99ccf6b6f7ef9def4e7767077be7f7412979e34dbecc962dde5baecbd27ecad3ed7ff2c5ebb357ca63ae310d282f415e6a70b66c8a8b79fb7be5d784c2fd87f777ef4db2d9f6ee4e463c3bdbdfdd9eeccf76b627bbd37bfbd34fb3f3fb7b19a11079bfa15fcb4218021d7d445c7e6fff603fdfbe773e9b6cef4feee7db0fb3d983ed87fb93597e6f2fbf9fed4d0854b92ef0ead98ca6f97bdf7774fbc9bc6e081401ba37dea1763463e7c5c5bace6727f36cb9cc4bb4ffe82a9f4ce759fb11bf984dcaf8b7847051e7d3b62c96399a16cdd3e8000a22c2eb9ca6acadd7399abd6eeb3c5bd0b4bd5eafc001390dec3c2b1bfab299cef345f6a6ce96cd79552f78dc0ee7ddf13dea75b59e944533a7f74f086f629c82de3573b0cac0392dbd623ec9ca927a6fa9b9fd68912d8b7362716656f9a869ab9a98a73fa98be2a26634de546f7342423e2d9a9345fef674c9c4b1d84fe9331aec4f82613dd84491e5778b76fe6d9a00f359b65abdcc9a86587ce67f5c34674d55663e494846d1cb73520be5f1ba9ddb2fd0dbe9725a5fb328be26a15ad3083ffaf2fc1c4482a603d968dcf88af8f7a3d7ebe934278acda0087e502da103bef7fd5f4253b7ccdfb5cf8be55b6a64c48a6844f4581079c7d90f884158c4be862a66446ea5727f8f6c556c5f524b02fed9decedeeef6cefded9ddded559d5f16f9d52ffcddf7f69bb7c58ae7e1b3fcfa3beb9ffabde73b6fbefbec3adbfbc9ebb39fae8aef9cbc5afed4770fde7ee7e9ee6ab278b5fa7d5e7fe7e147","bfe4ff01d108090051060000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'x-ms-ratelimit-remaining-subscription-reads', - '11998', - 'x-ms-request-id', - 'e9ff11e5-18f0-4ea6-9597-79c8611f0717', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-correlation-request-id', - '566fb75e-20a1-4d9e-84a8-761896b4252b', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211124T020301Z:566fb75e-20a1-4d9e-84a8-761896b4252b', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Wed, 24 Nov 2021 02:03:00 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.BotService/botServices') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bdefff","92ff0742ea40440c000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'x-ms-ratelimit-remaining-subscription-reads', - '11997', - 'x-ms-request-id', - '8775aef0-b00b-4655-96d4-7948a2fb6d6d', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-correlation-request-id', - '5bcc4593-a55a-48cd-b07c-8c042a6118f4', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211124T020302Z:5bcc4593-a55a-48cd-b07c-8c042a6118f4', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Wed, 24 Nov 2021 02:03:01 GMT' -]); diff --git a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_create_test.js b/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_create_test.js deleted file mode 100644 index 77ee4d40350b..000000000000 --- a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_create_test.js +++ /dev/null @@ -1,143 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "ed3f18743316a1839e2aac320016477e"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '8cb4563b-d447-431d-9dfd-46c4fc021600', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=As1jrMshKQpBnv9htqL_q84; expires=Fri, 24-Dec-2021 02:03:02 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrjbSJKMVoJC99-qRQvH6sOa1f8kfb9o3iXvWS02izv3FcZYSqmaAfT-X-mrtVBrYtaMuaHzna2uOniAv5RgRabK_g9pH7mlza0dlXB41FJ71eKy6Wky8qEwuRWikeXaPsHGVoCcs7vnQjymlP8U3RRDabZiiMBHVUyXWm8wx59L4gAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:03:01 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '5b83d9e2-0c83-43e0-8b24-d76b0b3f1600', - 'x-ms-ests-server', - '2.1.12249.14 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=Aj6u7n3IFttKhtw5X-x7_Mw; expires=Fri, 24-Dec-2021 02:03:02 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrU-j99WI-rRFB3zi_lJ2Ea8hY-C6I5BBq3R2NNJW8z4YwYwvwNPcBsbsle_8LnJn2hGJQrQ_WYBSupP4YpwXRX9jsKJbjP77QWUOsIcfnrZ3MaPrTcfp3sOPriqJ-9ddORes6yzbVZE-Ts3nB4vDgGngd2ariLhHgicCOE0WZuxUgAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:03:01 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.3&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=50dbe18f-5ddc-4277-903c-a26aac3ca248&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .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', - '5b83d9e2-0c83-43e0-8b24-d76b0c3f1600', - 'x-ms-ests-server', - '2.1.12249.14 - SEASLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AgLZslFC0zBMhBv-rsQDTZAWPr5BAQAAAFaUL9kOAAAA; expires=Fri, 24-Dec-2021 02:03: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', - 'Wed, 24 Nov 2021 02:03:01 GMT', - 'Content-Length', - '1374' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.BotService/botServices/mybotxxx/channels/MsTeamsChannel', {"location":"eastus","properties":{"channelName":"MsTeamsChannel","properties":{"isEnabled":true}}}) - .query(true) - .reply(201, {"id":"/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.BotService/botServices/mybotxxx/channels/MsTeamsChannel","name":"mybotxxx/MsTeamsChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"9c0e1a2c3b11e3f311596932df0e194611/24/2021 2:03:08 AM\"","location":"eastus","properties":{"properties":{"enableCalling":false,"incomingCallRoute":null,"callingWebhook":null,"isEnabled":true,"deploymentEnvironment":0,"acceptedTerms":null},"etag":"W/\"9c0e1a2c3b11e3f311596932df0e194611/24/2021 2:03:08 AM\"","channelName":"MsTeamsChannel","location":"global","provisioningState":"Succeeded"},"zones":[]}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '659', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'ETag', - 'W/"9c0e1a2c3b11e3f311596932df0e194611/24/2021 2:03:08 AM"', - 'x-ms-request-id', - '3c341e53-29c2-4448-bc4b-f0a4eb3d4256', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-writes', - '1198', - 'x-ms-correlation-request-id', - '7816ed52-ae40-4f4d-84e9-ffa51628454a', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211124T020308Z:7816ed52-ae40-4f4d-84e9-ffa51628454a', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Wed, 24 Nov 2021 02:03:07 GMT' -]); diff --git a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_delete_test.js b/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_delete_test.js deleted file mode 100644 index 7031a8ab11a5..000000000000 --- a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_delete_test.js +++ /dev/null @@ -1,173 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "b27871ee53c6d09ff8ee688e20a1dc30"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'a0cc0735-c774-41c3-92ae-9847ce9e1500', - 'x-ms-ests-server', - '2.1.12249.14 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AiJN9zbUslhMgu-Y36Y456M; expires=Fri, 24-Dec-2021 02:03:10 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrgkTNHhk3a_ig0UBRUCrHl7n2wDHESpDbI_sSSzjSfeLKhcxt7rRA9-84ZklVgzKHTkBJ-932dSosCyyLwM2qD2qMC1fLXABROht1apH0DCs_OGDEag25WAcK4i4uc3IleYs61Q6O2KOf44To8VEtbnbQ5TUny0loyLS82DBySiUgAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:03:09 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'a0cc0735-c774-41c3-92ae-9847d19e1500', - 'x-ms-ests-server', - '2.1.12249.14 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AvPyRdIGgIdLmMsPEMbZ1TQ; expires=Fri, 24-Dec-2021 02:03:10 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr4irFm5KWehbgmyxXQEOf9hGQHcBNT278j_9JqpuWM88JUJJUIU_EIaRT_8aRS9GdNB3TijrjOJXkAS25me96vcOANC9wRU-Tv59r9AQ7_U8-LgTZkWd2GpgHer-iJ_PDqowbw6IW3kkvoZLPWVWAkO-qUkw9_ZbOoJK0mXKCDyQgAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:03:09 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.3&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=ce2d458c-f51e-4eea-a4c7-593207b8811c&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .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', - '5b488c79-f9a8-47a9-a65f-6a884e871200', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AueRE6DVb-1KsG3Rw_mHMyEWPr5BAQAAAF6UL9kOAAAA; expires=Fri, 24-Dec-2021 02:03:10 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', - 'Wed, 24 Nov 2021 02:03:09 GMT', - 'Content-Length', - '1374' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.BotService/botServices/mybotxxx/channels/MsTeamsChannel') - .query(true) - .reply(200, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14999', - 'x-ms-request-id', - '4197346c-4518-47bb-92a8-87b6ddf0c82d', - 'x-ms-correlation-request-id', - '4197346c-4518-47bb-92a8-87b6ddf0c82d', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211124T020314Z:4197346c-4518-47bb-92a8-87b6ddf0c82d', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Wed, 24 Nov 2021 02:03:13 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.BotService/botServices/mybotxxx/channels') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffc5131fbe8d147779bf5a499d6c5aa2daa6573f7e1def9c3fbb383f3ed7bd34f1f6cefefeeed6f3fdc9d3ed83e989eef3c98ce26e77bfbbb77ebbca9d6f534ffbcaed6abe6eee2faa79b366fdabbabbaba2c6679dddcfda298d655539db7e32755fb3aaf2f8b697e77627fc53bf4d7bb77efee4ee7d9729997cdddefe6939379d6d2fff1f747a38f96d982f0fcc8b6ec3568af576870635fa60b7a256fb30b7ae5bb777fdf8ff6b39d87b3c9a73bfbd383bd49b633d9fb94feb79fdd9b3efc74b6b3b737ddddbdbbb77f776f676f37dd7bb473efd1ee7e7afcc5effb110129ab69066a11a08bb29a64c08586becaebb6c89b8f1efde2ce5f5782f8e96292cf4eaa19e1bc5c97e5e8a3a620aaf14ce0b733ccc6e4fc173d79b3fbe5f3d5f32901c5c72f840a4ff3f36c5db6e96bfa88be799b5f1b28f4eb9ef9bd684e97d9a4cc09545baf737c4054a3f1b72febfcb2c8af82af7fc9f77fc9374411ea0114565ca94b8c97fe8f0fe9eb01825d160d7d582c2f5eb7198dead147afd7d3699ecf083f42ec07d592a9f3fd5ff2fd5f","f2ff0015ddf794b6020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'x-ms-ratelimit-remaining-subscription-reads', - '11994', - 'x-ms-request-id', - '9a1ec37f-179a-4f68-8de7-ac139f469e82', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-correlation-request-id', - 'b4120db8-0019-4cf0-94ed-6b05a41eff41', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211124T020314Z:b4120db8-0019-4cf0-94ed-6b05a41eff41', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Wed, 24 Nov 2021 02:03:13 GMT' -]); diff --git a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_get_test.js b/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_get_test.js deleted file mode 100644 index ace0a744144e..000000000000 --- a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_get_test.js +++ /dev/null @@ -1,147 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "37182d99c72d4051f0d95cafeddac2e1"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '8cb4563b-d447-431d-9dfd-46c435031600', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AovUVuYn69FOhs8Vkg88IW8; expires=Fri, 24-Dec-2021 02:03:08 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevreZC8F90UIDXe3xqerd7IeBSPu7yoBSu1YIAslGcDbYBQdnRnn3ivOYud8cGLwnyutkiOqBQ3GUbfpSGiJNohwhdF6432zYWonOT0W5hWZ0lo7SD1vf4fNg2IJdcQ6dx-Lwd3ncjtEIG-Qd4wjqBiNsrWb8bhezfU3qRnKO2LVWsgAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:03:07 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '8cb4563b-d447-431d-9dfd-46c436031600', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=Also_x4Cb2NIkX3IDacNDqg; expires=Fri, 24-Dec-2021 02:03:08 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrv8BeCfQ6bBb5wce3IbFLOqHwhzPFVqzGWRZrxAqvNlCEicd7aa5rLJdPvLK0SNND0_sNo11v8CrCh7y6TYqbfd7urUWsB9-ANpivX57BmhnB1ObQABkpLE4joWPrXnzTICoTX_ZFfEtNlXUf-0V-Pcsv4rw1CMa0mvzcumATdu8gAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:03:07 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.3&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=2ea7e1bc-8085-4082-beb3-dd816e67d0bf&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .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', - '5b488c79-f9a8-47a9-a65f-6a8843871200', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AjS94RFKZKBPvcsXIYdNU4UWPr5BAQAAAFyUL9kOAAAA; expires=Fri, 24-Dec-2021 02:03:08 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', - 'Wed, 24 Nov 2021 02:03:07 GMT', - 'Content-Length', - '1374' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.BotService/botServices/mybotxxx/channels/MsTeamsChannel') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e9f54edebbcbe2ca6f9dd89fd15efd05fefdebdbb3b9d67cb655ed22bcd9b3c5b3427f2f747a38f96d92227046dcb5e83f67a850637f665baa057f236bba057be7bf7f7fd68f6e0decef983fb93bd9d9d59b69f4d77ee4feeefefce0ef2ecfce0deeefec3ddddbb7bfb77f776f676d3bd473bf71eed3c4c8fbff87d3f22206535cd402d02745156930cb8d0d05779dd1679f3d1a35fdcf92b5f6693323fc9cab25852efe759d9e4a38f8ae5b45ad007f8fc55b56e6928cb75598e3e9ad207f4f977f3c9bcaade9a4f8be694c1d09cb5f59ade9fe5abb2ba5ee4cbf6747959d4d512bf7ef46867f451369de6ab369fbdc9eb0521c0fdfd926f68ec4acb173237bd291920cd65d1d08734a8d76d86817ef47a4d38e6331a0d21f6836a09427deffbbf","e4ff01c428f37794020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'ETag', - 'W/"d730f75b200da4ac05b541d8eaf8314911/24/2021 2:03:09 AM"', - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'x-ms-ratelimit-remaining-subscription-reads', - '11996', - 'x-ms-request-id', - 'ed6ae2ad-7a81-4870-800c-86d5836151ef', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-correlation-request-id', - '6b7666a0-ec4f-4170-91a3-de93bc704025', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211124T020309Z:6b7666a0-ec4f-4170-91a3-de93bc704025', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Wed, 24 Nov 2021 02:03:08 GMT' -]); diff --git a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_list_test.js b/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_list_test.js deleted file mode 100644 index 23f203a8c707..000000000000 --- a/sdk/botservice/arm-botservice/recordings/node/botservice_test/recording_msteamschannel_list_test.js +++ /dev/null @@ -1,145 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "bf60235a9890907411b1045cef3f987d"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '8cb4563b-d447-431d-9dfd-46c43c031600', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AtYT5Ys0Uf5Bop-2oGZbfo8; expires=Fri, 24-Dec-2021 02:03:09 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrlFM88UR71kNlYtIEMHVD-8Y_v7Kor66CLdesjyX97lYcCjFK8YttTiNnD7iqg_nUD1ZR1sLmwr7EaSgEjVkUueCl5Qvho53pp7AWaV_y1KZVaVOltdji0Iy6sisVpQ_WGdEh3-VHfY7AhjPz5D2dF3EXfL-fuJ7TalgZLEADO2ogAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:03:08 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '8cb4563b-d447-431d-9dfd-46c43d031600', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AsGBhyvdbzJNgnFLHBzKXik; expires=Fri, 24-Dec-2021 02:03:09 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr7SripnSeH6D-_C1GjG5QSU1KYjgtJGptpxubAJIGZzVq2fWnp7HFc_hKLOKsURWcYTIRy9O2_T4LEHh8hV7IDGKXUQogEJolWiREcCkda6rWdjPfU6jBIx-UUYTMMLW_8Ki6H3_Xp5jNFEDwm73pu6WRk8Qtbf5uwYjeWUknSl8gAA; domain=.login.microsoftonline.com; 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', - 'Wed, 24 Nov 2021 02:03:08 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.3&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=cbd8cc0f-883e-46e6-8da6-4971950a8eb8&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .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', - '8cb4563b-d447-431d-9dfd-46c440031600', - 'x-ms-ests-server', - '2.1.12249.14 - KRSLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AgjqOfMbuY5Hs_QYdA1v_3gWPr5BAQAAAFyUL9kOAAAA; expires=Fri, 24-Dec-2021 02:03:09 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', - 'Wed, 24 Nov 2021 02:03:08 GMT', - 'Content-Length', - '1374' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.BotService/botServices/mybotxxx/channels') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffc5131fbe8d147779bf5a499d6c5aa2daa6573f7e1def9c3fbb383f3ed7bd34f1f6cefefeeed6f3fdc9d3ed83e989eef3c98ce26e77bfbbb77ebbca9d6f534ffbcaed6abe6eee2faa79b366fdabbabbaba2c6679dddcfda298d655539db7e32755fb3aaf2f8b697e77627fc53bf4d7bb77efee4ee7d9729997cdddefe6939379d6d2fff1f747a38f96d982f0fcc8b6ec3568af576870635fa60b7a256fb30b7ae5bb777fdf8ff6b39d87b3c9a73bfbd383bd49b633d9fb94feb79fdd9b3efc74b6b3b737ddddbdbbb77f776f676f37dd7bb473efd1ee4e7afcc5effb110129ab69066a11a08bb29a64c08586becaebb6c89b8f1efde2ce5f5782f8e96292cf4eaa19e1bc5c97e5e8a3a620aaf14ce0b733ccc6e4fc173d79b3fbe5f3d5f32901c5c72f840a4ff3f36c5db6e96bfa88be799b5f1b28f4eb9ef9bd684e97d9a4cc09545baf737c4054a3f1b72febfcb2c8af82af7fc9f77fc9374411ea0114565ca94b8c97fe8f0fe9eb01825d160d7d582c2f5eb7198dead147afd7d3699ecf083f42ec07d592a94348febf8d55bf68dee4d9a27103ecb26aafc187b1eaecc1bd9df307f7277b3b3bb36c3f9beedc9fdcdfdf9d1de4d9f9c1bdddfd87c3133340798f39c3bf72e68f93ac2c695a3e7a749e950db86839ad16f4013e7f55ad3157c26f53fa803ea7099f57d55bf3698f0b67f9aaacae17f9b23d5d5e1675b5c4af1f3dda197d94d184afda7cf626af178400f74773ff8d8c5d69a94cd99b9201d2dc9629bfff","4bfe1f28c907434b050000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'x-ms-ratelimit-remaining-subscription-reads', - '11995', - 'x-ms-request-id', - '10dbf71e-95b7-44d6-8363-a29358a478e4', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-correlation-request-id', - '7cecc524-b0d6-4120-939c-5fb1ce250f22', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211124T020310Z:7cecc524-b0d6-4120-939c-5fb1ce250f22', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Wed, 24 Nov 2021 02:03:09 GMT' -]); diff --git a/sdk/botservice/arm-botservice/review/arm-botservice.api.md b/sdk/botservice/arm-botservice/review/arm-botservice.api.md index d93ee16b571c..ffedb68c3833 100644 --- a/sdk/botservice/arm-botservice/review/arm-botservice.api.md +++ b/sdk/botservice/arm-botservice/review/arm-botservice.api.md @@ -14,7 +14,6 @@ import { PollOperationState } from '@azure/core-lro'; export type AlexaChannel = Channel & { channelName: "AlexaChannel"; properties?: AlexaChannelProperties; - readonly provisioningState?: string; }; // @public @@ -26,9 +25,13 @@ export interface AlexaChannelProperties { } // @public (undocumented) -export class AzureBotService extends AzureBotServiceContext { +export class AzureBotService extends coreClient.ServiceClient { + // (undocumented) + $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureBotServiceOptionalParams); // (undocumented) + apiVersion: string; + // (undocumented) botConnection: BotConnection; // (undocumented) bots: Bots; @@ -46,15 +49,6 @@ export class AzureBotService extends AzureBotServiceContext { privateEndpointConnections: PrivateEndpointConnections; // (undocumented) privateLinkResources: PrivateLinkResources; -} - -// @public (undocumented) -export class AzureBotServiceContext extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureBotServiceOptionalParams); - // (undocumented) - apiVersion: string; // (undocumented) subscriptionId: string; } @@ -179,6 +173,7 @@ export interface BotProperties { publicNetworkAccess?: PublicNetworkAccess; publishingCredentials?: string; schemaTransformationVersion?: string; + storageResourceId?: string; } // @public @@ -270,6 +265,8 @@ export type BotsUpdateResponse = Bot; export interface Channel { channelName: "AlexaChannel" | "FacebookChannel" | "EmailChannel" | "MsTeamsChannel" | "SkypeChannel" | "KikChannel" | "WebChatChannel" | "DirectLineChannel" | "TelegramChannel" | "SmsChannel" | "SlackChannel" | "LineChannel" | "DirectLineSpeechChannel"; etag?: string; + location?: string; + readonly provisioningState?: string; } // @public @@ -302,6 +299,19 @@ export type ChannelsCreateResponse = BotChannel; export interface ChannelsDeleteOptionalParams extends coreClient.OperationOptions { } +// @public +export interface ChannelSettings { + botIconUrl?: string; + botId?: string; + channelDisplayName?: string; + channelId?: string; + disableLocalAuth?: boolean; + extensionKey1?: string; + extensionKey2?: string; + isEnabled?: boolean; + sites?: Site[]; +} + // @public export interface ChannelsGetOptionalParams extends coreClient.OperationOptions { } @@ -328,7 +338,7 @@ export interface ChannelsListWithKeysOptionalParams extends coreClient.Operation } // @public -export type ChannelsListWithKeysResponse = BotChannel; +export type ChannelsListWithKeysResponse = ListChannelWithKeysResponse; // @public export interface ChannelsUpdateOptionalParams extends coreClient.OperationOptions { @@ -380,6 +390,8 @@ export interface ConnectionSettingParameter { export interface ConnectionSettingProperties { clientId?: string; clientSecret?: string; + id?: string; + name?: string; parameters?: ConnectionSettingParameter[]; provisioningState?: string; scopes?: string; @@ -403,8 +415,6 @@ export interface DirectLine { export type DirectLineChannel = Channel & { channelName: "DirectLineChannel"; properties?: DirectLineChannelProperties; - provisioningState?: string; - location?: string; }; // @public @@ -438,7 +448,6 @@ export interface DirectLineSite { export type DirectLineSpeechChannel = Channel & { channelName: "DirectLineSpeechChannel"; properties?: DirectLineSpeechChannelProperties; - provisioningState?: string; }; // @public @@ -455,7 +464,6 @@ export interface DirectLineSpeechChannelProperties { export type EmailChannel = Channel & { channelName: "EmailChannel"; properties?: EmailChannelProperties; - provisioningState?: string; }; // @public @@ -480,8 +488,6 @@ export interface ErrorModel { export type FacebookChannel = Channel & { channelName: "FacebookChannel"; properties?: FacebookChannelProperties; - provisioningState?: string; - location?: string; }; // @public @@ -648,6 +654,12 @@ export interface LineRegistration { readonly generatedId?: string; } +// @public +export type ListChannelWithKeysResponse = BotChannel & { + resource?: ChannelUnion; + setting?: ChannelSettings; +}; + // @public export type MsaAppType = string; @@ -655,8 +667,6 @@ export type MsaAppType = string; export type MsTeamsChannel = Channel & { channelName: "MsTeamsChannel"; properties?: MsTeamsChannelProperties; - provisioningState?: string; - location?: string; }; // @public @@ -893,6 +903,12 @@ export interface ServiceProviderResponseList { readonly value?: ServiceProvider[]; } +// @public +export type Site = WebChatSite & DirectLineSite & { + isTokenEnabled?: boolean; + eTag?: string; +}; + // @public export interface SiteInfo { key: Key; @@ -935,7 +951,6 @@ export interface SkypeChannelProperties { export type SlackChannel = Channel & { channelName: "SlackChannel"; properties?: SlackChannelProperties; - location?: string; }; // @public @@ -972,7 +987,6 @@ export interface SmsChannelProperties { export type TelegramChannel = Channel & { channelName: "TelegramChannel"; properties?: TelegramChannelProperties; - provisioningState?: string; }; // @public @@ -986,8 +1000,6 @@ export interface TelegramChannelProperties { export type WebChatChannel = Channel & { channelName: "WebChatChannel"; properties?: WebChatChannelProperties; - location?: string; - provisioningState?: string; }; // @public diff --git a/sdk/botservice/arm-botservice/src/azureBotService.ts b/sdk/botservice/arm-botservice/src/azureBotService.ts index 4f552128ddbf..4ed5cc48d339 100644 --- a/sdk/botservice/arm-botservice/src/azureBotService.ts +++ b/sdk/botservice/arm-botservice/src/azureBotService.ts @@ -6,6 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import * as coreClient from "@azure/core-client"; import * as coreAuth from "@azure/core-auth"; import { BotsImpl, @@ -29,10 +30,13 @@ import { PrivateEndpointConnections, PrivateLinkResources } from "./operationsInterfaces"; -import { AzureBotServiceContext } from "./azureBotServiceContext"; import { AzureBotServiceOptionalParams } from "./models"; -export class AzureBotService extends AzureBotServiceContext { +export class AzureBotService extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: string; + /** * Initializes a new instance of the AzureBotService class. * @param credentials Subscription credentials which uniquely identify client subscription. @@ -44,7 +48,46 @@ export class AzureBotService extends AzureBotServiceContext { subscriptionId: string, options?: AzureBotServiceOptionalParams ) { - super(credentials, subscriptionId, options); + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: AzureBotServiceOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-botservice/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint || "https://management.azure.com" + }; + super(optionsWithDefaults); + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2021-05-01-preview"; this.bots = new BotsImpl(this); this.channels = new ChannelsImpl(this); this.directLine = new DirectLineImpl(this); diff --git a/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts b/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts deleted file mode 100644 index 58814aefecde..000000000000 --- a/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; -import * as coreAuth from "@azure/core-auth"; -import { AzureBotServiceOptionalParams } from "./models"; - -export class AzureBotServiceContext extends coreClient.ServiceClient { - $host: string; - apiVersion: string; - subscriptionId: string; - - /** - * Initializes a new instance of the AzureBotServiceContext class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId Azure Subscription ID. - * @param options The parameter options - */ - constructor( - credentials: coreAuth.TokenCredential, - subscriptionId: string, - options?: AzureBotServiceOptionalParams - ) { - if (credentials === undefined) { - throw new Error("'credentials' cannot be null"); - } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); - } - - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults: AzureBotServiceOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials - }; - - const packageDetails = `azsdk-js-arm-botservice/4.0.0-beta.1`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - - if (!options.credentialScopes) { - options.credentialScopes = ["https://management.azure.com/.default"]; - } - const optionsWithDefaults = { - ...defaults, - ...options, - userAgentOptions: { - userAgentPrefix - }, - baseUri: options.endpoint || "https://management.azure.com" - }; - super(optionsWithDefaults); - // Parameter assignments - this.subscriptionId = subscriptionId; - - // Assigning values to Constant parameters - this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-05-01-preview"; - } -} diff --git a/sdk/botservice/arm-botservice/src/index.ts b/sdk/botservice/arm-botservice/src/index.ts index bfbe01378287..a025817c7355 100644 --- a/sdk/botservice/arm-botservice/src/index.ts +++ b/sdk/botservice/arm-botservice/src/index.ts @@ -9,5 +9,4 @@ /// export * from "./models"; export { AzureBotService } from "./azureBotService"; -export { AzureBotServiceContext } from "./azureBotServiceContext"; export * from "./operationsInterfaces"; diff --git a/sdk/botservice/arm-botservice/src/models/index.ts b/sdk/botservice/arm-botservice/src/models/index.ts index 98f6a1c7128d..833aaa17e909 100644 --- a/sdk/botservice/arm-botservice/src/models/index.ts +++ b/sdk/botservice/arm-botservice/src/models/index.ts @@ -94,6 +94,8 @@ export interface BotProperties { disableLocalAuth?: boolean; /** The channel schema transformation version for the bot */ schemaTransformationVersion?: string; + /** The storage resourceId for the bot */ + storageResourceId?: string; /** * List of Private Endpoint Connections configured for the bot * NOTE: This property will not be serialized. It can only be populated by the server. @@ -239,6 +241,93 @@ export interface Channel { | "DirectLineSpeechChannel"; /** Entity Tag of the resource */ etag?: string; + /** + * Provisioning state of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** Specifies the location of the resource. */ + location?: string; +} + +/** Channel settings definition */ +export interface ChannelSettings { + /** The extensionKey1 */ + extensionKey1?: string; + /** The extensionKey2 */ + extensionKey2?: string; + /** The list of sites */ + sites?: Site[]; + /** The channel id */ + channelId?: string; + /** The channel display name */ + channelDisplayName?: string; + /** The bot id */ + botId?: string; + /** The bot icon url */ + botIconUrl?: string; + /** Whether this channel is enabled for the bot */ + isEnabled?: boolean; + /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ + disableLocalAuth?: boolean; +} + +/** A site for the Webchat channel */ +export interface WebChatSite { + /** + * Site Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly siteId?: string; + /** Site name */ + siteName: string; + /** + * Primary key. Value only returned through POST to the action Channel List API, otherwise empty. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly key?: string; + /** + * Secondary key. Value only returned through POST to the action Channel List API, otherwise empty. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly key2?: string; + /** Whether this site is enabled for DirectLine channel */ + isEnabled: boolean; + /** Whether this site is enabled for preview versions of Webchat */ + isWebchatPreviewEnabled: boolean; +} + +/** A site for the Direct Line channel */ +export interface DirectLineSite { + /** + * Site Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly siteId?: string; + /** Site name */ + siteName: string; + /** + * Primary key. Value only returned through POST to the action Channel List API, otherwise empty. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly key?: string; + /** + * Secondary key. Value only returned through POST to the action Channel List API, otherwise empty. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly key2?: string; + /** Whether this site is enabled for DirectLine channel. */ + isEnabled: boolean; + /** Whether this site is enabled for Bot Framework V1 protocol. */ + isV1Enabled: boolean; + /** Whether this site is enabled for Bot Framework V1 protocol. */ + isV3Enabled: boolean; + /** Whether this site is enabled for authentication with Bot Framework. */ + isSecureSiteEnabled?: boolean; + /** Whether this site is enabled for block user upload. */ + isBlockUserUploadEnabled?: boolean; + /** List of Trusted Origin URLs for this site. This field is applicable only if isSecureSiteEnabled is True. */ + trustedOrigins?: string[]; } /** The list of bot service channel operation response. */ @@ -409,6 +498,10 @@ export interface ServiceProviderParameterMetadataConstraints { /** Properties for a Connection Setting Item */ export interface ConnectionSettingProperties { + /** Id associated with the Connection Setting. */ + id?: string; + /** Name associated with the Connection Setting. */ + name?: string; /** Client Id associated with the Connection Setting. */ clientId?: string; /** @@ -626,31 +719,6 @@ export interface WebChatChannelProperties { sites?: WebChatSite[]; } -/** A site for the Webchat channel */ -export interface WebChatSite { - /** - * Site Id - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly siteId?: string; - /** Site name */ - siteName: string; - /** - * Primary key. Value only returned through POST to the action Channel List API, otherwise empty. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly key?: string; - /** - * Secondary key. Value only returned through POST to the action Channel List API, otherwise empty. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly key2?: string; - /** Whether this site is enabled for DirectLine channel */ - isEnabled: boolean; - /** Whether this site is enabled for preview versions of Webchat */ - isWebchatPreviewEnabled: boolean; -} - /** The parameters to provide for the Direct Line channel. */ export interface DirectLineChannelProperties { /** The list of Direct Line sites */ @@ -659,39 +727,6 @@ export interface DirectLineChannelProperties { directLineEmbedCode?: string; } -/** A site for the Direct Line channel */ -export interface DirectLineSite { - /** - * Site Id - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly siteId?: string; - /** Site name */ - siteName: string; - /** - * Primary key. Value only returned through POST to the action Channel List API, otherwise empty. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly key?: string; - /** - * Secondary key. Value only returned through POST to the action Channel List API, otherwise empty. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly key2?: string; - /** Whether this site is enabled for DirectLine channel. */ - isEnabled: boolean; - /** Whether this site is enabled for Bot Framework V1 protocol. */ - isV1Enabled: boolean; - /** Whether this site is enabled for Bot Framework V1 protocol. */ - isV3Enabled: boolean; - /** Whether this site is enabled for authentication with Bot Framework. */ - isSecureSiteEnabled?: boolean; - /** Whether this site is enabled for block user upload. */ - isBlockUserUploadEnabled?: boolean; - /** List of Trusted Origin URLs for this site. This field is applicable only if isSecureSiteEnabled is True. */ - trustedOrigins?: string[]; -} - /** The parameters to provide for the Telegram channel. */ export interface TelegramChannelProperties { /** The Telegram access token. Value only returned through POST to the action Channel List API, otherwise empty. */ @@ -861,11 +896,6 @@ export type AlexaChannel = Channel & { channelName: "AlexaChannel"; /** The set of properties specific to Alexa channel resource */ properties?: AlexaChannelProperties; - /** - * Provisioning state of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; }; /** Facebook channel definition */ @@ -874,10 +904,6 @@ export type FacebookChannel = Channel & { channelName: "FacebookChannel"; /** The set of properties specific to bot facebook channel */ properties?: FacebookChannelProperties; - /** Provisioning state of the resource */ - provisioningState?: string; - /** Location of the resource */ - location?: string; }; /** Email channel definition */ @@ -886,8 +912,6 @@ export type EmailChannel = Channel & { channelName: "EmailChannel"; /** The set of properties specific to email channel resource */ properties?: EmailChannelProperties; - /** Provisioning state of the resource */ - provisioningState?: string; }; /** Microsoft Teams channel definition */ @@ -896,10 +920,6 @@ export type MsTeamsChannel = Channel & { channelName: "MsTeamsChannel"; /** The set of properties specific to Microsoft Teams channel resource */ properties?: MsTeamsChannelProperties; - /** Provisioning state of the resource */ - provisioningState?: string; - /** Location of the resource */ - location?: string; }; /** Skype channel definition */ @@ -924,10 +944,6 @@ export type WebChatChannel = Channel & { channelName: "WebChatChannel"; /** The set of properties specific to Web Chat channel resource */ properties?: WebChatChannelProperties; - /** Location of the resource */ - location?: string; - /** Provisioning state of the resource */ - provisioningState?: string; }; /** Direct Line channel definition */ @@ -936,10 +952,6 @@ export type DirectLineChannel = Channel & { channelName: "DirectLineChannel"; /** The set of properties specific to Direct Line channel resource */ properties?: DirectLineChannelProperties; - /** Provisioning state of the resource */ - provisioningState?: string; - /** Location of the resource */ - location?: string; }; /** Telegram channel definition */ @@ -948,8 +960,6 @@ export type TelegramChannel = Channel & { channelName: "TelegramChannel"; /** The set of properties specific to Telegram channel resource */ properties?: TelegramChannelProperties; - /** Provisioning state of the resource */ - provisioningState?: string; }; /** Sms channel definition */ @@ -966,8 +976,6 @@ export type SlackChannel = Channel & { channelName: "SlackChannel"; /** The set of properties specific to Slack channel resource */ properties?: SlackChannelProperties; - /** Location of the resource */ - location?: string; }; /** Line channel definition */ @@ -984,8 +992,23 @@ export type DirectLineSpeechChannel = Channel & { channelName: "DirectLineSpeechChannel"; /** The set of properties specific to DirectLine Speech channel resource */ properties?: DirectLineSpeechChannelProperties; - /** Provisioning state of the resource */ - provisioningState?: string; +}; + +/** A site for the channel */ +export type Site = WebChatSite & + DirectLineSite & { + /** Whether this site is token enabled for channel */ + isTokenEnabled?: boolean; + /** Entity Tag */ + eTag?: string; + }; + +/** The ARM channel of list channel with keys operation response. */ +export type ListChannelWithKeysResponse = BotChannel & { + /** The set of properties specific to bot channel resource */ + resource?: ChannelUnion; + /** Channel settings */ + setting?: ChannelSettings; }; /** Known values of {@link MsaAppType} that the service accepts. */ @@ -1266,7 +1289,7 @@ export interface ChannelsListWithKeysOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listWithKeys operation. */ -export type ChannelsListWithKeysResponse = BotChannel; +export type ChannelsListWithKeysResponse = ListChannelWithKeysResponse; /** Optional parameters. */ export interface ChannelsListByResourceGroupOptionalParams diff --git a/sdk/botservice/arm-botservice/src/models/mappers.ts b/sdk/botservice/arm-botservice/src/models/mappers.ts index 479740a9bed0..972dbf9e8e44 100644 --- a/sdk/botservice/arm-botservice/src/models/mappers.ts +++ b/sdk/botservice/arm-botservice/src/models/mappers.ts @@ -206,6 +206,12 @@ export const BotProperties: coreClient.CompositeMapper = { name: "String" } }, + storageResourceId: { + serializedName: "storageResourceId", + type: { + name: "String" + } + }, privateEndpointConnections: { serializedName: "privateEndpointConnections", readOnly: true, @@ -369,6 +375,7 @@ export const Resource: coreClient.CompositeMapper = { }, kind: { serializedName: "kind", + nullable: true, type: { name: "String" } @@ -507,6 +514,221 @@ export const Channel: coreClient.CompositeMapper = { type: { name: "String" } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ChannelSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ChannelSettings", + modelProperties: { + extensionKey1: { + serializedName: "extensionKey1", + type: { + name: "String" + } + }, + extensionKey2: { + serializedName: "extensionKey2", + type: { + name: "String" + } + }, + sites: { + serializedName: "sites", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Site" + } + } + } + }, + channelId: { + serializedName: "channelId", + type: { + name: "String" + } + }, + channelDisplayName: { + serializedName: "channelDisplayName", + type: { + name: "String" + } + }, + botId: { + serializedName: "botId", + type: { + name: "String" + } + }, + botIconUrl: { + serializedName: "botIconUrl", + type: { + name: "String" + } + }, + isEnabled: { + serializedName: "isEnabled", + type: { + name: "Boolean" + } + }, + disableLocalAuth: { + serializedName: "disableLocalAuth", + type: { + name: "Boolean" + } + } + } + } +}; + +export const WebChatSite: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebChatSite", + modelProperties: { + siteId: { + serializedName: "siteId", + readOnly: true, + type: { + name: "String" + } + }, + siteName: { + serializedName: "siteName", + required: true, + type: { + name: "String" + } + }, + key: { + serializedName: "key", + readOnly: true, + type: { + name: "String" + } + }, + key2: { + serializedName: "key2", + readOnly: true, + type: { + name: "String" + } + }, + isEnabled: { + serializedName: "isEnabled", + required: true, + type: { + name: "Boolean" + } + }, + isWebchatPreviewEnabled: { + defaultValue: false, + serializedName: "isWebchatPreviewEnabled", + required: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const DirectLineSite: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DirectLineSite", + modelProperties: { + siteId: { + serializedName: "siteId", + readOnly: true, + type: { + name: "String" + } + }, + siteName: { + serializedName: "siteName", + required: true, + type: { + name: "String" + } + }, + key: { + serializedName: "key", + readOnly: true, + type: { + name: "String" + } + }, + key2: { + serializedName: "key2", + readOnly: true, + type: { + name: "String" + } + }, + isEnabled: { + serializedName: "isEnabled", + required: true, + type: { + name: "Boolean" + } + }, + isV1Enabled: { + serializedName: "isV1Enabled", + required: true, + type: { + name: "Boolean" + } + }, + isV3Enabled: { + serializedName: "isV3Enabled", + required: true, + type: { + name: "Boolean" + } + }, + isSecureSiteEnabled: { + serializedName: "isSecureSiteEnabled", + type: { + name: "Boolean" + } + }, + isBlockUserUploadEnabled: { + serializedName: "isBlockUserUploadEnabled", + type: { + name: "Boolean" + } + }, + trustedOrigins: { + serializedName: "trustedOrigins", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -895,6 +1117,18 @@ export const ConnectionSettingProperties: coreClient.CompositeMapper = { name: "Composite", className: "ConnectionSettingProperties", modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, clientId: { serializedName: "clientId", type: { @@ -967,6 +1201,7 @@ export const ConnectionSettingParameter: coreClient.CompositeMapper = { }, value: { serializedName: "value", + nullable: true, type: { name: "String" } @@ -1461,57 +1696,6 @@ export const WebChatChannelProperties: coreClient.CompositeMapper = { } }; -export const WebChatSite: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WebChatSite", - modelProperties: { - siteId: { - serializedName: "siteId", - readOnly: true, - type: { - name: "String" - } - }, - siteName: { - serializedName: "siteName", - required: true, - type: { - name: "String" - } - }, - key: { - serializedName: "key", - readOnly: true, - type: { - name: "String" - } - }, - key2: { - serializedName: "key2", - readOnly: true, - type: { - name: "String" - } - }, - isEnabled: { - serializedName: "isEnabled", - required: true, - type: { - name: "Boolean" - } - }, - isWebchatPreviewEnabled: { - serializedName: "isWebchatPreviewEnabled", - required: true, - type: { - name: "Boolean" - } - } - } - } -}; - export const DirectLineChannelProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1539,87 +1723,6 @@ export const DirectLineChannelProperties: coreClient.CompositeMapper = { } }; -export const DirectLineSite: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DirectLineSite", - modelProperties: { - siteId: { - serializedName: "siteId", - readOnly: true, - type: { - name: "String" - } - }, - siteName: { - serializedName: "siteName", - required: true, - type: { - name: "String" - } - }, - key: { - serializedName: "key", - readOnly: true, - type: { - name: "String" - } - }, - key2: { - serializedName: "key2", - readOnly: true, - type: { - name: "String" - } - }, - isEnabled: { - serializedName: "isEnabled", - required: true, - type: { - name: "Boolean" - } - }, - isV1Enabled: { - serializedName: "isV1Enabled", - required: true, - type: { - name: "Boolean" - } - }, - isV3Enabled: { - serializedName: "isV3Enabled", - required: true, - type: { - name: "Boolean" - } - }, - isSecureSiteEnabled: { - serializedName: "isSecureSiteEnabled", - type: { - name: "Boolean" - } - }, - isBlockUserUploadEnabled: { - serializedName: "isBlockUserUploadEnabled", - type: { - name: "Boolean" - } - }, - trustedOrigins: { - serializedName: "trustedOrigins", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - export const TelegramChannelProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2034,13 +2137,6 @@ export const AlexaChannel: coreClient.CompositeMapper = { name: "Composite", className: "AlexaChannelProperties" } - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String" - } } } } @@ -2061,18 +2157,6 @@ export const FacebookChannel: coreClient.CompositeMapper = { name: "Composite", className: "FacebookChannelProperties" } - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } } } } @@ -2093,12 +2177,6 @@ export const EmailChannel: coreClient.CompositeMapper = { name: "Composite", className: "EmailChannelProperties" } - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String" - } } } } @@ -2119,18 +2197,6 @@ export const MsTeamsChannel: coreClient.CompositeMapper = { name: "Composite", className: "MsTeamsChannelProperties" } - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } } } } @@ -2191,18 +2257,6 @@ export const WebChatChannel: coreClient.CompositeMapper = { name: "Composite", className: "WebChatChannelProperties" } - }, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String" - } } } } @@ -2223,18 +2277,6 @@ export const DirectLineChannel: coreClient.CompositeMapper = { name: "Composite", className: "DirectLineChannelProperties" } - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } } } } @@ -2255,12 +2297,6 @@ export const TelegramChannel: coreClient.CompositeMapper = { name: "Composite", className: "TelegramChannelProperties" } - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String" - } } } } @@ -2301,12 +2337,6 @@ export const SlackChannel: coreClient.CompositeMapper = { name: "Composite", className: "SlackChannelProperties" } - }, - location: { - serializedName: "location", - type: { - name: "String" - } } } } @@ -2347,9 +2377,26 @@ export const DirectLineSpeechChannel: coreClient.CompositeMapper = { name: "Composite", className: "DirectLineSpeechChannelProperties" } + } + } + } +}; + +export const Site: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Site", + modelProperties: { + ...WebChatSite.type.modelProperties, + ...DirectLineSite.type.modelProperties, + isTokenEnabled: { + serializedName: "isTokenEnabled", + type: { + name: "Boolean" + } }, - provisioningState: { - serializedName: "provisioningState", + eTag: { + serializedName: "eTag", type: { name: "String" } @@ -2358,6 +2405,30 @@ export const DirectLineSpeechChannel: coreClient.CompositeMapper = { } }; +export const ListChannelWithKeysResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListChannelWithKeysResponse", + modelProperties: { + ...BotChannel.type.modelProperties, + resource: { + serializedName: "resource", + type: { + name: "Composite", + className: "Channel" + } + }, + setting: { + serializedName: "setting", + type: { + name: "Composite", + className: "ChannelSettings" + } + } + } + } +}; + export let discriminators = { Channel: Channel, "Channel.AlexaChannel": AlexaChannel, diff --git a/sdk/botservice/arm-botservice/src/operations/botConnection.ts b/sdk/botservice/arm-botservice/src/operations/botConnection.ts index b6b29400e836..3f57b9885b39 100644 --- a/sdk/botservice/arm-botservice/src/operations/botConnection.ts +++ b/sdk/botservice/arm-botservice/src/operations/botConnection.ts @@ -11,7 +11,7 @@ import { BotConnection } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureBotServiceContext } from "../azureBotServiceContext"; +import { AzureBotService } from "../azureBotService"; import { ConnectionSetting, BotConnectionListByBotServiceNextOptionalParams, @@ -34,13 +34,13 @@ import { /// /** Class containing BotConnection operations. */ export class BotConnectionImpl implements BotConnection { - private readonly client: AzureBotServiceContext; + private readonly client: AzureBotService; /** * Initialize a new instance of the class BotConnection class. * @param client Reference to the service client */ - constructor(client: AzureBotServiceContext) { + constructor(client: AzureBotService) { this.client = client; } diff --git a/sdk/botservice/arm-botservice/src/operations/bots.ts b/sdk/botservice/arm-botservice/src/operations/bots.ts index 523cbcad43ca..664ab905355e 100644 --- a/sdk/botservice/arm-botservice/src/operations/bots.ts +++ b/sdk/botservice/arm-botservice/src/operations/bots.ts @@ -11,7 +11,7 @@ import { Bots } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureBotServiceContext } from "../azureBotServiceContext"; +import { AzureBotService } from "../azureBotService"; import { Bot, BotsListByResourceGroupNextOptionalParams, @@ -37,13 +37,13 @@ import { /// /** Class containing Bots operations. */ export class BotsImpl implements Bots { - private readonly client: AzureBotServiceContext; + private readonly client: AzureBotService; /** * Initialize a new instance of the class Bots class. * @param client Reference to the service client */ - constructor(client: AzureBotServiceContext) { + constructor(client: AzureBotService) { this.client = client; } diff --git a/sdk/botservice/arm-botservice/src/operations/channels.ts b/sdk/botservice/arm-botservice/src/operations/channels.ts index e3b9ff2b9ae0..fd794fc5f773 100644 --- a/sdk/botservice/arm-botservice/src/operations/channels.ts +++ b/sdk/botservice/arm-botservice/src/operations/channels.ts @@ -11,7 +11,7 @@ import { Channels } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureBotServiceContext } from "../azureBotServiceContext"; +import { AzureBotService } from "../azureBotService"; import { BotChannel, ChannelsListByResourceGroupNextOptionalParams, @@ -33,13 +33,13 @@ import { /// /** Class containing Channels operations. */ export class ChannelsImpl implements Channels { - private readonly client: AzureBotServiceContext; + private readonly client: AzureBotService; /** * Initialize a new instance of the class Channels class. * @param client Reference to the service client */ - constructor(client: AzureBotServiceContext) { + constructor(client: AzureBotService) { this.client = client; } @@ -367,7 +367,7 @@ const listWithKeysOperationSpec: coreClient.OperationSpec = { httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.BotChannel + bodyMapper: Mappers.ListChannelWithKeysResponse }, default: { bodyMapper: Mappers.ErrorModel diff --git a/sdk/botservice/arm-botservice/src/operations/directLine.ts b/sdk/botservice/arm-botservice/src/operations/directLine.ts index efb059e1711f..e98ff62293a9 100644 --- a/sdk/botservice/arm-botservice/src/operations/directLine.ts +++ b/sdk/botservice/arm-botservice/src/operations/directLine.ts @@ -10,7 +10,7 @@ import { DirectLine } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureBotServiceContext } from "../azureBotServiceContext"; +import { AzureBotService } from "../azureBotService"; import { SiteInfo, RegenerateKeysChannelName, @@ -20,13 +20,13 @@ import { /** Class containing DirectLine operations. */ export class DirectLineImpl implements DirectLine { - private readonly client: AzureBotServiceContext; + private readonly client: AzureBotService; /** * Initialize a new instance of the class DirectLine class. * @param client Reference to the service client */ - constructor(client: AzureBotServiceContext) { + constructor(client: AzureBotService) { this.client = client; } diff --git a/sdk/botservice/arm-botservice/src/operations/hostSettings.ts b/sdk/botservice/arm-botservice/src/operations/hostSettings.ts index 0e0e5c755e4e..b57b467db071 100644 --- a/sdk/botservice/arm-botservice/src/operations/hostSettings.ts +++ b/sdk/botservice/arm-botservice/src/operations/hostSettings.ts @@ -10,7 +10,7 @@ import { HostSettings } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureBotServiceContext } from "../azureBotServiceContext"; +import { AzureBotService } from "../azureBotService"; import { HostSettingsGetOptionalParams, HostSettingsGetResponse @@ -18,13 +18,13 @@ import { /** Class containing HostSettings operations. */ export class HostSettingsImpl implements HostSettings { - private readonly client: AzureBotServiceContext; + private readonly client: AzureBotService; /** * Initialize a new instance of the class HostSettings class. * @param client Reference to the service client */ - constructor(client: AzureBotServiceContext) { + constructor(client: AzureBotService) { this.client = client; } diff --git a/sdk/botservice/arm-botservice/src/operations/operationResults.ts b/sdk/botservice/arm-botservice/src/operations/operationResults.ts index a1cf3dfa3ffa..0f11fd8ab13f 100644 --- a/sdk/botservice/arm-botservice/src/operations/operationResults.ts +++ b/sdk/botservice/arm-botservice/src/operations/operationResults.ts @@ -10,7 +10,7 @@ import { OperationResults } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureBotServiceContext } from "../azureBotServiceContext"; +import { AzureBotService } from "../azureBotService"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { @@ -20,13 +20,13 @@ import { /** Class containing OperationResults operations. */ export class OperationResultsImpl implements OperationResults { - private readonly client: AzureBotServiceContext; + private readonly client: AzureBotService; /** * Initialize a new instance of the class OperationResults class. * @param client Reference to the service client */ - constructor(client: AzureBotServiceContext) { + constructor(client: AzureBotService) { this.client = client; } diff --git a/sdk/botservice/arm-botservice/src/operations/operations.ts b/sdk/botservice/arm-botservice/src/operations/operations.ts index d9bbbd5d37d8..a6b78c280d1d 100644 --- a/sdk/botservice/arm-botservice/src/operations/operations.ts +++ b/sdk/botservice/arm-botservice/src/operations/operations.ts @@ -11,7 +11,7 @@ import { Operations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureBotServiceContext } from "../azureBotServiceContext"; +import { AzureBotService } from "../azureBotService"; import { OperationEntity, OperationsListNextOptionalParams, @@ -23,13 +23,13 @@ import { /// /** Class containing Operations operations. */ export class OperationsImpl implements Operations { - private readonly client: AzureBotServiceContext; + private readonly client: AzureBotService; /** * Initialize a new instance of the class Operations class. * @param client Reference to the service client */ - constructor(client: AzureBotServiceContext) { + constructor(client: AzureBotService) { this.client = client; } diff --git a/sdk/botservice/arm-botservice/src/operations/privateEndpointConnections.ts b/sdk/botservice/arm-botservice/src/operations/privateEndpointConnections.ts index 56b93da42f04..b186f8287603 100644 --- a/sdk/botservice/arm-botservice/src/operations/privateEndpointConnections.ts +++ b/sdk/botservice/arm-botservice/src/operations/privateEndpointConnections.ts @@ -11,7 +11,7 @@ import { PrivateEndpointConnections } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureBotServiceContext } from "../azureBotServiceContext"; +import { AzureBotService } from "../azureBotService"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListOptionalParams, @@ -27,13 +27,13 @@ import { /** Class containing PrivateEndpointConnections operations. */ export class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { - private readonly client: AzureBotServiceContext; + private readonly client: AzureBotService; /** * Initialize a new instance of the class PrivateEndpointConnections class. * @param client Reference to the service client */ - constructor(client: AzureBotServiceContext) { + constructor(client: AzureBotService) { this.client = client; } diff --git a/sdk/botservice/arm-botservice/src/operations/privateLinkResources.ts b/sdk/botservice/arm-botservice/src/operations/privateLinkResources.ts index 098dc3c4f05c..3eb53d554040 100644 --- a/sdk/botservice/arm-botservice/src/operations/privateLinkResources.ts +++ b/sdk/botservice/arm-botservice/src/operations/privateLinkResources.ts @@ -10,7 +10,7 @@ import { PrivateLinkResources } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { AzureBotServiceContext } from "../azureBotServiceContext"; +import { AzureBotService } from "../azureBotService"; import { PrivateLinkResourcesListByBotResourceOptionalParams, PrivateLinkResourcesListByBotResourceResponse @@ -18,13 +18,13 @@ import { /** Class containing PrivateLinkResources operations. */ export class PrivateLinkResourcesImpl implements PrivateLinkResources { - private readonly client: AzureBotServiceContext; + private readonly client: AzureBotService; /** * Initialize a new instance of the class PrivateLinkResources class. * @param client Reference to the service client */ - constructor(client: AzureBotServiceContext) { + constructor(client: AzureBotService) { this.client = client; } diff --git a/sdk/botservice/arm-botservice/test/botservice_examples.ts b/sdk/botservice/arm-botservice/test/botservice_examples.ts deleted file mode 100644 index e75ff916a640..000000000000 --- a/sdk/botservice/arm-botservice/test/botservice_examples.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - env, - record, - RecorderEnvironmentSetup, - Recorder, - delay, - isPlaybackMode -} from "@azure-tools/test-recorder"; -import * as assert from "assert"; -import { AzureBotService } from "../src/azureBotService"; -import { ClientSecretCredential } from "@azure/identity"; - -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("Botservice test", () => { - let recorder: Recorder; - let client: AzureBotService; - let subscriptionId: string; - let location: string; - let resourceGroup: string; - let botresourceName: string; - - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); - subscriptionId = env.SUBSCRIPTION_ID; - // This is an example of how the environment variables are used - const credential = new ClientSecretCredential( - env.AZURE_TENANT_ID, - env.AZURE_CLIENT_ID, - env.AZURE_CLIENT_SECRET - ); - client = new AzureBotService(credential, subscriptionId); - location = "eastus"; - resourceGroup = "myjstest"; - botresourceName = "mybotxxx"; - }); - - afterEach(async function() { - await recorder.stop(); - }); - - it("bots create test", async function() { - const res = await client.bots.create(resourceGroup,botresourceName,{ - sku: { - name: "S1" - }, - etag: "etag1", - tags: { - tag1: "value1", - tag2: "value2" - }, - kind: "sdk", - properties: { - description: "The description of the bot", - developerAppInsightsApiKey: "w24iw5ocbhcig71su7ibaj63hey5ieaozeuwdv2r", - developerAppInsightKey: "59513bad-10a7-4d41-b4d0-b1c34c6af52a", - developerAppInsightsApplicationId: "cf03484e-3fdb-4b5e-9ad7-94bde32e5a2b", - displayName: "this is a test bot", - endpoint: "https://bing.com/messages/", - msaAppId: "41a220b9-6571-4f0b-bbd2-43f1c1d82f51" - }, - location: "global" - }); - assert.equal(res.name,botresourceName); - }); - - it("bots get test", async function() { - const res = await client.bots.get(resourceGroup,botresourceName); - assert.equal(res.name,botresourceName); - }); - - it("MsTeamsChannel create test", async function() { - const res = await client.channels.create(resourceGroup,botresourceName,"MsTeamsChannel",{ - location: "eastus", - properties: { - channelName: "MsTeamsChannel", - properties: { - isEnabled: true, - } - } - }); - assert.equal(res.name,"mybotxxx/MsTeamsChannel") - }); - - it("MsTeamsChannel get test", async function() { - const res = await client.channels.get(resourceGroup,botresourceName,"MsTeamsChannel"); - assert.equal(res.name,"mybotxxx/MsTeamsChannel") - }); - - it("MsTeamsChannel list test", async function() { - const resArray = new Array(); - for await (let item of client.channels.listByResourceGroup(resourceGroup,botresourceName)){ - resArray.push(item); - } - assert.equal(resArray.length,2); - }); - - it("MsTeamsChannel delete test", async function() { - const res = await client.channels.delete(resourceGroup,botresourceName,"MsTeamsChannel"); - const resArray = new Array(); - for await (let item of client.channels.listByResourceGroup(resourceGroup,botresourceName)){ - resArray.push(item); - } - assert.equal(resArray.length,1); - }); - - it("bots delete test", async function() { - const res = await client.bots.delete(resourceGroup,botresourceName); - const resArray = new Array(); - for await (let item of client.bots.list()){ - resArray.push(item); - } - assert.equal(resArray.length,0); - }); -}); diff --git a/sdk/botservice/arm-botservice/test/sampleTest.ts b/sdk/botservice/arm-botservice/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/botservice/arm-botservice/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +});