@azure/arm-education 1.0.0-beta.2 → 1.0.0-beta.3
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 +13 -0
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/index.js +179 -78
- 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/grantsGetSample.js +9 -2
- package/dist-esm/samples-dev/grantsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/grantsListAllSample.js +9 -2
- package/dist-esm/samples-dev/grantsListAllSample.js.map +1 -1
- package/dist-esm/samples-dev/grantsListSample.js +9 -2
- package/dist-esm/samples-dev/grantsListSample.js.map +1 -1
- package/dist-esm/samples-dev/joinRequestsApproveSample.js +8 -1
- package/dist-esm/samples-dev/joinRequestsApproveSample.js.map +1 -1
- package/dist-esm/samples-dev/joinRequestsDenySample.js +8 -1
- package/dist-esm/samples-dev/joinRequestsDenySample.js.map +1 -1
- package/dist-esm/samples-dev/joinRequestsGetSample.js +8 -1
- package/dist-esm/samples-dev/joinRequestsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/joinRequestsListSample.js +8 -1
- package/dist-esm/samples-dev/joinRequestsListSample.js.map +1 -1
- package/dist-esm/samples-dev/labsCreateOrUpdateSample.js +8 -1
- package/dist-esm/samples-dev/labsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/labsDeleteSample.js +8 -1
- package/dist-esm/samples-dev/labsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/labsGenerateInviteCodeSample.js +8 -1
- package/dist-esm/samples-dev/labsGenerateInviteCodeSample.js.map +1 -1
- package/dist-esm/samples-dev/labsGetSample.js +9 -2
- package/dist-esm/samples-dev/labsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/labsListAllSample.js +9 -2
- package/dist-esm/samples-dev/labsListAllSample.js.map +1 -1
- package/dist-esm/samples-dev/labsListSample.js +9 -2
- package/dist-esm/samples-dev/labsListSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +8 -1
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/redeemInvitationCodeSample.js +8 -1
- package/dist-esm/samples-dev/redeemInvitationCodeSample.js.map +1 -1
- package/dist-esm/samples-dev/studentLabsGetSample.js +8 -1
- package/dist-esm/samples-dev/studentLabsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/studentLabsListAllSample.js +8 -1
- package/dist-esm/samples-dev/studentLabsListAllSample.js.map +1 -1
- package/dist-esm/samples-dev/studentsCreateOrUpdateSample.js +8 -1
- package/dist-esm/samples-dev/studentsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/studentsDeleteSample.js +8 -1
- package/dist-esm/samples-dev/studentsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/studentsGetSample.js +8 -1
- package/dist-esm/samples-dev/studentsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/studentsListSample.js +8 -1
- package/dist-esm/samples-dev/studentsListSample.js.map +1 -1
- package/dist-esm/src/educationManagementClient.d.ts.map +1 -1
- package/dist-esm/src/educationManagementClient.js +20 -18
- package/dist-esm/src/educationManagementClient.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/models/index.d.ts +0 -14
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/operations/grants.d.ts.map +1 -1
- package/dist-esm/src/operations/grants.js +37 -16
- package/dist-esm/src/operations/grants.js.map +1 -1
- package/dist-esm/src/operations/joinRequests.d.ts.map +1 -1
- package/dist-esm/src/operations/joinRequests.js +19 -8
- package/dist-esm/src/operations/joinRequests.js.map +1 -1
- package/dist-esm/src/operations/labs.d.ts.map +1 -1
- package/dist-esm/src/operations/labs.js +37 -20
- package/dist-esm/src/operations/labs.js.map +1 -1
- package/dist-esm/src/operations/studentLabs.d.ts.map +1 -1
- package/dist-esm/src/operations/studentLabs.js +19 -8
- package/dist-esm/src/operations/studentLabs.js.map +1 -1
- package/dist-esm/src/operations/students.d.ts.map +1 -1
- package/dist-esm/src/operations/students.js +19 -8
- package/dist-esm/src/operations/students.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/package.json +8 -6
- package/review/arm-education.api.md +3 -7
- package/src/educationManagementClient.ts +26 -20
- package/src/index.ts +1 -0
- package/src/models/index.ts +6 -26
- package/src/operations/grants.ts +46 -22
- package/src/operations/joinRequests.ts +27 -14
- package/src/operations/labs.ts +52 -31
- package/src/operations/studentLabs.ts +21 -9
- package/src/operations/students.ts +27 -14
- package/src/pagingHelper.ts +39 -0
- package/types/arm-education.d.ts +9 -14
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.3 (2023-01-10)
|
|
4
|
+
|
|
5
|
+
**Features**
|
|
6
|
+
|
|
7
|
+
- Interface GrantsListAllNextOptionalParams no longer has parameter includeAllocatedBudget
|
|
8
|
+
- Interface GrantsListNextOptionalParams no longer has parameter includeAllocatedBudget
|
|
9
|
+
- Interface JoinRequestsListNextOptionalParams no longer has parameter includeDenied
|
|
10
|
+
- Interface LabsListAllNextOptionalParams no longer has parameter includeBudget
|
|
11
|
+
- Interface LabsListAllNextOptionalParams no longer has parameter includeDeleted
|
|
12
|
+
- Interface LabsListNextOptionalParams no longer has parameter includeBudget
|
|
13
|
+
- Interface StudentsListNextOptionalParams no longer has parameter includeDeleted
|
|
14
|
+
|
|
15
|
+
|
|
3
16
|
## 1.0.0-beta.2 (2022-07-04)
|
|
4
17
|
|
|
5
18
|
**Features**
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Education client provides access to education resources for Azure subscriptions.
|
|
|
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
|
@@ -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.
|
|
@@ -1102,20 +1134,31 @@ class GrantsImpl {
|
|
|
1102
1134
|
[Symbol.asyncIterator]() {
|
|
1103
1135
|
return this;
|
|
1104
1136
|
},
|
|
1105
|
-
byPage: () => {
|
|
1106
|
-
|
|
1137
|
+
byPage: (settings) => {
|
|
1138
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1139
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1140
|
+
}
|
|
1141
|
+
return this.listAllPagingPage(options, settings);
|
|
1107
1142
|
}
|
|
1108
1143
|
};
|
|
1109
1144
|
}
|
|
1110
|
-
listAllPagingPage(options) {
|
|
1145
|
+
listAllPagingPage(options, settings) {
|
|
1111
1146
|
return tslib.__asyncGenerator(this, arguments, function* listAllPagingPage_1() {
|
|
1112
|
-
let result
|
|
1113
|
-
|
|
1114
|
-
|
|
1147
|
+
let result;
|
|
1148
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1149
|
+
if (!continuationToken) {
|
|
1150
|
+
result = yield tslib.__await(this._listAll(options));
|
|
1151
|
+
let page = result.value || [];
|
|
1152
|
+
continuationToken = result.nextLink;
|
|
1153
|
+
setContinuationToken(page, continuationToken);
|
|
1154
|
+
yield yield tslib.__await(page);
|
|
1155
|
+
}
|
|
1115
1156
|
while (continuationToken) {
|
|
1116
1157
|
result = yield tslib.__await(this._listAllNext(continuationToken, options));
|
|
1117
1158
|
continuationToken = result.nextLink;
|
|
1118
|
-
|
|
1159
|
+
let page = result.value || [];
|
|
1160
|
+
setContinuationToken(page, continuationToken);
|
|
1161
|
+
yield yield tslib.__await(page);
|
|
1119
1162
|
}
|
|
1120
1163
|
});
|
|
1121
1164
|
}
|
|
@@ -1152,20 +1195,31 @@ class GrantsImpl {
|
|
|
1152
1195
|
[Symbol.asyncIterator]() {
|
|
1153
1196
|
return this;
|
|
1154
1197
|
},
|
|
1155
|
-
byPage: () => {
|
|
1156
|
-
|
|
1198
|
+
byPage: (settings) => {
|
|
1199
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1200
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1201
|
+
}
|
|
1202
|
+
return this.listPagingPage(billingAccountName, billingProfileName, options, settings);
|
|
1157
1203
|
}
|
|
1158
1204
|
};
|
|
1159
1205
|
}
|
|
1160
|
-
listPagingPage(billingAccountName, billingProfileName, options) {
|
|
1206
|
+
listPagingPage(billingAccountName, billingProfileName, options, settings) {
|
|
1161
1207
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1162
|
-
let result
|
|
1163
|
-
|
|
1164
|
-
|
|
1208
|
+
let result;
|
|
1209
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1210
|
+
if (!continuationToken) {
|
|
1211
|
+
result = yield tslib.__await(this._list(billingAccountName, billingProfileName, options));
|
|
1212
|
+
let page = result.value || [];
|
|
1213
|
+
continuationToken = result.nextLink;
|
|
1214
|
+
setContinuationToken(page, continuationToken);
|
|
1215
|
+
yield yield tslib.__await(page);
|
|
1216
|
+
}
|
|
1165
1217
|
while (continuationToken) {
|
|
1166
1218
|
result = yield tslib.__await(this._listNext(billingAccountName, billingProfileName, continuationToken, options));
|
|
1167
1219
|
continuationToken = result.nextLink;
|
|
1168
|
-
|
|
1220
|
+
let page = result.value || [];
|
|
1221
|
+
setContinuationToken(page, continuationToken);
|
|
1222
|
+
yield yield tslib.__await(page);
|
|
1169
1223
|
}
|
|
1170
1224
|
});
|
|
1171
1225
|
}
|
|
@@ -1300,7 +1354,6 @@ const listAllNextOperationSpec$2 = {
|
|
|
1300
1354
|
bodyMapper: ErrorResponseBody
|
|
1301
1355
|
}
|
|
1302
1356
|
},
|
|
1303
|
-
queryParameters: [apiVersion, includeAllocatedBudget],
|
|
1304
1357
|
urlParameters: [$host, nextLink],
|
|
1305
1358
|
headerParameters: [accept],
|
|
1306
1359
|
serializer: serializer$5
|
|
@@ -1316,7 +1369,6 @@ const listNextOperationSpec$3 = {
|
|
|
1316
1369
|
bodyMapper: ErrorResponseBody
|
|
1317
1370
|
}
|
|
1318
1371
|
},
|
|
1319
|
-
queryParameters: [apiVersion, includeAllocatedBudget],
|
|
1320
1372
|
urlParameters: [
|
|
1321
1373
|
$host,
|
|
1322
1374
|
billingAccountName,
|
|
@@ -1359,20 +1411,31 @@ class LabsImpl {
|
|
|
1359
1411
|
[Symbol.asyncIterator]() {
|
|
1360
1412
|
return this;
|
|
1361
1413
|
},
|
|
1362
|
-
byPage: () => {
|
|
1363
|
-
|
|
1414
|
+
byPage: (settings) => {
|
|
1415
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1416
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1417
|
+
}
|
|
1418
|
+
return this.listAllPagingPage(billingAccountName, billingProfileName, options, settings);
|
|
1364
1419
|
}
|
|
1365
1420
|
};
|
|
1366
1421
|
}
|
|
1367
|
-
listAllPagingPage(billingAccountName, billingProfileName, options) {
|
|
1422
|
+
listAllPagingPage(billingAccountName, billingProfileName, options, settings) {
|
|
1368
1423
|
return tslib.__asyncGenerator(this, arguments, function* listAllPagingPage_1() {
|
|
1369
|
-
let result
|
|
1370
|
-
|
|
1371
|
-
|
|
1424
|
+
let result;
|
|
1425
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1426
|
+
if (!continuationToken) {
|
|
1427
|
+
result = yield tslib.__await(this._listAll(billingAccountName, billingProfileName, options));
|
|
1428
|
+
let page = result.value || [];
|
|
1429
|
+
continuationToken = result.nextLink;
|
|
1430
|
+
setContinuationToken(page, continuationToken);
|
|
1431
|
+
yield yield tslib.__await(page);
|
|
1432
|
+
}
|
|
1372
1433
|
while (continuationToken) {
|
|
1373
1434
|
result = yield tslib.__await(this._listAllNext(billingAccountName, billingProfileName, continuationToken, options));
|
|
1374
1435
|
continuationToken = result.nextLink;
|
|
1375
|
-
|
|
1436
|
+
let page = result.value || [];
|
|
1437
|
+
setContinuationToken(page, continuationToken);
|
|
1438
|
+
yield yield tslib.__await(page);
|
|
1376
1439
|
}
|
|
1377
1440
|
});
|
|
1378
1441
|
}
|
|
@@ -1411,20 +1474,31 @@ class LabsImpl {
|
|
|
1411
1474
|
[Symbol.asyncIterator]() {
|
|
1412
1475
|
return this;
|
|
1413
1476
|
},
|
|
1414
|
-
byPage: () => {
|
|
1415
|
-
|
|
1477
|
+
byPage: (settings) => {
|
|
1478
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1479
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1480
|
+
}
|
|
1481
|
+
return this.listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options, settings);
|
|
1416
1482
|
}
|
|
1417
1483
|
};
|
|
1418
1484
|
}
|
|
1419
|
-
listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options) {
|
|
1485
|
+
listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options, settings) {
|
|
1420
1486
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1421
|
-
let result
|
|
1422
|
-
|
|
1423
|
-
|
|
1487
|
+
let result;
|
|
1488
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1489
|
+
if (!continuationToken) {
|
|
1490
|
+
result = yield tslib.__await(this._list(billingAccountName, billingProfileName, invoiceSectionName, options));
|
|
1491
|
+
let page = result.value || [];
|
|
1492
|
+
continuationToken = result.nextLink;
|
|
1493
|
+
setContinuationToken(page, continuationToken);
|
|
1494
|
+
yield yield tslib.__await(page);
|
|
1495
|
+
}
|
|
1424
1496
|
while (continuationToken) {
|
|
1425
1497
|
result = yield tslib.__await(this._listNext(billingAccountName, billingProfileName, invoiceSectionName, continuationToken, options));
|
|
1426
1498
|
continuationToken = result.nextLink;
|
|
1427
|
-
|
|
1499
|
+
let page = result.value || [];
|
|
1500
|
+
setContinuationToken(page, continuationToken);
|
|
1501
|
+
yield yield tslib.__await(page);
|
|
1428
1502
|
}
|
|
1429
1503
|
});
|
|
1430
1504
|
}
|
|
@@ -1701,11 +1775,6 @@ const listAllNextOperationSpec$1 = {
|
|
|
1701
1775
|
bodyMapper: ErrorResponseBody
|
|
1702
1776
|
}
|
|
1703
1777
|
},
|
|
1704
|
-
queryParameters: [
|
|
1705
|
-
apiVersion,
|
|
1706
|
-
includeBudget,
|
|
1707
|
-
includeDeleted
|
|
1708
|
-
],
|
|
1709
1778
|
urlParameters: [
|
|
1710
1779
|
$host,
|
|
1711
1780
|
billingAccountName,
|
|
@@ -1726,7 +1795,6 @@ const listNextOperationSpec$2 = {
|
|
|
1726
1795
|
bodyMapper: ErrorResponseBody
|
|
1727
1796
|
}
|
|
1728
1797
|
},
|
|
1729
|
-
queryParameters: [apiVersion, includeBudget],
|
|
1730
1798
|
urlParameters: [
|
|
1731
1799
|
$host,
|
|
1732
1800
|
billingAccountName,
|
|
@@ -1771,20 +1839,31 @@ class JoinRequestsImpl {
|
|
|
1771
1839
|
[Symbol.asyncIterator]() {
|
|
1772
1840
|
return this;
|
|
1773
1841
|
},
|
|
1774
|
-
byPage: () => {
|
|
1775
|
-
|
|
1842
|
+
byPage: (settings) => {
|
|
1843
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1844
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1845
|
+
}
|
|
1846
|
+
return this.listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options, settings);
|
|
1776
1847
|
}
|
|
1777
1848
|
};
|
|
1778
1849
|
}
|
|
1779
|
-
listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options) {
|
|
1850
|
+
listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options, settings) {
|
|
1780
1851
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1781
|
-
let result
|
|
1782
|
-
|
|
1783
|
-
|
|
1852
|
+
let result;
|
|
1853
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1854
|
+
if (!continuationToken) {
|
|
1855
|
+
result = yield tslib.__await(this._list(billingAccountName, billingProfileName, invoiceSectionName, options));
|
|
1856
|
+
let page = result.value || [];
|
|
1857
|
+
continuationToken = result.nextLink;
|
|
1858
|
+
setContinuationToken(page, continuationToken);
|
|
1859
|
+
yield yield tslib.__await(page);
|
|
1860
|
+
}
|
|
1784
1861
|
while (continuationToken) {
|
|
1785
1862
|
result = yield tslib.__await(this._listNext(billingAccountName, billingProfileName, invoiceSectionName, continuationToken, options));
|
|
1786
1863
|
continuationToken = result.nextLink;
|
|
1787
|
-
|
|
1864
|
+
let page = result.value || [];
|
|
1865
|
+
setContinuationToken(page, continuationToken);
|
|
1866
|
+
yield yield tslib.__await(page);
|
|
1788
1867
|
}
|
|
1789
1868
|
});
|
|
1790
1869
|
}
|
|
@@ -1981,7 +2060,6 @@ const listNextOperationSpec$1 = {
|
|
|
1981
2060
|
bodyMapper: ErrorResponseBody
|
|
1982
2061
|
}
|
|
1983
2062
|
},
|
|
1984
|
-
queryParameters: [apiVersion, includeDenied],
|
|
1985
2063
|
urlParameters: [
|
|
1986
2064
|
$host,
|
|
1987
2065
|
billingAccountName,
|
|
@@ -2026,20 +2104,31 @@ class StudentsImpl {
|
|
|
2026
2104
|
[Symbol.asyncIterator]() {
|
|
2027
2105
|
return this;
|
|
2028
2106
|
},
|
|
2029
|
-
byPage: () => {
|
|
2030
|
-
|
|
2107
|
+
byPage: (settings) => {
|
|
2108
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
2109
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
2110
|
+
}
|
|
2111
|
+
return this.listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options, settings);
|
|
2031
2112
|
}
|
|
2032
2113
|
};
|
|
2033
2114
|
}
|
|
2034
|
-
listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options) {
|
|
2115
|
+
listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options, settings) {
|
|
2035
2116
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
2036
|
-
let result
|
|
2037
|
-
|
|
2038
|
-
|
|
2117
|
+
let result;
|
|
2118
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
2119
|
+
if (!continuationToken) {
|
|
2120
|
+
result = yield tslib.__await(this._list(billingAccountName, billingProfileName, invoiceSectionName, options));
|
|
2121
|
+
let page = result.value || [];
|
|
2122
|
+
continuationToken = result.nextLink;
|
|
2123
|
+
setContinuationToken(page, continuationToken);
|
|
2124
|
+
yield yield tslib.__await(page);
|
|
2125
|
+
}
|
|
2039
2126
|
while (continuationToken) {
|
|
2040
2127
|
result = yield tslib.__await(this._listNext(billingAccountName, billingProfileName, invoiceSectionName, continuationToken, options));
|
|
2041
2128
|
continuationToken = result.nextLink;
|
|
2042
|
-
|
|
2129
|
+
let page = result.value || [];
|
|
2130
|
+
setContinuationToken(page, continuationToken);
|
|
2131
|
+
yield yield tslib.__await(page);
|
|
2043
2132
|
}
|
|
2044
2133
|
});
|
|
2045
2134
|
}
|
|
@@ -2247,7 +2336,6 @@ const listNextOperationSpec = {
|
|
|
2247
2336
|
bodyMapper: ErrorResponseBody
|
|
2248
2337
|
}
|
|
2249
2338
|
},
|
|
2250
|
-
queryParameters: [apiVersion, includeDeleted],
|
|
2251
2339
|
urlParameters: [
|
|
2252
2340
|
$host,
|
|
2253
2341
|
billingAccountName,
|
|
@@ -2289,20 +2377,31 @@ class StudentLabsImpl {
|
|
|
2289
2377
|
[Symbol.asyncIterator]() {
|
|
2290
2378
|
return this;
|
|
2291
2379
|
},
|
|
2292
|
-
byPage: () => {
|
|
2293
|
-
|
|
2380
|
+
byPage: (settings) => {
|
|
2381
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
2382
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
2383
|
+
}
|
|
2384
|
+
return this.listAllPagingPage(options, settings);
|
|
2294
2385
|
}
|
|
2295
2386
|
};
|
|
2296
2387
|
}
|
|
2297
|
-
listAllPagingPage(options) {
|
|
2388
|
+
listAllPagingPage(options, settings) {
|
|
2298
2389
|
return tslib.__asyncGenerator(this, arguments, function* listAllPagingPage_1() {
|
|
2299
|
-
let result
|
|
2300
|
-
|
|
2301
|
-
|
|
2390
|
+
let result;
|
|
2391
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
2392
|
+
if (!continuationToken) {
|
|
2393
|
+
result = yield tslib.__await(this._listAll(options));
|
|
2394
|
+
let page = result.value || [];
|
|
2395
|
+
continuationToken = result.nextLink;
|
|
2396
|
+
setContinuationToken(page, continuationToken);
|
|
2397
|
+
yield yield tslib.__await(page);
|
|
2398
|
+
}
|
|
2302
2399
|
while (continuationToken) {
|
|
2303
2400
|
result = yield tslib.__await(this._listAllNext(continuationToken, options));
|
|
2304
2401
|
continuationToken = result.nextLink;
|
|
2305
|
-
|
|
2402
|
+
let page = result.value || [];
|
|
2403
|
+
setContinuationToken(page, continuationToken);
|
|
2404
|
+
yield yield tslib.__await(page);
|
|
2306
2405
|
}
|
|
2307
2406
|
});
|
|
2308
2407
|
}
|
|
@@ -2393,7 +2492,6 @@ const listAllNextOperationSpec = {
|
|
|
2393
2492
|
bodyMapper: ErrorResponseBody
|
|
2394
2493
|
}
|
|
2395
2494
|
},
|
|
2396
|
-
queryParameters: [apiVersion],
|
|
2397
2495
|
urlParameters: [$host, nextLink],
|
|
2398
2496
|
headerParameters: [accept],
|
|
2399
2497
|
serializer: serializer$1
|
|
@@ -2413,7 +2511,7 @@ class EducationManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
2413
2511
|
* @param options The parameter options
|
|
2414
2512
|
*/
|
|
2415
2513
|
constructor(credentials, options) {
|
|
2416
|
-
var _a, _b;
|
|
2514
|
+
var _a, _b, _c;
|
|
2417
2515
|
if (credentials === undefined) {
|
|
2418
2516
|
throw new Error("'credentials' cannot be null");
|
|
2419
2517
|
}
|
|
@@ -2425,32 +2523,34 @@ class EducationManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
2425
2523
|
requestContentType: "application/json; charset=utf-8",
|
|
2426
2524
|
credential: credentials
|
|
2427
2525
|
};
|
|
2428
|
-
const packageDetails = `azsdk-js-arm-education/1.0.0-beta.
|
|
2526
|
+
const packageDetails = `azsdk-js-arm-education/1.0.0-beta.3`;
|
|
2429
2527
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
2430
2528
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
2431
2529
|
: `${packageDetails}`;
|
|
2432
|
-
if (!options.credentialScopes) {
|
|
2433
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
2434
|
-
}
|
|
2435
2530
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
2436
2531
|
userAgentPrefix
|
|
2437
|
-
},
|
|
2532
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
2438
2533
|
super(optionsWithDefaults);
|
|
2534
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
2439
2535
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
2440
2536
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
2441
|
-
|
|
2537
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
2442
2538
|
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2539
|
+
}
|
|
2540
|
+
if (!options ||
|
|
2541
|
+
!options.pipeline ||
|
|
2542
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
2543
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
2544
|
+
this.pipeline.removePolicy({
|
|
2545
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
2546
|
+
});
|
|
2547
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
2548
|
+
credential: credentials,
|
|
2549
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
2550
|
+
challengeCallbacks: {
|
|
2551
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
2552
|
+
}
|
|
2553
|
+
}));
|
|
2454
2554
|
}
|
|
2455
2555
|
// Assigning values to Constant parameters
|
|
2456
2556
|
this.$host = options.$host || "https://management.azure.com";
|
|
@@ -2519,4 +2619,5 @@ const redeemInvitationCodeOperationSpec = {
|
|
|
2519
2619
|
};
|
|
2520
2620
|
|
|
2521
2621
|
exports.EducationManagementClient = EducationManagementClient;
|
|
2622
|
+
exports.getContinuationToken = getContinuationToken;
|
|
2522
2623
|
//# sourceMappingURL=index.js.map
|