@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.
- package/.openapi-generator/FILES +8 -0
- package/README.md +11 -2
- package/dist/apis/ContentLibraryApi.d.ts +19 -0
- package/dist/apis/ContentLibraryApi.js +47 -0
- package/dist/apis/PlayerApi.d.ts +73 -0
- package/dist/apis/PlayerApi.js +188 -0
- package/dist/esm/apis/ContentLibraryApi.d.ts +19 -0
- package/dist/esm/apis/ContentLibraryApi.js +47 -0
- package/dist/esm/apis/PlayerApi.d.ts +73 -0
- package/dist/esm/apis/PlayerApi.js +188 -0
- package/dist/esm/models/GetCourseVersionItemSession.d.ts +7 -0
- package/dist/esm/models/GetCourseVersionItemSession.js +5 -0
- package/dist/esm/models/GetResourceSession.d.ts +161 -0
- package/dist/esm/models/GetResourceSession.js +112 -0
- package/dist/esm/models/GetResourceSessionList.d.ts +57 -0
- package/dist/esm/models/GetResourceSessionList.js +60 -0
- package/dist/esm/models/PostResourceVersionSession.d.ts +32 -0
- package/dist/esm/models/PostResourceVersionSession.js +41 -0
- package/dist/esm/models/ResourceSessionEnvironment.d.ts +25 -0
- package/dist/esm/models/ResourceSessionEnvironment.js +43 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/GetCourseVersionItemSession.d.ts +7 -0
- package/dist/models/GetCourseVersionItemSession.js +5 -0
- package/dist/models/GetResourceSession.d.ts +161 -0
- package/dist/models/GetResourceSession.js +119 -0
- package/dist/models/GetResourceSessionList.d.ts +57 -0
- package/dist/models/GetResourceSessionList.js +67 -0
- package/dist/models/PostResourceVersionSession.d.ts +32 -0
- package/dist/models/PostResourceVersionSession.js +48 -0
- package/dist/models/ResourceSessionEnvironment.d.ts +25 -0
- package/dist/models/ResourceSessionEnvironment.js +51 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/ContentLibraryApi.md +73 -0
- package/docs/GetCourseVersionItemSession.md +2 -0
- package/docs/GetResourceSession.md +77 -0
- package/docs/GetResourceSessionList.md +43 -0
- package/docs/PlayerApi.md +296 -0
- package/docs/PostResourceVersionSession.md +35 -0
- package/docs/ResourceSessionEnvironment.md +33 -0
- package/package.json +1 -1
- package/src/apis/ContentLibraryApi.ts +72 -0
- package/src/apis/PlayerApi.ts +261 -0
- package/src/models/GetCourseVersionItemSession.ts +16 -0
- package/src/models/GetResourceSession.ts +270 -0
- package/src/models/GetResourceSessionList.ts +110 -0
- package/src/models/PostResourceVersionSession.ts +65 -0
- package/src/models/ResourceSessionEnvironment.ts +53 -0
- 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,67 @@
|
|
|
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.instanceOfGetResourceSessionList = instanceOfGetResourceSessionList;
|
|
17
|
+
exports.GetResourceSessionListFromJSON = GetResourceSessionListFromJSON;
|
|
18
|
+
exports.GetResourceSessionListFromJSONTyped = GetResourceSessionListFromJSONTyped;
|
|
19
|
+
exports.GetResourceSessionListToJSON = GetResourceSessionListToJSON;
|
|
20
|
+
exports.GetResourceSessionListToJSONTyped = GetResourceSessionListToJSONTyped;
|
|
21
|
+
const GetResourceSession_1 = require("./GetResourceSession");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the GetResourceSessionList interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfGetResourceSessionList(value) {
|
|
26
|
+
if (!('page' in value) || value['page'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('pageSize' in value) || value['pageSize'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('totalPages' in value) || value['totalPages'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('totalItems' in value) || value['totalItems'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function GetResourceSessionListFromJSON(json) {
|
|
39
|
+
return GetResourceSessionListFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function GetResourceSessionListFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'page': json['page'],
|
|
47
|
+
'pageSize': json['pageSize'],
|
|
48
|
+
'totalPages': json['totalPages'],
|
|
49
|
+
'totalItems': json['totalItems'],
|
|
50
|
+
'items': (json['items'].map(GetResourceSession_1.GetResourceSessionFromJSON)),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function GetResourceSessionListToJSON(json) {
|
|
54
|
+
return GetResourceSessionListToJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function GetResourceSessionListToJSONTyped(value, ignoreDiscriminator = false) {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'page': value['page'],
|
|
62
|
+
'pageSize': value['pageSize'],
|
|
63
|
+
'totalPages': value['totalPages'],
|
|
64
|
+
'totalItems': value['totalItems'],
|
|
65
|
+
'items': (value['items'].map(GetResourceSession_1.GetResourceSessionToJSON)),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -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,48 @@
|
|
|
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.instanceOfPostResourceVersionSession = instanceOfPostResourceVersionSession;
|
|
17
|
+
exports.PostResourceVersionSessionFromJSON = PostResourceVersionSessionFromJSON;
|
|
18
|
+
exports.PostResourceVersionSessionFromJSONTyped = PostResourceVersionSessionFromJSONTyped;
|
|
19
|
+
exports.PostResourceVersionSessionToJSON = PostResourceVersionSessionToJSON;
|
|
20
|
+
exports.PostResourceVersionSessionToJSONTyped = PostResourceVersionSessionToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the PostResourceVersionSession interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfPostResourceVersionSession(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function PostResourceVersionSessionFromJSON(json) {
|
|
28
|
+
return PostResourceVersionSessionFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function PostResourceVersionSessionFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'restart': json['restart'] == null ? undefined : json['restart'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function PostResourceVersionSessionToJSON(json) {
|
|
39
|
+
return PostResourceVersionSessionToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function PostResourceVersionSessionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'restart': value['restart'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -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,51 @@
|
|
|
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.ResourceSessionEnvironment = void 0;
|
|
17
|
+
exports.instanceOfResourceSessionEnvironment = instanceOfResourceSessionEnvironment;
|
|
18
|
+
exports.ResourceSessionEnvironmentFromJSON = ResourceSessionEnvironmentFromJSON;
|
|
19
|
+
exports.ResourceSessionEnvironmentFromJSONTyped = ResourceSessionEnvironmentFromJSONTyped;
|
|
20
|
+
exports.ResourceSessionEnvironmentToJSON = ResourceSessionEnvironmentToJSON;
|
|
21
|
+
exports.ResourceSessionEnvironmentToJSONTyped = ResourceSessionEnvironmentToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the session contributes to learner activity or is isolated administrator testing.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.ResourceSessionEnvironment = {
|
|
27
|
+
Live: 'live',
|
|
28
|
+
Demo: 'demo'
|
|
29
|
+
};
|
|
30
|
+
function instanceOfResourceSessionEnvironment(value) {
|
|
31
|
+
for (const key in exports.ResourceSessionEnvironment) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(exports.ResourceSessionEnvironment, key)) {
|
|
33
|
+
if (exports.ResourceSessionEnvironment[key] === value) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
function ResourceSessionEnvironmentFromJSON(json) {
|
|
41
|
+
return ResourceSessionEnvironmentFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function ResourceSessionEnvironmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
function ResourceSessionEnvironmentToJSON(value) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
function ResourceSessionEnvironmentToJSONTyped(value, ignoreDiscriminator) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/models/index.js
CHANGED
|
@@ -198,6 +198,8 @@ __exportStar(require("./GetQuizResultsTiming"), exports);
|
|
|
198
198
|
__exportStar(require("./GetQuizStatistics"), exports);
|
|
199
199
|
__exportStar(require("./GetResource"), exports);
|
|
200
200
|
__exportStar(require("./GetResourceList"), exports);
|
|
201
|
+
__exportStar(require("./GetResourceSession"), exports);
|
|
202
|
+
__exportStar(require("./GetResourceSessionList"), exports);
|
|
201
203
|
__exportStar(require("./GetResourceUsage"), exports);
|
|
202
204
|
__exportStar(require("./GetResourceUsageCoursesInner"), exports);
|
|
203
205
|
__exportStar(require("./GetResourceVersionUpload"), exports);
|
|
@@ -315,6 +317,7 @@ __exportStar(require("./PostResetPassword"), exports);
|
|
|
315
317
|
__exportStar(require("./PostResource"), exports);
|
|
316
318
|
__exportStar(require("./PostResourceVersion"), exports);
|
|
317
319
|
__exportStar(require("./PostResourceVersionComplete"), exports);
|
|
320
|
+
__exportStar(require("./PostResourceVersionSession"), exports);
|
|
318
321
|
__exportStar(require("./PostResourceVersionUpload"), exports);
|
|
319
322
|
__exportStar(require("./PostRevokeCertificate"), exports);
|
|
320
323
|
__exportStar(require("./PostRichTextAssetComplete"), exports);
|
|
@@ -366,6 +369,7 @@ __exportStar(require("./PutUser"), exports);
|
|
|
366
369
|
__exportStar(require("./QuizContent"), exports);
|
|
367
370
|
__exportStar(require("./QuizContentAssignment"), exports);
|
|
368
371
|
__exportStar(require("./QuizContentSettings"), exports);
|
|
372
|
+
__exportStar(require("./ResourceSessionEnvironment"), exports);
|
|
369
373
|
__exportStar(require("./ResourceType"), exports);
|
|
370
374
|
__exportStar(require("./RichTextAsset"), exports);
|
|
371
375
|
__exportStar(require("./RichTextDocument"), exports);
|
|
@@ -15,6 +15,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
15
15
|
| [**postResourceVersion**](ContentLibraryApi.md#postresourceversion) | **POST** /content-library/resources/{resourceId}/versions | Create the next draft resource version |
|
|
16
16
|
| [**postResourceVersionArchive**](ContentLibraryApi.md#postresourceversionarchive) | **POST** /content-library/resources/{resourceId}/versions/{versionId}/archive | Archive a published resource version |
|
|
17
17
|
| [**postResourceVersionPublish**](ContentLibraryApi.md#postresourceversionpublish) | **POST** /content-library/resources/{resourceId}/versions/{versionId}/publish | Publish an immutable resource version |
|
|
18
|
+
| [**postResourceVersionSession**](ContentLibraryApi.md#postresourceversionsession) | **POST** /content-library/resources/{resourceId}/versions/{versionId}/sessions | Start or resume a demo session for an exact resource version |
|
|
18
19
|
| [**postResourceVersionUpload**](ContentLibraryApi.md#postresourceversionupload) | **POST** /content-library/resources/{resourceId}/versions/{versionId}/upload | Initialize a version-scoped file upload |
|
|
19
20
|
| [**postResourceVersionUploadComplete**](ContentLibraryApi.md#postresourceversionuploadcomplete) | **POST** /content-library/resources/{resourceId}/versions/{versionId}/upload/complete | Verify and complete a resource upload |
|
|
20
21
|
| [**putResource**](ContentLibraryApi.md#putresource) | **PUT** /content-library/resources/{resourceId} | Update resource library metadata |
|
|
@@ -778,6 +779,78 @@ No authorization required
|
|
|
778
779
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
779
780
|
|
|
780
781
|
|
|
782
|
+
## postResourceVersionSession
|
|
783
|
+
|
|
784
|
+
> GetResourceSession postResourceVersionSession(resourceId, versionId, postResourceVersionSession)
|
|
785
|
+
|
|
786
|
+
Start or resume a demo session for an exact resource version
|
|
787
|
+
|
|
788
|
+
### Example
|
|
789
|
+
|
|
790
|
+
```ts
|
|
791
|
+
import {
|
|
792
|
+
Configuration,
|
|
793
|
+
ContentLibraryApi,
|
|
794
|
+
} from '@easyedu/js-lsm-api';
|
|
795
|
+
import type { PostResourceVersionSessionRequest } from '@easyedu/js-lsm-api';
|
|
796
|
+
|
|
797
|
+
async function example() {
|
|
798
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
799
|
+
const api = new ContentLibraryApi();
|
|
800
|
+
|
|
801
|
+
const body = {
|
|
802
|
+
// string
|
|
803
|
+
resourceId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
804
|
+
// string
|
|
805
|
+
versionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
806
|
+
// PostResourceVersionSession (optional)
|
|
807
|
+
postResourceVersionSession: ...,
|
|
808
|
+
} satisfies PostResourceVersionSessionRequest;
|
|
809
|
+
|
|
810
|
+
try {
|
|
811
|
+
const data = await api.postResourceVersionSession(body);
|
|
812
|
+
console.log(data);
|
|
813
|
+
} catch (error) {
|
|
814
|
+
console.error(error);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
// Run the test
|
|
819
|
+
example().catch(console.error);
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
### Parameters
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
| Name | Type | Description | Notes |
|
|
826
|
+
|------------- | ------------- | ------------- | -------------|
|
|
827
|
+
| **resourceId** | `string` | | [Defaults to `undefined`] |
|
|
828
|
+
| **versionId** | `string` | | [Defaults to `undefined`] |
|
|
829
|
+
| **postResourceVersionSession** | [PostResourceVersionSession](PostResourceVersionSession.md) | | [Optional] |
|
|
830
|
+
|
|
831
|
+
### Return type
|
|
832
|
+
|
|
833
|
+
[**GetResourceSession**](GetResourceSession.md)
|
|
834
|
+
|
|
835
|
+
### Authorization
|
|
836
|
+
|
|
837
|
+
No authorization required
|
|
838
|
+
|
|
839
|
+
### HTTP request headers
|
|
840
|
+
|
|
841
|
+
- **Content-Type**: `application/json`
|
|
842
|
+
- **Accept**: `application/json`
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
### HTTP response details
|
|
846
|
+
| Status code | Description | Response headers |
|
|
847
|
+
|-------------|-------------|------------------|
|
|
848
|
+
| **200** | Current or newly restarted demo session | - |
|
|
849
|
+
| **404** | Resource version not found | - |
|
|
850
|
+
|
|
851
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
852
|
+
|
|
853
|
+
|
|
781
854
|
## postResourceVersionUpload
|
|
782
855
|
|
|
783
856
|
> GetResourceVersionUpload postResourceVersionUpload(resourceId, versionId, postResourceVersionUpload)
|
|
@@ -8,6 +8,7 @@ A learner resource attempt pinned to an immutable course and Content Library ver
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`id` | string
|
|
11
|
+
`environment` | [ResourceSessionEnvironment](ResourceSessionEnvironment.md)
|
|
11
12
|
`courseVersionId` | string
|
|
12
13
|
`itemId` | string
|
|
13
14
|
`contentLibraryItemId` | string
|
|
@@ -32,6 +33,7 @@ import type { GetCourseVersionItemSession } from '@easyedu/js-lsm-api'
|
|
|
32
33
|
// TODO: Update the object below with actual values
|
|
33
34
|
const example = {
|
|
34
35
|
"id": null,
|
|
36
|
+
"environment": null,
|
|
35
37
|
"courseVersionId": null,
|
|
36
38
|
"itemId": null,
|
|
37
39
|
"contentLibraryItemId": null,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
|
|
2
|
+
# GetResourceSession
|
|
3
|
+
|
|
4
|
+
A user-owned session pinned to an immutable Content Library resource version.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`userId` | string
|
|
12
|
+
`environment` | [ResourceSessionEnvironment](ResourceSessionEnvironment.md)
|
|
13
|
+
`courseId` | string
|
|
14
|
+
`courseVersionId` | string
|
|
15
|
+
`itemId` | string
|
|
16
|
+
`contentLibraryItemId` | string
|
|
17
|
+
`contentLibraryVersionId` | string
|
|
18
|
+
`resourceName` | string
|
|
19
|
+
`resourceType` | [ResourceType](ResourceType.md)
|
|
20
|
+
`launchMode` | [ContentLaunchMode](ContentLaunchMode.md)
|
|
21
|
+
`launchUrl` | string
|
|
22
|
+
`attemptNumber` | number
|
|
23
|
+
`isCurrent` | boolean
|
|
24
|
+
`completionStatus` | string
|
|
25
|
+
`gradeStatus` | string
|
|
26
|
+
`scoreRaw` | number
|
|
27
|
+
`initializedAt` | number
|
|
28
|
+
`terminatedAt` | number
|
|
29
|
+
`createdAt` | number
|
|
30
|
+
`updatedAt` | number
|
|
31
|
+
`completedAt` | number
|
|
32
|
+
|
|
33
|
+
## Example
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import type { GetResourceSession } from '@easyedu/js-lsm-api'
|
|
37
|
+
|
|
38
|
+
// TODO: Update the object below with actual values
|
|
39
|
+
const example = {
|
|
40
|
+
"id": null,
|
|
41
|
+
"userId": null,
|
|
42
|
+
"environment": null,
|
|
43
|
+
"courseId": null,
|
|
44
|
+
"courseVersionId": null,
|
|
45
|
+
"itemId": null,
|
|
46
|
+
"contentLibraryItemId": null,
|
|
47
|
+
"contentLibraryVersionId": null,
|
|
48
|
+
"resourceName": null,
|
|
49
|
+
"resourceType": null,
|
|
50
|
+
"launchMode": null,
|
|
51
|
+
"launchUrl": null,
|
|
52
|
+
"attemptNumber": null,
|
|
53
|
+
"isCurrent": null,
|
|
54
|
+
"completionStatus": null,
|
|
55
|
+
"gradeStatus": null,
|
|
56
|
+
"scoreRaw": null,
|
|
57
|
+
"initializedAt": null,
|
|
58
|
+
"terminatedAt": null,
|
|
59
|
+
"createdAt": null,
|
|
60
|
+
"updatedAt": null,
|
|
61
|
+
"completedAt": null,
|
|
62
|
+
} satisfies GetResourceSession
|
|
63
|
+
|
|
64
|
+
console.log(example)
|
|
65
|
+
|
|
66
|
+
// Convert the instance to a JSON string
|
|
67
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
68
|
+
console.log(exampleJSON)
|
|
69
|
+
|
|
70
|
+
// Parse the JSON string back to an object
|
|
71
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetResourceSession
|
|
72
|
+
console.log(exampleParsed)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
76
|
+
|
|
77
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
# GetResourceSessionList
|
|
3
|
+
|
|
4
|
+
A filtered page of resource sessions.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`page` | number
|
|
11
|
+
`pageSize` | number
|
|
12
|
+
`totalPages` | number
|
|
13
|
+
`totalItems` | number
|
|
14
|
+
`items` | [Array<GetResourceSession>](GetResourceSession.md)
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { GetResourceSessionList } from '@easyedu/js-lsm-api'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"page": null,
|
|
24
|
+
"pageSize": null,
|
|
25
|
+
"totalPages": null,
|
|
26
|
+
"totalItems": null,
|
|
27
|
+
"items": null,
|
|
28
|
+
} satisfies GetResourceSessionList
|
|
29
|
+
|
|
30
|
+
console.log(example)
|
|
31
|
+
|
|
32
|
+
// Convert the instance to a JSON string
|
|
33
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
34
|
+
console.log(exampleJSON)
|
|
35
|
+
|
|
36
|
+
// Parse the JSON string back to an object
|
|
37
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetResourceSessionList
|
|
38
|
+
console.log(exampleParsed)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
42
|
+
|
|
43
|
+
|