@azure/arm-cognitiveservices 7.1.1-alpha.20220413.1 → 7.2.0-alpha.20220907.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -10
- package/dist/index.js +49 -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/src/cognitiveServicesManagementClient.d.ts +2 -0
- package/dist-esm/src/cognitiveServicesManagementClient.d.ts.map +1 -1
- package/dist-esm/src/cognitiveServicesManagementClient.js +47 -1
- package/dist-esm/src/cognitiveServicesManagementClient.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +3 -1
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +1 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/test/cognitiveservices_examples.d.ts.map +1 -1
- package/dist-esm/test/cognitiveservices_examples.js +16 -18
- package/dist-esm/test/cognitiveservices_examples.js.map +1 -1
- package/package.json +11 -7
- package/review/arm-cognitiveservices.api.md +4 -2
- package/src/cognitiveServicesManagementClient.ts +59 -1
- package/src/models/index.ts +3 -1
- package/types/arm-cognitiveservices.d.ts +5 -1
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
# Release History
|
|
2
|
+
|
|
3
|
+
## 7.2.0 (2022-06-10)
|
|
4
|
+
|
|
5
|
+
**Features**
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
### Breaking Changes
|
|
8
|
-
|
|
9
|
-
### Bugs Fixed
|
|
10
|
-
|
|
11
|
-
### Other Changes
|
|
12
|
-
|
|
7
|
+
- Enum KnownDeploymentScaleType has a new value Standard
|
|
8
|
+
|
|
9
|
+
|
|
13
10
|
## 7.1.0 (2022-04-06)
|
|
14
11
|
|
|
15
12
|
**Features**
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var coreClient = require('@azure/core-client');
|
|
6
5
|
var tslib = require('tslib');
|
|
6
|
+
var coreClient = require('@azure/core-client');
|
|
7
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
7
8
|
var coreLro = require('@azure/core-lro');
|
|
8
9
|
|
|
9
10
|
function _interopNamespace(e) {
|
|
@@ -25,6 +26,7 @@ function _interopNamespace(e) {
|
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
29
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
28
30
|
|
|
29
31
|
/*
|
|
30
32
|
* Copyright (c) Microsoft Corporation.
|
|
@@ -151,6 +153,7 @@ exports.KnownDeploymentProvisioningState = void 0;
|
|
|
151
153
|
/** Known values of {@link DeploymentScaleType} that the service accepts. */
|
|
152
154
|
exports.KnownDeploymentScaleType = void 0;
|
|
153
155
|
(function (KnownDeploymentScaleType) {
|
|
156
|
+
KnownDeploymentScaleType["Standard"] = "Standard";
|
|
154
157
|
KnownDeploymentScaleType["Manual"] = "Manual";
|
|
155
158
|
})(exports.KnownDeploymentScaleType || (exports.KnownDeploymentScaleType = {}));
|
|
156
159
|
|
|
@@ -4991,7 +4994,7 @@ class CognitiveServicesManagementClient extends coreClient__namespace.ServiceCli
|
|
|
4991
4994
|
requestContentType: "application/json; charset=utf-8",
|
|
4992
4995
|
credential: credentials
|
|
4993
4996
|
};
|
|
4994
|
-
const packageDetails = `azsdk-js-arm-cognitiveservices/7.
|
|
4997
|
+
const packageDetails = `azsdk-js-arm-cognitiveservices/7.2.0`;
|
|
4995
4998
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
4996
4999
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
4997
5000
|
: `${packageDetails}`;
|
|
@@ -5002,6 +5005,22 @@ class CognitiveServicesManagementClient extends coreClient__namespace.ServiceCli
|
|
|
5002
5005
|
userAgentPrefix
|
|
5003
5006
|
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
5004
5007
|
super(optionsWithDefaults);
|
|
5008
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
5009
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
5010
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
5011
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
5012
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
5013
|
+
this.pipeline.removePolicy({
|
|
5014
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
5015
|
+
});
|
|
5016
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
5017
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
5018
|
+
challengeCallbacks: {
|
|
5019
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
5020
|
+
}
|
|
5021
|
+
}));
|
|
5022
|
+
}
|
|
5023
|
+
}
|
|
5005
5024
|
// Parameter assignments
|
|
5006
5025
|
this.subscriptionId = subscriptionId;
|
|
5007
5026
|
// Assigning values to Constant parameters
|
|
@@ -5016,6 +5035,34 @@ class CognitiveServicesManagementClient extends coreClient__namespace.ServiceCli
|
|
|
5016
5035
|
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
|
|
5017
5036
|
this.deployments = new DeploymentsImpl(this);
|
|
5018
5037
|
this.commitmentPlans = new CommitmentPlansImpl(this);
|
|
5038
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
5039
|
+
}
|
|
5040
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
5041
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
5042
|
+
if (!apiVersion) {
|
|
5043
|
+
return;
|
|
5044
|
+
}
|
|
5045
|
+
const apiVersionPolicy = {
|
|
5046
|
+
name: "CustomApiVersionPolicy",
|
|
5047
|
+
sendRequest(request, next) {
|
|
5048
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5049
|
+
const param = request.url.split("?");
|
|
5050
|
+
if (param.length > 1) {
|
|
5051
|
+
const newParams = param[1].split("&").map((item) => {
|
|
5052
|
+
if (item.indexOf("api-version") > -1) {
|
|
5053
|
+
return item.replace(/(?<==).*$/, apiVersion);
|
|
5054
|
+
}
|
|
5055
|
+
else {
|
|
5056
|
+
return item;
|
|
5057
|
+
}
|
|
5058
|
+
});
|
|
5059
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
5060
|
+
}
|
|
5061
|
+
return next(request);
|
|
5062
|
+
});
|
|
5063
|
+
}
|
|
5064
|
+
};
|
|
5065
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
5019
5066
|
}
|
|
5020
5067
|
/**
|
|
5021
5068
|
* Check available SKUs.
|