@easyedu/js-lsm-api 1.118.0 → 1.120.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 +42 -0
- package/README.md +34 -2
- package/dist/apis/CourseApi.d.ts +55 -0
- package/dist/apis/CourseApi.js +148 -0
- package/dist/apis/DispatchApi.d.ts +121 -5
- package/dist/apis/DispatchApi.js +303 -8
- package/dist/apis/PlayerApi.d.ts +26 -6
- package/dist/apis/PlayerApi.js +57 -6
- package/dist/esm/apis/CourseApi.d.ts +55 -0
- package/dist/esm/apis/CourseApi.js +148 -0
- package/dist/esm/apis/DispatchApi.d.ts +121 -5
- package/dist/esm/apis/DispatchApi.js +303 -8
- package/dist/esm/apis/PlayerApi.d.ts +26 -6
- package/dist/esm/apis/PlayerApi.js +57 -6
- package/dist/esm/models/DispatchTokenResponse.d.ts +57 -0
- package/dist/esm/models/DispatchTokenResponse.js +61 -0
- package/dist/esm/models/GetCourseExport.d.ts +62 -0
- package/dist/esm/models/GetCourseExport.js +44 -0
- package/dist/esm/models/GetDispatchCourse.d.ts +82 -0
- package/dist/esm/models/GetDispatchCourse.js +77 -0
- package/dist/esm/models/GetDispatchRollup.d.ts +104 -0
- package/dist/esm/models/GetDispatchRollup.js +95 -0
- package/dist/esm/models/GetHostedScormRegistration.d.ts +80 -0
- package/dist/esm/models/GetHostedScormRegistration.js +71 -0
- package/dist/esm/models/GetHostedScormRegistrationList.d.ts +57 -0
- package/dist/esm/models/GetHostedScormRegistrationList.js +60 -0
- package/dist/esm/models/GetResourceSessionDiagnostics.d.ts +8 -0
- package/dist/esm/models/GetResourceSessionDiagnostics.js +2 -0
- package/dist/esm/models/HostedScormAccessPolicy.d.ts +50 -0
- package/dist/esm/models/HostedScormAccessPolicy.js +55 -0
- package/dist/esm/models/HostedScormOutlineEntry.d.ts +108 -0
- package/dist/esm/models/HostedScormOutlineEntry.js +97 -0
- package/dist/esm/models/HostedScormRollupPolicy.d.ts +69 -0
- package/dist/esm/models/HostedScormRollupPolicy.js +72 -0
- package/dist/esm/models/HostedScormScoreItem.d.ts +38 -0
- package/dist/esm/models/HostedScormScoreItem.js +47 -0
- package/dist/esm/models/PostCourseExport.d.ts +28 -0
- package/dist/esm/models/PostCourseExport.js +15 -0
- package/dist/esm/models/PostDispatchItemLaunch.d.ts +32 -0
- package/dist/esm/models/PostDispatchItemLaunch.js +41 -0
- package/dist/esm/models/PostDispatchItemLaunchResponse.d.ts +64 -0
- package/dist/esm/models/PostDispatchItemLaunchResponse.js +66 -0
- package/dist/esm/models/PostDispatchLaunch.d.ts +50 -0
- package/dist/esm/models/PostDispatchLaunch.js +53 -0
- package/dist/esm/models/PostDispatchLaunchResponse.d.ts +70 -0
- package/dist/esm/models/PostDispatchLaunchResponse.js +70 -0
- package/dist/esm/models/PostDispatchTokenExchange.d.ts +32 -0
- package/dist/esm/models/PostDispatchTokenExchange.js +43 -0
- package/dist/esm/models/PutHostedScormStatus.d.ts +32 -0
- package/dist/esm/models/PutHostedScormStatus.js +43 -0
- package/dist/esm/models/ScormGetValueResponse.d.ts +12 -0
- package/dist/esm/models/ScormGetValueResponse.js +8 -0
- package/dist/esm/models/ScormNavigationDelivery.d.ts +64 -0
- package/dist/esm/models/ScormNavigationDelivery.js +66 -0
- package/dist/esm/models/ScormNavigationRequest.d.ts +55 -0
- package/dist/esm/models/ScormNavigationRequest.js +61 -0
- package/dist/esm/models/ScormNavigationResponse.d.ts +70 -0
- package/dist/esm/models/ScormNavigationResponse.js +67 -0
- package/dist/esm/models/ScormNavigationValidity.d.ts +92 -0
- package/dist/esm/models/ScormNavigationValidity.js +83 -0
- package/dist/esm/models/ScormRuntimeResponse.d.ts +44 -0
- package/dist/esm/models/ScormRuntimeResponse.js +51 -0
- package/dist/esm/models/ScormSetValueResponse.d.ts +12 -0
- package/dist/esm/models/ScormSetValueResponse.js +8 -0
- package/dist/esm/models/ScormTerminateResponse.d.ts +63 -0
- package/dist/esm/models/ScormTerminateResponse.js +62 -0
- package/dist/esm/models/index.d.ts +21 -0
- package/dist/esm/models/index.js +21 -0
- package/dist/models/DispatchTokenResponse.d.ts +57 -0
- package/dist/models/DispatchTokenResponse.js +69 -0
- package/dist/models/GetCourseExport.d.ts +62 -0
- package/dist/models/GetCourseExport.js +45 -1
- package/dist/models/GetDispatchCourse.d.ts +82 -0
- package/dist/models/GetDispatchCourse.js +84 -0
- package/dist/models/GetDispatchRollup.d.ts +104 -0
- package/dist/models/GetDispatchRollup.js +103 -0
- package/dist/models/GetHostedScormRegistration.d.ts +80 -0
- package/dist/models/GetHostedScormRegistration.js +78 -0
- package/dist/models/GetHostedScormRegistrationList.d.ts +57 -0
- package/dist/models/GetHostedScormRegistrationList.js +67 -0
- package/dist/models/GetResourceSessionDiagnostics.d.ts +8 -0
- package/dist/models/GetResourceSessionDiagnostics.js +2 -0
- package/dist/models/HostedScormAccessPolicy.d.ts +50 -0
- package/dist/models/HostedScormAccessPolicy.js +62 -0
- package/dist/models/HostedScormOutlineEntry.d.ts +108 -0
- package/dist/models/HostedScormOutlineEntry.js +105 -0
- package/dist/models/HostedScormRollupPolicy.d.ts +69 -0
- package/dist/models/HostedScormRollupPolicy.js +80 -0
- package/dist/models/HostedScormScoreItem.d.ts +38 -0
- package/dist/models/HostedScormScoreItem.js +54 -0
- package/dist/models/PostCourseExport.d.ts +28 -0
- package/dist/models/PostCourseExport.js +16 -1
- package/dist/models/PostDispatchItemLaunch.d.ts +32 -0
- package/dist/models/PostDispatchItemLaunch.js +48 -0
- package/dist/models/PostDispatchItemLaunchResponse.d.ts +64 -0
- package/dist/models/PostDispatchItemLaunchResponse.js +74 -0
- package/dist/models/PostDispatchLaunch.d.ts +50 -0
- package/dist/models/PostDispatchLaunch.js +60 -0
- package/dist/models/PostDispatchLaunchResponse.d.ts +70 -0
- package/dist/models/PostDispatchLaunchResponse.js +78 -0
- package/dist/models/PostDispatchTokenExchange.d.ts +32 -0
- package/dist/models/PostDispatchTokenExchange.js +50 -0
- package/dist/models/PutHostedScormStatus.d.ts +32 -0
- package/dist/models/PutHostedScormStatus.js +50 -0
- package/dist/models/ScormGetValueResponse.d.ts +12 -0
- package/dist/models/ScormGetValueResponse.js +8 -0
- package/dist/models/ScormNavigationDelivery.d.ts +64 -0
- package/dist/models/ScormNavigationDelivery.js +74 -0
- package/dist/models/ScormNavigationRequest.d.ts +55 -0
- package/dist/models/ScormNavigationRequest.js +69 -0
- package/dist/models/ScormNavigationResponse.d.ts +70 -0
- package/dist/models/ScormNavigationResponse.js +74 -0
- package/dist/models/ScormNavigationValidity.d.ts +92 -0
- package/dist/models/ScormNavigationValidity.js +90 -0
- package/dist/models/ScormRuntimeResponse.d.ts +44 -0
- package/dist/models/ScormRuntimeResponse.js +58 -0
- package/dist/models/ScormSetValueResponse.d.ts +12 -0
- package/dist/models/ScormSetValueResponse.js +8 -0
- package/dist/models/ScormTerminateResponse.d.ts +63 -0
- package/dist/models/ScormTerminateResponse.js +69 -0
- package/dist/models/index.d.ts +21 -0
- package/dist/models/index.js +21 -0
- package/docs/CourseApi.md +225 -0
- package/docs/DispatchApi.md +480 -9
- package/docs/DispatchTokenResponse.md +40 -0
- package/docs/GetCourseExport.md +14 -0
- package/docs/GetDispatchCourse.md +50 -0
- package/docs/GetDispatchRollup.md +52 -0
- package/docs/GetHostedScormRegistration.md +50 -0
- package/docs/GetHostedScormRegistrationList.md +42 -0
- package/docs/GetResourceSessionDiagnostics.md +2 -0
- package/docs/HostedScormAccessPolicy.md +41 -0
- package/docs/HostedScormOutlineEntry.md +54 -0
- package/docs/HostedScormRollupPolicy.md +41 -0
- package/docs/HostedScormScoreItem.md +36 -0
- package/docs/PlayerApi.md +80 -9
- package/docs/PostCourseExport.md +6 -0
- package/docs/PostDispatchItemLaunch.md +34 -0
- package/docs/PostDispatchItemLaunchResponse.md +42 -0
- package/docs/PostDispatchLaunch.md +40 -0
- package/docs/PostDispatchLaunchResponse.md +44 -0
- package/docs/PostDispatchTokenExchange.md +34 -0
- package/docs/PutHostedScormStatus.md +34 -0
- package/docs/ScormGetValueResponse.md +4 -0
- package/docs/ScormNavigationDelivery.md +43 -0
- package/docs/ScormNavigationRequest.md +37 -0
- package/docs/ScormNavigationResponse.md +47 -0
- package/docs/ScormNavigationValidity.md +55 -0
- package/docs/ScormRuntimeResponse.md +39 -0
- package/docs/ScormSetValueResponse.md +4 -0
- package/docs/ScormTerminateResponse.md +44 -0
- package/package.json +1 -1
- package/src/apis/CourseApi.ts +221 -0
- package/src/apis/DispatchApi.ts +426 -10
- package/src/apis/PlayerApi.ts +95 -12
- package/src/models/DispatchTokenResponse.ts +103 -0
- package/src/models/GetCourseExport.ts +97 -0
- package/src/models/GetDispatchCourse.ts +153 -0
- package/src/models/GetDispatchRollup.ts +169 -0
- package/src/models/GetHostedScormRegistration.ts +136 -0
- package/src/models/GetHostedScormRegistrationList.ts +110 -0
- package/src/models/GetResourceSessionDiagnostics.ts +8 -0
- package/src/models/HostedScormAccessPolicy.ts +93 -0
- package/src/models/HostedScormOutlineEntry.ts +176 -0
- package/src/models/HostedScormRollupPolicy.ts +123 -0
- package/src/models/HostedScormScoreItem.ts +75 -0
- package/src/models/PostCourseExport.ts +48 -0
- package/src/models/PostDispatchItemLaunch.ts +65 -0
- package/src/models/PostDispatchItemLaunchResponse.ts +113 -0
- package/src/models/PostDispatchLaunch.ts +92 -0
- package/src/models/PostDispatchLaunchResponse.ts +122 -0
- package/src/models/PostDispatchTokenExchange.ts +66 -0
- package/src/models/PutHostedScormStatus.ts +66 -0
- package/src/models/ScormGetValueResponse.ts +18 -0
- package/src/models/ScormNavigationDelivery.ts +113 -0
- package/src/models/ScormNavigationRequest.ts +94 -0
- package/src/models/ScormNavigationResponse.ts +134 -0
- package/src/models/ScormNavigationValidity.ts +156 -0
- package/src/models/ScormRuntimeResponse.ts +84 -0
- package/src/models/ScormSetValueResponse.ts +18 -0
- package/src/models/ScormTerminateResponse.ts +118 -0
- package/src/models/index.ts +21 -0
package/docs/DispatchApi.md
CHANGED
|
@@ -4,14 +4,144 @@ 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
|
+
| [**getDispatchCourse**](DispatchApi.md#getdispatchcourse) | **GET** /dispatch/runtime/course | Get the registration-scoped hosted course snapshot |
|
|
8
|
+
| [**getDispatchQuizSession**](DispatchApi.md#getdispatchquizsession) | **GET** /dispatch/runtime/quiz-sessions/{sessionId} | Get a registration-owned native quiz session |
|
|
7
9
|
| [**getDispatchRollup**](DispatchApi.md#getdispatchrollup) | **GET** /dispatch/sessions/{dispatchPackageId}/rollup | Get dispatch package rollup data |
|
|
10
|
+
| [**postDispatchItemLaunch**](DispatchApi.md#postdispatchitemlaunch) | **POST** /dispatch/runtime/items/{itemId}/launch | Start or resume a selected hosted course item |
|
|
8
11
|
| [**postDispatchLaunch**](DispatchApi.md#postdispatchlaunch) | **POST** /dispatch/launch | Launch a dispatch package |
|
|
12
|
+
| [**postDispatchQuizSessionSubmit**](DispatchApi.md#postdispatchquizsessionsubmit) | **POST** /dispatch/runtime/quiz-sessions/{sessionId}/submit | Submit a registration-owned native quiz session |
|
|
13
|
+
| [**postDispatchTokenExchange**](DispatchApi.md#postdispatchtokenexchange) | **POST** /dispatch/runtime/token | Exchange a one-time hosted SCORM launch code |
|
|
14
|
+
| [**postDispatchTokenRefresh**](DispatchApi.md#postdispatchtokenrefresh) | **POST** /dispatch/runtime/token/refresh | Rotate a valid hosted SCORM access token |
|
|
15
|
+
| [**putDispatchQuizSessionAnswer**](DispatchApi.md#putdispatchquizsessionanswer) | **PUT** /dispatch/runtime/quiz-sessions/{sessionId}/answers/{sessionQuestionId} | Save a registration-owned native quiz answer |
|
|
9
16
|
|
|
10
17
|
|
|
11
18
|
|
|
19
|
+
## getDispatchCourse
|
|
20
|
+
|
|
21
|
+
> GetDispatchCourse getDispatchCourse()
|
|
22
|
+
|
|
23
|
+
Get the registration-scoped hosted course snapshot
|
|
24
|
+
|
|
25
|
+
### Example
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import {
|
|
29
|
+
Configuration,
|
|
30
|
+
DispatchApi,
|
|
31
|
+
} from '@easyedu/js-lsm-api';
|
|
32
|
+
import type { GetDispatchCourseRequest } from '@easyedu/js-lsm-api';
|
|
33
|
+
|
|
34
|
+
async function example() {
|
|
35
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
36
|
+
const api = new DispatchApi();
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
const data = await api.getDispatchCourse();
|
|
40
|
+
console.log(data);
|
|
41
|
+
} catch (error) {
|
|
42
|
+
console.error(error);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Run the test
|
|
47
|
+
example().catch(console.error);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Parameters
|
|
51
|
+
|
|
52
|
+
This endpoint does not need any parameter.
|
|
53
|
+
|
|
54
|
+
### Return type
|
|
55
|
+
|
|
56
|
+
[**GetDispatchCourse**](GetDispatchCourse.md)
|
|
57
|
+
|
|
58
|
+
### Authorization
|
|
59
|
+
|
|
60
|
+
No authorization required
|
|
61
|
+
|
|
62
|
+
### HTTP request headers
|
|
63
|
+
|
|
64
|
+
- **Content-Type**: Not defined
|
|
65
|
+
- **Accept**: `application/json`
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### HTTP response details
|
|
69
|
+
| Status code | Description | Response headers |
|
|
70
|
+
|-------------|-------------|------------------|
|
|
71
|
+
| **200** | Hosted course snapshot | - |
|
|
72
|
+
| **401** | Dispatch token required | - |
|
|
73
|
+
|
|
74
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
## getDispatchQuizSession
|
|
78
|
+
|
|
79
|
+
> GetLibraryQuizSession getDispatchQuizSession(sessionId)
|
|
80
|
+
|
|
81
|
+
Get a registration-owned native quiz session
|
|
82
|
+
|
|
83
|
+
### Example
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import {
|
|
87
|
+
Configuration,
|
|
88
|
+
DispatchApi,
|
|
89
|
+
} from '@easyedu/js-lsm-api';
|
|
90
|
+
import type { GetDispatchQuizSessionRequest } from '@easyedu/js-lsm-api';
|
|
91
|
+
|
|
92
|
+
async function example() {
|
|
93
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
94
|
+
const api = new DispatchApi();
|
|
95
|
+
|
|
96
|
+
const body = {
|
|
97
|
+
// string
|
|
98
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
99
|
+
} satisfies GetDispatchQuizSessionRequest;
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
const data = await api.getDispatchQuizSession(body);
|
|
103
|
+
console.log(data);
|
|
104
|
+
} catch (error) {
|
|
105
|
+
console.error(error);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Run the test
|
|
110
|
+
example().catch(console.error);
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Parameters
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
| Name | Type | Description | Notes |
|
|
117
|
+
|------------- | ------------- | ------------- | -------------|
|
|
118
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
119
|
+
|
|
120
|
+
### Return type
|
|
121
|
+
|
|
122
|
+
[**GetLibraryQuizSession**](GetLibraryQuizSession.md)
|
|
123
|
+
|
|
124
|
+
### Authorization
|
|
125
|
+
|
|
126
|
+
No authorization required
|
|
127
|
+
|
|
128
|
+
### HTTP request headers
|
|
129
|
+
|
|
130
|
+
- **Content-Type**: Not defined
|
|
131
|
+
- **Accept**: `application/json`
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### HTTP response details
|
|
135
|
+
| Status code | Description | Response headers |
|
|
136
|
+
|-------------|-------------|------------------|
|
|
137
|
+
| **200** | Quiz session | - |
|
|
138
|
+
|
|
139
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
140
|
+
|
|
141
|
+
|
|
12
142
|
## getDispatchRollup
|
|
13
143
|
|
|
14
|
-
> getDispatchRollup(dispatchPackageId)
|
|
144
|
+
> GetDispatchRollup getDispatchRollup(dispatchPackageId)
|
|
15
145
|
|
|
16
146
|
Get dispatch package rollup data
|
|
17
147
|
|
|
@@ -54,7 +184,7 @@ example().catch(console.error);
|
|
|
54
184
|
|
|
55
185
|
### Return type
|
|
56
186
|
|
|
57
|
-
|
|
187
|
+
[**GetDispatchRollup**](GetDispatchRollup.md)
|
|
58
188
|
|
|
59
189
|
### Authorization
|
|
60
190
|
|
|
@@ -63,7 +193,7 @@ No authorization required
|
|
|
63
193
|
### HTTP request headers
|
|
64
194
|
|
|
65
195
|
- **Content-Type**: Not defined
|
|
66
|
-
- **Accept**:
|
|
196
|
+
- **Accept**: `application/json`
|
|
67
197
|
|
|
68
198
|
|
|
69
199
|
### HTTP response details
|
|
@@ -75,9 +205,79 @@ No authorization required
|
|
|
75
205
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
76
206
|
|
|
77
207
|
|
|
208
|
+
## postDispatchItemLaunch
|
|
209
|
+
|
|
210
|
+
> PostDispatchItemLaunchResponse postDispatchItemLaunch(itemId, postDispatchItemLaunch)
|
|
211
|
+
|
|
212
|
+
Start or resume a selected hosted course item
|
|
213
|
+
|
|
214
|
+
### Example
|
|
215
|
+
|
|
216
|
+
```ts
|
|
217
|
+
import {
|
|
218
|
+
Configuration,
|
|
219
|
+
DispatchApi,
|
|
220
|
+
} from '@easyedu/js-lsm-api';
|
|
221
|
+
import type { PostDispatchItemLaunchRequest } from '@easyedu/js-lsm-api';
|
|
222
|
+
|
|
223
|
+
async function example() {
|
|
224
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
225
|
+
const api = new DispatchApi();
|
|
226
|
+
|
|
227
|
+
const body = {
|
|
228
|
+
// string
|
|
229
|
+
itemId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
230
|
+
// PostDispatchItemLaunch (optional)
|
|
231
|
+
postDispatchItemLaunch: ...,
|
|
232
|
+
} satisfies PostDispatchItemLaunchRequest;
|
|
233
|
+
|
|
234
|
+
try {
|
|
235
|
+
const data = await api.postDispatchItemLaunch(body);
|
|
236
|
+
console.log(data);
|
|
237
|
+
} catch (error) {
|
|
238
|
+
console.error(error);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// Run the test
|
|
243
|
+
example().catch(console.error);
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Parameters
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
| Name | Type | Description | Notes |
|
|
250
|
+
|------------- | ------------- | ------------- | -------------|
|
|
251
|
+
| **itemId** | `string` | | [Defaults to `undefined`] |
|
|
252
|
+
| **postDispatchItemLaunch** | [PostDispatchItemLaunch](PostDispatchItemLaunch.md) | | [Optional] |
|
|
253
|
+
|
|
254
|
+
### Return type
|
|
255
|
+
|
|
256
|
+
[**PostDispatchItemLaunchResponse**](PostDispatchItemLaunchResponse.md)
|
|
257
|
+
|
|
258
|
+
### Authorization
|
|
259
|
+
|
|
260
|
+
No authorization required
|
|
261
|
+
|
|
262
|
+
### HTTP request headers
|
|
263
|
+
|
|
264
|
+
- **Content-Type**: `application/json`
|
|
265
|
+
- **Accept**: `application/json`
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
### HTTP response details
|
|
269
|
+
| Status code | Description | Response headers |
|
|
270
|
+
|-------------|-------------|------------------|
|
|
271
|
+
| **200** | Item session | - |
|
|
272
|
+
| **403** | Item is not accessible to this registration | - |
|
|
273
|
+
| **409** | Progression or attempt limit prevents launch | - |
|
|
274
|
+
|
|
275
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
276
|
+
|
|
277
|
+
|
|
78
278
|
## postDispatchLaunch
|
|
79
279
|
|
|
80
|
-
> postDispatchLaunch()
|
|
280
|
+
> PostDispatchLaunchResponse postDispatchLaunch(postDispatchLaunch)
|
|
81
281
|
|
|
82
282
|
Launch a dispatch package
|
|
83
283
|
|
|
@@ -94,8 +294,13 @@ async function example() {
|
|
|
94
294
|
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
95
295
|
const api = new DispatchApi();
|
|
96
296
|
|
|
297
|
+
const body = {
|
|
298
|
+
// PostDispatchLaunch
|
|
299
|
+
postDispatchLaunch: ...,
|
|
300
|
+
} satisfies PostDispatchLaunchRequest;
|
|
301
|
+
|
|
97
302
|
try {
|
|
98
|
-
const data = await api.postDispatchLaunch();
|
|
303
|
+
const data = await api.postDispatchLaunch(body);
|
|
99
304
|
console.log(data);
|
|
100
305
|
} catch (error) {
|
|
101
306
|
console.error(error);
|
|
@@ -108,11 +313,14 @@ example().catch(console.error);
|
|
|
108
313
|
|
|
109
314
|
### Parameters
|
|
110
315
|
|
|
111
|
-
|
|
316
|
+
|
|
317
|
+
| Name | Type | Description | Notes |
|
|
318
|
+
|------------- | ------------- | ------------- | -------------|
|
|
319
|
+
| **postDispatchLaunch** | [PostDispatchLaunch](PostDispatchLaunch.md) | | |
|
|
112
320
|
|
|
113
321
|
### Return type
|
|
114
322
|
|
|
115
|
-
|
|
323
|
+
[**PostDispatchLaunchResponse**](PostDispatchLaunchResponse.md)
|
|
116
324
|
|
|
117
325
|
### Authorization
|
|
118
326
|
|
|
@@ -120,8 +328,8 @@ No authorization required
|
|
|
120
328
|
|
|
121
329
|
### HTTP request headers
|
|
122
330
|
|
|
123
|
-
- **Content-Type**:
|
|
124
|
-
- **Accept**:
|
|
331
|
+
- **Content-Type**: `application/json`
|
|
332
|
+
- **Accept**: `application/json`
|
|
125
333
|
|
|
126
334
|
|
|
127
335
|
### HTTP response details
|
|
@@ -129,6 +337,269 @@ No authorization required
|
|
|
129
337
|
|-------------|-------------|------------------|
|
|
130
338
|
| **200** | Dispatch launch response | - |
|
|
131
339
|
| **400** | Invalid launch request | - |
|
|
340
|
+
| **403** | Origin, validity window, or learner cap denied launch | - |
|
|
341
|
+
| **410** | Package revoked | - |
|
|
342
|
+
| **503** | Hosted player is not configured | - |
|
|
343
|
+
|
|
344
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
## postDispatchQuizSessionSubmit
|
|
348
|
+
|
|
349
|
+
> GetLibraryQuizResult postDispatchQuizSessionSubmit(sessionId)
|
|
350
|
+
|
|
351
|
+
Submit a registration-owned native quiz session
|
|
352
|
+
|
|
353
|
+
### Example
|
|
354
|
+
|
|
355
|
+
```ts
|
|
356
|
+
import {
|
|
357
|
+
Configuration,
|
|
358
|
+
DispatchApi,
|
|
359
|
+
} from '@easyedu/js-lsm-api';
|
|
360
|
+
import type { PostDispatchQuizSessionSubmitRequest } from '@easyedu/js-lsm-api';
|
|
361
|
+
|
|
362
|
+
async function example() {
|
|
363
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
364
|
+
const api = new DispatchApi();
|
|
365
|
+
|
|
366
|
+
const body = {
|
|
367
|
+
// string
|
|
368
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
369
|
+
} satisfies PostDispatchQuizSessionSubmitRequest;
|
|
370
|
+
|
|
371
|
+
try {
|
|
372
|
+
const data = await api.postDispatchQuizSessionSubmit(body);
|
|
373
|
+
console.log(data);
|
|
374
|
+
} catch (error) {
|
|
375
|
+
console.error(error);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// Run the test
|
|
380
|
+
example().catch(console.error);
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Parameters
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
| Name | Type | Description | Notes |
|
|
387
|
+
|------------- | ------------- | ------------- | -------------|
|
|
388
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
389
|
+
|
|
390
|
+
### Return type
|
|
391
|
+
|
|
392
|
+
[**GetLibraryQuizResult**](GetLibraryQuizResult.md)
|
|
393
|
+
|
|
394
|
+
### Authorization
|
|
395
|
+
|
|
396
|
+
No authorization required
|
|
397
|
+
|
|
398
|
+
### HTTP request headers
|
|
399
|
+
|
|
400
|
+
- **Content-Type**: Not defined
|
|
401
|
+
- **Accept**: `application/json`
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
### HTTP response details
|
|
405
|
+
| Status code | Description | Response headers |
|
|
406
|
+
|-------------|-------------|------------------|
|
|
407
|
+
| **200** | Quiz result | - |
|
|
408
|
+
|
|
409
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
## postDispatchTokenExchange
|
|
413
|
+
|
|
414
|
+
> DispatchTokenResponse postDispatchTokenExchange(postDispatchTokenExchange)
|
|
415
|
+
|
|
416
|
+
Exchange a one-time hosted SCORM launch code
|
|
417
|
+
|
|
418
|
+
### Example
|
|
419
|
+
|
|
420
|
+
```ts
|
|
421
|
+
import {
|
|
422
|
+
Configuration,
|
|
423
|
+
DispatchApi,
|
|
424
|
+
} from '@easyedu/js-lsm-api';
|
|
425
|
+
import type { PostDispatchTokenExchangeRequest } from '@easyedu/js-lsm-api';
|
|
426
|
+
|
|
427
|
+
async function example() {
|
|
428
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
429
|
+
const api = new DispatchApi();
|
|
430
|
+
|
|
431
|
+
const body = {
|
|
432
|
+
// PostDispatchTokenExchange
|
|
433
|
+
postDispatchTokenExchange: ...,
|
|
434
|
+
} satisfies PostDispatchTokenExchangeRequest;
|
|
435
|
+
|
|
436
|
+
try {
|
|
437
|
+
const data = await api.postDispatchTokenExchange(body);
|
|
438
|
+
console.log(data);
|
|
439
|
+
} catch (error) {
|
|
440
|
+
console.error(error);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// Run the test
|
|
445
|
+
example().catch(console.error);
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
### Parameters
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
| Name | Type | Description | Notes |
|
|
452
|
+
|------------- | ------------- | ------------- | -------------|
|
|
453
|
+
| **postDispatchTokenExchange** | [PostDispatchTokenExchange](PostDispatchTokenExchange.md) | | |
|
|
454
|
+
|
|
455
|
+
### Return type
|
|
456
|
+
|
|
457
|
+
[**DispatchTokenResponse**](DispatchTokenResponse.md)
|
|
458
|
+
|
|
459
|
+
### Authorization
|
|
460
|
+
|
|
461
|
+
No authorization required
|
|
462
|
+
|
|
463
|
+
### HTTP request headers
|
|
464
|
+
|
|
465
|
+
- **Content-Type**: `application/json`
|
|
466
|
+
- **Accept**: `application/json`
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
### HTTP response details
|
|
470
|
+
| Status code | Description | Response headers |
|
|
471
|
+
|-------------|-------------|------------------|
|
|
472
|
+
| **200** | Dispatch access token | - |
|
|
473
|
+
| **401** | Invalid, expired, or consumed launch code | - |
|
|
474
|
+
|
|
475
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
## postDispatchTokenRefresh
|
|
479
|
+
|
|
480
|
+
> DispatchTokenResponse postDispatchTokenRefresh()
|
|
481
|
+
|
|
482
|
+
Rotate a valid hosted SCORM access token
|
|
483
|
+
|
|
484
|
+
### Example
|
|
485
|
+
|
|
486
|
+
```ts
|
|
487
|
+
import {
|
|
488
|
+
Configuration,
|
|
489
|
+
DispatchApi,
|
|
490
|
+
} from '@easyedu/js-lsm-api';
|
|
491
|
+
import type { PostDispatchTokenRefreshRequest } from '@easyedu/js-lsm-api';
|
|
492
|
+
|
|
493
|
+
async function example() {
|
|
494
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
495
|
+
const api = new DispatchApi();
|
|
496
|
+
|
|
497
|
+
try {
|
|
498
|
+
const data = await api.postDispatchTokenRefresh();
|
|
499
|
+
console.log(data);
|
|
500
|
+
} catch (error) {
|
|
501
|
+
console.error(error);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
// Run the test
|
|
506
|
+
example().catch(console.error);
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### Parameters
|
|
510
|
+
|
|
511
|
+
This endpoint does not need any parameter.
|
|
512
|
+
|
|
513
|
+
### Return type
|
|
514
|
+
|
|
515
|
+
[**DispatchTokenResponse**](DispatchTokenResponse.md)
|
|
516
|
+
|
|
517
|
+
### Authorization
|
|
518
|
+
|
|
519
|
+
No authorization required
|
|
520
|
+
|
|
521
|
+
### HTTP request headers
|
|
522
|
+
|
|
523
|
+
- **Content-Type**: Not defined
|
|
524
|
+
- **Accept**: `application/json`
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
### HTTP response details
|
|
528
|
+
| Status code | Description | Response headers |
|
|
529
|
+
|-------------|-------------|------------------|
|
|
530
|
+
| **200** | Replacement access token | - |
|
|
531
|
+
| **401** | Dispatch token required | - |
|
|
532
|
+
|
|
533
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
## putDispatchQuizSessionAnswer
|
|
537
|
+
|
|
538
|
+
> GetLibraryQuizSession putDispatchQuizSessionAnswer(sessionId, sessionQuestionId, putLibraryQuizSessionAnswer)
|
|
539
|
+
|
|
540
|
+
Save a registration-owned native quiz answer
|
|
541
|
+
|
|
542
|
+
### Example
|
|
543
|
+
|
|
544
|
+
```ts
|
|
545
|
+
import {
|
|
546
|
+
Configuration,
|
|
547
|
+
DispatchApi,
|
|
548
|
+
} from '@easyedu/js-lsm-api';
|
|
549
|
+
import type { PutDispatchQuizSessionAnswerRequest } from '@easyedu/js-lsm-api';
|
|
550
|
+
|
|
551
|
+
async function example() {
|
|
552
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
553
|
+
const api = new DispatchApi();
|
|
554
|
+
|
|
555
|
+
const body = {
|
|
556
|
+
// string
|
|
557
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
558
|
+
// string
|
|
559
|
+
sessionQuestionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
560
|
+
// PutLibraryQuizSessionAnswer
|
|
561
|
+
putLibraryQuizSessionAnswer: ...,
|
|
562
|
+
} satisfies PutDispatchQuizSessionAnswerRequest;
|
|
563
|
+
|
|
564
|
+
try {
|
|
565
|
+
const data = await api.putDispatchQuizSessionAnswer(body);
|
|
566
|
+
console.log(data);
|
|
567
|
+
} catch (error) {
|
|
568
|
+
console.error(error);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
// Run the test
|
|
573
|
+
example().catch(console.error);
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
### Parameters
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
| Name | Type | Description | Notes |
|
|
580
|
+
|------------- | ------------- | ------------- | -------------|
|
|
581
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
582
|
+
| **sessionQuestionId** | `string` | | [Defaults to `undefined`] |
|
|
583
|
+
| **putLibraryQuizSessionAnswer** | [PutLibraryQuizSessionAnswer](PutLibraryQuizSessionAnswer.md) | | |
|
|
584
|
+
|
|
585
|
+
### Return type
|
|
586
|
+
|
|
587
|
+
[**GetLibraryQuizSession**](GetLibraryQuizSession.md)
|
|
588
|
+
|
|
589
|
+
### Authorization
|
|
590
|
+
|
|
591
|
+
No authorization required
|
|
592
|
+
|
|
593
|
+
### HTTP request headers
|
|
594
|
+
|
|
595
|
+
- **Content-Type**: `application/json`
|
|
596
|
+
- **Accept**: `application/json`
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
### HTTP response details
|
|
600
|
+
| Status code | Description | Response headers |
|
|
601
|
+
|-------------|-------------|------------------|
|
|
602
|
+
| **200** | Quiz session | - |
|
|
132
603
|
|
|
133
604
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
134
605
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# DispatchTokenResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`accessToken` | string
|
|
10
|
+
`tokenType` | string
|
|
11
|
+
`registrationId` | string
|
|
12
|
+
`expiresAt` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { DispatchTokenResponse } from '@easyedu/js-lsm-api'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"accessToken": null,
|
|
22
|
+
"tokenType": null,
|
|
23
|
+
"registrationId": null,
|
|
24
|
+
"expiresAt": null,
|
|
25
|
+
} satisfies DispatchTokenResponse
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as DispatchTokenResponse
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
package/docs/GetCourseExport.md
CHANGED
|
@@ -19,6 +19,13 @@ Name | Type
|
|
|
19
19
|
`fileSize` | number
|
|
20
20
|
`errorMessage` | string
|
|
21
21
|
`createdAt` | number
|
|
22
|
+
`deliveryMode` | string
|
|
23
|
+
`rollupPolicy` | [HostedScormRollupPolicy](HostedScormRollupPolicy.md)
|
|
24
|
+
`accessPolicy` | [HostedScormAccessPolicy](HostedScormAccessPolicy.md)
|
|
25
|
+
`runtimeStatus` | string
|
|
26
|
+
`registeredLearners` | number
|
|
27
|
+
`totalLaunches` | number
|
|
28
|
+
`lastLaunchAt` | number
|
|
22
29
|
|
|
23
30
|
## Example
|
|
24
31
|
|
|
@@ -39,6 +46,13 @@ const example = {
|
|
|
39
46
|
"fileSize": null,
|
|
40
47
|
"errorMessage": null,
|
|
41
48
|
"createdAt": null,
|
|
49
|
+
"deliveryMode": null,
|
|
50
|
+
"rollupPolicy": null,
|
|
51
|
+
"accessPolicy": null,
|
|
52
|
+
"runtimeStatus": null,
|
|
53
|
+
"registeredLearners": null,
|
|
54
|
+
"totalLaunches": null,
|
|
55
|
+
"lastLaunchAt": null,
|
|
42
56
|
} satisfies GetCourseExport
|
|
43
57
|
|
|
44
58
|
console.log(example)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
# GetDispatchCourse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`dispatchId` | string
|
|
10
|
+
`registrationId` | string
|
|
11
|
+
`courseId` | string
|
|
12
|
+
`courseVersionId` | string
|
|
13
|
+
`title` | string
|
|
14
|
+
`progressionMode` | string
|
|
15
|
+
`currentItemId` | string
|
|
16
|
+
`outline` | [Array<HostedScormOutlineEntry>](HostedScormOutlineEntry.md)
|
|
17
|
+
`rollup` | [GetDispatchRollup](GetDispatchRollup.md)
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { GetDispatchCourse } from '@easyedu/js-lsm-api'
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"dispatchId": null,
|
|
27
|
+
"registrationId": null,
|
|
28
|
+
"courseId": null,
|
|
29
|
+
"courseVersionId": null,
|
|
30
|
+
"title": null,
|
|
31
|
+
"progressionMode": null,
|
|
32
|
+
"currentItemId": null,
|
|
33
|
+
"outline": null,
|
|
34
|
+
"rollup": null,
|
|
35
|
+
} satisfies GetDispatchCourse
|
|
36
|
+
|
|
37
|
+
console.log(example)
|
|
38
|
+
|
|
39
|
+
// Convert the instance to a JSON string
|
|
40
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
41
|
+
console.log(exampleJSON)
|
|
42
|
+
|
|
43
|
+
// Parse the JSON string back to an object
|
|
44
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetDispatchCourse
|
|
45
|
+
console.log(exampleParsed)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
49
|
+
|
|
50
|
+
|