diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 19f5ee0aca34..9e3c3bfe2b83 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -13017,23 +13017,26 @@ packages: dev: false file:projects/arm-billing.tgz: - resolution: {integrity: sha512-eZrZgRnFLJjOwrQPoCth/gE1LJTY3qNKc7vF36yijW47qa/5SiVkeAJapSwUYoAMNKq5D9wrsXR1hzQcKm0nNA==, tarball: file:projects/arm-billing.tgz} + resolution: {integrity: sha512-byAafTwEOMJr3jucqLtEDjcKRBBFOFndvIlVmIy73BjApoLj/CeEzNvVgrtzIYdGASHyAnVcjG0barEWbCCJyg==, tarball: file:projects/arm-billing.tgz} name: '@rush-temp/arm-billing' version: 0.0.0 dependencies: '@azure-tools/test-credential': 1.3.1 '@azure-tools/test-recorder': 3.5.2 '@azure/core-lro': 2.7.2 + '@microsoft/api-extractor': 7.47.11(@types/node@18.19.64) '@types/chai': 4.3.20 '@types/mocha': 10.0.9 '@types/node': 18.19.64 chai: 4.3.10 + cross-env: 7.0.3 dotenv: 16.4.5 mocha: 10.8.2 ts-node: 10.9.2(@types/node@18.19.64)(typescript@5.6.3) tslib: 2.8.1 tsx: 4.19.2 typescript: 5.6.3 + uglify-js: 3.19.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -18898,7 +18901,7 @@ packages: dev: false file:projects/communication-phone-numbers.tgz: - resolution: {integrity: sha512-kRnm7dSlOcUN3BpxBqb6K3cAum4jdmmU4BdQ4o+BaHcS7s6yWImkZL4vKz0ELMgUSCSLu4w2FqV5XinSAg4eeA==, tarball: file:projects/communication-phone-numbers.tgz} + resolution: {integrity: sha512-24JG0UquvqCfpD2fHYVg31EE7Zu+1LadlqbxK1oIhPj3dnaQ152m8T++HHMAkFzfbNdaH/1yqWjLTpBVotKMXA==, tarball: file:projects/communication-phone-numbers.tgz} name: '@rush-temp/communication-phone-numbers' version: 0.0.0 dependencies: @@ -21182,7 +21185,7 @@ packages: dev: false file:projects/maps-render.tgz: - resolution: {integrity: sha512-DrEwi8UQP65AkDO5eQx9LbwzEGtngMa8+aoOuoEZ3XdfLM5te0RH2g1B2ugosRq7lbjmRpuex6xBKZE3tQw7Yw==, tarball: file:projects/maps-render.tgz} + resolution: {integrity: sha512-UsWhK4PLe8c4SueDX/MzVuOtEwAHCNrHYZHGSwEJ8nFvkT5qBQS0E6v0p87R+7dNE+2hUrXoXV2pYwTbM7NeMg==, tarball: file:projects/maps-render.tgz} name: '@rush-temp/maps-render' version: 0.0.0 dependencies: diff --git a/sdk/billing/arm-billing/_meta.json b/sdk/billing/arm-billing/_meta.json index 82f340e50083..011b97d39921 100644 --- a/sdk/billing/arm-billing/_meta.json +++ b/sdk/billing/arm-billing/_meta.json @@ -1,8 +1,8 @@ { - "commit": "f958cceb74699d24953a6ea04536ed65767fbeb6", + "commit": "78495adc7bb7118cee68e56f81586811d9d2a25a", "readme": "specification/billing/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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\billing\\resource-manager\\readme.md --use=@autorest/typescript@6.0.26 --generate-sample=true", + "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/billing/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "js-sdk-release-tools@2.7.21-beta", - "use": "@autorest/typescript@6.0.26" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/billing/arm-billing/package.json b/sdk/billing/arm-billing/package.json index 8d76d00e00fa..e02a26939741 100644 --- a/sdk/billing/arm-billing/package.json +++ b/sdk/billing/arm-billing/package.json @@ -8,11 +8,11 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@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" }, @@ -28,19 +28,22 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-billing.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.1.0", - "@azure-tools/test-recorder": "^3.0.0", + "@microsoft/api-extractor": "^7.31.1", + "typescript": "~5.6.2", + "uglify-js": "^3.4.9", + "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", "@azure/identity": "^4.2.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", - "chai": "^4.2.0", - "dotenv": "^16.0.0", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", "mocha": "^10.0.0", - "ts-node": "^10.0.0", + "@types/mocha": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.6.2" + "@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", @@ -68,28 +71,28 @@ ], "scripts": { "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "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": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", "test": "npm run integration-test", - "test:browser": "echo skipped", "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", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "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", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -102,13 +105,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/billing/arm-billing", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-billing?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/billing/arm-billing" +} \ No newline at end of file diff --git a/sdk/billing/arm-billing/sample.env b/sdk/billing/arm-billing/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/billing/arm-billing/sample.env +++ b/sdk/billing/arm-billing/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/billing/arm-billing/src/lroImpl.ts b/sdk/billing/arm-billing/src/lroImpl.ts index b27f5ac7209b..5f88efab981b 100644 --- a/sdk/billing/arm-billing/src/lroImpl.ts +++ b/sdk/billing/arm-billing/src/lroImpl.ts @@ -7,7 +7,7 @@ */ // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; diff --git a/sdk/billing/arm-billing/src/models/index.ts b/sdk/billing/arm-billing/src/models/index.ts index 1548bdf90bcf..8e4b21d7e3a3 100644 --- a/sdk/billing/arm-billing/src/models/index.ts +++ b/sdk/billing/arm-billing/src/models/index.ts @@ -1719,7 +1719,7 @@ export interface BillingSubscriptionProperties { */ readonly nextBillingCycleDetails?: NextBillingCycleDetails; /** - * The offer ID for the subscription. This field is only available for the Microsoft Online Services Program billing accounts. + * The offer ID for the subscription. This field is only available for the Microsoft Online Services Program billing accounts or billing accounts with agreement type Enterprise Agreement. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly offerId?: string; @@ -4104,7 +4104,7 @@ export interface BillingSubscription extends ProxyResourceWithTags { */ readonly nextBillingCycleDetails?: NextBillingCycleDetails; /** - * The offer ID for the subscription. This field is only available for the Microsoft Online Services Program billing accounts. + * The offer ID for the subscription. This field is only available for the Microsoft Online Services Program billing accounts or billing accounts with agreement type Enterprise Agreement. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly offerId?: string; @@ -4288,7 +4288,7 @@ export interface BillingSubscriptionAlias extends ProxyResourceWithTags { */ readonly nextBillingCycleDetails?: NextBillingCycleDetails; /** - * The offer ID for the subscription. This field is only available for the Microsoft Online Services Program billing accounts. + * The offer ID for the subscription. This field is only available for the Microsoft Online Services Program billing accounts or billing accounts with agreement type Enterprise Agreement. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly offerId?: string; @@ -4477,7 +4477,7 @@ export interface BillingSubscriptionPatch extends ProxyResourceWithTags { */ readonly nextBillingCycleDetails?: NextBillingCycleDetails; /** - * The offer ID for the subscription. This field is only available for the Microsoft Online Services Program billing accounts. + * The offer ID for the subscription. This field is only available for the Microsoft Online Services Program billing accounts or billing accounts with agreement type Enterprise Agreement. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly offerId?: string; diff --git a/sdk/billing/arm-billing/test/sampleTest.ts b/sdk/billing/arm-billing/test/sampleTest.ts index 8ff7deb0acbe..d64be981b694 100644 --- a/sdk/billing/arm-billing/test/sampleTest.ts +++ b/sdk/billing/arm-billing/test/sampleTest.ts @@ -9,7 +9,7 @@ import { Recorder, RecorderStartOptions, - env + env, } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; @@ -18,15 +18,11 @@ const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", AZURE_CLIENT_SECRET: "azure_client_secret", AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" + SUBSCRIPTION_ID: "azure_subscription_id", }; const recorderOptions: RecorderStartOptions = { envSetupForPlayback: replaceableVariables, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], }; describe("My test", () => { diff --git a/sdk/billing/arm-billing/tsconfig.json b/sdk/billing/arm-billing/tsconfig.json index 9ae8a5150d1d..b35d05ad6e9d 100644 --- a/sdk/billing/arm-billing/tsconfig.json +++ b/sdk/billing/arm-billing/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-billing": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "src/**/*.ts", + "test/**/*.ts" ], "exclude": [ "node_modules"