From b4b539306aced20da99046ef0b14f7308db80d54 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Fri, 9 Oct 2020 05:53:50 +0000 Subject: [PATCH] Generated from b0ab4b1c3849dbf30b1759fb4697d1913bab990e --- sdk/botservice/arm-botservice/LICENSE.txt | 2 +- sdk/botservice/arm-botservice/README.md | 6 +- sdk/botservice/arm-botservice/package.json | 20 +- .../arm-botservice/rollup.config.js | 2 +- .../arm-botservice/src/azureBotService.ts | 4 +- .../src/azureBotServiceContext.ts | 2 +- .../src/models/botConnectionMappers.ts | 10 +- .../arm-botservice/src/models/botsMappers.ts | 10 +- .../src/models/channelsMappers.ts | 10 +- ...hannelsMappers.ts => directLineMappers.ts} | 14 +- .../arm-botservice/src/models/index.ts | 515 +++++++----------- .../arm-botservice/src/models/mappers.ts | 402 ++++++++------ .../arm-botservice/src/models/parameters.ts | 21 +- .../src/operations/botConnection.ts | 30 +- .../arm-botservice/src/operations/channels.ts | 63 ++- .../src/operations/directLine.ts | 107 ++++ .../src/operations/enterpriseChannels.ts | 459 ---------------- .../arm-botservice/src/operations/index.ts | 2 +- sdk/botservice/arm-botservice/tsconfig.json | 2 +- 19 files changed, 654 insertions(+), 1027 deletions(-) rename sdk/botservice/arm-botservice/src/models/{enterpriseChannelsMappers.ts => directLineMappers.ts} (83%) create mode 100644 sdk/botservice/arm-botservice/src/operations/directLine.ts delete mode 100644 sdk/botservice/arm-botservice/src/operations/enterpriseChannels.ts diff --git a/sdk/botservice/arm-botservice/LICENSE.txt b/sdk/botservice/arm-botservice/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/botservice/arm-botservice/LICENSE.txt +++ b/sdk/botservice/arm-botservice/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/botservice/arm-botservice/README.md b/sdk/botservice/arm-botservice/README.md index 2b273b859b96..100ad8188bdd 100644 --- a/sdk/botservice/arm-botservice/README.md +++ b/sdk/botservice/arm-botservice/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-botservice ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -99,5 +100,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fbotservice%2Farm-botservice%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/botservice/arm-botservice/README.png) diff --git a/sdk/botservice/arm-botservice/package.json b/sdk/botservice/arm-botservice/package.json index 5d8fc5720000..e7c9a76d5722 100644 --- a/sdk/botservice/arm-botservice/package.json +++ b/sdk/botservice/arm-botservice/package.json @@ -4,9 +4,9 @@ "description": "AzureBotService Library with typescript type definitions for node.js and browser.", "version": "1.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,19 +20,19 @@ "module": "./esm/azureBotService.js", "types": "./esm/azureBotService.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/botservice/arm-botservice", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", diff --git a/sdk/botservice/arm-botservice/rollup.config.js b/sdk/botservice/arm-botservice/rollup.config.js index 7f61137828bb..b8625979d3b4 100644 --- a/sdk/botservice/arm-botservice/rollup.config.js +++ b/sdk/botservice/arm-botservice/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/botservice/arm-botservice/src/azureBotService.ts b/sdk/botservice/arm-botservice/src/azureBotService.ts index 33be08bb4bee..f2e3696d217a 100644 --- a/sdk/botservice/arm-botservice/src/azureBotService.ts +++ b/sdk/botservice/arm-botservice/src/azureBotService.ts @@ -19,9 +19,9 @@ class AzureBotService extends AzureBotServiceContext { // Operation groups bots: operations.Bots; channels: operations.Channels; + directLine: operations.DirectLine; operations: operations.Operations; botConnection: operations.BotConnection; - enterpriseChannels: operations.EnterpriseChannels; /** * Initializes a new instance of the AzureBotService class. @@ -33,9 +33,9 @@ class AzureBotService extends AzureBotServiceContext { super(credentials, subscriptionId, options); this.bots = new operations.Bots(this); this.channels = new operations.Channels(this); + this.directLine = new operations.DirectLine(this); this.operations = new operations.Operations(this); this.botConnection = new operations.BotConnection(this); - this.enterpriseChannels = new operations.EnterpriseChannels(this); } } diff --git a/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts b/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts index 7de04a139bbd..48f39aaffaab 100644 --- a/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts +++ b/sdk/botservice/arm-botservice/src/azureBotServiceContext.ts @@ -44,7 +44,7 @@ export class AzureBotServiceContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2018-07-12'; + this.apiVersion = '2020-06-02'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts b/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts index fee3937cff5b..8fd5b0040848 100644 --- a/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/botConnectionMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + AlexaChannel, + AlexaChannelProperties, BaseResource, Bot, BotChannel, @@ -20,11 +22,10 @@ export { DirectLineChannel, DirectLineChannelProperties, DirectLineSite, + DirectLineSpeechChannel, + DirectLineSpeechChannelProperties, EmailChannel, EmailChannelProperties, - EnterpriseChannel, - EnterpriseChannelNode, - EnterpriseChannelProperties, ErrorBody, ErrorModel, FacebookChannel, @@ -32,6 +33,9 @@ export { FacebookPage, KikChannel, KikChannelProperties, + LineChannel, + LineChannelProperties, + LineRegistration, MsTeamsChannel, MsTeamsChannelProperties, Resource, diff --git a/sdk/botservice/arm-botservice/src/models/botsMappers.ts b/sdk/botservice/arm-botservice/src/models/botsMappers.ts index 9bdc6e4e2ccb..4e14c4629175 100644 --- a/sdk/botservice/arm-botservice/src/models/botsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/botsMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + AlexaChannel, + AlexaChannelProperties, BaseResource, Bot, BotChannel, @@ -22,11 +24,10 @@ export { DirectLineChannel, DirectLineChannelProperties, DirectLineSite, + DirectLineSpeechChannel, + DirectLineSpeechChannelProperties, EmailChannel, EmailChannelProperties, - EnterpriseChannel, - EnterpriseChannelNode, - EnterpriseChannelProperties, ErrorBody, ErrorModel, FacebookChannel, @@ -34,6 +35,9 @@ export { FacebookPage, KikChannel, KikChannelProperties, + LineChannel, + LineChannelProperties, + LineRegistration, MsTeamsChannel, MsTeamsChannelProperties, Resource, diff --git a/sdk/botservice/arm-botservice/src/models/channelsMappers.ts b/sdk/botservice/arm-botservice/src/models/channelsMappers.ts index 3db35d79fd8b..068826fddb11 100644 --- a/sdk/botservice/arm-botservice/src/models/channelsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/channelsMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + AlexaChannel, + AlexaChannelProperties, BaseResource, Bot, BotChannel, @@ -20,11 +22,10 @@ export { DirectLineChannel, DirectLineChannelProperties, DirectLineSite, + DirectLineSpeechChannel, + DirectLineSpeechChannelProperties, EmailChannel, EmailChannelProperties, - EnterpriseChannel, - EnterpriseChannelNode, - EnterpriseChannelProperties, ErrorBody, ErrorModel, FacebookChannel, @@ -32,6 +33,9 @@ export { FacebookPage, KikChannel, KikChannelProperties, + LineChannel, + LineChannelProperties, + LineRegistration, MsTeamsChannel, MsTeamsChannelProperties, Resource, diff --git a/sdk/botservice/arm-botservice/src/models/enterpriseChannelsMappers.ts b/sdk/botservice/arm-botservice/src/models/directLineMappers.ts similarity index 83% rename from sdk/botservice/arm-botservice/src/models/enterpriseChannelsMappers.ts rename to sdk/botservice/arm-botservice/src/models/directLineMappers.ts index 1b3dc545173a..68e686658063 100644 --- a/sdk/botservice/arm-botservice/src/models/enterpriseChannelsMappers.ts +++ b/sdk/botservice/arm-botservice/src/models/directLineMappers.ts @@ -8,6 +8,8 @@ export { discriminators, + AlexaChannel, + AlexaChannelProperties, BaseResource, Bot, BotChannel, @@ -19,14 +21,10 @@ export { DirectLineChannel, DirectLineChannelProperties, DirectLineSite, + DirectLineSpeechChannel, + DirectLineSpeechChannelProperties, EmailChannel, EmailChannelProperties, - EnterpriseChannel, - EnterpriseChannelCheckNameAvailabilityRequest, - EnterpriseChannelCheckNameAvailabilityResponse, - EnterpriseChannelNode, - EnterpriseChannelProperties, - EnterpriseChannelResponseList, ErrorBody, ErrorModel, FacebookChannel, @@ -34,9 +32,13 @@ export { FacebookPage, KikChannel, KikChannelProperties, + LineChannel, + LineChannelProperties, + LineRegistration, MsTeamsChannel, MsTeamsChannelProperties, Resource, + SiteInfo, Sku, SkypeChannel, SkypeChannelProperties, diff --git a/sdk/botservice/arm-botservice/src/models/index.ts b/sdk/botservice/arm-botservice/src/models/index.ts index 6054293cd250..191a2d329da5 100644 --- a/sdk/botservice/arm-botservice/src/models/index.ts +++ b/sdk/botservice/arm-botservice/src/models/index.ts @@ -142,7 +142,7 @@ export interface Bot extends Resource { /** * Contains the possible cases for Channel. */ -export type ChannelUnion = Channel | FacebookChannel | EmailChannel | MsTeamsChannel | SkypeChannel | KikChannel | WebChatChannel | DirectLineChannel | TelegramChannel | SmsChannel | SlackChannel; +export type ChannelUnion = Channel | AlexaChannel | FacebookChannel | EmailChannel | MsTeamsChannel | SkypeChannel | KikChannel | WebChatChannel | DirectLineChannel | TelegramChannel | SmsChannel | SlackChannel | LineChannel | DirectLineSpeechChannel; /** * Channel definition @@ -164,6 +164,44 @@ export interface BotChannel extends Resource { properties?: ChannelUnion; } +/** + * The parameters to provide for the Alexa channel. + */ +export interface AlexaChannelProperties { + /** + * The Alexa skill Id + */ + alexaSkillId: string; + /** + * Url fragment used in part of the Uri configured in Alexa + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly urlFragment?: string; + /** + * Full Uri used to configured the skill in Alexa + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serviceEndpointUri?: string; + /** + * Whether this channel is enabled for the bot + */ + isEnabled: boolean; +} + +/** + * Alexa channel definition + */ +export interface AlexaChannel { + /** + * Polymorphic Discriminator + */ + channelName: "AlexaChannel"; + /** + * The set of properties specific to Alexa channel resource + */ + properties?: AlexaChannelProperties; +} + /** * A Facebook page for Facebook channel registration */ @@ -635,6 +673,10 @@ export interface SlackChannelProperties { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isValidated?: boolean; + /** + * The Slack signing secret. + */ + signingSecret?: string; /** * Whether this channel is enabled for the bot */ @@ -655,6 +697,114 @@ export interface SlackChannel { properties?: SlackChannelProperties; } +/** + * The properties corresponding to a line channel registration + */ +export interface LineRegistration { + /** + * Id generated for the line channel registration + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly generatedId?: string; + /** + * Secret for the line channel registration + */ + channelSecret?: string; + /** + * Access token for the line channel registration + */ + channelAccessToken?: string; +} + +/** + * The parameters to provide for the Line channel. + */ +export interface LineChannelProperties { + /** + * The list of line channel registrations + */ + lineRegistrations: LineRegistration[]; + /** + * Callback Url to enter in line registration. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly callbackUrl?: string; + /** + * Whether this channel is validated for the bot + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isValidated?: boolean; +} + +/** + * Line channel definition + */ +export interface LineChannel { + /** + * Polymorphic Discriminator + */ + channelName: "LineChannel"; + /** + * The set of properties specific to line channel resource + */ + properties?: LineChannelProperties; +} + +/** + * The parameters to provide for the DirectLine Speech channel. + */ +export interface DirectLineSpeechChannelProperties { + /** + * The cognitive service subscription ID to use with this channel registration. + */ + cognitiveServicesSubscriptionId: string; + /** + * Whether this channel is enabled or not. + */ + isEnabled?: boolean; + /** + * Custom speech model id (optional). + */ + customVoiceDeploymentId?: string; + /** + * Custom voice deployment id (optional). + */ + customSpeechModelId?: string; + /** + * Make this a default bot for chosen cognitive service account. + */ + isDefaultBotForCogSvcAccount?: boolean; +} + +/** + * DirectLine Speech channel definition + */ +export interface DirectLineSpeechChannel { + /** + * Polymorphic Discriminator + */ + channelName: "DirectLineSpeechChannel"; + /** + * The set of properties specific to DirectLine Speech channel resource + */ + properties?: DirectLineSpeechChannelProperties; +} + +/** + * Site information for WebChat or DirectLine Channels to identify which site to regenerate keys + * for. + */ +export interface SiteInfo { + /** + * The site name + */ + siteName: string; + /** + * Determines which key is to be regenerated. Possible values include: 'key1', 'key2' + */ + key: Key; +} + /** * The display name of a connection Item Setting registered with the Bot */ @@ -808,15 +958,15 @@ export interface ServiceProvider { } /** - * The list of bot service service providers response. + * The list of bot service providers response. */ export interface ServiceProviderResponseList { /** - * The link used to get the next page of bot service service providers. + * The link used to get the next page of bot service providers. */ nextLink?: string; /** - * Gets the list of bot service service providers and their properties. + * Gets the list of bot service providers and their properties. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly value?: ServiceProvider[]; @@ -919,85 +1069,6 @@ export interface CheckNameAvailabilityResponseBody { message?: string; } -/** - * A request to Bot Service Management to check availability of an Enterprise Channel name. - */ -export interface EnterpriseChannelCheckNameAvailabilityRequest { - /** - * The name of the Enterprise Channel for which availability needs to be checked. - */ - name?: string; -} - -/** - * A request to Bot Service Management to check availability of an Enterprise Channel name. - */ -export interface EnterpriseChannelCheckNameAvailabilityResponse { - /** - * Indicates if the Enterprise Channel name is valid. - */ - valid?: boolean; - /** - * Additional information about why a bot name is not available. - */ - message?: string; -} - -/** - * The properties specific to an Enterprise Channel Node. - */ -export interface EnterpriseChannelNode { - /** - * Id of Enterprise Channel Node. This is generated by the Bot Framework. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The current state of the Enterprise Channel Node. Possible values include: 'Creating', - * 'CreateFailed', 'Started', 'Starting', 'StartFailed', 'Stopped', 'Stopping', 'StopFailed', - * 'Deleting', 'DeleteFailed' - */ - state?: EnterpriseChannelNodeState; - /** - * The name of the Enterprise Channel Node. - */ - name: string; - /** - * The sku of the Enterprise Channel Node. - */ - azureSku: string; - /** - * The location of the Enterprise Channel Node. - */ - azureLocation: string; -} - -/** - * The parameters to provide for the Enterprise Channel. - */ -export interface EnterpriseChannelProperties { - /** - * The current state of the Enterprise Channel. Possible values include: 'Creating', - * 'CreateFailed', 'Started', 'Starting', 'StartFailed', 'Stopped', 'Stopping', 'StopFailed', - * 'Deleting', 'DeleteFailed' - */ - state?: EnterpriseChannelState; - /** - * The nodes associated with the Enterprise Channel. - */ - nodes: EnterpriseChannelNode[]; -} - -/** - * Enterprise Channel resource definition - */ -export interface EnterpriseChannel extends Resource { - /** - * The set of properties specific to an Enterprise Channel resource. - */ - properties?: EnterpriseChannelProperties; -} - /** * Optional Parameters. */ @@ -1060,68 +1131,6 @@ export interface ChannelsUpdateOptionalParams extends msRest.RequestOptionsBase properties?: ChannelUnion; } -/** - * Optional Parameters. - */ -export interface EnterpriseChannelsUpdateOptionalParams extends msRest.RequestOptionsBase { - /** - * Specifies the location of the resource. - */ - location?: string; - /** - * Contains resource tags defined as key/value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Gets or sets the SKU of the resource. - */ - sku?: Sku; - /** - * Required. Gets or sets the Kind of the resource. Possible values include: 'sdk', 'designer', - * 'bot', 'function' - */ - kind?: Kind; - /** - * Entity Tag - */ - etag?: string; - /** - * The set of properties specific to an Enterprise Channel resource. - */ - properties?: EnterpriseChannelProperties; -} - -/** - * Optional Parameters. - */ -export interface EnterpriseChannelsBeginUpdateOptionalParams extends msRest.RequestOptionsBase { - /** - * Specifies the location of the resource. - */ - location?: string; - /** - * Contains resource tags defined as key/value pairs. - */ - tags?: { [propertyName: string]: string }; - /** - * Gets or sets the SKU of the resource. - */ - sku?: Sku; - /** - * Required. Gets or sets the Kind of the resource. Possible values include: 'sdk', 'designer', - * 'bot', 'function' - */ - kind?: Kind; - /** - * Entity Tag - */ - etag?: string; - /** - * The set of properties specific to an Enterprise Channel resource. - */ - properties?: EnterpriseChannelProperties; -} - /** * An interface representing AzureBotServiceOptions. */ @@ -1177,18 +1186,6 @@ export interface ConnectionSettingResponseList extends Array nextLink?: string; } -/** - * @interface - * The list of bot service operation response. - * @extends Array - */ -export interface EnterpriseChannelResponseList extends Array { - /** - * The link used to get the next page of bot service resources. - */ - nextLink?: string; -} - /** * Defines values for SkuName. * Possible values include: 'F0', 'S1' @@ -1214,32 +1211,30 @@ export type SkuTier = 'Free' | 'Standard'; export type Kind = 'sdk' | 'designer' | 'bot' | 'function'; /** - * Defines values for EnterpriseChannelState. - * Possible values include: 'Creating', 'CreateFailed', 'Started', 'Starting', 'StartFailed', - * 'Stopped', 'Stopping', 'StopFailed', 'Deleting', 'DeleteFailed' + * Defines values for Key. + * Possible values include: 'key1', 'key2' * @readonly * @enum {string} */ -export type EnterpriseChannelState = 'Creating' | 'CreateFailed' | 'Started' | 'Starting' | 'StartFailed' | 'Stopped' | 'Stopping' | 'StopFailed' | 'Deleting' | 'DeleteFailed'; +export type Key = 'key1' | 'key2'; /** - * Defines values for EnterpriseChannelNodeState. - * Possible values include: 'Creating', 'CreateFailed', 'Started', 'Starting', 'StartFailed', - * 'Stopped', 'Stopping', 'StopFailed', 'Deleting', 'DeleteFailed' + * Defines values for ChannelName. + * Possible values include: 'AlexaChannel', 'FacebookChannel', 'EmailChannel', 'KikChannel', + * 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', + * 'DirectLineChannel', 'SmsChannel', 'LineChannel', 'DirectLineSpeechChannel' * @readonly * @enum {string} */ -export type EnterpriseChannelNodeState = 'Creating' | 'CreateFailed' | 'Started' | 'Starting' | 'StartFailed' | 'Stopped' | 'Stopping' | 'StopFailed' | 'Deleting' | 'DeleteFailed'; +export type ChannelName = 'AlexaChannel' | 'FacebookChannel' | 'EmailChannel' | 'KikChannel' | 'TelegramChannel' | 'SlackChannel' | 'MsTeamsChannel' | 'SkypeChannel' | 'WebChatChannel' | 'DirectLineChannel' | 'SmsChannel' | 'LineChannel' | 'DirectLineSpeechChannel'; /** - * Defines values for ChannelName. - * Possible values include: 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', - * 'SlackChannel', 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', - * 'SmsChannel' + * Defines values for RegenerateKeysChannelName. + * Possible values include: 'WebChatChannel', 'DirectLineChannel' * @readonly * @enum {string} */ -export type ChannelName = 'FacebookChannel' | 'EmailChannel' | 'KikChannel' | 'TelegramChannel' | 'SlackChannel' | 'MsTeamsChannel' | 'SkypeChannel' | 'WebChatChannel' | 'DirectLineChannel' | 'SmsChannel'; +export type RegenerateKeysChannelName = 'WebChatChannel' | 'DirectLineChannel'; /** * Contains response data for the create operation. @@ -1521,6 +1516,26 @@ export type ChannelsListByResourceGroupNextResponse = ChannelResponseList & { }; }; +/** + * Contains response data for the regenerateKeys operation. + */ +export type DirectLineRegenerateKeysResponse = BotChannel & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BotChannel; + }; +}; + /** * Contains response data for the list operation. */ @@ -1700,163 +1715,3 @@ export type BotConnectionListByBotServiceNextResponse = ConnectionSettingRespons parsedBody: ConnectionSettingResponseList; }; }; - -/** - * Contains response data for the checkNameAvailability operation. - */ -export type EnterpriseChannelsCheckNameAvailabilityResponse = EnterpriseChannelCheckNameAvailabilityResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannelCheckNameAvailabilityResponse; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type EnterpriseChannelsListByResourceGroupResponse = EnterpriseChannelResponseList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannelResponseList; - }; -}; - -/** - * Contains response data for the create operation. - */ -export type EnterpriseChannelsCreateResponse = EnterpriseChannel & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannel; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type EnterpriseChannelsUpdateResponse = EnterpriseChannel & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannel; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type EnterpriseChannelsGetResponse = EnterpriseChannel & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannel; - }; -}; - -/** - * Contains response data for the beginCreate operation. - */ -export type EnterpriseChannelsBeginCreateResponse = EnterpriseChannel & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannel; - }; -}; - -/** - * Contains response data for the beginUpdate operation. - */ -export type EnterpriseChannelsBeginUpdateResponse = EnterpriseChannel & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannel; - }; -}; - -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type EnterpriseChannelsListByResourceGroupNextResponse = EnterpriseChannelResponseList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EnterpriseChannelResponseList; - }; -}; diff --git a/sdk/botservice/arm-botservice/src/models/mappers.ts b/sdk/botservice/arm-botservice/src/models/mappers.ts index dbce67e96b70..41feb438e31a 100644 --- a/sdk/botservice/arm-botservice/src/models/mappers.ts +++ b/sdk/botservice/arm-botservice/src/models/mappers.ts @@ -270,6 +270,64 @@ export const BotChannel: msRest.CompositeMapper = { } }; +export const AlexaChannelProperties: msRest.CompositeMapper = { + serializedName: "AlexaChannelProperties", + type: { + name: "Composite", + className: "AlexaChannelProperties", + modelProperties: { + alexaSkillId: { + required: true, + serializedName: "alexaSkillId", + type: { + name: "String" + } + }, + urlFragment: { + readOnly: true, + serializedName: "urlFragment", + type: { + name: "String" + } + }, + serviceEndpointUri: { + readOnly: true, + serializedName: "serviceEndpointUri", + type: { + name: "String" + } + }, + isEnabled: { + required: true, + serializedName: "isEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const AlexaChannel: msRest.CompositeMapper = { + serializedName: "AlexaChannel", + type: { + name: "Composite", + polymorphicDiscriminator: Channel.type.polymorphicDiscriminator, + uberParent: "Channel", + className: "AlexaChannel", + modelProperties: { + ...Channel.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AlexaChannelProperties" + } + } + } + } +}; + export const FacebookPage: msRest.CompositeMapper = { serializedName: "FacebookPage", type: { @@ -1007,6 +1065,12 @@ export const SlackChannelProperties: msRest.CompositeMapper = { name: "Boolean" } }, + signingSecret: { + serializedName: "signingSecret", + type: { + name: "String" + } + }, isEnabled: { required: true, serializedName: "isEnabled", @@ -1038,6 +1102,181 @@ export const SlackChannel: msRest.CompositeMapper = { } }; +export const LineRegistration: msRest.CompositeMapper = { + serializedName: "LineRegistration", + type: { + name: "Composite", + className: "LineRegistration", + modelProperties: { + generatedId: { + readOnly: true, + serializedName: "generatedId", + type: { + name: "String" + } + }, + channelSecret: { + serializedName: "channelSecret", + type: { + name: "String" + } + }, + channelAccessToken: { + serializedName: "channelAccessToken", + type: { + name: "String" + } + } + } + } +}; + +export const LineChannelProperties: msRest.CompositeMapper = { + serializedName: "LineChannelProperties", + type: { + name: "Composite", + className: "LineChannelProperties", + modelProperties: { + lineRegistrations: { + required: true, + serializedName: "lineRegistrations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LineRegistration" + } + } + } + }, + callbackUrl: { + readOnly: true, + serializedName: "callbackUrl", + type: { + name: "String" + } + }, + isValidated: { + readOnly: true, + serializedName: "isValidated", + type: { + name: "Boolean" + } + } + } + } +}; + +export const LineChannel: msRest.CompositeMapper = { + serializedName: "LineChannel", + type: { + name: "Composite", + polymorphicDiscriminator: Channel.type.polymorphicDiscriminator, + uberParent: "Channel", + className: "LineChannel", + modelProperties: { + ...Channel.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "LineChannelProperties" + } + } + } + } +}; + +export const DirectLineSpeechChannelProperties: msRest.CompositeMapper = { + serializedName: "DirectLineSpeechChannelProperties", + type: { + name: "Composite", + className: "DirectLineSpeechChannelProperties", + modelProperties: { + cognitiveServicesSubscriptionId: { + required: true, + serializedName: "cognitiveServicesSubscriptionId", + type: { + name: "String" + } + }, + isEnabled: { + serializedName: "isEnabled", + type: { + name: "Boolean" + } + }, + customVoiceDeploymentId: { + serializedName: "customVoiceDeploymentId", + type: { + name: "String" + } + }, + customSpeechModelId: { + serializedName: "customSpeechModelId", + type: { + name: "String" + } + }, + isDefaultBotForCogSvcAccount: { + serializedName: "isDefaultBotForCogSvcAccount", + type: { + name: "Boolean" + } + } + } + } +}; + +export const DirectLineSpeechChannel: msRest.CompositeMapper = { + serializedName: "DirectLineSpeechChannel", + type: { + name: "Composite", + polymorphicDiscriminator: Channel.type.polymorphicDiscriminator, + uberParent: "Channel", + className: "DirectLineSpeechChannel", + modelProperties: { + ...Channel.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DirectLineSpeechChannelProperties" + } + } + } + } +}; + +export const SiteInfo: msRest.CompositeMapper = { + serializedName: "SiteInfo", + type: { + name: "Composite", + className: "SiteInfo", + modelProperties: { + siteName: { + required: true, + serializedName: "siteName", + type: { + name: "String" + } + }, + key: { + required: true, + serializedName: "key", + type: { + name: "Enum", + allowedValues: [ + "key1", + "key2" + ] + } + } + } + } +}; + export const ConnectionItemName: msRest.CompositeMapper = { serializedName: "ConnectionItemName", type: { @@ -1463,135 +1702,6 @@ export const CheckNameAvailabilityResponseBody: msRest.CompositeMapper = { } }; -export const EnterpriseChannelCheckNameAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "EnterpriseChannelCheckNameAvailabilityRequest", - type: { - name: "Composite", - className: "EnterpriseChannelCheckNameAvailabilityRequest", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const EnterpriseChannelCheckNameAvailabilityResponse: msRest.CompositeMapper = { - serializedName: "EnterpriseChannelCheckNameAvailabilityResponse", - type: { - name: "Composite", - className: "EnterpriseChannelCheckNameAvailabilityResponse", - modelProperties: { - valid: { - serializedName: "valid", - type: { - name: "Boolean" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const EnterpriseChannelNode: msRest.CompositeMapper = { - serializedName: "EnterpriseChannelNode", - type: { - name: "Composite", - className: "EnterpriseChannelNode", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - state: { - serializedName: "state", - type: { - name: "String" - } - }, - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - azureSku: { - required: true, - serializedName: "azureSku", - type: { - name: "String" - } - }, - azureLocation: { - required: true, - serializedName: "azureLocation", - type: { - name: "String" - } - } - } - } -}; - -export const EnterpriseChannelProperties: msRest.CompositeMapper = { - serializedName: "EnterpriseChannelProperties", - type: { - name: "Composite", - className: "EnterpriseChannelProperties", - modelProperties: { - state: { - serializedName: "state", - type: { - name: "String" - } - }, - nodes: { - required: true, - serializedName: "nodes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnterpriseChannelNode" - } - } - } - } - } - } -}; - -export const EnterpriseChannel: msRest.CompositeMapper = { - serializedName: "EnterpriseChannel", - type: { - name: "Composite", - className: "EnterpriseChannel", - modelProperties: { - ...Resource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "EnterpriseChannelProperties" - } - } - } - } -}; - export const BotResponseList: msRest.CompositeMapper = { serializedName: "BotResponseList", type: { @@ -1707,37 +1817,9 @@ export const ConnectionSettingResponseList: msRest.CompositeMapper = { } }; -export const EnterpriseChannelResponseList: msRest.CompositeMapper = { - serializedName: "EnterpriseChannelResponseList", - type: { - name: "Composite", - className: "EnterpriseChannelResponseList", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - }, - value: { - readOnly: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnterpriseChannel" - } - } - } - } - } - } -}; - export const discriminators = { 'Channel' : Channel, + 'Channel.AlexaChannel' : AlexaChannel, 'Channel.FacebookChannel' : FacebookChannel, 'Channel.EmailChannel' : EmailChannel, 'Channel.MsTeamsChannel' : MsTeamsChannel, @@ -1747,6 +1829,8 @@ export const discriminators = { 'Channel.DirectLineChannel' : DirectLineChannel, 'Channel.TelegramChannel' : TelegramChannel, 'Channel.SmsChannel' : SmsChannel, - 'Channel.SlackChannel' : SlackChannel + 'Channel.SlackChannel' : SlackChannel, + 'Channel.LineChannel' : LineChannel, + 'Channel.DirectLineSpeechChannel' : DirectLineSpeechChannel }; diff --git a/sdk/botservice/arm-botservice/src/models/parameters.ts b/sdk/botservice/arm-botservice/src/models/parameters.ts index 239111695a18..e16378974344 100644 --- a/sdk/botservice/arm-botservice/src/models/parameters.ts +++ b/sdk/botservice/arm-botservice/src/models/parameters.ts @@ -38,6 +38,7 @@ export const channelName0: msRest.OperationURLParameter = { type: { name: "Enum", allowedValues: [ + "AlexaChannel", "FacebookChannel", "EmailChannel", "KikChannel", @@ -47,7 +48,9 @@ export const channelName0: msRest.OperationURLParameter = { "SkypeChannel", "WebChatChannel", "DirectLineChannel", - "SmsChannel" + "SmsChannel", + "LineChannel", + "DirectLineSpeechChannel" ] } } @@ -67,6 +70,20 @@ export const channelName1: msRest.OperationURLParameter = { } } }; +export const channelName2: msRest.OperationURLParameter = { + parameterPath: "channelName", + mapper: { + required: true, + serializedName: "channelName", + type: { + name: "Enum", + allowedValues: [ + "WebChatChannel", + "DirectLineChannel" + ] + } + } +}; export const connectionName: msRest.OperationURLParameter = { parameterPath: "connectionName", mapper: { @@ -75,7 +92,7 @@ export const connectionName: msRest.OperationURLParameter = { constraints: { MaxLength: 64, MinLength: 2, - Pattern: /^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/ + Pattern: /^[a-zA-Z0-9][\sa-zA-Z0-9_.-]*$/ }, type: { name: "String" diff --git a/sdk/botservice/arm-botservice/src/operations/botConnection.ts b/sdk/botservice/arm-botservice/src/operations/botConnection.ts index c0ca33d2dafc..b6baaf2edfc3 100644 --- a/sdk/botservice/arm-botservice/src/operations/botConnection.ts +++ b/sdk/botservice/arm-botservice/src/operations/botConnection.ts @@ -54,7 +54,7 @@ export class BotConnection { * Get a Connection Setting registration for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param [options] The optional parameters * @returns Promise */ @@ -62,14 +62,14 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param callback The callback */ listWithSecrets(resourceGroupName: string, resourceName: string, connectionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param options The optional parameters * @param callback The callback */ @@ -90,7 +90,7 @@ export class BotConnection { * Register a new Auth Connection for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for creating the Connection Setting. * @param [options] The optional parameters * @returns Promise @@ -99,7 +99,7 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for creating the Connection Setting. * @param callback The callback */ @@ -107,7 +107,7 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for creating the Connection Setting. * @param options The optional parameters * @param callback The callback @@ -130,7 +130,7 @@ export class BotConnection { * Updates a Connection Setting registration for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for updating the Connection Setting. * @param [options] The optional parameters * @returns Promise @@ -139,7 +139,7 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for updating the Connection Setting. * @param callback The callback */ @@ -147,7 +147,7 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for updating the Connection Setting. * @param options The optional parameters * @param callback The callback @@ -170,7 +170,7 @@ export class BotConnection { * Get a Connection Setting registration for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param [options] The optional parameters * @returns Promise */ @@ -178,14 +178,14 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param callback The callback */ get(resourceGroupName: string, resourceName: string, connectionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param options The optional parameters * @param callback The callback */ @@ -206,7 +206,7 @@ export class BotConnection { * Deletes a Connection Setting registration for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param [options] The optional parameters * @returns Promise */ @@ -214,14 +214,14 @@ export class BotConnection { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param callback The callback */ deleteMethod(resourceGroupName: string, resourceName: string, connectionName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource + * @param connectionName The name of the Bot Service Connection Setting resource. * @param options The optional parameters * @param callback The callback */ diff --git a/sdk/botservice/arm-botservice/src/operations/channels.ts b/sdk/botservice/arm-botservice/src/operations/channels.ts index 7e63053ff93b..f54e613f0a2b 100644 --- a/sdk/botservice/arm-botservice/src/operations/channels.ts +++ b/sdk/botservice/arm-botservice/src/operations/channels.ts @@ -30,9 +30,10 @@ export class Channels { * Creates a Channel registration for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param parameters The parameters to provide for the created bot. * @param [options] The optional parameters * @returns Promise @@ -41,9 +42,10 @@ export class Channels { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param parameters The parameters to provide for the created bot. * @param callback The callback */ @@ -51,9 +53,10 @@ export class Channels { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param parameters The parameters to provide for the created bot. * @param options The optional parameters * @param callback The callback @@ -76,9 +79,10 @@ export class Channels { * Updates a Channel registration for a Bot Service * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param [options] The optional parameters * @returns Promise */ @@ -86,18 +90,20 @@ export class Channels { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param callback The callback */ update(resourceGroupName: string, resourceName: string, channelName: Models.ChannelName, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param options The optional parameters * @param callback The callback */ @@ -190,9 +196,10 @@ export class Channels { * Lists a Channel registration for a Bot Service including secrets * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param [options] The optional parameters * @returns Promise */ @@ -200,18 +207,20 @@ export class Channels { /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param callback The callback */ listWithKeys(resourceGroupName: string, resourceName: string, channelName: Models.ChannelName, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. Possible values include: 'FacebookChannel', - * 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', - * 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + * @param channelName The name of the Channel resource. Possible values include: 'AlexaChannel', + * 'FacebookChannel', 'EmailChannel', 'KikChannel', 'TelegramChannel', 'SlackChannel', + * 'MsTeamsChannel', 'SkypeChannel', 'WebChatChannel', 'DirectLineChannel', 'SmsChannel', + * 'LineChannel', 'DirectLineSpeechChannel' * @param options The optional parameters * @param callback The callback */ diff --git a/sdk/botservice/arm-botservice/src/operations/directLine.ts b/sdk/botservice/arm-botservice/src/operations/directLine.ts new file mode 100644 index 000000000000..324c434c7724 --- /dev/null +++ b/sdk/botservice/arm-botservice/src/operations/directLine.ts @@ -0,0 +1,107 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/directLineMappers"; +import * as Parameters from "../models/parameters"; +import { AzureBotServiceContext } from "../azureBotServiceContext"; + +/** Class representing a DirectLine. */ +export class DirectLine { + private readonly client: AzureBotServiceContext; + + /** + * Create a DirectLine. + * @param {AzureBotServiceContext} client Reference to the service client. + */ + constructor(client: AzureBotServiceContext) { + this.client = client; + } + + /** + * Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService + * resource + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Channel resource for which keys are to be regenerated. + * Possible values include: 'WebChatChannel', 'DirectLineChannel' + * @param parameters The parameters to provide for the created bot. + * @param [options] The optional parameters + * @returns Promise + */ + regenerateKeys(resourceGroupName: string, resourceName: string, channelName: Models.RegenerateKeysChannelName, parameters: Models.SiteInfo, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Channel resource for which keys are to be regenerated. + * Possible values include: 'WebChatChannel', 'DirectLineChannel' + * @param parameters The parameters to provide for the created bot. + * @param callback The callback + */ + regenerateKeys(resourceGroupName: string, resourceName: string, channelName: Models.RegenerateKeysChannelName, parameters: Models.SiteInfo, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Channel resource for which keys are to be regenerated. + * Possible values include: 'WebChatChannel', 'DirectLineChannel' + * @param parameters The parameters to provide for the created bot. + * @param options The optional parameters + * @param callback The callback + */ + regenerateKeys(resourceGroupName: string, resourceName: string, channelName: Models.RegenerateKeysChannelName, parameters: Models.SiteInfo, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + regenerateKeys(resourceGroupName: string, resourceName: string, channelName: Models.RegenerateKeysChannelName, parameters: Models.SiteInfo, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + channelName, + parameters, + options + }, + regenerateKeysOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const regenerateKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}/regeneratekeys", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.subscriptionId, + Parameters.channelName2 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SiteInfo, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BotChannel + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + serializer +}; diff --git a/sdk/botservice/arm-botservice/src/operations/enterpriseChannels.ts b/sdk/botservice/arm-botservice/src/operations/enterpriseChannels.ts deleted file mode 100644 index 72ed6d97b817..000000000000 --- a/sdk/botservice/arm-botservice/src/operations/enterpriseChannels.ts +++ /dev/null @@ -1,459 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/enterpriseChannelsMappers"; -import * as Parameters from "../models/parameters"; -import { AzureBotServiceContext } from "../azureBotServiceContext"; - -/** Class representing a EnterpriseChannels. */ -export class EnterpriseChannels { - private readonly client: AzureBotServiceContext; - - /** - * Create a EnterpriseChannels. - * @param {AzureBotServiceContext} client Reference to the service client. - */ - constructor(client: AzureBotServiceContext) { - this.client = client; - } - - /** - * Check whether an Enterprise Channel name is available. - * @param parameters The parameters to provide for the Enterprise Channel check name availability - * request. - * @param [options] The optional parameters - * @returns Promise - */ - checkNameAvailability(parameters: Models.EnterpriseChannelCheckNameAvailabilityRequest, options?: msRest.RequestOptionsBase): Promise; - /** - * @param parameters The parameters to provide for the Enterprise Channel check name availability - * request. - * @param callback The callback - */ - checkNameAvailability(parameters: Models.EnterpriseChannelCheckNameAvailabilityRequest, callback: msRest.ServiceCallback): void; - /** - * @param parameters The parameters to provide for the Enterprise Channel check name availability - * request. - * @param options The optional parameters - * @param callback The callback - */ - checkNameAvailability(parameters: Models.EnterpriseChannelCheckNameAvailabilityRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkNameAvailability(parameters: Models.EnterpriseChannelCheckNameAvailabilityRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - parameters, - options - }, - checkNameAvailabilityOperationSpec, - callback) as Promise; - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * Creates an Enterprise Channel. - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param parameters The parameters to provide for the new Enterprise Channel. - * @param [options] The optional parameters - * @returns Promise - */ - create(resourceGroupName: string, resourceName: string, parameters: Models.EnterpriseChannel, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreate(resourceGroupName,resourceName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Updates an Enterprise Channel. - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, resourceName: string, options?: Models.EnterpriseChannelsUpdateOptionalParams): Promise { - return this.beginUpdate(resourceGroupName,resourceName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Deletes an Enterprise Channel from the resource group - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,resourceName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Returns an Enterprise Channel specified by the parameters. - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - resourceName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Creates an Enterprise Channel. - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param parameters The parameters to provide for the new Enterprise Channel. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreate(resourceGroupName: string, resourceName: string, parameters: Models.EnterpriseChannel, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - resourceName, - parameters, - options - }, - beginCreateOperationSpec, - options); - } - - /** - * Updates an Enterprise Channel. - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param [options] The optional parameters - * @returns Promise - */ - beginUpdate(resourceGroupName: string, resourceName: string, options?: Models.EnterpriseChannelsBeginUpdateOptionalParams): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - resourceName, - options - }, - beginUpdateOperationSpec, - options); - } - - /** - * Deletes an Enterprise Channel from the resource group - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - resourceName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Returns all the resources of a particular type belonging to a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.BotService/checkEnterpriseChannelNameAvailability", - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.EnterpriseChannelCheckNameAvailabilityRequest, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.EnterpriseChannelCheckNameAvailabilityResponse - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EnterpriseChannelResponseList - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels/{resourceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.resourceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EnterpriseChannel - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels/{resourceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.resourceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.EnterpriseChannel, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.EnterpriseChannel - }, - 201: { - bodyMapper: Mappers.EnterpriseChannel - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels/{resourceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.resourceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - location: [ - "options", - "location" - ], - tags: [ - "options", - "tags" - ], - sku: [ - "options", - "sku" - ], - kind: [ - "options", - "kind" - ], - etag: [ - "options", - "etag" - ], - properties: [ - "options", - "properties" - ] - }, - mapper: { - ...Mappers.EnterpriseChannel, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.EnterpriseChannel - }, - 201: { - bodyMapper: Mappers.EnterpriseChannel - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels/{resourceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.resourceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EnterpriseChannelResponseList - }, - default: { - bodyMapper: Mappers.ErrorModel - } - }, - serializer -}; diff --git a/sdk/botservice/arm-botservice/src/operations/index.ts b/sdk/botservice/arm-botservice/src/operations/index.ts index 020a6da63481..d4f8c52a2296 100644 --- a/sdk/botservice/arm-botservice/src/operations/index.ts +++ b/sdk/botservice/arm-botservice/src/operations/index.ts @@ -10,6 +10,6 @@ export * from "./bots"; export * from "./channels"; +export * from "./directLine"; export * from "./operations"; export * from "./botConnection"; -export * from "./enterpriseChannels"; diff --git a/sdk/botservice/arm-botservice/tsconfig.json b/sdk/botservice/arm-botservice/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/botservice/arm-botservice/tsconfig.json +++ b/sdk/botservice/arm-botservice/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true