@easyedu/js-lsm-api 1.0.0-677fab496294ee48248fd8a03fee59e3bf0dcf02

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 (147) hide show
  1. package/.openapi-generator/FILES +35 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +46 -0
  5. package/dist/apis/ContentApi.d.ts +82 -0
  6. package/dist/apis/ContentApi.js +204 -0
  7. package/dist/apis/CourseApi.d.ts +71 -0
  8. package/dist/apis/CourseApi.js +177 -0
  9. package/dist/apis/ModuleApi.d.ts +53 -0
  10. package/dist/apis/ModuleApi.js +125 -0
  11. package/dist/apis/OtherApi.d.ts +25 -0
  12. package/dist/apis/OtherApi.js +56 -0
  13. package/dist/apis/UserApi.d.ts +51 -0
  14. package/dist/apis/UserApi.js +121 -0
  15. package/dist/apis/index.d.ts +5 -0
  16. package/dist/apis/index.js +23 -0
  17. package/dist/esm/apis/ContentApi.d.ts +82 -0
  18. package/dist/esm/apis/ContentApi.js +200 -0
  19. package/dist/esm/apis/CourseApi.d.ts +71 -0
  20. package/dist/esm/apis/CourseApi.js +173 -0
  21. package/dist/esm/apis/ModuleApi.d.ts +53 -0
  22. package/dist/esm/apis/ModuleApi.js +121 -0
  23. package/dist/esm/apis/OtherApi.d.ts +25 -0
  24. package/dist/esm/apis/OtherApi.js +52 -0
  25. package/dist/esm/apis/UserApi.d.ts +51 -0
  26. package/dist/esm/apis/UserApi.js +117 -0
  27. package/dist/esm/apis/index.d.ts +5 -0
  28. package/dist/esm/apis/index.js +7 -0
  29. package/dist/esm/index.d.ts +3 -0
  30. package/dist/esm/index.js +5 -0
  31. package/dist/esm/models/GetContent.d.ts +44 -0
  32. package/dist/esm/models/GetContent.js +50 -0
  33. package/dist/esm/models/GetContentList.d.ts +57 -0
  34. package/dist/esm/models/GetContentList.js +60 -0
  35. package/dist/esm/models/GetContentSession.d.ts +50 -0
  36. package/dist/esm/models/GetContentSession.js +55 -0
  37. package/dist/esm/models/GetContentUpload.d.ts +44 -0
  38. package/dist/esm/models/GetContentUpload.js +51 -0
  39. package/dist/esm/models/GetCourse.d.ts +50 -0
  40. package/dist/esm/models/GetCourse.js +52 -0
  41. package/dist/esm/models/GetCourseEnrollment.d.ts +79 -0
  42. package/dist/esm/models/GetCourseEnrollment.js +77 -0
  43. package/dist/esm/models/GetCourseEnrollmentList.d.ts +57 -0
  44. package/dist/esm/models/GetCourseEnrollmentList.js +60 -0
  45. package/dist/esm/models/GetCourseList.d.ts +57 -0
  46. package/dist/esm/models/GetCourseList.js +60 -0
  47. package/dist/esm/models/GetModule.d.ts +62 -0
  48. package/dist/esm/models/GetModule.js +61 -0
  49. package/dist/esm/models/GetModuleList.d.ts +57 -0
  50. package/dist/esm/models/GetModuleList.js +60 -0
  51. package/dist/esm/models/GetUser.d.ts +50 -0
  52. package/dist/esm/models/GetUser.js +54 -0
  53. package/dist/esm/models/LoginRes.d.ts +32 -0
  54. package/dist/esm/models/LoginRes.js +43 -0
  55. package/dist/esm/models/PostContentScorm.d.ts +38 -0
  56. package/dist/esm/models/PostContentScorm.js +47 -0
  57. package/dist/esm/models/PostContentUpload.d.ts +50 -0
  58. package/dist/esm/models/PostContentUpload.js +58 -0
  59. package/dist/esm/models/PostCourse.d.ts +44 -0
  60. package/dist/esm/models/PostCourse.js +51 -0
  61. package/dist/esm/models/PostCourseEnrollment.d.ts +44 -0
  62. package/dist/esm/models/PostCourseEnrollment.js +51 -0
  63. package/dist/esm/models/PostLogin.d.ts +38 -0
  64. package/dist/esm/models/PostLogin.js +47 -0
  65. package/dist/esm/models/PostModule.d.ts +44 -0
  66. package/dist/esm/models/PostModule.js +51 -0
  67. package/dist/esm/models/PostUser.d.ts +44 -0
  68. package/dist/esm/models/PostUser.js +51 -0
  69. package/dist/esm/models/index.d.ts +19 -0
  70. package/dist/esm/models/index.js +21 -0
  71. package/dist/esm/runtime.d.ts +182 -0
  72. package/dist/esm/runtime.js +330 -0
  73. package/dist/index.d.ts +3 -0
  74. package/dist/index.js +21 -0
  75. package/dist/models/GetContent.d.ts +44 -0
  76. package/dist/models/GetContent.js +57 -0
  77. package/dist/models/GetContentList.d.ts +57 -0
  78. package/dist/models/GetContentList.js +67 -0
  79. package/dist/models/GetContentSession.d.ts +50 -0
  80. package/dist/models/GetContentSession.js +62 -0
  81. package/dist/models/GetContentUpload.d.ts +44 -0
  82. package/dist/models/GetContentUpload.js +58 -0
  83. package/dist/models/GetCourse.d.ts +50 -0
  84. package/dist/models/GetCourse.js +59 -0
  85. package/dist/models/GetCourseEnrollment.d.ts +79 -0
  86. package/dist/models/GetCourseEnrollment.js +85 -0
  87. package/dist/models/GetCourseEnrollmentList.d.ts +57 -0
  88. package/dist/models/GetCourseEnrollmentList.js +67 -0
  89. package/dist/models/GetCourseList.d.ts +57 -0
  90. package/dist/models/GetCourseList.js +67 -0
  91. package/dist/models/GetModule.d.ts +62 -0
  92. package/dist/models/GetModule.js +68 -0
  93. package/dist/models/GetModuleList.d.ts +57 -0
  94. package/dist/models/GetModuleList.js +67 -0
  95. package/dist/models/GetUser.d.ts +50 -0
  96. package/dist/models/GetUser.js +61 -0
  97. package/dist/models/LoginRes.d.ts +32 -0
  98. package/dist/models/LoginRes.js +50 -0
  99. package/dist/models/PostContentScorm.d.ts +38 -0
  100. package/dist/models/PostContentScorm.js +54 -0
  101. package/dist/models/PostContentUpload.d.ts +50 -0
  102. package/dist/models/PostContentUpload.js +66 -0
  103. package/dist/models/PostCourse.d.ts +44 -0
  104. package/dist/models/PostCourse.js +58 -0
  105. package/dist/models/PostCourseEnrollment.d.ts +44 -0
  106. package/dist/models/PostCourseEnrollment.js +58 -0
  107. package/dist/models/PostLogin.d.ts +38 -0
  108. package/dist/models/PostLogin.js +54 -0
  109. package/dist/models/PostModule.d.ts +44 -0
  110. package/dist/models/PostModule.js +58 -0
  111. package/dist/models/PostUser.d.ts +44 -0
  112. package/dist/models/PostUser.js +58 -0
  113. package/dist/models/index.d.ts +19 -0
  114. package/dist/models/index.js +37 -0
  115. package/dist/runtime.d.ts +182 -0
  116. package/dist/runtime.js +346 -0
  117. package/package.json +21 -0
  118. package/src/apis/ContentApi.ts +308 -0
  119. package/src/apis/CourseApi.ts +233 -0
  120. package/src/apis/ModuleApi.ts +166 -0
  121. package/src/apis/OtherApi.ts +48 -0
  122. package/src/apis/UserApi.ts +156 -0
  123. package/src/apis/index.ts +7 -0
  124. package/src/index.ts +5 -0
  125. package/src/models/GetContent.ts +83 -0
  126. package/src/models/GetContentList.ts +110 -0
  127. package/src/models/GetContentSession.ts +93 -0
  128. package/src/models/GetContentUpload.ts +84 -0
  129. package/src/models/GetCourse.ts +91 -0
  130. package/src/models/GetCourseEnrollment.ts +134 -0
  131. package/src/models/GetCourseEnrollmentList.ts +110 -0
  132. package/src/models/GetCourseList.ts +110 -0
  133. package/src/models/GetModule.ts +109 -0
  134. package/src/models/GetModuleList.ts +110 -0
  135. package/src/models/GetUser.ts +92 -0
  136. package/src/models/LoginRes.ts +66 -0
  137. package/src/models/PostContentScorm.ts +75 -0
  138. package/src/models/PostContentUpload.ts +90 -0
  139. package/src/models/PostCourse.ts +84 -0
  140. package/src/models/PostCourseEnrollment.ts +84 -0
  141. package/src/models/PostLogin.ts +75 -0
  142. package/src/models/PostModule.ts +84 -0
  143. package/src/models/PostUser.ts +84 -0
  144. package/src/models/index.ts +21 -0
  145. package/src/runtime.ts +431 -0
  146. package/tsconfig.esm.json +7 -0
  147. package/tsconfig.json +16 -0
@@ -0,0 +1,84 @@
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
+ *
18
+ * @export
19
+ * @interface GetContentUpload
20
+ */
21
+ export interface GetContentUpload {
22
+ /**
23
+ * The title of the uploaded content
24
+ * @type {string}
25
+ * @memberof GetContentUpload
26
+ */
27
+ name: string;
28
+ /**
29
+ * The ID of the uploaded content
30
+ * @type {string}
31
+ * @memberof GetContentUpload
32
+ */
33
+ contentId: string;
34
+ /**
35
+ * The URL to upload the content
36
+ * @type {string}
37
+ * @memberof GetContentUpload
38
+ */
39
+ uploadUrl: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the GetContentUpload interface.
44
+ */
45
+ export function instanceOfGetContentUpload(value: object): value is GetContentUpload {
46
+ if (!('name' in value) || value['name'] === undefined) return false;
47
+ if (!('contentId' in value) || value['contentId'] === undefined) return false;
48
+ if (!('uploadUrl' in value) || value['uploadUrl'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function GetContentUploadFromJSON(json: any): GetContentUpload {
53
+ return GetContentUploadFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function GetContentUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetContentUpload {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'name': json['name'],
63
+ 'contentId': json['content_id'],
64
+ 'uploadUrl': json['upload_url'],
65
+ };
66
+ }
67
+
68
+ export function GetContentUploadToJSON(json: any): GetContentUpload {
69
+ return GetContentUploadToJSONTyped(json, false);
70
+ }
71
+
72
+ export function GetContentUploadToJSONTyped(value?: GetContentUpload | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'name': value['name'],
80
+ 'content_id': value['contentId'],
81
+ 'upload_url': value['uploadUrl'],
82
+ };
83
+ }
84
+
@@ -0,0 +1,91 @@
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
+ *
18
+ * @export
19
+ * @interface GetCourse
20
+ */
21
+ export interface GetCourse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof GetCourse
26
+ */
27
+ readonly id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof GetCourse
32
+ */
33
+ name: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof GetCourse
38
+ */
39
+ description: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof GetCourse
44
+ */
45
+ instructor?: string;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the GetCourse interface.
50
+ */
51
+ export function instanceOfGetCourse(value: object): value is GetCourse {
52
+ if (!('id' in value) || value['id'] === undefined) return false;
53
+ if (!('name' in value) || value['name'] === undefined) return false;
54
+ if (!('description' in value) || value['description'] === undefined) return false;
55
+ return true;
56
+ }
57
+
58
+ export function GetCourseFromJSON(json: any): GetCourse {
59
+ return GetCourseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function GetCourseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourse {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'id': json['id'],
69
+ 'name': json['name'],
70
+ 'description': json['description'],
71
+ 'instructor': json['instructor'] == null ? undefined : json['instructor'],
72
+ };
73
+ }
74
+
75
+ export function GetCourseToJSON(json: any): GetCourse {
76
+ return GetCourseToJSONTyped(json, false);
77
+ }
78
+
79
+ export function GetCourseToJSONTyped(value?: Omit<GetCourse, 'id'> | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'name': value['name'],
87
+ 'description': value['description'],
88
+ 'instructor': value['instructor'],
89
+ };
90
+ }
91
+
@@ -0,0 +1,134 @@
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
+ * A course enrollment
18
+ * @export
19
+ * @interface GetCourseEnrollment
20
+ */
21
+ export interface GetCourseEnrollment {
22
+ /**
23
+ * The ID of the course
24
+ * @type {string}
25
+ * @memberof GetCourseEnrollment
26
+ */
27
+ courseId: string;
28
+ /**
29
+ * The ID of the enrolled user
30
+ * @type {string}
31
+ * @memberof GetCourseEnrollment
32
+ */
33
+ userId: string;
34
+ /**
35
+ * Start date of the enrollment (Unix timestamp)
36
+ * @type {number}
37
+ * @memberof GetCourseEnrollment
38
+ */
39
+ enrollmentDateStart: number;
40
+ /**
41
+ * End date of the enrollment (Unix timestamp)
42
+ * @type {number}
43
+ * @memberof GetCourseEnrollment
44
+ */
45
+ enrollmentDateEnd: number;
46
+ /**
47
+ * Optional notes about the enrollment
48
+ * @type {string}
49
+ * @memberof GetCourseEnrollment
50
+ */
51
+ notes: string | null;
52
+ /**
53
+ * Current status of the enrollment
54
+ * @type {string}
55
+ * @memberof GetCourseEnrollment
56
+ */
57
+ status: GetCourseEnrollmentStatusEnum;
58
+ /**
59
+ * Date the course was completed (Unix timestamp)
60
+ * @type {number}
61
+ * @memberof GetCourseEnrollment
62
+ */
63
+ completionDate: number | null;
64
+ }
65
+
66
+
67
+ /**
68
+ * @export
69
+ */
70
+ export const GetCourseEnrollmentStatusEnum = {
71
+ Enrolled: 'Enrolled',
72
+ Dropped: 'Dropped',
73
+ Completed: 'Completed',
74
+ Waitlisted: 'Waitlisted',
75
+ Unknown: 'Unknown'
76
+ } as const;
77
+ export type GetCourseEnrollmentStatusEnum = typeof GetCourseEnrollmentStatusEnum[keyof typeof GetCourseEnrollmentStatusEnum];
78
+
79
+
80
+ /**
81
+ * Check if a given object implements the GetCourseEnrollment interface.
82
+ */
83
+ export function instanceOfGetCourseEnrollment(value: object): value is GetCourseEnrollment {
84
+ if (!('courseId' in value) || value['courseId'] === undefined) return false;
85
+ if (!('userId' in value) || value['userId'] === undefined) return false;
86
+ if (!('enrollmentDateStart' in value) || value['enrollmentDateStart'] === undefined) return false;
87
+ if (!('enrollmentDateEnd' in value) || value['enrollmentDateEnd'] === undefined) return false;
88
+ if (!('notes' in value) || value['notes'] === undefined) return false;
89
+ if (!('status' in value) || value['status'] === undefined) return false;
90
+ if (!('completionDate' in value) || value['completionDate'] === undefined) return false;
91
+ return true;
92
+ }
93
+
94
+ export function GetCourseEnrollmentFromJSON(json: any): GetCourseEnrollment {
95
+ return GetCourseEnrollmentFromJSONTyped(json, false);
96
+ }
97
+
98
+ export function GetCourseEnrollmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseEnrollment {
99
+ if (json == null) {
100
+ return json;
101
+ }
102
+ return {
103
+
104
+ 'courseId': json['course_id'],
105
+ 'userId': json['user_id'],
106
+ 'enrollmentDateStart': json['enrollment_date_start'],
107
+ 'enrollmentDateEnd': json['enrollment_date_end'],
108
+ 'notes': json['notes'],
109
+ 'status': json['status'],
110
+ 'completionDate': json['completion_date'],
111
+ };
112
+ }
113
+
114
+ export function GetCourseEnrollmentToJSON(json: any): GetCourseEnrollment {
115
+ return GetCourseEnrollmentToJSONTyped(json, false);
116
+ }
117
+
118
+ export function GetCourseEnrollmentToJSONTyped(value?: GetCourseEnrollment | null, ignoreDiscriminator: boolean = false): any {
119
+ if (value == null) {
120
+ return value;
121
+ }
122
+
123
+ return {
124
+
125
+ 'course_id': value['courseId'],
126
+ 'user_id': value['userId'],
127
+ 'enrollment_date_start': value['enrollmentDateStart'],
128
+ 'enrollment_date_end': value['enrollmentDateEnd'],
129
+ 'notes': value['notes'],
130
+ 'status': value['status'],
131
+ 'completion_date': value['completionDate'],
132
+ };
133
+ }
134
+
@@ -0,0 +1,110 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { GetCourseEnrollment } from './GetCourseEnrollment';
17
+ import {
18
+ GetCourseEnrollmentFromJSON,
19
+ GetCourseEnrollmentFromJSONTyped,
20
+ GetCourseEnrollmentToJSON,
21
+ GetCourseEnrollmentToJSONTyped,
22
+ } from './GetCourseEnrollment';
23
+
24
+ /**
25
+ * A list of course enrollments with pagination information
26
+ * @export
27
+ * @interface GetCourseEnrollmentList
28
+ */
29
+ export interface GetCourseEnrollmentList {
30
+ /**
31
+ * The current page number
32
+ * @type {number}
33
+ * @memberof GetCourseEnrollmentList
34
+ */
35
+ page: number;
36
+ /**
37
+ * The number of items per page
38
+ * @type {number}
39
+ * @memberof GetCourseEnrollmentList
40
+ */
41
+ pageSize: number;
42
+ /**
43
+ * The total number of pages
44
+ * @type {number}
45
+ * @memberof GetCourseEnrollmentList
46
+ */
47
+ totalPages: number;
48
+ /**
49
+ * The total number of items
50
+ * @type {number}
51
+ * @memberof GetCourseEnrollmentList
52
+ */
53
+ totalItems: number;
54
+ /**
55
+ *
56
+ * @type {Array<GetCourseEnrollment>}
57
+ * @memberof GetCourseEnrollmentList
58
+ */
59
+ items: Array<GetCourseEnrollment>;
60
+ }
61
+
62
+ /**
63
+ * Check if a given object implements the GetCourseEnrollmentList interface.
64
+ */
65
+ export function instanceOfGetCourseEnrollmentList(value: object): value is GetCourseEnrollmentList {
66
+ if (!('page' in value) || value['page'] === undefined) return false;
67
+ if (!('pageSize' in value) || value['pageSize'] === undefined) return false;
68
+ if (!('totalPages' in value) || value['totalPages'] === undefined) return false;
69
+ if (!('totalItems' in value) || value['totalItems'] === undefined) return false;
70
+ if (!('items' in value) || value['items'] === undefined) return false;
71
+ return true;
72
+ }
73
+
74
+ export function GetCourseEnrollmentListFromJSON(json: any): GetCourseEnrollmentList {
75
+ return GetCourseEnrollmentListFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function GetCourseEnrollmentListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseEnrollmentList {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'page': json['page'],
85
+ 'pageSize': json['pageSize'],
86
+ 'totalPages': json['totalPages'],
87
+ 'totalItems': json['totalItems'],
88
+ 'items': ((json['items'] as Array<any>).map(GetCourseEnrollmentFromJSON)),
89
+ };
90
+ }
91
+
92
+ export function GetCourseEnrollmentListToJSON(json: any): GetCourseEnrollmentList {
93
+ return GetCourseEnrollmentListToJSONTyped(json, false);
94
+ }
95
+
96
+ export function GetCourseEnrollmentListToJSONTyped(value?: GetCourseEnrollmentList | null, ignoreDiscriminator: boolean = false): any {
97
+ if (value == null) {
98
+ return value;
99
+ }
100
+
101
+ return {
102
+
103
+ 'page': value['page'],
104
+ 'pageSize': value['pageSize'],
105
+ 'totalPages': value['totalPages'],
106
+ 'totalItems': value['totalItems'],
107
+ 'items': ((value['items'] as Array<any>).map(GetCourseEnrollmentToJSON)),
108
+ };
109
+ }
110
+
@@ -0,0 +1,110 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { GetCourse } from './GetCourse';
17
+ import {
18
+ GetCourseFromJSON,
19
+ GetCourseFromJSONTyped,
20
+ GetCourseToJSON,
21
+ GetCourseToJSONTyped,
22
+ } from './GetCourse';
23
+
24
+ /**
25
+ * A list of courses with pagination information
26
+ * @export
27
+ * @interface GetCourseList
28
+ */
29
+ export interface GetCourseList {
30
+ /**
31
+ * The current page number
32
+ * @type {number}
33
+ * @memberof GetCourseList
34
+ */
35
+ page: number;
36
+ /**
37
+ * The number of items per page
38
+ * @type {number}
39
+ * @memberof GetCourseList
40
+ */
41
+ pageSize: number;
42
+ /**
43
+ * The total number of pages
44
+ * @type {number}
45
+ * @memberof GetCourseList
46
+ */
47
+ totalPages: number;
48
+ /**
49
+ * The total number of items
50
+ * @type {number}
51
+ * @memberof GetCourseList
52
+ */
53
+ totalItems: number;
54
+ /**
55
+ *
56
+ * @type {Array<GetCourse>}
57
+ * @memberof GetCourseList
58
+ */
59
+ items: Array<GetCourse>;
60
+ }
61
+
62
+ /**
63
+ * Check if a given object implements the GetCourseList interface.
64
+ */
65
+ export function instanceOfGetCourseList(value: object): value is GetCourseList {
66
+ if (!('page' in value) || value['page'] === undefined) return false;
67
+ if (!('pageSize' in value) || value['pageSize'] === undefined) return false;
68
+ if (!('totalPages' in value) || value['totalPages'] === undefined) return false;
69
+ if (!('totalItems' in value) || value['totalItems'] === undefined) return false;
70
+ if (!('items' in value) || value['items'] === undefined) return false;
71
+ return true;
72
+ }
73
+
74
+ export function GetCourseListFromJSON(json: any): GetCourseList {
75
+ return GetCourseListFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function GetCourseListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseList {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'page': json['page'],
85
+ 'pageSize': json['pageSize'],
86
+ 'totalPages': json['totalPages'],
87
+ 'totalItems': json['totalItems'],
88
+ 'items': ((json['items'] as Array<any>).map(GetCourseFromJSON)),
89
+ };
90
+ }
91
+
92
+ export function GetCourseListToJSON(json: any): GetCourseList {
93
+ return GetCourseListToJSONTyped(json, false);
94
+ }
95
+
96
+ export function GetCourseListToJSONTyped(value?: GetCourseList | null, ignoreDiscriminator: boolean = false): any {
97
+ if (value == null) {
98
+ return value;
99
+ }
100
+
101
+ return {
102
+
103
+ 'page': value['page'],
104
+ 'pageSize': value['pageSize'],
105
+ 'totalPages': value['totalPages'],
106
+ 'totalItems': value['totalItems'],
107
+ 'items': ((value['items'] as Array<any>).map(GetCourseToJSON)),
108
+ };
109
+ }
110
+
@@ -0,0 +1,109 @@
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
+ *
18
+ * @export
19
+ * @interface GetModule
20
+ */
21
+ export interface GetModule {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof GetModule
26
+ */
27
+ readonly id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof GetModule
32
+ */
33
+ readonly courseId: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof GetModule
38
+ */
39
+ name: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof GetModule
44
+ */
45
+ description: string;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof GetModule
50
+ */
51
+ order: number;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof GetModule
56
+ */
57
+ lastUpdated: string;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the GetModule interface.
62
+ */
63
+ export function instanceOfGetModule(value: object): value is GetModule {
64
+ if (!('id' in value) || value['id'] === undefined) return false;
65
+ if (!('courseId' in value) || value['courseId'] === undefined) return false;
66
+ if (!('name' in value) || value['name'] === undefined) return false;
67
+ if (!('description' in value) || value['description'] === undefined) return false;
68
+ if (!('order' in value) || value['order'] === undefined) return false;
69
+ if (!('lastUpdated' in value) || value['lastUpdated'] === undefined) return false;
70
+ return true;
71
+ }
72
+
73
+ export function GetModuleFromJSON(json: any): GetModule {
74
+ return GetModuleFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function GetModuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetModule {
78
+ if (json == null) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'id': json['id'],
84
+ 'courseId': json['course_id'],
85
+ 'name': json['name'],
86
+ 'description': json['description'],
87
+ 'order': json['order'],
88
+ 'lastUpdated': json['last_updated'],
89
+ };
90
+ }
91
+
92
+ export function GetModuleToJSON(json: any): GetModule {
93
+ return GetModuleToJSONTyped(json, false);
94
+ }
95
+
96
+ export function GetModuleToJSONTyped(value?: Omit<GetModule, 'id'|'course_id'> | null, ignoreDiscriminator: boolean = false): any {
97
+ if (value == null) {
98
+ return value;
99
+ }
100
+
101
+ return {
102
+
103
+ 'name': value['name'],
104
+ 'description': value['description'],
105
+ 'order': value['order'],
106
+ 'last_updated': value['lastUpdated'],
107
+ };
108
+ }
109
+