@easyedu/js-lsm-api 1.77.0 → 1.79.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.
- package/.openapi-generator/FILES +22 -0
- package/README.md +18 -2
- package/dist/apis/CourseApi.d.ts +18 -0
- package/dist/apis/CourseApi.js +49 -0
- package/dist/apis/PortalApi.d.ts +67 -0
- package/dist/apis/PortalApi.js +177 -0
- package/dist/esm/apis/CourseApi.d.ts +18 -0
- package/dist/esm/apis/CourseApi.js +49 -0
- package/dist/esm/apis/PortalApi.d.ts +67 -0
- package/dist/esm/apis/PortalApi.js +177 -0
- package/dist/esm/models/GetPortalUserFieldValues.d.ts +53 -0
- package/dist/esm/models/GetPortalUserFieldValues.js +58 -0
- package/dist/esm/models/PortalUserFieldConfig.d.ts +40 -0
- package/dist/esm/models/PortalUserFieldConfig.js +49 -0
- package/dist/esm/models/PortalUserFieldDefinition.d.ts +108 -0
- package/dist/esm/models/PortalUserFieldDefinition.js +90 -0
- package/dist/esm/models/PortalUserFieldGroup.d.ts +62 -0
- package/dist/esm/models/PortalUserFieldGroup.js +59 -0
- package/dist/esm/models/PortalUserFieldMissingRequired.d.ts +56 -0
- package/dist/esm/models/PortalUserFieldMissingRequired.js +55 -0
- package/dist/esm/models/PortalUserFieldOption.d.ts +56 -0
- package/dist/esm/models/PortalUserFieldOption.js +57 -0
- package/dist/esm/models/PortalUserFieldValueField.d.ts +96 -0
- package/dist/esm/models/PortalUserFieldValueField.js +86 -0
- package/dist/esm/models/PortalUserFieldValueGroup.d.ts +57 -0
- package/dist/esm/models/PortalUserFieldValueGroup.js +60 -0
- package/dist/esm/models/PortalUserFieldValueInput.d.ts +38 -0
- package/dist/esm/models/PortalUserFieldValueInput.js +47 -0
- package/dist/esm/models/PostCourseResume.d.ts +93 -0
- package/dist/esm/models/PostCourseResume.js +82 -0
- package/dist/esm/models/PutPortalUserFieldValues.d.ts +33 -0
- package/dist/esm/models/PutPortalUserFieldValues.js +44 -0
- package/dist/esm/models/index.d.ts +11 -0
- package/dist/esm/models/index.js +11 -0
- package/dist/models/GetPortalUserFieldValues.d.ts +53 -0
- package/dist/models/GetPortalUserFieldValues.js +65 -0
- package/dist/models/PortalUserFieldConfig.d.ts +40 -0
- package/dist/models/PortalUserFieldConfig.js +56 -0
- package/dist/models/PortalUserFieldDefinition.d.ts +108 -0
- package/dist/models/PortalUserFieldDefinition.js +98 -0
- package/dist/models/PortalUserFieldGroup.d.ts +62 -0
- package/dist/models/PortalUserFieldGroup.js +66 -0
- package/dist/models/PortalUserFieldMissingRequired.d.ts +56 -0
- package/dist/models/PortalUserFieldMissingRequired.js +62 -0
- package/dist/models/PortalUserFieldOption.d.ts +56 -0
- package/dist/models/PortalUserFieldOption.js +64 -0
- package/dist/models/PortalUserFieldValueField.d.ts +96 -0
- package/dist/models/PortalUserFieldValueField.js +94 -0
- package/dist/models/PortalUserFieldValueGroup.d.ts +57 -0
- package/dist/models/PortalUserFieldValueGroup.js +67 -0
- package/dist/models/PortalUserFieldValueInput.d.ts +38 -0
- package/dist/models/PortalUserFieldValueInput.js +54 -0
- package/dist/models/PostCourseResume.d.ts +93 -0
- package/dist/models/PostCourseResume.js +89 -0
- package/dist/models/PutPortalUserFieldValues.d.ts +33 -0
- package/dist/models/PutPortalUserFieldValues.js +51 -0
- package/dist/models/index.d.ts +11 -0
- package/dist/models/index.js +11 -0
- package/docs/CourseApi.md +72 -0
- package/docs/GetPortalUserFieldValues.md +40 -0
- package/docs/PortalApi.md +287 -0
- package/docs/PortalUserFieldConfig.md +36 -0
- package/docs/PortalUserFieldDefinition.md +54 -0
- package/docs/PortalUserFieldGroup.md +44 -0
- package/docs/PortalUserFieldMissingRequired.md +42 -0
- package/docs/PortalUserFieldOption.md +42 -0
- package/docs/PortalUserFieldValueField.md +50 -0
- package/docs/PortalUserFieldValueGroup.md +42 -0
- package/docs/PortalUserFieldValueInput.md +36 -0
- package/docs/PostCourseResume.md +55 -0
- package/docs/PutPortalUserFieldValues.md +34 -0
- package/package.json +1 -1
- package/src/apis/CourseApi.ts +63 -0
- package/src/apis/PortalApi.ts +251 -0
- package/src/models/GetPortalUserFieldValues.ts +115 -0
- package/src/models/PortalUserFieldConfig.ts +90 -0
- package/src/models/PortalUserFieldDefinition.ts +178 -0
- package/src/models/PortalUserFieldGroup.ts +109 -0
- package/src/models/PortalUserFieldMissingRequired.ts +100 -0
- package/src/models/PortalUserFieldOption.ts +101 -0
- package/src/models/PortalUserFieldValueField.ts +162 -0
- package/src/models/PortalUserFieldValueGroup.ts +110 -0
- package/src/models/PortalUserFieldValueInput.ts +75 -0
- package/src/models/PostCourseResume.ts +165 -0
- package/src/models/PutPortalUserFieldValues.ts +74 -0
- package/src/models/index.ts +11 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LMS API
|
|
6
|
+
* LMS API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfPutPortalUserFieldValues = instanceOfPutPortalUserFieldValues;
|
|
17
|
+
exports.PutPortalUserFieldValuesFromJSON = PutPortalUserFieldValuesFromJSON;
|
|
18
|
+
exports.PutPortalUserFieldValuesFromJSONTyped = PutPortalUserFieldValuesFromJSONTyped;
|
|
19
|
+
exports.PutPortalUserFieldValuesToJSON = PutPortalUserFieldValuesToJSON;
|
|
20
|
+
exports.PutPortalUserFieldValuesToJSONTyped = PutPortalUserFieldValuesToJSONTyped;
|
|
21
|
+
const PortalUserFieldValueInput_1 = require("./PortalUserFieldValueInput");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the PutPortalUserFieldValues interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfPutPortalUserFieldValues(value) {
|
|
26
|
+
if (!('values' in value) || value['values'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function PutPortalUserFieldValuesFromJSON(json) {
|
|
31
|
+
return PutPortalUserFieldValuesFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function PutPortalUserFieldValuesFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'values': (json['values'].map(PortalUserFieldValueInput_1.PortalUserFieldValueInputFromJSON)),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function PutPortalUserFieldValuesToJSON(json) {
|
|
42
|
+
return PutPortalUserFieldValuesToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function PutPortalUserFieldValuesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'values': (value['values'].map(PortalUserFieldValueInput_1.PortalUserFieldValueInputToJSON)),
|
|
50
|
+
};
|
|
51
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ export * from './GetPortalStudentReporting';
|
|
|
84
84
|
export * from './GetPortalStudentReportingCertificates';
|
|
85
85
|
export * from './GetPortalStudentReportingPortalInfo';
|
|
86
86
|
export * from './GetPortalUser';
|
|
87
|
+
export * from './GetPortalUserFieldValues';
|
|
87
88
|
export * from './GetPortalUserList';
|
|
88
89
|
export * from './GetPublicPortalBranding';
|
|
89
90
|
export * from './GetQuestion';
|
|
@@ -172,6 +173,14 @@ export * from './MultipleAnswer1';
|
|
|
172
173
|
export * from './NoAnswer';
|
|
173
174
|
export * from './Paginated';
|
|
174
175
|
export * from './PortalSublicense';
|
|
176
|
+
export * from './PortalUserFieldConfig';
|
|
177
|
+
export * from './PortalUserFieldDefinition';
|
|
178
|
+
export * from './PortalUserFieldGroup';
|
|
179
|
+
export * from './PortalUserFieldMissingRequired';
|
|
180
|
+
export * from './PortalUserFieldOption';
|
|
181
|
+
export * from './PortalUserFieldValueField';
|
|
182
|
+
export * from './PortalUserFieldValueGroup';
|
|
183
|
+
export * from './PortalUserFieldValueInput';
|
|
175
184
|
export * from './PostCertificate';
|
|
176
185
|
export * from './PostCertificateConfig';
|
|
177
186
|
export * from './PostContentQuiz';
|
|
@@ -186,6 +195,7 @@ export * from './PostCourse';
|
|
|
186
195
|
export * from './PostCourseCatalog';
|
|
187
196
|
export * from './PostCourseEnrollment';
|
|
188
197
|
export * from './PostCourseExport';
|
|
198
|
+
export * from './PostCourseResume';
|
|
189
199
|
export * from './PostDuplicate';
|
|
190
200
|
export * from './PostDuplicate1';
|
|
191
201
|
export * from './PostDuplicate2';
|
|
@@ -239,6 +249,7 @@ export * from './PutModule';
|
|
|
239
249
|
export * from './PutModuleReorder';
|
|
240
250
|
export * from './PutPortalBranding';
|
|
241
251
|
export * from './PutPortalSublicense';
|
|
252
|
+
export * from './PutPortalUserFieldValues';
|
|
242
253
|
export * from './PutQuestion';
|
|
243
254
|
export * from './PutQuestionAnswerChoicesInner';
|
|
244
255
|
export * from './PutQuiz';
|
package/dist/models/index.js
CHANGED
|
@@ -102,6 +102,7 @@ __exportStar(require("./GetPortalStudentReporting"), exports);
|
|
|
102
102
|
__exportStar(require("./GetPortalStudentReportingCertificates"), exports);
|
|
103
103
|
__exportStar(require("./GetPortalStudentReportingPortalInfo"), exports);
|
|
104
104
|
__exportStar(require("./GetPortalUser"), exports);
|
|
105
|
+
__exportStar(require("./GetPortalUserFieldValues"), exports);
|
|
105
106
|
__exportStar(require("./GetPortalUserList"), exports);
|
|
106
107
|
__exportStar(require("./GetPublicPortalBranding"), exports);
|
|
107
108
|
__exportStar(require("./GetQuestion"), exports);
|
|
@@ -190,6 +191,14 @@ __exportStar(require("./MultipleAnswer1"), exports);
|
|
|
190
191
|
__exportStar(require("./NoAnswer"), exports);
|
|
191
192
|
__exportStar(require("./Paginated"), exports);
|
|
192
193
|
__exportStar(require("./PortalSublicense"), exports);
|
|
194
|
+
__exportStar(require("./PortalUserFieldConfig"), exports);
|
|
195
|
+
__exportStar(require("./PortalUserFieldDefinition"), exports);
|
|
196
|
+
__exportStar(require("./PortalUserFieldGroup"), exports);
|
|
197
|
+
__exportStar(require("./PortalUserFieldMissingRequired"), exports);
|
|
198
|
+
__exportStar(require("./PortalUserFieldOption"), exports);
|
|
199
|
+
__exportStar(require("./PortalUserFieldValueField"), exports);
|
|
200
|
+
__exportStar(require("./PortalUserFieldValueGroup"), exports);
|
|
201
|
+
__exportStar(require("./PortalUserFieldValueInput"), exports);
|
|
193
202
|
__exportStar(require("./PostCertificate"), exports);
|
|
194
203
|
__exportStar(require("./PostCertificateConfig"), exports);
|
|
195
204
|
__exportStar(require("./PostContentQuiz"), exports);
|
|
@@ -204,6 +213,7 @@ __exportStar(require("./PostCourse"), exports);
|
|
|
204
213
|
__exportStar(require("./PostCourseCatalog"), exports);
|
|
205
214
|
__exportStar(require("./PostCourseEnrollment"), exports);
|
|
206
215
|
__exportStar(require("./PostCourseExport"), exports);
|
|
216
|
+
__exportStar(require("./PostCourseResume"), exports);
|
|
207
217
|
__exportStar(require("./PostDuplicate"), exports);
|
|
208
218
|
__exportStar(require("./PostDuplicate1"), exports);
|
|
209
219
|
__exportStar(require("./PostDuplicate2"), exports);
|
|
@@ -257,6 +267,7 @@ __exportStar(require("./PutModule"), exports);
|
|
|
257
267
|
__exportStar(require("./PutModuleReorder"), exports);
|
|
258
268
|
__exportStar(require("./PutPortalBranding"), exports);
|
|
259
269
|
__exportStar(require("./PutPortalSublicense"), exports);
|
|
270
|
+
__exportStar(require("./PutPortalUserFieldValues"), exports);
|
|
260
271
|
__exportStar(require("./PutQuestion"), exports);
|
|
261
272
|
__exportStar(require("./PutQuestionAnswerChoicesInner"), exports);
|
|
262
273
|
__exportStar(require("./PutQuiz"), exports);
|
package/docs/CourseApi.md
CHANGED
|
@@ -21,6 +21,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
21
21
|
| [**postCourseEnrollment**](CourseApi.md#postcourseenrollment) | **POST** /courses/{courseId}/enrollments | Create a new course enrollment |
|
|
22
22
|
| [**postCourseExport**](CourseApi.md#postcourseexport) | **POST** /courses/{courseId}/exports | Create a new SCORM export for a course |
|
|
23
23
|
| [**postCourseImageUpload**](CourseApi.md#postcourseimageupload) | **POST** /courses/{courseId}/image | Upload a course image |
|
|
24
|
+
| [**postCourseResume**](CourseApi.md#postcourseresume) | **POST** /courses/{courseId}/resume | Resume the current learner\'s progress in a course |
|
|
24
25
|
| [**putCourse**](CourseApi.md#putcourse) | **PUT** /courses/{courseId} | Update a course by id |
|
|
25
26
|
| [**putCourseEnrollment**](CourseApi.md#putcourseenrollment) | **PUT** /courses/{courseId}/enrollments/{enrollmentId} | Update a course enrollment |
|
|
26
27
|
|
|
@@ -1216,6 +1217,77 @@ No authorization required
|
|
|
1216
1217
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1217
1218
|
|
|
1218
1219
|
|
|
1220
|
+
## postCourseResume
|
|
1221
|
+
|
|
1222
|
+
> PostCourseResume postCourseResume(courseId)
|
|
1223
|
+
|
|
1224
|
+
Resume the current learner\'s progress in a course
|
|
1225
|
+
|
|
1226
|
+
Selects the first incomplete published content item in course order, creates or reuses the current live content session, and returns a launch-ready response.
|
|
1227
|
+
|
|
1228
|
+
### Example
|
|
1229
|
+
|
|
1230
|
+
```ts
|
|
1231
|
+
import {
|
|
1232
|
+
Configuration,
|
|
1233
|
+
CourseApi,
|
|
1234
|
+
} from '@easyedu/js-lsm-api';
|
|
1235
|
+
import type { PostCourseResumeRequest } from '@easyedu/js-lsm-api';
|
|
1236
|
+
|
|
1237
|
+
async function example() {
|
|
1238
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1239
|
+
const api = new CourseApi();
|
|
1240
|
+
|
|
1241
|
+
const body = {
|
|
1242
|
+
// string
|
|
1243
|
+
courseId: courseId_example,
|
|
1244
|
+
} satisfies PostCourseResumeRequest;
|
|
1245
|
+
|
|
1246
|
+
try {
|
|
1247
|
+
const data = await api.postCourseResume(body);
|
|
1248
|
+
console.log(data);
|
|
1249
|
+
} catch (error) {
|
|
1250
|
+
console.error(error);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
// Run the test
|
|
1255
|
+
example().catch(console.error);
|
|
1256
|
+
```
|
|
1257
|
+
|
|
1258
|
+
### Parameters
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
| Name | Type | Description | Notes |
|
|
1262
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1263
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1264
|
+
|
|
1265
|
+
### Return type
|
|
1266
|
+
|
|
1267
|
+
[**PostCourseResume**](PostCourseResume.md)
|
|
1268
|
+
|
|
1269
|
+
### Authorization
|
|
1270
|
+
|
|
1271
|
+
No authorization required
|
|
1272
|
+
|
|
1273
|
+
### HTTP request headers
|
|
1274
|
+
|
|
1275
|
+
- **Content-Type**: Not defined
|
|
1276
|
+
- **Accept**: `application/json`
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
### HTTP response details
|
|
1280
|
+
| Status code | Description | Response headers |
|
|
1281
|
+
|-------------|-------------|------------------|
|
|
1282
|
+
| **200** | Launch-ready course resume target | - |
|
|
1283
|
+
| **204** | No incomplete published content remains in the course | - |
|
|
1284
|
+
| **401** | Unauthorized | - |
|
|
1285
|
+
| **403** | Forbidden | - |
|
|
1286
|
+
| **404** | Course not found | - |
|
|
1287
|
+
|
|
1288
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1289
|
+
|
|
1290
|
+
|
|
1219
1291
|
## putCourse
|
|
1220
1292
|
|
|
1221
1293
|
> GetCourse putCourse(courseId, putCourse)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# GetPortalUserFieldValues
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`complete` | boolean
|
|
10
|
+
`missingRequiredFields` | [Array<PortalUserFieldMissingRequired>](PortalUserFieldMissingRequired.md)
|
|
11
|
+
`groups` | [Array<PortalUserFieldValueGroup>](PortalUserFieldValueGroup.md)
|
|
12
|
+
`ungroupedFields` | [Array<PortalUserFieldValueField>](PortalUserFieldValueField.md)
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { GetPortalUserFieldValues } from '@easyedu/js-lsm-api'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"complete": null,
|
|
22
|
+
"missingRequiredFields": null,
|
|
23
|
+
"groups": null,
|
|
24
|
+
"ungroupedFields": null,
|
|
25
|
+
} satisfies GetPortalUserFieldValues
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetPortalUserFieldValues
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
package/docs/PortalApi.md
CHANGED
|
@@ -10,6 +10,8 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
10
10
|
| [**getPortalFaviconAsset**](PortalApi.md#getportalfaviconasset) | **GET** /portals/{portalId}/branding/favicon | Stream the configured portal favicon |
|
|
11
11
|
| [**getPortalList**](PortalApi.md#getportallist) | **GET** /portals | Get all portals a user has access to |
|
|
12
12
|
| [**getPortalLogoAsset**](PortalApi.md#getportallogoasset) | **GET** /portals/{portalId}/branding/logo | Stream the configured portal logo |
|
|
13
|
+
| [**getPortalUserFieldConfig**](PortalApi.md#getportaluserfieldconfig) | **GET** /portals/{portalId}/user-field-config | Get portal user field configuration |
|
|
14
|
+
| [**getPortalUserFieldValues**](PortalApi.md#getportaluserfieldvalues) | **GET** /portals/{portalId}/users/{userId}/user-field-values | Get a user\'s portal field values and completion status |
|
|
13
15
|
| [**getPortalUsers**](PortalApi.md#getportalusers) | **GET** /portals/{portalId}/users | Get all users for a portal with optional role filtering |
|
|
14
16
|
| [**getPublicPortalBranding**](PortalApi.md#getpublicportalbranding) | **GET** /public/portal/branding | Public portal branding resolved from the request host |
|
|
15
17
|
| [**getPublicPortalFaviconAsset**](PortalApi.md#getpublicportalfaviconasset) | **GET** /public/portal/branding/favicon | Public portal favicon resolved from the request host |
|
|
@@ -19,6 +21,8 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
19
21
|
| [**postPortalFaviconUpload**](PortalApi.md#postportalfaviconupload) | **POST** /portals/{portalId}/branding/favicon | Upload a favicon image for portal branding |
|
|
20
22
|
| [**postPortalLogoUpload**](PortalApi.md#postportallogoupload) | **POST** /portals/{portalId}/branding/logo | Upload a logo image for portal branding |
|
|
21
23
|
| [**putPortalBranding**](PortalApi.md#putportalbranding) | **PUT** /portals/{portalId} | Update portal branding (name, background color, text color) |
|
|
24
|
+
| [**putPortalUserFieldConfig**](PortalApi.md#putportaluserfieldconfig) | **PUT** /portals/{portalId}/user-field-config | Replace portal user field configuration |
|
|
25
|
+
| [**putPortalUserFieldValues**](PortalApi.md#putportaluserfieldvalues) | **PUT** /portals/{portalId}/users/{userId}/user-field-values | Bulk upsert a user\'s portal field values |
|
|
22
26
|
| [**removePortalUser**](PortalApi.md#removeportaluser) | **DELETE** /portals/{portalId}/users/{userId} | Remove a user from a portal |
|
|
23
27
|
| [**updateSelectedPortal**](PortalApi.md#updateselectedportal) | **PUT** /portals/{portalId}/selected | Update the users current selected portal. Returns new JWT with updated roles. |
|
|
24
28
|
|
|
@@ -410,6 +414,144 @@ No authorization required
|
|
|
410
414
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
411
415
|
|
|
412
416
|
|
|
417
|
+
## getPortalUserFieldConfig
|
|
418
|
+
|
|
419
|
+
> PortalUserFieldConfig getPortalUserFieldConfig(portalId)
|
|
420
|
+
|
|
421
|
+
Get portal user field configuration
|
|
422
|
+
|
|
423
|
+
### Example
|
|
424
|
+
|
|
425
|
+
```ts
|
|
426
|
+
import {
|
|
427
|
+
Configuration,
|
|
428
|
+
PortalApi,
|
|
429
|
+
} from '@easyedu/js-lsm-api';
|
|
430
|
+
import type { GetPortalUserFieldConfigRequest } from '@easyedu/js-lsm-api';
|
|
431
|
+
|
|
432
|
+
async function example() {
|
|
433
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
434
|
+
const api = new PortalApi();
|
|
435
|
+
|
|
436
|
+
const body = {
|
|
437
|
+
// string
|
|
438
|
+
portalId: portalId_example,
|
|
439
|
+
} satisfies GetPortalUserFieldConfigRequest;
|
|
440
|
+
|
|
441
|
+
try {
|
|
442
|
+
const data = await api.getPortalUserFieldConfig(body);
|
|
443
|
+
console.log(data);
|
|
444
|
+
} catch (error) {
|
|
445
|
+
console.error(error);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
// Run the test
|
|
450
|
+
example().catch(console.error);
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
### Parameters
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
| Name | Type | Description | Notes |
|
|
457
|
+
|------------- | ------------- | ------------- | -------------|
|
|
458
|
+
| **portalId** | `string` | | [Defaults to `undefined`] |
|
|
459
|
+
|
|
460
|
+
### Return type
|
|
461
|
+
|
|
462
|
+
[**PortalUserFieldConfig**](PortalUserFieldConfig.md)
|
|
463
|
+
|
|
464
|
+
### Authorization
|
|
465
|
+
|
|
466
|
+
No authorization required
|
|
467
|
+
|
|
468
|
+
### HTTP request headers
|
|
469
|
+
|
|
470
|
+
- **Content-Type**: Not defined
|
|
471
|
+
- **Accept**: `application/json`
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
### HTTP response details
|
|
475
|
+
| Status code | Description | Response headers |
|
|
476
|
+
|-------------|-------------|------------------|
|
|
477
|
+
| **200** | Portal user field configuration | - |
|
|
478
|
+
| **403** | Forbidden | - |
|
|
479
|
+
| **404** | Portal not found | - |
|
|
480
|
+
|
|
481
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
## getPortalUserFieldValues
|
|
485
|
+
|
|
486
|
+
> GetPortalUserFieldValues getPortalUserFieldValues(portalId, userId)
|
|
487
|
+
|
|
488
|
+
Get a user\'s portal field values and completion status
|
|
489
|
+
|
|
490
|
+
### Example
|
|
491
|
+
|
|
492
|
+
```ts
|
|
493
|
+
import {
|
|
494
|
+
Configuration,
|
|
495
|
+
PortalApi,
|
|
496
|
+
} from '@easyedu/js-lsm-api';
|
|
497
|
+
import type { GetPortalUserFieldValuesRequest } from '@easyedu/js-lsm-api';
|
|
498
|
+
|
|
499
|
+
async function example() {
|
|
500
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
501
|
+
const api = new PortalApi();
|
|
502
|
+
|
|
503
|
+
const body = {
|
|
504
|
+
// string
|
|
505
|
+
portalId: portalId_example,
|
|
506
|
+
// string
|
|
507
|
+
userId: userId_example,
|
|
508
|
+
} satisfies GetPortalUserFieldValuesRequest;
|
|
509
|
+
|
|
510
|
+
try {
|
|
511
|
+
const data = await api.getPortalUserFieldValues(body);
|
|
512
|
+
console.log(data);
|
|
513
|
+
} catch (error) {
|
|
514
|
+
console.error(error);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// Run the test
|
|
519
|
+
example().catch(console.error);
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
### Parameters
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
| Name | Type | Description | Notes |
|
|
526
|
+
|------------- | ------------- | ------------- | -------------|
|
|
527
|
+
| **portalId** | `string` | | [Defaults to `undefined`] |
|
|
528
|
+
| **userId** | `string` | | [Defaults to `undefined`] |
|
|
529
|
+
|
|
530
|
+
### Return type
|
|
531
|
+
|
|
532
|
+
[**GetPortalUserFieldValues**](GetPortalUserFieldValues.md)
|
|
533
|
+
|
|
534
|
+
### Authorization
|
|
535
|
+
|
|
536
|
+
No authorization required
|
|
537
|
+
|
|
538
|
+
### HTTP request headers
|
|
539
|
+
|
|
540
|
+
- **Content-Type**: Not defined
|
|
541
|
+
- **Accept**: `application/json`
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
### HTTP response details
|
|
545
|
+
| Status code | Description | Response headers |
|
|
546
|
+
|-------------|-------------|------------------|
|
|
547
|
+
| **200** | Portal user field values | - |
|
|
548
|
+
| **400** | Invalid request | - |
|
|
549
|
+
| **403** | Forbidden | - |
|
|
550
|
+
| **404** | Portal or user not found | - |
|
|
551
|
+
|
|
552
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
553
|
+
|
|
554
|
+
|
|
413
555
|
## getPortalUsers
|
|
414
556
|
|
|
415
557
|
> GetPortalUserList getPortalUsers(portalId, type, roles, search, page, pageSize)
|
|
@@ -1020,6 +1162,151 @@ No authorization required
|
|
|
1020
1162
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1021
1163
|
|
|
1022
1164
|
|
|
1165
|
+
## putPortalUserFieldConfig
|
|
1166
|
+
|
|
1167
|
+
> PortalUserFieldConfig putPortalUserFieldConfig(portalId, portalUserFieldConfig)
|
|
1168
|
+
|
|
1169
|
+
Replace portal user field configuration
|
|
1170
|
+
|
|
1171
|
+
### Example
|
|
1172
|
+
|
|
1173
|
+
```ts
|
|
1174
|
+
import {
|
|
1175
|
+
Configuration,
|
|
1176
|
+
PortalApi,
|
|
1177
|
+
} from '@easyedu/js-lsm-api';
|
|
1178
|
+
import type { PutPortalUserFieldConfigRequest } from '@easyedu/js-lsm-api';
|
|
1179
|
+
|
|
1180
|
+
async function example() {
|
|
1181
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1182
|
+
const api = new PortalApi();
|
|
1183
|
+
|
|
1184
|
+
const body = {
|
|
1185
|
+
// string
|
|
1186
|
+
portalId: portalId_example,
|
|
1187
|
+
// PortalUserFieldConfig
|
|
1188
|
+
portalUserFieldConfig: ...,
|
|
1189
|
+
} satisfies PutPortalUserFieldConfigRequest;
|
|
1190
|
+
|
|
1191
|
+
try {
|
|
1192
|
+
const data = await api.putPortalUserFieldConfig(body);
|
|
1193
|
+
console.log(data);
|
|
1194
|
+
} catch (error) {
|
|
1195
|
+
console.error(error);
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
// Run the test
|
|
1200
|
+
example().catch(console.error);
|
|
1201
|
+
```
|
|
1202
|
+
|
|
1203
|
+
### Parameters
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
| Name | Type | Description | Notes |
|
|
1207
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1208
|
+
| **portalId** | `string` | | [Defaults to `undefined`] |
|
|
1209
|
+
| **portalUserFieldConfig** | [PortalUserFieldConfig](PortalUserFieldConfig.md) | | |
|
|
1210
|
+
|
|
1211
|
+
### Return type
|
|
1212
|
+
|
|
1213
|
+
[**PortalUserFieldConfig**](PortalUserFieldConfig.md)
|
|
1214
|
+
|
|
1215
|
+
### Authorization
|
|
1216
|
+
|
|
1217
|
+
No authorization required
|
|
1218
|
+
|
|
1219
|
+
### HTTP request headers
|
|
1220
|
+
|
|
1221
|
+
- **Content-Type**: `application/json`
|
|
1222
|
+
- **Accept**: `application/json`
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
### HTTP response details
|
|
1226
|
+
| Status code | Description | Response headers |
|
|
1227
|
+
|-------------|-------------|------------------|
|
|
1228
|
+
| **200** | Portal user field configuration | - |
|
|
1229
|
+
| **400** | Invalid field configuration | - |
|
|
1230
|
+
| **403** | Forbidden | - |
|
|
1231
|
+
| **404** | Portal not found | - |
|
|
1232
|
+
|
|
1233
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
## putPortalUserFieldValues
|
|
1237
|
+
|
|
1238
|
+
> GetPortalUserFieldValues putPortalUserFieldValues(portalId, userId, putPortalUserFieldValues)
|
|
1239
|
+
|
|
1240
|
+
Bulk upsert a user\'s portal field values
|
|
1241
|
+
|
|
1242
|
+
### Example
|
|
1243
|
+
|
|
1244
|
+
```ts
|
|
1245
|
+
import {
|
|
1246
|
+
Configuration,
|
|
1247
|
+
PortalApi,
|
|
1248
|
+
} from '@easyedu/js-lsm-api';
|
|
1249
|
+
import type { PutPortalUserFieldValuesRequest } from '@easyedu/js-lsm-api';
|
|
1250
|
+
|
|
1251
|
+
async function example() {
|
|
1252
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1253
|
+
const api = new PortalApi();
|
|
1254
|
+
|
|
1255
|
+
const body = {
|
|
1256
|
+
// string
|
|
1257
|
+
portalId: portalId_example,
|
|
1258
|
+
// string
|
|
1259
|
+
userId: userId_example,
|
|
1260
|
+
// PutPortalUserFieldValues
|
|
1261
|
+
putPortalUserFieldValues: ...,
|
|
1262
|
+
} satisfies PutPortalUserFieldValuesRequest;
|
|
1263
|
+
|
|
1264
|
+
try {
|
|
1265
|
+
const data = await api.putPortalUserFieldValues(body);
|
|
1266
|
+
console.log(data);
|
|
1267
|
+
} catch (error) {
|
|
1268
|
+
console.error(error);
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
// Run the test
|
|
1273
|
+
example().catch(console.error);
|
|
1274
|
+
```
|
|
1275
|
+
|
|
1276
|
+
### Parameters
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
| Name | Type | Description | Notes |
|
|
1280
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1281
|
+
| **portalId** | `string` | | [Defaults to `undefined`] |
|
|
1282
|
+
| **userId** | `string` | | [Defaults to `undefined`] |
|
|
1283
|
+
| **putPortalUserFieldValues** | [PutPortalUserFieldValues](PutPortalUserFieldValues.md) | | |
|
|
1284
|
+
|
|
1285
|
+
### Return type
|
|
1286
|
+
|
|
1287
|
+
[**GetPortalUserFieldValues**](GetPortalUserFieldValues.md)
|
|
1288
|
+
|
|
1289
|
+
### Authorization
|
|
1290
|
+
|
|
1291
|
+
No authorization required
|
|
1292
|
+
|
|
1293
|
+
### HTTP request headers
|
|
1294
|
+
|
|
1295
|
+
- **Content-Type**: `application/json`
|
|
1296
|
+
- **Accept**: `application/json`
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
### HTTP response details
|
|
1300
|
+
| Status code | Description | Response headers |
|
|
1301
|
+
|-------------|-------------|------------------|
|
|
1302
|
+
| **200** | Portal user field values | - |
|
|
1303
|
+
| **400** | Invalid field values | - |
|
|
1304
|
+
| **403** | Forbidden | - |
|
|
1305
|
+
| **404** | Portal or user not found | - |
|
|
1306
|
+
|
|
1307
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1308
|
+
|
|
1309
|
+
|
|
1023
1310
|
## removePortalUser
|
|
1024
1311
|
|
|
1025
1312
|
> removePortalUser(portalId, userId)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# PortalUserFieldConfig
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`groups` | [Array<PortalUserFieldGroup>](PortalUserFieldGroup.md)
|
|
10
|
+
`fields` | [Array<PortalUserFieldDefinition>](PortalUserFieldDefinition.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { PortalUserFieldConfig } from '@easyedu/js-lsm-api'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"groups": null,
|
|
20
|
+
"fields": null,
|
|
21
|
+
} satisfies PortalUserFieldConfig
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as PortalUserFieldConfig
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
|
|
2
|
+
# PortalUserFieldDefinition
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
`groupId` | string
|
|
11
|
+
`key` | string
|
|
12
|
+
`label` | string
|
|
13
|
+
`description` | string
|
|
14
|
+
`fieldType` | string
|
|
15
|
+
`isRequired` | boolean
|
|
16
|
+
`isActive` | boolean
|
|
17
|
+
`displayOrder` | number
|
|
18
|
+
`validation` | object
|
|
19
|
+
`options` | [Array<PortalUserFieldOption>](PortalUserFieldOption.md)
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import type { PortalUserFieldDefinition } from '@easyedu/js-lsm-api'
|
|
25
|
+
|
|
26
|
+
// TODO: Update the object below with actual values
|
|
27
|
+
const example = {
|
|
28
|
+
"id": null,
|
|
29
|
+
"groupId": null,
|
|
30
|
+
"key": null,
|
|
31
|
+
"label": null,
|
|
32
|
+
"description": null,
|
|
33
|
+
"fieldType": null,
|
|
34
|
+
"isRequired": null,
|
|
35
|
+
"isActive": null,
|
|
36
|
+
"displayOrder": null,
|
|
37
|
+
"validation": null,
|
|
38
|
+
"options": null,
|
|
39
|
+
} satisfies PortalUserFieldDefinition
|
|
40
|
+
|
|
41
|
+
console.log(example)
|
|
42
|
+
|
|
43
|
+
// Convert the instance to a JSON string
|
|
44
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
45
|
+
console.log(exampleJSON)
|
|
46
|
+
|
|
47
|
+
// Parse the JSON string back to an object
|
|
48
|
+
const exampleParsed = JSON.parse(exampleJSON) as PortalUserFieldDefinition
|
|
49
|
+
console.log(exampleParsed)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
53
|
+
|
|
54
|
+
|