@easyedu/js-lsm-api 1.137.0 → 1.138.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/README.md +5 -3
- package/dist/apis/CourseApi.d.ts +21 -0
- package/dist/apis/CourseApi.js +55 -0
- package/dist/apis/DispatchApi.d.ts +21 -2
- package/dist/apis/DispatchApi.js +45 -2
- package/dist/apis/RichTextApi.d.ts +3 -0
- package/dist/apis/RichTextApi.js +5 -0
- package/dist/esm/apis/CourseApi.d.ts +21 -0
- package/dist/esm/apis/CourseApi.js +55 -0
- package/dist/esm/apis/DispatchApi.d.ts +21 -2
- package/dist/esm/apis/DispatchApi.js +45 -2
- package/dist/esm/apis/RichTextApi.d.ts +3 -0
- package/dist/esm/apis/RichTextApi.js +5 -0
- package/dist/esm/models/PostCourseExport.d.ts +1 -1
- package/dist/models/PostCourseExport.d.ts +1 -1
- package/docs/CourseApi.md +79 -0
- package/docs/DispatchApi.md +77 -3
- package/docs/RichTextApi.md +6 -1
- package/package.json +1 -1
- package/src/apis/CourseApi.ts +85 -0
- package/src/apis/DispatchApi.ts +55 -2
- package/src/apis/RichTextApi.ts +7 -0
- package/src/models/PostCourseExport.ts +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @easyedu/js-lsm-api@1.
|
|
1
|
+
# @easyedu/js-lsm-api@1.138.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
|
|
4
4
|
|
|
@@ -224,6 +224,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
224
224
|
*CourseApi* | [**putCourseVersionOutlineEntryMove**](docs/CourseApi.md#putcourseversionoutlineentrymove) | **PUT** /courses/{courseId}/draft/outline/move | Move a section or item to a new parent and sibling position
|
|
225
225
|
*CourseApi* | [**putCourseVersionSection**](docs/CourseApi.md#putcourseversionsection) | **PUT** /courses/{courseId}/draft/sections/{sectionId} | Update a draft section
|
|
226
226
|
*CourseApi* | [**putHostedScormExportAccess**](docs/CourseApi.md#puthostedscormexportaccess) | **PUT** /courses/{courseId}/exports/{exportId}/access | Update mutable access controls for a hosted SCORM export
|
|
227
|
+
*CourseApi* | [**putHostedScormExportRegistrationStatus**](docs/CourseApi.md#puthostedscormexportregistrationstatus) | **PUT** /courses/{courseId}/exports/{exportId}/registrations/{registrationId}/status | Revoke or restore one learner\'s access to a hosted SCORM export
|
|
227
228
|
*CourseApi* | [**putHostedScormExportStatus**](docs/CourseApi.md#puthostedscormexportstatus) | **PUT** /courses/{courseId}/exports/{exportId}/status | Revoke or reactivate a hosted SCORM export
|
|
228
229
|
*CourseCatalogApi* | [**addCourseToCatalog**](docs/CourseCatalogApi.md#addcoursetocatalog) | **POST** /catalogs/{catalogId}/courses/{courseId} | Add a course to a catalog
|
|
229
230
|
*CourseCatalogApi* | [**deleteCourseCatalog**](docs/CourseCatalogApi.md#deletecoursecatalog) | **DELETE** /catalogs/{catalogId} | Delete a catalog
|
|
@@ -244,12 +245,13 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
244
245
|
*CourseShareApi* | [**putDeclineShare**](docs/CourseShareApi.md#putdeclineshare) | **PUT** /course-shares/{shareId}/decline | Decline an offer
|
|
245
246
|
*DispatchApi* | [**getDispatchCourse**](docs/DispatchApi.md#getdispatchcourse) | **GET** /dispatch/runtime/course | Get the registration-scoped hosted course snapshot
|
|
246
247
|
*DispatchApi* | [**getDispatchQuizSession**](docs/DispatchApi.md#getdispatchquizsession) | **GET** /dispatch/runtime/quiz-sessions/{sessionId} | Get a registration-owned native quiz session
|
|
248
|
+
*DispatchApi* | [**getDispatchQuizSessionResults**](docs/DispatchApi.md#getdispatchquizsessionresults) | **GET** /dispatch/runtime/quiz-sessions/{sessionId}/results | Get the result of a registration-owned native quiz session
|
|
247
249
|
*DispatchApi* | [**getDispatchRollup**](docs/DispatchApi.md#getdispatchrollup) | **GET** /dispatch/sessions/{dispatchPackageId}/rollup | Get dispatch package rollup data
|
|
248
250
|
*DispatchApi* | [**postDispatchItemLaunch**](docs/DispatchApi.md#postdispatchitemlaunch) | **POST** /dispatch/runtime/items/{itemId}/launch | Start or resume a selected hosted course item
|
|
249
251
|
*DispatchApi* | [**postDispatchLaunch**](docs/DispatchApi.md#postdispatchlaunch) | **POST** /dispatch/launch | Launch a dispatch package
|
|
250
252
|
*DispatchApi* | [**postDispatchQuizSessionSubmit**](docs/DispatchApi.md#postdispatchquizsessionsubmit) | **POST** /dispatch/runtime/quiz-sessions/{sessionId}/submit | Submit a registration-owned native quiz session
|
|
251
253
|
*DispatchApi* | [**postDispatchTokenExchange**](docs/DispatchApi.md#postdispatchtokenexchange) | **POST** /dispatch/runtime/token | Exchange a one-time hosted SCORM launch code
|
|
252
|
-
*DispatchApi* | [**postDispatchTokenRefresh**](docs/DispatchApi.md#postdispatchtokenrefresh) | **POST** /dispatch/runtime/token/refresh |
|
|
254
|
+
*DispatchApi* | [**postDispatchTokenRefresh**](docs/DispatchApi.md#postdispatchtokenrefresh) | **POST** /dispatch/runtime/token/refresh | Extend a valid hosted SCORM access token
|
|
253
255
|
*DispatchApi* | [**putDispatchQuizSessionAnswer**](docs/DispatchApi.md#putdispatchquizsessionanswer) | **PUT** /dispatch/runtime/quiz-sessions/{sessionId}/answers/{sessionQuestionId} | Save a registration-owned native quiz answer
|
|
254
256
|
*EmailTemplateApi* | [**deleteEmailTemplateDraft**](docs/EmailTemplateApi.md#deleteemailtemplatedraft) | **DELETE** /email-templates/{templateKey}/draft | Discard the current portal email template draft
|
|
255
257
|
*EmailTemplateApi* | [**deleteSystemEmailTemplateDraft**](docs/EmailTemplateApi.md#deletesystememailtemplatedraft) | **DELETE** /system/email-templates/{templateKey}/draft | Discard the current platform email template draft
|
|
@@ -842,7 +844,7 @@ and is automatically generated by the
|
|
|
842
844
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
843
845
|
|
|
844
846
|
- API version: `1.0.0`
|
|
845
|
-
- Package version: `1.
|
|
847
|
+
- Package version: `1.138.0`
|
|
846
848
|
- Generator version: `7.22.0`
|
|
847
849
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
848
850
|
|
package/dist/apis/CourseApi.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { type GetCourseVersionItemSession } from '../models/GetCourseVersionItem
|
|
|
25
25
|
import { type GetCourseVersionList } from '../models/GetCourseVersionList';
|
|
26
26
|
import { type GetCourseVersionProgression } from '../models/GetCourseVersionProgression';
|
|
27
27
|
import { type GetCourseVersionSection } from '../models/GetCourseVersionSection';
|
|
28
|
+
import { type GetHostedScormRegistration } from '../models/GetHostedScormRegistration';
|
|
28
29
|
import { type GetHostedScormRegistrationList } from '../models/GetHostedScormRegistrationList';
|
|
29
30
|
import { type HostedScormAccessPolicy } from '../models/HostedScormAccessPolicy';
|
|
30
31
|
import { type PostClearSessions } from '../models/PostClearSessions';
|
|
@@ -250,6 +251,12 @@ export interface PutHostedScormExportAccessRequest {
|
|
|
250
251
|
exportId: string;
|
|
251
252
|
hostedScormAccessPolicy: HostedScormAccessPolicy;
|
|
252
253
|
}
|
|
254
|
+
export interface PutHostedScormExportRegistrationStatusRequest {
|
|
255
|
+
courseId: string;
|
|
256
|
+
exportId: string;
|
|
257
|
+
registrationId: string;
|
|
258
|
+
putHostedScormStatus: PutHostedScormStatus;
|
|
259
|
+
}
|
|
253
260
|
export interface PutHostedScormExportStatusRequest {
|
|
254
261
|
courseId: string;
|
|
255
262
|
exportId: string;
|
|
@@ -783,6 +790,20 @@ export declare class CourseApi extends runtime.BaseAPI {
|
|
|
783
790
|
* Update mutable access controls for a hosted SCORM export
|
|
784
791
|
*/
|
|
785
792
|
putHostedScormExportAccess(requestParameters: PutHostedScormExportAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExport>;
|
|
793
|
+
/**
|
|
794
|
+
* Creates request options for putHostedScormExportRegistrationStatus without sending the request
|
|
795
|
+
*/
|
|
796
|
+
putHostedScormExportRegistrationStatusRequestOpts(requestParameters: PutHostedScormExportRegistrationStatusRequest): Promise<runtime.RequestOpts>;
|
|
797
|
+
/**
|
|
798
|
+
* Revoking a registration blocks that learner\'s future launches and immediately invalidates their open sessions, without affecting other learners on the same export. Restoring it allows new launches from the client LMS; sessions that were open when access was revoked stay closed.
|
|
799
|
+
* Revoke or restore one learner\'s access to a hosted SCORM export
|
|
800
|
+
*/
|
|
801
|
+
putHostedScormExportRegistrationStatusRaw(requestParameters: PutHostedScormExportRegistrationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHostedScormRegistration>>;
|
|
802
|
+
/**
|
|
803
|
+
* Revoking a registration blocks that learner\'s future launches and immediately invalidates their open sessions, without affecting other learners on the same export. Restoring it allows new launches from the client LMS; sessions that were open when access was revoked stay closed.
|
|
804
|
+
* Revoke or restore one learner\'s access to a hosted SCORM export
|
|
805
|
+
*/
|
|
806
|
+
putHostedScormExportRegistrationStatus(requestParameters: PutHostedScormExportRegistrationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetHostedScormRegistration>;
|
|
786
807
|
/**
|
|
787
808
|
* Creates request options for putHostedScormExportStatus without sending the request
|
|
788
809
|
*/
|
package/dist/apis/CourseApi.js
CHANGED
|
@@ -39,6 +39,7 @@ const GetCourseVersionItemSession_1 = require("../models/GetCourseVersionItemSes
|
|
|
39
39
|
const GetCourseVersionList_1 = require("../models/GetCourseVersionList");
|
|
40
40
|
const GetCourseVersionProgression_1 = require("../models/GetCourseVersionProgression");
|
|
41
41
|
const GetCourseVersionSection_1 = require("../models/GetCourseVersionSection");
|
|
42
|
+
const GetHostedScormRegistration_1 = require("../models/GetHostedScormRegistration");
|
|
42
43
|
const GetHostedScormRegistrationList_1 = require("../models/GetHostedScormRegistrationList");
|
|
43
44
|
const HostedScormAccessPolicy_1 = require("../models/HostedScormAccessPolicy");
|
|
44
45
|
const PostClearSessions_1 = require("../models/PostClearSessions");
|
|
@@ -2042,6 +2043,60 @@ class CourseApi extends runtime.BaseAPI {
|
|
|
2042
2043
|
return yield response.value();
|
|
2043
2044
|
});
|
|
2044
2045
|
}
|
|
2046
|
+
/**
|
|
2047
|
+
* Creates request options for putHostedScormExportRegistrationStatus without sending the request
|
|
2048
|
+
*/
|
|
2049
|
+
putHostedScormExportRegistrationStatusRequestOpts(requestParameters) {
|
|
2050
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2051
|
+
if (requestParameters['courseId'] == null) {
|
|
2052
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling putHostedScormExportRegistrationStatus().');
|
|
2053
|
+
}
|
|
2054
|
+
if (requestParameters['exportId'] == null) {
|
|
2055
|
+
throw new runtime.RequiredError('exportId', 'Required parameter "exportId" was null or undefined when calling putHostedScormExportRegistrationStatus().');
|
|
2056
|
+
}
|
|
2057
|
+
if (requestParameters['registrationId'] == null) {
|
|
2058
|
+
throw new runtime.RequiredError('registrationId', 'Required parameter "registrationId" was null or undefined when calling putHostedScormExportRegistrationStatus().');
|
|
2059
|
+
}
|
|
2060
|
+
if (requestParameters['putHostedScormStatus'] == null) {
|
|
2061
|
+
throw new runtime.RequiredError('putHostedScormStatus', 'Required parameter "putHostedScormStatus" was null or undefined when calling putHostedScormExportRegistrationStatus().');
|
|
2062
|
+
}
|
|
2063
|
+
const queryParameters = {};
|
|
2064
|
+
const headerParameters = {};
|
|
2065
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2066
|
+
let urlPath = `/courses/{courseId}/exports/{exportId}/registrations/{registrationId}/status`;
|
|
2067
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
2068
|
+
urlPath = urlPath.replace('{exportId}', encodeURIComponent(String(requestParameters['exportId'])));
|
|
2069
|
+
urlPath = urlPath.replace('{registrationId}', encodeURIComponent(String(requestParameters['registrationId'])));
|
|
2070
|
+
return {
|
|
2071
|
+
path: urlPath,
|
|
2072
|
+
method: 'PUT',
|
|
2073
|
+
headers: headerParameters,
|
|
2074
|
+
query: queryParameters,
|
|
2075
|
+
body: (0, PutHostedScormStatus_1.PutHostedScormStatusToJSON)(requestParameters['putHostedScormStatus']),
|
|
2076
|
+
};
|
|
2077
|
+
});
|
|
2078
|
+
}
|
|
2079
|
+
/**
|
|
2080
|
+
* Revoking a registration blocks that learner\'s future launches and immediately invalidates their open sessions, without affecting other learners on the same export. Restoring it allows new launches from the client LMS; sessions that were open when access was revoked stay closed.
|
|
2081
|
+
* Revoke or restore one learner\'s access to a hosted SCORM export
|
|
2082
|
+
*/
|
|
2083
|
+
putHostedScormExportRegistrationStatusRaw(requestParameters, initOverrides) {
|
|
2084
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2085
|
+
const requestOptions = yield this.putHostedScormExportRegistrationStatusRequestOpts(requestParameters);
|
|
2086
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
2087
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetHostedScormRegistration_1.GetHostedScormRegistrationFromJSON)(jsonValue));
|
|
2088
|
+
});
|
|
2089
|
+
}
|
|
2090
|
+
/**
|
|
2091
|
+
* Revoking a registration blocks that learner\'s future launches and immediately invalidates their open sessions, without affecting other learners on the same export. Restoring it allows new launches from the client LMS; sessions that were open when access was revoked stay closed.
|
|
2092
|
+
* Revoke or restore one learner\'s access to a hosted SCORM export
|
|
2093
|
+
*/
|
|
2094
|
+
putHostedScormExportRegistrationStatus(requestParameters, initOverrides) {
|
|
2095
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2096
|
+
const response = yield this.putHostedScormExportRegistrationStatusRaw(requestParameters, initOverrides);
|
|
2097
|
+
return yield response.value();
|
|
2098
|
+
});
|
|
2099
|
+
}
|
|
2045
2100
|
/**
|
|
2046
2101
|
* Creates request options for putHostedScormExportStatus without sending the request
|
|
2047
2102
|
*/
|
|
@@ -24,6 +24,9 @@ import { type PutLibraryQuizSessionAnswer } from '../models/PutLibraryQuizSessio
|
|
|
24
24
|
export interface GetDispatchQuizSessionRequest {
|
|
25
25
|
sessionId: string;
|
|
26
26
|
}
|
|
27
|
+
export interface GetDispatchQuizSessionResultsRequest {
|
|
28
|
+
sessionId: string;
|
|
29
|
+
}
|
|
27
30
|
export interface GetDispatchRollupRequest {
|
|
28
31
|
dispatchPackageId: string;
|
|
29
32
|
}
|
|
@@ -73,6 +76,20 @@ export declare class DispatchApi extends runtime.BaseAPI {
|
|
|
73
76
|
* Get a registration-owned native quiz session
|
|
74
77
|
*/
|
|
75
78
|
getDispatchQuizSession(requestParameters: GetDispatchQuizSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession>;
|
|
79
|
+
/**
|
|
80
|
+
* Creates request options for getDispatchQuizSessionResults without sending the request
|
|
81
|
+
*/
|
|
82
|
+
getDispatchQuizSessionResultsRequestOpts(requestParameters: GetDispatchQuizSessionResultsRequest): Promise<runtime.RequestOpts>;
|
|
83
|
+
/**
|
|
84
|
+
* Returns the learner\'s score and, where the quiz settings allow review, their per-question answers, correctness, and explanations. Results are not available while the attempt is still in progress.
|
|
85
|
+
* Get the result of a registration-owned native quiz session
|
|
86
|
+
*/
|
|
87
|
+
getDispatchQuizSessionResultsRaw(requestParameters: GetDispatchQuizSessionResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizResult>>;
|
|
88
|
+
/**
|
|
89
|
+
* Returns the learner\'s score and, where the quiz settings allow review, their per-question answers, correctness, and explanations. Results are not available while the attempt is still in progress.
|
|
90
|
+
* Get the result of a registration-owned native quiz session
|
|
91
|
+
*/
|
|
92
|
+
getDispatchQuizSessionResults(requestParameters: GetDispatchQuizSessionResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizResult>;
|
|
76
93
|
/**
|
|
77
94
|
* Creates request options for getDispatchRollup without sending the request
|
|
78
95
|
*/
|
|
@@ -138,11 +155,13 @@ export declare class DispatchApi extends runtime.BaseAPI {
|
|
|
138
155
|
*/
|
|
139
156
|
postDispatchTokenRefreshRequestOpts(): Promise<runtime.RequestOpts>;
|
|
140
157
|
/**
|
|
141
|
-
*
|
|
158
|
+
* Slides the presented token\'s expiry forward and returns the same token with its new `expires_at`. The token is extended in place rather than rotated so that a hosted item the learner already has open keeps working. A single launch can be kept alive for at most 24 hours; after that the learner relaunches the course from their LMS.
|
|
159
|
+
* Extend a valid hosted SCORM access token
|
|
142
160
|
*/
|
|
143
161
|
postDispatchTokenRefreshRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DispatchTokenResponse>>;
|
|
144
162
|
/**
|
|
145
|
-
*
|
|
163
|
+
* Slides the presented token\'s expiry forward and returns the same token with its new `expires_at`. The token is extended in place rather than rotated so that a hosted item the learner already has open keeps working. A single launch can be kept alive for at most 24 hours; after that the learner relaunches the course from their LMS.
|
|
164
|
+
* Extend a valid hosted SCORM access token
|
|
146
165
|
*/
|
|
147
166
|
postDispatchTokenRefresh(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DispatchTokenResponse>;
|
|
148
167
|
/**
|
package/dist/apis/DispatchApi.js
CHANGED
|
@@ -113,6 +113,47 @@ class DispatchApi extends runtime.BaseAPI {
|
|
|
113
113
|
return yield response.value();
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Creates request options for getDispatchQuizSessionResults without sending the request
|
|
118
|
+
*/
|
|
119
|
+
getDispatchQuizSessionResultsRequestOpts(requestParameters) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
if (requestParameters['sessionId'] == null) {
|
|
122
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getDispatchQuizSessionResults().');
|
|
123
|
+
}
|
|
124
|
+
const queryParameters = {};
|
|
125
|
+
const headerParameters = {};
|
|
126
|
+
let urlPath = `/dispatch/runtime/quiz-sessions/{sessionId}/results`;
|
|
127
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
128
|
+
return {
|
|
129
|
+
path: urlPath,
|
|
130
|
+
method: 'GET',
|
|
131
|
+
headers: headerParameters,
|
|
132
|
+
query: queryParameters,
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Returns the learner\'s score and, where the quiz settings allow review, their per-question answers, correctness, and explanations. Results are not available while the attempt is still in progress.
|
|
138
|
+
* Get the result of a registration-owned native quiz session
|
|
139
|
+
*/
|
|
140
|
+
getDispatchQuizSessionResultsRaw(requestParameters, initOverrides) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
const requestOptions = yield this.getDispatchQuizSessionResultsRequestOpts(requestParameters);
|
|
143
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
144
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetLibraryQuizResult_1.GetLibraryQuizResultFromJSON)(jsonValue));
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Returns the learner\'s score and, where the quiz settings allow review, their per-question answers, correctness, and explanations. Results are not available while the attempt is still in progress.
|
|
149
|
+
* Get the result of a registration-owned native quiz session
|
|
150
|
+
*/
|
|
151
|
+
getDispatchQuizSessionResults(requestParameters, initOverrides) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
const response = yield this.getDispatchQuizSessionResultsRaw(requestParameters, initOverrides);
|
|
154
|
+
return yield response.value();
|
|
155
|
+
});
|
|
156
|
+
}
|
|
116
157
|
/**
|
|
117
158
|
* Creates request options for getDispatchRollup without sending the request
|
|
118
159
|
*/
|
|
@@ -329,7 +370,8 @@ class DispatchApi extends runtime.BaseAPI {
|
|
|
329
370
|
});
|
|
330
371
|
}
|
|
331
372
|
/**
|
|
332
|
-
*
|
|
373
|
+
* Slides the presented token\'s expiry forward and returns the same token with its new `expires_at`. The token is extended in place rather than rotated so that a hosted item the learner already has open keeps working. A single launch can be kept alive for at most 24 hours; after that the learner relaunches the course from their LMS.
|
|
374
|
+
* Extend a valid hosted SCORM access token
|
|
333
375
|
*/
|
|
334
376
|
postDispatchTokenRefreshRaw(initOverrides) {
|
|
335
377
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -339,7 +381,8 @@ class DispatchApi extends runtime.BaseAPI {
|
|
|
339
381
|
});
|
|
340
382
|
}
|
|
341
383
|
/**
|
|
342
|
-
*
|
|
384
|
+
* Slides the presented token\'s expiry forward and returns the same token with its new `expires_at`. The token is extended in place rather than rotated so that a hosted item the learner already has open keeps working. A single launch can be kept alive for at most 24 hours; after that the learner relaunches the course from their LMS.
|
|
385
|
+
* Extend a valid hosted SCORM access token
|
|
343
386
|
*/
|
|
344
387
|
postDispatchTokenRefresh(initOverrides) {
|
|
345
388
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -16,6 +16,7 @@ import { type PostRichTextAssetUpload } from '../models/PostRichTextAssetUpload'
|
|
|
16
16
|
import { type RichTextAsset } from '../models/RichTextAsset';
|
|
17
17
|
export interface GetRichTextAssetRequest {
|
|
18
18
|
assetId: string;
|
|
19
|
+
token?: string;
|
|
19
20
|
}
|
|
20
21
|
export interface PostRichTextAssetCompleteRequest {
|
|
21
22
|
assetId: string;
|
|
@@ -37,10 +38,12 @@ export declare class RichTextApi extends runtime.BaseAPI {
|
|
|
37
38
|
*/
|
|
38
39
|
getRichTextAssetRequestOpts(requestParameters: GetRichTextAssetRequest): Promise<runtime.RequestOpts>;
|
|
39
40
|
/**
|
|
41
|
+
* Portal users need `content_library:read`. Hosted SCORM learners may instead present a dispatch token (the `X-Dispatch-Token` header or a `token` query parameter); they can load only assets referenced by the content their export contains.
|
|
40
42
|
* Redirect to a signed rich text asset URL
|
|
41
43
|
*/
|
|
42
44
|
getRichTextAssetRaw(requestParameters: GetRichTextAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
43
45
|
/**
|
|
46
|
+
* Portal users need `content_library:read`. Hosted SCORM learners may instead present a dispatch token (the `X-Dispatch-Token` header or a `token` query parameter); they can load only assets referenced by the content their export contains.
|
|
44
47
|
* Redirect to a signed rich text asset URL
|
|
45
48
|
*/
|
|
46
49
|
getRichTextAsset(requestParameters: GetRichTextAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
package/dist/apis/RichTextApi.js
CHANGED
|
@@ -41,6 +41,9 @@ class RichTextApi extends runtime.BaseAPI {
|
|
|
41
41
|
throw new runtime.RequiredError('assetId', 'Required parameter "assetId" was null or undefined when calling getRichTextAsset().');
|
|
42
42
|
}
|
|
43
43
|
const queryParameters = {};
|
|
44
|
+
if (requestParameters['token'] != null) {
|
|
45
|
+
queryParameters['token'] = requestParameters['token'];
|
|
46
|
+
}
|
|
44
47
|
const headerParameters = {};
|
|
45
48
|
let urlPath = `/rich-text/assets/{assetId}`;
|
|
46
49
|
urlPath = urlPath.replace('{assetId}', encodeURIComponent(String(requestParameters['assetId'])));
|
|
@@ -53,6 +56,7 @@ class RichTextApi extends runtime.BaseAPI {
|
|
|
53
56
|
});
|
|
54
57
|
}
|
|
55
58
|
/**
|
|
59
|
+
* Portal users need `content_library:read`. Hosted SCORM learners may instead present a dispatch token (the `X-Dispatch-Token` header or a `token` query parameter); they can load only assets referenced by the content their export contains.
|
|
56
60
|
* Redirect to a signed rich text asset URL
|
|
57
61
|
*/
|
|
58
62
|
getRichTextAssetRaw(requestParameters, initOverrides) {
|
|
@@ -63,6 +67,7 @@ class RichTextApi extends runtime.BaseAPI {
|
|
|
63
67
|
});
|
|
64
68
|
}
|
|
65
69
|
/**
|
|
70
|
+
* Portal users need `content_library:read`. Hosted SCORM learners may instead present a dispatch token (the `X-Dispatch-Token` header or a `token` query parameter); they can load only assets referenced by the content their export contains.
|
|
66
71
|
* Redirect to a signed rich text asset URL
|
|
67
72
|
*/
|
|
68
73
|
getRichTextAsset(requestParameters, initOverrides) {
|
|
@@ -25,6 +25,7 @@ import { type GetCourseVersionItemSession } from '../models/GetCourseVersionItem
|
|
|
25
25
|
import { type GetCourseVersionList } from '../models/GetCourseVersionList';
|
|
26
26
|
import { type GetCourseVersionProgression } from '../models/GetCourseVersionProgression';
|
|
27
27
|
import { type GetCourseVersionSection } from '../models/GetCourseVersionSection';
|
|
28
|
+
import { type GetHostedScormRegistration } from '../models/GetHostedScormRegistration';
|
|
28
29
|
import { type GetHostedScormRegistrationList } from '../models/GetHostedScormRegistrationList';
|
|
29
30
|
import { type HostedScormAccessPolicy } from '../models/HostedScormAccessPolicy';
|
|
30
31
|
import { type PostClearSessions } from '../models/PostClearSessions';
|
|
@@ -250,6 +251,12 @@ export interface PutHostedScormExportAccessRequest {
|
|
|
250
251
|
exportId: string;
|
|
251
252
|
hostedScormAccessPolicy: HostedScormAccessPolicy;
|
|
252
253
|
}
|
|
254
|
+
export interface PutHostedScormExportRegistrationStatusRequest {
|
|
255
|
+
courseId: string;
|
|
256
|
+
exportId: string;
|
|
257
|
+
registrationId: string;
|
|
258
|
+
putHostedScormStatus: PutHostedScormStatus;
|
|
259
|
+
}
|
|
253
260
|
export interface PutHostedScormExportStatusRequest {
|
|
254
261
|
courseId: string;
|
|
255
262
|
exportId: string;
|
|
@@ -783,6 +790,20 @@ export declare class CourseApi extends runtime.BaseAPI {
|
|
|
783
790
|
* Update mutable access controls for a hosted SCORM export
|
|
784
791
|
*/
|
|
785
792
|
putHostedScormExportAccess(requestParameters: PutHostedScormExportAccessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseExport>;
|
|
793
|
+
/**
|
|
794
|
+
* Creates request options for putHostedScormExportRegistrationStatus without sending the request
|
|
795
|
+
*/
|
|
796
|
+
putHostedScormExportRegistrationStatusRequestOpts(requestParameters: PutHostedScormExportRegistrationStatusRequest): Promise<runtime.RequestOpts>;
|
|
797
|
+
/**
|
|
798
|
+
* Revoking a registration blocks that learner\'s future launches and immediately invalidates their open sessions, without affecting other learners on the same export. Restoring it allows new launches from the client LMS; sessions that were open when access was revoked stay closed.
|
|
799
|
+
* Revoke or restore one learner\'s access to a hosted SCORM export
|
|
800
|
+
*/
|
|
801
|
+
putHostedScormExportRegistrationStatusRaw(requestParameters: PutHostedScormExportRegistrationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHostedScormRegistration>>;
|
|
802
|
+
/**
|
|
803
|
+
* Revoking a registration blocks that learner\'s future launches and immediately invalidates their open sessions, without affecting other learners on the same export. Restoring it allows new launches from the client LMS; sessions that were open when access was revoked stay closed.
|
|
804
|
+
* Revoke or restore one learner\'s access to a hosted SCORM export
|
|
805
|
+
*/
|
|
806
|
+
putHostedScormExportRegistrationStatus(requestParameters: PutHostedScormExportRegistrationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetHostedScormRegistration>;
|
|
786
807
|
/**
|
|
787
808
|
* Creates request options for putHostedScormExportStatus without sending the request
|
|
788
809
|
*/
|
|
@@ -36,6 +36,7 @@ import { GetCourseVersionItemSessionFromJSON, } from '../models/GetCourseVersion
|
|
|
36
36
|
import { GetCourseVersionListFromJSON, } from '../models/GetCourseVersionList';
|
|
37
37
|
import { GetCourseVersionProgressionFromJSON, } from '../models/GetCourseVersionProgression';
|
|
38
38
|
import { GetCourseVersionSectionFromJSON, } from '../models/GetCourseVersionSection';
|
|
39
|
+
import { GetHostedScormRegistrationFromJSON, } from '../models/GetHostedScormRegistration';
|
|
39
40
|
import { GetHostedScormRegistrationListFromJSON, } from '../models/GetHostedScormRegistrationList';
|
|
40
41
|
import { HostedScormAccessPolicyToJSON, } from '../models/HostedScormAccessPolicy';
|
|
41
42
|
import { PostClearSessionsToJSON, } from '../models/PostClearSessions';
|
|
@@ -2039,6 +2040,60 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
2039
2040
|
return yield response.value();
|
|
2040
2041
|
});
|
|
2041
2042
|
}
|
|
2043
|
+
/**
|
|
2044
|
+
* Creates request options for putHostedScormExportRegistrationStatus without sending the request
|
|
2045
|
+
*/
|
|
2046
|
+
putHostedScormExportRegistrationStatusRequestOpts(requestParameters) {
|
|
2047
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2048
|
+
if (requestParameters['courseId'] == null) {
|
|
2049
|
+
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling putHostedScormExportRegistrationStatus().');
|
|
2050
|
+
}
|
|
2051
|
+
if (requestParameters['exportId'] == null) {
|
|
2052
|
+
throw new runtime.RequiredError('exportId', 'Required parameter "exportId" was null or undefined when calling putHostedScormExportRegistrationStatus().');
|
|
2053
|
+
}
|
|
2054
|
+
if (requestParameters['registrationId'] == null) {
|
|
2055
|
+
throw new runtime.RequiredError('registrationId', 'Required parameter "registrationId" was null or undefined when calling putHostedScormExportRegistrationStatus().');
|
|
2056
|
+
}
|
|
2057
|
+
if (requestParameters['putHostedScormStatus'] == null) {
|
|
2058
|
+
throw new runtime.RequiredError('putHostedScormStatus', 'Required parameter "putHostedScormStatus" was null or undefined when calling putHostedScormExportRegistrationStatus().');
|
|
2059
|
+
}
|
|
2060
|
+
const queryParameters = {};
|
|
2061
|
+
const headerParameters = {};
|
|
2062
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2063
|
+
let urlPath = `/courses/{courseId}/exports/{exportId}/registrations/{registrationId}/status`;
|
|
2064
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
2065
|
+
urlPath = urlPath.replace('{exportId}', encodeURIComponent(String(requestParameters['exportId'])));
|
|
2066
|
+
urlPath = urlPath.replace('{registrationId}', encodeURIComponent(String(requestParameters['registrationId'])));
|
|
2067
|
+
return {
|
|
2068
|
+
path: urlPath,
|
|
2069
|
+
method: 'PUT',
|
|
2070
|
+
headers: headerParameters,
|
|
2071
|
+
query: queryParameters,
|
|
2072
|
+
body: PutHostedScormStatusToJSON(requestParameters['putHostedScormStatus']),
|
|
2073
|
+
};
|
|
2074
|
+
});
|
|
2075
|
+
}
|
|
2076
|
+
/**
|
|
2077
|
+
* Revoking a registration blocks that learner\'s future launches and immediately invalidates their open sessions, without affecting other learners on the same export. Restoring it allows new launches from the client LMS; sessions that were open when access was revoked stay closed.
|
|
2078
|
+
* Revoke or restore one learner\'s access to a hosted SCORM export
|
|
2079
|
+
*/
|
|
2080
|
+
putHostedScormExportRegistrationStatusRaw(requestParameters, initOverrides) {
|
|
2081
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2082
|
+
const requestOptions = yield this.putHostedScormExportRegistrationStatusRequestOpts(requestParameters);
|
|
2083
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
2084
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetHostedScormRegistrationFromJSON(jsonValue));
|
|
2085
|
+
});
|
|
2086
|
+
}
|
|
2087
|
+
/**
|
|
2088
|
+
* Revoking a registration blocks that learner\'s future launches and immediately invalidates their open sessions, without affecting other learners on the same export. Restoring it allows new launches from the client LMS; sessions that were open when access was revoked stay closed.
|
|
2089
|
+
* Revoke or restore one learner\'s access to a hosted SCORM export
|
|
2090
|
+
*/
|
|
2091
|
+
putHostedScormExportRegistrationStatus(requestParameters, initOverrides) {
|
|
2092
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2093
|
+
const response = yield this.putHostedScormExportRegistrationStatusRaw(requestParameters, initOverrides);
|
|
2094
|
+
return yield response.value();
|
|
2095
|
+
});
|
|
2096
|
+
}
|
|
2042
2097
|
/**
|
|
2043
2098
|
* Creates request options for putHostedScormExportStatus without sending the request
|
|
2044
2099
|
*/
|
|
@@ -24,6 +24,9 @@ import { type PutLibraryQuizSessionAnswer } from '../models/PutLibraryQuizSessio
|
|
|
24
24
|
export interface GetDispatchQuizSessionRequest {
|
|
25
25
|
sessionId: string;
|
|
26
26
|
}
|
|
27
|
+
export interface GetDispatchQuizSessionResultsRequest {
|
|
28
|
+
sessionId: string;
|
|
29
|
+
}
|
|
27
30
|
export interface GetDispatchRollupRequest {
|
|
28
31
|
dispatchPackageId: string;
|
|
29
32
|
}
|
|
@@ -73,6 +76,20 @@ export declare class DispatchApi extends runtime.BaseAPI {
|
|
|
73
76
|
* Get a registration-owned native quiz session
|
|
74
77
|
*/
|
|
75
78
|
getDispatchQuizSession(requestParameters: GetDispatchQuizSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession>;
|
|
79
|
+
/**
|
|
80
|
+
* Creates request options for getDispatchQuizSessionResults without sending the request
|
|
81
|
+
*/
|
|
82
|
+
getDispatchQuizSessionResultsRequestOpts(requestParameters: GetDispatchQuizSessionResultsRequest): Promise<runtime.RequestOpts>;
|
|
83
|
+
/**
|
|
84
|
+
* Returns the learner\'s score and, where the quiz settings allow review, their per-question answers, correctness, and explanations. Results are not available while the attempt is still in progress.
|
|
85
|
+
* Get the result of a registration-owned native quiz session
|
|
86
|
+
*/
|
|
87
|
+
getDispatchQuizSessionResultsRaw(requestParameters: GetDispatchQuizSessionResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizResult>>;
|
|
88
|
+
/**
|
|
89
|
+
* Returns the learner\'s score and, where the quiz settings allow review, their per-question answers, correctness, and explanations. Results are not available while the attempt is still in progress.
|
|
90
|
+
* Get the result of a registration-owned native quiz session
|
|
91
|
+
*/
|
|
92
|
+
getDispatchQuizSessionResults(requestParameters: GetDispatchQuizSessionResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizResult>;
|
|
76
93
|
/**
|
|
77
94
|
* Creates request options for getDispatchRollup without sending the request
|
|
78
95
|
*/
|
|
@@ -138,11 +155,13 @@ export declare class DispatchApi extends runtime.BaseAPI {
|
|
|
138
155
|
*/
|
|
139
156
|
postDispatchTokenRefreshRequestOpts(): Promise<runtime.RequestOpts>;
|
|
140
157
|
/**
|
|
141
|
-
*
|
|
158
|
+
* Slides the presented token\'s expiry forward and returns the same token with its new `expires_at`. The token is extended in place rather than rotated so that a hosted item the learner already has open keeps working. A single launch can be kept alive for at most 24 hours; after that the learner relaunches the course from their LMS.
|
|
159
|
+
* Extend a valid hosted SCORM access token
|
|
142
160
|
*/
|
|
143
161
|
postDispatchTokenRefreshRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DispatchTokenResponse>>;
|
|
144
162
|
/**
|
|
145
|
-
*
|
|
163
|
+
* Slides the presented token\'s expiry forward and returns the same token with its new `expires_at`. The token is extended in place rather than rotated so that a hosted item the learner already has open keeps working. A single launch can be kept alive for at most 24 hours; after that the learner relaunches the course from their LMS.
|
|
164
|
+
* Extend a valid hosted SCORM access token
|
|
146
165
|
*/
|
|
147
166
|
postDispatchTokenRefresh(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DispatchTokenResponse>;
|
|
148
167
|
/**
|
|
@@ -110,6 +110,47 @@ export class DispatchApi extends runtime.BaseAPI {
|
|
|
110
110
|
return yield response.value();
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Creates request options for getDispatchQuizSessionResults without sending the request
|
|
115
|
+
*/
|
|
116
|
+
getDispatchQuizSessionResultsRequestOpts(requestParameters) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
if (requestParameters['sessionId'] == null) {
|
|
119
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getDispatchQuizSessionResults().');
|
|
120
|
+
}
|
|
121
|
+
const queryParameters = {};
|
|
122
|
+
const headerParameters = {};
|
|
123
|
+
let urlPath = `/dispatch/runtime/quiz-sessions/{sessionId}/results`;
|
|
124
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
125
|
+
return {
|
|
126
|
+
path: urlPath,
|
|
127
|
+
method: 'GET',
|
|
128
|
+
headers: headerParameters,
|
|
129
|
+
query: queryParameters,
|
|
130
|
+
};
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Returns the learner\'s score and, where the quiz settings allow review, their per-question answers, correctness, and explanations. Results are not available while the attempt is still in progress.
|
|
135
|
+
* Get the result of a registration-owned native quiz session
|
|
136
|
+
*/
|
|
137
|
+
getDispatchQuizSessionResultsRaw(requestParameters, initOverrides) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
const requestOptions = yield this.getDispatchQuizSessionResultsRequestOpts(requestParameters);
|
|
140
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
141
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizResultFromJSON(jsonValue));
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Returns the learner\'s score and, where the quiz settings allow review, their per-question answers, correctness, and explanations. Results are not available while the attempt is still in progress.
|
|
146
|
+
* Get the result of a registration-owned native quiz session
|
|
147
|
+
*/
|
|
148
|
+
getDispatchQuizSessionResults(requestParameters, initOverrides) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
const response = yield this.getDispatchQuizSessionResultsRaw(requestParameters, initOverrides);
|
|
151
|
+
return yield response.value();
|
|
152
|
+
});
|
|
153
|
+
}
|
|
113
154
|
/**
|
|
114
155
|
* Creates request options for getDispatchRollup without sending the request
|
|
115
156
|
*/
|
|
@@ -326,7 +367,8 @@ export class DispatchApi extends runtime.BaseAPI {
|
|
|
326
367
|
});
|
|
327
368
|
}
|
|
328
369
|
/**
|
|
329
|
-
*
|
|
370
|
+
* Slides the presented token\'s expiry forward and returns the same token with its new `expires_at`. The token is extended in place rather than rotated so that a hosted item the learner already has open keeps working. A single launch can be kept alive for at most 24 hours; after that the learner relaunches the course from their LMS.
|
|
371
|
+
* Extend a valid hosted SCORM access token
|
|
330
372
|
*/
|
|
331
373
|
postDispatchTokenRefreshRaw(initOverrides) {
|
|
332
374
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -336,7 +378,8 @@ export class DispatchApi extends runtime.BaseAPI {
|
|
|
336
378
|
});
|
|
337
379
|
}
|
|
338
380
|
/**
|
|
339
|
-
*
|
|
381
|
+
* Slides the presented token\'s expiry forward and returns the same token with its new `expires_at`. The token is extended in place rather than rotated so that a hosted item the learner already has open keeps working. A single launch can be kept alive for at most 24 hours; after that the learner relaunches the course from their LMS.
|
|
382
|
+
* Extend a valid hosted SCORM access token
|
|
340
383
|
*/
|
|
341
384
|
postDispatchTokenRefresh(initOverrides) {
|
|
342
385
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -16,6 +16,7 @@ import { type PostRichTextAssetUpload } from '../models/PostRichTextAssetUpload'
|
|
|
16
16
|
import { type RichTextAsset } from '../models/RichTextAsset';
|
|
17
17
|
export interface GetRichTextAssetRequest {
|
|
18
18
|
assetId: string;
|
|
19
|
+
token?: string;
|
|
19
20
|
}
|
|
20
21
|
export interface PostRichTextAssetCompleteRequest {
|
|
21
22
|
assetId: string;
|
|
@@ -37,10 +38,12 @@ export declare class RichTextApi extends runtime.BaseAPI {
|
|
|
37
38
|
*/
|
|
38
39
|
getRichTextAssetRequestOpts(requestParameters: GetRichTextAssetRequest): Promise<runtime.RequestOpts>;
|
|
39
40
|
/**
|
|
41
|
+
* Portal users need `content_library:read`. Hosted SCORM learners may instead present a dispatch token (the `X-Dispatch-Token` header or a `token` query parameter); they can load only assets referenced by the content their export contains.
|
|
40
42
|
* Redirect to a signed rich text asset URL
|
|
41
43
|
*/
|
|
42
44
|
getRichTextAssetRaw(requestParameters: GetRichTextAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
43
45
|
/**
|
|
46
|
+
* Portal users need `content_library:read`. Hosted SCORM learners may instead present a dispatch token (the `X-Dispatch-Token` header or a `token` query parameter); they can load only assets referenced by the content their export contains.
|
|
44
47
|
* Redirect to a signed rich text asset URL
|
|
45
48
|
*/
|
|
46
49
|
getRichTextAsset(requestParameters: GetRichTextAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -38,6 +38,9 @@ export class RichTextApi extends runtime.BaseAPI {
|
|
|
38
38
|
throw new runtime.RequiredError('assetId', 'Required parameter "assetId" was null or undefined when calling getRichTextAsset().');
|
|
39
39
|
}
|
|
40
40
|
const queryParameters = {};
|
|
41
|
+
if (requestParameters['token'] != null) {
|
|
42
|
+
queryParameters['token'] = requestParameters['token'];
|
|
43
|
+
}
|
|
41
44
|
const headerParameters = {};
|
|
42
45
|
let urlPath = `/rich-text/assets/{assetId}`;
|
|
43
46
|
urlPath = urlPath.replace('{assetId}', encodeURIComponent(String(requestParameters['assetId'])));
|
|
@@ -50,6 +53,7 @@ export class RichTextApi extends runtime.BaseAPI {
|
|
|
50
53
|
});
|
|
51
54
|
}
|
|
52
55
|
/**
|
|
56
|
+
* Portal users need `content_library:read`. Hosted SCORM learners may instead present a dispatch token (the `X-Dispatch-Token` header or a `token` query parameter); they can load only assets referenced by the content their export contains.
|
|
53
57
|
* Redirect to a signed rich text asset URL
|
|
54
58
|
*/
|
|
55
59
|
getRichTextAssetRaw(requestParameters, initOverrides) {
|
|
@@ -60,6 +64,7 @@ export class RichTextApi extends runtime.BaseAPI {
|
|
|
60
64
|
});
|
|
61
65
|
}
|
|
62
66
|
/**
|
|
67
|
+
* Portal users need `content_library:read`. Hosted SCORM learners may instead present a dispatch token (the `X-Dispatch-Token` header or a `token` query parameter); they can load only assets referenced by the content their export contains.
|
|
63
68
|
* Redirect to a signed rich text asset URL
|
|
64
69
|
*/
|
|
65
70
|
getRichTextAsset(requestParameters, initOverrides) {
|
|
@@ -36,7 +36,7 @@ export interface PostCourseExport {
|
|
|
36
36
|
*/
|
|
37
37
|
sectionIds: Array<string>;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* HOSTED_COURSE_V1 (the default) packages the whole course as one SCO that runs from this LMS, including native quizzes. LEGACY_MULTI_SCO packages one launcher SCO per resource and omits quizzes. Both keep the content hosted on this LMS; neither copies it into the ZIP.
|
|
40
40
|
* @type {PostCourseExportDeliveryModeEnum}
|
|
41
41
|
* @memberof PostCourseExport
|
|
42
42
|
*/
|
|
@@ -36,7 +36,7 @@ export interface PostCourseExport {
|
|
|
36
36
|
*/
|
|
37
37
|
sectionIds: Array<string>;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* HOSTED_COURSE_V1 (the default) packages the whole course as one SCO that runs from this LMS, including native quizzes. LEGACY_MULTI_SCO packages one launcher SCO per resource and omits quizzes. Both keep the content hosted on this LMS; neither copies it into the ZIP.
|
|
40
40
|
* @type {PostCourseExportDeliveryModeEnum}
|
|
41
41
|
* @memberof PostCourseExport
|
|
42
42
|
*/
|
package/docs/CourseApi.md
CHANGED
|
@@ -47,6 +47,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
47
47
|
| [**putCourseVersionOutlineEntryMove**](CourseApi.md#putcourseversionoutlineentrymove) | **PUT** /courses/{courseId}/draft/outline/move | Move a section or item to a new parent and sibling position |
|
|
48
48
|
| [**putCourseVersionSection**](CourseApi.md#putcourseversionsection) | **PUT** /courses/{courseId}/draft/sections/{sectionId} | Update a draft section |
|
|
49
49
|
| [**putHostedScormExportAccess**](CourseApi.md#puthostedscormexportaccess) | **PUT** /courses/{courseId}/exports/{exportId}/access | Update mutable access controls for a hosted SCORM export |
|
|
50
|
+
| [**putHostedScormExportRegistrationStatus**](CourseApi.md#puthostedscormexportregistrationstatus) | **PUT** /courses/{courseId}/exports/{exportId}/registrations/{registrationId}/status | Revoke or restore one learner\'s access to a hosted SCORM export |
|
|
50
51
|
| [**putHostedScormExportStatus**](CourseApi.md#puthostedscormexportstatus) | **PUT** /courses/{courseId}/exports/{exportId}/status | Revoke or reactivate a hosted SCORM export |
|
|
51
52
|
|
|
52
53
|
|
|
@@ -3120,6 +3121,84 @@ No authorization required
|
|
|
3120
3121
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3121
3122
|
|
|
3122
3123
|
|
|
3124
|
+
## putHostedScormExportRegistrationStatus
|
|
3125
|
+
|
|
3126
|
+
> GetHostedScormRegistration putHostedScormExportRegistrationStatus(courseId, exportId, registrationId, putHostedScormStatus)
|
|
3127
|
+
|
|
3128
|
+
Revoke or restore one learner\'s access to a hosted SCORM export
|
|
3129
|
+
|
|
3130
|
+
Revoking a registration blocks that learner\'s future launches and immediately invalidates their open sessions, without affecting other learners on the same export. Restoring it allows new launches from the client LMS; sessions that were open when access was revoked stay closed.
|
|
3131
|
+
|
|
3132
|
+
### Example
|
|
3133
|
+
|
|
3134
|
+
```ts
|
|
3135
|
+
import {
|
|
3136
|
+
Configuration,
|
|
3137
|
+
CourseApi,
|
|
3138
|
+
} from '@easyedu/js-lsm-api';
|
|
3139
|
+
import type { PutHostedScormExportRegistrationStatusRequest } from '@easyedu/js-lsm-api';
|
|
3140
|
+
|
|
3141
|
+
async function example() {
|
|
3142
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
3143
|
+
const api = new CourseApi();
|
|
3144
|
+
|
|
3145
|
+
const body = {
|
|
3146
|
+
// string
|
|
3147
|
+
courseId: courseId_example,
|
|
3148
|
+
// string
|
|
3149
|
+
exportId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
3150
|
+
// string
|
|
3151
|
+
registrationId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
3152
|
+
// PutHostedScormStatus
|
|
3153
|
+
putHostedScormStatus: ...,
|
|
3154
|
+
} satisfies PutHostedScormExportRegistrationStatusRequest;
|
|
3155
|
+
|
|
3156
|
+
try {
|
|
3157
|
+
const data = await api.putHostedScormExportRegistrationStatus(body);
|
|
3158
|
+
console.log(data);
|
|
3159
|
+
} catch (error) {
|
|
3160
|
+
console.error(error);
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3163
|
+
|
|
3164
|
+
// Run the test
|
|
3165
|
+
example().catch(console.error);
|
|
3166
|
+
```
|
|
3167
|
+
|
|
3168
|
+
### Parameters
|
|
3169
|
+
|
|
3170
|
+
|
|
3171
|
+
| Name | Type | Description | Notes |
|
|
3172
|
+
|------------- | ------------- | ------------- | -------------|
|
|
3173
|
+
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
3174
|
+
| **exportId** | `string` | | [Defaults to `undefined`] |
|
|
3175
|
+
| **registrationId** | `string` | | [Defaults to `undefined`] |
|
|
3176
|
+
| **putHostedScormStatus** | [PutHostedScormStatus](PutHostedScormStatus.md) | | |
|
|
3177
|
+
|
|
3178
|
+
### Return type
|
|
3179
|
+
|
|
3180
|
+
[**GetHostedScormRegistration**](GetHostedScormRegistration.md)
|
|
3181
|
+
|
|
3182
|
+
### Authorization
|
|
3183
|
+
|
|
3184
|
+
No authorization required
|
|
3185
|
+
|
|
3186
|
+
### HTTP request headers
|
|
3187
|
+
|
|
3188
|
+
- **Content-Type**: `application/json`
|
|
3189
|
+
- **Accept**: `application/json`
|
|
3190
|
+
|
|
3191
|
+
|
|
3192
|
+
### HTTP response details
|
|
3193
|
+
| Status code | Description | Response headers |
|
|
3194
|
+
|-------------|-------------|------------------|
|
|
3195
|
+
| **200** | Updated learner registration | - |
|
|
3196
|
+
| **404** | Export or learner registration not found | - |
|
|
3197
|
+
| **409** | Export is not a hosted course package | - |
|
|
3198
|
+
|
|
3199
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3200
|
+
|
|
3201
|
+
|
|
3123
3202
|
## putHostedScormExportStatus
|
|
3124
3203
|
|
|
3125
3204
|
> GetCourseExport putHostedScormExportStatus(courseId, exportId, putHostedScormStatus)
|
package/docs/DispatchApi.md
CHANGED
|
@@ -6,12 +6,13 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**getDispatchCourse**](DispatchApi.md#getdispatchcourse) | **GET** /dispatch/runtime/course | Get the registration-scoped hosted course snapshot |
|
|
8
8
|
| [**getDispatchQuizSession**](DispatchApi.md#getdispatchquizsession) | **GET** /dispatch/runtime/quiz-sessions/{sessionId} | Get a registration-owned native quiz session |
|
|
9
|
+
| [**getDispatchQuizSessionResults**](DispatchApi.md#getdispatchquizsessionresults) | **GET** /dispatch/runtime/quiz-sessions/{sessionId}/results | Get the result of a registration-owned native quiz session |
|
|
9
10
|
| [**getDispatchRollup**](DispatchApi.md#getdispatchrollup) | **GET** /dispatch/sessions/{dispatchPackageId}/rollup | Get dispatch package rollup data |
|
|
10
11
|
| [**postDispatchItemLaunch**](DispatchApi.md#postdispatchitemlaunch) | **POST** /dispatch/runtime/items/{itemId}/launch | Start or resume a selected hosted course item |
|
|
11
12
|
| [**postDispatchLaunch**](DispatchApi.md#postdispatchlaunch) | **POST** /dispatch/launch | Launch a dispatch package |
|
|
12
13
|
| [**postDispatchQuizSessionSubmit**](DispatchApi.md#postdispatchquizsessionsubmit) | **POST** /dispatch/runtime/quiz-sessions/{sessionId}/submit | Submit a registration-owned native quiz session |
|
|
13
14
|
| [**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 |
|
|
15
|
+
| [**postDispatchTokenRefresh**](DispatchApi.md#postdispatchtokenrefresh) | **POST** /dispatch/runtime/token/refresh | Extend a valid hosted SCORM access token |
|
|
15
16
|
| [**putDispatchQuizSessionAnswer**](DispatchApi.md#putdispatchquizsessionanswer) | **PUT** /dispatch/runtime/quiz-sessions/{sessionId}/answers/{sessionQuestionId} | Save a registration-owned native quiz answer |
|
|
16
17
|
|
|
17
18
|
|
|
@@ -139,6 +140,77 @@ No authorization required
|
|
|
139
140
|
[[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
|
|
|
141
142
|
|
|
143
|
+
## getDispatchQuizSessionResults
|
|
144
|
+
|
|
145
|
+
> GetLibraryQuizResult getDispatchQuizSessionResults(sessionId)
|
|
146
|
+
|
|
147
|
+
Get the result of a registration-owned native quiz session
|
|
148
|
+
|
|
149
|
+
Returns the learner\'s score and, where the quiz settings allow review, their per-question answers, correctness, and explanations. Results are not available while the attempt is still in progress.
|
|
150
|
+
|
|
151
|
+
### Example
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
import {
|
|
155
|
+
Configuration,
|
|
156
|
+
DispatchApi,
|
|
157
|
+
} from '@easyedu/js-lsm-api';
|
|
158
|
+
import type { GetDispatchQuizSessionResultsRequest } from '@easyedu/js-lsm-api';
|
|
159
|
+
|
|
160
|
+
async function example() {
|
|
161
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
162
|
+
const api = new DispatchApi();
|
|
163
|
+
|
|
164
|
+
const body = {
|
|
165
|
+
// string
|
|
166
|
+
sessionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
167
|
+
} satisfies GetDispatchQuizSessionResultsRequest;
|
|
168
|
+
|
|
169
|
+
try {
|
|
170
|
+
const data = await api.getDispatchQuizSessionResults(body);
|
|
171
|
+
console.log(data);
|
|
172
|
+
} catch (error) {
|
|
173
|
+
console.error(error);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Run the test
|
|
178
|
+
example().catch(console.error);
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Parameters
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
| Name | Type | Description | Notes |
|
|
185
|
+
|------------- | ------------- | ------------- | -------------|
|
|
186
|
+
| **sessionId** | `string` | | [Defaults to `undefined`] |
|
|
187
|
+
|
|
188
|
+
### Return type
|
|
189
|
+
|
|
190
|
+
[**GetLibraryQuizResult**](GetLibraryQuizResult.md)
|
|
191
|
+
|
|
192
|
+
### Authorization
|
|
193
|
+
|
|
194
|
+
No authorization required
|
|
195
|
+
|
|
196
|
+
### HTTP request headers
|
|
197
|
+
|
|
198
|
+
- **Content-Type**: Not defined
|
|
199
|
+
- **Accept**: `application/json`
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
### HTTP response details
|
|
203
|
+
| Status code | Description | Response headers |
|
|
204
|
+
|-------------|-------------|------------------|
|
|
205
|
+
| **200** | Quiz result | - |
|
|
206
|
+
| **401** | Dispatch token required | - |
|
|
207
|
+
| **403** | Quiz session is outside this hosted course | - |
|
|
208
|
+
| **404** | Quiz session not found | - |
|
|
209
|
+
| **409** | The attempt has not been submitted yet | - |
|
|
210
|
+
|
|
211
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
212
|
+
|
|
213
|
+
|
|
142
214
|
## getDispatchRollup
|
|
143
215
|
|
|
144
216
|
> GetDispatchRollup getDispatchRollup(dispatchPackageId)
|
|
@@ -479,7 +551,9 @@ No authorization required
|
|
|
479
551
|
|
|
480
552
|
> DispatchTokenResponse postDispatchTokenRefresh()
|
|
481
553
|
|
|
482
|
-
|
|
554
|
+
Extend a valid hosted SCORM access token
|
|
555
|
+
|
|
556
|
+
Slides the presented token\'s expiry forward and returns the same token with its new `expires_at`. The token is extended in place rather than rotated so that a hosted item the learner already has open keeps working. A single launch can be kept alive for at most 24 hours; after that the learner relaunches the course from their LMS.
|
|
483
557
|
|
|
484
558
|
### Example
|
|
485
559
|
|
|
@@ -527,7 +601,7 @@ No authorization required
|
|
|
527
601
|
### HTTP response details
|
|
528
602
|
| Status code | Description | Response headers |
|
|
529
603
|
|-------------|-------------|------------------|
|
|
530
|
-
| **200** |
|
|
604
|
+
| **200** | The same access token with its extended expiry | - |
|
|
531
605
|
| **401** | Dispatch token required | - |
|
|
532
606
|
|
|
533
607
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
package/docs/RichTextApi.md
CHANGED
|
@@ -13,10 +13,12 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
13
13
|
|
|
14
14
|
## getRichTextAsset
|
|
15
15
|
|
|
16
|
-
> getRichTextAsset(assetId)
|
|
16
|
+
> getRichTextAsset(assetId, token)
|
|
17
17
|
|
|
18
18
|
Redirect to a signed rich text asset URL
|
|
19
19
|
|
|
20
|
+
Portal users need `content_library:read`. Hosted SCORM learners may instead present a dispatch token (the `X-Dispatch-Token` header or a `token` query parameter); they can load only assets referenced by the content their export contains.
|
|
21
|
+
|
|
20
22
|
### Example
|
|
21
23
|
|
|
22
24
|
```ts
|
|
@@ -33,6 +35,8 @@ async function example() {
|
|
|
33
35
|
const body = {
|
|
34
36
|
// string
|
|
35
37
|
assetId: assetId_example,
|
|
38
|
+
// string | Hosted SCORM dispatch token, for image requests that cannot send headers. (optional)
|
|
39
|
+
token: token_example,
|
|
36
40
|
} satisfies GetRichTextAssetRequest;
|
|
37
41
|
|
|
38
42
|
try {
|
|
@@ -53,6 +57,7 @@ example().catch(console.error);
|
|
|
53
57
|
| Name | Type | Description | Notes |
|
|
54
58
|
|------------- | ------------- | ------------- | -------------|
|
|
55
59
|
| **assetId** | `string` | | [Defaults to `undefined`] |
|
|
60
|
+
| **token** | `string` | Hosted SCORM dispatch token, for image requests that cannot send headers. | [Optional] [Defaults to `undefined`] |
|
|
56
61
|
|
|
57
62
|
### Return type
|
|
58
63
|
|
package/package.json
CHANGED
package/src/apis/CourseApi.ts
CHANGED
|
@@ -88,6 +88,11 @@ import {
|
|
|
88
88
|
GetCourseVersionSectionFromJSON,
|
|
89
89
|
GetCourseVersionSectionToJSON,
|
|
90
90
|
} from '../models/GetCourseVersionSection';
|
|
91
|
+
import {
|
|
92
|
+
type GetHostedScormRegistration,
|
|
93
|
+
GetHostedScormRegistrationFromJSON,
|
|
94
|
+
GetHostedScormRegistrationToJSON,
|
|
95
|
+
} from '../models/GetHostedScormRegistration';
|
|
91
96
|
import {
|
|
92
97
|
type GetHostedScormRegistrationList,
|
|
93
98
|
GetHostedScormRegistrationListFromJSON,
|
|
@@ -454,6 +459,13 @@ export interface PutHostedScormExportAccessRequest {
|
|
|
454
459
|
hostedScormAccessPolicy: HostedScormAccessPolicy;
|
|
455
460
|
}
|
|
456
461
|
|
|
462
|
+
export interface PutHostedScormExportRegistrationStatusRequest {
|
|
463
|
+
courseId: string;
|
|
464
|
+
exportId: string;
|
|
465
|
+
registrationId: string;
|
|
466
|
+
putHostedScormStatus: PutHostedScormStatus;
|
|
467
|
+
}
|
|
468
|
+
|
|
457
469
|
export interface PutHostedScormExportStatusRequest {
|
|
458
470
|
courseId: string;
|
|
459
471
|
exportId: string;
|
|
@@ -2920,6 +2932,79 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
2920
2932
|
return await response.value();
|
|
2921
2933
|
}
|
|
2922
2934
|
|
|
2935
|
+
/**
|
|
2936
|
+
* Creates request options for putHostedScormExportRegistrationStatus without sending the request
|
|
2937
|
+
*/
|
|
2938
|
+
async putHostedScormExportRegistrationStatusRequestOpts(requestParameters: PutHostedScormExportRegistrationStatusRequest): Promise<runtime.RequestOpts> {
|
|
2939
|
+
if (requestParameters['courseId'] == null) {
|
|
2940
|
+
throw new runtime.RequiredError(
|
|
2941
|
+
'courseId',
|
|
2942
|
+
'Required parameter "courseId" was null or undefined when calling putHostedScormExportRegistrationStatus().'
|
|
2943
|
+
);
|
|
2944
|
+
}
|
|
2945
|
+
|
|
2946
|
+
if (requestParameters['exportId'] == null) {
|
|
2947
|
+
throw new runtime.RequiredError(
|
|
2948
|
+
'exportId',
|
|
2949
|
+
'Required parameter "exportId" was null or undefined when calling putHostedScormExportRegistrationStatus().'
|
|
2950
|
+
);
|
|
2951
|
+
}
|
|
2952
|
+
|
|
2953
|
+
if (requestParameters['registrationId'] == null) {
|
|
2954
|
+
throw new runtime.RequiredError(
|
|
2955
|
+
'registrationId',
|
|
2956
|
+
'Required parameter "registrationId" was null or undefined when calling putHostedScormExportRegistrationStatus().'
|
|
2957
|
+
);
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2960
|
+
if (requestParameters['putHostedScormStatus'] == null) {
|
|
2961
|
+
throw new runtime.RequiredError(
|
|
2962
|
+
'putHostedScormStatus',
|
|
2963
|
+
'Required parameter "putHostedScormStatus" was null or undefined when calling putHostedScormExportRegistrationStatus().'
|
|
2964
|
+
);
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
const queryParameters: any = {};
|
|
2968
|
+
|
|
2969
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2970
|
+
|
|
2971
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2972
|
+
|
|
2973
|
+
|
|
2974
|
+
let urlPath = `/courses/{courseId}/exports/{exportId}/registrations/{registrationId}/status`;
|
|
2975
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
2976
|
+
urlPath = urlPath.replace('{exportId}', encodeURIComponent(String(requestParameters['exportId'])));
|
|
2977
|
+
urlPath = urlPath.replace('{registrationId}', encodeURIComponent(String(requestParameters['registrationId'])));
|
|
2978
|
+
|
|
2979
|
+
return {
|
|
2980
|
+
path: urlPath,
|
|
2981
|
+
method: 'PUT',
|
|
2982
|
+
headers: headerParameters,
|
|
2983
|
+
query: queryParameters,
|
|
2984
|
+
body: PutHostedScormStatusToJSON(requestParameters['putHostedScormStatus']),
|
|
2985
|
+
};
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2988
|
+
/**
|
|
2989
|
+
* Revoking a registration blocks that learner\'s future launches and immediately invalidates their open sessions, without affecting other learners on the same export. Restoring it allows new launches from the client LMS; sessions that were open when access was revoked stay closed.
|
|
2990
|
+
* Revoke or restore one learner\'s access to a hosted SCORM export
|
|
2991
|
+
*/
|
|
2992
|
+
async putHostedScormExportRegistrationStatusRaw(requestParameters: PutHostedScormExportRegistrationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHostedScormRegistration>> {
|
|
2993
|
+
const requestOptions = await this.putHostedScormExportRegistrationStatusRequestOpts(requestParameters);
|
|
2994
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
2995
|
+
|
|
2996
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetHostedScormRegistrationFromJSON(jsonValue));
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
/**
|
|
3000
|
+
* Revoking a registration blocks that learner\'s future launches and immediately invalidates their open sessions, without affecting other learners on the same export. Restoring it allows new launches from the client LMS; sessions that were open when access was revoked stay closed.
|
|
3001
|
+
* Revoke or restore one learner\'s access to a hosted SCORM export
|
|
3002
|
+
*/
|
|
3003
|
+
async putHostedScormExportRegistrationStatus(requestParameters: PutHostedScormExportRegistrationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetHostedScormRegistration> {
|
|
3004
|
+
const response = await this.putHostedScormExportRegistrationStatusRaw(requestParameters, initOverrides);
|
|
3005
|
+
return await response.value();
|
|
3006
|
+
}
|
|
3007
|
+
|
|
2923
3008
|
/**
|
|
2924
3009
|
* Creates request options for putHostedScormExportStatus without sending the request
|
|
2925
3010
|
*/
|
package/src/apis/DispatchApi.ts
CHANGED
|
@@ -73,6 +73,10 @@ export interface GetDispatchQuizSessionRequest {
|
|
|
73
73
|
sessionId: string;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
export interface GetDispatchQuizSessionResultsRequest {
|
|
77
|
+
sessionId: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
76
80
|
export interface GetDispatchRollupRequest {
|
|
77
81
|
dispatchPackageId: string;
|
|
78
82
|
}
|
|
@@ -187,6 +191,53 @@ export class DispatchApi extends runtime.BaseAPI {
|
|
|
187
191
|
return await response.value();
|
|
188
192
|
}
|
|
189
193
|
|
|
194
|
+
/**
|
|
195
|
+
* Creates request options for getDispatchQuizSessionResults without sending the request
|
|
196
|
+
*/
|
|
197
|
+
async getDispatchQuizSessionResultsRequestOpts(requestParameters: GetDispatchQuizSessionResultsRequest): Promise<runtime.RequestOpts> {
|
|
198
|
+
if (requestParameters['sessionId'] == null) {
|
|
199
|
+
throw new runtime.RequiredError(
|
|
200
|
+
'sessionId',
|
|
201
|
+
'Required parameter "sessionId" was null or undefined when calling getDispatchQuizSessionResults().'
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const queryParameters: any = {};
|
|
206
|
+
|
|
207
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
let urlPath = `/dispatch/runtime/quiz-sessions/{sessionId}/results`;
|
|
211
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
212
|
+
|
|
213
|
+
return {
|
|
214
|
+
path: urlPath,
|
|
215
|
+
method: 'GET',
|
|
216
|
+
headers: headerParameters,
|
|
217
|
+
query: queryParameters,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Returns the learner\'s score and, where the quiz settings allow review, their per-question answers, correctness, and explanations. Results are not available while the attempt is still in progress.
|
|
223
|
+
* Get the result of a registration-owned native quiz session
|
|
224
|
+
*/
|
|
225
|
+
async getDispatchQuizSessionResultsRaw(requestParameters: GetDispatchQuizSessionResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizResult>> {
|
|
226
|
+
const requestOptions = await this.getDispatchQuizSessionResultsRequestOpts(requestParameters);
|
|
227
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
228
|
+
|
|
229
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizResultFromJSON(jsonValue));
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Returns the learner\'s score and, where the quiz settings allow review, their per-question answers, correctness, and explanations. Results are not available while the attempt is still in progress.
|
|
234
|
+
* Get the result of a registration-owned native quiz session
|
|
235
|
+
*/
|
|
236
|
+
async getDispatchQuizSessionResults(requestParameters: GetDispatchQuizSessionResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizResult> {
|
|
237
|
+
const response = await this.getDispatchQuizSessionResultsRaw(requestParameters, initOverrides);
|
|
238
|
+
return await response.value();
|
|
239
|
+
}
|
|
240
|
+
|
|
190
241
|
/**
|
|
191
242
|
* Creates request options for getDispatchRollup without sending the request
|
|
192
243
|
*/
|
|
@@ -439,7 +490,8 @@ export class DispatchApi extends runtime.BaseAPI {
|
|
|
439
490
|
}
|
|
440
491
|
|
|
441
492
|
/**
|
|
442
|
-
*
|
|
493
|
+
* Slides the presented token\'s expiry forward and returns the same token with its new `expires_at`. The token is extended in place rather than rotated so that a hosted item the learner already has open keeps working. A single launch can be kept alive for at most 24 hours; after that the learner relaunches the course from their LMS.
|
|
494
|
+
* Extend a valid hosted SCORM access token
|
|
443
495
|
*/
|
|
444
496
|
async postDispatchTokenRefreshRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DispatchTokenResponse>> {
|
|
445
497
|
const requestOptions = await this.postDispatchTokenRefreshRequestOpts();
|
|
@@ -449,7 +501,8 @@ export class DispatchApi extends runtime.BaseAPI {
|
|
|
449
501
|
}
|
|
450
502
|
|
|
451
503
|
/**
|
|
452
|
-
*
|
|
504
|
+
* Slides the presented token\'s expiry forward and returns the same token with its new `expires_at`. The token is extended in place rather than rotated so that a hosted item the learner already has open keeps working. A single launch can be kept alive for at most 24 hours; after that the learner relaunches the course from their LMS.
|
|
505
|
+
* Extend a valid hosted SCORM access token
|
|
453
506
|
*/
|
|
454
507
|
async postDispatchTokenRefresh(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DispatchTokenResponse> {
|
|
455
508
|
const response = await this.postDispatchTokenRefreshRaw(initOverrides);
|
package/src/apis/RichTextApi.ts
CHANGED
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
|
|
37
37
|
export interface GetRichTextAssetRequest {
|
|
38
38
|
assetId: string;
|
|
39
|
+
token?: string;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export interface PostRichTextAssetCompleteRequest {
|
|
@@ -70,6 +71,10 @@ export class RichTextApi extends runtime.BaseAPI {
|
|
|
70
71
|
|
|
71
72
|
const queryParameters: any = {};
|
|
72
73
|
|
|
74
|
+
if (requestParameters['token'] != null) {
|
|
75
|
+
queryParameters['token'] = requestParameters['token'];
|
|
76
|
+
}
|
|
77
|
+
|
|
73
78
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
74
79
|
|
|
75
80
|
|
|
@@ -85,6 +90,7 @@ export class RichTextApi extends runtime.BaseAPI {
|
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
/**
|
|
93
|
+
* Portal users need `content_library:read`. Hosted SCORM learners may instead present a dispatch token (the `X-Dispatch-Token` header or a `token` query parameter); they can load only assets referenced by the content their export contains.
|
|
88
94
|
* Redirect to a signed rich text asset URL
|
|
89
95
|
*/
|
|
90
96
|
async getRichTextAssetRaw(requestParameters: GetRichTextAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
@@ -95,6 +101,7 @@ export class RichTextApi extends runtime.BaseAPI {
|
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
/**
|
|
104
|
+
* Portal users need `content_library:read`. Hosted SCORM learners may instead present a dispatch token (the `X-Dispatch-Token` header or a `token` query parameter); they can load only assets referenced by the content their export contains.
|
|
98
105
|
* Redirect to a signed rich text asset URL
|
|
99
106
|
*/
|
|
100
107
|
async getRichTextAsset(requestParameters: GetRichTextAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
@@ -53,7 +53,7 @@ export interface PostCourseExport {
|
|
|
53
53
|
*/
|
|
54
54
|
sectionIds: Array<string>;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* HOSTED_COURSE_V1 (the default) packages the whole course as one SCO that runs from this LMS, including native quizzes. LEGACY_MULTI_SCO packages one launcher SCO per resource and omits quizzes. Both keep the content hosted on this LMS; neither copies it into the ZIP.
|
|
57
57
|
* @type {PostCourseExportDeliveryModeEnum}
|
|
58
58
|
* @memberof PostCourseExport
|
|
59
59
|
*/
|