@easyedu/js-lsm-api 1.32.0 → 1.34.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 (277) 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 +89 -0
  5. package/dist/apis/ContentApi.js +301 -102
  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 +89 -0
  27. package/dist/esm/apis/ContentApi.js +301 -102
  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 +9 -20
  63. package/dist/esm/models/GetPortal.js +8 -14
  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 +9 -20
  136. package/dist/models/GetPortal.js +9 -15
  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/GetPermission.md +41 -0
  195. package/docs/GetPortal.md +2 -4
  196. package/docs/GetRole.md +49 -0
  197. package/docs/GetUserRole.md +41 -0
  198. package/docs/PortalApi.md +3 -6
  199. package/docs/PostRole.md +39 -0
  200. package/docs/PutRole.md +37 -0
  201. package/docs/PutRolePermissions.md +35 -0
  202. package/docs/RoleApi.md +685 -0
  203. package/package.json +1 -1
  204. package/src/apis/ContentApi.ts +279 -102
  205. package/src/apis/CourseApi.ts +145 -49
  206. package/src/apis/ModuleApi.ts +48 -16
  207. package/src/apis/OtherApi.ts +12 -4
  208. package/src/apis/PortalApi.ts +85 -34
  209. package/src/apis/QuestionApi.ts +60 -20
  210. package/src/apis/QuizApi.ts +300 -100
  211. package/src/apis/ReportingApi.ts +108 -36
  212. package/src/apis/RoleApi.ts +576 -0
  213. package/src/apis/UserApi.ts +84 -28
  214. package/src/apis/index.ts +1 -0
  215. package/src/models/CriteriaBasedSelection.ts +1 -1
  216. package/src/models/CriteriaBasedSelectionCriteria.ts +2 -2
  217. package/src/models/FillInBlank.ts +1 -1
  218. package/src/models/FillInBlank1.ts +1 -1
  219. package/src/models/GetContent.ts +1 -1
  220. package/src/models/GetContentGradeDetail.ts +3 -3
  221. package/src/models/GetContentGradesItemsInner.ts +2 -2
  222. package/src/models/GetContentInstructorBasicReportingContentInfo.ts +1 -1
  223. package/src/models/GetContentSessionDetail.ts +2 -2
  224. package/src/models/GetCourseEnrollment.ts +2 -2
  225. package/src/models/GetCourseEnrollmentListItem.ts +2 -2
  226. package/src/models/GetCourseExport.ts +2 -2
  227. package/src/models/GetPermission.ts +92 -0
  228. package/src/models/GetPortal.ts +12 -26
  229. package/src/models/GetPortalUser.ts +2 -14
  230. package/src/models/GetQuestion.ts +2 -2
  231. package/src/models/GetQuestionListFilters.ts +2 -2
  232. package/src/models/GetQuiz.ts +1 -1
  233. package/src/models/GetQuizAttemptAnalyticsBasicInfo.ts +1 -1
  234. package/src/models/GetQuizAttemptAnalyticsPerformanceBreakdownByDifficultyInner.ts +1 -1
  235. package/src/models/GetQuizAttemptAnalyticsPerformanceBreakdownByQuestionTypeInner.ts +1 -1
  236. package/src/models/GetQuizAttemptAnalyticsQuestionAnalysisInner.ts +2 -2
  237. package/src/models/GetQuizAttemptAttempt.ts +1 -1
  238. package/src/models/GetQuizAttemptListAllOfAttempts.ts +1 -1
  239. package/src/models/GetQuizAttemptListAllOfFilters.ts +1 -1
  240. package/src/models/GetQuizAttemptQuestionsInner.ts +1 -1
  241. package/src/models/GetQuizCriteriaItem.ts +2 -2
  242. package/src/models/GetQuizCriteriaListItemsInner.ts +2 -2
  243. package/src/models/GetQuizListAllOfFilters.ts +1 -1
  244. package/src/models/GetQuizListAllOfQuizzes.ts +1 -1
  245. package/src/models/GetQuizQuestions.ts +1 -1
  246. package/src/models/GetQuizQuestionsItemsInnerQuestionDetails.ts +2 -2
  247. package/src/models/GetQuizResults.ts +1 -1
  248. package/src/models/GetQuizResultsFeedbackDifficultyPerformanceInner.ts +1 -1
  249. package/src/models/GetQuizResultsQuestionsInner.ts +1 -1
  250. package/src/models/GetRole.ts +151 -0
  251. package/src/models/GetScormApiLogItem.ts +1 -1
  252. package/src/models/GetUserQuizAttemptsAllOfAttempts.ts +1 -1
  253. package/src/models/GetUserQuizAttemptsAllOfFilters.ts +1 -1
  254. package/src/models/GetUserRole.ts +109 -0
  255. package/src/models/ManualSelection.ts +1 -1
  256. package/src/models/MultipleAnswer.ts +1 -1
  257. package/src/models/MultipleAnswer1.ts +1 -1
  258. package/src/models/NoAnswer.ts +1 -1
  259. package/src/models/PostContentUpload.ts +1 -1
  260. package/src/models/PostCourseExport.ts +1 -1
  261. package/src/models/PostPortalInvite.ts +7 -3
  262. package/src/models/PostQuestion.ts +2 -2
  263. package/src/models/PostQuiz.ts +1 -1
  264. package/src/models/PostQuizAttemptAttempt.ts +1 -1
  265. package/src/models/PostQuizAttemptQuestionsInner.ts +1 -1
  266. package/src/models/PostQuizAttemptSubmit.ts +1 -1
  267. package/src/models/PostQuizCriteriaCriteriaInner.ts +2 -2
  268. package/src/models/PostRole.ts +99 -0
  269. package/src/models/PutCourseEnrollment.ts +2 -2
  270. package/src/models/PutQuestion.ts +2 -2
  271. package/src/models/PutQuiz.ts +1 -1
  272. package/src/models/PutRole.ts +74 -0
  273. package/src/models/PutRolePermissions.ts +66 -0
  274. package/src/models/QuizContent.ts +1 -1
  275. package/src/models/SingleAnswer.ts +1 -1
  276. package/src/models/index.ts +6 -0
  277. package/src/runtime.ts +18 -0
@@ -0,0 +1,685 @@
1
+ # RoleApi
2
+
3
+ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com/stage1*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**assignUserRole**](RoleApi.md#assignuserrole) | **POST** /roles/users/{userId}/portals/{portalId}/roles/{roleId} | Assign a role to a user for a portal |
8
+ | [**createRole**](RoleApi.md#createrole) | **POST** /roles | Create a custom role scoped to the current portal |
9
+ | [**deleteRole**](RoleApi.md#deleterole) | **DELETE** /roles/{roleId} | Deactivate a custom role |
10
+ | [**getPermissions**](RoleApi.md#getpermissions) | **GET** /roles/permissions | List all available permissions in the system |
11
+ | [**getRole**](RoleApi.md#getrole) | **GET** /roles/{roleId} | Get role details with permissions |
12
+ | [**getRoles**](RoleApi.md#getroles) | **GET** /roles | List all roles available to the current portal |
13
+ | [**getUserRoles**](RoleApi.md#getuserroles) | **GET** /roles/users/{userId}/portals/{portalId} | Get all active roles for a user in a portal |
14
+ | [**unassignUserRole**](RoleApi.md#unassignuserrole) | **DELETE** /roles/users/{userId}/portals/{portalId}/roles/{roleId} | Remove a role from a user for a portal |
15
+ | [**updateRole**](RoleApi.md#updaterole) | **PUT** /roles/{roleId} | Update a custom role name and description |
16
+ | [**updateRolePermissions**](RoleApi.md#updaterolepermissions) | **PUT** /roles/{roleId}/permissions | Replace all permissions for a custom role |
17
+
18
+
19
+
20
+ ## assignUserRole
21
+
22
+ > assignUserRole(userId, portalId, roleId)
23
+
24
+ Assign a role to a user for a portal
25
+
26
+ ### Example
27
+
28
+ ```ts
29
+ import {
30
+ Configuration,
31
+ RoleApi,
32
+ } from '@easyedu/js-lsm-api';
33
+ import type { AssignUserRoleRequest } from '@easyedu/js-lsm-api';
34
+
35
+ async function example() {
36
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
37
+ const api = new RoleApi();
38
+
39
+ const body = {
40
+ // string
41
+ userId: userId_example,
42
+ // string
43
+ portalId: portalId_example,
44
+ // string
45
+ roleId: roleId_example,
46
+ } satisfies AssignUserRoleRequest;
47
+
48
+ try {
49
+ const data = await api.assignUserRole(body);
50
+ console.log(data);
51
+ } catch (error) {
52
+ console.error(error);
53
+ }
54
+ }
55
+
56
+ // Run the test
57
+ example().catch(console.error);
58
+ ```
59
+
60
+ ### Parameters
61
+
62
+
63
+ | Name | Type | Description | Notes |
64
+ |------------- | ------------- | ------------- | -------------|
65
+ | **userId** | `string` | | [Defaults to `undefined`] |
66
+ | **portalId** | `string` | | [Defaults to `undefined`] |
67
+ | **roleId** | `string` | | [Defaults to `undefined`] |
68
+
69
+ ### Return type
70
+
71
+ `void` (Empty response body)
72
+
73
+ ### Authorization
74
+
75
+ No authorization required
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: Not defined
80
+ - **Accept**: Not defined
81
+
82
+
83
+ ### HTTP response details
84
+ | Status code | Description | Response headers |
85
+ |-------------|-------------|------------------|
86
+ | **200** | Role assigned | - |
87
+ | **404** | User, portal, or role not found | - |
88
+
89
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
90
+
91
+
92
+ ## createRole
93
+
94
+ > GetRole createRole(postRole)
95
+
96
+ Create a custom role scoped to the current portal
97
+
98
+ ### Example
99
+
100
+ ```ts
101
+ import {
102
+ Configuration,
103
+ RoleApi,
104
+ } from '@easyedu/js-lsm-api';
105
+ import type { CreateRoleRequest } from '@easyedu/js-lsm-api';
106
+
107
+ async function example() {
108
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
109
+ const api = new RoleApi();
110
+
111
+ const body = {
112
+ // PostRole
113
+ postRole: ...,
114
+ } satisfies CreateRoleRequest;
115
+
116
+ try {
117
+ const data = await api.createRole(body);
118
+ console.log(data);
119
+ } catch (error) {
120
+ console.error(error);
121
+ }
122
+ }
123
+
124
+ // Run the test
125
+ example().catch(console.error);
126
+ ```
127
+
128
+ ### Parameters
129
+
130
+
131
+ | Name | Type | Description | Notes |
132
+ |------------- | ------------- | ------------- | -------------|
133
+ | **postRole** | [PostRole](PostRole.md) | | |
134
+
135
+ ### Return type
136
+
137
+ [**GetRole**](GetRole.md)
138
+
139
+ ### Authorization
140
+
141
+ No authorization required
142
+
143
+ ### HTTP request headers
144
+
145
+ - **Content-Type**: `application/json`
146
+ - **Accept**: `application/json`
147
+
148
+
149
+ ### HTTP response details
150
+ | Status code | Description | Response headers |
151
+ |-------------|-------------|------------------|
152
+ | **200** | Role created | - |
153
+ | **403** | Forbidden | - |
154
+
155
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
156
+
157
+
158
+ ## deleteRole
159
+
160
+ > deleteRole(roleId)
161
+
162
+ Deactivate a custom role
163
+
164
+ ### Example
165
+
166
+ ```ts
167
+ import {
168
+ Configuration,
169
+ RoleApi,
170
+ } from '@easyedu/js-lsm-api';
171
+ import type { DeleteRoleRequest } from '@easyedu/js-lsm-api';
172
+
173
+ async function example() {
174
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
175
+ const api = new RoleApi();
176
+
177
+ const body = {
178
+ // string
179
+ roleId: roleId_example,
180
+ } satisfies DeleteRoleRequest;
181
+
182
+ try {
183
+ const data = await api.deleteRole(body);
184
+ console.log(data);
185
+ } catch (error) {
186
+ console.error(error);
187
+ }
188
+ }
189
+
190
+ // Run the test
191
+ example().catch(console.error);
192
+ ```
193
+
194
+ ### Parameters
195
+
196
+
197
+ | Name | Type | Description | Notes |
198
+ |------------- | ------------- | ------------- | -------------|
199
+ | **roleId** | `string` | | [Defaults to `undefined`] |
200
+
201
+ ### Return type
202
+
203
+ `void` (Empty response body)
204
+
205
+ ### Authorization
206
+
207
+ No authorization required
208
+
209
+ ### HTTP request headers
210
+
211
+ - **Content-Type**: Not defined
212
+ - **Accept**: Not defined
213
+
214
+
215
+ ### HTTP response details
216
+ | Status code | Description | Response headers |
217
+ |-------------|-------------|------------------|
218
+ | **200** | Role deactivated | - |
219
+ | **403** | Cannot delete system roles | - |
220
+ | **404** | Role not found | - |
221
+
222
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
223
+
224
+
225
+ ## getPermissions
226
+
227
+ > Array<GetPermission> getPermissions()
228
+
229
+ List all available permissions in the system
230
+
231
+ ### Example
232
+
233
+ ```ts
234
+ import {
235
+ Configuration,
236
+ RoleApi,
237
+ } from '@easyedu/js-lsm-api';
238
+ import type { GetPermissionsRequest } from '@easyedu/js-lsm-api';
239
+
240
+ async function example() {
241
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
242
+ const api = new RoleApi();
243
+
244
+ try {
245
+ const data = await api.getPermissions();
246
+ console.log(data);
247
+ } catch (error) {
248
+ console.error(error);
249
+ }
250
+ }
251
+
252
+ // Run the test
253
+ example().catch(console.error);
254
+ ```
255
+
256
+ ### Parameters
257
+
258
+ This endpoint does not need any parameter.
259
+
260
+ ### Return type
261
+
262
+ [**Array<GetPermission>**](GetPermission.md)
263
+
264
+ ### Authorization
265
+
266
+ No authorization required
267
+
268
+ ### HTTP request headers
269
+
270
+ - **Content-Type**: Not defined
271
+ - **Accept**: `application/json`
272
+
273
+
274
+ ### HTTP response details
275
+ | Status code | Description | Response headers |
276
+ |-------------|-------------|------------------|
277
+ | **200** | Permission list | - |
278
+
279
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
280
+
281
+
282
+ ## getRole
283
+
284
+ > GetRole getRole(roleId)
285
+
286
+ Get role details with permissions
287
+
288
+ ### Example
289
+
290
+ ```ts
291
+ import {
292
+ Configuration,
293
+ RoleApi,
294
+ } from '@easyedu/js-lsm-api';
295
+ import type { GetRoleRequest } from '@easyedu/js-lsm-api';
296
+
297
+ async function example() {
298
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
299
+ const api = new RoleApi();
300
+
301
+ const body = {
302
+ // string
303
+ roleId: roleId_example,
304
+ } satisfies GetRoleRequest;
305
+
306
+ try {
307
+ const data = await api.getRole(body);
308
+ console.log(data);
309
+ } catch (error) {
310
+ console.error(error);
311
+ }
312
+ }
313
+
314
+ // Run the test
315
+ example().catch(console.error);
316
+ ```
317
+
318
+ ### Parameters
319
+
320
+
321
+ | Name | Type | Description | Notes |
322
+ |------------- | ------------- | ------------- | -------------|
323
+ | **roleId** | `string` | | [Defaults to `undefined`] |
324
+
325
+ ### Return type
326
+
327
+ [**GetRole**](GetRole.md)
328
+
329
+ ### Authorization
330
+
331
+ No authorization required
332
+
333
+ ### HTTP request headers
334
+
335
+ - **Content-Type**: Not defined
336
+ - **Accept**: `application/json`
337
+
338
+
339
+ ### HTTP response details
340
+ | Status code | Description | Response headers |
341
+ |-------------|-------------|------------------|
342
+ | **200** | Role details | - |
343
+ | **404** | Role not found | - |
344
+
345
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
346
+
347
+
348
+ ## getRoles
349
+
350
+ > Array<GetRole> getRoles()
351
+
352
+ List all roles available to the current portal
353
+
354
+ ### Example
355
+
356
+ ```ts
357
+ import {
358
+ Configuration,
359
+ RoleApi,
360
+ } from '@easyedu/js-lsm-api';
361
+ import type { GetRolesRequest } from '@easyedu/js-lsm-api';
362
+
363
+ async function example() {
364
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
365
+ const api = new RoleApi();
366
+
367
+ try {
368
+ const data = await api.getRoles();
369
+ console.log(data);
370
+ } catch (error) {
371
+ console.error(error);
372
+ }
373
+ }
374
+
375
+ // Run the test
376
+ example().catch(console.error);
377
+ ```
378
+
379
+ ### Parameters
380
+
381
+ This endpoint does not need any parameter.
382
+
383
+ ### Return type
384
+
385
+ [**Array<GetRole>**](GetRole.md)
386
+
387
+ ### Authorization
388
+
389
+ No authorization required
390
+
391
+ ### HTTP request headers
392
+
393
+ - **Content-Type**: Not defined
394
+ - **Accept**: `application/json`
395
+
396
+
397
+ ### HTTP response details
398
+ | Status code | Description | Response headers |
399
+ |-------------|-------------|------------------|
400
+ | **200** | Role list | - |
401
+ | **403** | Forbidden | - |
402
+
403
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
404
+
405
+
406
+ ## getUserRoles
407
+
408
+ > Array<GetUserRole> getUserRoles(userId, portalId)
409
+
410
+ Get all active roles for a user in a portal
411
+
412
+ ### Example
413
+
414
+ ```ts
415
+ import {
416
+ Configuration,
417
+ RoleApi,
418
+ } from '@easyedu/js-lsm-api';
419
+ import type { GetUserRolesRequest } from '@easyedu/js-lsm-api';
420
+
421
+ async function example() {
422
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
423
+ const api = new RoleApi();
424
+
425
+ const body = {
426
+ // string
427
+ userId: userId_example,
428
+ // string
429
+ portalId: portalId_example,
430
+ } satisfies GetUserRolesRequest;
431
+
432
+ try {
433
+ const data = await api.getUserRoles(body);
434
+ console.log(data);
435
+ } catch (error) {
436
+ console.error(error);
437
+ }
438
+ }
439
+
440
+ // Run the test
441
+ example().catch(console.error);
442
+ ```
443
+
444
+ ### Parameters
445
+
446
+
447
+ | Name | Type | Description | Notes |
448
+ |------------- | ------------- | ------------- | -------------|
449
+ | **userId** | `string` | | [Defaults to `undefined`] |
450
+ | **portalId** | `string` | | [Defaults to `undefined`] |
451
+
452
+ ### Return type
453
+
454
+ [**Array<GetUserRole>**](GetUserRole.md)
455
+
456
+ ### Authorization
457
+
458
+ No authorization required
459
+
460
+ ### HTTP request headers
461
+
462
+ - **Content-Type**: Not defined
463
+ - **Accept**: `application/json`
464
+
465
+
466
+ ### HTTP response details
467
+ | Status code | Description | Response headers |
468
+ |-------------|-------------|------------------|
469
+ | **200** | User roles | - |
470
+ | **404** | User or portal not found | - |
471
+
472
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
473
+
474
+
475
+ ## unassignUserRole
476
+
477
+ > unassignUserRole(userId, portalId, roleId)
478
+
479
+ Remove a role from a user for a portal
480
+
481
+ ### Example
482
+
483
+ ```ts
484
+ import {
485
+ Configuration,
486
+ RoleApi,
487
+ } from '@easyedu/js-lsm-api';
488
+ import type { UnassignUserRoleRequest } from '@easyedu/js-lsm-api';
489
+
490
+ async function example() {
491
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
492
+ const api = new RoleApi();
493
+
494
+ const body = {
495
+ // string
496
+ userId: userId_example,
497
+ // string
498
+ portalId: portalId_example,
499
+ // string
500
+ roleId: roleId_example,
501
+ } satisfies UnassignUserRoleRequest;
502
+
503
+ try {
504
+ const data = await api.unassignUserRole(body);
505
+ console.log(data);
506
+ } catch (error) {
507
+ console.error(error);
508
+ }
509
+ }
510
+
511
+ // Run the test
512
+ example().catch(console.error);
513
+ ```
514
+
515
+ ### Parameters
516
+
517
+
518
+ | Name | Type | Description | Notes |
519
+ |------------- | ------------- | ------------- | -------------|
520
+ | **userId** | `string` | | [Defaults to `undefined`] |
521
+ | **portalId** | `string` | | [Defaults to `undefined`] |
522
+ | **roleId** | `string` | | [Defaults to `undefined`] |
523
+
524
+ ### Return type
525
+
526
+ `void` (Empty response body)
527
+
528
+ ### Authorization
529
+
530
+ No authorization required
531
+
532
+ ### HTTP request headers
533
+
534
+ - **Content-Type**: Not defined
535
+ - **Accept**: Not defined
536
+
537
+
538
+ ### HTTP response details
539
+ | Status code | Description | Response headers |
540
+ |-------------|-------------|------------------|
541
+ | **200** | Role removed | - |
542
+ | **404** | User, portal, or role not found | - |
543
+
544
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
545
+
546
+
547
+ ## updateRole
548
+
549
+ > GetRole updateRole(roleId, putRole)
550
+
551
+ Update a custom role name and description
552
+
553
+ ### Example
554
+
555
+ ```ts
556
+ import {
557
+ Configuration,
558
+ RoleApi,
559
+ } from '@easyedu/js-lsm-api';
560
+ import type { UpdateRoleRequest } from '@easyedu/js-lsm-api';
561
+
562
+ async function example() {
563
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
564
+ const api = new RoleApi();
565
+
566
+ const body = {
567
+ // string
568
+ roleId: roleId_example,
569
+ // PutRole
570
+ putRole: ...,
571
+ } satisfies UpdateRoleRequest;
572
+
573
+ try {
574
+ const data = await api.updateRole(body);
575
+ console.log(data);
576
+ } catch (error) {
577
+ console.error(error);
578
+ }
579
+ }
580
+
581
+ // Run the test
582
+ example().catch(console.error);
583
+ ```
584
+
585
+ ### Parameters
586
+
587
+
588
+ | Name | Type | Description | Notes |
589
+ |------------- | ------------- | ------------- | -------------|
590
+ | **roleId** | `string` | | [Defaults to `undefined`] |
591
+ | **putRole** | [PutRole](PutRole.md) | | |
592
+
593
+ ### Return type
594
+
595
+ [**GetRole**](GetRole.md)
596
+
597
+ ### Authorization
598
+
599
+ No authorization required
600
+
601
+ ### HTTP request headers
602
+
603
+ - **Content-Type**: `application/json`
604
+ - **Accept**: `application/json`
605
+
606
+
607
+ ### HTTP response details
608
+ | Status code | Description | Response headers |
609
+ |-------------|-------------|------------------|
610
+ | **200** | Role updated | - |
611
+ | **403** | Cannot modify system roles | - |
612
+ | **404** | Role not found | - |
613
+
614
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
615
+
616
+
617
+ ## updateRolePermissions
618
+
619
+ > updateRolePermissions(roleId, putRolePermissions)
620
+
621
+ Replace all permissions for a custom role
622
+
623
+ ### Example
624
+
625
+ ```ts
626
+ import {
627
+ Configuration,
628
+ RoleApi,
629
+ } from '@easyedu/js-lsm-api';
630
+ import type { UpdateRolePermissionsRequest } from '@easyedu/js-lsm-api';
631
+
632
+ async function example() {
633
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
634
+ const api = new RoleApi();
635
+
636
+ const body = {
637
+ // string
638
+ roleId: roleId_example,
639
+ // PutRolePermissions
640
+ putRolePermissions: ...,
641
+ } satisfies UpdateRolePermissionsRequest;
642
+
643
+ try {
644
+ const data = await api.updateRolePermissions(body);
645
+ console.log(data);
646
+ } catch (error) {
647
+ console.error(error);
648
+ }
649
+ }
650
+
651
+ // Run the test
652
+ example().catch(console.error);
653
+ ```
654
+
655
+ ### Parameters
656
+
657
+
658
+ | Name | Type | Description | Notes |
659
+ |------------- | ------------- | ------------- | -------------|
660
+ | **roleId** | `string` | | [Defaults to `undefined`] |
661
+ | **putRolePermissions** | [PutRolePermissions](PutRolePermissions.md) | | |
662
+
663
+ ### Return type
664
+
665
+ `void` (Empty response body)
666
+
667
+ ### Authorization
668
+
669
+ No authorization required
670
+
671
+ ### HTTP request headers
672
+
673
+ - **Content-Type**: `application/json`
674
+ - **Accept**: Not defined
675
+
676
+
677
+ ### HTTP response details
678
+ | Status code | Description | Response headers |
679
+ |-------------|-------------|------------------|
680
+ | **200** | Permissions updated | - |
681
+ | **403** | Cannot modify system role permissions | - |
682
+ | **404** | Role not found | - |
683
+
684
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
685
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.32.0",
3
+ "version": "1.34.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {