@easyedu/js-lsm-api 1.106.0 → 1.108.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 (56) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +7 -4
  3. package/dist/apis/CourseApi.d.ts +30 -2
  4. package/dist/apis/CourseApi.js +59 -3
  5. package/dist/apis/CourseCatalogApi.d.ts +8 -3
  6. package/dist/apis/CourseCatalogApi.js +14 -7
  7. package/dist/apis/CourseShareApi.d.ts +31 -12
  8. package/dist/apis/CourseShareApi.js +44 -16
  9. package/dist/esm/apis/CourseApi.d.ts +30 -2
  10. package/dist/esm/apis/CourseApi.js +58 -2
  11. package/dist/esm/apis/CourseCatalogApi.d.ts +8 -3
  12. package/dist/esm/apis/CourseCatalogApi.js +14 -7
  13. package/dist/esm/apis/CourseShareApi.d.ts +31 -12
  14. package/dist/esm/apis/CourseShareApi.js +43 -15
  15. package/dist/esm/models/CourseShare.d.ts +57 -9
  16. package/dist/esm/models/CourseShare.js +32 -0
  17. package/dist/esm/models/GetCourseCatalogList.d.ts +57 -0
  18. package/dist/esm/models/GetCourseCatalogList.js +60 -0
  19. package/dist/esm/models/GetCourseExport.d.ts +6 -0
  20. package/dist/esm/models/GetCourseExport.js +4 -0
  21. package/dist/esm/models/GetCourseShareList.d.ts +57 -0
  22. package/dist/esm/models/GetCourseShareList.js +60 -0
  23. package/dist/esm/models/PostOfferCatalog.d.ts +1 -1
  24. package/dist/esm/models/PostOfferCourse.d.ts +1 -1
  25. package/dist/esm/models/index.d.ts +2 -0
  26. package/dist/esm/models/index.js +2 -0
  27. package/dist/models/CourseShare.d.ts +57 -9
  28. package/dist/models/CourseShare.js +32 -0
  29. package/dist/models/GetCourseCatalogList.d.ts +57 -0
  30. package/dist/models/GetCourseCatalogList.js +67 -0
  31. package/dist/models/GetCourseExport.d.ts +6 -0
  32. package/dist/models/GetCourseExport.js +4 -0
  33. package/dist/models/GetCourseShareList.d.ts +57 -0
  34. package/dist/models/GetCourseShareList.js +67 -0
  35. package/dist/models/PostOfferCatalog.d.ts +1 -1
  36. package/dist/models/PostOfferCourse.d.ts +1 -1
  37. package/dist/models/index.d.ts +2 -0
  38. package/dist/models/index.js +2 -0
  39. package/docs/CourseApi.md +79 -1
  40. package/docs/CourseCatalogApi.md +15 -4
  41. package/docs/CourseShare.md +19 -3
  42. package/docs/CourseShareApi.md +39 -13
  43. package/docs/GetCourseCatalogList.md +42 -0
  44. package/docs/GetCourseExport.md +2 -0
  45. package/docs/GetCourseShareList.md +42 -0
  46. package/package.json +1 -1
  47. package/src/apis/CourseApi.ts +72 -2
  48. package/src/apis/CourseCatalogApi.ts +24 -6
  49. package/src/apis/CourseShareApi.ts +63 -19
  50. package/src/models/CourseShare.ts +81 -9
  51. package/src/models/GetCourseCatalogList.ts +110 -0
  52. package/src/models/GetCourseExport.ts +9 -0
  53. package/src/models/GetCourseShareList.ts +110 -0
  54. package/src/models/PostOfferCatalog.ts +1 -1
  55. package/src/models/PostOfferCourse.ts +1 -1
  56. package/src/models/index.ts +2 -0
@@ -299,6 +299,13 @@ export interface GetCourseVersionProgressionRequest {
299
299
  preview?: boolean;
300
300
  }
301
301
 
302
+ export interface GetPortalCourseExportsRequest {
303
+ page?: number;
304
+ pageSize?: number;
305
+ courseId?: string;
306
+ status?: GetPortalCourseExportsStatusEnum;
307
+ }
308
+
302
309
  export interface PostCourseRequest {
303
310
  postCourse: PostCourse;
304
311
  }
@@ -1445,6 +1452,59 @@ export class CourseApi extends runtime.BaseAPI {
1445
1452
  return await response.value();
1446
1453
  }
1447
1454
 
1455
+ /**
1456
+ * Creates request options for getPortalCourseExports without sending the request
1457
+ */
1458
+ async getPortalCourseExportsRequestOpts(requestParameters: GetPortalCourseExportsRequest): Promise<runtime.RequestOpts> {
1459
+ const queryParameters: any = {};
1460
+
1461
+ if (requestParameters['page'] != null) {
1462
+ queryParameters['page'] = requestParameters['page'];
1463
+ }
1464
+
1465
+ if (requestParameters['pageSize'] != null) {
1466
+ queryParameters['page_size'] = requestParameters['pageSize'];
1467
+ }
1468
+
1469
+ if (requestParameters['courseId'] != null) {
1470
+ queryParameters['course_id'] = requestParameters['courseId'];
1471
+ }
1472
+
1473
+ if (requestParameters['status'] != null) {
1474
+ queryParameters['status'] = requestParameters['status'];
1475
+ }
1476
+
1477
+ const headerParameters: runtime.HTTPHeaders = {};
1478
+
1479
+
1480
+ let urlPath = `/course-exports`;
1481
+
1482
+ return {
1483
+ path: urlPath,
1484
+ method: 'GET',
1485
+ headers: headerParameters,
1486
+ query: queryParameters,
1487
+ };
1488
+ }
1489
+
1490
+ /**
1491
+ * List SCORM exports owned by the current portal
1492
+ */
1493
+ async getPortalCourseExportsRaw(requestParameters: GetPortalCourseExportsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseExportList>> {
1494
+ const requestOptions = await this.getPortalCourseExportsRequestOpts(requestParameters);
1495
+ const response = await this.request(requestOptions, initOverrides);
1496
+
1497
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseExportListFromJSON(jsonValue));
1498
+ }
1499
+
1500
+ /**
1501
+ * List SCORM exports owned by the current portal
1502
+ */
1503
+ async getPortalCourseExports(requestParameters: GetPortalCourseExportsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExportList> {
1504
+ const response = await this.getPortalCourseExportsRaw(requestParameters, initOverrides);
1505
+ return await response.value();
1506
+ }
1507
+
1448
1508
  /**
1449
1509
  * Creates request options for postCourse without sending the request
1450
1510
  */
@@ -1728,7 +1788,7 @@ export class CourseApi extends runtime.BaseAPI {
1728
1788
  }
1729
1789
 
1730
1790
  /**
1731
- * Enqueues a job to generate a SCORM export package for the course. Returns immediately with PENDING status. **NOTES:** - This endpoint enqueues a background job to generate the SCORM package - Actual SCORM package generation is not yet implemented (TODO) - Export metadata should be persisted to a database table (TODO) - Poll GET /courses/{courseId}/exports/{exportId} to check status - Download URL will be available when status becomes COMPLETED
1791
+ * Enqueues a job to generate a SCORM export package for the course. Returns immediately with PENDING status. **NOTES:** - This endpoint enqueues a background job to generate the SCORM package - Poll GET /courses/{courseId}/exports/{exportId} to check status - Download URL will be available when status becomes COMPLETED
1732
1792
  * Create a new SCORM export for a course
1733
1793
  */
1734
1794
  async postCourseExportRaw(requestParameters: PostCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseExport>> {
@@ -1739,7 +1799,7 @@ export class CourseApi extends runtime.BaseAPI {
1739
1799
  }
1740
1800
 
1741
1801
  /**
1742
- * Enqueues a job to generate a SCORM export package for the course. Returns immediately with PENDING status. **NOTES:** - This endpoint enqueues a background job to generate the SCORM package - Actual SCORM package generation is not yet implemented (TODO) - Export metadata should be persisted to a database table (TODO) - Poll GET /courses/{courseId}/exports/{exportId} to check status - Download URL will be available when status becomes COMPLETED
1802
+ * Enqueues a job to generate a SCORM export package for the course. Returns immediately with PENDING status. **NOTES:** - This endpoint enqueues a background job to generate the SCORM package - Poll GET /courses/{courseId}/exports/{exportId} to check status - Download URL will be available when status becomes COMPLETED
1743
1803
  * Create a new SCORM export for a course
1744
1804
  */
1745
1805
  async postCourseExport(requestParameters: PostCourseExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExport> {
@@ -2702,3 +2762,13 @@ export const GetCourseEnrollmentsTypeEnum = {
2702
2762
  Instructor: 'instructor'
2703
2763
  } as const;
2704
2764
  export type GetCourseEnrollmentsTypeEnum = typeof GetCourseEnrollmentsTypeEnum[keyof typeof GetCourseEnrollmentsTypeEnum];
2765
+ /**
2766
+ * @export
2767
+ */
2768
+ export const GetPortalCourseExportsStatusEnum = {
2769
+ Pending: 'PENDING',
2770
+ Processing: 'PROCESSING',
2771
+ Completed: 'COMPLETED',
2772
+ Failed: 'FAILED'
2773
+ } as const;
2774
+ export type GetPortalCourseExportsStatusEnum = typeof GetPortalCourseExportsStatusEnum[keyof typeof GetPortalCourseExportsStatusEnum];
@@ -23,6 +23,11 @@ import {
23
23
  GetCourseFromJSON,
24
24
  GetCourseToJSON,
25
25
  } from '../models/GetCourse';
26
+ import {
27
+ type GetCourseCatalogList,
28
+ GetCourseCatalogListFromJSON,
29
+ GetCourseCatalogListToJSON,
30
+ } from '../models/GetCourseCatalogList';
26
31
  import {
27
32
  type PostCourseCatalog,
28
33
  PostCourseCatalogFromJSON,
@@ -51,6 +56,11 @@ export interface GetCourseCatalogRequest {
51
56
  catalogId: string;
52
57
  }
53
58
 
59
+ export interface GetCourseCatalogsRequest {
60
+ page?: number;
61
+ pageSize?: number;
62
+ }
63
+
54
64
  export interface PostCourseCatalogRequest {
55
65
  postCourseCatalog: PostCourseCatalog;
56
66
  }
@@ -259,9 +269,17 @@ export class CourseCatalogApi extends runtime.BaseAPI {
259
269
  /**
260
270
  * Creates request options for getCourseCatalogs without sending the request
261
271
  */
262
- async getCourseCatalogsRequestOpts(): Promise<runtime.RequestOpts> {
272
+ async getCourseCatalogsRequestOpts(requestParameters: GetCourseCatalogsRequest): Promise<runtime.RequestOpts> {
263
273
  const queryParameters: any = {};
264
274
 
275
+ if (requestParameters['page'] != null) {
276
+ queryParameters['page'] = requestParameters['page'];
277
+ }
278
+
279
+ if (requestParameters['pageSize'] != null) {
280
+ queryParameters['page_size'] = requestParameters['pageSize'];
281
+ }
282
+
265
283
  const headerParameters: runtime.HTTPHeaders = {};
266
284
 
267
285
 
@@ -278,18 +296,18 @@ export class CourseCatalogApi extends runtime.BaseAPI {
278
296
  /**
279
297
  * List catalogs in the current portal
280
298
  */
281
- async getCourseCatalogsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseCatalog>>> {
282
- const requestOptions = await this.getCourseCatalogsRequestOpts();
299
+ async getCourseCatalogsRaw(requestParameters: GetCourseCatalogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseCatalogList>> {
300
+ const requestOptions = await this.getCourseCatalogsRequestOpts(requestParameters);
283
301
  const response = await this.request(requestOptions, initOverrides);
284
302
 
285
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseCatalogFromJSON));
303
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseCatalogListFromJSON(jsonValue));
286
304
  }
287
305
 
288
306
  /**
289
307
  * List catalogs in the current portal
290
308
  */
291
- async getCourseCatalogs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseCatalog>> {
292
- const response = await this.getCourseCatalogsRaw(initOverrides);
309
+ async getCourseCatalogs(requestParameters: GetCourseCatalogsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseCatalogList> {
310
+ const response = await this.getCourseCatalogsRaw(requestParameters, initOverrides);
293
311
  return await response.value();
294
312
  }
295
313
 
@@ -14,10 +14,10 @@
14
14
 
15
15
  import * as runtime from '../runtime';
16
16
  import {
17
- type CourseShare,
18
- CourseShareFromJSON,
19
- CourseShareToJSON,
20
- } from '../models/CourseShare';
17
+ type GetCourseShareList,
18
+ GetCourseShareListFromJSON,
19
+ GetCourseShareListToJSON,
20
+ } from '../models/GetCourseShareList';
21
21
  import {
22
22
  type PostOfferCatalog,
23
23
  PostOfferCatalogFromJSON,
@@ -43,7 +43,16 @@ export interface DeleteCourseShareRequest {
43
43
  shareId: string;
44
44
  }
45
45
 
46
+ export interface GetCourseSharesOfferedByMeRequest {
47
+ page?: number;
48
+ pageSize?: number;
49
+ courseId?: string;
50
+ state?: GetCourseSharesOfferedByMeStateEnum;
51
+ }
52
+
46
53
  export interface GetCourseSharesOfferedToMeRequest {
54
+ page?: number;
55
+ pageSize?: number;
47
56
  state?: GetCourseSharesOfferedToMeStateEnum;
48
57
  }
49
58
 
@@ -127,9 +136,25 @@ export class CourseShareApi extends runtime.BaseAPI {
127
136
  /**
128
137
  * Creates request options for getCourseSharesOfferedByMe without sending the request
129
138
  */
130
- async getCourseSharesOfferedByMeRequestOpts(): Promise<runtime.RequestOpts> {
139
+ async getCourseSharesOfferedByMeRequestOpts(requestParameters: GetCourseSharesOfferedByMeRequest): Promise<runtime.RequestOpts> {
131
140
  const queryParameters: any = {};
132
141
 
142
+ if (requestParameters['page'] != null) {
143
+ queryParameters['page'] = requestParameters['page'];
144
+ }
145
+
146
+ if (requestParameters['pageSize'] != null) {
147
+ queryParameters['page_size'] = requestParameters['pageSize'];
148
+ }
149
+
150
+ if (requestParameters['courseId'] != null) {
151
+ queryParameters['course_id'] = requestParameters['courseId'];
152
+ }
153
+
154
+ if (requestParameters['state'] != null) {
155
+ queryParameters['state'] = requestParameters['state'];
156
+ }
157
+
133
158
  const headerParameters: runtime.HTTPHeaders = {};
134
159
 
135
160
 
@@ -146,18 +171,18 @@ export class CourseShareApi extends runtime.BaseAPI {
146
171
  /**
147
172
  * List shares the current portal has offered out
148
173
  */
149
- async getCourseSharesOfferedByMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>> {
150
- const requestOptions = await this.getCourseSharesOfferedByMeRequestOpts();
174
+ async getCourseSharesOfferedByMeRaw(requestParameters: GetCourseSharesOfferedByMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseShareList>> {
175
+ const requestOptions = await this.getCourseSharesOfferedByMeRequestOpts(requestParameters);
151
176
  const response = await this.request(requestOptions, initOverrides);
152
177
 
153
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseShareFromJSON));
178
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseShareListFromJSON(jsonValue));
154
179
  }
155
180
 
156
181
  /**
157
182
  * List shares the current portal has offered out
158
183
  */
159
- async getCourseSharesOfferedByMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>> {
160
- const response = await this.getCourseSharesOfferedByMeRaw(initOverrides);
184
+ async getCourseSharesOfferedByMe(requestParameters: GetCourseSharesOfferedByMeRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseShareList> {
185
+ const response = await this.getCourseSharesOfferedByMeRaw(requestParameters, initOverrides);
161
186
  return await response.value();
162
187
  }
163
188
 
@@ -167,6 +192,14 @@ export class CourseShareApi extends runtime.BaseAPI {
167
192
  async getCourseSharesOfferedToMeRequestOpts(requestParameters: GetCourseSharesOfferedToMeRequest): Promise<runtime.RequestOpts> {
168
193
  const queryParameters: any = {};
169
194
 
195
+ if (requestParameters['page'] != null) {
196
+ queryParameters['page'] = requestParameters['page'];
197
+ }
198
+
199
+ if (requestParameters['pageSize'] != null) {
200
+ queryParameters['page_size'] = requestParameters['pageSize'];
201
+ }
202
+
170
203
  if (requestParameters['state'] != null) {
171
204
  queryParameters['state'] = requestParameters['state'];
172
205
  }
@@ -185,21 +218,21 @@ export class CourseShareApi extends runtime.BaseAPI {
185
218
  }
186
219
 
187
220
  /**
188
- * Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
221
+ * Returns `course_share` rows where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
189
222
  * List shares offered to the current portal
190
223
  */
191
- async getCourseSharesOfferedToMeRaw(requestParameters: GetCourseSharesOfferedToMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>> {
224
+ async getCourseSharesOfferedToMeRaw(requestParameters: GetCourseSharesOfferedToMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseShareList>> {
192
225
  const requestOptions = await this.getCourseSharesOfferedToMeRequestOpts(requestParameters);
193
226
  const response = await this.request(requestOptions, initOverrides);
194
227
 
195
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseShareFromJSON));
228
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseShareListFromJSON(jsonValue));
196
229
  }
197
230
 
198
231
  /**
199
- * Returns every `course_share` row where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
232
+ * Returns `course_share` rows where the current portal is the target, with the source portal name and course name joined in. Optionally filter by share state via the `state` query parameter.
200
233
  * List shares offered to the current portal
201
234
  */
202
- async getCourseSharesOfferedToMe(requestParameters: GetCourseSharesOfferedToMeRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>> {
235
+ async getCourseSharesOfferedToMe(requestParameters: GetCourseSharesOfferedToMeRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseShareList> {
203
236
  const response = await this.getCourseSharesOfferedToMeRaw(requestParameters, initOverrides);
204
237
  return await response.value();
205
238
  }
@@ -243,7 +276,7 @@ export class CourseShareApi extends runtime.BaseAPI {
243
276
 
244
277
  /**
245
278
  * 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`.
246
- * Offer every course in a catalog to a descendant portal
279
+ * Offer every course in a catalog to another portal
247
280
  */
248
281
  async postOfferCatalogRaw(requestParameters: PostOfferCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostOfferCatalogResponse>> {
249
282
  const requestOptions = await this.postOfferCatalogRequestOpts(requestParameters);
@@ -254,7 +287,7 @@ export class CourseShareApi extends runtime.BaseAPI {
254
287
 
255
288
  /**
256
289
  * 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`.
257
- * Offer every course in a catalog to a descendant portal
290
+ * Offer every course in a catalog to another portal
258
291
  */
259
292
  async postOfferCatalog(requestParameters: PostOfferCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostOfferCatalogResponse> {
260
293
  const response = await this.postOfferCatalogRaw(requestParameters, initOverrides);
@@ -299,7 +332,7 @@ export class CourseShareApi extends runtime.BaseAPI {
299
332
  }
300
333
 
301
334
  /**
302
- * Offer a single course to a descendant portal
335
+ * Offer a single course to another portal
303
336
  */
304
337
  async postOfferCourseRaw(requestParameters: PostOfferCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostOfferCourseResponse>> {
305
338
  const requestOptions = await this.postOfferCourseRequestOpts(requestParameters);
@@ -309,7 +342,7 @@ export class CourseShareApi extends runtime.BaseAPI {
309
342
  }
310
343
 
311
344
  /**
312
- * Offer a single course to a descendant portal
345
+ * Offer a single course to another portal
313
346
  */
314
347
  async postOfferCourse(requestParameters: PostOfferCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostOfferCourseResponse> {
315
348
  const response = await this.postOfferCourseRaw(requestParameters, initOverrides);
@@ -494,6 +527,17 @@ export class CourseShareApi extends runtime.BaseAPI {
494
527
 
495
528
  }
496
529
 
530
+ /**
531
+ * @export
532
+ */
533
+ export const GetCourseSharesOfferedByMeStateEnum = {
534
+ Offered: 'offered',
535
+ AcceptedMirror: 'accepted_mirror',
536
+ AcceptedClone: 'accepted_clone',
537
+ Declined: 'declined',
538
+ Revoked: 'revoked'
539
+ } as const;
540
+ export type GetCourseSharesOfferedByMeStateEnum = typeof GetCourseSharesOfferedByMeStateEnum[keyof typeof GetCourseSharesOfferedByMeStateEnum];
497
541
  /**
498
542
  * @export
499
543
  */
@@ -14,9 +14,9 @@
14
14
 
15
15
  import { mapValues } from '../runtime';
16
16
  /**
17
- * Shape returned by `GET /course-shares/offered-to-me`. Includes joined source
18
- * portal name and course name so the child portal can render an inbox without
19
- * follow-up requests.
17
+ * Shared shape returned by the incoming and outgoing course-share lists. All
18
+ * resource identifiers are public external IDs so clients can link to the
19
+ * related course, portal, and catalog without exposing database keys.
20
20
  *
21
21
  * @export
22
22
  * @interface CourseShare
@@ -29,11 +29,11 @@ export interface CourseShare {
29
29
  */
30
30
  id: string;
31
31
  /**
32
- * Internal ID of the offering portal
33
- * @type {number}
32
+ * External ID of the offering portal
33
+ * @type {string}
34
34
  * @memberof CourseShare
35
35
  */
36
- sourcePortalId: number;
36
+ sourcePortalId: string;
37
37
  /**
38
38
  * Display name of the offering portal
39
39
  * @type {string}
@@ -41,11 +41,23 @@ export interface CourseShare {
41
41
  */
42
42
  sourcePortalName: string;
43
43
  /**
44
- * Internal ID of the offered course
45
- * @type {number}
44
+ * External ID of the receiving portal
45
+ * @type {string}
46
+ * @memberof CourseShare
47
+ */
48
+ targetPortalId: string;
49
+ /**
50
+ * Display name of the receiving portal
51
+ * @type {string}
52
+ * @memberof CourseShare
53
+ */
54
+ targetPortalName: string;
55
+ /**
56
+ * External ID of the offered course
57
+ * @type {string}
46
58
  * @memberof CourseShare
47
59
  */
48
- courseId: number;
60
+ courseId: string;
49
61
  /**
50
62
  * Display name of the offered course
51
63
  * @type {string}
@@ -70,6 +82,42 @@ export interface CourseShare {
70
82
  * @memberof CourseShare
71
83
  */
72
84
  allowResharing: boolean;
85
+ /**
86
+ * Per-share seat cap; null means unlimited
87
+ * @type {number}
88
+ * @memberof CourseShare
89
+ */
90
+ seatLimit: number | null;
91
+ /**
92
+ * External ID of the catalog that produced the offer, when applicable
93
+ * @type {string}
94
+ * @memberof CourseShare
95
+ */
96
+ originCatalogId: string | null;
97
+ /**
98
+ * Display name of the catalog that produced the offer, when applicable
99
+ * @type {string}
100
+ * @memberof CourseShare
101
+ */
102
+ originCatalogName: string | null;
103
+ /**
104
+ *
105
+ * @type {Date}
106
+ * @memberof CourseShare
107
+ */
108
+ offeredAt: Date;
109
+ /**
110
+ *
111
+ * @type {Date}
112
+ * @memberof CourseShare
113
+ */
114
+ respondedAt: Date | null;
115
+ /**
116
+ *
117
+ * @type {Date}
118
+ * @memberof CourseShare
119
+ */
120
+ revokedAt: Date | null;
73
121
  }
74
122
 
75
123
 
@@ -103,11 +151,19 @@ export function instanceOfCourseShare(value: object): value is CourseShare {
103
151
  if (!('id' in value) || value['id'] === undefined) return false;
104
152
  if (!('sourcePortalId' in value) || value['sourcePortalId'] === undefined) return false;
105
153
  if (!('sourcePortalName' in value) || value['sourcePortalName'] === undefined) return false;
154
+ if (!('targetPortalId' in value) || value['targetPortalId'] === undefined) return false;
155
+ if (!('targetPortalName' in value) || value['targetPortalName'] === undefined) return false;
106
156
  if (!('courseId' in value) || value['courseId'] === undefined) return false;
107
157
  if (!('courseName' in value) || value['courseName'] === undefined) return false;
108
158
  if (!('allowedMode' in value) || value['allowedMode'] === undefined) return false;
109
159
  if (!('state' in value) || value['state'] === undefined) return false;
110
160
  if (!('allowResharing' in value) || value['allowResharing'] === undefined) return false;
161
+ if (!('seatLimit' in value) || value['seatLimit'] === undefined) return false;
162
+ if (!('originCatalogId' in value) || value['originCatalogId'] === undefined) return false;
163
+ if (!('originCatalogName' in value) || value['originCatalogName'] === undefined) return false;
164
+ if (!('offeredAt' in value) || value['offeredAt'] === undefined) return false;
165
+ if (!('respondedAt' in value) || value['respondedAt'] === undefined) return false;
166
+ if (!('revokedAt' in value) || value['revokedAt'] === undefined) return false;
111
167
  return true;
112
168
  }
113
169
 
@@ -124,11 +180,19 @@ export function CourseShareFromJSONTyped(json: any, ignoreDiscriminator: boolean
124
180
  'id': json['id'],
125
181
  'sourcePortalId': json['source_portal_id'],
126
182
  'sourcePortalName': json['source_portal_name'],
183
+ 'targetPortalId': json['target_portal_id'],
184
+ 'targetPortalName': json['target_portal_name'],
127
185
  'courseId': json['course_id'],
128
186
  'courseName': json['course_name'],
129
187
  'allowedMode': json['allowed_mode'],
130
188
  'state': json['state'],
131
189
  'allowResharing': json['allow_resharing'],
190
+ 'seatLimit': json['seat_limit'],
191
+ 'originCatalogId': json['origin_catalog_id'],
192
+ 'originCatalogName': json['origin_catalog_name'],
193
+ 'offeredAt': (new Date(json['offered_at'])),
194
+ 'respondedAt': (json['responded_at'] == null ? null : new Date(json['responded_at'])),
195
+ 'revokedAt': (json['revoked_at'] == null ? null : new Date(json['revoked_at'])),
132
196
  };
133
197
  }
134
198
 
@@ -146,11 +210,19 @@ export function CourseShareToJSONTyped(value?: CourseShare | null, ignoreDiscrim
146
210
  'id': value['id'],
147
211
  'source_portal_id': value['sourcePortalId'],
148
212
  'source_portal_name': value['sourcePortalName'],
213
+ 'target_portal_id': value['targetPortalId'],
214
+ 'target_portal_name': value['targetPortalName'],
149
215
  'course_id': value['courseId'],
150
216
  'course_name': value['courseName'],
151
217
  'allowed_mode': value['allowedMode'],
152
218
  'state': value['state'],
153
219
  'allow_resharing': value['allowResharing'],
220
+ 'seat_limit': value['seatLimit'],
221
+ 'origin_catalog_id': value['originCatalogId'],
222
+ 'origin_catalog_name': value['originCatalogName'],
223
+ 'offered_at': value['offeredAt'].toISOString(),
224
+ 'responded_at': value['respondedAt'] == null ? value['respondedAt'] : value['respondedAt'].toISOString(),
225
+ 'revoked_at': value['revokedAt'] == null ? value['revokedAt'] : value['revokedAt'].toISOString(),
154
226
  };
155
227
  }
156
228
 
@@ -0,0 +1,110 @@
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
+ import type { CourseCatalog } from './CourseCatalog';
17
+ import {
18
+ CourseCatalogFromJSON,
19
+ CourseCatalogFromJSONTyped,
20
+ CourseCatalogToJSON,
21
+ CourseCatalogToJSONTyped,
22
+ } from './CourseCatalog';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface GetCourseCatalogList
28
+ */
29
+ export interface GetCourseCatalogList {
30
+ /**
31
+ * The current page number
32
+ * @type {number}
33
+ * @memberof GetCourseCatalogList
34
+ */
35
+ page: number;
36
+ /**
37
+ * The number of items per page
38
+ * @type {number}
39
+ * @memberof GetCourseCatalogList
40
+ */
41
+ pageSize: number;
42
+ /**
43
+ * The total number of pages
44
+ * @type {number}
45
+ * @memberof GetCourseCatalogList
46
+ */
47
+ totalPages: number;
48
+ /**
49
+ * The total number of items
50
+ * @type {number}
51
+ * @memberof GetCourseCatalogList
52
+ */
53
+ totalItems: number;
54
+ /**
55
+ *
56
+ * @type {Array<CourseCatalog>}
57
+ * @memberof GetCourseCatalogList
58
+ */
59
+ items: Array<CourseCatalog>;
60
+ }
61
+
62
+ /**
63
+ * Check if a given object implements the GetCourseCatalogList interface.
64
+ */
65
+ export function instanceOfGetCourseCatalogList(value: object): value is GetCourseCatalogList {
66
+ if (!('page' in value) || value['page'] === undefined) return false;
67
+ if (!('pageSize' in value) || value['pageSize'] === undefined) return false;
68
+ if (!('totalPages' in value) || value['totalPages'] === undefined) return false;
69
+ if (!('totalItems' in value) || value['totalItems'] === undefined) return false;
70
+ if (!('items' in value) || value['items'] === undefined) return false;
71
+ return true;
72
+ }
73
+
74
+ export function GetCourseCatalogListFromJSON(json: any): GetCourseCatalogList {
75
+ return GetCourseCatalogListFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function GetCourseCatalogListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseCatalogList {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'page': json['page'],
85
+ 'pageSize': json['pageSize'],
86
+ 'totalPages': json['totalPages'],
87
+ 'totalItems': json['totalItems'],
88
+ 'items': ((json['items'] as Array<any>).map(CourseCatalogFromJSON)),
89
+ };
90
+ }
91
+
92
+ export function GetCourseCatalogListToJSON(json: any): GetCourseCatalogList {
93
+ return GetCourseCatalogListToJSONTyped(json, false);
94
+ }
95
+
96
+ export function GetCourseCatalogListToJSONTyped(value?: GetCourseCatalogList | null, ignoreDiscriminator: boolean = false): any {
97
+ if (value == null) {
98
+ return value;
99
+ }
100
+
101
+ return {
102
+
103
+ 'page': value['page'],
104
+ 'pageSize': value['pageSize'],
105
+ 'totalPages': value['totalPages'],
106
+ 'totalItems': value['totalItems'],
107
+ 'items': ((value['items'] as Array<any>).map(CourseCatalogToJSON)),
108
+ };
109
+ }
110
+
@@ -31,6 +31,12 @@ export interface GetCourseExport {
31
31
  * @memberof GetCourseExport
32
32
  */
33
33
  courseId: string;
34
+ /**
35
+ * Display name of the course being exported
36
+ * @type {string}
37
+ * @memberof GetCourseExport
38
+ */
39
+ courseName: string;
34
40
  /**
35
41
  * Immutable version used by the export; null only for historical records.
36
42
  * @type {string}
@@ -116,6 +122,7 @@ export type GetCourseExportStatusEnum = typeof GetCourseExportStatusEnum[keyof t
116
122
  export function instanceOfGetCourseExport(value: object): value is GetCourseExport {
117
123
  if (!('id' in value) || value['id'] === undefined) return false;
118
124
  if (!('courseId' in value) || value['courseId'] === undefined) return false;
125
+ if (!('courseName' in value) || value['courseName'] === undefined) return false;
119
126
  if (!('exportType' in value) || value['exportType'] === undefined) return false;
120
127
  if (!('sectionIds' in value) || value['sectionIds'] === undefined) return false;
121
128
  if (!('createdBy' in value) || value['createdBy'] === undefined) return false;
@@ -136,6 +143,7 @@ export function GetCourseExportFromJSONTyped(json: any, ignoreDiscriminator: boo
136
143
 
137
144
  'id': json['id'],
138
145
  'courseId': json['course_id'],
146
+ 'courseName': json['course_name'],
139
147
  'courseVersionId': json['course_version_id'] == null ? undefined : json['course_version_id'],
140
148
  'exportType': json['export_type'],
141
149
  'sectionIds': json['section_ids'],
@@ -161,6 +169,7 @@ export function GetCourseExportToJSONTyped(value?: GetCourseExport | null, ignor
161
169
 
162
170
  'id': value['id'],
163
171
  'course_id': value['courseId'],
172
+ 'course_name': value['courseName'],
164
173
  'course_version_id': value['courseVersionId'],
165
174
  'export_type': value['exportType'],
166
175
  'section_ids': value['sectionIds'],