@easyedu/js-lsm-api 1.89.0 → 1.90.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 (50) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +11 -2
  3. package/dist/apis/ContentLibraryApi.d.ts +19 -0
  4. package/dist/apis/ContentLibraryApi.js +47 -0
  5. package/dist/apis/PlayerApi.d.ts +73 -0
  6. package/dist/apis/PlayerApi.js +188 -0
  7. package/dist/esm/apis/ContentLibraryApi.d.ts +19 -0
  8. package/dist/esm/apis/ContentLibraryApi.js +47 -0
  9. package/dist/esm/apis/PlayerApi.d.ts +73 -0
  10. package/dist/esm/apis/PlayerApi.js +188 -0
  11. package/dist/esm/models/GetCourseVersionItemSession.d.ts +7 -0
  12. package/dist/esm/models/GetCourseVersionItemSession.js +5 -0
  13. package/dist/esm/models/GetResourceSession.d.ts +161 -0
  14. package/dist/esm/models/GetResourceSession.js +112 -0
  15. package/dist/esm/models/GetResourceSessionList.d.ts +57 -0
  16. package/dist/esm/models/GetResourceSessionList.js +60 -0
  17. package/dist/esm/models/PostResourceVersionSession.d.ts +32 -0
  18. package/dist/esm/models/PostResourceVersionSession.js +41 -0
  19. package/dist/esm/models/ResourceSessionEnvironment.d.ts +25 -0
  20. package/dist/esm/models/ResourceSessionEnvironment.js +43 -0
  21. package/dist/esm/models/index.d.ts +4 -0
  22. package/dist/esm/models/index.js +4 -0
  23. package/dist/models/GetCourseVersionItemSession.d.ts +7 -0
  24. package/dist/models/GetCourseVersionItemSession.js +5 -0
  25. package/dist/models/GetResourceSession.d.ts +161 -0
  26. package/dist/models/GetResourceSession.js +119 -0
  27. package/dist/models/GetResourceSessionList.d.ts +57 -0
  28. package/dist/models/GetResourceSessionList.js +67 -0
  29. package/dist/models/PostResourceVersionSession.d.ts +32 -0
  30. package/dist/models/PostResourceVersionSession.js +48 -0
  31. package/dist/models/ResourceSessionEnvironment.d.ts +25 -0
  32. package/dist/models/ResourceSessionEnvironment.js +51 -0
  33. package/dist/models/index.d.ts +4 -0
  34. package/dist/models/index.js +4 -0
  35. package/docs/ContentLibraryApi.md +73 -0
  36. package/docs/GetCourseVersionItemSession.md +2 -0
  37. package/docs/GetResourceSession.md +77 -0
  38. package/docs/GetResourceSessionList.md +43 -0
  39. package/docs/PlayerApi.md +296 -0
  40. package/docs/PostResourceVersionSession.md +35 -0
  41. package/docs/ResourceSessionEnvironment.md +33 -0
  42. package/package.json +1 -1
  43. package/src/apis/ContentLibraryApi.ts +72 -0
  44. package/src/apis/PlayerApi.ts +261 -0
  45. package/src/models/GetCourseVersionItemSession.ts +16 -0
  46. package/src/models/GetResourceSession.ts +270 -0
  47. package/src/models/GetResourceSessionList.ts +110 -0
  48. package/src/models/PostResourceVersionSession.ts +65 -0
  49. package/src/models/ResourceSessionEnvironment.ts +53 -0
  50. package/src/models/index.ts +4 -0
@@ -0,0 +1,57 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { GetResourceSession } from './GetResourceSession';
13
+ /**
14
+ * A filtered page of resource sessions.
15
+ * @export
16
+ * @interface GetResourceSessionList
17
+ */
18
+ export interface GetResourceSessionList {
19
+ /**
20
+ *
21
+ * @type {number}
22
+ * @memberof GetResourceSessionList
23
+ */
24
+ page: number;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof GetResourceSessionList
29
+ */
30
+ pageSize: number;
31
+ /**
32
+ *
33
+ * @type {number}
34
+ * @memberof GetResourceSessionList
35
+ */
36
+ totalPages: number;
37
+ /**
38
+ *
39
+ * @type {number}
40
+ * @memberof GetResourceSessionList
41
+ */
42
+ totalItems: number;
43
+ /**
44
+ *
45
+ * @type {Array<GetResourceSession>}
46
+ * @memberof GetResourceSessionList
47
+ */
48
+ items: Array<GetResourceSession>;
49
+ }
50
+ /**
51
+ * Check if a given object implements the GetResourceSessionList interface.
52
+ */
53
+ export declare function instanceOfGetResourceSessionList(value: object): value is GetResourceSessionList;
54
+ export declare function GetResourceSessionListFromJSON(json: any): GetResourceSessionList;
55
+ export declare function GetResourceSessionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetResourceSessionList;
56
+ export declare function GetResourceSessionListToJSON(json: any): GetResourceSessionList;
57
+ export declare function GetResourceSessionListToJSONTyped(value?: GetResourceSessionList | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
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
+ import { GetResourceSessionFromJSON, GetResourceSessionToJSON, } from './GetResourceSession';
15
+ /**
16
+ * Check if a given object implements the GetResourceSessionList interface.
17
+ */
18
+ export function instanceOfGetResourceSessionList(value) {
19
+ if (!('page' in value) || value['page'] === undefined)
20
+ return false;
21
+ if (!('pageSize' in value) || value['pageSize'] === undefined)
22
+ return false;
23
+ if (!('totalPages' in value) || value['totalPages'] === undefined)
24
+ return false;
25
+ if (!('totalItems' in value) || value['totalItems'] === undefined)
26
+ return false;
27
+ if (!('items' in value) || value['items'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ export function GetResourceSessionListFromJSON(json) {
32
+ return GetResourceSessionListFromJSONTyped(json, false);
33
+ }
34
+ export function GetResourceSessionListFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'page': json['page'],
40
+ 'pageSize': json['pageSize'],
41
+ 'totalPages': json['totalPages'],
42
+ 'totalItems': json['totalItems'],
43
+ 'items': (json['items'].map(GetResourceSessionFromJSON)),
44
+ };
45
+ }
46
+ export function GetResourceSessionListToJSON(json) {
47
+ return GetResourceSessionListToJSONTyped(json, false);
48
+ }
49
+ export function GetResourceSessionListToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'page': value['page'],
55
+ 'pageSize': value['pageSize'],
56
+ 'totalPages': value['totalPages'],
57
+ 'totalItems': value['totalItems'],
58
+ 'items': (value['items'].map(GetResourceSessionToJSON)),
59
+ };
60
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Start or resume an isolated demo session for an exact resource version.
14
+ * @export
15
+ * @interface PostResourceVersionSession
16
+ */
17
+ export interface PostResourceVersionSession {
18
+ /**
19
+ * Create a clean demo attempt instead of resuming the current demo session.
20
+ * @type {boolean}
21
+ * @memberof PostResourceVersionSession
22
+ */
23
+ restart?: boolean;
24
+ }
25
+ /**
26
+ * Check if a given object implements the PostResourceVersionSession interface.
27
+ */
28
+ export declare function instanceOfPostResourceVersionSession(value: object): value is PostResourceVersionSession;
29
+ export declare function PostResourceVersionSessionFromJSON(json: any): PostResourceVersionSession;
30
+ export declare function PostResourceVersionSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostResourceVersionSession;
31
+ export declare function PostResourceVersionSessionToJSON(json: any): PostResourceVersionSession;
32
+ export declare function PostResourceVersionSessionToJSONTyped(value?: PostResourceVersionSession | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,41 @@
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
+ * Check if a given object implements the PostResourceVersionSession interface.
16
+ */
17
+ export function instanceOfPostResourceVersionSession(value) {
18
+ return true;
19
+ }
20
+ export function PostResourceVersionSessionFromJSON(json) {
21
+ return PostResourceVersionSessionFromJSONTyped(json, false);
22
+ }
23
+ export function PostResourceVersionSessionFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'restart': json['restart'] == null ? undefined : json['restart'],
29
+ };
30
+ }
31
+ export function PostResourceVersionSessionToJSON(json) {
32
+ return PostResourceVersionSessionToJSONTyped(json, false);
33
+ }
34
+ export function PostResourceVersionSessionToJSONTyped(value, ignoreDiscriminator = false) {
35
+ if (value == null) {
36
+ return value;
37
+ }
38
+ return {
39
+ 'restart': value['restart'],
40
+ };
41
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Whether the session contributes to learner activity or is isolated administrator testing.
14
+ * @export
15
+ */
16
+ export declare const ResourceSessionEnvironment: {
17
+ readonly Live: "live";
18
+ readonly Demo: "demo";
19
+ };
20
+ export type ResourceSessionEnvironment = typeof ResourceSessionEnvironment[keyof typeof ResourceSessionEnvironment];
21
+ export declare function instanceOfResourceSessionEnvironment(value: any): boolean;
22
+ export declare function ResourceSessionEnvironmentFromJSON(json: any): ResourceSessionEnvironment;
23
+ export declare function ResourceSessionEnvironmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceSessionEnvironment;
24
+ export declare function ResourceSessionEnvironmentToJSON(value?: ResourceSessionEnvironment | null): any;
25
+ export declare function ResourceSessionEnvironmentToJSONTyped(value: any, ignoreDiscriminator: boolean): ResourceSessionEnvironment;
@@ -0,0 +1,43 @@
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
+ * Whether the session contributes to learner activity or is isolated administrator testing.
16
+ * @export
17
+ */
18
+ export const ResourceSessionEnvironment = {
19
+ Live: 'live',
20
+ Demo: 'demo'
21
+ };
22
+ export function instanceOfResourceSessionEnvironment(value) {
23
+ for (const key in ResourceSessionEnvironment) {
24
+ if (Object.prototype.hasOwnProperty.call(ResourceSessionEnvironment, key)) {
25
+ if (ResourceSessionEnvironment[key] === value) {
26
+ return true;
27
+ }
28
+ }
29
+ }
30
+ return false;
31
+ }
32
+ export function ResourceSessionEnvironmentFromJSON(json) {
33
+ return ResourceSessionEnvironmentFromJSONTyped(json, false);
34
+ }
35
+ export function ResourceSessionEnvironmentFromJSONTyped(json, ignoreDiscriminator) {
36
+ return json;
37
+ }
38
+ export function ResourceSessionEnvironmentToJSON(value) {
39
+ return value;
40
+ }
41
+ export function ResourceSessionEnvironmentToJSONTyped(value, ignoreDiscriminator) {
42
+ return value;
43
+ }
@@ -180,6 +180,8 @@ export * from './GetQuizResultsTiming';
180
180
  export * from './GetQuizStatistics';
181
181
  export * from './GetResource';
182
182
  export * from './GetResourceList';
183
+ export * from './GetResourceSession';
184
+ export * from './GetResourceSessionList';
183
185
  export * from './GetResourceUsage';
184
186
  export * from './GetResourceUsageCoursesInner';
185
187
  export * from './GetResourceVersionUpload';
@@ -297,6 +299,7 @@ export * from './PostResetPassword';
297
299
  export * from './PostResource';
298
300
  export * from './PostResourceVersion';
299
301
  export * from './PostResourceVersionComplete';
302
+ export * from './PostResourceVersionSession';
300
303
  export * from './PostResourceVersionUpload';
301
304
  export * from './PostRevokeCertificate';
302
305
  export * from './PostRichTextAssetComplete';
@@ -348,6 +351,7 @@ export * from './PutUser';
348
351
  export * from './QuizContent';
349
352
  export * from './QuizContentAssignment';
350
353
  export * from './QuizContentSettings';
354
+ export * from './ResourceSessionEnvironment';
351
355
  export * from './ResourceType';
352
356
  export * from './RichTextAsset';
353
357
  export * from './RichTextDocument';
@@ -182,6 +182,8 @@ export * from './GetQuizResultsTiming';
182
182
  export * from './GetQuizStatistics';
183
183
  export * from './GetResource';
184
184
  export * from './GetResourceList';
185
+ export * from './GetResourceSession';
186
+ export * from './GetResourceSessionList';
185
187
  export * from './GetResourceUsage';
186
188
  export * from './GetResourceUsageCoursesInner';
187
189
  export * from './GetResourceVersionUpload';
@@ -299,6 +301,7 @@ export * from './PostResetPassword';
299
301
  export * from './PostResource';
300
302
  export * from './PostResourceVersion';
301
303
  export * from './PostResourceVersionComplete';
304
+ export * from './PostResourceVersionSession';
302
305
  export * from './PostResourceVersionUpload';
303
306
  export * from './PostRevokeCertificate';
304
307
  export * from './PostRichTextAssetComplete';
@@ -350,6 +353,7 @@ export * from './PutUser';
350
353
  export * from './QuizContent';
351
354
  export * from './QuizContentAssignment';
352
355
  export * from './QuizContentSettings';
356
+ export * from './ResourceSessionEnvironment';
353
357
  export * from './ResourceType';
354
358
  export * from './RichTextAsset';
355
359
  export * from './RichTextDocument';
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { ResourceSessionEnvironment } from './ResourceSessionEnvironment';
12
13
  import type { ResourceType } from './ResourceType';
13
14
  import type { ContentLaunchMode } from './ContentLaunchMode';
14
15
  /**
@@ -23,6 +24,12 @@ export interface GetCourseVersionItemSession {
23
24
  * @memberof GetCourseVersionItemSession
24
25
  */
25
26
  id: string;
27
+ /**
28
+ *
29
+ * @type {ResourceSessionEnvironment}
30
+ * @memberof GetCourseVersionItemSession
31
+ */
32
+ environment: ResourceSessionEnvironment;
26
33
  /**
27
34
  *
28
35
  * @type {string}
@@ -18,6 +18,7 @@ exports.GetCourseVersionItemSessionFromJSON = GetCourseVersionItemSessionFromJSO
18
18
  exports.GetCourseVersionItemSessionFromJSONTyped = GetCourseVersionItemSessionFromJSONTyped;
19
19
  exports.GetCourseVersionItemSessionToJSON = GetCourseVersionItemSessionToJSON;
20
20
  exports.GetCourseVersionItemSessionToJSONTyped = GetCourseVersionItemSessionToJSONTyped;
21
+ const ResourceSessionEnvironment_1 = require("./ResourceSessionEnvironment");
21
22
  const ResourceType_1 = require("./ResourceType");
22
23
  const ContentLaunchMode_1 = require("./ContentLaunchMode");
23
24
  /**
@@ -26,6 +27,8 @@ const ContentLaunchMode_1 = require("./ContentLaunchMode");
26
27
  function instanceOfGetCourseVersionItemSession(value) {
27
28
  if (!('id' in value) || value['id'] === undefined)
28
29
  return false;
30
+ if (!('environment' in value) || value['environment'] === undefined)
31
+ return false;
29
32
  if (!('courseVersionId' in value) || value['courseVersionId'] === undefined)
30
33
  return false;
31
34
  if (!('itemId' in value) || value['itemId'] === undefined)
@@ -63,6 +66,7 @@ function GetCourseVersionItemSessionFromJSONTyped(json, ignoreDiscriminator) {
63
66
  }
64
67
  return {
65
68
  'id': json['id'],
69
+ 'environment': (0, ResourceSessionEnvironment_1.ResourceSessionEnvironmentFromJSON)(json['environment']),
66
70
  'courseVersionId': json['course_version_id'],
67
71
  'itemId': json['item_id'],
68
72
  'contentLibraryItemId': json['content_library_item_id'],
@@ -89,6 +93,7 @@ function GetCourseVersionItemSessionToJSONTyped(value, ignoreDiscriminator = fal
89
93
  }
90
94
  return {
91
95
  'id': value['id'],
96
+ 'environment': (0, ResourceSessionEnvironment_1.ResourceSessionEnvironmentToJSON)(value['environment']),
92
97
  'course_version_id': value['courseVersionId'],
93
98
  'item_id': value['itemId'],
94
99
  'content_library_item_id': value['contentLibraryItemId'],
@@ -0,0 +1,161 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { ResourceSessionEnvironment } from './ResourceSessionEnvironment';
13
+ import type { ResourceType } from './ResourceType';
14
+ import type { ContentLaunchMode } from './ContentLaunchMode';
15
+ /**
16
+ * A user-owned session pinned to an immutable Content Library resource version.
17
+ * @export
18
+ * @interface GetResourceSession
19
+ */
20
+ export interface GetResourceSession {
21
+ /**
22
+ *
23
+ * @type {string}
24
+ * @memberof GetResourceSession
25
+ */
26
+ id: string;
27
+ /**
28
+ *
29
+ * @type {string}
30
+ * @memberof GetResourceSession
31
+ */
32
+ userId: string;
33
+ /**
34
+ *
35
+ * @type {ResourceSessionEnvironment}
36
+ * @memberof GetResourceSession
37
+ */
38
+ environment: ResourceSessionEnvironment;
39
+ /**
40
+ *
41
+ * @type {string}
42
+ * @memberof GetResourceSession
43
+ */
44
+ courseId?: string | null;
45
+ /**
46
+ *
47
+ * @type {string}
48
+ * @memberof GetResourceSession
49
+ */
50
+ courseVersionId?: string | null;
51
+ /**
52
+ *
53
+ * @type {string}
54
+ * @memberof GetResourceSession
55
+ */
56
+ itemId?: string | null;
57
+ /**
58
+ *
59
+ * @type {string}
60
+ * @memberof GetResourceSession
61
+ */
62
+ contentLibraryItemId: string;
63
+ /**
64
+ *
65
+ * @type {string}
66
+ * @memberof GetResourceSession
67
+ */
68
+ contentLibraryVersionId: string;
69
+ /**
70
+ *
71
+ * @type {string}
72
+ * @memberof GetResourceSession
73
+ */
74
+ resourceName: string;
75
+ /**
76
+ *
77
+ * @type {ResourceType}
78
+ * @memberof GetResourceSession
79
+ */
80
+ resourceType: ResourceType;
81
+ /**
82
+ *
83
+ * @type {ContentLaunchMode}
84
+ * @memberof GetResourceSession
85
+ */
86
+ launchMode?: ContentLaunchMode | null;
87
+ /**
88
+ *
89
+ * @type {string}
90
+ * @memberof GetResourceSession
91
+ */
92
+ launchUrl?: string | null;
93
+ /**
94
+ *
95
+ * @type {number}
96
+ * @memberof GetResourceSession
97
+ */
98
+ attemptNumber: number;
99
+ /**
100
+ *
101
+ * @type {boolean}
102
+ * @memberof GetResourceSession
103
+ */
104
+ isCurrent: boolean;
105
+ /**
106
+ *
107
+ * @type {string}
108
+ * @memberof GetResourceSession
109
+ */
110
+ completionStatus: string;
111
+ /**
112
+ *
113
+ * @type {string}
114
+ * @memberof GetResourceSession
115
+ */
116
+ gradeStatus: string;
117
+ /**
118
+ *
119
+ * @type {number}
120
+ * @memberof GetResourceSession
121
+ */
122
+ scoreRaw?: number | null;
123
+ /**
124
+ *
125
+ * @type {number}
126
+ * @memberof GetResourceSession
127
+ */
128
+ initializedAt?: number | null;
129
+ /**
130
+ *
131
+ * @type {number}
132
+ * @memberof GetResourceSession
133
+ */
134
+ terminatedAt?: number | null;
135
+ /**
136
+ *
137
+ * @type {number}
138
+ * @memberof GetResourceSession
139
+ */
140
+ createdAt: number;
141
+ /**
142
+ *
143
+ * @type {number}
144
+ * @memberof GetResourceSession
145
+ */
146
+ updatedAt: number;
147
+ /**
148
+ *
149
+ * @type {number}
150
+ * @memberof GetResourceSession
151
+ */
152
+ completedAt?: number | null;
153
+ }
154
+ /**
155
+ * Check if a given object implements the GetResourceSession interface.
156
+ */
157
+ export declare function instanceOfGetResourceSession(value: object): value is GetResourceSession;
158
+ export declare function GetResourceSessionFromJSON(json: any): GetResourceSession;
159
+ export declare function GetResourceSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetResourceSession;
160
+ export declare function GetResourceSessionToJSON(json: any): GetResourceSession;
161
+ export declare function GetResourceSessionToJSONTyped(value?: GetResourceSession | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfGetResourceSession = instanceOfGetResourceSession;
17
+ exports.GetResourceSessionFromJSON = GetResourceSessionFromJSON;
18
+ exports.GetResourceSessionFromJSONTyped = GetResourceSessionFromJSONTyped;
19
+ exports.GetResourceSessionToJSON = GetResourceSessionToJSON;
20
+ exports.GetResourceSessionToJSONTyped = GetResourceSessionToJSONTyped;
21
+ const ResourceSessionEnvironment_1 = require("./ResourceSessionEnvironment");
22
+ const ResourceType_1 = require("./ResourceType");
23
+ const ContentLaunchMode_1 = require("./ContentLaunchMode");
24
+ /**
25
+ * Check if a given object implements the GetResourceSession interface.
26
+ */
27
+ function instanceOfGetResourceSession(value) {
28
+ if (!('id' in value) || value['id'] === undefined)
29
+ return false;
30
+ if (!('userId' in value) || value['userId'] === undefined)
31
+ return false;
32
+ if (!('environment' in value) || value['environment'] === undefined)
33
+ return false;
34
+ if (!('contentLibraryItemId' in value) || value['contentLibraryItemId'] === undefined)
35
+ return false;
36
+ if (!('contentLibraryVersionId' in value) || value['contentLibraryVersionId'] === undefined)
37
+ return false;
38
+ if (!('resourceName' in value) || value['resourceName'] === undefined)
39
+ return false;
40
+ if (!('resourceType' in value) || value['resourceType'] === undefined)
41
+ return false;
42
+ if (!('attemptNumber' in value) || value['attemptNumber'] === undefined)
43
+ return false;
44
+ if (!('isCurrent' in value) || value['isCurrent'] === undefined)
45
+ return false;
46
+ if (!('completionStatus' in value) || value['completionStatus'] === undefined)
47
+ return false;
48
+ if (!('gradeStatus' in value) || value['gradeStatus'] === undefined)
49
+ return false;
50
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
51
+ return false;
52
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
53
+ return false;
54
+ return true;
55
+ }
56
+ function GetResourceSessionFromJSON(json) {
57
+ return GetResourceSessionFromJSONTyped(json, false);
58
+ }
59
+ function GetResourceSessionFromJSONTyped(json, ignoreDiscriminator) {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+ 'id': json['id'],
65
+ 'userId': json['user_id'],
66
+ 'environment': (0, ResourceSessionEnvironment_1.ResourceSessionEnvironmentFromJSON)(json['environment']),
67
+ 'courseId': json['course_id'] == null ? undefined : json['course_id'],
68
+ 'courseVersionId': json['course_version_id'] == null ? undefined : json['course_version_id'],
69
+ 'itemId': json['item_id'] == null ? undefined : json['item_id'],
70
+ 'contentLibraryItemId': json['content_library_item_id'],
71
+ 'contentLibraryVersionId': json['content_library_version_id'],
72
+ 'resourceName': json['resource_name'],
73
+ 'resourceType': (0, ResourceType_1.ResourceTypeFromJSON)(json['resource_type']),
74
+ 'launchMode': json['launch_mode'] == null ? undefined : (0, ContentLaunchMode_1.ContentLaunchModeFromJSON)(json['launch_mode']),
75
+ 'launchUrl': json['launch_url'] == null ? undefined : json['launch_url'],
76
+ 'attemptNumber': json['attempt_number'],
77
+ 'isCurrent': json['is_current'],
78
+ 'completionStatus': json['completion_status'],
79
+ 'gradeStatus': json['grade_status'],
80
+ 'scoreRaw': json['score_raw'] == null ? undefined : json['score_raw'],
81
+ 'initializedAt': json['initialized_at'] == null ? undefined : json['initialized_at'],
82
+ 'terminatedAt': json['terminated_at'] == null ? undefined : json['terminated_at'],
83
+ 'createdAt': json['created_at'],
84
+ 'updatedAt': json['updated_at'],
85
+ 'completedAt': json['completed_at'] == null ? undefined : json['completed_at'],
86
+ };
87
+ }
88
+ function GetResourceSessionToJSON(json) {
89
+ return GetResourceSessionToJSONTyped(json, false);
90
+ }
91
+ function GetResourceSessionToJSONTyped(value, ignoreDiscriminator = false) {
92
+ if (value == null) {
93
+ return value;
94
+ }
95
+ return {
96
+ 'id': value['id'],
97
+ 'user_id': value['userId'],
98
+ 'environment': (0, ResourceSessionEnvironment_1.ResourceSessionEnvironmentToJSON)(value['environment']),
99
+ 'course_id': value['courseId'],
100
+ 'course_version_id': value['courseVersionId'],
101
+ 'item_id': value['itemId'],
102
+ 'content_library_item_id': value['contentLibraryItemId'],
103
+ 'content_library_version_id': value['contentLibraryVersionId'],
104
+ 'resource_name': value['resourceName'],
105
+ 'resource_type': (0, ResourceType_1.ResourceTypeToJSON)(value['resourceType']),
106
+ 'launch_mode': (0, ContentLaunchMode_1.ContentLaunchModeToJSON)(value['launchMode']),
107
+ 'launch_url': value['launchUrl'],
108
+ 'attempt_number': value['attemptNumber'],
109
+ 'is_current': value['isCurrent'],
110
+ 'completion_status': value['completionStatus'],
111
+ 'grade_status': value['gradeStatus'],
112
+ 'score_raw': value['scoreRaw'],
113
+ 'initialized_at': value['initializedAt'],
114
+ 'terminated_at': value['terminatedAt'],
115
+ 'created_at': value['createdAt'],
116
+ 'updated_at': value['updatedAt'],
117
+ 'completed_at': value['completedAt'],
118
+ };
119
+ }