Skip to content

[AutoPR @azure/arm-locks] Test224 #14204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 42 additions & 84 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions sdk/changes/arm-changes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# Release History

## 1.1.1 (Unreleased)

### Features Added


## 2.0.0 (2025-03-18)

### Breaking Changes

### Bugs Fixed

### Other Changes

- Interface ChangesListNextOptionalParams no longer has parameter skipToken
- Interface ChangesListNextOptionalParams no longer has parameter top
## 1.1.0 (2022-11-17)

### Features Added
Expand All @@ -19,4 +17,4 @@

## 1.0.0 (2022-05-09)

The package of @azure/arm-changes is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ).
The package of @azure/arm-changes is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
2 changes: 1 addition & 1 deletion sdk/changes/arm-changes/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ 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.
SOFTWARE.
9 changes: 3 additions & 6 deletions sdk/changes/arm-changes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure Changes** 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://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).

Expand All @@ -64,16 +63,14 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur
import { InteractiveBrowserCredential } from "@azure/identity";
import { ChangesClient } from "@azure/arm-changes";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new InteractiveBrowserCredential({
tenantId: "<YOUR_TENANT_ID>",
clientId: "<YOUR_CLIENT_ID>",
});
clientId: "<YOUR_CLIENT_ID>"
});
const client = new ChangesClient(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
Expand Down Expand Up @@ -108,7 +105,7 @@ If you'd like to contribute to this library, please read the [contributing guide

- [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%2Fchanges%2Farm-changes%2FREADME.png)

[azure_cli]: https://learn.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
Expand Down
10 changes: 5 additions & 5 deletions sdk/changes/arm-changes/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "20df2424a278ca19437e437a7dbf3a7857a0dd9d",
"commit": "a3dcf1c9eb0324a1e4e9a12ec4655f54ba1f44f5",
"readme": "specification/resources/resource-manager/readme.md",
"autorest_command": "autorest --version=3.8.4 --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\\resources\\resource-manager\\readme.md --use=@autorest/[email protected].0-rc.3.20221108.1 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.2",
"use": "@autorest/[email protected].0-rc.3.20221108.1"
"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/resources/resource-manager/readme.md --use=@autorest/typescript@^6.0.12",
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.23",
"use": "@autorest/typescript@^6.0.12"
}
6 changes: 3 additions & 3 deletions sdk/changes/arm-changes/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "dist/esm/index.d.ts",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": {
"enabled": true
},
Expand All @@ -11,7 +11,7 @@
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "dist/arm-changes.d.ts"
"publicTrimmedFilePath": "./types/arm-changes.d.ts"
},
"messages": {
"tsdocMessageReporting": {
Expand All @@ -28,4 +28,4 @@
}
}
}
}
}
36 changes: 16 additions & 20 deletions sdk/changes/arm-changes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,47 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ChangesClient.",
"version": "1.1.1",
"version": "2.0.0",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/core-auth": "^1.9.0",
"@azure/core-client": "^1.9.2",
"@azure/core-client": "^1.9.3",
"@azure/core-paging": "^1.6.2",
"@azure/core-rest-pipeline": "^1.18.2",
"@azure/core-rest-pipeline": "^1.19.1",
"tslib": "^2.8.1"
},
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic",
"cloud"
"isomorphic"
],
"license": "MIT",
"main": "./dist/commonjs/index.js",
"module": "./dist/esm/index.js",
"module": "./dist-esm/src/index.js",
"types": "./dist/commonjs/index.d.ts",
"devDependencies": {
"@azure-tools/test-credential": "^2.0.0",
"@azure-tools/test-recorder": "^4.1.0",
"@azure-tools/test-utils-vitest": "^1.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.5.0",
"@azure/identity": "^4.8.0",
"@azure/logger": "^1.1.4",
"@types/node": "^18.0.0",
"@vitest/browser": "^3.0.9",
"@vitest/coverage-istanbul": "^3.0.9",
"playwright": "^1.49.1",
"typescript": "~5.8.2",
"dotenv": "^16.0.0",
"playwright": "^1.51.1",
"typescript": "~5.6.2",
"vitest": "^3.0.9"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/changes/arm-changes",
"repository": "github:Azure/azure-sdk-for-js",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
Expand Down Expand Up @@ -87,14 +90,7 @@
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-changes?view=azure-node-preview"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/changes/arm-changes",
"type": "module",
"tshy": {
"project": "./tsconfig.src.json",
Expand Down Expand Up @@ -135,4 +131,4 @@
}
}
}
}
}
2 changes: 0 additions & 2 deletions sdk/changes/arm-changes/review/arm-changes.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ export type ChangesGetResponse = ChangeResourceResult;

// @public
export interface ChangesListNextOptionalParams extends coreClient.OperationOptions {
skipToken?: string;
top?: number;
}

// @public
Expand Down
5 changes: 1 addition & 4 deletions sdk/changes/arm-changes/sample.env
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# App registration secret for AAD authentication
AZURE_CLIENT_SECRET=
AZURE_CLIENT_ID=
AZURE_TENANT_ID=
# Feel free to add your own environment variables.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
* @summary Obtains the specified change resource for the target resource
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-05-01/examples/GetChange.json
*/
async function getChange() {
async function getChange(): Promise<void> {
const subscriptionId = "subscriptionId1";
const resourceGroupName = "resourceGroup1";
const resourceProviderNamespace = "resourceProvider1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
* @summary Obtains a list of change resources from the past 14 days for the target resource
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2022-05-01/examples/ListChanges.json
*/
async function listChanges() {
async function listChanges(): Promise<void> {
const subscriptionId = "subscriptionId1";
const resourceGroupName = "resourceGroup1";
const resourceProviderNamespace = "resourceProvider1";
Expand Down
29 changes: 15 additions & 14 deletions sdk/changes/arm-changes/src/changesClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline";
import {
PipelineRequest,
PipelineResponse,
SendRequest
SendRequest,
} from "@azure/core-rest-pipeline";
import * as coreAuth from "@azure/core-auth";
import { ChangesImpl } from "./operations/index.js";
Expand All @@ -33,7 +33,7 @@ export class ChangesClient extends coreClient.ServiceClient {
constructor(
credentials: coreAuth.TokenCredential,
subscriptionId: string,
options?: ChangesClientOptionalParams
options?: ChangesClientOptionalParams,
) {
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
Expand All @@ -48,10 +48,10 @@ export class ChangesClient extends coreClient.ServiceClient {
}
const defaults: ChangesClientOptionalParams = {
requestContentType: "application/json; charset=utf-8",
credential: credentials
credential: credentials,
};

const packageDetails = `azsdk-js-arm-changes/1.1.1`;
const packageDetails = `azsdk-js-arm-changes/2.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand All @@ -61,20 +61,21 @@ export class ChangesClient extends coreClient.ServiceClient {
...defaults,
...options,
userAgentOptions: {
userAgentPrefix
userAgentPrefix,
},
endpoint:
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
options.endpoint ?? options.baseUri ?? "https://management.azure.com",
};
super(optionsWithDefaults);

let bearerTokenAuthenticationPolicyFound: boolean = false;
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =
options.pipeline.getOrderedPolicies();
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
(pipelinePolicy) =>
pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName
coreRestPipeline.bearerTokenAuthenticationPolicyName,
);
}
if (
Expand All @@ -84,7 +85,7 @@ export class ChangesClient extends coreClient.ServiceClient {
!bearerTokenAuthenticationPolicyFound
) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
Expand All @@ -94,9 +95,9 @@ export class ChangesClient extends coreClient.ServiceClient {
`${optionsWithDefaults.endpoint}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
coreClient.authorizeRequestOnClaimChallenge,
},
}),
);
}
// Parameter assignments
Expand All @@ -118,7 +119,7 @@ export class ChangesClient extends coreClient.ServiceClient {
name: "CustomApiVersionPolicy",
async sendRequest(
request: PipelineRequest,
next: SendRequest
next: SendRequest,
): Promise<PipelineResponse> {
const param = request.url.split("?");
if (param.length > 1) {
Expand All @@ -132,7 +133,7 @@ export class ChangesClient extends coreClient.ServiceClient {
request.url = param[0] + "?" + newParams.join("&");
}
return next(request);
}
},
};
this.pipeline.addPolicy(apiVersionPolicy);
}
Expand Down
7 changes: 1 addition & 6 deletions sdk/changes/arm-changes/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,7 @@ export type ChangesGetResponse = ChangeResourceResult;

/** Optional parameters. */
export interface ChangesListNextOptionalParams
extends coreClient.OperationOptions {
/** (Optional) Set the maximum number of results per response. */
top?: number;
/** (Optional) The page-continuation token */
skipToken?: string;
}
extends coreClient.OperationOptions {}

/** Contains response data for the listNext operation. */
export type ChangesListNextResponse = ChangeResourceListResult;
Expand Down
Loading