@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,348 @@
|
|
|
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 { CourseCatalogFromJSON, GetCourseFromJSON, PostCourseCatalogToJSON, PutCourseCatalogToJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class CourseCatalogApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for addCourseToCatalog without sending the request
|
|
31
|
+
*/
|
|
32
|
+
addCourseToCatalogRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['catalogId'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('catalogId', 'Required parameter "catalogId" was null or undefined when calling addCourseToCatalog().');
|
|
36
|
+
}
|
|
37
|
+
if (requestParameters['courseId'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling addCourseToCatalog().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
let urlPath = `/catalogs/{catalogId}/courses/{courseId}`;
|
|
43
|
+
urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
|
|
44
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
45
|
+
return {
|
|
46
|
+
path: urlPath,
|
|
47
|
+
method: 'POST',
|
|
48
|
+
headers: headerParameters,
|
|
49
|
+
query: queryParameters,
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Add a course to a catalog
|
|
55
|
+
*/
|
|
56
|
+
addCourseToCatalogRaw(requestParameters, initOverrides) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const requestOptions = yield this.addCourseToCatalogRequestOpts(requestParameters);
|
|
59
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
60
|
+
return new runtime.VoidApiResponse(response);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Add a course to a catalog
|
|
65
|
+
*/
|
|
66
|
+
addCourseToCatalog(requestParameters, initOverrides) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
yield this.addCourseToCatalogRaw(requestParameters, initOverrides);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Creates request options for deleteCourseCatalog without sending the request
|
|
73
|
+
*/
|
|
74
|
+
deleteCourseCatalogRequestOpts(requestParameters) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (requestParameters['catalogId'] == null) {
|
|
77
|
+
throw new runtime.RequiredError('catalogId', 'Required parameter "catalogId" was null or undefined when calling deleteCourseCatalog().');
|
|
78
|
+
}
|
|
79
|
+
const queryParameters = {};
|
|
80
|
+
const headerParameters = {};
|
|
81
|
+
let urlPath = `/catalogs/{catalogId}`;
|
|
82
|
+
urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
|
|
83
|
+
return {
|
|
84
|
+
path: urlPath,
|
|
85
|
+
method: 'DELETE',
|
|
86
|
+
headers: headerParameters,
|
|
87
|
+
query: queryParameters,
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Delete a catalog
|
|
93
|
+
*/
|
|
94
|
+
deleteCourseCatalogRaw(requestParameters, initOverrides) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
const requestOptions = yield this.deleteCourseCatalogRequestOpts(requestParameters);
|
|
97
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
98
|
+
return new runtime.VoidApiResponse(response);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Delete a catalog
|
|
103
|
+
*/
|
|
104
|
+
deleteCourseCatalog(requestParameters, initOverrides) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
yield this.deleteCourseCatalogRaw(requestParameters, initOverrides);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Creates request options for getCatalogCourses without sending the request
|
|
111
|
+
*/
|
|
112
|
+
getCatalogCoursesRequestOpts(requestParameters) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
if (requestParameters['catalogId'] == null) {
|
|
115
|
+
throw new runtime.RequiredError('catalogId', 'Required parameter "catalogId" was null or undefined when calling getCatalogCourses().');
|
|
116
|
+
}
|
|
117
|
+
const queryParameters = {};
|
|
118
|
+
const headerParameters = {};
|
|
119
|
+
let urlPath = `/catalogs/{catalogId}/courses`;
|
|
120
|
+
urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
|
|
121
|
+
return {
|
|
122
|
+
path: urlPath,
|
|
123
|
+
method: 'GET',
|
|
124
|
+
headers: headerParameters,
|
|
125
|
+
query: queryParameters,
|
|
126
|
+
};
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* List the courses in a catalog
|
|
131
|
+
*/
|
|
132
|
+
getCatalogCoursesRaw(requestParameters, initOverrides) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
const requestOptions = yield this.getCatalogCoursesRequestOpts(requestParameters);
|
|
135
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
136
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GetCourseFromJSON));
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* List the courses in a catalog
|
|
141
|
+
*/
|
|
142
|
+
getCatalogCourses(requestParameters, initOverrides) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
const response = yield this.getCatalogCoursesRaw(requestParameters, initOverrides);
|
|
145
|
+
return yield response.value();
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Creates request options for getCourseCatalog without sending the request
|
|
150
|
+
*/
|
|
151
|
+
getCourseCatalogRequestOpts(requestParameters) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
if (requestParameters['catalogId'] == null) {
|
|
154
|
+
throw new runtime.RequiredError('catalogId', 'Required parameter "catalogId" was null or undefined when calling getCourseCatalog().');
|
|
155
|
+
}
|
|
156
|
+
const queryParameters = {};
|
|
157
|
+
const headerParameters = {};
|
|
158
|
+
let urlPath = `/catalogs/{catalogId}`;
|
|
159
|
+
urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
|
|
160
|
+
return {
|
|
161
|
+
path: urlPath,
|
|
162
|
+
method: 'GET',
|
|
163
|
+
headers: headerParameters,
|
|
164
|
+
query: queryParameters,
|
|
165
|
+
};
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get a catalog
|
|
170
|
+
*/
|
|
171
|
+
getCourseCatalogRaw(requestParameters, initOverrides) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
const requestOptions = yield this.getCourseCatalogRequestOpts(requestParameters);
|
|
174
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
175
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CourseCatalogFromJSON(jsonValue));
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Get a catalog
|
|
180
|
+
*/
|
|
181
|
+
getCourseCatalog(requestParameters, initOverrides) {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
+
const response = yield this.getCourseCatalogRaw(requestParameters, initOverrides);
|
|
184
|
+
return yield response.value();
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Creates request options for getCourseCatalogs without sending the request
|
|
189
|
+
*/
|
|
190
|
+
getCourseCatalogsRequestOpts() {
|
|
191
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
+
const queryParameters = {};
|
|
193
|
+
const headerParameters = {};
|
|
194
|
+
let urlPath = `/catalogs`;
|
|
195
|
+
return {
|
|
196
|
+
path: urlPath,
|
|
197
|
+
method: 'GET',
|
|
198
|
+
headers: headerParameters,
|
|
199
|
+
query: queryParameters,
|
|
200
|
+
};
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* List catalogs in the current portal
|
|
205
|
+
*/
|
|
206
|
+
getCourseCatalogsRaw(initOverrides) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
const requestOptions = yield this.getCourseCatalogsRequestOpts();
|
|
209
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
210
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseCatalogFromJSON));
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* List catalogs in the current portal
|
|
215
|
+
*/
|
|
216
|
+
getCourseCatalogs(initOverrides) {
|
|
217
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
218
|
+
const response = yield this.getCourseCatalogsRaw(initOverrides);
|
|
219
|
+
return yield response.value();
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Creates request options for postCourseCatalog without sending the request
|
|
224
|
+
*/
|
|
225
|
+
postCourseCatalogRequestOpts(requestParameters) {
|
|
226
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
227
|
+
if (requestParameters['postCourseCatalog'] == null) {
|
|
228
|
+
throw new runtime.RequiredError('postCourseCatalog', 'Required parameter "postCourseCatalog" was null or undefined when calling postCourseCatalog().');
|
|
229
|
+
}
|
|
230
|
+
const queryParameters = {};
|
|
231
|
+
const headerParameters = {};
|
|
232
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
233
|
+
let urlPath = `/catalogs`;
|
|
234
|
+
return {
|
|
235
|
+
path: urlPath,
|
|
236
|
+
method: 'POST',
|
|
237
|
+
headers: headerParameters,
|
|
238
|
+
query: queryParameters,
|
|
239
|
+
body: PostCourseCatalogToJSON(requestParameters['postCourseCatalog']),
|
|
240
|
+
};
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Create a course catalog
|
|
245
|
+
*/
|
|
246
|
+
postCourseCatalogRaw(requestParameters, initOverrides) {
|
|
247
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
+
const requestOptions = yield this.postCourseCatalogRequestOpts(requestParameters);
|
|
249
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
250
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CourseCatalogFromJSON(jsonValue));
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Create a course catalog
|
|
255
|
+
*/
|
|
256
|
+
postCourseCatalog(requestParameters, initOverrides) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
const response = yield this.postCourseCatalogRaw(requestParameters, initOverrides);
|
|
259
|
+
return yield response.value();
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Creates request options for putCourseCatalog without sending the request
|
|
264
|
+
*/
|
|
265
|
+
putCourseCatalogRequestOpts(requestParameters) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
267
|
+
if (requestParameters['catalogId'] == null) {
|
|
268
|
+
throw new runtime.RequiredError('catalogId', 'Required parameter "catalogId" was null or undefined when calling putCourseCatalog().');
|
|
269
|
+
}
|
|
270
|
+
if (requestParameters['putCourseCatalog'] == null) {
|
|
271
|
+
throw new runtime.RequiredError('putCourseCatalog', 'Required parameter "putCourseCatalog" was null or undefined when calling putCourseCatalog().');
|
|
272
|
+
}
|
|
273
|
+
const queryParameters = {};
|
|
274
|
+
const headerParameters = {};
|
|
275
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
276
|
+
let urlPath = `/catalogs/{catalogId}`;
|
|
277
|
+
urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
|
|
278
|
+
return {
|
|
279
|
+
path: urlPath,
|
|
280
|
+
method: 'PUT',
|
|
281
|
+
headers: headerParameters,
|
|
282
|
+
query: queryParameters,
|
|
283
|
+
body: PutCourseCatalogToJSON(requestParameters['putCourseCatalog']),
|
|
284
|
+
};
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Update a catalog
|
|
289
|
+
*/
|
|
290
|
+
putCourseCatalogRaw(requestParameters, initOverrides) {
|
|
291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
+
const requestOptions = yield this.putCourseCatalogRequestOpts(requestParameters);
|
|
293
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
294
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CourseCatalogFromJSON(jsonValue));
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Update a catalog
|
|
299
|
+
*/
|
|
300
|
+
putCourseCatalog(requestParameters, initOverrides) {
|
|
301
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
302
|
+
const response = yield this.putCourseCatalogRaw(requestParameters, initOverrides);
|
|
303
|
+
return yield response.value();
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Creates request options for removeCourseFromCatalog without sending the request
|
|
308
|
+
*/
|
|
309
|
+
removeCourseFromCatalogRequestOpts(requestParameters) {
|
|
310
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
311
|
+
if (requestParameters['catalogId'] == null) {
|
|
312
|
+
throw new runtime.RequiredError('catalogId', 'Required parameter "catalogId" was null or undefined when calling removeCourseFromCatalog().');
|
|
313
|
+
}
|
|
314
|
+
if (requestParameters['courseId'] == null) {
|
|
315
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling removeCourseFromCatalog().');
|
|
316
|
+
}
|
|
317
|
+
const queryParameters = {};
|
|
318
|
+
const headerParameters = {};
|
|
319
|
+
let urlPath = `/catalogs/{catalogId}/courses/{courseId}`;
|
|
320
|
+
urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
|
|
321
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
322
|
+
return {
|
|
323
|
+
path: urlPath,
|
|
324
|
+
method: 'DELETE',
|
|
325
|
+
headers: headerParameters,
|
|
326
|
+
query: queryParameters,
|
|
327
|
+
};
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Remove a course from a catalog
|
|
332
|
+
*/
|
|
333
|
+
removeCourseFromCatalogRaw(requestParameters, initOverrides) {
|
|
334
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
335
|
+
const requestOptions = yield this.removeCourseFromCatalogRequestOpts(requestParameters);
|
|
336
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
337
|
+
return new runtime.VoidApiResponse(response);
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Remove a course from a catalog
|
|
342
|
+
*/
|
|
343
|
+
removeCourseFromCatalog(requestParameters, initOverrides) {
|
|
344
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
345
|
+
yield this.removeCourseFromCatalogRaw(requestParameters, initOverrides);
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
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 { CourseShare, PostOfferCatalog, PostOfferCatalogResponse, PostOfferCourse, PostOfferCourseResponse } from '../models/index';
|
|
14
|
+
export interface DeleteCourseShareRequest {
|
|
15
|
+
shareId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface PostOfferCatalogRequest {
|
|
18
|
+
catalogId: string;
|
|
19
|
+
postOfferCatalog: PostOfferCatalog;
|
|
20
|
+
}
|
|
21
|
+
export interface PostOfferCourseRequest {
|
|
22
|
+
courseId: string;
|
|
23
|
+
postOfferCourse: PostOfferCourse;
|
|
24
|
+
}
|
|
25
|
+
export interface PostUnrevokeShareRequest {
|
|
26
|
+
shareId: string;
|
|
27
|
+
}
|
|
28
|
+
export interface PutAcceptCloneRequest {
|
|
29
|
+
shareId: string;
|
|
30
|
+
}
|
|
31
|
+
export interface PutAcceptMirrorRequest {
|
|
32
|
+
shareId: string;
|
|
33
|
+
}
|
|
34
|
+
export interface PutDeclineShareRequest {
|
|
35
|
+
shareId: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
export declare class CourseShareApi extends runtime.BaseAPI {
|
|
41
|
+
/**
|
|
42
|
+
* Creates request options for deleteCourseShare without sending the request
|
|
43
|
+
*/
|
|
44
|
+
deleteCourseShareRequestOpts(requestParameters: DeleteCourseShareRequest): Promise<runtime.RequestOpts>;
|
|
45
|
+
/**
|
|
46
|
+
* Cascades to any downstream re-shares and archives enrollments in the target portal. Use `POST /course-shares/{shareId}/unrevoke` to restore.
|
|
47
|
+
* Revoke a share
|
|
48
|
+
*/
|
|
49
|
+
deleteCourseShareRaw(requestParameters: DeleteCourseShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
50
|
+
/**
|
|
51
|
+
* Cascades to any downstream re-shares and archives enrollments in the target portal. Use `POST /course-shares/{shareId}/unrevoke` to restore.
|
|
52
|
+
* Revoke a share
|
|
53
|
+
*/
|
|
54
|
+
deleteCourseShare(requestParameters: DeleteCourseShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Creates request options for getCourseSharesOfferedByMe without sending the request
|
|
57
|
+
*/
|
|
58
|
+
getCourseSharesOfferedByMeRequestOpts(): Promise<runtime.RequestOpts>;
|
|
59
|
+
/**
|
|
60
|
+
* List shares the current portal has offered out
|
|
61
|
+
*/
|
|
62
|
+
getCourseSharesOfferedByMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>>;
|
|
63
|
+
/**
|
|
64
|
+
* List shares the current portal has offered out
|
|
65
|
+
*/
|
|
66
|
+
getCourseSharesOfferedByMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>>;
|
|
67
|
+
/**
|
|
68
|
+
* Creates request options for getCourseSharesOfferedToMe without sending the request
|
|
69
|
+
*/
|
|
70
|
+
getCourseSharesOfferedToMeRequestOpts(): Promise<runtime.RequestOpts>;
|
|
71
|
+
/**
|
|
72
|
+
* List shares offered to the current portal
|
|
73
|
+
*/
|
|
74
|
+
getCourseSharesOfferedToMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>>;
|
|
75
|
+
/**
|
|
76
|
+
* List shares offered to the current portal
|
|
77
|
+
*/
|
|
78
|
+
getCourseSharesOfferedToMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>>;
|
|
79
|
+
/**
|
|
80
|
+
* Creates request options for postOfferCatalog without sending the request
|
|
81
|
+
*/
|
|
82
|
+
postOfferCatalogRequestOpts(requestParameters: PostOfferCatalogRequest): Promise<runtime.RequestOpts>;
|
|
83
|
+
/**
|
|
84
|
+
* 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`.
|
|
85
|
+
* Offer every course in a catalog to a descendant portal
|
|
86
|
+
*/
|
|
87
|
+
postOfferCatalogRaw(requestParameters: PostOfferCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostOfferCatalogResponse>>;
|
|
88
|
+
/**
|
|
89
|
+
* 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`.
|
|
90
|
+
* Offer every course in a catalog to a descendant portal
|
|
91
|
+
*/
|
|
92
|
+
postOfferCatalog(requestParameters: PostOfferCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostOfferCatalogResponse>;
|
|
93
|
+
/**
|
|
94
|
+
* Creates request options for postOfferCourse without sending the request
|
|
95
|
+
*/
|
|
96
|
+
postOfferCourseRequestOpts(requestParameters: PostOfferCourseRequest): Promise<runtime.RequestOpts>;
|
|
97
|
+
/**
|
|
98
|
+
* Offer a single course to a descendant portal
|
|
99
|
+
*/
|
|
100
|
+
postOfferCourseRaw(requestParameters: PostOfferCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostOfferCourseResponse>>;
|
|
101
|
+
/**
|
|
102
|
+
* Offer a single course to a descendant portal
|
|
103
|
+
*/
|
|
104
|
+
postOfferCourse(requestParameters: PostOfferCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostOfferCourseResponse>;
|
|
105
|
+
/**
|
|
106
|
+
* Creates request options for postUnrevokeShare without sending the request
|
|
107
|
+
*/
|
|
108
|
+
postUnrevokeShareRequestOpts(requestParameters: PostUnrevokeShareRequest): Promise<runtime.RequestOpts>;
|
|
109
|
+
/**
|
|
110
|
+
* Restore a previously revoked share
|
|
111
|
+
*/
|
|
112
|
+
postUnrevokeShareRaw(requestParameters: PostUnrevokeShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
113
|
+
/**
|
|
114
|
+
* Restore a previously revoked share
|
|
115
|
+
*/
|
|
116
|
+
postUnrevokeShare(requestParameters: PostUnrevokeShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Creates request options for putAcceptClone without sending the request
|
|
119
|
+
*/
|
|
120
|
+
putAcceptCloneRequestOpts(requestParameters: PutAcceptCloneRequest): Promise<runtime.RequestOpts>;
|
|
121
|
+
/**
|
|
122
|
+
* Accept an offer as a clone (deep copy into your portal)
|
|
123
|
+
*/
|
|
124
|
+
putAcceptCloneRaw(requestParameters: PutAcceptCloneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
125
|
+
/**
|
|
126
|
+
* Accept an offer as a clone (deep copy into your portal)
|
|
127
|
+
*/
|
|
128
|
+
putAcceptClone(requestParameters: PutAcceptCloneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* Creates request options for putAcceptMirror without sending the request
|
|
131
|
+
*/
|
|
132
|
+
putAcceptMirrorRequestOpts(requestParameters: PutAcceptMirrorRequest): Promise<runtime.RequestOpts>;
|
|
133
|
+
/**
|
|
134
|
+
* Accept an offer as a mirror (no copy, live link to source)
|
|
135
|
+
*/
|
|
136
|
+
putAcceptMirrorRaw(requestParameters: PutAcceptMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
137
|
+
/**
|
|
138
|
+
* Accept an offer as a mirror (no copy, live link to source)
|
|
139
|
+
*/
|
|
140
|
+
putAcceptMirror(requestParameters: PutAcceptMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
141
|
+
/**
|
|
142
|
+
* Creates request options for putDeclineShare without sending the request
|
|
143
|
+
*/
|
|
144
|
+
putDeclineShareRequestOpts(requestParameters: PutDeclineShareRequest): Promise<runtime.RequestOpts>;
|
|
145
|
+
/**
|
|
146
|
+
* Decline an offer
|
|
147
|
+
*/
|
|
148
|
+
putDeclineShareRaw(requestParameters: PutDeclineShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
149
|
+
/**
|
|
150
|
+
* Decline an offer
|
|
151
|
+
*/
|
|
152
|
+
putDeclineShare(requestParameters: PutDeclineShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
153
|
+
}
|