@azure/arm-education 1.0.0-beta.1 → 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 +25 -0
- package/LICENSE +1 -1
- package/README.md +4 -3
- package/dist/index.js +233 -79
- 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 +2 -0
- package/dist-esm/src/educationManagementClient.d.ts.map +1 -1
- package/dist-esm/src/educationManagementClient.js +49 -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 +38 -26
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +25 -0
- package/dist-esm/src/models/index.js.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/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +17 -12
- package/review/arm-education.api.md +35 -61
- package/src/educationManagementClient.ts +60 -20
- package/src/index.ts +1 -0
- package/src/models/index.ts +44 -38
- 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 +49 -26
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
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
|
+
|
|
16
|
+
## 1.0.0-beta.2 (2022-07-04)
|
|
17
|
+
|
|
18
|
+
**Features**
|
|
19
|
+
|
|
20
|
+
- Added Interface GrantDetails
|
|
21
|
+
- Added Interface JoinRequestDetails
|
|
22
|
+
- Added Interface LabDetails
|
|
23
|
+
- Added Interface StudentDetails
|
|
24
|
+
- Added Interface StudentLabDetails
|
|
25
|
+
- Enum KnownLabStatus has a new value Pending
|
|
26
|
+
|
|
27
|
+
|
|
3
28
|
## 1.0.0-beta.1 (2022-05-24)
|
|
4
29
|
|
|
5
30
|
The package of @azure/arm-education is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
|
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.
|
|
@@ -53,14 +53,15 @@ const { EducationManagementClient } = require("@azure/arm-education");
|
|
|
53
53
|
const { DefaultAzureCredential } = require("@azure/identity");
|
|
54
54
|
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
|
55
55
|
|
|
56
|
-
const
|
|
56
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
57
|
+
const client = new EducationManagementClient(new DefaultAzureCredential(), subscriptionId);
|
|
57
58
|
|
|
58
59
|
// For client-side applications running in the browser, use this code instead:
|
|
59
60
|
// const credential = new InteractiveBrowserCredential({
|
|
60
61
|
// tenantId: "<YOUR_TENANT_ID>",
|
|
61
62
|
// clientId: "<YOUR_CLIENT_ID>"
|
|
62
63
|
// });
|
|
63
|
-
// const client = new EducationManagementClient(credential);
|
|
64
|
+
// const client = new EducationManagementClient(credential, subscriptionId);
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
|
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.
|
|
@@ -37,60 +69,85 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
|
|
|
37
69
|
/** Known values of {@link Origin} that the service accepts. */
|
|
38
70
|
exports.KnownOrigin = void 0;
|
|
39
71
|
(function (KnownOrigin) {
|
|
72
|
+
/** User */
|
|
40
73
|
KnownOrigin["User"] = "user";
|
|
74
|
+
/** System */
|
|
41
75
|
KnownOrigin["System"] = "system";
|
|
76
|
+
/** UserSystem */
|
|
42
77
|
KnownOrigin["UserSystem"] = "user,system";
|
|
43
78
|
})(exports.KnownOrigin || (exports.KnownOrigin = {}));
|
|
44
79
|
/** Known values of {@link ActionType} that the service accepts. */
|
|
45
80
|
exports.KnownActionType = void 0;
|
|
46
81
|
(function (KnownActionType) {
|
|
82
|
+
/** Internal */
|
|
47
83
|
KnownActionType["Internal"] = "Internal";
|
|
48
84
|
})(exports.KnownActionType || (exports.KnownActionType = {}));
|
|
49
85
|
/** Known values of {@link GrantType} that the service accepts. */
|
|
50
86
|
exports.KnownGrantType = void 0;
|
|
51
87
|
(function (KnownGrantType) {
|
|
88
|
+
/** Student */
|
|
52
89
|
KnownGrantType["Student"] = "Student";
|
|
90
|
+
/** Academic */
|
|
53
91
|
KnownGrantType["Academic"] = "Academic";
|
|
54
92
|
})(exports.KnownGrantType || (exports.KnownGrantType = {}));
|
|
55
93
|
/** Known values of {@link GrantStatus} that the service accepts. */
|
|
56
94
|
exports.KnownGrantStatus = void 0;
|
|
57
95
|
(function (KnownGrantStatus) {
|
|
96
|
+
/** Active */
|
|
58
97
|
KnownGrantStatus["Active"] = "Active";
|
|
98
|
+
/** Inactive */
|
|
59
99
|
KnownGrantStatus["Inactive"] = "Inactive";
|
|
60
100
|
})(exports.KnownGrantStatus || (exports.KnownGrantStatus = {}));
|
|
61
101
|
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
62
102
|
exports.KnownCreatedByType = void 0;
|
|
63
103
|
(function (KnownCreatedByType) {
|
|
104
|
+
/** User */
|
|
64
105
|
KnownCreatedByType["User"] = "User";
|
|
106
|
+
/** Application */
|
|
65
107
|
KnownCreatedByType["Application"] = "Application";
|
|
108
|
+
/** ManagedIdentity */
|
|
66
109
|
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
|
110
|
+
/** Key */
|
|
67
111
|
KnownCreatedByType["Key"] = "Key";
|
|
68
112
|
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
|
|
69
113
|
/** Known values of {@link LabStatus} that the service accepts. */
|
|
70
114
|
exports.KnownLabStatus = void 0;
|
|
71
115
|
(function (KnownLabStatus) {
|
|
116
|
+
/** Active */
|
|
72
117
|
KnownLabStatus["Active"] = "Active";
|
|
118
|
+
/** Deleted */
|
|
73
119
|
KnownLabStatus["Deleted"] = "Deleted";
|
|
120
|
+
/** Pending */
|
|
121
|
+
KnownLabStatus["Pending"] = "Pending";
|
|
74
122
|
})(exports.KnownLabStatus || (exports.KnownLabStatus = {}));
|
|
75
123
|
/** Known values of {@link JoinRequestStatus} that the service accepts. */
|
|
76
124
|
exports.KnownJoinRequestStatus = void 0;
|
|
77
125
|
(function (KnownJoinRequestStatus) {
|
|
126
|
+
/** Pending */
|
|
78
127
|
KnownJoinRequestStatus["Pending"] = "Pending";
|
|
128
|
+
/** Denied */
|
|
79
129
|
KnownJoinRequestStatus["Denied"] = "Denied";
|
|
80
130
|
})(exports.KnownJoinRequestStatus || (exports.KnownJoinRequestStatus = {}));
|
|
81
131
|
/** Known values of {@link StudentRole} that the service accepts. */
|
|
82
132
|
exports.KnownStudentRole = void 0;
|
|
83
133
|
(function (KnownStudentRole) {
|
|
134
|
+
/** Student */
|
|
84
135
|
KnownStudentRole["Student"] = "Student";
|
|
136
|
+
/** Admin */
|
|
85
137
|
KnownStudentRole["Admin"] = "Admin";
|
|
86
138
|
})(exports.KnownStudentRole || (exports.KnownStudentRole = {}));
|
|
87
139
|
/** Known values of {@link StudentLabStatus} that the service accepts. */
|
|
88
140
|
exports.KnownStudentLabStatus = void 0;
|
|
89
141
|
(function (KnownStudentLabStatus) {
|
|
142
|
+
/** Active */
|
|
90
143
|
KnownStudentLabStatus["Active"] = "Active";
|
|
144
|
+
/** Disabled */
|
|
91
145
|
KnownStudentLabStatus["Disabled"] = "Disabled";
|
|
146
|
+
/** Expired */
|
|
92
147
|
KnownStudentLabStatus["Expired"] = "Expired";
|
|
148
|
+
/** Pending */
|
|
93
149
|
KnownStudentLabStatus["Pending"] = "Pending";
|
|
150
|
+
/** Deleted */
|
|
94
151
|
KnownStudentLabStatus["Deleted"] = "Deleted";
|
|
95
152
|
})(exports.KnownStudentLabStatus || (exports.KnownStudentLabStatus = {}));
|
|
96
153
|
|
|
@@ -1077,20 +1134,31 @@ class GrantsImpl {
|
|
|
1077
1134
|
[Symbol.asyncIterator]() {
|
|
1078
1135
|
return this;
|
|
1079
1136
|
},
|
|
1080
|
-
byPage: () => {
|
|
1081
|
-
|
|
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);
|
|
1082
1142
|
}
|
|
1083
1143
|
};
|
|
1084
1144
|
}
|
|
1085
|
-
listAllPagingPage(options) {
|
|
1145
|
+
listAllPagingPage(options, settings) {
|
|
1086
1146
|
return tslib.__asyncGenerator(this, arguments, function* listAllPagingPage_1() {
|
|
1087
|
-
let result
|
|
1088
|
-
|
|
1089
|
-
|
|
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
|
+
}
|
|
1090
1156
|
while (continuationToken) {
|
|
1091
1157
|
result = yield tslib.__await(this._listAllNext(continuationToken, options));
|
|
1092
1158
|
continuationToken = result.nextLink;
|
|
1093
|
-
|
|
1159
|
+
let page = result.value || [];
|
|
1160
|
+
setContinuationToken(page, continuationToken);
|
|
1161
|
+
yield yield tslib.__await(page);
|
|
1094
1162
|
}
|
|
1095
1163
|
});
|
|
1096
1164
|
}
|
|
@@ -1127,20 +1195,31 @@ class GrantsImpl {
|
|
|
1127
1195
|
[Symbol.asyncIterator]() {
|
|
1128
1196
|
return this;
|
|
1129
1197
|
},
|
|
1130
|
-
byPage: () => {
|
|
1131
|
-
|
|
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);
|
|
1132
1203
|
}
|
|
1133
1204
|
};
|
|
1134
1205
|
}
|
|
1135
|
-
listPagingPage(billingAccountName, billingProfileName, options) {
|
|
1206
|
+
listPagingPage(billingAccountName, billingProfileName, options, settings) {
|
|
1136
1207
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1137
|
-
let result
|
|
1138
|
-
|
|
1139
|
-
|
|
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
|
+
}
|
|
1140
1217
|
while (continuationToken) {
|
|
1141
1218
|
result = yield tslib.__await(this._listNext(billingAccountName, billingProfileName, continuationToken, options));
|
|
1142
1219
|
continuationToken = result.nextLink;
|
|
1143
|
-
|
|
1220
|
+
let page = result.value || [];
|
|
1221
|
+
setContinuationToken(page, continuationToken);
|
|
1222
|
+
yield yield tslib.__await(page);
|
|
1144
1223
|
}
|
|
1145
1224
|
});
|
|
1146
1225
|
}
|
|
@@ -1275,7 +1354,6 @@ const listAllNextOperationSpec$2 = {
|
|
|
1275
1354
|
bodyMapper: ErrorResponseBody
|
|
1276
1355
|
}
|
|
1277
1356
|
},
|
|
1278
|
-
queryParameters: [apiVersion, includeAllocatedBudget],
|
|
1279
1357
|
urlParameters: [$host, nextLink],
|
|
1280
1358
|
headerParameters: [accept],
|
|
1281
1359
|
serializer: serializer$5
|
|
@@ -1291,7 +1369,6 @@ const listNextOperationSpec$3 = {
|
|
|
1291
1369
|
bodyMapper: ErrorResponseBody
|
|
1292
1370
|
}
|
|
1293
1371
|
},
|
|
1294
|
-
queryParameters: [apiVersion, includeAllocatedBudget],
|
|
1295
1372
|
urlParameters: [
|
|
1296
1373
|
$host,
|
|
1297
1374
|
billingAccountName,
|
|
@@ -1334,20 +1411,31 @@ class LabsImpl {
|
|
|
1334
1411
|
[Symbol.asyncIterator]() {
|
|
1335
1412
|
return this;
|
|
1336
1413
|
},
|
|
1337
|
-
byPage: () => {
|
|
1338
|
-
|
|
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);
|
|
1339
1419
|
}
|
|
1340
1420
|
};
|
|
1341
1421
|
}
|
|
1342
|
-
listAllPagingPage(billingAccountName, billingProfileName, options) {
|
|
1422
|
+
listAllPagingPage(billingAccountName, billingProfileName, options, settings) {
|
|
1343
1423
|
return tslib.__asyncGenerator(this, arguments, function* listAllPagingPage_1() {
|
|
1344
|
-
let result
|
|
1345
|
-
|
|
1346
|
-
|
|
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
|
+
}
|
|
1347
1433
|
while (continuationToken) {
|
|
1348
1434
|
result = yield tslib.__await(this._listAllNext(billingAccountName, billingProfileName, continuationToken, options));
|
|
1349
1435
|
continuationToken = result.nextLink;
|
|
1350
|
-
|
|
1436
|
+
let page = result.value || [];
|
|
1437
|
+
setContinuationToken(page, continuationToken);
|
|
1438
|
+
yield yield tslib.__await(page);
|
|
1351
1439
|
}
|
|
1352
1440
|
});
|
|
1353
1441
|
}
|
|
@@ -1386,20 +1474,31 @@ class LabsImpl {
|
|
|
1386
1474
|
[Symbol.asyncIterator]() {
|
|
1387
1475
|
return this;
|
|
1388
1476
|
},
|
|
1389
|
-
byPage: () => {
|
|
1390
|
-
|
|
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);
|
|
1391
1482
|
}
|
|
1392
1483
|
};
|
|
1393
1484
|
}
|
|
1394
|
-
listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options) {
|
|
1485
|
+
listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options, settings) {
|
|
1395
1486
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1396
|
-
let result
|
|
1397
|
-
|
|
1398
|
-
|
|
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
|
+
}
|
|
1399
1496
|
while (continuationToken) {
|
|
1400
1497
|
result = yield tslib.__await(this._listNext(billingAccountName, billingProfileName, invoiceSectionName, continuationToken, options));
|
|
1401
1498
|
continuationToken = result.nextLink;
|
|
1402
|
-
|
|
1499
|
+
let page = result.value || [];
|
|
1500
|
+
setContinuationToken(page, continuationToken);
|
|
1501
|
+
yield yield tslib.__await(page);
|
|
1403
1502
|
}
|
|
1404
1503
|
});
|
|
1405
1504
|
}
|
|
@@ -1676,11 +1775,6 @@ const listAllNextOperationSpec$1 = {
|
|
|
1676
1775
|
bodyMapper: ErrorResponseBody
|
|
1677
1776
|
}
|
|
1678
1777
|
},
|
|
1679
|
-
queryParameters: [
|
|
1680
|
-
apiVersion,
|
|
1681
|
-
includeBudget,
|
|
1682
|
-
includeDeleted
|
|
1683
|
-
],
|
|
1684
1778
|
urlParameters: [
|
|
1685
1779
|
$host,
|
|
1686
1780
|
billingAccountName,
|
|
@@ -1701,7 +1795,6 @@ const listNextOperationSpec$2 = {
|
|
|
1701
1795
|
bodyMapper: ErrorResponseBody
|
|
1702
1796
|
}
|
|
1703
1797
|
},
|
|
1704
|
-
queryParameters: [apiVersion, includeBudget],
|
|
1705
1798
|
urlParameters: [
|
|
1706
1799
|
$host,
|
|
1707
1800
|
billingAccountName,
|
|
@@ -1746,20 +1839,31 @@ class JoinRequestsImpl {
|
|
|
1746
1839
|
[Symbol.asyncIterator]() {
|
|
1747
1840
|
return this;
|
|
1748
1841
|
},
|
|
1749
|
-
byPage: () => {
|
|
1750
|
-
|
|
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);
|
|
1751
1847
|
}
|
|
1752
1848
|
};
|
|
1753
1849
|
}
|
|
1754
|
-
listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options) {
|
|
1850
|
+
listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options, settings) {
|
|
1755
1851
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1756
|
-
let result
|
|
1757
|
-
|
|
1758
|
-
|
|
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
|
+
}
|
|
1759
1861
|
while (continuationToken) {
|
|
1760
1862
|
result = yield tslib.__await(this._listNext(billingAccountName, billingProfileName, invoiceSectionName, continuationToken, options));
|
|
1761
1863
|
continuationToken = result.nextLink;
|
|
1762
|
-
|
|
1864
|
+
let page = result.value || [];
|
|
1865
|
+
setContinuationToken(page, continuationToken);
|
|
1866
|
+
yield yield tslib.__await(page);
|
|
1763
1867
|
}
|
|
1764
1868
|
});
|
|
1765
1869
|
}
|
|
@@ -1956,7 +2060,6 @@ const listNextOperationSpec$1 = {
|
|
|
1956
2060
|
bodyMapper: ErrorResponseBody
|
|
1957
2061
|
}
|
|
1958
2062
|
},
|
|
1959
|
-
queryParameters: [apiVersion, includeDenied],
|
|
1960
2063
|
urlParameters: [
|
|
1961
2064
|
$host,
|
|
1962
2065
|
billingAccountName,
|
|
@@ -2001,20 +2104,31 @@ class StudentsImpl {
|
|
|
2001
2104
|
[Symbol.asyncIterator]() {
|
|
2002
2105
|
return this;
|
|
2003
2106
|
},
|
|
2004
|
-
byPage: () => {
|
|
2005
|
-
|
|
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);
|
|
2006
2112
|
}
|
|
2007
2113
|
};
|
|
2008
2114
|
}
|
|
2009
|
-
listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options) {
|
|
2115
|
+
listPagingPage(billingAccountName, billingProfileName, invoiceSectionName, options, settings) {
|
|
2010
2116
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
2011
|
-
let result
|
|
2012
|
-
|
|
2013
|
-
|
|
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
|
+
}
|
|
2014
2126
|
while (continuationToken) {
|
|
2015
2127
|
result = yield tslib.__await(this._listNext(billingAccountName, billingProfileName, invoiceSectionName, continuationToken, options));
|
|
2016
2128
|
continuationToken = result.nextLink;
|
|
2017
|
-
|
|
2129
|
+
let page = result.value || [];
|
|
2130
|
+
setContinuationToken(page, continuationToken);
|
|
2131
|
+
yield yield tslib.__await(page);
|
|
2018
2132
|
}
|
|
2019
2133
|
});
|
|
2020
2134
|
}
|
|
@@ -2222,7 +2336,6 @@ const listNextOperationSpec = {
|
|
|
2222
2336
|
bodyMapper: ErrorResponseBody
|
|
2223
2337
|
}
|
|
2224
2338
|
},
|
|
2225
|
-
queryParameters: [apiVersion, includeDeleted],
|
|
2226
2339
|
urlParameters: [
|
|
2227
2340
|
$host,
|
|
2228
2341
|
billingAccountName,
|
|
@@ -2264,20 +2377,31 @@ class StudentLabsImpl {
|
|
|
2264
2377
|
[Symbol.asyncIterator]() {
|
|
2265
2378
|
return this;
|
|
2266
2379
|
},
|
|
2267
|
-
byPage: () => {
|
|
2268
|
-
|
|
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);
|
|
2269
2385
|
}
|
|
2270
2386
|
};
|
|
2271
2387
|
}
|
|
2272
|
-
listAllPagingPage(options) {
|
|
2388
|
+
listAllPagingPage(options, settings) {
|
|
2273
2389
|
return tslib.__asyncGenerator(this, arguments, function* listAllPagingPage_1() {
|
|
2274
|
-
let result
|
|
2275
|
-
|
|
2276
|
-
|
|
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
|
+
}
|
|
2277
2399
|
while (continuationToken) {
|
|
2278
2400
|
result = yield tslib.__await(this._listAllNext(continuationToken, options));
|
|
2279
2401
|
continuationToken = result.nextLink;
|
|
2280
|
-
|
|
2402
|
+
let page = result.value || [];
|
|
2403
|
+
setContinuationToken(page, continuationToken);
|
|
2404
|
+
yield yield tslib.__await(page);
|
|
2281
2405
|
}
|
|
2282
2406
|
});
|
|
2283
2407
|
}
|
|
@@ -2368,7 +2492,6 @@ const listAllNextOperationSpec = {
|
|
|
2368
2492
|
bodyMapper: ErrorResponseBody
|
|
2369
2493
|
}
|
|
2370
2494
|
},
|
|
2371
|
-
queryParameters: [apiVersion],
|
|
2372
2495
|
urlParameters: [$host, nextLink],
|
|
2373
2496
|
headerParameters: [accept],
|
|
2374
2497
|
serializer: serializer$1
|
|
@@ -2388,7 +2511,7 @@ class EducationManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
2388
2511
|
* @param options The parameter options
|
|
2389
2512
|
*/
|
|
2390
2513
|
constructor(credentials, options) {
|
|
2391
|
-
var _a, _b;
|
|
2514
|
+
var _a, _b, _c;
|
|
2392
2515
|
if (credentials === undefined) {
|
|
2393
2516
|
throw new Error("'credentials' cannot be null");
|
|
2394
2517
|
}
|
|
@@ -2400,32 +2523,34 @@ class EducationManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
2400
2523
|
requestContentType: "application/json; charset=utf-8",
|
|
2401
2524
|
credential: credentials
|
|
2402
2525
|
};
|
|
2403
|
-
const packageDetails = `azsdk-js-arm-education/1.0.0-beta.
|
|
2526
|
+
const packageDetails = `azsdk-js-arm-education/1.0.0-beta.3`;
|
|
2404
2527
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
2405
2528
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
2406
2529
|
: `${packageDetails}`;
|
|
2407
|
-
if (!options.credentialScopes) {
|
|
2408
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
2409
|
-
}
|
|
2410
2530
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
2411
2531
|
userAgentPrefix
|
|
2412
|
-
},
|
|
2532
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
2413
2533
|
super(optionsWithDefaults);
|
|
2534
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
2414
2535
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
2415
2536
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
2416
|
-
|
|
2537
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
2417
2538
|
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
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
|
+
}));
|
|
2429
2554
|
}
|
|
2430
2555
|
// Assigning values to Constant parameters
|
|
2431
2556
|
this.$host = options.$host || "https://management.azure.com";
|
|
@@ -2436,6 +2561,34 @@ class EducationManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
2436
2561
|
this.joinRequests = new JoinRequestsImpl(this);
|
|
2437
2562
|
this.students = new StudentsImpl(this);
|
|
2438
2563
|
this.studentLabs = new StudentLabsImpl(this);
|
|
2564
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
2565
|
+
}
|
|
2566
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
2567
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
2568
|
+
if (!apiVersion) {
|
|
2569
|
+
return;
|
|
2570
|
+
}
|
|
2571
|
+
const apiVersionPolicy = {
|
|
2572
|
+
name: "CustomApiVersionPolicy",
|
|
2573
|
+
sendRequest(request, next) {
|
|
2574
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2575
|
+
const param = request.url.split("?");
|
|
2576
|
+
if (param.length > 1) {
|
|
2577
|
+
const newParams = param[1].split("&").map((item) => {
|
|
2578
|
+
if (item.indexOf("api-version") > -1) {
|
|
2579
|
+
return "api-version=" + apiVersion;
|
|
2580
|
+
}
|
|
2581
|
+
else {
|
|
2582
|
+
return item;
|
|
2583
|
+
}
|
|
2584
|
+
});
|
|
2585
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
2586
|
+
}
|
|
2587
|
+
return next(request);
|
|
2588
|
+
});
|
|
2589
|
+
}
|
|
2590
|
+
};
|
|
2591
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
2439
2592
|
}
|
|
2440
2593
|
/**
|
|
2441
2594
|
* Redeem invite code to join a redeemable lab
|
|
@@ -2466,4 +2619,5 @@ const redeemInvitationCodeOperationSpec = {
|
|
|
2466
2619
|
};
|
|
2467
2620
|
|
|
2468
2621
|
exports.EducationManagementClient = EducationManagementClient;
|
|
2622
|
+
exports.getContinuationToken = getContinuationToken;
|
|
2469
2623
|
//# sourceMappingURL=index.js.map
|