@easyedu/js-lsm-api 1.51.0 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +26 -0
- package/README.md +30 -2
- package/dist/apis/CourseCatalogApi.d.ts +138 -0
- package/dist/apis/CourseCatalogApi.js +352 -0
- package/dist/apis/CourseShareApi.d.ts +153 -0
- package/dist/apis/CourseShareApi.js +385 -0
- package/dist/apis/PortalSublicenseApi.d.ts +36 -0
- package/dist/apis/PortalSublicenseApi.js +79 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/CourseCatalogApi.d.ts +138 -0
- package/dist/esm/apis/CourseCatalogApi.js +348 -0
- package/dist/esm/apis/CourseShareApi.d.ts +153 -0
- package/dist/esm/apis/CourseShareApi.js +381 -0
- package/dist/esm/apis/PortalSublicenseApi.d.ts +36 -0
- package/dist/esm/apis/PortalSublicenseApi.js +75 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/CourseCatalog.d.ts +44 -0
- package/dist/esm/models/CourseCatalog.js +51 -0
- package/dist/esm/models/CourseShare.d.ts +88 -0
- package/dist/esm/models/CourseShare.js +85 -0
- package/dist/esm/models/PortalSublicense.d.ts +65 -0
- package/dist/esm/models/PortalSublicense.js +61 -0
- package/dist/esm/models/PostCourseCatalog.d.ts +38 -0
- package/dist/esm/models/PostCourseCatalog.js +45 -0
- package/dist/esm/models/PostOfferCatalog.d.ts +59 -0
- package/dist/esm/models/PostOfferCatalog.js +59 -0
- package/dist/esm/models/PostOfferCatalogResponse.d.ts +32 -0
- package/dist/esm/models/PostOfferCatalogResponse.js +43 -0
- package/dist/esm/models/PostOfferCourse.d.ts +59 -0
- package/dist/esm/models/PostOfferCourse.js +59 -0
- package/dist/esm/models/PostOfferCourseResponse.d.ts +49 -0
- package/dist/esm/models/PostOfferCourseResponse.js +57 -0
- package/dist/esm/models/PutCourseCatalog.d.ts +38 -0
- package/dist/esm/models/PutCourseCatalog.js +43 -0
- package/dist/esm/models/PutPortalSublicense.d.ts +46 -0
- package/dist/esm/models/PutPortalSublicense.js +45 -0
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.js +10 -0
- package/dist/models/CourseCatalog.d.ts +44 -0
- package/dist/models/CourseCatalog.js +58 -0
- package/dist/models/CourseShare.d.ts +88 -0
- package/dist/models/CourseShare.js +93 -0
- package/dist/models/PortalSublicense.d.ts +65 -0
- package/dist/models/PortalSublicense.js +69 -0
- package/dist/models/PostCourseCatalog.d.ts +38 -0
- package/dist/models/PostCourseCatalog.js +52 -0
- package/dist/models/PostOfferCatalog.d.ts +59 -0
- package/dist/models/PostOfferCatalog.js +67 -0
- package/dist/models/PostOfferCatalogResponse.d.ts +32 -0
- package/dist/models/PostOfferCatalogResponse.js +50 -0
- package/dist/models/PostOfferCourse.d.ts +59 -0
- package/dist/models/PostOfferCourse.js +67 -0
- package/dist/models/PostOfferCourseResponse.d.ts +49 -0
- package/dist/models/PostOfferCourseResponse.js +65 -0
- package/dist/models/PutCourseCatalog.d.ts +38 -0
- package/dist/models/PutCourseCatalog.js +50 -0
- package/dist/models/PutPortalSublicense.d.ts +46 -0
- package/dist/models/PutPortalSublicense.js +52 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/docs/CourseCatalog.md +38 -0
- package/docs/CourseCatalogApi.md +544 -0
- package/docs/CourseShare.md +46 -0
- package/docs/CourseShareApi.md +609 -0
- package/docs/PortalSublicense.md +42 -0
- package/docs/PortalSublicenseApi.md +81 -0
- package/docs/PostCourseCatalog.md +36 -0
- package/docs/PostOfferCatalog.md +40 -0
- package/docs/PostOfferCatalogResponse.md +34 -0
- package/docs/PostOfferCourse.md +40 -0
- package/docs/PostOfferCourseResponse.md +36 -0
- package/docs/PutCourseCatalog.md +36 -0
- package/docs/PutPortalSublicense.md +39 -0
- package/package.json +1 -1
- package/src/apis/CourseCatalogApi.ts +447 -0
- package/src/apis/CourseShareApi.ts +480 -0
- package/src/apis/PortalSublicenseApi.ts +95 -0
- package/src/apis/index.ts +3 -0
- package/src/models/CourseCatalog.ts +84 -0
- package/src/models/CourseShare.ts +144 -0
- package/src/models/PortalSublicense.ts +111 -0
- package/src/models/PostCourseCatalog.ts +74 -0
- package/src/models/PostOfferCatalog.ts +103 -0
- package/src/models/PostOfferCatalogResponse.ts +66 -0
- package/src/models/PostOfferCourse.ts +103 -0
- package/src/models/PostOfferCourseResponse.ts +89 -0
- package/src/models/PutCourseCatalog.ts +73 -0
- package/src/models/PutPortalSublicense.ts +83 -0
- package/src/models/index.ts +10 -0
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { CourseShareFromJSON, PostOfferCatalogToJSON, PostOfferCatalogResponseFromJSON, PostOfferCourseToJSON, PostOfferCourseResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class CourseShareApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for deleteCourseShare without sending the request
|
|
31
|
+
*/
|
|
32
|
+
deleteCourseShareRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['shareId'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('shareId', 'Required parameter "shareId" was null or undefined when calling deleteCourseShare().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
let urlPath = `/course-shares/{shareId}`;
|
|
40
|
+
urlPath = urlPath.replace(`{${"shareId"}}`, encodeURIComponent(String(requestParameters['shareId'])));
|
|
41
|
+
return {
|
|
42
|
+
path: urlPath,
|
|
43
|
+
method: 'DELETE',
|
|
44
|
+
headers: headerParameters,
|
|
45
|
+
query: queryParameters,
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Cascades to any downstream re-shares and archives enrollments in the target portal. Use `POST /course-shares/{shareId}/unrevoke` to restore.
|
|
51
|
+
* Revoke a share
|
|
52
|
+
*/
|
|
53
|
+
deleteCourseShareRaw(requestParameters, initOverrides) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
const requestOptions = yield this.deleteCourseShareRequestOpts(requestParameters);
|
|
56
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
57
|
+
return new runtime.VoidApiResponse(response);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Cascades to any downstream re-shares and archives enrollments in the target portal. Use `POST /course-shares/{shareId}/unrevoke` to restore.
|
|
62
|
+
* Revoke a share
|
|
63
|
+
*/
|
|
64
|
+
deleteCourseShare(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
yield this.deleteCourseShareRaw(requestParameters, initOverrides);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Creates request options for getCourseSharesOfferedByMe without sending the request
|
|
71
|
+
*/
|
|
72
|
+
getCourseSharesOfferedByMeRequestOpts() {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const queryParameters = {};
|
|
75
|
+
const headerParameters = {};
|
|
76
|
+
let urlPath = `/course-shares/offered-by-me`;
|
|
77
|
+
return {
|
|
78
|
+
path: urlPath,
|
|
79
|
+
method: 'GET',
|
|
80
|
+
headers: headerParameters,
|
|
81
|
+
query: queryParameters,
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* List shares the current portal has offered out
|
|
87
|
+
*/
|
|
88
|
+
getCourseSharesOfferedByMeRaw(initOverrides) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const requestOptions = yield this.getCourseSharesOfferedByMeRequestOpts();
|
|
91
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
92
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseShareFromJSON));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* List shares the current portal has offered out
|
|
97
|
+
*/
|
|
98
|
+
getCourseSharesOfferedByMe(initOverrides) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
const response = yield this.getCourseSharesOfferedByMeRaw(initOverrides);
|
|
101
|
+
return yield response.value();
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Creates request options for getCourseSharesOfferedToMe without sending the request
|
|
106
|
+
*/
|
|
107
|
+
getCourseSharesOfferedToMeRequestOpts() {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
const queryParameters = {};
|
|
110
|
+
const headerParameters = {};
|
|
111
|
+
let urlPath = `/course-shares/offered-to-me`;
|
|
112
|
+
return {
|
|
113
|
+
path: urlPath,
|
|
114
|
+
method: 'GET',
|
|
115
|
+
headers: headerParameters,
|
|
116
|
+
query: queryParameters,
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* List shares offered to the current portal
|
|
122
|
+
*/
|
|
123
|
+
getCourseSharesOfferedToMeRaw(initOverrides) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
const requestOptions = yield this.getCourseSharesOfferedToMeRequestOpts();
|
|
126
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
127
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseShareFromJSON));
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* List shares offered to the current portal
|
|
132
|
+
*/
|
|
133
|
+
getCourseSharesOfferedToMe(initOverrides) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
const response = yield this.getCourseSharesOfferedToMeRaw(initOverrides);
|
|
136
|
+
return yield response.value();
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Creates request options for postOfferCatalog without sending the request
|
|
141
|
+
*/
|
|
142
|
+
postOfferCatalogRequestOpts(requestParameters) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
if (requestParameters['catalogId'] == null) {
|
|
145
|
+
throw new runtime.RequiredError('catalogId', 'Required parameter "catalogId" was null or undefined when calling postOfferCatalog().');
|
|
146
|
+
}
|
|
147
|
+
if (requestParameters['postOfferCatalog'] == null) {
|
|
148
|
+
throw new runtime.RequiredError('postOfferCatalog', 'Required parameter "postOfferCatalog" was null or undefined when calling postOfferCatalog().');
|
|
149
|
+
}
|
|
150
|
+
const queryParameters = {};
|
|
151
|
+
const headerParameters = {};
|
|
152
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
153
|
+
let urlPath = `/catalogs/{catalogId}/shares`;
|
|
154
|
+
urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
|
|
155
|
+
return {
|
|
156
|
+
path: urlPath,
|
|
157
|
+
method: 'POST',
|
|
158
|
+
headers: headerParameters,
|
|
159
|
+
query: queryParameters,
|
|
160
|
+
body: PostOfferCatalogToJSON(requestParameters['postOfferCatalog']),
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Fans out one `course_share` per catalog member. Duplicates are silently skipped. The catalog link is preserved on each generated share via `origin_catalog_id`.
|
|
166
|
+
* Offer every course in a catalog to a descendant portal
|
|
167
|
+
*/
|
|
168
|
+
postOfferCatalogRaw(requestParameters, initOverrides) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
const requestOptions = yield this.postOfferCatalogRequestOpts(requestParameters);
|
|
171
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
172
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostOfferCatalogResponseFromJSON(jsonValue));
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Fans out one `course_share` per catalog member. Duplicates are silently skipped. The catalog link is preserved on each generated share via `origin_catalog_id`.
|
|
177
|
+
* Offer every course in a catalog to a descendant portal
|
|
178
|
+
*/
|
|
179
|
+
postOfferCatalog(requestParameters, initOverrides) {
|
|
180
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
+
const response = yield this.postOfferCatalogRaw(requestParameters, initOverrides);
|
|
182
|
+
return yield response.value();
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Creates request options for postOfferCourse without sending the request
|
|
187
|
+
*/
|
|
188
|
+
postOfferCourseRequestOpts(requestParameters) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
+
if (requestParameters['courseId'] == null) {
|
|
191
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postOfferCourse().');
|
|
192
|
+
}
|
|
193
|
+
if (requestParameters['postOfferCourse'] == null) {
|
|
194
|
+
throw new runtime.RequiredError('postOfferCourse', 'Required parameter "postOfferCourse" was null or undefined when calling postOfferCourse().');
|
|
195
|
+
}
|
|
196
|
+
const queryParameters = {};
|
|
197
|
+
const headerParameters = {};
|
|
198
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
199
|
+
let urlPath = `/courses/{courseId}/shares`;
|
|
200
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
201
|
+
return {
|
|
202
|
+
path: urlPath,
|
|
203
|
+
method: 'POST',
|
|
204
|
+
headers: headerParameters,
|
|
205
|
+
query: queryParameters,
|
|
206
|
+
body: PostOfferCourseToJSON(requestParameters['postOfferCourse']),
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Offer a single course to a descendant portal
|
|
212
|
+
*/
|
|
213
|
+
postOfferCourseRaw(requestParameters, initOverrides) {
|
|
214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
215
|
+
const requestOptions = yield this.postOfferCourseRequestOpts(requestParameters);
|
|
216
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
217
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostOfferCourseResponseFromJSON(jsonValue));
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Offer a single course to a descendant portal
|
|
222
|
+
*/
|
|
223
|
+
postOfferCourse(requestParameters, initOverrides) {
|
|
224
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
225
|
+
const response = yield this.postOfferCourseRaw(requestParameters, initOverrides);
|
|
226
|
+
return yield response.value();
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Creates request options for postUnrevokeShare without sending the request
|
|
231
|
+
*/
|
|
232
|
+
postUnrevokeShareRequestOpts(requestParameters) {
|
|
233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
if (requestParameters['shareId'] == null) {
|
|
235
|
+
throw new runtime.RequiredError('shareId', 'Required parameter "shareId" was null or undefined when calling postUnrevokeShare().');
|
|
236
|
+
}
|
|
237
|
+
const queryParameters = {};
|
|
238
|
+
const headerParameters = {};
|
|
239
|
+
let urlPath = `/course-shares/{shareId}/unrevoke`;
|
|
240
|
+
urlPath = urlPath.replace(`{${"shareId"}}`, encodeURIComponent(String(requestParameters['shareId'])));
|
|
241
|
+
return {
|
|
242
|
+
path: urlPath,
|
|
243
|
+
method: 'POST',
|
|
244
|
+
headers: headerParameters,
|
|
245
|
+
query: queryParameters,
|
|
246
|
+
};
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Restore a previously revoked share
|
|
251
|
+
*/
|
|
252
|
+
postUnrevokeShareRaw(requestParameters, initOverrides) {
|
|
253
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
const requestOptions = yield this.postUnrevokeShareRequestOpts(requestParameters);
|
|
255
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
256
|
+
return new runtime.VoidApiResponse(response);
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Restore a previously revoked share
|
|
261
|
+
*/
|
|
262
|
+
postUnrevokeShare(requestParameters, initOverrides) {
|
|
263
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
264
|
+
yield this.postUnrevokeShareRaw(requestParameters, initOverrides);
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Creates request options for putAcceptClone without sending the request
|
|
269
|
+
*/
|
|
270
|
+
putAcceptCloneRequestOpts(requestParameters) {
|
|
271
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
272
|
+
if (requestParameters['shareId'] == null) {
|
|
273
|
+
throw new runtime.RequiredError('shareId', 'Required parameter "shareId" was null or undefined when calling putAcceptClone().');
|
|
274
|
+
}
|
|
275
|
+
const queryParameters = {};
|
|
276
|
+
const headerParameters = {};
|
|
277
|
+
let urlPath = `/course-shares/{shareId}/accept-clone`;
|
|
278
|
+
urlPath = urlPath.replace(`{${"shareId"}}`, encodeURIComponent(String(requestParameters['shareId'])));
|
|
279
|
+
return {
|
|
280
|
+
path: urlPath,
|
|
281
|
+
method: 'PUT',
|
|
282
|
+
headers: headerParameters,
|
|
283
|
+
query: queryParameters,
|
|
284
|
+
};
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Accept an offer as a clone (deep copy into your portal)
|
|
289
|
+
*/
|
|
290
|
+
putAcceptCloneRaw(requestParameters, initOverrides) {
|
|
291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
+
const requestOptions = yield this.putAcceptCloneRequestOpts(requestParameters);
|
|
293
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
294
|
+
return new runtime.VoidApiResponse(response);
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Accept an offer as a clone (deep copy into your portal)
|
|
299
|
+
*/
|
|
300
|
+
putAcceptClone(requestParameters, initOverrides) {
|
|
301
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
302
|
+
yield this.putAcceptCloneRaw(requestParameters, initOverrides);
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Creates request options for putAcceptMirror without sending the request
|
|
307
|
+
*/
|
|
308
|
+
putAcceptMirrorRequestOpts(requestParameters) {
|
|
309
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
310
|
+
if (requestParameters['shareId'] == null) {
|
|
311
|
+
throw new runtime.RequiredError('shareId', 'Required parameter "shareId" was null or undefined when calling putAcceptMirror().');
|
|
312
|
+
}
|
|
313
|
+
const queryParameters = {};
|
|
314
|
+
const headerParameters = {};
|
|
315
|
+
let urlPath = `/course-shares/{shareId}/accept-mirror`;
|
|
316
|
+
urlPath = urlPath.replace(`{${"shareId"}}`, encodeURIComponent(String(requestParameters['shareId'])));
|
|
317
|
+
return {
|
|
318
|
+
path: urlPath,
|
|
319
|
+
method: 'PUT',
|
|
320
|
+
headers: headerParameters,
|
|
321
|
+
query: queryParameters,
|
|
322
|
+
};
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Accept an offer as a mirror (no copy, live link to source)
|
|
327
|
+
*/
|
|
328
|
+
putAcceptMirrorRaw(requestParameters, initOverrides) {
|
|
329
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
330
|
+
const requestOptions = yield this.putAcceptMirrorRequestOpts(requestParameters);
|
|
331
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
332
|
+
return new runtime.VoidApiResponse(response);
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Accept an offer as a mirror (no copy, live link to source)
|
|
337
|
+
*/
|
|
338
|
+
putAcceptMirror(requestParameters, initOverrides) {
|
|
339
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
340
|
+
yield this.putAcceptMirrorRaw(requestParameters, initOverrides);
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Creates request options for putDeclineShare without sending the request
|
|
345
|
+
*/
|
|
346
|
+
putDeclineShareRequestOpts(requestParameters) {
|
|
347
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
348
|
+
if (requestParameters['shareId'] == null) {
|
|
349
|
+
throw new runtime.RequiredError('shareId', 'Required parameter "shareId" was null or undefined when calling putDeclineShare().');
|
|
350
|
+
}
|
|
351
|
+
const queryParameters = {};
|
|
352
|
+
const headerParameters = {};
|
|
353
|
+
let urlPath = `/course-shares/{shareId}/decline`;
|
|
354
|
+
urlPath = urlPath.replace(`{${"shareId"}}`, encodeURIComponent(String(requestParameters['shareId'])));
|
|
355
|
+
return {
|
|
356
|
+
path: urlPath,
|
|
357
|
+
method: 'PUT',
|
|
358
|
+
headers: headerParameters,
|
|
359
|
+
query: queryParameters,
|
|
360
|
+
};
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Decline an offer
|
|
365
|
+
*/
|
|
366
|
+
putDeclineShareRaw(requestParameters, initOverrides) {
|
|
367
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
368
|
+
const requestOptions = yield this.putDeclineShareRequestOpts(requestParameters);
|
|
369
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
370
|
+
return new runtime.VoidApiResponse(response);
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Decline an offer
|
|
375
|
+
*/
|
|
376
|
+
putDeclineShare(requestParameters, initOverrides) {
|
|
377
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
378
|
+
yield this.putDeclineShareRaw(requestParameters, initOverrides);
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { PortalSublicense, PutPortalSublicense } from '../models/index';
|
|
14
|
+
export interface PutPortalSublicenseRequest {
|
|
15
|
+
portalId: string;
|
|
16
|
+
putPortalSublicense: PutPortalSublicense;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare class PortalSublicenseApi extends runtime.BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* Creates request options for putPortalSublicense without sending the request
|
|
24
|
+
*/
|
|
25
|
+
putPortalSublicenseRequestOpts(requestParameters: PutPortalSublicenseRequest): Promise<runtime.RequestOpts>;
|
|
26
|
+
/**
|
|
27
|
+
* Must be called by a parent portal against one of its descendants. Field semantics: omit to leave unchanged, send `null` to clear.
|
|
28
|
+
* Manage seat limit and license window for a descendant portal
|
|
29
|
+
*/
|
|
30
|
+
putPortalSublicenseRaw(requestParameters: PutPortalSublicenseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PortalSublicense>>;
|
|
31
|
+
/**
|
|
32
|
+
* Must be called by a parent portal against one of its descendants. Field semantics: omit to leave unchanged, send `null` to clear.
|
|
33
|
+
* Manage seat limit and license window for a descendant portal
|
|
34
|
+
*/
|
|
35
|
+
putPortalSublicense(requestParameters: PutPortalSublicenseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PortalSublicense>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { PortalSublicenseFromJSON, PutPortalSublicenseToJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class PortalSublicenseApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for putPortalSublicense without sending the request
|
|
31
|
+
*/
|
|
32
|
+
putPortalSublicenseRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['portalId'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling putPortalSublicense().');
|
|
36
|
+
}
|
|
37
|
+
if (requestParameters['putPortalSublicense'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('putPortalSublicense', 'Required parameter "putPortalSublicense" was null or undefined when calling putPortalSublicense().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
43
|
+
let urlPath = `/portals/{portalId}/sublicense`;
|
|
44
|
+
urlPath = urlPath.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId'])));
|
|
45
|
+
return {
|
|
46
|
+
path: urlPath,
|
|
47
|
+
method: 'PUT',
|
|
48
|
+
headers: headerParameters,
|
|
49
|
+
query: queryParameters,
|
|
50
|
+
body: PutPortalSublicenseToJSON(requestParameters['putPortalSublicense']),
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Must be called by a parent portal against one of its descendants. Field semantics: omit to leave unchanged, send `null` to clear.
|
|
56
|
+
* Manage seat limit and license window for a descendant portal
|
|
57
|
+
*/
|
|
58
|
+
putPortalSublicenseRaw(requestParameters, initOverrides) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
const requestOptions = yield this.putPortalSublicenseRequestOpts(requestParameters);
|
|
61
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
62
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PortalSublicenseFromJSON(jsonValue));
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Must be called by a parent portal against one of its descendants. Field semantics: omit to leave unchanged, send `null` to clear.
|
|
67
|
+
* Manage seat limit and license window for a descendant portal
|
|
68
|
+
*/
|
|
69
|
+
putPortalSublicense(requestParameters, initOverrides) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
const response = yield this.putPortalSublicenseRaw(requestParameters, initOverrides);
|
|
72
|
+
return yield response.value();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -2,9 +2,12 @@ export * from './CertificateApi';
|
|
|
2
2
|
export * from './ChatApi';
|
|
3
3
|
export * from './ContentApi';
|
|
4
4
|
export * from './CourseApi';
|
|
5
|
+
export * from './CourseCatalogApi';
|
|
6
|
+
export * from './CourseShareApi';
|
|
5
7
|
export * from './ModuleApi';
|
|
6
8
|
export * from './OtherApi';
|
|
7
9
|
export * from './PortalApi';
|
|
10
|
+
export * from './PortalSublicenseApi';
|
|
8
11
|
export * from './QuestionApi';
|
|
9
12
|
export * from './QuizApi';
|
|
10
13
|
export * from './ReportingApi';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -4,9 +4,12 @@ export * from './CertificateApi';
|
|
|
4
4
|
export * from './ChatApi';
|
|
5
5
|
export * from './ContentApi';
|
|
6
6
|
export * from './CourseApi';
|
|
7
|
+
export * from './CourseCatalogApi';
|
|
8
|
+
export * from './CourseShareApi';
|
|
7
9
|
export * from './ModuleApi';
|
|
8
10
|
export * from './OtherApi';
|
|
9
11
|
export * from './PortalApi';
|
|
12
|
+
export * from './PortalSublicenseApi';
|
|
10
13
|
export * from './QuestionApi';
|
|
11
14
|
export * from './QuizApi';
|
|
12
15
|
export * from './ReportingApi';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CourseCatalog
|
|
16
|
+
*/
|
|
17
|
+
export interface CourseCatalog {
|
|
18
|
+
/**
|
|
19
|
+
* External ID (UUID) of the catalog
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CourseCatalog
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CourseCatalog
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CourseCatalog
|
|
34
|
+
*/
|
|
35
|
+
description: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the CourseCatalog interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfCourseCatalog(value: object): value is CourseCatalog;
|
|
41
|
+
export declare function CourseCatalogFromJSON(json: any): CourseCatalog;
|
|
42
|
+
export declare function CourseCatalogFromJSONTyped(json: any, ignoreDiscriminator: boolean): CourseCatalog;
|
|
43
|
+
export declare function CourseCatalogToJSON(json: any): CourseCatalog;
|
|
44
|
+
export declare function CourseCatalogToJSONTyped(value?: CourseCatalog | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the CourseCatalog interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfCourseCatalog(value) {
|
|
18
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('description' in value) || value['description'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
export function CourseCatalogFromJSON(json) {
|
|
27
|
+
return CourseCatalogFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
export function CourseCatalogFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
|
+
if (json == null) {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'id': json['id'],
|
|
35
|
+
'name': json['name'],
|
|
36
|
+
'description': json['description'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function CourseCatalogToJSON(json) {
|
|
40
|
+
return CourseCatalogToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
export function CourseCatalogToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'id': value['id'],
|
|
48
|
+
'name': value['name'],
|
|
49
|
+
'description': value['description'],
|
|
50
|
+
};
|
|
51
|
+
}
|