@azure/arm-machinelearningexperimentation 2.0.0-beta.2 → 2.0.0-beta.4
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 +2 -2
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/index.js +162 -55
- 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/accountsCreateOrUpdateSample.js +12 -3
- package/dist-esm/samples-dev/accountsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsDeleteSample.js +13 -4
- package/dist-esm/samples-dev/accountsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsGetSample.js +12 -3
- package/dist-esm/samples-dev/accountsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsListByResourceGroupSample.js +13 -4
- package/dist-esm/samples-dev/accountsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsListSample.js +11 -3
- package/dist-esm/samples-dev/accountsListSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsUpdateSample.js +12 -3
- package/dist-esm/samples-dev/accountsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/projectsCreateOrUpdateSample.js +12 -3
- package/dist-esm/samples-dev/projectsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/projectsDeleteSample.js +13 -4
- package/dist-esm/samples-dev/projectsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/projectsGetSample.js +12 -3
- package/dist-esm/samples-dev/projectsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/projectsListByWorkspaceSample.js +11 -3
- package/dist-esm/samples-dev/projectsListByWorkspaceSample.js.map +1 -1
- package/dist-esm/samples-dev/projectsUpdateSample.js +12 -3
- package/dist-esm/samples-dev/projectsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesCreateOrUpdateSample.js +12 -3
- package/dist-esm/samples-dev/workspacesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesDeleteSample.js +12 -3
- package/dist-esm/samples-dev/workspacesDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesGetSample.js +12 -3
- package/dist-esm/samples-dev/workspacesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesListByAccountsSample.js +12 -3
- package/dist-esm/samples-dev/workspacesListByAccountsSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesUpdateSample.js +12 -3
- package/dist-esm/samples-dev/workspacesUpdateSample.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/mLTeamAccountManagementClient.d.ts +2 -0
- package/dist-esm/src/mLTeamAccountManagementClient.d.ts.map +1 -1
- package/dist-esm/src/mLTeamAccountManagementClient.js +49 -18
- package/dist-esm/src/mLTeamAccountManagementClient.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +6 -6
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/operations/accounts.d.ts.map +1 -1
- package/dist-esm/src/operations/accounts.js +37 -16
- package/dist-esm/src/operations/accounts.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +8 -4
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/projects.d.ts.map +1 -1
- package/dist-esm/src/operations/projects.js +19 -8
- package/dist-esm/src/operations/projects.js.map +1 -1
- package/dist-esm/src/operations/workspaces.d.ts.map +1 -1
- package/dist-esm/src/operations/workspaces.js +19 -8
- package/dist-esm/src/operations/workspaces.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +17 -12
- package/review/arm-machinelearningexperimentation.api.md +21 -18
- package/src/index.ts +1 -0
- package/src/mLTeamAccountManagementClient.ts +60 -20
- package/src/models/index.ts +7 -6
- package/src/operations/accounts.ts +46 -19
- package/src/operations/operations.ts +10 -5
- package/src/operations/projects.ts +28 -15
- package/src/operations/workspaces.ts +27 -14
- package/src/pagingHelper.ts +39 -0
- package/types/arm-machinelearningexperimentation.d.ts +17 -6
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/samples-dev/accountCreate.d.ts +0 -2
- package/dist-esm/samples-dev/accountCreate.d.ts.map +0 -1
- package/dist-esm/samples-dev/accountCreate.js +0 -33
- package/dist-esm/samples-dev/accountCreate.js.map +0 -1
- package/dist-esm/samples-dev/accountGet.d.ts +0 -2
- package/dist-esm/samples-dev/accountGet.d.ts.map +0 -1
- package/dist-esm/samples-dev/accountGet.js +0 -31
- package/dist-esm/samples-dev/accountGet.js.map +0 -1
- package/dist-esm/samples-dev/accountUpdate.d.ts +0 -2
- package/dist-esm/samples-dev/accountUpdate.d.ts.map +0 -1
- package/dist-esm/samples-dev/accountUpdate.js +0 -35
- package/dist-esm/samples-dev/accountUpdate.js.map +0 -1
- package/dist-esm/samples-dev/createProject.d.ts +0 -2
- package/dist-esm/samples-dev/createProject.d.ts.map +0 -1
- package/dist-esm/samples-dev/createProject.js +0 -39
- package/dist-esm/samples-dev/createProject.js.map +0 -1
- package/dist-esm/samples-dev/getProject.d.ts +0 -2
- package/dist-esm/samples-dev/getProject.d.ts.map +0 -1
- package/dist-esm/samples-dev/getProject.js +0 -33
- package/dist-esm/samples-dev/getProject.js.map +0 -1
- package/dist-esm/samples-dev/listWorkspacesByAccounts.d.ts +0 -2
- package/dist-esm/samples-dev/listWorkspacesByAccounts.d.ts.map +0 -1
- package/dist-esm/samples-dev/listWorkspacesByAccounts.js +0 -45
- package/dist-esm/samples-dev/listWorkspacesByAccounts.js.map +0 -1
- package/dist-esm/samples-dev/projectListByWorkspaces.d.ts +0 -2
- package/dist-esm/samples-dev/projectListByWorkspaces.d.ts.map +0 -1
- package/dist-esm/samples-dev/projectListByWorkspaces.js +0 -46
- package/dist-esm/samples-dev/projectListByWorkspaces.js.map +0 -1
- package/dist-esm/samples-dev/updateProject.d.ts +0 -2
- package/dist-esm/samples-dev/updateProject.d.ts.map +0 -1
- package/dist-esm/samples-dev/updateProject.js +0 -37
- package/dist-esm/samples-dev/updateProject.js.map +0 -1
- package/dist-esm/samples-dev/workspaceCreate.d.ts +0 -2
- package/dist-esm/samples-dev/workspaceCreate.d.ts.map +0 -1
- package/dist-esm/samples-dev/workspaceCreate.js +0 -37
- package/dist-esm/samples-dev/workspaceCreate.js.map +0 -1
- package/dist-esm/samples-dev/workspaceDelete.d.ts +0 -2
- package/dist-esm/samples-dev/workspaceDelete.d.ts.map +0 -1
- package/dist-esm/samples-dev/workspaceDelete.js +0 -32
- package/dist-esm/samples-dev/workspaceDelete.js.map +0 -1
- package/dist-esm/samples-dev/workspaceGet.d.ts +0 -2
- package/dist-esm/samples-dev/workspaceGet.d.ts.map +0 -1
- package/dist-esm/samples-dev/workspaceGet.js +0 -32
- package/dist-esm/samples-dev/workspaceGet.js.map +0 -1
- package/dist-esm/samples-dev/workspaceUpdate.d.ts +0 -2
- package/dist-esm/samples-dev/workspaceUpdate.d.ts.map +0 -1
- package/dist-esm/samples-dev/workspaceUpdate.js +0 -33
- package/dist-esm/samples-dev/workspaceUpdate.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
-
## 2.0.0-beta.
|
|
3
|
+
## 2.0.0-beta.4 (2023-01-28)
|
|
4
4
|
|
|
5
|
-
The package of @azure/arm-machinelearningexperimentation is using our next generation design principles since version 2.0.0-beta.
|
|
5
|
+
The package of @azure/arm-machinelearningexperimentation is using our next generation design principles since version 2.0.0-beta.4, which contains breaking changes.
|
|
6
6
|
|
|
7
7
|
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
|
|
8
8
|
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ These APIs allow end users to operate on Azure Machine Learning Team Account res
|
|
|
13
13
|
|
|
14
14
|
### Currently supported environments
|
|
15
15
|
|
|
16
|
-
- [LTS versions of Node.js](https://
|
|
16
|
+
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
|
|
17
17
|
- Latest versions of Safari, Chrome, Edge and Firefox.
|
|
18
18
|
|
|
19
19
|
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
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
|
|
|
9
9
|
function _interopNamespace(e) {
|
|
10
10
|
if (e && e.__esModule) return e;
|
|
@@ -27,6 +27,38 @@ function _interopNamespace(e) {
|
|
|
27
27
|
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
28
28
|
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
29
29
|
|
|
30
|
+
/*
|
|
31
|
+
* Copyright (c) Microsoft Corporation.
|
|
32
|
+
* Licensed under the MIT License.
|
|
33
|
+
*
|
|
34
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
35
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
36
|
+
*/
|
|
37
|
+
const pageMap = new WeakMap();
|
|
38
|
+
/**
|
|
39
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
40
|
+
* returns a continuation token that can be used to begin paging from
|
|
41
|
+
* that point later.
|
|
42
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
43
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
44
|
+
*/
|
|
45
|
+
function getContinuationToken(page) {
|
|
46
|
+
var _a;
|
|
47
|
+
if (typeof page !== "object" || page === null) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
|
51
|
+
}
|
|
52
|
+
function setContinuationToken(page, continuationToken) {
|
|
53
|
+
var _a;
|
|
54
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
|
58
|
+
pageInfo.continuationToken = continuationToken;
|
|
59
|
+
pageMap.set(page, pageInfo);
|
|
60
|
+
}
|
|
61
|
+
|
|
30
62
|
/*
|
|
31
63
|
* Copyright (c) Microsoft Corporation.
|
|
32
64
|
* Licensed under the MIT License.
|
|
@@ -749,14 +781,18 @@ class OperationsImpl {
|
|
|
749
781
|
[Symbol.asyncIterator]() {
|
|
750
782
|
return this;
|
|
751
783
|
},
|
|
752
|
-
byPage: () => {
|
|
753
|
-
|
|
784
|
+
byPage: (settings) => {
|
|
785
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
786
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
787
|
+
}
|
|
788
|
+
return this.listPagingPage(options, settings);
|
|
754
789
|
}
|
|
755
790
|
};
|
|
756
791
|
}
|
|
757
|
-
listPagingPage(options) {
|
|
792
|
+
listPagingPage(options, _settings) {
|
|
758
793
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
759
|
-
let result
|
|
794
|
+
let result;
|
|
795
|
+
result = yield tslib.__await(this._list(options));
|
|
760
796
|
yield yield tslib.__await(result.value || []);
|
|
761
797
|
});
|
|
762
798
|
}
|
|
@@ -837,20 +873,31 @@ class AccountsImpl {
|
|
|
837
873
|
[Symbol.asyncIterator]() {
|
|
838
874
|
return this;
|
|
839
875
|
},
|
|
840
|
-
byPage: () => {
|
|
841
|
-
|
|
876
|
+
byPage: (settings) => {
|
|
877
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
878
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
879
|
+
}
|
|
880
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
842
881
|
}
|
|
843
882
|
};
|
|
844
883
|
}
|
|
845
|
-
listByResourceGroupPagingPage(resourceGroupName, options) {
|
|
884
|
+
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
846
885
|
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
|
847
|
-
let result
|
|
848
|
-
|
|
849
|
-
|
|
886
|
+
let result;
|
|
887
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
888
|
+
if (!continuationToken) {
|
|
889
|
+
result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
|
890
|
+
let page = result.value || [];
|
|
891
|
+
continuationToken = result.nextLink;
|
|
892
|
+
setContinuationToken(page, continuationToken);
|
|
893
|
+
yield yield tslib.__await(page);
|
|
894
|
+
}
|
|
850
895
|
while (continuationToken) {
|
|
851
896
|
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
|
852
897
|
continuationToken = result.nextLink;
|
|
853
|
-
|
|
898
|
+
let page = result.value || [];
|
|
899
|
+
setContinuationToken(page, continuationToken);
|
|
900
|
+
yield yield tslib.__await(page);
|
|
854
901
|
}
|
|
855
902
|
});
|
|
856
903
|
}
|
|
@@ -885,20 +932,31 @@ class AccountsImpl {
|
|
|
885
932
|
[Symbol.asyncIterator]() {
|
|
886
933
|
return this;
|
|
887
934
|
},
|
|
888
|
-
byPage: () => {
|
|
889
|
-
|
|
935
|
+
byPage: (settings) => {
|
|
936
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
937
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
938
|
+
}
|
|
939
|
+
return this.listPagingPage(options, settings);
|
|
890
940
|
}
|
|
891
941
|
};
|
|
892
942
|
}
|
|
893
|
-
listPagingPage(options) {
|
|
943
|
+
listPagingPage(options, settings) {
|
|
894
944
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
895
|
-
let result
|
|
896
|
-
|
|
897
|
-
|
|
945
|
+
let result;
|
|
946
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
947
|
+
if (!continuationToken) {
|
|
948
|
+
result = yield tslib.__await(this._list(options));
|
|
949
|
+
let page = result.value || [];
|
|
950
|
+
continuationToken = result.nextLink;
|
|
951
|
+
setContinuationToken(page, continuationToken);
|
|
952
|
+
yield yield tslib.__await(page);
|
|
953
|
+
}
|
|
898
954
|
while (continuationToken) {
|
|
899
955
|
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
900
956
|
continuationToken = result.nextLink;
|
|
901
|
-
|
|
957
|
+
let page = result.value || [];
|
|
958
|
+
setContinuationToken(page, continuationToken);
|
|
959
|
+
yield yield tslib.__await(page);
|
|
902
960
|
}
|
|
903
961
|
});
|
|
904
962
|
}
|
|
@@ -1136,7 +1194,6 @@ const listByResourceGroupNextOperationSpec = {
|
|
|
1136
1194
|
bodyMapper: ErrorResponse
|
|
1137
1195
|
}
|
|
1138
1196
|
},
|
|
1139
|
-
queryParameters: [apiVersion],
|
|
1140
1197
|
urlParameters: [
|
|
1141
1198
|
$host,
|
|
1142
1199
|
subscriptionId,
|
|
@@ -1157,7 +1214,6 @@ const listNextOperationSpec = {
|
|
|
1157
1214
|
bodyMapper: ErrorResponse
|
|
1158
1215
|
}
|
|
1159
1216
|
},
|
|
1160
|
-
queryParameters: [apiVersion],
|
|
1161
1217
|
urlParameters: [
|
|
1162
1218
|
$host,
|
|
1163
1219
|
subscriptionId,
|
|
@@ -1200,20 +1256,31 @@ class WorkspacesImpl {
|
|
|
1200
1256
|
[Symbol.asyncIterator]() {
|
|
1201
1257
|
return this;
|
|
1202
1258
|
},
|
|
1203
|
-
byPage: () => {
|
|
1204
|
-
|
|
1259
|
+
byPage: (settings) => {
|
|
1260
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1261
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1262
|
+
}
|
|
1263
|
+
return this.listByAccountsPagingPage(accountName, resourceGroupName, options, settings);
|
|
1205
1264
|
}
|
|
1206
1265
|
};
|
|
1207
1266
|
}
|
|
1208
|
-
listByAccountsPagingPage(accountName, resourceGroupName, options) {
|
|
1267
|
+
listByAccountsPagingPage(accountName, resourceGroupName, options, settings) {
|
|
1209
1268
|
return tslib.__asyncGenerator(this, arguments, function* listByAccountsPagingPage_1() {
|
|
1210
|
-
let result
|
|
1211
|
-
|
|
1212
|
-
|
|
1269
|
+
let result;
|
|
1270
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1271
|
+
if (!continuationToken) {
|
|
1272
|
+
result = yield tslib.__await(this._listByAccounts(accountName, resourceGroupName, options));
|
|
1273
|
+
let page = result.value || [];
|
|
1274
|
+
continuationToken = result.nextLink;
|
|
1275
|
+
setContinuationToken(page, continuationToken);
|
|
1276
|
+
yield yield tslib.__await(page);
|
|
1277
|
+
}
|
|
1213
1278
|
while (continuationToken) {
|
|
1214
1279
|
result = yield tslib.__await(this._listByAccountsNext(accountName, resourceGroupName, continuationToken, options));
|
|
1215
1280
|
continuationToken = result.nextLink;
|
|
1216
|
-
|
|
1281
|
+
let page = result.value || [];
|
|
1282
|
+
setContinuationToken(page, continuationToken);
|
|
1283
|
+
yield yield tslib.__await(page);
|
|
1217
1284
|
}
|
|
1218
1285
|
});
|
|
1219
1286
|
}
|
|
@@ -1431,7 +1498,6 @@ const listByAccountsNextOperationSpec = {
|
|
|
1431
1498
|
bodyMapper: ErrorResponse
|
|
1432
1499
|
}
|
|
1433
1500
|
},
|
|
1434
|
-
queryParameters: [apiVersion],
|
|
1435
1501
|
urlParameters: [
|
|
1436
1502
|
$host,
|
|
1437
1503
|
subscriptionId,
|
|
@@ -1477,20 +1543,31 @@ class ProjectsImpl {
|
|
|
1477
1543
|
[Symbol.asyncIterator]() {
|
|
1478
1544
|
return this;
|
|
1479
1545
|
},
|
|
1480
|
-
byPage: () => {
|
|
1481
|
-
|
|
1546
|
+
byPage: (settings) => {
|
|
1547
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1548
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1549
|
+
}
|
|
1550
|
+
return this.listByWorkspacePagingPage(accountName, workspaceName, resourceGroupName, options, settings);
|
|
1482
1551
|
}
|
|
1483
1552
|
};
|
|
1484
1553
|
}
|
|
1485
|
-
listByWorkspacePagingPage(accountName, workspaceName, resourceGroupName, options) {
|
|
1554
|
+
listByWorkspacePagingPage(accountName, workspaceName, resourceGroupName, options, settings) {
|
|
1486
1555
|
return tslib.__asyncGenerator(this, arguments, function* listByWorkspacePagingPage_1() {
|
|
1487
|
-
let result
|
|
1488
|
-
|
|
1489
|
-
|
|
1556
|
+
let result;
|
|
1557
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1558
|
+
if (!continuationToken) {
|
|
1559
|
+
result = yield tslib.__await(this._listByWorkspace(accountName, workspaceName, resourceGroupName, options));
|
|
1560
|
+
let page = result.value || [];
|
|
1561
|
+
continuationToken = result.nextLink;
|
|
1562
|
+
setContinuationToken(page, continuationToken);
|
|
1563
|
+
yield yield tslib.__await(page);
|
|
1564
|
+
}
|
|
1490
1565
|
while (continuationToken) {
|
|
1491
1566
|
result = yield tslib.__await(this._listByWorkspaceNext(accountName, workspaceName, resourceGroupName, continuationToken, options));
|
|
1492
1567
|
continuationToken = result.nextLink;
|
|
1493
|
-
|
|
1568
|
+
let page = result.value || [];
|
|
1569
|
+
setContinuationToken(page, continuationToken);
|
|
1570
|
+
yield yield tslib.__await(page);
|
|
1494
1571
|
}
|
|
1495
1572
|
});
|
|
1496
1573
|
}
|
|
@@ -1733,7 +1810,6 @@ const listByWorkspaceNextOperationSpec = {
|
|
|
1733
1810
|
bodyMapper: ErrorResponse
|
|
1734
1811
|
}
|
|
1735
1812
|
},
|
|
1736
|
-
queryParameters: [apiVersion],
|
|
1737
1813
|
urlParameters: [
|
|
1738
1814
|
$host,
|
|
1739
1815
|
subscriptionId,
|
|
@@ -1761,7 +1837,7 @@ class MLTeamAccountManagementClient extends coreClient__namespace.ServiceClient
|
|
|
1761
1837
|
* @param options The parameter options
|
|
1762
1838
|
*/
|
|
1763
1839
|
constructor(credentials, subscriptionId, options) {
|
|
1764
|
-
var _a, _b;
|
|
1840
|
+
var _a, _b, _c;
|
|
1765
1841
|
if (credentials === undefined) {
|
|
1766
1842
|
throw new Error("'credentials' cannot be null");
|
|
1767
1843
|
}
|
|
@@ -1776,32 +1852,34 @@ class MLTeamAccountManagementClient extends coreClient__namespace.ServiceClient
|
|
|
1776
1852
|
requestContentType: "application/json; charset=utf-8",
|
|
1777
1853
|
credential: credentials
|
|
1778
1854
|
};
|
|
1779
|
-
const packageDetails = `azsdk-js-arm-machinelearningexperimentation/2.0.0-beta.
|
|
1855
|
+
const packageDetails = `azsdk-js-arm-machinelearningexperimentation/2.0.0-beta.4`;
|
|
1780
1856
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1781
1857
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1782
1858
|
: `${packageDetails}`;
|
|
1783
|
-
if (!options.credentialScopes) {
|
|
1784
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
1785
|
-
}
|
|
1786
1859
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1787
1860
|
userAgentPrefix
|
|
1788
|
-
},
|
|
1861
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1789
1862
|
super(optionsWithDefaults);
|
|
1863
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
1790
1864
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
1791
1865
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
1792
|
-
|
|
1866
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
1793
1867
|
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1868
|
+
}
|
|
1869
|
+
if (!options ||
|
|
1870
|
+
!options.pipeline ||
|
|
1871
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
1872
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
1873
|
+
this.pipeline.removePolicy({
|
|
1874
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
1875
|
+
});
|
|
1876
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
1877
|
+
credential: credentials,
|
|
1878
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
1879
|
+
challengeCallbacks: {
|
|
1880
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
1881
|
+
}
|
|
1882
|
+
}));
|
|
1805
1883
|
}
|
|
1806
1884
|
// Parameter assignments
|
|
1807
1885
|
this.subscriptionId = subscriptionId;
|
|
@@ -1812,8 +1890,37 @@ class MLTeamAccountManagementClient extends coreClient__namespace.ServiceClient
|
|
|
1812
1890
|
this.accounts = new AccountsImpl(this);
|
|
1813
1891
|
this.workspaces = new WorkspacesImpl(this);
|
|
1814
1892
|
this.projects = new ProjectsImpl(this);
|
|
1893
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
1894
|
+
}
|
|
1895
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
1896
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
1897
|
+
if (!apiVersion) {
|
|
1898
|
+
return;
|
|
1899
|
+
}
|
|
1900
|
+
const apiVersionPolicy = {
|
|
1901
|
+
name: "CustomApiVersionPolicy",
|
|
1902
|
+
sendRequest(request, next) {
|
|
1903
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1904
|
+
const param = request.url.split("?");
|
|
1905
|
+
if (param.length > 1) {
|
|
1906
|
+
const newParams = param[1].split("&").map((item) => {
|
|
1907
|
+
if (item.indexOf("api-version") > -1) {
|
|
1908
|
+
return "api-version=" + apiVersion;
|
|
1909
|
+
}
|
|
1910
|
+
else {
|
|
1911
|
+
return item;
|
|
1912
|
+
}
|
|
1913
|
+
});
|
|
1914
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
1915
|
+
}
|
|
1916
|
+
return next(request);
|
|
1917
|
+
});
|
|
1918
|
+
}
|
|
1919
|
+
};
|
|
1920
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
1815
1921
|
}
|
|
1816
1922
|
}
|
|
1817
1923
|
|
|
1818
1924
|
exports.MLTeamAccountManagementClient = MLTeamAccountManagementClient;
|
|
1925
|
+
exports.getContinuationToken = getContinuationToken;
|
|
1819
1926
|
//# sourceMappingURL=index.js.map
|