@easyedu/js-lsm-api 1.101.0 → 1.102.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 +11 -2
- package/dist/apis/CourseApi.d.ts +34 -0
- package/dist/apis/CourseApi.js +89 -0
- package/dist/esm/apis/CourseApi.d.ts +34 -0
- package/dist/esm/apis/CourseApi.js +89 -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/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/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/CourseApi.md +143 -1
- 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/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/CourseApi.ts +133 -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/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
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,
|
|
@@ -276,6 +291,11 @@ export interface GetCourseVersionListRequest {
|
|
|
276
291
|
courseId: string;
|
|
277
292
|
}
|
|
278
293
|
|
|
294
|
+
export interface GetCourseVersionProgressionRequest {
|
|
295
|
+
courseId: string;
|
|
296
|
+
courseVersionId: string;
|
|
297
|
+
}
|
|
298
|
+
|
|
279
299
|
export interface PostCourseRequest {
|
|
280
300
|
postCourse: PostCourse;
|
|
281
301
|
}
|
|
@@ -370,6 +390,11 @@ export interface PutCourseItemLearnerAttemptAllowanceRequest {
|
|
|
370
390
|
putAttemptAllowance: PutAttemptAllowance;
|
|
371
391
|
}
|
|
372
392
|
|
|
393
|
+
export interface PutCourseVersionDraftRequest {
|
|
394
|
+
courseId: string;
|
|
395
|
+
putCourseVersionDraft: PutCourseVersionDraft;
|
|
396
|
+
}
|
|
397
|
+
|
|
373
398
|
export interface PutCourseVersionItemRequest {
|
|
374
399
|
courseId: string;
|
|
375
400
|
sectionId: string;
|
|
@@ -1351,6 +1376,59 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
1351
1376
|
return await response.value();
|
|
1352
1377
|
}
|
|
1353
1378
|
|
|
1379
|
+
/**
|
|
1380
|
+
* Creates request options for getCourseVersionProgression without sending the request
|
|
1381
|
+
*/
|
|
1382
|
+
async getCourseVersionProgressionRequestOpts(requestParameters: GetCourseVersionProgressionRequest): Promise<runtime.RequestOpts> {
|
|
1383
|
+
if (requestParameters['courseId'] == null) {
|
|
1384
|
+
throw new runtime.RequiredError(
|
|
1385
|
+
'courseId',
|
|
1386
|
+
'Required parameter "courseId" was null or undefined when calling getCourseVersionProgression().'
|
|
1387
|
+
);
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
if (requestParameters['courseVersionId'] == null) {
|
|
1391
|
+
throw new runtime.RequiredError(
|
|
1392
|
+
'courseVersionId',
|
|
1393
|
+
'Required parameter "courseVersionId" was null or undefined when calling getCourseVersionProgression().'
|
|
1394
|
+
);
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
const queryParameters: any = {};
|
|
1398
|
+
|
|
1399
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
let urlPath = `/courses/{courseId}/versions/{courseVersionId}/progression`;
|
|
1403
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
1404
|
+
urlPath = urlPath.replace('{courseVersionId}', encodeURIComponent(String(requestParameters['courseVersionId'])));
|
|
1405
|
+
|
|
1406
|
+
return {
|
|
1407
|
+
path: urlPath,
|
|
1408
|
+
method: 'GET',
|
|
1409
|
+
headers: headerParameters,
|
|
1410
|
+
query: queryParameters,
|
|
1411
|
+
};
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
/**
|
|
1415
|
+
* Get learner-specific completion and section lock state
|
|
1416
|
+
*/
|
|
1417
|
+
async getCourseVersionProgressionRaw(requestParameters: GetCourseVersionProgressionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseVersionProgression>> {
|
|
1418
|
+
const requestOptions = await this.getCourseVersionProgressionRequestOpts(requestParameters);
|
|
1419
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1420
|
+
|
|
1421
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseVersionProgressionFromJSON(jsonValue));
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
/**
|
|
1425
|
+
* Get learner-specific completion and section lock state
|
|
1426
|
+
*/
|
|
1427
|
+
async getCourseVersionProgression(requestParameters: GetCourseVersionProgressionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseVersionProgression> {
|
|
1428
|
+
const response = await this.getCourseVersionProgressionRaw(requestParameters, initOverrides);
|
|
1429
|
+
return await response.value();
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1354
1432
|
/**
|
|
1355
1433
|
* Creates request options for postCourse without sending the request
|
|
1356
1434
|
*/
|
|
@@ -2350,6 +2428,61 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
2350
2428
|
return await response.value();
|
|
2351
2429
|
}
|
|
2352
2430
|
|
|
2431
|
+
/**
|
|
2432
|
+
* Creates request options for putCourseVersionDraft without sending the request
|
|
2433
|
+
*/
|
|
2434
|
+
async putCourseVersionDraftRequestOpts(requestParameters: PutCourseVersionDraftRequest): Promise<runtime.RequestOpts> {
|
|
2435
|
+
if (requestParameters['courseId'] == null) {
|
|
2436
|
+
throw new runtime.RequiredError(
|
|
2437
|
+
'courseId',
|
|
2438
|
+
'Required parameter "courseId" was null or undefined when calling putCourseVersionDraft().'
|
|
2439
|
+
);
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
if (requestParameters['putCourseVersionDraft'] == null) {
|
|
2443
|
+
throw new runtime.RequiredError(
|
|
2444
|
+
'putCourseVersionDraft',
|
|
2445
|
+
'Required parameter "putCourseVersionDraft" was null or undefined when calling putCourseVersionDraft().'
|
|
2446
|
+
);
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
const queryParameters: any = {};
|
|
2450
|
+
|
|
2451
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2452
|
+
|
|
2453
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2454
|
+
|
|
2455
|
+
|
|
2456
|
+
let urlPath = `/courses/{courseId}/draft`;
|
|
2457
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
2458
|
+
|
|
2459
|
+
return {
|
|
2460
|
+
path: urlPath,
|
|
2461
|
+
method: 'PUT',
|
|
2462
|
+
headers: headerParameters,
|
|
2463
|
+
query: queryParameters,
|
|
2464
|
+
body: PutCourseVersionDraftToJSON(requestParameters['putCourseVersionDraft']),
|
|
2465
|
+
};
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
/**
|
|
2469
|
+
* Update progression settings on the editable course draft
|
|
2470
|
+
*/
|
|
2471
|
+
async putCourseVersionDraftRaw(requestParameters: PutCourseVersionDraftRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseVersion>> {
|
|
2472
|
+
const requestOptions = await this.putCourseVersionDraftRequestOpts(requestParameters);
|
|
2473
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
2474
|
+
|
|
2475
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseVersionFromJSON(jsonValue));
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
/**
|
|
2479
|
+
* Update progression settings on the editable course draft
|
|
2480
|
+
*/
|
|
2481
|
+
async putCourseVersionDraft(requestParameters: PutCourseVersionDraftRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseVersion> {
|
|
2482
|
+
const response = await this.putCourseVersionDraftRaw(requestParameters, initOverrides);
|
|
2483
|
+
return await response.value();
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2353
2486
|
/**
|
|
2354
2487
|
* Creates request options for putCourseVersionItem without sending the request
|
|
2355
2488
|
*/
|
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'],
|
|
@@ -99,6 +99,12 @@ export interface GetCourseVersionItem {
|
|
|
99
99
|
* @memberof GetCourseVersionItem
|
|
100
100
|
*/
|
|
101
101
|
isRequired: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Minimum cumulative active time required for this resource placement. Null disables the timer.
|
|
104
|
+
* @type {number}
|
|
105
|
+
* @memberof GetCourseVersionItem
|
|
106
|
+
*/
|
|
107
|
+
minimumActiveSeconds: number | null;
|
|
102
108
|
/**
|
|
103
109
|
*
|
|
104
110
|
* @type {ContentLaunchMode}
|
|
@@ -159,6 +165,7 @@ export function instanceOfGetCourseVersionItem(value: object): value is GetCours
|
|
|
159
165
|
if (!('displayOrder' in value) || value['displayOrder'] === undefined) return false;
|
|
160
166
|
if (!('isVisible' in value) || value['isVisible'] === undefined) return false;
|
|
161
167
|
if (!('isRequired' in value) || value['isRequired'] === undefined) return false;
|
|
168
|
+
if (!('minimumActiveSeconds' in value) || value['minimumActiveSeconds'] === undefined) return false;
|
|
162
169
|
if (!('launchMode' in value) || value['launchMode'] === undefined) return false;
|
|
163
170
|
if (!('maxAttempts' in value) || value['maxAttempts'] === undefined) return false;
|
|
164
171
|
if (!('scoreRollupStrategy' in value) || value['scoreRollupStrategy'] === undefined) return false;
|
|
@@ -188,6 +195,7 @@ export function GetCourseVersionItemFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
188
195
|
'displayOrder': json['display_order'],
|
|
189
196
|
'isVisible': json['is_visible'],
|
|
190
197
|
'isRequired': json['is_required'],
|
|
198
|
+
'minimumActiveSeconds': json['minimum_active_seconds'],
|
|
191
199
|
'launchMode': ContentLaunchModeFromJSON(json['launch_mode']),
|
|
192
200
|
'maxAttempts': json['max_attempts'],
|
|
193
201
|
'scoreRollupStrategy': json['score_rollup_strategy'],
|
|
@@ -218,6 +226,7 @@ export function GetCourseVersionItemToJSONTyped(value?: GetCourseVersionItem | n
|
|
|
218
226
|
'display_order': value['displayOrder'],
|
|
219
227
|
'is_visible': value['isVisible'],
|
|
220
228
|
'is_required': value['isRequired'],
|
|
229
|
+
'minimum_active_seconds': value['minimumActiveSeconds'],
|
|
221
230
|
'launch_mode': ContentLaunchModeToJSON(value['launchMode']),
|
|
222
231
|
'max_attempts': value['maxAttempts'],
|
|
223
232
|
'score_rollup_strategy': value['scoreRollupStrategy'],
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ProgressionLockReason } from './ProgressionLockReason';
|
|
17
|
+
import {
|
|
18
|
+
ProgressionLockReasonFromJSON,
|
|
19
|
+
ProgressionLockReasonFromJSONTyped,
|
|
20
|
+
ProgressionLockReasonToJSON,
|
|
21
|
+
ProgressionLockReasonToJSONTyped,
|
|
22
|
+
} from './ProgressionLockReason';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface GetCourseVersionItemProgression
|
|
28
|
+
*/
|
|
29
|
+
export interface GetCourseVersionItemProgression {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof GetCourseVersionItemProgression
|
|
34
|
+
*/
|
|
35
|
+
itemId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof GetCourseVersionItemProgression
|
|
40
|
+
*/
|
|
41
|
+
rootSectionId: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof GetCourseVersionItemProgression
|
|
46
|
+
*/
|
|
47
|
+
isRequired: boolean;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof GetCourseVersionItemProgression
|
|
52
|
+
*/
|
|
53
|
+
isLocked: boolean;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {ProgressionLockReason}
|
|
57
|
+
* @memberof GetCourseVersionItemProgression
|
|
58
|
+
*/
|
|
59
|
+
lockReason: ProgressionLockReason | null;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof GetCourseVersionItemProgression
|
|
64
|
+
*/
|
|
65
|
+
blockingSectionId: string | null;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {boolean}
|
|
69
|
+
* @memberof GetCourseVersionItemProgression
|
|
70
|
+
*/
|
|
71
|
+
nativeCompleted: boolean;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
* @memberof GetCourseVersionItemProgression
|
|
76
|
+
*/
|
|
77
|
+
effectiveCompleted: boolean;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {number}
|
|
81
|
+
* @memberof GetCourseVersionItemProgression
|
|
82
|
+
*/
|
|
83
|
+
activeSeconds: number;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {number}
|
|
87
|
+
* @memberof GetCourseVersionItemProgression
|
|
88
|
+
*/
|
|
89
|
+
minimumActiveSeconds: number | null;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {number}
|
|
93
|
+
* @memberof GetCourseVersionItemProgression
|
|
94
|
+
*/
|
|
95
|
+
remainingActiveSeconds: number;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {boolean}
|
|
99
|
+
* @memberof GetCourseVersionItemProgression
|
|
100
|
+
*/
|
|
101
|
+
timeRequirementMet: boolean;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof GetCourseVersionItemProgression
|
|
106
|
+
*/
|
|
107
|
+
timeRequirementWaived: boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Check if a given object implements the GetCourseVersionItemProgression interface.
|
|
114
|
+
*/
|
|
115
|
+
export function instanceOfGetCourseVersionItemProgression(value: object): value is GetCourseVersionItemProgression {
|
|
116
|
+
if (!('itemId' in value) || value['itemId'] === undefined) return false;
|
|
117
|
+
if (!('rootSectionId' in value) || value['rootSectionId'] === undefined) return false;
|
|
118
|
+
if (!('isRequired' in value) || value['isRequired'] === undefined) return false;
|
|
119
|
+
if (!('isLocked' in value) || value['isLocked'] === undefined) return false;
|
|
120
|
+
if (!('lockReason' in value) || value['lockReason'] === undefined) return false;
|
|
121
|
+
if (!('blockingSectionId' in value) || value['blockingSectionId'] === undefined) return false;
|
|
122
|
+
if (!('nativeCompleted' in value) || value['nativeCompleted'] === undefined) return false;
|
|
123
|
+
if (!('effectiveCompleted' in value) || value['effectiveCompleted'] === undefined) return false;
|
|
124
|
+
if (!('activeSeconds' in value) || value['activeSeconds'] === undefined) return false;
|
|
125
|
+
if (!('minimumActiveSeconds' in value) || value['minimumActiveSeconds'] === undefined) return false;
|
|
126
|
+
if (!('remainingActiveSeconds' in value) || value['remainingActiveSeconds'] === undefined) return false;
|
|
127
|
+
if (!('timeRequirementMet' in value) || value['timeRequirementMet'] === undefined) return false;
|
|
128
|
+
if (!('timeRequirementWaived' in value) || value['timeRequirementWaived'] === undefined) return false;
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function GetCourseVersionItemProgressionFromJSON(json: any): GetCourseVersionItemProgression {
|
|
133
|
+
return GetCourseVersionItemProgressionFromJSONTyped(json, false);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function GetCourseVersionItemProgressionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCourseVersionItemProgression {
|
|
137
|
+
if (json == null) {
|
|
138
|
+
return json;
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
|
|
142
|
+
'itemId': json['item_id'],
|
|
143
|
+
'rootSectionId': json['root_section_id'],
|
|
144
|
+
'isRequired': json['is_required'],
|
|
145
|
+
'isLocked': json['is_locked'],
|
|
146
|
+
'lockReason': ProgressionLockReasonFromJSON(json['lock_reason']),
|
|
147
|
+
'blockingSectionId': json['blocking_section_id'],
|
|
148
|
+
'nativeCompleted': json['native_completed'],
|
|
149
|
+
'effectiveCompleted': json['effective_completed'],
|
|
150
|
+
'activeSeconds': json['active_seconds'],
|
|
151
|
+
'minimumActiveSeconds': json['minimum_active_seconds'],
|
|
152
|
+
'remainingActiveSeconds': json['remaining_active_seconds'],
|
|
153
|
+
'timeRequirementMet': json['time_requirement_met'],
|
|
154
|
+
'timeRequirementWaived': json['time_requirement_waived'],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function GetCourseVersionItemProgressionToJSON(json: any): GetCourseVersionItemProgression {
|
|
159
|
+
return GetCourseVersionItemProgressionToJSONTyped(json, false);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function GetCourseVersionItemProgressionToJSONTyped(value?: GetCourseVersionItemProgression | null, ignoreDiscriminator: boolean = false): any {
|
|
163
|
+
if (value == null) {
|
|
164
|
+
return value;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return {
|
|
168
|
+
|
|
169
|
+
'item_id': value['itemId'],
|
|
170
|
+
'root_section_id': value['rootSectionId'],
|
|
171
|
+
'is_required': value['isRequired'],
|
|
172
|
+
'is_locked': value['isLocked'],
|
|
173
|
+
'lock_reason': ProgressionLockReasonToJSON(value['lockReason']),
|
|
174
|
+
'blocking_section_id': value['blockingSectionId'],
|
|
175
|
+
'native_completed': value['nativeCompleted'],
|
|
176
|
+
'effective_completed': value['effectiveCompleted'],
|
|
177
|
+
'active_seconds': value['activeSeconds'],
|
|
178
|
+
'minimum_active_seconds': value['minimumActiveSeconds'],
|
|
179
|
+
'remaining_active_seconds': value['remainingActiveSeconds'],
|
|
180
|
+
'time_requirement_met': value['timeRequirementMet'],
|
|
181
|
+
'time_requirement_waived': value['timeRequirementWaived'],
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
@@ -126,11 +126,47 @@ export interface GetCourseVersionItemSession {
|
|
|
126
126
|
*/
|
|
127
127
|
scoreRaw?: number | null;
|
|
128
128
|
/**
|
|
129
|
-
*
|
|
129
|
+
*
|
|
130
130
|
* @type {number}
|
|
131
131
|
* @memberof GetCourseVersionItemSession
|
|
132
132
|
*/
|
|
133
133
|
durationSeconds: number;
|
|
134
|
+
/**
|
|
135
|
+
*
|
|
136
|
+
* @type {number}
|
|
137
|
+
* @memberof GetCourseVersionItemSession
|
|
138
|
+
*/
|
|
139
|
+
minimumActiveSeconds: number | null;
|
|
140
|
+
/**
|
|
141
|
+
*
|
|
142
|
+
* @type {number}
|
|
143
|
+
* @memberof GetCourseVersionItemSession
|
|
144
|
+
*/
|
|
145
|
+
accumulatedActiveSeconds: number;
|
|
146
|
+
/**
|
|
147
|
+
*
|
|
148
|
+
* @type {number}
|
|
149
|
+
* @memberof GetCourseVersionItemSession
|
|
150
|
+
*/
|
|
151
|
+
remainingActiveSeconds: number;
|
|
152
|
+
/**
|
|
153
|
+
*
|
|
154
|
+
* @type {boolean}
|
|
155
|
+
* @memberof GetCourseVersionItemSession
|
|
156
|
+
*/
|
|
157
|
+
timeRequirementMet: boolean;
|
|
158
|
+
/**
|
|
159
|
+
*
|
|
160
|
+
* @type {boolean}
|
|
161
|
+
* @memberof GetCourseVersionItemSession
|
|
162
|
+
*/
|
|
163
|
+
timeRequirementWaived: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* True when native completion and the placement's active-time requirement are both satisfied.
|
|
166
|
+
* @type {boolean}
|
|
167
|
+
* @memberof GetCourseVersionItemSession
|
|
168
|
+
*/
|
|
169
|
+
effectiveCompletionMet: boolean;
|
|
134
170
|
/**
|
|
135
171
|
*
|
|
136
172
|
* @type {number}
|
|
@@ -171,6 +207,12 @@ export function instanceOfGetCourseVersionItemSession(value: object): value is G
|
|
|
171
207
|
if (!('completionStatus' in value) || value['completionStatus'] === undefined) return false;
|
|
172
208
|
if (!('gradeStatus' in value) || value['gradeStatus'] === undefined) return false;
|
|
173
209
|
if (!('durationSeconds' in value) || value['durationSeconds'] === undefined) return false;
|
|
210
|
+
if (!('minimumActiveSeconds' in value) || value['minimumActiveSeconds'] === undefined) return false;
|
|
211
|
+
if (!('accumulatedActiveSeconds' in value) || value['accumulatedActiveSeconds'] === undefined) return false;
|
|
212
|
+
if (!('remainingActiveSeconds' in value) || value['remainingActiveSeconds'] === undefined) return false;
|
|
213
|
+
if (!('timeRequirementMet' in value) || value['timeRequirementMet'] === undefined) return false;
|
|
214
|
+
if (!('timeRequirementWaived' in value) || value['timeRequirementWaived'] === undefined) return false;
|
|
215
|
+
if (!('effectiveCompletionMet' in value) || value['effectiveCompletionMet'] === undefined) return false;
|
|
174
216
|
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
175
217
|
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
176
218
|
return true;
|
|
@@ -201,6 +243,12 @@ export function GetCourseVersionItemSessionFromJSONTyped(json: any, ignoreDiscri
|
|
|
201
243
|
'gradeStatus': json['grade_status'],
|
|
202
244
|
'scoreRaw': json['score_raw'] == null ? undefined : json['score_raw'],
|
|
203
245
|
'durationSeconds': json['duration_seconds'],
|
|
246
|
+
'minimumActiveSeconds': json['minimum_active_seconds'],
|
|
247
|
+
'accumulatedActiveSeconds': json['accumulated_active_seconds'],
|
|
248
|
+
'remainingActiveSeconds': json['remaining_active_seconds'],
|
|
249
|
+
'timeRequirementMet': json['time_requirement_met'],
|
|
250
|
+
'timeRequirementWaived': json['time_requirement_waived'],
|
|
251
|
+
'effectiveCompletionMet': json['effective_completion_met'],
|
|
204
252
|
'createdAt': json['created_at'],
|
|
205
253
|
'updatedAt': json['updated_at'],
|
|
206
254
|
'completedAt': json['completed_at'] == null ? undefined : json['completed_at'],
|
|
@@ -233,6 +281,12 @@ export function GetCourseVersionItemSessionToJSONTyped(value?: GetCourseVersionI
|
|
|
233
281
|
'grade_status': value['gradeStatus'],
|
|
234
282
|
'score_raw': value['scoreRaw'],
|
|
235
283
|
'duration_seconds': value['durationSeconds'],
|
|
284
|
+
'minimum_active_seconds': value['minimumActiveSeconds'],
|
|
285
|
+
'accumulated_active_seconds': value['accumulatedActiveSeconds'],
|
|
286
|
+
'remaining_active_seconds': value['remainingActiveSeconds'],
|
|
287
|
+
'time_requirement_met': value['timeRequirementMet'],
|
|
288
|
+
'time_requirement_waived': value['timeRequirementWaived'],
|
|
289
|
+
'effective_completion_met': value['effectiveCompletionMet'],
|
|
236
290
|
'created_at': value['createdAt'],
|
|
237
291
|
'updated_at': value['updatedAt'],
|
|
238
292
|
'completed_at': value['completedAt'],
|