@azure/arm-portal 1.0.0-beta.3 → 1.0.0-beta.5
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 +21 -3
- package/LICENSE +1 -1
- package/README.md +8 -8
- package/dist/index.js +173 -59
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/dashboardsCreateOrUpdateSample.js +11 -3
- package/dist-esm/samples-dev/dashboardsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/dashboardsDeleteSample.js +11 -3
- package/dist-esm/samples-dev/dashboardsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/dashboardsGetSample.js +11 -3
- package/dist-esm/samples-dev/dashboardsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/dashboardsListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/dashboardsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/dashboardsListBySubscriptionSample.js +10 -2
- package/dist-esm/samples-dev/dashboardsListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/dashboardsUpdateSample.js +11 -3
- package/dist-esm/samples-dev/dashboardsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/listTenantConfigurationViolationsListSample.js +10 -2
- package/dist-esm/samples-dev/listTenantConfigurationViolationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +10 -2
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/tenantConfigurationsCreateSample.js +10 -2
- package/dist-esm/samples-dev/tenantConfigurationsCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/tenantConfigurationsDeleteSample.js +10 -2
- package/dist-esm/samples-dev/tenantConfigurationsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/tenantConfigurationsGetSample.js +10 -2
- package/dist-esm/samples-dev/tenantConfigurationsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/tenantConfigurationsListSample.js +10 -2
- package/dist-esm/samples-dev/tenantConfigurationsListSample.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +7 -5
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +1 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/operations/dashboards.d.ts.map +1 -1
- package/dist-esm/src/operations/dashboards.js +37 -16
- package/dist-esm/src/operations/dashboards.js.map +1 -1
- package/dist-esm/src/operations/listTenantConfigurationViolations.d.ts.map +1 -1
- package/dist-esm/src/operations/listTenantConfigurationViolations.js +19 -8
- package/dist-esm/src/operations/listTenantConfigurationViolations.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +19 -8
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/tenantConfigurations.d.ts.map +1 -1
- package/dist-esm/src/operations/tenantConfigurations.js +19 -8
- package/dist-esm/src/operations/tenantConfigurations.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/src/portal.d.ts +2 -0
- package/dist-esm/src/portal.d.ts.map +1 -1
- package/dist-esm/src/portal.js +49 -18
- package/dist-esm/src/portal.js.map +1 -1
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +17 -12
- package/review/arm-portal.api.md +10 -7
- package/src/index.ts +1 -0
- package/src/models/index.ts +6 -5
- package/src/operations/dashboards.ts +46 -19
- package/src/operations/listTenantConfigurationViolations.ts +21 -9
- package/src/operations/operations.ts +21 -9
- package/src/operations/tenantConfigurations.ts +21 -9
- package/src/pagingHelper.ts +39 -0
- package/src/portal.ts +60 -20
- package/types/arm-portal.d.ts +18 -5
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenantConfigurations.js","sourceRoot":"","sources":["../../../src/operations/tenantConfigurations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;
|
|
1
|
+
{"version":3,"file":"tenantConfigurations.js","sourceRoot":"","sources":["../../../src/operations/tenantConfigurations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAgBnD,4CAA4C;AAC5C,wDAAwD;AACxD,MAAM,OAAO,wBAAwB;IAGnC;;;OAGG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAgD;QAEhD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE;oBACzB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;iBACpE;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3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AE,UAAU,CAAC,iBAAiB,CAAC;IAC/D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PageInfo {
|
|
2
|
+
continuationToken?: string;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
6
|
+
* returns a continuation token that can be used to begin paging from
|
|
7
|
+
* that point later.
|
|
8
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
9
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getContinuationToken(page: unknown): string | undefined;
|
|
12
|
+
export declare function setContinuationToken(page: unknown, continuationToken: string | undefined): void;
|
|
13
|
+
//# sourceMappingURL=pagingHelper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagingHelper.d.ts","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,QAAQ;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAID;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAKtE;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,EACb,iBAAiB,EAAE,MAAM,GAAG,SAAS,GACpC,IAAI,CAON"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
const pageMap = new WeakMap();
|
|
9
|
+
/**
|
|
10
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
11
|
+
* returns a continuation token that can be used to begin paging from
|
|
12
|
+
* that point later.
|
|
13
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
14
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
15
|
+
*/
|
|
16
|
+
export function getContinuationToken(page) {
|
|
17
|
+
var _a;
|
|
18
|
+
if (typeof page !== "object" || page === null) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
|
22
|
+
}
|
|
23
|
+
export function setContinuationToken(page, continuationToken) {
|
|
24
|
+
var _a;
|
|
25
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
|
29
|
+
pageInfo.continuationToken = continuationToken;
|
|
30
|
+
pageMap.set(page, pageInfo);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=pagingHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;QAC7C,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE;QACnE,OAAO;KACR;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC"}
|
package/dist-esm/src/portal.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export declare class Portal extends coreClient.ServiceClient {
|
|
|
14
14
|
* @param options The parameter options
|
|
15
15
|
*/
|
|
16
16
|
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: PortalOptionalParams);
|
|
17
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
18
|
+
private addCustomApiVersionPolicy;
|
|
17
19
|
operations: Operations;
|
|
18
20
|
dashboards: Dashboards;
|
|
19
21
|
tenantConfigurations: TenantConfigurations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../src/portal.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../src/portal.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAO7C,OAAO,EACL,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,iCAAiC,EAClC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,qBAAa,MAAO,SAAQ,UAAU,CAAC,aAAa;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,oBAAoB;IAiFhC,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,iCAAiC,EAAE,iCAAiC,CAAC;CACtE"}
|
package/dist-esm/src/portal.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
8
9
|
import * as coreClient from "@azure/core-client";
|
|
9
10
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
11
|
import { OperationsImpl, DashboardsImpl, TenantConfigurationsImpl, ListTenantConfigurationViolationsImpl } from "./operations";
|
|
@@ -17,7 +18,7 @@ export class Portal extends coreClient.ServiceClient {
|
|
|
17
18
|
* @param options The parameter options
|
|
18
19
|
*/
|
|
19
20
|
constructor(credentials, subscriptionId, options) {
|
|
20
|
-
var _a, _b;
|
|
21
|
+
var _a, _b, _c;
|
|
21
22
|
if (credentials === undefined) {
|
|
22
23
|
throw new Error("'credentials' cannot be null");
|
|
23
24
|
}
|
|
@@ -32,32 +33,34 @@ export class Portal extends coreClient.ServiceClient {
|
|
|
32
33
|
requestContentType: "application/json; charset=utf-8",
|
|
33
34
|
credential: credentials
|
|
34
35
|
};
|
|
35
|
-
const packageDetails = `azsdk-js-arm-portal/1.0.0-beta.
|
|
36
|
+
const packageDetails = `azsdk-js-arm-portal/1.0.0-beta.5`;
|
|
36
37
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
37
38
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
38
39
|
: `${packageDetails}`;
|
|
39
|
-
if (!options.credentialScopes) {
|
|
40
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
41
|
-
}
|
|
42
40
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
43
41
|
userAgentPrefix
|
|
44
|
-
},
|
|
42
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
45
43
|
super(optionsWithDefaults);
|
|
44
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
46
45
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
47
46
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
48
|
-
|
|
47
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
49
48
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
49
|
+
}
|
|
50
|
+
if (!options ||
|
|
51
|
+
!options.pipeline ||
|
|
52
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
53
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
54
|
+
this.pipeline.removePolicy({
|
|
55
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
56
|
+
});
|
|
57
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
58
|
+
credential: credentials,
|
|
59
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
60
|
+
challengeCallbacks: {
|
|
61
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
61
64
|
}
|
|
62
65
|
// Parameter assignments
|
|
63
66
|
this.subscriptionId = subscriptionId;
|
|
@@ -68,6 +71,34 @@ export class Portal extends coreClient.ServiceClient {
|
|
|
68
71
|
this.dashboards = new DashboardsImpl(this);
|
|
69
72
|
this.tenantConfigurations = new TenantConfigurationsImpl(this);
|
|
70
73
|
this.listTenantConfigurationViolations = new ListTenantConfigurationViolationsImpl(this);
|
|
74
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
75
|
+
}
|
|
76
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
77
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
78
|
+
if (!apiVersion) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const apiVersionPolicy = {
|
|
82
|
+
name: "CustomApiVersionPolicy",
|
|
83
|
+
sendRequest(request, next) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
const param = request.url.split("?");
|
|
86
|
+
if (param.length > 1) {
|
|
87
|
+
const newParams = param[1].split("&").map((item) => {
|
|
88
|
+
if (item.indexOf("api-version") > -1) {
|
|
89
|
+
return "api-version=" + apiVersion;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
return item;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
96
|
+
}
|
|
97
|
+
return next(request);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
71
102
|
}
|
|
72
103
|
}
|
|
73
104
|
//# sourceMappingURL=portal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.js","sourceRoot":"","sources":["../../src/portal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"portal.js","sourceRoot":"","sources":["../../src/portal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,cAAc,EACd,wBAAwB,EACxB,qCAAqC,EACtC,MAAM,cAAc,CAAC;AAStB,MAAM,OAAO,MAAO,SAAQ,UAAU,CAAC,aAAa;IAKlD;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA8B;;QAE9B,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAyB;YACrC,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,kCAAkC,CAAC;QAC1D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;Q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CAAC,OAAO,CAAC,CAAC;gBACvB,CAAC;aAAA;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAMF"}
|
|
@@ -6,24 +6,22 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
import { __awaiter } from "tslib";
|
|
9
|
-
import {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
(recording) => recording.replace(/"access_token":"[^"]*"/g, `"access_token":"access_token"`)
|
|
19
|
-
],
|
|
20
|
-
queryParametersToSkip: []
|
|
9
|
+
import { Recorder } from "@azure-tools/test-recorder";
|
|
10
|
+
const replaceableVariables = {
|
|
11
|
+
AZURE_CLIENT_ID: "azure_client_id",
|
|
12
|
+
AZURE_CLIENT_SECRET: "azure_client_secret",
|
|
13
|
+
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
|
|
14
|
+
SUBSCRIPTION_ID: "azure_subscription_id"
|
|
15
|
+
};
|
|
16
|
+
const recorderOptions = {
|
|
17
|
+
envSetupForPlayback: replaceableVariables
|
|
21
18
|
};
|
|
22
19
|
describe("My test", () => {
|
|
23
20
|
let recorder;
|
|
24
21
|
beforeEach(function () {
|
|
25
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
recorder =
|
|
23
|
+
recorder = new Recorder(this.currentTest);
|
|
24
|
+
yield recorder.start(recorderOptions);
|
|
27
25
|
});
|
|
28
26
|
});
|
|
29
27
|
afterEach(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,QAAQ,EAGT,MAAM,4BAA4B,CAAC;AAIpC,MAAM,oBAAoB,GAA2B;IACnD,eAAe,EAAE,iBAAiB;IAClC,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,sCAAsC;IACvD,eAAe,EAAE,uBAAuB;CACzC,CAAC;AAEF,MAAM,eAAe,GAAyB;IAC5C,mBAAmB,EAAE,oBAAoB;CAC1C,CAAC;AAEF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,IAAI,QAAkB,CAAC;IAEvB,UAAU,CAAC;;YACT,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC1C,MAAM,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QACxC,CAAC;KAAA,CAAC,CAAC;IAEH,SAAS,CAAC;;YACR,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,EAAE;;YAChB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;KAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"sdk-type": "mgmt",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "A generated SDK for Portal.",
|
|
6
|
-
"version": "1.0.0-beta.
|
|
6
|
+
"version": "1.0.0-beta.5",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": ">=
|
|
8
|
+
"node": ">=14.0.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@azure/core-paging": "^1.2.0",
|
|
12
|
-
"@azure/core-client": "^1.
|
|
12
|
+
"@azure/core-client": "^1.6.1",
|
|
13
13
|
"@azure/core-auth": "^1.3.0",
|
|
14
14
|
"@azure/core-rest-pipeline": "^1.8.0",
|
|
15
15
|
"tslib": "^2.2.0"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"module": "./dist-esm/src/index.js",
|
|
27
27
|
"types": "./types/arm-portal.d.ts",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@microsoft/api-extractor": "7.
|
|
29
|
+
"@microsoft/api-extractor": "^7.31.1",
|
|
30
30
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
31
31
|
"@rollup/plugin-json": "^4.1.0",
|
|
32
32
|
"@rollup/plugin-multi-entry": "^4.1.0",
|
|
@@ -34,15 +34,20 @@
|
|
|
34
34
|
"mkdirp": "^1.0.4",
|
|
35
35
|
"rollup": "^2.66.1",
|
|
36
36
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
37
|
-
"typescript": "~4.
|
|
37
|
+
"typescript": "~4.8.0",
|
|
38
38
|
"uglify-js": "^3.4.9",
|
|
39
39
|
"rimraf": "^3.0.0",
|
|
40
|
+
"dotenv": "^8.2.0",
|
|
40
41
|
"@azure/identity": "^2.0.1",
|
|
41
|
-
"@azure-tools/test-recorder": "^
|
|
42
|
+
"@azure-tools/test-recorder": "^2.0.0",
|
|
43
|
+
"@azure-tools/test-credential": "^1.0.0",
|
|
42
44
|
"mocha": "^7.1.1",
|
|
43
|
-
"
|
|
45
|
+
"@types/chai": "^4.2.8",
|
|
46
|
+
"chai": "^4.2.0",
|
|
47
|
+
"cross-env": "^7.0.2",
|
|
48
|
+
"@types/node": "^14.0.0",
|
|
49
|
+
"@azure/dev-tool": "^1.0.0"
|
|
44
50
|
},
|
|
45
|
-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/portal/arm-portal",
|
|
46
51
|
"repository": {
|
|
47
52
|
"type": "git",
|
|
48
53
|
"url": "https://github.com/Azure/azure-sdk-for-js.git"
|
|
@@ -91,9 +96,8 @@
|
|
|
91
96
|
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
|
|
92
97
|
"unit-test:browser": "echo skipped",
|
|
93
98
|
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
|
94
|
-
"integration-test:node": "
|
|
95
|
-
"integration-test:browser": "echo skipped"
|
|
96
|
-
"docs": "echo skipped"
|
|
99
|
+
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
|
|
100
|
+
"integration-test:browser": "echo skipped"
|
|
97
101
|
},
|
|
98
102
|
"sideEffects": false,
|
|
99
103
|
"//metadata": {
|
|
@@ -105,6 +109,7 @@
|
|
|
105
109
|
]
|
|
106
110
|
},
|
|
107
111
|
"autoPublish": true,
|
|
112
|
+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/portal/arm-portal",
|
|
108
113
|
"//sampleConfiguration": {
|
|
109
114
|
"productName": "",
|
|
110
115
|
"productSlugs": [
|
|
@@ -113,4 +118,4 @@
|
|
|
113
118
|
"disableDocsMs": true,
|
|
114
119
|
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-portal?view=azure-node-preview"
|
|
115
120
|
}
|
|
116
|
-
}
|
|
121
|
+
}
|
package/review/arm-portal.api.md
CHANGED
|
@@ -9,9 +9,9 @@ import * as coreClient from '@azure/core-client';
|
|
|
9
9
|
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
|
10
10
|
|
|
11
11
|
// @public
|
|
12
|
-
export
|
|
12
|
+
export interface Configuration extends ProxyResource {
|
|
13
13
|
enforcePrivateMarkdownStorage?: boolean;
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
15
|
|
|
16
16
|
// @public
|
|
17
17
|
export interface ConfigurationList {
|
|
@@ -153,9 +153,11 @@ export interface ErrorResponse {
|
|
|
153
153
|
error?: ErrorDefinition;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
// @public
|
|
157
|
+
export function getContinuationToken(page: unknown): string | undefined;
|
|
158
|
+
|
|
156
159
|
// @public
|
|
157
160
|
export enum KnownConfigurationName {
|
|
158
|
-
// (undocumented)
|
|
159
161
|
Default = "default"
|
|
160
162
|
}
|
|
161
163
|
|
|
@@ -179,11 +181,11 @@ export interface ListTenantConfigurationViolationsListOptionalParams extends cor
|
|
|
179
181
|
export type ListTenantConfigurationViolationsListResponse = ViolationsList;
|
|
180
182
|
|
|
181
183
|
// @public
|
|
182
|
-
export
|
|
183
|
-
type: "Extension/HubsExtension/PartType/MarkdownPart";
|
|
184
|
+
export interface MarkdownPartMetadata extends DashboardPartMetadata {
|
|
184
185
|
inputs?: Record<string, unknown>[];
|
|
185
186
|
settings?: MarkdownPartMetadataSettings;
|
|
186
|
-
|
|
187
|
+
type: "Extension/HubsExtension/PartType/MarkdownPart";
|
|
188
|
+
}
|
|
187
189
|
|
|
188
190
|
// @public
|
|
189
191
|
export interface MarkdownPartMetadataSettings {
|
|
@@ -261,7 +263,8 @@ export interface PortalOptionalParams extends coreClient.ServiceClientOptions {
|
|
|
261
263
|
}
|
|
262
264
|
|
|
263
265
|
// @public
|
|
264
|
-
export
|
|
266
|
+
export interface ProxyResource extends Resource {
|
|
267
|
+
}
|
|
265
268
|
|
|
266
269
|
// @public
|
|
267
270
|
export interface Resource {
|
package/src/index.ts
CHANGED
package/src/models/index.ts
CHANGED
|
@@ -233,26 +233,27 @@ export interface MarkdownPartMetadataSettingsContentSettings {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
/** Markdown part metadata. */
|
|
236
|
-
export
|
|
236
|
+
export interface MarkdownPartMetadata extends DashboardPartMetadata {
|
|
237
237
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
238
238
|
type: "Extension/HubsExtension/PartType/MarkdownPart";
|
|
239
239
|
/** Input to dashboard part. */
|
|
240
240
|
inputs?: Record<string, unknown>[];
|
|
241
241
|
/** Markdown part settings. */
|
|
242
242
|
settings?: MarkdownPartMetadataSettings;
|
|
243
|
-
}
|
|
243
|
+
}
|
|
244
244
|
|
|
245
245
|
/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */
|
|
246
|
-
export
|
|
246
|
+
export interface ProxyResource extends Resource {}
|
|
247
247
|
|
|
248
248
|
/** Tenant configuration. */
|
|
249
|
-
export
|
|
249
|
+
export interface Configuration extends ProxyResource {
|
|
250
250
|
/** When flag is set to true Markdown tile will require external storage configuration (URI). The inline content configuration will be prohibited. */
|
|
251
251
|
enforcePrivateMarkdownStorage?: boolean;
|
|
252
|
-
}
|
|
252
|
+
}
|
|
253
253
|
|
|
254
254
|
/** Known values of {@link ConfigurationName} that the service accepts. */
|
|
255
255
|
export enum KnownConfigurationName {
|
|
256
|
+
/** Default */
|
|
256
257
|
Default = "default"
|
|
257
258
|
}
|
|
258
259
|
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { Dashboards } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -16,8 +17,10 @@ import {
|
|
|
16
17
|
Dashboard,
|
|
17
18
|
DashboardsListByResourceGroupNextOptionalParams,
|
|
18
19
|
DashboardsListByResourceGroupOptionalParams,
|
|
20
|
+
DashboardsListByResourceGroupResponse,
|
|
19
21
|
DashboardsListBySubscriptionNextOptionalParams,
|
|
20
22
|
DashboardsListBySubscriptionOptionalParams,
|
|
23
|
+
DashboardsListBySubscriptionResponse,
|
|
21
24
|
DashboardsCreateOrUpdateOptionalParams,
|
|
22
25
|
DashboardsCreateOrUpdateResponse,
|
|
23
26
|
DashboardsDeleteOptionalParams,
|
|
@@ -26,8 +29,6 @@ import {
|
|
|
26
29
|
PatchableDashboard,
|
|
27
30
|
DashboardsUpdateOptionalParams,
|
|
28
31
|
DashboardsUpdateResponse,
|
|
29
|
-
DashboardsListByResourceGroupResponse,
|
|
30
|
-
DashboardsListBySubscriptionResponse,
|
|
31
32
|
DashboardsListByResourceGroupNextResponse,
|
|
32
33
|
DashboardsListBySubscriptionNextResponse
|
|
33
34
|
} from "../models";
|
|
@@ -62,19 +63,33 @@ export class DashboardsImpl implements Dashboards {
|
|
|
62
63
|
[Symbol.asyncIterator]() {
|
|
63
64
|
return this;
|
|
64
65
|
},
|
|
65
|
-
byPage: () => {
|
|
66
|
-
|
|
66
|
+
byPage: (settings?: PageSettings) => {
|
|
67
|
+
if (settings?.maxPageSize) {
|
|
68
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
69
|
+
}
|
|
70
|
+
return this.listByResourceGroupPagingPage(
|
|
71
|
+
resourceGroupName,
|
|
72
|
+
options,
|
|
73
|
+
settings
|
|
74
|
+
);
|
|
67
75
|
}
|
|
68
76
|
};
|
|
69
77
|
}
|
|
70
78
|
|
|
71
79
|
private async *listByResourceGroupPagingPage(
|
|
72
80
|
resourceGroupName: string,
|
|
73
|
-
options?: DashboardsListByResourceGroupOptionalParams
|
|
81
|
+
options?: DashboardsListByResourceGroupOptionalParams,
|
|
82
|
+
settings?: PageSettings
|
|
74
83
|
): AsyncIterableIterator<Dashboard[]> {
|
|
75
|
-
let result
|
|
76
|
-
|
|
77
|
-
|
|
84
|
+
let result: DashboardsListByResourceGroupResponse;
|
|
85
|
+
let continuationToken = settings?.continuationToken;
|
|
86
|
+
if (!continuationToken) {
|
|
87
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
88
|
+
let page = result.value || [];
|
|
89
|
+
continuationToken = result.nextLink;
|
|
90
|
+
setContinuationToken(page, continuationToken);
|
|
91
|
+
yield page;
|
|
92
|
+
}
|
|
78
93
|
while (continuationToken) {
|
|
79
94
|
result = await this._listByResourceGroupNext(
|
|
80
95
|
resourceGroupName,
|
|
@@ -82,7 +97,9 @@ export class DashboardsImpl implements Dashboards {
|
|
|
82
97
|
options
|
|
83
98
|
);
|
|
84
99
|
continuationToken = result.nextLink;
|
|
85
|
-
|
|
100
|
+
let page = result.value || [];
|
|
101
|
+
setContinuationToken(page, continuationToken);
|
|
102
|
+
yield page;
|
|
86
103
|
}
|
|
87
104
|
}
|
|
88
105
|
|
|
@@ -113,22 +130,34 @@ export class DashboardsImpl implements Dashboards {
|
|
|
113
130
|
[Symbol.asyncIterator]() {
|
|
114
131
|
return this;
|
|
115
132
|
},
|
|
116
|
-
byPage: () => {
|
|
117
|
-
|
|
133
|
+
byPage: (settings?: PageSettings) => {
|
|
134
|
+
if (settings?.maxPageSize) {
|
|
135
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
136
|
+
}
|
|
137
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
118
138
|
}
|
|
119
139
|
};
|
|
120
140
|
}
|
|
121
141
|
|
|
122
142
|
private async *listBySubscriptionPagingPage(
|
|
123
|
-
options?: DashboardsListBySubscriptionOptionalParams
|
|
143
|
+
options?: DashboardsListBySubscriptionOptionalParams,
|
|
144
|
+
settings?: PageSettings
|
|
124
145
|
): AsyncIterableIterator<Dashboard[]> {
|
|
125
|
-
let result
|
|
126
|
-
|
|
127
|
-
|
|
146
|
+
let result: DashboardsListBySubscriptionResponse;
|
|
147
|
+
let continuationToken = settings?.continuationToken;
|
|
148
|
+
if (!continuationToken) {
|
|
149
|
+
result = await this._listBySubscription(options);
|
|
150
|
+
let page = result.value || [];
|
|
151
|
+
continuationToken = result.nextLink;
|
|
152
|
+
setContinuationToken(page, continuationToken);
|
|
153
|
+
yield page;
|
|
154
|
+
}
|
|
128
155
|
while (continuationToken) {
|
|
129
156
|
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
130
157
|
continuationToken = result.nextLink;
|
|
131
|
-
|
|
158
|
+
let page = result.value || [];
|
|
159
|
+
setContinuationToken(page, continuationToken);
|
|
160
|
+
yield page;
|
|
132
161
|
}
|
|
133
162
|
}
|
|
134
163
|
|
|
@@ -419,7 +448,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
419
448
|
bodyMapper: Mappers.ErrorResponse
|
|
420
449
|
}
|
|
421
450
|
},
|
|
422
|
-
queryParameters: [Parameters.apiVersion],
|
|
423
451
|
urlParameters: [
|
|
424
452
|
Parameters.$host,
|
|
425
453
|
Parameters.nextLink,
|
|
@@ -440,7 +468,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
|
440
468
|
bodyMapper: Mappers.ErrorResponse
|
|
441
469
|
}
|
|
442
470
|
},
|
|
443
|
-
queryParameters: [Parameters.apiVersion],
|
|
444
471
|
urlParameters: [
|
|
445
472
|
Parameters.$host,
|
|
446
473
|
Parameters.nextLink,
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { ListTenantConfigurationViolations } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -49,22 +50,34 @@ export class ListTenantConfigurationViolationsImpl
|
|
|
49
50
|
[Symbol.asyncIterator]() {
|
|
50
51
|
return this;
|
|
51
52
|
},
|
|
52
|
-
byPage: () => {
|
|
53
|
-
|
|
53
|
+
byPage: (settings?: PageSettings) => {
|
|
54
|
+
if (settings?.maxPageSize) {
|
|
55
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
56
|
+
}
|
|
57
|
+
return this.listPagingPage(options, settings);
|
|
54
58
|
}
|
|
55
59
|
};
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
private async *listPagingPage(
|
|
59
|
-
options?: ListTenantConfigurationViolationsListOptionalParams
|
|
63
|
+
options?: ListTenantConfigurationViolationsListOptionalParams,
|
|
64
|
+
settings?: PageSettings
|
|
60
65
|
): AsyncIterableIterator<Violation[]> {
|
|
61
|
-
let result
|
|
62
|
-
|
|
63
|
-
|
|
66
|
+
let result: ListTenantConfigurationViolationsListResponse;
|
|
67
|
+
let continuationToken = settings?.continuationToken;
|
|
68
|
+
if (!continuationToken) {
|
|
69
|
+
result = await this._list(options);
|
|
70
|
+
let page = result.value || [];
|
|
71
|
+
continuationToken = result.nextLink;
|
|
72
|
+
setContinuationToken(page, continuationToken);
|
|
73
|
+
yield page;
|
|
74
|
+
}
|
|
64
75
|
while (continuationToken) {
|
|
65
76
|
result = await this._listNext(continuationToken, options);
|
|
66
77
|
continuationToken = result.nextLink;
|
|
67
|
-
|
|
78
|
+
let page = result.value || [];
|
|
79
|
+
setContinuationToken(page, continuationToken);
|
|
80
|
+
yield page;
|
|
68
81
|
}
|
|
69
82
|
}
|
|
70
83
|
|
|
@@ -131,7 +144,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
131
144
|
bodyMapper: Mappers.ErrorResponse
|
|
132
145
|
}
|
|
133
146
|
},
|
|
134
|
-
queryParameters: [Parameters.apiVersion],
|
|
135
147
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
136
148
|
headerParameters: [Parameters.accept],
|
|
137
149
|
serializer
|