@easyedu/js-lsm-api 1.101.0 → 1.103.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 +14 -0
- package/README.md +12 -3
- package/dist/apis/ContentLibraryQuizApi.d.ts +3 -2
- package/dist/apis/ContentLibraryQuizApi.js +5 -2
- package/dist/apis/CourseApi.d.ts +38 -0
- package/dist/apis/CourseApi.js +101 -0
- package/dist/esm/apis/ContentLibraryQuizApi.d.ts +3 -2
- package/dist/esm/apis/ContentLibraryQuizApi.js +5 -2
- package/dist/esm/apis/CourseApi.d.ts +38 -0
- package/dist/esm/apis/CourseApi.js +101 -0
- package/dist/esm/models/CourseProgressionMode.d.ts +25 -0
- package/dist/esm/models/CourseProgressionMode.js +43 -0
- package/dist/esm/models/GetCourseVersion.d.ts +7 -0
- package/dist/esm/models/GetCourseVersion.js +5 -0
- package/dist/esm/models/GetCourseVersionItem.d.ts +6 -0
- package/dist/esm/models/GetCourseVersionItem.js +4 -0
- package/dist/esm/models/GetCourseVersionItemProgression.d.ts +105 -0
- package/dist/esm/models/GetCourseVersionItemProgression.js +92 -0
- package/dist/esm/models/GetCourseVersionItemSession.d.ts +37 -1
- package/dist/esm/models/GetCourseVersionItemSession.js +24 -0
- package/dist/esm/models/GetCourseVersionProgression.d.ts +59 -0
- package/dist/esm/models/GetCourseVersionProgression.js +62 -0
- package/dist/esm/models/GetCourseVersionSectionProgression.d.ts +75 -0
- package/dist/esm/models/GetCourseVersionSectionProgression.js +72 -0
- package/dist/esm/models/GetResourceSession.d.ts +36 -0
- package/dist/esm/models/GetResourceSession.js +24 -0
- package/dist/esm/models/PostCourseVersionItem.d.ts +6 -0
- package/dist/esm/models/PostCourseVersionItem.js +2 -0
- package/dist/esm/models/PostCourseVersionItemSession.d.ts +1 -1
- package/dist/esm/models/ProgressionGateError.d.ts +76 -0
- package/dist/esm/models/ProgressionGateError.js +74 -0
- package/dist/esm/models/ProgressionLockReason.d.ts +24 -0
- package/dist/esm/models/ProgressionLockReason.js +42 -0
- package/dist/esm/models/PutCourseVersionDraft.d.ts +33 -0
- package/dist/esm/models/PutCourseVersionDraft.js +44 -0
- package/dist/esm/models/PutCourseVersionItem.d.ts +6 -0
- package/dist/esm/models/PutCourseVersionItem.js +2 -0
- package/dist/esm/models/PutResourceSessionOverride.d.ts +6 -0
- package/dist/esm/models/PutResourceSessionOverride.js +2 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -0
- package/dist/models/CourseProgressionMode.d.ts +25 -0
- package/dist/models/CourseProgressionMode.js +51 -0
- package/dist/models/GetCourseVersion.d.ts +7 -0
- package/dist/models/GetCourseVersion.js +5 -0
- package/dist/models/GetCourseVersionItem.d.ts +6 -0
- package/dist/models/GetCourseVersionItem.js +4 -0
- package/dist/models/GetCourseVersionItemProgression.d.ts +105 -0
- package/dist/models/GetCourseVersionItemProgression.js +99 -0
- package/dist/models/GetCourseVersionItemSession.d.ts +37 -1
- package/dist/models/GetCourseVersionItemSession.js +24 -0
- package/dist/models/GetCourseVersionProgression.d.ts +59 -0
- package/dist/models/GetCourseVersionProgression.js +69 -0
- package/dist/models/GetCourseVersionSectionProgression.d.ts +75 -0
- package/dist/models/GetCourseVersionSectionProgression.js +79 -0
- package/dist/models/GetResourceSession.d.ts +36 -0
- package/dist/models/GetResourceSession.js +24 -0
- package/dist/models/PostCourseVersionItem.d.ts +6 -0
- package/dist/models/PostCourseVersionItem.js +2 -0
- package/dist/models/PostCourseVersionItemSession.d.ts +1 -1
- package/dist/models/ProgressionGateError.d.ts +76 -0
- package/dist/models/ProgressionGateError.js +82 -0
- package/dist/models/ProgressionLockReason.d.ts +24 -0
- package/dist/models/ProgressionLockReason.js +50 -0
- package/dist/models/PutCourseVersionDraft.d.ts +33 -0
- package/dist/models/PutCourseVersionDraft.js +51 -0
- package/dist/models/PutCourseVersionItem.d.ts +6 -0
- package/dist/models/PutCourseVersionItem.js +2 -0
- package/dist/models/PutResourceSessionOverride.d.ts +6 -0
- package/dist/models/PutResourceSessionOverride.js +2 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/docs/ContentLibraryQuizApi.md +7 -4
- package/docs/CourseApi.md +158 -4
- package/docs/CourseProgressionMode.md +33 -0
- package/docs/GetCourseVersion.md +2 -0
- package/docs/GetCourseVersionItem.md +2 -0
- package/docs/GetCourseVersionItemProgression.md +58 -0
- package/docs/GetCourseVersionItemSession.md +12 -0
- package/docs/GetCourseVersionProgression.md +43 -0
- package/docs/GetCourseVersionSectionProgression.md +48 -0
- package/docs/GetResourceSession.md +12 -0
- package/docs/PlayerApi.md +1 -0
- package/docs/PostCourseVersionItem.md +2 -0
- package/docs/PostCourseVersionItemSession.md +1 -1
- package/docs/ProgressionGateError.md +47 -0
- package/docs/ProgressionLockReason.md +32 -0
- package/docs/PutCourseVersionDraft.md +34 -0
- package/docs/PutCourseVersionItem.md +2 -0
- package/docs/PutResourceSessionOverride.md +2 -0
- package/package.json +1 -1
- package/src/apis/ContentLibraryQuizApi.ts +7 -2
- package/src/apis/CourseApi.ts +153 -0
- package/src/apis/PlayerApi.ts +5 -0
- package/src/models/CourseProgressionMode.ts +53 -0
- package/src/models/GetCourseVersion.ts +16 -0
- package/src/models/GetCourseVersionItem.ts +9 -0
- package/src/models/GetCourseVersionItemProgression.ts +184 -0
- package/src/models/GetCourseVersionItemSession.ts +55 -1
- package/src/models/GetCourseVersionProgression.ts +126 -0
- package/src/models/GetCourseVersionSectionProgression.ts +139 -0
- package/src/models/GetResourceSession.ts +54 -0
- package/src/models/PostCourseVersionItem.ts +8 -0
- package/src/models/PostCourseVersionItemSession.ts +1 -1
- package/src/models/ProgressionGateError.ts +131 -0
- package/src/models/ProgressionLockReason.ts +52 -0
- package/src/models/PutCourseVersionDraft.ts +76 -0
- package/src/models/PutCourseVersionItem.ts +8 -0
- package/src/models/PutResourceSessionOverride.ts +8 -0
- package/src/models/index.ts +7 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
# GetCourseVersionSectionProgression
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`sectionId` | string
|
|
10
|
+
`rootSectionId` | string
|
|
11
|
+
`isRootSection` | boolean
|
|
12
|
+
`isComplete` | boolean
|
|
13
|
+
`isLocked` | boolean
|
|
14
|
+
`lockReason` | [ProgressionLockReason](ProgressionLockReason.md)
|
|
15
|
+
`blockingSectionId` | string
|
|
16
|
+
`blockingItemIds` | Array<string>
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { GetCourseVersionSectionProgression } from '@easyedu/js-lsm-api'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"sectionId": null,
|
|
26
|
+
"rootSectionId": null,
|
|
27
|
+
"isRootSection": null,
|
|
28
|
+
"isComplete": null,
|
|
29
|
+
"isLocked": null,
|
|
30
|
+
"lockReason": null,
|
|
31
|
+
"blockingSectionId": null,
|
|
32
|
+
"blockingItemIds": null,
|
|
33
|
+
} satisfies GetCourseVersionSectionProgression
|
|
34
|
+
|
|
35
|
+
console.log(example)
|
|
36
|
+
|
|
37
|
+
// Convert the instance to a JSON string
|
|
38
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
39
|
+
console.log(exampleJSON)
|
|
40
|
+
|
|
41
|
+
// Parse the JSON string back to an object
|
|
42
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetCourseVersionSectionProgression
|
|
43
|
+
console.log(exampleParsed)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
47
|
+
|
|
48
|
+
|
|
@@ -30,6 +30,12 @@ Name | Type
|
|
|
30
30
|
`gradeStatus` | string
|
|
31
31
|
`scoreRaw` | number
|
|
32
32
|
`durationSeconds` | number
|
|
33
|
+
`minimumActiveSeconds` | number
|
|
34
|
+
`accumulatedActiveSeconds` | number
|
|
35
|
+
`remainingActiveSeconds` | number
|
|
36
|
+
`timeRequirementMet` | boolean
|
|
37
|
+
`timeRequirementWaived` | boolean
|
|
38
|
+
`effectiveCompletionMet` | boolean
|
|
33
39
|
`initializedAt` | number
|
|
34
40
|
`terminatedAt` | number
|
|
35
41
|
`createdAt` | number
|
|
@@ -66,6 +72,12 @@ const example = {
|
|
|
66
72
|
"gradeStatus": null,
|
|
67
73
|
"scoreRaw": null,
|
|
68
74
|
"durationSeconds": null,
|
|
75
|
+
"minimumActiveSeconds": null,
|
|
76
|
+
"accumulatedActiveSeconds": null,
|
|
77
|
+
"remainingActiveSeconds": null,
|
|
78
|
+
"timeRequirementMet": null,
|
|
79
|
+
"timeRequirementWaived": null,
|
|
80
|
+
"effectiveCompletionMet": null,
|
|
69
81
|
"initializedAt": null,
|
|
70
82
|
"terminatedAt": null,
|
|
71
83
|
"createdAt": null,
|
package/docs/PlayerApi.md
CHANGED
|
@@ -1181,6 +1181,7 @@ No authorization required
|
|
|
1181
1181
|
|-------------|-------------|------------------|
|
|
1182
1182
|
| **200** | Completed resource session | - |
|
|
1183
1183
|
| **400** | SCORM sessions complete through their runtime | - |
|
|
1184
|
+
| **409** | Minimum active time has not elapsed | - |
|
|
1184
1185
|
|
|
1185
1186
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1186
1187
|
|
|
@@ -12,6 +12,7 @@ Name | Type
|
|
|
12
12
|
`position` | number
|
|
13
13
|
`isVisible` | boolean
|
|
14
14
|
`isRequired` | boolean
|
|
15
|
+
`minimumActiveSeconds` | number
|
|
15
16
|
`launchMode` | [ContentLaunchMode](ContentLaunchMode.md)
|
|
16
17
|
`maxAttempts` | number
|
|
17
18
|
`scoreRollupStrategy` | string
|
|
@@ -30,6 +31,7 @@ const example = {
|
|
|
30
31
|
"position": null,
|
|
31
32
|
"isVisible": null,
|
|
32
33
|
"isRequired": null,
|
|
34
|
+
"minimumActiveSeconds": null,
|
|
33
35
|
"launchMode": null,
|
|
34
36
|
"maxAttempts": null,
|
|
35
37
|
"scoreRollupStrategy": null,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
# ProgressionGateError
|
|
3
|
+
|
|
4
|
+
Structured detail explaining why learner progression is currently blocked.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`code` | string
|
|
11
|
+
`message` | string
|
|
12
|
+
`blockingSectionId` | string
|
|
13
|
+
`blockingItemIds` | Array<string>
|
|
14
|
+
`minimumActiveSeconds` | number
|
|
15
|
+
`activeSeconds` | number
|
|
16
|
+
`remainingActiveSeconds` | number
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { ProgressionGateError } from '@easyedu/js-lsm-api'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"code": null,
|
|
26
|
+
"message": null,
|
|
27
|
+
"blockingSectionId": null,
|
|
28
|
+
"blockingItemIds": null,
|
|
29
|
+
"minimumActiveSeconds": null,
|
|
30
|
+
"activeSeconds": null,
|
|
31
|
+
"remainingActiveSeconds": null,
|
|
32
|
+
} satisfies ProgressionGateError
|
|
33
|
+
|
|
34
|
+
console.log(example)
|
|
35
|
+
|
|
36
|
+
// Convert the instance to a JSON string
|
|
37
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
38
|
+
console.log(exampleJSON)
|
|
39
|
+
|
|
40
|
+
// Parse the JSON string back to an object
|
|
41
|
+
const exampleParsed = JSON.parse(exampleJSON) as ProgressionGateError
|
|
42
|
+
console.log(exampleParsed)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
46
|
+
|
|
47
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
# ProgressionLockReason
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import type { ProgressionLockReason } from '@easyedu/js-lsm-api'
|
|
14
|
+
|
|
15
|
+
// TODO: Update the object below with actual values
|
|
16
|
+
const example = {
|
|
17
|
+
} satisfies ProgressionLockReason
|
|
18
|
+
|
|
19
|
+
console.log(example)
|
|
20
|
+
|
|
21
|
+
// Convert the instance to a JSON string
|
|
22
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
23
|
+
console.log(exampleJSON)
|
|
24
|
+
|
|
25
|
+
// Parse the JSON string back to an object
|
|
26
|
+
const exampleParsed = JSON.parse(exampleJSON) as ProgressionLockReason
|
|
27
|
+
console.log(exampleParsed)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
31
|
+
|
|
32
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# PutCourseVersionDraft
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`progressionMode` | [CourseProgressionMode](CourseProgressionMode.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { PutCourseVersionDraft } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"progressionMode": null,
|
|
19
|
+
} satisfies PutCourseVersionDraft
|
|
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 PutCourseVersionDraft
|
|
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
|
+
|
|
@@ -12,6 +12,7 @@ Name | Type
|
|
|
12
12
|
`position` | number
|
|
13
13
|
`isVisible` | boolean
|
|
14
14
|
`isRequired` | boolean
|
|
15
|
+
`minimumActiveSeconds` | number
|
|
15
16
|
`launchMode` | [ContentLaunchMode](ContentLaunchMode.md)
|
|
16
17
|
`maxAttempts` | number
|
|
17
18
|
`scoreRollupStrategy` | string
|
|
@@ -30,6 +31,7 @@ const example = {
|
|
|
30
31
|
"position": null,
|
|
31
32
|
"isVisible": null,
|
|
32
33
|
"isRequired": null,
|
|
34
|
+
"minimumActiveSeconds": null,
|
|
33
35
|
"launchMode": null,
|
|
34
36
|
"maxAttempts": null,
|
|
35
37
|
"scoreRollupStrategy": null,
|
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`completionStatus` | string
|
|
11
11
|
`gradeStatus` | string
|
|
12
12
|
`scoreRaw` | number
|
|
13
|
+
`waiveMinimumActiveTime` | boolean
|
|
13
14
|
`reason` | string
|
|
14
15
|
|
|
15
16
|
## Example
|
|
@@ -22,6 +23,7 @@ const example = {
|
|
|
22
23
|
"completionStatus": null,
|
|
23
24
|
"gradeStatus": null,
|
|
24
25
|
"scoreRaw": null,
|
|
26
|
+
"waiveMinimumActiveTime": null,
|
|
25
27
|
"reason": null,
|
|
26
28
|
} satisfies PutResourceSessionOverride
|
|
27
29
|
|
package/package.json
CHANGED
|
@@ -196,6 +196,7 @@ export interface PostCourseLibraryQuizSessionRequest {
|
|
|
196
196
|
courseId: string;
|
|
197
197
|
courseVersionId: string;
|
|
198
198
|
itemId: string;
|
|
199
|
+
preview?: boolean;
|
|
199
200
|
postCourseLibraryQuizSession?: PostCourseLibraryQuizSession;
|
|
200
201
|
}
|
|
201
202
|
|
|
@@ -888,6 +889,10 @@ export class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
888
889
|
|
|
889
890
|
const queryParameters: any = {};
|
|
890
891
|
|
|
892
|
+
if (requestParameters['preview'] != null) {
|
|
893
|
+
queryParameters['preview'] = requestParameters['preview'];
|
|
894
|
+
}
|
|
895
|
+
|
|
891
896
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
892
897
|
|
|
893
898
|
headerParameters['Content-Type'] = 'application/json';
|
|
@@ -908,7 +913,7 @@ export class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
908
913
|
}
|
|
909
914
|
|
|
910
915
|
/**
|
|
911
|
-
* Start or resume a live attempt for a course-pinned quiz version
|
|
916
|
+
* Start or resume a live or sandbox-preview attempt for a course-pinned quiz version
|
|
912
917
|
*/
|
|
913
918
|
async postCourseLibraryQuizSessionRaw(requestParameters: PostCourseLibraryQuizSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>> {
|
|
914
919
|
const requestOptions = await this.postCourseLibraryQuizSessionRequestOpts(requestParameters);
|
|
@@ -918,7 +923,7 @@ export class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
918
923
|
}
|
|
919
924
|
|
|
920
925
|
/**
|
|
921
|
-
* Start or resume a live attempt for a course-pinned quiz version
|
|
926
|
+
* Start or resume a live or sandbox-preview attempt for a course-pinned quiz version
|
|
922
927
|
*/
|
|
923
928
|
async postCourseLibraryQuizSession(requestParameters: PostCourseLibraryQuizSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession> {
|
|
924
929
|
const response = await this.postCourseLibraryQuizSessionRaw(requestParameters, initOverrides);
|
package/src/apis/CourseApi.ts
CHANGED
|
@@ -78,6 +78,11 @@ import {
|
|
|
78
78
|
GetCourseVersionListFromJSON,
|
|
79
79
|
GetCourseVersionListToJSON,
|
|
80
80
|
} from '../models/GetCourseVersionList';
|
|
81
|
+
import {
|
|
82
|
+
type GetCourseVersionProgression,
|
|
83
|
+
GetCourseVersionProgressionFromJSON,
|
|
84
|
+
GetCourseVersionProgressionToJSON,
|
|
85
|
+
} from '../models/GetCourseVersionProgression';
|
|
81
86
|
import {
|
|
82
87
|
type GetCourseVersionSection,
|
|
83
88
|
GetCourseVersionSectionFromJSON,
|
|
@@ -148,6 +153,11 @@ import {
|
|
|
148
153
|
PostDuplicateFromJSON,
|
|
149
154
|
PostDuplicateToJSON,
|
|
150
155
|
} from '../models/PostDuplicate';
|
|
156
|
+
import {
|
|
157
|
+
type ProgressionGateError,
|
|
158
|
+
ProgressionGateErrorFromJSON,
|
|
159
|
+
ProgressionGateErrorToJSON,
|
|
160
|
+
} from '../models/ProgressionGateError';
|
|
151
161
|
import {
|
|
152
162
|
type PutAttemptAllowance,
|
|
153
163
|
PutAttemptAllowanceFromJSON,
|
|
@@ -163,6 +173,11 @@ import {
|
|
|
163
173
|
PutCourseEnrollmentFromJSON,
|
|
164
174
|
PutCourseEnrollmentToJSON,
|
|
165
175
|
} from '../models/PutCourseEnrollment';
|
|
176
|
+
import {
|
|
177
|
+
type PutCourseVersionDraft,
|
|
178
|
+
PutCourseVersionDraftFromJSON,
|
|
179
|
+
PutCourseVersionDraftToJSON,
|
|
180
|
+
} from '../models/PutCourseVersionDraft';
|
|
166
181
|
import {
|
|
167
182
|
type PutCourseVersionItem,
|
|
168
183
|
PutCourseVersionItemFromJSON,
|
|
@@ -264,18 +279,26 @@ export interface GetCourseListRequest {
|
|
|
264
279
|
export interface GetCourseVersionRequest {
|
|
265
280
|
courseId: string;
|
|
266
281
|
courseVersionId: string;
|
|
282
|
+
preview?: boolean;
|
|
267
283
|
}
|
|
268
284
|
|
|
269
285
|
export interface GetCourseVersionItemLaunchRequest {
|
|
270
286
|
courseId: string;
|
|
271
287
|
courseVersionId: string;
|
|
272
288
|
itemId: string;
|
|
289
|
+
preview?: boolean;
|
|
273
290
|
}
|
|
274
291
|
|
|
275
292
|
export interface GetCourseVersionListRequest {
|
|
276
293
|
courseId: string;
|
|
277
294
|
}
|
|
278
295
|
|
|
296
|
+
export interface GetCourseVersionProgressionRequest {
|
|
297
|
+
courseId: string;
|
|
298
|
+
courseVersionId: string;
|
|
299
|
+
preview?: boolean;
|
|
300
|
+
}
|
|
301
|
+
|
|
279
302
|
export interface PostCourseRequest {
|
|
280
303
|
postCourse: PostCourse;
|
|
281
304
|
}
|
|
@@ -331,6 +354,7 @@ export interface PostCourseVersionItemSessionRequest {
|
|
|
331
354
|
courseId: string;
|
|
332
355
|
courseVersionId: string;
|
|
333
356
|
itemId: string;
|
|
357
|
+
preview?: boolean;
|
|
334
358
|
postCourseVersionItemSession?: PostCourseVersionItemSession;
|
|
335
359
|
}
|
|
336
360
|
|
|
@@ -370,6 +394,11 @@ export interface PutCourseItemLearnerAttemptAllowanceRequest {
|
|
|
370
394
|
putAttemptAllowance: PutAttemptAllowance;
|
|
371
395
|
}
|
|
372
396
|
|
|
397
|
+
export interface PutCourseVersionDraftRequest {
|
|
398
|
+
courseId: string;
|
|
399
|
+
putCourseVersionDraft: PutCourseVersionDraft;
|
|
400
|
+
}
|
|
401
|
+
|
|
373
402
|
export interface PutCourseVersionItemRequest {
|
|
374
403
|
courseId: string;
|
|
375
404
|
sectionId: string;
|
|
@@ -1212,6 +1241,10 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
1212
1241
|
|
|
1213
1242
|
const queryParameters: any = {};
|
|
1214
1243
|
|
|
1244
|
+
if (requestParameters['preview'] != null) {
|
|
1245
|
+
queryParameters['preview'] = requestParameters['preview'];
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1215
1248
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
1216
1249
|
|
|
1217
1250
|
|
|
@@ -1272,6 +1305,10 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
1272
1305
|
|
|
1273
1306
|
const queryParameters: any = {};
|
|
1274
1307
|
|
|
1308
|
+
if (requestParameters['preview'] != null) {
|
|
1309
|
+
queryParameters['preview'] = requestParameters['preview'];
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1275
1312
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
1276
1313
|
|
|
1277
1314
|
|
|
@@ -1351,6 +1388,63 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
1351
1388
|
return await response.value();
|
|
1352
1389
|
}
|
|
1353
1390
|
|
|
1391
|
+
/**
|
|
1392
|
+
* Creates request options for getCourseVersionProgression without sending the request
|
|
1393
|
+
*/
|
|
1394
|
+
async getCourseVersionProgressionRequestOpts(requestParameters: GetCourseVersionProgressionRequest): Promise<runtime.RequestOpts> {
|
|
1395
|
+
if (requestParameters['courseId'] == null) {
|
|
1396
|
+
throw new runtime.RequiredError(
|
|
1397
|
+
'courseId',
|
|
1398
|
+
'Required parameter "courseId" was null or undefined when calling getCourseVersionProgression().'
|
|
1399
|
+
);
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
if (requestParameters['courseVersionId'] == null) {
|
|
1403
|
+
throw new runtime.RequiredError(
|
|
1404
|
+
'courseVersionId',
|
|
1405
|
+
'Required parameter "courseVersionId" was null or undefined when calling getCourseVersionProgression().'
|
|
1406
|
+
);
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
const queryParameters: any = {};
|
|
1410
|
+
|
|
1411
|
+
if (requestParameters['preview'] != null) {
|
|
1412
|
+
queryParameters['preview'] = requestParameters['preview'];
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
let urlPath = `/courses/{courseId}/versions/{courseVersionId}/progression`;
|
|
1419
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
1420
|
+
urlPath = urlPath.replace('{courseVersionId}', encodeURIComponent(String(requestParameters['courseVersionId'])));
|
|
1421
|
+
|
|
1422
|
+
return {
|
|
1423
|
+
path: urlPath,
|
|
1424
|
+
method: 'GET',
|
|
1425
|
+
headers: headerParameters,
|
|
1426
|
+
query: queryParameters,
|
|
1427
|
+
};
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* Get learner-specific completion and section lock state
|
|
1432
|
+
*/
|
|
1433
|
+
async getCourseVersionProgressionRaw(requestParameters: GetCourseVersionProgressionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseVersionProgression>> {
|
|
1434
|
+
const requestOptions = await this.getCourseVersionProgressionRequestOpts(requestParameters);
|
|
1435
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1436
|
+
|
|
1437
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseVersionProgressionFromJSON(jsonValue));
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* Get learner-specific completion and section lock state
|
|
1442
|
+
*/
|
|
1443
|
+
async getCourseVersionProgression(requestParameters: GetCourseVersionProgressionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseVersionProgression> {
|
|
1444
|
+
const response = await this.getCourseVersionProgressionRaw(requestParameters, initOverrides);
|
|
1445
|
+
return await response.value();
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1354
1448
|
/**
|
|
1355
1449
|
* Creates request options for postCourse without sending the request
|
|
1356
1450
|
*/
|
|
@@ -1949,6 +2043,10 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
1949
2043
|
|
|
1950
2044
|
const queryParameters: any = {};
|
|
1951
2045
|
|
|
2046
|
+
if (requestParameters['preview'] != null) {
|
|
2047
|
+
queryParameters['preview'] = requestParameters['preview'];
|
|
2048
|
+
}
|
|
2049
|
+
|
|
1952
2050
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
1953
2051
|
|
|
1954
2052
|
headerParameters['Content-Type'] = 'application/json';
|
|
@@ -2350,6 +2448,61 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
2350
2448
|
return await response.value();
|
|
2351
2449
|
}
|
|
2352
2450
|
|
|
2451
|
+
/**
|
|
2452
|
+
* Creates request options for putCourseVersionDraft without sending the request
|
|
2453
|
+
*/
|
|
2454
|
+
async putCourseVersionDraftRequestOpts(requestParameters: PutCourseVersionDraftRequest): Promise<runtime.RequestOpts> {
|
|
2455
|
+
if (requestParameters['courseId'] == null) {
|
|
2456
|
+
throw new runtime.RequiredError(
|
|
2457
|
+
'courseId',
|
|
2458
|
+
'Required parameter "courseId" was null or undefined when calling putCourseVersionDraft().'
|
|
2459
|
+
);
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
if (requestParameters['putCourseVersionDraft'] == null) {
|
|
2463
|
+
throw new runtime.RequiredError(
|
|
2464
|
+
'putCourseVersionDraft',
|
|
2465
|
+
'Required parameter "putCourseVersionDraft" was null or undefined when calling putCourseVersionDraft().'
|
|
2466
|
+
);
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
const queryParameters: any = {};
|
|
2470
|
+
|
|
2471
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2472
|
+
|
|
2473
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2474
|
+
|
|
2475
|
+
|
|
2476
|
+
let urlPath = `/courses/{courseId}/draft`;
|
|
2477
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
2478
|
+
|
|
2479
|
+
return {
|
|
2480
|
+
path: urlPath,
|
|
2481
|
+
method: 'PUT',
|
|
2482
|
+
headers: headerParameters,
|
|
2483
|
+
query: queryParameters,
|
|
2484
|
+
body: PutCourseVersionDraftToJSON(requestParameters['putCourseVersionDraft']),
|
|
2485
|
+
};
|
|
2486
|
+
}
|
|
2487
|
+
|
|
2488
|
+
/**
|
|
2489
|
+
* Update progression settings on the editable course draft
|
|
2490
|
+
*/
|
|
2491
|
+
async putCourseVersionDraftRaw(requestParameters: PutCourseVersionDraftRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseVersion>> {
|
|
2492
|
+
const requestOptions = await this.putCourseVersionDraftRequestOpts(requestParameters);
|
|
2493
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
2494
|
+
|
|
2495
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseVersionFromJSON(jsonValue));
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
/**
|
|
2499
|
+
* Update progression settings on the editable course draft
|
|
2500
|
+
*/
|
|
2501
|
+
async putCourseVersionDraft(requestParameters: PutCourseVersionDraftRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseVersion> {
|
|
2502
|
+
const response = await this.putCourseVersionDraftRaw(requestParameters, initOverrides);
|
|
2503
|
+
return await response.value();
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2353
2506
|
/**
|
|
2354
2507
|
* Creates request options for putCourseVersionItem without sending the request
|
|
2355
2508
|
*/
|
package/src/apis/PlayerApi.ts
CHANGED
|
@@ -58,6 +58,11 @@ import {
|
|
|
58
58
|
PostResourceSessionActivityEventFromJSON,
|
|
59
59
|
PostResourceSessionActivityEventToJSON,
|
|
60
60
|
} from '../models/PostResourceSessionActivityEvent';
|
|
61
|
+
import {
|
|
62
|
+
type ProgressionGateError,
|
|
63
|
+
ProgressionGateErrorFromJSON,
|
|
64
|
+
ProgressionGateErrorToJSON,
|
|
65
|
+
} from '../models/ProgressionGateError';
|
|
61
66
|
import {
|
|
62
67
|
type PutResourceSessionOverride,
|
|
63
68
|
PutResourceSessionOverrideFromJSON,
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Controls whether top-level course sections unlock freely or in completion order.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const CourseProgressionMode = {
|
|
21
|
+
Free: 'free',
|
|
22
|
+
SequentialSections: 'sequential_sections'
|
|
23
|
+
} as const;
|
|
24
|
+
export type CourseProgressionMode = typeof CourseProgressionMode[keyof typeof CourseProgressionMode];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfCourseProgressionMode(value: any): boolean {
|
|
28
|
+
for (const key in CourseProgressionMode) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(CourseProgressionMode, key)) {
|
|
30
|
+
if (CourseProgressionMode[key as keyof typeof CourseProgressionMode] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function CourseProgressionModeFromJSON(json: any): CourseProgressionMode {
|
|
39
|
+
return CourseProgressionModeFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function CourseProgressionModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CourseProgressionMode {
|
|
43
|
+
return json as CourseProgressionMode;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function CourseProgressionModeToJSON(value?: CourseProgressionMode | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CourseProgressionModeToJSONTyped(value: any, ignoreDiscriminator: boolean): CourseProgressionMode {
|
|
51
|
+
return value as CourseProgressionMode;
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -27,6 +27,13 @@ import {
|
|
|
27
27
|
RichTextDocumentToJSON,
|
|
28
28
|
RichTextDocumentToJSONTyped,
|
|
29
29
|
} from './RichTextDocument';
|
|
30
|
+
import type { CourseProgressionMode } from './CourseProgressionMode';
|
|
31
|
+
import {
|
|
32
|
+
CourseProgressionModeFromJSON,
|
|
33
|
+
CourseProgressionModeFromJSONTyped,
|
|
34
|
+
CourseProgressionModeToJSON,
|
|
35
|
+
CourseProgressionModeToJSONTyped,
|
|
36
|
+
} from './CourseProgressionMode';
|
|
30
37
|
import type { GetCourseVersionSection } from './GetCourseVersionSection';
|
|
31
38
|
import {
|
|
32
39
|
GetCourseVersionSectionFromJSON,
|
|
@@ -89,6 +96,12 @@ export interface GetCourseVersion {
|
|
|
89
96
|
* @memberof GetCourseVersion
|
|
90
97
|
*/
|
|
91
98
|
changeNotes?: string | null;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @type {CourseProgressionMode}
|
|
102
|
+
* @memberof GetCourseVersion
|
|
103
|
+
*/
|
|
104
|
+
progressionMode: CourseProgressionMode;
|
|
92
105
|
/**
|
|
93
106
|
*
|
|
94
107
|
* @type {Array<GetCourseVersionSection>}
|
|
@@ -128,6 +141,7 @@ export function instanceOfGetCourseVersion(value: object): value is GetCourseVer
|
|
|
128
141
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
129
142
|
if (!('description' in value) || value['description'] === undefined) return false;
|
|
130
143
|
if (!('descriptionRich' in value) || value['descriptionRich'] === undefined) return false;
|
|
144
|
+
if (!('progressionMode' in value) || value['progressionMode'] === undefined) return false;
|
|
131
145
|
if (!('sections' in value) || value['sections'] === undefined) return false;
|
|
132
146
|
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
133
147
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
@@ -152,6 +166,7 @@ export function GetCourseVersionFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
152
166
|
'description': json['description'],
|
|
153
167
|
'descriptionRich': RichTextDocumentFromJSON(json['description_rich']),
|
|
154
168
|
'changeNotes': json['change_notes'] == null ? undefined : json['change_notes'],
|
|
169
|
+
'progressionMode': CourseProgressionModeFromJSON(json['progression_mode']),
|
|
155
170
|
'sections': ((json['sections'] as Array<any>).map(GetCourseVersionSectionFromJSON)),
|
|
156
171
|
'createdAt': json['created_at'],
|
|
157
172
|
'updatedAt': json['updated_at'],
|
|
@@ -178,6 +193,7 @@ export function GetCourseVersionToJSONTyped(value?: GetCourseVersion | null, ign
|
|
|
178
193
|
'description': value['description'],
|
|
179
194
|
'description_rich': RichTextDocumentToJSON(value['descriptionRich']),
|
|
180
195
|
'change_notes': value['changeNotes'],
|
|
196
|
+
'progression_mode': CourseProgressionModeToJSON(value['progressionMode']),
|
|
181
197
|
'sections': ((value['sections'] as Array<any>).map(GetCourseVersionSectionToJSON)),
|
|
182
198
|
'created_at': value['createdAt'],
|
|
183
199
|
'updated_at': value['updatedAt'],
|