@azure/arm-features 3.0.0-beta.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -11
- package/README.md +15 -9
- package/dist/index.js +37 -57
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/{esm → dist-esm/src}/featureClient.d.ts +7 -5
- package/dist-esm/src/featureClient.d.ts.map +1 -0
- package/{esm → dist-esm/src}/featureClient.js +31 -4
- package/dist-esm/src/featureClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/index.js +0 -1
- package/dist-esm/src/index.js.map +1 -0
- package/{esm → dist-esm/src}/models/index.d.ts +22 -22
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/index.js +0 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.d.ts +1 -1
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +30 -29
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/{esm → dist-esm/src}/models/parameters.d.ts +0 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/parameters.js +0 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/{esm → dist-esm/src}/operations/features.d.ts +3 -4
- package/dist-esm/src/operations/features.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/features.js +1 -2
- package/dist-esm/src/operations/features.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +0 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/{esm → dist-esm/src}/operations/subscriptionFeatureRegistrations.d.ts +3 -4
- package/dist-esm/src/operations/subscriptionFeatureRegistrations.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/subscriptionFeatureRegistrations.js +1 -2
- package/dist-esm/src/operations/subscriptionFeatureRegistrations.js.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/features.d.ts +0 -1
- package/dist-esm/src/operationsInterfaces/features.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/features.js +1 -1
- package/dist-esm/src/operationsInterfaces/features.js.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/index.d.ts +0 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/index.js +0 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/subscriptionFeatureRegistrations.d.ts +0 -1
- package/dist-esm/src/operationsInterfaces/subscriptionFeatureRegistrations.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operationsInterfaces/subscriptionFeatureRegistrations.js +1 -1
- package/dist-esm/src/operationsInterfaces/subscriptionFeatureRegistrations.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +4 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +113 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +26 -32
- package/review/arm-features.api.md +20 -26
- package/src/featureClient.ts +56 -15
- package/src/index.ts +0 -1
- package/src/models/index.ts +23 -23
- package/src/models/mappers.ts +31 -30
- package/src/operations/features.ts +4 -5
- package/src/operations/subscriptionFeatureRegistrations.ts +4 -5
- package/src/operationsInterfaces/features.ts +0 -1
- package/src/operationsInterfaces/subscriptionFeatureRegistrations.ts +0 -1
- package/tsconfig.json +2 -2
- package/{esm/index.d.ts → types/arm-features.d.ts} +19 -29
- package/types/tsdoc-metadata.json +11 -0
- package/esm/featureClient.d.ts.map +0 -1
- package/esm/featureClient.js.map +0 -1
- package/esm/featureClientContext.d.ts +0 -16
- package/esm/featureClientContext.d.ts.map +0 -1
- package/esm/featureClientContext.js +0 -49
- package/esm/featureClientContext.js.map +0 -1
- package/esm/index.d.ts.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js.map +0 -1
- package/esm/operations/features.d.ts.map +0 -1
- package/esm/operations/features.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/subscriptionFeatureRegistrations.d.ts.map +0 -1
- package/esm/operations/subscriptionFeatureRegistrations.js.map +0 -1
- package/esm/operationsInterfaces/features.d.ts.map +0 -1
- package/esm/operationsInterfaces/features.js.map +0 -1
- package/esm/operationsInterfaces/index.d.ts.map +0 -1
- package/esm/operationsInterfaces/index.js.map +0 -1
- package/esm/operationsInterfaces/subscriptionFeatureRegistrations.d.ts.map +0 -1
- package/esm/operationsInterfaces/subscriptionFeatureRegistrations.js.map +0 -1
- package/src/featureClientContext.ts +0 -70
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptionFeatureRegistrations.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/subscriptionFeatureRegistrations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sampleTest.d.ts","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,kBAAkB;;CAE9B,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __asyncValues, __awaiter } from "tslib";
|
|
9
|
+
import { env, record, isPlaybackMode } from "@azure-tools/test-recorder";
|
|
10
|
+
import * as assert from "assert";
|
|
11
|
+
import { ClientSecretCredential } from "@azure/identity";
|
|
12
|
+
import { FeatureClient } from "../src/featureClient";
|
|
13
|
+
const recorderEnvSetup = {
|
|
14
|
+
replaceableVariables: {
|
|
15
|
+
AZURE_CLIENT_ID: "azure_client_id",
|
|
16
|
+
AZURE_CLIENT_SECRET: "azure_client_secret",
|
|
17
|
+
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
|
|
18
|
+
SUBSCRIPTION_ID: "azure_subscription_id"
|
|
19
|
+
},
|
|
20
|
+
customizationsOnRecordings: [
|
|
21
|
+
(recording) => recording.replace(/"access_token":"[^"]*"/g, `"access_token":"access_token"`)
|
|
22
|
+
],
|
|
23
|
+
queryParametersToSkip: []
|
|
24
|
+
};
|
|
25
|
+
export const testPollingOptions = {
|
|
26
|
+
updateIntervalInMs: isPlaybackMode() ? 0 : undefined,
|
|
27
|
+
};
|
|
28
|
+
describe("Features test", () => {
|
|
29
|
+
let recorder;
|
|
30
|
+
let subscriptionId;
|
|
31
|
+
let client;
|
|
32
|
+
let location;
|
|
33
|
+
let resourceGroup;
|
|
34
|
+
beforeEach(function () {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
recorder = record(this, recorderEnvSetup);
|
|
37
|
+
subscriptionId = env.SUBSCRIPTION_ID;
|
|
38
|
+
// This is an example of how the environment variables are used
|
|
39
|
+
const credential = new ClientSecretCredential(env.AZURE_TENANT_ID, env.AZURE_CLIENT_ID, env.AZURE_CLIENT_SECRET);
|
|
40
|
+
client = new FeatureClient(credential, subscriptionId);
|
|
41
|
+
location = "eastus";
|
|
42
|
+
resourceGroup = "myjstest";
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
afterEach(function () {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
yield recorder.stop();
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
it("features listall test", function () {
|
|
51
|
+
var e_1, _a;
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const arrayList = [];
|
|
54
|
+
try {
|
|
55
|
+
for (var _b = __asyncValues(client.features.listAll()), _c; _c = yield _b.next(), !_c.done;) {
|
|
56
|
+
const item = _c.value;
|
|
57
|
+
arrayList.push(item);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
61
|
+
finally {
|
|
62
|
+
try {
|
|
63
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
64
|
+
}
|
|
65
|
+
finally { if (e_1) throw e_1.error; }
|
|
66
|
+
}
|
|
67
|
+
assert.notEqual(arrayList.length, 0);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
it("features list test", function () {
|
|
71
|
+
var e_2, _a;
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
const arrayList = [];
|
|
74
|
+
try {
|
|
75
|
+
for (var _b = __asyncValues(client.features.list("Microsoft.Compute")), _c; _c = yield _b.next(), !_c.done;) {
|
|
76
|
+
const item = _c.value;
|
|
77
|
+
arrayList.push(item);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
81
|
+
finally {
|
|
82
|
+
try {
|
|
83
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
84
|
+
}
|
|
85
|
+
finally { if (e_2) throw e_2.error; }
|
|
86
|
+
}
|
|
87
|
+
assert.notEqual(arrayList.length, 0);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
it("features get test", function () {
|
|
91
|
+
var e_3, _a;
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
const arrayList = new Array();
|
|
94
|
+
try {
|
|
95
|
+
for (var _b = __asyncValues(client.features.list("Microsoft.Compute")), _c; _c = yield _b.next(), !_c.done;) {
|
|
96
|
+
const item = _c.value;
|
|
97
|
+
arrayList.push(item);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
101
|
+
finally {
|
|
102
|
+
try {
|
|
103
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
104
|
+
}
|
|
105
|
+
finally { if (e_3) throw e_3.error; }
|
|
106
|
+
}
|
|
107
|
+
const featureName = arrayList[0].name.split("/")[1];
|
|
108
|
+
const feature = yield client.features.get("Microsoft.Compute", featureName);
|
|
109
|
+
assert.equal(feature.name, "Microsoft.Compute/" + featureName);
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
//# sourceMappingURL=sampleTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -3,28 +3,20 @@
|
|
|
3
3
|
"sdk-type": "mgmt",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "A generated SDK for FeatureClient.",
|
|
6
|
-
"version": "3.0.0
|
|
7
|
-
"engines": {
|
|
8
|
-
"node": ">=12.0.0"
|
|
9
|
-
},
|
|
6
|
+
"version": "3.0.0",
|
|
7
|
+
"engines": { "node": ">=12.0.0" },
|
|
10
8
|
"dependencies": {
|
|
11
|
-
"@azure/core-paging": "^1.
|
|
9
|
+
"@azure/core-paging": "^1.2.0",
|
|
12
10
|
"@azure/core-client": "^1.0.0",
|
|
13
11
|
"@azure/core-auth": "^1.3.0",
|
|
14
12
|
"@azure/core-rest-pipeline": "^1.1.0",
|
|
15
13
|
"tslib": "^2.2.0"
|
|
16
14
|
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"node",
|
|
19
|
-
"azure",
|
|
20
|
-
"typescript",
|
|
21
|
-
"browser",
|
|
22
|
-
"isomorphic"
|
|
23
|
-
],
|
|
15
|
+
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
|
|
24
16
|
"license": "MIT",
|
|
25
17
|
"main": "./dist/index.js",
|
|
26
|
-
"module": "./esm/index.js",
|
|
27
|
-
"types": "./
|
|
18
|
+
"module": "./dist-esm/src/index.js",
|
|
19
|
+
"types": "./types/arm-features.d.ts",
|
|
28
20
|
"devDependencies": {
|
|
29
21
|
"@microsoft/api-extractor": "^7.18.11",
|
|
30
22
|
"@rollup/plugin-commonjs": "11.0.2",
|
|
@@ -34,44 +26,47 @@
|
|
|
34
26
|
"mkdirp": "^1.0.4",
|
|
35
27
|
"rollup": "^1.16.3",
|
|
36
28
|
"rollup-plugin-sourcemaps": "^0.4.2",
|
|
37
|
-
"rollup-plugin-node-resolve": "^3.4.0",
|
|
38
29
|
"typescript": "~4.2.0",
|
|
39
|
-
"uglify-js": "^3.4.9"
|
|
30
|
+
"uglify-js": "^3.4.9",
|
|
31
|
+
"rimraf": "^3.0.0",
|
|
32
|
+
"@azure/identity": "^2.0.1",
|
|
33
|
+
"@azure-tools/test-recorder": "^1.0.0",
|
|
34
|
+
"mocha": "^7.1.1",
|
|
35
|
+
"cross-env": "^7.0.2"
|
|
40
36
|
},
|
|
41
37
|
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/features/arm-features",
|
|
42
38
|
"repository": {
|
|
43
39
|
"type": "git",
|
|
44
40
|
"url": "https://github.com/Azure/azure-sdk-for-js.git"
|
|
45
41
|
},
|
|
46
|
-
"bugs": {
|
|
47
|
-
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
|
48
|
-
},
|
|
42
|
+
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
|
|
49
43
|
"files": [
|
|
50
44
|
"dist/**/*.js",
|
|
51
45
|
"dist/**/*.js.map",
|
|
52
46
|
"dist/**/*.d.ts",
|
|
53
47
|
"dist/**/*.d.ts.map",
|
|
54
|
-
"esm/**/*.js",
|
|
55
|
-
"esm/**/*.js.map",
|
|
56
|
-
"esm/**/*.d.ts",
|
|
57
|
-
"esm/**/*.d.ts.map",
|
|
48
|
+
"dist-esm/**/*.js",
|
|
49
|
+
"dist-esm/**/*.js.map",
|
|
50
|
+
"dist-esm/**/*.d.ts",
|
|
51
|
+
"dist-esm/**/*.d.ts.map",
|
|
58
52
|
"src/**/*.ts",
|
|
59
53
|
"README.md",
|
|
60
54
|
"LICENSE",
|
|
61
55
|
"rollup.config.js",
|
|
62
56
|
"tsconfig.json",
|
|
63
57
|
"review/*",
|
|
64
|
-
"CHANGELOG.md"
|
|
58
|
+
"CHANGELOG.md",
|
|
59
|
+
"types/*"
|
|
65
60
|
],
|
|
66
61
|
"scripts": {
|
|
67
|
-
"build": "tsc && rollup -c
|
|
62
|
+
"build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
|
|
68
63
|
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
|
|
69
64
|
"prepack": "npm run build",
|
|
70
65
|
"pack": "npm pack 2>&1",
|
|
71
66
|
"extract-api": "api-extractor run --local",
|
|
72
67
|
"lint": "echo skipped",
|
|
73
68
|
"audit": "echo skipped",
|
|
74
|
-
"clean": "
|
|
69
|
+
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
75
70
|
"build:node": "echo skipped",
|
|
76
71
|
"build:browser": "echo skipped",
|
|
77
72
|
"build:test": "echo skipped",
|
|
@@ -79,16 +74,15 @@
|
|
|
79
74
|
"check-format": "echo skipped",
|
|
80
75
|
"execute:samples": "echo skipped",
|
|
81
76
|
"format": "echo skipped",
|
|
82
|
-
"test": "
|
|
83
|
-
"prebuild": "echo skipped",
|
|
77
|
+
"test": "npm run integration-test",
|
|
84
78
|
"test:node": "echo skipped",
|
|
85
79
|
"test:browser": "echo skipped",
|
|
86
|
-
"unit-test": "
|
|
87
|
-
"unit-test:node": "
|
|
80
|
+
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
|
81
|
+
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
|
|
88
82
|
"unit-test:browser": "echo skipped",
|
|
83
|
+
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
|
84
|
+
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
|
|
89
85
|
"integration-test:browser": "echo skipped",
|
|
90
|
-
"integration-test:node": "echo skipped",
|
|
91
|
-
"integration-test": "echo skipped",
|
|
92
86
|
"docs": "echo skipped"
|
|
93
87
|
},
|
|
94
88
|
"sideEffects": false,
|
|
@@ -30,40 +30,21 @@ export interface ErrorResponse {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
// @public (undocumented)
|
|
33
|
-
export class FeatureClient extends
|
|
34
|
-
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: FeatureClientOptionalParams);
|
|
35
|
-
// (undocumented)
|
|
36
|
-
features: Features;
|
|
37
|
-
listOperations(options?: FeatureClientListOperationsOptionalParams): PagedAsyncIterableIterator<Operation>;
|
|
38
|
-
// (undocumented)
|
|
39
|
-
subscriptionFeatureRegistrations: SubscriptionFeatureRegistrations;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// @public (undocumented)
|
|
43
|
-
export class FeatureClientContext extends coreClient.ServiceClient {
|
|
33
|
+
export class FeatureClient extends coreClient.ServiceClient {
|
|
44
34
|
// (undocumented)
|
|
45
35
|
$host: string;
|
|
46
36
|
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: FeatureClientOptionalParams);
|
|
47
37
|
// (undocumented)
|
|
48
38
|
apiVersion: string;
|
|
49
39
|
// (undocumented)
|
|
40
|
+
features: Features;
|
|
41
|
+
listOperations(options?: ListOperationsOptionalParams): PagedAsyncIterableIterator<Operation>;
|
|
42
|
+
// (undocumented)
|
|
43
|
+
subscriptionFeatureRegistrations: SubscriptionFeatureRegistrations;
|
|
44
|
+
// (undocumented)
|
|
50
45
|
subscriptionId: string;
|
|
51
46
|
}
|
|
52
47
|
|
|
53
|
-
// @public
|
|
54
|
-
export interface FeatureClientListOperationsNextOptionalParams extends coreClient.OperationOptions {
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// @public
|
|
58
|
-
export type FeatureClientListOperationsNextResponse = OperationListResult;
|
|
59
|
-
|
|
60
|
-
// @public
|
|
61
|
-
export interface FeatureClientListOperationsOptionalParams extends coreClient.OperationOptions {
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// @public
|
|
65
|
-
export type FeatureClientListOperationsResponse = OperationListResult;
|
|
66
|
-
|
|
67
48
|
// @public
|
|
68
49
|
export interface FeatureClientOptionalParams extends coreClient.ServiceClientOptions {
|
|
69
50
|
$host?: string;
|
|
@@ -176,6 +157,20 @@ export enum KnownSubscriptionFeatureRegistrationState {
|
|
|
176
157
|
Unregistering = "Unregistering"
|
|
177
158
|
}
|
|
178
159
|
|
|
160
|
+
// @public
|
|
161
|
+
export interface ListOperationsNextOptionalParams extends coreClient.OperationOptions {
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// @public
|
|
165
|
+
export type ListOperationsNextResponse = OperationListResult;
|
|
166
|
+
|
|
167
|
+
// @public
|
|
168
|
+
export interface ListOperationsOptionalParams extends coreClient.OperationOptions {
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// @public
|
|
172
|
+
export type ListOperationsResponse = OperationListResult;
|
|
173
|
+
|
|
179
174
|
// @public
|
|
180
175
|
export interface Operation {
|
|
181
176
|
display?: OperationDisplay;
|
|
@@ -295,7 +290,6 @@ export type SubscriptionFeatureRegistrationsListBySubscriptionResponse = Subscri
|
|
|
295
290
|
// @public
|
|
296
291
|
export type SubscriptionFeatureRegistrationState = string;
|
|
297
292
|
|
|
298
|
-
|
|
299
293
|
// (No @packageDocumentation comment for this package)
|
|
300
294
|
|
|
301
295
|
```
|
package/src/featureClient.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import * as coreClient from "@azure/core-client";
|
|
10
10
|
import * as coreAuth from "@azure/core-auth";
|
|
11
|
-
import "@azure/core-paging";
|
|
12
11
|
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
13
12
|
import {
|
|
14
13
|
FeaturesImpl,
|
|
@@ -20,18 +19,21 @@ import {
|
|
|
20
19
|
} from "./operationsInterfaces";
|
|
21
20
|
import * as Parameters from "./models/parameters";
|
|
22
21
|
import * as Mappers from "./models/mappers";
|
|
23
|
-
import { FeatureClientContext } from "./featureClientContext";
|
|
24
22
|
import {
|
|
25
23
|
FeatureClientOptionalParams,
|
|
26
24
|
Operation,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
ListOperationsNextOptionalParams,
|
|
26
|
+
ListOperationsOptionalParams,
|
|
27
|
+
ListOperationsResponse,
|
|
28
|
+
ListOperationsNextResponse
|
|
31
29
|
} from "./models";
|
|
32
30
|
|
|
33
31
|
/// <reference lib="esnext.asynciterable" />
|
|
34
|
-
export class FeatureClient extends
|
|
32
|
+
export class FeatureClient extends coreClient.ServiceClient {
|
|
33
|
+
$host: string;
|
|
34
|
+
apiVersion: string;
|
|
35
|
+
subscriptionId: string;
|
|
36
|
+
|
|
35
37
|
/**
|
|
36
38
|
* Initializes a new instance of the FeatureClient class.
|
|
37
39
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -43,7 +45,46 @@ export class FeatureClient extends FeatureClientContext {
|
|
|
43
45
|
subscriptionId: string,
|
|
44
46
|
options?: FeatureClientOptionalParams
|
|
45
47
|
) {
|
|
46
|
-
|
|
48
|
+
if (credentials === undefined) {
|
|
49
|
+
throw new Error("'credentials' cannot be null");
|
|
50
|
+
}
|
|
51
|
+
if (subscriptionId === undefined) {
|
|
52
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Initializing default values for options
|
|
56
|
+
if (!options) {
|
|
57
|
+
options = {};
|
|
58
|
+
}
|
|
59
|
+
const defaults: FeatureClientOptionalParams = {
|
|
60
|
+
requestContentType: "application/json; charset=utf-8",
|
|
61
|
+
credential: credentials
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const packageDetails = `azsdk-js-arm-features/3.0.0`;
|
|
65
|
+
const userAgentPrefix =
|
|
66
|
+
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
67
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
68
|
+
: `${packageDetails}`;
|
|
69
|
+
|
|
70
|
+
if (!options.credentialScopes) {
|
|
71
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
72
|
+
}
|
|
73
|
+
const optionsWithDefaults = {
|
|
74
|
+
...defaults,
|
|
75
|
+
...options,
|
|
76
|
+
userAgentOptions: {
|
|
77
|
+
userAgentPrefix
|
|
78
|
+
},
|
|
79
|
+
baseUri: options.endpoint || "https://management.azure.com"
|
|
80
|
+
};
|
|
81
|
+
super(optionsWithDefaults);
|
|
82
|
+
// Parameter assignments
|
|
83
|
+
this.subscriptionId = subscriptionId;
|
|
84
|
+
|
|
85
|
+
// Assigning values to Constant parameters
|
|
86
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
87
|
+
this.apiVersion = options.apiVersion || "2021-07-01";
|
|
47
88
|
this.features = new FeaturesImpl(this);
|
|
48
89
|
this.subscriptionFeatureRegistrations = new SubscriptionFeatureRegistrationsImpl(
|
|
49
90
|
this
|
|
@@ -55,7 +96,7 @@ export class FeatureClient extends FeatureClientContext {
|
|
|
55
96
|
* @param options The options parameters.
|
|
56
97
|
*/
|
|
57
98
|
public listOperations(
|
|
58
|
-
options?:
|
|
99
|
+
options?: ListOperationsOptionalParams
|
|
59
100
|
): PagedAsyncIterableIterator<Operation> {
|
|
60
101
|
const iter = this.listOperationsPagingAll(options);
|
|
61
102
|
return {
|
|
@@ -72,7 +113,7 @@ export class FeatureClient extends FeatureClientContext {
|
|
|
72
113
|
}
|
|
73
114
|
|
|
74
115
|
private async *listOperationsPagingPage(
|
|
75
|
-
options?:
|
|
116
|
+
options?: ListOperationsOptionalParams
|
|
76
117
|
): AsyncIterableIterator<Operation[]> {
|
|
77
118
|
let result = await this._listOperations(options);
|
|
78
119
|
yield result.value || [];
|
|
@@ -85,7 +126,7 @@ export class FeatureClient extends FeatureClientContext {
|
|
|
85
126
|
}
|
|
86
127
|
|
|
87
128
|
private async *listOperationsPagingAll(
|
|
88
|
-
options?:
|
|
129
|
+
options?: ListOperationsOptionalParams
|
|
89
130
|
): AsyncIterableIterator<Operation> {
|
|
90
131
|
for await (const page of this.listOperationsPagingPage(options)) {
|
|
91
132
|
yield* page;
|
|
@@ -97,8 +138,8 @@ export class FeatureClient extends FeatureClientContext {
|
|
|
97
138
|
* @param options The options parameters.
|
|
98
139
|
*/
|
|
99
140
|
private _listOperations(
|
|
100
|
-
options?:
|
|
101
|
-
): Promise<
|
|
141
|
+
options?: ListOperationsOptionalParams
|
|
142
|
+
): Promise<ListOperationsResponse> {
|
|
102
143
|
return this.sendOperationRequest({ options }, listOperationsOperationSpec);
|
|
103
144
|
}
|
|
104
145
|
|
|
@@ -109,8 +150,8 @@ export class FeatureClient extends FeatureClientContext {
|
|
|
109
150
|
*/
|
|
110
151
|
private _listOperationsNext(
|
|
111
152
|
nextLink: string,
|
|
112
|
-
options?:
|
|
113
|
-
): Promise<
|
|
153
|
+
options?: ListOperationsNextOptionalParams
|
|
154
|
+
): Promise<ListOperationsNextResponse> {
|
|
114
155
|
return this.sendOperationRequest(
|
|
115
156
|
{ nextLink, options },
|
|
116
157
|
listOperationsNextOperationSpec
|
package/src/index.ts
CHANGED
package/src/models/index.ts
CHANGED
|
@@ -82,25 +82,6 @@ export interface FeatureProperties {
|
|
|
82
82
|
state?: string;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
/** An Azure proxy resource. */
|
|
86
|
-
export interface ProxyResource {
|
|
87
|
-
/**
|
|
88
|
-
* Azure resource Id.
|
|
89
|
-
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
90
|
-
*/
|
|
91
|
-
readonly id?: string;
|
|
92
|
-
/**
|
|
93
|
-
* Azure resource name.
|
|
94
|
-
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
95
|
-
*/
|
|
96
|
-
readonly name?: string;
|
|
97
|
-
/**
|
|
98
|
-
* Azure resource type.
|
|
99
|
-
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
100
|
-
*/
|
|
101
|
-
readonly type?: string;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
85
|
export interface SubscriptionFeatureRegistrationProperties {
|
|
105
86
|
/**
|
|
106
87
|
* The tenantId.
|
|
@@ -188,6 +169,25 @@ export interface AuthorizationProfile {
|
|
|
188
169
|
readonly approver?: string;
|
|
189
170
|
}
|
|
190
171
|
|
|
172
|
+
/** An Azure proxy resource. */
|
|
173
|
+
export interface ProxyResource {
|
|
174
|
+
/**
|
|
175
|
+
* Azure resource Id.
|
|
176
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
177
|
+
*/
|
|
178
|
+
readonly id?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Azure resource name.
|
|
181
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
182
|
+
*/
|
|
183
|
+
readonly name?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Azure resource type.
|
|
186
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
187
|
+
*/
|
|
188
|
+
readonly type?: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
191
|
/** The list of subscription feature registrations. */
|
|
192
192
|
export interface SubscriptionFeatureRegistrationList {
|
|
193
193
|
/** The link used to get the next page of subscription feature registrations list. */
|
|
@@ -246,18 +246,18 @@ export enum KnownSubscriptionFeatureRegistrationApprovalType {
|
|
|
246
246
|
export type SubscriptionFeatureRegistrationApprovalType = string;
|
|
247
247
|
|
|
248
248
|
/** Optional parameters. */
|
|
249
|
-
export interface
|
|
249
|
+
export interface ListOperationsOptionalParams
|
|
250
250
|
extends coreClient.OperationOptions {}
|
|
251
251
|
|
|
252
252
|
/** Contains response data for the listOperations operation. */
|
|
253
|
-
export type
|
|
253
|
+
export type ListOperationsResponse = OperationListResult;
|
|
254
254
|
|
|
255
255
|
/** Optional parameters. */
|
|
256
|
-
export interface
|
|
256
|
+
export interface ListOperationsNextOptionalParams
|
|
257
257
|
extends coreClient.OperationOptions {}
|
|
258
258
|
|
|
259
259
|
/** Contains response data for the listOperationsNext operation. */
|
|
260
|
-
export type
|
|
260
|
+
export type ListOperationsNextResponse = OperationListResult;
|
|
261
261
|
|
|
262
262
|
/** Optional parameters. */
|
|
263
263
|
export interface FeaturesListAllOptionalParams
|
package/src/models/mappers.ts
CHANGED
|
@@ -211,36 +211,6 @@ export const FeatureProperties: coreClient.CompositeMapper = {
|
|
|
211
211
|
}
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
export const ProxyResource: coreClient.CompositeMapper = {
|
|
215
|
-
type: {
|
|
216
|
-
name: "Composite",
|
|
217
|
-
className: "ProxyResource",
|
|
218
|
-
modelProperties: {
|
|
219
|
-
id: {
|
|
220
|
-
serializedName: "id",
|
|
221
|
-
readOnly: true,
|
|
222
|
-
type: {
|
|
223
|
-
name: "String"
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
name: {
|
|
227
|
-
serializedName: "name",
|
|
228
|
-
readOnly: true,
|
|
229
|
-
type: {
|
|
230
|
-
name: "String"
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
type: {
|
|
234
|
-
serializedName: "type",
|
|
235
|
-
readOnly: true,
|
|
236
|
-
type: {
|
|
237
|
-
name: "String"
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
|
|
244
214
|
export const SubscriptionFeatureRegistrationProperties: coreClient.CompositeMapper = {
|
|
245
215
|
type: {
|
|
246
216
|
name: "Composite",
|
|
@@ -333,6 +303,7 @@ export const SubscriptionFeatureRegistrationProperties: coreClient.CompositeMapp
|
|
|
333
303
|
}
|
|
334
304
|
},
|
|
335
305
|
shouldFeatureDisplayInPortal: {
|
|
306
|
+
defaultValue: false,
|
|
336
307
|
serializedName: "shouldFeatureDisplayInPortal",
|
|
337
308
|
type: {
|
|
338
309
|
name: "Boolean"
|
|
@@ -395,6 +366,36 @@ export const AuthorizationProfile: coreClient.CompositeMapper = {
|
|
|
395
366
|
}
|
|
396
367
|
};
|
|
397
368
|
|
|
369
|
+
export const ProxyResource: coreClient.CompositeMapper = {
|
|
370
|
+
type: {
|
|
371
|
+
name: "Composite",
|
|
372
|
+
className: "ProxyResource",
|
|
373
|
+
modelProperties: {
|
|
374
|
+
id: {
|
|
375
|
+
serializedName: "id",
|
|
376
|
+
readOnly: true,
|
|
377
|
+
type: {
|
|
378
|
+
name: "String"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
name: {
|
|
382
|
+
serializedName: "name",
|
|
383
|
+
readOnly: true,
|
|
384
|
+
type: {
|
|
385
|
+
name: "String"
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
type: {
|
|
389
|
+
serializedName: "type",
|
|
390
|
+
readOnly: true,
|
|
391
|
+
type: {
|
|
392
|
+
name: "String"
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
|
|
398
399
|
export const SubscriptionFeatureRegistrationList: coreClient.CompositeMapper = {
|
|
399
400
|
type: {
|
|
400
401
|
name: "Composite",
|
|
@@ -6,13 +6,12 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import "@azure/core-paging";
|
|
10
9
|
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
11
10
|
import { Features } from "../operationsInterfaces";
|
|
12
11
|
import * as coreClient from "@azure/core-client";
|
|
13
12
|
import * as Mappers from "../models/mappers";
|
|
14
13
|
import * as Parameters from "../models/parameters";
|
|
15
|
-
import {
|
|
14
|
+
import { FeatureClient } from "../featureClient";
|
|
16
15
|
import {
|
|
17
16
|
FeatureResult,
|
|
18
17
|
FeaturesListAllNextOptionalParams,
|
|
@@ -32,15 +31,15 @@ import {
|
|
|
32
31
|
} from "../models";
|
|
33
32
|
|
|
34
33
|
/// <reference lib="esnext.asynciterable" />
|
|
35
|
-
/** Class
|
|
34
|
+
/** Class containing Features operations. */
|
|
36
35
|
export class FeaturesImpl implements Features {
|
|
37
|
-
private readonly client:
|
|
36
|
+
private readonly client: FeatureClient;
|
|
38
37
|
|
|
39
38
|
/**
|
|
40
39
|
* Initialize a new instance of the class Features class.
|
|
41
40
|
* @param client Reference to the service client
|
|
42
41
|
*/
|
|
43
|
-
constructor(client:
|
|
42
|
+
constructor(client: FeatureClient) {
|
|
44
43
|
this.client = client;
|
|
45
44
|
}
|
|
46
45
|
|