@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
@@ -898,6 +898,53 @@ export class CourseApi extends runtime.BaseAPI {
898
898
  return yield response.value();
899
899
  });
900
900
  }
901
+ /**
902
+ * Creates request options for getPortalCourseExports without sending the request
903
+ */
904
+ getPortalCourseExportsRequestOpts(requestParameters) {
905
+ return __awaiter(this, void 0, void 0, function* () {
906
+ const queryParameters = {};
907
+ if (requestParameters['page'] != null) {
908
+ queryParameters['page'] = requestParameters['page'];
909
+ }
910
+ if (requestParameters['pageSize'] != null) {
911
+ queryParameters['page_size'] = requestParameters['pageSize'];
912
+ }
913
+ if (requestParameters['courseId'] != null) {
914
+ queryParameters['course_id'] = requestParameters['courseId'];
915
+ }
916
+ if (requestParameters['status'] != null) {
917
+ queryParameters['status'] = requestParameters['status'];
918
+ }
919
+ const headerParameters = {};
920
+ let urlPath = `/course-exports`;
921
+ return {
922
+ path: urlPath,
923
+ method: 'GET',
924
+ headers: headerParameters,
925
+ query: queryParameters,
926
+ };
927
+ });
928
+ }
929
+ /**
930
+ * List SCORM exports owned by the current portal
931
+ */
932
+ getPortalCourseExportsRaw(requestParameters, initOverrides) {
933
+ return __awaiter(this, void 0, void 0, function* () {
934
+ const requestOptions = yield this.getPortalCourseExportsRequestOpts(requestParameters);
935
+ const response = yield this.request(requestOptions, initOverrides);
936
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseExportListFromJSON(jsonValue));
937
+ });
938
+ }
939
+ /**
940
+ * List SCORM exports owned by the current portal
941
+ */
942
+ getPortalCourseExports() {
943
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
944
+ const response = yield this.getPortalCourseExportsRaw(requestParameters, initOverrides);
945
+ return yield response.value();
946
+ });
947
+ }
901
948
  /**
902
949
  * Creates request options for postCourse without sending the request
903
950
  */
@@ -1131,7 +1178,7 @@ export class CourseApi extends runtime.BaseAPI {
1131
1178
  });
1132
1179
  }
1133
1180
  /**
1134
- * 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
1181
+ * 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
1135
1182
  * Create a new SCORM export for a course
1136
1183
  */
1137
1184
  postCourseExportRaw(requestParameters, initOverrides) {
@@ -1142,7 +1189,7 @@ export class CourseApi extends runtime.BaseAPI {
1142
1189
  });
1143
1190
  }
1144
1191
  /**
1145
- * 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
1192
+ * 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
1146
1193
  * Create a new SCORM export for a course
1147
1194
  */
1148
1195
  postCourseExport(requestParameters, initOverrides) {
@@ -1894,3 +1941,12 @@ export const GetCourseEnrollmentsTypeEnum = {
1894
1941
  Student: 'student',
1895
1942
  Instructor: 'instructor'
1896
1943
  };
1944
+ /**
1945
+ * @export
1946
+ */
1947
+ export const GetPortalCourseExportsStatusEnum = {
1948
+ Pending: 'PENDING',
1949
+ Processing: 'PROCESSING',
1950
+ Completed: 'COMPLETED',
1951
+ Failed: 'FAILED'
1952
+ };
@@ -12,6 +12,7 @@
12
12
  import * as runtime from '../runtime';
13
13
  import { type CourseCatalog } from '../models/CourseCatalog';
14
14
  import { type GetCourse } from '../models/GetCourse';
15
+ import { type GetCourseCatalogList } from '../models/GetCourseCatalogList';
15
16
  import { type PostCourseCatalog } from '../models/PostCourseCatalog';
16
17
  import { type PutCourseCatalog } from '../models/PutCourseCatalog';
17
18
  export interface AddCourseToCatalogRequest {
@@ -27,6 +28,10 @@ export interface GetCatalogCoursesRequest {
27
28
  export interface GetCourseCatalogRequest {
28
29
  catalogId: string;
29
30
  }
31
+ export interface GetCourseCatalogsRequest {
32
+ page?: number;
33
+ pageSize?: number;
34
+ }
30
35
  export interface PostCourseCatalogRequest {
31
36
  postCourseCatalog: PostCourseCatalog;
32
37
  }
@@ -93,15 +98,15 @@ export declare class CourseCatalogApi extends runtime.BaseAPI {
93
98
  /**
94
99
  * Creates request options for getCourseCatalogs without sending the request
95
100
  */
96
- getCourseCatalogsRequestOpts(): Promise<runtime.RequestOpts>;
101
+ getCourseCatalogsRequestOpts(requestParameters: GetCourseCatalogsRequest): Promise<runtime.RequestOpts>;
97
102
  /**
98
103
  * List catalogs in the current portal
99
104
  */
100
- getCourseCatalogsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseCatalog>>>;
105
+ getCourseCatalogsRaw(requestParameters: GetCourseCatalogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseCatalogList>>;
101
106
  /**
102
107
  * List catalogs in the current portal
103
108
  */
104
- getCourseCatalogs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseCatalog>>;
109
+ getCourseCatalogs(requestParameters?: GetCourseCatalogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseCatalogList>;
105
110
  /**
106
111
  * Creates request options for postCourseCatalog without sending the request
107
112
  */
@@ -23,6 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
23
23
  import * as runtime from '../runtime';
24
24
  import { CourseCatalogFromJSON, } from '../models/CourseCatalog';
25
25
  import { GetCourseFromJSON, } from '../models/GetCourse';
26
+ import { GetCourseCatalogListFromJSON, } from '../models/GetCourseCatalogList';
26
27
  import { PostCourseCatalogToJSON, } from '../models/PostCourseCatalog';
27
28
  import { PutCourseCatalogToJSON, } from '../models/PutCourseCatalog';
28
29
  /**
@@ -190,9 +191,15 @@ export class CourseCatalogApi extends runtime.BaseAPI {
190
191
  /**
191
192
  * Creates request options for getCourseCatalogs without sending the request
192
193
  */
193
- getCourseCatalogsRequestOpts() {
194
+ getCourseCatalogsRequestOpts(requestParameters) {
194
195
  return __awaiter(this, void 0, void 0, function* () {
195
196
  const queryParameters = {};
197
+ if (requestParameters['page'] != null) {
198
+ queryParameters['page'] = requestParameters['page'];
199
+ }
200
+ if (requestParameters['pageSize'] != null) {
201
+ queryParameters['page_size'] = requestParameters['pageSize'];
202
+ }
196
203
  const headerParameters = {};
197
204
  let urlPath = `/catalogs`;
198
205
  return {
@@ -206,19 +213,19 @@ export class CourseCatalogApi extends runtime.BaseAPI {
206
213
  /**
207
214
  * List catalogs in the current portal
208
215
  */
209
- getCourseCatalogsRaw(initOverrides) {
216
+ getCourseCatalogsRaw(requestParameters, initOverrides) {
210
217
  return __awaiter(this, void 0, void 0, function* () {
211
- const requestOptions = yield this.getCourseCatalogsRequestOpts();
218
+ const requestOptions = yield this.getCourseCatalogsRequestOpts(requestParameters);
212
219
  const response = yield this.request(requestOptions, initOverrides);
213
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseCatalogFromJSON));
220
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseCatalogListFromJSON(jsonValue));
214
221
  });
215
222
  }
216
223
  /**
217
224
  * List catalogs in the current portal
218
225
  */
219
- getCourseCatalogs(initOverrides) {
220
- return __awaiter(this, void 0, void 0, function* () {
221
- const response = yield this.getCourseCatalogsRaw(initOverrides);
226
+ getCourseCatalogs() {
227
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
228
+ const response = yield this.getCourseCatalogsRaw(requestParameters, initOverrides);
222
229
  return yield response.value();
223
230
  });
224
231
  }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { type CourseShare } from '../models/CourseShare';
13
+ import { type GetCourseShareList } from '../models/GetCourseShareList';
14
14
  import { type PostOfferCatalog } from '../models/PostOfferCatalog';
15
15
  import { type PostOfferCatalogResponse } from '../models/PostOfferCatalogResponse';
16
16
  import { type PostOfferCourse } from '../models/PostOfferCourse';
@@ -18,7 +18,15 @@ import { type PostOfferCourseResponse } from '../models/PostOfferCourseResponse'
18
18
  export interface DeleteCourseShareRequest {
19
19
  shareId: string;
20
20
  }
21
+ export interface GetCourseSharesOfferedByMeRequest {
22
+ page?: number;
23
+ pageSize?: number;
24
+ courseId?: string;
25
+ state?: GetCourseSharesOfferedByMeStateEnum;
26
+ }
21
27
  export interface GetCourseSharesOfferedToMeRequest {
28
+ page?: number;
29
+ pageSize?: number;
22
30
  state?: GetCourseSharesOfferedToMeStateEnum;
23
31
  }
24
32
  export interface PostOfferCatalogRequest {
@@ -62,41 +70,41 @@ export declare class CourseShareApi extends runtime.BaseAPI {
62
70
  /**
63
71
  * Creates request options for getCourseSharesOfferedByMe without sending the request
64
72
  */
65
- getCourseSharesOfferedByMeRequestOpts(): Promise<runtime.RequestOpts>;
73
+ getCourseSharesOfferedByMeRequestOpts(requestParameters: GetCourseSharesOfferedByMeRequest): Promise<runtime.RequestOpts>;
66
74
  /**
67
75
  * List shares the current portal has offered out
68
76
  */
69
- getCourseSharesOfferedByMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>>;
77
+ getCourseSharesOfferedByMeRaw(requestParameters: GetCourseSharesOfferedByMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseShareList>>;
70
78
  /**
71
79
  * List shares the current portal has offered out
72
80
  */
73
- getCourseSharesOfferedByMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>>;
81
+ getCourseSharesOfferedByMe(requestParameters?: GetCourseSharesOfferedByMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseShareList>;
74
82
  /**
75
83
  * Creates request options for getCourseSharesOfferedToMe without sending the request
76
84
  */
77
85
  getCourseSharesOfferedToMeRequestOpts(requestParameters: GetCourseSharesOfferedToMeRequest): Promise<runtime.RequestOpts>;
78
86
  /**
79
- * 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.
87
+ * 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.
80
88
  * List shares offered to the current portal
81
89
  */
82
- getCourseSharesOfferedToMeRaw(requestParameters: GetCourseSharesOfferedToMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>>;
90
+ getCourseSharesOfferedToMeRaw(requestParameters: GetCourseSharesOfferedToMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseShareList>>;
83
91
  /**
84
- * 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.
92
+ * 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.
85
93
  * List shares offered to the current portal
86
94
  */
87
- getCourseSharesOfferedToMe(requestParameters?: GetCourseSharesOfferedToMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>>;
95
+ getCourseSharesOfferedToMe(requestParameters?: GetCourseSharesOfferedToMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseShareList>;
88
96
  /**
89
97
  * Creates request options for postOfferCatalog without sending the request
90
98
  */
91
99
  postOfferCatalogRequestOpts(requestParameters: PostOfferCatalogRequest): Promise<runtime.RequestOpts>;
92
100
  /**
93
101
  * 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`.
94
- * Offer every course in a catalog to a descendant portal
102
+ * Offer every course in a catalog to another portal
95
103
  */
96
104
  postOfferCatalogRaw(requestParameters: PostOfferCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostOfferCatalogResponse>>;
97
105
  /**
98
106
  * 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`.
99
- * Offer every course in a catalog to a descendant portal
107
+ * Offer every course in a catalog to another portal
100
108
  */
101
109
  postOfferCatalog(requestParameters: PostOfferCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostOfferCatalogResponse>;
102
110
  /**
@@ -104,11 +112,11 @@ export declare class CourseShareApi extends runtime.BaseAPI {
104
112
  */
105
113
  postOfferCourseRequestOpts(requestParameters: PostOfferCourseRequest): Promise<runtime.RequestOpts>;
106
114
  /**
107
- * Offer a single course to a descendant portal
115
+ * Offer a single course to another portal
108
116
  */
109
117
  postOfferCourseRaw(requestParameters: PostOfferCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostOfferCourseResponse>>;
110
118
  /**
111
- * Offer a single course to a descendant portal
119
+ * Offer a single course to another portal
112
120
  */
113
121
  postOfferCourse(requestParameters: PostOfferCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostOfferCourseResponse>;
114
122
  /**
@@ -160,6 +168,17 @@ export declare class CourseShareApi extends runtime.BaseAPI {
160
168
  */
161
169
  putDeclineShare(requestParameters: PutDeclineShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
162
170
  }
171
+ /**
172
+ * @export
173
+ */
174
+ export declare const GetCourseSharesOfferedByMeStateEnum: {
175
+ readonly Offered: "offered";
176
+ readonly AcceptedMirror: "accepted_mirror";
177
+ readonly AcceptedClone: "accepted_clone";
178
+ readonly Declined: "declined";
179
+ readonly Revoked: "revoked";
180
+ };
181
+ export type GetCourseSharesOfferedByMeStateEnum = typeof GetCourseSharesOfferedByMeStateEnum[keyof typeof GetCourseSharesOfferedByMeStateEnum];
163
182
  /**
164
183
  * @export
165
184
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { CourseShareFromJSON, } from '../models/CourseShare';
24
+ import { GetCourseShareListFromJSON, } from '../models/GetCourseShareList';
25
25
  import { PostOfferCatalogToJSON, } from '../models/PostOfferCatalog';
26
26
  import { PostOfferCatalogResponseFromJSON, } from '../models/PostOfferCatalogResponse';
27
27
  import { PostOfferCourseToJSON, } from '../models/PostOfferCourse';
@@ -73,9 +73,21 @@ export class CourseShareApi extends runtime.BaseAPI {
73
73
  /**
74
74
  * Creates request options for getCourseSharesOfferedByMe without sending the request
75
75
  */
76
- getCourseSharesOfferedByMeRequestOpts() {
76
+ getCourseSharesOfferedByMeRequestOpts(requestParameters) {
77
77
  return __awaiter(this, void 0, void 0, function* () {
78
78
  const queryParameters = {};
79
+ if (requestParameters['page'] != null) {
80
+ queryParameters['page'] = requestParameters['page'];
81
+ }
82
+ if (requestParameters['pageSize'] != null) {
83
+ queryParameters['page_size'] = requestParameters['pageSize'];
84
+ }
85
+ if (requestParameters['courseId'] != null) {
86
+ queryParameters['course_id'] = requestParameters['courseId'];
87
+ }
88
+ if (requestParameters['state'] != null) {
89
+ queryParameters['state'] = requestParameters['state'];
90
+ }
79
91
  const headerParameters = {};
80
92
  let urlPath = `/course-shares/offered-by-me`;
81
93
  return {
@@ -89,19 +101,19 @@ export class CourseShareApi extends runtime.BaseAPI {
89
101
  /**
90
102
  * List shares the current portal has offered out
91
103
  */
92
- getCourseSharesOfferedByMeRaw(initOverrides) {
104
+ getCourseSharesOfferedByMeRaw(requestParameters, initOverrides) {
93
105
  return __awaiter(this, void 0, void 0, function* () {
94
- const requestOptions = yield this.getCourseSharesOfferedByMeRequestOpts();
106
+ const requestOptions = yield this.getCourseSharesOfferedByMeRequestOpts(requestParameters);
95
107
  const response = yield this.request(requestOptions, initOverrides);
96
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseShareFromJSON));
108
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseShareListFromJSON(jsonValue));
97
109
  });
98
110
  }
99
111
  /**
100
112
  * List shares the current portal has offered out
101
113
  */
102
- getCourseSharesOfferedByMe(initOverrides) {
103
- return __awaiter(this, void 0, void 0, function* () {
104
- const response = yield this.getCourseSharesOfferedByMeRaw(initOverrides);
114
+ getCourseSharesOfferedByMe() {
115
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
116
+ const response = yield this.getCourseSharesOfferedByMeRaw(requestParameters, initOverrides);
105
117
  return yield response.value();
106
118
  });
107
119
  }
@@ -111,6 +123,12 @@ export class CourseShareApi extends runtime.BaseAPI {
111
123
  getCourseSharesOfferedToMeRequestOpts(requestParameters) {
112
124
  return __awaiter(this, void 0, void 0, function* () {
113
125
  const queryParameters = {};
126
+ if (requestParameters['page'] != null) {
127
+ queryParameters['page'] = requestParameters['page'];
128
+ }
129
+ if (requestParameters['pageSize'] != null) {
130
+ queryParameters['page_size'] = requestParameters['pageSize'];
131
+ }
114
132
  if (requestParameters['state'] != null) {
115
133
  queryParameters['state'] = requestParameters['state'];
116
134
  }
@@ -125,18 +143,18 @@ export class CourseShareApi extends runtime.BaseAPI {
125
143
  });
126
144
  }
127
145
  /**
128
- * 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.
146
+ * 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.
129
147
  * List shares offered to the current portal
130
148
  */
131
149
  getCourseSharesOfferedToMeRaw(requestParameters, initOverrides) {
132
150
  return __awaiter(this, void 0, void 0, function* () {
133
151
  const requestOptions = yield this.getCourseSharesOfferedToMeRequestOpts(requestParameters);
134
152
  const response = yield this.request(requestOptions, initOverrides);
135
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseShareFromJSON));
153
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseShareListFromJSON(jsonValue));
136
154
  });
137
155
  }
138
156
  /**
139
- * 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.
157
+ * 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.
140
158
  * List shares offered to the current portal
141
159
  */
142
160
  getCourseSharesOfferedToMe() {
@@ -172,7 +190,7 @@ export class CourseShareApi extends runtime.BaseAPI {
172
190
  }
173
191
  /**
174
192
  * 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`.
175
- * Offer every course in a catalog to a descendant portal
193
+ * Offer every course in a catalog to another portal
176
194
  */
177
195
  postOfferCatalogRaw(requestParameters, initOverrides) {
178
196
  return __awaiter(this, void 0, void 0, function* () {
@@ -183,7 +201,7 @@ export class CourseShareApi extends runtime.BaseAPI {
183
201
  }
184
202
  /**
185
203
  * 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`.
186
- * Offer every course in a catalog to a descendant portal
204
+ * Offer every course in a catalog to another portal
187
205
  */
188
206
  postOfferCatalog(requestParameters, initOverrides) {
189
207
  return __awaiter(this, void 0, void 0, function* () {
@@ -217,7 +235,7 @@ export class CourseShareApi extends runtime.BaseAPI {
217
235
  });
218
236
  }
219
237
  /**
220
- * Offer a single course to a descendant portal
238
+ * Offer a single course to another portal
221
239
  */
222
240
  postOfferCourseRaw(requestParameters, initOverrides) {
223
241
  return __awaiter(this, void 0, void 0, function* () {
@@ -227,7 +245,7 @@ export class CourseShareApi extends runtime.BaseAPI {
227
245
  });
228
246
  }
229
247
  /**
230
- * Offer a single course to a descendant portal
248
+ * Offer a single course to another portal
231
249
  */
232
250
  postOfferCourse(requestParameters, initOverrides) {
233
251
  return __awaiter(this, void 0, void 0, function* () {
@@ -388,6 +406,16 @@ export class CourseShareApi extends runtime.BaseAPI {
388
406
  });
389
407
  }
390
408
  }
409
+ /**
410
+ * @export
411
+ */
412
+ export const GetCourseSharesOfferedByMeStateEnum = {
413
+ Offered: 'offered',
414
+ AcceptedMirror: 'accepted_mirror',
415
+ AcceptedClone: 'accepted_clone',
416
+ Declined: 'declined',
417
+ Revoked: 'revoked'
418
+ };
391
419
  /**
392
420
  * @export
393
421
  */
@@ -10,9 +10,9 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Shape returned by `GET /course-shares/offered-to-me`. Includes joined source
14
- * portal name and course name so the child portal can render an inbox without
15
- * follow-up requests.
13
+ * Shared shape returned by the incoming and outgoing course-share lists. All
14
+ * resource identifiers are public external IDs so clients can link to the
15
+ * related course, portal, and catalog without exposing database keys.
16
16
  *
17
17
  * @export
18
18
  * @interface CourseShare
@@ -25,11 +25,11 @@ export interface CourseShare {
25
25
  */
26
26
  id: string;
27
27
  /**
28
- * Internal ID of the offering portal
29
- * @type {number}
28
+ * External ID of the offering portal
29
+ * @type {string}
30
30
  * @memberof CourseShare
31
31
  */
32
- sourcePortalId: number;
32
+ sourcePortalId: string;
33
33
  /**
34
34
  * Display name of the offering portal
35
35
  * @type {string}
@@ -37,11 +37,23 @@ export interface CourseShare {
37
37
  */
38
38
  sourcePortalName: string;
39
39
  /**
40
- * Internal ID of the offered course
41
- * @type {number}
40
+ * External ID of the receiving portal
41
+ * @type {string}
42
+ * @memberof CourseShare
43
+ */
44
+ targetPortalId: string;
45
+ /**
46
+ * Display name of the receiving portal
47
+ * @type {string}
48
+ * @memberof CourseShare
49
+ */
50
+ targetPortalName: string;
51
+ /**
52
+ * External ID of the offered course
53
+ * @type {string}
42
54
  * @memberof CourseShare
43
55
  */
44
- courseId: number;
56
+ courseId: string;
45
57
  /**
46
58
  * Display name of the offered course
47
59
  * @type {string}
@@ -66,6 +78,42 @@ export interface CourseShare {
66
78
  * @memberof CourseShare
67
79
  */
68
80
  allowResharing: boolean;
81
+ /**
82
+ * Per-share seat cap; null means unlimited
83
+ * @type {number}
84
+ * @memberof CourseShare
85
+ */
86
+ seatLimit: number | null;
87
+ /**
88
+ * External ID of the catalog that produced the offer, when applicable
89
+ * @type {string}
90
+ * @memberof CourseShare
91
+ */
92
+ originCatalogId: string | null;
93
+ /**
94
+ * Display name of the catalog that produced the offer, when applicable
95
+ * @type {string}
96
+ * @memberof CourseShare
97
+ */
98
+ originCatalogName: string | null;
99
+ /**
100
+ *
101
+ * @type {Date}
102
+ * @memberof CourseShare
103
+ */
104
+ offeredAt: Date;
105
+ /**
106
+ *
107
+ * @type {Date}
108
+ * @memberof CourseShare
109
+ */
110
+ respondedAt: Date | null;
111
+ /**
112
+ *
113
+ * @type {Date}
114
+ * @memberof CourseShare
115
+ */
116
+ revokedAt: Date | null;
69
117
  }
70
118
  /**
71
119
  * @export
@@ -39,6 +39,10 @@ export function instanceOfCourseShare(value) {
39
39
  return false;
40
40
  if (!('sourcePortalName' in value) || value['sourcePortalName'] === undefined)
41
41
  return false;
42
+ if (!('targetPortalId' in value) || value['targetPortalId'] === undefined)
43
+ return false;
44
+ if (!('targetPortalName' in value) || value['targetPortalName'] === undefined)
45
+ return false;
42
46
  if (!('courseId' in value) || value['courseId'] === undefined)
43
47
  return false;
44
48
  if (!('courseName' in value) || value['courseName'] === undefined)
@@ -49,6 +53,18 @@ export function instanceOfCourseShare(value) {
49
53
  return false;
50
54
  if (!('allowResharing' in value) || value['allowResharing'] === undefined)
51
55
  return false;
56
+ if (!('seatLimit' in value) || value['seatLimit'] === undefined)
57
+ return false;
58
+ if (!('originCatalogId' in value) || value['originCatalogId'] === undefined)
59
+ return false;
60
+ if (!('originCatalogName' in value) || value['originCatalogName'] === undefined)
61
+ return false;
62
+ if (!('offeredAt' in value) || value['offeredAt'] === undefined)
63
+ return false;
64
+ if (!('respondedAt' in value) || value['respondedAt'] === undefined)
65
+ return false;
66
+ if (!('revokedAt' in value) || value['revokedAt'] === undefined)
67
+ return false;
52
68
  return true;
53
69
  }
54
70
  export function CourseShareFromJSON(json) {
@@ -62,11 +78,19 @@ export function CourseShareFromJSONTyped(json, ignoreDiscriminator) {
62
78
  'id': json['id'],
63
79
  'sourcePortalId': json['source_portal_id'],
64
80
  'sourcePortalName': json['source_portal_name'],
81
+ 'targetPortalId': json['target_portal_id'],
82
+ 'targetPortalName': json['target_portal_name'],
65
83
  'courseId': json['course_id'],
66
84
  'courseName': json['course_name'],
67
85
  'allowedMode': json['allowed_mode'],
68
86
  'state': json['state'],
69
87
  'allowResharing': json['allow_resharing'],
88
+ 'seatLimit': json['seat_limit'],
89
+ 'originCatalogId': json['origin_catalog_id'],
90
+ 'originCatalogName': json['origin_catalog_name'],
91
+ 'offeredAt': (new Date(json['offered_at'])),
92
+ 'respondedAt': (json['responded_at'] == null ? null : new Date(json['responded_at'])),
93
+ 'revokedAt': (json['revoked_at'] == null ? null : new Date(json['revoked_at'])),
70
94
  };
71
95
  }
72
96
  export function CourseShareToJSON(json) {
@@ -80,10 +104,18 @@ export function CourseShareToJSONTyped(value, ignoreDiscriminator = false) {
80
104
  'id': value['id'],
81
105
  'source_portal_id': value['sourcePortalId'],
82
106
  'source_portal_name': value['sourcePortalName'],
107
+ 'target_portal_id': value['targetPortalId'],
108
+ 'target_portal_name': value['targetPortalName'],
83
109
  'course_id': value['courseId'],
84
110
  'course_name': value['courseName'],
85
111
  'allowed_mode': value['allowedMode'],
86
112
  'state': value['state'],
87
113
  'allow_resharing': value['allowResharing'],
114
+ 'seat_limit': value['seatLimit'],
115
+ 'origin_catalog_id': value['originCatalogId'],
116
+ 'origin_catalog_name': value['originCatalogName'],
117
+ 'offered_at': value['offeredAt'].toISOString(),
118
+ 'responded_at': value['respondedAt'] == null ? value['respondedAt'] : value['respondedAt'].toISOString(),
119
+ 'revoked_at': value['revokedAt'] == null ? value['revokedAt'] : value['revokedAt'].toISOString(),
88
120
  };
89
121
  }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { CourseCatalog } from './CourseCatalog';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface GetCourseCatalogList
17
+ */
18
+ export interface GetCourseCatalogList {
19
+ /**
20
+ * The current page number
21
+ * @type {number}
22
+ * @memberof GetCourseCatalogList
23
+ */
24
+ page: number;
25
+ /**
26
+ * The number of items per page
27
+ * @type {number}
28
+ * @memberof GetCourseCatalogList
29
+ */
30
+ pageSize: number;
31
+ /**
32
+ * The total number of pages
33
+ * @type {number}
34
+ * @memberof GetCourseCatalogList
35
+ */
36
+ totalPages: number;
37
+ /**
38
+ * The total number of items
39
+ * @type {number}
40
+ * @memberof GetCourseCatalogList
41
+ */
42
+ totalItems: number;
43
+ /**
44
+ *
45
+ * @type {Array<CourseCatalog>}
46
+ * @memberof GetCourseCatalogList
47
+ */
48
+ items: Array<CourseCatalog>;
49
+ }
50
+ /**
51
+ * Check if a given object implements the GetCourseCatalogList interface.
52
+ */
53
+ export declare function instanceOfGetCourseCatalogList(value: object): value is GetCourseCatalogList;
54
+ export declare function GetCourseCatalogListFromJSON(json: any): GetCourseCatalogList;
55
+ export declare function GetCourseCatalogListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseCatalogList;
56
+ export declare function GetCourseCatalogListToJSON(json: any): GetCourseCatalogList;
57
+ export declare function GetCourseCatalogListToJSONTyped(value?: GetCourseCatalogList | null, ignoreDiscriminator?: boolean): any;