@easyedu/js-lsm-api 1.82.0 → 1.84.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 +60 -0
- package/README.md +64 -2
- package/dist/apis/ContentLibraryApi.d.ts +290 -0
- package/dist/apis/ContentLibraryApi.js +744 -0
- package/dist/apis/CourseApi.d.ts +172 -0
- package/dist/apis/CourseApi.js +443 -0
- package/dist/apis/PlayerApi.d.ts +112 -0
- package/dist/apis/PlayerApi.js +297 -0
- package/dist/apis/QuizApi.d.ts +3 -2
- package/dist/apis/QuizApi.js +4 -2
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/ContentLibraryApi.d.ts +290 -0
- package/dist/esm/apis/ContentLibraryApi.js +740 -0
- package/dist/esm/apis/CourseApi.d.ts +172 -0
- package/dist/esm/apis/CourseApi.js +443 -0
- package/dist/esm/apis/PlayerApi.d.ts +112 -0
- package/dist/esm/apis/PlayerApi.js +297 -0
- package/dist/esm/apis/QuizApi.d.ts +3 -2
- package/dist/esm/apis/QuizApi.js +4 -2
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ContentLibraryVersionStatus.d.ts +26 -0
- package/dist/esm/models/ContentLibraryVersionStatus.js +44 -0
- package/dist/esm/models/GetContentLibraryVersion.d.ts +126 -0
- package/dist/esm/models/GetContentLibraryVersion.js +87 -0
- package/dist/esm/models/GetCourseVersion.d.ts +101 -0
- package/dist/esm/models/GetCourseVersion.js +86 -0
- package/dist/esm/models/GetCourseVersionItem.d.ts +135 -0
- package/dist/esm/models/GetCourseVersionItem.js +104 -0
- package/dist/esm/models/GetCourseVersionItemLaunch.d.ts +103 -0
- package/dist/esm/models/GetCourseVersionItemLaunch.js +82 -0
- package/dist/esm/models/GetCourseVersionItemSession.d.ts +124 -0
- package/dist/esm/models/GetCourseVersionItemSession.js +101 -0
- package/dist/esm/models/GetCourseVersionList.d.ts +33 -0
- package/dist/esm/models/GetCourseVersionList.js +44 -0
- package/dist/esm/models/GetCourseVersionModule.d.ts +64 -0
- package/dist/esm/models/GetCourseVersionModule.js +65 -0
- package/dist/esm/models/GetQuizAttemptQuestionsInner.d.ts +7 -0
- package/dist/esm/models/GetQuizAttemptQuestionsInner.js +3 -0
- package/dist/esm/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.d.ts +7 -0
- package/dist/esm/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.js +3 -0
- package/dist/esm/models/GetQuizResultsQuestionsInner.d.ts +13 -0
- package/dist/esm/models/GetQuizResultsQuestionsInner.js +5 -0
- package/dist/esm/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.d.ts +7 -0
- package/dist/esm/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.js +3 -0
- package/dist/esm/models/GetResource.d.ts +118 -0
- package/dist/esm/models/GetResource.js +95 -0
- package/dist/esm/models/GetResourceList.d.ts +57 -0
- package/dist/esm/models/GetResourceList.js +60 -0
- package/dist/esm/models/GetResourceUsage.d.ts +63 -0
- package/dist/esm/models/GetResourceUsage.js +64 -0
- package/dist/esm/models/GetResourceUsageCoursesInner.d.ts +63 -0
- package/dist/esm/models/GetResourceUsageCoursesInner.js +64 -0
- package/dist/esm/models/GetResourceVersionUpload.d.ts +38 -0
- package/dist/esm/models/GetResourceVersionUpload.js +47 -0
- package/dist/esm/models/PostCourseDraft.d.ts +32 -0
- package/dist/esm/models/PostCourseDraft.js +41 -0
- package/dist/esm/models/PostCourseVersionItem.d.ts +97 -0
- package/dist/esm/models/PostCourseVersionItem.js +71 -0
- package/dist/esm/models/PostCourseVersionItemSession.d.ts +32 -0
- package/dist/esm/models/PostCourseVersionItemSession.js +41 -0
- package/dist/esm/models/PostCourseVersionPublish.d.ts +32 -0
- package/dist/esm/models/PostCourseVersionPublish.js +41 -0
- package/dist/esm/models/PostQuizAttemptQuestionsInner.d.ts +7 -0
- package/dist/esm/models/PostQuizAttemptQuestionsInner.js +3 -0
- package/dist/esm/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.d.ts +7 -0
- package/dist/esm/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.js +3 -0
- package/dist/esm/models/PostResource.d.ts +58 -0
- package/dist/esm/models/PostResource.js +55 -0
- package/dist/esm/models/PostResourceVersion.d.ts +45 -0
- package/dist/esm/models/PostResourceVersion.js +46 -0
- package/dist/esm/models/PostResourceVersionComplete.d.ts +32 -0
- package/dist/esm/models/PostResourceVersionComplete.js +43 -0
- package/dist/esm/models/PostResourceVersionUpload.d.ts +50 -0
- package/dist/esm/models/PostResourceVersionUpload.js +55 -0
- package/dist/esm/models/PutCourseVersionItem.d.ts +85 -0
- package/dist/esm/models/PutCourseVersionItem.js +63 -0
- package/dist/esm/models/PutQuizAnswerResponse.d.ts +77 -0
- package/dist/esm/models/PutQuizAnswerResponse.js +64 -0
- package/dist/esm/models/PutQuizAnswerResponseNextQuestion.d.ts +102 -0
- package/dist/esm/models/PutQuizAnswerResponseNextQuestion.js +88 -0
- package/dist/esm/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.d.ts +51 -0
- package/dist/esm/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.js +54 -0
- package/dist/esm/models/PutQuizAnswerResponseProgress.d.ts +50 -0
- package/dist/esm/models/PutQuizAnswerResponseProgress.js +55 -0
- package/dist/esm/models/PutResource.d.ts +38 -0
- package/dist/esm/models/PutResource.js +43 -0
- package/dist/esm/models/PutResourceVersion.d.ts +53 -0
- package/dist/esm/models/PutResourceVersion.js +48 -0
- package/dist/esm/models/ResourceType.d.ts +32 -0
- package/dist/esm/models/ResourceType.js +50 -0
- package/dist/esm/models/index.d.ts +29 -0
- package/dist/esm/models/index.js +29 -0
- package/dist/models/ContentLibraryVersionStatus.d.ts +26 -0
- package/dist/models/ContentLibraryVersionStatus.js +52 -0
- package/dist/models/GetContentLibraryVersion.d.ts +126 -0
- package/dist/models/GetContentLibraryVersion.js +94 -0
- package/dist/models/GetCourseVersion.d.ts +101 -0
- package/dist/models/GetCourseVersion.js +93 -0
- package/dist/models/GetCourseVersionItem.d.ts +135 -0
- package/dist/models/GetCourseVersionItem.js +112 -0
- package/dist/models/GetCourseVersionItemLaunch.d.ts +103 -0
- package/dist/models/GetCourseVersionItemLaunch.js +89 -0
- package/dist/models/GetCourseVersionItemSession.d.ts +124 -0
- package/dist/models/GetCourseVersionItemSession.js +108 -0
- package/dist/models/GetCourseVersionList.d.ts +33 -0
- package/dist/models/GetCourseVersionList.js +51 -0
- package/dist/models/GetCourseVersionModule.d.ts +64 -0
- package/dist/models/GetCourseVersionModule.js +72 -0
- package/dist/models/GetQuizAttemptQuestionsInner.d.ts +7 -0
- package/dist/models/GetQuizAttemptQuestionsInner.js +3 -0
- package/dist/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.d.ts +7 -0
- package/dist/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.js +3 -0
- package/dist/models/GetQuizResultsQuestionsInner.d.ts +13 -0
- package/dist/models/GetQuizResultsQuestionsInner.js +5 -0
- package/dist/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.d.ts +7 -0
- package/dist/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.js +3 -0
- package/dist/models/GetResource.d.ts +118 -0
- package/dist/models/GetResource.js +102 -0
- package/dist/models/GetResourceList.d.ts +57 -0
- package/dist/models/GetResourceList.js +67 -0
- package/dist/models/GetResourceUsage.d.ts +63 -0
- package/dist/models/GetResourceUsage.js +71 -0
- package/dist/models/GetResourceUsageCoursesInner.d.ts +63 -0
- package/dist/models/GetResourceUsageCoursesInner.js +71 -0
- package/dist/models/GetResourceVersionUpload.d.ts +38 -0
- package/dist/models/GetResourceVersionUpload.js +54 -0
- package/dist/models/PostCourseDraft.d.ts +32 -0
- package/dist/models/PostCourseDraft.js +48 -0
- package/dist/models/PostCourseVersionItem.d.ts +97 -0
- package/dist/models/PostCourseVersionItem.js +79 -0
- package/dist/models/PostCourseVersionItemSession.d.ts +32 -0
- package/dist/models/PostCourseVersionItemSession.js +48 -0
- package/dist/models/PostCourseVersionPublish.d.ts +32 -0
- package/dist/models/PostCourseVersionPublish.js +48 -0
- package/dist/models/PostQuizAttemptQuestionsInner.d.ts +7 -0
- package/dist/models/PostQuizAttemptQuestionsInner.js +3 -0
- package/dist/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.d.ts +7 -0
- package/dist/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.js +3 -0
- package/dist/models/PostResource.d.ts +58 -0
- package/dist/models/PostResource.js +62 -0
- package/dist/models/PostResourceVersion.d.ts +45 -0
- package/dist/models/PostResourceVersion.js +53 -0
- package/dist/models/PostResourceVersionComplete.d.ts +32 -0
- package/dist/models/PostResourceVersionComplete.js +50 -0
- package/dist/models/PostResourceVersionUpload.d.ts +50 -0
- package/dist/models/PostResourceVersionUpload.js +62 -0
- package/dist/models/PutCourseVersionItem.d.ts +85 -0
- package/dist/models/PutCourseVersionItem.js +71 -0
- package/dist/models/PutQuizAnswerResponse.d.ts +77 -0
- package/dist/models/PutQuizAnswerResponse.js +71 -0
- package/dist/models/PutQuizAnswerResponseNextQuestion.d.ts +102 -0
- package/dist/models/PutQuizAnswerResponseNextQuestion.js +96 -0
- package/dist/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.d.ts +51 -0
- package/dist/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.js +61 -0
- package/dist/models/PutQuizAnswerResponseProgress.d.ts +50 -0
- package/dist/models/PutQuizAnswerResponseProgress.js +62 -0
- package/dist/models/PutResource.d.ts +38 -0
- package/dist/models/PutResource.js +50 -0
- package/dist/models/PutResourceVersion.d.ts +53 -0
- package/dist/models/PutResourceVersion.js +55 -0
- package/dist/models/ResourceType.d.ts +32 -0
- package/dist/models/ResourceType.js +58 -0
- package/dist/models/index.d.ts +29 -0
- package/dist/models/index.js +29 -0
- package/docs/ContentLibraryApi.md +1132 -0
- package/docs/ContentLibraryVersionStatus.md +33 -0
- package/docs/CourseApi.md +797 -96
- package/docs/GetContentLibraryVersion.md +64 -0
- package/docs/GetCourseVersion.md +56 -0
- package/docs/GetCourseVersionItem.md +62 -0
- package/docs/GetCourseVersionItemLaunch.md +56 -0
- package/docs/GetCourseVersionItemSession.md +65 -0
- package/docs/GetCourseVersionList.md +34 -0
- package/docs/GetCourseVersionModule.md +44 -0
- package/docs/GetQuizAttemptQuestionsInner.md +2 -0
- package/docs/GetQuizAttemptQuestionsInnerAnswerChoicesInner.md +2 -0
- package/docs/GetQuizResultsQuestionsInner.md +4 -0
- package/docs/GetQuizResultsQuestionsInnerAnswerChoicesInner.md +2 -0
- package/docs/GetResource.md +62 -0
- package/docs/GetResourceList.md +42 -0
- package/docs/GetResourceUsage.md +44 -0
- package/docs/GetResourceUsageCoursesInner.md +44 -0
- package/docs/GetResourceVersionUpload.md +36 -0
- package/docs/PlayerApi.md +480 -0
- package/docs/PostCourseDraft.md +34 -0
- package/docs/PostCourseVersionItem.md +52 -0
- package/docs/PostCourseVersionItemSession.md +35 -0
- package/docs/PostCourseVersionPublish.md +34 -0
- package/docs/PostQuizAttemptQuestionsInner.md +2 -0
- package/docs/PostQuizAttemptQuestionsInnerAnswerChoicesInner.md +2 -0
- package/docs/PostResource.md +42 -0
- package/docs/PostResourceVersion.md +38 -0
- package/docs/PostResourceVersionComplete.md +34 -0
- package/docs/PostResourceVersionUpload.md +40 -0
- package/docs/PutCourseVersionItem.md +48 -0
- package/docs/PutQuizAnswerResponse.md +48 -0
- package/docs/PutQuizAnswerResponseNextQuestion.md +52 -0
- package/docs/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.md +40 -0
- package/docs/PutQuizAnswerResponseProgress.md +40 -0
- package/docs/PutResource.md +36 -0
- package/docs/PutResourceVersion.md +40 -0
- package/docs/QuizApi.md +3 -3
- package/docs/ResourceType.md +33 -0
- package/package.json +1 -1
- package/src/apis/ContentLibraryApi.ts +1024 -0
- package/src/apis/CourseApi.ts +636 -0
- package/src/apis/PlayerApi.ts +400 -0
- package/src/apis/QuizApi.ts +10 -4
- package/src/apis/index.ts +1 -0
- package/src/models/ContentLibraryVersionStatus.ts +54 -0
- package/src/models/GetContentLibraryVersion.ts +209 -0
- package/src/models/GetCourseVersion.ts +187 -0
- package/src/models/GetCourseVersionItem.ts +215 -0
- package/src/models/GetCourseVersionItemLaunch.ts +185 -0
- package/src/models/GetCourseVersionItemSession.ts +216 -0
- package/src/models/GetCourseVersionList.ts +74 -0
- package/src/models/GetCourseVersionModule.ts +126 -0
- package/src/models/GetQuizAttemptQuestionsInner.ts +15 -0
- package/src/models/GetQuizAttemptQuestionsInnerAnswerChoicesInner.ts +16 -0
- package/src/models/GetQuizResultsQuestionsInner.ts +23 -0
- package/src/models/GetQuizResultsQuestionsInnerAnswerChoicesInner.ts +16 -0
- package/src/models/GetResource.ts +206 -0
- package/src/models/GetResourceList.ts +110 -0
- package/src/models/GetResourceUsage.ts +119 -0
- package/src/models/GetResourceUsageCoursesInner.ts +121 -0
- package/src/models/GetResourceVersionUpload.ts +75 -0
- package/src/models/PostCourseDraft.ts +65 -0
- package/src/models/PostCourseVersionItem.ts +158 -0
- package/src/models/PostCourseVersionItemSession.ts +65 -0
- package/src/models/PostCourseVersionPublish.ts +65 -0
- package/src/models/PostQuizAttemptQuestionsInner.ts +15 -0
- package/src/models/PostQuizAttemptQuestionsInnerAnswerChoicesInner.ts +16 -0
- package/src/models/PostResource.ts +116 -0
- package/src/models/PostResourceVersion.ts +89 -0
- package/src/models/PostResourceVersionComplete.ts +66 -0
- package/src/models/PostResourceVersionUpload.ts +93 -0
- package/src/models/PutCourseVersionItem.ts +140 -0
- package/src/models/PutQuizAnswerResponse.ts +146 -0
- package/src/models/PutQuizAnswerResponseNextQuestion.ts +175 -0
- package/src/models/PutQuizAnswerResponseNextQuestionAnswerChoicesInner.ts +100 -0
- package/src/models/PutQuizAnswerResponseProgress.ts +93 -0
- package/src/models/PutResource.ts +73 -0
- package/src/models/PutResourceVersion.ts +97 -0
- package/src/models/ResourceType.ts +60 -0
- package/src/models/index.ts +29 -0
package/docs/PlayerApi.md
CHANGED
|
@@ -4,6 +4,8 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
| [**commitResourceScormSession**](PlayerApi.md#commitresourcescormsession) | **POST** /resource/sessions/{sessionId}/commit | Commit a reusable SCORM resource session |
|
|
8
|
+
| [**getCourseVersionResourceAsset**](PlayerApi.md#getcourseversionresourceasset) | **GET** /resource/course-versions/{courseVersionId}/items/{itemId}/asset/{assetPath} | Stream an asset from an exact course and resource version |
|
|
7
9
|
| [**getDispatchScormPlayer**](PlayerApi.md#getdispatchscormplayer) | **GET** /scorm/dispatch/session/{sessionId}/player | Dispatch SCORM player HTML page |
|
|
8
10
|
| [**getFileAsset**](PlayerApi.md#getfileasset) | **GET** /file/{contentId}/asset | File asset |
|
|
9
11
|
| [**getFilePlayer**](PlayerApi.md#getfileplayer) | **GET** /file/session/{sessionId}/player | File player HTML page |
|
|
@@ -11,13 +13,155 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
11
13
|
| [**getPdfAsset**](PlayerApi.md#getpdfasset) | **GET** /pdf/{contentId}/asset | PDF asset |
|
|
12
14
|
| [**getPdfPlayer**](PlayerApi.md#getpdfplayer) | **GET** /pdf/session/{sessionId}/player | PDF player HTML page |
|
|
13
15
|
| [**getQuizPlayer**](PlayerApi.md#getquizplayer) | **GET** /quiz/session/{sessionId}/player | Quiz player HTML page |
|
|
16
|
+
| [**getResourceScormValue**](PlayerApi.md#getresourcescormvalue) | **GET** /resource/sessions/{sessionId}/get-value | Read a CMI value from a reusable SCORM resource session |
|
|
17
|
+
| [**getResourceSessionPlayer**](PlayerApi.md#getresourcesessionplayer) | **GET** /resource/sessions/{sessionId}/player | Serve the player for a version-pinned reusable resource session |
|
|
14
18
|
| [**getScormAsset**](PlayerApi.md#getscormasset) | **GET** /scorm/{contentId}/scorm/asset/{assetPath} | SCORM package asset |
|
|
15
19
|
| [**getScormPlayer**](PlayerApi.md#getscormplayer) | **GET** /scorm/session/{sessionId}/player | SCORM player HTML page |
|
|
16
20
|
| [**getVideoAsset**](PlayerApi.md#getvideoasset) | **GET** /video/{contentId}/asset | Video asset |
|
|
17
21
|
| [**getVideoPlayer**](PlayerApi.md#getvideoplayer) | **GET** /video/session/{sessionId}/player | Video player HTML page |
|
|
22
|
+
| [**initializeResourceScormSession**](PlayerApi.md#initializeresourcescormsession) | **POST** /resource/sessions/{sessionId}/initialize | Initialize a reusable SCORM resource session |
|
|
23
|
+
| [**setResourceScormValue**](PlayerApi.md#setresourcescormvalue) | **POST** /resource/sessions/{sessionId}/set-value | Store a CMI value in a reusable SCORM resource session |
|
|
24
|
+
| [**terminateResourceScormSession**](PlayerApi.md#terminateresourcescormsession) | **POST** /resource/sessions/{sessionId}/terminate | Terminate a reusable SCORM resource session |
|
|
18
25
|
|
|
19
26
|
|
|
20
27
|
|
|
28
|
+
## commitResourceScormSession
|
|
29
|
+
|
|
30
|
+
> commitResourceScormSession(sessionId)
|
|
31
|
+
|
|
32
|
+
Commit a reusable SCORM resource session
|
|
33
|
+
|
|
34
|
+
### Example
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import {
|
|
38
|
+
Configuration,
|
|
39
|
+
PlayerApi,
|
|
40
|
+
} from '@easyedu/js-lsm-api';
|
|
41
|
+
import type { CommitResourceScormSessionRequest } from '@easyedu/js-lsm-api';
|
|
42
|
+
|
|
43
|
+
async function example() {
|
|
44
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
45
|
+
const api = new PlayerApi();
|
|
46
|
+
|
|
47
|
+
const body = {
|
|
48
|
+
// string
|
|
49
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
50
|
+
} satisfies CommitResourceScormSessionRequest;
|
|
51
|
+
|
|
52
|
+
try {
|
|
53
|
+
const data = await api.commitResourceScormSession(body);
|
|
54
|
+
console.log(data);
|
|
55
|
+
} catch (error) {
|
|
56
|
+
console.error(error);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Run the test
|
|
61
|
+
example().catch(console.error);
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Parameters
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
| Name | Type | Description | Notes |
|
|
68
|
+
|------------- | ------------- | ------------- | -------------|
|
|
69
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
`void` (Empty response body)
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
No authorization required
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: Not defined
|
|
82
|
+
- **Accept**: Not defined
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### HTTP response details
|
|
86
|
+
| Status code | Description | Response headers |
|
|
87
|
+
|-------------|-------------|------------------|
|
|
88
|
+
| **200** | Session committed | - |
|
|
89
|
+
| **403** | Session access denied | - |
|
|
90
|
+
|
|
91
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## getCourseVersionResourceAsset
|
|
95
|
+
|
|
96
|
+
> Blob getCourseVersionResourceAsset(courseVersionId, itemId, assetPath)
|
|
97
|
+
|
|
98
|
+
Stream an asset from an exact course and resource version
|
|
99
|
+
|
|
100
|
+
### Example
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
import {
|
|
104
|
+
Configuration,
|
|
105
|
+
PlayerApi,
|
|
106
|
+
} from '@easyedu/js-lsm-api';
|
|
107
|
+
import type { GetCourseVersionResourceAssetRequest } from '@easyedu/js-lsm-api';
|
|
108
|
+
|
|
109
|
+
async function example() {
|
|
110
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
111
|
+
const api = new PlayerApi();
|
|
112
|
+
|
|
113
|
+
const body = {
|
|
114
|
+
// string
|
|
115
|
+
courseVersionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
116
|
+
// string
|
|
117
|
+
itemId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
118
|
+
// string
|
|
119
|
+
assetPath: assetPath_example,
|
|
120
|
+
} satisfies GetCourseVersionResourceAssetRequest;
|
|
121
|
+
|
|
122
|
+
try {
|
|
123
|
+
const data = await api.getCourseVersionResourceAsset(body);
|
|
124
|
+
console.log(data);
|
|
125
|
+
} catch (error) {
|
|
126
|
+
console.error(error);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Run the test
|
|
131
|
+
example().catch(console.error);
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Parameters
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
| Name | Type | Description | Notes |
|
|
138
|
+
|------------- | ------------- | ------------- | -------------|
|
|
139
|
+
| **courseVersionId** | `string` | | [Defaults to `undefined`] |
|
|
140
|
+
| **itemId** | `string` | | [Defaults to `undefined`] |
|
|
141
|
+
| **assetPath** | `string` | | [Defaults to `undefined`] |
|
|
142
|
+
|
|
143
|
+
### Return type
|
|
144
|
+
|
|
145
|
+
**Blob**
|
|
146
|
+
|
|
147
|
+
### Authorization
|
|
148
|
+
|
|
149
|
+
No authorization required
|
|
150
|
+
|
|
151
|
+
### HTTP request headers
|
|
152
|
+
|
|
153
|
+
- **Content-Type**: Not defined
|
|
154
|
+
- **Accept**: `application/octet-stream`
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### HTTP response details
|
|
158
|
+
| Status code | Description | Response headers |
|
|
159
|
+
|-------------|-------------|------------------|
|
|
160
|
+
| **200** | Resource bytes | - |
|
|
161
|
+
|
|
162
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
163
|
+
|
|
164
|
+
|
|
21
165
|
## getDispatchScormPlayer
|
|
22
166
|
|
|
23
167
|
> getDispatchScormPlayer(sessionId)
|
|
@@ -487,6 +631,141 @@ No authorization required
|
|
|
487
631
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
488
632
|
|
|
489
633
|
|
|
634
|
+
## getResourceScormValue
|
|
635
|
+
|
|
636
|
+
> ScormGetValueResponse getResourceScormValue(sessionId, key)
|
|
637
|
+
|
|
638
|
+
Read a CMI value from a reusable SCORM resource session
|
|
639
|
+
|
|
640
|
+
### Example
|
|
641
|
+
|
|
642
|
+
```ts
|
|
643
|
+
import {
|
|
644
|
+
Configuration,
|
|
645
|
+
PlayerApi,
|
|
646
|
+
} from '@easyedu/js-lsm-api';
|
|
647
|
+
import type { GetResourceScormValueRequest } from '@easyedu/js-lsm-api';
|
|
648
|
+
|
|
649
|
+
async function example() {
|
|
650
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
651
|
+
const api = new PlayerApi();
|
|
652
|
+
|
|
653
|
+
const body = {
|
|
654
|
+
// string
|
|
655
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
656
|
+
// string
|
|
657
|
+
key: key_example,
|
|
658
|
+
} satisfies GetResourceScormValueRequest;
|
|
659
|
+
|
|
660
|
+
try {
|
|
661
|
+
const data = await api.getResourceScormValue(body);
|
|
662
|
+
console.log(data);
|
|
663
|
+
} catch (error) {
|
|
664
|
+
console.error(error);
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
// Run the test
|
|
669
|
+
example().catch(console.error);
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
### Parameters
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
| Name | Type | Description | Notes |
|
|
676
|
+
|------------- | ------------- | ------------- | -------------|
|
|
677
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
678
|
+
| **key** | `string` | | [Defaults to `undefined`] |
|
|
679
|
+
|
|
680
|
+
### Return type
|
|
681
|
+
|
|
682
|
+
[**ScormGetValueResponse**](ScormGetValueResponse.md)
|
|
683
|
+
|
|
684
|
+
### Authorization
|
|
685
|
+
|
|
686
|
+
No authorization required
|
|
687
|
+
|
|
688
|
+
### HTTP request headers
|
|
689
|
+
|
|
690
|
+
- **Content-Type**: Not defined
|
|
691
|
+
- **Accept**: `application/json`
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
### HTTP response details
|
|
695
|
+
| Status code | Description | Response headers |
|
|
696
|
+
|-------------|-------------|------------------|
|
|
697
|
+
| **200** | CMI value | - |
|
|
698
|
+
| **403** | Session access denied | - |
|
|
699
|
+
|
|
700
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
## getResourceSessionPlayer
|
|
704
|
+
|
|
705
|
+
> string getResourceSessionPlayer(sessionId)
|
|
706
|
+
|
|
707
|
+
Serve the player for a version-pinned reusable resource session
|
|
708
|
+
|
|
709
|
+
### Example
|
|
710
|
+
|
|
711
|
+
```ts
|
|
712
|
+
import {
|
|
713
|
+
Configuration,
|
|
714
|
+
PlayerApi,
|
|
715
|
+
} from '@easyedu/js-lsm-api';
|
|
716
|
+
import type { GetResourceSessionPlayerRequest } from '@easyedu/js-lsm-api';
|
|
717
|
+
|
|
718
|
+
async function example() {
|
|
719
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
720
|
+
const api = new PlayerApi();
|
|
721
|
+
|
|
722
|
+
const body = {
|
|
723
|
+
// string
|
|
724
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
725
|
+
} satisfies GetResourceSessionPlayerRequest;
|
|
726
|
+
|
|
727
|
+
try {
|
|
728
|
+
const data = await api.getResourceSessionPlayer(body);
|
|
729
|
+
console.log(data);
|
|
730
|
+
} catch (error) {
|
|
731
|
+
console.error(error);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
// Run the test
|
|
736
|
+
example().catch(console.error);
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
### Parameters
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
| Name | Type | Description | Notes |
|
|
743
|
+
|------------- | ------------- | ------------- | -------------|
|
|
744
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
745
|
+
|
|
746
|
+
### Return type
|
|
747
|
+
|
|
748
|
+
**string**
|
|
749
|
+
|
|
750
|
+
### Authorization
|
|
751
|
+
|
|
752
|
+
No authorization required
|
|
753
|
+
|
|
754
|
+
### HTTP request headers
|
|
755
|
+
|
|
756
|
+
- **Content-Type**: Not defined
|
|
757
|
+
- **Accept**: `text/html`
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
### HTTP response details
|
|
761
|
+
| Status code | Description | Response headers |
|
|
762
|
+
|-------------|-------------|------------------|
|
|
763
|
+
| **200** | Resource player HTML | - |
|
|
764
|
+
| **403** | Session does not belong to the user or enrollment is no longer active | - |
|
|
765
|
+
|
|
766
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
767
|
+
|
|
768
|
+
|
|
490
769
|
## getScormAsset
|
|
491
770
|
|
|
492
771
|
> getScormAsset(contentId, assetPath)
|
|
@@ -758,3 +1037,204 @@ No authorization required
|
|
|
758
1037
|
|
|
759
1038
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
760
1039
|
|
|
1040
|
+
|
|
1041
|
+
## initializeResourceScormSession
|
|
1042
|
+
|
|
1043
|
+
> initializeResourceScormSession(sessionId)
|
|
1044
|
+
|
|
1045
|
+
Initialize a reusable SCORM resource session
|
|
1046
|
+
|
|
1047
|
+
### Example
|
|
1048
|
+
|
|
1049
|
+
```ts
|
|
1050
|
+
import {
|
|
1051
|
+
Configuration,
|
|
1052
|
+
PlayerApi,
|
|
1053
|
+
} from '@easyedu/js-lsm-api';
|
|
1054
|
+
import type { InitializeResourceScormSessionRequest } from '@easyedu/js-lsm-api';
|
|
1055
|
+
|
|
1056
|
+
async function example() {
|
|
1057
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1058
|
+
const api = new PlayerApi();
|
|
1059
|
+
|
|
1060
|
+
const body = {
|
|
1061
|
+
// string
|
|
1062
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1063
|
+
} satisfies InitializeResourceScormSessionRequest;
|
|
1064
|
+
|
|
1065
|
+
try {
|
|
1066
|
+
const data = await api.initializeResourceScormSession(body);
|
|
1067
|
+
console.log(data);
|
|
1068
|
+
} catch (error) {
|
|
1069
|
+
console.error(error);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
// Run the test
|
|
1074
|
+
example().catch(console.error);
|
|
1075
|
+
```
|
|
1076
|
+
|
|
1077
|
+
### Parameters
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
| Name | Type | Description | Notes |
|
|
1081
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1082
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
1083
|
+
|
|
1084
|
+
### Return type
|
|
1085
|
+
|
|
1086
|
+
`void` (Empty response body)
|
|
1087
|
+
|
|
1088
|
+
### Authorization
|
|
1089
|
+
|
|
1090
|
+
No authorization required
|
|
1091
|
+
|
|
1092
|
+
### HTTP request headers
|
|
1093
|
+
|
|
1094
|
+
- **Content-Type**: Not defined
|
|
1095
|
+
- **Accept**: Not defined
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
### HTTP response details
|
|
1099
|
+
| Status code | Description | Response headers |
|
|
1100
|
+
|-------------|-------------|------------------|
|
|
1101
|
+
| **200** | Session initialized | - |
|
|
1102
|
+
| **403** | Session access denied | - |
|
|
1103
|
+
|
|
1104
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
## setResourceScormValue
|
|
1108
|
+
|
|
1109
|
+
> ScormSetValueResponse setResourceScormValue(sessionId, scormSetValueRequest)
|
|
1110
|
+
|
|
1111
|
+
Store a CMI value in a reusable SCORM resource session
|
|
1112
|
+
|
|
1113
|
+
### Example
|
|
1114
|
+
|
|
1115
|
+
```ts
|
|
1116
|
+
import {
|
|
1117
|
+
Configuration,
|
|
1118
|
+
PlayerApi,
|
|
1119
|
+
} from '@easyedu/js-lsm-api';
|
|
1120
|
+
import type { SetResourceScormValueRequest } from '@easyedu/js-lsm-api';
|
|
1121
|
+
|
|
1122
|
+
async function example() {
|
|
1123
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1124
|
+
const api = new PlayerApi();
|
|
1125
|
+
|
|
1126
|
+
const body = {
|
|
1127
|
+
// string
|
|
1128
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1129
|
+
// ScormSetValueRequest
|
|
1130
|
+
scormSetValueRequest: ...,
|
|
1131
|
+
} satisfies SetResourceScormValueRequest;
|
|
1132
|
+
|
|
1133
|
+
try {
|
|
1134
|
+
const data = await api.setResourceScormValue(body);
|
|
1135
|
+
console.log(data);
|
|
1136
|
+
} catch (error) {
|
|
1137
|
+
console.error(error);
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
// Run the test
|
|
1142
|
+
example().catch(console.error);
|
|
1143
|
+
```
|
|
1144
|
+
|
|
1145
|
+
### Parameters
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
| Name | Type | Description | Notes |
|
|
1149
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1150
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
1151
|
+
| **scormSetValueRequest** | [ScormSetValueRequest](ScormSetValueRequest.md) | | |
|
|
1152
|
+
|
|
1153
|
+
### Return type
|
|
1154
|
+
|
|
1155
|
+
[**ScormSetValueResponse**](ScormSetValueResponse.md)
|
|
1156
|
+
|
|
1157
|
+
### Authorization
|
|
1158
|
+
|
|
1159
|
+
No authorization required
|
|
1160
|
+
|
|
1161
|
+
### HTTP request headers
|
|
1162
|
+
|
|
1163
|
+
- **Content-Type**: `application/json`
|
|
1164
|
+
- **Accept**: `application/json`
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
### HTTP response details
|
|
1168
|
+
| Status code | Description | Response headers |
|
|
1169
|
+
|-------------|-------------|------------------|
|
|
1170
|
+
| **200** | CMI value stored | - |
|
|
1171
|
+
| **403** | Session access denied | - |
|
|
1172
|
+
|
|
1173
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
## terminateResourceScormSession
|
|
1177
|
+
|
|
1178
|
+
> terminateResourceScormSession(sessionId)
|
|
1179
|
+
|
|
1180
|
+
Terminate a reusable SCORM resource session
|
|
1181
|
+
|
|
1182
|
+
### Example
|
|
1183
|
+
|
|
1184
|
+
```ts
|
|
1185
|
+
import {
|
|
1186
|
+
Configuration,
|
|
1187
|
+
PlayerApi,
|
|
1188
|
+
} from '@easyedu/js-lsm-api';
|
|
1189
|
+
import type { TerminateResourceScormSessionRequest } from '@easyedu/js-lsm-api';
|
|
1190
|
+
|
|
1191
|
+
async function example() {
|
|
1192
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1193
|
+
const api = new PlayerApi();
|
|
1194
|
+
|
|
1195
|
+
const body = {
|
|
1196
|
+
// string
|
|
1197
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1198
|
+
} satisfies TerminateResourceScormSessionRequest;
|
|
1199
|
+
|
|
1200
|
+
try {
|
|
1201
|
+
const data = await api.terminateResourceScormSession(body);
|
|
1202
|
+
console.log(data);
|
|
1203
|
+
} catch (error) {
|
|
1204
|
+
console.error(error);
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
// Run the test
|
|
1209
|
+
example().catch(console.error);
|
|
1210
|
+
```
|
|
1211
|
+
|
|
1212
|
+
### Parameters
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
| Name | Type | Description | Notes |
|
|
1216
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1217
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
1218
|
+
|
|
1219
|
+
### Return type
|
|
1220
|
+
|
|
1221
|
+
`void` (Empty response body)
|
|
1222
|
+
|
|
1223
|
+
### Authorization
|
|
1224
|
+
|
|
1225
|
+
No authorization required
|
|
1226
|
+
|
|
1227
|
+
### HTTP request headers
|
|
1228
|
+
|
|
1229
|
+
- **Content-Type**: Not defined
|
|
1230
|
+
- **Accept**: Not defined
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
### HTTP response details
|
|
1234
|
+
| Status code | Description | Response headers |
|
|
1235
|
+
|-------------|-------------|------------------|
|
|
1236
|
+
| **200** | Session terminated | - |
|
|
1237
|
+
| **403** | Session access denied | - |
|
|
1238
|
+
|
|
1239
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1240
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# PostCourseDraft
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`changeNotes` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { PostCourseDraft } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"changeNotes": null,
|
|
19
|
+
} satisfies PostCourseDraft
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as PostCourseDraft
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
# PostCourseVersionItem
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`contentLibraryItemId` | string
|
|
10
|
+
`contentLibraryVersionId` | string
|
|
11
|
+
`moduleId` | string
|
|
12
|
+
`displayName` | string
|
|
13
|
+
`displayOrder` | number
|
|
14
|
+
`isVisible` | boolean
|
|
15
|
+
`launchMode` | [ContentLaunchMode](ContentLaunchMode.md)
|
|
16
|
+
`maxAttempts` | number
|
|
17
|
+
`scoreRollupStrategy` | string
|
|
18
|
+
`settings` | { [key: string]: any; }
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type { PostCourseVersionItem } from '@easyedu/js-lsm-api'
|
|
24
|
+
|
|
25
|
+
// TODO: Update the object below with actual values
|
|
26
|
+
const example = {
|
|
27
|
+
"contentLibraryItemId": null,
|
|
28
|
+
"contentLibraryVersionId": null,
|
|
29
|
+
"moduleId": null,
|
|
30
|
+
"displayName": null,
|
|
31
|
+
"displayOrder": null,
|
|
32
|
+
"isVisible": null,
|
|
33
|
+
"launchMode": null,
|
|
34
|
+
"maxAttempts": null,
|
|
35
|
+
"scoreRollupStrategy": null,
|
|
36
|
+
"settings": null,
|
|
37
|
+
} satisfies PostCourseVersionItem
|
|
38
|
+
|
|
39
|
+
console.log(example)
|
|
40
|
+
|
|
41
|
+
// Convert the instance to a JSON string
|
|
42
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
43
|
+
console.log(exampleJSON)
|
|
44
|
+
|
|
45
|
+
// Parse the JSON string back to an object
|
|
46
|
+
const exampleParsed = JSON.parse(exampleJSON) as PostCourseVersionItem
|
|
47
|
+
console.log(exampleParsed)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
51
|
+
|
|
52
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# PostCourseVersionItemSession
|
|
3
|
+
|
|
4
|
+
Start or resume a learner attempt for an exact course resource version.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`retake` | boolean
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { PostCourseVersionItemSession } from '@easyedu/js-lsm-api'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"retake": null,
|
|
20
|
+
} satisfies PostCourseVersionItemSession
|
|
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 PostCourseVersionItemSession
|
|
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,34 @@
|
|
|
1
|
+
|
|
2
|
+
# PostCourseVersionPublish
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`changeNotes` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { PostCourseVersionPublish } from '@easyedu/js-lsm-api'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"changeNotes": null,
|
|
19
|
+
} satisfies PostCourseVersionPublish
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as PostCourseVersionPublish
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`questionOrder` | number
|
|
12
12
|
`points` | number
|
|
13
13
|
`questionText` | string
|
|
14
|
+
`questionTextRich` | [RichTextDocument](RichTextDocument.md)
|
|
14
15
|
`questionType` | string
|
|
15
16
|
`answerChoices` | [Array<PostQuizAttemptQuestionsInnerAnswerChoicesInner>](PostQuizAttemptQuestionsInnerAnswerChoicesInner.md)
|
|
16
17
|
`isAnswered` | boolean
|
|
@@ -27,6 +28,7 @@ const example = {
|
|
|
27
28
|
"questionOrder": null,
|
|
28
29
|
"points": null,
|
|
29
30
|
"questionText": null,
|
|
31
|
+
"questionTextRich": null,
|
|
30
32
|
"questionType": null,
|
|
31
33
|
"answerChoices": null,
|
|
32
34
|
"isAnswered": null,
|
|
@@ -8,6 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`id` | string
|
|
10
10
|
`text` | string
|
|
11
|
+
`textRich` | [RichTextDocument](RichTextDocument.md)
|
|
11
12
|
`displayOrder` | number
|
|
12
13
|
|
|
13
14
|
## Example
|
|
@@ -19,6 +20,7 @@ import type { PostQuizAttemptQuestionsInnerAnswerChoicesInner } from '@easyedu/j
|
|
|
19
20
|
const example = {
|
|
20
21
|
"id": null,
|
|
21
22
|
"text": null,
|
|
23
|
+
"textRich": null,
|
|
22
24
|
"displayOrder": null,
|
|
23
25
|
} satisfies PostQuizAttemptQuestionsInnerAnswerChoicesInner
|
|
24
26
|
|