@azure/arm-kusto 7.1.1 → 7.1.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/CHANGELOG.md +7 -1
- package/dist/index.js +30 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/clustersCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/clustersCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/src/kustoManagementClient.d.ts +2 -0
- package/dist-esm/src/kustoManagementClient.d.ts.map +1 -1
- package/dist-esm/src/kustoManagementClient.js +30 -1
- package/dist-esm/src/kustoManagementClient.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +2 -2
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/test/kusto-client-test.d.ts.map +1 -1
- package/dist-esm/test/kusto-client-test.js +17 -19
- package/dist-esm/test/kusto-client-test.js.map +1 -1
- package/package.json +8 -4
- package/review/arm-kusto.api.md +1 -1
- package/src/kustoManagementClient.ts +35 -1
- package/src/models/index.ts +2 -2
- package/types/arm-kusto.d.ts +4 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var tslib = require('tslib');
|
|
5
6
|
var coreClient = require('@azure/core-client');
|
|
6
7
|
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
7
|
-
var tslib = require('tslib');
|
|
8
8
|
var coreLro = require('@azure/core-lro');
|
|
9
9
|
|
|
10
10
|
function _interopNamespace(e) {
|
|
@@ -8555,7 +8555,7 @@ class KustoManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
8555
8555
|
requestContentType: "application/json; charset=utf-8",
|
|
8556
8556
|
credential: credentials
|
|
8557
8557
|
};
|
|
8558
|
-
const packageDetails = `azsdk-js-arm-kusto/7.1.
|
|
8558
|
+
const packageDetails = `azsdk-js-arm-kusto/7.1.2`;
|
|
8559
8559
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
8560
8560
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
8561
8561
|
: `${packageDetails}`;
|
|
@@ -8600,6 +8600,34 @@ class KustoManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
8600
8600
|
this.operations = new OperationsImpl(this);
|
|
8601
8601
|
this.operationsResults = new OperationsResultsImpl(this);
|
|
8602
8602
|
this.operationsResultsLocation = new OperationsResultsLocationImpl(this);
|
|
8603
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
8604
|
+
}
|
|
8605
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
8606
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
8607
|
+
if (!apiVersion) {
|
|
8608
|
+
return;
|
|
8609
|
+
}
|
|
8610
|
+
const apiVersionPolicy = {
|
|
8611
|
+
name: "CustomApiVersionPolicy",
|
|
8612
|
+
sendRequest(request, next) {
|
|
8613
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
8614
|
+
const param = request.url.split("?");
|
|
8615
|
+
if (param.length > 1) {
|
|
8616
|
+
const newParams = param[1].split("&").map((item) => {
|
|
8617
|
+
if (item.indexOf("api-version") > -1) {
|
|
8618
|
+
return item.replace(/(?<==).*$/, apiVersion);
|
|
8619
|
+
}
|
|
8620
|
+
else {
|
|
8621
|
+
return item;
|
|
8622
|
+
}
|
|
8623
|
+
});
|
|
8624
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
8625
|
+
}
|
|
8626
|
+
return next(request);
|
|
8627
|
+
});
|
|
8628
|
+
}
|
|
8629
|
+
};
|
|
8630
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
8603
8631
|
}
|
|
8604
8632
|
}
|
|
8605
8633
|
|