@azure/arm-resourcegraph 4.2.1 → 5.0.0-beta.1
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 +11 -0
- package/LICENSE +21 -0
- package/README.md +69 -80
- package/{esm/models/mappers.js → dist/index.js} +544 -548
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/accessAPropertiesField.d.ts +2 -0
- package/dist-esm/samples-dev/accessAPropertiesField.d.ts.map +1 -0
- package/dist-esm/samples-dev/accessAPropertiesField.js +32 -0
- package/dist-esm/samples-dev/accessAPropertiesField.js.map +1 -0
- package/dist-esm/samples-dev/basicManagementGroupQuery.d.ts +2 -0
- package/dist-esm/samples-dev/basicManagementGroupQuery.d.ts.map +1 -0
- package/dist-esm/samples-dev/basicManagementGroupQuery.js +32 -0
- package/dist-esm/samples-dev/basicManagementGroupQuery.js.map +1 -0
- package/dist-esm/samples-dev/basicQuery.d.ts +2 -0
- package/dist-esm/samples-dev/basicQuery.d.ts.map +1 -0
- package/dist-esm/samples-dev/basicQuery.js +32 -0
- package/dist-esm/samples-dev/basicQuery.js.map +1 -0
- package/dist-esm/samples-dev/basicTenantQuery.d.ts +2 -0
- package/dist-esm/samples-dev/basicTenantQuery.d.ts.map +1 -0
- package/dist-esm/samples-dev/basicTenantQuery.js +31 -0
- package/dist-esm/samples-dev/basicTenantQuery.js.map +1 -0
- package/dist-esm/samples-dev/complexQuery.d.ts +2 -0
- package/dist-esm/samples-dev/complexQuery.d.ts.map +1 -0
- package/dist-esm/samples-dev/complexQuery.js +32 -0
- package/dist-esm/samples-dev/complexQuery.js.map +1 -0
- package/dist-esm/samples-dev/filterResources.d.ts +2 -0
- package/dist-esm/samples-dev/filterResources.d.ts.map +1 -0
- package/dist-esm/samples-dev/filterResources.js +32 -0
- package/dist-esm/samples-dev/filterResources.js.map +1 -0
- package/dist-esm/samples-dev/firstPageQuery.d.ts +2 -0
- package/dist-esm/samples-dev/firstPageQuery.d.ts.map +1 -0
- package/dist-esm/samples-dev/firstPageQuery.js +33 -0
- package/dist-esm/samples-dev/firstPageQuery.js.map +1 -0
- package/dist-esm/samples-dev/nextPageQuery.d.ts +2 -0
- package/dist-esm/samples-dev/nextPageQuery.d.ts.map +1 -0
- package/dist-esm/samples-dev/nextPageQuery.js +35 -0
- package/dist-esm/samples-dev/nextPageQuery.js.map +1 -0
- package/dist-esm/samples-dev/operationsList.d.ts +2 -0
- package/dist-esm/samples-dev/operationsList.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsList.js +42 -0
- package/dist-esm/samples-dev/operationsList.js.map +1 -0
- package/dist-esm/samples-dev/queryWithAFacetRequest.d.ts +2 -0
- package/dist-esm/samples-dev/queryWithAFacetRequest.d.ts.map +1 -0
- package/dist-esm/samples-dev/queryWithAFacetRequest.js +51 -0
- package/dist-esm/samples-dev/queryWithAFacetRequest.js.map +1 -0
- package/dist-esm/samples-dev/randomPageQuery.d.ts +2 -0
- package/dist-esm/samples-dev/randomPageQuery.d.ts.map +1 -0
- package/dist-esm/samples-dev/randomPageQuery.js +33 -0
- package/dist-esm/samples-dev/randomPageQuery.js.map +1 -0
- package/dist-esm/samples-dev/resourceHistoryManagementGroupScopeQuery.d.ts +2 -0
- package/dist-esm/samples-dev/resourceHistoryManagementGroupScopeQuery.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceHistoryManagementGroupScopeQuery.js +38 -0
- package/dist-esm/samples-dev/resourceHistoryManagementGroupScopeQuery.js.map +1 -0
- package/dist-esm/samples-dev/resourceHistoryQuery.d.ts +2 -0
- package/dist-esm/samples-dev/resourceHistoryQuery.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceHistoryQuery.js +38 -0
- package/dist-esm/samples-dev/resourceHistoryQuery.js.map +1 -0
- package/dist-esm/samples-dev/summarizeResourcesByLocation.d.ts +2 -0
- package/dist-esm/samples-dev/summarizeResourcesByLocation.d.ts.map +1 -0
- package/dist-esm/samples-dev/summarizeResourcesByLocation.js +32 -0
- package/dist-esm/samples-dev/summarizeResourcesByLocation.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +216 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/{src/models/operationsMappers.ts → dist-esm/src/models/index.js} +2 -10
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +26 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +655 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +8 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +61 -0
- package/dist-esm/src/models/parameters.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 +1 -2
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +26 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +90 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/index.js} +2 -2
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/resourceGraphClient.d.ts +28 -0
- package/dist-esm/src/resourceGraphClient.d.ts.map +1 -0
- package/dist-esm/src/resourceGraphClient.js +103 -0
- package/dist-esm/src/resourceGraphClient.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +75 -33
- package/review/arm-resourcegraph.api.md +214 -0
- package/rollup.config.js +181 -30
- package/src/index.ts +12 -0
- package/src/models/index.ts +192 -644
- package/src/models/mappers.ts +276 -573
- package/src/models/parameters.ts +39 -21
- package/src/operations/index.ts +1 -2
- package/src/operations/operations.ts +64 -42
- package/{esm/models/index.js → src/operationsInterfaces/index.ts} +2 -1
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/resourceGraphClient.ts +88 -269
- package/tsconfig.json +5 -4
- package/types/arm-resourcegraph.d.ts +284 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-resourcegraph.js +0 -1359
- package/dist/arm-resourcegraph.js.map +0 -1
- package/dist/arm-resourcegraph.min.js +0 -1
- package/dist/arm-resourcegraph.min.js.map +0 -1
- package/esm/models/index.d.ts +0 -659
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -37
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -6
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -55
- package/esm/models/parameters.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -28
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -46
- package/esm/operations/operations.js.map +0 -1
- package/esm/resourceGraphClient.d.ts +0 -95
- package/esm/resourceGraphClient.d.ts.map +0 -1
- package/esm/resourceGraphClient.js +0 -155
- package/esm/resourceGraphClient.js.map +0 -1
- package/esm/resourceGraphClientContext.d.ts +0 -19
- package/esm/resourceGraphClientContext.d.ts.map +0 -1
- package/esm/resourceGraphClientContext.js +0 -55
- package/esm/resourceGraphClientContext.js.map +0 -1
- package/src/resourceGraphClientContext.ts +0 -65
package/src/models/parameters.ts
CHANGED
|
@@ -3,55 +3,73 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
7
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
|
-
import
|
|
9
|
+
import {
|
|
10
|
+
OperationParameter,
|
|
11
|
+
OperationURLParameter,
|
|
12
|
+
OperationQueryParameter
|
|
13
|
+
} from "@azure/core-client";
|
|
14
|
+
import {
|
|
15
|
+
QueryRequest as QueryRequestMapper,
|
|
16
|
+
ResourcesHistoryRequest as ResourcesHistoryRequestMapper
|
|
17
|
+
} from "../models/mappers";
|
|
11
18
|
|
|
12
|
-
export const
|
|
13
|
-
parameterPath: "
|
|
19
|
+
export const contentType: OperationParameter = {
|
|
20
|
+
parameterPath: ["options", "contentType"],
|
|
14
21
|
mapper: {
|
|
15
|
-
|
|
16
|
-
|
|
22
|
+
defaultValue: "application/json",
|
|
23
|
+
isConstant: true,
|
|
24
|
+
serializedName: "Content-Type",
|
|
17
25
|
type: {
|
|
18
26
|
name: "String"
|
|
19
27
|
}
|
|
20
28
|
}
|
|
21
29
|
};
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
|
|
31
|
+
export const query: OperationParameter = {
|
|
32
|
+
parameterPath: "query",
|
|
33
|
+
mapper: QueryRequestMapper
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const accept: OperationParameter = {
|
|
37
|
+
parameterPath: "accept",
|
|
24
38
|
mapper: {
|
|
25
|
-
|
|
39
|
+
defaultValue: "application/json",
|
|
26
40
|
isConstant: true,
|
|
27
|
-
serializedName: "
|
|
28
|
-
defaultValue: "2020-09-01-preview",
|
|
41
|
+
serializedName: "Accept",
|
|
29
42
|
type: {
|
|
30
43
|
name: "String"
|
|
31
44
|
}
|
|
32
45
|
}
|
|
33
46
|
};
|
|
34
|
-
|
|
35
|
-
|
|
47
|
+
|
|
48
|
+
export const $host: OperationURLParameter = {
|
|
49
|
+
parameterPath: "$host",
|
|
36
50
|
mapper: {
|
|
51
|
+
serializedName: "$host",
|
|
37
52
|
required: true,
|
|
38
|
-
isConstant: true,
|
|
39
|
-
serializedName: "api-version",
|
|
40
|
-
defaultValue: "2021-03-01",
|
|
41
53
|
type: {
|
|
42
54
|
name: "String"
|
|
43
55
|
}
|
|
44
|
-
}
|
|
56
|
+
},
|
|
57
|
+
skipEncoding: true
|
|
45
58
|
};
|
|
46
|
-
|
|
59
|
+
|
|
60
|
+
export const apiVersion: OperationQueryParameter = {
|
|
47
61
|
parameterPath: "apiVersion",
|
|
48
62
|
mapper: {
|
|
49
|
-
|
|
63
|
+
defaultValue: "2021-06-01-preview",
|
|
50
64
|
isConstant: true,
|
|
51
65
|
serializedName: "api-version",
|
|
52
|
-
defaultValue: "2020-04-01-preview",
|
|
53
66
|
type: {
|
|
54
67
|
name: "String"
|
|
55
68
|
}
|
|
56
69
|
}
|
|
57
70
|
};
|
|
71
|
+
|
|
72
|
+
export const request: OperationParameter = {
|
|
73
|
+
parameterPath: "request",
|
|
74
|
+
mapper: ResourcesHistoryRequestMapper
|
|
75
|
+
};
|
package/src/operations/index.ts
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
7
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
export * from "./operations";
|
|
@@ -3,67 +3,86 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
7
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import * as
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { Operations } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
13
|
import * as Parameters from "../models/parameters";
|
|
14
|
-
import {
|
|
14
|
+
import { ResourceGraphClient } from "../resourceGraphClient";
|
|
15
|
+
import {
|
|
16
|
+
Operation,
|
|
17
|
+
OperationsListOptionalParams,
|
|
18
|
+
OperationsListResponse
|
|
19
|
+
} from "../models";
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
/// <reference lib="esnext.asynciterable" />
|
|
22
|
+
/** Class containing Operations operations. */
|
|
23
|
+
export class OperationsImpl implements Operations {
|
|
24
|
+
private readonly client: ResourceGraphClient;
|
|
19
25
|
|
|
20
26
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @param
|
|
27
|
+
* Initialize a new instance of the class Operations class.
|
|
28
|
+
* @param client Reference to the service client
|
|
23
29
|
*/
|
|
24
|
-
constructor(client:
|
|
30
|
+
constructor(client: ResourceGraphClient) {
|
|
25
31
|
this.client = client;
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
/**
|
|
29
35
|
* Lists all of the available REST API operations.
|
|
30
|
-
* @param
|
|
31
|
-
* @returns Promise<Models.OperationsListResponse>
|
|
36
|
+
* @param options The options parameters.
|
|
32
37
|
*/
|
|
33
|
-
list(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
public list(
|
|
39
|
+
options?: OperationsListOptionalParams
|
|
40
|
+
): PagedAsyncIterableIterator<Operation> {
|
|
41
|
+
const iter = this.listPagingAll(options);
|
|
42
|
+
return {
|
|
43
|
+
next() {
|
|
44
|
+
return iter.next();
|
|
45
|
+
},
|
|
46
|
+
[Symbol.asyncIterator]() {
|
|
47
|
+
return this;
|
|
48
|
+
},
|
|
49
|
+
byPage: () => {
|
|
50
|
+
return this.listPagingPage(options);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
private async *listPagingPage(
|
|
56
|
+
options?: OperationsListOptionalParams
|
|
57
|
+
): AsyncIterableIterator<Operation[]> {
|
|
58
|
+
let result = await this._list(options);
|
|
59
|
+
yield result.value || [];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
private async *listPagingAll(
|
|
63
|
+
options?: OperationsListOptionalParams
|
|
64
|
+
): AsyncIterableIterator<Operation> {
|
|
65
|
+
for await (const page of this.listPagingPage(options)) {
|
|
66
|
+
yield* page;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
38
70
|
/**
|
|
39
|
-
*
|
|
40
|
-
* @param
|
|
71
|
+
* Lists all of the available REST API operations.
|
|
72
|
+
* @param options The options parameters.
|
|
41
73
|
*/
|
|
42
|
-
|
|
43
|
-
options
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
list(
|
|
47
|
-
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>,
|
|
48
|
-
callback?: msRest.ServiceCallback<Models.OperationListResult>
|
|
49
|
-
): Promise<Models.OperationsListResponse> {
|
|
50
|
-
return this.client.sendOperationRequest(
|
|
51
|
-
{
|
|
52
|
-
options
|
|
53
|
-
},
|
|
54
|
-
listOperationSpec,
|
|
55
|
-
callback
|
|
56
|
-
) as Promise<Models.OperationsListResponse>;
|
|
74
|
+
private _list(
|
|
75
|
+
options?: OperationsListOptionalParams
|
|
76
|
+
): Promise<OperationsListResponse> {
|
|
77
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
57
78
|
}
|
|
58
79
|
}
|
|
59
|
-
|
|
60
80
|
// Operation Specifications
|
|
61
|
-
const serializer =
|
|
62
|
-
|
|
81
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
82
|
+
|
|
83
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
84
|
+
path: "/providers/Microsoft.ResourceGraph/operations",
|
|
63
85
|
httpMethod: "GET",
|
|
64
|
-
path: "providers/Microsoft.ResourceGraph/operations",
|
|
65
|
-
queryParameters: [Parameters.apiVersion1],
|
|
66
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
67
86
|
responses: {
|
|
68
87
|
200: {
|
|
69
88
|
bodyMapper: Mappers.OperationListResult
|
|
@@ -72,5 +91,8 @@ const listOperationSpec: msRest.OperationSpec = {
|
|
|
72
91
|
bodyMapper: Mappers.ErrorResponse
|
|
73
92
|
}
|
|
74
93
|
},
|
|
94
|
+
queryParameters: [Parameters.apiVersion],
|
|
95
|
+
urlParameters: [Parameters.$host],
|
|
96
|
+
headerParameters: [Parameters.accept],
|
|
75
97
|
serializer
|
|
76
98
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { Operation, OperationsListOptionalParams } from "../models";
|
|
11
|
+
|
|
12
|
+
/// <reference lib="esnext.asynciterable" />
|
|
13
|
+
/** Interface representing a Operations. */
|
|
14
|
+
export interface Operations {
|
|
15
|
+
/**
|
|
16
|
+
* Lists all of the available REST API operations.
|
|
17
|
+
* @param options The options parameters.
|
|
18
|
+
*/
|
|
19
|
+
list(
|
|
20
|
+
options?: OperationsListOptionalParams
|
|
21
|
+
): PagedAsyncIterableIterator<Operation>;
|
|
22
|
+
}
|