@easyedu/js-lsm-api 1.98.0 → 1.99.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 +10 -2
  3. package/dist/apis/PlayerApi.d.ts +57 -0
  4. package/dist/apis/PlayerApi.js +148 -0
  5. package/dist/esm/apis/PlayerApi.d.ts +57 -0
  6. package/dist/esm/apis/PlayerApi.js +148 -0
  7. package/dist/esm/models/GetCourseVersionItemSession.d.ts +6 -0
  8. package/dist/esm/models/GetCourseVersionItemSession.js +4 -0
  9. package/dist/esm/models/GetLibraryQuizSession.d.ts +6 -0
  10. package/dist/esm/models/GetLibraryQuizSession.js +4 -0
  11. package/dist/esm/models/GetResourceSession.d.ts +6 -0
  12. package/dist/esm/models/GetResourceSession.js +4 -0
  13. package/dist/esm/models/GetResourceSessionActivity.d.ts +125 -0
  14. package/dist/esm/models/GetResourceSessionActivity.js +97 -0
  15. package/dist/esm/models/GetResourceSessionActivityEvent.d.ts +62 -0
  16. package/dist/esm/models/GetResourceSessionActivityEvent.js +61 -0
  17. package/dist/esm/models/GetResourceSessionActivityEventList.d.ts +33 -0
  18. package/dist/esm/models/GetResourceSessionActivityEventList.js +44 -0
  19. package/dist/esm/models/GetResourceSessionActivityList.d.ts +33 -0
  20. package/dist/esm/models/GetResourceSessionActivityList.js +44 -0
  21. package/dist/esm/models/PostResourceSessionActivityEvent.d.ts +62 -0
  22. package/dist/esm/models/PostResourceSessionActivityEvent.js +66 -0
  23. package/dist/esm/models/index.d.ts +5 -0
  24. package/dist/esm/models/index.js +5 -0
  25. package/dist/models/GetCourseVersionItemSession.d.ts +6 -0
  26. package/dist/models/GetCourseVersionItemSession.js +4 -0
  27. package/dist/models/GetLibraryQuizSession.d.ts +6 -0
  28. package/dist/models/GetLibraryQuizSession.js +4 -0
  29. package/dist/models/GetResourceSession.d.ts +6 -0
  30. package/dist/models/GetResourceSession.js +4 -0
  31. package/dist/models/GetResourceSessionActivity.d.ts +125 -0
  32. package/dist/models/GetResourceSessionActivity.js +105 -0
  33. package/dist/models/GetResourceSessionActivityEvent.d.ts +62 -0
  34. package/dist/models/GetResourceSessionActivityEvent.js +68 -0
  35. package/dist/models/GetResourceSessionActivityEventList.d.ts +33 -0
  36. package/dist/models/GetResourceSessionActivityEventList.js +51 -0
  37. package/dist/models/GetResourceSessionActivityList.d.ts +33 -0
  38. package/dist/models/GetResourceSessionActivityList.js +51 -0
  39. package/dist/models/PostResourceSessionActivityEvent.d.ts +62 -0
  40. package/dist/models/PostResourceSessionActivityEvent.js +74 -0
  41. package/dist/models/index.d.ts +5 -0
  42. package/dist/models/index.js +5 -0
  43. package/docs/ContentLibraryQuizApi.md +2 -2
  44. package/docs/GetCourseVersionItemSession.md +2 -0
  45. package/docs/GetLibraryQuizSession.md +2 -0
  46. package/docs/GetResourceSession.md +2 -0
  47. package/docs/GetResourceSessionActivity.md +63 -0
  48. package/docs/GetResourceSessionActivityEvent.md +45 -0
  49. package/docs/GetResourceSessionActivityEventList.md +35 -0
  50. package/docs/GetResourceSessionActivityList.md +35 -0
  51. package/docs/PlayerApi.md +231 -6
  52. package/docs/PostResourceSessionActivityEvent.md +39 -0
  53. package/package.json +1 -1
  54. package/src/apis/PlayerApi.ts +217 -0
  55. package/src/models/GetCourseVersionItemSession.ts +9 -0
  56. package/src/models/GetLibraryQuizSession.ts +9 -0
  57. package/src/models/GetResourceSession.ts +9 -0
  58. package/src/models/GetResourceSessionActivity.ts +199 -0
  59. package/src/models/GetResourceSessionActivityEvent.ts +110 -0
  60. package/src/models/GetResourceSessionActivityEventList.ts +74 -0
  61. package/src/models/GetResourceSessionActivityList.ts +74 -0
  62. package/src/models/PostResourceSessionActivityEvent.ts +104 -0
  63. package/src/models/index.ts +5 -0
@@ -0,0 +1,110 @@
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
+ * A recorded learner activity event.
18
+ * @export
19
+ * @interface GetResourceSessionActivityEvent
20
+ */
21
+ export interface GetResourceSessionActivityEvent {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof GetResourceSessionActivityEvent
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof GetResourceSessionActivityEvent
32
+ */
33
+ eventId: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof GetResourceSessionActivityEvent
38
+ */
39
+ activityId: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof GetResourceSessionActivityEvent
44
+ */
45
+ eventType: string;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof GetResourceSessionActivityEvent
50
+ */
51
+ positionSeconds?: number | null;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof GetResourceSessionActivityEvent
56
+ */
57
+ createdAt: number;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the GetResourceSessionActivityEvent interface.
62
+ */
63
+ export function instanceOfGetResourceSessionActivityEvent(value: object): value is GetResourceSessionActivityEvent {
64
+ if (!('id' in value) || value['id'] === undefined) return false;
65
+ if (!('eventId' in value) || value['eventId'] === undefined) return false;
66
+ if (!('activityId' in value) || value['activityId'] === undefined) return false;
67
+ if (!('eventType' in value) || value['eventType'] === undefined) return false;
68
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
69
+ return true;
70
+ }
71
+
72
+ export function GetResourceSessionActivityEventFromJSON(json: any): GetResourceSessionActivityEvent {
73
+ return GetResourceSessionActivityEventFromJSONTyped(json, false);
74
+ }
75
+
76
+ export function GetResourceSessionActivityEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetResourceSessionActivityEvent {
77
+ if (json == null) {
78
+ return json;
79
+ }
80
+ return {
81
+
82
+ 'id': json['id'],
83
+ 'eventId': json['event_id'],
84
+ 'activityId': json['activity_id'],
85
+ 'eventType': json['event_type'],
86
+ 'positionSeconds': json['position_seconds'] == null ? undefined : json['position_seconds'],
87
+ 'createdAt': json['created_at'],
88
+ };
89
+ }
90
+
91
+ export function GetResourceSessionActivityEventToJSON(json: any): GetResourceSessionActivityEvent {
92
+ return GetResourceSessionActivityEventToJSONTyped(json, false);
93
+ }
94
+
95
+ export function GetResourceSessionActivityEventToJSONTyped(value?: GetResourceSessionActivityEvent | null, ignoreDiscriminator: boolean = false): any {
96
+ if (value == null) {
97
+ return value;
98
+ }
99
+
100
+ return {
101
+
102
+ 'id': value['id'],
103
+ 'event_id': value['eventId'],
104
+ 'activity_id': value['activityId'],
105
+ 'event_type': value['eventType'],
106
+ 'position_seconds': value['positionSeconds'],
107
+ 'created_at': value['createdAt'],
108
+ };
109
+ }
110
+
@@ -0,0 +1,74 @@
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 { GetResourceSessionActivityEvent } from './GetResourceSessionActivityEvent';
17
+ import {
18
+ GetResourceSessionActivityEventFromJSON,
19
+ GetResourceSessionActivityEventFromJSONTyped,
20
+ GetResourceSessionActivityEventToJSON,
21
+ GetResourceSessionActivityEventToJSONTyped,
22
+ } from './GetResourceSessionActivityEvent';
23
+
24
+ /**
25
+ * Recorded learner activity events for one resource-session attempt.
26
+ * @export
27
+ * @interface GetResourceSessionActivityEventList
28
+ */
29
+ export interface GetResourceSessionActivityEventList {
30
+ /**
31
+ *
32
+ * @type {Array<GetResourceSessionActivityEvent>}
33
+ * @memberof GetResourceSessionActivityEventList
34
+ */
35
+ items: Array<GetResourceSessionActivityEvent>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the GetResourceSessionActivityEventList interface.
40
+ */
41
+ export function instanceOfGetResourceSessionActivityEventList(value: object): value is GetResourceSessionActivityEventList {
42
+ if (!('items' in value) || value['items'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function GetResourceSessionActivityEventListFromJSON(json: any): GetResourceSessionActivityEventList {
47
+ return GetResourceSessionActivityEventListFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function GetResourceSessionActivityEventListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetResourceSessionActivityEventList {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'items': ((json['items'] as Array<any>).map(GetResourceSessionActivityEventFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function GetResourceSessionActivityEventListToJSON(json: any): GetResourceSessionActivityEventList {
61
+ return GetResourceSessionActivityEventListToJSONTyped(json, false);
62
+ }
63
+
64
+ export function GetResourceSessionActivityEventListToJSONTyped(value?: GetResourceSessionActivityEventList | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'items': ((value['items'] as Array<any>).map(GetResourceSessionActivityEventToJSON)),
72
+ };
73
+ }
74
+
@@ -0,0 +1,74 @@
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 { GetResourceSessionActivity } from './GetResourceSessionActivity';
17
+ import {
18
+ GetResourceSessionActivityFromJSON,
19
+ GetResourceSessionActivityFromJSONTyped,
20
+ GetResourceSessionActivityToJSON,
21
+ GetResourceSessionActivityToJSONTyped,
22
+ } from './GetResourceSessionActivity';
23
+
24
+ /**
25
+ * Activities belonging to one resource-session attempt.
26
+ * @export
27
+ * @interface GetResourceSessionActivityList
28
+ */
29
+ export interface GetResourceSessionActivityList {
30
+ /**
31
+ *
32
+ * @type {Array<GetResourceSessionActivity>}
33
+ * @memberof GetResourceSessionActivityList
34
+ */
35
+ items: Array<GetResourceSessionActivity>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the GetResourceSessionActivityList interface.
40
+ */
41
+ export function instanceOfGetResourceSessionActivityList(value: object): value is GetResourceSessionActivityList {
42
+ if (!('items' in value) || value['items'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function GetResourceSessionActivityListFromJSON(json: any): GetResourceSessionActivityList {
47
+ return GetResourceSessionActivityListFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function GetResourceSessionActivityListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetResourceSessionActivityList {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'items': ((json['items'] as Array<any>).map(GetResourceSessionActivityFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function GetResourceSessionActivityListToJSON(json: any): GetResourceSessionActivityList {
61
+ return GetResourceSessionActivityListToJSONTyped(json, false);
62
+ }
63
+
64
+ export function GetResourceSessionActivityListToJSONTyped(value?: GetResourceSessionActivityList | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'items': ((value['items'] as Array<any>).map(GetResourceSessionActivityToJSON)),
72
+ };
73
+ }
74
+
@@ -0,0 +1,104 @@
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
+ * A learner activity signal. Timing is calculated from server receipt times.
18
+ * @export
19
+ * @interface PostResourceSessionActivityEvent
20
+ */
21
+ export interface PostResourceSessionActivityEvent {
22
+ /**
23
+ * Client-generated idempotency identifier.
24
+ * @type {string}
25
+ * @memberof PostResourceSessionActivityEvent
26
+ */
27
+ eventId: string;
28
+ /**
29
+ *
30
+ * @type {PostResourceSessionActivityEventEventTypeEnum}
31
+ * @memberof PostResourceSessionActivityEvent
32
+ */
33
+ eventType: PostResourceSessionActivityEventEventTypeEnum;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof PostResourceSessionActivityEvent
38
+ */
39
+ positionSeconds?: number | null;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const PostResourceSessionActivityEventEventTypeEnum = {
47
+ Start: 'start',
48
+ Heartbeat: 'heartbeat',
49
+ Pause: 'pause',
50
+ Complete: 'complete',
51
+ MediaPlay: 'media_play',
52
+ MediaPause: 'media_pause',
53
+ MediaSeek: 'media_seek',
54
+ MediaEnded: 'media_ended',
55
+ Download: 'download',
56
+ LinkOpen: 'link_open',
57
+ DocumentOpen: 'document_open',
58
+ Terminate: 'terminate'
59
+ } as const;
60
+ export type PostResourceSessionActivityEventEventTypeEnum = typeof PostResourceSessionActivityEventEventTypeEnum[keyof typeof PostResourceSessionActivityEventEventTypeEnum];
61
+
62
+
63
+ /**
64
+ * Check if a given object implements the PostResourceSessionActivityEvent interface.
65
+ */
66
+ export function instanceOfPostResourceSessionActivityEvent(value: object): value is PostResourceSessionActivityEvent {
67
+ if (!('eventId' in value) || value['eventId'] === undefined) return false;
68
+ if (!('eventType' in value) || value['eventType'] === undefined) return false;
69
+ return true;
70
+ }
71
+
72
+ export function PostResourceSessionActivityEventFromJSON(json: any): PostResourceSessionActivityEvent {
73
+ return PostResourceSessionActivityEventFromJSONTyped(json, false);
74
+ }
75
+
76
+ export function PostResourceSessionActivityEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostResourceSessionActivityEvent {
77
+ if (json == null) {
78
+ return json;
79
+ }
80
+ return {
81
+
82
+ 'eventId': json['event_id'],
83
+ 'eventType': json['event_type'],
84
+ 'positionSeconds': json['position_seconds'] == null ? undefined : json['position_seconds'],
85
+ };
86
+ }
87
+
88
+ export function PostResourceSessionActivityEventToJSON(json: any): PostResourceSessionActivityEvent {
89
+ return PostResourceSessionActivityEventToJSONTyped(json, false);
90
+ }
91
+
92
+ export function PostResourceSessionActivityEventToJSONTyped(value?: PostResourceSessionActivityEvent | null, ignoreDiscriminator: boolean = false): any {
93
+ if (value == null) {
94
+ return value;
95
+ }
96
+
97
+ return {
98
+
99
+ 'event_id': value['eventId'],
100
+ 'event_type': value['eventType'],
101
+ 'position_seconds': value['positionSeconds'],
102
+ };
103
+ }
104
+
@@ -91,6 +91,10 @@ export * from './GetQuestionQuizzesInner';
91
91
  export * from './GetResource';
92
92
  export * from './GetResourceList';
93
93
  export * from './GetResourceSession';
94
+ export * from './GetResourceSessionActivity';
95
+ export * from './GetResourceSessionActivityEvent';
96
+ export * from './GetResourceSessionActivityEventList';
97
+ export * from './GetResourceSessionActivityList';
94
98
  export * from './GetResourceSessionDiagnostics';
95
99
  export * from './GetResourceSessionDiagnosticsCourseContext';
96
100
  export * from './GetResourceSessionDiagnosticsResource';
@@ -186,6 +190,7 @@ export * from './PostQuestion';
186
190
  export * from './PostQuestionAnswerChoicesInner';
187
191
  export * from './PostResetPassword';
188
192
  export * from './PostResource';
193
+ export * from './PostResourceSessionActivityEvent';
189
194
  export * from './PostResourceVersion';
190
195
  export * from './PostResourceVersionComplete';
191
196
  export * from './PostResourceVersionSession';