@easyedu/js-lsm-api 1.27.0 → 1.29.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 +9 -0
- package/README.md +2 -2
- package/dist/apis/ContentApi.d.ts +71 -1
- package/dist/apis/ContentApi.js +158 -1
- package/dist/esm/apis/ContentApi.d.ts +71 -1
- package/dist/esm/apis/ContentApi.js +158 -1
- package/dist/esm/models/GetContent.d.ts +19 -1
- package/dist/esm/models/GetContent.js +3 -0
- package/dist/esm/models/GetContentSessionDetail.d.ts +103 -0
- package/dist/esm/models/GetContentSessionDetail.js +96 -0
- package/dist/esm/models/GetContentSessionDetailScormSessionData.d.ts +32 -0
- package/dist/esm/models/GetContentSessionDetailScormSessionData.js +43 -0
- package/dist/esm/models/GetContentSessionDetailUserData.d.ts +38 -0
- package/dist/esm/models/GetContentSessionDetailUserData.js +47 -0
- package/dist/esm/models/GetContentSessionList.d.ts +57 -0
- package/dist/esm/models/GetContentSessionList.js +60 -0
- package/dist/esm/models/GetContentSessionListItem.d.ts +64 -0
- package/dist/esm/models/GetContentSessionListItem.js +65 -0
- package/dist/esm/models/GetScormApiLogItem.d.ts +73 -0
- package/dist/esm/models/GetScormApiLogItem.js +73 -0
- package/dist/esm/models/GetScormApiLogs.d.ts +57 -0
- package/dist/esm/models/GetScormApiLogs.js +60 -0
- package/dist/esm/models/GetScormSessionData.d.ts +59 -0
- package/dist/esm/models/GetScormSessionData.js +60 -0
- package/dist/esm/models/GetScormSessionDataActivity.d.ts +38 -0
- package/dist/esm/models/GetScormSessionDataActivity.js +47 -0
- package/dist/esm/models/index.d.ts +9 -0
- package/dist/esm/models/index.js +9 -0
- package/dist/models/GetContent.d.ts +19 -1
- package/dist/models/GetContent.js +3 -0
- package/dist/models/GetContentSessionDetail.d.ts +103 -0
- package/dist/models/GetContentSessionDetail.js +104 -0
- package/dist/models/GetContentSessionDetailScormSessionData.d.ts +32 -0
- package/dist/models/GetContentSessionDetailScormSessionData.js +50 -0
- package/dist/models/GetContentSessionDetailUserData.d.ts +38 -0
- package/dist/models/GetContentSessionDetailUserData.js +54 -0
- package/dist/models/GetContentSessionList.d.ts +57 -0
- package/dist/models/GetContentSessionList.js +67 -0
- package/dist/models/GetContentSessionListItem.d.ts +64 -0
- package/dist/models/GetContentSessionListItem.js +72 -0
- package/dist/models/GetScormApiLogItem.d.ts +73 -0
- package/dist/models/GetScormApiLogItem.js +81 -0
- package/dist/models/GetScormApiLogs.d.ts +57 -0
- package/dist/models/GetScormApiLogs.js +67 -0
- package/dist/models/GetScormSessionData.d.ts +59 -0
- package/dist/models/GetScormSessionData.js +67 -0
- package/dist/models/GetScormSessionDataActivity.d.ts +38 -0
- package/dist/models/GetScormSessionDataActivity.js +54 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/package.json +1 -1
- package/src/apis/ContentApi.ts +242 -0
- package/src/models/GetContent.ts +22 -1
- package/src/models/GetContentSessionDetail.ts +178 -0
- package/src/models/GetContentSessionDetailScormSessionData.ts +66 -0
- package/src/models/GetContentSessionDetailUserData.ts +75 -0
- package/src/models/GetContentSessionList.ts +110 -0
- package/src/models/GetContentSessionListItem.ts +126 -0
- package/src/models/GetScormApiLogItem.ts +125 -0
- package/src/models/GetScormApiLogs.ts +110 -0
- package/src/models/GetScormSessionData.ts +110 -0
- package/src/models/GetScormSessionDataActivity.ts +75 -0
- package/src/models/index.ts +9 -0
package/src/apis/ContentApi.ts
CHANGED
|
@@ -18,10 +18,14 @@ import type {
|
|
|
18
18
|
GetContent,
|
|
19
19
|
GetContentList,
|
|
20
20
|
GetContentSession,
|
|
21
|
+
GetContentSessionDetail,
|
|
22
|
+
GetContentSessionList,
|
|
21
23
|
GetContentUpload,
|
|
22
24
|
GetContentVersion,
|
|
23
25
|
GetContentVersionList,
|
|
26
|
+
GetScormApiLogs,
|
|
24
27
|
GetScormPackage,
|
|
28
|
+
GetScormSessionData,
|
|
25
29
|
PostContentQuiz,
|
|
26
30
|
PostContentSession,
|
|
27
31
|
PostContentUpload,
|
|
@@ -35,14 +39,22 @@ import {
|
|
|
35
39
|
GetContentListToJSON,
|
|
36
40
|
GetContentSessionFromJSON,
|
|
37
41
|
GetContentSessionToJSON,
|
|
42
|
+
GetContentSessionDetailFromJSON,
|
|
43
|
+
GetContentSessionDetailToJSON,
|
|
44
|
+
GetContentSessionListFromJSON,
|
|
45
|
+
GetContentSessionListToJSON,
|
|
38
46
|
GetContentUploadFromJSON,
|
|
39
47
|
GetContentUploadToJSON,
|
|
40
48
|
GetContentVersionFromJSON,
|
|
41
49
|
GetContentVersionToJSON,
|
|
42
50
|
GetContentVersionListFromJSON,
|
|
43
51
|
GetContentVersionListToJSON,
|
|
52
|
+
GetScormApiLogsFromJSON,
|
|
53
|
+
GetScormApiLogsToJSON,
|
|
44
54
|
GetScormPackageFromJSON,
|
|
45
55
|
GetScormPackageToJSON,
|
|
56
|
+
GetScormSessionDataFromJSON,
|
|
57
|
+
GetScormSessionDataToJSON,
|
|
46
58
|
PostContentQuizFromJSON,
|
|
47
59
|
PostContentQuizToJSON,
|
|
48
60
|
PostContentSessionFromJSON,
|
|
@@ -72,6 +84,13 @@ export interface GetContentSessionRequest {
|
|
|
72
84
|
courseId: string;
|
|
73
85
|
}
|
|
74
86
|
|
|
87
|
+
export interface GetContentSessionDetailRequest {
|
|
88
|
+
contentId: string;
|
|
89
|
+
moduleId: string;
|
|
90
|
+
courseId: string;
|
|
91
|
+
sessionId: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
75
94
|
export interface GetContentVersionRequest {
|
|
76
95
|
contentId: string;
|
|
77
96
|
moduleId: string;
|
|
@@ -87,10 +106,29 @@ export interface GetContentVersionListRequest {
|
|
|
87
106
|
pageSize?: number;
|
|
88
107
|
}
|
|
89
108
|
|
|
109
|
+
export interface GetScormApiLogsRequest {
|
|
110
|
+
sessionId: string;
|
|
111
|
+
page?: number;
|
|
112
|
+
pageSize?: number;
|
|
113
|
+
}
|
|
114
|
+
|
|
90
115
|
export interface GetScormPackageRequest {
|
|
91
116
|
packageId: string;
|
|
92
117
|
}
|
|
93
118
|
|
|
119
|
+
export interface GetScormSessionDataRequest {
|
|
120
|
+
scormSessionId: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface ListContentSessionsRequest {
|
|
124
|
+
contentId: string;
|
|
125
|
+
moduleId: string;
|
|
126
|
+
courseId: string;
|
|
127
|
+
sessionType?: ListContentSessionsSessionTypeEnum;
|
|
128
|
+
page?: number;
|
|
129
|
+
pageSize?: number;
|
|
130
|
+
}
|
|
131
|
+
|
|
94
132
|
export interface PostContentProcessRequest {
|
|
95
133
|
moduleId: string;
|
|
96
134
|
courseId: string;
|
|
@@ -269,6 +307,62 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
269
307
|
return await response.value();
|
|
270
308
|
}
|
|
271
309
|
|
|
310
|
+
/**
|
|
311
|
+
* Get detailed information about a specific content session
|
|
312
|
+
* Get content session details (instructor only)
|
|
313
|
+
*/
|
|
314
|
+
async getContentSessionDetailRaw(requestParameters: GetContentSessionDetailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContentSessionDetail>> {
|
|
315
|
+
if (requestParameters['contentId'] == null) {
|
|
316
|
+
throw new runtime.RequiredError(
|
|
317
|
+
'contentId',
|
|
318
|
+
'Required parameter "contentId" was null or undefined when calling getContentSessionDetail().'
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
if (requestParameters['moduleId'] == null) {
|
|
323
|
+
throw new runtime.RequiredError(
|
|
324
|
+
'moduleId',
|
|
325
|
+
'Required parameter "moduleId" was null or undefined when calling getContentSessionDetail().'
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if (requestParameters['courseId'] == null) {
|
|
330
|
+
throw new runtime.RequiredError(
|
|
331
|
+
'courseId',
|
|
332
|
+
'Required parameter "courseId" was null or undefined when calling getContentSessionDetail().'
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (requestParameters['sessionId'] == null) {
|
|
337
|
+
throw new runtime.RequiredError(
|
|
338
|
+
'sessionId',
|
|
339
|
+
'Required parameter "sessionId" was null or undefined when calling getContentSessionDetail().'
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const queryParameters: any = {};
|
|
344
|
+
|
|
345
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
346
|
+
|
|
347
|
+
const response = await this.request({
|
|
348
|
+
path: `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/sessions/{sessionId}`.replace(`{${"contentId"}}`, encodeURIComponent(String(requestParameters['contentId']))).replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId']))).replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))).replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
|
|
349
|
+
method: 'GET',
|
|
350
|
+
headers: headerParameters,
|
|
351
|
+
query: queryParameters,
|
|
352
|
+
}, initOverrides);
|
|
353
|
+
|
|
354
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetContentSessionDetailFromJSON(jsonValue));
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Get detailed information about a specific content session
|
|
359
|
+
* Get content session details (instructor only)
|
|
360
|
+
*/
|
|
361
|
+
async getContentSessionDetail(requestParameters: GetContentSessionDetailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentSessionDetail> {
|
|
362
|
+
const response = await this.getContentSessionDetailRaw(requestParameters, initOverrides);
|
|
363
|
+
return await response.value();
|
|
364
|
+
}
|
|
365
|
+
|
|
272
366
|
/**
|
|
273
367
|
* Returns detailed information about a specific version of the content, including sandbox launch URL and SCORM-specific data (package info and table of contents) if applicable.
|
|
274
368
|
* Get details of a specific content version
|
|
@@ -382,6 +476,49 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
382
476
|
return await response.value();
|
|
383
477
|
}
|
|
384
478
|
|
|
479
|
+
/**
|
|
480
|
+
* Get a paginated history of all SCORM API calls made during this session for debugging and troubleshooting
|
|
481
|
+
* Get SCORM API call logs (instructor only)
|
|
482
|
+
*/
|
|
483
|
+
async getScormApiLogsRaw(requestParameters: GetScormApiLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetScormApiLogs>> {
|
|
484
|
+
if (requestParameters['sessionId'] == null) {
|
|
485
|
+
throw new runtime.RequiredError(
|
|
486
|
+
'sessionId',
|
|
487
|
+
'Required parameter "sessionId" was null or undefined when calling getScormApiLogs().'
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
const queryParameters: any = {};
|
|
492
|
+
|
|
493
|
+
if (requestParameters['page'] != null) {
|
|
494
|
+
queryParameters['page'] = requestParameters['page'];
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
if (requestParameters['pageSize'] != null) {
|
|
498
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
502
|
+
|
|
503
|
+
const response = await this.request({
|
|
504
|
+
path: `/scorm/sessions/{sessionId}/api-logs`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
|
|
505
|
+
method: 'GET',
|
|
506
|
+
headers: headerParameters,
|
|
507
|
+
query: queryParameters,
|
|
508
|
+
}, initOverrides);
|
|
509
|
+
|
|
510
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetScormApiLogsFromJSON(jsonValue));
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Get a paginated history of all SCORM API calls made during this session for debugging and troubleshooting
|
|
515
|
+
* Get SCORM API call logs (instructor only)
|
|
516
|
+
*/
|
|
517
|
+
async getScormApiLogs(requestParameters: GetScormApiLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetScormApiLogs> {
|
|
518
|
+
const response = await this.getScormApiLogsRaw(requestParameters, initOverrides);
|
|
519
|
+
return await response.value();
|
|
520
|
+
}
|
|
521
|
+
|
|
385
522
|
/**
|
|
386
523
|
* Returns package information and table of contents for a SCORM package
|
|
387
524
|
* Get details of a SCORM package
|
|
@@ -417,6 +554,102 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
417
554
|
return await response.value();
|
|
418
555
|
}
|
|
419
556
|
|
|
557
|
+
/**
|
|
558
|
+
* Get detailed SCORM session data including CMI data dump for debugging
|
|
559
|
+
* Get SCORM session data (instructor only)
|
|
560
|
+
*/
|
|
561
|
+
async getScormSessionDataRaw(requestParameters: GetScormSessionDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetScormSessionData>> {
|
|
562
|
+
if (requestParameters['scormSessionId'] == null) {
|
|
563
|
+
throw new runtime.RequiredError(
|
|
564
|
+
'scormSessionId',
|
|
565
|
+
'Required parameter "scormSessionId" was null or undefined when calling getScormSessionData().'
|
|
566
|
+
);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
const queryParameters: any = {};
|
|
570
|
+
|
|
571
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
572
|
+
|
|
573
|
+
const response = await this.request({
|
|
574
|
+
path: `/scorm/sessions/{scormSessionId}/session-data`.replace(`{${"scormSessionId"}}`, encodeURIComponent(String(requestParameters['scormSessionId']))),
|
|
575
|
+
method: 'GET',
|
|
576
|
+
headers: headerParameters,
|
|
577
|
+
query: queryParameters,
|
|
578
|
+
}, initOverrides);
|
|
579
|
+
|
|
580
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetScormSessionDataFromJSON(jsonValue));
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Get detailed SCORM session data including CMI data dump for debugging
|
|
585
|
+
* Get SCORM session data (instructor only)
|
|
586
|
+
*/
|
|
587
|
+
async getScormSessionData(requestParameters: GetScormSessionDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetScormSessionData> {
|
|
588
|
+
const response = await this.getScormSessionDataRaw(requestParameters, initOverrides);
|
|
589
|
+
return await response.value();
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Get a paginated list of all content sessions for a specific content item
|
|
594
|
+
* List content sessions (instructor only)
|
|
595
|
+
*/
|
|
596
|
+
async listContentSessionsRaw(requestParameters: ListContentSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContentSessionList>> {
|
|
597
|
+
if (requestParameters['contentId'] == null) {
|
|
598
|
+
throw new runtime.RequiredError(
|
|
599
|
+
'contentId',
|
|
600
|
+
'Required parameter "contentId" was null or undefined when calling listContentSessions().'
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
if (requestParameters['moduleId'] == null) {
|
|
605
|
+
throw new runtime.RequiredError(
|
|
606
|
+
'moduleId',
|
|
607
|
+
'Required parameter "moduleId" was null or undefined when calling listContentSessions().'
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
if (requestParameters['courseId'] == null) {
|
|
612
|
+
throw new runtime.RequiredError(
|
|
613
|
+
'courseId',
|
|
614
|
+
'Required parameter "courseId" was null or undefined when calling listContentSessions().'
|
|
615
|
+
);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
const queryParameters: any = {};
|
|
619
|
+
|
|
620
|
+
if (requestParameters['sessionType'] != null) {
|
|
621
|
+
queryParameters['sessionType'] = requestParameters['sessionType'];
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
if (requestParameters['page'] != null) {
|
|
625
|
+
queryParameters['page'] = requestParameters['page'];
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
if (requestParameters['pageSize'] != null) {
|
|
629
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
633
|
+
|
|
634
|
+
const response = await this.request({
|
|
635
|
+
path: `/courses/{courseId}/modules/{moduleId}/contents/{contentId}/sessions`.replace(`{${"contentId"}}`, encodeURIComponent(String(requestParameters['contentId']))).replace(`{${"moduleId"}}`, encodeURIComponent(String(requestParameters['moduleId']))).replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId']))),
|
|
636
|
+
method: 'GET',
|
|
637
|
+
headers: headerParameters,
|
|
638
|
+
query: queryParameters,
|
|
639
|
+
}, initOverrides);
|
|
640
|
+
|
|
641
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetContentSessionListFromJSON(jsonValue));
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* Get a paginated list of all content sessions for a specific content item
|
|
646
|
+
* List content sessions (instructor only)
|
|
647
|
+
*/
|
|
648
|
+
async listContentSessions(requestParameters: ListContentSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContentSessionList> {
|
|
649
|
+
const response = await this.listContentSessionsRaw(requestParameters, initOverrides);
|
|
650
|
+
return await response.value();
|
|
651
|
+
}
|
|
652
|
+
|
|
420
653
|
/**
|
|
421
654
|
* Post a new content process
|
|
422
655
|
*/
|
|
@@ -737,3 +970,12 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
737
970
|
}
|
|
738
971
|
|
|
739
972
|
}
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* @export
|
|
976
|
+
*/
|
|
977
|
+
export const ListContentSessionsSessionTypeEnum = {
|
|
978
|
+
Sandbox: 'SANDBOX',
|
|
979
|
+
Live: 'LIVE'
|
|
980
|
+
} as const;
|
|
981
|
+
export type ListContentSessionsSessionTypeEnum = typeof ListContentSessionsSessionTypeEnum[keyof typeof ListContentSessionsSessionTypeEnum];
|
package/src/models/GetContent.ts
CHANGED
|
@@ -87,6 +87,24 @@ export interface GetContent {
|
|
|
87
87
|
* @memberof GetContent
|
|
88
88
|
*/
|
|
89
89
|
readonly updatedDate?: Date;
|
|
90
|
+
/**
|
|
91
|
+
* Active version number for versioned content types (SCORM, Video, PDF, File)
|
|
92
|
+
* @type {number}
|
|
93
|
+
* @memberof GetContent
|
|
94
|
+
*/
|
|
95
|
+
readonly activeVersionNumber?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Active version ID for versioned content types
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof GetContent
|
|
100
|
+
*/
|
|
101
|
+
readonly activeVersionId?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Whether this content has multiple versions
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof GetContent
|
|
106
|
+
*/
|
|
107
|
+
readonly hasMultipleVersions?: boolean;
|
|
90
108
|
}
|
|
91
109
|
|
|
92
110
|
|
|
@@ -138,6 +156,9 @@ export function GetContentFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
138
156
|
'published': json['published'],
|
|
139
157
|
'createdDate': json['created_date'] == null ? undefined : (new Date(json['created_date'])),
|
|
140
158
|
'updatedDate': json['updated_date'] == null ? undefined : (new Date(json['updated_date'])),
|
|
159
|
+
'activeVersionNumber': json['active_version_number'] == null ? undefined : json['active_version_number'],
|
|
160
|
+
'activeVersionId': json['active_version_id'] == null ? undefined : json['active_version_id'],
|
|
161
|
+
'hasMultipleVersions': json['has_multiple_versions'] == null ? undefined : json['has_multiple_versions'],
|
|
141
162
|
};
|
|
142
163
|
}
|
|
143
164
|
|
|
@@ -145,7 +166,7 @@ export function GetContentToJSON(json: any): GetContent {
|
|
|
145
166
|
return GetContentToJSONTyped(json, false);
|
|
146
167
|
}
|
|
147
168
|
|
|
148
|
-
export function GetContentToJSONTyped(value?: Omit<GetContent, 'id'|'created_date'|'updated_date'> | null, ignoreDiscriminator: boolean = false): any {
|
|
169
|
+
export function GetContentToJSONTyped(value?: Omit<GetContent, 'id'|'created_date'|'updated_date'|'active_version_number'|'active_version_id'|'has_multiple_versions'> | null, ignoreDiscriminator: boolean = false): any {
|
|
149
170
|
if (value == null) {
|
|
150
171
|
return value;
|
|
151
172
|
}
|
|
@@ -0,0 +1,178 @@
|
|
|
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 { GetContentSessionDetailUserData } from './GetContentSessionDetailUserData';
|
|
17
|
+
import {
|
|
18
|
+
GetContentSessionDetailUserDataFromJSON,
|
|
19
|
+
GetContentSessionDetailUserDataFromJSONTyped,
|
|
20
|
+
GetContentSessionDetailUserDataToJSON,
|
|
21
|
+
GetContentSessionDetailUserDataToJSONTyped,
|
|
22
|
+
} from './GetContentSessionDetailUserData';
|
|
23
|
+
import type { GetContentSessionDetailScormSessionData } from './GetContentSessionDetailScormSessionData';
|
|
24
|
+
import {
|
|
25
|
+
GetContentSessionDetailScormSessionDataFromJSON,
|
|
26
|
+
GetContentSessionDetailScormSessionDataFromJSONTyped,
|
|
27
|
+
GetContentSessionDetailScormSessionDataToJSON,
|
|
28
|
+
GetContentSessionDetailScormSessionDataToJSONTyped,
|
|
29
|
+
} from './GetContentSessionDetailScormSessionData';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Detailed content session information
|
|
33
|
+
* @export
|
|
34
|
+
* @interface GetContentSessionDetail
|
|
35
|
+
*/
|
|
36
|
+
export interface GetContentSessionDetail {
|
|
37
|
+
/**
|
|
38
|
+
* The external ID of the content session
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof GetContentSessionDetail
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
/**
|
|
44
|
+
* The date and time the content session was created (Unix timestamp)
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof GetContentSessionDetail
|
|
47
|
+
*/
|
|
48
|
+
createdAt: number;
|
|
49
|
+
/**
|
|
50
|
+
* The date and time the content session was updated (Unix timestamp)
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof GetContentSessionDetail
|
|
53
|
+
*/
|
|
54
|
+
updatedAt: number;
|
|
55
|
+
/**
|
|
56
|
+
* The external ID of the content
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof GetContentSessionDetail
|
|
59
|
+
*/
|
|
60
|
+
contentId: string;
|
|
61
|
+
/**
|
|
62
|
+
* The completion status of the content session
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof GetContentSessionDetail
|
|
65
|
+
*/
|
|
66
|
+
completionStatus: GetContentSessionDetailCompletionStatusEnum;
|
|
67
|
+
/**
|
|
68
|
+
* The grade status of the content session
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof GetContentSessionDetail
|
|
71
|
+
*/
|
|
72
|
+
gradeStatus: GetContentSessionDetailGradeStatusEnum;
|
|
73
|
+
/**
|
|
74
|
+
* The total duration of the session in seconds
|
|
75
|
+
* @type {number}
|
|
76
|
+
* @memberof GetContentSessionDetail
|
|
77
|
+
*/
|
|
78
|
+
durationInSeconds: number;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {GetContentSessionDetailUserData}
|
|
82
|
+
* @memberof GetContentSessionDetail
|
|
83
|
+
*/
|
|
84
|
+
userData: GetContentSessionDetailUserData;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {GetContentSessionDetailScormSessionData}
|
|
88
|
+
* @memberof GetContentSessionDetail
|
|
89
|
+
*/
|
|
90
|
+
scormSessionData: GetContentSessionDetailScormSessionData | null;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @export
|
|
96
|
+
*/
|
|
97
|
+
export const GetContentSessionDetailCompletionStatusEnum = {
|
|
98
|
+
NotAttempted: 'NotAttempted',
|
|
99
|
+
InProgress: 'InProgress',
|
|
100
|
+
Completed: 'Completed'
|
|
101
|
+
} as const;
|
|
102
|
+
export type GetContentSessionDetailCompletionStatusEnum = typeof GetContentSessionDetailCompletionStatusEnum[keyof typeof GetContentSessionDetailCompletionStatusEnum];
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @export
|
|
106
|
+
*/
|
|
107
|
+
export const GetContentSessionDetailGradeStatusEnum = {
|
|
108
|
+
Ungraded: 'Ungraded',
|
|
109
|
+
Passed: 'Passed',
|
|
110
|
+
Failed: 'Failed',
|
|
111
|
+
PointsEarned: 'PointsEarned',
|
|
112
|
+
PercentageEarned: 'PercentageEarned',
|
|
113
|
+
NotApplicable: 'NotApplicable'
|
|
114
|
+
} as const;
|
|
115
|
+
export type GetContentSessionDetailGradeStatusEnum = typeof GetContentSessionDetailGradeStatusEnum[keyof typeof GetContentSessionDetailGradeStatusEnum];
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Check if a given object implements the GetContentSessionDetail interface.
|
|
120
|
+
*/
|
|
121
|
+
export function instanceOfGetContentSessionDetail(value: object): value is GetContentSessionDetail {
|
|
122
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
123
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
124
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
125
|
+
if (!('contentId' in value) || value['contentId'] === undefined) return false;
|
|
126
|
+
if (!('completionStatus' in value) || value['completionStatus'] === undefined) return false;
|
|
127
|
+
if (!('gradeStatus' in value) || value['gradeStatus'] === undefined) return false;
|
|
128
|
+
if (!('durationInSeconds' in value) || value['durationInSeconds'] === undefined) return false;
|
|
129
|
+
if (!('userData' in value) || value['userData'] === undefined) return false;
|
|
130
|
+
if (!('scormSessionData' in value) || value['scormSessionData'] === undefined) return false;
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function GetContentSessionDetailFromJSON(json: any): GetContentSessionDetail {
|
|
135
|
+
return GetContentSessionDetailFromJSONTyped(json, false);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function GetContentSessionDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetContentSessionDetail {
|
|
139
|
+
if (json == null) {
|
|
140
|
+
return json;
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
|
|
144
|
+
'id': json['id'],
|
|
145
|
+
'createdAt': json['created_at'],
|
|
146
|
+
'updatedAt': json['updated_at'],
|
|
147
|
+
'contentId': json['content_id'],
|
|
148
|
+
'completionStatus': json['completion_status'],
|
|
149
|
+
'gradeStatus': json['grade_status'],
|
|
150
|
+
'durationInSeconds': json['duration_in_seconds'],
|
|
151
|
+
'userData': GetContentSessionDetailUserDataFromJSON(json['user_data']),
|
|
152
|
+
'scormSessionData': GetContentSessionDetailScormSessionDataFromJSON(json['scorm_session_data']),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function GetContentSessionDetailToJSON(json: any): GetContentSessionDetail {
|
|
157
|
+
return GetContentSessionDetailToJSONTyped(json, false);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function GetContentSessionDetailToJSONTyped(value?: GetContentSessionDetail | null, ignoreDiscriminator: boolean = false): any {
|
|
161
|
+
if (value == null) {
|
|
162
|
+
return value;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return {
|
|
166
|
+
|
|
167
|
+
'id': value['id'],
|
|
168
|
+
'created_at': value['createdAt'],
|
|
169
|
+
'updated_at': value['updatedAt'],
|
|
170
|
+
'content_id': value['contentId'],
|
|
171
|
+
'completion_status': value['completionStatus'],
|
|
172
|
+
'grade_status': value['gradeStatus'],
|
|
173
|
+
'duration_in_seconds': value['durationInSeconds'],
|
|
174
|
+
'user_data': GetContentSessionDetailUserDataToJSON(value['userData']),
|
|
175
|
+
'scorm_session_data': GetContentSessionDetailScormSessionDataToJSON(value['scormSessionData']),
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
@@ -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 { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* SCORM session data if this is a SCORM session, null otherwise
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GetContentSessionDetailScormSessionData
|
|
20
|
+
*/
|
|
21
|
+
export interface GetContentSessionDetailScormSessionData {
|
|
22
|
+
/**
|
|
23
|
+
* The external ID of the SCORM session
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetContentSessionDetailScormSessionData
|
|
26
|
+
*/
|
|
27
|
+
scormSessionId: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the GetContentSessionDetailScormSessionData interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfGetContentSessionDetailScormSessionData(value: object): value is GetContentSessionDetailScormSessionData {
|
|
34
|
+
if (!('scormSessionId' in value) || value['scormSessionId'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function GetContentSessionDetailScormSessionDataFromJSON(json: any): GetContentSessionDetailScormSessionData {
|
|
39
|
+
return GetContentSessionDetailScormSessionDataFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function GetContentSessionDetailScormSessionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetContentSessionDetailScormSessionData {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'scormSessionId': json['scorm_session_id'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function GetContentSessionDetailScormSessionDataToJSON(json: any): GetContentSessionDetailScormSessionData {
|
|
53
|
+
return GetContentSessionDetailScormSessionDataToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function GetContentSessionDetailScormSessionDataToJSONTyped(value?: GetContentSessionDetailScormSessionData | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'scorm_session_id': value['scormSessionId'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GetContentSessionDetailUserData
|
|
20
|
+
*/
|
|
21
|
+
export interface GetContentSessionDetailUserData {
|
|
22
|
+
/**
|
|
23
|
+
* The external ID of the user
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetContentSessionDetailUserData
|
|
26
|
+
*/
|
|
27
|
+
userId: string;
|
|
28
|
+
/**
|
|
29
|
+
* The name of the user
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GetContentSessionDetailUserData
|
|
32
|
+
*/
|
|
33
|
+
userName: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the GetContentSessionDetailUserData interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfGetContentSessionDetailUserData(value: object): value is GetContentSessionDetailUserData {
|
|
40
|
+
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
41
|
+
if (!('userName' in value) || value['userName'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function GetContentSessionDetailUserDataFromJSON(json: any): GetContentSessionDetailUserData {
|
|
46
|
+
return GetContentSessionDetailUserDataFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function GetContentSessionDetailUserDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetContentSessionDetailUserData {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'userId': json['user_id'],
|
|
56
|
+
'userName': json['user_name'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function GetContentSessionDetailUserDataToJSON(json: any): GetContentSessionDetailUserData {
|
|
61
|
+
return GetContentSessionDetailUserDataToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function GetContentSessionDetailUserDataToJSONTyped(value?: GetContentSessionDetailUserData | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'user_id': value['userId'],
|
|
72
|
+
'user_name': value['userName'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|