@easyedu/js-lsm-api 1.99.0 → 1.101.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 +18 -0
- package/README.md +16 -2
- package/dist/apis/ChangelogApi.d.ts +32 -0
- package/dist/apis/ChangelogApi.js +70 -0
- package/dist/apis/ContentLibraryQuizApi.d.ts +17 -0
- package/dist/apis/ContentLibraryQuizApi.js +45 -0
- package/dist/apis/CourseApi.d.ts +60 -0
- package/dist/apis/CourseApi.js +167 -0
- package/dist/apis/PlayerApi.d.ts +17 -0
- package/dist/apis/PlayerApi.js +45 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/ChangelogApi.d.ts +32 -0
- package/dist/esm/apis/ChangelogApi.js +66 -0
- package/dist/esm/apis/ContentLibraryQuizApi.d.ts +17 -0
- package/dist/esm/apis/ContentLibraryQuizApi.js +45 -0
- package/dist/esm/apis/CourseApi.d.ts +60 -0
- package/dist/esm/apis/CourseApi.js +167 -0
- package/dist/esm/apis/PlayerApi.d.ts +17 -0
- package/dist/esm/apis/PlayerApi.js +45 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/GetAttemptAllowance.d.ts +80 -0
- package/dist/esm/models/GetAttemptAllowance.js +75 -0
- package/dist/esm/models/GetChangelogEntry.d.ts +44 -0
- package/dist/esm/models/GetChangelogEntry.js +51 -0
- package/dist/esm/models/GetChangelogList.d.ts +33 -0
- package/dist/esm/models/GetChangelogList.js +44 -0
- package/dist/esm/models/PostClearSessions.d.ts +32 -0
- package/dist/esm/models/PostClearSessions.js +43 -0
- package/dist/esm/models/PostClearSessionsResponse.d.ts +44 -0
- package/dist/esm/models/PostClearSessionsResponse.js +51 -0
- package/dist/esm/models/PutAttemptAllowance.d.ts +38 -0
- package/dist/esm/models/PutAttemptAllowance.js +47 -0
- package/dist/esm/models/PutLibraryQuizSessionOverride.d.ts +57 -0
- package/dist/esm/models/PutLibraryQuizSessionOverride.js +55 -0
- package/dist/esm/models/PutResourceSessionOverride.d.ts +69 -0
- package/dist/esm/models/PutResourceSessionOverride.js +66 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/models/GetAttemptAllowance.d.ts +80 -0
- package/dist/models/GetAttemptAllowance.js +82 -0
- package/dist/models/GetChangelogEntry.d.ts +44 -0
- package/dist/models/GetChangelogEntry.js +58 -0
- package/dist/models/GetChangelogList.d.ts +33 -0
- package/dist/models/GetChangelogList.js +51 -0
- package/dist/models/PostClearSessions.d.ts +32 -0
- package/dist/models/PostClearSessions.js +50 -0
- package/dist/models/PostClearSessionsResponse.d.ts +44 -0
- package/dist/models/PostClearSessionsResponse.js +58 -0
- package/dist/models/PutAttemptAllowance.d.ts +38 -0
- package/dist/models/PutAttemptAllowance.js +54 -0
- package/dist/models/PutLibraryQuizSessionOverride.d.ts +57 -0
- package/dist/models/PutLibraryQuizSessionOverride.js +63 -0
- package/dist/models/PutResourceSessionOverride.d.ts +69 -0
- package/dist/models/PutResourceSessionOverride.js +74 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/docs/ChangelogApi.md +68 -0
- package/docs/ContentLibraryQuizApi.md +71 -0
- package/docs/CourseApi.md +236 -0
- package/docs/GetAttemptAllowance.md +51 -0
- package/docs/GetChangelogEntry.md +39 -0
- package/docs/GetChangelogList.md +34 -0
- package/docs/PlayerApi.md +71 -0
- package/docs/PostClearSessions.md +34 -0
- package/docs/PostClearSessionsResponse.md +38 -0
- package/docs/PutAttemptAllowance.md +36 -0
- package/docs/PutLibraryQuizSessionOverride.md +41 -0
- package/docs/PutResourceSessionOverride.md +41 -0
- package/package.json +1 -1
- package/src/apis/ChangelogApi.ts +66 -0
- package/src/apis/ContentLibraryQuizApi.ts +65 -0
- package/src/apis/CourseApi.ts +270 -0
- package/src/apis/PlayerApi.ts +65 -0
- package/src/apis/index.ts +1 -0
- package/src/models/GetAttemptAllowance.ts +138 -0
- package/src/models/GetChangelogEntry.ts +84 -0
- package/src/models/GetChangelogList.ts +74 -0
- package/src/models/PostClearSessions.ts +66 -0
- package/src/models/PostClearSessionsResponse.ts +84 -0
- package/src/models/PutAttemptAllowance.ts +75 -0
- package/src/models/PutLibraryQuizSessionOverride.ts +100 -0
- package/src/models/PutResourceSessionOverride.ts +113 -0
- package/src/models/index.ts +8 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
# GetAttemptAllowance
|
|
3
|
+
|
|
4
|
+
The effective attempt limit for one learner and course-version item.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`courseId` | string
|
|
11
|
+
`courseVersionId` | string
|
|
12
|
+
`itemId` | string
|
|
13
|
+
`userId` | string
|
|
14
|
+
`baseMaxAttempts` | number
|
|
15
|
+
`additionalAttempts` | number
|
|
16
|
+
`effectiveMaxAttempts` | number
|
|
17
|
+
`attemptsUsed` | number
|
|
18
|
+
`attemptsRemaining` | number
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type { GetAttemptAllowance } from '@easyedu/js-lsm-api'
|
|
24
|
+
|
|
25
|
+
// TODO: Update the object below with actual values
|
|
26
|
+
const example = {
|
|
27
|
+
"courseId": null,
|
|
28
|
+
"courseVersionId": null,
|
|
29
|
+
"itemId": null,
|
|
30
|
+
"userId": null,
|
|
31
|
+
"baseMaxAttempts": null,
|
|
32
|
+
"additionalAttempts": null,
|
|
33
|
+
"effectiveMaxAttempts": null,
|
|
34
|
+
"attemptsUsed": null,
|
|
35
|
+
"attemptsRemaining": null,
|
|
36
|
+
} satisfies GetAttemptAllowance
|
|
37
|
+
|
|
38
|
+
console.log(example)
|
|
39
|
+
|
|
40
|
+
// Convert the instance to a JSON string
|
|
41
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
42
|
+
console.log(exampleJSON)
|
|
43
|
+
|
|
44
|
+
// Parse the JSON string back to an object
|
|
45
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetAttemptAllowance
|
|
46
|
+
console.log(exampleParsed)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
50
|
+
|
|
51
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# GetChangelogEntry
|
|
3
|
+
|
|
4
|
+
A user-facing summary of product changes published on one date.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`title` | string
|
|
11
|
+
`desc` | string
|
|
12
|
+
`date` | Date
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { GetChangelogEntry } from '@easyedu/js-lsm-api'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"title": null,
|
|
22
|
+
"desc": null,
|
|
23
|
+
"date": null,
|
|
24
|
+
} satisfies GetChangelogEntry
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetChangelogEntry
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# GetChangelogList
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`items` | [Array<GetChangelogEntry>](GetChangelogEntry.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { GetChangelogList } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"items": null,
|
|
19
|
+
} satisfies GetChangelogList
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetChangelogList
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
package/docs/PlayerApi.md
CHANGED
|
@@ -20,6 +20,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
20
20
|
| [**initializeResourceScormSession**](PlayerApi.md#initializeresourcescormsession) | **POST** /resource/sessions/{sessionId}/initialize | Initialize a reusable SCORM resource session |
|
|
21
21
|
| [**postResourceSessionActivityEvent**](PlayerApi.md#postresourcesessionactivityevent) | **POST** /resource/sessions/{sessionId}/activities/{activityId}/events | Record learner activity and update active time |
|
|
22
22
|
| [**postResourceSessionComplete**](PlayerApi.md#postresourcesessioncomplete) | **POST** /resource/sessions/{sessionId}/complete | Complete a non-SCORM resource session |
|
|
23
|
+
| [**putResourceSessionOverride**](PlayerApi.md#putresourcesessionoverride) | **PUT** /resource/sessions/{sessionId}/override | Override a learner\'s live resource-session progress |
|
|
23
24
|
| [**setResourceScormValue**](PlayerApi.md#setresourcescormvalue) | **POST** /resource/sessions/{sessionId}/set-value | Store a CMI value in a reusable SCORM resource session |
|
|
24
25
|
| [**terminateResourceScormSession**](PlayerApi.md#terminateresourcescormsession) | **POST** /resource/sessions/{sessionId}/terminate | Terminate a reusable SCORM resource session |
|
|
25
26
|
|
|
@@ -1184,6 +1185,76 @@ No authorization required
|
|
|
1184
1185
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1185
1186
|
|
|
1186
1187
|
|
|
1188
|
+
## putResourceSessionOverride
|
|
1189
|
+
|
|
1190
|
+
> GetResourceSession putResourceSessionOverride(sessionId, putResourceSessionOverride)
|
|
1191
|
+
|
|
1192
|
+
Override a learner\'s live resource-session progress
|
|
1193
|
+
|
|
1194
|
+
### Example
|
|
1195
|
+
|
|
1196
|
+
```ts
|
|
1197
|
+
import {
|
|
1198
|
+
Configuration,
|
|
1199
|
+
PlayerApi,
|
|
1200
|
+
} from '@easyedu/js-lsm-api';
|
|
1201
|
+
import type { PutResourceSessionOverrideRequest } from '@easyedu/js-lsm-api';
|
|
1202
|
+
|
|
1203
|
+
async function example() {
|
|
1204
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1205
|
+
const api = new PlayerApi();
|
|
1206
|
+
|
|
1207
|
+
const body = {
|
|
1208
|
+
// string
|
|
1209
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1210
|
+
// PutResourceSessionOverride
|
|
1211
|
+
putResourceSessionOverride: ...,
|
|
1212
|
+
} satisfies PutResourceSessionOverrideRequest;
|
|
1213
|
+
|
|
1214
|
+
try {
|
|
1215
|
+
const data = await api.putResourceSessionOverride(body);
|
|
1216
|
+
console.log(data);
|
|
1217
|
+
} catch (error) {
|
|
1218
|
+
console.error(error);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
// Run the test
|
|
1223
|
+
example().catch(console.error);
|
|
1224
|
+
```
|
|
1225
|
+
|
|
1226
|
+
### Parameters
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
| Name | Type | Description | Notes |
|
|
1230
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1231
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
1232
|
+
| **putResourceSessionOverride** | [PutResourceSessionOverride](PutResourceSessionOverride.md) | | |
|
|
1233
|
+
|
|
1234
|
+
### Return type
|
|
1235
|
+
|
|
1236
|
+
[**GetResourceSession**](GetResourceSession.md)
|
|
1237
|
+
|
|
1238
|
+
### Authorization
|
|
1239
|
+
|
|
1240
|
+
No authorization required
|
|
1241
|
+
|
|
1242
|
+
### HTTP request headers
|
|
1243
|
+
|
|
1244
|
+
- **Content-Type**: `application/json`
|
|
1245
|
+
- **Accept**: `application/json`
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
### HTTP response details
|
|
1249
|
+
| Status code | Description | Response headers |
|
|
1250
|
+
|-------------|-------------|------------------|
|
|
1251
|
+
| **200** | Updated resource session | - |
|
|
1252
|
+
| **400** | Invalid override values | - |
|
|
1253
|
+
| **404** | Resource session not found | - |
|
|
1254
|
+
|
|
1255
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1256
|
+
|
|
1257
|
+
|
|
1187
1258
|
## setResourceScormValue
|
|
1188
1259
|
|
|
1189
1260
|
> ScormSetValueResponse setResourceScormValue(sessionId, scormSetValueRequest, activityId)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# PostClearSessions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`reason` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { PostClearSessions } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"reason": null,
|
|
19
|
+
} satisfies PostClearSessions
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as PostClearSessions
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# PostClearSessionsResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`resourceSessionsDeleted` | number
|
|
10
|
+
`quizSessionsDeleted` | number
|
|
11
|
+
`totalSessionsDeleted` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { PostClearSessionsResponse } from '@easyedu/js-lsm-api'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"resourceSessionsDeleted": null,
|
|
21
|
+
"quizSessionsDeleted": null,
|
|
22
|
+
"totalSessionsDeleted": null,
|
|
23
|
+
} satisfies PostClearSessionsResponse
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as PostClearSessionsResponse
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# PutAttemptAllowance
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`additionalAttempts` | number
|
|
10
|
+
`reason` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { PutAttemptAllowance } from '@easyedu/js-lsm-api'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"additionalAttempts": null,
|
|
20
|
+
"reason": null,
|
|
21
|
+
} satisfies PutAttemptAllowance
|
|
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 PutAttemptAllowance
|
|
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,41 @@
|
|
|
1
|
+
|
|
2
|
+
# PutLibraryQuizSessionOverride
|
|
3
|
+
|
|
4
|
+
Instructor-entered progress values for an existing live quiz session.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`status` | string
|
|
11
|
+
`scorePercentage` | number
|
|
12
|
+
`passed` | boolean
|
|
13
|
+
`reason` | string
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { PutLibraryQuizSessionOverride } from '@easyedu/js-lsm-api'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"status": null,
|
|
23
|
+
"scorePercentage": null,
|
|
24
|
+
"passed": null,
|
|
25
|
+
"reason": null,
|
|
26
|
+
} satisfies PutLibraryQuizSessionOverride
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as PutLibraryQuizSessionOverride
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# PutResourceSessionOverride
|
|
3
|
+
|
|
4
|
+
Instructor-entered progress values for an existing live resource session.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`completionStatus` | string
|
|
11
|
+
`gradeStatus` | string
|
|
12
|
+
`scoreRaw` | number
|
|
13
|
+
`reason` | string
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { PutResourceSessionOverride } from '@easyedu/js-lsm-api'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"completionStatus": null,
|
|
23
|
+
"gradeStatus": null,
|
|
24
|
+
"scoreRaw": null,
|
|
25
|
+
"reason": null,
|
|
26
|
+
} satisfies PutResourceSessionOverride
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as PutResourceSessionOverride
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
package/package.json
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type GetChangelogList,
|
|
18
|
+
GetChangelogListFromJSON,
|
|
19
|
+
GetChangelogListToJSON,
|
|
20
|
+
} from '../models/GetChangelogList';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export class ChangelogApi extends runtime.BaseAPI {
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Creates request options for getChangelog without sending the request
|
|
29
|
+
*/
|
|
30
|
+
async getChangelogRequestOpts(): Promise<runtime.RequestOpts> {
|
|
31
|
+
const queryParameters: any = {};
|
|
32
|
+
|
|
33
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
let urlPath = `/changelog`;
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
path: urlPath,
|
|
40
|
+
method: 'GET',
|
|
41
|
+
headers: headerParameters,
|
|
42
|
+
query: queryParameters,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Returns the changelog loaded from the server\'s configured changelog file at startup, newest first.
|
|
48
|
+
* List user-facing product updates
|
|
49
|
+
*/
|
|
50
|
+
async getChangelogRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetChangelogList>> {
|
|
51
|
+
const requestOptions = await this.getChangelogRequestOpts();
|
|
52
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
53
|
+
|
|
54
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetChangelogListFromJSON(jsonValue));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Returns the changelog loaded from the server\'s configured changelog file at startup, newest first.
|
|
59
|
+
* List user-facing product updates
|
|
60
|
+
*/
|
|
61
|
+
async getChangelog(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetChangelogList> {
|
|
62
|
+
const response = await this.getChangelogRaw(initOverrides);
|
|
63
|
+
return await response.value();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
}
|
|
@@ -113,6 +113,11 @@ import {
|
|
|
113
113
|
PutLibraryQuizSessionGradeFromJSON,
|
|
114
114
|
PutLibraryQuizSessionGradeToJSON,
|
|
115
115
|
} from '../models/PutLibraryQuizSessionGrade';
|
|
116
|
+
import {
|
|
117
|
+
type PutLibraryQuizSessionOverride,
|
|
118
|
+
PutLibraryQuizSessionOverrideFromJSON,
|
|
119
|
+
PutLibraryQuizSessionOverrideToJSON,
|
|
120
|
+
} from '../models/PutLibraryQuizSessionOverride';
|
|
116
121
|
import {
|
|
117
122
|
type PutLibraryQuizVersion,
|
|
118
123
|
PutLibraryQuizVersionFromJSON,
|
|
@@ -262,6 +267,11 @@ export interface PutLibraryQuizSessionGradeRequest {
|
|
|
262
267
|
putLibraryQuizSessionGrade: PutLibraryQuizSessionGrade;
|
|
263
268
|
}
|
|
264
269
|
|
|
270
|
+
export interface PutLibraryQuizSessionOverrideRequest {
|
|
271
|
+
sessionId: string;
|
|
272
|
+
putLibraryQuizSessionOverride: PutLibraryQuizSessionOverride;
|
|
273
|
+
}
|
|
274
|
+
|
|
265
275
|
export interface PutLibraryQuizVersionRequest {
|
|
266
276
|
quizId: string;
|
|
267
277
|
versionId: string;
|
|
@@ -1632,6 +1642,61 @@ export class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
1632
1642
|
return await response.value();
|
|
1633
1643
|
}
|
|
1634
1644
|
|
|
1645
|
+
/**
|
|
1646
|
+
* Creates request options for putLibraryQuizSessionOverride without sending the request
|
|
1647
|
+
*/
|
|
1648
|
+
async putLibraryQuizSessionOverrideRequestOpts(requestParameters: PutLibraryQuizSessionOverrideRequest): Promise<runtime.RequestOpts> {
|
|
1649
|
+
if (requestParameters['sessionId'] == null) {
|
|
1650
|
+
throw new runtime.RequiredError(
|
|
1651
|
+
'sessionId',
|
|
1652
|
+
'Required parameter "sessionId" was null or undefined when calling putLibraryQuizSessionOverride().'
|
|
1653
|
+
);
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
if (requestParameters['putLibraryQuizSessionOverride'] == null) {
|
|
1657
|
+
throw new runtime.RequiredError(
|
|
1658
|
+
'putLibraryQuizSessionOverride',
|
|
1659
|
+
'Required parameter "putLibraryQuizSessionOverride" was null or undefined when calling putLibraryQuizSessionOverride().'
|
|
1660
|
+
);
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
const queryParameters: any = {};
|
|
1664
|
+
|
|
1665
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1666
|
+
|
|
1667
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1668
|
+
|
|
1669
|
+
|
|
1670
|
+
let urlPath = `/quiz/sessions/{sessionId}/override`;
|
|
1671
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
1672
|
+
|
|
1673
|
+
return {
|
|
1674
|
+
path: urlPath,
|
|
1675
|
+
method: 'PUT',
|
|
1676
|
+
headers: headerParameters,
|
|
1677
|
+
query: queryParameters,
|
|
1678
|
+
body: PutLibraryQuizSessionOverrideToJSON(requestParameters['putLibraryQuizSessionOverride']),
|
|
1679
|
+
};
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
/**
|
|
1683
|
+
* Override a learner\'s live quiz-session progress
|
|
1684
|
+
*/
|
|
1685
|
+
async putLibraryQuizSessionOverrideRaw(requestParameters: PutLibraryQuizSessionOverrideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>> {
|
|
1686
|
+
const requestOptions = await this.putLibraryQuizSessionOverrideRequestOpts(requestParameters);
|
|
1687
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1688
|
+
|
|
1689
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizSessionFromJSON(jsonValue));
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
/**
|
|
1693
|
+
* Override a learner\'s live quiz-session progress
|
|
1694
|
+
*/
|
|
1695
|
+
async putLibraryQuizSessionOverride(requestParameters: PutLibraryQuizSessionOverrideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession> {
|
|
1696
|
+
const response = await this.putLibraryQuizSessionOverrideRaw(requestParameters, initOverrides);
|
|
1697
|
+
return await response.value();
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1635
1700
|
/**
|
|
1636
1701
|
* Creates request options for putLibraryQuizVersion without sending the request
|
|
1637
1702
|
*/
|