@easyedu/js-lsm-api 1.54.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 (65) 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/PostOfferCatalogResponse.d.ts +25 -1
  26. package/dist/esm/models/PostOfferCatalogResponse.js +12 -0
  27. package/dist/esm/models/PutCourseEnrollment.d.ts +7 -1
  28. package/dist/esm/models/PutCourseEnrollment.js +4 -1
  29. package/dist/esm/models/index.d.ts +3 -0
  30. package/dist/esm/models/index.js +3 -0
  31. package/dist/models/GetCourseEnrollment.d.ts +15 -1
  32. package/dist/models/GetCourseEnrollment.js +6 -1
  33. package/dist/models/GetCourseEnrollmentListItem.d.ts +5 -0
  34. package/dist/models/GetCourseEnrollmentListItem.js +6 -1
  35. package/dist/models/PostDuplicate.d.ts +32 -0
  36. package/dist/models/PostDuplicate.js +48 -0
  37. package/dist/models/PostDuplicate1.d.ts +32 -0
  38. package/dist/models/PostDuplicate1.js +48 -0
  39. package/dist/models/PostDuplicate2.d.ts +32 -0
  40. package/dist/models/PostDuplicate2.js +48 -0
  41. package/dist/models/PostOfferCatalogResponse.d.ts +25 -1
  42. package/dist/models/PostOfferCatalogResponse.js +12 -0
  43. package/dist/models/PutCourseEnrollment.d.ts +7 -1
  44. package/dist/models/PutCourseEnrollment.js +4 -1
  45. package/dist/models/index.d.ts +3 -0
  46. package/dist/models/index.js +3 -0
  47. package/docs/ContentApi.md +78 -0
  48. package/docs/CourseApi.md +86 -2
  49. package/docs/ModuleApi.md +75 -0
  50. package/docs/PostDuplicate.md +35 -0
  51. package/docs/PostDuplicate1.md +35 -0
  52. package/docs/PostDuplicate2.md +35 -0
  53. package/docs/PostOfferCatalogResponse.md +7 -0
  54. package/package.json +1 -1
  55. package/src/apis/ContentApi.ts +76 -0
  56. package/src/apis/CourseApi.ts +78 -0
  57. package/src/apis/ModuleApi.ts +67 -0
  58. package/src/models/GetCourseEnrollment.ts +16 -2
  59. package/src/models/GetCourseEnrollmentListItem.ts +6 -1
  60. package/src/models/PostDuplicate.ts +65 -0
  61. package/src/models/PostDuplicate1.ts +65 -0
  62. package/src/models/PostDuplicate2.ts +65 -0
  63. package/src/models/PostOfferCatalogResponse.ts +34 -1
  64. package/src/models/PutCourseEnrollment.ts +8 -2
  65. package/src/models/index.ts +3 -0
@@ -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 { GetCourseFromJSON, GetCourseEnrollmentFromJSON, GetCourseEnrollmentListFromJSON, GetCourseExportFromJSON, GetCourseExportListFromJSON, GetCourseImageUploadFromJSON, GetCourseListFromJSON, GetCourseReportingBasicFromJSON, PostCourseToJSON, PostCourseEnrollmentToJSON, PostCourseExportToJSON, PutCourseToJSON, PutCourseEnrollmentToJSON, } from '../models/index';
24
+ import { GetCourseFromJSON, GetCourseEnrollmentFromJSON, GetCourseEnrollmentListFromJSON, GetCourseExportFromJSON, GetCourseExportListFromJSON, GetCourseImageUploadFromJSON, GetCourseListFromJSON, GetCourseReportingBasicFromJSON, PostCourseToJSON, PostCourseEnrollmentToJSON, PostCourseExportToJSON, PostDuplicateToJSON, PutCourseToJSON, PutCourseEnrollmentToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -158,6 +158,9 @@ export class CourseApi extends runtime.BaseAPI {
158
158
  if (requestParameters['type'] != null) {
159
159
  queryParameters['type'] = requestParameters['type'];
160
160
  }
161
+ if (requestParameters['status'] != null) {
162
+ queryParameters['status'] = requestParameters['status'];
163
+ }
161
164
  if (requestParameters['page'] != null) {
162
165
  queryParameters['page'] = requestParameters['page'];
163
166
  }
@@ -288,9 +291,18 @@ export class CourseApi extends runtime.BaseAPI {
288
291
  getCourseListRequestOpts(requestParameters) {
289
292
  return __awaiter(this, void 0, void 0, function* () {
290
293
  const queryParameters = {};
294
+ if (requestParameters['page'] != null) {
295
+ queryParameters['page'] = requestParameters['page'];
296
+ }
297
+ if (requestParameters['pageSize'] != null) {
298
+ queryParameters['pageSize'] = requestParameters['pageSize'];
299
+ }
291
300
  if (requestParameters['enrolled'] != null) {
292
301
  queryParameters['enrolled'] = requestParameters['enrolled'];
293
302
  }
303
+ if (requestParameters['search'] != null) {
304
+ queryParameters['search'] = requestParameters['search'];
305
+ }
294
306
  const headerParameters = {};
295
307
  let urlPath = `/courses`;
296
308
  return {
@@ -399,6 +411,49 @@ export class CourseApi extends runtime.BaseAPI {
399
411
  return yield response.value();
400
412
  });
401
413
  }
414
+ /**
415
+ * Creates request options for postCourseDuplicate without sending the request
416
+ */
417
+ postCourseDuplicateRequestOpts(requestParameters) {
418
+ return __awaiter(this, void 0, void 0, function* () {
419
+ if (requestParameters['courseId'] == null) {
420
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postCourseDuplicate().');
421
+ }
422
+ const queryParameters = {};
423
+ const headerParameters = {};
424
+ headerParameters['Content-Type'] = 'application/json';
425
+ let urlPath = `/courses/{courseId}/duplicate`;
426
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
427
+ return {
428
+ path: urlPath,
429
+ method: 'POST',
430
+ headers: headerParameters,
431
+ query: queryParameters,
432
+ body: PostDuplicateToJSON(requestParameters['postDuplicate']),
433
+ };
434
+ });
435
+ }
436
+ /**
437
+ * Deep-clones a course including all modules, content, versions, SCORM hierarchy, and quiz configuration within the caller\'s portal.
438
+ * Duplicate a course
439
+ */
440
+ postCourseDuplicateRaw(requestParameters, initOverrides) {
441
+ return __awaiter(this, void 0, void 0, function* () {
442
+ const requestOptions = yield this.postCourseDuplicateRequestOpts(requestParameters);
443
+ const response = yield this.request(requestOptions, initOverrides);
444
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseFromJSON(jsonValue));
445
+ });
446
+ }
447
+ /**
448
+ * Deep-clones a course including all modules, content, versions, SCORM hierarchy, and quiz configuration within the caller\'s portal.
449
+ * Duplicate a course
450
+ */
451
+ postCourseDuplicate(requestParameters, initOverrides) {
452
+ return __awaiter(this, void 0, void 0, function* () {
453
+ const response = yield this.postCourseDuplicateRaw(requestParameters, initOverrides);
454
+ return yield response.value();
455
+ });
456
+ }
402
457
  /**
403
458
  * Creates request options for postCourseEnrollment without sending the request
404
459
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { GetModule, GetModuleList, PostModule, PutModule, PutModuleReorder } from '../models/index';
13
+ import type { GetModule, GetModuleList, PostDuplicate1, PostModule, PutModule, PutModuleReorder } from '../models/index';
14
14
  export interface GetModuleRequest {
15
15
  moduleId: string;
16
16
  courseId: string;
@@ -22,6 +22,11 @@ export interface PostModuleRequest {
22
22
  courseId: string;
23
23
  postModule: PostModule;
24
24
  }
25
+ export interface PostModuleDuplicateRequest {
26
+ courseId: string;
27
+ moduleId: string;
28
+ postDuplicate1?: PostDuplicate1;
29
+ }
25
30
  export interface PutModuleRequest {
26
31
  moduleId: string;
27
32
  courseId: string;
@@ -71,6 +76,20 @@ export declare class ModuleApi extends runtime.BaseAPI {
71
76
  * Post a new module
72
77
  */
73
78
  postModule(requestParameters: PostModuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModule>;
79
+ /**
80
+ * Creates request options for postModuleDuplicate without sending the request
81
+ */
82
+ postModuleDuplicateRequestOpts(requestParameters: PostModuleDuplicateRequest): Promise<runtime.RequestOpts>;
83
+ /**
84
+ * Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
85
+ * Duplicate a module
86
+ */
87
+ postModuleDuplicateRaw(requestParameters: PostModuleDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModule>>;
88
+ /**
89
+ * Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
90
+ * Duplicate a module
91
+ */
92
+ postModuleDuplicate(requestParameters: PostModuleDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModule>;
74
93
  /**
75
94
  * Creates request options for putModule without sending the request
76
95
  */
@@ -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 { GetModuleFromJSON, GetModuleListFromJSON, PostModuleToJSON, PutModuleToJSON, PutModuleReorderToJSON, } from '../models/index';
24
+ import { GetModuleFromJSON, GetModuleListFromJSON, PostDuplicate1ToJSON, PostModuleToJSON, PutModuleToJSON, PutModuleReorderToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -152,6 +152,53 @@ export class ModuleApi extends runtime.BaseAPI {
152
152
  return yield response.value();
153
153
  });
154
154
  }
155
+ /**
156
+ * Creates request options for postModuleDuplicate without sending the request
157
+ */
158
+ postModuleDuplicateRequestOpts(requestParameters) {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ if (requestParameters['courseId'] == null) {
161
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling postModuleDuplicate().');
162
+ }
163
+ if (requestParameters['moduleId'] == null) {
164
+ throw new runtime.RequiredError('moduleId', 'Required parameter "moduleId" was null or undefined when calling postModuleDuplicate().');
165
+ }
166
+ const queryParameters = {};
167
+ const headerParameters = {};
168
+ headerParameters['Content-Type'] = 'application/json';
169
+ let urlPath = `/courses/{courseId}/modules/{moduleId}/duplicate`;
170
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
171
+ urlPath = urlPath.replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId'])));
172
+ return {
173
+ path: urlPath,
174
+ method: 'POST',
175
+ headers: headerParameters,
176
+ query: queryParameters,
177
+ body: PostDuplicate1ToJSON(requestParameters['postDuplicate1']),
178
+ };
179
+ });
180
+ }
181
+ /**
182
+ * Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
183
+ * Duplicate a module
184
+ */
185
+ postModuleDuplicateRaw(requestParameters, initOverrides) {
186
+ return __awaiter(this, void 0, void 0, function* () {
187
+ const requestOptions = yield this.postModuleDuplicateRequestOpts(requestParameters);
188
+ const response = yield this.request(requestOptions, initOverrides);
189
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetModuleFromJSON(jsonValue));
190
+ });
191
+ }
192
+ /**
193
+ * Deep-clones a module including all content, versions, SCORM hierarchy, and quiz configuration within the same course.
194
+ * Duplicate a module
195
+ */
196
+ postModuleDuplicate(requestParameters, initOverrides) {
197
+ return __awaiter(this, void 0, void 0, function* () {
198
+ const response = yield this.postModuleDuplicateRaw(requestParameters, initOverrides);
199
+ return yield response.value();
200
+ });
201
+ }
155
202
  /**
156
203
  * Creates request options for putModule without sending the request
157
204
  */
@@ -52,7 +52,16 @@ export interface GetCourseEnrollment {
52
52
  */
53
53
  notes: string | null;
54
54
  /**
55
- * Current status of the enrollment
55
+ * Current status of the enrollment.
56
+ * - Enrolled: registered, no progress yet
57
+ * - InProgress: learner has started at least one content session
58
+ * - Completed: finished successfully
59
+ * - Failed: finished but did not pass
60
+ * - Expired: enrollment_date_end passed before completion
61
+ * - Withdrawn: learner pulled out before completion
62
+ * - Removed: admin-removed enrollment
63
+ * - Archived: historical / read-only (e.g. course share revoked)
64
+ *
56
65
  * @type {GetCourseEnrollmentStatusEnum}
57
66
  * @memberof GetCourseEnrollment
58
67
  */
@@ -75,8 +84,13 @@ export interface GetCourseEnrollment {
75
84
  */
76
85
  export declare const GetCourseEnrollmentStatusEnum: {
77
86
  readonly Enrolled: "Enrolled";
87
+ readonly InProgress: "InProgress";
78
88
  readonly Completed: "Completed";
89
+ readonly Failed: "Failed";
90
+ readonly Expired: "Expired";
91
+ readonly Withdrawn: "Withdrawn";
79
92
  readonly Removed: "Removed";
93
+ readonly Archived: "Archived";
80
94
  };
81
95
  export type GetCourseEnrollmentStatusEnum = typeof GetCourseEnrollmentStatusEnum[keyof typeof GetCourseEnrollmentStatusEnum];
82
96
  /**
@@ -16,8 +16,13 @@
16
16
  */
17
17
  export const GetCourseEnrollmentStatusEnum = {
18
18
  Enrolled: 'Enrolled',
19
+ InProgress: 'InProgress',
19
20
  Completed: 'Completed',
20
- Removed: 'Removed'
21
+ Failed: 'Failed',
22
+ Expired: 'Expired',
23
+ Withdrawn: 'Withdrawn',
24
+ Removed: 'Removed',
25
+ Archived: 'Archived'
21
26
  };
22
27
  /**
23
28
  * @export
@@ -81,8 +81,13 @@ export interface GetCourseEnrollmentListItem {
81
81
  */
82
82
  export declare const GetCourseEnrollmentListItemStatusEnum: {
83
83
  readonly Enrolled: "Enrolled";
84
+ readonly InProgress: "InProgress";
84
85
  readonly Completed: "Completed";
86
+ readonly Failed: "Failed";
87
+ readonly Expired: "Expired";
88
+ readonly Withdrawn: "Withdrawn";
85
89
  readonly Removed: "Removed";
90
+ readonly Archived: "Archived";
86
91
  };
87
92
  export type GetCourseEnrollmentListItemStatusEnum = typeof GetCourseEnrollmentListItemStatusEnum[keyof typeof GetCourseEnrollmentListItemStatusEnum];
88
93
  /**
@@ -16,8 +16,13 @@
16
16
  */
17
17
  export const GetCourseEnrollmentListItemStatusEnum = {
18
18
  Enrolled: 'Enrolled',
19
+ InProgress: 'InProgress',
19
20
  Completed: 'Completed',
20
- Removed: 'Removed'
21
+ Failed: 'Failed',
22
+ Expired: 'Expired',
23
+ Withdrawn: 'Withdrawn',
24
+ Removed: 'Removed',
25
+ Archived: 'Archived'
21
26
  };
22
27
  /**
23
28
  * @export
@@ -0,0 +1,32 @@
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
+ /**
13
+ * Optional body for duplicating a course
14
+ * @export
15
+ * @interface PostDuplicate
16
+ */
17
+ export interface PostDuplicate {
18
+ /**
19
+ * Name for the duplicated course. Defaults to "{original name} (Copy)" if omitted.
20
+ * @type {string}
21
+ * @memberof PostDuplicate
22
+ */
23
+ name?: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the PostDuplicate interface.
27
+ */
28
+ export declare function instanceOfPostDuplicate(value: object): value is PostDuplicate;
29
+ export declare function PostDuplicateFromJSON(json: any): PostDuplicate;
30
+ export declare function PostDuplicateFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostDuplicate;
31
+ export declare function PostDuplicateToJSON(json: any): PostDuplicate;
32
+ export declare function PostDuplicateToJSONTyped(value?: PostDuplicate | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,41 @@
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
+ * Check if a given object implements the PostDuplicate interface.
16
+ */
17
+ export function instanceOfPostDuplicate(value) {
18
+ return true;
19
+ }
20
+ export function PostDuplicateFromJSON(json) {
21
+ return PostDuplicateFromJSONTyped(json, false);
22
+ }
23
+ export function PostDuplicateFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'name': json['name'] == null ? undefined : json['name'],
29
+ };
30
+ }
31
+ export function PostDuplicateToJSON(json) {
32
+ return PostDuplicateToJSONTyped(json, false);
33
+ }
34
+ export function PostDuplicateToJSONTyped(value, ignoreDiscriminator = false) {
35
+ if (value == null) {
36
+ return value;
37
+ }
38
+ return {
39
+ 'name': value['name'],
40
+ };
41
+ }
@@ -0,0 +1,32 @@
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
+ /**
13
+ * Optional body for duplicating a module
14
+ * @export
15
+ * @interface PostDuplicate1
16
+ */
17
+ export interface PostDuplicate1 {
18
+ /**
19
+ * Name for the duplicated module. Defaults to "{original name} (Copy)" if omitted.
20
+ * @type {string}
21
+ * @memberof PostDuplicate1
22
+ */
23
+ name?: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the PostDuplicate1 interface.
27
+ */
28
+ export declare function instanceOfPostDuplicate1(value: object): value is PostDuplicate1;
29
+ export declare function PostDuplicate1FromJSON(json: any): PostDuplicate1;
30
+ export declare function PostDuplicate1FromJSONTyped(json: any, ignoreDiscriminator: boolean): PostDuplicate1;
31
+ export declare function PostDuplicate1ToJSON(json: any): PostDuplicate1;
32
+ export declare function PostDuplicate1ToJSONTyped(value?: PostDuplicate1 | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,41 @@
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
+ * Check if a given object implements the PostDuplicate1 interface.
16
+ */
17
+ export function instanceOfPostDuplicate1(value) {
18
+ return true;
19
+ }
20
+ export function PostDuplicate1FromJSON(json) {
21
+ return PostDuplicate1FromJSONTyped(json, false);
22
+ }
23
+ export function PostDuplicate1FromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'name': json['name'] == null ? undefined : json['name'],
29
+ };
30
+ }
31
+ export function PostDuplicate1ToJSON(json) {
32
+ return PostDuplicate1ToJSONTyped(json, false);
33
+ }
34
+ export function PostDuplicate1ToJSONTyped(value, ignoreDiscriminator = false) {
35
+ if (value == null) {
36
+ return value;
37
+ }
38
+ return {
39
+ 'name': value['name'],
40
+ };
41
+ }
@@ -0,0 +1,32 @@
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
+ /**
13
+ * Optional body for duplicating a content item
14
+ * @export
15
+ * @interface PostDuplicate2
16
+ */
17
+ export interface PostDuplicate2 {
18
+ /**
19
+ * Name for the duplicated content. Defaults to "{original name} (Copy)" if omitted.
20
+ * @type {string}
21
+ * @memberof PostDuplicate2
22
+ */
23
+ name?: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the PostDuplicate2 interface.
27
+ */
28
+ export declare function instanceOfPostDuplicate2(value: object): value is PostDuplicate2;
29
+ export declare function PostDuplicate2FromJSON(json: any): PostDuplicate2;
30
+ export declare function PostDuplicate2FromJSONTyped(json: any, ignoreDiscriminator: boolean): PostDuplicate2;
31
+ export declare function PostDuplicate2ToJSON(json: any): PostDuplicate2;
32
+ export declare function PostDuplicate2ToJSONTyped(value?: PostDuplicate2 | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,41 @@
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
+ * Check if a given object implements the PostDuplicate2 interface.
16
+ */
17
+ export function instanceOfPostDuplicate2(value) {
18
+ return true;
19
+ }
20
+ export function PostDuplicate2FromJSON(json) {
21
+ return PostDuplicate2FromJSONTyped(json, false);
22
+ }
23
+ export function PostDuplicate2FromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'name': json['name'] == null ? undefined : json['name'],
29
+ };
30
+ }
31
+ export function PostDuplicate2ToJSON(json) {
32
+ return PostDuplicate2ToJSONTyped(json, false);
33
+ }
34
+ export function PostDuplicate2ToJSONTyped(value, ignoreDiscriminator = false) {
35
+ if (value == null) {
36
+ return value;
37
+ }
38
+ return {
39
+ 'name': value['name'],
40
+ };
41
+ }
@@ -10,17 +10,41 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
+ * Result of fanning a catalog out into per-course offers. Outcomes are bucketed
14
+ * so operators can distinguish brand-new shares from reactivations of
15
+ * previously-revoked shares, idempotent no-ops on already-active shares, and
16
+ * real failures.
13
17
  *
14
18
  * @export
15
19
  * @interface PostOfferCatalogResponse
16
20
  */
17
21
  export interface PostOfferCatalogResponse {
18
22
  /**
19
- * Number of per-course shares created from this catalog offer
23
+ * Brand-new `course_share` rows inserted from this catalog offer
20
24
  * @type {number}
21
25
  * @memberof PostOfferCatalogResponse
22
26
  */
23
27
  createdShareCount: number;
28
+ /**
29
+ * Existing Revoked or Declined shares that were flipped back to Offered
30
+ * @type {number}
31
+ * @memberof PostOfferCatalogResponse
32
+ */
33
+ reactivatedShareCount: number;
34
+ /**
35
+ * Already-active shares (Offered / AcceptedMirror / AcceptedClone). Terms
36
+ * may have been updated in place without disturbing the target's state.
37
+ *
38
+ * @type {number}
39
+ * @memberof PostOfferCatalogResponse
40
+ */
41
+ unchangedShareCount: number;
42
+ /**
43
+ * Shares that could not be created due to a database or validation error
44
+ * @type {number}
45
+ * @memberof PostOfferCatalogResponse
46
+ */
47
+ failedShareCount: number;
24
48
  }
25
49
  /**
26
50
  * Check if a given object implements the PostOfferCatalogResponse interface.
@@ -17,6 +17,12 @@
17
17
  export function instanceOfPostOfferCatalogResponse(value) {
18
18
  if (!('createdShareCount' in value) || value['createdShareCount'] === undefined)
19
19
  return false;
20
+ if (!('reactivatedShareCount' in value) || value['reactivatedShareCount'] === undefined)
21
+ return false;
22
+ if (!('unchangedShareCount' in value) || value['unchangedShareCount'] === undefined)
23
+ return false;
24
+ if (!('failedShareCount' in value) || value['failedShareCount'] === undefined)
25
+ return false;
20
26
  return true;
21
27
  }
22
28
  export function PostOfferCatalogResponseFromJSON(json) {
@@ -28,6 +34,9 @@ export function PostOfferCatalogResponseFromJSONTyped(json, ignoreDiscriminator)
28
34
  }
29
35
  return {
30
36
  'createdShareCount': json['created_share_count'],
37
+ 'reactivatedShareCount': json['reactivated_share_count'],
38
+ 'unchangedShareCount': json['unchanged_share_count'],
39
+ 'failedShareCount': json['failed_share_count'],
31
40
  };
32
41
  }
33
42
  export function PostOfferCatalogResponseToJSON(json) {
@@ -39,5 +48,8 @@ export function PostOfferCatalogResponseToJSONTyped(value, ignoreDiscriminator =
39
48
  }
40
49
  return {
41
50
  'created_share_count': value['createdShareCount'],
51
+ 'reactivated_share_count': value['reactivatedShareCount'],
52
+ 'unchanged_share_count': value['unchangedShareCount'],
53
+ 'failed_share_count': value['failedShareCount'],
42
54
  };
43
55
  }
@@ -16,7 +16,10 @@
16
16
  */
17
17
  export interface PutCourseEnrollment {
18
18
  /**
19
- * Current status of the enrollment
19
+ * Target status for the enrollment. System-managed statuses (InProgress, Expired)
20
+ * cannot be set via this endpoint. Reopening a terminal enrollment to `Enrolled`
21
+ * requires `enrollment_date_end` to still be in the future.
22
+ *
20
23
  * @type {PutCourseEnrollmentStatusEnum}
21
24
  * @memberof PutCourseEnrollment
22
25
  */
@@ -46,7 +49,10 @@ export interface PutCourseEnrollment {
46
49
  export declare const PutCourseEnrollmentStatusEnum: {
47
50
  readonly Enrolled: "Enrolled";
48
51
  readonly Completed: "Completed";
52
+ readonly Failed: "Failed";
53
+ readonly Withdrawn: "Withdrawn";
49
54
  readonly Removed: "Removed";
55
+ readonly Archived: "Archived";
50
56
  };
51
57
  export type PutCourseEnrollmentStatusEnum = typeof PutCourseEnrollmentStatusEnum[keyof typeof PutCourseEnrollmentStatusEnum];
52
58
  /**
@@ -17,7 +17,10 @@
17
17
  export const PutCourseEnrollmentStatusEnum = {
18
18
  Enrolled: 'Enrolled',
19
19
  Completed: 'Completed',
20
- Removed: 'Removed'
20
+ Failed: 'Failed',
21
+ Withdrawn: 'Withdrawn',
22
+ Removed: 'Removed',
23
+ Archived: 'Archived'
21
24
  };
22
25
  /**
23
26
  * @export
@@ -173,6 +173,9 @@ export * from './PostCourse';
173
173
  export * from './PostCourseCatalog';
174
174
  export * from './PostCourseEnrollment';
175
175
  export * from './PostCourseExport';
176
+ export * from './PostDuplicate';
177
+ export * from './PostDuplicate1';
178
+ export * from './PostDuplicate2';
176
179
  export * from './PostLogin';
177
180
  export * from './PostManualQuestionSelection';
178
181
  export * from './PostMessage';
@@ -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';
@@ -52,7 +52,16 @@ export interface GetCourseEnrollment {
52
52
  */
53
53
  notes: string | null;
54
54
  /**
55
- * Current status of the enrollment
55
+ * Current status of the enrollment.
56
+ * - Enrolled: registered, no progress yet
57
+ * - InProgress: learner has started at least one content session
58
+ * - Completed: finished successfully
59
+ * - Failed: finished but did not pass
60
+ * - Expired: enrollment_date_end passed before completion
61
+ * - Withdrawn: learner pulled out before completion
62
+ * - Removed: admin-removed enrollment
63
+ * - Archived: historical / read-only (e.g. course share revoked)
64
+ *
56
65
  * @type {GetCourseEnrollmentStatusEnum}
57
66
  * @memberof GetCourseEnrollment
58
67
  */
@@ -75,8 +84,13 @@ export interface GetCourseEnrollment {
75
84
  */
76
85
  export declare const GetCourseEnrollmentStatusEnum: {
77
86
  readonly Enrolled: "Enrolled";
87
+ readonly InProgress: "InProgress";
78
88
  readonly Completed: "Completed";
89
+ readonly Failed: "Failed";
90
+ readonly Expired: "Expired";
91
+ readonly Withdrawn: "Withdrawn";
79
92
  readonly Removed: "Removed";
93
+ readonly Archived: "Archived";
80
94
  };
81
95
  export type GetCourseEnrollmentStatusEnum = typeof GetCourseEnrollmentStatusEnum[keyof typeof GetCourseEnrollmentStatusEnum];
82
96
  /**