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