@easyedu/js-lsm-api 1.50.0 → 1.52.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 +29 -2
  3. package/dist/apis/CourseCatalogApi.d.ts +123 -0
  4. package/dist/apis/CourseCatalogApi.js +313 -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 +123 -0
  12. package/dist/esm/apis/CourseCatalogApi.js +309 -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 +476 -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 +395 -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,480 @@
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
+ CourseShare,
19
+ PostOfferCatalog,
20
+ PostOfferCatalogResponse,
21
+ PostOfferCourse,
22
+ PostOfferCourseResponse,
23
+ } from '../models/index';
24
+ import {
25
+ CourseShareFromJSON,
26
+ CourseShareToJSON,
27
+ PostOfferCatalogFromJSON,
28
+ PostOfferCatalogToJSON,
29
+ PostOfferCatalogResponseFromJSON,
30
+ PostOfferCatalogResponseToJSON,
31
+ PostOfferCourseFromJSON,
32
+ PostOfferCourseToJSON,
33
+ PostOfferCourseResponseFromJSON,
34
+ PostOfferCourseResponseToJSON,
35
+ } from '../models/index';
36
+
37
+ export interface DeleteCourseShareRequest {
38
+ shareId: string;
39
+ }
40
+
41
+ export interface PostOfferCatalogRequest {
42
+ catalogId: string;
43
+ postOfferCatalog: PostOfferCatalog;
44
+ }
45
+
46
+ export interface PostOfferCourseRequest {
47
+ courseId: string;
48
+ postOfferCourse: PostOfferCourse;
49
+ }
50
+
51
+ export interface PostUnrevokeShareRequest {
52
+ shareId: string;
53
+ }
54
+
55
+ export interface PutAcceptCloneRequest {
56
+ shareId: string;
57
+ }
58
+
59
+ export interface PutAcceptMirrorRequest {
60
+ shareId: string;
61
+ }
62
+
63
+ export interface PutDeclineShareRequest {
64
+ shareId: string;
65
+ }
66
+
67
+ /**
68
+ *
69
+ */
70
+ export class CourseShareApi extends runtime.BaseAPI {
71
+
72
+ /**
73
+ * Creates request options for deleteCourseShare without sending the request
74
+ */
75
+ async deleteCourseShareRequestOpts(requestParameters: DeleteCourseShareRequest): Promise<runtime.RequestOpts> {
76
+ if (requestParameters['shareId'] == null) {
77
+ throw new runtime.RequiredError(
78
+ 'shareId',
79
+ 'Required parameter "shareId" was null or undefined when calling deleteCourseShare().'
80
+ );
81
+ }
82
+
83
+ const queryParameters: any = {};
84
+
85
+ const headerParameters: runtime.HTTPHeaders = {};
86
+
87
+
88
+ let urlPath = `/course-shares/{shareId}`;
89
+ urlPath = urlPath.replace(`{${"shareId"}}`, encodeURIComponent(String(requestParameters['shareId'])));
90
+
91
+ return {
92
+ path: urlPath,
93
+ method: 'DELETE',
94
+ headers: headerParameters,
95
+ query: queryParameters,
96
+ };
97
+ }
98
+
99
+ /**
100
+ * Cascades to any downstream re-shares and archives enrollments in the target portal. Use `POST /course-shares/{shareId}/unrevoke` to restore.
101
+ * Revoke a share
102
+ */
103
+ async deleteCourseShareRaw(requestParameters: DeleteCourseShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
104
+ const requestOptions = await this.deleteCourseShareRequestOpts(requestParameters);
105
+ const response = await this.request(requestOptions, initOverrides);
106
+
107
+ return new runtime.VoidApiResponse(response);
108
+ }
109
+
110
+ /**
111
+ * Cascades to any downstream re-shares and archives enrollments in the target portal. Use `POST /course-shares/{shareId}/unrevoke` to restore.
112
+ * Revoke a share
113
+ */
114
+ async deleteCourseShare(requestParameters: DeleteCourseShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
115
+ await this.deleteCourseShareRaw(requestParameters, initOverrides);
116
+ }
117
+
118
+ /**
119
+ * Creates request options for getCourseSharesOfferedByMe without sending the request
120
+ */
121
+ async getCourseSharesOfferedByMeRequestOpts(): Promise<runtime.RequestOpts> {
122
+ const queryParameters: any = {};
123
+
124
+ const headerParameters: runtime.HTTPHeaders = {};
125
+
126
+
127
+ let urlPath = `/course-shares/offered-by-me`;
128
+
129
+ return {
130
+ path: urlPath,
131
+ method: 'GET',
132
+ headers: headerParameters,
133
+ query: queryParameters,
134
+ };
135
+ }
136
+
137
+ /**
138
+ * List shares the current portal has offered out
139
+ */
140
+ async getCourseSharesOfferedByMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>> {
141
+ const requestOptions = await this.getCourseSharesOfferedByMeRequestOpts();
142
+ const response = await this.request(requestOptions, initOverrides);
143
+
144
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseShareFromJSON));
145
+ }
146
+
147
+ /**
148
+ * List shares the current portal has offered out
149
+ */
150
+ async getCourseSharesOfferedByMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>> {
151
+ const response = await this.getCourseSharesOfferedByMeRaw(initOverrides);
152
+ return await response.value();
153
+ }
154
+
155
+ /**
156
+ * Creates request options for getCourseSharesOfferedToMe without sending the request
157
+ */
158
+ async getCourseSharesOfferedToMeRequestOpts(): Promise<runtime.RequestOpts> {
159
+ const queryParameters: any = {};
160
+
161
+ const headerParameters: runtime.HTTPHeaders = {};
162
+
163
+
164
+ let urlPath = `/course-shares/offered-to-me`;
165
+
166
+ return {
167
+ path: urlPath,
168
+ method: 'GET',
169
+ headers: headerParameters,
170
+ query: queryParameters,
171
+ };
172
+ }
173
+
174
+ /**
175
+ * List shares offered to the current portal
176
+ */
177
+ async getCourseSharesOfferedToMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>> {
178
+ const requestOptions = await this.getCourseSharesOfferedToMeRequestOpts();
179
+ const response = await this.request(requestOptions, initOverrides);
180
+
181
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseShareFromJSON));
182
+ }
183
+
184
+ /**
185
+ * List shares offered to the current portal
186
+ */
187
+ async getCourseSharesOfferedToMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>> {
188
+ const response = await this.getCourseSharesOfferedToMeRaw(initOverrides);
189
+ return await response.value();
190
+ }
191
+
192
+ /**
193
+ * Creates request options for postOfferCatalog without sending the request
194
+ */
195
+ async postOfferCatalogRequestOpts(requestParameters: PostOfferCatalogRequest): Promise<runtime.RequestOpts> {
196
+ if (requestParameters['catalogId'] == null) {
197
+ throw new runtime.RequiredError(
198
+ 'catalogId',
199
+ 'Required parameter "catalogId" was null or undefined when calling postOfferCatalog().'
200
+ );
201
+ }
202
+
203
+ if (requestParameters['postOfferCatalog'] == null) {
204
+ throw new runtime.RequiredError(
205
+ 'postOfferCatalog',
206
+ 'Required parameter "postOfferCatalog" was null or undefined when calling postOfferCatalog().'
207
+ );
208
+ }
209
+
210
+ const queryParameters: any = {};
211
+
212
+ const headerParameters: runtime.HTTPHeaders = {};
213
+
214
+ headerParameters['Content-Type'] = 'application/json';
215
+
216
+
217
+ let urlPath = `/catalogs/{catalogId}/shares`;
218
+ urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
219
+
220
+ return {
221
+ path: urlPath,
222
+ method: 'POST',
223
+ headers: headerParameters,
224
+ query: queryParameters,
225
+ body: PostOfferCatalogToJSON(requestParameters['postOfferCatalog']),
226
+ };
227
+ }
228
+
229
+ /**
230
+ * 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`.
231
+ * Offer every course in a catalog to a descendant portal
232
+ */
233
+ async postOfferCatalogRaw(requestParameters: PostOfferCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostOfferCatalogResponse>> {
234
+ const requestOptions = await this.postOfferCatalogRequestOpts(requestParameters);
235
+ const response = await this.request(requestOptions, initOverrides);
236
+
237
+ return new runtime.JSONApiResponse(response, (jsonValue) => PostOfferCatalogResponseFromJSON(jsonValue));
238
+ }
239
+
240
+ /**
241
+ * 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`.
242
+ * Offer every course in a catalog to a descendant portal
243
+ */
244
+ async postOfferCatalog(requestParameters: PostOfferCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostOfferCatalogResponse> {
245
+ const response = await this.postOfferCatalogRaw(requestParameters, initOverrides);
246
+ return await response.value();
247
+ }
248
+
249
+ /**
250
+ * Creates request options for postOfferCourse without sending the request
251
+ */
252
+ async postOfferCourseRequestOpts(requestParameters: PostOfferCourseRequest): Promise<runtime.RequestOpts> {
253
+ if (requestParameters['courseId'] == null) {
254
+ throw new runtime.RequiredError(
255
+ 'courseId',
256
+ 'Required parameter "courseId" was null or undefined when calling postOfferCourse().'
257
+ );
258
+ }
259
+
260
+ if (requestParameters['postOfferCourse'] == null) {
261
+ throw new runtime.RequiredError(
262
+ 'postOfferCourse',
263
+ 'Required parameter "postOfferCourse" was null or undefined when calling postOfferCourse().'
264
+ );
265
+ }
266
+
267
+ const queryParameters: any = {};
268
+
269
+ const headerParameters: runtime.HTTPHeaders = {};
270
+
271
+ headerParameters['Content-Type'] = 'application/json';
272
+
273
+
274
+ let urlPath = `/courses/{courseId}/shares`;
275
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
276
+
277
+ return {
278
+ path: urlPath,
279
+ method: 'POST',
280
+ headers: headerParameters,
281
+ query: queryParameters,
282
+ body: PostOfferCourseToJSON(requestParameters['postOfferCourse']),
283
+ };
284
+ }
285
+
286
+ /**
287
+ * Offer a single course to a descendant portal
288
+ */
289
+ async postOfferCourseRaw(requestParameters: PostOfferCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostOfferCourseResponse>> {
290
+ const requestOptions = await this.postOfferCourseRequestOpts(requestParameters);
291
+ const response = await this.request(requestOptions, initOverrides);
292
+
293
+ return new runtime.JSONApiResponse(response, (jsonValue) => PostOfferCourseResponseFromJSON(jsonValue));
294
+ }
295
+
296
+ /**
297
+ * Offer a single course to a descendant portal
298
+ */
299
+ async postOfferCourse(requestParameters: PostOfferCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostOfferCourseResponse> {
300
+ const response = await this.postOfferCourseRaw(requestParameters, initOverrides);
301
+ return await response.value();
302
+ }
303
+
304
+ /**
305
+ * Creates request options for postUnrevokeShare without sending the request
306
+ */
307
+ async postUnrevokeShareRequestOpts(requestParameters: PostUnrevokeShareRequest): Promise<runtime.RequestOpts> {
308
+ if (requestParameters['shareId'] == null) {
309
+ throw new runtime.RequiredError(
310
+ 'shareId',
311
+ 'Required parameter "shareId" was null or undefined when calling postUnrevokeShare().'
312
+ );
313
+ }
314
+
315
+ const queryParameters: any = {};
316
+
317
+ const headerParameters: runtime.HTTPHeaders = {};
318
+
319
+
320
+ let urlPath = `/course-shares/{shareId}/unrevoke`;
321
+ urlPath = urlPath.replace(`{${"shareId"}}`, encodeURIComponent(String(requestParameters['shareId'])));
322
+
323
+ return {
324
+ path: urlPath,
325
+ method: 'POST',
326
+ headers: headerParameters,
327
+ query: queryParameters,
328
+ };
329
+ }
330
+
331
+ /**
332
+ * Restore a previously revoked share
333
+ */
334
+ async postUnrevokeShareRaw(requestParameters: PostUnrevokeShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
335
+ const requestOptions = await this.postUnrevokeShareRequestOpts(requestParameters);
336
+ const response = await this.request(requestOptions, initOverrides);
337
+
338
+ return new runtime.VoidApiResponse(response);
339
+ }
340
+
341
+ /**
342
+ * Restore a previously revoked share
343
+ */
344
+ async postUnrevokeShare(requestParameters: PostUnrevokeShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
345
+ await this.postUnrevokeShareRaw(requestParameters, initOverrides);
346
+ }
347
+
348
+ /**
349
+ * Creates request options for putAcceptClone without sending the request
350
+ */
351
+ async putAcceptCloneRequestOpts(requestParameters: PutAcceptCloneRequest): Promise<runtime.RequestOpts> {
352
+ if (requestParameters['shareId'] == null) {
353
+ throw new runtime.RequiredError(
354
+ 'shareId',
355
+ 'Required parameter "shareId" was null or undefined when calling putAcceptClone().'
356
+ );
357
+ }
358
+
359
+ const queryParameters: any = {};
360
+
361
+ const headerParameters: runtime.HTTPHeaders = {};
362
+
363
+
364
+ let urlPath = `/course-shares/{shareId}/accept-clone`;
365
+ urlPath = urlPath.replace(`{${"shareId"}}`, encodeURIComponent(String(requestParameters['shareId'])));
366
+
367
+ return {
368
+ path: urlPath,
369
+ method: 'PUT',
370
+ headers: headerParameters,
371
+ query: queryParameters,
372
+ };
373
+ }
374
+
375
+ /**
376
+ * Accept an offer as a clone (deep copy into your portal)
377
+ */
378
+ async putAcceptCloneRaw(requestParameters: PutAcceptCloneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
379
+ const requestOptions = await this.putAcceptCloneRequestOpts(requestParameters);
380
+ const response = await this.request(requestOptions, initOverrides);
381
+
382
+ return new runtime.VoidApiResponse(response);
383
+ }
384
+
385
+ /**
386
+ * Accept an offer as a clone (deep copy into your portal)
387
+ */
388
+ async putAcceptClone(requestParameters: PutAcceptCloneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
389
+ await this.putAcceptCloneRaw(requestParameters, initOverrides);
390
+ }
391
+
392
+ /**
393
+ * Creates request options for putAcceptMirror without sending the request
394
+ */
395
+ async putAcceptMirrorRequestOpts(requestParameters: PutAcceptMirrorRequest): Promise<runtime.RequestOpts> {
396
+ if (requestParameters['shareId'] == null) {
397
+ throw new runtime.RequiredError(
398
+ 'shareId',
399
+ 'Required parameter "shareId" was null or undefined when calling putAcceptMirror().'
400
+ );
401
+ }
402
+
403
+ const queryParameters: any = {};
404
+
405
+ const headerParameters: runtime.HTTPHeaders = {};
406
+
407
+
408
+ let urlPath = `/course-shares/{shareId}/accept-mirror`;
409
+ urlPath = urlPath.replace(`{${"shareId"}}`, encodeURIComponent(String(requestParameters['shareId'])));
410
+
411
+ return {
412
+ path: urlPath,
413
+ method: 'PUT',
414
+ headers: headerParameters,
415
+ query: queryParameters,
416
+ };
417
+ }
418
+
419
+ /**
420
+ * Accept an offer as a mirror (no copy, live link to source)
421
+ */
422
+ async putAcceptMirrorRaw(requestParameters: PutAcceptMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
423
+ const requestOptions = await this.putAcceptMirrorRequestOpts(requestParameters);
424
+ const response = await this.request(requestOptions, initOverrides);
425
+
426
+ return new runtime.VoidApiResponse(response);
427
+ }
428
+
429
+ /**
430
+ * Accept an offer as a mirror (no copy, live link to source)
431
+ */
432
+ async putAcceptMirror(requestParameters: PutAcceptMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
433
+ await this.putAcceptMirrorRaw(requestParameters, initOverrides);
434
+ }
435
+
436
+ /**
437
+ * Creates request options for putDeclineShare without sending the request
438
+ */
439
+ async putDeclineShareRequestOpts(requestParameters: PutDeclineShareRequest): Promise<runtime.RequestOpts> {
440
+ if (requestParameters['shareId'] == null) {
441
+ throw new runtime.RequiredError(
442
+ 'shareId',
443
+ 'Required parameter "shareId" was null or undefined when calling putDeclineShare().'
444
+ );
445
+ }
446
+
447
+ const queryParameters: any = {};
448
+
449
+ const headerParameters: runtime.HTTPHeaders = {};
450
+
451
+
452
+ let urlPath = `/course-shares/{shareId}/decline`;
453
+ urlPath = urlPath.replace(`{${"shareId"}}`, encodeURIComponent(String(requestParameters['shareId'])));
454
+
455
+ return {
456
+ path: urlPath,
457
+ method: 'PUT',
458
+ headers: headerParameters,
459
+ query: queryParameters,
460
+ };
461
+ }
462
+
463
+ /**
464
+ * Decline an offer
465
+ */
466
+ async putDeclineShareRaw(requestParameters: PutDeclineShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
467
+ const requestOptions = await this.putDeclineShareRequestOpts(requestParameters);
468
+ const response = await this.request(requestOptions, initOverrides);
469
+
470
+ return new runtime.VoidApiResponse(response);
471
+ }
472
+
473
+ /**
474
+ * Decline an offer
475
+ */
476
+ async putDeclineShare(requestParameters: PutDeclineShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
477
+ await this.putDeclineShareRaw(requestParameters, initOverrides);
478
+ }
479
+
480
+ }
@@ -0,0 +1,95 @@
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
+ PortalSublicense,
19
+ PutPortalSublicense,
20
+ } from '../models/index';
21
+ import {
22
+ PortalSublicenseFromJSON,
23
+ PortalSublicenseToJSON,
24
+ PutPortalSublicenseFromJSON,
25
+ PutPortalSublicenseToJSON,
26
+ } from '../models/index';
27
+
28
+ export interface PutPortalSublicenseRequest {
29
+ portalId: string;
30
+ putPortalSublicense: PutPortalSublicense;
31
+ }
32
+
33
+ /**
34
+ *
35
+ */
36
+ export class PortalSublicenseApi extends runtime.BaseAPI {
37
+
38
+ /**
39
+ * Creates request options for putPortalSublicense without sending the request
40
+ */
41
+ async putPortalSublicenseRequestOpts(requestParameters: PutPortalSublicenseRequest): Promise<runtime.RequestOpts> {
42
+ if (requestParameters['portalId'] == null) {
43
+ throw new runtime.RequiredError(
44
+ 'portalId',
45
+ 'Required parameter "portalId" was null or undefined when calling putPortalSublicense().'
46
+ );
47
+ }
48
+
49
+ if (requestParameters['putPortalSublicense'] == null) {
50
+ throw new runtime.RequiredError(
51
+ 'putPortalSublicense',
52
+ 'Required parameter "putPortalSublicense" was null or undefined when calling putPortalSublicense().'
53
+ );
54
+ }
55
+
56
+ const queryParameters: any = {};
57
+
58
+ const headerParameters: runtime.HTTPHeaders = {};
59
+
60
+ headerParameters['Content-Type'] = 'application/json';
61
+
62
+
63
+ let urlPath = `/portals/{portalId}/sublicense`;
64
+ urlPath = urlPath.replace(`{${"portalId"}}`, encodeURIComponent(String(requestParameters['portalId'])));
65
+
66
+ return {
67
+ path: urlPath,
68
+ method: 'PUT',
69
+ headers: headerParameters,
70
+ query: queryParameters,
71
+ body: PutPortalSublicenseToJSON(requestParameters['putPortalSublicense']),
72
+ };
73
+ }
74
+
75
+ /**
76
+ * Must be called by a parent portal against one of its descendants. Field semantics: omit to leave unchanged, send `null` to clear.
77
+ * Manage seat limit and license window for a descendant portal
78
+ */
79
+ async putPortalSublicenseRaw(requestParameters: PutPortalSublicenseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PortalSublicense>> {
80
+ const requestOptions = await this.putPortalSublicenseRequestOpts(requestParameters);
81
+ const response = await this.request(requestOptions, initOverrides);
82
+
83
+ return new runtime.JSONApiResponse(response, (jsonValue) => PortalSublicenseFromJSON(jsonValue));
84
+ }
85
+
86
+ /**
87
+ * Must be called by a parent portal against one of its descendants. Field semantics: omit to leave unchanged, send `null` to clear.
88
+ * Manage seat limit and license window for a descendant portal
89
+ */
90
+ async putPortalSublicense(requestParameters: PutPortalSublicenseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PortalSublicense> {
91
+ const response = await this.putPortalSublicenseRaw(requestParameters, initOverrides);
92
+ return await response.value();
93
+ }
94
+
95
+ }
package/src/apis/index.ts 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,84 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface CourseCatalog
20
+ */
21
+ export interface CourseCatalog {
22
+ /**
23
+ * External ID (UUID) of the catalog
24
+ * @type {string}
25
+ * @memberof CourseCatalog
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof CourseCatalog
32
+ */
33
+ name: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof CourseCatalog
38
+ */
39
+ description: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the CourseCatalog interface.
44
+ */
45
+ export function instanceOfCourseCatalog(value: object): value is CourseCatalog {
46
+ if (!('id' in value) || value['id'] === undefined) return false;
47
+ if (!('name' in value) || value['name'] === undefined) return false;
48
+ if (!('description' in value) || value['description'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function CourseCatalogFromJSON(json: any): CourseCatalog {
53
+ return CourseCatalogFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function CourseCatalogFromJSONTyped(json: any, ignoreDiscriminator: boolean): CourseCatalog {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'id': json['id'],
63
+ 'name': json['name'],
64
+ 'description': json['description'],
65
+ };
66
+ }
67
+
68
+ export function CourseCatalogToJSON(json: any): CourseCatalog {
69
+ return CourseCatalogToJSONTyped(json, false);
70
+ }
71
+
72
+ export function CourseCatalogToJSONTyped(value?: CourseCatalog | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'id': value['id'],
80
+ 'name': value['name'],
81
+ 'description': value['description'],
82
+ };
83
+ }
84
+