@azure/arm-cognitiveservices 7.7.0-alpha.20250717.1 → 7.7.0-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/cognitiveServicesManagementClient.js +40 -8
- package/dist/browser/cognitiveServicesManagementClient.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 +286 -125
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/accountCapabilityHosts.js +23 -12
- package/dist/browser/operations/accountCapabilityHosts.js.map +1 -1
- package/dist/browser/operations/accountConnection.js +23 -40
- package/dist/browser/operations/accountConnection.js.map +1 -1
- package/dist/browser/operations/accounts.js +101 -137
- package/dist/browser/operations/accounts.js.map +1 -1
- package/dist/browser/operations/commitmentPlans.js +155 -193
- package/dist/browser/operations/commitmentPlans.js.map +1 -1
- package/dist/browser/operations/commitmentTiers.js +23 -40
- package/dist/browser/operations/commitmentTiers.js.map +1 -1
- package/dist/browser/operations/defenderForAISettings.js +23 -40
- package/dist/browser/operations/defenderForAISettings.js.map +1 -1
- package/dist/browser/operations/deletedAccounts.js +34 -46
- package/dist/browser/operations/deletedAccounts.js.map +1 -1
- package/dist/browser/operations/deployments.js +78 -97
- package/dist/browser/operations/deployments.js.map +1 -1
- package/dist/browser/operations/encryptionScopes.js +34 -46
- package/dist/browser/operations/encryptionScopes.js.map +1 -1
- package/dist/browser/operations/locationBasedModelCapacities.js +23 -40
- package/dist/browser/operations/locationBasedModelCapacities.js.map +1 -1
- package/dist/browser/operations/modelCapacities.js +23 -40
- package/dist/browser/operations/modelCapacities.js.map +1 -1
- package/dist/browser/operations/models.js +23 -40
- package/dist/browser/operations/models.js.map +1 -1
- package/dist/browser/operations/networkSecurityPerimeterConfigurations.js +34 -46
- package/dist/browser/operations/networkSecurityPerimeterConfigurations.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/privateEndpointConnections.js +23 -12
- package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
- package/dist/browser/operations/privateLinkResources.js +1 -0
- package/dist/browser/operations/privateLinkResources.js.map +1 -1
- package/dist/browser/operations/projectCapabilityHosts.js +23 -12
- package/dist/browser/operations/projectCapabilityHosts.js.map +1 -1
- package/dist/browser/operations/projectConnection.js +23 -40
- package/dist/browser/operations/projectConnection.js.map +1 -1
- package/dist/browser/operations/projects.js +56 -58
- package/dist/browser/operations/projects.js.map +1 -1
- package/dist/browser/operations/raiBlocklistItems.js +34 -46
- package/dist/browser/operations/raiBlocklistItems.js.map +1 -1
- package/dist/browser/operations/raiBlocklists.js +34 -46
- package/dist/browser/operations/raiBlocklists.js.map +1 -1
- package/dist/browser/operations/raiContentFilters.js +23 -40
- package/dist/browser/operations/raiContentFilters.js.map +1 -1
- package/dist/browser/operations/raiPolicies.js +34 -46
- package/dist/browser/operations/raiPolicies.js.map +1 -1
- package/dist/browser/operations/resourceSkus.js +23 -40
- package/dist/browser/operations/resourceSkus.js.map +1 -1
- package/dist/browser/operations/usages.js +23 -40
- package/dist/browser/operations/usages.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/cognitiveServicesManagementClient.js +40 -8
- package/dist/commonjs/cognitiveServicesManagementClient.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 +286 -125
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/accountCapabilityHosts.js +23 -12
- package/dist/commonjs/operations/accountCapabilityHosts.js.map +1 -1
- package/dist/commonjs/operations/accountConnection.js +23 -39
- package/dist/commonjs/operations/accountConnection.js.map +1 -1
- package/dist/commonjs/operations/accounts.js +101 -136
- package/dist/commonjs/operations/accounts.js.map +1 -1
- package/dist/commonjs/operations/commitmentPlans.js +155 -192
- package/dist/commonjs/operations/commitmentPlans.js.map +1 -1
- package/dist/commonjs/operations/commitmentTiers.js +23 -39
- package/dist/commonjs/operations/commitmentTiers.js.map +1 -1
- package/dist/commonjs/operations/defenderForAISettings.js +23 -39
- package/dist/commonjs/operations/defenderForAISettings.js.map +1 -1
- package/dist/commonjs/operations/deletedAccounts.js +34 -45
- package/dist/commonjs/operations/deletedAccounts.js.map +1 -1
- package/dist/commonjs/operations/deployments.js +78 -96
- package/dist/commonjs/operations/deployments.js.map +1 -1
- package/dist/commonjs/operations/encryptionScopes.js +34 -45
- package/dist/commonjs/operations/encryptionScopes.js.map +1 -1
- package/dist/commonjs/operations/locationBasedModelCapacities.js +23 -39
- package/dist/commonjs/operations/locationBasedModelCapacities.js.map +1 -1
- package/dist/commonjs/operations/modelCapacities.js +23 -39
- package/dist/commonjs/operations/modelCapacities.js.map +1 -1
- package/dist/commonjs/operations/models.js +23 -39
- package/dist/commonjs/operations/models.js.map +1 -1
- package/dist/commonjs/operations/networkSecurityPerimeterConfigurations.js +34 -45
- package/dist/commonjs/operations/networkSecurityPerimeterConfigurations.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/privateEndpointConnections.js +23 -12
- package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
- package/dist/commonjs/operations/privateLinkResources.js +1 -0
- package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
- package/dist/commonjs/operations/projectCapabilityHosts.js +23 -12
- package/dist/commonjs/operations/projectCapabilityHosts.js.map +1 -1
- package/dist/commonjs/operations/projectConnection.js +23 -39
- package/dist/commonjs/operations/projectConnection.js.map +1 -1
- package/dist/commonjs/operations/projects.js +56 -57
- package/dist/commonjs/operations/projects.js.map +1 -1
- package/dist/commonjs/operations/raiBlocklistItems.js +34 -45
- package/dist/commonjs/operations/raiBlocklistItems.js.map +1 -1
- package/dist/commonjs/operations/raiBlocklists.js +34 -45
- package/dist/commonjs/operations/raiBlocklists.js.map +1 -1
- package/dist/commonjs/operations/raiContentFilters.js +23 -39
- package/dist/commonjs/operations/raiContentFilters.js.map +1 -1
- package/dist/commonjs/operations/raiPolicies.js +34 -45
- package/dist/commonjs/operations/raiPolicies.js.map +1 -1
- package/dist/commonjs/operations/resourceSkus.js +23 -39
- package/dist/commonjs/operations/resourceSkus.js.map +1 -1
- package/dist/commonjs/operations/usages.js +23 -39
- package/dist/commonjs/operations/usages.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/cognitiveServicesManagementClient.js +40 -8
- package/dist/esm/cognitiveServicesManagementClient.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 +286 -125
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/accountCapabilityHosts.js +23 -12
- package/dist/esm/operations/accountCapabilityHosts.js.map +1 -1
- package/dist/esm/operations/accountConnection.js +23 -40
- package/dist/esm/operations/accountConnection.js.map +1 -1
- package/dist/esm/operations/accounts.js +101 -137
- package/dist/esm/operations/accounts.js.map +1 -1
- package/dist/esm/operations/commitmentPlans.js +155 -193
- package/dist/esm/operations/commitmentPlans.js.map +1 -1
- package/dist/esm/operations/commitmentTiers.js +23 -40
- package/dist/esm/operations/commitmentTiers.js.map +1 -1
- package/dist/esm/operations/defenderForAISettings.js +23 -40
- package/dist/esm/operations/defenderForAISettings.js.map +1 -1
- package/dist/esm/operations/deletedAccounts.js +34 -46
- package/dist/esm/operations/deletedAccounts.js.map +1 -1
- package/dist/esm/operations/deployments.js +78 -97
- package/dist/esm/operations/deployments.js.map +1 -1
- package/dist/esm/operations/encryptionScopes.js +34 -46
- package/dist/esm/operations/encryptionScopes.js.map +1 -1
- package/dist/esm/operations/locationBasedModelCapacities.js +23 -40
- package/dist/esm/operations/locationBasedModelCapacities.js.map +1 -1
- package/dist/esm/operations/modelCapacities.js +23 -40
- package/dist/esm/operations/modelCapacities.js.map +1 -1
- package/dist/esm/operations/models.js +23 -40
- package/dist/esm/operations/models.js.map +1 -1
- package/dist/esm/operations/networkSecurityPerimeterConfigurations.js +34 -46
- package/dist/esm/operations/networkSecurityPerimeterConfigurations.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/privateEndpointConnections.js +23 -12
- package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
- package/dist/esm/operations/privateLinkResources.js +1 -0
- package/dist/esm/operations/privateLinkResources.js.map +1 -1
- package/dist/esm/operations/projectCapabilityHosts.js +23 -12
- package/dist/esm/operations/projectCapabilityHosts.js.map +1 -1
- package/dist/esm/operations/projectConnection.js +23 -40
- package/dist/esm/operations/projectConnection.js.map +1 -1
- package/dist/esm/operations/projects.js +56 -58
- package/dist/esm/operations/projects.js.map +1 -1
- package/dist/esm/operations/raiBlocklistItems.js +34 -46
- package/dist/esm/operations/raiBlocklistItems.js.map +1 -1
- package/dist/esm/operations/raiBlocklists.js +34 -46
- package/dist/esm/operations/raiBlocklists.js.map +1 -1
- package/dist/esm/operations/raiContentFilters.js +23 -40
- package/dist/esm/operations/raiContentFilters.js.map +1 -1
- package/dist/esm/operations/raiPolicies.js +34 -46
- package/dist/esm/operations/raiPolicies.js.map +1 -1
- package/dist/esm/operations/resourceSkus.js +23 -40
- package/dist/esm/operations/resourceSkus.js.map +1 -1
- package/dist/esm/operations/usages.js +23 -40
- package/dist/esm/operations/usages.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/cognitiveServicesManagementClient.js +40 -8
- package/dist/react-native/cognitiveServicesManagementClient.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 +286 -125
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/accountCapabilityHosts.js +23 -12
- package/dist/react-native/operations/accountCapabilityHosts.js.map +1 -1
- package/dist/react-native/operations/accountConnection.js +23 -40
- package/dist/react-native/operations/accountConnection.js.map +1 -1
- package/dist/react-native/operations/accounts.js +101 -137
- package/dist/react-native/operations/accounts.js.map +1 -1
- package/dist/react-native/operations/commitmentPlans.js +155 -193
- package/dist/react-native/operations/commitmentPlans.js.map +1 -1
- package/dist/react-native/operations/commitmentTiers.js +23 -40
- package/dist/react-native/operations/commitmentTiers.js.map +1 -1
- package/dist/react-native/operations/defenderForAISettings.js +23 -40
- package/dist/react-native/operations/defenderForAISettings.js.map +1 -1
- package/dist/react-native/operations/deletedAccounts.js +34 -46
- package/dist/react-native/operations/deletedAccounts.js.map +1 -1
- package/dist/react-native/operations/deployments.js +78 -97
- package/dist/react-native/operations/deployments.js.map +1 -1
- package/dist/react-native/operations/encryptionScopes.js +34 -46
- package/dist/react-native/operations/encryptionScopes.js.map +1 -1
- package/dist/react-native/operations/locationBasedModelCapacities.js +23 -40
- package/dist/react-native/operations/locationBasedModelCapacities.js.map +1 -1
- package/dist/react-native/operations/modelCapacities.js +23 -40
- package/dist/react-native/operations/modelCapacities.js.map +1 -1
- package/dist/react-native/operations/models.js +23 -40
- package/dist/react-native/operations/models.js.map +1 -1
- package/dist/react-native/operations/networkSecurityPerimeterConfigurations.js +34 -46
- package/dist/react-native/operations/networkSecurityPerimeterConfigurations.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/privateEndpointConnections.js +23 -12
- package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
- package/dist/react-native/operations/privateLinkResources.js +1 -0
- package/dist/react-native/operations/privateLinkResources.js.map +1 -1
- package/dist/react-native/operations/projectCapabilityHosts.js +23 -12
- package/dist/react-native/operations/projectCapabilityHosts.js.map +1 -1
- package/dist/react-native/operations/projectConnection.js +23 -40
- package/dist/react-native/operations/projectConnection.js.map +1 -1
- package/dist/react-native/operations/projects.js +56 -58
- package/dist/react-native/operations/projects.js.map +1 -1
- package/dist/react-native/operations/raiBlocklistItems.js +34 -46
- package/dist/react-native/operations/raiBlocklistItems.js.map +1 -1
- package/dist/react-native/operations/raiBlocklists.js +34 -46
- package/dist/react-native/operations/raiBlocklists.js.map +1 -1
- package/dist/react-native/operations/raiContentFilters.js +23 -40
- package/dist/react-native/operations/raiContentFilters.js.map +1 -1
- package/dist/react-native/operations/raiPolicies.js +34 -46
- package/dist/react-native/operations/raiPolicies.js.map +1 -1
- package/dist/react-native/operations/resourceSkus.js +23 -40
- package/dist/react-native/operations/resourceSkus.js.map +1 -1
- package/dist/react-native/operations/usages.js +23 -40
- package/dist/react-native/operations/usages.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-cognitiveservices-node.api.md +3079 -3079
|
@@ -11,6 +11,9 @@ import { AccountsImpl, DeletedAccountsImpl, ResourceSkusImpl, UsagesImpl, Operat
|
|
|
11
11
|
import * as Parameters from "./models/parameters.js";
|
|
12
12
|
import * as Mappers from "./models/mappers.js";
|
|
13
13
|
export class CognitiveServicesManagementClient extends coreClient.ServiceClient {
|
|
14
|
+
$host;
|
|
15
|
+
apiVersion;
|
|
16
|
+
subscriptionId;
|
|
14
17
|
/**
|
|
15
18
|
* Initializes a new instance of the CognitiveServicesManagementClient class.
|
|
16
19
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -18,7 +21,6 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient
|
|
|
18
21
|
* @param options The parameter options
|
|
19
22
|
*/
|
|
20
23
|
constructor(credentials, subscriptionId, options) {
|
|
21
|
-
var _a, _b, _c;
|
|
22
24
|
if (credentials === undefined) {
|
|
23
25
|
throw new Error("'credentials' cannot be null");
|
|
24
26
|
}
|
|
@@ -37,12 +39,17 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient
|
|
|
37
39
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
38
40
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
39
41
|
: `${packageDetails}`;
|
|
40
|
-
const optionsWithDefaults =
|
|
42
|
+
const optionsWithDefaults = {
|
|
43
|
+
...defaults,
|
|
44
|
+
...options,
|
|
45
|
+
userAgentOptions: {
|
|
41
46
|
userAgentPrefix,
|
|
42
|
-
},
|
|
47
|
+
},
|
|
48
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
|
|
49
|
+
};
|
|
43
50
|
super(optionsWithDefaults);
|
|
44
51
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
45
|
-
if (
|
|
52
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
46
53
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
47
54
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
48
55
|
}
|
|
@@ -55,7 +62,7 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient
|
|
|
55
62
|
});
|
|
56
63
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
57
64
|
credential: credentials,
|
|
58
|
-
scopes:
|
|
65
|
+
scopes: optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`,
|
|
59
66
|
challengeCallbacks: {
|
|
60
67
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
|
|
61
68
|
},
|
|
@@ -145,6 +152,31 @@ export class CognitiveServicesManagementClient extends coreClient.ServiceClient
|
|
|
145
152
|
calculateModelCapacity(options) {
|
|
146
153
|
return this.sendOperationRequest({ options }, calculateModelCapacityOperationSpec);
|
|
147
154
|
}
|
|
155
|
+
accounts;
|
|
156
|
+
deletedAccounts;
|
|
157
|
+
resourceSkus;
|
|
158
|
+
usages;
|
|
159
|
+
operations;
|
|
160
|
+
commitmentTiers;
|
|
161
|
+
models;
|
|
162
|
+
locationBasedModelCapacities;
|
|
163
|
+
modelCapacities;
|
|
164
|
+
privateEndpointConnections;
|
|
165
|
+
privateLinkResources;
|
|
166
|
+
deployments;
|
|
167
|
+
commitmentPlans;
|
|
168
|
+
encryptionScopes;
|
|
169
|
+
raiPolicies;
|
|
170
|
+
raiBlocklists;
|
|
171
|
+
raiBlocklistItems;
|
|
172
|
+
raiContentFilters;
|
|
173
|
+
networkSecurityPerimeterConfigurations;
|
|
174
|
+
defenderForAISettings;
|
|
175
|
+
projects;
|
|
176
|
+
accountConnection;
|
|
177
|
+
projectConnection;
|
|
178
|
+
accountCapabilityHosts;
|
|
179
|
+
projectCapabilityHosts;
|
|
148
180
|
}
|
|
149
181
|
// Operation Specifications
|
|
150
182
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
@@ -161,7 +193,7 @@ const checkSkuAvailabilityOperationSpec = {
|
|
|
161
193
|
},
|
|
162
194
|
requestBody: {
|
|
163
195
|
parameterPath: { skus: ["skus"], kind: ["kind"], typeParam: ["typeParam"] },
|
|
164
|
-
mapper:
|
|
196
|
+
mapper: { ...Mappers.CheckSkuAvailabilityParameter, required: true },
|
|
165
197
|
},
|
|
166
198
|
queryParameters: [Parameters.apiVersion],
|
|
167
199
|
urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location],
|
|
@@ -186,7 +218,7 @@ const checkDomainAvailabilityOperationSpec = {
|
|
|
186
218
|
typeParam: ["typeParam"],
|
|
187
219
|
kind: ["options", "kind"],
|
|
188
220
|
},
|
|
189
|
-
mapper:
|
|
221
|
+
mapper: { ...Mappers.CheckDomainAvailabilityParameter, required: true },
|
|
190
222
|
},
|
|
191
223
|
queryParameters: [Parameters.apiVersion],
|
|
192
224
|
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
@@ -211,7 +243,7 @@ const calculateModelCapacityOperationSpec = {
|
|
|
211
243
|
skuName: ["options", "skuName"],
|
|
212
244
|
workloads: ["options", "workloads"],
|
|
213
245
|
},
|
|
214
|
-
mapper:
|
|
246
|
+
mapper: { ...Mappers.CalculateModelCapacityParameter, required: true },
|
|
215
247
|
},
|
|
216
248
|
queryParameters: [Parameters.apiVersion],
|
|
217
249
|
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cognitiveServicesManagementClient.js","sourceRoot":"","sources":["../../src/cognitiveServicesManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,gCAAgC,EAChC,mBAAmB,EACnB,8BAA8B,EAC9B,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,0CAA0C,EAC1C,yBAAyB,EACzB,YAAY,EACZ,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AA4B/B,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAW/C,MAAM,OAAO,iCAAkC,SAAQ,UAAU,CAAC,aAAa;IAK7E;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAyD;;QAEzD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD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EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,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 */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n AccountsImpl,\n DeletedAccountsImpl,\n ResourceSkusImpl,\n UsagesImpl,\n OperationsImpl,\n CommitmentTiersImpl,\n ModelsImpl,\n LocationBasedModelCapacitiesImpl,\n ModelCapacitiesImpl,\n PrivateEndpointConnectionsImpl,\n PrivateLinkResourcesImpl,\n DeploymentsImpl,\n CommitmentPlansImpl,\n EncryptionScopesImpl,\n RaiPoliciesImpl,\n RaiBlocklistsImpl,\n RaiBlocklistItemsImpl,\n RaiContentFiltersImpl,\n NetworkSecurityPerimeterConfigurationsImpl,\n DefenderForAISettingsImpl,\n ProjectsImpl,\n AccountConnectionImpl,\n ProjectConnectionImpl,\n AccountCapabilityHostsImpl,\n ProjectCapabilityHostsImpl,\n} from \"./operations/index.js\";\nimport {\n Accounts,\n DeletedAccounts,\n ResourceSkus,\n Usages,\n Operations,\n CommitmentTiers,\n Models,\n LocationBasedModelCapacities,\n ModelCapacities,\n PrivateEndpointConnections,\n PrivateLinkResources,\n Deployments,\n CommitmentPlans,\n EncryptionScopes,\n RaiPolicies,\n RaiBlocklists,\n RaiBlocklistItems,\n RaiContentFilters,\n NetworkSecurityPerimeterConfigurations,\n DefenderForAISettings,\n Projects,\n AccountConnection,\n ProjectConnection,\n AccountCapabilityHosts,\n ProjectCapabilityHosts,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n CognitiveServicesManagementClientOptionalParams,\n CheckSkuAvailabilityOptionalParams,\n CheckSkuAvailabilityResponse,\n CheckDomainAvailabilityOptionalParams,\n CheckDomainAvailabilityResponse,\n CalculateModelCapacityOptionalParams,\n CalculateModelCapacityResponse,\n} from \"./models/index.js\";\n\nexport class CognitiveServicesManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the CognitiveServicesManagementClient 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?: CognitiveServicesManagementClientOptionalParams,\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: CognitiveServicesManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-cognitiveservices/7.7.0-beta.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: 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 === 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 ?? `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge: 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 || \"2025-04-01-preview\";\n this.accounts = new AccountsImpl(this);\n this.deletedAccounts = new DeletedAccountsImpl(this);\n this.resourceSkus = new ResourceSkusImpl(this);\n this.usages = new UsagesImpl(this);\n this.operations = new OperationsImpl(this);\n this.commitmentTiers = new CommitmentTiersImpl(this);\n this.models = new ModelsImpl(this);\n this.locationBasedModelCapacities = new LocationBasedModelCapacitiesImpl(this);\n this.modelCapacities = new ModelCapacitiesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.deployments = new DeploymentsImpl(this);\n this.commitmentPlans = new CommitmentPlansImpl(this);\n this.encryptionScopes = new EncryptionScopesImpl(this);\n this.raiPolicies = new RaiPoliciesImpl(this);\n this.raiBlocklists = new RaiBlocklistsImpl(this);\n this.raiBlocklistItems = new RaiBlocklistItemsImpl(this);\n this.raiContentFilters = new RaiContentFiltersImpl(this);\n this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsImpl(\n this,\n );\n this.defenderForAISettings = new DefenderForAISettingsImpl(this);\n this.projects = new ProjectsImpl(this);\n this.accountConnection = new AccountConnectionImpl(this);\n this.projectConnection = new ProjectConnectionImpl(this);\n this.accountCapabilityHosts = new AccountCapabilityHostsImpl(this);\n this.projectCapabilityHosts = new ProjectCapabilityHostsImpl(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(request: PipelineRequest, next: SendRequest): 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 /**\n * Check available SKUs.\n * @param location Resource location.\n * @param skus The SKU of the resource.\n * @param kind The kind (type) of cognitive service account.\n * @param typeParam The Type of the resource.\n * @param options The options parameters.\n */\n checkSkuAvailability(\n location: string,\n skus: string[],\n kind: string,\n typeParam: string,\n options?: CheckSkuAvailabilityOptionalParams,\n ): Promise<CheckSkuAvailabilityResponse> {\n return this.sendOperationRequest(\n { location, skus, kind, typeParam, options },\n checkSkuAvailabilityOperationSpec,\n );\n }\n\n /**\n * Check whether a domain is available.\n * @param subdomainName The subdomain name to use.\n * @param typeParam The Type of the resource.\n * @param options The options parameters.\n */\n checkDomainAvailability(\n subdomainName: string,\n typeParam: string,\n options?: CheckDomainAvailabilityOptionalParams,\n ): Promise<CheckDomainAvailabilityResponse> {\n return this.sendOperationRequest(\n { subdomainName, typeParam, options },\n checkDomainAvailabilityOperationSpec,\n );\n }\n\n /**\n * Model capacity calculator.\n * @param options The options parameters.\n */\n calculateModelCapacity(\n options?: CalculateModelCapacityOptionalParams,\n ): Promise<CalculateModelCapacityResponse> {\n return this.sendOperationRequest({ options }, calculateModelCapacityOperationSpec);\n }\n\n accounts: Accounts;\n deletedAccounts: DeletedAccounts;\n resourceSkus: ResourceSkus;\n usages: Usages;\n operations: Operations;\n commitmentTiers: CommitmentTiers;\n models: Models;\n locationBasedModelCapacities: LocationBasedModelCapacities;\n modelCapacities: ModelCapacities;\n privateEndpointConnections: PrivateEndpointConnections;\n privateLinkResources: PrivateLinkResources;\n deployments: Deployments;\n commitmentPlans: CommitmentPlans;\n encryptionScopes: EncryptionScopes;\n raiPolicies: RaiPolicies;\n raiBlocklists: RaiBlocklists;\n raiBlocklistItems: RaiBlocklistItems;\n raiContentFilters: RaiContentFilters;\n networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations;\n defenderForAISettings: DefenderForAISettings;\n projects: Projects;\n accountConnection: AccountConnection;\n projectConnection: ProjectConnection;\n accountCapabilityHosts: AccountCapabilityHosts;\n projectCapabilityHosts: ProjectCapabilityHosts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkSkuAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SkuAvailabilityListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: {\n parameterPath: { skus: [\"skus\"], kind: [\"kind\"], typeParam: [\"typeParam\"] },\n mapper: { ...Mappers.CheckSkuAvailabilityParameter, required: true },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst checkDomainAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/checkDomainAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DomainAvailability,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: {\n parameterPath: {\n subdomainName: [\"subdomainName\"],\n typeParam: [\"typeParam\"],\n kind: [\"options\", \"kind\"],\n },\n mapper: { ...Mappers.CheckDomainAvailabilityParameter, required: true },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst calculateModelCapacityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/calculateModelCapacity\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CalculateModelCapacityResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: {\n parameterPath: {\n model: [\"options\", \"model\"],\n skuName: [\"options\", \"skuName\"],\n workloads: [\"options\", \"workloads\"],\n },\n mapper: { ...Mappers.CalculateModelCapacityParameter, required: true },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"cognitiveServicesManagementClient.js","sourceRoot":"","sources":["../../src/cognitiveServicesManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,gCAAgC,EAChC,mBAAmB,EACnB,8BAA8B,EAC9B,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,0CAA0C,EAC1C,yBAAyB,EACzB,YAAY,EACZ,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B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I,EAAE;KACxE;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,mCAAmC,GAA6B;IACpE,IAAI,EAAE,8FAA8F;IACpG,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,4BAA4B;SACjD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE;QACX,aAAa,EAAE;YACb,KAAK,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;YAC3B,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;YAC/B,SAAS,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC;SACpC;QACD,MAAM,EAAE,EAAE,GAAG,OAAO,CAAC,+BAA+B,EAAE,QAAQ,EAAE,IAAI,EAAE;KACvE;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,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 */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n AccountsImpl,\n DeletedAccountsImpl,\n ResourceSkusImpl,\n UsagesImpl,\n OperationsImpl,\n CommitmentTiersImpl,\n ModelsImpl,\n LocationBasedModelCapacitiesImpl,\n ModelCapacitiesImpl,\n PrivateEndpointConnectionsImpl,\n PrivateLinkResourcesImpl,\n DeploymentsImpl,\n CommitmentPlansImpl,\n EncryptionScopesImpl,\n RaiPoliciesImpl,\n RaiBlocklistsImpl,\n RaiBlocklistItemsImpl,\n RaiContentFiltersImpl,\n NetworkSecurityPerimeterConfigurationsImpl,\n DefenderForAISettingsImpl,\n ProjectsImpl,\n AccountConnectionImpl,\n ProjectConnectionImpl,\n AccountCapabilityHostsImpl,\n ProjectCapabilityHostsImpl,\n} from \"./operations/index.js\";\nimport {\n Accounts,\n DeletedAccounts,\n ResourceSkus,\n Usages,\n Operations,\n CommitmentTiers,\n Models,\n LocationBasedModelCapacities,\n ModelCapacities,\n PrivateEndpointConnections,\n PrivateLinkResources,\n Deployments,\n CommitmentPlans,\n EncryptionScopes,\n RaiPolicies,\n RaiBlocklists,\n RaiBlocklistItems,\n RaiContentFilters,\n NetworkSecurityPerimeterConfigurations,\n DefenderForAISettings,\n Projects,\n AccountConnection,\n ProjectConnection,\n AccountCapabilityHosts,\n ProjectCapabilityHosts,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n CognitiveServicesManagementClientOptionalParams,\n CheckSkuAvailabilityOptionalParams,\n CheckSkuAvailabilityResponse,\n CheckDomainAvailabilityOptionalParams,\n CheckDomainAvailabilityResponse,\n CalculateModelCapacityOptionalParams,\n CalculateModelCapacityResponse,\n} from \"./models/index.js\";\n\nexport class CognitiveServicesManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the CognitiveServicesManagementClient 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?: CognitiveServicesManagementClientOptionalParams,\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: CognitiveServicesManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-cognitiveservices/7.7.0-beta.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: 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 === 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 ?? `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge: 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 || \"2025-04-01-preview\";\n this.accounts = new AccountsImpl(this);\n this.deletedAccounts = new DeletedAccountsImpl(this);\n this.resourceSkus = new ResourceSkusImpl(this);\n this.usages = new UsagesImpl(this);\n this.operations = new OperationsImpl(this);\n this.commitmentTiers = new CommitmentTiersImpl(this);\n this.models = new ModelsImpl(this);\n this.locationBasedModelCapacities = new LocationBasedModelCapacitiesImpl(this);\n this.modelCapacities = new ModelCapacitiesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.deployments = new DeploymentsImpl(this);\n this.commitmentPlans = new CommitmentPlansImpl(this);\n this.encryptionScopes = new EncryptionScopesImpl(this);\n this.raiPolicies = new RaiPoliciesImpl(this);\n this.raiBlocklists = new RaiBlocklistsImpl(this);\n this.raiBlocklistItems = new RaiBlocklistItemsImpl(this);\n this.raiContentFilters = new RaiContentFiltersImpl(this);\n this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsImpl(\n this,\n );\n this.defenderForAISettings = new DefenderForAISettingsImpl(this);\n this.projects = new ProjectsImpl(this);\n this.accountConnection = new AccountConnectionImpl(this);\n this.projectConnection = new ProjectConnectionImpl(this);\n this.accountCapabilityHosts = new AccountCapabilityHostsImpl(this);\n this.projectCapabilityHosts = new ProjectCapabilityHostsImpl(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(request: PipelineRequest, next: SendRequest): 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 /**\n * Check available SKUs.\n * @param location Resource location.\n * @param skus The SKU of the resource.\n * @param kind The kind (type) of cognitive service account.\n * @param typeParam The Type of the resource.\n * @param options The options parameters.\n */\n checkSkuAvailability(\n location: string,\n skus: string[],\n kind: string,\n typeParam: string,\n options?: CheckSkuAvailabilityOptionalParams,\n ): Promise<CheckSkuAvailabilityResponse> {\n return this.sendOperationRequest(\n { location, skus, kind, typeParam, options },\n checkSkuAvailabilityOperationSpec,\n );\n }\n\n /**\n * Check whether a domain is available.\n * @param subdomainName The subdomain name to use.\n * @param typeParam The Type of the resource.\n * @param options The options parameters.\n */\n checkDomainAvailability(\n subdomainName: string,\n typeParam: string,\n options?: CheckDomainAvailabilityOptionalParams,\n ): Promise<CheckDomainAvailabilityResponse> {\n return this.sendOperationRequest(\n { subdomainName, typeParam, options },\n checkDomainAvailabilityOperationSpec,\n );\n }\n\n /**\n * Model capacity calculator.\n * @param options The options parameters.\n */\n calculateModelCapacity(\n options?: CalculateModelCapacityOptionalParams,\n ): Promise<CalculateModelCapacityResponse> {\n return this.sendOperationRequest({ options }, calculateModelCapacityOperationSpec);\n }\n\n accounts: Accounts;\n deletedAccounts: DeletedAccounts;\n resourceSkus: ResourceSkus;\n usages: Usages;\n operations: Operations;\n commitmentTiers: CommitmentTiers;\n models: Models;\n locationBasedModelCapacities: LocationBasedModelCapacities;\n modelCapacities: ModelCapacities;\n privateEndpointConnections: PrivateEndpointConnections;\n privateLinkResources: PrivateLinkResources;\n deployments: Deployments;\n commitmentPlans: CommitmentPlans;\n encryptionScopes: EncryptionScopes;\n raiPolicies: RaiPolicies;\n raiBlocklists: RaiBlocklists;\n raiBlocklistItems: RaiBlocklistItems;\n raiContentFilters: RaiContentFilters;\n networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations;\n defenderForAISettings: DefenderForAISettings;\n projects: Projects;\n accountConnection: AccountConnection;\n projectConnection: ProjectConnection;\n accountCapabilityHosts: AccountCapabilityHosts;\n projectCapabilityHosts: ProjectCapabilityHosts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkSkuAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SkuAvailabilityListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: {\n parameterPath: { skus: [\"skus\"], kind: [\"kind\"], typeParam: [\"typeParam\"] },\n mapper: { ...Mappers.CheckSkuAvailabilityParameter, required: true },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.location],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst checkDomainAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/checkDomainAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DomainAvailability,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: {\n parameterPath: {\n subdomainName: [\"subdomainName\"],\n typeParam: [\"typeParam\"],\n kind: [\"options\", \"kind\"],\n },\n mapper: { ...Mappers.CheckDomainAvailabilityParameter, required: true },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst calculateModelCapacityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/calculateModelCapacity\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CalculateModelCapacityResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: {\n parameterPath: {\n model: [\"options\", \"model\"],\n skuName: [\"options\", \"skuName\"],\n workloads: [\"options\", \"workloads\"],\n },\n mapper: { ...Mappers.CalculateModelCapacityParameter, required: true },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
package/dist/browser/lroImpl.js
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __rest } from "tslib";
|
|
9
8
|
export function createLroSpec(inputs) {
|
|
10
9
|
const { args, spec, sendOperationFn } = inputs;
|
|
11
10
|
return {
|
|
@@ -13,8 +12,13 @@ export function createLroSpec(inputs) {
|
|
|
13
12
|
requestPath: spec.path,
|
|
14
13
|
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
15
14
|
sendPollRequest: (path, options) => {
|
|
16
|
-
const { requestBody
|
|
17
|
-
return sendOperationFn(args,
|
|
15
|
+
const { requestBody, ...restSpec } = spec;
|
|
16
|
+
return sendOperationFn(args, {
|
|
17
|
+
...restSpec,
|
|
18
|
+
httpMethod: "GET",
|
|
19
|
+
path,
|
|
20
|
+
abortSignal: options?.abortSignal,
|
|
21
|
+
});
|
|
18
22
|
},
|
|
19
23
|
};
|
|
20
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,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,CAAC,IAAY,EAAE,OAA2C,EAAE,EAAE;YAC7E,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 */\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: (path: string, options?: { abortSignal?: AbortSignalLike }) => {\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"]}
|