@azure/arm-kusto 8.2.1-alpha.20250619.1 → 8.2.1-alpha.20250718.2
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/browser/kustoManagementClient.js +29 -5
- package/dist/browser/kustoManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +443 -211
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/attachedDatabaseConfigurations.js +32 -39
- package/dist/browser/operations/attachedDatabaseConfigurations.js.map +1 -1
- package/dist/browser/operations/clusterPrincipalAssignments.js +32 -39
- package/dist/browser/operations/clusterPrincipalAssignments.js.map +1 -1
- package/dist/browser/operations/clusters.js +228 -321
- package/dist/browser/operations/clusters.js.map +1 -1
- package/dist/browser/operations/dataConnections.js +54 -51
- package/dist/browser/operations/dataConnections.js.map +1 -1
- package/dist/browser/operations/databaseOperations.js +1 -0
- package/dist/browser/operations/databaseOperations.js.map +1 -1
- package/dist/browser/operations/databasePrincipalAssignments.js +32 -39
- package/dist/browser/operations/databasePrincipalAssignments.js.map +1 -1
- package/dist/browser/operations/databases.js +65 -84
- package/dist/browser/operations/databases.js.map +1 -1
- package/dist/browser/operations/managedPrivateEndpoints.js +43 -45
- package/dist/browser/operations/managedPrivateEndpoints.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/operationsResults.js +1 -0
- package/dist/browser/operations/operationsResults.js.map +1 -1
- package/dist/browser/operations/operationsResultsLocation.js +1 -0
- package/dist/browser/operations/operationsResultsLocation.js.map +1 -1
- package/dist/browser/operations/privateEndpointConnections.js +32 -39
- package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
- package/dist/browser/operations/privateLinkResources.js +10 -27
- package/dist/browser/operations/privateLinkResources.js.map +1 -1
- package/dist/browser/operations/sandboxCustomImages.js +43 -45
- package/dist/browser/operations/sandboxCustomImages.js.map +1 -1
- package/dist/browser/operations/scripts.js +43 -45
- package/dist/browser/operations/scripts.js.map +1 -1
- package/dist/browser/operations/skus.js +10 -27
- package/dist/browser/operations/skus.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/kustoManagementClient.js +29 -5
- package/dist/commonjs/kustoManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +443 -211
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/attachedDatabaseConfigurations.js +32 -38
- package/dist/commonjs/operations/attachedDatabaseConfigurations.js.map +1 -1
- package/dist/commonjs/operations/clusterPrincipalAssignments.js +32 -38
- package/dist/commonjs/operations/clusterPrincipalAssignments.js.map +1 -1
- package/dist/commonjs/operations/clusters.js +228 -320
- package/dist/commonjs/operations/clusters.js.map +1 -1
- package/dist/commonjs/operations/dataConnections.js +54 -50
- package/dist/commonjs/operations/dataConnections.js.map +1 -1
- package/dist/commonjs/operations/databaseOperations.js +1 -0
- package/dist/commonjs/operations/databaseOperations.js.map +1 -1
- package/dist/commonjs/operations/databasePrincipalAssignments.js +32 -38
- package/dist/commonjs/operations/databasePrincipalAssignments.js.map +1 -1
- package/dist/commonjs/operations/databases.js +65 -83
- package/dist/commonjs/operations/databases.js.map +1 -1
- package/dist/commonjs/operations/managedPrivateEndpoints.js +43 -44
- package/dist/commonjs/operations/managedPrivateEndpoints.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/operationsResults.js +1 -0
- package/dist/commonjs/operations/operationsResults.js.map +1 -1
- package/dist/commonjs/operations/operationsResultsLocation.js +1 -0
- package/dist/commonjs/operations/operationsResultsLocation.js.map +1 -1
- package/dist/commonjs/operations/privateEndpointConnections.js +32 -38
- package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
- package/dist/commonjs/operations/privateLinkResources.js +10 -26
- package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
- package/dist/commonjs/operations/sandboxCustomImages.js +43 -44
- package/dist/commonjs/operations/sandboxCustomImages.js.map +1 -1
- package/dist/commonjs/operations/scripts.js +43 -44
- package/dist/commonjs/operations/scripts.js.map +1 -1
- package/dist/commonjs/operations/skus.js +10 -26
- package/dist/commonjs/operations/skus.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/kustoManagementClient.js +29 -5
- package/dist/esm/kustoManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +443 -211
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/attachedDatabaseConfigurations.js +32 -39
- package/dist/esm/operations/attachedDatabaseConfigurations.js.map +1 -1
- package/dist/esm/operations/clusterPrincipalAssignments.js +32 -39
- package/dist/esm/operations/clusterPrincipalAssignments.js.map +1 -1
- package/dist/esm/operations/clusters.js +228 -321
- package/dist/esm/operations/clusters.js.map +1 -1
- package/dist/esm/operations/dataConnections.js +54 -51
- package/dist/esm/operations/dataConnections.js.map +1 -1
- package/dist/esm/operations/databaseOperations.js +1 -0
- package/dist/esm/operations/databaseOperations.js.map +1 -1
- package/dist/esm/operations/databasePrincipalAssignments.js +32 -39
- package/dist/esm/operations/databasePrincipalAssignments.js.map +1 -1
- package/dist/esm/operations/databases.js +65 -84
- package/dist/esm/operations/databases.js.map +1 -1
- package/dist/esm/operations/managedPrivateEndpoints.js +43 -45
- package/dist/esm/operations/managedPrivateEndpoints.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/operationsResults.js +1 -0
- package/dist/esm/operations/operationsResults.js.map +1 -1
- package/dist/esm/operations/operationsResultsLocation.js +1 -0
- package/dist/esm/operations/operationsResultsLocation.js.map +1 -1
- package/dist/esm/operations/privateEndpointConnections.js +32 -39
- package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
- package/dist/esm/operations/privateLinkResources.js +10 -27
- package/dist/esm/operations/privateLinkResources.js.map +1 -1
- package/dist/esm/operations/sandboxCustomImages.js +43 -45
- package/dist/esm/operations/sandboxCustomImages.js.map +1 -1
- package/dist/esm/operations/scripts.js +43 -45
- package/dist/esm/operations/scripts.js.map +1 -1
- package/dist/esm/operations/skus.js +10 -27
- package/dist/esm/operations/skus.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/kustoManagementClient.js +29 -5
- package/dist/react-native/kustoManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +443 -211
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/attachedDatabaseConfigurations.js +32 -39
- package/dist/react-native/operations/attachedDatabaseConfigurations.js.map +1 -1
- package/dist/react-native/operations/clusterPrincipalAssignments.js +32 -39
- package/dist/react-native/operations/clusterPrincipalAssignments.js.map +1 -1
- package/dist/react-native/operations/clusters.js +228 -321
- package/dist/react-native/operations/clusters.js.map +1 -1
- package/dist/react-native/operations/dataConnections.js +54 -51
- package/dist/react-native/operations/dataConnections.js.map +1 -1
- package/dist/react-native/operations/databaseOperations.js +1 -0
- package/dist/react-native/operations/databaseOperations.js.map +1 -1
- package/dist/react-native/operations/databasePrincipalAssignments.js +32 -39
- package/dist/react-native/operations/databasePrincipalAssignments.js.map +1 -1
- package/dist/react-native/operations/databases.js +65 -84
- package/dist/react-native/operations/databases.js.map +1 -1
- package/dist/react-native/operations/managedPrivateEndpoints.js +43 -45
- package/dist/react-native/operations/managedPrivateEndpoints.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/operationsResults.js +1 -0
- package/dist/react-native/operations/operationsResults.js.map +1 -1
- package/dist/react-native/operations/operationsResultsLocation.js +1 -0
- package/dist/react-native/operations/operationsResultsLocation.js.map +1 -1
- package/dist/react-native/operations/privateEndpointConnections.js +32 -39
- package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
- package/dist/react-native/operations/privateLinkResources.js +10 -27
- package/dist/react-native/operations/privateLinkResources.js.map +1 -1
- package/dist/react-native/operations/sandboxCustomImages.js +43 -45
- package/dist/react-native/operations/sandboxCustomImages.js.map +1 -1
- package/dist/react-native/operations/scripts.js +43 -45
- package/dist/react-native/operations/scripts.js.map +1 -1
- package/dist/react-native/operations/skus.js +10 -27
- package/dist/react-native/operations/skus.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-kusto.api.md → arm-kusto-node.api.md} +0 -0
|
@@ -9,6 +9,9 @@ import * as coreClient from "@azure/core-client";
|
|
|
9
9
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
10
|
import { ClustersImpl, ClusterPrincipalAssignmentsImpl, SkusImpl, DatabasesImpl, AttachedDatabaseConfigurationsImpl, ManagedPrivateEndpointsImpl, DatabaseOperationsImpl, DatabasePrincipalAssignmentsImpl, ScriptsImpl, SandboxCustomImagesImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, DataConnectionsImpl, OperationsImpl, OperationsResultsImpl, OperationsResultsLocationImpl, } from "./operations/index.js";
|
|
11
11
|
export class KustoManagementClient extends coreClient.ServiceClient {
|
|
12
|
+
$host;
|
|
13
|
+
subscriptionId;
|
|
14
|
+
apiVersion;
|
|
12
15
|
/**
|
|
13
16
|
* Initializes a new instance of the KustoManagementClient class.
|
|
14
17
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -16,7 +19,6 @@ export class KustoManagementClient extends coreClient.ServiceClient {
|
|
|
16
19
|
* @param options The parameter options
|
|
17
20
|
*/
|
|
18
21
|
constructor(credentials, subscriptionId, options) {
|
|
19
|
-
var _a, _b, _c;
|
|
20
22
|
if (credentials === undefined) {
|
|
21
23
|
throw new Error("'credentials' cannot be null");
|
|
22
24
|
}
|
|
@@ -35,12 +37,17 @@ export class KustoManagementClient extends coreClient.ServiceClient {
|
|
|
35
37
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
36
38
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
37
39
|
: `${packageDetails}`;
|
|
38
|
-
const optionsWithDefaults =
|
|
40
|
+
const optionsWithDefaults = {
|
|
41
|
+
...defaults,
|
|
42
|
+
...options,
|
|
43
|
+
userAgentOptions: {
|
|
39
44
|
userAgentPrefix,
|
|
40
|
-
},
|
|
45
|
+
},
|
|
46
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
|
|
47
|
+
};
|
|
41
48
|
super(optionsWithDefaults);
|
|
42
49
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
43
|
-
if (
|
|
50
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
44
51
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
45
52
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
46
53
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
@@ -54,7 +61,8 @@ export class KustoManagementClient extends coreClient.ServiceClient {
|
|
|
54
61
|
});
|
|
55
62
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
56
63
|
credential: credentials,
|
|
57
|
-
scopes:
|
|
64
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
65
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
58
66
|
challengeCallbacks: {
|
|
59
67
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
|
|
60
68
|
},
|
|
@@ -109,5 +117,21 @@ export class KustoManagementClient extends coreClient.ServiceClient {
|
|
|
109
117
|
};
|
|
110
118
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
111
119
|
}
|
|
120
|
+
clusters;
|
|
121
|
+
clusterPrincipalAssignments;
|
|
122
|
+
skus;
|
|
123
|
+
databases;
|
|
124
|
+
attachedDatabaseConfigurations;
|
|
125
|
+
managedPrivateEndpoints;
|
|
126
|
+
databaseOperations;
|
|
127
|
+
databasePrincipalAssignments;
|
|
128
|
+
scripts;
|
|
129
|
+
sandboxCustomImages;
|
|
130
|
+
privateEndpointConnections;
|
|
131
|
+
privateLinkResources;
|
|
132
|
+
dataConnections;
|
|
133
|
+
operations;
|
|
134
|
+
operationsResults;
|
|
135
|
+
operationsResultsLocation;
|
|
112
136
|
}
|
|
113
137
|
//# sourceMappingURL=kustoManagementClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kustoManagementClient.js","sourceRoot":"","sources":["../../src/kustoManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,YAAY,EACZ,+BAA+B,EAC/B,QAAQ,EACR,aAAa,EACb,kCAAkC,EAClC,2BAA2B,EAC3B,sBAAsB,EACtB,gCAAgC,EAChC,WAAW,EACX,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAqB/B,MAAM,OAAO,qBAAsB,SAAQ,UAAU,CAAC,aAAa;IAKjE;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA6C;;QAE7C,IAAI,WAAW,KAAK,S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G,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAkBF","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 ClustersImpl,\n ClusterPrincipalAssignmentsImpl,\n SkusImpl,\n DatabasesImpl,\n AttachedDatabaseConfigurationsImpl,\n ManagedPrivateEndpointsImpl,\n DatabaseOperationsImpl,\n DatabasePrincipalAssignmentsImpl,\n ScriptsImpl,\n SandboxCustomImagesImpl,\n PrivateEndpointConnectionsImpl,\n PrivateLinkResourcesImpl,\n DataConnectionsImpl,\n OperationsImpl,\n OperationsResultsImpl,\n OperationsResultsLocationImpl,\n} from \"./operations/index.js\";\nimport {\n Clusters,\n ClusterPrincipalAssignments,\n Skus,\n Databases,\n AttachedDatabaseConfigurations,\n ManagedPrivateEndpoints,\n DatabaseOperations,\n DatabasePrincipalAssignments,\n Scripts,\n SandboxCustomImages,\n PrivateEndpointConnections,\n PrivateLinkResources,\n DataConnections,\n Operations,\n OperationsResults,\n OperationsResultsLocation,\n} from \"./operationsInterfaces/index.js\";\nimport { KustoManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class KustoManagementClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the KustoManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: KustoManagementClientOptionalParams,\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: KustoManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-kusto/8.2.1`;\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[] =\n 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 || \"2024-04-13\";\n this.clusters = new ClustersImpl(this);\n this.clusterPrincipalAssignments = new ClusterPrincipalAssignmentsImpl(\n this,\n );\n this.skus = new SkusImpl(this);\n this.databases = new DatabasesImpl(this);\n this.attachedDatabaseConfigurations =\n new AttachedDatabaseConfigurationsImpl(this);\n this.managedPrivateEndpoints = new ManagedPrivateEndpointsImpl(this);\n this.databaseOperations = new DatabaseOperationsImpl(this);\n this.databasePrincipalAssignments = new DatabasePrincipalAssignmentsImpl(\n this,\n );\n this.scripts = new ScriptsImpl(this);\n this.sandboxCustomImages = new SandboxCustomImagesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.dataConnections = new DataConnectionsImpl(this);\n this.operations = new OperationsImpl(this);\n this.operationsResults = new OperationsResultsImpl(this);\n this.operationsResultsLocation = new OperationsResultsLocationImpl(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 clusters: Clusters;\n clusterPrincipalAssignments: ClusterPrincipalAssignments;\n skus: Skus;\n databases: Databases;\n attachedDatabaseConfigurations: AttachedDatabaseConfigurations;\n managedPrivateEndpoints: ManagedPrivateEndpoints;\n databaseOperations: DatabaseOperations;\n databasePrincipalAssignments: DatabasePrincipalAssignments;\n scripts: Scripts;\n sandboxCustomImages: SandboxCustomImages;\n privateEndpointConnections: PrivateEndpointConnections;\n privateLinkResources: PrivateLinkResources;\n dataConnections: DataConnections;\n operations: Operations;\n operationsResults: OperationsResults;\n operationsResultsLocation: OperationsResultsLocation;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"kustoManagementClient.js","sourceRoot":"","sources":["../../src/kustoManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,YAAY,EACZ,+BAA+B,EAC/B,QAAQ,EACR,aAAa,EACb,kCAAkC,EAClC,2BAA2B,EAC3B,sBAAsB,EACtB,gCAAgC,EAChC,WAAW,EACX,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAqB/B,MAAM,OAAO,qBAAsB,SAAQ,UAAU,CAAC,aAAa;IACjE,KAAK,CAAS;IACd,cAAc,CAAS;IACvB,UAAU,CAAS;IAEnB;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA6C;QAE7C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,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,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,QAAQ,CAAW;IACnB,2BAA2B,CAA8B;IACzD,IAAI,CAAO;IACX,SAAS,CAAY;IACrB,8BAA8B,CAAiC;IAC/D,uBAAuB,CAA0B;IACjD,kBAAkB,CAAqB;IACvC,4BAA4B,CAA+B;IAC3D,OAAO,CAAU;IACjB,mBAAmB,CAAsB;IACzC,0BAA0B,CAA6B;IACvD,oBAAoB,CAAuB;IAC3C,eAAe,CAAkB;IACjC,UAAU,CAAa;IACvB,iBAAiB,CAAoB;IACrC,yBAAyB,CAA4B;CACtD","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 ClustersImpl,\n ClusterPrincipalAssignmentsImpl,\n SkusImpl,\n DatabasesImpl,\n AttachedDatabaseConfigurationsImpl,\n ManagedPrivateEndpointsImpl,\n DatabaseOperationsImpl,\n DatabasePrincipalAssignmentsImpl,\n ScriptsImpl,\n SandboxCustomImagesImpl,\n PrivateEndpointConnectionsImpl,\n PrivateLinkResourcesImpl,\n DataConnectionsImpl,\n OperationsImpl,\n OperationsResultsImpl,\n OperationsResultsLocationImpl,\n} from \"./operations/index.js\";\nimport {\n Clusters,\n ClusterPrincipalAssignments,\n Skus,\n Databases,\n AttachedDatabaseConfigurations,\n ManagedPrivateEndpoints,\n DatabaseOperations,\n DatabasePrincipalAssignments,\n Scripts,\n SandboxCustomImages,\n PrivateEndpointConnections,\n PrivateLinkResources,\n DataConnections,\n Operations,\n OperationsResults,\n OperationsResultsLocation,\n} from \"./operationsInterfaces/index.js\";\nimport { KustoManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class KustoManagementClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the KustoManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: KustoManagementClientOptionalParams,\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: KustoManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-kusto/8.2.1`;\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[] =\n 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 || \"2024-04-13\";\n this.clusters = new ClustersImpl(this);\n this.clusterPrincipalAssignments = new ClusterPrincipalAssignmentsImpl(\n this,\n );\n this.skus = new SkusImpl(this);\n this.databases = new DatabasesImpl(this);\n this.attachedDatabaseConfigurations =\n new AttachedDatabaseConfigurationsImpl(this);\n this.managedPrivateEndpoints = new ManagedPrivateEndpointsImpl(this);\n this.databaseOperations = new DatabaseOperationsImpl(this);\n this.databasePrincipalAssignments = new DatabasePrincipalAssignmentsImpl(\n this,\n );\n this.scripts = new ScriptsImpl(this);\n this.sandboxCustomImages = new SandboxCustomImagesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.dataConnections = new DataConnectionsImpl(this);\n this.operations = new OperationsImpl(this);\n this.operationsResults = new OperationsResultsImpl(this);\n this.operationsResultsLocation = new OperationsResultsLocationImpl(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 clusters: Clusters;\n clusterPrincipalAssignments: ClusterPrincipalAssignments;\n skus: Skus;\n databases: Databases;\n attachedDatabaseConfigurations: AttachedDatabaseConfigurations;\n managedPrivateEndpoints: ManagedPrivateEndpoints;\n databaseOperations: DatabaseOperations;\n databasePrincipalAssignments: DatabasePrincipalAssignments;\n scripts: Scripts;\n sandboxCustomImages: SandboxCustomImages;\n privateEndpointConnections: PrivateEndpointConnections;\n privateLinkResources: PrivateLinkResources;\n dataConnections: DataConnections;\n operations: Operations;\n operationsResults: OperationsResults;\n operationsResultsLocation: OperationsResultsLocation;\n}\n"]}
|
package/dist/browser/lroImpl.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
1
|
export function createLroSpec(inputs) {
|
|
3
2
|
const { args, spec, sendOperationFn } = inputs;
|
|
4
3
|
return {
|
|
@@ -6,8 +5,13 @@ export function createLroSpec(inputs) {
|
|
|
6
5
|
requestPath: spec.path,
|
|
7
6
|
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
8
7
|
sendPollRequest: (path, options) => {
|
|
9
|
-
const { requestBody
|
|
10
|
-
return sendOperationFn(args,
|
|
8
|
+
const { requestBody, ...restSpec } = spec;
|
|
9
|
+
return sendOperationFn(args, {
|
|
10
|
+
...restSpec,
|
|
11
|
+
httpMethod: "GET",
|
|
12
|
+
path,
|
|
13
|
+
abortSignal: options?.abortSignal,
|
|
14
|
+
});
|
|
11
15
|
},
|
|
12
16
|
};
|
|
13
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,aAAa,CAAI,MAQhC;IACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,WAAW,EAAE,IAAI,CAAC,IAAK;QACvB,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;QACrD,eAAe,EAAE,CACf,IAAY,EACZ,OAA2C,EAC3C,EAAE;YACF,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;YAC1C,OAAO,eAAe,CAAC,IAAI,EAAE;gBAC3B,GAAG,QAAQ;gBACX,UAAU,EAAE,KAAK;gBACjB,IAAI;gBACJ,WAAW,EAAE,OAAO,EAAE,WAAW;aAClC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,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 */\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (\n path: string,\n options?: { abortSignal?: AbortSignalLike },\n ) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal,\n });\n },\n };\n}\n"]}
|