@azure/arm-cognitiveservices 7.2.1-alpha.20221003.1 → 7.3.0

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +17 -5
  2. package/dist/index.js +109 -16
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/accountsCreateSample.js +2 -2
  7. package/dist-esm/samples-dev/accountsDeleteSample.js +1 -1
  8. package/dist-esm/samples-dev/accountsGetSample.js +1 -1
  9. package/dist-esm/samples-dev/accountsListByResourceGroupSample.js +1 -1
  10. package/dist-esm/samples-dev/accountsListKeysSample.js +1 -1
  11. package/dist-esm/samples-dev/accountsListModelsSample.js +1 -1
  12. package/dist-esm/samples-dev/accountsListSample.js +1 -1
  13. package/dist-esm/samples-dev/accountsListSkusSample.js +1 -1
  14. package/dist-esm/samples-dev/accountsListUsagesSample.js +1 -1
  15. package/dist-esm/samples-dev/accountsRegenerateKeySample.js +1 -1
  16. package/dist-esm/samples-dev/accountsUpdateSample.js +1 -1
  17. package/dist-esm/samples-dev/checkDomainAvailabilitySample.js +1 -1
  18. package/dist-esm/samples-dev/checkSkuAvailabilitySample.js +1 -1
  19. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateSample.js +1 -1
  20. package/dist-esm/samples-dev/commitmentPlansDeleteSample.js +1 -1
  21. package/dist-esm/samples-dev/commitmentPlansGetSample.js +1 -1
  22. package/dist-esm/samples-dev/commitmentPlansListSample.js +1 -1
  23. package/dist-esm/samples-dev/commitmentTiersListSample.js +1 -1
  24. package/dist-esm/samples-dev/deletedAccountsGetSample.js +1 -1
  25. package/dist-esm/samples-dev/deletedAccountsListSample.js +1 -1
  26. package/dist-esm/samples-dev/deletedAccountsPurgeSample.js +1 -1
  27. package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js +1 -1
  28. package/dist-esm/samples-dev/deploymentsDeleteSample.js +1 -1
  29. package/dist-esm/samples-dev/deploymentsGetSample.js +1 -1
  30. package/dist-esm/samples-dev/deploymentsListSample.js +1 -1
  31. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  32. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +1 -1
  33. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +1 -1
  34. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +1 -1
  35. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +1 -1
  36. package/dist-esm/samples-dev/privateLinkResourcesListSample.js +1 -1
  37. package/dist-esm/samples-dev/resourceSkusListSample.js +1 -1
  38. package/dist-esm/src/cognitiveServicesManagementClient.d.ts.map +1 -1
  39. package/dist-esm/src/cognitiveServicesManagementClient.js +23 -15
  40. package/dist-esm/src/cognitiveServicesManagementClient.js.map +1 -1
  41. package/dist-esm/src/models/index.d.ts +92 -15
  42. package/dist-esm/src/models/index.d.ts.map +1 -1
  43. package/dist-esm/src/models/index.js +57 -0
  44. package/dist-esm/src/models/index.js.map +1 -1
  45. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  46. package/dist-esm/src/models/mappers.js +28 -0
  47. package/dist-esm/src/models/mappers.js.map +1 -1
  48. package/dist-esm/src/models/parameters.js +1 -1
  49. package/dist-esm/test/cognitiveservices_examples.js +1 -1
  50. package/dist-esm/test/cognitiveservices_examples.js.map +1 -1
  51. package/package.json +9 -9
  52. package/review/arm-cognitiveservices.api.md +29 -79
  53. package/src/cognitiveServicesManagementClient.ts +28 -18
  54. package/src/models/index.ts +89 -15
  55. package/src/models/mappers.ts +28 -0
  56. package/src/models/parameters.ts +1 -1
  57. package/types/arm-cognitiveservices.d.ts +92 -15
  58. package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,11 +1,23 @@
1
1
  # Release History
2
2
 
3
- ## 7.2.1 (2022-09-30)
4
-
5
- **Bugs Fixed**
6
-
7
- - fix better user experience of credential scopes in government cloud
3
+ ## 7.3.0 (2022-10-31)
4
+
5
+ **Features**
8
6
 
7
+ - Added Interface Account
8
+ - Added Interface AccountModel
9
+ - Added Interface AzureEntityResource
10
+ - Added Interface CommitmentPlan
11
+ - Added Interface Deployment
12
+ - Added Interface PrivateEndpointConnection
13
+ - Added Interface PrivateLinkResource
14
+ - Added Interface ProxyResource
15
+ - Interface DeploymentModel has a new optional parameter callRateLimit
16
+ - Interface DeploymentProperties has a new optional parameter callRateLimit
17
+ - Interface DeploymentProperties has a new optional parameter capabilities
18
+ - Interface DeploymentProperties has a new optional parameter raiPolicyName
19
+
20
+
9
21
  ## 7.2.0 (2022-06-10)
10
22
 
11
23
  **Features**
package/dist/index.js CHANGED
@@ -38,122 +38,179 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
38
38
  /** Known values of {@link SkuTier} that the service accepts. */
39
39
  exports.KnownSkuTier = void 0;
40
40
  (function (KnownSkuTier) {
41
+ /** Free */
41
42
  KnownSkuTier["Free"] = "Free";
43
+ /** Basic */
42
44
  KnownSkuTier["Basic"] = "Basic";
45
+ /** Standard */
43
46
  KnownSkuTier["Standard"] = "Standard";
47
+ /** Premium */
44
48
  KnownSkuTier["Premium"] = "Premium";
49
+ /** Enterprise */
45
50
  KnownSkuTier["Enterprise"] = "Enterprise";
46
51
  })(exports.KnownSkuTier || (exports.KnownSkuTier = {}));
47
52
  /** Known values of {@link CreatedByType} that the service accepts. */
48
53
  exports.KnownCreatedByType = void 0;
49
54
  (function (KnownCreatedByType) {
55
+ /** User */
50
56
  KnownCreatedByType["User"] = "User";
57
+ /** Application */
51
58
  KnownCreatedByType["Application"] = "Application";
59
+ /** ManagedIdentity */
52
60
  KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
61
+ /** Key */
53
62
  KnownCreatedByType["Key"] = "Key";
54
63
  })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
55
64
  /** Known values of {@link ProvisioningState} that the service accepts. */
56
65
  exports.KnownProvisioningState = void 0;
57
66
  (function (KnownProvisioningState) {
67
+ /** Accepted */
58
68
  KnownProvisioningState["Accepted"] = "Accepted";
69
+ /** Creating */
59
70
  KnownProvisioningState["Creating"] = "Creating";
71
+ /** Deleting */
60
72
  KnownProvisioningState["Deleting"] = "Deleting";
73
+ /** Moving */
61
74
  KnownProvisioningState["Moving"] = "Moving";
75
+ /** Failed */
62
76
  KnownProvisioningState["Failed"] = "Failed";
77
+ /** Succeeded */
63
78
  KnownProvisioningState["Succeeded"] = "Succeeded";
79
+ /** ResolvingDNS */
64
80
  KnownProvisioningState["ResolvingDNS"] = "ResolvingDNS";
65
81
  })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
66
82
  /** Known values of {@link NetworkRuleAction} that the service accepts. */
67
83
  exports.KnownNetworkRuleAction = void 0;
68
84
  (function (KnownNetworkRuleAction) {
85
+ /** Allow */
69
86
  KnownNetworkRuleAction["Allow"] = "Allow";
87
+ /** Deny */
70
88
  KnownNetworkRuleAction["Deny"] = "Deny";
71
89
  })(exports.KnownNetworkRuleAction || (exports.KnownNetworkRuleAction = {}));
72
90
  /** Known values of {@link KeySource} that the service accepts. */
73
91
  exports.KnownKeySource = void 0;
74
92
  (function (KnownKeySource) {
93
+ /** MicrosoftCognitiveServices */
75
94
  KnownKeySource["MicrosoftCognitiveServices"] = "Microsoft.CognitiveServices";
95
+ /** MicrosoftKeyVault */
76
96
  KnownKeySource["MicrosoftKeyVault"] = "Microsoft.KeyVault";
77
97
  })(exports.KnownKeySource || (exports.KnownKeySource = {}));
78
98
  /** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */
79
99
  exports.KnownPrivateEndpointServiceConnectionStatus = void 0;
80
100
  (function (KnownPrivateEndpointServiceConnectionStatus) {
101
+ /** Pending */
81
102
  KnownPrivateEndpointServiceConnectionStatus["Pending"] = "Pending";
103
+ /** Approved */
82
104
  KnownPrivateEndpointServiceConnectionStatus["Approved"] = "Approved";
105
+ /** Rejected */
83
106
  KnownPrivateEndpointServiceConnectionStatus["Rejected"] = "Rejected";
84
107
  })(exports.KnownPrivateEndpointServiceConnectionStatus || (exports.KnownPrivateEndpointServiceConnectionStatus = {}));
85
108
  /** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */
86
109
  exports.KnownPrivateEndpointConnectionProvisioningState = void 0;
87
110
  (function (KnownPrivateEndpointConnectionProvisioningState) {
111
+ /** Succeeded */
88
112
  KnownPrivateEndpointConnectionProvisioningState["Succeeded"] = "Succeeded";
113
+ /** Creating */
89
114
  KnownPrivateEndpointConnectionProvisioningState["Creating"] = "Creating";
115
+ /** Deleting */
90
116
  KnownPrivateEndpointConnectionProvisioningState["Deleting"] = "Deleting";
117
+ /** Failed */
91
118
  KnownPrivateEndpointConnectionProvisioningState["Failed"] = "Failed";
92
119
  })(exports.KnownPrivateEndpointConnectionProvisioningState || (exports.KnownPrivateEndpointConnectionProvisioningState = {}));
93
120
  /** Known values of {@link PublicNetworkAccess} that the service accepts. */
94
121
  exports.KnownPublicNetworkAccess = void 0;
95
122
  (function (KnownPublicNetworkAccess) {
123
+ /** Enabled */
96
124
  KnownPublicNetworkAccess["Enabled"] = "Enabled";
125
+ /** Disabled */
97
126
  KnownPublicNetworkAccess["Disabled"] = "Disabled";
98
127
  })(exports.KnownPublicNetworkAccess || (exports.KnownPublicNetworkAccess = {}));
99
128
  /** Known values of {@link ResourceSkuRestrictionsReasonCode} that the service accepts. */
100
129
  exports.KnownResourceSkuRestrictionsReasonCode = void 0;
101
130
  (function (KnownResourceSkuRestrictionsReasonCode) {
131
+ /** QuotaId */
102
132
  KnownResourceSkuRestrictionsReasonCode["QuotaId"] = "QuotaId";
133
+ /** NotAvailableForSubscription */
103
134
  KnownResourceSkuRestrictionsReasonCode["NotAvailableForSubscription"] = "NotAvailableForSubscription";
104
135
  })(exports.KnownResourceSkuRestrictionsReasonCode || (exports.KnownResourceSkuRestrictionsReasonCode = {}));
105
136
  /** Known values of {@link UnitType} that the service accepts. */
106
137
  exports.KnownUnitType = void 0;
107
138
  (function (KnownUnitType) {
139
+ /** Count */
108
140
  KnownUnitType["Count"] = "Count";
141
+ /** Bytes */
109
142
  KnownUnitType["Bytes"] = "Bytes";
143
+ /** Seconds */
110
144
  KnownUnitType["Seconds"] = "Seconds";
145
+ /** Percent */
111
146
  KnownUnitType["Percent"] = "Percent";
147
+ /** CountPerSecond */
112
148
  KnownUnitType["CountPerSecond"] = "CountPerSecond";
149
+ /** BytesPerSecond */
113
150
  KnownUnitType["BytesPerSecond"] = "BytesPerSecond";
151
+ /** Milliseconds */
114
152
  KnownUnitType["Milliseconds"] = "Milliseconds";
115
153
  })(exports.KnownUnitType || (exports.KnownUnitType = {}));
116
154
  /** Known values of {@link QuotaUsageStatus} that the service accepts. */
117
155
  exports.KnownQuotaUsageStatus = void 0;
118
156
  (function (KnownQuotaUsageStatus) {
157
+ /** Included */
119
158
  KnownQuotaUsageStatus["Included"] = "Included";
159
+ /** Blocked */
120
160
  KnownQuotaUsageStatus["Blocked"] = "Blocked";
161
+ /** InOverage */
121
162
  KnownQuotaUsageStatus["InOverage"] = "InOverage";
163
+ /** Unknown */
122
164
  KnownQuotaUsageStatus["Unknown"] = "Unknown";
123
165
  })(exports.KnownQuotaUsageStatus || (exports.KnownQuotaUsageStatus = {}));
124
166
  /** Known values of {@link Origin} that the service accepts. */
125
167
  exports.KnownOrigin = void 0;
126
168
  (function (KnownOrigin) {
169
+ /** User */
127
170
  KnownOrigin["User"] = "user";
171
+ /** System */
128
172
  KnownOrigin["System"] = "system";
173
+ /** UserSystem */
129
174
  KnownOrigin["UserSystem"] = "user,system";
130
175
  })(exports.KnownOrigin || (exports.KnownOrigin = {}));
131
176
  /** Known values of {@link ActionType} that the service accepts. */
132
177
  exports.KnownActionType = void 0;
133
178
  (function (KnownActionType) {
179
+ /** Internal */
134
180
  KnownActionType["Internal"] = "Internal";
135
181
  })(exports.KnownActionType || (exports.KnownActionType = {}));
136
182
  /** Known values of {@link HostingModel} that the service accepts. */
137
183
  exports.KnownHostingModel = void 0;
138
184
  (function (KnownHostingModel) {
185
+ /** Web */
139
186
  KnownHostingModel["Web"] = "Web";
187
+ /** ConnectedContainer */
140
188
  KnownHostingModel["ConnectedContainer"] = "ConnectedContainer";
189
+ /** DisconnectedContainer */
141
190
  KnownHostingModel["DisconnectedContainer"] = "DisconnectedContainer";
142
191
  })(exports.KnownHostingModel || (exports.KnownHostingModel = {}));
143
192
  /** Known values of {@link DeploymentProvisioningState} that the service accepts. */
144
193
  exports.KnownDeploymentProvisioningState = void 0;
145
194
  (function (KnownDeploymentProvisioningState) {
195
+ /** Accepted */
146
196
  KnownDeploymentProvisioningState["Accepted"] = "Accepted";
197
+ /** Creating */
147
198
  KnownDeploymentProvisioningState["Creating"] = "Creating";
199
+ /** Deleting */
148
200
  KnownDeploymentProvisioningState["Deleting"] = "Deleting";
201
+ /** Moving */
149
202
  KnownDeploymentProvisioningState["Moving"] = "Moving";
203
+ /** Failed */
150
204
  KnownDeploymentProvisioningState["Failed"] = "Failed";
205
+ /** Succeeded */
151
206
  KnownDeploymentProvisioningState["Succeeded"] = "Succeeded";
152
207
  })(exports.KnownDeploymentProvisioningState || (exports.KnownDeploymentProvisioningState = {}));
153
208
  /** Known values of {@link DeploymentScaleType} that the service accepts. */
154
209
  exports.KnownDeploymentScaleType = void 0;
155
210
  (function (KnownDeploymentScaleType) {
211
+ /** Standard */
156
212
  KnownDeploymentScaleType["Standard"] = "Standard";
213
+ /** Manual */
157
214
  KnownDeploymentScaleType["Manual"] = "Manual";
158
215
  })(exports.KnownDeploymentScaleType || (exports.KnownDeploymentScaleType = {}));
159
216
 
@@ -1530,6 +1587,13 @@ const DeploymentModel = {
1530
1587
  type: {
1531
1588
  name: "String"
1532
1589
  }
1590
+ },
1591
+ callRateLimit: {
1592
+ serializedName: "callRateLimit",
1593
+ type: {
1594
+ name: "Composite",
1595
+ className: "CallRateLimit"
1596
+ }
1533
1597
  }
1534
1598
  }
1535
1599
  }
@@ -2087,6 +2151,27 @@ const DeploymentProperties = {
2087
2151
  name: "Composite",
2088
2152
  className: "DeploymentScaleSettings"
2089
2153
  }
2154
+ },
2155
+ capabilities: {
2156
+ serializedName: "capabilities",
2157
+ readOnly: true,
2158
+ type: {
2159
+ name: "Dictionary",
2160
+ value: { type: { name: "String" } }
2161
+ }
2162
+ },
2163
+ raiPolicyName: {
2164
+ serializedName: "raiPolicyName",
2165
+ type: {
2166
+ name: "String"
2167
+ }
2168
+ },
2169
+ callRateLimit: {
2170
+ serializedName: "callRateLimit",
2171
+ type: {
2172
+ name: "Composite",
2173
+ className: "CallRateLimit"
2174
+ }
2090
2175
  }
2091
2176
  }
2092
2177
  }
@@ -2573,7 +2658,7 @@ const accountName = {
2573
2658
  const apiVersion = {
2574
2659
  parameterPath: "apiVersion",
2575
2660
  mapper: {
2576
- defaultValue: "2022-03-01",
2661
+ defaultValue: "2022-10-01",
2577
2662
  isConstant: true,
2578
2663
  serializedName: "api-version",
2579
2664
  type: {
@@ -4994,35 +5079,43 @@ class CognitiveServicesManagementClient extends coreClient__namespace.ServiceCli
4994
5079
  requestContentType: "application/json; charset=utf-8",
4995
5080
  credential: credentials
4996
5081
  };
4997
- const packageDetails = `azsdk-js-arm-cognitiveservices/7.2.1`;
5082
+ const packageDetails = `azsdk-js-arm-cognitiveservices/7.3.0`;
4998
5083
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
4999
5084
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
5000
5085
  : `${packageDetails}`;
5086
+ if (!options.credentialScopes) {
5087
+ options.credentialScopes = ["https://management.azure.com/.default"];
5088
+ }
5001
5089
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
5002
5090
  userAgentPrefix
5003
5091
  }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
5004
5092
  super(optionsWithDefaults);
5093
+ let bearerTokenAuthenticationPolicyFound = false;
5005
5094
  if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
5006
5095
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
5007
- const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
5096
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
5008
5097
  coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
5009
- if (!bearerTokenAuthenticationPolicyFound) {
5010
- this.pipeline.removePolicy({
5011
- name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
5012
- });
5013
- this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
5014
- scopes: `${optionsWithDefaults.baseUri}/.default`,
5015
- challengeCallbacks: {
5016
- authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
5017
- }
5018
- }));
5019
- }
5098
+ }
5099
+ if (!options ||
5100
+ !options.pipeline ||
5101
+ options.pipeline.getOrderedPolicies().length == 0 ||
5102
+ !bearerTokenAuthenticationPolicyFound) {
5103
+ this.pipeline.removePolicy({
5104
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
5105
+ });
5106
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
5107
+ credential: credentials,
5108
+ scopes: `${optionsWithDefaults.credentialScopes}`,
5109
+ challengeCallbacks: {
5110
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
5111
+ }
5112
+ }));
5020
5113
  }
5021
5114
  // Parameter assignments
5022
5115
  this.subscriptionId = subscriptionId;
5023
5116
  // Assigning values to Constant parameters
5024
5117
  this.$host = options.$host || "https://management.azure.com";
5025
- this.apiVersion = options.apiVersion || "2022-03-01";
5118
+ this.apiVersion = options.apiVersion || "2022-10-01";
5026
5119
  this.accounts = new AccountsImpl(this);
5027
5120
  this.deletedAccounts = new DeletedAccountsImpl(this);
5028
5121
  this.resourceSkus = new ResourceSkusImpl(this);
@@ -5047,7 +5140,7 @@ class CognitiveServicesManagementClient extends coreClient__namespace.ServiceCli
5047
5140
  if (param.length > 1) {
5048
5141
  const newParams = param[1].split("&").map((item) => {
5049
5142
  if (item.indexOf("api-version") > -1) {
5050
- return item.replace(/(?<==).*$/, apiVersion);
5143
+ return "api-version=" + apiVersion;
5051
5144
  }
5052
5145
  else {
5053
5146
  return item;