Skip to content

Commit

Permalink
CodeGen from PR 24559 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 9135665ce55669872eb9724a066a492febe5c8f6 into 1239132db8b04a0642202da6d47c68e302486c5f
  • Loading branch information
SDKAuto committed Jul 26, 2023
1 parent 8337958 commit 8dcf8ae
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 68 deletions.
40 changes: 23 additions & 17 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 8 additions & 11 deletions sdk/links/arm-links/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Release History

## 2.0.2 (2022-11-22)

**Features**

-  Exposes `getContinuationToken` helper function to extract continuation token

**Bugs Fixed**

- A series of small bug fixs relevant to authentication and apiVersion policy


## 3.0.0 (2023-07-26)

**Breaking Changes**

- Class ManagementLinkClient has a new signature
- Interface ResourceLinksListAtSubscriptionNextOptionalParams no longer has parameter filter

## 2.0.1 (2022-04-18)

**features**
Expand Down
2 changes: 1 addition & 1 deletion sdk/links/arm-links/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2022 Microsoft
Copyright (c) 2023 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
Expand Down
10 changes: 5 additions & 5 deletions sdk/links/arm-links/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "a42f1b58607091c4f255ead152a8ef323fa0b280",
"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/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true",
"commit": "5fde98bcf518ad94e577bb2914189f95bb649eb7",
"readme": "specification/resources/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/resources/resource-manager/readme.md --use=@autorest/typescript@^6.0.4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.2",
"use": "@autorest/typescript@6.0.0-rc.3.20221108.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.1",
"use": "@autorest/typescript@^6.0.4"
}
14 changes: 7 additions & 7 deletions sdk/links/arm-links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ManagementLinkClient.",
"version": "2.0.2",
"version": "3.0.0",
"engines": {
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.6.1",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0"
Expand All @@ -31,24 +31,23 @@
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-multi-entry": "^6.0.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"mkdirp": "^2.1.2",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~5.0.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"dotenv": "^16.0.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^7.1.1",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@azure/arm-resources": "^5.0.0",
"@types/node": "^14.0.0",
"@azure/dev-tool": "^1.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/links/arm-links",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
Expand Down Expand Up @@ -109,5 +108,6 @@
}
]
},
"autoPublish": true
}
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/links/arm-links"
}
4 changes: 2 additions & 2 deletions sdk/links/arm-links/review/arm-links.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ export class ManagementLinkClient extends coreClient.ServiceClient {
// (undocumented)
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ManagementLinkClientOptionalParams);
constructor(credentials: coreAuth.TokenCredential, options?: ManagementLinkClientOptionalParams);
// (undocumented)
apiVersion: string;
// (undocumented)
operations: Operations;
// (undocumented)
resourceLinks: ResourceLinks;
// (undocumented)
subscriptionId: string;
subscriptionId?: string;
}

// @public
Expand Down Expand Up @@ -141,7 +142,6 @@ export type ResourceLinksListAtSourceScopeResponse = ResourceLinkResult;

// @public
export interface ResourceLinksListAtSubscriptionNextOptionalParams extends coreClient.OperationOptions {
filter?: string;
}

// @public
Expand Down
22 changes: 18 additions & 4 deletions sdk/links/arm-links/src/managementLinkClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { ManagementLinkClientOptionalParams } from "./models";
export class ManagementLinkClient extends coreClient.ServiceClient {
$host: string;
apiVersion: string;
subscriptionId: string;
subscriptionId?: string;

/**
* Initializes a new instance of the ManagementLinkClient class.
Expand All @@ -33,12 +33,26 @@ export class ManagementLinkClient extends coreClient.ServiceClient {
credentials: coreAuth.TokenCredential,
subscriptionId: string,
options?: ManagementLinkClientOptionalParams
);
constructor(
credentials: coreAuth.TokenCredential,
options?: ManagementLinkClientOptionalParams
);
constructor(
credentials: coreAuth.TokenCredential,
subscriptionIdOrOptions?: ManagementLinkClientOptionalParams | string,
options?: ManagementLinkClientOptionalParams
) {
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
if (subscriptionId === undefined) {
throw new Error("'subscriptionId' cannot be null");

let subscriptionId: string | undefined;

if (typeof subscriptionIdOrOptions === "string") {
subscriptionId = subscriptionIdOrOptions;
} else if (typeof subscriptionIdOrOptions === "object") {
options = subscriptionIdOrOptions;
}

// Initializing default values for options
Expand All @@ -50,7 +64,7 @@ export class ManagementLinkClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-links/2.0.2`;
const packageDetails = `azsdk-js-arm-links/3.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down
5 changes: 1 addition & 4 deletions sdk/links/arm-links/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,7 @@ export type ResourceLinksListAtSourceScopeResponse = ResourceLinkResult;

/** Optional parameters. */
export interface ResourceLinksListAtSubscriptionNextOptionalParams
extends coreClient.OperationOptions {
/** The filter to apply on the list resource links operation. The supported filter for list resource links is targetId. For example, $filter=targetId eq {value} */
filter?: string;
}
extends coreClient.OperationOptions {}

/** Contains response data for the listAtSubscriptionNext operation. */
export type ResourceLinksListAtSubscriptionNextResponse = ResourceLinkResult;
Expand Down
1 change: 0 additions & 1 deletion sdk/links/arm-links/src/operations/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
bodyMapper: Mappers.OperationListResult
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.nextLink],
headerParameters: [Parameters.accept],
serializer
Expand Down
2 changes: 0 additions & 2 deletions sdk/links/arm-links/src/operations/resourceLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ const listAtSubscriptionNextOperationSpec: coreClient.OperationSpec = {
bodyMapper: Mappers.ResourceLinkResult
}
},
queryParameters: [Parameters.apiVersion, Parameters.filter],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Expand All @@ -372,7 +371,6 @@ const listAtSourceScopeNextOperationSpec: coreClient.OperationSpec = {
bodyMapper: Mappers.ResourceLinkResult
}
},
queryParameters: [Parameters.apiVersion, Parameters.filter1],
urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope],
headerParameters: [Parameters.accept],
serializer
Expand Down
8 changes: 4 additions & 4 deletions sdk/links/arm-links/src/pagingHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export interface PageInfo {
const pageMap = new WeakMap<object, PageInfo>();

/**
* Given a result page from a pageable operation, returns a
* continuation token that can be used to begin paging from
* 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 A result object from calling .byPage() on a paged operation.
* @returns The continuation token that can be passed into byPage().
* @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) {
Expand Down
Loading

0 comments on commit 8dcf8ae

Please sign in to comment.