@easyedu/js-lsm-api 1.55.0 → 1.56.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 (59) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +8 -2
  3. package/dist/apis/ContentApi.d.ts +21 -1
  4. package/dist/apis/ContentApi.js +51 -0
  5. package/dist/apis/CourseApi.d.ts +23 -1
  6. package/dist/apis/CourseApi.js +55 -0
  7. package/dist/apis/ModuleApi.d.ts +20 -1
  8. package/dist/apis/ModuleApi.js +47 -0
  9. package/dist/esm/apis/ContentApi.d.ts +21 -1
  10. package/dist/esm/apis/ContentApi.js +52 -1
  11. package/dist/esm/apis/CourseApi.d.ts +23 -1
  12. package/dist/esm/apis/CourseApi.js +56 -1
  13. package/dist/esm/apis/ModuleApi.d.ts +20 -1
  14. package/dist/esm/apis/ModuleApi.js +48 -1
  15. package/dist/esm/models/GetCourseEnrollment.d.ts +15 -1
  16. package/dist/esm/models/GetCourseEnrollment.js +6 -1
  17. package/dist/esm/models/GetCourseEnrollmentListItem.d.ts +5 -0
  18. package/dist/esm/models/GetCourseEnrollmentListItem.js +6 -1
  19. package/dist/esm/models/PostDuplicate.d.ts +32 -0
  20. package/dist/esm/models/PostDuplicate.js +41 -0
  21. package/dist/esm/models/PostDuplicate1.d.ts +32 -0
  22. package/dist/esm/models/PostDuplicate1.js +41 -0
  23. package/dist/esm/models/PostDuplicate2.d.ts +32 -0
  24. package/dist/esm/models/PostDuplicate2.js +41 -0
  25. package/dist/esm/models/PutCourseEnrollment.d.ts +7 -1
  26. package/dist/esm/models/PutCourseEnrollment.js +4 -1
  27. package/dist/esm/models/index.d.ts +3 -0
  28. package/dist/esm/models/index.js +3 -0
  29. package/dist/models/GetCourseEnrollment.d.ts +15 -1
  30. package/dist/models/GetCourseEnrollment.js +6 -1
  31. package/dist/models/GetCourseEnrollmentListItem.d.ts +5 -0
  32. package/dist/models/GetCourseEnrollmentListItem.js +6 -1
  33. package/dist/models/PostDuplicate.d.ts +32 -0
  34. package/dist/models/PostDuplicate.js +48 -0
  35. package/dist/models/PostDuplicate1.d.ts +32 -0
  36. package/dist/models/PostDuplicate1.js +48 -0
  37. package/dist/models/PostDuplicate2.d.ts +32 -0
  38. package/dist/models/PostDuplicate2.js +48 -0
  39. package/dist/models/PutCourseEnrollment.d.ts +7 -1
  40. package/dist/models/PutCourseEnrollment.js +4 -1
  41. package/dist/models/index.d.ts +3 -0
  42. package/dist/models/index.js +3 -0
  43. package/docs/ContentApi.md +78 -0
  44. package/docs/CourseApi.md +86 -2
  45. package/docs/ModuleApi.md +75 -0
  46. package/docs/PostDuplicate.md +35 -0
  47. package/docs/PostDuplicate1.md +35 -0
  48. package/docs/PostDuplicate2.md +35 -0
  49. package/package.json +1 -1
  50. package/src/apis/ContentApi.ts +76 -0
  51. package/src/apis/CourseApi.ts +78 -0
  52. package/src/apis/ModuleApi.ts +67 -0
  53. package/src/models/GetCourseEnrollment.ts +16 -2
  54. package/src/models/GetCourseEnrollmentListItem.ts +6 -1
  55. package/src/models/PostDuplicate.ts +65 -0
  56. package/src/models/PostDuplicate1.ts +65 -0
  57. package/src/models/PostDuplicate2.ts +65 -0
  58. package/src/models/PutCourseEnrollment.ts +8 -2
  59. package/src/models/index.ts +3 -0
@@ -0,0 +1,35 @@
1
+
2
+ # PostDuplicate2
3
+
4
+ Optional body for duplicating a content item
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `name` | string
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { PostDuplicate2 } from '@easyedu/js-lsm-api'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "name": null,
20
+ } satisfies PostDuplicate2
21
+
22
+ console.log(example)
23
+
24
+ // Convert the instance to a JSON string
25
+ const exampleJSON: string = JSON.stringify(example)
26
+ console.log(exampleJSON)
27
+
28
+ // Parse the JSON string back to an object
29
+ const exampleParsed = JSON.parse(exampleJSON) as PostDuplicate2
30
+ console.log(exampleParsed)
31
+ ```
32
+
33
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
34
+
35
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.55.0",
3
+ "version": "1.56.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -29,6 +29,7 @@ import type {
29
29
  PostContentQuiz,
30
30
  PostContentSession,
31
31
  PostContentUpload,
32
+ PostDuplicate2,
32
33
  PostVerifyManifest,
33
34
  PutContent,
34
35
  PutContentReorder,
@@ -66,6 +67,8 @@ import {
66
67
  PostContentSessionToJSON,
67
68
  PostContentUploadFromJSON,
68
69
  PostContentUploadToJSON,
70
+ PostDuplicate2FromJSON,
71
+ PostDuplicate2ToJSON,
69
72
  PostVerifyManifestFromJSON,
70
73
  PostVerifyManifestToJSON,
71
74
  PutContentFromJSON,
@@ -158,6 +161,13 @@ export interface ListContentSessionsRequest {
158
161
  pageSize?: number;
159
162
  }
160
163
 
164
+ export interface PostContentDuplicateRequest {
165
+ courseId: string;
166
+ moduleId: string;
167
+ contentId: string;
168
+ postDuplicate2?: PostDuplicate2;
169
+ }
170
+
161
171
  export interface PostContentProcessRequest {
162
172
  moduleId: string;
163
173
  courseId: string;
@@ -988,6 +998,72 @@ export class ContentApi extends runtime.BaseAPI {
988
998
  return await response.value();
989
999
  }
990
1000
 
1001
+ /**
1002
+ * Creates request options for postContentDuplicate without sending the request
1003
+ */
1004
+ async postContentDuplicateRequestOpts(requestParameters: PostContentDuplicateRequest): Promise<runtime.RequestOpts> {
1005
+ if (requestParameters['courseId'] == null) {
1006
+ throw new runtime.RequiredError(
1007
+ 'courseId',
1008
+ 'Required parameter "courseId" was null or undefined when calling postContentDuplicate().'
1009
+ );
1010
+ }
1011
+
1012
+ if (requestParameters['moduleId'] == null) {
1013
+ throw new runtime.RequiredError(
1014
+ 'moduleId',
1015
+ 'Required parameter "moduleId" was null or undefined when calling postContentDuplicate().'
1016
+ );
1017
+ }
1018
+
1019
+ if (requestParameters['contentId'] == null) {
1020
+ throw new runtime.RequiredError(
1021
+ 'contentId',
1022
+ 'Required parameter "contentId" was null or undefined when calling postContentDuplicate().'
1023
+ );
1024
+ }
1025
+
1026
+ const queryParameters: any = {};
1027
+
1028
+ const headerParameters: runtime.HTTPHeaders = {};
1029
+
1030
+ headerParameters['Content-Type'] = 'application/json';
1031
+
1032
+
1033
+ let urlPath = `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/duplicate`;
1034
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
1035
+ urlPath = urlPath.replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId'])));
1036
+ urlPath = urlPath.replace(`{${"contentId"}}`, encodeURIComponent(String(requestParameters['contentId'])));
1037
+
1038
+ return {
1039
+ path: urlPath,
1040
+ method: 'POST',
1041
+ headers: headerParameters,
1042
+ query: queryParameters,
1043
+ body: PostDuplicate2ToJSON(requestParameters['postDuplicate2']),
1044
+ };
1045
+ }
1046
+
1047
+ /**
1048
+ * Deep-clones a content item including version records, SCORM hierarchy, and quiz configuration within the same module.
1049
+ * Duplicate a content item
1050
+ */
1051
+ async postContentDuplicateRaw(requestParameters: PostContentDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContent>> {
1052
+ const requestOptions = await this.postContentDuplicateRequestOpts(requestParameters);
1053
+ const response = await this.request(requestOptions, initOverrides);
1054
+
1055
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetContentFromJSON(jsonValue));
1056
+ }
1057
+
1058
+ /**
1059
+ * Deep-clones a content item including version records, SCORM hierarchy, and quiz configuration within the same module.
1060
+ * Duplicate a content item
1061
+ */
1062
+ async postContentDuplicate(requestParameters: PostContentDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContent> {
1063
+ const response = await this.postContentDuplicateRaw(requestParameters, initOverrides);
1064
+ return await response.value();
1065
+ }
1066
+
991
1067
  /**
992
1068
  * Creates request options for postContentProcess without sending the request
993
1069
  */
@@ -26,6 +26,7 @@ import type {
26
26
  PostCourse,
27
27
  PostCourseEnrollment,
28
28
  PostCourseExport,
29
+ PostDuplicate,
29
30
  PutCourse,
30
31
  PutCourseEnrollment,
31
32
  } from '../models/index';
@@ -52,6 +53,8 @@ import {
52
53
  PostCourseEnrollmentToJSON,
53
54
  PostCourseExportFromJSON,
54
55
  PostCourseExportToJSON,
56
+ PostDuplicateFromJSON,
57
+ PostDuplicateToJSON,
55
58
  PutCourseFromJSON,
56
59
  PutCourseToJSON,
57
60
  PutCourseEnrollmentFromJSON,
@@ -74,6 +77,7 @@ export interface GetCourseEnrollmentRequest {
74
77
  export interface GetCourseEnrollmentsRequest {
75
78
  courseId: string;
76
79
  type?: GetCourseEnrollmentsTypeEnum;
80
+ status?: string;
77
81
  page?: number;
78
82
  pageSize?: number;
79
83
  }
@@ -90,7 +94,10 @@ export interface GetCourseExportsRequest {
90
94
  }
91
95
 
92
96
  export interface GetCourseListRequest {
97
+ page?: number;
98
+ pageSize?: number;
93
99
  enrolled?: boolean;
100
+ search?: string;
94
101
  }
95
102
 
96
103
  export interface GetCourseReportingBasicRequest {
@@ -101,6 +108,11 @@ export interface PostCourseRequest {
101
108
  postCourse: PostCourse;
102
109
  }
103
110
 
111
+ export interface PostCourseDuplicateRequest {
112
+ courseId: string;
113
+ postDuplicate?: PostDuplicate;
114
+ }
115
+
104
116
  export interface PostCourseEnrollmentRequest {
105
117
  courseId: string;
106
118
  postCourseEnrollment: PostCourseEnrollment;
@@ -291,6 +303,10 @@ export class CourseApi extends runtime.BaseAPI {
291
303
  queryParameters['type'] = requestParameters['type'];
292
304
  }
293
305
 
306
+ if (requestParameters['status'] != null) {
307
+ queryParameters['status'] = requestParameters['status'];
308
+ }
309
+
294
310
  if (requestParameters['page'] != null) {
295
311
  queryParameters['page'] = requestParameters['page'];
296
312
  }
@@ -443,10 +459,22 @@ export class CourseApi extends runtime.BaseAPI {
443
459
  async getCourseListRequestOpts(requestParameters: GetCourseListRequest): Promise<runtime.RequestOpts> {
444
460
  const queryParameters: any = {};
445
461
 
462
+ if (requestParameters['page'] != null) {
463
+ queryParameters['page'] = requestParameters['page'];
464
+ }
465
+
466
+ if (requestParameters['pageSize'] != null) {
467
+ queryParameters['pageSize'] = requestParameters['pageSize'];
468
+ }
469
+
446
470
  if (requestParameters['enrolled'] != null) {
447
471
  queryParameters['enrolled'] = requestParameters['enrolled'];
448
472
  }
449
473
 
474
+ if (requestParameters['search'] != null) {
475
+ queryParameters['search'] = requestParameters['search'];
476
+ }
477
+
450
478
  const headerParameters: runtime.HTTPHeaders = {};
451
479
 
452
480
 
@@ -570,6 +598,56 @@ export class CourseApi extends runtime.BaseAPI {
570
598
  return await response.value();
571
599
  }
572
600
 
601
+ /**
602
+ * Creates request options for postCourseDuplicate without sending the request
603
+ */
604
+ async postCourseDuplicateRequestOpts(requestParameters: PostCourseDuplicateRequest): Promise<runtime.RequestOpts> {
605
+ if (requestParameters['courseId'] == null) {
606
+ throw new runtime.RequiredError(
607
+ 'courseId',
608
+ 'Required parameter "courseId" was null or undefined when calling postCourseDuplicate().'
609
+ );
610
+ }
611
+
612
+ const queryParameters: any = {};
613
+
614
+ const headerParameters: runtime.HTTPHeaders = {};
615
+
616
+ headerParameters['Content-Type'] = 'application/json';
617
+
618
+
619
+ let urlPath = `/courses/{courseId}/duplicate`;
620
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
621
+
622
+ return {
623
+ path: urlPath,
624
+ method: 'POST',
625
+ headers: headerParameters,
626
+ query: queryParameters,
627
+ body: PostDuplicateToJSON(requestParameters['postDuplicate']),
628
+ };
629
+ }
630
+
631
+ /**
632
+ * Deep-clones a course including all modules, content, versions, SCORM hierarchy, and quiz configuration within the caller\'s portal.
633
+ * Duplicate a course
634
+ */
635
+ async postCourseDuplicateRaw(requestParameters: PostCourseDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourse>> {
636
+ const requestOptions = await this.postCourseDuplicateRequestOpts(requestParameters);
637
+ const response = await this.request(requestOptions, initOverrides);
638
+
639
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseFromJSON(jsonValue));
640
+ }
641
+
642
+ /**
643
+ * Deep-clones a course including all modules, content, versions, SCORM hierarchy, and quiz configuration within the caller\'s portal.
644
+ * Duplicate a course
645
+ */
646
+ async postCourseDuplicate(requestParameters: PostCourseDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourse> {
647
+ const response = await this.postCourseDuplicateRaw(requestParameters, initOverrides);
648
+ return await response.value();
649
+ }
650
+
573
651
  /**
574
652
  * Creates request options for postCourseEnrollment without sending the request
575
653
  */
@@ -17,6 +17,7 @@ import * as runtime from '../runtime';
17
17
  import type {
18
18
  GetModule,
19
19
  GetModuleList,
20
+ PostDuplicate1,
20
21
  PostModule,
21
22
  PutModule,
22
23
  PutModuleReorder,
@@ -26,6 +27,8 @@ import {
26
27
  GetModuleToJSON,
27
28
  GetModuleListFromJSON,
28
29
  GetModuleListToJSON,
30
+ PostDuplicate1FromJSON,
31
+ PostDuplicate1ToJSON,
29
32
  PostModuleFromJSON,
30
33
  PostModuleToJSON,
31
34
  PutModuleFromJSON,
@@ -48,6 +51,12 @@ export interface PostModuleRequest {
48
51
  postModule: PostModule;
49
52
  }
50
53
 
54
+ export interface PostModuleDuplicateRequest {
55
+ courseId: string;
56
+ moduleId: string;
57
+ postDuplicate1?: PostDuplicate1;
58
+ }
59
+
51
60
  export interface PutModuleRequest {
52
61
  moduleId: string;
53
62
  courseId: string;
@@ -217,6 +226,64 @@ export class ModuleApi extends runtime.BaseAPI {
217
226
  return await response.value();
218
227
  }
219
228
 
229
+ /**
230
+ * Creates request options for postModuleDuplicate without sending the request
231
+ */
232
+ async postModuleDuplicateRequestOpts(requestParameters: PostModuleDuplicateRequest): Promise<runtime.RequestOpts> {
233
+ if (requestParameters['courseId'] == null) {
234
+ throw new runtime.RequiredError(
235
+ 'courseId',
236
+ 'Required parameter "courseId" was null or undefined when calling postModuleDuplicate().'
237
+ );
238
+ }
239
+
240
+ if (requestParameters['moduleId'] == null) {
241
+ throw new runtime.RequiredError(
242
+ 'moduleId',
243
+ 'Required parameter "moduleId" was null or undefined when calling postModuleDuplicate().'
244
+ );
245
+ }
246
+
247
+ const queryParameters: any = {};
248
+
249
+ const headerParameters: runtime.HTTPHeaders = {};
250
+
251
+ headerParameters['Content-Type'] = 'application/json';
252
+
253
+
254
+ let urlPath = `/courses/{courseId}/modules/{moduleId}/duplicate`;
255
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
256
+ urlPath = urlPath.replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId'])));
257
+
258
+ return {
259
+ path: urlPath,
260
+ method: 'POST',
261
+ headers: headerParameters,
262
+ query: queryParameters,
263
+ body: PostDuplicate1ToJSON(requestParameters['postDuplicate1']),
264
+ };
265
+ }
266
+
267
+ /**
268
+ * Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
269
+ * Duplicate a module
270
+ */
271
+ async postModuleDuplicateRaw(requestParameters: PostModuleDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModule>> {
272
+ const requestOptions = await this.postModuleDuplicateRequestOpts(requestParameters);
273
+ const response = await this.request(requestOptions, initOverrides);
274
+
275
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetModuleFromJSON(jsonValue));
276
+ }
277
+
278
+ /**
279
+ * Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
280
+ * Duplicate a module
281
+ */
282
+ async postModuleDuplicate(requestParameters: PostModuleDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModule> {
283
+ const response = await this.postModuleDuplicateRaw(requestParameters, initOverrides);
284
+ return await response.value();
285
+ }
286
+
220
287
  /**
221
288
  * Creates request options for putModule without sending the request
222
289
  */
@@ -56,7 +56,16 @@ export interface GetCourseEnrollment {
56
56
  */
57
57
  notes: string | null;
58
58
  /**
59
- * Current status of the enrollment
59
+ * Current status of the enrollment.
60
+ * - Enrolled: registered, no progress yet
61
+ * - InProgress: learner has started at least one content session
62
+ * - Completed: finished successfully
63
+ * - Failed: finished but did not pass
64
+ * - Expired: enrollment_date_end passed before completion
65
+ * - Withdrawn: learner pulled out before completion
66
+ * - Removed: admin-removed enrollment
67
+ * - Archived: historical / read-only (e.g. course share revoked)
68
+ *
60
69
  * @type {GetCourseEnrollmentStatusEnum}
61
70
  * @memberof GetCourseEnrollment
62
71
  */
@@ -81,8 +90,13 @@ export interface GetCourseEnrollment {
81
90
  */
82
91
  export const GetCourseEnrollmentStatusEnum = {
83
92
  Enrolled: 'Enrolled',
93
+ InProgress: 'InProgress',
84
94
  Completed: 'Completed',
85
- Removed: 'Removed'
95
+ Failed: 'Failed',
96
+ Expired: 'Expired',
97
+ Withdrawn: 'Withdrawn',
98
+ Removed: 'Removed',
99
+ Archived: 'Archived'
86
100
  } as const;
87
101
  export type GetCourseEnrollmentStatusEnum = typeof GetCourseEnrollmentStatusEnum[keyof typeof GetCourseEnrollmentStatusEnum];
88
102
 
@@ -87,8 +87,13 @@ export interface GetCourseEnrollmentListItem {
87
87
  */
88
88
  export const GetCourseEnrollmentListItemStatusEnum = {
89
89
  Enrolled: 'Enrolled',
90
+ InProgress: 'InProgress',
90
91
  Completed: 'Completed',
91
- Removed: 'Removed'
92
+ Failed: 'Failed',
93
+ Expired: 'Expired',
94
+ Withdrawn: 'Withdrawn',
95
+ Removed: 'Removed',
96
+ Archived: 'Archived'
92
97
  } as const;
93
98
  export type GetCourseEnrollmentListItemStatusEnum = typeof GetCourseEnrollmentListItemStatusEnum[keyof typeof GetCourseEnrollmentListItemStatusEnum];
94
99
 
@@ -0,0 +1,65 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Optional body for duplicating a course
18
+ * @export
19
+ * @interface PostDuplicate
20
+ */
21
+ export interface PostDuplicate {
22
+ /**
23
+ * Name for the duplicated course. Defaults to "{original name} (Copy)" if omitted.
24
+ * @type {string}
25
+ * @memberof PostDuplicate
26
+ */
27
+ name?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the PostDuplicate interface.
32
+ */
33
+ export function instanceOfPostDuplicate(value: object): value is PostDuplicate {
34
+ return true;
35
+ }
36
+
37
+ export function PostDuplicateFromJSON(json: any): PostDuplicate {
38
+ return PostDuplicateFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function PostDuplicateFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostDuplicate {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'name': json['name'] == null ? undefined : json['name'],
48
+ };
49
+ }
50
+
51
+ export function PostDuplicateToJSON(json: any): PostDuplicate {
52
+ return PostDuplicateToJSONTyped(json, false);
53
+ }
54
+
55
+ export function PostDuplicateToJSONTyped(value?: PostDuplicate | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'name': value['name'],
63
+ };
64
+ }
65
+
@@ -0,0 +1,65 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Optional body for duplicating a module
18
+ * @export
19
+ * @interface PostDuplicate1
20
+ */
21
+ export interface PostDuplicate1 {
22
+ /**
23
+ * Name for the duplicated module. Defaults to "{original name} (Copy)" if omitted.
24
+ * @type {string}
25
+ * @memberof PostDuplicate1
26
+ */
27
+ name?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the PostDuplicate1 interface.
32
+ */
33
+ export function instanceOfPostDuplicate1(value: object): value is PostDuplicate1 {
34
+ return true;
35
+ }
36
+
37
+ export function PostDuplicate1FromJSON(json: any): PostDuplicate1 {
38
+ return PostDuplicate1FromJSONTyped(json, false);
39
+ }
40
+
41
+ export function PostDuplicate1FromJSONTyped(json: any, ignoreDiscriminator: boolean): PostDuplicate1 {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'name': json['name'] == null ? undefined : json['name'],
48
+ };
49
+ }
50
+
51
+ export function PostDuplicate1ToJSON(json: any): PostDuplicate1 {
52
+ return PostDuplicate1ToJSONTyped(json, false);
53
+ }
54
+
55
+ export function PostDuplicate1ToJSONTyped(value?: PostDuplicate1 | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'name': value['name'],
63
+ };
64
+ }
65
+
@@ -0,0 +1,65 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Optional body for duplicating a content item
18
+ * @export
19
+ * @interface PostDuplicate2
20
+ */
21
+ export interface PostDuplicate2 {
22
+ /**
23
+ * Name for the duplicated content. Defaults to "{original name} (Copy)" if omitted.
24
+ * @type {string}
25
+ * @memberof PostDuplicate2
26
+ */
27
+ name?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the PostDuplicate2 interface.
32
+ */
33
+ export function instanceOfPostDuplicate2(value: object): value is PostDuplicate2 {
34
+ return true;
35
+ }
36
+
37
+ export function PostDuplicate2FromJSON(json: any): PostDuplicate2 {
38
+ return PostDuplicate2FromJSONTyped(json, false);
39
+ }
40
+
41
+ export function PostDuplicate2FromJSONTyped(json: any, ignoreDiscriminator: boolean): PostDuplicate2 {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'name': json['name'] == null ? undefined : json['name'],
48
+ };
49
+ }
50
+
51
+ export function PostDuplicate2ToJSON(json: any): PostDuplicate2 {
52
+ return PostDuplicate2ToJSONTyped(json, false);
53
+ }
54
+
55
+ export function PostDuplicate2ToJSONTyped(value?: PostDuplicate2 | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'name': value['name'],
63
+ };
64
+ }
65
+
@@ -20,7 +20,10 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface PutCourseEnrollment {
22
22
  /**
23
- * Current status of the enrollment
23
+ * Target status for the enrollment. System-managed statuses (InProgress, Expired)
24
+ * cannot be set via this endpoint. Reopening a terminal enrollment to `Enrolled`
25
+ * requires `enrollment_date_end` to still be in the future.
26
+ *
24
27
  * @type {PutCourseEnrollmentStatusEnum}
25
28
  * @memberof PutCourseEnrollment
26
29
  */
@@ -52,7 +55,10 @@ export interface PutCourseEnrollment {
52
55
  export const PutCourseEnrollmentStatusEnum = {
53
56
  Enrolled: 'Enrolled',
54
57
  Completed: 'Completed',
55
- Removed: 'Removed'
58
+ Failed: 'Failed',
59
+ Withdrawn: 'Withdrawn',
60
+ Removed: 'Removed',
61
+ Archived: 'Archived'
56
62
  } as const;
57
63
  export type PutCourseEnrollmentStatusEnum = typeof PutCourseEnrollmentStatusEnum[keyof typeof PutCourseEnrollmentStatusEnum];
58
64
 
@@ -175,6 +175,9 @@ export * from './PostCourse';
175
175
  export * from './PostCourseCatalog';
176
176
  export * from './PostCourseEnrollment';
177
177
  export * from './PostCourseExport';
178
+ export * from './PostDuplicate';
179
+ export * from './PostDuplicate1';
180
+ export * from './PostDuplicate2';
178
181
  export * from './PostLogin';
179
182
  export * from './PostManualQuestionSelection';
180
183
  export * from './PostMessage';