@easyedu/js-lsm-api 1.28.0 → 1.30.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.
Files changed (63) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +2 -2
  3. package/dist/apis/ContentApi.d.ts +71 -1
  4. package/dist/apis/ContentApi.js +158 -1
  5. package/dist/esm/apis/ContentApi.d.ts +71 -1
  6. package/dist/esm/apis/ContentApi.js +158 -1
  7. package/dist/esm/models/GetContentSessionDetail.d.ts +103 -0
  8. package/dist/esm/models/GetContentSessionDetail.js +96 -0
  9. package/dist/esm/models/GetContentSessionDetailScormSessionDataInner.d.ts +38 -0
  10. package/dist/esm/models/GetContentSessionDetailScormSessionDataInner.js +47 -0
  11. package/dist/esm/models/GetContentSessionDetailUserData.d.ts +38 -0
  12. package/dist/esm/models/GetContentSessionDetailUserData.js +47 -0
  13. package/dist/esm/models/GetContentSessionList.d.ts +57 -0
  14. package/dist/esm/models/GetContentSessionList.js +60 -0
  15. package/dist/esm/models/GetContentSessionListItem.d.ts +64 -0
  16. package/dist/esm/models/GetContentSessionListItem.js +65 -0
  17. package/dist/esm/models/GetContentSessionListItemScormSessionData.d.ts +32 -0
  18. package/dist/esm/models/GetContentSessionListItemScormSessionData.js +43 -0
  19. package/dist/esm/models/GetScormApiLogItem.d.ts +73 -0
  20. package/dist/esm/models/GetScormApiLogItem.js +73 -0
  21. package/dist/esm/models/GetScormApiLogs.d.ts +57 -0
  22. package/dist/esm/models/GetScormApiLogs.js +60 -0
  23. package/dist/esm/models/GetScormSessionData.d.ts +59 -0
  24. package/dist/esm/models/GetScormSessionData.js +60 -0
  25. package/dist/esm/models/GetScormSessionDataActivity.d.ts +38 -0
  26. package/dist/esm/models/GetScormSessionDataActivity.js +47 -0
  27. package/dist/esm/models/index.d.ts +10 -0
  28. package/dist/esm/models/index.js +10 -0
  29. package/dist/models/GetContentSessionDetail.d.ts +103 -0
  30. package/dist/models/GetContentSessionDetail.js +104 -0
  31. package/dist/models/GetContentSessionDetailScormSessionDataInner.d.ts +38 -0
  32. package/dist/models/GetContentSessionDetailScormSessionDataInner.js +54 -0
  33. package/dist/models/GetContentSessionDetailUserData.d.ts +38 -0
  34. package/dist/models/GetContentSessionDetailUserData.js +54 -0
  35. package/dist/models/GetContentSessionList.d.ts +57 -0
  36. package/dist/models/GetContentSessionList.js +67 -0
  37. package/dist/models/GetContentSessionListItem.d.ts +64 -0
  38. package/dist/models/GetContentSessionListItem.js +72 -0
  39. package/dist/models/GetContentSessionListItemScormSessionData.d.ts +32 -0
  40. package/dist/models/GetContentSessionListItemScormSessionData.js +50 -0
  41. package/dist/models/GetScormApiLogItem.d.ts +73 -0
  42. package/dist/models/GetScormApiLogItem.js +81 -0
  43. package/dist/models/GetScormApiLogs.d.ts +57 -0
  44. package/dist/models/GetScormApiLogs.js +67 -0
  45. package/dist/models/GetScormSessionData.d.ts +59 -0
  46. package/dist/models/GetScormSessionData.js +67 -0
  47. package/dist/models/GetScormSessionDataActivity.d.ts +38 -0
  48. package/dist/models/GetScormSessionDataActivity.js +54 -0
  49. package/dist/models/index.d.ts +10 -0
  50. package/dist/models/index.js +10 -0
  51. package/package.json +1 -1
  52. package/src/apis/ContentApi.ts +242 -0
  53. package/src/models/GetContentSessionDetail.ts +178 -0
  54. package/src/models/GetContentSessionDetailScormSessionDataInner.ts +75 -0
  55. package/src/models/GetContentSessionDetailUserData.ts +75 -0
  56. package/src/models/GetContentSessionList.ts +110 -0
  57. package/src/models/GetContentSessionListItem.ts +126 -0
  58. package/src/models/GetContentSessionListItemScormSessionData.ts +66 -0
  59. package/src/models/GetScormApiLogItem.ts +125 -0
  60. package/src/models/GetScormApiLogs.ts +110 -0
  61. package/src/models/GetScormSessionData.ts +110 -0
  62. package/src/models/GetScormSessionDataActivity.ts +75 -0
  63. package/src/models/index.ts +10 -0
@@ -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];
@@ -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 { GetContentSessionDetailScormSessionDataInner } from './GetContentSessionDetailScormSessionDataInner';
17
+ import {
18
+ GetContentSessionDetailScormSessionDataInnerFromJSON,
19
+ GetContentSessionDetailScormSessionDataInnerFromJSONTyped,
20
+ GetContentSessionDetailScormSessionDataInnerToJSON,
21
+ GetContentSessionDetailScormSessionDataInnerToJSONTyped,
22
+ } from './GetContentSessionDetailScormSessionDataInner';
23
+ import type { GetContentSessionDetailUserData } from './GetContentSessionDetailUserData';
24
+ import {
25
+ GetContentSessionDetailUserDataFromJSON,
26
+ GetContentSessionDetailUserDataFromJSONTyped,
27
+ GetContentSessionDetailUserDataToJSON,
28
+ GetContentSessionDetailUserDataToJSONTyped,
29
+ } from './GetContentSessionDetailUserData';
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
+ * SCORM session data if this is a SCORM session, null otherwise
87
+ * @type {Array<GetContentSessionDetailScormSessionDataInner>}
88
+ * @memberof GetContentSessionDetail
89
+ */
90
+ scormSessionData: Array<GetContentSessionDetailScormSessionDataInner> | 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': (json['scorm_session_data'] == null ? null : (json['scorm_session_data'] as Array<any>).map(GetContentSessionDetailScormSessionDataInnerFromJSON)),
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': (value['scormSessionData'] == null ? null : (value['scormSessionData'] as Array<any>).map(GetContentSessionDetailScormSessionDataInnerToJSON)),
176
+ };
177
+ }
178
+
@@ -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 GetContentSessionDetailScormSessionDataInner
20
+ */
21
+ export interface GetContentSessionDetailScormSessionDataInner {
22
+ /**
23
+ * The external ID of the SCORM session
24
+ * @type {string}
25
+ * @memberof GetContentSessionDetailScormSessionDataInner
26
+ */
27
+ scormSessionId: string;
28
+ /**
29
+ * The name of the SCORM activity
30
+ * @type {string}
31
+ * @memberof GetContentSessionDetailScormSessionDataInner
32
+ */
33
+ activityName: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the GetContentSessionDetailScormSessionDataInner interface.
38
+ */
39
+ export function instanceOfGetContentSessionDetailScormSessionDataInner(value: object): value is GetContentSessionDetailScormSessionDataInner {
40
+ if (!('scormSessionId' in value) || value['scormSessionId'] === undefined) return false;
41
+ if (!('activityName' in value) || value['activityName'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function GetContentSessionDetailScormSessionDataInnerFromJSON(json: any): GetContentSessionDetailScormSessionDataInner {
46
+ return GetContentSessionDetailScormSessionDataInnerFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function GetContentSessionDetailScormSessionDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetContentSessionDetailScormSessionDataInner {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'scormSessionId': json['scorm_session_id'],
56
+ 'activityName': json['activity_name'],
57
+ };
58
+ }
59
+
60
+ export function GetContentSessionDetailScormSessionDataInnerToJSON(json: any): GetContentSessionDetailScormSessionDataInner {
61
+ return GetContentSessionDetailScormSessionDataInnerToJSONTyped(json, false);
62
+ }
63
+
64
+ export function GetContentSessionDetailScormSessionDataInnerToJSONTyped(value?: GetContentSessionDetailScormSessionDataInner | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'scorm_session_id': value['scormSessionId'],
72
+ 'activity_name': value['activityName'],
73
+ };
74
+ }
75
+
@@ -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
+