diff --git a/sdk/reservations/arm-reservations/_meta.json b/sdk/reservations/arm-reservations/_meta.json index 3bea59b8ddad..605038fa42c3 100644 --- a/sdk/reservations/arm-reservations/_meta.json +++ b/sdk/reservations/arm-reservations/_meta.json @@ -1,8 +1,8 @@ { - "commit": "8a9bd9c5b65e5c3e5a8536f3c5b2b15bf9920b5d", + "commit": "07f112576ba8649a4fc6539101ae2f092bf351d1", "readme": "specification/reservations/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\reservations\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/reservations/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220425.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.2", + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" } \ No newline at end of file diff --git a/sdk/reservations/arm-reservations/package.json b/sdk/reservations/arm-reservations/package.json index e5093d043e32..45e5f91243cf 100644 --- a/sdk/reservations/arm-reservations/package.json +++ b/sdk/reservations/arm-reservations/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureReservationAPI.", - "version": "7.1.0", + "version": "7.1.1", "engines": { "node": ">=12.0.0" }, @@ -40,9 +40,11 @@ "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/reservations/arm-reservations", "repository": { @@ -93,7 +95,7 @@ "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": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", "integration-test:browser": "echo skipped", "docs": "echo skipped" }, @@ -106,13 +108,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-reservations?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/reservations/arm-reservations/src/azureReservationAPI.ts b/sdk/reservations/arm-reservations/src/azureReservationAPI.ts index 06dd9cf4db92..9ea20764db40 100644 --- a/sdk/reservations/arm-reservations/src/azureReservationAPI.ts +++ b/sdk/reservations/arm-reservations/src/azureReservationAPI.ts @@ -62,7 +62,7 @@ export class AzureReservationAPI extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-reservations/7.1.0`; + const packageDetails = `azsdk-js-arm-reservations/7.1.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/reservations/arm-reservations/src/models/index.ts b/sdk/reservations/arm-reservations/src/models/index.ts index e8b08f3fba83..45a3f9214762 100644 --- a/sdk/reservations/arm-reservations/src/models/index.ts +++ b/sdk/reservations/arm-reservations/src/models/index.ts @@ -2095,11 +2095,9 @@ export type QuotaRequestStatusGetResponse = QuotaRequestDetails; export interface QuotaRequestStatusListOptionalParams extends coreClient.OperationOptions { /** - * | Field | Supported operators - * |---------------------|------------------------ - * - * |requestSubmitTime | ge, le, eq, gt, lt - * + * | Field | Supported operators | + * |---------------------|------------------------| + * |requestSubmitTime | ge, le, eq, gt, lt | */ filter?: string; /** Number of records to return. */ @@ -2115,11 +2113,9 @@ export type QuotaRequestStatusListResponse = QuotaRequestDetailsList; export interface QuotaRequestStatusListNextOptionalParams extends coreClient.OperationOptions { /** - * | Field | Supported operators - * |---------------------|------------------------ - * - * |requestSubmitTime | ge, le, eq, gt, lt - * + * | Field | Supported operators | + * |---------------------|------------------------| + * |requestSubmitTime | ge, le, eq, gt, lt | */ filter?: string; /** Number of records to return. */ diff --git a/sdk/reservations/arm-reservations/src/operations/quota.ts b/sdk/reservations/arm-reservations/src/operations/quota.ts index ef8cd39a3cc4..ff27b3047014 100644 --- a/sdk/reservations/arm-reservations/src/operations/quota.ts +++ b/sdk/reservations/arm-reservations/src/operations/quota.ts @@ -148,12 +148,9 @@ export class QuotaImpl implements Quota { /** * Create or update the quota (service limits) of a resource to the requested value. * Steps: - * - 1. Make the Get request to get the quota information for specific resource. - * - 2. To increase the quota, update the limit field in the response from Get request to new value. - * - 3. Submit the JSON to the quota request API to update the quota. + * 1. Make the Get request to get the quota information for specific resource. + * 2. To increase the quota, update the limit field in the response from Get request to new value. + * 3. Submit the JSON to the quota request API to update the quota. * The Create quota request may be constructed as follows. The PUT operation can be used to update * the quota. * @param subscriptionId Azure subscription ID. @@ -240,12 +237,9 @@ export class QuotaImpl implements Quota { /** * Create or update the quota (service limits) of a resource to the requested value. * Steps: - * - 1. Make the Get request to get the quota information for specific resource. - * - 2. To increase the quota, update the limit field in the response from Get request to new value. - * - 3. Submit the JSON to the quota request API to update the quota. + * 1. Make the Get request to get the quota information for specific resource. + * 2. To increase the quota, update the limit field in the response from Get request to new value. + * 3. Submit the JSON to the quota request API to update the quota. * The Create quota request may be constructed as follows. The PUT operation can be used to update * the quota. * @param subscriptionId Azure subscription ID. @@ -277,12 +271,9 @@ export class QuotaImpl implements Quota { /** * Update the quota (service limits) of this resource to the requested value. - * - • To get the quota information for specific resource, send a GET request. - * - • To increase the quota, update the limit field from the GET response to a new value. - * - • To update the quota value, submit the JSON response to the quota request API to update the + * • To get the quota information for specific resource, send a GET request. + * • To increase the quota, update the limit field from the GET response to a new value. + * • To update the quota value, submit the JSON response to the quota request API to update the * quota. * • To update the quota. use the PATCH operation. * @param subscriptionId Azure subscription ID. @@ -365,12 +356,9 @@ export class QuotaImpl implements Quota { /** * Update the quota (service limits) of this resource to the requested value. - * - • To get the quota information for specific resource, send a GET request. - * - • To increase the quota, update the limit field from the GET response to a new value. - * - • To update the quota value, submit the JSON response to the quota request API to update the + * • To get the quota information for specific resource, send a GET request. + * • To increase the quota, update the limit field from the GET response to a new value. + * • To update the quota value, submit the JSON response to the quota request API to update the * quota. * • To update the quota. use the PATCH operation. * @param subscriptionId Azure subscription ID. diff --git a/sdk/reservations/arm-reservations/src/operationsInterfaces/quota.ts b/sdk/reservations/arm-reservations/src/operationsInterfaces/quota.ts index 350994eb4e36..6d573e774586 100644 --- a/sdk/reservations/arm-reservations/src/operationsInterfaces/quota.ts +++ b/sdk/reservations/arm-reservations/src/operationsInterfaces/quota.ts @@ -56,12 +56,9 @@ export interface Quota { /** * Create or update the quota (service limits) of a resource to the requested value. * Steps: - * - 1. Make the Get request to get the quota information for specific resource. - * - 2. To increase the quota, update the limit field in the response from Get request to new value. - * - 3. Submit the JSON to the quota request API to update the quota. + * 1. Make the Get request to get the quota information for specific resource. + * 2. To increase the quota, update the limit field in the response from Get request to new value. + * 3. Submit the JSON to the quota request API to update the quota. * The Create quota request may be constructed as follows. The PUT operation can be used to update * the quota. * @param subscriptionId Azure subscription ID. @@ -88,12 +85,9 @@ export interface Quota { /** * Create or update the quota (service limits) of a resource to the requested value. * Steps: - * - 1. Make the Get request to get the quota information for specific resource. - * - 2. To increase the quota, update the limit field in the response from Get request to new value. - * - 3. Submit the JSON to the quota request API to update the quota. + * 1. Make the Get request to get the quota information for specific resource. + * 2. To increase the quota, update the limit field in the response from Get request to new value. + * 3. Submit the JSON to the quota request API to update the quota. * The Create quota request may be constructed as follows. The PUT operation can be used to update * the quota. * @param subscriptionId Azure subscription ID. @@ -114,12 +108,9 @@ export interface Quota { ): Promise; /** * Update the quota (service limits) of this resource to the requested value. - * - • To get the quota information for specific resource, send a GET request. - * - • To increase the quota, update the limit field from the GET response to a new value. - * - • To update the quota value, submit the JSON response to the quota request API to update the + * • To get the quota information for specific resource, send a GET request. + * • To increase the quota, update the limit field from the GET response to a new value. + * • To update the quota value, submit the JSON response to the quota request API to update the * quota. * • To update the quota. use the PATCH operation. * @param subscriptionId Azure subscription ID. @@ -142,12 +133,9 @@ export interface Quota { >; /** * Update the quota (service limits) of this resource to the requested value. - * - • To get the quota information for specific resource, send a GET request. - * - • To increase the quota, update the limit field from the GET response to a new value. - * - • To update the quota value, submit the JSON response to the quota request API to update the + * • To get the quota information for specific resource, send a GET request. + * • To increase the quota, update the limit field from the GET response to a new value. + * • To update the quota value, submit the JSON response to the quota request API to update the * quota. * • To update the quota. use the PATCH operation. * @param subscriptionId Azure subscription ID. diff --git a/sdk/reservations/arm-reservations/test/sampleTest.ts b/sdk/reservations/arm-reservations/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/reservations/arm-reservations/test/sampleTest.ts +++ b/sdk/reservations/arm-reservations/test/sampleTest.ts @@ -7,35 +7,30 @@ */ import { - env, - record, - RecorderEnvironmentSetup, - Recorder + Recorder, + RecorderStartOptions, + env } from "@azure-tools/test-recorder"; -import * as assert from "assert"; +import { assert } from "chai"; +import { Context } from "mocha"; -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] +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() { - recorder = record(this, recorderEnvSetup); + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); }); afterEach(async function() { diff --git a/sdk/reservations/arm-reservations/tsconfig.json b/sdk/reservations/arm-reservations/tsconfig.json index 036e5f561409..3e6ae96443f3 100644 --- a/sdk/reservations/arm-reservations/tsconfig.json +++ b/sdk/reservations/arm-reservations/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-reservations": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"