Skip to content

Commit 2398b69

Browse files
author
SDKAuto
committed
CodeGen from PR 24559 in Azure/azure-rest-api-specs
Merge 9135665ce55669872eb9724a066a492febe5c8f6 into 1239132db8b04a0642202da6d47c68e302486c5f
1 parent 8337958 commit 2398b69

File tree

12 files changed

+111
-67
lines changed

12 files changed

+111
-67
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 23 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/features/arm-features/CHANGELOG.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
# Release History
2+
3+
## 4.0.0 (2023-07-26)
4+
5+
**Breaking Changes**
26

3-
## 3.1.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
12-
7+
- Class FeatureClient has a new signature
8+
9+
1310
## 3.1.0 (2022-11-22)
1411

1512
**Features**

sdk/features/arm-features/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2022 Microsoft
3+
Copyright (c) 2023 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/features/arm-features/_meta.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "a42f1b58607091c4f255ead152a8ef323fa0b280",
3-
"readme": "specification\\resources\\resource-manager\\readme.md",
4-
"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",
2+
"commit": "5fde98bcf518ad94e577bb2914189f95bb649eb7",
3+
"readme": "specification/resources/resource-manager/readme.md",
4+
"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",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.2",
7-
"use": "@autorest/[email protected].0-rc.3.20221108.1"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.1",
7+
"use": "@autorest/typescript@^6.0.4"
88
}

sdk/features/arm-features/package.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for FeatureClient.",
6-
"version": "3.1.1",
6+
"version": "4.0.0",
77
"engines": {
88
"node": ">=14.0.0"
99
},
1010
"dependencies": {
1111
"@azure/core-paging": "^1.2.0",
12-
"@azure/core-client": "^1.6.1",
12+
"@azure/core-client": "^1.7.0",
1313
"@azure/core-auth": "^1.3.0",
1414
"@azure/core-rest-pipeline": "^1.8.0",
1515
"tslib": "^2.2.0"
@@ -31,12 +31,13 @@
3131
"@rollup/plugin-json": "^6.0.0",
3232
"@rollup/plugin-multi-entry": "^6.0.0",
3333
"@rollup/plugin-node-resolve": "^13.1.3",
34-
"mkdirp": "^1.0.4",
34+
"mkdirp": "^2.1.2",
3535
"rollup": "^2.66.1",
3636
"rollup-plugin-sourcemaps": "^0.6.3",
3737
"typescript": "~5.0.0",
3838
"uglify-js": "^3.4.9",
3939
"rimraf": "^3.0.0",
40+
"dotenv": "^16.0.0",
4041
"@azure/identity": "^2.0.1",
4142
"@azure-tools/test-recorder": "^3.0.0",
4243
"@azure-tools/test-credential": "^1.0.0",
@@ -47,7 +48,6 @@
4748
"@types/node": "^14.0.0",
4849
"@azure/dev-tool": "^1.0.0"
4950
},
50-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/features/arm-features",
5151
"repository": {
5252
"type": "git",
5353
"url": "https://github.com/Azure/azure-sdk-for-js.git"
@@ -109,12 +109,5 @@
109109
]
110110
},
111111
"autoPublish": true,
112-
"//sampleConfiguration": {
113-
"productName": "",
114-
"productSlugs": [
115-
"azure"
116-
],
117-
"disableDocsMs": true,
118-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-features?view=azure-node-preview"
119-
}
120-
}
112+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/features/arm-features"
113+
}

sdk/features/arm-features/review/arm-features.api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export class FeatureClient extends coreClient.ServiceClient {
3434
// (undocumented)
3535
$host: string;
3636
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: FeatureClientOptionalParams);
37+
constructor(credentials: coreAuth.TokenCredential, options?: FeatureClientOptionalParams);
3738
// (undocumented)
3839
apiVersion: string;
3940
// (undocumented)
@@ -42,7 +43,7 @@ export class FeatureClient extends coreClient.ServiceClient {
4243
// (undocumented)
4344
subscriptionFeatureRegistrations: SubscriptionFeatureRegistrations;
4445
// (undocumented)
45-
subscriptionId: string;
46+
subscriptionId?: string;
4647
}
4748

4849
// @public

sdk/features/arm-features/src/featureClient.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import {
3939
export class FeatureClient extends coreClient.ServiceClient {
4040
$host: string;
4141
apiVersion: string;
42-
subscriptionId: string;
42+
subscriptionId?: string;
4343

4444
/**
4545
* Initializes a new instance of the FeatureClient class.
@@ -51,12 +51,26 @@ export class FeatureClient extends coreClient.ServiceClient {
5151
credentials: coreAuth.TokenCredential,
5252
subscriptionId: string,
5353
options?: FeatureClientOptionalParams
54+
);
55+
constructor(
56+
credentials: coreAuth.TokenCredential,
57+
options?: FeatureClientOptionalParams
58+
);
59+
constructor(
60+
credentials: coreAuth.TokenCredential,
61+
subscriptionIdOrOptions?: FeatureClientOptionalParams | string,
62+
options?: FeatureClientOptionalParams
5463
) {
5564
if (credentials === undefined) {
5665
throw new Error("'credentials' cannot be null");
5766
}
58-
if (subscriptionId === undefined) {
59-
throw new Error("'subscriptionId' cannot be null");
67+
68+
let subscriptionId: string | undefined;
69+
70+
if (typeof subscriptionIdOrOptions === "string") {
71+
subscriptionId = subscriptionIdOrOptions;
72+
} else if (typeof subscriptionIdOrOptions === "object") {
73+
options = subscriptionIdOrOptions;
6074
}
6175

6276
// Initializing default values for options
@@ -68,7 +82,7 @@ export class FeatureClient extends coreClient.ServiceClient {
6882
credential: credentials
6983
};
7084

71-
const packageDetails = `azsdk-js-arm-features/3.1.1`;
85+
const packageDetails = `azsdk-js-arm-features/4.0.0`;
7286
const userAgentPrefix =
7387
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
7488
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -269,7 +283,6 @@ const listOperationsNextOperationSpec: coreClient.OperationSpec = {
269283
bodyMapper: Mappers.ErrorResponse
270284
}
271285
},
272-
queryParameters: [Parameters.apiVersion],
273286
urlParameters: [Parameters.$host, Parameters.nextLink],
274287
headerParameters: [Parameters.accept],
275288
serializer

sdk/features/arm-features/src/operations/features.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ const listAllNextOperationSpec: coreClient.OperationSpec = {
394394
bodyMapper: Mappers.ErrorResponse
395395
}
396396
},
397-
queryParameters: [Parameters.apiVersion],
398397
urlParameters: [
399398
Parameters.$host,
400399
Parameters.nextLink,
@@ -414,7 +413,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
414413
bodyMapper: Mappers.ErrorResponse
415414
}
416415
},
417-
queryParameters: [Parameters.apiVersion],
418416
urlParameters: [
419417
Parameters.$host,
420418
Parameters.nextLink,

sdk/features/arm-features/src/operations/subscriptionFeatureRegistrations.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
402402
bodyMapper: Mappers.ErrorResponse
403403
}
404404
},
405-
queryParameters: [Parameters.apiVersion],
406405
urlParameters: [
407406
Parameters.$host,
408407
Parameters.nextLink,
@@ -423,7 +422,6 @@ const listAllBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
423422
bodyMapper: Mappers.ErrorResponse
424423
}
425424
},
426-
queryParameters: [Parameters.apiVersion],
427425
urlParameters: [
428426
Parameters.$host,
429427
Parameters.nextLink,

sdk/features/arm-features/src/pagingHelper.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ export interface PageInfo {
1313
const pageMap = new WeakMap<object, PageInfo>();
1414

1515
/**
16-
* Given a result page from a pageable operation, returns a
17-
* continuation token that can be used to begin paging from
16+
* Given the last `.value` produced by the `byPage` iterator,
17+
* returns a continuation token that can be used to begin paging from
1818
* that point later.
19-
* @param page A result object from calling .byPage() on a paged operation.
20-
* @returns The continuation token that can be passed into byPage().
19+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
20+
* @returns The continuation token that can be passed into byPage() during future calls.
2121
*/
2222
export function getContinuationToken(page: unknown): string | undefined {
2323
if (typeof page !== "object" || page === null) {

0 commit comments

Comments
 (0)