@azure/arm-networkfunction 2.0.2-alpha.20260302.1 → 2.0.2-alpha.20260304.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/dist/commonjs/azureTrafficCollectorClient.js +135 -115
- package/dist/commonjs/azureTrafficCollectorClient.js.map +7 -1
- package/dist/commonjs/index.js +35 -19
- package/dist/commonjs/index.js.map +7 -1
- package/dist/commonjs/lroImpl.js +44 -35
- package/dist/commonjs/lroImpl.js.map +7 -1
- package/dist/commonjs/models/index.js +74 -69
- package/dist/commonjs/models/index.js.map +7 -1
- package/dist/commonjs/models/mappers.js +524 -473
- package/dist/commonjs/models/mappers.js.map +7 -1
- package/dist/commonjs/models/parameters.js +179 -132
- package/dist/commonjs/models/parameters.js.map +7 -1
- package/dist/commonjs/operations/azureTrafficCollectors.js +297 -249
- package/dist/commonjs/operations/azureTrafficCollectors.js.map +7 -1
- package/dist/commonjs/operations/azureTrafficCollectorsByResourceGroup.js +156 -122
- package/dist/commonjs/operations/azureTrafficCollectorsByResourceGroup.js.map +7 -1
- package/dist/commonjs/operations/azureTrafficCollectorsBySubscription.js +141 -114
- package/dist/commonjs/operations/azureTrafficCollectorsBySubscription.js.map +7 -1
- package/dist/commonjs/operations/collectorPolicies.js +458 -381
- package/dist/commonjs/operations/collectorPolicies.js.map +7 -1
- package/dist/commonjs/operations/index.js +29 -16
- package/dist/commonjs/operations/index.js.map +7 -1
- package/dist/commonjs/operations/networkFunction.js +104 -77
- package/dist/commonjs/operations/networkFunction.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/azureTrafficCollectors.js +15 -10
- package/dist/commonjs/operationsInterfaces/azureTrafficCollectors.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/azureTrafficCollectorsByResourceGroup.js +15 -10
- package/dist/commonjs/operationsInterfaces/azureTrafficCollectorsByResourceGroup.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/azureTrafficCollectorsBySubscription.js +15 -10
- package/dist/commonjs/operationsInterfaces/azureTrafficCollectorsBySubscription.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/collectorPolicies.js +15 -10
- package/dist/commonjs/operationsInterfaces/collectorPolicies.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/index.js +29 -16
- package/dist/commonjs/operationsInterfaces/index.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/networkFunction.js +15 -10
- package/dist/commonjs/operationsInterfaces/networkFunction.js.map +7 -1
- package/dist/commonjs/pagingHelper.js +39 -30
- package/dist/commonjs/pagingHelper.js.map +7 -1
- package/dist/esm/azureTrafficCollectorClient.js +107 -109
- package/dist/esm/azureTrafficCollectorClient.js.map +7 -1
- package/dist/esm/index.js +6 -11
- package/dist/esm/index.js.map +7 -1
- package/dist/esm/lroImpl.js +22 -32
- package/dist/esm/lroImpl.js.map +7 -1
- package/dist/esm/models/index.js +45 -66
- package/dist/esm/models/index.js.map +7 -1
- package/dist/esm/models/mappers.js +483 -470
- package/dist/esm/models/mappers.js.map +7 -1
- package/dist/esm/models/parameters.js +143 -128
- package/dist/esm/models/parameters.js.map +7 -1
- package/dist/esm/operations/azureTrafficCollectors.js +260 -240
- package/dist/esm/operations/azureTrafficCollectors.js.map +7 -1
- package/dist/esm/operations/azureTrafficCollectorsByResourceGroup.js +120 -114
- package/dist/esm/operations/azureTrafficCollectorsByResourceGroup.js.map +7 -1
- package/dist/esm/operations/azureTrafficCollectorsBySubscription.js +105 -106
- package/dist/esm/operations/azureTrafficCollectorsBySubscription.js.map +7 -1
- package/dist/esm/operations/collectorPolicies.js +420 -371
- package/dist/esm/operations/collectorPolicies.js.map +7 -1
- package/dist/esm/operations/index.js +0 -8
- package/dist/esm/operations/index.js.map +7 -1
- package/dist/esm/operations/networkFunction.js +69 -70
- package/dist/esm/operations/networkFunction.js.map +7 -1
- package/dist/esm/operationsInterfaces/azureTrafficCollectors.js +0 -9
- package/dist/esm/operationsInterfaces/azureTrafficCollectors.js.map +7 -1
- package/dist/esm/operationsInterfaces/azureTrafficCollectorsByResourceGroup.js +0 -9
- package/dist/esm/operationsInterfaces/azureTrafficCollectorsByResourceGroup.js.map +7 -1
- package/dist/esm/operationsInterfaces/azureTrafficCollectorsBySubscription.js +0 -9
- package/dist/esm/operationsInterfaces/azureTrafficCollectorsBySubscription.js.map +7 -1
- package/dist/esm/operationsInterfaces/collectorPolicies.js +0 -9
- package/dist/esm/operationsInterfaces/collectorPolicies.js.map +7 -1
- package/dist/esm/operationsInterfaces/index.js +0 -8
- package/dist/esm/operationsInterfaces/index.js.map +7 -1
- package/dist/esm/operationsInterfaces/networkFunction.js +0 -9
- package/dist/esm/operationsInterfaces/networkFunction.js.map +7 -1
- package/dist/esm/pagingHelper.js +17 -28
- package/dist/esm/pagingHelper.js.map +7 -1
- package/package.json +4 -21
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/networkfunction/arm-networkfunction/src/operationsInterfaces/collectorPolicies.ts"],
|
|
4
|
+
"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 { PollerLike, PollOperationState } from \"@azure/core-lro\";\nimport {\n CollectorPolicy,\n CollectorPoliciesListOptionalParams,\n CollectorPoliciesGetOptionalParams,\n CollectorPoliciesGetResponse,\n CollectorPoliciesCreateOrUpdateOptionalParams,\n CollectorPoliciesCreateOrUpdateResponse,\n CollectorPoliciesDeleteOptionalParams,\n TagsObject,\n CollectorPoliciesUpdateTagsOptionalParams,\n CollectorPoliciesUpdateTagsResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Interface representing a CollectorPolicies. */\nexport interface CollectorPolicies {\n /**\n * Return list of Collector policies in a Azure Traffic Collector\n * @param resourceGroupName The name of the resource group.\n * @param azureTrafficCollectorName Azure Traffic Collector name\n * @param options The options parameters.\n */\n list(\n resourceGroupName: string,\n azureTrafficCollectorName: string,\n options?: CollectorPoliciesListOptionalParams\n ): PagedAsyncIterableIterator<CollectorPolicy>;\n /**\n * Gets the collector policy in a specified Traffic Collector\n * @param resourceGroupName The name of the resource group.\n * @param azureTrafficCollectorName Azure Traffic Collector name\n * @param collectorPolicyName Collector Policy Name\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n azureTrafficCollectorName: string,\n collectorPolicyName: string,\n options?: CollectorPoliciesGetOptionalParams\n ): Promise<CollectorPoliciesGetResponse>;\n /**\n * Creates or updates a Collector Policy resource\n * @param resourceGroupName The name of the resource group.\n * @param azureTrafficCollectorName Azure Traffic Collector name\n * @param collectorPolicyName Collector Policy Name\n * @param location Resource location.\n * @param options The options parameters.\n */\n beginCreateOrUpdate(\n resourceGroupName: string,\n azureTrafficCollectorName: string,\n collectorPolicyName: string,\n location: string,\n options?: CollectorPoliciesCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<CollectorPoliciesCreateOrUpdateResponse>,\n CollectorPoliciesCreateOrUpdateResponse\n >\n >;\n /**\n * Creates or updates a Collector Policy resource\n * @param resourceGroupName The name of the resource group.\n * @param azureTrafficCollectorName Azure Traffic Collector name\n * @param collectorPolicyName Collector Policy Name\n * @param location Resource location.\n * @param options The options parameters.\n */\n beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n azureTrafficCollectorName: string,\n collectorPolicyName: string,\n location: string,\n options?: CollectorPoliciesCreateOrUpdateOptionalParams\n ): Promise<CollectorPoliciesCreateOrUpdateResponse>;\n /**\n * Deletes a specified Collector Policy resource.\n * @param resourceGroupName The name of the resource group.\n * @param azureTrafficCollectorName Azure Traffic Collector name\n * @param collectorPolicyName Collector Policy Name\n * @param options The options parameters.\n */\n beginDelete(\n resourceGroupName: string,\n azureTrafficCollectorName: string,\n collectorPolicyName: string,\n options?: CollectorPoliciesDeleteOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>>;\n /**\n * Deletes a specified Collector Policy resource.\n * @param resourceGroupName The name of the resource group.\n * @param azureTrafficCollectorName Azure Traffic Collector name\n * @param collectorPolicyName Collector Policy Name\n * @param options The options parameters.\n */\n beginDeleteAndWait(\n resourceGroupName: string,\n azureTrafficCollectorName: string,\n collectorPolicyName: string,\n options?: CollectorPoliciesDeleteOptionalParams\n ): Promise<void>;\n /**\n * Updates the specified Collector Policy tags.\n * @param resourceGroupName The name of the resource group.\n * @param azureTrafficCollectorName Azure Traffic Collector name\n * @param collectorPolicyName Collector Policy Name\n * @param parameters Parameters supplied to update Collector Policy tags.\n * @param options The options parameters.\n */\n updateTags(\n resourceGroupName: string,\n azureTrafficCollectorName: string,\n collectorPolicyName: string,\n parameters: TagsObject,\n options?: CollectorPoliciesUpdateTagsOptionalParams\n ): Promise<CollectorPoliciesUpdateTagsResponse>;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var operationsInterfaces_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(operationsInterfaces_exports);
|
|
17
|
+
__reExport(operationsInterfaces_exports, require("./networkFunction.js"), module.exports);
|
|
18
|
+
__reExport(operationsInterfaces_exports, require("./azureTrafficCollectorsBySubscription.js"), module.exports);
|
|
19
|
+
__reExport(operationsInterfaces_exports, require("./azureTrafficCollectorsByResourceGroup.js"), module.exports);
|
|
20
|
+
__reExport(operationsInterfaces_exports, require("./azureTrafficCollectors.js"), module.exports);
|
|
21
|
+
__reExport(operationsInterfaces_exports, require("./collectorPolicies.js"), module.exports);
|
|
22
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
+
0 && (module.exports = {
|
|
24
|
+
...require("./networkFunction.js"),
|
|
25
|
+
...require("./azureTrafficCollectorsBySubscription.js"),
|
|
26
|
+
...require("./azureTrafficCollectorsByResourceGroup.js"),
|
|
27
|
+
...require("./azureTrafficCollectors.js"),
|
|
28
|
+
...require("./collectorPolicies.js")
|
|
29
|
+
});
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/networkfunction/arm-networkfunction/src/operationsInterfaces/index.ts"],
|
|
4
|
+
"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 \"./networkFunction.js\";\nexport * from \"./azureTrafficCollectorsBySubscription.js\";\nexport * from \"./azureTrafficCollectorsByResourceGroup.js\";\nexport * from \"./azureTrafficCollectors.js\";\nexport * from \"./collectorPolicies.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAQA,yCAAc,iCARd;AASA,yCAAc,sDATd;AAUA,yCAAc,uDAVd;AAWA,yCAAc,wCAXd;AAYA,yCAAc,mCAZd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var networkFunction_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(networkFunction_exports);
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/networkfunction/arm-networkfunction/src/operationsInterfaces/networkFunction.ts"],
|
|
4
|
+
"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 {\n Operation,\n NetworkFunctionListOperationsOptionalParams\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Interface representing a NetworkFunction. */\nexport interface NetworkFunction {\n /**\n * Lists all of the available NetworkFunction Rest API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: NetworkFunctionListOperationsOptionalParams\n ): PagedAsyncIterableIterator<Operation>;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,34 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var pagingHelper_exports = {};
|
|
19
|
+
__export(pagingHelper_exports, {
|
|
20
|
+
getContinuationToken: () => getContinuationToken,
|
|
21
|
+
setContinuationToken: () => setContinuationToken
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(pagingHelper_exports);
|
|
24
|
+
const pageMap = /* @__PURE__ */ new WeakMap();
|
|
20
25
|
function getContinuationToken(page) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
if (typeof page !== "object" || page === null) {
|
|
27
|
+
return void 0;
|
|
28
|
+
}
|
|
29
|
+
return pageMap.get(page)?.continuationToken;
|
|
25
30
|
}
|
|
26
31
|
function setContinuationToken(page, continuationToken) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
36
|
+
pageInfo.continuationToken = continuationToken;
|
|
37
|
+
pageMap.set(page, pageInfo);
|
|
33
38
|
}
|
|
34
|
-
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
getContinuationToken,
|
|
42
|
+
setContinuationToken
|
|
43
|
+
});
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/networkfunction/arm-networkfunction/src/pagingHelper.ts"],
|
|
4
|
+
"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 a result page from a pageable operation, returns a\n * continuation token that can be used to begin paging from\n * that point later.\n * @param page A result object from calling .byPage() on a paged operation.\n * @returns The continuation token that can be passed into byPage().\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA,MAAM,UAAU,oBAAI,QAA0B;AASvC,SAAS,qBAAqB,MAAmC;AACtE,MAAI,OAAO,SAAS,YAAY,SAAS,MAAM;AAC7C,WAAO;AAAA,EACT;AACA,SAAO,QAAQ,IAAI,IAAI,GAAG;AAC5B;AAEO,SAAS,qBACd,MACA,mBACM;AACN,MAAI,OAAO,SAAS,YAAY,SAAS,QAAQ,CAAC,mBAAmB;AACnE;AAAA,EACF;AACA,QAAM,WAAW,QAAQ,IAAI,IAAI,KAAK,CAAC;AACvC,WAAS,oBAAoB;AAC7B,UAAQ,IAAI,MAAM,QAAQ;AAC5B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,114 +1,112 @@
|
|
|
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
1
|
import * as coreClient from "@azure/core-client";
|
|
9
2
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
options = {};
|
|
31
|
-
}
|
|
32
|
-
const defaults = {
|
|
33
|
-
requestContentType: "application/json; charset=utf-8",
|
|
34
|
-
credential: credentials
|
|
35
|
-
};
|
|
36
|
-
const packageDetails = `azsdk-js-arm-networkfunction/2.0.2`;
|
|
37
|
-
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
38
|
-
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
39
|
-
: `${packageDetails}`;
|
|
40
|
-
const optionsWithDefaults = {
|
|
41
|
-
...defaults,
|
|
42
|
-
...options,
|
|
43
|
-
userAgentOptions: {
|
|
44
|
-
userAgentPrefix
|
|
45
|
-
},
|
|
46
|
-
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
47
|
-
};
|
|
48
|
-
super(optionsWithDefaults);
|
|
49
|
-
let bearerTokenAuthenticationPolicyFound = false;
|
|
50
|
-
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
51
|
-
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
52
|
-
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
53
|
-
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
54
|
-
}
|
|
55
|
-
if (!options ||
|
|
56
|
-
!options.pipeline ||
|
|
57
|
-
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
58
|
-
!bearerTokenAuthenticationPolicyFound) {
|
|
59
|
-
this.pipeline.removePolicy({
|
|
60
|
-
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
61
|
-
});
|
|
62
|
-
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
63
|
-
credential: credentials,
|
|
64
|
-
scopes: optionsWithDefaults.credentialScopes ??
|
|
65
|
-
`${optionsWithDefaults.endpoint}/.default`,
|
|
66
|
-
challengeCallbacks: {
|
|
67
|
-
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
68
|
-
}
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
// Parameter assignments
|
|
72
|
-
this.subscriptionId = subscriptionId;
|
|
73
|
-
// Assigning values to Constant parameters
|
|
74
|
-
this.$host = options.$host || "https://management.azure.com";
|
|
75
|
-
this.apiVersion = options.apiVersion || "2022-11-01";
|
|
76
|
-
this.networkFunction = new NetworkFunctionImpl(this);
|
|
77
|
-
this.azureTrafficCollectorsBySubscription = new AzureTrafficCollectorsBySubscriptionImpl(this);
|
|
78
|
-
this.azureTrafficCollectorsByResourceGroup = new AzureTrafficCollectorsByResourceGroupImpl(this);
|
|
79
|
-
this.azureTrafficCollectors = new AzureTrafficCollectorsImpl(this);
|
|
80
|
-
this.collectorPolicies = new CollectorPoliciesImpl(this);
|
|
81
|
-
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
3
|
+
import {
|
|
4
|
+
NetworkFunctionImpl,
|
|
5
|
+
AzureTrafficCollectorsBySubscriptionImpl,
|
|
6
|
+
AzureTrafficCollectorsByResourceGroupImpl,
|
|
7
|
+
AzureTrafficCollectorsImpl,
|
|
8
|
+
CollectorPoliciesImpl
|
|
9
|
+
} from "./operations/index.js";
|
|
10
|
+
class AzureTrafficCollectorClient extends coreClient.ServiceClient {
|
|
11
|
+
$host;
|
|
12
|
+
apiVersion;
|
|
13
|
+
subscriptionId;
|
|
14
|
+
/**
|
|
15
|
+
* Initializes a new instance of the AzureTrafficCollectorClient class.
|
|
16
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
17
|
+
* @param subscriptionId Azure Subscription ID.
|
|
18
|
+
* @param options The parameter options
|
|
19
|
+
*/
|
|
20
|
+
constructor(credentials, subscriptionId, options) {
|
|
21
|
+
if (credentials === void 0) {
|
|
22
|
+
throw new Error("'credentials' cannot be null");
|
|
82
23
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (!apiVersion) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
const apiVersionPolicy = {
|
|
89
|
-
name: "CustomApiVersionPolicy",
|
|
90
|
-
async sendRequest(request, next) {
|
|
91
|
-
const param = request.url.split("?");
|
|
92
|
-
if (param.length > 1) {
|
|
93
|
-
const newParams = param[1].split("&").map((item) => {
|
|
94
|
-
if (item.indexOf("api-version") > -1) {
|
|
95
|
-
return "api-version=" + apiVersion;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
return item;
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
request.url = param[0] + "?" + newParams.join("&");
|
|
102
|
-
}
|
|
103
|
-
return next(request);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
this.pipeline.addPolicy(apiVersionPolicy);
|
|
24
|
+
if (subscriptionId === void 0) {
|
|
25
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
107
26
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
27
|
+
if (!options) {
|
|
28
|
+
options = {};
|
|
29
|
+
}
|
|
30
|
+
const defaults = {
|
|
31
|
+
requestContentType: "application/json; charset=utf-8",
|
|
32
|
+
credential: credentials
|
|
33
|
+
};
|
|
34
|
+
const packageDetails = `azsdk-js-arm-networkfunction/2.0.2`;
|
|
35
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`;
|
|
36
|
+
const optionsWithDefaults = {
|
|
37
|
+
...defaults,
|
|
38
|
+
...options,
|
|
39
|
+
userAgentOptions: {
|
|
40
|
+
userAgentPrefix
|
|
41
|
+
},
|
|
42
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
43
|
+
};
|
|
44
|
+
super(optionsWithDefaults);
|
|
45
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
46
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
47
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
48
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
|
49
|
+
(pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
if (!options || !options.pipeline || options.pipeline.getOrderedPolicies().length == 0 || !bearerTokenAuthenticationPolicyFound) {
|
|
53
|
+
this.pipeline.removePolicy({
|
|
54
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
55
|
+
});
|
|
56
|
+
this.pipeline.addPolicy(
|
|
57
|
+
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
58
|
+
credential: credentials,
|
|
59
|
+
scopes: optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`,
|
|
60
|
+
challengeCallbacks: {
|
|
61
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
this.subscriptionId = subscriptionId;
|
|
67
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
68
|
+
this.apiVersion = options.apiVersion || "2022-11-01";
|
|
69
|
+
this.networkFunction = new NetworkFunctionImpl(this);
|
|
70
|
+
this.azureTrafficCollectorsBySubscription = new AzureTrafficCollectorsBySubscriptionImpl(
|
|
71
|
+
this
|
|
72
|
+
);
|
|
73
|
+
this.azureTrafficCollectorsByResourceGroup = new AzureTrafficCollectorsByResourceGroupImpl(
|
|
74
|
+
this
|
|
75
|
+
);
|
|
76
|
+
this.azureTrafficCollectors = new AzureTrafficCollectorsImpl(this);
|
|
77
|
+
this.collectorPolicies = new CollectorPoliciesImpl(this);
|
|
78
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
79
|
+
}
|
|
80
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
81
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
82
|
+
if (!apiVersion) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const apiVersionPolicy = {
|
|
86
|
+
name: "CustomApiVersionPolicy",
|
|
87
|
+
async sendRequest(request, next) {
|
|
88
|
+
const param = request.url.split("?");
|
|
89
|
+
if (param.length > 1) {
|
|
90
|
+
const newParams = param[1].split("&").map((item) => {
|
|
91
|
+
if (item.indexOf("api-version") > -1) {
|
|
92
|
+
return "api-version=" + apiVersion;
|
|
93
|
+
} else {
|
|
94
|
+
return item;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
98
|
+
}
|
|
99
|
+
return next(request);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
103
|
+
}
|
|
104
|
+
networkFunction;
|
|
105
|
+
azureTrafficCollectorsBySubscription;
|
|
106
|
+
azureTrafficCollectorsByResourceGroup;
|
|
107
|
+
azureTrafficCollectors;
|
|
108
|
+
collectorPolicies;
|
|
113
109
|
}
|
|
114
|
-
|
|
110
|
+
export {
|
|
111
|
+
AzureTrafficCollectorClient
|
|
112
|
+
};
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/networkfunction/arm-networkfunction/src/azureTrafficCollectorClient.ts"],
|
|
4
|
+
"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 {\n NetworkFunctionImpl,\n AzureTrafficCollectorsBySubscriptionImpl,\n AzureTrafficCollectorsByResourceGroupImpl,\n AzureTrafficCollectorsImpl,\n CollectorPoliciesImpl\n} from \"./operations/index.js\";\nimport {\n NetworkFunction,\n AzureTrafficCollectorsBySubscription,\n AzureTrafficCollectorsByResourceGroup,\n AzureTrafficCollectors,\n CollectorPolicies\n} from \"./operationsInterfaces/index.js\";\nimport { AzureTrafficCollectorClientOptionalParams } from \"./models/index.js\";\n\nexport class AzureTrafficCollectorClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the AzureTrafficCollectorClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Azure Subscription ID.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: AzureTrafficCollectorClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: AzureTrafficCollectorClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-networkfunction/2.0.2`;\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 // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2022-11-01\";\n this.networkFunction = new NetworkFunctionImpl(this);\n this.azureTrafficCollectorsBySubscription = new AzureTrafficCollectorsBySubscriptionImpl(\n this\n );\n this.azureTrafficCollectorsByResourceGroup = new AzureTrafficCollectorsByResourceGroupImpl(\n this\n );\n this.azureTrafficCollectors = new AzureTrafficCollectorsImpl(this);\n this.collectorPolicies = new CollectorPoliciesImpl(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 networkFunction: NetworkFunction;\n azureTrafficCollectorsBySubscription: AzureTrafficCollectorsBySubscription;\n azureTrafficCollectorsByResourceGroup: AzureTrafficCollectorsByResourceGroup;\n azureTrafficCollectors: AzureTrafficCollectors;\n collectorPolicies: CollectorPolicies;\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
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";
|
|
1
|
+
import { getContinuationToken } from "./pagingHelper.js";
|
|
10
2
|
export * from "./models/index.js";
|
|
11
|
-
|
|
3
|
+
import { AzureTrafficCollectorClient } from "./azureTrafficCollectorClient.js";
|
|
12
4
|
export * from "./operationsInterfaces/index.js";
|
|
13
|
-
|
|
5
|
+
export {
|
|
6
|
+
AzureTrafficCollectorClient,
|
|
7
|
+
getContinuationToken
|
|
8
|
+
};
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/networkfunction/arm-networkfunction/src/index.ts"],
|
|
4
|
+
"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 { AzureTrafficCollectorClient } from \"./azureTrafficCollectorClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"],
|
|
5
|
+
"mappings": "AASA,SAAS,4BAA4B;AACrC,cAAc;AACd,SAAS,mCAAmC;AAC5C,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/lroImpl.js
CHANGED
|
@@ -1,33 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
args;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
async sendInitialRequest() {
|
|
22
|
-
return this.sendOperationFn(this.args, this.spec);
|
|
23
|
-
}
|
|
24
|
-
async sendPollRequest(path) {
|
|
25
|
-
const { requestBody, ...restSpec } = this.spec;
|
|
26
|
-
return this.sendOperationFn(this.args, {
|
|
27
|
-
...restSpec,
|
|
28
|
-
path,
|
|
29
|
-
httpMethod: "GET"
|
|
30
|
-
});
|
|
31
|
-
}
|
|
1
|
+
class LroImpl {
|
|
2
|
+
constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
|
|
3
|
+
this.sendOperationFn = sendOperationFn;
|
|
4
|
+
this.args = args;
|
|
5
|
+
this.spec = spec;
|
|
6
|
+
this.requestPath = requestPath;
|
|
7
|
+
this.requestMethod = requestMethod;
|
|
8
|
+
}
|
|
9
|
+
async sendInitialRequest() {
|
|
10
|
+
return this.sendOperationFn(this.args, this.spec);
|
|
11
|
+
}
|
|
12
|
+
async sendPollRequest(path) {
|
|
13
|
+
const { requestBody, ...restSpec } = this.spec;
|
|
14
|
+
return this.sendOperationFn(this.args, {
|
|
15
|
+
...restSpec,
|
|
16
|
+
path,
|
|
17
|
+
httpMethod: "GET"
|
|
18
|
+
});
|
|
19
|
+
}
|
|
32
20
|
}
|
|
33
|
-
|
|
21
|
+
export {
|
|
22
|
+
LroImpl
|
|
23
|
+
};
|
package/dist/esm/lroImpl.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/networkfunction/arm-networkfunction/src/lroImpl.ts"],
|
|
4
|
+
"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 { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport class LroImpl<T> implements LongRunningOperation<T> {\n constructor(\n private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,\n private args: Record<string, unknown>,\n private spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>,\n public requestPath: string = spec.path!,\n public requestMethod: string = spec.httpMethod\n ) {}\n public async sendInitialRequest(): Promise<LroResponse<T>> {\n return this.sendOperationFn(this.args, this.spec);\n }\n public async sendPollRequest(path: string): Promise<LroResponse<T>> {\n const { requestBody, ...restSpec } = this.spec;\n return this.sendOperationFn(this.args, {\n ...restSpec,\n path,\n httpMethod: \"GET\"\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "AAUO,MAAM,QAA8C;AAAA,EACzD,YACU,iBACA,MACA,MAKD,cAAsB,KAAK,MAC3B,gBAAwB,KAAK,YACpC;AATQ;AACA;AACA;AAKD;AACA;AAAA,EACN;AAAA,EACH,MAAa,qBAA8C;AACzD,WAAO,KAAK,gBAAgB,KAAK,MAAM,KAAK,IAAI;AAAA,EAClD;AAAA,EACA,MAAa,gBAAgB,MAAuC;AAClE,UAAM,EAAE,aAAa,GAAG,SAAS,IAAI,KAAK;AAC1C,WAAO,KAAK,gBAAgB,KAAK,MAAM;AAAA,MACrC,GAAG;AAAA,MACH;AAAA,MACA,YAAY;AAAA,IACd,CAAC;AAAA,EACH;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|