@easyedu/js-lsm-api 1.89.0 → 1.91.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 +28 -0
- package/README.md +24 -2
- package/dist/apis/ContentLibraryApi.d.ts +19 -0
- package/dist/apis/ContentLibraryApi.js +47 -0
- package/dist/apis/PlayerApi.d.ts +187 -0
- package/dist/apis/PlayerApi.js +401 -1
- package/dist/esm/apis/ContentLibraryApi.d.ts +19 -0
- package/dist/esm/apis/ContentLibraryApi.js +47 -0
- package/dist/esm/apis/PlayerApi.d.ts +187 -0
- package/dist/esm/apis/PlayerApi.js +400 -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 +191 -0
- package/dist/esm/models/GetResourceSession.js +128 -0
- package/dist/esm/models/GetResourceSessionDiagnostics.d.ts +76 -0
- package/dist/esm/models/GetResourceSessionDiagnostics.js +69 -0
- package/dist/esm/models/GetResourceSessionDiagnosticsCourseContext.d.ts +81 -0
- package/dist/esm/models/GetResourceSessionDiagnosticsCourseContext.js +76 -0
- package/dist/esm/models/GetResourceSessionDiagnosticsResource.d.ts +51 -0
- package/dist/esm/models/GetResourceSessionDiagnosticsResource.js +56 -0
- package/dist/esm/models/GetResourceSessionDiagnosticsScormSummary.d.ts +74 -0
- package/dist/esm/models/GetResourceSessionDiagnosticsScormSummary.js +59 -0
- package/dist/esm/models/GetResourceSessionDiagnosticsUser.d.ts +38 -0
- package/dist/esm/models/GetResourceSessionDiagnosticsUser.js +47 -0
- package/dist/esm/models/GetResourceSessionDiagnosticsVersion.d.ts +88 -0
- package/dist/esm/models/GetResourceSessionDiagnosticsVersion.js +67 -0
- package/dist/esm/models/GetResourceSessionList.d.ts +57 -0
- package/dist/esm/models/GetResourceSessionList.js +60 -0
- package/dist/esm/models/GetResourceSessionScormApiLogs.d.ts +57 -0
- package/dist/esm/models/GetResourceSessionScormApiLogs.js +60 -0
- package/dist/esm/models/GetResourceSessionScormData.d.ts +77 -0
- package/dist/esm/models/GetResourceSessionScormData.js +66 -0
- package/dist/esm/models/GetResourceSessionScormDataActivity.d.ts +44 -0
- package/dist/esm/models/GetResourceSessionScormDataActivity.js +45 -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/ResourceSessionScormApiLogItem.d.ts +79 -0
- package/dist/esm/models/ResourceSessionScormApiLogItem.js +73 -0
- package/dist/esm/models/index.d.ts +14 -0
- package/dist/esm/models/index.js +14 -0
- package/dist/models/GetCourseVersionItemSession.d.ts +7 -0
- package/dist/models/GetCourseVersionItemSession.js +5 -0
- package/dist/models/GetResourceSession.d.ts +191 -0
- package/dist/models/GetResourceSession.js +135 -0
- package/dist/models/GetResourceSessionDiagnostics.d.ts +76 -0
- package/dist/models/GetResourceSessionDiagnostics.js +76 -0
- package/dist/models/GetResourceSessionDiagnosticsCourseContext.d.ts +81 -0
- package/dist/models/GetResourceSessionDiagnosticsCourseContext.js +83 -0
- package/dist/models/GetResourceSessionDiagnosticsResource.d.ts +51 -0
- package/dist/models/GetResourceSessionDiagnosticsResource.js +63 -0
- package/dist/models/GetResourceSessionDiagnosticsScormSummary.d.ts +74 -0
- package/dist/models/GetResourceSessionDiagnosticsScormSummary.js +66 -0
- package/dist/models/GetResourceSessionDiagnosticsUser.d.ts +38 -0
- package/dist/models/GetResourceSessionDiagnosticsUser.js +54 -0
- package/dist/models/GetResourceSessionDiagnosticsVersion.d.ts +88 -0
- package/dist/models/GetResourceSessionDiagnosticsVersion.js +74 -0
- package/dist/models/GetResourceSessionList.d.ts +57 -0
- package/dist/models/GetResourceSessionList.js +67 -0
- package/dist/models/GetResourceSessionScormApiLogs.d.ts +57 -0
- package/dist/models/GetResourceSessionScormApiLogs.js +67 -0
- package/dist/models/GetResourceSessionScormData.d.ts +77 -0
- package/dist/models/GetResourceSessionScormData.js +73 -0
- package/dist/models/GetResourceSessionScormDataActivity.d.ts +44 -0
- package/dist/models/GetResourceSessionScormDataActivity.js +52 -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/ResourceSessionScormApiLogItem.d.ts +79 -0
- package/dist/models/ResourceSessionScormApiLogItem.js +81 -0
- package/dist/models/index.d.ts +14 -0
- package/dist/models/index.js +14 -0
- package/docs/ContentLibraryApi.md +73 -0
- package/docs/GetCourseVersionItemSession.md +2 -0
- package/docs/GetResourceSession.md +87 -0
- package/docs/GetResourceSessionDiagnostics.md +47 -0
- package/docs/GetResourceSessionDiagnosticsCourseContext.md +50 -0
- package/docs/GetResourceSessionDiagnosticsResource.md +40 -0
- package/docs/GetResourceSessionDiagnosticsScormSummary.md +48 -0
- package/docs/GetResourceSessionDiagnosticsUser.md +36 -0
- package/docs/GetResourceSessionDiagnosticsVersion.md +52 -0
- package/docs/GetResourceSessionList.md +43 -0
- package/docs/GetResourceSessionScormApiLogs.md +43 -0
- package/docs/GetResourceSessionScormData.md +49 -0
- package/docs/GetResourceSessionScormDataActivity.md +38 -0
- package/docs/PlayerApi.md +547 -0
- package/docs/PostResourceVersionSession.md +35 -0
- package/docs/ResourceSessionEnvironment.md +33 -0
- package/docs/ResourceSessionScormApiLogItem.md +47 -0
- package/package.json +1 -1
- package/src/apis/ContentLibraryApi.ts +72 -0
- package/src/apis/PlayerApi.ts +558 -0
- package/src/models/GetCourseVersionItemSession.ts +16 -0
- package/src/models/GetResourceSession.ts +313 -0
- package/src/models/GetResourceSessionDiagnostics.ts +161 -0
- package/src/models/GetResourceSessionDiagnosticsCourseContext.ts +148 -0
- package/src/models/GetResourceSessionDiagnosticsResource.ts +103 -0
- package/src/models/GetResourceSessionDiagnosticsScormSummary.ts +123 -0
- package/src/models/GetResourceSessionDiagnosticsUser.ts +75 -0
- package/src/models/GetResourceSessionDiagnosticsVersion.ts +141 -0
- package/src/models/GetResourceSessionList.ts +110 -0
- package/src/models/GetResourceSessionScormApiLogs.ts +110 -0
- package/src/models/GetResourceSessionScormData.ts +134 -0
- package/src/models/GetResourceSessionScormDataActivity.ts +81 -0
- package/src/models/PostResourceVersionSession.ts +65 -0
- package/src/models/ResourceSessionEnvironment.ts +53 -0
- package/src/models/ResourceSessionScormApiLogItem.ts +132 -0
- package/src/models/index.ts +14 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# PostResourceVersionSession
|
|
3
|
+
|
|
4
|
+
Start or resume an isolated demo session for an exact resource version.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`restart` | boolean
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { PostResourceVersionSession } from '@easyedu/js-lsm-api'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"restart": null,
|
|
20
|
+
} satisfies PostResourceVersionSession
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as PostResourceVersionSession
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# ResourceSessionEnvironment
|
|
3
|
+
|
|
4
|
+
Whether the session contributes to learner activity or is isolated administrator testing.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ResourceSessionEnvironment } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies ResourceSessionEnvironment
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as ResourceSessionEnvironment
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
# ResourceSessionScormApiLogItem
|
|
3
|
+
|
|
4
|
+
A recorded SCORM runtime call for a resource session.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | number
|
|
11
|
+
`createdAt` | number
|
|
12
|
+
`method` | string
|
|
13
|
+
`element` | string
|
|
14
|
+
`value` | string
|
|
15
|
+
`valueTruncated` | boolean
|
|
16
|
+
`errorCode` | string
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { ResourceSessionScormApiLogItem } from '@easyedu/js-lsm-api'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"id": null,
|
|
26
|
+
"createdAt": null,
|
|
27
|
+
"method": null,
|
|
28
|
+
"element": null,
|
|
29
|
+
"value": null,
|
|
30
|
+
"valueTruncated": null,
|
|
31
|
+
"errorCode": null,
|
|
32
|
+
} satisfies ResourceSessionScormApiLogItem
|
|
33
|
+
|
|
34
|
+
console.log(example)
|
|
35
|
+
|
|
36
|
+
// Convert the instance to a JSON string
|
|
37
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
38
|
+
console.log(exampleJSON)
|
|
39
|
+
|
|
40
|
+
// Parse the JSON string back to an object
|
|
41
|
+
const exampleParsed = JSON.parse(exampleJSON) as ResourceSessionScormApiLogItem
|
|
42
|
+
console.log(exampleParsed)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
46
|
+
|
|
47
|
+
|
package/package.json
CHANGED
|
@@ -28,6 +28,11 @@ import {
|
|
|
28
28
|
GetResourceListFromJSON,
|
|
29
29
|
GetResourceListToJSON,
|
|
30
30
|
} from '../models/GetResourceList';
|
|
31
|
+
import {
|
|
32
|
+
type GetResourceSession,
|
|
33
|
+
GetResourceSessionFromJSON,
|
|
34
|
+
GetResourceSessionToJSON,
|
|
35
|
+
} from '../models/GetResourceSession';
|
|
31
36
|
import {
|
|
32
37
|
type GetResourceUsage,
|
|
33
38
|
GetResourceUsageFromJSON,
|
|
@@ -53,6 +58,11 @@ import {
|
|
|
53
58
|
PostResourceVersionCompleteFromJSON,
|
|
54
59
|
PostResourceVersionCompleteToJSON,
|
|
55
60
|
} from '../models/PostResourceVersionComplete';
|
|
61
|
+
import {
|
|
62
|
+
type PostResourceVersionSession,
|
|
63
|
+
PostResourceVersionSessionFromJSON,
|
|
64
|
+
PostResourceVersionSessionToJSON,
|
|
65
|
+
} from '../models/PostResourceVersionSession';
|
|
56
66
|
import {
|
|
57
67
|
type PostResourceVersionUpload,
|
|
58
68
|
PostResourceVersionUploadFromJSON,
|
|
@@ -130,6 +140,12 @@ export interface PostResourceVersionPublishRequest {
|
|
|
130
140
|
versionId: string;
|
|
131
141
|
}
|
|
132
142
|
|
|
143
|
+
export interface PostResourceVersionSessionRequest {
|
|
144
|
+
resourceId: string;
|
|
145
|
+
versionId: string;
|
|
146
|
+
postResourceVersionSession?: PostResourceVersionSession;
|
|
147
|
+
}
|
|
148
|
+
|
|
133
149
|
export interface PostResourceVersionUploadRequest {
|
|
134
150
|
resourceId: string;
|
|
135
151
|
versionId: string;
|
|
@@ -715,6 +731,62 @@ export class ContentLibraryApi extends runtime.BaseAPI {
|
|
|
715
731
|
return await response.value();
|
|
716
732
|
}
|
|
717
733
|
|
|
734
|
+
/**
|
|
735
|
+
* Creates request options for postResourceVersionSession without sending the request
|
|
736
|
+
*/
|
|
737
|
+
async postResourceVersionSessionRequestOpts(requestParameters: PostResourceVersionSessionRequest): Promise<runtime.RequestOpts> {
|
|
738
|
+
if (requestParameters['resourceId'] == null) {
|
|
739
|
+
throw new runtime.RequiredError(
|
|
740
|
+
'resourceId',
|
|
741
|
+
'Required parameter "resourceId" was null or undefined when calling postResourceVersionSession().'
|
|
742
|
+
);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
if (requestParameters['versionId'] == null) {
|
|
746
|
+
throw new runtime.RequiredError(
|
|
747
|
+
'versionId',
|
|
748
|
+
'Required parameter "versionId" was null or undefined when calling postResourceVersionSession().'
|
|
749
|
+
);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
const queryParameters: any = {};
|
|
753
|
+
|
|
754
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
755
|
+
|
|
756
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
let urlPath = `/content-library/resources/{resourceId}/versions/{versionId}/sessions`;
|
|
760
|
+
urlPath = urlPath.replace('{resourceId}', encodeURIComponent(String(requestParameters['resourceId'])));
|
|
761
|
+
urlPath = urlPath.replace('{versionId}', encodeURIComponent(String(requestParameters['versionId'])));
|
|
762
|
+
|
|
763
|
+
return {
|
|
764
|
+
path: urlPath,
|
|
765
|
+
method: 'POST',
|
|
766
|
+
headers: headerParameters,
|
|
767
|
+
query: queryParameters,
|
|
768
|
+
body: PostResourceVersionSessionToJSON(requestParameters['postResourceVersionSession']),
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* Start or resume a demo session for an exact resource version
|
|
774
|
+
*/
|
|
775
|
+
async postResourceVersionSessionRaw(requestParameters: PostResourceVersionSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetResourceSession>> {
|
|
776
|
+
const requestOptions = await this.postResourceVersionSessionRequestOpts(requestParameters);
|
|
777
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
778
|
+
|
|
779
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetResourceSessionFromJSON(jsonValue));
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* Start or resume a demo session for an exact resource version
|
|
784
|
+
*/
|
|
785
|
+
async postResourceVersionSession(requestParameters: PostResourceVersionSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetResourceSession> {
|
|
786
|
+
const response = await this.postResourceVersionSessionRaw(requestParameters, initOverrides);
|
|
787
|
+
return await response.value();
|
|
788
|
+
}
|
|
789
|
+
|
|
718
790
|
/**
|
|
719
791
|
* Creates request options for postResourceVersionUpload without sending the request
|
|
720
792
|
*/
|