@easyedu/js-lsm-api 1.136.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.
Files changed (47) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/README.md +7 -3
  3. package/dist/apis/CourseApi.d.ts +21 -0
  4. package/dist/apis/CourseApi.js +55 -0
  5. package/dist/apis/DispatchApi.d.ts +21 -2
  6. package/dist/apis/DispatchApi.js +45 -2
  7. package/dist/apis/RichTextApi.d.ts +3 -0
  8. package/dist/apis/RichTextApi.js +5 -0
  9. package/dist/apis/SystemApi.d.ts +17 -0
  10. package/dist/apis/SystemApi.js +45 -0
  11. package/dist/esm/apis/CourseApi.d.ts +21 -0
  12. package/dist/esm/apis/CourseApi.js +55 -0
  13. package/dist/esm/apis/DispatchApi.d.ts +21 -2
  14. package/dist/esm/apis/DispatchApi.js +45 -2
  15. package/dist/esm/apis/RichTextApi.d.ts +3 -0
  16. package/dist/esm/apis/RichTextApi.js +5 -0
  17. package/dist/esm/apis/SystemApi.d.ts +17 -0
  18. package/dist/esm/apis/SystemApi.js +45 -0
  19. package/dist/esm/models/GetPortal.d.ts +12 -0
  20. package/dist/esm/models/GetPortal.js +6 -0
  21. package/dist/esm/models/PostCourseExport.d.ts +1 -1
  22. package/dist/esm/models/PutSystemPortal.d.ts +32 -0
  23. package/dist/esm/models/PutSystemPortal.js +41 -0
  24. package/dist/esm/models/index.d.ts +1 -0
  25. package/dist/esm/models/index.js +1 -0
  26. package/dist/models/GetPortal.d.ts +12 -0
  27. package/dist/models/GetPortal.js +6 -0
  28. package/dist/models/PostCourseExport.d.ts +1 -1
  29. package/dist/models/PutSystemPortal.d.ts +32 -0
  30. package/dist/models/PutSystemPortal.js +48 -0
  31. package/dist/models/index.d.ts +1 -0
  32. package/dist/models/index.js +1 -0
  33. package/docs/CourseApi.md +79 -0
  34. package/docs/DispatchApi.md +77 -3
  35. package/docs/GetPortal.md +4 -0
  36. package/docs/PutSystemPortal.md +35 -0
  37. package/docs/RichTextApi.md +6 -1
  38. package/docs/SystemApi.md +71 -0
  39. package/package.json +1 -1
  40. package/src/apis/CourseApi.ts +85 -0
  41. package/src/apis/DispatchApi.ts +55 -2
  42. package/src/apis/RichTextApi.ts +7 -0
  43. package/src/apis/SystemApi.ts +65 -0
  44. package/src/models/GetPortal.ts +17 -0
  45. package/src/models/PostCourseExport.ts +1 -1
  46. package/src/models/PutSystemPortal.ts +65 -0
  47. package/src/models/index.ts +1 -0
@@ -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 | Rotate a valid hosted SCORM access token |
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
- Rotate a valid hosted SCORM access token
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** | Replacement access token | - |
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/GetPortal.md CHANGED
@@ -16,6 +16,8 @@ Name | Type
16
16
  `headerBackgroundColor` | string
17
17
  `headerTextColor` | string
18
18
  `brandingTheme` | [PortalBrandThemeV1](PortalBrandThemeV1.md)
19
+ `verified` | boolean
20
+ `verifiedAt` | number
19
21
  `baseType` | string
20
22
 
21
23
  ## Example
@@ -35,6 +37,8 @@ const example = {
35
37
  "headerBackgroundColor": null,
36
38
  "headerTextColor": null,
37
39
  "brandingTheme": null,
40
+ "verified": null,
41
+ "verifiedAt": null,
38
42
  "baseType": null,
39
43
  } satisfies GetPortal
40
44
 
@@ -0,0 +1,35 @@
1
+
2
+ # PutSystemPortal
3
+
4
+ Platform-managed portal settings. Omitted fields are left unchanged.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `verified` | boolean
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { PutSystemPortal } from '@easyedu/js-lsm-api'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "verified": null,
20
+ } satisfies PutSystemPortal
21
+
22
+ console.log(example)
23
+
24
+ // Convert the instance to a JSON string
25
+ const exampleJSON: string = JSON.stringify(example)
26
+ console.log(exampleJSON)
27
+
28
+ // Parse the JSON string back to an object
29
+ const exampleParsed = JSON.parse(exampleJSON) as PutSystemPortal
30
+ console.log(exampleParsed)
31
+ ```
32
+
33
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
34
+
35
+
@@ -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/docs/SystemApi.md CHANGED
@@ -10,6 +10,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
10
10
  | [**getSystemPortalOverview**](SystemApi.md#getsystemportaloverview) | **GET** /system/portals/{portalId}/overview | Get detailed platform portal overview and usage statistics |
11
11
  | [**getSystemPortals**](SystemApi.md#getsystemportals) | **GET** /system/portals | List all platform portals |
12
12
  | [**getSystemSupportTickets**](SystemApi.md#getsystemsupporttickets) | **GET** /system/support/tickets | List open support tickets across the platform |
13
+ | [**putSystemPortal**](SystemApi.md#putsystemportal) | **PUT** /system/portals/{portalId} | Update platform-managed portal settings |
13
14
 
14
15
 
15
16
 
@@ -411,3 +412,73 @@ No authorization required
411
412
 
412
413
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
413
414
 
415
+
416
+ ## putSystemPortal
417
+
418
+ > GetPortal putSystemPortal(portalId, putSystemPortal)
419
+
420
+ Update platform-managed portal settings
421
+
422
+ ### Example
423
+
424
+ ```ts
425
+ import {
426
+ Configuration,
427
+ SystemApi,
428
+ } from '@easyedu/js-lsm-api';
429
+ import type { PutSystemPortalRequest } from '@easyedu/js-lsm-api';
430
+
431
+ async function example() {
432
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
433
+ const api = new SystemApi();
434
+
435
+ const body = {
436
+ // string
437
+ portalId: portalId_example,
438
+ // PutSystemPortal
439
+ putSystemPortal: ...,
440
+ } satisfies PutSystemPortalRequest;
441
+
442
+ try {
443
+ const data = await api.putSystemPortal(body);
444
+ console.log(data);
445
+ } catch (error) {
446
+ console.error(error);
447
+ }
448
+ }
449
+
450
+ // Run the test
451
+ example().catch(console.error);
452
+ ```
453
+
454
+ ### Parameters
455
+
456
+
457
+ | Name | Type | Description | Notes |
458
+ |------------- | ------------- | ------------- | -------------|
459
+ | **portalId** | `string` | | [Defaults to `undefined`] |
460
+ | **putSystemPortal** | [PutSystemPortal](PutSystemPortal.md) | | |
461
+
462
+ ### Return type
463
+
464
+ [**GetPortal**](GetPortal.md)
465
+
466
+ ### Authorization
467
+
468
+ No authorization required
469
+
470
+ ### HTTP request headers
471
+
472
+ - **Content-Type**: `application/json`
473
+ - **Accept**: `application/json`
474
+
475
+
476
+ ### HTTP response details
477
+ | Status code | Description | Response headers |
478
+ |-------------|-------------|------------------|
479
+ | **200** | Updated portal | - |
480
+ | **403** | Forbidden | - |
481
+ | **404** | Portal not found | - |
482
+
483
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
484
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.136.0",
3
+ "version": "1.138.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -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
  */
@@ -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
- * Rotate a valid hosted SCORM access token
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
- * Rotate a valid hosted SCORM access token
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);
@@ -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> {
@@ -43,6 +43,11 @@ import {
43
43
  GetSystemPortalOverviewFromJSON,
44
44
  GetSystemPortalOverviewToJSON,
45
45
  } from '../models/GetSystemPortalOverview';
46
+ import {
47
+ type PutSystemPortal,
48
+ PutSystemPortalFromJSON,
49
+ PutSystemPortalToJSON,
50
+ } from '../models/PutSystemPortal';
46
51
 
47
52
  export interface GetSystemBillingRequest {
48
53
  page?: number;
@@ -67,6 +72,11 @@ export interface GetSystemSupportTicketsRequest {
67
72
  pageSize?: number;
68
73
  }
69
74
 
75
+ export interface PutSystemPortalRequest {
76
+ portalId: string;
77
+ putSystemPortal: PutSystemPortal;
78
+ }
79
+
70
80
  /**
71
81
  *
72
82
  */
@@ -334,4 +344,59 @@ export class SystemApi extends runtime.BaseAPI {
334
344
  return await response.value();
335
345
  }
336
346
 
347
+ /**
348
+ * Creates request options for putSystemPortal without sending the request
349
+ */
350
+ async putSystemPortalRequestOpts(requestParameters: PutSystemPortalRequest): Promise<runtime.RequestOpts> {
351
+ if (requestParameters['portalId'] == null) {
352
+ throw new runtime.RequiredError(
353
+ 'portalId',
354
+ 'Required parameter "portalId" was null or undefined when calling putSystemPortal().'
355
+ );
356
+ }
357
+
358
+ if (requestParameters['putSystemPortal'] == null) {
359
+ throw new runtime.RequiredError(
360
+ 'putSystemPortal',
361
+ 'Required parameter "putSystemPortal" was null or undefined when calling putSystemPortal().'
362
+ );
363
+ }
364
+
365
+ const queryParameters: any = {};
366
+
367
+ const headerParameters: runtime.HTTPHeaders = {};
368
+
369
+ headerParameters['Content-Type'] = 'application/json';
370
+
371
+
372
+ let urlPath = `/system/portals/{portalId}`;
373
+ urlPath = urlPath.replace('{portalId}', encodeURIComponent(String(requestParameters['portalId'])));
374
+
375
+ return {
376
+ path: urlPath,
377
+ method: 'PUT',
378
+ headers: headerParameters,
379
+ query: queryParameters,
380
+ body: PutSystemPortalToJSON(requestParameters['putSystemPortal']),
381
+ };
382
+ }
383
+
384
+ /**
385
+ * Update platform-managed portal settings
386
+ */
387
+ async putSystemPortalRaw(requestParameters: PutSystemPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortal>> {
388
+ const requestOptions = await this.putSystemPortalRequestOpts(requestParameters);
389
+ const response = await this.request(requestOptions, initOverrides);
390
+
391
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalFromJSON(jsonValue));
392
+ }
393
+
394
+ /**
395
+ * Update platform-managed portal settings
396
+ */
397
+ async putSystemPortal(requestParameters: PutSystemPortalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal> {
398
+ const response = await this.putSystemPortalRaw(requestParameters, initOverrides);
399
+ return await response.value();
400
+ }
401
+
337
402
  }
@@ -89,6 +89,18 @@ export interface GetPortal {
89
89
  * @memberof GetPortal
90
90
  */
91
91
  brandingTheme: PortalBrandThemeV1;
92
+ /**
93
+ * Whether the platform has verified this portal. Email templates can only be changed on verified portals.
94
+ * @type {boolean}
95
+ * @memberof GetPortal
96
+ */
97
+ verified: boolean;
98
+ /**
99
+ * When the portal was verified, as Unix seconds.
100
+ * @type {number}
101
+ * @memberof GetPortal
102
+ */
103
+ verifiedAt?: number | null;
92
104
  /**
93
105
  * The user's highest-privilege role base type for this portal
94
106
  * @type {GetPortalBaseTypeEnum}
@@ -122,6 +134,7 @@ export function instanceOfGetPortal(value: object): value is GetPortal {
122
134
  if (!('headerBackgroundColor' in value) || value['headerBackgroundColor'] === undefined) return false;
123
135
  if (!('headerTextColor' in value) || value['headerTextColor'] === undefined) return false;
124
136
  if (!('brandingTheme' in value) || value['brandingTheme'] === undefined) return false;
137
+ if (!('verified' in value) || value['verified'] === undefined) return false;
125
138
  return true;
126
139
  }
127
140
 
@@ -145,6 +158,8 @@ export function GetPortalFromJSONTyped(json: any, ignoreDiscriminator: boolean):
145
158
  'headerBackgroundColor': json['header_background_color'],
146
159
  'headerTextColor': json['header_text_color'],
147
160
  'brandingTheme': PortalBrandThemeV1FromJSON(json['branding_theme']),
161
+ 'verified': json['verified'],
162
+ 'verifiedAt': json['verified_at'] == null ? undefined : json['verified_at'],
148
163
  'baseType': json['base_type'] == null ? undefined : json['base_type'],
149
164
  };
150
165
  }
@@ -170,6 +185,8 @@ export function GetPortalToJSONTyped(value?: GetPortal | null, ignoreDiscriminat
170
185
  'header_background_color': value['headerBackgroundColor'],
171
186
  'header_text_color': value['headerTextColor'],
172
187
  'branding_theme': PortalBrandThemeV1ToJSON(value['brandingTheme']),
188
+ 'verified': value['verified'],
189
+ 'verified_at': value['verifiedAt'],
173
190
  'base_type': value['baseType'],
174
191
  };
175
192
  }
@@ -53,7 +53,7 @@ export interface PostCourseExport {
53
53
  */
54
54
  sectionIds: Array<string>;
55
55
  /**
56
- * Hosted course mode is an additive backend preview until its player is deployed.
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
  */