@azure/arm-resourcegraph 5.0.0-beta.3 → 5.0.0-beta.4
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 +12 -2
- package/LICENSE +4 -4
- package/README.md +26 -17
- package/dist/browser/index.d.ts +5 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/index.js +4 -4
- package/dist/browser/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/models/index.d.ts +9 -9
- package/dist/browser/models/index.d.ts.map +1 -0
- package/dist/browser/models/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/models/mappers.js +14 -6
- package/dist/browser/models/mappers.js.map +1 -0
- package/{dist-esm/src → dist/browser}/models/parameters.js +1 -1
- package/dist/browser/models/parameters.js.map +1 -0
- package/dist/browser/operations/index.d.ts +2 -0
- package/{dist-esm/src → dist/browser}/operations/index.d.ts.map +1 -1
- package/{dist-esm/src → dist/browser}/operations/index.js +1 -1
- package/dist/browser/operations/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/operations.d.ts +3 -3
- package/dist/browser/operations/operations.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/operations.js +12 -27
- package/dist/browser/operations/operations.js.map +1 -0
- package/dist/browser/operationsInterfaces/index.d.ts +2 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/index.d.ts.map +1 -1
- package/{dist-esm/src → dist/browser}/operationsInterfaces/index.js +1 -1
- package/dist/browser/operationsInterfaces/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.d.ts +1 -1
- package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist/browser/operationsInterfaces/operations.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/{dist-esm/src → dist/browser}/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -0
- package/{dist-esm/src → dist/browser}/resourceGraphClient.d.ts +2 -2
- package/dist/browser/resourceGraphClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/resourceGraphClient.js +31 -26
- package/dist/browser/resourceGraphClient.js.map +1 -0
- package/dist/commonjs/index.d.ts +5 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +19 -0
- package/dist/commonjs/index.js.map +1 -0
- package/{types/arm-resourcegraph.d.ts → dist/commonjs/models/index.d.ts} +216 -295
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +10 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/mappers.d.ts +26 -0
- package/dist/commonjs/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/models/mappers.js +666 -0
- package/dist/commonjs/models/mappers.js.map +1 -0
- package/dist/commonjs/models/parameters.d.ts +8 -0
- package/dist/commonjs/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/models/parameters.js +64 -0
- package/dist/commonjs/models/parameters.js.map +1 -0
- package/dist/commonjs/operations/index.d.ts +2 -0
- package/dist/commonjs/operations/index.d.ts.map +1 -0
- package/dist/commonjs/operations/index.js +12 -0
- package/dist/commonjs/operations/index.js.map +1 -0
- package/dist/commonjs/operations/operations.d.ts +26 -0
- package/dist/commonjs/operations/operations.d.ts.map +1 -0
- package/dist/commonjs/operations/operations.js +84 -0
- package/dist/commonjs/operations/operations.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts +2 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.js +12 -0
- package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/operations.d.ts +11 -0
- package/dist/commonjs/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/operations.js +10 -0
- package/dist/commonjs/operationsInterfaces/operations.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/pagingHelper.d.ts +13 -0
- package/dist/commonjs/pagingHelper.d.ts.map +1 -0
- package/dist/commonjs/pagingHelper.js +34 -0
- package/dist/commonjs/pagingHelper.js.map +1 -0
- package/dist/commonjs/resourceGraphClient.d.ts +30 -0
- package/dist/commonjs/resourceGraphClient.d.ts.map +1 -0
- package/dist/commonjs/resourceGraphClient.js +162 -0
- package/dist/commonjs/resourceGraphClient.js.map +1 -0
- package/{types → dist/commonjs}/tsdoc-metadata.json +11 -11
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/{src/index.ts → dist/esm/index.js} +5 -5
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/models/index.d.ts +216 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/{src/operations/index.ts → dist/esm/models/index.js} +2 -2
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/mappers.d.ts +26 -0
- package/dist/esm/models/mappers.d.ts.map +1 -0
- package/dist/{index.js → esm/models/mappers.js} +35 -402
- package/dist/esm/models/mappers.js.map +1 -0
- package/dist/esm/models/parameters.d.ts +8 -0
- package/dist/esm/models/parameters.d.ts.map +1 -0
- package/dist/esm/models/parameters.js +61 -0
- package/dist/esm/models/parameters.js.map +1 -0
- package/dist/esm/operations/index.d.ts +2 -0
- package/dist/esm/operations/index.d.ts.map +1 -0
- package/dist/esm/operations/index.js +9 -0
- package/dist/esm/operations/index.js.map +1 -0
- package/dist/esm/operations/operations.d.ts +26 -0
- package/dist/esm/operations/operations.d.ts.map +1 -0
- package/dist/esm/operations/operations.js +79 -0
- package/dist/esm/operations/operations.js.map +1 -0
- package/dist/esm/operationsInterfaces/index.d.ts +2 -0
- package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/index.js +9 -0
- package/dist/esm/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/operationsInterfaces/operations.d.ts +11 -0
- package/dist/esm/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/operations.js +9 -0
- package/dist/esm/operationsInterfaces/operations.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/pagingHelper.d.ts +13 -0
- package/dist/esm/pagingHelper.d.ts.map +1 -0
- package/dist/esm/pagingHelper.js +30 -0
- package/dist/esm/pagingHelper.js.map +1 -0
- package/dist/esm/resourceGraphClient.d.ts +30 -0
- package/dist/esm/resourceGraphClient.d.ts.map +1 -0
- package/dist/esm/resourceGraphClient.js +157 -0
- package/dist/esm/resourceGraphClient.js.map +1 -0
- package/dist/react-native/index.d.ts +5 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +13 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/models/index.d.ts +216 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/{src/operationsInterfaces/index.ts → dist/react-native/models/index.js} +2 -2
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/mappers.d.ts +26 -0
- package/dist/react-native/models/mappers.d.ts.map +1 -0
- package/dist/react-native/models/mappers.js +663 -0
- package/dist/react-native/models/mappers.js.map +1 -0
- package/dist/react-native/models/parameters.d.ts +8 -0
- package/dist/react-native/models/parameters.d.ts.map +1 -0
- package/dist/react-native/models/parameters.js +61 -0
- package/dist/react-native/models/parameters.js.map +1 -0
- package/dist/react-native/operations/index.d.ts +2 -0
- package/dist/react-native/operations/index.d.ts.map +1 -0
- package/dist/react-native/operations/index.js +9 -0
- package/dist/react-native/operations/index.js.map +1 -0
- package/dist/react-native/operations/operations.d.ts +26 -0
- package/dist/react-native/operations/operations.d.ts.map +1 -0
- package/dist/react-native/operations/operations.js +79 -0
- package/dist/react-native/operations/operations.js.map +1 -0
- package/dist/react-native/operationsInterfaces/index.d.ts +2 -0
- package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/index.js +9 -0
- package/dist/react-native/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/operationsInterfaces/operations.d.ts +11 -0
- package/dist/react-native/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/operations.js +9 -0
- package/dist/react-native/operationsInterfaces/operations.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/pagingHelper.d.ts +13 -0
- package/dist/react-native/pagingHelper.d.ts.map +1 -0
- package/dist/react-native/pagingHelper.js +30 -0
- package/dist/react-native/pagingHelper.js.map +1 -0
- package/dist/react-native/resourceGraphClient.d.ts +30 -0
- package/dist/react-native/resourceGraphClient.d.ts.map +1 -0
- package/dist/react-native/resourceGraphClient.js +157 -0
- package/dist/react-native/resourceGraphClient.js.map +1 -0
- package/package.json +82 -71
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -1
- package/dist/index.min.js.map +0 -1
- package/dist-esm/samples-dev/operationsListSample.d.ts +0 -2
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/operationsListSample.js +0 -42
- package/dist-esm/samples-dev/operationsListSample.js.map +0 -1
- package/dist-esm/samples-dev/resourcesHistorySample.d.ts +0 -2
- package/dist-esm/samples-dev/resourcesHistorySample.d.ts.map +0 -1
- package/dist-esm/samples-dev/resourcesHistorySample.js +0 -63
- package/dist-esm/samples-dev/resourcesHistorySample.js.map +0 -1
- package/dist-esm/samples-dev/resourcesSample.d.ts +0 -2
- package/dist-esm/samples-dev/resourcesSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/resourcesSample.js +0 -245
- package/dist-esm/samples-dev/resourcesSample.js.map +0 -1
- package/dist-esm/src/index.d.ts +0 -6
- package/dist-esm/src/index.d.ts.map +0 -1
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/models/index.d.ts.map +0 -1
- package/dist-esm/src/models/index.js.map +0 -1
- package/dist-esm/src/models/mappers.js.map +0 -1
- package/dist-esm/src/models/parameters.js.map +0 -1
- package/dist-esm/src/operations/index.d.ts +0 -2
- package/dist-esm/src/operations/index.js.map +0 -1
- package/dist-esm/src/operations/operations.d.ts.map +0 -1
- package/dist-esm/src/operations/operations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +0 -2
- package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/operations.js.map +0 -1
- package/dist-esm/src/pagingHelper.js.map +0 -1
- package/dist-esm/src/resourceGraphClient.d.ts.map +0 -1
- package/dist-esm/src/resourceGraphClient.js.map +0 -1
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -38
- package/dist-esm/test/sampleTest.js.map +0 -1
- package/rollup.config.js +0 -122
- package/src/models/index.ts +0 -261
- package/src/models/mappers.ts +0 -684
- package/src/models/parameters.ts +0 -75
- package/src/operations/operations.ts +0 -103
- package/src/operationsInterfaces/operations.ts +0 -22
- package/src/pagingHelper.ts +0 -39
- package/src/resourceGraphClient.ts +0 -213
- package/tsconfig.json +0 -33
- /package/{dist-esm/src → dist/browser}/models/index.js +0 -0
- /package/{dist-esm/src → dist/browser}/models/mappers.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/models/mappers.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/models/parameters.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/models/parameters.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.js +0 -0
- /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts.map +0 -0
- /package/review/{arm-resourcegraph.api.md → arm-resourcegraph-node.api.md} +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
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 { QueryRequest as QueryRequestMapper, ResourcesHistoryRequest as ResourcesHistoryRequestMapper } from "../models/mappers.js";
|
|
9
|
+
export const contentType = {
|
|
10
|
+
parameterPath: ["options", "contentType"],
|
|
11
|
+
mapper: {
|
|
12
|
+
defaultValue: "application/json",
|
|
13
|
+
isConstant: true,
|
|
14
|
+
serializedName: "Content-Type",
|
|
15
|
+
type: {
|
|
16
|
+
name: "String"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export const query = {
|
|
21
|
+
parameterPath: "query",
|
|
22
|
+
mapper: QueryRequestMapper
|
|
23
|
+
};
|
|
24
|
+
export const accept = {
|
|
25
|
+
parameterPath: "accept",
|
|
26
|
+
mapper: {
|
|
27
|
+
defaultValue: "application/json",
|
|
28
|
+
isConstant: true,
|
|
29
|
+
serializedName: "Accept",
|
|
30
|
+
type: {
|
|
31
|
+
name: "String"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export const $host = {
|
|
36
|
+
parameterPath: "$host",
|
|
37
|
+
mapper: {
|
|
38
|
+
serializedName: "$host",
|
|
39
|
+
required: true,
|
|
40
|
+
type: {
|
|
41
|
+
name: "String"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
skipEncoding: true
|
|
45
|
+
};
|
|
46
|
+
export const apiVersion = {
|
|
47
|
+
parameterPath: "apiVersion",
|
|
48
|
+
mapper: {
|
|
49
|
+
defaultValue: "2021-06-01-preview",
|
|
50
|
+
isConstant: true,
|
|
51
|
+
serializedName: "api-version",
|
|
52
|
+
type: {
|
|
53
|
+
name: "String"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
export const request = {
|
|
58
|
+
parameterPath: "request",
|
|
59
|
+
mapper: ResourcesHistoryRequestMapper
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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SAAS;IACxB,MAAM,EAAE,6BAA6B;CACtC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-client\";\nimport {\n QueryRequest as QueryRequestMapper,\n ResourcesHistoryRequest as ResourcesHistoryRequestMapper\n} from \"../models/mappers.js\";\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const query: OperationParameter = {\n parameterPath: \"query\",\n mapper: QueryRequestMapper\n};\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const $host: OperationURLParameter = {\n parameterPath: \"$host\",\n mapper: {\n serializedName: \"$host\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2021-06-01-preview\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const request: OperationParameter = {\n parameterPath: \"request\",\n mapper: ResourcesHistoryRequestMapper\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operations/index.ts"],"names":[],"mappings":"AAQA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export * from "./operations.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operations/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./operations.js\";\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
2
|
+
import { Operations } from "../operationsInterfaces/index.js";
|
|
3
|
+
import { ResourceGraphClient } from "../resourceGraphClient.js";
|
|
4
|
+
import { Operation, OperationsListOptionalParams } from "../models/index.js";
|
|
5
|
+
/** Class containing Operations operations. */
|
|
6
|
+
export declare class OperationsImpl implements Operations {
|
|
7
|
+
private readonly client;
|
|
8
|
+
/**
|
|
9
|
+
* Initialize a new instance of the class Operations class.
|
|
10
|
+
* @param client Reference to the service client
|
|
11
|
+
*/
|
|
12
|
+
constructor(client: ResourceGraphClient);
|
|
13
|
+
/**
|
|
14
|
+
* Lists all of the available REST API operations.
|
|
15
|
+
* @param options The options parameters.
|
|
16
|
+
*/
|
|
17
|
+
list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;
|
|
18
|
+
private listPagingPage;
|
|
19
|
+
private listPagingAll;
|
|
20
|
+
/**
|
|
21
|
+
* Lists all of the available REST API operations.
|
|
22
|
+
* @param options The options parameters.
|
|
23
|
+
*/
|
|
24
|
+
private _list;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAgB,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAI9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,SAAS,EACT,4BAA4B,EAE7B,MAAM,oBAAoB,CAAC;AAG5B,8CAA8C;AAC9C,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAE7C;;;OAGG;gBACS,MAAM,EAAE,mBAAmB;IAIvC;;;OAGG;IACI,IAAI,CACT,OAAO,CAAC,EAAE,4BAA4B,GACrC,0BAA0B,CAAC,SAAS,CAAC;YAkBzB,cAAc;YASd,aAAa;IAQ5B;;;OAGG;IACH,OAAO,CAAC,KAAK;CAKd"}
|
|
@@ -0,0 +1,79 @@
|
|
|
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 * as coreClient from "@azure/core-client";
|
|
9
|
+
import * as Mappers from "../models/mappers.js";
|
|
10
|
+
import * as Parameters from "../models/parameters.js";
|
|
11
|
+
/// <reference lib="esnext.asynciterable" />
|
|
12
|
+
/** Class containing Operations operations. */
|
|
13
|
+
export class OperationsImpl {
|
|
14
|
+
client;
|
|
15
|
+
/**
|
|
16
|
+
* Initialize a new instance of the class Operations class.
|
|
17
|
+
* @param client Reference to the service client
|
|
18
|
+
*/
|
|
19
|
+
constructor(client) {
|
|
20
|
+
this.client = client;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Lists all of the available REST API operations.
|
|
24
|
+
* @param options The options parameters.
|
|
25
|
+
*/
|
|
26
|
+
list(options) {
|
|
27
|
+
const iter = this.listPagingAll(options);
|
|
28
|
+
return {
|
|
29
|
+
next() {
|
|
30
|
+
return iter.next();
|
|
31
|
+
},
|
|
32
|
+
[Symbol.asyncIterator]() {
|
|
33
|
+
return this;
|
|
34
|
+
},
|
|
35
|
+
byPage: (settings) => {
|
|
36
|
+
if (settings?.maxPageSize) {
|
|
37
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
38
|
+
}
|
|
39
|
+
return this.listPagingPage(options, settings);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
async *listPagingPage(options, _settings) {
|
|
44
|
+
let result;
|
|
45
|
+
result = await this._list(options);
|
|
46
|
+
yield result.value || [];
|
|
47
|
+
}
|
|
48
|
+
async *listPagingAll(options) {
|
|
49
|
+
for await (const page of this.listPagingPage(options)) {
|
|
50
|
+
yield* page;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Lists all of the available REST API operations.
|
|
55
|
+
* @param options The options parameters.
|
|
56
|
+
*/
|
|
57
|
+
_list(options) {
|
|
58
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// Operation Specifications
|
|
62
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
63
|
+
const listOperationSpec = {
|
|
64
|
+
path: "/providers/Microsoft.ResourceGraph/operations",
|
|
65
|
+
httpMethod: "GET",
|
|
66
|
+
responses: {
|
|
67
|
+
200: {
|
|
68
|
+
bodyMapper: Mappers.OperationListResult
|
|
69
|
+
},
|
|
70
|
+
default: {
|
|
71
|
+
bodyMapper: Mappers.ErrorResponse
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
queryParameters: [Parameters.apiVersion],
|
|
75
|
+
urlParameters: [Parameters.$host],
|
|
76
|
+
headerParameters: [Parameters.accept],
|
|
77
|
+
serializer
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAQtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IACR,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,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,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,OAAsC,EACtC,SAAwB;QAExB,IAAI,MAA8B,CAAC;QACnC,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACnC,MAAM,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;IAC3B,CAAC;IAEO,KAAK,CAAC,CAAC,aAAa,CAC1B,OAAsC;QAEtC,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YACtD,KAAK,CAAC,CAAC,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;OAGG;IACK,KAAK,CACX,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,+CAA+C;IACrD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { Operations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { ResourceGraphClient } from \"../resourceGraphClient.js\";\nimport {\n Operation,\n OperationsListOptionalParams,\n OperationsListResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: ResourceGraphClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: ResourceGraphClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the available REST API operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the available REST API operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ResourceGraph/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAQA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export * from "./operations.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./operations.js\";\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
2
|
+
import { Operation, OperationsListOptionalParams } from "../models/index.js";
|
|
3
|
+
/** Interface representing a Operations. */
|
|
4
|
+
export interface Operations {
|
|
5
|
+
/**
|
|
6
|
+
* Lists all of the available REST API operations.
|
|
7
|
+
* @param options The options parameters.
|
|
8
|
+
*/
|
|
9
|
+
list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/operations.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAG7E,2CAA2C;AAC3C,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,4BAA4B,GACrC,0BAA0B,CAAC,SAAS,CAAC,CAAC;CAC1C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { Operation, OperationsListOptionalParams } from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Interface representing a Operations. */\nexport interface Operations {\n /**\n * Lists all of the available REST API operations.\n * @param options The options parameters.\n */\n list(\n options?: OperationsListOptionalParams\n ): PagedAsyncIterableIterator<Operation>;\n}\n"]}
|
|
@@ -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,30 @@
|
|
|
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
|
+
if (typeof page !== "object" || page === null) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
return pageMap.get(page)?.continuationToken;
|
|
21
|
+
}
|
|
22
|
+
export function setContinuationToken(page, continuationToken) {
|
|
23
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
27
|
+
pageInfo.continuationToken = continuationToken;
|
|
28
|
+
pageMap.set(page, pageInfo);
|
|
29
|
+
}
|
|
30
|
+
//# 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,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,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,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as coreClient from "@azure/core-client";
|
|
2
|
+
import * as coreAuth from "@azure/core-auth";
|
|
3
|
+
import { Operations } from "./operationsInterfaces/index.js";
|
|
4
|
+
import { ResourceGraphClientOptionalParams, QueryRequest, ResourcesOptionalParams, ResourcesResponse, ResourcesHistoryRequest, ResourcesHistoryOptionalParams, ResourcesHistoryResponse } from "./models/index.js";
|
|
5
|
+
export declare class ResourceGraphClient extends coreClient.ServiceClient {
|
|
6
|
+
$host: string;
|
|
7
|
+
apiVersion: string;
|
|
8
|
+
/**
|
|
9
|
+
* Initializes a new instance of the ResourceGraphClient class.
|
|
10
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
11
|
+
* @param options The parameter options
|
|
12
|
+
*/
|
|
13
|
+
constructor(credentials: coreAuth.TokenCredential, options?: ResourceGraphClientOptionalParams);
|
|
14
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
15
|
+
private addCustomApiVersionPolicy;
|
|
16
|
+
/**
|
|
17
|
+
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
18
|
+
* @param query Request specifying query and its options.
|
|
19
|
+
* @param options The options parameters.
|
|
20
|
+
*/
|
|
21
|
+
resources(query: QueryRequest, options?: ResourcesOptionalParams): Promise<ResourcesResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* List all snapshots of a resource for a given time interval.
|
|
24
|
+
* @param request Request specifying the query and its options.
|
|
25
|
+
* @param options The options parameters.
|
|
26
|
+
*/
|
|
27
|
+
resourcesHistory(request: ResourcesHistoryRequest, options?: ResourcesHistoryOptionalParams): Promise<ResourcesHistoryResponse>;
|
|
28
|
+
operations: Operations;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=resourceGraphClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceGraphClient.d.ts","sourceRoot":"","sources":["../../src/resourceGraphClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAG7D,OAAO,EACL,iCAAiC,EACjC,YAAY,EACZ,uBAAuB,EACvB,iBAAiB,EACjB,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,mBAAmB,CAAC;AAE3B,qBAAa,mBAAoB,SAAQ,UAAU,CAAC,aAAa;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,OAAO,CAAC,EAAE,iCAAiC;IAuE7C,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC;;;;OAIG;IACH,SAAS,CACP,KAAK,EAAE,YAAY,EACnB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,iBAAiB,CAAC;IAO7B;;;;OAIG;IACH,gBAAgB,CACd,OAAO,EAAE,uBAAuB,EAChC,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,wBAAwB,CAAC;IAOpC,UAAU,EAAE,UAAU,CAAC;CACxB"}
|
|
@@ -0,0 +1,157 @@
|
|
|
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 * as coreClient from "@azure/core-client";
|
|
9
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
|
+
import { OperationsImpl } from "./operations/index.js";
|
|
11
|
+
import * as Parameters from "./models/parameters.js";
|
|
12
|
+
import * as Mappers from "./models/mappers.js";
|
|
13
|
+
export class ResourceGraphClient extends coreClient.ServiceClient {
|
|
14
|
+
$host;
|
|
15
|
+
apiVersion;
|
|
16
|
+
/**
|
|
17
|
+
* Initializes a new instance of the ResourceGraphClient class.
|
|
18
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
19
|
+
* @param options The parameter options
|
|
20
|
+
*/
|
|
21
|
+
constructor(credentials, options) {
|
|
22
|
+
if (credentials === undefined) {
|
|
23
|
+
throw new Error("'credentials' cannot be null");
|
|
24
|
+
}
|
|
25
|
+
// Initializing default values for options
|
|
26
|
+
if (!options) {
|
|
27
|
+
options = {};
|
|
28
|
+
}
|
|
29
|
+
const defaults = {
|
|
30
|
+
requestContentType: "application/json; charset=utf-8",
|
|
31
|
+
credential: credentials
|
|
32
|
+
};
|
|
33
|
+
const packageDetails = `azsdk-js-arm-resourcegraph/5.0.0-beta.4`;
|
|
34
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
35
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
36
|
+
: `${packageDetails}`;
|
|
37
|
+
const optionsWithDefaults = {
|
|
38
|
+
...defaults,
|
|
39
|
+
...options,
|
|
40
|
+
userAgentOptions: {
|
|
41
|
+
userAgentPrefix
|
|
42
|
+
},
|
|
43
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
44
|
+
};
|
|
45
|
+
super(optionsWithDefaults);
|
|
46
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
47
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
48
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
49
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
50
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
51
|
+
}
|
|
52
|
+
if (!options ||
|
|
53
|
+
!options.pipeline ||
|
|
54
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
55
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
56
|
+
this.pipeline.removePolicy({
|
|
57
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
58
|
+
});
|
|
59
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
60
|
+
credential: credentials,
|
|
61
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
62
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
63
|
+
challengeCallbacks: {
|
|
64
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
65
|
+
}
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
// Assigning values to Constant parameters
|
|
69
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
70
|
+
this.apiVersion = options.apiVersion || "2021-06-01-preview";
|
|
71
|
+
this.operations = new OperationsImpl(this);
|
|
72
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
73
|
+
}
|
|
74
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
75
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
76
|
+
if (!apiVersion) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const apiVersionPolicy = {
|
|
80
|
+
name: "CustomApiVersionPolicy",
|
|
81
|
+
async sendRequest(request, next) {
|
|
82
|
+
const param = request.url.split("?");
|
|
83
|
+
if (param.length > 1) {
|
|
84
|
+
const newParams = param[1].split("&").map((item) => {
|
|
85
|
+
if (item.indexOf("api-version") > -1) {
|
|
86
|
+
return "api-version=" + apiVersion;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
return item;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
93
|
+
}
|
|
94
|
+
return next(request);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
101
|
+
* @param query Request specifying query and its options.
|
|
102
|
+
* @param options The options parameters.
|
|
103
|
+
*/
|
|
104
|
+
resources(query, options) {
|
|
105
|
+
return this.sendOperationRequest({ query, options }, resourcesOperationSpec);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* List all snapshots of a resource for a given time interval.
|
|
109
|
+
* @param request Request specifying the query and its options.
|
|
110
|
+
* @param options The options parameters.
|
|
111
|
+
*/
|
|
112
|
+
resourcesHistory(request, options) {
|
|
113
|
+
return this.sendOperationRequest({ request, options }, resourcesHistoryOperationSpec);
|
|
114
|
+
}
|
|
115
|
+
operations;
|
|
116
|
+
}
|
|
117
|
+
// Operation Specifications
|
|
118
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
119
|
+
const resourcesOperationSpec = {
|
|
120
|
+
path: "/providers/Microsoft.ResourceGraph/resources",
|
|
121
|
+
httpMethod: "POST",
|
|
122
|
+
responses: {
|
|
123
|
+
200: {
|
|
124
|
+
bodyMapper: Mappers.QueryResponse
|
|
125
|
+
},
|
|
126
|
+
default: {
|
|
127
|
+
bodyMapper: Mappers.ErrorResponse
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
requestBody: Parameters.query,
|
|
131
|
+
queryParameters: [Parameters.apiVersion],
|
|
132
|
+
urlParameters: [Parameters.$host],
|
|
133
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
134
|
+
mediaType: "json",
|
|
135
|
+
serializer
|
|
136
|
+
};
|
|
137
|
+
const resourcesHistoryOperationSpec = {
|
|
138
|
+
path: "/providers/Microsoft.ResourceGraph/resourcesHistory",
|
|
139
|
+
httpMethod: "POST",
|
|
140
|
+
responses: {
|
|
141
|
+
200: {
|
|
142
|
+
bodyMapper: {
|
|
143
|
+
type: { name: "Dictionary", value: { type: { name: "any" } } }
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
default: {
|
|
147
|
+
bodyMapper: Mappers.ErrorResponse
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
requestBody: Parameters.request,
|
|
151
|
+
queryParameters: [Parameters.apiVersion],
|
|
152
|
+
urlParameters: [Parameters.$host],
|
|
153
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
154
|
+
mediaType: "json",
|
|
155
|
+
serializer
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=resourceGraphClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceGraphClient.js","sourceRoot":"","sources":["../../src/resourceGraphClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAW/C,MAAM,OAAO,mBAAoB,SAAQ,UAAU,CAAC,aAAa;IAC/D,KAAK,CAAS;IACd,UAAU,CAAS;IAEnB;;;;OAIG;IACH,YACE,WAAqC,EACrC,OAA2C;QAE3C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,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,GAA6B;IAC9D,IAAI,EAAE,qDAAqD;IAC3D,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;aAC/D;SACF;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,OAAO;IAC/B,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { OperationsImpl } from \"./operations/index.js\";\nimport { Operations } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n ResourceGraphClientOptionalParams,\n QueryRequest,\n ResourcesOptionalParams,\n ResourcesResponse,\n ResourcesHistoryRequest,\n ResourcesHistoryOptionalParams,\n ResourcesHistoryResponse\n} from \"./models/index.js\";\n\nexport class ResourceGraphClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the ResourceGraphClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: ResourceGraphClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: ResourceGraphClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-resourcegraph/5.0.0-beta.4`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2021-06-01-preview\";\n this.operations = new OperationsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Queries the resources managed by Azure Resource Manager for scopes specified in the request.\n * @param query Request specifying query and its options.\n * @param options The options parameters.\n */\n resources(\n query: QueryRequest,\n options?: ResourcesOptionalParams\n ): Promise<ResourcesResponse> {\n return this.sendOperationRequest(\n { query, options },\n resourcesOperationSpec\n );\n }\n\n /**\n * List all snapshots of a resource for a given time interval.\n * @param request Request specifying the query and its options.\n * @param options The options parameters.\n */\n resourcesHistory(\n request: ResourcesHistoryRequest,\n options?: ResourcesHistoryOptionalParams\n ): Promise<ResourcesHistoryResponse> {\n return this.sendOperationRequest(\n { request, options },\n resourcesHistoryOperationSpec\n );\n }\n\n operations: Operations;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst resourcesOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ResourceGraph/resources\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.QueryResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.query,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst resourcesHistoryOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ResourceGraph/resourcesHistory\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Dictionary\", value: { type: { name: \"any\" } } }\n }\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.request,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
/// <reference lib="esnext.asynciterable" />
|
|
9
|
+
export { getContinuationToken } from "./pagingHelper.js";
|
|
10
|
+
export * from "./models/index.js";
|
|
11
|
+
export { ResourceGraphClient } from "./resourceGraphClient.js";
|
|
12
|
+
export * from "./operationsInterfaces/index.js";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4CAA4C;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,cAAc,iCAAiC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\n/// <reference lib=\"esnext.asynciterable\" />\nexport { getContinuationToken } from \"./pagingHelper.js\";\nexport * from \"./models/index.js\";\nexport { ResourceGraphClient } from \"./resourceGraphClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"]}
|