diff --git a/sdk/botservice/arm-botservice/README.md b/sdk/botservice/arm-botservice/README.md index 100ad8188bdd..f65499eea07a 100644 --- a/sdk/botservice/arm-botservice/README.md +++ b/sdk/botservice/arm-botservice/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-botservice ### How to use -#### nodejs - Authentication, client creation and get bots as an example written in TypeScript. +#### nodejs - client creation and get bots as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { AzureBotService, AzureBotServiceModels, AzureBotServiceMappers } from "@azure/arm-botservice"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { AzureBotService } = require("@azure/arm-botservice"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/botservice/arm-botservice/rollup.config.js b/sdk/botservice/arm-botservice/rollup.config.js index b8625979d3b4..6543f70a0a0b 100644 --- a/sdk/botservice/arm-botservice/rollup.config.js +++ b/sdk/botservice/arm-botservice/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. diff --git a/sdk/botservice/arm-botservice/src/azureBotService.ts b/sdk/botservice/arm-botservice/src/azureBotService.ts index f2e3696d217a..a96219be9b9c 100644 --- a/sdk/botservice/arm-botservice/src/azureBotService.ts +++ b/sdk/botservice/arm-botservice/src/azureBotService.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts b/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts index ffc9d3c8d4f9..db7cea0c4ba2 100644 --- a/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts +++ b/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -37,7 +36,7 @@ export class AzureBotServiceContext extends msRestAzure.AzureServiceClient { if (!options) { options = {}; } - if (!options.userAgent) { + if(!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -52,10 +51,10 @@ export class AzureBotServiceContext extends msRestAzure.AzureServiceClient { this.credentials = credentials; this.subscriptionId = subscriptionId; - if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts b/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts index 8fd5b0040848..823620fac9fd 100644 --- a/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. diff --git a/sdk/botservice/arm-botservice/src/models/botsMappers.ts b/sdk/botservice/arm-botservice/src/models/botsMappers.ts index 4e14c4629175..6e2b8090090e 100644 --- a/sdk/botservice/arm-botservice/src/models/botsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/botsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. diff --git a/sdk/botservice/arm-botservice/src/models/channelsMappers.ts b/sdk/botservice/arm-botservice/src/models/channelsMappers.ts index 068826fddb11..014c1bd59b8d 100644 --- a/sdk/botservice/arm-botservice/src/models/channelsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/channelsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. diff --git a/sdk/botservice/arm-botservice/src/models/directLineMappers.ts b/sdk/botservice/arm-botservice/src/models/directLineMappers.ts index 68e686658063..fd8d98fc3334 100644 --- a/sdk/botservice/arm-botservice/src/models/directLineMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/directLineMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. diff --git a/sdk/botservice/arm-botservice/src/models/index.ts b/sdk/botservice/arm-botservice/src/models/index.ts index 191a2d329da5..836c0c81798d 100644 --- a/sdk/botservice/arm-botservice/src/models/index.ts +++ b/sdk/botservice/arm-botservice/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. diff --git a/sdk/botservice/arm-botservice/src/models/mappers.ts b/sdk/botservice/arm-botservice/src/models/mappers.ts index 41feb438e31a..f7afe070f751 100644 --- a/sdk/botservice/arm-botservice/src/models/mappers.ts +++ b/sdk/botservice/arm-botservice/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. diff --git a/sdk/botservice/arm-botservice/src/models/operationsMappers.ts b/sdk/botservice/arm-botservice/src/models/operationsMappers.ts index cafd02e8a5f7..79c69b579355 100644 --- a/sdk/botservice/arm-botservice/src/models/operationsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. diff --git a/sdk/botservice/arm-botservice/src/models/parameters.ts b/sdk/botservice/arm-botservice/src/models/parameters.ts index e16378974344..8c2fb567b13c 100644 --- a/sdk/botservice/arm-botservice/src/models/parameters.ts +++ b/sdk/botservice/arm-botservice/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/botservice/arm-botservice/src/operations/botConnection.ts b/sdk/botservice/arm-botservice/src/operations/botConnection.ts index b6baaf2edfc3..ccb8e39fd831 100644 --- a/sdk/botservice/arm-botservice/src/operations/botConnection.ts +++ b/sdk/botservice/arm-botservice/src/operations/botConnection.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -505,6 +504,9 @@ const listByBotServiceNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/botservice/arm-botservice/src/operations/bots.ts b/sdk/botservice/arm-botservice/src/operations/bots.ts index c16d188081f9..59813052e6a9 100644 --- a/sdk/botservice/arm-botservice/src/operations/bots.ts +++ b/sdk/botservice/arm-botservice/src/operations/bots.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -522,6 +521,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -543,6 +545,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/botservice/arm-botservice/src/operations/channels.ts b/sdk/botservice/arm-botservice/src/operations/channels.ts index f54e613f0a2b..566ccb3119c8 100644 --- a/sdk/botservice/arm-botservice/src/operations/channels.ts +++ b/sdk/botservice/arm-botservice/src/operations/channels.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -506,6 +505,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/botservice/arm-botservice/src/operations/directLine.ts b/sdk/botservice/arm-botservice/src/operations/directLine.ts index 324c434c7724..2b44cb9f82ca 100644 --- a/sdk/botservice/arm-botservice/src/operations/directLine.ts +++ b/sdk/botservice/arm-botservice/src/operations/directLine.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/botservice/arm-botservice/src/operations/index.ts b/sdk/botservice/arm-botservice/src/operations/index.ts index d4f8c52a2296..d013bb34d088 100644 --- a/sdk/botservice/arm-botservice/src/operations/index.ts +++ b/sdk/botservice/arm-botservice/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/botservice/arm-botservice/src/operations/operations.ts b/sdk/botservice/arm-botservice/src/operations/operations.ts index 276bd6996cdd..0df13167d904 100644 --- a/sdk/botservice/arm-botservice/src/operations/operations.ts +++ b/sdk/botservice/arm-botservice/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ],