@easyedu/js-lsm-api 1.31.0 → 1.33.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 (278) hide show
  1. package/.openapi-generator/FILES +14 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +20 -4
  4. package/dist/apis/ContentApi.d.ts +93 -3
  5. package/dist/apis/ContentApi.js +308 -106
  6. package/dist/apis/CourseApi.d.ts +48 -0
  7. package/dist/apis/CourseApi.js +157 -49
  8. package/dist/apis/ModuleApi.d.ts +16 -0
  9. package/dist/apis/ModuleApi.js +52 -16
  10. package/dist/apis/OtherApi.d.ts +4 -0
  11. package/dist/apis/OtherApi.js +13 -4
  12. package/dist/apis/PortalApi.d.ts +30 -3
  13. package/dist/apis/PortalApi.js +92 -32
  14. package/dist/apis/QuestionApi.d.ts +20 -0
  15. package/dist/apis/QuestionApi.js +65 -20
  16. package/dist/apis/QuizApi.d.ts +100 -0
  17. package/dist/apis/QuizApi.js +325 -100
  18. package/dist/apis/ReportingApi.d.ts +36 -0
  19. package/dist/apis/ReportingApi.js +117 -36
  20. package/dist/apis/RoleApi.d.ts +169 -0
  21. package/dist/apis/RoleApi.js +442 -0
  22. package/dist/apis/UserApi.d.ts +28 -0
  23. package/dist/apis/UserApi.js +91 -28
  24. package/dist/apis/index.d.ts +1 -0
  25. package/dist/apis/index.js +1 -0
  26. package/dist/esm/apis/ContentApi.d.ts +93 -3
  27. package/dist/esm/apis/ContentApi.js +307 -105
  28. package/dist/esm/apis/CourseApi.d.ts +48 -0
  29. package/dist/esm/apis/CourseApi.js +157 -49
  30. package/dist/esm/apis/ModuleApi.d.ts +16 -0
  31. package/dist/esm/apis/ModuleApi.js +52 -16
  32. package/dist/esm/apis/OtherApi.d.ts +4 -0
  33. package/dist/esm/apis/OtherApi.js +13 -4
  34. package/dist/esm/apis/PortalApi.d.ts +30 -3
  35. package/dist/esm/apis/PortalApi.js +92 -32
  36. package/dist/esm/apis/QuestionApi.d.ts +20 -0
  37. package/dist/esm/apis/QuestionApi.js +65 -20
  38. package/dist/esm/apis/QuizApi.d.ts +100 -0
  39. package/dist/esm/apis/QuizApi.js +325 -100
  40. package/dist/esm/apis/ReportingApi.d.ts +36 -0
  41. package/dist/esm/apis/ReportingApi.js +117 -36
  42. package/dist/esm/apis/RoleApi.d.ts +169 -0
  43. package/dist/esm/apis/RoleApi.js +438 -0
  44. package/dist/esm/apis/UserApi.d.ts +28 -0
  45. package/dist/esm/apis/UserApi.js +91 -28
  46. package/dist/esm/apis/index.d.ts +1 -0
  47. package/dist/esm/apis/index.js +1 -0
  48. package/dist/esm/models/CriteriaBasedSelection.d.ts +1 -1
  49. package/dist/esm/models/CriteriaBasedSelectionCriteria.d.ts +2 -2
  50. package/dist/esm/models/FillInBlank.d.ts +1 -1
  51. package/dist/esm/models/FillInBlank1.d.ts +1 -1
  52. package/dist/esm/models/GetContent.d.ts +1 -1
  53. package/dist/esm/models/GetContentGradeDetail.d.ts +3 -3
  54. package/dist/esm/models/GetContentGradesItemsInner.d.ts +2 -2
  55. package/dist/esm/models/GetContentInstructorBasicReportingContentInfo.d.ts +1 -1
  56. package/dist/esm/models/GetContentSessionDetail.d.ts +2 -2
  57. package/dist/esm/models/GetCourseEnrollment.d.ts +2 -2
  58. package/dist/esm/models/GetCourseEnrollmentListItem.d.ts +2 -2
  59. package/dist/esm/models/GetCourseExport.d.ts +2 -2
  60. package/dist/esm/models/GetPermission.d.ts +50 -0
  61. package/dist/esm/models/GetPermission.js +53 -0
  62. package/dist/esm/models/GetPortal.d.ts +23 -4
  63. package/dist/esm/models/GetPortal.js +14 -0
  64. package/dist/esm/models/GetPortalUser.d.ts +2 -11
  65. package/dist/esm/models/GetPortalUser.js +0 -8
  66. package/dist/esm/models/GetQuestion.d.ts +2 -2
  67. package/dist/esm/models/GetQuestionListFilters.d.ts +2 -2
  68. package/dist/esm/models/GetQuiz.d.ts +1 -1
  69. package/dist/esm/models/GetQuizAttemptAnalyticsBasicInfo.d.ts +1 -1
  70. package/dist/esm/models/GetQuizAttemptAnalyticsPerformanceBreakdownByDifficultyInner.d.ts +1 -1
  71. package/dist/esm/models/GetQuizAttemptAnalyticsPerformanceBreakdownByQuestionTypeInner.d.ts +1 -1
  72. package/dist/esm/models/GetQuizAttemptAnalyticsQuestionAnalysisInner.d.ts +2 -2
  73. package/dist/esm/models/GetQuizAttemptAttempt.d.ts +1 -1
  74. package/dist/esm/models/GetQuizAttemptListAllOfAttempts.d.ts +1 -1
  75. package/dist/esm/models/GetQuizAttemptListAllOfFilters.d.ts +1 -1
  76. package/dist/esm/models/GetQuizAttemptQuestionsInner.d.ts +1 -1
  77. package/dist/esm/models/GetQuizCriteriaItem.d.ts +2 -2
  78. package/dist/esm/models/GetQuizCriteriaListItemsInner.d.ts +2 -2
  79. package/dist/esm/models/GetQuizListAllOfFilters.d.ts +1 -1
  80. package/dist/esm/models/GetQuizListAllOfQuizzes.d.ts +1 -1
  81. package/dist/esm/models/GetQuizQuestions.d.ts +1 -1
  82. package/dist/esm/models/GetQuizQuestionsItemsInnerQuestionDetails.d.ts +2 -2
  83. package/dist/esm/models/GetQuizResults.d.ts +1 -1
  84. package/dist/esm/models/GetQuizResultsFeedbackDifficultyPerformanceInner.d.ts +1 -1
  85. package/dist/esm/models/GetQuizResultsQuestionsInner.d.ts +1 -1
  86. package/dist/esm/models/GetRole.d.ts +88 -0
  87. package/dist/esm/models/GetRole.js +80 -0
  88. package/dist/esm/models/GetScormApiLogItem.d.ts +1 -1
  89. package/dist/esm/models/GetUserQuizAttemptsAllOfAttempts.d.ts +1 -1
  90. package/dist/esm/models/GetUserQuizAttemptsAllOfFilters.d.ts +1 -1
  91. package/dist/esm/models/GetUserRole.d.ts +63 -0
  92. package/dist/esm/models/GetUserRole.js +67 -0
  93. package/dist/esm/models/ManualSelection.d.ts +1 -1
  94. package/dist/esm/models/MultipleAnswer.d.ts +1 -1
  95. package/dist/esm/models/MultipleAnswer1.d.ts +1 -1
  96. package/dist/esm/models/NoAnswer.d.ts +1 -1
  97. package/dist/esm/models/PostContentUpload.d.ts +1 -1
  98. package/dist/esm/models/PostCourseExport.d.ts +1 -1
  99. package/dist/esm/models/PostPortalInvite.d.ts +6 -2
  100. package/dist/esm/models/PostPortalInvite.js +5 -1
  101. package/dist/esm/models/PostQuestion.d.ts +2 -2
  102. package/dist/esm/models/PostQuiz.d.ts +1 -1
  103. package/dist/esm/models/PostQuizAttemptAttempt.d.ts +1 -1
  104. package/dist/esm/models/PostQuizAttemptQuestionsInner.d.ts +1 -1
  105. package/dist/esm/models/PostQuizAttemptSubmit.d.ts +1 -1
  106. package/dist/esm/models/PostQuizCriteriaCriteriaInner.d.ts +2 -2
  107. package/dist/esm/models/PostRole.d.ts +57 -0
  108. package/dist/esm/models/PostRole.js +61 -0
  109. package/dist/esm/models/PutCourseEnrollment.d.ts +2 -2
  110. package/dist/esm/models/PutQuestion.d.ts +2 -2
  111. package/dist/esm/models/PutQuiz.d.ts +1 -1
  112. package/dist/esm/models/PutRole.d.ts +38 -0
  113. package/dist/esm/models/PutRole.js +45 -0
  114. package/dist/esm/models/PutRolePermissions.d.ts +32 -0
  115. package/dist/esm/models/PutRolePermissions.js +43 -0
  116. package/dist/esm/models/QuizContent.d.ts +1 -1
  117. package/dist/esm/models/SingleAnswer.d.ts +1 -1
  118. package/dist/esm/models/index.d.ts +6 -0
  119. package/dist/esm/models/index.js +6 -0
  120. package/dist/esm/runtime.js +15 -0
  121. package/dist/models/CriteriaBasedSelection.d.ts +1 -1
  122. package/dist/models/CriteriaBasedSelectionCriteria.d.ts +2 -2
  123. package/dist/models/FillInBlank.d.ts +1 -1
  124. package/dist/models/FillInBlank1.d.ts +1 -1
  125. package/dist/models/GetContent.d.ts +1 -1
  126. package/dist/models/GetContentGradeDetail.d.ts +3 -3
  127. package/dist/models/GetContentGradesItemsInner.d.ts +2 -2
  128. package/dist/models/GetContentInstructorBasicReportingContentInfo.d.ts +1 -1
  129. package/dist/models/GetContentSessionDetail.d.ts +2 -2
  130. package/dist/models/GetCourseEnrollment.d.ts +2 -2
  131. package/dist/models/GetCourseEnrollmentListItem.d.ts +2 -2
  132. package/dist/models/GetCourseExport.d.ts +2 -2
  133. package/dist/models/GetPermission.d.ts +50 -0
  134. package/dist/models/GetPermission.js +60 -0
  135. package/dist/models/GetPortal.d.ts +23 -4
  136. package/dist/models/GetPortal.js +15 -1
  137. package/dist/models/GetPortalUser.d.ts +2 -11
  138. package/dist/models/GetPortalUser.js +0 -9
  139. package/dist/models/GetQuestion.d.ts +2 -2
  140. package/dist/models/GetQuestionListFilters.d.ts +2 -2
  141. package/dist/models/GetQuiz.d.ts +1 -1
  142. package/dist/models/GetQuizAttemptAnalyticsBasicInfo.d.ts +1 -1
  143. package/dist/models/GetQuizAttemptAnalyticsPerformanceBreakdownByDifficultyInner.d.ts +1 -1
  144. package/dist/models/GetQuizAttemptAnalyticsPerformanceBreakdownByQuestionTypeInner.d.ts +1 -1
  145. package/dist/models/GetQuizAttemptAnalyticsQuestionAnalysisInner.d.ts +2 -2
  146. package/dist/models/GetQuizAttemptAttempt.d.ts +1 -1
  147. package/dist/models/GetQuizAttemptListAllOfAttempts.d.ts +1 -1
  148. package/dist/models/GetQuizAttemptListAllOfFilters.d.ts +1 -1
  149. package/dist/models/GetQuizAttemptQuestionsInner.d.ts +1 -1
  150. package/dist/models/GetQuizCriteriaItem.d.ts +2 -2
  151. package/dist/models/GetQuizCriteriaListItemsInner.d.ts +2 -2
  152. package/dist/models/GetQuizListAllOfFilters.d.ts +1 -1
  153. package/dist/models/GetQuizListAllOfQuizzes.d.ts +1 -1
  154. package/dist/models/GetQuizQuestions.d.ts +1 -1
  155. package/dist/models/GetQuizQuestionsItemsInnerQuestionDetails.d.ts +2 -2
  156. package/dist/models/GetQuizResults.d.ts +1 -1
  157. package/dist/models/GetQuizResultsFeedbackDifficultyPerformanceInner.d.ts +1 -1
  158. package/dist/models/GetQuizResultsQuestionsInner.d.ts +1 -1
  159. package/dist/models/GetRole.d.ts +88 -0
  160. package/dist/models/GetRole.js +88 -0
  161. package/dist/models/GetScormApiLogItem.d.ts +1 -1
  162. package/dist/models/GetUserQuizAttemptsAllOfAttempts.d.ts +1 -1
  163. package/dist/models/GetUserQuizAttemptsAllOfFilters.d.ts +1 -1
  164. package/dist/models/GetUserRole.d.ts +63 -0
  165. package/dist/models/GetUserRole.js +75 -0
  166. package/dist/models/ManualSelection.d.ts +1 -1
  167. package/dist/models/MultipleAnswer.d.ts +1 -1
  168. package/dist/models/MultipleAnswer1.d.ts +1 -1
  169. package/dist/models/NoAnswer.d.ts +1 -1
  170. package/dist/models/PostContentUpload.d.ts +1 -1
  171. package/dist/models/PostCourseExport.d.ts +1 -1
  172. package/dist/models/PostPortalInvite.d.ts +6 -2
  173. package/dist/models/PostPortalInvite.js +5 -1
  174. package/dist/models/PostQuestion.d.ts +2 -2
  175. package/dist/models/PostQuiz.d.ts +1 -1
  176. package/dist/models/PostQuizAttemptAttempt.d.ts +1 -1
  177. package/dist/models/PostQuizAttemptQuestionsInner.d.ts +1 -1
  178. package/dist/models/PostQuizAttemptSubmit.d.ts +1 -1
  179. package/dist/models/PostQuizCriteriaCriteriaInner.d.ts +2 -2
  180. package/dist/models/PostRole.d.ts +57 -0
  181. package/dist/models/PostRole.js +69 -0
  182. package/dist/models/PutCourseEnrollment.d.ts +2 -2
  183. package/dist/models/PutQuestion.d.ts +2 -2
  184. package/dist/models/PutQuiz.d.ts +1 -1
  185. package/dist/models/PutRole.d.ts +38 -0
  186. package/dist/models/PutRole.js +52 -0
  187. package/dist/models/PutRolePermissions.d.ts +32 -0
  188. package/dist/models/PutRolePermissions.js +50 -0
  189. package/dist/models/QuizContent.d.ts +1 -1
  190. package/dist/models/SingleAnswer.d.ts +1 -1
  191. package/dist/models/index.d.ts +6 -0
  192. package/dist/models/index.js +6 -0
  193. package/dist/runtime.js +15 -0
  194. package/docs/ContentApi.md +6 -3
  195. package/docs/GetPermission.md +41 -0
  196. package/docs/GetPortal.md +2 -0
  197. package/docs/GetRole.md +49 -0
  198. package/docs/GetUserRole.md +41 -0
  199. package/docs/PortalApi.md +3 -6
  200. package/docs/PostRole.md +39 -0
  201. package/docs/PutRole.md +37 -0
  202. package/docs/PutRolePermissions.md +35 -0
  203. package/docs/RoleApi.md +685 -0
  204. package/package.json +1 -1
  205. package/src/apis/ContentApi.ts +289 -107
  206. package/src/apis/CourseApi.ts +145 -49
  207. package/src/apis/ModuleApi.ts +48 -16
  208. package/src/apis/OtherApi.ts +12 -4
  209. package/src/apis/PortalApi.ts +85 -34
  210. package/src/apis/QuestionApi.ts +60 -20
  211. package/src/apis/QuizApi.ts +300 -100
  212. package/src/apis/ReportingApi.ts +108 -36
  213. package/src/apis/RoleApi.ts +576 -0
  214. package/src/apis/UserApi.ts +84 -28
  215. package/src/apis/index.ts +1 -0
  216. package/src/models/CriteriaBasedSelection.ts +1 -1
  217. package/src/models/CriteriaBasedSelectionCriteria.ts +2 -2
  218. package/src/models/FillInBlank.ts +1 -1
  219. package/src/models/FillInBlank1.ts +1 -1
  220. package/src/models/GetContent.ts +1 -1
  221. package/src/models/GetContentGradeDetail.ts +3 -3
  222. package/src/models/GetContentGradesItemsInner.ts +2 -2
  223. package/src/models/GetContentInstructorBasicReportingContentInfo.ts +1 -1
  224. package/src/models/GetContentSessionDetail.ts +2 -2
  225. package/src/models/GetCourseEnrollment.ts +2 -2
  226. package/src/models/GetCourseEnrollmentListItem.ts +2 -2
  227. package/src/models/GetCourseExport.ts +2 -2
  228. package/src/models/GetPermission.ts +92 -0
  229. package/src/models/GetPortal.ts +26 -4
  230. package/src/models/GetPortalUser.ts +2 -14
  231. package/src/models/GetQuestion.ts +2 -2
  232. package/src/models/GetQuestionListFilters.ts +2 -2
  233. package/src/models/GetQuiz.ts +1 -1
  234. package/src/models/GetQuizAttemptAnalyticsBasicInfo.ts +1 -1
  235. package/src/models/GetQuizAttemptAnalyticsPerformanceBreakdownByDifficultyInner.ts +1 -1
  236. package/src/models/GetQuizAttemptAnalyticsPerformanceBreakdownByQuestionTypeInner.ts +1 -1
  237. package/src/models/GetQuizAttemptAnalyticsQuestionAnalysisInner.ts +2 -2
  238. package/src/models/GetQuizAttemptAttempt.ts +1 -1
  239. package/src/models/GetQuizAttemptListAllOfAttempts.ts +1 -1
  240. package/src/models/GetQuizAttemptListAllOfFilters.ts +1 -1
  241. package/src/models/GetQuizAttemptQuestionsInner.ts +1 -1
  242. package/src/models/GetQuizCriteriaItem.ts +2 -2
  243. package/src/models/GetQuizCriteriaListItemsInner.ts +2 -2
  244. package/src/models/GetQuizListAllOfFilters.ts +1 -1
  245. package/src/models/GetQuizListAllOfQuizzes.ts +1 -1
  246. package/src/models/GetQuizQuestions.ts +1 -1
  247. package/src/models/GetQuizQuestionsItemsInnerQuestionDetails.ts +2 -2
  248. package/src/models/GetQuizResults.ts +1 -1
  249. package/src/models/GetQuizResultsFeedbackDifficultyPerformanceInner.ts +1 -1
  250. package/src/models/GetQuizResultsQuestionsInner.ts +1 -1
  251. package/src/models/GetRole.ts +151 -0
  252. package/src/models/GetScormApiLogItem.ts +1 -1
  253. package/src/models/GetUserQuizAttemptsAllOfAttempts.ts +1 -1
  254. package/src/models/GetUserQuizAttemptsAllOfFilters.ts +1 -1
  255. package/src/models/GetUserRole.ts +109 -0
  256. package/src/models/ManualSelection.ts +1 -1
  257. package/src/models/MultipleAnswer.ts +1 -1
  258. package/src/models/MultipleAnswer1.ts +1 -1
  259. package/src/models/NoAnswer.ts +1 -1
  260. package/src/models/PostContentUpload.ts +1 -1
  261. package/src/models/PostCourseExport.ts +1 -1
  262. package/src/models/PostPortalInvite.ts +7 -3
  263. package/src/models/PostQuestion.ts +2 -2
  264. package/src/models/PostQuiz.ts +1 -1
  265. package/src/models/PostQuizAttemptAttempt.ts +1 -1
  266. package/src/models/PostQuizAttemptQuestionsInner.ts +1 -1
  267. package/src/models/PostQuizAttemptSubmit.ts +1 -1
  268. package/src/models/PostQuizCriteriaCriteriaInner.ts +2 -2
  269. package/src/models/PostRole.ts +99 -0
  270. package/src/models/PutCourseEnrollment.ts +2 -2
  271. package/src/models/PutQuestion.ts +2 -2
  272. package/src/models/PutQuiz.ts +1 -1
  273. package/src/models/PutRole.ts +74 -0
  274. package/src/models/PutRolePermissions.ts +66 -0
  275. package/src/models/QuizContent.ts +1 -1
  276. package/src/models/SingleAnswer.ts +1 -1
  277. package/src/models/index.ts +6 -0
  278. package/src/runtime.ts +18 -0
@@ -64,9 +64,9 @@ export interface SendResetPasswordRequest {
64
64
  export class UserApi extends runtime.BaseAPI {
65
65
 
66
66
  /**
67
- * Check if a user is logged in
67
+ * Creates request options for getAuthCheck without sending the request
68
68
  */
69
- async getAuthCheckRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
69
+ async getAuthCheckRequestOpts(): Promise<runtime.RequestOpts> {
70
70
  const queryParameters: any = {};
71
71
 
72
72
  const headerParameters: runtime.HTTPHeaders = {};
@@ -74,12 +74,20 @@ export class UserApi extends runtime.BaseAPI {
74
74
 
75
75
  let urlPath = `/auth/check`;
76
76
 
77
- const response = await this.request({
77
+ return {
78
78
  path: urlPath,
79
79
  method: 'GET',
80
80
  headers: headerParameters,
81
81
  query: queryParameters,
82
- }, initOverrides);
82
+ };
83
+ }
84
+
85
+ /**
86
+ * Check if a user is logged in
87
+ */
88
+ async getAuthCheckRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
89
+ const requestOptions = await this.getAuthCheckRequestOpts();
90
+ const response = await this.request(requestOptions, initOverrides);
83
91
 
84
92
  return new runtime.VoidApiResponse(response);
85
93
  }
@@ -92,9 +100,9 @@ export class UserApi extends runtime.BaseAPI {
92
100
  }
93
101
 
94
102
  /**
95
- * Get a user by id
103
+ * Creates request options for getUser without sending the request
96
104
  */
97
- async getUserRaw(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUser>> {
105
+ async getUserRequestOpts(requestParameters: GetUserRequest): Promise<runtime.RequestOpts> {
98
106
  if (requestParameters['userId'] == null) {
99
107
  throw new runtime.RequiredError(
100
108
  'userId',
@@ -110,12 +118,20 @@ export class UserApi extends runtime.BaseAPI {
110
118
  let urlPath = `/users/{userId}`;
111
119
  urlPath = urlPath.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId'])));
112
120
 
113
- const response = await this.request({
121
+ return {
114
122
  path: urlPath,
115
123
  method: 'GET',
116
124
  headers: headerParameters,
117
125
  query: queryParameters,
118
- }, initOverrides);
126
+ };
127
+ }
128
+
129
+ /**
130
+ * Get a user by id
131
+ */
132
+ async getUserRaw(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUser>> {
133
+ const requestOptions = await this.getUserRequestOpts(requestParameters);
134
+ const response = await this.request(requestOptions, initOverrides);
119
135
 
120
136
  return new runtime.JSONApiResponse(response, (jsonValue) => GetUserFromJSON(jsonValue));
121
137
  }
@@ -129,9 +145,9 @@ export class UserApi extends runtime.BaseAPI {
129
145
  }
130
146
 
131
147
  /**
132
- * Post a new login
148
+ * Creates request options for postLogin without sending the request
133
149
  */
134
- async postLoginRaw(requestParameters: PostLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginRes>> {
150
+ async postLoginRequestOpts(requestParameters: PostLoginRequest): Promise<runtime.RequestOpts> {
135
151
  if (requestParameters['postLogin'] == null) {
136
152
  throw new runtime.RequiredError(
137
153
  'postLogin',
@@ -148,13 +164,21 @@ export class UserApi extends runtime.BaseAPI {
148
164
 
149
165
  let urlPath = `/auth/login`;
150
166
 
151
- const response = await this.request({
167
+ return {
152
168
  path: urlPath,
153
169
  method: 'POST',
154
170
  headers: headerParameters,
155
171
  query: queryParameters,
156
172
  body: PostLoginToJSON(requestParameters['postLogin']),
157
- }, initOverrides);
173
+ };
174
+ }
175
+
176
+ /**
177
+ * Post a new login
178
+ */
179
+ async postLoginRaw(requestParameters: PostLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginRes>> {
180
+ const requestOptions = await this.postLoginRequestOpts(requestParameters);
181
+ const response = await this.request(requestOptions, initOverrides);
158
182
 
159
183
  return new runtime.JSONApiResponse(response, (jsonValue) => LoginResFromJSON(jsonValue));
160
184
  }
@@ -168,9 +192,9 @@ export class UserApi extends runtime.BaseAPI {
168
192
  }
169
193
 
170
194
  /**
171
- * Logout a user
195
+ * Creates request options for postLogout without sending the request
172
196
  */
173
- async postLogoutRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
197
+ async postLogoutRequestOpts(): Promise<runtime.RequestOpts> {
174
198
  const queryParameters: any = {};
175
199
 
176
200
  const headerParameters: runtime.HTTPHeaders = {};
@@ -178,12 +202,20 @@ export class UserApi extends runtime.BaseAPI {
178
202
 
179
203
  let urlPath = `/auth/logout`;
180
204
 
181
- const response = await this.request({
205
+ return {
182
206
  path: urlPath,
183
207
  method: 'POST',
184
208
  headers: headerParameters,
185
209
  query: queryParameters,
186
- }, initOverrides);
210
+ };
211
+ }
212
+
213
+ /**
214
+ * Logout a user
215
+ */
216
+ async postLogoutRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
217
+ const requestOptions = await this.postLogoutRequestOpts();
218
+ const response = await this.request(requestOptions, initOverrides);
187
219
 
188
220
  return new runtime.VoidApiResponse(response);
189
221
  }
@@ -196,9 +228,9 @@ export class UserApi extends runtime.BaseAPI {
196
228
  }
197
229
 
198
230
  /**
199
- * Update a user by id
231
+ * Creates request options for putUser without sending the request
200
232
  */
201
- async putUserRaw(requestParameters: PutUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUser>> {
233
+ async putUserRequestOpts(requestParameters: PutUserRequest): Promise<runtime.RequestOpts> {
202
234
  if (requestParameters['userId'] == null) {
203
235
  throw new runtime.RequiredError(
204
236
  'userId',
@@ -223,13 +255,21 @@ export class UserApi extends runtime.BaseAPI {
223
255
  let urlPath = `/users/{userId}`;
224
256
  urlPath = urlPath.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId'])));
225
257
 
226
- const response = await this.request({
258
+ return {
227
259
  path: urlPath,
228
260
  method: 'PUT',
229
261
  headers: headerParameters,
230
262
  query: queryParameters,
231
263
  body: PutUserToJSON(requestParameters['putUser']),
232
- }, initOverrides);
264
+ };
265
+ }
266
+
267
+ /**
268
+ * Update a user by id
269
+ */
270
+ async putUserRaw(requestParameters: PutUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUser>> {
271
+ const requestOptions = await this.putUserRequestOpts(requestParameters);
272
+ const response = await this.request(requestOptions, initOverrides);
233
273
 
234
274
  return new runtime.JSONApiResponse(response, (jsonValue) => GetUserFromJSON(jsonValue));
235
275
  }
@@ -243,9 +283,9 @@ export class UserApi extends runtime.BaseAPI {
243
283
  }
244
284
 
245
285
  /**
246
- * Reset a users password
286
+ * Creates request options for resetPassword without sending the request
247
287
  */
248
- async resetPasswordRaw(requestParameters: ResetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
288
+ async resetPasswordRequestOpts(requestParameters: ResetPasswordRequest): Promise<runtime.RequestOpts> {
249
289
  if (requestParameters['postResetPassword'] == null) {
250
290
  throw new runtime.RequiredError(
251
291
  'postResetPassword',
@@ -262,13 +302,21 @@ export class UserApi extends runtime.BaseAPI {
262
302
 
263
303
  let urlPath = `/auth/reset-password`;
264
304
 
265
- const response = await this.request({
305
+ return {
266
306
  path: urlPath,
267
307
  method: 'POST',
268
308
  headers: headerParameters,
269
309
  query: queryParameters,
270
310
  body: PostResetPasswordToJSON(requestParameters['postResetPassword']),
271
- }, initOverrides);
311
+ };
312
+ }
313
+
314
+ /**
315
+ * Reset a users password
316
+ */
317
+ async resetPasswordRaw(requestParameters: ResetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
318
+ const requestOptions = await this.resetPasswordRequestOpts(requestParameters);
319
+ const response = await this.request(requestOptions, initOverrides);
272
320
 
273
321
  return new runtime.VoidApiResponse(response);
274
322
  }
@@ -281,9 +329,9 @@ export class UserApi extends runtime.BaseAPI {
281
329
  }
282
330
 
283
331
  /**
284
- * Send a reset password email
332
+ * Creates request options for sendResetPassword without sending the request
285
333
  */
286
- async sendResetPasswordRaw(requestParameters: SendResetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
334
+ async sendResetPasswordRequestOpts(requestParameters: SendResetPasswordRequest): Promise<runtime.RequestOpts> {
287
335
  if (requestParameters['postSendResetPassword'] == null) {
288
336
  throw new runtime.RequiredError(
289
337
  'postSendResetPassword',
@@ -300,13 +348,21 @@ export class UserApi extends runtime.BaseAPI {
300
348
 
301
349
  let urlPath = `/auth/send-reset-password`;
302
350
 
303
- const response = await this.request({
351
+ return {
304
352
  path: urlPath,
305
353
  method: 'POST',
306
354
  headers: headerParameters,
307
355
  query: queryParameters,
308
356
  body: PostSendResetPasswordToJSON(requestParameters['postSendResetPassword']),
309
- }, initOverrides);
357
+ };
358
+ }
359
+
360
+ /**
361
+ * Send a reset password email
362
+ */
363
+ async sendResetPasswordRaw(requestParameters: SendResetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
364
+ const requestOptions = await this.sendResetPasswordRequestOpts(requestParameters);
365
+ const response = await this.request(requestOptions, initOverrides);
310
366
 
311
367
  return new runtime.VoidApiResponse(response);
312
368
  }
package/src/apis/index.ts CHANGED
@@ -8,4 +8,5 @@ export * from './PortalApi';
8
8
  export * from './QuestionApi';
9
9
  export * from './QuizApi';
10
10
  export * from './ReportingApi';
11
+ export * from './RoleApi';
11
12
  export * from './UserApi';
@@ -36,7 +36,7 @@ import {
36
36
  export interface CriteriaBasedSelection {
37
37
  /**
38
38
  *
39
- * @type {string}
39
+ * @type {CriteriaBasedSelectionMethodEnum}
40
40
  * @memberof CriteriaBasedSelection
41
41
  */
42
42
  method: CriteriaBasedSelectionMethodEnum;
@@ -27,13 +27,13 @@ export interface CriteriaBasedSelectionCriteria {
27
27
  topics?: Array<string>;
28
28
  /**
29
29
  * Difficulty levels to include
30
- * @type {Array<string>}
30
+ * @type {Array<CriteriaBasedSelectionCriteriaDifficultyLevelsEnum>}
31
31
  * @memberof CriteriaBasedSelectionCriteria
32
32
  */
33
33
  difficultyLevels?: Array<CriteriaBasedSelectionCriteriaDifficultyLevelsEnum>;
34
34
  /**
35
35
  * Question types to include
36
- * @type {Array<string>}
36
+ * @type {Array<CriteriaBasedSelectionCriteriaQuestionTypesEnum>}
37
37
  * @memberof CriteriaBasedSelectionCriteria
38
38
  */
39
39
  questionTypes?: Array<CriteriaBasedSelectionCriteriaQuestionTypesEnum>;
@@ -21,7 +21,7 @@ import { mapValues } from '../runtime';
21
21
  export interface FillInBlank {
22
22
  /**
23
23
  *
24
- * @type {string}
24
+ * @type {FillInBlankTypeEnum}
25
25
  * @memberof FillInBlank
26
26
  */
27
27
  type: FillInBlankTypeEnum;
@@ -21,7 +21,7 @@ import { mapValues } from '../runtime';
21
21
  export interface FillInBlank1 {
22
22
  /**
23
23
  *
24
- * @type {string}
24
+ * @type {FillInBlank1TypeEnum}
25
25
  * @memberof FillInBlank1
26
26
  */
27
27
  type: FillInBlank1TypeEnum;
@@ -53,7 +53,7 @@ export interface GetContent {
53
53
  description?: string;
54
54
  /**
55
55
  *
56
- * @type {string}
56
+ * @type {GetContentContentTypeEnum}
57
57
  * @memberof GetContent
58
58
  */
59
59
  contentType: GetContentContentTypeEnum;
@@ -48,13 +48,13 @@ export interface GetContentGradeDetail {
48
48
  user: GetContentGradesItemsInnerUser;
49
49
  /**
50
50
  * Content completion status
51
- * @type {string}
51
+ * @type {GetContentGradeDetailCompletionEnum}
52
52
  * @memberof GetContentGradeDetail
53
53
  */
54
54
  completion: GetContentGradeDetailCompletionEnum;
55
55
  /**
56
56
  * Content grade status
57
- * @type {string}
57
+ * @type {GetContentGradeDetailGradeStatusEnum}
58
58
  * @memberof GetContentGradeDetail
59
59
  */
60
60
  gradeStatus: GetContentGradeDetailGradeStatusEnum;
@@ -72,7 +72,7 @@ export interface GetContentGradeDetail {
72
72
  updatedAt: number | null;
73
73
  /**
74
74
  * Type of content
75
- * @type {string}
75
+ * @type {GetContentGradeDetailContentTypeEnum}
76
76
  * @memberof GetContentGradeDetail
77
77
  */
78
78
  contentType: GetContentGradeDetailContentTypeEnum;
@@ -41,13 +41,13 @@ export interface GetContentGradesItemsInner {
41
41
  user: GetContentGradesItemsInnerUser;
42
42
  /**
43
43
  * Content completion status
44
- * @type {string}
44
+ * @type {GetContentGradesItemsInnerCompletionEnum}
45
45
  * @memberof GetContentGradesItemsInner
46
46
  */
47
47
  completion: GetContentGradesItemsInnerCompletionEnum;
48
48
  /**
49
49
  * Content grade status
50
- * @type {string}
50
+ * @type {GetContentGradesItemsInnerGradeStatusEnum}
51
51
  * @memberof GetContentGradesItemsInner
52
52
  */
53
53
  gradeStatus: GetContentGradesItemsInnerGradeStatusEnum;
@@ -27,7 +27,7 @@ export interface GetContentInstructorBasicReportingContentInfo {
27
27
  contentId: string;
28
28
  /**
29
29
  * Type of content
30
- * @type {string}
30
+ * @type {GetContentInstructorBasicReportingContentInfoContentTypeEnum}
31
31
  * @memberof GetContentInstructorBasicReportingContentInfo
32
32
  */
33
33
  contentType: GetContentInstructorBasicReportingContentInfoContentTypeEnum;
@@ -60,13 +60,13 @@ export interface GetContentSessionDetail {
60
60
  contentId: string;
61
61
  /**
62
62
  * The completion status of the content session
63
- * @type {string}
63
+ * @type {GetContentSessionDetailCompletionStatusEnum}
64
64
  * @memberof GetContentSessionDetail
65
65
  */
66
66
  completionStatus: GetContentSessionDetailCompletionStatusEnum;
67
67
  /**
68
68
  * The grade status of the content session
69
- * @type {string}
69
+ * @type {GetContentSessionDetailGradeStatusEnum}
70
70
  * @memberof GetContentSessionDetail
71
71
  */
72
72
  gradeStatus: GetContentSessionDetailGradeStatusEnum;
@@ -57,13 +57,13 @@ export interface GetCourseEnrollment {
57
57
  notes: string | null;
58
58
  /**
59
59
  * Current status of the enrollment
60
- * @type {string}
60
+ * @type {GetCourseEnrollmentStatusEnum}
61
61
  * @memberof GetCourseEnrollment
62
62
  */
63
63
  status: GetCourseEnrollmentStatusEnum;
64
64
  /**
65
65
  * The role/type of the user in this enrollment
66
- * @type {string}
66
+ * @type {GetCourseEnrollmentUserTypeEnum}
67
67
  * @memberof GetCourseEnrollment
68
68
  */
69
69
  userType: GetCourseEnrollmentUserTypeEnum;
@@ -63,13 +63,13 @@ export interface GetCourseEnrollmentListItem {
63
63
  enrollmentDateEnd: number;
64
64
  /**
65
65
  * Current status of the enrollment
66
- * @type {string}
66
+ * @type {GetCourseEnrollmentListItemStatusEnum}
67
67
  * @memberof GetCourseEnrollmentListItem
68
68
  */
69
69
  status: GetCourseEnrollmentListItemStatusEnum;
70
70
  /**
71
71
  * The role/type of the user in this enrollment
72
- * @type {string}
72
+ * @type {GetCourseEnrollmentListItemUserTypeEnum}
73
73
  * @memberof GetCourseEnrollmentListItem
74
74
  */
75
75
  userType: GetCourseEnrollmentListItemUserTypeEnum;
@@ -33,13 +33,13 @@ export interface GetCourseExport {
33
33
  courseId: string;
34
34
  /**
35
35
  * The SCORM version to export
36
- * @type {string}
36
+ * @type {GetCourseExportScormVersionEnum}
37
37
  * @memberof GetCourseExport
38
38
  */
39
39
  scormVersion: GetCourseExportScormVersionEnum;
40
40
  /**
41
41
  * Current status of the export generation
42
- * @type {string}
42
+ * @type {GetCourseExportStatusEnum}
43
43
  * @memberof GetCourseExport
44
44
  */
45
45
  status: GetCourseExportStatusEnum;
@@ -0,0 +1,92 @@
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 permission that can be assigned to roles
18
+ * @export
19
+ * @interface GetPermission
20
+ */
21
+ export interface GetPermission {
22
+ /**
23
+ * External UUID of the permission
24
+ * @type {string}
25
+ * @memberof GetPermission
26
+ */
27
+ id: string;
28
+ /**
29
+ * Permission key in domain:action format (e.g. course:create)
30
+ * @type {string}
31
+ * @memberof GetPermission
32
+ */
33
+ key: string;
34
+ /**
35
+ * Human-readable description
36
+ * @type {string}
37
+ * @memberof GetPermission
38
+ */
39
+ description?: string | null;
40
+ /**
41
+ * Grouping domain (e.g. course, module, content)
42
+ * @type {string}
43
+ * @memberof GetPermission
44
+ */
45
+ domain: string;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the GetPermission interface.
50
+ */
51
+ export function instanceOfGetPermission(value: object): value is GetPermission {
52
+ if (!('id' in value) || value['id'] === undefined) return false;
53
+ if (!('key' in value) || value['key'] === undefined) return false;
54
+ if (!('domain' in value) || value['domain'] === undefined) return false;
55
+ return true;
56
+ }
57
+
58
+ export function GetPermissionFromJSON(json: any): GetPermission {
59
+ return GetPermissionFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function GetPermissionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPermission {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'id': json['id'],
69
+ 'key': json['key'],
70
+ 'description': json['description'] == null ? undefined : json['description'],
71
+ 'domain': json['domain'],
72
+ };
73
+ }
74
+
75
+ export function GetPermissionToJSON(json: any): GetPermission {
76
+ return GetPermissionToJSONTyped(json, false);
77
+ }
78
+
79
+ export function GetPermissionToJSONTyped(value?: GetPermission | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'id': value['id'],
87
+ 'key': value['key'],
88
+ 'description': value['description'],
89
+ 'domain': value['domain'],
90
+ };
91
+ }
92
+
@@ -56,17 +56,23 @@ export interface GetPortal {
56
56
  */
57
57
  headerTextColor: string;
58
58
  /**
59
- *
60
- * @type {string}
59
+ * The user's current active role (mapped from base_type for backwards compatibility)
60
+ * @type {GetPortalSelectedUserRoleEnum}
61
61
  * @memberof GetPortal
62
62
  */
63
63
  selectedUserRole?: GetPortalSelectedUserRoleEnum;
64
64
  /**
65
- *
66
- * @type {string}
65
+ * The user's base role (mapped from base_type for backwards compatibility)
66
+ * @type {GetPortalBaseUserRoleEnum}
67
67
  * @memberof GetPortal
68
68
  */
69
69
  baseUserRole?: GetPortalBaseUserRoleEnum;
70
+ /**
71
+ * The user's highest-privilege role base type for this portal
72
+ * @type {GetPortalBaseTypeEnum}
73
+ * @memberof GetPortal
74
+ */
75
+ baseType?: GetPortalBaseTypeEnum;
70
76
  }
71
77
 
72
78
 
@@ -90,6 +96,20 @@ export const GetPortalBaseUserRoleEnum = {
90
96
  } as const;
91
97
  export type GetPortalBaseUserRoleEnum = typeof GetPortalBaseUserRoleEnum[keyof typeof GetPortalBaseUserRoleEnum];
92
98
 
99
+ /**
100
+ * @export
101
+ */
102
+ export const GetPortalBaseTypeEnum = {
103
+ Owner: 'Owner',
104
+ Admin: 'Admin',
105
+ Instructor: 'Instructor',
106
+ Learner: 'Learner',
107
+ ClientSuperAdmin: 'ClientSuperAdmin',
108
+ ClientManager: 'ClientManager',
109
+ PortalClientAdministrator: 'PortalClientAdministrator'
110
+ } as const;
111
+ export type GetPortalBaseTypeEnum = typeof GetPortalBaseTypeEnum[keyof typeof GetPortalBaseTypeEnum];
112
+
93
113
 
94
114
  /**
95
115
  * Check if a given object implements the GetPortal interface.
@@ -121,6 +141,7 @@ export function GetPortalFromJSONTyped(json: any, ignoreDiscriminator: boolean):
121
141
  'headerTextColor': json['header_text_color'],
122
142
  'selectedUserRole': json['selected_user_role'] == null ? undefined : json['selected_user_role'],
123
143
  'baseUserRole': json['base_user_role'] == null ? undefined : json['base_user_role'],
144
+ 'baseType': json['base_type'] == null ? undefined : json['base_type'],
124
145
  };
125
146
  }
126
147
 
@@ -143,6 +164,7 @@ export function GetPortalToJSONTyped(value?: GetPortal | null, ignoreDiscriminat
143
164
  'header_text_color': value['headerTextColor'],
144
165
  'selected_user_role': value['selectedUserRole'],
145
166
  'base_user_role': value['baseUserRole'],
167
+ 'base_type': value['baseType'],
146
168
  };
147
169
  }
148
170
 
@@ -44,11 +44,11 @@ export interface GetPortalUser {
44
44
  */
45
45
  lastName: string;
46
46
  /**
47
- * The user's role in the portal
47
+ * The user's role name in the portal (e.g. Admin, Instructor, Learner, or a custom role name)
48
48
  * @type {string}
49
49
  * @memberof GetPortalUser
50
50
  */
51
- role: GetPortalUserRoleEnum;
51
+ role: string;
52
52
  /**
53
53
  * Whether the user's portal access is active
54
54
  * @type {boolean}
@@ -57,18 +57,6 @@ export interface GetPortalUser {
57
57
  isActive: boolean;
58
58
  }
59
59
 
60
-
61
- /**
62
- * @export
63
- */
64
- export const GetPortalUserRoleEnum = {
65
- Admin: 'Admin',
66
- Instructor: 'Instructor',
67
- Learner: 'Learner'
68
- } as const;
69
- export type GetPortalUserRoleEnum = typeof GetPortalUserRoleEnum[keyof typeof GetPortalUserRoleEnum];
70
-
71
-
72
60
  /**
73
61
  * Check if a given object implements the GetPortalUser interface.
74
62
  */
@@ -41,7 +41,7 @@ export interface GetQuestion {
41
41
  questionText: string;
42
42
  /**
43
43
  * Type of question: single answer (True/False, multiple choice), multiple answer, or fill in the blank
44
- * @type {string}
44
+ * @type {GetQuestionQuestionTypeEnum}
45
45
  * @memberof GetQuestion
46
46
  */
47
47
  questionType: GetQuestionQuestionTypeEnum;
@@ -77,7 +77,7 @@ export interface GetQuestion {
77
77
  course?: string;
78
78
  /**
79
79
  * Difficulty level of the question
80
- * @type {string}
80
+ * @type {GetQuestionDifficultyLevelEnum}
81
81
  * @memberof GetQuestion
82
82
  */
83
83
  difficultyLevel: GetQuestionDifficultyLevelEnum;
@@ -33,13 +33,13 @@ export interface GetQuestionListFilters {
33
33
  course?: string;
34
34
  /**
35
35
  * Filter by question type
36
- * @type {string}
36
+ * @type {GetQuestionListFiltersQuestionTypeEnum}
37
37
  * @memberof GetQuestionListFilters
38
38
  */
39
39
  questionType?: GetQuestionListFiltersQuestionTypeEnum;
40
40
  /**
41
41
  * Filter by difficulty level
42
- * @type {string}
42
+ * @type {GetQuestionListFiltersDifficultyLevelEnum}
43
43
  * @memberof GetQuestionListFilters
44
44
  */
45
45
  difficultyLevel?: GetQuestionListFiltersDifficultyLevelEnum;
@@ -47,7 +47,7 @@ export interface GetQuiz {
47
47
  contentId: string;
48
48
  /**
49
49
  * How questions are selected
50
- * @type {string}
50
+ * @type {GetQuizQuestionSelectionMethodEnum}
51
51
  * @memberof GetQuiz
52
52
  */
53
53
  questionSelectionMethod: GetQuizQuestionSelectionMethodEnum;