@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.
Files changed (91) hide show
  1. package/.openapi-generator/FILES +26 -0
  2. package/README.md +30 -2
  3. package/dist/apis/CourseCatalogApi.d.ts +138 -0
  4. package/dist/apis/CourseCatalogApi.js +352 -0
  5. package/dist/apis/CourseShareApi.d.ts +153 -0
  6. package/dist/apis/CourseShareApi.js +385 -0
  7. package/dist/apis/PortalSublicenseApi.d.ts +36 -0
  8. package/dist/apis/PortalSublicenseApi.js +79 -0
  9. package/dist/apis/index.d.ts +3 -0
  10. package/dist/apis/index.js +3 -0
  11. package/dist/esm/apis/CourseCatalogApi.d.ts +138 -0
  12. package/dist/esm/apis/CourseCatalogApi.js +348 -0
  13. package/dist/esm/apis/CourseShareApi.d.ts +153 -0
  14. package/dist/esm/apis/CourseShareApi.js +381 -0
  15. package/dist/esm/apis/PortalSublicenseApi.d.ts +36 -0
  16. package/dist/esm/apis/PortalSublicenseApi.js +75 -0
  17. package/dist/esm/apis/index.d.ts +3 -0
  18. package/dist/esm/apis/index.js +3 -0
  19. package/dist/esm/models/CourseCatalog.d.ts +44 -0
  20. package/dist/esm/models/CourseCatalog.js +51 -0
  21. package/dist/esm/models/CourseShare.d.ts +88 -0
  22. package/dist/esm/models/CourseShare.js +85 -0
  23. package/dist/esm/models/PortalSublicense.d.ts +65 -0
  24. package/dist/esm/models/PortalSublicense.js +61 -0
  25. package/dist/esm/models/PostCourseCatalog.d.ts +38 -0
  26. package/dist/esm/models/PostCourseCatalog.js +45 -0
  27. package/dist/esm/models/PostOfferCatalog.d.ts +59 -0
  28. package/dist/esm/models/PostOfferCatalog.js +59 -0
  29. package/dist/esm/models/PostOfferCatalogResponse.d.ts +32 -0
  30. package/dist/esm/models/PostOfferCatalogResponse.js +43 -0
  31. package/dist/esm/models/PostOfferCourse.d.ts +59 -0
  32. package/dist/esm/models/PostOfferCourse.js +59 -0
  33. package/dist/esm/models/PostOfferCourseResponse.d.ts +49 -0
  34. package/dist/esm/models/PostOfferCourseResponse.js +57 -0
  35. package/dist/esm/models/PutCourseCatalog.d.ts +38 -0
  36. package/dist/esm/models/PutCourseCatalog.js +43 -0
  37. package/dist/esm/models/PutPortalSublicense.d.ts +46 -0
  38. package/dist/esm/models/PutPortalSublicense.js +45 -0
  39. package/dist/esm/models/index.d.ts +10 -0
  40. package/dist/esm/models/index.js +10 -0
  41. package/dist/models/CourseCatalog.d.ts +44 -0
  42. package/dist/models/CourseCatalog.js +58 -0
  43. package/dist/models/CourseShare.d.ts +88 -0
  44. package/dist/models/CourseShare.js +93 -0
  45. package/dist/models/PortalSublicense.d.ts +65 -0
  46. package/dist/models/PortalSublicense.js +69 -0
  47. package/dist/models/PostCourseCatalog.d.ts +38 -0
  48. package/dist/models/PostCourseCatalog.js +52 -0
  49. package/dist/models/PostOfferCatalog.d.ts +59 -0
  50. package/dist/models/PostOfferCatalog.js +67 -0
  51. package/dist/models/PostOfferCatalogResponse.d.ts +32 -0
  52. package/dist/models/PostOfferCatalogResponse.js +50 -0
  53. package/dist/models/PostOfferCourse.d.ts +59 -0
  54. package/dist/models/PostOfferCourse.js +67 -0
  55. package/dist/models/PostOfferCourseResponse.d.ts +49 -0
  56. package/dist/models/PostOfferCourseResponse.js +65 -0
  57. package/dist/models/PutCourseCatalog.d.ts +38 -0
  58. package/dist/models/PutCourseCatalog.js +50 -0
  59. package/dist/models/PutPortalSublicense.d.ts +46 -0
  60. package/dist/models/PutPortalSublicense.js +52 -0
  61. package/dist/models/index.d.ts +10 -0
  62. package/dist/models/index.js +10 -0
  63. package/docs/CourseCatalog.md +38 -0
  64. package/docs/CourseCatalogApi.md +544 -0
  65. package/docs/CourseShare.md +46 -0
  66. package/docs/CourseShareApi.md +609 -0
  67. package/docs/PortalSublicense.md +42 -0
  68. package/docs/PortalSublicenseApi.md +81 -0
  69. package/docs/PostCourseCatalog.md +36 -0
  70. package/docs/PostOfferCatalog.md +40 -0
  71. package/docs/PostOfferCatalogResponse.md +34 -0
  72. package/docs/PostOfferCourse.md +40 -0
  73. package/docs/PostOfferCourseResponse.md +36 -0
  74. package/docs/PutCourseCatalog.md +36 -0
  75. package/docs/PutPortalSublicense.md +39 -0
  76. package/package.json +1 -1
  77. package/src/apis/CourseCatalogApi.ts +447 -0
  78. package/src/apis/CourseShareApi.ts +480 -0
  79. package/src/apis/PortalSublicenseApi.ts +95 -0
  80. package/src/apis/index.ts +3 -0
  81. package/src/models/CourseCatalog.ts +84 -0
  82. package/src/models/CourseShare.ts +144 -0
  83. package/src/models/PortalSublicense.ts +111 -0
  84. package/src/models/PostCourseCatalog.ts +74 -0
  85. package/src/models/PostOfferCatalog.ts +103 -0
  86. package/src/models/PostOfferCatalogResponse.ts +66 -0
  87. package/src/models/PostOfferCourse.ts +103 -0
  88. package/src/models/PostOfferCourseResponse.ts +89 -0
  89. package/src/models/PutCourseCatalog.ts +73 -0
  90. package/src/models/PutPortalSublicense.ts +83 -0
  91. package/src/models/index.ts +10 -0
@@ -0,0 +1,447 @@
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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ CourseCatalog,
19
+ GetCourse,
20
+ PostCourseCatalog,
21
+ PutCourseCatalog,
22
+ } from '../models/index';
23
+ import {
24
+ CourseCatalogFromJSON,
25
+ CourseCatalogToJSON,
26
+ GetCourseFromJSON,
27
+ GetCourseToJSON,
28
+ PostCourseCatalogFromJSON,
29
+ PostCourseCatalogToJSON,
30
+ PutCourseCatalogFromJSON,
31
+ PutCourseCatalogToJSON,
32
+ } from '../models/index';
33
+
34
+ export interface AddCourseToCatalogRequest {
35
+ catalogId: string;
36
+ courseId: string;
37
+ }
38
+
39
+ export interface DeleteCourseCatalogRequest {
40
+ catalogId: string;
41
+ }
42
+
43
+ export interface GetCatalogCoursesRequest {
44
+ catalogId: string;
45
+ }
46
+
47
+ export interface GetCourseCatalogRequest {
48
+ catalogId: string;
49
+ }
50
+
51
+ export interface PostCourseCatalogRequest {
52
+ postCourseCatalog: PostCourseCatalog;
53
+ }
54
+
55
+ export interface PutCourseCatalogRequest {
56
+ catalogId: string;
57
+ putCourseCatalog: PutCourseCatalog;
58
+ }
59
+
60
+ export interface RemoveCourseFromCatalogRequest {
61
+ catalogId: string;
62
+ courseId: string;
63
+ }
64
+
65
+ /**
66
+ *
67
+ */
68
+ export class CourseCatalogApi extends runtime.BaseAPI {
69
+
70
+ /**
71
+ * Creates request options for addCourseToCatalog without sending the request
72
+ */
73
+ async addCourseToCatalogRequestOpts(requestParameters: AddCourseToCatalogRequest): Promise<runtime.RequestOpts> {
74
+ if (requestParameters['catalogId'] == null) {
75
+ throw new runtime.RequiredError(
76
+ 'catalogId',
77
+ 'Required parameter "catalogId" was null or undefined when calling addCourseToCatalog().'
78
+ );
79
+ }
80
+
81
+ if (requestParameters['courseId'] == null) {
82
+ throw new runtime.RequiredError(
83
+ 'courseId',
84
+ 'Required parameter "courseId" was null or undefined when calling addCourseToCatalog().'
85
+ );
86
+ }
87
+
88
+ const queryParameters: any = {};
89
+
90
+ const headerParameters: runtime.HTTPHeaders = {};
91
+
92
+
93
+ let urlPath = `/catalogs/{catalogId}/courses/{courseId}`;
94
+ urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
95
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
96
+
97
+ return {
98
+ path: urlPath,
99
+ method: 'POST',
100
+ headers: headerParameters,
101
+ query: queryParameters,
102
+ };
103
+ }
104
+
105
+ /**
106
+ * Add a course to a catalog
107
+ */
108
+ async addCourseToCatalogRaw(requestParameters: AddCourseToCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
109
+ const requestOptions = await this.addCourseToCatalogRequestOpts(requestParameters);
110
+ const response = await this.request(requestOptions, initOverrides);
111
+
112
+ return new runtime.VoidApiResponse(response);
113
+ }
114
+
115
+ /**
116
+ * Add a course to a catalog
117
+ */
118
+ async addCourseToCatalog(requestParameters: AddCourseToCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
119
+ await this.addCourseToCatalogRaw(requestParameters, initOverrides);
120
+ }
121
+
122
+ /**
123
+ * Creates request options for deleteCourseCatalog without sending the request
124
+ */
125
+ async deleteCourseCatalogRequestOpts(requestParameters: DeleteCourseCatalogRequest): Promise<runtime.RequestOpts> {
126
+ if (requestParameters['catalogId'] == null) {
127
+ throw new runtime.RequiredError(
128
+ 'catalogId',
129
+ 'Required parameter "catalogId" was null or undefined when calling deleteCourseCatalog().'
130
+ );
131
+ }
132
+
133
+ const queryParameters: any = {};
134
+
135
+ const headerParameters: runtime.HTTPHeaders = {};
136
+
137
+
138
+ let urlPath = `/catalogs/{catalogId}`;
139
+ urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
140
+
141
+ return {
142
+ path: urlPath,
143
+ method: 'DELETE',
144
+ headers: headerParameters,
145
+ query: queryParameters,
146
+ };
147
+ }
148
+
149
+ /**
150
+ * Delete a catalog
151
+ */
152
+ async deleteCourseCatalogRaw(requestParameters: DeleteCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
153
+ const requestOptions = await this.deleteCourseCatalogRequestOpts(requestParameters);
154
+ const response = await this.request(requestOptions, initOverrides);
155
+
156
+ return new runtime.VoidApiResponse(response);
157
+ }
158
+
159
+ /**
160
+ * Delete a catalog
161
+ */
162
+ async deleteCourseCatalog(requestParameters: DeleteCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
163
+ await this.deleteCourseCatalogRaw(requestParameters, initOverrides);
164
+ }
165
+
166
+ /**
167
+ * Creates request options for getCatalogCourses without sending the request
168
+ */
169
+ async getCatalogCoursesRequestOpts(requestParameters: GetCatalogCoursesRequest): Promise<runtime.RequestOpts> {
170
+ if (requestParameters['catalogId'] == null) {
171
+ throw new runtime.RequiredError(
172
+ 'catalogId',
173
+ 'Required parameter "catalogId" was null or undefined when calling getCatalogCourses().'
174
+ );
175
+ }
176
+
177
+ const queryParameters: any = {};
178
+
179
+ const headerParameters: runtime.HTTPHeaders = {};
180
+
181
+
182
+ let urlPath = `/catalogs/{catalogId}/courses`;
183
+ urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
184
+
185
+ return {
186
+ path: urlPath,
187
+ method: 'GET',
188
+ headers: headerParameters,
189
+ query: queryParameters,
190
+ };
191
+ }
192
+
193
+ /**
194
+ * List the courses in a catalog
195
+ */
196
+ async getCatalogCoursesRaw(requestParameters: GetCatalogCoursesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetCourse>>> {
197
+ const requestOptions = await this.getCatalogCoursesRequestOpts(requestParameters);
198
+ const response = await this.request(requestOptions, initOverrides);
199
+
200
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GetCourseFromJSON));
201
+ }
202
+
203
+ /**
204
+ * List the courses in a catalog
205
+ */
206
+ async getCatalogCourses(requestParameters: GetCatalogCoursesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetCourse>> {
207
+ const response = await this.getCatalogCoursesRaw(requestParameters, initOverrides);
208
+ return await response.value();
209
+ }
210
+
211
+ /**
212
+ * Creates request options for getCourseCatalog without sending the request
213
+ */
214
+ async getCourseCatalogRequestOpts(requestParameters: GetCourseCatalogRequest): Promise<runtime.RequestOpts> {
215
+ if (requestParameters['catalogId'] == null) {
216
+ throw new runtime.RequiredError(
217
+ 'catalogId',
218
+ 'Required parameter "catalogId" was null or undefined when calling getCourseCatalog().'
219
+ );
220
+ }
221
+
222
+ const queryParameters: any = {};
223
+
224
+ const headerParameters: runtime.HTTPHeaders = {};
225
+
226
+
227
+ let urlPath = `/catalogs/{catalogId}`;
228
+ urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
229
+
230
+ return {
231
+ path: urlPath,
232
+ method: 'GET',
233
+ headers: headerParameters,
234
+ query: queryParameters,
235
+ };
236
+ }
237
+
238
+ /**
239
+ * Get a catalog
240
+ */
241
+ async getCourseCatalogRaw(requestParameters: GetCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CourseCatalog>> {
242
+ const requestOptions = await this.getCourseCatalogRequestOpts(requestParameters);
243
+ const response = await this.request(requestOptions, initOverrides);
244
+
245
+ return new runtime.JSONApiResponse(response, (jsonValue) => CourseCatalogFromJSON(jsonValue));
246
+ }
247
+
248
+ /**
249
+ * Get a catalog
250
+ */
251
+ async getCourseCatalog(requestParameters: GetCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CourseCatalog> {
252
+ const response = await this.getCourseCatalogRaw(requestParameters, initOverrides);
253
+ return await response.value();
254
+ }
255
+
256
+ /**
257
+ * Creates request options for getCourseCatalogs without sending the request
258
+ */
259
+ async getCourseCatalogsRequestOpts(): Promise<runtime.RequestOpts> {
260
+ const queryParameters: any = {};
261
+
262
+ const headerParameters: runtime.HTTPHeaders = {};
263
+
264
+
265
+ let urlPath = `/catalogs`;
266
+
267
+ return {
268
+ path: urlPath,
269
+ method: 'GET',
270
+ headers: headerParameters,
271
+ query: queryParameters,
272
+ };
273
+ }
274
+
275
+ /**
276
+ * List catalogs in the current portal
277
+ */
278
+ async getCourseCatalogsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseCatalog>>> {
279
+ const requestOptions = await this.getCourseCatalogsRequestOpts();
280
+ const response = await this.request(requestOptions, initOverrides);
281
+
282
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseCatalogFromJSON));
283
+ }
284
+
285
+ /**
286
+ * List catalogs in the current portal
287
+ */
288
+ async getCourseCatalogs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseCatalog>> {
289
+ const response = await this.getCourseCatalogsRaw(initOverrides);
290
+ return await response.value();
291
+ }
292
+
293
+ /**
294
+ * Creates request options for postCourseCatalog without sending the request
295
+ */
296
+ async postCourseCatalogRequestOpts(requestParameters: PostCourseCatalogRequest): Promise<runtime.RequestOpts> {
297
+ if (requestParameters['postCourseCatalog'] == null) {
298
+ throw new runtime.RequiredError(
299
+ 'postCourseCatalog',
300
+ 'Required parameter "postCourseCatalog" was null or undefined when calling postCourseCatalog().'
301
+ );
302
+ }
303
+
304
+ const queryParameters: any = {};
305
+
306
+ const headerParameters: runtime.HTTPHeaders = {};
307
+
308
+ headerParameters['Content-Type'] = 'application/json';
309
+
310
+
311
+ let urlPath = `/catalogs`;
312
+
313
+ return {
314
+ path: urlPath,
315
+ method: 'POST',
316
+ headers: headerParameters,
317
+ query: queryParameters,
318
+ body: PostCourseCatalogToJSON(requestParameters['postCourseCatalog']),
319
+ };
320
+ }
321
+
322
+ /**
323
+ * Create a course catalog
324
+ */
325
+ async postCourseCatalogRaw(requestParameters: PostCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CourseCatalog>> {
326
+ const requestOptions = await this.postCourseCatalogRequestOpts(requestParameters);
327
+ const response = await this.request(requestOptions, initOverrides);
328
+
329
+ return new runtime.JSONApiResponse(response, (jsonValue) => CourseCatalogFromJSON(jsonValue));
330
+ }
331
+
332
+ /**
333
+ * Create a course catalog
334
+ */
335
+ async postCourseCatalog(requestParameters: PostCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CourseCatalog> {
336
+ const response = await this.postCourseCatalogRaw(requestParameters, initOverrides);
337
+ return await response.value();
338
+ }
339
+
340
+ /**
341
+ * Creates request options for putCourseCatalog without sending the request
342
+ */
343
+ async putCourseCatalogRequestOpts(requestParameters: PutCourseCatalogRequest): Promise<runtime.RequestOpts> {
344
+ if (requestParameters['catalogId'] == null) {
345
+ throw new runtime.RequiredError(
346
+ 'catalogId',
347
+ 'Required parameter "catalogId" was null or undefined when calling putCourseCatalog().'
348
+ );
349
+ }
350
+
351
+ if (requestParameters['putCourseCatalog'] == null) {
352
+ throw new runtime.RequiredError(
353
+ 'putCourseCatalog',
354
+ 'Required parameter "putCourseCatalog" was null or undefined when calling putCourseCatalog().'
355
+ );
356
+ }
357
+
358
+ const queryParameters: any = {};
359
+
360
+ const headerParameters: runtime.HTTPHeaders = {};
361
+
362
+ headerParameters['Content-Type'] = 'application/json';
363
+
364
+
365
+ let urlPath = `/catalogs/{catalogId}`;
366
+ urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
367
+
368
+ return {
369
+ path: urlPath,
370
+ method: 'PUT',
371
+ headers: headerParameters,
372
+ query: queryParameters,
373
+ body: PutCourseCatalogToJSON(requestParameters['putCourseCatalog']),
374
+ };
375
+ }
376
+
377
+ /**
378
+ * Update a catalog
379
+ */
380
+ async putCourseCatalogRaw(requestParameters: PutCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CourseCatalog>> {
381
+ const requestOptions = await this.putCourseCatalogRequestOpts(requestParameters);
382
+ const response = await this.request(requestOptions, initOverrides);
383
+
384
+ return new runtime.JSONApiResponse(response, (jsonValue) => CourseCatalogFromJSON(jsonValue));
385
+ }
386
+
387
+ /**
388
+ * Update a catalog
389
+ */
390
+ async putCourseCatalog(requestParameters: PutCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CourseCatalog> {
391
+ const response = await this.putCourseCatalogRaw(requestParameters, initOverrides);
392
+ return await response.value();
393
+ }
394
+
395
+ /**
396
+ * Creates request options for removeCourseFromCatalog without sending the request
397
+ */
398
+ async removeCourseFromCatalogRequestOpts(requestParameters: RemoveCourseFromCatalogRequest): Promise<runtime.RequestOpts> {
399
+ if (requestParameters['catalogId'] == null) {
400
+ throw new runtime.RequiredError(
401
+ 'catalogId',
402
+ 'Required parameter "catalogId" was null or undefined when calling removeCourseFromCatalog().'
403
+ );
404
+ }
405
+
406
+ if (requestParameters['courseId'] == null) {
407
+ throw new runtime.RequiredError(
408
+ 'courseId',
409
+ 'Required parameter "courseId" was null or undefined when calling removeCourseFromCatalog().'
410
+ );
411
+ }
412
+
413
+ const queryParameters: any = {};
414
+
415
+ const headerParameters: runtime.HTTPHeaders = {};
416
+
417
+
418
+ let urlPath = `/catalogs/{catalogId}/courses/{courseId}`;
419
+ urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
420
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
421
+
422
+ return {
423
+ path: urlPath,
424
+ method: 'DELETE',
425
+ headers: headerParameters,
426
+ query: queryParameters,
427
+ };
428
+ }
429
+
430
+ /**
431
+ * Remove a course from a catalog
432
+ */
433
+ async removeCourseFromCatalogRaw(requestParameters: RemoveCourseFromCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
434
+ const requestOptions = await this.removeCourseFromCatalogRequestOpts(requestParameters);
435
+ const response = await this.request(requestOptions, initOverrides);
436
+
437
+ return new runtime.VoidApiResponse(response);
438
+ }
439
+
440
+ /**
441
+ * Remove a course from a catalog
442
+ */
443
+ async removeCourseFromCatalog(requestParameters: RemoveCourseFromCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
444
+ await this.removeCourseFromCatalogRaw(requestParameters, initOverrides);
445
+ }
446
+
447
+ }