@easyedu/js-lsm-api 1.106.0 → 1.107.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.
@@ -1,20 +1,28 @@
1
1
 
2
2
  # CourseShare
3
3
 
4
- Shape returned by `GET /course-shares/offered-to-me`. Includes joined source portal name and course name so the child portal can render an inbox without follow-up requests.
4
+ Shared shape returned by the incoming and outgoing course-share lists. All resource identifiers are public external IDs so clients can link to the related course, portal, and catalog without exposing database keys.
5
5
 
6
6
  ## Properties
7
7
 
8
8
  Name | Type
9
9
  ------------ | -------------
10
10
  `id` | string
11
- `sourcePortalId` | number
11
+ `sourcePortalId` | string
12
12
  `sourcePortalName` | string
13
- `courseId` | number
13
+ `targetPortalId` | string
14
+ `targetPortalName` | string
15
+ `courseId` | string
14
16
  `courseName` | string
15
17
  `allowedMode` | string
16
18
  `state` | string
17
19
  `allowResharing` | boolean
20
+ `seatLimit` | number
21
+ `originCatalogId` | string
22
+ `originCatalogName` | string
23
+ `offeredAt` | Date
24
+ `respondedAt` | Date
25
+ `revokedAt` | Date
18
26
 
19
27
  ## Example
20
28
 
@@ -26,11 +34,19 @@ const example = {
26
34
  "id": null,
27
35
  "sourcePortalId": null,
28
36
  "sourcePortalName": null,
37
+ "targetPortalId": null,
38
+ "targetPortalName": null,
29
39
  "courseId": null,
30
40
  "courseName": null,
31
41
  "allowedMode": null,
32
42
  "state": null,
33
43
  "allowResharing": null,
44
+ "seatLimit": null,
45
+ "originCatalogId": null,
46
+ "originCatalogName": null,
47
+ "offeredAt": null,
48
+ "respondedAt": null,
49
+ "revokedAt": null,
34
50
  } satisfies CourseShare
35
51
 
36
52
  console.log(example)
@@ -7,8 +7,8 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
7
7
  | [**deleteCourseShare**](CourseShareApi.md#deletecourseshare) | **DELETE** /course-shares/{shareId} | Revoke a share |
8
8
  | [**getCourseSharesOfferedByMe**](CourseShareApi.md#getcoursesharesofferedbyme) | **GET** /course-shares/offered-by-me | List shares the current portal has offered out |
9
9
  | [**getCourseSharesOfferedToMe**](CourseShareApi.md#getcoursesharesofferedtome) | **GET** /course-shares/offered-to-me | List shares offered to the current portal |
10
- | [**postOfferCatalog**](CourseShareApi.md#postoffercatalog) | **POST** /catalogs/{catalogId}/shares | Offer every course in a catalog to a descendant portal |
11
- | [**postOfferCourse**](CourseShareApi.md#postoffercourse) | **POST** /courses/{courseId}/shares | Offer a single course to a descendant portal |
10
+ | [**postOfferCatalog**](CourseShareApi.md#postoffercatalog) | **POST** /catalogs/{catalogId}/shares | Offer every course in a catalog to another portal |
11
+ | [**postOfferCourse**](CourseShareApi.md#postoffercourse) | **POST** /courses/{courseId}/shares | Offer a single course to another portal |
12
12
  | [**postUnrevokeShare**](CourseShareApi.md#postunrevokeshare) | **POST** /course-shares/{shareId}/unrevoke | Restore a previously revoked share |
13
13
  | [**putAcceptClone**](CourseShareApi.md#putacceptclone) | **PUT** /course-shares/{shareId}/accept-clone | Accept an offer as a clone (deep copy into your portal) |
14
14
  | [**putAcceptMirror**](CourseShareApi.md#putacceptmirror) | **PUT** /course-shares/{shareId}/accept-mirror | Accept an offer as a mirror (no copy, live link to source) |
@@ -87,7 +87,7 @@ No authorization required
87
87
 
88
88
  ## getCourseSharesOfferedByMe
89
89
 
90
- > Array<CourseShare> getCourseSharesOfferedByMe()
90
+ > Array<CourseShare> getCourseSharesOfferedByMe(state)
91
91
 
92
92
  List shares the current portal has offered out
93
93
 
@@ -104,8 +104,13 @@ async function example() {
104
104
  console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
105
105
  const api = new CourseShareApi();
106
106
 
107
+ const body = {
108
+ // 'offered' | 'accepted_mirror' | 'accepted_clone' | 'declined' | 'revoked' | Filter by share state (case-insensitive) (optional)
109
+ state: state_example,
110
+ } satisfies GetCourseSharesOfferedByMeRequest;
111
+
107
112
  try {
108
- const data = await api.getCourseSharesOfferedByMe();
113
+ const data = await api.getCourseSharesOfferedByMe(body);
109
114
  console.log(data);
110
115
  } catch (error) {
111
116
  console.error(error);
@@ -118,7 +123,10 @@ example().catch(console.error);
118
123
 
119
124
  ### Parameters
120
125
 
121
- This endpoint does not need any parameter.
126
+
127
+ | Name | Type | Description | Notes |
128
+ |------------- | ------------- | ------------- | -------------|
129
+ | **state** | `offered`, `accepted_mirror`, `accepted_clone`, `declined`, `revoked` | Filter by share state (case-insensitive) | [Optional] [Defaults to `undefined`] [Enum: offered, accepted_mirror, accepted_clone, declined, revoked] |
122
130
 
123
131
  ### Return type
124
132
 
@@ -138,6 +146,7 @@ No authorization required
138
146
  | Status code | Description | Response headers |
139
147
  |-------------|-------------|------------------|
140
148
  | **200** | Shares | - |
149
+ | **400** | Invalid state filter | - |
141
150
 
142
151
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
143
152
 
@@ -214,7 +223,7 @@ No authorization required
214
223
 
215
224
  > PostOfferCatalogResponse postOfferCatalog(catalogId, postOfferCatalog)
216
225
 
217
- Offer every course in a catalog to a descendant portal
226
+ Offer every course in a catalog to another portal
218
227
 
219
228
  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`.
220
229
 
@@ -276,7 +285,8 @@ No authorization required
276
285
  | Status code | Description | Response headers |
277
286
  |-------------|-------------|------------------|
278
287
  | **201** | Catalog offered | - |
279
- | **403** | Catalog not owned by your portal, or target is not a descendant | - |
288
+ | **400** | Target portal is the current portal | - |
289
+ | **403** | Catalog not owned by your portal | - |
280
290
  | **404** | Catalog or target portal not found | - |
281
291
 
282
292
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -286,7 +296,7 @@ No authorization required
286
296
 
287
297
  > PostOfferCourseResponse postOfferCourse(courseId, postOfferCourse)
288
298
 
289
- Offer a single course to a descendant portal
299
+ Offer a single course to another portal
290
300
 
291
301
  ### Example
292
302
 
@@ -346,7 +356,8 @@ No authorization required
346
356
  | Status code | Description | Response headers |
347
357
  |-------------|-------------|------------------|
348
358
  | **201** | Share created | - |
349
- | **403** | Course not owned by your portal, or target is not a descendant | - |
359
+ | **400** | Target portal is the current portal | - |
360
+ | **403** | Course not owned by your portal | - |
350
361
  | **404** | Course or target portal not found | - |
351
362
 
352
363
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -9,6 +9,7 @@ Name | Type
9
9
  ------------ | -------------
10
10
  `id` | string
11
11
  `courseId` | string
12
+ `courseName` | string
12
13
  `courseVersionId` | string
13
14
  `exportType` | string
14
15
  `sectionIds` | Array<string>
@@ -28,6 +29,7 @@ import type { GetCourseExport } from '@easyedu/js-lsm-api'
28
29
  const example = {
29
30
  "id": null,
30
31
  "courseId": null,
32
+ "courseName": null,
31
33
  "courseVersionId": null,
32
34
  "exportType": null,
33
35
  "sectionIds": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.106.0",
3
+ "version": "1.107.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -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];
@@ -43,6 +43,10 @@ export interface DeleteCourseShareRequest {
43
43
  shareId: string;
44
44
  }
45
45
 
46
+ export interface GetCourseSharesOfferedByMeRequest {
47
+ state?: GetCourseSharesOfferedByMeStateEnum;
48
+ }
49
+
46
50
  export interface GetCourseSharesOfferedToMeRequest {
47
51
  state?: GetCourseSharesOfferedToMeStateEnum;
48
52
  }
@@ -127,9 +131,13 @@ export class CourseShareApi extends runtime.BaseAPI {
127
131
  /**
128
132
  * Creates request options for getCourseSharesOfferedByMe without sending the request
129
133
  */
130
- async getCourseSharesOfferedByMeRequestOpts(): Promise<runtime.RequestOpts> {
134
+ async getCourseSharesOfferedByMeRequestOpts(requestParameters: GetCourseSharesOfferedByMeRequest): Promise<runtime.RequestOpts> {
131
135
  const queryParameters: any = {};
132
136
 
137
+ if (requestParameters['state'] != null) {
138
+ queryParameters['state'] = requestParameters['state'];
139
+ }
140
+
133
141
  const headerParameters: runtime.HTTPHeaders = {};
134
142
 
135
143
 
@@ -146,8 +154,8 @@ export class CourseShareApi extends runtime.BaseAPI {
146
154
  /**
147
155
  * List shares the current portal has offered out
148
156
  */
149
- async getCourseSharesOfferedByMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>> {
150
- const requestOptions = await this.getCourseSharesOfferedByMeRequestOpts();
157
+ async getCourseSharesOfferedByMeRaw(requestParameters: GetCourseSharesOfferedByMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>> {
158
+ const requestOptions = await this.getCourseSharesOfferedByMeRequestOpts(requestParameters);
151
159
  const response = await this.request(requestOptions, initOverrides);
152
160
 
153
161
  return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseShareFromJSON));
@@ -156,8 +164,8 @@ export class CourseShareApi extends runtime.BaseAPI {
156
164
  /**
157
165
  * List shares the current portal has offered out
158
166
  */
159
- async getCourseSharesOfferedByMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>> {
160
- const response = await this.getCourseSharesOfferedByMeRaw(initOverrides);
167
+ async getCourseSharesOfferedByMe(requestParameters: GetCourseSharesOfferedByMeRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>> {
168
+ const response = await this.getCourseSharesOfferedByMeRaw(requestParameters, initOverrides);
161
169
  return await response.value();
162
170
  }
163
171
 
@@ -243,7 +251,7 @@ export class CourseShareApi extends runtime.BaseAPI {
243
251
 
244
252
  /**
245
253
  * 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
254
+ * Offer every course in a catalog to another portal
247
255
  */
248
256
  async postOfferCatalogRaw(requestParameters: PostOfferCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostOfferCatalogResponse>> {
249
257
  const requestOptions = await this.postOfferCatalogRequestOpts(requestParameters);
@@ -254,7 +262,7 @@ export class CourseShareApi extends runtime.BaseAPI {
254
262
 
255
263
  /**
256
264
  * 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
265
+ * Offer every course in a catalog to another portal
258
266
  */
259
267
  async postOfferCatalog(requestParameters: PostOfferCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostOfferCatalogResponse> {
260
268
  const response = await this.postOfferCatalogRaw(requestParameters, initOverrides);
@@ -299,7 +307,7 @@ export class CourseShareApi extends runtime.BaseAPI {
299
307
  }
300
308
 
301
309
  /**
302
- * Offer a single course to a descendant portal
310
+ * Offer a single course to another portal
303
311
  */
304
312
  async postOfferCourseRaw(requestParameters: PostOfferCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostOfferCourseResponse>> {
305
313
  const requestOptions = await this.postOfferCourseRequestOpts(requestParameters);
@@ -309,7 +317,7 @@ export class CourseShareApi extends runtime.BaseAPI {
309
317
  }
310
318
 
311
319
  /**
312
- * Offer a single course to a descendant portal
320
+ * Offer a single course to another portal
313
321
  */
314
322
  async postOfferCourse(requestParameters: PostOfferCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostOfferCourseResponse> {
315
323
  const response = await this.postOfferCourseRaw(requestParameters, initOverrides);
@@ -494,6 +502,17 @@ export class CourseShareApi extends runtime.BaseAPI {
494
502
 
495
503
  }
496
504
 
505
+ /**
506
+ * @export
507
+ */
508
+ export const GetCourseSharesOfferedByMeStateEnum = {
509
+ Offered: 'offered',
510
+ AcceptedMirror: 'accepted_mirror',
511
+ AcceptedClone: 'accepted_clone',
512
+ Declined: 'declined',
513
+ Revoked: 'revoked'
514
+ } as const;
515
+ export type GetCourseSharesOfferedByMeStateEnum = typeof GetCourseSharesOfferedByMeStateEnum[keyof typeof GetCourseSharesOfferedByMeStateEnum];
497
516
  /**
498
517
  * @export
499
518
  */
@@ -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
 
@@ -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'],
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface PostOfferCatalog {
22
22
  /**
23
- * External ID of the target (descendant) portal
23
+ * External ID of the target portal
24
24
  * @type {string}
25
25
  * @memberof PostOfferCatalog
26
26
  */
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface PostOfferCourse {
22
22
  /**
23
- * External ID of the target (descendant) portal
23
+ * External ID of the target portal
24
24
  * @type {string}
25
25
  * @memberof PostOfferCourse
26
26
  */