@easyedu/js-lsm-api 1.108.0 → 1.110.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 (154) hide show
  1. package/.openapi-generator/FILES +16 -0
  2. package/README.md +19 -2
  3. package/dist/apis/ContentLibraryApi.d.ts +180 -0
  4. package/dist/apis/ContentLibraryApi.js +425 -1
  5. package/dist/apis/ContentLibraryQuizApi.d.ts +1 -0
  6. package/dist/apis/ContentLibraryQuizApi.js +3 -0
  7. package/dist/apis/CourseApi.d.ts +2 -2
  8. package/dist/apis/CourseApi.js +2 -2
  9. package/dist/apis/QuestionApi.d.ts +1 -12
  10. package/dist/apis/QuestionApi.js +3 -17
  11. package/dist/esm/apis/ContentLibraryApi.d.ts +180 -0
  12. package/dist/esm/apis/ContentLibraryApi.js +424 -0
  13. package/dist/esm/apis/ContentLibraryQuizApi.d.ts +1 -0
  14. package/dist/esm/apis/ContentLibraryQuizApi.js +3 -0
  15. package/dist/esm/apis/CourseApi.d.ts +2 -2
  16. package/dist/esm/apis/CourseApi.js +2 -2
  17. package/dist/esm/apis/QuestionApi.d.ts +1 -12
  18. package/dist/esm/apis/QuestionApi.js +2 -16
  19. package/dist/esm/models/ContentLibraryTag.d.ts +110 -0
  20. package/dist/esm/models/ContentLibraryTag.js +89 -0
  21. package/dist/esm/models/ContentLibraryTagItem.d.ts +85 -0
  22. package/dist/esm/models/ContentLibraryTagItem.js +77 -0
  23. package/dist/esm/models/CourseShareAcceptError.d.ts +54 -0
  24. package/dist/esm/models/CourseShareAcceptError.js +62 -0
  25. package/dist/esm/models/GetContentLibraryTagItemList.d.ts +57 -0
  26. package/dist/esm/models/GetContentLibraryTagItemList.js +60 -0
  27. package/dist/esm/models/GetContentLibraryTagList.d.ts +57 -0
  28. package/dist/esm/models/GetContentLibraryTagList.js +60 -0
  29. package/dist/esm/models/GetLibraryQuiz.d.ts +7 -0
  30. package/dist/esm/models/GetLibraryQuiz.js +5 -0
  31. package/dist/esm/models/GetQuestion.d.ts +4 -24
  32. package/dist/esm/models/GetQuestion.js +3 -18
  33. package/dist/esm/models/GetQuestionListFilters.d.ts +3 -24
  34. package/dist/esm/models/GetQuestionListFilters.js +2 -14
  35. package/dist/esm/models/GetResource.d.ts +7 -0
  36. package/dist/esm/models/GetResource.js +5 -0
  37. package/dist/esm/models/LibraryQuizCriteriaPreviewQuestion.d.ts +0 -21
  38. package/dist/esm/models/LibraryQuizCriteriaPreviewQuestion.js +0 -16
  39. package/dist/esm/models/LibraryQuizCriterion.d.ts +0 -21
  40. package/dist/esm/models/LibraryQuizCriterion.js +0 -12
  41. package/dist/esm/models/PostContentLibraryTag.d.ts +32 -0
  42. package/dist/esm/models/PostContentLibraryTag.js +43 -0
  43. package/dist/esm/models/PostContentLibraryTagMerge.d.ts +32 -0
  44. package/dist/esm/models/PostContentLibraryTagMerge.js +43 -0
  45. package/dist/esm/models/PostLibraryQuiz.d.ts +6 -0
  46. package/dist/esm/models/PostLibraryQuiz.js +2 -0
  47. package/dist/esm/models/PostQuestion.d.ts +0 -21
  48. package/dist/esm/models/PostQuestion.js +0 -16
  49. package/dist/esm/models/PostResource.d.ts +6 -0
  50. package/dist/esm/models/PostResource.js +2 -0
  51. package/dist/esm/models/PutContentLibraryTag.d.ts +32 -0
  52. package/dist/esm/models/PutContentLibraryTag.js +43 -0
  53. package/dist/esm/models/PutLibraryQuiz.d.ts +6 -0
  54. package/dist/esm/models/PutLibraryQuiz.js +2 -0
  55. package/dist/esm/models/PutQuestion.d.ts +0 -21
  56. package/dist/esm/models/PutQuestion.js +0 -12
  57. package/dist/esm/models/PutResource.d.ts +6 -0
  58. package/dist/esm/models/PutResource.js +2 -0
  59. package/dist/esm/models/index.d.ts +8 -0
  60. package/dist/esm/models/index.js +8 -0
  61. package/dist/models/ContentLibraryTag.d.ts +110 -0
  62. package/dist/models/ContentLibraryTag.js +96 -0
  63. package/dist/models/ContentLibraryTagItem.d.ts +85 -0
  64. package/dist/models/ContentLibraryTagItem.js +85 -0
  65. package/dist/models/CourseShareAcceptError.d.ts +54 -0
  66. package/dist/models/CourseShareAcceptError.js +70 -0
  67. package/dist/models/GetContentLibraryTagItemList.d.ts +57 -0
  68. package/dist/models/GetContentLibraryTagItemList.js +67 -0
  69. package/dist/models/GetContentLibraryTagList.d.ts +57 -0
  70. package/dist/models/GetContentLibraryTagList.js +67 -0
  71. package/dist/models/GetLibraryQuiz.d.ts +7 -0
  72. package/dist/models/GetLibraryQuiz.js +5 -0
  73. package/dist/models/GetQuestion.d.ts +4 -24
  74. package/dist/models/GetQuestion.js +4 -19
  75. package/dist/models/GetQuestionListFilters.d.ts +3 -24
  76. package/dist/models/GetQuestionListFilters.js +3 -15
  77. package/dist/models/GetResource.d.ts +7 -0
  78. package/dist/models/GetResource.js +5 -0
  79. package/dist/models/LibraryQuizCriteriaPreviewQuestion.d.ts +0 -21
  80. package/dist/models/LibraryQuizCriteriaPreviewQuestion.js +1 -17
  81. package/dist/models/LibraryQuizCriterion.d.ts +0 -21
  82. package/dist/models/LibraryQuizCriterion.js +1 -13
  83. package/dist/models/PostContentLibraryTag.d.ts +32 -0
  84. package/dist/models/PostContentLibraryTag.js +50 -0
  85. package/dist/models/PostContentLibraryTagMerge.d.ts +32 -0
  86. package/dist/models/PostContentLibraryTagMerge.js +50 -0
  87. package/dist/models/PostLibraryQuiz.d.ts +6 -0
  88. package/dist/models/PostLibraryQuiz.js +2 -0
  89. package/dist/models/PostQuestion.d.ts +0 -21
  90. package/dist/models/PostQuestion.js +1 -17
  91. package/dist/models/PostResource.d.ts +6 -0
  92. package/dist/models/PostResource.js +2 -0
  93. package/dist/models/PutContentLibraryTag.d.ts +32 -0
  94. package/dist/models/PutContentLibraryTag.js +50 -0
  95. package/dist/models/PutLibraryQuiz.d.ts +6 -0
  96. package/dist/models/PutLibraryQuiz.js +2 -0
  97. package/dist/models/PutQuestion.d.ts +0 -21
  98. package/dist/models/PutQuestion.js +1 -13
  99. package/dist/models/PutResource.d.ts +6 -0
  100. package/dist/models/PutResource.js +2 -0
  101. package/dist/models/index.d.ts +8 -0
  102. package/dist/models/index.js +8 -0
  103. package/docs/ContentLibraryApi.md +732 -90
  104. package/docs/ContentLibraryQuizApi.md +4 -1
  105. package/docs/ContentLibraryTag.md +60 -0
  106. package/docs/ContentLibraryTagItem.md +48 -0
  107. package/docs/CourseApi.md +1 -1
  108. package/docs/CourseShareAcceptError.md +37 -0
  109. package/docs/CourseShareApi.md +9 -2
  110. package/docs/GetContentLibraryTagItemList.md +42 -0
  111. package/docs/GetContentLibraryTagList.md +42 -0
  112. package/docs/GetLibraryQuiz.md +2 -0
  113. package/docs/GetQuestion.md +1 -5
  114. package/docs/GetQuestionListFilters.md +2 -6
  115. package/docs/GetResource.md +2 -0
  116. package/docs/LibraryQuizCriteriaPreviewQuestion.md +0 -4
  117. package/docs/LibraryQuizCriterion.md +0 -4
  118. package/docs/PostContentLibraryTag.md +34 -0
  119. package/docs/PostContentLibraryTagMerge.md +34 -0
  120. package/docs/PostLibraryQuiz.md +2 -0
  121. package/docs/PostQuestion.md +0 -4
  122. package/docs/PostResource.md +2 -0
  123. package/docs/PutContentLibraryTag.md +34 -0
  124. package/docs/PutLibraryQuiz.md +2 -0
  125. package/docs/PutQuestion.md +0 -4
  126. package/docs/PutResource.md +2 -0
  127. package/docs/QuestionApi.md +4 -10
  128. package/package.json +1 -1
  129. package/src/apis/ContentLibraryApi.ts +576 -0
  130. package/src/apis/ContentLibraryQuizApi.ts +5 -0
  131. package/src/apis/CourseApi.ts +2 -2
  132. package/src/apis/CourseShareApi.ts +5 -0
  133. package/src/apis/QuestionApi.ts +3 -22
  134. package/src/models/ContentLibraryTag.ts +180 -0
  135. package/src/models/ContentLibraryTagItem.ts +154 -0
  136. package/src/models/CourseShareAcceptError.ts +94 -0
  137. package/src/models/GetContentLibraryTagItemList.ts +110 -0
  138. package/src/models/GetContentLibraryTagList.ts +110 -0
  139. package/src/models/GetLibraryQuiz.ts +16 -0
  140. package/src/models/GetQuestion.ts +12 -33
  141. package/src/models/GetQuestionListFilters.ts +5 -31
  142. package/src/models/GetResource.ts +16 -0
  143. package/src/models/LibraryQuizCriteriaPreviewQuestion.ts +0 -28
  144. package/src/models/LibraryQuizCriterion.ts +0 -26
  145. package/src/models/PostContentLibraryTag.ts +66 -0
  146. package/src/models/PostContentLibraryTagMerge.ts +66 -0
  147. package/src/models/PostLibraryQuiz.ts +8 -0
  148. package/src/models/PostQuestion.ts +0 -28
  149. package/src/models/PostResource.ts +8 -0
  150. package/src/models/PutContentLibraryTag.ts +66 -0
  151. package/src/models/PutLibraryQuiz.ts +8 -0
  152. package/src/models/PutQuestion.ts +0 -26
  153. package/src/models/PutResource.ts +8 -0
  154. package/src/models/index.ts +8 -0
@@ -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 { ContentLibraryTag } from './ContentLibraryTag';
17
+ import {
18
+ ContentLibraryTagFromJSON,
19
+ ContentLibraryTagFromJSONTyped,
20
+ ContentLibraryTagToJSON,
21
+ ContentLibraryTagToJSONTyped,
22
+ } from './ContentLibraryTag';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface GetContentLibraryTagList
28
+ */
29
+ export interface GetContentLibraryTagList {
30
+ /**
31
+ * The current page number
32
+ * @type {number}
33
+ * @memberof GetContentLibraryTagList
34
+ */
35
+ page: number;
36
+ /**
37
+ * The number of items per page
38
+ * @type {number}
39
+ * @memberof GetContentLibraryTagList
40
+ */
41
+ pageSize: number;
42
+ /**
43
+ * The total number of pages
44
+ * @type {number}
45
+ * @memberof GetContentLibraryTagList
46
+ */
47
+ totalPages: number;
48
+ /**
49
+ * The total number of items
50
+ * @type {number}
51
+ * @memberof GetContentLibraryTagList
52
+ */
53
+ totalItems: number;
54
+ /**
55
+ *
56
+ * @type {Array<ContentLibraryTag>}
57
+ * @memberof GetContentLibraryTagList
58
+ */
59
+ items: Array<ContentLibraryTag>;
60
+ }
61
+
62
+ /**
63
+ * Check if a given object implements the GetContentLibraryTagList interface.
64
+ */
65
+ export function instanceOfGetContentLibraryTagList(value: object): value is GetContentLibraryTagList {
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 GetContentLibraryTagListFromJSON(json: any): GetContentLibraryTagList {
75
+ return GetContentLibraryTagListFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function GetContentLibraryTagListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetContentLibraryTagList {
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(ContentLibraryTagFromJSON)),
89
+ };
90
+ }
91
+
92
+ export function GetContentLibraryTagListToJSON(json: any): GetContentLibraryTagList {
93
+ return GetContentLibraryTagListToJSONTyped(json, false);
94
+ }
95
+
96
+ export function GetContentLibraryTagListToJSONTyped(value?: GetContentLibraryTagList | 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(ContentLibraryTagToJSON)),
108
+ };
109
+ }
110
+
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { ContentLibraryTag } from './ContentLibraryTag';
17
+ import {
18
+ ContentLibraryTagFromJSON,
19
+ ContentLibraryTagFromJSONTyped,
20
+ ContentLibraryTagToJSON,
21
+ ContentLibraryTagToJSONTyped,
22
+ } from './ContentLibraryTag';
16
23
  import type { GetLibraryQuizVersion } from './GetLibraryQuizVersion';
17
24
  import {
18
25
  GetLibraryQuizVersionFromJSON,
@@ -57,6 +64,12 @@ export interface GetLibraryQuiz {
57
64
  * @memberof GetLibraryQuiz
58
65
  */
59
66
  ownerId: string;
67
+ /**
68
+ *
69
+ * @type {Array<ContentLibraryTag>}
70
+ * @memberof GetLibraryQuiz
71
+ */
72
+ tags: Array<ContentLibraryTag>;
60
73
  /**
61
74
  *
62
75
  * @type {GetLibraryQuizVersion}
@@ -138,6 +151,7 @@ export function instanceOfGetLibraryQuiz(value: object): value is GetLibraryQuiz
138
151
  if (!('name' in value) || value['name'] === undefined) return false;
139
152
  if (!('description' in value) || value['description'] === undefined) return false;
140
153
  if (!('ownerId' in value) || value['ownerId'] === undefined) return false;
154
+ if (!('tags' in value) || value['tags'] === undefined) return false;
141
155
  if (!('versions' in value) || value['versions'] === undefined) return false;
142
156
  if (!('publishedCourseCount' in value) || value['publishedCourseCount'] === undefined) return false;
143
157
  if (!('draftCourseCount' in value) || value['draftCourseCount'] === undefined) return false;
@@ -163,6 +177,7 @@ export function GetLibraryQuizFromJSONTyped(json: any, ignoreDiscriminator: bool
163
177
  'name': json['name'],
164
178
  'description': json['description'],
165
179
  'ownerId': json['owner_id'],
180
+ 'tags': ((json['tags'] as Array<any>).map(ContentLibraryTagFromJSON)),
166
181
  'latestPublishedVersion': json['latest_published_version'] == null ? undefined : GetLibraryQuizVersionFromJSON(json['latest_published_version']),
167
182
  'draftVersion': json['draft_version'] == null ? undefined : GetLibraryQuizVersionFromJSON(json['draft_version']),
168
183
  'versions': ((json['versions'] as Array<any>).map(GetLibraryQuizVersionFromJSON)),
@@ -192,6 +207,7 @@ export function GetLibraryQuizToJSONTyped(value?: GetLibraryQuiz | null, ignoreD
192
207
  'name': value['name'],
193
208
  'description': value['description'],
194
209
  'owner_id': value['ownerId'],
210
+ 'tags': ((value['tags'] as Array<any>).map(ContentLibraryTagToJSON)),
195
211
  'latest_published_version': GetLibraryQuizVersionToJSON(value['latestPublishedVersion']),
196
212
  'draft_version': GetLibraryQuizVersionToJSON(value['draftVersion']),
197
213
  'versions': ((value['versions'] as Array<any>).map(GetLibraryQuizVersionToJSON)),
@@ -20,6 +20,13 @@ import {
20
20
  RichTextDocumentToJSON,
21
21
  RichTextDocumentToJSONTyped,
22
22
  } from './RichTextDocument';
23
+ import type { ContentLibraryTag } from './ContentLibraryTag';
24
+ import {
25
+ ContentLibraryTagFromJSON,
26
+ ContentLibraryTagFromJSONTyped,
27
+ ContentLibraryTagToJSON,
28
+ ContentLibraryTagToJSONTyped,
29
+ } from './ContentLibraryTag';
23
30
  import type { GetQuestionAnswerChoicesInner } from './GetQuestionAnswerChoicesInner';
24
31
  import {
25
32
  GetQuestionAnswerChoicesInnerFromJSON,
@@ -78,23 +85,11 @@ export interface GetQuestion {
78
85
  */
79
86
  explanation?: RichTextDocument;
80
87
  /**
81
- * Topic category (Fire Alarm, Fire Pump, Fire Sprinkler, etc.)
82
- * @type {string}
88
+ * Shared tags associated with the question
89
+ * @type {Array<ContentLibraryTag>}
83
90
  * @memberof GetQuestion
84
91
  */
85
- topic: string;
86
- /**
87
- * Difficulty level of the question
88
- * @type {GetQuestionDifficultyLevelEnum}
89
- * @memberof GetQuestion
90
- */
91
- difficultyLevel: GetQuestionDifficultyLevelEnum;
92
- /**
93
- * Keywords/tags for granular filtering
94
- * @type {Array<string>}
95
- * @memberof GetQuestion
96
- */
97
- tags?: Array<string>;
92
+ tags?: Array<ContentLibraryTag>;
98
93
  /**
99
94
  * Version identifier for triannual updates
100
95
  * @type {string}
@@ -153,16 +148,6 @@ export const GetQuestionQuestionTypeEnum = {
153
148
  } as const;
154
149
  export type GetQuestionQuestionTypeEnum = typeof GetQuestionQuestionTypeEnum[keyof typeof GetQuestionQuestionTypeEnum];
155
150
 
156
- /**
157
- * @export
158
- */
159
- export const GetQuestionDifficultyLevelEnum = {
160
- Beginner: 'beginner',
161
- Intermediate: 'intermediate',
162
- Advanced: 'advanced'
163
- } as const;
164
- export type GetQuestionDifficultyLevelEnum = typeof GetQuestionDifficultyLevelEnum[keyof typeof GetQuestionDifficultyLevelEnum];
165
-
166
151
 
167
152
  /**
168
153
  * Check if a given object implements the GetQuestion interface.
@@ -171,8 +156,6 @@ export function instanceOfGetQuestion(value: object): value is GetQuestion {
171
156
  if (!('id' in value) || value['id'] === undefined) return false;
172
157
  if (!('questionText' in value) || value['questionText'] === undefined) return false;
173
158
  if (!('questionType' in value) || value['questionType'] === undefined) return false;
174
- if (!('topic' in value) || value['topic'] === undefined) return false;
175
- if (!('difficultyLevel' in value) || value['difficultyLevel'] === undefined) return false;
176
159
  if (!('versionNumber' in value) || value['versionNumber'] === undefined) return false;
177
160
  if (!('createdDate' in value) || value['createdDate'] === undefined) return false;
178
161
  if (!('updatedDate' in value) || value['updatedDate'] === undefined) return false;
@@ -195,9 +178,7 @@ export function GetQuestionFromJSONTyped(json: any, ignoreDiscriminator: boolean
195
178
  'answerChoices': json['answer_choices'] == null ? undefined : ((json['answer_choices'] as Array<any>).map(GetQuestionAnswerChoicesInnerFromJSON)),
196
179
  'correctAnswer': json['correct_answer'] == null ? undefined : json['correct_answer'],
197
180
  'explanation': json['explanation'] == null ? undefined : RichTextDocumentFromJSON(json['explanation']),
198
- 'topic': json['topic'],
199
- 'difficultyLevel': json['difficulty_level'],
200
- 'tags': json['tags'] == null ? undefined : json['tags'],
181
+ 'tags': json['tags'] == null ? undefined : ((json['tags'] as Array<any>).map(ContentLibraryTagFromJSON)),
201
182
  'version': json['version'] == null ? undefined : json['version'],
202
183
  'versionNumber': json['version_number'],
203
184
  'createdDate': (new Date(json['created_date'])),
@@ -224,9 +205,7 @@ export function GetQuestionToJSONTyped(value?: Omit<GetQuestion, 'id'|'version_n
224
205
  'answer_choices': value['answerChoices'] == null ? undefined : ((value['answerChoices'] as Array<any>).map(GetQuestionAnswerChoicesInnerToJSON)),
225
206
  'correct_answer': value['correctAnswer'],
226
207
  'explanation': RichTextDocumentToJSON(value['explanation']),
227
- 'topic': value['topic'],
228
- 'difficulty_level': value['difficultyLevel'],
229
- 'tags': value['tags'],
208
+ 'tags': value['tags'] == null ? undefined : ((value['tags'] as Array<any>).map(ContentLibraryTagToJSON)),
230
209
  'version': value['version'],
231
210
  };
232
211
  }
@@ -19,12 +19,6 @@ import { mapValues } from '../runtime';
19
19
  * @interface GetQuestionListFilters
20
20
  */
21
21
  export interface GetQuestionListFilters {
22
- /**
23
- * Filter by topic
24
- * @type {string}
25
- * @memberof GetQuestionListFilters
26
- */
27
- topic?: string;
28
22
  /**
29
23
  * Filter by question type
30
24
  * @type {GetQuestionListFiltersQuestionTypeEnum}
@@ -32,17 +26,11 @@ export interface GetQuestionListFilters {
32
26
  */
33
27
  questionType?: GetQuestionListFiltersQuestionTypeEnum;
34
28
  /**
35
- * Filter by difficulty level
36
- * @type {GetQuestionListFiltersDifficultyLevelEnum}
37
- * @memberof GetQuestionListFilters
38
- */
39
- difficultyLevel?: GetQuestionListFiltersDifficultyLevelEnum;
40
- /**
41
- * Filter by tags/keywords
42
- * @type {Array<string>}
29
+ * Filter by a shared tag
30
+ * @type {string}
43
31
  * @memberof GetQuestionListFilters
44
32
  */
45
- tags?: Array<string>;
33
+ tagId?: string;
46
34
  /**
47
35
  * Search in question text
48
36
  * @type {string}
@@ -77,16 +65,6 @@ export const GetQuestionListFiltersQuestionTypeEnum = {
77
65
  } as const;
78
66
  export type GetQuestionListFiltersQuestionTypeEnum = typeof GetQuestionListFiltersQuestionTypeEnum[keyof typeof GetQuestionListFiltersQuestionTypeEnum];
79
67
 
80
- /**
81
- * @export
82
- */
83
- export const GetQuestionListFiltersDifficultyLevelEnum = {
84
- Beginner: 'beginner',
85
- Intermediate: 'intermediate',
86
- Advanced: 'advanced'
87
- } as const;
88
- export type GetQuestionListFiltersDifficultyLevelEnum = typeof GetQuestionListFiltersDifficultyLevelEnum[keyof typeof GetQuestionListFiltersDifficultyLevelEnum];
89
-
90
68
 
91
69
  /**
92
70
  * Check if a given object implements the GetQuestionListFilters interface.
@@ -105,10 +83,8 @@ export function GetQuestionListFiltersFromJSONTyped(json: any, ignoreDiscriminat
105
83
  }
106
84
  return {
107
85
 
108
- 'topic': json['topic'] == null ? undefined : json['topic'],
109
86
  'questionType': json['question_type'] == null ? undefined : json['question_type'],
110
- 'difficultyLevel': json['difficulty_level'] == null ? undefined : json['difficulty_level'],
111
- 'tags': json['tags'] == null ? undefined : json['tags'],
87
+ 'tagId': json['tag_id'] == null ? undefined : json['tag_id'],
112
88
  'search': json['search'] == null ? undefined : json['search'],
113
89
  'createdAfter': json['created_after'] == null ? undefined : (new Date(json['created_after'])),
114
90
  'createdBefore': json['created_before'] == null ? undefined : (new Date(json['created_before'])),
@@ -126,10 +102,8 @@ export function GetQuestionListFiltersToJSONTyped(value?: GetQuestionListFilters
126
102
 
127
103
  return {
128
104
 
129
- 'topic': value['topic'],
130
105
  'question_type': value['questionType'],
131
- 'difficulty_level': value['difficultyLevel'],
132
- 'tags': value['tags'],
106
+ 'tag_id': value['tagId'],
133
107
  'search': value['search'],
134
108
  'created_after': value['createdAfter'] == null ? value['createdAfter'] : value['createdAfter'].toISOString().substring(0,10),
135
109
  'created_before': value['createdBefore'] == null ? value['createdBefore'] : value['createdBefore'].toISOString().substring(0,10),
@@ -20,6 +20,13 @@ import {
20
20
  GetContentLibraryVersionToJSON,
21
21
  GetContentLibraryVersionToJSONTyped,
22
22
  } from './GetContentLibraryVersion';
23
+ import type { ContentLibraryTag } from './ContentLibraryTag';
24
+ import {
25
+ ContentLibraryTagFromJSON,
26
+ ContentLibraryTagFromJSONTyped,
27
+ ContentLibraryTagToJSON,
28
+ ContentLibraryTagToJSONTyped,
29
+ } from './ContentLibraryTag';
23
30
  import type { ResourceType } from './ResourceType';
24
31
  import {
25
32
  ResourceTypeFromJSON,
@@ -64,6 +71,12 @@ export interface GetResource {
64
71
  * @memberof GetResource
65
72
  */
66
73
  ownerId: string;
74
+ /**
75
+ *
76
+ * @type {Array<ContentLibraryTag>}
77
+ * @memberof GetResource
78
+ */
79
+ tags: Array<ContentLibraryTag>;
67
80
  /**
68
81
  *
69
82
  * @type {GetContentLibraryVersion}
@@ -137,6 +150,7 @@ export function instanceOfGetResource(value: object): value is GetResource {
137
150
  if (!('description' in value) || value['description'] === undefined) return false;
138
151
  if (!('resourceType' in value) || value['resourceType'] === undefined) return false;
139
152
  if (!('ownerId' in value) || value['ownerId'] === undefined) return false;
153
+ if (!('tags' in value) || value['tags'] === undefined) return false;
140
154
  if (!('versions' in value) || value['versions'] === undefined) return false;
141
155
  if (!('publishedCourseCount' in value) || value['publishedCourseCount'] === undefined) return false;
142
156
  if (!('draftCourseCount' in value) || value['draftCourseCount'] === undefined) return false;
@@ -162,6 +176,7 @@ export function GetResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean
162
176
  'description': json['description'],
163
177
  'resourceType': ResourceTypeFromJSON(json['resource_type']),
164
178
  'ownerId': json['owner_id'],
179
+ 'tags': ((json['tags'] as Array<any>).map(ContentLibraryTagFromJSON)),
165
180
  'latestPublishedVersion': json['latest_published_version'] == null ? undefined : GetContentLibraryVersionFromJSON(json['latest_published_version']),
166
181
  'draftVersion': json['draft_version'] == null ? undefined : GetContentLibraryVersionFromJSON(json['draft_version']),
167
182
  'versions': ((json['versions'] as Array<any>).map(GetContentLibraryVersionFromJSON)),
@@ -191,6 +206,7 @@ export function GetResourceToJSONTyped(value?: GetResource | null, ignoreDiscrim
191
206
  'description': value['description'],
192
207
  'resource_type': ResourceTypeToJSON(value['resourceType']),
193
208
  'owner_id': value['ownerId'],
209
+ 'tags': ((value['tags'] as Array<any>).map(ContentLibraryTagToJSON)),
194
210
  'latest_published_version': GetContentLibraryVersionToJSON(value['latestPublishedVersion']),
195
211
  'draft_version': GetContentLibraryVersionToJSON(value['draftVersion']),
196
212
  'versions': ((value['versions'] as Array<any>).map(GetContentLibraryVersionToJSON)),
@@ -57,18 +57,6 @@ export interface LibraryQuizCriteriaPreviewQuestion {
57
57
  * @memberof LibraryQuizCriteriaPreviewQuestion
58
58
  */
59
59
  version?: string | null;
60
- /**
61
- *
62
- * @type {string}
63
- * @memberof LibraryQuizCriteriaPreviewQuestion
64
- */
65
- topic: string;
66
- /**
67
- *
68
- * @type {LibraryQuizCriteriaPreviewQuestionDifficultyLevelEnum}
69
- * @memberof LibraryQuizCriteriaPreviewQuestion
70
- */
71
- difficultyLevel: LibraryQuizCriteriaPreviewQuestionDifficultyLevelEnum;
72
60
  /**
73
61
  *
74
62
  * @type {Array<string>}
@@ -91,16 +79,6 @@ export const LibraryQuizCriteriaPreviewQuestionQuestionTypeEnum = {
91
79
  } as const;
92
80
  export type LibraryQuizCriteriaPreviewQuestionQuestionTypeEnum = typeof LibraryQuizCriteriaPreviewQuestionQuestionTypeEnum[keyof typeof LibraryQuizCriteriaPreviewQuestionQuestionTypeEnum];
93
81
 
94
- /**
95
- * @export
96
- */
97
- export const LibraryQuizCriteriaPreviewQuestionDifficultyLevelEnum = {
98
- Beginner: 'beginner',
99
- Intermediate: 'intermediate',
100
- Advanced: 'advanced'
101
- } as const;
102
- export type LibraryQuizCriteriaPreviewQuestionDifficultyLevelEnum = typeof LibraryQuizCriteriaPreviewQuestionDifficultyLevelEnum[keyof typeof LibraryQuizCriteriaPreviewQuestionDifficultyLevelEnum];
103
-
104
82
 
105
83
  /**
106
84
  * Check if a given object implements the LibraryQuizCriteriaPreviewQuestion interface.
@@ -110,8 +88,6 @@ export function instanceOfLibraryQuizCriteriaPreviewQuestion(value: object): val
110
88
  if (!('questionText' in value) || value['questionText'] === undefined) return false;
111
89
  if (!('questionType' in value) || value['questionType'] === undefined) return false;
112
90
  if (!('versionNumber' in value) || value['versionNumber'] === undefined) return false;
113
- if (!('topic' in value) || value['topic'] === undefined) return false;
114
- if (!('difficultyLevel' in value) || value['difficultyLevel'] === undefined) return false;
115
91
  if (!('tags' in value) || value['tags'] === undefined) return false;
116
92
  return true;
117
93
  }
@@ -131,8 +107,6 @@ export function LibraryQuizCriteriaPreviewQuestionFromJSONTyped(json: any, ignor
131
107
  'questionType': json['question_type'],
132
108
  'versionNumber': json['version_number'],
133
109
  'version': json['version'] == null ? undefined : json['version'],
134
- 'topic': json['topic'],
135
- 'difficultyLevel': json['difficulty_level'],
136
110
  'tags': json['tags'],
137
111
  };
138
112
  }
@@ -153,8 +127,6 @@ export function LibraryQuizCriteriaPreviewQuestionToJSONTyped(value?: LibraryQui
153
127
  'question_type': value['questionType'],
154
128
  'version_number': value['versionNumber'],
155
129
  'version': value['version'],
156
- 'topic': value['topic'],
157
- 'difficulty_level': value['difficultyLevel'],
158
130
  'tags': value['tags'],
159
131
  };
160
132
  }
@@ -25,18 +25,6 @@ export interface LibraryQuizCriterion {
25
25
  * @memberof LibraryQuizCriterion
26
26
  */
27
27
  id?: string | null;
28
- /**
29
- *
30
- * @type {string}
31
- * @memberof LibraryQuizCriterion
32
- */
33
- topic?: string | null;
34
- /**
35
- *
36
- * @type {LibraryQuizCriterionDifficultyLevelEnum}
37
- * @memberof LibraryQuizCriterion
38
- */
39
- difficultyLevel?: LibraryQuizCriterionDifficultyLevelEnum | null;
40
28
  /**
41
29
  *
42
30
  * @type {LibraryQuizCriterionQuestionTypeEnum}
@@ -70,16 +58,6 @@ export interface LibraryQuizCriterion {
70
58
  }
71
59
 
72
60
 
73
- /**
74
- * @export
75
- */
76
- export const LibraryQuizCriterionDifficultyLevelEnum = {
77
- Beginner: 'beginner',
78
- Intermediate: 'intermediate',
79
- Advanced: 'advanced'
80
- } as const;
81
- export type LibraryQuizCriterionDifficultyLevelEnum = typeof LibraryQuizCriterionDifficultyLevelEnum[keyof typeof LibraryQuizCriterionDifficultyLevelEnum];
82
-
83
61
  /**
84
62
  * @export
85
63
  */
@@ -113,8 +91,6 @@ export function LibraryQuizCriterionFromJSONTyped(json: any, ignoreDiscriminator
113
91
  return {
114
92
 
115
93
  'id': json['id'] == null ? undefined : json['id'],
116
- 'topic': json['topic'] == null ? undefined : json['topic'],
117
- 'difficultyLevel': json['difficulty_level'] == null ? undefined : json['difficulty_level'],
118
94
  'questionType': json['question_type'] == null ? undefined : json['question_type'],
119
95
  'tags': json['tags'] == null ? undefined : json['tags'],
120
96
  'minQuestions': json['min_questions'] == null ? undefined : json['min_questions'],
@@ -135,8 +111,6 @@ export function LibraryQuizCriterionToJSONTyped(value?: LibraryQuizCriterion | n
135
111
  return {
136
112
 
137
113
  'id': value['id'],
138
- 'topic': value['topic'],
139
- 'difficulty_level': value['difficultyLevel'],
140
114
  'question_type': value['questionType'],
141
115
  'tags': value['tags'],
142
116
  'min_questions': value['minQuestions'],
@@ -0,0 +1,66 @@
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 PostContentLibraryTag
20
+ */
21
+ export interface PostContentLibraryTag {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof PostContentLibraryTag
26
+ */
27
+ name: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the PostContentLibraryTag interface.
32
+ */
33
+ export function instanceOfPostContentLibraryTag(value: object): value is PostContentLibraryTag {
34
+ if (!('name' in value) || value['name'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function PostContentLibraryTagFromJSON(json: any): PostContentLibraryTag {
39
+ return PostContentLibraryTagFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function PostContentLibraryTagFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostContentLibraryTag {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'name': json['name'],
49
+ };
50
+ }
51
+
52
+ export function PostContentLibraryTagToJSON(json: any): PostContentLibraryTag {
53
+ return PostContentLibraryTagToJSONTyped(json, false);
54
+ }
55
+
56
+ export function PostContentLibraryTagToJSONTyped(value?: PostContentLibraryTag | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'name': value['name'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,66 @@
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 PostContentLibraryTagMerge
20
+ */
21
+ export interface PostContentLibraryTagMerge {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof PostContentLibraryTagMerge
26
+ */
27
+ targetTagId: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the PostContentLibraryTagMerge interface.
32
+ */
33
+ export function instanceOfPostContentLibraryTagMerge(value: object): value is PostContentLibraryTagMerge {
34
+ if (!('targetTagId' in value) || value['targetTagId'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function PostContentLibraryTagMergeFromJSON(json: any): PostContentLibraryTagMerge {
39
+ return PostContentLibraryTagMergeFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function PostContentLibraryTagMergeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostContentLibraryTagMerge {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'targetTagId': json['target_tag_id'],
49
+ };
50
+ }
51
+
52
+ export function PostContentLibraryTagMergeToJSON(json: any): PostContentLibraryTagMerge {
53
+ return PostContentLibraryTagMergeToJSONTyped(json, false);
54
+ }
55
+
56
+ export function PostContentLibraryTagMergeToJSONTyped(value?: PostContentLibraryTagMerge | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'target_tag_id': value['targetTagId'],
64
+ };
65
+ }
66
+
@@ -105,6 +105,12 @@ export interface PostLibraryQuiz {
105
105
  * @memberof PostLibraryQuiz
106
106
  */
107
107
  settings?: { [key: string]: any; };
108
+ /**
109
+ *
110
+ * @type {Set<string>}
111
+ * @memberof PostLibraryQuiz
112
+ */
113
+ tags?: Set<string>;
108
114
  }
109
115
 
110
116
 
@@ -141,6 +147,7 @@ export function PostLibraryQuizFromJSONTyped(json: any, ignoreDiscriminator: boo
141
147
  'allowReview': json['allow_review'] == null ? undefined : json['allow_review'],
142
148
  'requireAllQuestions': json['require_all_questions'] == null ? undefined : json['require_all_questions'],
143
149
  'settings': json['settings'] == null ? undefined : json['settings'],
150
+ 'tags': json['tags'] == null ? undefined : new Set(json['tags']),
144
151
  };
145
152
  }
146
153
 
@@ -168,6 +175,7 @@ export function PostLibraryQuizToJSONTyped(value?: PostLibraryQuiz | null, ignor
168
175
  'allow_review': value['allowReview'],
169
176
  'require_all_questions': value['requireAllQuestions'],
170
177
  'settings': value['settings'],
178
+ 'tags': value['tags'] == null ? undefined : Array.from(value['tags'] as Set<any>),
171
179
  };
172
180
  }
173
181