diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 99321d0907bc..96903f9577f3 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: '6.0' settings: - autoInstallPeers: true + autoInstallPeers: false excludeLinksFromLockfile: false dependencies: @@ -1135,6 +1135,13 @@ packages: tslib: 2.6.2 dev: false + /@azure/abort-controller@2.0.0: + resolution: {integrity: sha512-RP/mR/WJchR+g+nQFJGOec+nzeN/VvjlwbinccoqfhTsTHbb8X5+mLDp48kHT0ueyum0BNSwGm0kX0UZuIqTGg==} + engines: {node: '>=18.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + /@azure/app-configuration@1.5.0-beta.2: resolution: {integrity: sha512-FhKvFKmMhu0P57lYO4i3JN8oGyvHs+YTsdz18cmKaqYHwlHD9ITHGKX59f3hT3rWZoK02sd0OajhCGrsKOmkmQ==} engines: {node: '>=16.0.0'} @@ -1176,6 +1183,15 @@ packages: tslib: 2.6.2 dev: false + /@azure/core-auth@1.6.0: + resolution: {integrity: sha512-3X9wzaaGgRaBCwhLQZDtFp5uLIXCPrGbwJNWPPugvL4xbIGgScv77YzzxToKGLAKvG9amDoofMoP+9hsH1vs1w==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.0.0 + '@azure/core-util': 1.6.1 + tslib: 2.6.2 + dev: false + /@azure/core-client@1.7.3: resolution: {integrity: sha512-kleJ1iUTxcO32Y06dH9Pfi9K4U+Tlb111WXEnbt7R/ne+NLRwppZiTGJuTD5VVoxTMK5NTbEtm5t2vcdNCFe2g==} engines: {node: '>=14.0.0'} @@ -1292,6 +1308,22 @@ packages: - supports-color dev: false + /@azure/core-rest-pipeline@1.14.0: + resolution: {integrity: sha512-Tp4M6NsjCmn9L5p7HsW98eSOS7A0ibl3e5ntZglozT0XuD/0y6i36iW829ZbBq0qihlGgfaeFpkLjZ418KDm1Q==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.0.0 + '@azure/core-auth': 1.6.0 + '@azure/core-tracing': 1.0.1 + '@azure/core-util': 1.6.1 + '@azure/logger': 1.0.4 + http-proxy-agent: 5.0.0 + https-proxy-agent: 5.0.1 + tslib: 2.6.2 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/core-tracing@1.0.0-preview.13: resolution: {integrity: sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==} engines: {node: '>=12.0.0'} @@ -1371,6 +1403,28 @@ packages: - supports-color dev: false + /@azure/identity@4.0.1: + resolution: {integrity: sha512-yRdgF03SFLqUMZZ1gKWt0cs0fvrDIkq2bJ6Oidqcoo5uM85YMBnXWMzYKK30XqIT76lkFyAaoAAy5knXhrG4Lw==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-auth': 1.6.0 + '@azure/core-client': 1.7.3 + '@azure/core-rest-pipeline': 1.14.0 + '@azure/core-tracing': 1.0.1 + '@azure/core-util': 1.6.1 + '@azure/logger': 1.0.4 + '@azure/msal-browser': 3.7.1 + '@azure/msal-node': 2.6.2 + events: 3.3.0 + jws: 4.0.0 + open: 8.4.2 + stoppable: 1.1.0 + tslib: 2.6.2 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/keyvault-certificates@4.7.0: resolution: {integrity: sha512-W3v9Fj48ik2gaRiY7ra4F92hjnWM3H4oT25xy4pGl/z3zHeUB0YZTXitFiSnj4fxMTbPEx3gdmjfIjf3FIq/Yw==} engines: {node: '>=14.0.0'} @@ -1483,6 +1537,13 @@ packages: '@azure/msal-common': 14.2.0 dev: false + /@azure/msal-browser@3.7.1: + resolution: {integrity: sha512-EZnk81zn1/5/jv/VVN2Tp+dUVchHmwbbt7pn654Eqa+ua7wtEIg1btuW/mowB13BV2nGYcvniY9Mf+3Sbe0cCg==} + engines: {node: '>=0.8.0'} + dependencies: + '@azure/msal-common': 14.6.1 + dev: false + /@azure/msal-common@13.3.1: resolution: {integrity: sha512-Lrk1ozoAtaP/cp53May3v6HtcFSVxdFrg2Pa/1xu5oIvsIwhxW6zSPibKefCOVgd5osgykMi5jjcZHv8XkzZEQ==} engines: {node: '>=0.8.0'} @@ -1493,6 +1554,11 @@ packages: engines: {node: '>=0.8.0'} dev: false + /@azure/msal-common@14.6.1: + resolution: {integrity: sha512-yL97p2La0WrgU3MdXThOLOpdmBMvH8J69vwQ/skOqORYwOW/UYPdp9nZpvvfBO+zFZB5M3JkqA2NKtn4GfVBHw==} + engines: {node: '>=0.8.0'} + dev: false + /@azure/msal-common@7.6.0: resolution: {integrity: sha512-XqfbglUTVLdkHQ8F9UQJtKseRr3sSnr9ysboxtoswvaMVaEfvyLtMoHv9XdKUfOc0qKGzNgRFd9yRjIWVepl6Q==} engines: {node: '>=0.8.0'} @@ -1540,6 +1606,15 @@ packages: uuid: 8.3.2 dev: false + /@azure/msal-node@2.6.2: + resolution: {integrity: sha512-XyP+5lUZxTpWpLCC2wAFGA9wXrUhHp1t4NLmQW0mQZzUdcSay3rG7kGGqxxeLf8mRdwoR0B70TCLmIGX6cfK/g==} + engines: {node: '>=16'} + dependencies: + '@azure/msal-common': 14.6.1 + jsonwebtoken: 9.0.2 + uuid: 8.3.2 + dev: false + /@azure/schema-registry@1.2.0: resolution: {integrity: sha512-c0941sREjSPE6/KMVd3vrLYKwwjrKZabOP/i1YOoBS4RquFIi3aA4wUPBvsVhOs4JzN79Ztcn7/ZvO4HyzrSVQ==} engines: {node: '>=12.0.0'} @@ -3554,6 +3629,13 @@ packages: requiresBuild: true dev: false + /autorest@3.7.1: + resolution: {integrity: sha512-6q17NtosQZPqBkIOUnaOPedf3PDIBF7Ha1iEGRhTqZF6TG2Q/1E3ID/D+ePIIzZDKvW01p/2pENq/oiBWH9IGQ==} + engines: {node: '>=12.0.0'} + hasBin: true + requiresBuild: true + dev: false + /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} @@ -4495,7 +4577,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20231030 + typescript: 5.4.0-dev.20240206 dev: false /eastasianwidth@0.2.0: @@ -9119,6 +9201,37 @@ packages: yn: 3.1.1 dev: false + /ts-node@10.9.1(@types/node@18.18.7)(typescript@5.3.3): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 18.18.7 + acorn: 8.11.2 + acorn-walk: 8.3.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.3.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /tsconfig-paths@3.14.2: resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} dependencies: @@ -9261,8 +9374,14 @@ packages: hasBin: true dev: false - /typescript@5.3.0-dev.20231030: - resolution: {integrity: sha512-azWrF0lAiu8cBHNr6yq3RDkU/DtQScvT48ea3Ngq6oXJ/GPO0n96wCFSRQA5UbZlVVf3fAAqsUfvOdohRbrPVg==} + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + engines: {node: '>=14.17'} + hasBin: true + dev: false + + /typescript@5.4.0-dev.20240206: + resolution: {integrity: sha512-8P1XYxDbG/AyGE5tB8+JpeiQfS5ye1BTvIVDZaHhoK9nJuCn4nkB0L66lvfwYB+46hA4rLo3vE3WkIToSYtqQA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -9894,7 +10013,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -9940,7 +10059,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -10170,7 +10289,7 @@ packages: dependencies: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 dotenv: 8.6.0 eslint: 8.52.0 @@ -10242,7 +10361,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -10334,7 +10453,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -10814,7 +10933,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -11474,7 +11593,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -11694,7 +11813,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -13963,7 +14082,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -15245,7 +15364,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -15306,23 +15425,27 @@ packages: dev: false file:projects/arm-servicelinker.tgz: - resolution: {integrity: sha512-udECqWC7AR8a+LQyDFyjHN/2bdy4xCXgJNElaRUKiLajilsr5yoVpdjaKA2f6+BRuOKMSKtZD1wvGmOFJ1gviA==, tarball: file:projects/arm-servicelinker.tgz} + resolution: {integrity: sha512-IJEwKW/B+IL0q+jLmS8efgOnNleA11tsGkRPi3u6IlBDMYFskmi9tJWA9HGDC9JrfC/+1gnyhGwY2PMUeqm+Ow==, tarball: file:projects/arm-servicelinker.tgz} name: '@rush-temp/arm-servicelinker' version: 0.0.0 dependencies: - '@azure/identity': 3.3.2 + '@azure/core-auth': 1.6.0 + '@azure/core-rest-pipeline': 1.14.0 + '@azure/identity': 4.0.1 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.7 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 - mkdirp: 1.0.4 + esm: 3.2.25 + mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 - ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2) + rimraf: 5.0.5 + ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.3.3) tslib: 2.6.2 - typescript: 5.2.2 + typescript: 5.3.3 uglify-js: 3.17.4 transitivePeerDependencies: - '@swc/core' @@ -16440,7 +16563,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 chai: 4.3.10 cross-env: 7.0.3 dotenv: 16.3.1 @@ -17603,7 +17726,7 @@ packages: name: '@rush-temp/dev-tool' version: 0.0.0 dependencies: - '@_ts/max': /typescript@5.2.2 + '@_ts/max': /typescript@5.3.3 '@_ts/min': /typescript@4.2.4 '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@rollup/plugin-commonjs': 25.0.7(rollup@3.29.4) @@ -17669,7 +17792,7 @@ packages: '@microsoft/api-extractor': 7.38.0(@types/node@18.18.7) '@types/chai': 4.3.9 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18075,7 +18198,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18120,7 +18243,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18623,7 +18746,7 @@ packages: '@types/mocha': 10.0.3 '@types/node': 18.18.7 '@types/uuid': 8.3.4 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18732,7 +18855,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18778,7 +18901,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18824,7 +18947,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -18870,7 +18993,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -19998,7 +20121,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -20043,7 +20166,7 @@ packages: '@types/chai': 4.3.9 '@types/mocha': 10.0.3 '@types/node': 18.18.7 - autorest: 3.6.3 + autorest: 3.7.1 c8: 8.0.1 chai: 4.3.10 cross-env: 7.0.3 @@ -20375,7 +20498,7 @@ packages: dev: false file:projects/storage-blob-changefeed.tgz: - resolution: {integrity: sha512-2LtIcl6t12irIaBaBSP/ytxkJA5VSRJ2RUg08UJEi/NVLHhjpx+NQQn/a/ebeAwpa2DefdSkfHRhgh7zn8Qzzg==, tarball: file:projects/storage-blob-changefeed.tgz} + resolution: {integrity: sha512-nBVNUHVbjsSyKfoA2uJNvG+jlJEW9Oq12K9Oha1C6GVY1rZhEpcWrkob0RJe/sCDdrMo0MBUnvL7+PkUsvhR8w==, tarball: file:projects/storage-blob-changefeed.tgz} name: '@rush-temp/storage-blob-changefeed' version: 0.0.0 dependencies: diff --git a/sdk/servicelinker/arm-servicelinker/CHANGELOG.md b/sdk/servicelinker/arm-servicelinker/CHANGELOG.md index b2b4092ccc22..fcd33424f419 100644 --- a/sdk/servicelinker/arm-servicelinker/CHANGELOG.md +++ b/sdk/servicelinker/arm-servicelinker/CHANGELOG.md @@ -1,15 +1,12 @@ # Release History + +## 2.2.0 (2024-02-07) + +**Features** -## 2.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Enum KnownClientType has a new value KafkaSpringBoot + + ## 2.1.0 (2022-12-16) **Features** @@ -45,4 +42,4 @@ ## 1.0.0 (2022-04-27) -The package of @azure/arm-servicelinker is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +The package of @azure/arm-servicelinker is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/servicelinker/arm-servicelinker/LICENSE b/sdk/servicelinker/arm-servicelinker/LICENSE index 5d1d36e0af80..7d5934740965 100644 --- a/sdk/servicelinker/arm-servicelinker/LICENSE +++ b/sdk/servicelinker/arm-servicelinker/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2024 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/servicelinker/arm-servicelinker/_meta.json b/sdk/servicelinker/arm-servicelinker/_meta.json index a88461956128..c37051e3bb1c 100644 --- a/sdk/servicelinker/arm-servicelinker/_meta.json +++ b/sdk/servicelinker/arm-servicelinker/_meta.json @@ -1,8 +1,8 @@ { - "commit": "eeb81e9f8a12ad473e8df3a71f2d58682741bcd2", - "readme": "specification\\servicelinker\\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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\servicelinker\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.5.20221215.1 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.5.20221215.1" + "commit": "fdc208b15fbd1be88a9f05ac33ebe6723491d647", + "readme": "specification/servicelinker/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.7 --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/servicelinker/resource-manager/readme.md --use=@autorest/typescript@^6.0.11", + "repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", + "use": "@autorest/typescript@^6.0.11" } \ No newline at end of file diff --git a/sdk/servicelinker/arm-servicelinker/package.json b/sdk/servicelinker/arm-servicelinker/package.json index 09f7d83e3866..06226a0bf78d 100644 --- a/sdk/servicelinker/arm-servicelinker/package.json +++ b/sdk/servicelinker/arm-servicelinker/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ServiceLinkerManagementClient.", - "version": "2.1.1", + "version": "2.2.0", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", + "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, "keywords": [ @@ -29,20 +29,22 @@ "types": "./types/arm-servicelinker.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "mkdirp": "^1.0.4", - "typescript": "~5.2.0", + "mkdirp": "^2.1.2", + "typescript": "~5.3.3", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", - "@azure/identity": "^3.3.0", + "@azure/dev-tool": "^1.0.0", + "@azure/identity": "^4.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^18.0.0", - "@azure/dev-tool": "^1.0.0", "ts-node": "^10.0.0" }, "repository": { @@ -76,8 +78,7 @@ "pack": "npm pack 2>&1", "extract-api": "api-extractor run --local", "lint": "echo skipped", - "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -105,13 +106,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicelinker/arm-servicelinker", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-servicelinker?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicelinker/arm-servicelinker" +} \ No newline at end of file diff --git a/sdk/servicelinker/arm-servicelinker/review/arm-servicelinker.api.md b/sdk/servicelinker/arm-servicelinker/review/arm-servicelinker.api.md index 0d160013a145..e42dfdd3139d 100644 --- a/sdk/servicelinker/arm-servicelinker/review/arm-servicelinker.api.md +++ b/sdk/servicelinker/arm-servicelinker/review/arm-servicelinker.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export type ActionType = string; @@ -127,6 +127,7 @@ export enum KnownClientType { Dotnet = "dotnet", Go = "go", Java = "java", + KafkaSpringBoot = "kafka-springBoot", Nodejs = "nodejs", None = "none", Php = "php", @@ -179,13 +180,13 @@ export enum KnownVNetSolutionType { // @public export interface Linker { - beginCreateOrUpdate(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise, LinkerCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise, LinkerCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceUri: string, linkerName: string, parameters: LinkerResource, options?: LinkerCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise, void>>; + beginDelete(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise; - beginUpdate(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise, LinkerUpdateResponse>>; + beginUpdate(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise, LinkerUpdateResponse>>; beginUpdateAndWait(resourceUri: string, linkerName: string, parameters: LinkerPatch, options?: LinkerUpdateOptionalParams): Promise; - beginValidate(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise, LinkerValidateResponse>>; + beginValidate(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise, LinkerValidateResponse>>; beginValidateAndWait(resourceUri: string, linkerName: string, options?: LinkerValidateOptionalParams): Promise; get(resourceUri: string, linkerName: string, options?: LinkerGetOptionalParams): Promise; list(resourceUri: string, options?: LinkerListOptionalParams): PagedAsyncIterableIterator; diff --git a/sdk/servicelinker/arm-servicelinker/src/lroImpl.ts b/sdk/servicelinker/arm-servicelinker/src/lroImpl.ts index 518d5f053b4e..b27f5ac7209b 100644 --- a/sdk/servicelinker/arm-servicelinker/src/lroImpl.ts +++ b/sdk/servicelinker/arm-servicelinker/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike }, + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal, + }); + }, + }; } diff --git a/sdk/servicelinker/arm-servicelinker/src/models/index.ts b/sdk/servicelinker/arm-servicelinker/src/models/index.ts index 709e0b5102bc..790b60348724 100644 --- a/sdk/servicelinker/arm-servicelinker/src/models/index.ts +++ b/sdk/servicelinker/arm-servicelinker/src/models/index.ts @@ -448,7 +448,7 @@ export enum KnownTargetServiceType { /** ConfluentBootstrapServer */ ConfluentBootstrapServer = "ConfluentBootstrapServer", /** ConfluentSchemaRegistry */ - ConfluentSchemaRegistry = "ConfluentSchemaRegistry" + ConfluentSchemaRegistry = "ConfluentSchemaRegistry", } /** @@ -473,7 +473,7 @@ export enum KnownAuthType { /** ServicePrincipalCertificate */ ServicePrincipalCertificate = "servicePrincipalCertificate", /** Secret */ - Secret = "secret" + Secret = "secret", } /** @@ -510,7 +510,9 @@ export enum KnownClientType { /** Nodejs */ Nodejs = "nodejs", /** SpringBoot */ - SpringBoot = "springBoot" + SpringBoot = "springBoot", + /** KafkaSpringBoot */ + KafkaSpringBoot = "kafka-springBoot", } /** @@ -527,7 +529,8 @@ export enum KnownClientType { * **ruby** \ * **django** \ * **nodejs** \ - * **springBoot** + * **springBoot** \ + * **kafka-springBoot** */ export type ClientType = string; @@ -536,7 +539,7 @@ export enum KnownVNetSolutionType { /** ServiceEndpoint */ ServiceEndpoint = "serviceEndpoint", /** PrivateLink */ - PrivateLink = "privateLink" + PrivateLink = "privateLink", } /** @@ -558,7 +561,7 @@ export enum KnownCreatedByType { /** ManagedIdentity */ ManagedIdentity = "ManagedIdentity", /** Key */ - Key = "Key" + Key = "Key", } /** @@ -580,7 +583,7 @@ export enum KnownValidationResultStatus { /** Failure */ Failure = "failure", /** Warning */ - Warning = "warning" + Warning = "warning", } /** @@ -601,7 +604,7 @@ export enum KnownOrigin { /** System */ System = "system", /** UserSystem */ - UserSystem = "user,system" + UserSystem = "user,system", } /** @@ -618,7 +621,7 @@ export type Origin = string; /** Known values of {@link ActionType} that the service accepts. */ export enum KnownActionType { /** Internal */ - Internal = "Internal" + Internal = "Internal", } /** @@ -633,7 +636,7 @@ export type ActionType = string; /** Known values of {@link AzureResourceType} that the service accepts. */ export enum KnownAzureResourceType { /** KeyVault */ - KeyVault = "KeyVault" + KeyVault = "KeyVault", } /** @@ -652,7 +655,7 @@ export enum KnownSecretType { /** KeyVaultSecretUri */ KeyVaultSecretUri = "keyVaultSecretUri", /** KeyVaultSecretReference */ - KeyVaultSecretReference = "keyVaultSecretReference" + KeyVaultSecretReference = "keyVaultSecretReference", } /** diff --git a/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts b/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts index 606d95ae720c..d49b2c51918f 100644 --- a/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts +++ b/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts @@ -17,8 +17,8 @@ export const LinkerList: coreClient.CompositeMapper = { serializedName: "nextLink", nullable: true, type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -27,13 +27,13 @@ export const LinkerList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "LinkerResource" - } - } - } - } - } - } + className: "LinkerResource", + }, + }, + }, + }, + }, + }, }; export const TargetServiceBase: coreClient.CompositeMapper = { @@ -43,18 +43,18 @@ export const TargetServiceBase: coreClient.CompositeMapper = { uberParent: "TargetServiceBase", polymorphicDiscriminator: { serializedName: "type", - clientName: "type" + clientName: "type", }, modelProperties: { type: { serializedName: "type", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const AuthInfoBase: coreClient.CompositeMapper = { @@ -64,18 +64,18 @@ export const AuthInfoBase: coreClient.CompositeMapper = { uberParent: "AuthInfoBase", polymorphicDiscriminator: { serializedName: "authType", - clientName: "authType" + clientName: "authType", }, modelProperties: { authType: { serializedName: "authType", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const VNetSolution: coreClient.CompositeMapper = { @@ -87,11 +87,11 @@ export const VNetSolution: coreClient.CompositeMapper = { serializedName: "type", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SecretStore: coreClient.CompositeMapper = { @@ -103,11 +103,11 @@ export const SecretStore: coreClient.CompositeMapper = { serializedName: "keyVaultId", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SystemData: coreClient.CompositeMapper = { @@ -118,41 +118,41 @@ export const SystemData: coreClient.CompositeMapper = { createdBy: { serializedName: "createdBy", type: { - name: "String" - } + name: "String", + }, }, createdByType: { serializedName: "createdByType", type: { - name: "String" - } + name: "String", + }, }, createdAt: { serializedName: "createdAt", type: { - name: "DateTime" - } + name: "DateTime", + }, }, lastModifiedBy: { serializedName: "lastModifiedBy", type: { - name: "String" - } + name: "String", + }, }, lastModifiedByType: { serializedName: "lastModifiedByType", type: { - name: "String" - } + name: "String", + }, }, lastModifiedAt: { serializedName: "lastModifiedAt", type: { - name: "DateTime" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, }; export const Resource: coreClient.CompositeMapper = { @@ -164,25 +164,25 @@ export const Resource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ErrorResponse: coreClient.CompositeMapper = { @@ -194,11 +194,11 @@ export const ErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ErrorDetail" - } - } - } - } + className: "ErrorDetail", + }, + }, + }, + }, }; export const ErrorDetail: coreClient.CompositeMapper = { @@ -210,22 +210,22 @@ export const ErrorDetail: coreClient.CompositeMapper = { serializedName: "code", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, target: { serializedName: "target", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, details: { serializedName: "details", @@ -235,10 +235,10 @@ export const ErrorDetail: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorDetail" - } - } - } + className: "ErrorDetail", + }, + }, + }, }, additionalInfo: { serializedName: "additionalInfo", @@ -248,13 +248,13 @@ export const ErrorDetail: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, }; export const ErrorAdditionalInfo: coreClient.CompositeMapper = { @@ -266,19 +266,19 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, info: { serializedName: "info", readOnly: true, type: { name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + value: { type: { name: "any" } }, + }, + }, + }, + }, }; export const LinkerPatch: coreClient.CompositeMapper = { @@ -290,52 +290,52 @@ export const LinkerPatch: coreClient.CompositeMapper = { serializedName: "properties.targetService", type: { name: "Composite", - className: "TargetServiceBase" - } + className: "TargetServiceBase", + }, }, authInfo: { serializedName: "properties.authInfo", type: { name: "Composite", - className: "AuthInfoBase" - } + className: "AuthInfoBase", + }, }, clientType: { serializedName: "properties.clientType", type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, vNetSolution: { serializedName: "properties.vNetSolution", type: { name: "Composite", - className: "VNetSolution" - } + className: "VNetSolution", + }, }, secretStore: { serializedName: "properties.secretStore", type: { name: "Composite", - className: "SecretStore" - } + className: "SecretStore", + }, }, scope: { serializedName: "properties.scope", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ValidateOperationResult: coreClient.CompositeMapper = { @@ -347,64 +347,64 @@ export const ValidateOperationResult: coreClient.CompositeMapper = { serializedName: "resourceId", nullable: true, type: { - name: "String" - } + name: "String", + }, }, status: { serializedName: "status", nullable: true, type: { - name: "String" - } + name: "String", + }, }, linkerName: { serializedName: "properties.linkerName", nullable: true, type: { - name: "String" - } + name: "String", + }, }, isConnectionAvailable: { serializedName: "properties.isConnectionAvailable", nullable: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, reportStartTimeUtc: { serializedName: "properties.reportStartTimeUtc", nullable: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, reportEndTimeUtc: { serializedName: "properties.reportEndTimeUtc", nullable: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, sourceId: { serializedName: "properties.sourceId", nullable: true, type: { - name: "String" - } + name: "String", + }, }, targetId: { serializedName: "properties.targetId", nullable: true, type: { - name: "String" - } + name: "String", + }, }, authType: { serializedName: "properties.authType", nullable: true, type: { - name: "String" - } + name: "String", + }, }, validationDetail: { serializedName: "properties.validationDetail", @@ -414,13 +414,13 @@ export const ValidateOperationResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ValidationResultItem" - } - } - } - } - } - } + className: "ValidationResultItem", + }, + }, + }, + }, + }, + }, }; export const ValidationResultItem: coreClient.CompositeMapper = { @@ -431,39 +431,39 @@ export const ValidationResultItem: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", nullable: true, type: { - name: "String" - } + name: "String", + }, }, result: { serializedName: "result", nullable: true, type: { - name: "String" - } + name: "String", + }, }, errorMessage: { serializedName: "errorMessage", nullable: true, type: { - name: "String" - } + name: "String", + }, }, errorCode: { serializedName: "errorCode", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SourceConfigurationResult: coreClient.CompositeMapper = { @@ -478,13 +478,13 @@ export const SourceConfigurationResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SourceConfiguration" - } - } - } - } - } - } + className: "SourceConfiguration", + }, + }, + }, + }, + }, + }, }; export const SourceConfiguration: coreClient.CompositeMapper = { @@ -495,18 +495,18 @@ export const SourceConfiguration: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationListResult: coreClient.CompositeMapper = { @@ -522,20 +522,20 @@ export const OperationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" - } - } - } + className: "Operation", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Operation: coreClient.CompositeMapper = { @@ -547,39 +547,39 @@ export const Operation: coreClient.CompositeMapper = { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, isDataAction: { serializedName: "isDataAction", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDisplay" - } + className: "OperationDisplay", + }, }, origin: { serializedName: "origin", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, actionType: { serializedName: "actionType", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationDisplay: coreClient.CompositeMapper = { @@ -591,32 +591,32 @@ export const OperationDisplay: coreClient.CompositeMapper = { serializedName: "provider", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const AzureResourcePropertiesBase: coreClient.CompositeMapper = { @@ -626,18 +626,18 @@ export const AzureResourcePropertiesBase: coreClient.CompositeMapper = { uberParent: "AzureResourcePropertiesBase", polymorphicDiscriminator: { serializedName: "type", - clientName: "type" + clientName: "type", }, modelProperties: { type: { serializedName: "type", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SecretInfoBase: coreClient.CompositeMapper = { @@ -647,18 +647,18 @@ export const SecretInfoBase: coreClient.CompositeMapper = { uberParent: "SecretInfoBase", polymorphicDiscriminator: { serializedName: "secretType", - clientName: "secretType" + clientName: "secretType", }, modelProperties: { secretType: { serializedName: "secretType", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const AzureResource: coreClient.CompositeMapper = { @@ -673,18 +673,18 @@ export const AzureResource: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, resourceProperties: { serializedName: "resourceProperties", type: { name: "Composite", - className: "AzureResourcePropertiesBase" - } - } - } - } + className: "AzureResourcePropertiesBase", + }, + }, + }, + }, }; export const ConfluentBootstrapServer: coreClient.CompositeMapper = { @@ -699,11 +699,11 @@ export const ConfluentBootstrapServer: coreClient.CompositeMapper = { endpoint: { serializedName: "endpoint", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ConfluentSchemaRegistry: coreClient.CompositeMapper = { @@ -718,11 +718,11 @@ export const ConfluentSchemaRegistry: coreClient.CompositeMapper = { endpoint: { serializedName: "endpoint", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SecretAuthInfo: coreClient.CompositeMapper = { @@ -738,18 +738,18 @@ export const SecretAuthInfo: coreClient.CompositeMapper = { serializedName: "name", nullable: true, type: { - name: "String" - } + name: "String", + }, }, secretInfo: { serializedName: "secretInfo", type: { name: "Composite", - className: "SecretInfoBase" - } - } - } - } + className: "SecretInfoBase", + }, + }, + }, + }, }; export const UserAssignedIdentityAuthInfo: coreClient.CompositeMapper = { @@ -764,17 +764,17 @@ export const UserAssignedIdentityAuthInfo: coreClient.CompositeMapper = { clientId: { serializedName: "clientId", type: { - name: "String" - } + name: "String", + }, }, subscriptionId: { serializedName: "subscriptionId", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SystemAssignedIdentityAuthInfo: coreClient.CompositeMapper = { @@ -785,9 +785,9 @@ export const SystemAssignedIdentityAuthInfo: coreClient.CompositeMapper = { uberParent: "AuthInfoBase", polymorphicDiscriminator: AuthInfoBase.type.polymorphicDiscriminator, modelProperties: { - ...AuthInfoBase.type.modelProperties - } - } + ...AuthInfoBase.type.modelProperties, + }, + }, }; export const ServicePrincipalSecretAuthInfo: coreClient.CompositeMapper = { @@ -803,25 +803,25 @@ export const ServicePrincipalSecretAuthInfo: coreClient.CompositeMapper = { serializedName: "clientId", required: true, type: { - name: "String" - } + name: "String", + }, }, principalId: { serializedName: "principalId", required: true, type: { - name: "String" - } + name: "String", + }, }, secret: { serializedName: "secret", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ServicePrincipalCertificateAuthInfo: coreClient.CompositeMapper = { @@ -837,25 +837,25 @@ export const ServicePrincipalCertificateAuthInfo: coreClient.CompositeMapper = { serializedName: "clientId", required: true, type: { - name: "String" - } + name: "String", + }, }, principalId: { serializedName: "principalId", required: true, type: { - name: "String" - } + name: "String", + }, }, certificate: { serializedName: "certificate", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ProxyResource: coreClient.CompositeMapper = { @@ -863,9 +863,9 @@ export const ProxyResource: coreClient.CompositeMapper = { name: "Composite", className: "ProxyResource", modelProperties: { - ...Resource.type.modelProperties - } - } + ...Resource.type.modelProperties, + }, + }, }; export const AzureKeyVaultProperties: coreClient.CompositeMapper = { @@ -882,11 +882,11 @@ export const AzureKeyVaultProperties: coreClient.CompositeMapper = { serializedName: "connectAsKubernetesCsiDriver", nullable: true, type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const ValueSecretInfo: coreClient.CompositeMapper = { @@ -902,11 +902,11 @@ export const ValueSecretInfo: coreClient.CompositeMapper = { serializedName: "value", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const KeyVaultSecretReferenceSecretInfo: coreClient.CompositeMapper = { @@ -921,18 +921,18 @@ export const KeyVaultSecretReferenceSecretInfo: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, version: { serializedName: "version", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const KeyVaultSecretUriSecretInfo: coreClient.CompositeMapper = { @@ -947,11 +947,11 @@ export const KeyVaultSecretUriSecretInfo: coreClient.CompositeMapper = { value: { serializedName: "value", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const LinkerResource: coreClient.CompositeMapper = { @@ -964,59 +964,59 @@ export const LinkerResource: coreClient.CompositeMapper = { serializedName: "systemData", type: { name: "Composite", - className: "SystemData" - } + className: "SystemData", + }, }, targetService: { serializedName: "properties.targetService", type: { name: "Composite", - className: "TargetServiceBase" - } + className: "TargetServiceBase", + }, }, authInfo: { serializedName: "properties.authInfo", type: { name: "Composite", - className: "AuthInfoBase" - } + className: "AuthInfoBase", + }, }, clientType: { serializedName: "properties.clientType", type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, vNetSolution: { serializedName: "properties.vNetSolution", type: { name: "Composite", - className: "VNetSolution" - } + className: "VNetSolution", + }, }, secretStore: { serializedName: "properties.secretStore", type: { name: "Composite", - className: "SecretStore" - } + className: "SecretStore", + }, }, scope: { serializedName: "properties.scope", nullable: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export let discriminators = { @@ -1031,9 +1031,10 @@ export let discriminators = { "AuthInfoBase.userAssignedIdentity": UserAssignedIdentityAuthInfo, "AuthInfoBase.systemAssignedIdentity": SystemAssignedIdentityAuthInfo, "AuthInfoBase.servicePrincipalSecret": ServicePrincipalSecretAuthInfo, - "AuthInfoBase.servicePrincipalCertificate": ServicePrincipalCertificateAuthInfo, + "AuthInfoBase.servicePrincipalCertificate": + ServicePrincipalCertificateAuthInfo, "AzureResourcePropertiesBase.KeyVault": AzureKeyVaultProperties, "SecretInfoBase.rawValue": ValueSecretInfo, "SecretInfoBase.keyVaultSecretReference": KeyVaultSecretReferenceSecretInfo, - "SecretInfoBase.keyVaultSecretUri": KeyVaultSecretUriSecretInfo + "SecretInfoBase.keyVaultSecretUri": KeyVaultSecretUriSecretInfo, }; diff --git a/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts b/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts index ab0e3f41bd86..3a672b906246 100644 --- a/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts +++ b/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts @@ -9,11 +9,11 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { LinkerResource as LinkerResourceMapper, - LinkerPatch as LinkerPatchMapper + LinkerPatch as LinkerPatchMapper, } from "../models/mappers"; export const accept: OperationParameter = { @@ -23,9 +23,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -34,10 +34,10 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const resourceUri: OperationURLParameter = { @@ -46,22 +46,22 @@ export const resourceUri: OperationURLParameter = { serializedName: "resourceUri", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-05-01", + defaultValue: "2024-02-01", isConstant: true, serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const linkerName: OperationURLParameter = { @@ -70,9 +70,9 @@ export const linkerName: OperationURLParameter = { serializedName: "linkerName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const contentType: OperationParameter = { @@ -82,19 +82,19 @@ export const contentType: OperationParameter = { isConstant: true, serializedName: "Content-Type", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters: OperationParameter = { parameterPath: "parameters", - mapper: LinkerResourceMapper + mapper: LinkerResourceMapper, }; export const parameters1: OperationParameter = { parameterPath: "parameters", - mapper: LinkerPatchMapper + mapper: LinkerPatchMapper, }; export const nextLink: OperationURLParameter = { @@ -103,8 +103,8 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; diff --git a/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts b/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts index 9c6a50a0e00a..7928ffd44218 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ServiceLinkerManagementClient } from "../serviceLinkerManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { LinkerResource, LinkerListNextOptionalParams, @@ -32,7 +36,7 @@ import { LinkerValidateResponse, LinkerListConfigurationsOptionalParams, LinkerListConfigurationsResponse, - LinkerListNextResponse + LinkerListNextResponse, } from "../models"; /// @@ -56,7 +60,7 @@ export class LinkerImpl implements Linker { */ public list( resourceUri: string, - options?: LinkerListOptionalParams + options?: LinkerListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(resourceUri, options); return { @@ -71,14 +75,14 @@ export class LinkerImpl implements Linker { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(resourceUri, options, settings); - } + }, }; } private async *listPagingPage( resourceUri: string, options?: LinkerListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: LinkerListResponse; let continuationToken = settings?.continuationToken; @@ -100,7 +104,7 @@ export class LinkerImpl implements Linker { private async *listPagingAll( resourceUri: string, - options?: LinkerListOptionalParams + options?: LinkerListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(resourceUri, options)) { yield* page; @@ -115,11 +119,11 @@ export class LinkerImpl implements Linker { */ private _list( resourceUri: string, - options?: LinkerListOptionalParams + options?: LinkerListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, options }, - listOperationSpec + listOperationSpec, ); } @@ -133,11 +137,11 @@ export class LinkerImpl implements Linker { get( resourceUri: string, linkerName: string, - options?: LinkerGetOptionalParams + options?: LinkerGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, linkerName, options }, - getOperationSpec + getOperationSpec, ); } @@ -153,30 +157,29 @@ export class LinkerImpl implements Linker { resourceUri: string, linkerName: string, parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams + options?: LinkerCreateOrUpdateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkerCreateOrUpdateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -185,8 +188,8 @@ export class LinkerImpl implements Linker { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -194,20 +197,23 @@ export class LinkerImpl implements Linker { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, linkerName, parameters, options }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + LinkerCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -225,13 +231,13 @@ export class LinkerImpl implements Linker { resourceUri: string, linkerName: string, parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams + options?: LinkerCreateOrUpdateOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdate( resourceUri, linkerName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -246,25 +252,24 @@ export class LinkerImpl implements Linker { async beginDelete( resourceUri: string, linkerName: string, - options?: LinkerDeleteOptionalParams - ): Promise, void>> { + options?: LinkerDeleteOptionalParams, + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -273,8 +278,8 @@ export class LinkerImpl implements Linker { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -282,20 +287,20 @@ export class LinkerImpl implements Linker { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, linkerName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -311,7 +316,7 @@ export class LinkerImpl implements Linker { async beginDeleteAndWait( resourceUri: string, linkerName: string, - options?: LinkerDeleteOptionalParams + options?: LinkerDeleteOptionalParams, ): Promise { const poller = await this.beginDelete(resourceUri, linkerName, options); return poller.pollUntilDone(); @@ -329,27 +334,26 @@ export class LinkerImpl implements Linker { resourceUri: string, linkerName: string, parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams + options?: LinkerUpdateOptionalParams, ): Promise< - PollerLike, LinkerUpdateResponse> + SimplePollerLike, LinkerUpdateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -358,8 +362,8 @@ export class LinkerImpl implements Linker { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -367,20 +371,23 @@ export class LinkerImpl implements Linker { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, linkerName, parameters, options }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + LinkerUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -398,13 +405,13 @@ export class LinkerImpl implements Linker { resourceUri: string, linkerName: string, parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams + options?: LinkerUpdateOptionalParams, ): Promise { const poller = await this.beginUpdate( resourceUri, linkerName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -419,30 +426,29 @@ export class LinkerImpl implements Linker { async beginValidate( resourceUri: string, linkerName: string, - options?: LinkerValidateOptionalParams + options?: LinkerValidateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkerValidateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -451,8 +457,8 @@ export class LinkerImpl implements Linker { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -460,20 +466,23 @@ export class LinkerImpl implements Linker { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, options }, - validateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceUri, linkerName, options }, + spec: validateOperationSpec, + }); + const poller = await createHttpPoller< + LinkerValidateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -489,7 +498,7 @@ export class LinkerImpl implements Linker { async beginValidateAndWait( resourceUri: string, linkerName: string, - options?: LinkerValidateOptionalParams + options?: LinkerValidateOptionalParams, ): Promise { const poller = await this.beginValidate(resourceUri, linkerName, options); return poller.pollUntilDone(); @@ -505,11 +514,11 @@ export class LinkerImpl implements Linker { listConfigurations( resourceUri: string, linkerName: string, - options?: LinkerListConfigurationsOptionalParams + options?: LinkerListConfigurationsOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, linkerName, options }, - listConfigurationsOperationSpec + listConfigurationsOperationSpec, ); } @@ -523,11 +532,11 @@ export class LinkerImpl implements Linker { private _listNext( resourceUri: string, nextLink: string, - options?: LinkerListNextOptionalParams + options?: LinkerListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -539,67 +548,67 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.LinkerList + bodyMapper: Mappers.LinkerList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.resourceUri], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.linkerName + Parameters.linkerName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, 201: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, 202: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, 204: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.linkerName + Parameters.linkerName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", @@ -610,116 +619,114 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.linkerName + Parameters.linkerName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, 201: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, 202: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, 204: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerResource, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.linkerName + Parameters.linkerName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const validateOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/validateLinker", + path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/validateLinker", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ValidateOperationResult + bodyMapper: Mappers.ValidateOperationResult, }, 201: { - bodyMapper: Mappers.ValidateOperationResult + bodyMapper: Mappers.ValidateOperationResult, }, 202: { - bodyMapper: Mappers.ValidateOperationResult + bodyMapper: Mappers.ValidateOperationResult, }, 204: { - bodyMapper: Mappers.ValidateOperationResult + bodyMapper: Mappers.ValidateOperationResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.linkerName + Parameters.linkerName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listConfigurationsOperationSpec: coreClient.OperationSpec = { - path: - "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/listConfigurations", + path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/listConfigurations", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.SourceConfigurationResult + bodyMapper: Mappers.SourceConfigurationResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.linkerName + Parameters.linkerName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.LinkerList + bodyMapper: Mappers.LinkerList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.resourceUri, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/servicelinker/arm-servicelinker/src/operations/operations.ts b/sdk/servicelinker/arm-servicelinker/src/operations/operations.ts index 352d765c9ad9..2c1add98e777 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operations/operations.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operations/operations.ts @@ -18,7 +18,7 @@ import { OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, - OperationsListNextResponse + OperationsListNextResponse, } from "../models"; /// @@ -39,7 +39,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ public list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -54,13 +54,13 @@ export class OperationsImpl implements Operations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: OperationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OperationsListResponse; let continuationToken = settings?.continuationToken; @@ -81,7 +81,7 @@ export class OperationsImpl implements Operations { } private async *listPagingAll( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -93,7 +93,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ private _list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,11 +105,11 @@ export class OperationsImpl implements Operations { */ private _listNext( nextLink: string, - options?: OperationsListNextOptionalParams + options?: OperationsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -121,29 +121,29 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts index 2cb2e83ee1aa..25cb99cffdf9 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { LinkerResource, LinkerListOptionalParams, @@ -22,7 +22,7 @@ import { LinkerValidateOptionalParams, LinkerValidateResponse, LinkerListConfigurationsOptionalParams, - LinkerListConfigurationsResponse + LinkerListConfigurationsResponse, } from "../models"; /// @@ -36,7 +36,7 @@ export interface Linker { */ list( resourceUri: string, - options?: LinkerListOptionalParams + options?: LinkerListOptionalParams, ): PagedAsyncIterableIterator; /** * Returns Linker resource for a given name. @@ -48,7 +48,7 @@ export interface Linker { get( resourceUri: string, linkerName: string, - options?: LinkerGetOptionalParams + options?: LinkerGetOptionalParams, ): Promise; /** * Create or update linker resource. @@ -62,10 +62,10 @@ export interface Linker { resourceUri: string, linkerName: string, parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams + options?: LinkerCreateOrUpdateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkerCreateOrUpdateResponse > >; @@ -81,7 +81,7 @@ export interface Linker { resourceUri: string, linkerName: string, parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams + options?: LinkerCreateOrUpdateOptionalParams, ): Promise; /** * Delete a link. @@ -93,8 +93,8 @@ export interface Linker { beginDelete( resourceUri: string, linkerName: string, - options?: LinkerDeleteOptionalParams - ): Promise, void>>; + options?: LinkerDeleteOptionalParams, + ): Promise, void>>; /** * Delete a link. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be @@ -105,7 +105,7 @@ export interface Linker { beginDeleteAndWait( resourceUri: string, linkerName: string, - options?: LinkerDeleteOptionalParams + options?: LinkerDeleteOptionalParams, ): Promise; /** * Operation to update an existing link. @@ -119,9 +119,9 @@ export interface Linker { resourceUri: string, linkerName: string, parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams + options?: LinkerUpdateOptionalParams, ): Promise< - PollerLike, LinkerUpdateResponse> + SimplePollerLike, LinkerUpdateResponse> >; /** * Operation to update an existing link. @@ -135,7 +135,7 @@ export interface Linker { resourceUri: string, linkerName: string, parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams + options?: LinkerUpdateOptionalParams, ): Promise; /** * Validate a link. @@ -147,10 +147,10 @@ export interface Linker { beginValidate( resourceUri: string, linkerName: string, - options?: LinkerValidateOptionalParams + options?: LinkerValidateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkerValidateResponse > >; @@ -164,7 +164,7 @@ export interface Linker { beginValidateAndWait( resourceUri: string, linkerName: string, - options?: LinkerValidateOptionalParams + options?: LinkerValidateOptionalParams, ): Promise; /** * list source configurations for a linker. @@ -176,6 +176,6 @@ export interface Linker { listConfigurations( resourceUri: string, linkerName: string, - options?: LinkerListConfigurationsOptionalParams + options?: LinkerListConfigurationsOptionalParams, ): Promise; } diff --git a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/operations.ts b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/operations.ts index 768cd0e6e86a..c66ecd5ef4fc 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/operations.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/operations.ts @@ -17,6 +17,6 @@ export interface Operations { * @param options The options parameters. */ list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/servicelinker/arm-servicelinker/src/pagingHelper.ts b/sdk/servicelinker/arm-servicelinker/src/pagingHelper.ts index 269a2b9814b5..205cccc26592 100644 --- a/sdk/servicelinker/arm-servicelinker/src/pagingHelper.ts +++ b/sdk/servicelinker/arm-servicelinker/src/pagingHelper.ts @@ -28,7 +28,7 @@ export function getContinuationToken(page: unknown): string | undefined { export function setContinuationToken( page: unknown, - continuationToken: string | undefined + continuationToken: string | undefined, ): void { if (typeof page !== "object" || page === null || !continuationToken) { return; diff --git a/sdk/servicelinker/arm-servicelinker/src/serviceLinkerManagementClient.ts b/sdk/servicelinker/arm-servicelinker/src/serviceLinkerManagementClient.ts index abd984510750..df504c887047 100644 --- a/sdk/servicelinker/arm-servicelinker/src/serviceLinkerManagementClient.ts +++ b/sdk/servicelinker/arm-servicelinker/src/serviceLinkerManagementClient.ts @@ -11,7 +11,7 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { PipelineRequest, PipelineResponse, - SendRequest + SendRequest, } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { LinkerImpl, OperationsImpl } from "./operations"; @@ -29,7 +29,7 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { */ constructor( credentials: coreAuth.TokenCredential, - options?: ServiceLinkerManagementClientOptionalParams + options?: ServiceLinkerManagementClientOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); @@ -41,10 +41,10 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { } const defaults: ServiceLinkerManagementClientOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; - const packageDetails = `azsdk-js-arm-servicelinker/2.1.1`; + const packageDetails = `azsdk-js-arm-servicelinker/2.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -54,20 +54,21 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + options.endpoint ?? options.baseUri ?? "https://management.azure.com", }; super(optionsWithDefaults); let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName + coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -77,7 +78,7 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ @@ -87,15 +88,15 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-05-01"; + this.apiVersion = options.apiVersion || "2024-02-01"; this.linker = new LinkerImpl(this); this.operations = new OperationsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); @@ -110,7 +111,7 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { name: "CustomApiVersionPolicy", async sendRequest( request: PipelineRequest, - next: SendRequest + next: SendRequest, ): Promise { const param = request.url.split("?"); if (param.length > 1) { @@ -124,7 +125,7 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } diff --git a/sdk/servicelinker/arm-servicelinker/test/sampleTest.ts b/sdk/servicelinker/arm-servicelinker/test/sampleTest.ts index 25aeb3ebcc36..d64be981b694 100644 --- a/sdk/servicelinker/arm-servicelinker/test/sampleTest.ts +++ b/sdk/servicelinker/arm-servicelinker/test/sampleTest.ts @@ -9,7 +9,7 @@ import { Recorder, RecorderStartOptions, - env + env, } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; @@ -18,26 +18,26 @@ 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" + SUBSCRIPTION_ID: "azure_subscription_id", }; const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables + envSetupForPlayback: replaceableVariables, }; describe("My test", () => { let recorder: Recorder; - beforeEach(async function(this: Context) { + beforeEach(async function (this: Context) { recorder = new Recorder(this.currentTest); await recorder.start(recorderOptions); }); - afterEach(async function() { + afterEach(async function () { await recorder.stop(); }); - it("sample test", async function() { + it("sample test", async function () { console.log("Hi, I'm a test!"); }); }); diff --git a/sdk/servicelinker/arm-servicelinker/tsconfig.json b/sdk/servicelinker/arm-servicelinker/tsconfig.json index 5c861ab691f6..3e6ae96443f3 100644 --- a/sdk/servicelinker/arm-servicelinker/tsconfig.json +++ b/sdk/servicelinker/arm-servicelinker/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-servicelinker": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"