From 8b7cbbc56bfd8edd5f3a013c575a7c3ae3241dbe Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 8 May 2024 17:11:52 +0000 Subject: [PATCH] CodeGen from PR 28933 in Azure/azure-rest-api-specs Merge c561c0f6f587337260e7f6d474adb1dc84c276bc into 4567a944c54f59a27ddac8b7d27aa9c93e37cc2a --- common/config/rush/pnpm-lock.yaml | 90 ++- rush.json | 9 +- sdk/verifiedid/arm-verifiedid/CHANGELOG.md | 5 + sdk/verifiedid/arm-verifiedid/LICENSE | 21 + sdk/verifiedid/arm-verifiedid/README.md | 109 ++++ sdk/verifiedid/arm-verifiedid/_meta.json | 8 + .../arm-verifiedid/api-extractor.json | 31 + sdk/verifiedid/arm-verifiedid/package.json | 110 ++++ .../review/arm-verifiedid.api.md | 268 +++++++++ sdk/verifiedid/arm-verifiedid/sample.env | 4 + sdk/verifiedid/arm-verifiedid/src/index.ts | 13 + sdk/verifiedid/arm-verifiedid/src/lroImpl.ts | 42 ++ .../arm-verifiedid/src/models/index.ts | 390 ++++++++++++ .../arm-verifiedid/src/models/mappers.ts | 397 +++++++++++++ .../arm-verifiedid/src/models/parameters.ts | 129 ++++ .../src/operations/authorities.ts | 559 ++++++++++++++++++ .../arm-verifiedid/src/operations/index.ts | 10 + .../src/operations/operations.ts | 149 +++++ .../src/operationsInterfaces/authorities.ts | 110 ++++ .../src/operationsInterfaces/index.ts | 10 + .../src/operationsInterfaces/operations.ts | 22 + .../arm-verifiedid/src/pagingHelper.ts | 39 ++ .../src/verifiedIdMgmtClient.ts | 143 +++++ .../arm-verifiedid/test/sampleTest.ts | 43 ++ sdk/verifiedid/arm-verifiedid/tsconfig.json | 27 + sdk/verifiedid/ci.mgmt.yml | 38 ++ 26 files changed, 2746 insertions(+), 30 deletions(-) create mode 100644 sdk/verifiedid/arm-verifiedid/CHANGELOG.md create mode 100644 sdk/verifiedid/arm-verifiedid/LICENSE create mode 100644 sdk/verifiedid/arm-verifiedid/README.md create mode 100644 sdk/verifiedid/arm-verifiedid/_meta.json create mode 100644 sdk/verifiedid/arm-verifiedid/api-extractor.json create mode 100644 sdk/verifiedid/arm-verifiedid/package.json create mode 100644 sdk/verifiedid/arm-verifiedid/review/arm-verifiedid.api.md create mode 100644 sdk/verifiedid/arm-verifiedid/sample.env create mode 100644 sdk/verifiedid/arm-verifiedid/src/index.ts create mode 100644 sdk/verifiedid/arm-verifiedid/src/lroImpl.ts create mode 100644 sdk/verifiedid/arm-verifiedid/src/models/index.ts create mode 100644 sdk/verifiedid/arm-verifiedid/src/models/mappers.ts create mode 100644 sdk/verifiedid/arm-verifiedid/src/models/parameters.ts create mode 100644 sdk/verifiedid/arm-verifiedid/src/operations/authorities.ts create mode 100644 sdk/verifiedid/arm-verifiedid/src/operations/index.ts create mode 100644 sdk/verifiedid/arm-verifiedid/src/operations/operations.ts create mode 100644 sdk/verifiedid/arm-verifiedid/src/operationsInterfaces/authorities.ts create mode 100644 sdk/verifiedid/arm-verifiedid/src/operationsInterfaces/index.ts create mode 100644 sdk/verifiedid/arm-verifiedid/src/operationsInterfaces/operations.ts create mode 100644 sdk/verifiedid/arm-verifiedid/src/pagingHelper.ts create mode 100644 sdk/verifiedid/arm-verifiedid/src/verifiedIdMgmtClient.ts create mode 100644 sdk/verifiedid/arm-verifiedid/test/sampleTest.ts create mode 100644 sdk/verifiedid/arm-verifiedid/tsconfig.json create mode 100644 sdk/verifiedid/ci.mgmt.yml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9670f5475e91..75726f0473c2 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -725,6 +725,9 @@ dependencies: '@rush-temp/arm-trafficmanager': specifier: file:./projects/arm-trafficmanager.tgz version: file:projects/arm-trafficmanager.tgz + '@rush-temp/arm-verifiedid': + specifier: file:./projects/arm-verifiedid.tgz + version: file:projects/arm-verifiedid.tgz '@rush-temp/arm-visualstudio': specifier: file:./projects/arm-visualstudio.tgz version: file:projects/arm-visualstudio.tgz @@ -1375,7 +1378,7 @@ packages: '@azure/core-auth': 1.7.2 '@azure/core-tracing': 1.0.0-preview.13 '@azure/core-util': 1.9.0 - '@azure/logger': 1.0.4 + '@azure/logger': 1.1.2 '@types/node-fetch': 2.6.11 '@types/tunnel': 0.0.3 form-data: 4.0.0 @@ -3307,13 +3310,13 @@ packages: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} dependencies: '@types/connect': 3.4.38 - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/bunyan@1.8.9: resolution: {integrity: sha512-ZqS9JGpBxVOvsawzmVt30sP++gSQMTejCkIAQ3VdadOcRE8izTyW66hufvwLeH+YEGP6Js2AW7Gz+RMyvrEbmw==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/chai-as-promised@7.1.8: @@ -3335,7 +3338,7 @@ packages: /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/cookie@0.4.1: @@ -3345,7 +3348,7 @@ packages: /@types/cors@2.8.17: resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/debug@4.1.12: @@ -3357,7 +3360,7 @@ packages: /@types/decompress@4.2.7: resolution: {integrity: sha512-9z+8yjKr5Wn73Pt17/ldnmQToaFHZxK0N1GHysuk/JIPT8RIdQeoInM01wWPgypRcvb6VH1drjuFpQ4zmY437g==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/eslint@8.44.9: @@ -3374,7 +3377,7 @@ packages: /@types/express-serve-static-core@4.19.0: resolution: {integrity: sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 '@types/qs': 6.9.15 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -3393,19 +3396,19 @@ packages: resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/fs-extra@8.1.5: resolution: {integrity: sha512-0dzKcwO+S8s2kuF5Z9oUWatQJj5Uq/iqphEtE3GQJVRRYm/tD1LglU2UnXi2A8jLq5umkGouOXOR9y0n613ZwQ==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/fs-extra@9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/http-errors@2.0.4: @@ -3422,7 +3425,7 @@ packages: /@types/is-buffer@2.0.2: resolution: {integrity: sha512-G6OXy83Va+xEo8XgqAJYOuvOMxeey9xM5XKkvwJNmN8rVdcB+r15HvHsG86hl86JvU0y1aa7Z2ERkNFYWw9ySg==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/json-schema@7.0.15: @@ -3436,19 +3439,19 @@ packages: /@types/jsonfile@6.1.4: resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/jsonwebtoken@9.0.6: resolution: {integrity: sha512-/5hndP5dCjloafCXns6SZyESp3Ldq7YjH3zwzwczYnjxIT0Fqzk5ROSYVGfFyczIue7IUEj8hkvLbPoLQ18vQw==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/jws@3.2.10: resolution: {integrity: sha512-cOevhttJmssERB88/+XvZXvsq5m9JLKZNUiGfgjUb5lcPRdV2ZQciU6dU76D/qXXFYpSqkP3PrSg4hMTiafTZw==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/linkify-it@5.0.0: @@ -3495,13 +3498,13 @@ packages: /@types/mysql@2.15.22: resolution: {integrity: sha512-wK1pzsJVVAjYCSZWQoWHziQZbNggXFDUEIGf54g4ZM/ERuP86uGdWeKZWMYlqTPMZfHJJvLPyogXGvCOg87yLQ==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/node-fetch@2.6.11: resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 form-data: 4.0.0 dev: false @@ -3530,7 +3533,7 @@ packages: /@types/pg@8.6.1: resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 pg-protocol: 1.6.1 pg-types: 2.2.0 dev: false @@ -3550,7 +3553,7 @@ packages: /@types/readdir-glob@1.1.5: resolution: {integrity: sha512-raiuEPUYqXu+nvtY2Pe8s8FEmZ3x5yAH4VkLdihcPdalvsHltomrRC9BzuStrJ9yk06470hS0Crw0f1pXqD+Hg==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/resolve@1.20.2: @@ -3569,14 +3572,14 @@ packages: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} dependencies: '@types/mime': 1.3.5 - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/serve-static@1.15.7: resolution: {integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==} dependencies: '@types/http-errors': 2.0.4 - '@types/node': 18.19.32 + '@types/node': 20.10.8 '@types/send': 0.17.4 dev: false @@ -3597,13 +3600,13 @@ packages: /@types/stoppable@1.1.3: resolution: {integrity: sha512-7wGKIBJGE4ZxFjk9NkjAxZMLlIXroETqP1FJCdoSvKmEznwmBxQFmTB1dsCkAvVcNemuSZM5qkkd9HE/NL2JTw==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/through@0.0.33: resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/triple-beam@1.3.5: @@ -3617,7 +3620,7 @@ packages: /@types/tunnel@0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/underscore@1.11.15: @@ -3635,13 +3638,13 @@ packages: /@types/ws@7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/ws@8.5.10: resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false /@types/yargs-parser@21.0.3: @@ -3658,7 +3661,7 @@ packages: resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} requiresBuild: true dependencies: - '@types/node': 18.19.32 + '@types/node': 20.10.8 dev: false optional: true @@ -5193,7 +5196,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.17 - '@types/node': 18.19.32 + '@types/node': 20.10.8 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -8499,7 +8502,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 18.19.32 + '@types/node': 20.10.8 long: 5.2.3 dev: false @@ -17919,6 +17922,37 @@ packages: - supports-color dev: false + file:projects/arm-verifiedid.tgz: + resolution: {integrity: sha512-HrN2xT2OPg12Xi4Z5CgH42UOlfS2OjDsThstvRd/BJnqVpneS4X1zeDze/pKAPszcaPYEJkfuoWNX4mEliw9mg==, tarball: file:projects/arm-verifiedid.tgz} + name: '@rush-temp/arm-verifiedid' + version: 0.0.0 + dependencies: + '@azure-tools/test-credential': 1.0.4 + '@azure-tools/test-recorder': 3.2.0 + '@azure/abort-controller': 1.1.0 + '@azure/core-lro': 2.7.2 + '@azure/identity': 4.2.0 + '@microsoft/api-extractor': 7.43.2(@types/node@18.19.32) + '@types/chai': 4.3.16 + '@types/mocha': 10.0.6 + '@types/node': 18.19.32 + chai: 4.3.10 + cross-env: 7.0.3 + dotenv: 16.4.5 + mkdirp: 3.0.1 + mocha: 10.4.0 + rimraf: 5.0.5 + ts-node: 10.9.2(@types/node@18.19.32)(typescript@5.4.5) + tslib: 2.6.2 + tsx: 4.9.3 + typescript: 5.4.5 + uglify-js: 3.17.4 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + - supports-color + dev: false + file:projects/arm-visualstudio.tgz: resolution: {integrity: sha512-mRbTbNgi2nXKcvTqwmZzGUFZRhdZO/wvEWitn+qNa5AKo004pW4lFcStP/0wNAWbU9FxOz2/19HJcJAU7JN73g==, tarball: file:projects/arm-visualstudio.tgz} name: '@rush-temp/arm-visualstudio' diff --git a/rush.json b/rush.json index 2eeacc4addb2..1bb604294854 100644 --- a/rush.json +++ b/rush.json @@ -1,7 +1,7 @@ /** * This is the main configuration file for Rush. * For full documentation, please see https://rushjs.io - */ { + */{ "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", /** * (Required) This specifies the version of the Rush engine to be used in this repo. @@ -2197,6 +2197,11 @@ "packageName": "@azure/arm-standbypool", "projectFolder": "sdk/standbypool/arm-standbypool", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-verifiedid", + "projectFolder": "sdk/verifiedid/arm-verifiedid", + "versionPolicyName": "management" } ] -} +} \ No newline at end of file diff --git a/sdk/verifiedid/arm-verifiedid/CHANGELOG.md b/sdk/verifiedid/arm-verifiedid/CHANGELOG.md new file mode 100644 index 000000000000..0b82f5fa8818 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2024-05-08) + +The package of @azure/arm-verifiedid is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/verifiedid/arm-verifiedid/LICENSE b/sdk/verifiedid/arm-verifiedid/LICENSE new file mode 100644 index 000000000000..7d5934740965 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/verifiedid/arm-verifiedid/README.md b/sdk/verifiedid/arm-verifiedid/README.md new file mode 100644 index 000000000000..b1fac4095f06 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/README.md @@ -0,0 +1,109 @@ +# Azure VerifiedIdMgmt client library for JavaScript + +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure VerifiedIdMgmt client. + +VerifiedId Resource Provider management API. + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/verifiedid/arm-verifiedid) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-verifiedid) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-verifiedid?view=azure-node-preview) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started + +### Currently supported environments + +- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- Latest versions of Safari, Chrome, Edge and Firefox. + +See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. + +### Prerequisites + +- An [Azure subscription][azure_sub]. + +### Install the `@azure/arm-verifiedid` package + +Install the Azure VerifiedIdMgmt client library for JavaScript with `npm`: + +```bash +npm install @azure/arm-verifiedid +``` + +### Create and authenticate a `VerifiedIdMgmtClient` + +To create a client object to access the Azure VerifiedIdMgmt API, you will need the `endpoint` of your Azure VerifiedIdMgmt resource and a `credential`. The Azure VerifiedIdMgmt client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure VerifiedIdMgmt resource in the [Azure Portal][azure_portal]. + +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). + +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: + +```bash +npm install @azure/identity +``` + +You will also need to **register a new AAD application and grant access to Azure VerifiedIdMgmt** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. + +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). + +```javascript +const { VerifiedIdMgmtClient } = require("@azure/arm-verifiedid"); +const { DefaultAzureCredential } = require("@azure/identity"); +// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. + +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new VerifiedIdMgmtClient(new DefaultAzureCredential(), subscriptionId); + +// For client-side applications running in the browser, use this code instead: +// const credential = new InteractiveBrowserCredential({ +// tenantId: "", +// clientId: "" +// }); +// const client = new VerifiedIdMgmtClient(credential, subscriptionId); +``` + + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### VerifiedIdMgmtClient + +`VerifiedIdMgmtClient` is the primary interface for developers using the Azure VerifiedIdMgmt client library. Explore the methods on this client object to understand the different features of the Azure VerifiedIdMgmt service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); +``` + +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + +## Related projects + +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fverifiedid%2Farm-verifiedid%2FREADME.png) + +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/verifiedid/arm-verifiedid/_meta.json b/sdk/verifiedid/arm-verifiedid/_meta.json new file mode 100644 index 000000000000..10715433d440 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/_meta.json @@ -0,0 +1,8 @@ +{ + "commit": "0f51d80f6978e5168b96af577650f6075a13e4be", + "readme": "specification/verifiedid/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/verifiedid/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.8", + "use": "@autorest/typescript@^6.0.12" +} \ No newline at end of file diff --git a/sdk/verifiedid/arm-verifiedid/api-extractor.json b/sdk/verifiedid/arm-verifiedid/api-extractor.json new file mode 100644 index 000000000000..0c4eb7830652 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-verifiedid.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/sdk/verifiedid/arm-verifiedid/package.json b/sdk/verifiedid/arm-verifiedid/package.json new file mode 100644 index 000000000000..0cbbbe7c2025 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/package.json @@ -0,0 +1,110 @@ +{ + "name": "@azure/arm-verifiedid", + "sdk-type": "mgmt", + "author": "Microsoft Corporation", + "description": "A generated SDK for VerifiedIdMgmtClient.", + "version": "1.0.0-beta.1", + "engines": { + "node": ">=18.0.0" + }, + "dependencies": { + "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.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": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-verifiedid.d.ts", + "devDependencies": { + "@microsoft/api-extractor": "^7.31.1", + "mkdirp": "^3.0.1", + "typescript": "~5.4.5", + "uglify-js": "^3.4.9", + "rimraf": "^5.0.0", + "dotenv": "^16.0.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", + "tsx": "^4.7.1", + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "src/**/*.ts", + "README.md", + "LICENSE", + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" + ], + "scripts": { + "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "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", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" + }, + "sideEffects": false, + "//metadata": { + "constantPaths": [ + { + "path": "src/verifiedIdMgmtClient.ts", + "prefix": "packageDetails" + } + ] + }, + "autoPublish": true, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/verifiedid/arm-verifiedid" +} \ No newline at end of file diff --git a/sdk/verifiedid/arm-verifiedid/review/arm-verifiedid.api.md b/sdk/verifiedid/arm-verifiedid/review/arm-verifiedid.api.md new file mode 100644 index 000000000000..5792f20e05bc --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/review/arm-verifiedid.api.md @@ -0,0 +1,268 @@ +## API Report File for "@azure/arm-verifiedid" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +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 { SimplePollerLike } from '@azure/core-lro'; + +// @public +export type ActionType = string; + +// @public +export interface Authorities { + beginCreateOrUpdate(resourceGroupName: string, name: string, resource: Authority, options?: AuthoritiesCreateOrUpdateOptionalParams): Promise, AuthoritiesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, name: string, resource: Authority, options?: AuthoritiesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, name: string, options?: AuthoritiesDeleteOptionalParams): Promise; + get(resourceGroupName: string, name: string, options?: AuthoritiesGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: AuthoritiesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: AuthoritiesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, name: string, properties: AuthorityUpdate, options?: AuthoritiesUpdateOptionalParams): Promise; +} + +// @public +export interface AuthoritiesCreateOrUpdateHeaders { + retryAfter?: number; +} + +// @public +export interface AuthoritiesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type AuthoritiesCreateOrUpdateResponse = Authority; + +// @public +export interface AuthoritiesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface AuthoritiesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AuthoritiesGetResponse = Authority; + +// @public +export interface AuthoritiesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AuthoritiesListByResourceGroupNextResponse = AuthorityListResult; + +// @public +export interface AuthoritiesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AuthoritiesListByResourceGroupResponse = AuthorityListResult; + +// @public +export interface AuthoritiesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AuthoritiesListBySubscriptionNextResponse = AuthorityListResult; + +// @public +export interface AuthoritiesListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AuthoritiesListBySubscriptionResponse = AuthorityListResult; + +// @public +export interface AuthoritiesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AuthoritiesUpdateResponse = Authority; + +// @public +export interface Authority extends TrackedResource { + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface AuthorityListResult { + nextLink?: string; + value: Authority[]; +} + +// @public +export interface AuthorityUpdate { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type CreatedByType = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + +// @public +export function getContinuationToken(page: unknown): string | undefined; + +// @public +export enum KnownActionType { + Internal = "Internal" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + +// @public +export enum KnownOrigin { + System = "system", + User = "user", + UserSystem = "user,system" +} + +// @public +export enum KnownProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Provisioning = "Provisioning", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownVersions { + V20240126Preview = "2024-01-26-preview" +} + +// @public +export interface Operation { + readonly actionType?: ActionType; + display?: OperationDisplay; + readonly isDataAction?: boolean; + readonly name?: string; + readonly origin?: Origin; +} + +// @public +export interface OperationDisplay { + readonly description?: string; + readonly operation?: string; + readonly provider?: string; + readonly resource?: string; +} + +// @public +export interface OperationListResult { + readonly nextLink?: string; + readonly value?: Operation[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationListResult; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationListResult; + +// @public +export type Origin = string; + +// @public +export type ProvisioningState = string; + +// @public +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + +// @public (undocumented) +export class VerifiedIdMgmtClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: VerifiedIdMgmtClientOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + authorities: Authorities; + // (undocumented) + operations: Operations; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface VerifiedIdMgmtClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export type Versions = string; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/verifiedid/arm-verifiedid/sample.env b/sdk/verifiedid/arm-verifiedid/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/verifiedid/arm-verifiedid/src/index.ts b/sdk/verifiedid/arm-verifiedid/src/index.ts new file mode 100644 index 000000000000..05a168f98e02 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +/// +export { getContinuationToken } from "./pagingHelper"; +export * from "./models"; +export { VerifiedIdMgmtClient } from "./verifiedIdMgmtClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/verifiedid/arm-verifiedid/src/lroImpl.ts b/sdk/verifiedid/arm-verifiedid/src/lroImpl.ts new file mode 100644 index 000000000000..b27f5ac7209b --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/lroImpl.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +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/verifiedid/arm-verifiedid/src/models/index.ts b/sdk/verifiedid/arm-verifiedid/src/models/index.ts new file mode 100644 index 000000000000..692eacbf1d94 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/models/index.ts @@ -0,0 +1,390 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ +export interface OperationListResult { + /** + * List of operations supported by the resource provider + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Details of a REST API operation, returned from the Resource Provider Operations API */ +export interface Operation { + /** + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDataAction?: boolean; + /** Localized display information for this particular operation. */ + display?: OperationDisplay; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionType?: ActionType; +} + +/** Localized display information for this particular operation. */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** The response of a Authority list operation. */ +export interface AuthorityListResult { + /** The Authority items on this page */ + value: Authority[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** The type used for update operations of the Authority. */ +export interface AuthorityUpdate { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + +/** A VerifiedId authority resource */ +export interface Authority extends TrackedResource { + /** + * The status of the last operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Defines headers for Authorities_createOrUpdate operation. */ +export interface AuthoritiesCreateOrUpdateHeaders { + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + retryAfter?: number; +} + +/** Known values of {@link Origin} that the service accepts. */ +export enum KnownOrigin { + /** User */ + User = "user", + /** System */ + System = "system", + /** UserSystem */ + UserSystem = "user,system", +} + +/** + * Defines values for Origin. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **system** \ + * **user,system** + */ +export type Origin = string; + +/** Known values of {@link ActionType} that the service accepts. */ +export enum KnownActionType { + /** Internal */ + Internal = "Internal", +} + +/** + * Defines values for ActionType. \ + * {@link KnownActionType} can be used interchangeably with ActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Internal** + */ +export type ActionType = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Resource has been created. */ + Succeeded = "Succeeded", + /** Resource creation failed. */ + Failed = "Failed", + /** Resource creation was canceled. */ + Canceled = "Canceled", + /** Initial provisioning in progress */ + Provisioning = "Provisioning", + /** Update in progress */ + Updating = "Updating", + /** Deletion in progress */ + Deleting = "Deleting", + /** Change accepted for processing */ + Accepted = "Accepted", +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Resource has been created. \ + * **Failed**: Resource creation failed. \ + * **Canceled**: Resource creation was canceled. \ + * **Provisioning**: Initial provisioning in progress \ + * **Updating**: Update in progress \ + * **Deleting**: Deletion in progress \ + * **Accepted**: Change accepted for processing + */ +export type ProvisioningState = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key", +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link Versions} that the service accepts. */ +export enum KnownVersions { + /** The 2024-01-26-preview version of the Microsoft.VerifiedId resource provider. */ + V20240126Preview = "2024-01-26-preview", +} + +/** + * Defines values for Versions. \ + * {@link KnownVersions} can be used interchangeably with Versions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **2024-01-26-preview**: The 2024-01-26-preview version of the Microsoft.VerifiedId resource provider. + */ +export type Versions = string; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + +/** Optional parameters. */ +export interface AuthoritiesListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type AuthoritiesListBySubscriptionResponse = AuthorityListResult; + +/** Optional parameters. */ +export interface AuthoritiesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type AuthoritiesListByResourceGroupResponse = AuthorityListResult; + +/** Optional parameters. */ +export interface AuthoritiesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AuthoritiesGetResponse = Authority; + +/** Optional parameters. */ +export interface AuthoritiesCreateOrUpdateOptionalParams + 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 AuthoritiesCreateOrUpdateResponse = Authority; + +/** Optional parameters. */ +export interface AuthoritiesUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type AuthoritiesUpdateResponse = Authority; + +/** Optional parameters. */ +export interface AuthoritiesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface AuthoritiesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type AuthoritiesListBySubscriptionNextResponse = AuthorityListResult; + +/** Optional parameters. */ +export interface AuthoritiesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type AuthoritiesListByResourceGroupNextResponse = AuthorityListResult; + +/** Optional parameters. */ +export interface VerifiedIdMgmtClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/verifiedid/arm-verifiedid/src/models/mappers.ts b/sdk/verifiedid/arm-verifiedid/src/models/mappers.ts new file mode 100644 index 000000000000..c2eb03b72f24 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/models/mappers.ts @@ -0,0 +1,397 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + isDataAction: { + serializedName: "isDataAction", + readOnly: true, + type: { + name: "Boolean", + }, + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay", + }, + }, + origin: { + serializedName: "origin", + readOnly: true, + type: { + name: "String", + }, + }, + actionType: { + serializedName: "actionType", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + readOnly: true, + type: { + name: "String", + }, + }, + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String", + }, + }, + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + }, + }, +}; + +export const AuthorityListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthorityListResult", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Authority", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + }, + }, +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String", + }, + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String", + }, + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime", + }, + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String", + }, + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String", + }, + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime", + }, + }, + }, + }, +}; + +export const AuthorityUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthorityUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const Authority: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Authority", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const AuthoritiesCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthoritiesCreateOrUpdateHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, +}; diff --git a/sdk/verifiedid/arm-verifiedid/src/models/parameters.ts b/sdk/verifiedid/arm-verifiedid/src/models/parameters.ts new file mode 100644 index 000000000000..76af6b8d29a0 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/models/parameters.ts @@ -0,0 +1,129 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter, +} from "@azure/core-client"; +import { + Authority as AuthorityMapper, + AuthorityUpdate as AuthorityUpdateMapper, +} from "../models/mappers"; + +export const accept: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String", + }, + }, +}; + +export const $host: OperationURLParameter = { + parameterPath: "$host", + mapper: { + serializedName: "$host", + required: true, + type: { + name: "String", + }, + }, + skipEncoding: true, +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2024-01-26-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String", + }, + }, +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String", + }, + }, + skipEncoding: true, +}; + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + serializedName: "subscriptionId", + required: true, + type: { + name: "Uuid", + }, + }, +}; + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1, + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const name: OperationURLParameter = { + parameterPath: "name", + mapper: { + constraints: { + Pattern: new RegExp( + "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", + ), + }, + serializedName: "name", + 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 resource: OperationParameter = { + parameterPath: "resource", + mapper: AuthorityMapper, +}; + +export const properties: OperationParameter = { + parameterPath: "properties", + mapper: AuthorityUpdateMapper, +}; diff --git a/sdk/verifiedid/arm-verifiedid/src/operations/authorities.ts b/sdk/verifiedid/arm-verifiedid/src/operations/authorities.ts new file mode 100644 index 000000000000..9ad4dcfcd34e --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/operations/authorities.ts @@ -0,0 +1,559 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Authorities } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { VerifiedIdMgmtClient } from "../verifiedIdMgmtClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + Authority, + AuthoritiesListBySubscriptionNextOptionalParams, + AuthoritiesListBySubscriptionOptionalParams, + AuthoritiesListBySubscriptionResponse, + AuthoritiesListByResourceGroupNextOptionalParams, + AuthoritiesListByResourceGroupOptionalParams, + AuthoritiesListByResourceGroupResponse, + AuthoritiesGetOptionalParams, + AuthoritiesGetResponse, + AuthoritiesCreateOrUpdateOptionalParams, + AuthoritiesCreateOrUpdateResponse, + AuthorityUpdate, + AuthoritiesUpdateOptionalParams, + AuthoritiesUpdateResponse, + AuthoritiesDeleteOptionalParams, + AuthoritiesListBySubscriptionNextResponse, + AuthoritiesListByResourceGroupNextResponse, +} from "../models"; + +/// +/** Class containing Authorities operations. */ +export class AuthoritiesImpl implements Authorities { + private readonly client: VerifiedIdMgmtClient; + + /** + * Initialize a new instance of the class Authorities class. + * @param client Reference to the service client + */ + constructor(client: VerifiedIdMgmtClient) { + this.client = client; + } + + /** + * List Authority resources by subscription ID + * @param options The options parameters. + */ + public listBySubscription( + options?: AuthoritiesListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + }, + }; + } + + private async *listBySubscriptionPagingPage( + options?: AuthoritiesListBySubscriptionOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: AuthoritiesListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: AuthoritiesListBySubscriptionOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * List Authority resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: AuthoritiesListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings, + ); + }, + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: AuthoritiesListByResourceGroupOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: AuthoritiesListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: AuthoritiesListByResourceGroupOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options, + )) { + yield* page; + } + } + + /** + * List Authority resources by subscription ID + * @param options The options parameters. + */ + private _listBySubscription( + options?: AuthoritiesListBySubscriptionOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec, + ); + } + + /** + * List Authority resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: AuthoritiesListByResourceGroupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec, + ); + } + + /** + * Get a Authority + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name The ID of the authority + * @param options The options parameters. + */ + get( + resourceGroupName: string, + name: string, + options?: AuthoritiesGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, options }, + getOperationSpec, + ); + } + + /** + * Create a Authority + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name The ID of the authority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + name: string, + resource: Authority, + options?: AuthoritiesCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + AuthoritiesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, name, resource, options }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + AuthoritiesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Create a Authority + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name The ID of the authority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + name: string, + resource: Authority, + options?: AuthoritiesCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + name, + resource, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Update a Authority + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name The ID of the authority + * @param properties The resource properties to be updated. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + name: string, + properties: AuthorityUpdate, + options?: AuthoritiesUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, properties, options }, + updateOperationSpec, + ); + } + + /** + * Delete a Authority + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name The ID of the authority + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + name: string, + options?: AuthoritiesDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, options }, + deleteOperationSpec, + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: AuthoritiesListBySubscriptionNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec, + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: AuthoritiesListByResourceGroupNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.VerifiedId/authorities", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorityListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VerifiedId/authorities", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorityListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VerifiedId/authorities/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Authority, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VerifiedId/authorities/{name}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Authority, + }, + 201: { + bodyMapper: Mappers.Authority, + }, + 202: { + bodyMapper: Mappers.Authority, + }, + 204: { + bodyMapper: Mappers.Authority, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.resource, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VerifiedId/authorities/{name}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Authority, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.properties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VerifiedId/authorities/{name}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorityListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AuthorityListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/verifiedid/arm-verifiedid/src/operations/index.ts b/sdk/verifiedid/arm-verifiedid/src/operations/index.ts new file mode 100644 index 000000000000..8cf2c78beb77 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/operations/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./operations"; +export * from "./authorities"; diff --git a/sdk/verifiedid/arm-verifiedid/src/operations/operations.ts b/sdk/verifiedid/arm-verifiedid/src/operations/operations.ts new file mode 100644 index 000000000000..f79f038ddb92 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/operations/operations.ts @@ -0,0 +1,149 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { VerifiedIdMgmtClient } from "../verifiedIdMgmtClient"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse, +} from "../models"; + +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: VerifiedIdMgmtClient; + + /** + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client + */ + constructor(client: VerifiedIdMgmtClient) { + this.client = client; + } + + /** + * List the operations for the provider + * @param options The options parameters. + */ + public list( + options?: OperationsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + }, + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: OperationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * List the operations for the provider + * @param options The options parameters. + */ + private _list( + options?: OperationsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.VerifiedId/operations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OperationListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/verifiedid/arm-verifiedid/src/operationsInterfaces/authorities.ts b/sdk/verifiedid/arm-verifiedid/src/operationsInterfaces/authorities.ts new file mode 100644 index 000000000000..e635ec14b7b8 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/operationsInterfaces/authorities.ts @@ -0,0 +1,110 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + Authority, + AuthoritiesListBySubscriptionOptionalParams, + AuthoritiesListByResourceGroupOptionalParams, + AuthoritiesGetOptionalParams, + AuthoritiesGetResponse, + AuthoritiesCreateOrUpdateOptionalParams, + AuthoritiesCreateOrUpdateResponse, + AuthorityUpdate, + AuthoritiesUpdateOptionalParams, + AuthoritiesUpdateResponse, + AuthoritiesDeleteOptionalParams, +} from "../models"; + +/// +/** Interface representing a Authorities. */ +export interface Authorities { + /** + * List Authority resources by subscription ID + * @param options The options parameters. + */ + listBySubscription( + options?: AuthoritiesListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator; + /** + * List Authority resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: AuthoritiesListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get a Authority + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name The ID of the authority + * @param options The options parameters. + */ + get( + resourceGroupName: string, + name: string, + options?: AuthoritiesGetOptionalParams, + ): Promise; + /** + * Create a Authority + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name The ID of the authority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + name: string, + resource: Authority, + options?: AuthoritiesCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + AuthoritiesCreateOrUpdateResponse + > + >; + /** + * Create a Authority + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name The ID of the authority + * @param resource Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + name: string, + resource: Authority, + options?: AuthoritiesCreateOrUpdateOptionalParams, + ): Promise; + /** + * Update a Authority + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name The ID of the authority + * @param properties The resource properties to be updated. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + name: string, + properties: AuthorityUpdate, + options?: AuthoritiesUpdateOptionalParams, + ): Promise; + /** + * Delete a Authority + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param name The ID of the authority + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + name: string, + options?: AuthoritiesDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/verifiedid/arm-verifiedid/src/operationsInterfaces/index.ts b/sdk/verifiedid/arm-verifiedid/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..8cf2c78beb77 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/operationsInterfaces/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./operations"; +export * from "./authorities"; diff --git a/sdk/verifiedid/arm-verifiedid/src/operationsInterfaces/operations.ts b/sdk/verifiedid/arm-verifiedid/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..251f5f582e64 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * List the operations for the provider + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams, + ): PagedAsyncIterableIterator; +} diff --git a/sdk/verifiedid/arm-verifiedid/src/pagingHelper.ts b/sdk/verifiedid/arm-verifiedid/src/pagingHelper.ts new file mode 100644 index 000000000000..205cccc26592 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/pagingHelper.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export interface PageInfo { + continuationToken?: string; +} + +const pageMap = new WeakMap(); + +/** + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from + * that point later. + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. + */ +export function getContinuationToken(page: unknown): string | undefined { + if (typeof page !== "object" || page === null) { + return undefined; + } + return pageMap.get(page)?.continuationToken; +} + +export function setContinuationToken( + page: unknown, + continuationToken: string | undefined, +): void { + if (typeof page !== "object" || page === null || !continuationToken) { + return; + } + const pageInfo = pageMap.get(page) ?? {}; + pageInfo.continuationToken = continuationToken; + pageMap.set(page, pageInfo); +} diff --git a/sdk/verifiedid/arm-verifiedid/src/verifiedIdMgmtClient.ts b/sdk/verifiedid/arm-verifiedid/src/verifiedIdMgmtClient.ts new file mode 100644 index 000000000000..41ef36b2e02c --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/src/verifiedIdMgmtClient.ts @@ -0,0 +1,143 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import * as coreClient from "@azure/core-client"; +import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest, +} from "@azure/core-rest-pipeline"; +import * as coreAuth from "@azure/core-auth"; +import { OperationsImpl, AuthoritiesImpl } from "./operations"; +import { Operations, Authorities } from "./operationsInterfaces"; +import { VerifiedIdMgmtClientOptionalParams } from "./models"; + +export class VerifiedIdMgmtClient extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: string; + + /** + * Initializes a new instance of the VerifiedIdMgmtClient class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param options The parameter options + */ + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: VerifiedIdMgmtClientOptionalParams, + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: VerifiedIdMgmtClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials, + }; + + const packageDetails = `azsdk-js-arm-verifiedid/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix, + }, + endpoint: + 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(); + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + (pipelinePolicy) => + pipelinePolicy.name === + coreRestPipeline.bearerTokenAuthenticationPolicyName, + ); + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: + optionsWithDefaults.credentialScopes ?? + `${optionsWithDefaults.endpoint}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge, + }, + }), + ); + } + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2024-01-26-preview"; + this.operations = new OperationsImpl(this); + this.authorities = new AuthoritiesImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest, + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + }, + }; + this.pipeline.addPolicy(apiVersionPolicy); + } + + operations: Operations; + authorities: Authorities; +} diff --git a/sdk/verifiedid/arm-verifiedid/test/sampleTest.ts b/sdk/verifiedid/arm-verifiedid/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env, +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/verifiedid/arm-verifiedid/tsconfig.json b/sdk/verifiedid/arm-verifiedid/tsconfig.json new file mode 100644 index 000000000000..3e6ae96443f3 --- /dev/null +++ b/sdk/verifiedid/arm-verifiedid/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es6", + "dom" + ], + "declaration": true, + "outDir": "./dist-esm", + "importHelpers": true + }, + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/verifiedid/ci.mgmt.yml b/sdk/verifiedid/ci.mgmt.yml new file mode 100644 index 000000000000..a9b49e56153d --- /dev/null +++ b/sdk/verifiedid/ci.mgmt.yml @@ -0,0 +1,38 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/verifiedid/arm-verifiedid + - sdk/verifiedid/ci.mgmt.yml + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + exclude: + - feature/v4 + paths: + include: + - sdk/verifiedid/arm-verifiedid + - sdk/verifiedid/ci.mgmt.yml + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: verifiedid + Artifacts: + - name: azure-arm-verifiedid + safeName: azurearmverifiedid + \ No newline at end of file