From c001fbd011bc26bcabee9fefe3350a3c975b13fc Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 27 Mar 2023 08:49:14 +0000 Subject: [PATCH] CodeGen from PR 23300 in Azure/azure-rest-api-specs Merge c885637de106ba4370dfaeab72898cd7de91da16 into 72484575017c59f6eac35b75806055b76c569b19 --- common/config/rush/pnpm-lock.yaml | 48 +++++++++++-------- sdk/links/arm-links/CHANGELOG.md | 16 +++---- sdk/links/arm-links/LICENSE | 2 +- sdk/links/arm-links/_meta.json | 10 ++-- sdk/links/arm-links/package.json | 14 +++--- sdk/links/arm-links/review/arm-links.api.md | 1 - .../arm-links/src/managementLinkClient.ts | 2 +- sdk/links/arm-links/src/models/index.ts | 5 +- .../arm-links/src/operations/operations.ts | 1 - .../arm-links/src/operations/resourceLinks.ts | 2 - sdk/links/arm-links/src/pagingHelper.ts | 8 ++-- sdk/links/arm-links/test/sampleTest.ts | 43 +++++++++++++++++ sdk/links/arm-links/tsconfig.json | 12 +---- 13 files changed, 98 insertions(+), 66 deletions(-) create mode 100644 sdk/links/arm-links/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index f5137bec8caa..42bdf53f5b22 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -713,6 +713,7 @@ packages: /@azure-tools/test-recorder/2.0.0: resolution: {integrity: sha512-OTic1OwOk25B8ecdMQ4wgyDaUNMMw0qzO4/0sy9ScPXWLmUFGMlkS0+BOQ2K9t8WCksM/wU+NjUZo/5T4zaG6A==} engines: {node: '>=12.0.0'} + deprecated: Bug introduced in v2.0.0, fixed in 3.0.0 dependencies: '@azure/core-auth': 1.4.0 '@azure/core-http': 2.3.1 @@ -3911,7 +3912,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.1.0-dev.20230323 + typescript: 5.1.0-dev.20230327 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8771,9 +8772,8 @@ packages: hasBin: true dev: false - /typescript/5.1.0-dev.20230323: - resolution: {integrity: sha512-C/U2MNu/RkpNWJLPqo0q6ZimJLwBaQkd9ktJOjLDyV6/d/HgVfvVI15ga0UH4yj4bKRY0B8Yoth8pyn6jP+IUg==} - + /typescript/5.1.0-dev.20230327: + resolution: {integrity: sha512-tzeS6vmUF8qC4zFdvos88Oer1oNVrg0CVlIaxfI//pDrq8rur4nIUTLRWRlEMCeLQporHhD+z9sESoSr5GL+lw==} engines: {node: '>=12.20'} hasBin: true dev: false @@ -10646,7 +10646,7 @@ packages: dev: false file:projects/arm-changes.tgz: - resolution: {integrity: sha512-p78Uncj2JuxDs3TjtqFlWa36ZWsQQvwse0kbD6SJa9ZiIYW0LRuCaQiYPyI+76ryU/QOjOxiBkvinHUvEu5wNA==, tarball: file:projects/arm-changes.tgz} + resolution: {integrity: sha512-7DuFCbmqVSVPHWsrM1Gj686DW76ux/e9U+EA71mZ3exD7n4/E/8jdyOC9bjOVVdG4O0Xw20crjDF/UEvW7rcMQ==, tarball: file:projects/arm-changes.tgz} name: '@rush-temp/arm-changes' version: 0.0.0 dependencies: @@ -10660,7 +10660,8 @@ packages: '@types/node': 14.18.38 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -12113,7 +12114,7 @@ packages: dev: false file:projects/arm-features.tgz: - resolution: {integrity: sha512-aT0fEUYX5/forS2f/Zvk7q2HL0K0Yet5UA5l9FZe+ud3D/9eTSDnIA7Jqf1C7ZlBSzdQSjkHWVH8xKfXWIKyEg==, tarball: file:projects/arm-features.tgz} + resolution: {integrity: sha512-qgRkXbD2oh2IdBBadYoUnYm2OuZF/LdNM0w4HpF9QfJZddhceyjsa5Iml7mAqPUWY3rSqvGrHG1Uw/9n0K40UA==, tarball: file:projects/arm-features.tgz} name: '@rush-temp/arm-features' version: 0.0.0 dependencies: @@ -12127,7 +12128,8 @@ packages: '@types/node': 14.18.38 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -12721,7 +12723,7 @@ packages: dev: false file:projects/arm-links.tgz: - resolution: {integrity: sha512-26SWjFDxIPrUdFx3K0ucgmf7M14K3Bl2p00pt0X+FF9TzI6sOjTNdKMZKJj/VXaYwGDnTW4Opq4FFs2+F65NRw==, tarball: file:projects/arm-links.tgz} + resolution: {integrity: sha512-R7tSmvpr/Op6Py27rczhOq9vc/fOz7jStmkmGHwNiuK2j8vloV0zsV25ZlNbRddiVooSfOHRlG3RQuKI4pTlew==, tarball: file:projects/arm-links.tgz} name: '@rush-temp/arm-links' version: 0.0.0 dependencies: @@ -12735,7 +12737,8 @@ packages: '@types/node': 14.18.38 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -12804,7 +12807,7 @@ packages: dev: false file:projects/arm-locks.tgz: - resolution: {integrity: sha512-i1t5H0w7SXvIj/aW/Fh/GFh0KgSdl93CjzCHsPus5ZetTJI3OVnFnfFohbDYEP2Fho7jC/PClUirP5IcCczbIA==, tarball: file:projects/arm-locks.tgz} + resolution: {integrity: sha512-/pG+cqdMAuWQLXXSf8NkFpIywxNxK7ZgHCfg+OQTxOJWPpG0FZSNPbef7OknyAZfpkEAtKMKltttME1VZ7MGtg==, tarball: file:projects/arm-locks.tgz} name: '@rush-temp/arm-locks' version: 0.0.0 dependencies: @@ -12818,7 +12821,8 @@ packages: '@types/node': 14.18.38 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -12941,7 +12945,7 @@ packages: dev: false file:projects/arm-managedapplications.tgz: - resolution: {integrity: sha512-TFukoZvkyxNhxK5iZ2C6yVc/ByzCvHXpxPwqYPoLQSyzmPC1TOeU4U8TN+5kFvbWD/PuG1JvMAvnMix2/tIsbQ==, tarball: file:projects/arm-managedapplications.tgz} + resolution: {integrity: sha512-x/JdqsSIJ/W78NtH38h3bEVm2nnVRNMFUQ06jhNgO4C2GF8uMGwQLphTiA7gXIWfwT9m1rYhibragYPuNYMSkw==, tarball: file:projects/arm-managedapplications.tgz} name: '@rush-temp/arm-managedapplications' version: 0.0.0 dependencies: @@ -12955,7 +12959,8 @@ packages: '@types/node': 14.18.38 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -13758,7 +13763,7 @@ packages: dev: false file:projects/arm-policy.tgz: - resolution: {integrity: sha512-TeRM2YNOgHBnenijefXG2vB2NCdBiL5R1C23IFEftIF2vqepw8Xaw8/OJtg3Z1yz3IYK7A3IMWHyAuJ9mg46Yw==, tarball: file:projects/arm-policy.tgz} + resolution: {integrity: sha512-a34IRmRGu+rFYSvulELtwW3FAKg8PpsXjE2wNz3YhIaOJiZG4zUJCHltlvHhA6yCBnaDeTR2WVRzj3kON/MwTw==, tarball: file:projects/arm-policy.tgz} name: '@rush-temp/arm-policy' version: 0.0.0 dependencies: @@ -13772,7 +13777,8 @@ packages: '@types/node': 14.18.38 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -14365,7 +14371,7 @@ packages: dev: false file:projects/arm-resources-subscriptions.tgz: - resolution: {integrity: sha512-M0nuMO0Fg1qJXUOq/IdA4ixcuy25QdC/onMUJJNVpF0CxGrTHBm5E+KjUA5kbLyCHzSKSKlclaFRaVTKhvt0Pw==, tarball: file:projects/arm-resources-subscriptions.tgz} + resolution: {integrity: sha512-QO/iHVW77yNp3YckbdlUNIodNnm12FOZyKScSB0LHdMJ2vBW2aaMB3qS9V3sVnv62uqzr+bSSZKp9Y0hA4asLw==, tarball: file:projects/arm-resources-subscriptions.tgz} name: '@rush-temp/arm-resources-subscriptions' version: 0.0.0 dependencies: @@ -14379,7 +14385,8 @@ packages: '@types/node': 14.18.38 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -15236,7 +15243,7 @@ packages: dev: false file:projects/arm-templatespecs.tgz: - resolution: {integrity: sha512-ZKxHNl9iNMA7cC4x9dYaA3d2SpmqdDrxfVwHpy44pTvCa5z9flxlP/QoqoMxX44kJSD2TIH/13P+bOVItDnYpQ==, tarball: file:projects/arm-templatespecs.tgz} + resolution: {integrity: sha512-1enPjBj1dAGdJ1XHOouopfhZn4ZniLrzlCLmmUfEfE+TRVMpWWRJj8G59cd0OyzFV9ppxWG3NRhp8WKht7Lv1A==, tarball: file:projects/arm-templatespecs.tgz} name: '@rush-temp/arm-templatespecs' version: 0.0.0 dependencies: @@ -15250,7 +15257,8 @@ packages: '@types/node': 14.18.38 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 diff --git a/sdk/links/arm-links/CHANGELOG.md b/sdk/links/arm-links/CHANGELOG.md index 6f7b8b1743c1..7a87a059367b 100644 --- a/sdk/links/arm-links/CHANGELOG.md +++ b/sdk/links/arm-links/CHANGELOG.md @@ -1,15 +1,11 @@ # Release History + +## 3.0.0 (2023-03-27) + +**Breaking Changes** -## 2.0.2 (2022-11-22) - -**Features** - --  Exposes `getContinuationToken` helper function to extract continuation token - -**Bugs Fixed** -  -- A series of small bug fixs relevant to authentication and apiVersion policy - + - Interface ResourceLinksListAtSubscriptionNextOptionalParams no longer has parameter filter + ## 2.0.1 (2022-04-18) **features** diff --git a/sdk/links/arm-links/LICENSE b/sdk/links/arm-links/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/links/arm-links/LICENSE +++ b/sdk/links/arm-links/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/links/arm-links/_meta.json b/sdk/links/arm-links/_meta.json index 4b98b8203a1f..5673a3566433 100644 --- a/sdk/links/arm-links/_meta.json +++ b/sdk/links/arm-links/_meta.json @@ -1,8 +1,8 @@ { - "commit": "a42f1b58607091c4f255ead152a8ef323fa0b280", - "readme": "specification\\resources\\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\\resources\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "commit": "32f4b34581ce3613834410d1cbeb0fdeed314b79", + "readme": "specification/resources/resource-manager/readme.md", + "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/resources/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "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.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/links/arm-links/package.json b/sdk/links/arm-links/package.json index 16f5146ac737..edf4b1b7962d 100644 --- a/sdk/links/arm-links/package.json +++ b/sdk/links/arm-links/package.json @@ -3,13 +3,13 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ManagementLinkClient.", - "version": "2.0.2", + "version": "3.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -31,12 +31,13 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -44,11 +45,9 @@ "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", - "@azure/arm-resources": "^5.0.0", "@types/node": "^14.0.0", "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/links/arm-links", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -109,5 +108,6 @@ } ] }, - "autoPublish": true -} + "autoPublish": true, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/links/arm-links" +} \ No newline at end of file diff --git a/sdk/links/arm-links/review/arm-links.api.md b/sdk/links/arm-links/review/arm-links.api.md index 0bbbaff74a79..1be7e2d6a233 100644 --- a/sdk/links/arm-links/review/arm-links.api.md +++ b/sdk/links/arm-links/review/arm-links.api.md @@ -141,7 +141,6 @@ export type ResourceLinksListAtSourceScopeResponse = ResourceLinkResult; // @public export interface ResourceLinksListAtSubscriptionNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public diff --git a/sdk/links/arm-links/src/managementLinkClient.ts b/sdk/links/arm-links/src/managementLinkClient.ts index ba642926cc86..78b943b5a9c3 100644 --- a/sdk/links/arm-links/src/managementLinkClient.ts +++ b/sdk/links/arm-links/src/managementLinkClient.ts @@ -50,7 +50,7 @@ export class ManagementLinkClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-links/2.0.2`; + const packageDetails = `azsdk-js-arm-links/3.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/links/arm-links/src/models/index.ts b/sdk/links/arm-links/src/models/index.ts index 1a730f96d3e2..1788384b5787 100644 --- a/sdk/links/arm-links/src/models/index.ts +++ b/sdk/links/arm-links/src/models/index.ts @@ -138,10 +138,7 @@ export type ResourceLinksListAtSourceScopeResponse = ResourceLinkResult; /** Optional parameters. */ export interface ResourceLinksListAtSubscriptionNextOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the list resource links operation. The supported filter for list resource links is targetId. For example, $filter=targetId eq {value} */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listAtSubscriptionNext operation. */ export type ResourceLinksListAtSubscriptionNextResponse = ResourceLinkResult; diff --git a/sdk/links/arm-links/src/operations/operations.ts b/sdk/links/arm-links/src/operations/operations.ts index 26969f581fd6..d62cec21b1d3 100644 --- a/sdk/links/arm-links/src/operations/operations.ts +++ b/sdk/links/arm-links/src/operations/operations.ts @@ -137,7 +137,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.OperationListResult } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/links/arm-links/src/operations/resourceLinks.ts b/sdk/links/arm-links/src/operations/resourceLinks.ts index 4585f8d526f0..8b639e997e81 100644 --- a/sdk/links/arm-links/src/operations/resourceLinks.ts +++ b/sdk/links/arm-links/src/operations/resourceLinks.ts @@ -355,7 +355,6 @@ const listAtSubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ResourceLinkResult } }, - queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.nextLink, @@ -372,7 +371,6 @@ const listAtSourceScopeNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ResourceLinkResult } }, - queryParameters: [Parameters.apiVersion, Parameters.filter1], urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope], headerParameters: [Parameters.accept], serializer diff --git a/sdk/links/arm-links/src/pagingHelper.ts b/sdk/links/arm-links/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/links/arm-links/src/pagingHelper.ts +++ b/sdk/links/arm-links/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/links/arm-links/test/sampleTest.ts b/sdk/links/arm-links/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/links/arm-links/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/links/arm-links/tsconfig.json b/sdk/links/arm-links/tsconfig.json index 433cb8777ded..24ca8ae4e47e 100644 --- a/sdk/links/arm-links/tsconfig.json +++ b/sdk/links/arm-links/tsconfig.json @@ -15,23 +15,15 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-links": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", "./test/**/*.ts", - "samples-dev/**/*.ts", "./test/**/*.ts", - "samples-dev/**/*.ts", "./test/**/*.ts", - "samples-dev/**/*.ts", "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"