From 2ecb37f4244782d3bf7ebfebcf1cc6219b737ecb Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 7 Apr 2022 04:01:29 +0000 Subject: [PATCH] CodeGen from PR 18149 in Azure/azure-rest-api-specs [BotService] Add OutlookChannel to channelNames (#18149) * Add OutlookChannel to channelNames * revert the change in stable version --- common/config/rush/pnpm-lock.yaml | 14 +++--- sdk/botservice/arm-botservice/CHANGELOG.md | 16 ++----- sdk/botservice/arm-botservice/LICENSE | 2 +- sdk/botservice/arm-botservice/_meta.json | 7 +-- .../arm-botservice/api-extractor.json | 25 +++++++--- sdk/botservice/arm-botservice/package.json | 6 +-- .../review/arm-botservice.api.md | 9 ++-- .../arm-botservice/src/azureBotService.ts | 2 +- .../arm-botservice/src/models/index.ts | 23 +++++++-- .../arm-botservice/src/models/mappers.ts | 23 +++++++++ .../arm-botservice/src/models/parameters.ts | 3 +- .../arm-botservice/test/sampleTest.ts | 48 +++++++++++++++++++ sdk/botservice/arm-botservice/tsconfig.json | 16 +++++-- sdk/botservice/ci.mgmt.yml | 7 +-- 14 files changed, 151 insertions(+), 50 deletions(-) create mode 100644 sdk/botservice/arm-botservice/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 75c010ed6593..9dd02cd7715b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -9527,23 +9527,23 @@ packages: dev: false file:projects/arm-botservice.tgz: - resolution: {integrity: sha512-kDrDah9vlwpI+fwy4JYQLlVByKzH5xf2Hre/Mn6XxwCfjqBQlq7AKy1tCW9jAR49xioTxdeBCJahYVTAa0B64A==, tarball: file:projects/arm-botservice.tgz} + resolution: {integrity: sha512-4NGFuCbcw7xCPLA+bhaasDYVhvflpmvkzud+s4FMZoE06lxifkAMQMJKEoPa/UdxIJEtASlltZXXj1gVeT8B5Q==, tarball: file:projects/arm-botservice.tgz} name: '@rush-temp/arm-botservice' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.20.0 - '@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1 - '@rollup/plugin-json': 4.1.0_rollup@2.70.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.70.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.70.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.70.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.70.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.3 diff --git a/sdk/botservice/arm-botservice/CHANGELOG.md b/sdk/botservice/arm-botservice/CHANGELOG.md index 7af483f98da5..42deafbef139 100644 --- a/sdk/botservice/arm-botservice/CHANGELOG.md +++ b/sdk/botservice/arm-botservice/CHANGELOG.md @@ -1,18 +1,8 @@ # Release History + +## 4.0.0-beta.3 (2022-04-07) -## 4.0.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 4.0.0-beta.2 (2021-12-27) - -The package of @azure/arm-botservice is using our next generation design principles since version 4.0.0-beta.2, which contains breaking changes. +The package of @azure/arm-botservice is using our next generation design principles since version 4.0.0-beta.3, 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 ccb63b166732..5d1d36e0af80 100644 --- a/sdk/botservice/arm-botservice/LICENSE +++ b/sdk/botservice/arm-botservice/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 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/_meta.json b/sdk/botservice/arm-botservice/_meta.json index e2f7e0545982..062e0b0ae4f0 100644 --- a/sdk/botservice/arm-botservice/_meta.json +++ b/sdk/botservice/arm-botservice/_meta.json @@ -1,7 +1,8 @@ { - "commit": "c77c6c634dc3644d65d3e35df5d73a9c34d3c956", + "commit": "eecf176ecfdcf43bfc98219740a89103c9644599", "readme": "specification/botservice/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/botservice/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --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-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20211217.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/botservice/arm-botservice/api-extractor.json b/sdk/botservice/arm-botservice/api-extractor.json index 95669bca5560..90af16436306 100644 --- a/sdk/botservice/arm-botservice/api-extractor.json +++ b/sdk/botservice/arm-botservice/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-botservice.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/botservice/arm-botservice/package.json b/sdk/botservice/arm-botservice/package.json index b3a1f5b23aca..e148393fd2d6 100644 --- a/sdk/botservice/arm-botservice/package.json +++ b/sdk/botservice/arm-botservice/package.json @@ -29,12 +29,12 @@ "types": "./types/arm-botservice.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -99,4 +99,4 @@ }, "sideEffects": false, "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 ffedb68c3833..4460a6cb9ae9 100644 --- a/sdk/botservice/arm-botservice/review/arm-botservice.api.md +++ b/sdk/botservice/arm-botservice/review/arm-botservice.api.md @@ -140,7 +140,7 @@ export interface BotProperties { [propertyName: string]: string; }; appPasswordHint?: string; - cmekEncryptionStatus?: string; + readonly cmekEncryptionStatus?: string; cmekKeyVaultUrl?: string; readonly configuredChannels?: string[]; description?: string; @@ -154,7 +154,7 @@ export interface BotProperties { readonly endpointVersion?: string; iconUrl?: string; isCmekEnabled?: boolean; - isDeveloperAppInsightsApiKeySet?: boolean; + readonly isDeveloperAppInsightsApiKeySet?: boolean; isStreamingSupported?: boolean; luisAppIds?: string[]; luisKey?: string; @@ -270,7 +270,7 @@ export interface Channel { } // @public -export type ChannelName = "AlexaChannel" | "FacebookChannel" | "EmailChannel" | "KikChannel" | "TelegramChannel" | "SlackChannel" | "MsTeamsChannel" | "SkypeChannel" | "WebChatChannel" | "DirectLineChannel" | "SmsChannel" | "LineChannel" | "DirectLineSpeechChannel"; +export type ChannelName = "AlexaChannel" | "FacebookChannel" | "EmailChannel" | "KikChannel" | "TelegramChannel" | "SlackChannel" | "MsTeamsChannel" | "SkypeChannel" | "WebChatChannel" | "DirectLineChannel" | "SmsChannel" | "LineChannel" | "DirectLineSpeechChannel" | "OutlookChannel"; // @public export interface ChannelResponseList { @@ -658,6 +658,9 @@ export interface LineRegistration { export type ListChannelWithKeysResponse = BotChannel & { resource?: ChannelUnion; setting?: ChannelSettings; + provisioningState?: string; + entityTag?: string; + changedTime?: string; }; // @public diff --git a/sdk/botservice/arm-botservice/src/azureBotService.ts b/sdk/botservice/arm-botservice/src/azureBotService.ts index 3a0f1e297759..369d64740b62 100644 --- a/sdk/botservice/arm-botservice/src/azureBotService.ts +++ b/sdk/botservice/arm-botservice/src/azureBotService.ts @@ -64,7 +64,7 @@ export class AzureBotService extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-botservice/4.0.0-beta.2`; + const packageDetails = `azsdk-js-arm-botservice/4.0.0-beta.3`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/botservice/arm-botservice/src/models/index.ts b/sdk/botservice/arm-botservice/src/models/index.ts index 833aaa17e909..7fd2a8132313 100644 --- a/sdk/botservice/arm-botservice/src/models/index.ts +++ b/sdk/botservice/arm-botservice/src/models/index.ts @@ -77,14 +77,20 @@ export interface BotProperties { isCmekEnabled?: boolean; /** The CMK Url */ cmekKeyVaultUrl?: string; - /** The CMK encryption status */ - cmekEncryptionStatus?: string; + /** + * The CMK encryption status + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cmekEncryptionStatus?: string; /** Whether the bot is in an isolated network */ publicNetworkAccess?: PublicNetworkAccess; /** Whether the bot is streaming supported */ isStreamingSupported?: boolean; - /** Whether the bot is developerAppInsightsApiKey set */ - isDeveloperAppInsightsApiKeySet?: boolean; + /** + * Whether the bot is developerAppInsightsApiKey set + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDeveloperAppInsightsApiKeySet?: boolean; /** * Token used to migrate non Azure bot to azure subscription * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1009,6 +1015,12 @@ export type ListChannelWithKeysResponse = BotChannel & { resource?: ChannelUnion; /** Channel settings */ setting?: ChannelSettings; + /** Provisioning state of the resource */ + provisioningState?: string; + /** Entity tag of the resource */ + entityTag?: string; + /** Changed time of the resource */ + changedTime?: string; }; /** Known values of {@link MsaAppType} that the service accepts. */ @@ -1172,7 +1184,8 @@ export type ChannelName = | "DirectLineChannel" | "SmsChannel" | "LineChannel" - | "DirectLineSpeechChannel"; + | "DirectLineSpeechChannel" + | "OutlookChannel"; /** Defines values for RegenerateKeysChannelName. */ export type RegenerateKeysChannelName = "WebChatChannel" | "DirectLineChannel"; /** Defines values for Key. */ diff --git a/sdk/botservice/arm-botservice/src/models/mappers.ts b/sdk/botservice/arm-botservice/src/models/mappers.ts index 972dbf9e8e44..be14096baa88 100644 --- a/sdk/botservice/arm-botservice/src/models/mappers.ts +++ b/sdk/botservice/arm-botservice/src/models/mappers.ts @@ -164,6 +164,7 @@ export const BotProperties: coreClient.CompositeMapper = { }, cmekEncryptionStatus: { serializedName: "cmekEncryptionStatus", + readOnly: true, type: { name: "String" } @@ -176,6 +177,7 @@ export const BotProperties: coreClient.CompositeMapper = { } }, isStreamingSupported: { + defaultValue: false, serializedName: "isStreamingSupported", type: { name: "Boolean" @@ -183,6 +185,7 @@ export const BotProperties: coreClient.CompositeMapper = { }, isDeveloperAppInsightsApiKeySet: { serializedName: "isDeveloperAppInsightsApiKeySet", + readOnly: true, type: { name: "Boolean" } @@ -511,6 +514,7 @@ export const Channel: coreClient.CompositeMapper = { }, etag: { serializedName: "etag", + nullable: true, type: { name: "String" } @@ -523,6 +527,7 @@ export const Channel: coreClient.CompositeMapper = { } }, location: { + defaultValue: "global", serializedName: "location", type: { name: "String" @@ -2424,6 +2429,24 @@ export const ListChannelWithKeysResponse: coreClient.CompositeMapper = { name: "Composite", className: "ChannelSettings" } + }, + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String" + } + }, + entityTag: { + serializedName: "entityTag", + type: { + name: "String" + } + }, + changedTime: { + serializedName: "changedTime", + type: { + name: "String" + } } } } diff --git a/sdk/botservice/arm-botservice/src/models/parameters.ts b/sdk/botservice/arm-botservice/src/models/parameters.ts index fb62a896b129..00dba4bc6841 100644 --- a/sdk/botservice/arm-botservice/src/models/parameters.ts +++ b/sdk/botservice/arm-botservice/src/models/parameters.ts @@ -188,7 +188,8 @@ export const channelName: OperationURLParameter = { "DirectLineChannel", "SmsChannel", "LineChannel", - "DirectLineSpeechChannel" + "DirectLineSpeechChannel", + "OutlookChannel" ] } } diff --git a/sdk/botservice/arm-botservice/test/sampleTest.ts b/sdk/botservice/arm-botservice/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/botservice/arm-botservice/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/botservice/arm-botservice/tsconfig.json b/sdk/botservice/arm-botservice/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/botservice/arm-botservice/tsconfig.json +++ b/sdk/botservice/arm-botservice/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/botservice/ci.mgmt.yml b/sdk/botservice/ci.mgmt.yml index e126aa55ad04..c583c0eafd94 100644 --- a/sdk/botservice/ci.mgmt.yml +++ b/sdk/botservice/ci.mgmt.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -10,6 +10,7 @@ trigger: include: - sdk/botservice/ci.mgmt.yml - sdk/botservice/arm-botservice/ + - sdk/botservice/arm-botservice pr: branches: include: @@ -23,11 +24,11 @@ pr: include: - sdk/botservice/ci.mgmt.yml - sdk/botservice/arm-botservice/ - + - sdk/botservice/arm-botservice extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: botservice Artifacts: - name: azure-arm-botservice - safeName: azurearmbotservice \ No newline at end of file + safeName: azurearmbotservice