diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 99321d0907bc..e8395d3d7bbf 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.1.2: + resolution: {integrity: sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==} + 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.7.2: + resolution: {integrity: sha512-Igm/S3fDYmnMq1uKS38Ae1/m37B3zigdlZw+kocwEhh5GjyKjPrXKO2J6rzpC1wAxrNil/jX9BJRqBshyjnF3g==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.2 + '@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.15.2: + resolution: {integrity: sha512-BmWfpjc/QXc2ipHOh6LbUzp3ONCaa6xzIssTU0DwH9bbYNXJlGUL6tujx5TrbVd/QQknmS+vlQJGrCq2oL1gZA==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-auth': 1.7.2 + '@azure/core-tracing': 1.0.1 + '@azure/core-util': 1.6.1 + '@azure/logger': 1.0.4 + http-proxy-agent: 7.0.0 + https-proxy-agent: 7.0.2 + 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.1.0: + resolution: {integrity: sha512-BhYkF8Xr2gXjyDxocm0pc9RI5J5a1jw8iW0dw6Bx95OGdYbuMyFZrrwNw4eYSqQ2BB6FZOqpJP3vjsAqRcvDhw==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-auth': 1.7.2 + '@azure/core-client': 1.7.3 + '@azure/core-rest-pipeline': 1.15.2 + '@azure/core-tracing': 1.0.1 + '@azure/core-util': 1.6.1 + '@azure/logger': 1.0.4 + '@azure/msal-browser': 3.13.0 + '@azure/msal-node': 2.7.0 + 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'} @@ -1476,6 +1530,13 @@ packages: '@azure/msal-common': 13.3.1 dev: false + /@azure/msal-browser@3.13.0: + resolution: {integrity: sha512-fD906nmJei3yE7la6DZTdUtXKvpwzJURkfsiz9747Icv4pit77cegSm6prJTKLQ1fw4iiZzrrWwxnhMLrTf5gQ==} + engines: {node: '>=0.8.0'} + dependencies: + '@azure/msal-common': 14.9.0 + dev: false + /@azure/msal-browser@3.3.0: resolution: {integrity: sha512-2E9h/rvSpjLQ3kRv+4bVmsnDjMaAcw1GMc7qzEvMOlNluXCEvZHeaawnAkYaIbtkbp35gzn/0ULs3RYJXvQdQA==} engines: {node: '>=0.8.0'} @@ -1493,6 +1554,11 @@ packages: engines: {node: '>=0.8.0'} dev: false + /@azure/msal-common@14.9.0: + resolution: {integrity: sha512-yzBPRlWPnTBeixxLNI3BBIgF5/bHpbhoRVuuDBnYjCyWRavaPUsKAHUDYLqpGkBLDciA6TCc6GOxN4/S3WiSxg==} + 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.7.0: + resolution: {integrity: sha512-wXD8LkUvHICeSWZydqg6o8Yvv+grlBEcmLGu+QEI4FcwFendbTEZrlSygnAXXSOCVaGAirWLchca35qrgpO6Jw==} + engines: {node: '>=16'} + dependencies: + '@azure/msal-common': 14.9.0 + 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.5.0-dev.20240424 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.4.5): + 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.4.5 + 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.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} + hasBin: true + dev: false + + /typescript@5.5.0-dev.20240424: + resolution: {integrity: sha512-gX3baGVamMRrQTd2nNBh+GC5/5Dhx08BnatGKOURQ8Dx29K/JjOToj+VrIFUKE76CzmT/pHQKz++l7NDTSBBOQ==} 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-fafpdAUGcU/jhNvSpeh2zAVgc8QtugnsWynHzzKGgp1JIC6aaeZ/aOH5eCrBbz4Gnl8ZEdUKFE5HeAhLarcj8A==, 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.7.2 + '@azure/core-rest-pipeline': 1.15.2 + '@azure/identity': 4.1.0 '@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: 3.0.1 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.4.5) tslib: 2.6.2 - typescript: 5.2.2 + typescript: 5.4.5 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.4.5 '@_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..ff976c728d7d 100644 --- a/sdk/servicelinker/arm-servicelinker/CHANGELOG.md +++ b/sdk/servicelinker/arm-servicelinker/CHANGELOG.md @@ -1,15 +1,22 @@ # Release History + +## 3.0.0 (2024-04-25) + +**Features** -## 2.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Enum KnownClientType has a new value KafkaSpringBoot -### Other Changes +**Breaking Changes** + - Removed operation Linker.beginCreateOrUpdate + - Removed operation Linker.beginCreateOrUpdateAndWait + - Removed operation Linker.beginDelete + - Removed operation Linker.beginDeleteAndWait + - Removed operation Linker.beginUpdate + - Removed operation Linker.beginUpdateAndWait + - Removed operation Linker.get + + ## 2.1.0 (2022-12-16) **Features** @@ -45,4 +52,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..a197242a5454 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": "d48b117e2debb28420f0c237e25a58f8746b63c0", + "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.5", + "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..4a480b0f4089 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": "3.0.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": "^3.0.1", + "typescript": "~5.4.5", "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..dd17001cb9b2 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,41 +180,12 @@ export enum KnownVNetSolutionType { // @public export interface Linker { - 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>>; - beginDeleteAndWait(resourceUri: string, linkerName: string, options?: LinkerDeleteOptionalParams): Promise; - 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; listConfigurations(resourceUri: string, linkerName: string, options?: LinkerListConfigurationsOptionalParams): Promise; } -// @public -export interface LinkerCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type LinkerCreateOrUpdateResponse = LinkerResource; - -// @public -export interface LinkerDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface LinkerGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LinkerGetResponse = LinkerResource; - // @public export interface LinkerList { nextLink?: string; @@ -264,15 +236,6 @@ export interface LinkerResource extends ProxyResource { vNetSolution?: VNetSolution; } -// @public -export interface LinkerUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type LinkerUpdateResponse = LinkerResource; - // @public export interface LinkerValidateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; 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..72a45f8ac1c7 100644 --- a/sdk/servicelinker/arm-servicelinker/src/models/index.ts +++ b/sdk/servicelinker/arm-servicelinker/src/models/index.ts @@ -153,27 +153,6 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } -/** A linker to be updated. */ -export interface LinkerPatch { - /** The target service properties */ - targetService?: TargetServiceBaseUnion; - /** The authentication type. */ - authInfo?: AuthInfoBaseUnion; - /** The application client type */ - clientType?: ClientType; - /** - * The provisioning state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** The VNet solution. */ - vNetSolution?: VNetSolution; - /** An option to store secret value in secure place */ - secretStore?: SecretStore; - /** connection scope in source service. */ - scope?: string; -} - /** The validation operation result for a linker. */ export interface ValidateOperationResult { /** Validated linker id. */ @@ -302,6 +281,27 @@ export interface SecretInfoBase { secretType: "rawValue" | "keyVaultSecretReference" | "keyVaultSecretUri"; } +/** A linker to be updated. */ +export interface LinkerPatch { + /** The target service properties */ + targetService?: TargetServiceBaseUnion; + /** The authentication type. */ + authInfo?: AuthInfoBaseUnion; + /** The application client type */ + clientType?: ClientType; + /** + * The provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** The VNet solution. */ + vNetSolution?: VNetSolution; + /** An option to store secret value in secure place */ + secretStore?: SecretStore; + /** connection scope in source service. */ + scope?: string; +} + /** The azure resource info when target service type is AzureResource */ export interface AzureResource extends TargetServiceBase { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -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", } /** @@ -672,45 +675,6 @@ export interface LinkerListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type LinkerListResponse = LinkerList; -/** Optional parameters. */ -export interface LinkerGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LinkerGetResponse = LinkerResource; - -/** Optional parameters. */ -export interface LinkerCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type LinkerCreateOrUpdateResponse = LinkerResource; - -/** Optional parameters. */ -export interface LinkerDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface LinkerUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type LinkerUpdateResponse = LinkerResource; - /** Optional parameters. */ export interface LinkerValidateOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts b/sdk/servicelinker/arm-servicelinker/src/models/mappers.ts index 606d95ae720c..a55498bc8711 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,76 +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" } } - } - } - } - } -}; - -export const LinkerPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LinkerPatch", - modelProperties: { - targetService: { - serializedName: "properties.targetService", - type: { - name: "Composite", - className: "TargetServiceBase" - } + value: { type: { name: "any" } }, + }, }, - authInfo: { - serializedName: "properties.authInfo", - type: { - name: "Composite", - className: "AuthInfoBase" - } - }, - clientType: { - serializedName: "properties.clientType", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - vNetSolution: { - serializedName: "properties.vNetSolution", - type: { - name: "Composite", - className: "VNetSolution" - } - }, - secretStore: { - serializedName: "properties.secretStore", - type: { - name: "Composite", - className: "SecretStore" - } - }, - scope: { - serializedName: "properties.scope", - nullable: true, - type: { - name: "String" - } - } - } - } + }, + }, }; export const ValidateOperationResult: coreClient.CompositeMapper = { @@ -347,64 +290,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 +357,13 @@ export const ValidateOperationResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ValidationResultItem" - } - } - } - } - } - } + className: "ValidationResultItem", + }, + }, + }, + }, + }, + }, }; export const ValidationResultItem: coreClient.CompositeMapper = { @@ -431,39 +374,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 +421,13 @@ export const SourceConfigurationResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SourceConfiguration" - } - } - } - } - } - } + className: "SourceConfiguration", + }, + }, + }, + }, + }, + }, }; export const SourceConfiguration: coreClient.CompositeMapper = { @@ -495,18 +438,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 +465,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 +490,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 +534,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 +569,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 +590,75 @@ 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 LinkerPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LinkerPatch", + modelProperties: { + targetService: { + serializedName: "properties.targetService", + type: { + name: "Composite", + className: "TargetServiceBase", + }, + }, + authInfo: { + serializedName: "properties.authInfo", + type: { + name: "Composite", + className: "AuthInfoBase", + }, + }, + clientType: { + serializedName: "properties.clientType", + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + vNetSolution: { + serializedName: "properties.vNetSolution", + type: { + name: "Composite", + className: "VNetSolution", + }, + }, + secretStore: { + serializedName: "properties.secretStore", + type: { + name: "Composite", + className: "SecretStore", + }, + }, + scope: { + serializedName: "properties.scope", + nullable: true, + type: { + 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..81fc4c1ad9f6 100644 --- a/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts +++ b/sdk/servicelinker/arm-servicelinker/src/models/parameters.ts @@ -9,12 +9,8 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; -import { - LinkerResource as LinkerResourceMapper, - LinkerPatch as LinkerPatchMapper -} from "../models/mappers"; export const accept: OperationParameter = { parameterPath: "accept", @@ -23,9 +19,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -34,10 +30,10 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const resourceUri: OperationURLParameter = { @@ -46,10 +42,10 @@ export const resourceUri: OperationURLParameter = { serializedName: "resourceUri", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const apiVersion: OperationQueryParameter = { @@ -59,9 +55,9 @@ export const apiVersion: OperationQueryParameter = { isConstant: true, serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const linkerName: OperationURLParameter = { @@ -70,31 +66,9 @@ export const linkerName: OperationURLParameter = { serializedName: "linkerName", required: true, type: { - name: "String" - } - } -}; - -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String" - } - } -}; - -export const parameters: OperationParameter = { - parameterPath: "parameters", - mapper: LinkerResourceMapper -}; - -export const parameters1: OperationParameter = { - parameterPath: "parameters", - mapper: LinkerPatchMapper + name: "String", + }, + }, }; export const nextLink: OperationURLParameter = { @@ -103,8 +77,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..37c07f35b84a 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operations/linker.ts @@ -13,26 +13,22 @@ 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, LinkerListOptionalParams, LinkerListResponse, - LinkerGetOptionalParams, - LinkerGetResponse, - LinkerCreateOrUpdateOptionalParams, - LinkerCreateOrUpdateResponse, - LinkerDeleteOptionalParams, - LinkerPatch, - LinkerUpdateOptionalParams, - LinkerUpdateResponse, LinkerValidateOptionalParams, LinkerValidateResponse, LinkerListConfigurationsOptionalParams, LinkerListConfigurationsResponse, - LinkerListNextResponse + LinkerListNextResponse, } from "../models"; /// @@ -56,7 +52,7 @@ export class LinkerImpl implements Linker { */ public list( resourceUri: string, - options?: LinkerListOptionalParams + options?: LinkerListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(resourceUri, options); return { @@ -71,14 +67,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 +96,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,300 +111,14 @@ export class LinkerImpl implements Linker { */ private _list( resourceUri: string, - options?: LinkerListOptionalParams + options?: LinkerListOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceUri, options }, - listOperationSpec - ); - } - - /** - * Returns Linker resource for a given name. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - get( - resourceUri: string, - linkerName: string, - options?: LinkerGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceUri, linkerName, options }, - getOperationSpec + listOperationSpec, ); } - /** - * Create or update linker resource. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceUri: string, - linkerName: string, - parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - LinkerCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, parameters, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Create or update linker resource. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceUri: string, - linkerName: string, - parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceUri, - linkerName, - parameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * Delete a link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - async beginDelete( - resourceUri: string, - linkerName: string, - options?: LinkerDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Delete a link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceUri: string, - linkerName: string, - options?: LinkerDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete(resourceUri, linkerName, options); - return poller.pollUntilDone(); - } - - /** - * Operation to update an existing link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - async beginUpdate( - resourceUri: string, - linkerName: string, - parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams - ): Promise< - PollerLike, LinkerUpdateResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceUri, linkerName, parameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Operation to update an existing link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceUri: string, - linkerName: string, - parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceUri, - linkerName, - parameters, - options - ); - return poller.pollUntilDone(); - } - /** * Validate a link. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be @@ -419,30 +129,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 +160,8 @@ export class LinkerImpl implements Linker { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -460,20 +169,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 +201,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 +217,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 +235,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,187 +251,82 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.LinkerList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.resourceUri], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.LinkerList, }, default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.linkerName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.LinkerResource - }, - 201: { - bodyMapper: Mappers.LinkerResource - }, - 202: { - bodyMapper: Mappers.LinkerResource - }, - 204: { - bodyMapper: Mappers.LinkerResource + bodyMapper: Mappers.ErrorResponse, }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.linkerName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - Parameters.linkerName - ], + urlParameters: [Parameters.$host, Parameters.resourceUri], headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.LinkerResource - }, - 201: { - bodyMapper: Mappers.LinkerResource - }, - 202: { - bodyMapper: Mappers.LinkerResource - }, - 204: { - bodyMapper: Mappers.LinkerResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceUri, - 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..d0b4ac5b2c5a 100644 --- a/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts +++ b/sdk/servicelinker/arm-servicelinker/src/operationsInterfaces/linker.ts @@ -7,22 +7,14 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { LinkerResource, LinkerListOptionalParams, - LinkerGetOptionalParams, - LinkerGetResponse, - LinkerCreateOrUpdateOptionalParams, - LinkerCreateOrUpdateResponse, - LinkerDeleteOptionalParams, - LinkerPatch, - LinkerUpdateOptionalParams, - LinkerUpdateResponse, LinkerValidateOptionalParams, LinkerValidateResponse, LinkerListConfigurationsOptionalParams, - LinkerListConfigurationsResponse + LinkerListConfigurationsResponse, } from "../models"; /// @@ -36,107 +28,8 @@ export interface Linker { */ list( resourceUri: string, - options?: LinkerListOptionalParams + options?: LinkerListOptionalParams, ): PagedAsyncIterableIterator; - /** - * Returns Linker resource for a given name. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - get( - resourceUri: string, - linkerName: string, - options?: LinkerGetOptionalParams - ): Promise; - /** - * Create or update linker resource. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceUri: string, - linkerName: string, - parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - LinkerCreateOrUpdateResponse - > - >; - /** - * Create or update linker resource. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceUri: string, - linkerName: string, - parameters: LinkerResource, - options?: LinkerCreateOrUpdateOptionalParams - ): Promise; - /** - * Delete a link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - beginDelete( - resourceUri: string, - linkerName: string, - options?: LinkerDeleteOptionalParams - ): Promise, void>>; - /** - * Delete a link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceUri: string, - linkerName: string, - options?: LinkerDeleteOptionalParams - ): Promise; - /** - * Operation to update an existing link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - beginUpdate( - resourceUri: string, - linkerName: string, - parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams - ): Promise< - PollerLike, LinkerUpdateResponse> - >; - /** - * Operation to update an existing link. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be - * connected. - * @param linkerName The name Linker resource. - * @param parameters Linker details. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceUri: string, - linkerName: string, - parameters: LinkerPatch, - options?: LinkerUpdateOptionalParams - ): Promise; /** * Validate a link. * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be @@ -147,10 +40,10 @@ export interface Linker { beginValidate( resourceUri: string, linkerName: string, - options?: LinkerValidateOptionalParams + options?: LinkerValidateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, LinkerValidateResponse > >; @@ -164,7 +57,7 @@ export interface Linker { beginValidateAndWait( resourceUri: string, linkerName: string, - options?: LinkerValidateOptionalParams + options?: LinkerValidateOptionalParams, ): Promise; /** * list source configurations for a linker. @@ -176,6 +69,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..45af5c16806d 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/3.0.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,9 +88,9 @@ export class ServiceLinkerManagementClient extends coreClient.ServiceClient { `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } @@ -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"