From 0cd7d8b8f8ca001a9e54beb20fbef7f9f126aa8f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 10 Jan 2023 03:17:35 +0000 Subject: [PATCH] CodeGen from PR 22077 in Azure/azure-rest-api-specs Merge e62997b09169e9c8f04a251119955760492a727b into 38e580acd81dbb904d048a23d805dd58b8699d93 --- sdk/botservice/arm-botservice/CHANGELOG.md | 16 +- sdk/botservice/arm-botservice/LICENSE | 2 +- sdk/botservice/arm-botservice/README.md | 2 +- sdk/botservice/arm-botservice/_meta.json | 8 +- sdk/botservice/arm-botservice/package.json | 14 +- .../review/arm-botservice.api.md | 193 +++++- .../arm-botservice/src/azureBotService.ts | 12 +- .../arm-botservice/src/models/index.ts | 288 +++++++-- .../arm-botservice/src/models/mappers.ts | 582 +++++++++++++++--- .../arm-botservice/src/models/parameters.ts | 15 +- .../src/operations/botConnection.ts | 1 - .../arm-botservice/src/operations/bots.ts | 2 - .../arm-botservice/src/operations/channels.ts | 1 - .../arm-botservice/src/operations/email.ts | 72 +++ .../arm-botservice/src/operations/index.ts | 2 + .../src/operations/operations.ts | 1 - .../src/operations/qnAMakerEndpointKeys.ts | 68 ++ .../src/operationsInterfaces/email.ts | 27 + .../src/operationsInterfaces/index.ts | 2 + .../qnAMakerEndpointKeys.ts | 26 + .../arm-botservice/src/pagingHelper.ts | 8 +- .../arm-botservice/test/sampleTest.ts | 43 ++ sdk/botservice/arm-botservice/tsconfig.json | 10 +- 23 files changed, 1185 insertions(+), 210 deletions(-) create mode 100644 sdk/botservice/arm-botservice/src/operations/email.ts create mode 100644 sdk/botservice/arm-botservice/src/operations/qnAMakerEndpointKeys.ts create mode 100644 sdk/botservice/arm-botservice/src/operationsInterfaces/email.ts create mode 100644 sdk/botservice/arm-botservice/src/operationsInterfaces/qnAMakerEndpointKeys.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 d1eb72b46c97..69bb90652660 100644 --- a/sdk/botservice/arm-botservice/CHANGELOG.md +++ b/sdk/botservice/arm-botservice/CHANGELOG.md @@ -1,18 +1,8 @@ # Release History + +## 4.0.0 (2023-01-10) -## 4.0.0-beta.6 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 4.0.0-beta.5 (2022-11-18) - -The package of @azure/arm-botservice is using our next generation design principles since version 4.0.0-beta.5, which contains breaking changes. +The package of @azure/arm-botservice is using our next generation design principles since version 4.0.0, which contains breaking changes. To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). diff --git a/sdk/botservice/arm-botservice/LICENSE b/sdk/botservice/arm-botservice/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/botservice/arm-botservice/LICENSE +++ b/sdk/botservice/arm-botservice/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 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 f02be5d43a4d..09fd84a297d1 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 cd30157fe92c..39a88b2beaca 100644 --- a/sdk/botservice/arm-botservice/_meta.json +++ b/sdk/botservice/arm-botservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "20df2424a278ca19437e437a7dbf3a7857a0dd9d", + "commit": "9fcdabb2f260e447c4a55ef6fb0d2506a02ba31b", "readme": "specification/botservice/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\botservice\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/botservice/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/botservice/arm-botservice/package.json b/sdk/botservice/arm-botservice/package.json index 533f55d07e56..447cc655aae9 100644 --- a/sdk/botservice/arm-botservice/package.json +++ b/sdk/botservice/arm-botservice/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureBotService.", - "version": "4.0.0-beta.6", + "version": "4.0.0", "engines": { "node": ">=14.0.0" }, @@ -110,13 +110,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-botservice?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/botservice/arm-botservice/review/arm-botservice.api.md b/sdk/botservice/arm-botservice/review/arm-botservice.api.md index 644eb7373d54..a3d98757957e 100644 --- a/sdk/botservice/arm-botservice/review/arm-botservice.api.md +++ b/sdk/botservice/arm-botservice/review/arm-botservice.api.md @@ -10,6 +10,11 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PollerLike } from '@azure/core-lro'; import { PollOperationState } from '@azure/core-lro'; +// @public +export interface AcsChatChannel extends Channel { + channelName: "AcsChatChannel"; +} + // @public export interface AlexaChannel extends Channel { channelName: "AlexaChannel"; @@ -40,6 +45,8 @@ export class AzureBotService extends coreClient.ServiceClient { // (undocumented) directLine: DirectLine; // (undocumented) + email: Email; + // (undocumented) hostSettings: HostSettings; // (undocumented) operationResults: OperationResults; @@ -50,6 +57,8 @@ export class AzureBotService extends coreClient.ServiceClient { // (undocumented) privateLinkResources: PrivateLinkResources; // (undocumented) + qnAMakerEndpointKeys: QnAMakerEndpointKeys; + // (undocumented) subscriptionId: string; } @@ -150,7 +159,7 @@ export interface BotProperties { disableLocalAuth?: boolean; displayName: string; readonly enabledChannels?: string[]; - endpoint: string; + endpoint: string | null; readonly endpointVersion?: string; iconUrl?: string; isCmekEnabled?: boolean; @@ -174,6 +183,7 @@ export interface BotProperties { publishingCredentials?: string; schemaTransformationVersion?: string; storageResourceId?: string; + tenantId?: string; } // @public @@ -263,14 +273,14 @@ export type BotsUpdateResponse = Bot; // @public export interface Channel { - channelName: "AlexaChannel" | "FacebookChannel" | "EmailChannel" | "MsTeamsChannel" | "SkypeChannel" | "KikChannel" | "WebChatChannel" | "DirectLineChannel" | "TelegramChannel" | "SmsChannel" | "SlackChannel" | "LineChannel" | "DirectLineSpeechChannel"; + channelName: "AlexaChannel" | "FacebookChannel" | "EmailChannel" | "OutlookChannel" | "MsTeamsChannel" | "SkypeChannel" | "KikChannel" | "WebChatChannel" | "DirectLineChannel" | "TelegramChannel" | "SmsChannel" | "SlackChannel" | "LineChannel" | "DirectLineSpeechChannel" | "Omnichannel" | "TelephonyChannel" | "AcsChatChannel" | "SearchAssistant" | "M365Extensions"; etag?: string; location?: string; readonly provisioningState?: string; } // @public -export type ChannelName = "AlexaChannel" | "FacebookChannel" | "EmailChannel" | "KikChannel" | "TelegramChannel" | "SlackChannel" | "MsTeamsChannel" | "SkypeChannel" | "WebChatChannel" | "DirectLineChannel" | "SmsChannel" | "LineChannel" | "DirectLineSpeechChannel" | "OutlookChannel"; +export type ChannelName = "AlexaChannel" | "FacebookChannel" | "EmailChannel" | "KikChannel" | "TelegramChannel" | "SlackChannel" | "MsTeamsChannel" | "SkypeChannel" | "WebChatChannel" | "DirectLineChannel" | "SmsChannel" | "LineChannel" | "DirectLineSpeechChannel" | "OutlookChannel" | "Omnichannel" | "TelephonyChannel" | "AcsChatChannel" | "SearchAssistant" | "M365Extensions"; // @public export interface ChannelResponseList { @@ -309,6 +319,7 @@ export interface ChannelSettings { extensionKey1?: string; extensionKey2?: string; isEnabled?: boolean; + requireTermsAgreement?: boolean; sites?: Site[]; } @@ -356,7 +367,7 @@ export interface ChannelsUpdateOptionalParams extends coreClient.OperationOption export type ChannelsUpdateResponse = BotChannel; // @public (undocumented) -export type ChannelUnion = Channel | AlexaChannel | FacebookChannel | EmailChannel | MsTeamsChannel | SkypeChannel | KikChannel | WebChatChannel | DirectLineChannel | TelegramChannel | SmsChannel | SlackChannel | LineChannel | DirectLineSpeechChannel; +export type ChannelUnion = Channel | AlexaChannel | FacebookChannel | EmailChannel | OutlookChannel | MsTeamsChannel | SkypeChannel | KikChannel | WebChatChannel | DirectLineChannel | TelegramChannel | SmsChannel | SlackChannel | LineChannel | DirectLineSpeechChannel | Omnichannel | TelephonyChannel | AcsChatChannel | SearchAssistant | M365Extensions; // @public export interface CheckNameAvailabilityRequestBody { @@ -366,6 +377,7 @@ export interface CheckNameAvailabilityRequestBody { // @public export interface CheckNameAvailabilityResponseBody { + absCode?: string; message?: string; valid?: boolean; } @@ -390,8 +402,6 @@ export interface ConnectionSettingParameter { export interface ConnectionSettingProperties { clientId?: string; clientSecret?: string; - id?: string; - name?: string; parameters?: ConnectionSettingParameter[]; provisioningState?: string; scopes?: string; @@ -406,6 +416,18 @@ export interface ConnectionSettingResponseList { readonly value?: ConnectionSetting[]; } +// @public +export interface CreateEmailSignInUrlResponse { + readonly id?: string; + location?: string; + properties?: CreateEmailSignInUrlResponseProperties; +} + +// @public +export interface CreateEmailSignInUrlResponseProperties { + url?: string; +} + // @public export interface DirectLine { regenerateKeys(resourceGroupName: string, resourceName: string, channelName: RegenerateKeysChannelName, parameters: SiteInfo, options?: DirectLineRegenerateKeysOptionalParams): Promise; @@ -420,6 +442,8 @@ export interface DirectLineChannel extends Channel { // @public export interface DirectLineChannelProperties { directLineEmbedCode?: string; + extensionKey1?: string; + extensionKey2?: string; sites?: DirectLineSite[]; } @@ -431,17 +455,7 @@ export interface DirectLineRegenerateKeysOptionalParams extends coreClient.Opera export type DirectLineRegenerateKeysResponse = BotChannel; // @public -export interface DirectLineSite { - isBlockUserUploadEnabled?: boolean; - isEnabled: boolean; - isSecureSiteEnabled?: boolean; - isV1Enabled: boolean; - isV3Enabled: boolean; - readonly key?: string; - readonly key2?: string; - readonly siteId?: string; - siteName: string; - trustedOrigins?: string[]; +export interface DirectLineSite extends Site { } // @public @@ -452,27 +466,45 @@ export interface DirectLineSpeechChannel extends Channel { // @public export interface DirectLineSpeechChannelProperties { - cognitiveServiceRegion: string; - cognitiveServiceSubscriptionKey: string; + cognitiveServiceRegion?: string; + cognitiveServiceResourceId?: string; + cognitiveServiceSubscriptionKey?: string; customSpeechModelId?: string; customVoiceDeploymentId?: string; isDefaultBotForCogSvcAccount?: boolean; isEnabled?: boolean; } +// @public +export interface Email { + createSignInUrl(resourceGroupName: string, resourceName: string, options?: EmailCreateSignInUrlOptionalParams): Promise; +} + // @public export interface EmailChannel extends Channel { channelName: "EmailChannel"; properties?: EmailChannelProperties; } +// @public +export type EmailChannelAuthMethod = 0 | 1; + // @public export interface EmailChannelProperties { + authMethod?: EmailChannelAuthMethod; emailAddress: string; isEnabled: boolean; + magicCode?: string; password?: string; } +// @public +export interface EmailCreateSignInUrlOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EmailCreateSignInUrlResponse = CreateEmailSignInUrlResponse; + // @public export interface ErrorBody { code: string; @@ -640,6 +672,11 @@ export interface ListChannelWithKeysResponse extends BotChannel { setting?: ChannelSettings; } +// @public +export interface M365Extensions extends Channel { + channelName: "M365Extensions"; +} + // @public export type MsaAppType = string; @@ -652,13 +689,18 @@ export interface MsTeamsChannel extends Channel { // @public export interface MsTeamsChannelProperties { acceptedTerms?: boolean; - callingWebHook?: string; + callingWebhook?: string; deploymentEnvironment?: string; enableCalling?: boolean; incomingCallRoute?: string; isEnabled: boolean; } +// @public +export interface Omnichannel extends Channel { + channelName: "Omnichannel"; +} + // @public export interface OperationDisplayInfo { description?: string; @@ -726,6 +768,11 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = OperationEntityListResult; +// @public +export interface OutlookChannel extends Channel { + channelName: "OutlookChannel"; +} + // @public export interface PrivateEndpoint { readonly id?: string; @@ -733,6 +780,7 @@ export interface PrivateEndpoint { // @public export interface PrivateEndpointConnection extends PrivateLinkResourceBase { + groupIds?: string[]; privateEndpoint?: PrivateEndpoint; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; readonly provisioningState?: PrivateEndpointConnectionProvisioningState; @@ -823,6 +871,32 @@ export interface PrivateLinkServiceConnectionState { // @public export type PublicNetworkAccess = string; +// @public +export interface QnAMakerEndpointKeys { + get(parameters: QnAMakerEndpointKeysRequestBody, options?: QnAMakerEndpointKeysGetOptionalParams): Promise; +} + +// @public +export interface QnAMakerEndpointKeysGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QnAMakerEndpointKeysGetResponse = QnAMakerEndpointKeysResponse; + +// @public +export interface QnAMakerEndpointKeysRequestBody { + authkey?: string; + hostname?: string; +} + +// @public +export interface QnAMakerEndpointKeysResponse { + installedVersion?: string; + lastStableVersion?: string; + primaryEndpointKey?: string; + secondaryEndpointKey?: string; +} + // @public export type RegenerateKeysChannelName = "WebChatChannel" | "DirectLineChannel"; @@ -841,6 +915,11 @@ export interface Resource { readonly zones?: string[]; } +// @public +export interface SearchAssistant extends Channel { + channelName: "SearchAssistant"; +} + // @public export interface ServiceProvider { properties?: ServiceProviderProperties; @@ -871,7 +950,7 @@ export interface ServiceProviderParameterMetadataConstraints { export interface ServiceProviderProperties { readonly devPortalUrl?: string; readonly displayName?: string; - readonly iconUrl?: string; + iconUrl?: string; readonly id?: string; parameters?: ServiceProviderParameter[]; readonly serviceProviderName?: string; @@ -884,9 +963,26 @@ export interface ServiceProviderResponseList { } // @public -export interface Site extends WebChatSite, DirectLineSite { +export interface Site { + appId?: string; eTag?: string; - isTokenEnabled?: boolean; + isBlockUserUploadEnabled?: boolean; + isDetailedLoggingEnabled?: boolean; + isEnabled: boolean; + isEndpointParametersEnabled?: boolean; + isNoStorageEnabled?: boolean; + isSecureSiteEnabled?: boolean; + readonly isTokenEnabled?: boolean; + isV1Enabled?: boolean; + isV3Enabled?: boolean; + isWebchatPreviewEnabled?: boolean; + isWebChatSpeechEnabled?: boolean; + readonly key?: string; + readonly key2?: string; + readonly siteId?: string; + siteName: string; + tenantId?: string; + trustedOrigins?: string[]; } // @public @@ -942,7 +1038,7 @@ export interface SlackChannelProperties { landingPageUrl?: string; readonly lastSubmissionId?: string; readonly redirectAction?: string; - readonly registerBeforeOAuthFlow?: boolean; + registerBeforeOAuthFlow?: boolean; scopes?: string; signingSecret?: string; verificationToken?: string; @@ -976,6 +1072,47 @@ export interface TelegramChannelProperties { isValidated?: boolean; } +// @public +export interface TelephonyChannel extends Channel { + channelName: "TelephonyChannel"; + properties?: TelephonyChannelProperties; +} + +// @public +export interface TelephonyChannelProperties { + apiConfigurations?: TelephonyChannelResourceApiConfiguration[]; + cognitiveServiceRegion?: string; + cognitiveServiceSubscriptionKey?: string; + defaultLocale?: string; + isEnabled?: boolean; + phoneNumbers?: TelephonyPhoneNumbers[]; + premiumSKU?: string; +} + +// @public +export interface TelephonyChannelResourceApiConfiguration { + cognitiveServiceRegion?: string; + cognitiveServiceResourceId?: string; + cognitiveServiceSubscriptionKey?: string; + defaultLocale?: string; + id?: string; + providerName?: string; +} + +// @public +export interface TelephonyPhoneNumbers { + acsEndpoint?: string; + acsResourceId?: string; + acsSecret?: string; + cognitiveServiceRegion?: string; + cognitiveServiceResourceId?: string; + cognitiveServiceSubscriptionKey?: string; + defaultLocale?: string; + id?: string; + offerType?: string; + phoneNumber?: string; +} + // @public export interface WebChatChannel extends Channel { channelName: "WebChatChannel"; @@ -989,13 +1126,7 @@ export interface WebChatChannelProperties { } // @public -export interface WebChatSite { - isEnabled: boolean; - isWebchatPreviewEnabled: boolean; - readonly key?: string; - readonly key2?: string; - readonly siteId?: string; - siteName: string; +export interface WebChatSite extends Site { } // (No @packageDocumentation comment for this package) diff --git a/sdk/botservice/arm-botservice/src/azureBotService.ts b/sdk/botservice/arm-botservice/src/azureBotService.ts index bdb05a8724a9..b893c07cd90d 100644 --- a/sdk/botservice/arm-botservice/src/azureBotService.ts +++ b/sdk/botservice/arm-botservice/src/azureBotService.ts @@ -18,8 +18,10 @@ import { BotsImpl, ChannelsImpl, DirectLineImpl, + EmailImpl, OperationsImpl, BotConnectionImpl, + QnAMakerEndpointKeysImpl, HostSettingsImpl, OperationResultsImpl, PrivateEndpointConnectionsImpl, @@ -29,8 +31,10 @@ import { Bots, Channels, DirectLine, + Email, Operations, BotConnection, + QnAMakerEndpointKeys, HostSettings, OperationResults, PrivateEndpointConnections, @@ -70,7 +74,7 @@ export class AzureBotService extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-botservice/4.0.0-beta.6`; + const packageDetails = `azsdk-js-arm-botservice/4.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -123,12 +127,14 @@ export class AzureBotService extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-05-01-preview"; + this.apiVersion = options.apiVersion || "2022-09-15"; this.bots = new BotsImpl(this); this.channels = new ChannelsImpl(this); this.directLine = new DirectLineImpl(this); + this.email = new EmailImpl(this); this.operations = new OperationsImpl(this); this.botConnection = new BotConnectionImpl(this); + this.qnAMakerEndpointKeys = new QnAMakerEndpointKeysImpl(this); this.hostSettings = new HostSettingsImpl(this); this.operationResults = new OperationResultsImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); @@ -167,8 +173,10 @@ export class AzureBotService extends coreClient.ServiceClient { bots: Bots; channels: Channels; directLine: DirectLine; + email: Email; operations: Operations; botConnection: BotConnection; + qnAMakerEndpointKeys: QnAMakerEndpointKeys; hostSettings: HostSettings; operationResults: OperationResults; privateEndpointConnections: PrivateEndpointConnections; diff --git a/sdk/botservice/arm-botservice/src/models/index.ts b/sdk/botservice/arm-botservice/src/models/index.ts index 182c586c292c..977a6761503b 100644 --- a/sdk/botservice/arm-botservice/src/models/index.ts +++ b/sdk/botservice/arm-botservice/src/models/index.ts @@ -13,6 +13,7 @@ export type ChannelUnion = | AlexaChannel | FacebookChannel | EmailChannel + | OutlookChannel | MsTeamsChannel | SkypeChannel | KikChannel @@ -22,7 +23,12 @@ export type ChannelUnion = | SmsChannel | SlackChannel | LineChannel - | DirectLineSpeechChannel; + | DirectLineSpeechChannel + | Omnichannel + | TelephonyChannel + | AcsChatChannel + | SearchAssistant + | M365Extensions; /** The parameters to provide for the Bot. */ export interface BotProperties { @@ -33,7 +39,7 @@ export interface BotProperties { /** The Icon Url of the bot */ iconUrl?: string; /** The bot's endpoint */ - endpoint: string; + endpoint: string | null; /** * The bot's endpoint version * NOTE: This property will not be serialized. It can only be populated by the server. @@ -82,6 +88,8 @@ export interface BotProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly cmekEncryptionStatus?: string; + /** The Tenant Id for the bot */ + tenantId?: string; /** Whether the bot is in an isolated network */ publicNetworkAccess?: PublicNetworkAccess; /** Whether the bot is streaming supported */ @@ -217,7 +225,7 @@ export interface ErrorBody { message: string; } -/** The list of bot service operation response. */ +/** The list of bot service operation response. */ export interface BotResponseList { /** The link used to get the next page of bot service resources. */ nextLink?: string; @@ -235,6 +243,7 @@ export interface Channel { | "AlexaChannel" | "FacebookChannel" | "EmailChannel" + | "OutlookChannel" | "MsTeamsChannel" | "SkypeChannel" | "KikChannel" @@ -244,7 +253,12 @@ export interface Channel { | "SmsChannel" | "SlackChannel" | "LineChannel" - | "DirectLineSpeechChannel"; + | "DirectLineSpeechChannel" + | "Omnichannel" + | "TelephonyChannel" + | "AcsChatChannel" + | "SearchAssistant" + | "M365Extensions"; /** Entity Tag of the resource */ etag?: string; /** @@ -276,10 +290,14 @@ export interface ChannelSettings { isEnabled?: boolean; /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ disableLocalAuth?: boolean; + /** Whether customer needs to agree to new terms. */ + requireTermsAgreement?: boolean; } -/** A site for the Webchat channel */ -export interface WebChatSite { +/** A site for the channel */ +export interface Site { + /** Tenant Id */ + tenantId?: string; /** * Site Id * NOTE: This property will not be serialized. It can only be populated by the server. @@ -299,41 +317,35 @@ export interface WebChatSite { 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 + * Whether this site is token enabled for channel * 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; + readonly isTokenEnabled?: boolean; + /** Whether this site is EndpointParameters enabled for channel */ + isEndpointParametersEnabled?: boolean; + /** Whether this site is disabled detailed logging for */ + isDetailedLoggingEnabled?: boolean; + /** Whether this site is enabled for block user upload. */ + isBlockUserUploadEnabled?: boolean; + /** Whether this no-storage site is disabled detailed logging for */ + isNoStorageEnabled?: boolean; + /** Entity Tag */ + eTag?: string; + /** DirectLine application id */ + appId?: string; /** Whether this site is enabled for Bot Framework V1 protocol. */ - isV3Enabled: boolean; + isV1Enabled?: boolean; + /** Whether this site is enabled for Bot Framework V3 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[]; + /** Whether this site is enabled for Webchat Speech */ + isWebChatSpeechEnabled?: boolean; + /** Whether this site is enabled for preview versions of Webchat */ + isWebchatPreviewEnabled?: boolean; } /** The list of bot service channel operation response. */ @@ -355,6 +367,25 @@ export interface SiteInfo { key: Key; } +/** The ARM create email sign in url operation response. */ +export interface CreateEmailSignInUrlResponse { + /** + * Specifies the resource ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** Specifies the location of the resource. */ + location?: string; + /** The set of properties specific to sign in url */ + properties?: CreateEmailSignInUrlResponseProperties; +} + +/** The set of properties specific to sign in url */ +export interface CreateEmailSignInUrlResponseProperties { + /** Sign in url. */ + url?: string; +} + /** The request body for a request to Bot Service Management to check availability of a bot name. */ export interface CheckNameAvailabilityRequestBody { /** the name of the bot for which availability needs to be checked. */ @@ -369,6 +400,8 @@ export interface CheckNameAvailabilityResponseBody { valid?: boolean; /** additional message from the bot management api showing why a bot name is not available */ message?: string; + /** response code from ABS */ + absCode?: string; } /** The list of bot service operation response. */ @@ -433,20 +466,17 @@ export interface ServiceProviderProperties { */ readonly displayName?: string; /** - * Display Name of the Service Provider + * Name of the Service Provider * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly serviceProviderName?: string; /** - * Display Name of the Service Provider + * URL of Dev Portal * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly devPortalUrl?: string; - /** - * Display Name of the Service Provider - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly iconUrl?: string; + /** The URL of icon */ + iconUrl?: string; /** The list of parameters for the Service Provider */ parameters?: ServiceProviderParameter[]; } @@ -502,12 +532,28 @@ export interface ServiceProviderParameterMetadataConstraints { required?: boolean; } +/** The request body for a request to Bot Service Management to list QnA Maker endpoint keys. */ +export interface QnAMakerEndpointKeysRequestBody { + /** the host name of the QnA Maker endpoint */ + hostname?: string; + /** Subscription key which provides access to this API. */ + authkey?: string; +} + +/** Schema for EndpointKeys generate/refresh operations. */ +export interface QnAMakerEndpointKeysResponse { + /** Primary Access Key. */ + primaryEndpointKey?: string; + /** Secondary Access Key. */ + secondaryEndpointKey?: string; + /** Current version of runtime. */ + installedVersion?: string; + /** Latest version of runtime. */ + lastStableVersion?: string; +} + /** 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; /** @@ -656,8 +702,12 @@ export interface FacebookPage { export interface EmailChannelProperties { /** The email address */ emailAddress: string; + /** Email channel auth method. 0 Password (Default); 1 Graph. */ + authMethod?: EmailChannelAuthMethod; /** The password for the email address. Value only returned through POST to the action Channel List API, otherwise empty. */ password?: string; + /** The magic code for setting up the modern authentication. */ + magicCode?: string; /** Whether this channel is enabled for the bot */ isEnabled: boolean; } @@ -667,7 +717,7 @@ export interface MsTeamsChannelProperties { /** Enable calling for Microsoft Teams channel */ enableCalling?: boolean; /** Webhook for Microsoft Teams channel calls */ - callingWebHook?: string; + callingWebhook?: string; /** Whether this channel is enabled for the bot */ isEnabled: boolean; /** Webhook for Microsoft Teams channel calls */ @@ -729,6 +779,10 @@ export interface WebChatChannelProperties { export interface DirectLineChannelProperties { /** The list of Direct Line sites */ sites?: DirectLineSite[]; + /** The extensionKey1 */ + extensionKey1?: string; + /** The extensionKey2 */ + extensionKey2?: string; /** Direct Line embed code of the resource */ directLineEmbedCode?: string; } @@ -779,11 +833,8 @@ export interface SlackChannelProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly lastSubmissionId?: string; - /** - * Whether to register the settings before OAuth validation is performed. Recommended to True. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly registerBeforeOAuthFlow?: boolean; + /** Whether to register the settings before OAuth validation is performed. Recommended to True. */ + registerBeforeOAuthFlow?: boolean; /** * Whether this channel is validated for the bot * NOTE: This property will not be serialized. It can only be populated by the server. @@ -826,10 +877,12 @@ export interface LineRegistration { /** The parameters to provide for the DirectLine Speech channel. */ export interface DirectLineSpeechChannelProperties { + /** The cognitive service id with this channel registration. */ + cognitiveServiceResourceId?: string; /** The cognitive service region with this channel registration. */ - cognitiveServiceRegion: string; + cognitiveServiceRegion?: string; /** The cognitive service subscription key to use with this channel registration. */ - cognitiveServiceSubscriptionKey: string; + cognitiveServiceSubscriptionKey?: string; /** Whether this channel is enabled or not. */ isEnabled?: boolean; /** Custom speech model id (optional). */ @@ -840,6 +893,64 @@ export interface DirectLineSpeechChannelProperties { isDefaultBotForCogSvcAccount?: boolean; } +/** The parameters to provide for the Direct Line channel. */ +export interface TelephonyChannelProperties { + /** The list of Telephony phone numbers */ + phoneNumbers?: TelephonyPhoneNumbers[]; + /** The list of Telephony api configuration */ + apiConfigurations?: TelephonyChannelResourceApiConfiguration[]; + /** The extensionKey1 */ + cognitiveServiceSubscriptionKey?: string; + /** The extensionKey2 */ + cognitiveServiceRegion?: string; + /** The default locale of the channel */ + defaultLocale?: string; + /** The premium SKU applied to the channel */ + premiumSKU?: string; + /** Whether the channel is enabled */ + isEnabled?: boolean; +} + +/** A telephone number for the Telephony channel */ +export interface TelephonyPhoneNumbers { + /** The element id. */ + id?: string; + /** The phone number. */ + phoneNumber?: string; + /** The endpoint of ACS. */ + acsEndpoint?: string; + /** The secret of ACS. */ + acsSecret?: string; + /** The resource id of ACS. */ + acsResourceId?: string; + /** The subscription key of cognitive service. */ + cognitiveServiceSubscriptionKey?: string; + /** The service region of cognitive service. */ + cognitiveServiceRegion?: string; + /** The resource id of cognitive service. */ + cognitiveServiceResourceId?: string; + /** The default locale of the phone number. */ + defaultLocale?: string; + /** Optional Property that will determine the offering type of the phone. */ + offerType?: string; +} + +/** A resource Api configuration for the Telephony channel */ +export interface TelephonyChannelResourceApiConfiguration { + /** The id of config. */ + id?: string; + /** The provider name. */ + providerName?: string; + /** The cognitive service subscription key. */ + cognitiveServiceSubscriptionKey?: string; + /** The cognitive service region. */ + cognitiveServiceRegion?: string; + /** The cognitive service resourceId. */ + cognitiveServiceResourceId?: string; + /** The default locale. */ + defaultLocale?: string; +} + /** The display name of a connection Item Setting registered with the Bot */ export interface ConnectionItemName { /** @@ -860,6 +971,8 @@ export interface PrivateEndpointConnection extends PrivateLinkResourceBase { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: PrivateEndpointConnectionProvisioningState; + /** Group ids */ + groupIds?: string[]; } /** A private link resource */ @@ -920,6 +1033,12 @@ export interface EmailChannel extends Channel { properties?: EmailChannelProperties; } +/** Outlook channel definition */ +export interface OutlookChannel extends Channel { + /** Polymorphic discriminator, which specifies the different types this object can be */ + channelName: "OutlookChannel"; +} + /** Microsoft Teams channel definition */ export interface MsTeamsChannel extends Channel { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -1000,14 +1119,44 @@ export interface DirectLineSpeechChannel extends Channel { properties?: DirectLineSpeechChannelProperties; } -/** A site for the channel */ -export interface Site extends WebChatSite, DirectLineSite { - /** Whether this site is token enabled for channel */ - isTokenEnabled?: boolean; - /** Entity Tag */ - eTag?: string; +/** Omnichannel channel definition */ +export interface Omnichannel extends Channel { + /** Polymorphic discriminator, which specifies the different types this object can be */ + channelName: "Omnichannel"; +} + +/** Telephony channel definition */ +export interface TelephonyChannel extends Channel { + /** Polymorphic discriminator, which specifies the different types this object can be */ + channelName: "TelephonyChannel"; + /** The set of properties specific to Telephony channel resource */ + properties?: TelephonyChannelProperties; +} + +/** AcsChat channel definition */ +export interface AcsChatChannel extends Channel { + /** Polymorphic discriminator, which specifies the different types this object can be */ + channelName: "AcsChatChannel"; +} + +/** SearchAssistant definition */ +export interface SearchAssistant extends Channel { + /** Polymorphic discriminator, which specifies the different types this object can be */ + channelName: "SearchAssistant"; +} + +/** M365 Extensions definition */ +export interface M365Extensions extends Channel { + /** Polymorphic discriminator, which specifies the different types this object can be */ + channelName: "M365Extensions"; } +/** A site for the Webchat channel */ +export interface WebChatSite extends Site {} + +/** A site for the Direct Line channel */ +export interface DirectLineSite extends Site {} + /** The ARM channel of list channel with keys operation response. */ export interface ListChannelWithKeysResponse extends BotChannel { /** The set of properties specific to bot channel resource */ @@ -1210,11 +1359,18 @@ export type ChannelName = | "SmsChannel" | "LineChannel" | "DirectLineSpeechChannel" - | "OutlookChannel"; + | "OutlookChannel" + | "Omnichannel" + | "TelephonyChannel" + | "AcsChatChannel" + | "SearchAssistant" + | "M365Extensions"; /** Defines values for RegenerateKeysChannelName. */ export type RegenerateKeysChannelName = "WebChatChannel" | "DirectLineChannel"; /** Defines values for Key. */ export type Key = "key1" | "key2"; +/** Defines values for EmailChannelAuthMethod. */ +export type EmailChannelAuthMethod = 0 | 1; /** Optional parameters. */ export interface BotsCreateOptionalParams extends coreClient.OperationOptions {} @@ -1350,6 +1506,13 @@ export interface DirectLineRegenerateKeysOptionalParams /** Contains response data for the regenerateKeys operation. */ export type DirectLineRegenerateKeysResponse = BotChannel; +/** Optional parameters. */ +export interface EmailCreateSignInUrlOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createSignInUrl operation. */ +export type EmailCreateSignInUrlResponse = CreateEmailSignInUrlResponse; + /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} @@ -1417,6 +1580,13 @@ export interface BotConnectionListByBotServiceNextOptionalParams /** Contains response data for the listByBotServiceNext operation. */ export type BotConnectionListByBotServiceNextResponse = ConnectionSettingResponseList; +/** Optional parameters. */ +export interface QnAMakerEndpointKeysGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type QnAMakerEndpointKeysGetResponse = QnAMakerEndpointKeysResponse; + /** Optional parameters. */ export interface HostSettingsGetOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/botservice/arm-botservice/src/models/mappers.ts b/sdk/botservice/arm-botservice/src/models/mappers.ts index be14096baa88..e3db1d8c234b 100644 --- a/sdk/botservice/arm-botservice/src/models/mappers.ts +++ b/sdk/botservice/arm-botservice/src/models/mappers.ts @@ -27,6 +27,7 @@ export const BotProperties: coreClient.CompositeMapper = { } }, iconUrl: { + defaultValue: "", serializedName: "iconUrl", type: { name: "String" @@ -35,6 +36,7 @@ export const BotProperties: coreClient.CompositeMapper = { endpoint: { serializedName: "endpoint", required: true, + nullable: true, type: { name: "String" } @@ -151,6 +153,7 @@ export const BotProperties: coreClient.CompositeMapper = { } }, isCmekEnabled: { + defaultValue: false, serializedName: "isCmekEnabled", type: { name: "Boolean" @@ -169,6 +172,12 @@ export const BotProperties: coreClient.CompositeMapper = { name: "String" } }, + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, publicNetworkAccess: { defaultValue: "Enabled", serializedName: "publicNetworkAccess", @@ -205,6 +214,7 @@ export const BotProperties: coreClient.CompositeMapper = { }, schemaTransformationVersion: { serializedName: "schemaTransformationVersion", + nullable: true, type: { name: "String" } @@ -543,12 +553,14 @@ export const ChannelSettings: coreClient.CompositeMapper = { className: "ChannelSettings", modelProperties: { extensionKey1: { + defaultValue: "", serializedName: "extensionKey1", type: { name: "String" } }, extensionKey2: { + defaultValue: "", serializedName: "extensionKey2", type: { name: "String" @@ -601,16 +613,28 @@ export const ChannelSettings: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + requireTermsAgreement: { + serializedName: "requireTermsAgreement", + type: { + name: "Boolean" + } } } } }; -export const WebChatSite: coreClient.CompositeMapper = { +export const Site: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WebChatSite", + className: "Site", modelProperties: { + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, siteId: { serializedName: "siteId", readOnly: true, @@ -646,68 +670,58 @@ export const WebChatSite: coreClient.CompositeMapper = { name: "Boolean" } }, - isWebchatPreviewEnabled: { - defaultValue: false, - serializedName: "isWebchatPreviewEnabled", - required: true, + isTokenEnabled: { + serializedName: "isTokenEnabled", + readOnly: true, type: { name: "Boolean" } - } - } - } -}; - -export const DirectLineSite: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DirectLineSite", - modelProperties: { - siteId: { - serializedName: "siteId", - readOnly: true, + }, + isEndpointParametersEnabled: { + serializedName: "isEndpointParametersEnabled", type: { - name: "String" + name: "Boolean" } }, - siteName: { - serializedName: "siteName", - required: true, + isDetailedLoggingEnabled: { + serializedName: "isDetailedLoggingEnabled", type: { - name: "String" + name: "Boolean" } }, - key: { - serializedName: "key", - readOnly: true, + isBlockUserUploadEnabled: { + serializedName: "isBlockUserUploadEnabled", + nullable: true, type: { - name: "String" + name: "Boolean" } }, - key2: { - serializedName: "key2", - readOnly: true, + isNoStorageEnabled: { + serializedName: "isNoStorageEnabled", + type: { + name: "Boolean" + } + }, + eTag: { + serializedName: "eTag", type: { name: "String" } }, - isEnabled: { - serializedName: "isEnabled", - required: true, + appId: { + serializedName: "appId", type: { - name: "Boolean" + name: "String" } }, isV1Enabled: { serializedName: "isV1Enabled", - required: true, type: { name: "Boolean" } }, isV3Enabled: { serializedName: "isV3Enabled", - required: true, type: { name: "Boolean" } @@ -718,12 +732,6 @@ export const DirectLineSite: coreClient.CompositeMapper = { name: "Boolean" } }, - isBlockUserUploadEnabled: { - serializedName: "isBlockUserUploadEnabled", - type: { - name: "Boolean" - } - }, trustedOrigins: { serializedName: "trustedOrigins", type: { @@ -734,6 +742,20 @@ export const DirectLineSite: coreClient.CompositeMapper = { } } } + }, + isWebChatSpeechEnabled: { + defaultValue: false, + serializedName: "isWebChatSpeechEnabled", + type: { + name: "Boolean" + } + }, + isWebchatPreviewEnabled: { + defaultValue: false, + serializedName: "isWebchatPreviewEnabled", + type: { + name: "Boolean" + } } } } @@ -791,6 +813,50 @@ export const SiteInfo: coreClient.CompositeMapper = { } }; +export const CreateEmailSignInUrlResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CreateEmailSignInUrlResponse", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "CreateEmailSignInUrlResponseProperties" + } + } + } + } +}; + +export const CreateEmailSignInUrlResponseProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CreateEmailSignInUrlResponseProperties", + modelProperties: { + url: { + serializedName: "url", + type: { + name: "String" + } + } + } + } +}; + export const CheckNameAvailabilityRequestBody: coreClient.CompositeMapper = { type: { name: "Composite", @@ -828,6 +894,12 @@ export const CheckNameAvailabilityResponseBody: coreClient.CompositeMapper = { type: { name: "String" } + }, + absCode: { + serializedName: "absCode", + type: { + name: "String" + } } } } @@ -1006,8 +1078,8 @@ export const ServiceProviderProperties: coreClient.CompositeMapper = { } }, iconUrl: { + defaultValue: "", serializedName: "iconUrl", - readOnly: true, type: { name: "String" } @@ -1117,23 +1189,65 @@ export const ServiceProviderParameterMetadataConstraints: coreClient.CompositeMa } }; -export const ConnectionSettingProperties: coreClient.CompositeMapper = { +export const QnAMakerEndpointKeysRequestBody: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectionSettingProperties", + className: "QnAMakerEndpointKeysRequestBody", modelProperties: { - id: { - serializedName: "id", + hostname: { + serializedName: "hostname", type: { name: "String" } }, - name: { - serializedName: "name", + authkey: { + serializedName: "authkey", + type: { + name: "String" + } + } + } + } +}; + +export const QnAMakerEndpointKeysResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "QnAMakerEndpointKeysResponse", + modelProperties: { + primaryEndpointKey: { + serializedName: "primaryEndpointKey", + type: { + name: "String" + } + }, + secondaryEndpointKey: { + serializedName: "secondaryEndpointKey", + type: { + name: "String" + } + }, + installedVersion: { + serializedName: "installedVersion", type: { name: "String" } }, + lastStableVersion: { + serializedName: "lastStableVersion", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectionSettingProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectionSettingProperties", + modelProperties: { clientId: { serializedName: "clientId", type: { @@ -1154,6 +1268,7 @@ export const ConnectionSettingProperties: coreClient.CompositeMapper = { } }, scopes: { + defaultValue: "", serializedName: "scopes", type: { name: "String" @@ -1505,12 +1620,25 @@ export const EmailChannelProperties: coreClient.CompositeMapper = { name: "String" } }, + authMethod: { + serializedName: "authMethod", + type: { + name: "Enum", + allowedValues: [0, 1] + } + }, password: { serializedName: "password", type: { name: "String" } }, + magicCode: { + serializedName: "magicCode", + type: { + name: "String" + } + }, isEnabled: { serializedName: "isEnabled", required: true, @@ -1528,13 +1656,14 @@ export const MsTeamsChannelProperties: coreClient.CompositeMapper = { className: "MsTeamsChannelProperties", modelProperties: { enableCalling: { + defaultValue: false, serializedName: "enableCalling", type: { name: "Boolean" } }, - callingWebHook: { - serializedName: "callingWebHook", + callingWebhook: { + serializedName: "callingWebhook", type: { name: "String" } @@ -1553,6 +1682,7 @@ export const MsTeamsChannelProperties: coreClient.CompositeMapper = { } }, deploymentEnvironment: { + defaultValue: "FallbackDeploymentEnvironment", serializedName: "deploymentEnvironment", type: { name: "String" @@ -1560,6 +1690,7 @@ export const MsTeamsChannelProperties: coreClient.CompositeMapper = { }, acceptedTerms: { serializedName: "acceptedTerms", + nullable: true, type: { name: "Boolean" } @@ -1592,6 +1723,7 @@ export const SkypeChannelProperties: coreClient.CompositeMapper = { } }, enableCalling: { + defaultValue: false, serializedName: "enableCalling", type: { name: "Boolean" @@ -1718,6 +1850,20 @@ export const DirectLineChannelProperties: coreClient.CompositeMapper = { } } }, + extensionKey1: { + defaultValue: "", + serializedName: "extensionKey1", + type: { + name: "String" + } + }, + extensionKey2: { + defaultValue: "", + serializedName: "extensionKey2", + type: { + name: "String" + } + }, directLineEmbedCode: { serializedName: "DirectLineEmbedCode", type: { @@ -1849,7 +1995,6 @@ export const SlackChannelProperties: coreClient.CompositeMapper = { }, registerBeforeOAuthFlow: { serializedName: "registerBeforeOAuthFlow", - readOnly: true, type: { name: "Boolean" } @@ -1947,16 +2092,22 @@ export const DirectLineSpeechChannelProperties: coreClient.CompositeMapper = { name: "Composite", className: "DirectLineSpeechChannelProperties", modelProperties: { + cognitiveServiceResourceId: { + serializedName: "cognitiveServiceResourceId", + type: { + name: "String" + } + }, cognitiveServiceRegion: { serializedName: "cognitiveServiceRegion", - required: true, + nullable: true, type: { name: "String" } }, cognitiveServiceSubscriptionKey: { serializedName: "cognitiveServiceSubscriptionKey", - required: true, + nullable: true, type: { name: "String" } @@ -1989,6 +2140,200 @@ export const DirectLineSpeechChannelProperties: coreClient.CompositeMapper = { } }; +export const TelephonyChannelProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TelephonyChannelProperties", + modelProperties: { + phoneNumbers: { + serializedName: "phoneNumbers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TelephonyPhoneNumbers" + } + } + } + }, + apiConfigurations: { + serializedName: "apiConfigurations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TelephonyChannelResourceApiConfiguration" + } + } + } + }, + cognitiveServiceSubscriptionKey: { + serializedName: "cognitiveServiceSubscriptionKey", + nullable: true, + type: { + name: "String" + } + }, + cognitiveServiceRegion: { + serializedName: "cognitiveServiceRegion", + nullable: true, + type: { + name: "String" + } + }, + defaultLocale: { + serializedName: "defaultLocale", + nullable: true, + type: { + name: "String" + } + }, + premiumSKU: { + serializedName: "premiumSKU", + nullable: true, + type: { + name: "String" + } + }, + isEnabled: { + serializedName: "isEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const TelephonyPhoneNumbers: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TelephonyPhoneNumbers", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + phoneNumber: { + serializedName: "phoneNumber", + type: { + name: "String" + } + }, + acsEndpoint: { + serializedName: "acsEndpoint", + nullable: true, + type: { + name: "String" + } + }, + acsSecret: { + serializedName: "acsSecret", + nullable: true, + type: { + name: "String" + } + }, + acsResourceId: { + serializedName: "acsResourceId", + nullable: true, + type: { + name: "String" + } + }, + cognitiveServiceSubscriptionKey: { + serializedName: "cognitiveServiceSubscriptionKey", + nullable: true, + type: { + name: "String" + } + }, + cognitiveServiceRegion: { + serializedName: "cognitiveServiceRegion", + nullable: true, + type: { + name: "String" + } + }, + cognitiveServiceResourceId: { + serializedName: "cognitiveServiceResourceId", + nullable: true, + type: { + name: "String" + } + }, + defaultLocale: { + serializedName: "defaultLocale", + nullable: true, + type: { + name: "String" + } + }, + offerType: { + serializedName: "offerType", + nullable: true, + type: { + name: "String" + } + } + } + } +}; + +export const TelephonyChannelResourceApiConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TelephonyChannelResourceApiConfiguration", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + providerName: { + serializedName: "providerName", + nullable: true, + type: { + name: "String" + } + }, + cognitiveServiceSubscriptionKey: { + serializedName: "cognitiveServiceSubscriptionKey", + nullable: true, + type: { + name: "String" + } + }, + cognitiveServiceRegion: { + serializedName: "cognitiveServiceRegion", + nullable: true, + type: { + name: "String" + } + }, + cognitiveServiceResourceId: { + serializedName: "cognitiveServiceResourceId", + nullable: true, + type: { + name: "String" + } + }, + defaultLocale: { + serializedName: "defaultLocale", + nullable: true, + type: { + name: "String" + } + } + } + } +}; + export const ConnectionItemName: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2031,6 +2376,17 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { type: { name: "String" } + }, + groupIds: { + serializedName: "properties.groupIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -2187,6 +2543,19 @@ export const EmailChannel: coreClient.CompositeMapper = { } }; +export const OutlookChannel: coreClient.CompositeMapper = { + serializedName: "OutlookChannel", + type: { + name: "Composite", + className: "OutlookChannel", + uberParent: "Channel", + polymorphicDiscriminator: Channel.type.polymorphicDiscriminator, + modelProperties: { + ...Channel.type.modelProperties + } + } +}; + export const MsTeamsChannel: coreClient.CompositeMapper = { serializedName: "MsTeamsChannel", type: { @@ -2387,29 +2756,98 @@ export const DirectLineSpeechChannel: coreClient.CompositeMapper = { } }; -export const Site: coreClient.CompositeMapper = { +export const Omnichannel: coreClient.CompositeMapper = { + serializedName: "Omnichannel", type: { name: "Composite", - className: "Site", + className: "Omnichannel", + uberParent: "Channel", + polymorphicDiscriminator: Channel.type.polymorphicDiscriminator, modelProperties: { - ...WebChatSite.type.modelProperties, - ...DirectLineSite.type.modelProperties, - isTokenEnabled: { - serializedName: "isTokenEnabled", - type: { - name: "Boolean" - } - }, - eTag: { - serializedName: "eTag", + ...Channel.type.modelProperties + } + } +}; + +export const TelephonyChannel: coreClient.CompositeMapper = { + serializedName: "TelephonyChannel", + type: { + name: "Composite", + className: "TelephonyChannel", + uberParent: "Channel", + polymorphicDiscriminator: Channel.type.polymorphicDiscriminator, + modelProperties: { + ...Channel.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "TelephonyChannelProperties" } } } } }; +export const AcsChatChannel: coreClient.CompositeMapper = { + serializedName: "AcsChatChannel", + type: { + name: "Composite", + className: "AcsChatChannel", + uberParent: "Channel", + polymorphicDiscriminator: Channel.type.polymorphicDiscriminator, + modelProperties: { + ...Channel.type.modelProperties + } + } +}; + +export const SearchAssistant: coreClient.CompositeMapper = { + serializedName: "SearchAssistant", + type: { + name: "Composite", + className: "SearchAssistant", + uberParent: "Channel", + polymorphicDiscriminator: Channel.type.polymorphicDiscriminator, + modelProperties: { + ...Channel.type.modelProperties + } + } +}; + +export const M365Extensions: coreClient.CompositeMapper = { + serializedName: "M365Extensions", + type: { + name: "Composite", + className: "M365Extensions", + uberParent: "Channel", + polymorphicDiscriminator: Channel.type.polymorphicDiscriminator, + modelProperties: { + ...Channel.type.modelProperties + } + } +}; + +export const WebChatSite: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebChatSite", + modelProperties: { + ...Site.type.modelProperties + } + } +}; + +export const DirectLineSite: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DirectLineSite", + modelProperties: { + ...Site.type.modelProperties + } + } +}; + export const ListChannelWithKeysResponse: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2457,6 +2895,7 @@ export let discriminators = { "Channel.AlexaChannel": AlexaChannel, "Channel.FacebookChannel": FacebookChannel, "Channel.EmailChannel": EmailChannel, + "Channel.OutlookChannel": OutlookChannel, "Channel.MsTeamsChannel": MsTeamsChannel, "Channel.SkypeChannel": SkypeChannel, "Channel.KikChannel": KikChannel, @@ -2466,5 +2905,10 @@ export let discriminators = { "Channel.SmsChannel": SmsChannel, "Channel.SlackChannel": SlackChannel, "Channel.LineChannel": LineChannel, - "Channel.DirectLineSpeechChannel": DirectLineSpeechChannel + "Channel.DirectLineSpeechChannel": DirectLineSpeechChannel, + "Channel.Omnichannel": Omnichannel, + "Channel.TelephonyChannel": TelephonyChannel, + "Channel.AcsChatChannel": AcsChatChannel, + "Channel.SearchAssistant": SearchAssistant, + "Channel.M365Extensions": M365Extensions }; diff --git a/sdk/botservice/arm-botservice/src/models/parameters.ts b/sdk/botservice/arm-botservice/src/models/parameters.ts index 00dba4bc6841..0ef55dcd5799 100644 --- a/sdk/botservice/arm-botservice/src/models/parameters.ts +++ b/sdk/botservice/arm-botservice/src/models/parameters.ts @@ -17,6 +17,7 @@ import { BotChannel as BotChannelMapper, SiteInfo as SiteInfoMapper, ConnectionSetting as ConnectionSettingMapper, + QnAMakerEndpointKeysRequestBody as QnAMakerEndpointKeysRequestBodyMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper } from "../models/mappers"; @@ -96,7 +97,7 @@ export const resourceName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-05-01-preview", + defaultValue: "2022-09-15", isConstant: true, serializedName: "api-version", type: { @@ -189,7 +190,12 @@ export const channelName: OperationURLParameter = { "SmsChannel", "LineChannel", "DirectLineSpeechChannel", - "OutlookChannel" + "OutlookChannel", + "Omnichannel", + "TelephonyChannel", + "AcsChatChannel", + "SearchAssistant", + "M365Extensions" ] } } @@ -279,6 +285,11 @@ export const parameters6: OperationParameter = { mapper: ConnectionSettingMapper }; +export const parameters7: OperationParameter = { + parameterPath: "parameters", + mapper: QnAMakerEndpointKeysRequestBodyMapper +}; + export const operationResultId: OperationURLParameter = { parameterPath: "operationResultId", mapper: { diff --git a/sdk/botservice/arm-botservice/src/operations/botConnection.ts b/sdk/botservice/arm-botservice/src/operations/botConnection.ts index 2dd6092d7e0a..7481b3ca1c3d 100644 --- a/sdk/botservice/arm-botservice/src/operations/botConnection.ts +++ b/sdk/botservice/arm-botservice/src/operations/botConnection.ts @@ -454,7 +454,6 @@ const listByBotServiceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorModel } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/botservice/arm-botservice/src/operations/bots.ts b/sdk/botservice/arm-botservice/src/operations/bots.ts index a254cd08019f..c6fec9952010 100644 --- a/sdk/botservice/arm-botservice/src/operations/bots.ts +++ b/sdk/botservice/arm-botservice/src/operations/bots.ts @@ -488,7 +488,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorModel } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -509,7 +508,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorModel } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/botservice/arm-botservice/src/operations/channels.ts b/sdk/botservice/arm-botservice/src/operations/channels.ts index e0e2fa6ed674..c5b5859957e4 100644 --- a/sdk/botservice/arm-botservice/src/operations/channels.ts +++ b/sdk/botservice/arm-botservice/src/operations/channels.ts @@ -431,7 +431,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorModel } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/botservice/arm-botservice/src/operations/email.ts b/sdk/botservice/arm-botservice/src/operations/email.ts new file mode 100644 index 000000000000..775af70bdea1 --- /dev/null +++ b/sdk/botservice/arm-botservice/src/operations/email.ts @@ -0,0 +1,72 @@ +/* + * 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 { Email } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureBotService } from "../azureBotService"; +import { + EmailCreateSignInUrlOptionalParams, + EmailCreateSignInUrlResponse +} from "../models"; + +/** Class containing Email operations. */ +export class EmailImpl implements Email { + private readonly client: AzureBotService; + + /** + * Initialize a new instance of the class Email class. + * @param client Reference to the service client + */ + constructor(client: AzureBotService) { + this.client = client; + } + + /** + * Creates an email channel sign in url 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 options The options parameters. + */ + createSignInUrl( + resourceGroupName: string, + resourceName: string, + options?: EmailCreateSignInUrlOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + createSignInUrlOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createSignInUrlOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/createEmailSignInUrl", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CreateEmailSignInUrlResponse + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/botservice/arm-botservice/src/operations/index.ts b/sdk/botservice/arm-botservice/src/operations/index.ts index 998c1d5468a2..641ef10fc0c5 100644 --- a/sdk/botservice/arm-botservice/src/operations/index.ts +++ b/sdk/botservice/arm-botservice/src/operations/index.ts @@ -9,8 +9,10 @@ export * from "./bots"; export * from "./channels"; export * from "./directLine"; +export * from "./email"; export * from "./operations"; export * from "./botConnection"; +export * from "./qnAMakerEndpointKeys"; export * from "./hostSettings"; export * from "./operationResults"; export * from "./privateEndpointConnections"; diff --git a/sdk/botservice/arm-botservice/src/operations/operations.ts b/sdk/botservice/arm-botservice/src/operations/operations.ts index 96523feae2ea..840dfd4fb8be 100644 --- a/sdk/botservice/arm-botservice/src/operations/operations.ts +++ b/sdk/botservice/arm-botservice/src/operations/operations.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorModel } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/botservice/arm-botservice/src/operations/qnAMakerEndpointKeys.ts b/sdk/botservice/arm-botservice/src/operations/qnAMakerEndpointKeys.ts new file mode 100644 index 000000000000..fa358e7aade1 --- /dev/null +++ b/sdk/botservice/arm-botservice/src/operations/qnAMakerEndpointKeys.ts @@ -0,0 +1,68 @@ +/* + * 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 { QnAMakerEndpointKeys } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureBotService } from "../azureBotService"; +import { + QnAMakerEndpointKeysRequestBody, + QnAMakerEndpointKeysGetOptionalParams, + QnAMakerEndpointKeysGetResponse +} from "../models"; + +/** Class containing QnAMakerEndpointKeys operations. */ +export class QnAMakerEndpointKeysImpl implements QnAMakerEndpointKeys { + private readonly client: AzureBotService; + + /** + * Initialize a new instance of the class QnAMakerEndpointKeys class. + * @param client Reference to the service client + */ + constructor(client: AzureBotService) { + this.client = client; + } + + /** + * Lists the QnA Maker endpoint keys + * @param parameters The request body parameters to provide for the check name availability request + * @param options The options parameters. + */ + get( + parameters: QnAMakerEndpointKeysRequestBody, + options?: QnAMakerEndpointKeysGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { parameters, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.BotService/listQnAMakerEndpointKeys", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.QnAMakerEndpointKeysResponse + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + requestBody: Parameters.parameters7, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/email.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/email.ts new file mode 100644 index 000000000000..65ea2d2810b9 --- /dev/null +++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/email.ts @@ -0,0 +1,27 @@ +/* + * 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 { + EmailCreateSignInUrlOptionalParams, + EmailCreateSignInUrlResponse +} from "../models"; + +/** Interface representing a Email. */ +export interface Email { + /** + * Creates an email channel sign in url 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 options The options parameters. + */ + createSignInUrl( + resourceGroupName: string, + resourceName: string, + options?: EmailCreateSignInUrlOptionalParams + ): Promise; +} diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/index.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/index.ts index 998c1d5468a2..641ef10fc0c5 100644 --- a/sdk/botservice/arm-botservice/src/operationsInterfaces/index.ts +++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/index.ts @@ -9,8 +9,10 @@ export * from "./bots"; export * from "./channels"; export * from "./directLine"; +export * from "./email"; export * from "./operations"; export * from "./botConnection"; +export * from "./qnAMakerEndpointKeys"; export * from "./hostSettings"; export * from "./operationResults"; export * from "./privateEndpointConnections"; diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/qnAMakerEndpointKeys.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/qnAMakerEndpointKeys.ts new file mode 100644 index 000000000000..43524e71a94d --- /dev/null +++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/qnAMakerEndpointKeys.ts @@ -0,0 +1,26 @@ +/* + * 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 { + QnAMakerEndpointKeysRequestBody, + QnAMakerEndpointKeysGetOptionalParams, + QnAMakerEndpointKeysGetResponse +} from "../models"; + +/** Interface representing a QnAMakerEndpointKeys. */ +export interface QnAMakerEndpointKeys { + /** + * Lists the QnA Maker endpoint keys + * @param parameters The request body parameters to provide for the check name availability request + * @param options The options parameters. + */ + get( + parameters: QnAMakerEndpointKeysRequestBody, + options?: QnAMakerEndpointKeysGetOptionalParams + ): Promise; +} diff --git a/sdk/botservice/arm-botservice/src/pagingHelper.ts b/sdk/botservice/arm-botservice/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/botservice/arm-botservice/src/pagingHelper.ts +++ b/sdk/botservice/arm-botservice/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/botservice/arm-botservice/test/sampleTest.ts b/sdk/botservice/arm-botservice/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/botservice/arm-botservice/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + 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" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/botservice/arm-botservice/tsconfig.json b/sdk/botservice/arm-botservice/tsconfig.json index 78ba1b1ce969..3e6ae96443f3 100644 --- a/sdk/botservice/arm-botservice/tsconfig.json +++ b/sdk/botservice/arm-botservice/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-botservice": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"