@easyedu/js-lsm-api 1.118.0 → 1.119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +42 -0
- package/README.md +34 -2
- package/dist/apis/CourseApi.d.ts +55 -0
- package/dist/apis/CourseApi.js +147 -0
- package/dist/apis/DispatchApi.d.ts +121 -5
- package/dist/apis/DispatchApi.js +303 -8
- package/dist/apis/PlayerApi.d.ts +26 -6
- package/dist/apis/PlayerApi.js +57 -6
- package/dist/esm/apis/CourseApi.d.ts +55 -0
- package/dist/esm/apis/CourseApi.js +147 -0
- package/dist/esm/apis/DispatchApi.d.ts +121 -5
- package/dist/esm/apis/DispatchApi.js +303 -8
- package/dist/esm/apis/PlayerApi.d.ts +26 -6
- package/dist/esm/apis/PlayerApi.js +57 -6
- package/dist/esm/models/DispatchTokenResponse.d.ts +57 -0
- package/dist/esm/models/DispatchTokenResponse.js +61 -0
- package/dist/esm/models/GetCourseExport.d.ts +62 -0
- package/dist/esm/models/GetCourseExport.js +44 -0
- package/dist/esm/models/GetDispatchCourse.d.ts +82 -0
- package/dist/esm/models/GetDispatchCourse.js +77 -0
- package/dist/esm/models/GetDispatchRollup.d.ts +104 -0
- package/dist/esm/models/GetDispatchRollup.js +95 -0
- package/dist/esm/models/GetHostedScormRegistration.d.ts +80 -0
- package/dist/esm/models/GetHostedScormRegistration.js +71 -0
- package/dist/esm/models/GetHostedScormRegistrationList.d.ts +57 -0
- package/dist/esm/models/GetHostedScormRegistrationList.js +60 -0
- package/dist/esm/models/GetResourceSessionDiagnostics.d.ts +8 -0
- package/dist/esm/models/GetResourceSessionDiagnostics.js +2 -0
- package/dist/esm/models/HostedScormAccessPolicy.d.ts +50 -0
- package/dist/esm/models/HostedScormAccessPolicy.js +55 -0
- package/dist/esm/models/HostedScormOutlineEntry.d.ts +108 -0
- package/dist/esm/models/HostedScormOutlineEntry.js +97 -0
- package/dist/esm/models/HostedScormRollupPolicy.d.ts +69 -0
- package/dist/esm/models/HostedScormRollupPolicy.js +72 -0
- package/dist/esm/models/HostedScormScoreItem.d.ts +38 -0
- package/dist/esm/models/HostedScormScoreItem.js +47 -0
- package/dist/esm/models/PostCourseExport.d.ts +28 -0
- package/dist/esm/models/PostCourseExport.js +15 -0
- package/dist/esm/models/PostDispatchItemLaunch.d.ts +32 -0
- package/dist/esm/models/PostDispatchItemLaunch.js +41 -0
- package/dist/esm/models/PostDispatchItemLaunchResponse.d.ts +64 -0
- package/dist/esm/models/PostDispatchItemLaunchResponse.js +66 -0
- package/dist/esm/models/PostDispatchLaunch.d.ts +50 -0
- package/dist/esm/models/PostDispatchLaunch.js +53 -0
- package/dist/esm/models/PostDispatchLaunchResponse.d.ts +70 -0
- package/dist/esm/models/PostDispatchLaunchResponse.js +70 -0
- package/dist/esm/models/PostDispatchTokenExchange.d.ts +32 -0
- package/dist/esm/models/PostDispatchTokenExchange.js +43 -0
- package/dist/esm/models/PutHostedScormStatus.d.ts +32 -0
- package/dist/esm/models/PutHostedScormStatus.js +43 -0
- package/dist/esm/models/ScormGetValueResponse.d.ts +12 -0
- package/dist/esm/models/ScormGetValueResponse.js +8 -0
- package/dist/esm/models/ScormNavigationDelivery.d.ts +64 -0
- package/dist/esm/models/ScormNavigationDelivery.js +66 -0
- package/dist/esm/models/ScormNavigationRequest.d.ts +55 -0
- package/dist/esm/models/ScormNavigationRequest.js +61 -0
- package/dist/esm/models/ScormNavigationResponse.d.ts +70 -0
- package/dist/esm/models/ScormNavigationResponse.js +67 -0
- package/dist/esm/models/ScormNavigationValidity.d.ts +92 -0
- package/dist/esm/models/ScormNavigationValidity.js +83 -0
- package/dist/esm/models/ScormRuntimeResponse.d.ts +44 -0
- package/dist/esm/models/ScormRuntimeResponse.js +51 -0
- package/dist/esm/models/ScormSetValueResponse.d.ts +12 -0
- package/dist/esm/models/ScormSetValueResponse.js +8 -0
- package/dist/esm/models/ScormTerminateResponse.d.ts +63 -0
- package/dist/esm/models/ScormTerminateResponse.js +62 -0
- package/dist/esm/models/index.d.ts +21 -0
- package/dist/esm/models/index.js +21 -0
- package/dist/models/DispatchTokenResponse.d.ts +57 -0
- package/dist/models/DispatchTokenResponse.js +69 -0
- package/dist/models/GetCourseExport.d.ts +62 -0
- package/dist/models/GetCourseExport.js +45 -1
- package/dist/models/GetDispatchCourse.d.ts +82 -0
- package/dist/models/GetDispatchCourse.js +84 -0
- package/dist/models/GetDispatchRollup.d.ts +104 -0
- package/dist/models/GetDispatchRollup.js +103 -0
- package/dist/models/GetHostedScormRegistration.d.ts +80 -0
- package/dist/models/GetHostedScormRegistration.js +78 -0
- package/dist/models/GetHostedScormRegistrationList.d.ts +57 -0
- package/dist/models/GetHostedScormRegistrationList.js +67 -0
- package/dist/models/GetResourceSessionDiagnostics.d.ts +8 -0
- package/dist/models/GetResourceSessionDiagnostics.js +2 -0
- package/dist/models/HostedScormAccessPolicy.d.ts +50 -0
- package/dist/models/HostedScormAccessPolicy.js +62 -0
- package/dist/models/HostedScormOutlineEntry.d.ts +108 -0
- package/dist/models/HostedScormOutlineEntry.js +105 -0
- package/dist/models/HostedScormRollupPolicy.d.ts +69 -0
- package/dist/models/HostedScormRollupPolicy.js +80 -0
- package/dist/models/HostedScormScoreItem.d.ts +38 -0
- package/dist/models/HostedScormScoreItem.js +54 -0
- package/dist/models/PostCourseExport.d.ts +28 -0
- package/dist/models/PostCourseExport.js +16 -1
- package/dist/models/PostDispatchItemLaunch.d.ts +32 -0
- package/dist/models/PostDispatchItemLaunch.js +48 -0
- package/dist/models/PostDispatchItemLaunchResponse.d.ts +64 -0
- package/dist/models/PostDispatchItemLaunchResponse.js +74 -0
- package/dist/models/PostDispatchLaunch.d.ts +50 -0
- package/dist/models/PostDispatchLaunch.js +60 -0
- package/dist/models/PostDispatchLaunchResponse.d.ts +70 -0
- package/dist/models/PostDispatchLaunchResponse.js +78 -0
- package/dist/models/PostDispatchTokenExchange.d.ts +32 -0
- package/dist/models/PostDispatchTokenExchange.js +50 -0
- package/dist/models/PutHostedScormStatus.d.ts +32 -0
- package/dist/models/PutHostedScormStatus.js +50 -0
- package/dist/models/ScormGetValueResponse.d.ts +12 -0
- package/dist/models/ScormGetValueResponse.js +8 -0
- package/dist/models/ScormNavigationDelivery.d.ts +64 -0
- package/dist/models/ScormNavigationDelivery.js +74 -0
- package/dist/models/ScormNavigationRequest.d.ts +55 -0
- package/dist/models/ScormNavigationRequest.js +69 -0
- package/dist/models/ScormNavigationResponse.d.ts +70 -0
- package/dist/models/ScormNavigationResponse.js +74 -0
- package/dist/models/ScormNavigationValidity.d.ts +92 -0
- package/dist/models/ScormNavigationValidity.js +90 -0
- package/dist/models/ScormRuntimeResponse.d.ts +44 -0
- package/dist/models/ScormRuntimeResponse.js +58 -0
- package/dist/models/ScormSetValueResponse.d.ts +12 -0
- package/dist/models/ScormSetValueResponse.js +8 -0
- package/dist/models/ScormTerminateResponse.d.ts +63 -0
- package/dist/models/ScormTerminateResponse.js +69 -0
- package/dist/models/index.d.ts +21 -0
- package/dist/models/index.js +21 -0
- package/docs/CourseApi.md +225 -0
- package/docs/DispatchApi.md +480 -9
- package/docs/DispatchTokenResponse.md +40 -0
- package/docs/GetCourseExport.md +14 -0
- package/docs/GetDispatchCourse.md +50 -0
- package/docs/GetDispatchRollup.md +52 -0
- package/docs/GetHostedScormRegistration.md +50 -0
- package/docs/GetHostedScormRegistrationList.md +42 -0
- package/docs/GetResourceSessionDiagnostics.md +2 -0
- package/docs/HostedScormAccessPolicy.md +41 -0
- package/docs/HostedScormOutlineEntry.md +54 -0
- package/docs/HostedScormRollupPolicy.md +41 -0
- package/docs/HostedScormScoreItem.md +36 -0
- package/docs/PlayerApi.md +80 -9
- package/docs/PostCourseExport.md +6 -0
- package/docs/PostDispatchItemLaunch.md +34 -0
- package/docs/PostDispatchItemLaunchResponse.md +42 -0
- package/docs/PostDispatchLaunch.md +40 -0
- package/docs/PostDispatchLaunchResponse.md +44 -0
- package/docs/PostDispatchTokenExchange.md +34 -0
- package/docs/PutHostedScormStatus.md +34 -0
- package/docs/ScormGetValueResponse.md +4 -0
- package/docs/ScormNavigationDelivery.md +43 -0
- package/docs/ScormNavigationRequest.md +37 -0
- package/docs/ScormNavigationResponse.md +47 -0
- package/docs/ScormNavigationValidity.md +55 -0
- package/docs/ScormRuntimeResponse.md +39 -0
- package/docs/ScormSetValueResponse.md +4 -0
- package/docs/ScormTerminateResponse.md +44 -0
- package/package.json +1 -1
- package/src/apis/CourseApi.ts +221 -0
- package/src/apis/DispatchApi.ts +426 -10
- package/src/apis/PlayerApi.ts +95 -12
- package/src/models/DispatchTokenResponse.ts +103 -0
- package/src/models/GetCourseExport.ts +97 -0
- package/src/models/GetDispatchCourse.ts +153 -0
- package/src/models/GetDispatchRollup.ts +169 -0
- package/src/models/GetHostedScormRegistration.ts +136 -0
- package/src/models/GetHostedScormRegistrationList.ts +110 -0
- package/src/models/GetResourceSessionDiagnostics.ts +8 -0
- package/src/models/HostedScormAccessPolicy.ts +93 -0
- package/src/models/HostedScormOutlineEntry.ts +176 -0
- package/src/models/HostedScormRollupPolicy.ts +123 -0
- package/src/models/HostedScormScoreItem.ts +75 -0
- package/src/models/PostCourseExport.ts +48 -0
- package/src/models/PostDispatchItemLaunch.ts +65 -0
- package/src/models/PostDispatchItemLaunchResponse.ts +113 -0
- package/src/models/PostDispatchLaunch.ts +92 -0
- package/src/models/PostDispatchLaunchResponse.ts +122 -0
- package/src/models/PostDispatchTokenExchange.ts +66 -0
- package/src/models/PutHostedScormStatus.ts +66 -0
- package/src/models/ScormGetValueResponse.ts +18 -0
- package/src/models/ScormNavigationDelivery.ts +113 -0
- package/src/models/ScormNavigationRequest.ts +94 -0
- package/src/models/ScormNavigationResponse.ts +134 -0
- package/src/models/ScormNavigationValidity.ts +156 -0
- package/src/models/ScormRuntimeResponse.ts +84 -0
- package/src/models/ScormSetValueResponse.ts +18 -0
- package/src/models/ScormTerminateResponse.ts +118 -0
- package/src/models/index.ts +21 -0
package/src/apis/DispatchApi.ts
CHANGED
|
@@ -13,16 +13,180 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type DispatchTokenResponse,
|
|
18
|
+
DispatchTokenResponseFromJSON,
|
|
19
|
+
DispatchTokenResponseToJSON,
|
|
20
|
+
} from '../models/DispatchTokenResponse';
|
|
21
|
+
import {
|
|
22
|
+
type GetDispatchCourse,
|
|
23
|
+
GetDispatchCourseFromJSON,
|
|
24
|
+
GetDispatchCourseToJSON,
|
|
25
|
+
} from '../models/GetDispatchCourse';
|
|
26
|
+
import {
|
|
27
|
+
type GetDispatchRollup,
|
|
28
|
+
GetDispatchRollupFromJSON,
|
|
29
|
+
GetDispatchRollupToJSON,
|
|
30
|
+
} from '../models/GetDispatchRollup';
|
|
31
|
+
import {
|
|
32
|
+
type GetLibraryQuizResult,
|
|
33
|
+
GetLibraryQuizResultFromJSON,
|
|
34
|
+
GetLibraryQuizResultToJSON,
|
|
35
|
+
} from '../models/GetLibraryQuizResult';
|
|
36
|
+
import {
|
|
37
|
+
type GetLibraryQuizSession,
|
|
38
|
+
GetLibraryQuizSessionFromJSON,
|
|
39
|
+
GetLibraryQuizSessionToJSON,
|
|
40
|
+
} from '../models/GetLibraryQuizSession';
|
|
41
|
+
import {
|
|
42
|
+
type PostDispatchItemLaunch,
|
|
43
|
+
PostDispatchItemLaunchFromJSON,
|
|
44
|
+
PostDispatchItemLaunchToJSON,
|
|
45
|
+
} from '../models/PostDispatchItemLaunch';
|
|
46
|
+
import {
|
|
47
|
+
type PostDispatchItemLaunchResponse,
|
|
48
|
+
PostDispatchItemLaunchResponseFromJSON,
|
|
49
|
+
PostDispatchItemLaunchResponseToJSON,
|
|
50
|
+
} from '../models/PostDispatchItemLaunchResponse';
|
|
51
|
+
import {
|
|
52
|
+
type PostDispatchLaunch,
|
|
53
|
+
PostDispatchLaunchFromJSON,
|
|
54
|
+
PostDispatchLaunchToJSON,
|
|
55
|
+
} from '../models/PostDispatchLaunch';
|
|
56
|
+
import {
|
|
57
|
+
type PostDispatchLaunchResponse,
|
|
58
|
+
PostDispatchLaunchResponseFromJSON,
|
|
59
|
+
PostDispatchLaunchResponseToJSON,
|
|
60
|
+
} from '../models/PostDispatchLaunchResponse';
|
|
61
|
+
import {
|
|
62
|
+
type PostDispatchTokenExchange,
|
|
63
|
+
PostDispatchTokenExchangeFromJSON,
|
|
64
|
+
PostDispatchTokenExchangeToJSON,
|
|
65
|
+
} from '../models/PostDispatchTokenExchange';
|
|
66
|
+
import {
|
|
67
|
+
type PutLibraryQuizSessionAnswer,
|
|
68
|
+
PutLibraryQuizSessionAnswerFromJSON,
|
|
69
|
+
PutLibraryQuizSessionAnswerToJSON,
|
|
70
|
+
} from '../models/PutLibraryQuizSessionAnswer';
|
|
71
|
+
|
|
72
|
+
export interface GetDispatchQuizSessionRequest {
|
|
73
|
+
sessionId: string;
|
|
74
|
+
}
|
|
16
75
|
|
|
17
76
|
export interface GetDispatchRollupRequest {
|
|
18
77
|
dispatchPackageId: string;
|
|
19
78
|
}
|
|
20
79
|
|
|
80
|
+
export interface PostDispatchItemLaunchRequest {
|
|
81
|
+
itemId: string;
|
|
82
|
+
postDispatchItemLaunch?: PostDispatchItemLaunch;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface PostDispatchLaunchRequest {
|
|
86
|
+
postDispatchLaunch: PostDispatchLaunch;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface PostDispatchQuizSessionSubmitRequest {
|
|
90
|
+
sessionId: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface PostDispatchTokenExchangeRequest {
|
|
94
|
+
postDispatchTokenExchange: PostDispatchTokenExchange;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface PutDispatchQuizSessionAnswerRequest {
|
|
98
|
+
sessionId: string;
|
|
99
|
+
sessionQuestionId: string;
|
|
100
|
+
putLibraryQuizSessionAnswer: PutLibraryQuizSessionAnswer;
|
|
101
|
+
}
|
|
102
|
+
|
|
21
103
|
/**
|
|
22
104
|
*
|
|
23
105
|
*/
|
|
24
106
|
export class DispatchApi extends runtime.BaseAPI {
|
|
25
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Creates request options for getDispatchCourse without sending the request
|
|
110
|
+
*/
|
|
111
|
+
async getDispatchCourseRequestOpts(): Promise<runtime.RequestOpts> {
|
|
112
|
+
const queryParameters: any = {};
|
|
113
|
+
|
|
114
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
let urlPath = `/dispatch/runtime/course`;
|
|
118
|
+
|
|
119
|
+
return {
|
|
120
|
+
path: urlPath,
|
|
121
|
+
method: 'GET',
|
|
122
|
+
headers: headerParameters,
|
|
123
|
+
query: queryParameters,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Get the registration-scoped hosted course snapshot
|
|
129
|
+
*/
|
|
130
|
+
async getDispatchCourseRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDispatchCourse>> {
|
|
131
|
+
const requestOptions = await this.getDispatchCourseRequestOpts();
|
|
132
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
133
|
+
|
|
134
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetDispatchCourseFromJSON(jsonValue));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Get the registration-scoped hosted course snapshot
|
|
139
|
+
*/
|
|
140
|
+
async getDispatchCourse(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDispatchCourse> {
|
|
141
|
+
const response = await this.getDispatchCourseRaw(initOverrides);
|
|
142
|
+
return await response.value();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Creates request options for getDispatchQuizSession without sending the request
|
|
147
|
+
*/
|
|
148
|
+
async getDispatchQuizSessionRequestOpts(requestParameters: GetDispatchQuizSessionRequest): Promise<runtime.RequestOpts> {
|
|
149
|
+
if (requestParameters['sessionId'] == null) {
|
|
150
|
+
throw new runtime.RequiredError(
|
|
151
|
+
'sessionId',
|
|
152
|
+
'Required parameter "sessionId" was null or undefined when calling getDispatchQuizSession().'
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const queryParameters: any = {};
|
|
157
|
+
|
|
158
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
let urlPath = `/dispatch/runtime/quiz-sessions/{sessionId}`;
|
|
162
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
163
|
+
|
|
164
|
+
return {
|
|
165
|
+
path: urlPath,
|
|
166
|
+
method: 'GET',
|
|
167
|
+
headers: headerParameters,
|
|
168
|
+
query: queryParameters,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Get a registration-owned native quiz session
|
|
174
|
+
*/
|
|
175
|
+
async getDispatchQuizSessionRaw(requestParameters: GetDispatchQuizSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>> {
|
|
176
|
+
const requestOptions = await this.getDispatchQuizSessionRequestOpts(requestParameters);
|
|
177
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
178
|
+
|
|
179
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizSessionFromJSON(jsonValue));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Get a registration-owned native quiz session
|
|
184
|
+
*/
|
|
185
|
+
async getDispatchQuizSession(requestParameters: GetDispatchQuizSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession> {
|
|
186
|
+
const response = await this.getDispatchQuizSessionRaw(requestParameters, initOverrides);
|
|
187
|
+
return await response.value();
|
|
188
|
+
}
|
|
189
|
+
|
|
26
190
|
/**
|
|
27
191
|
* Creates request options for getDispatchRollup without sending the request
|
|
28
192
|
*/
|
|
@@ -53,28 +217,86 @@ export class DispatchApi extends runtime.BaseAPI {
|
|
|
53
217
|
/**
|
|
54
218
|
* Get dispatch package rollup data
|
|
55
219
|
*/
|
|
56
|
-
async getDispatchRollupRaw(requestParameters: GetDispatchRollupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
220
|
+
async getDispatchRollupRaw(requestParameters: GetDispatchRollupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDispatchRollup>> {
|
|
57
221
|
const requestOptions = await this.getDispatchRollupRequestOpts(requestParameters);
|
|
58
222
|
const response = await this.request(requestOptions, initOverrides);
|
|
59
223
|
|
|
60
|
-
return new runtime.
|
|
224
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetDispatchRollupFromJSON(jsonValue));
|
|
61
225
|
}
|
|
62
226
|
|
|
63
227
|
/**
|
|
64
228
|
* Get dispatch package rollup data
|
|
65
229
|
*/
|
|
66
|
-
async getDispatchRollup(requestParameters: GetDispatchRollupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
67
|
-
await this.getDispatchRollupRaw(requestParameters, initOverrides);
|
|
230
|
+
async getDispatchRollup(requestParameters: GetDispatchRollupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDispatchRollup> {
|
|
231
|
+
const response = await this.getDispatchRollupRaw(requestParameters, initOverrides);
|
|
232
|
+
return await response.value();
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Creates request options for postDispatchItemLaunch without sending the request
|
|
237
|
+
*/
|
|
238
|
+
async postDispatchItemLaunchRequestOpts(requestParameters: PostDispatchItemLaunchRequest): Promise<runtime.RequestOpts> {
|
|
239
|
+
if (requestParameters['itemId'] == null) {
|
|
240
|
+
throw new runtime.RequiredError(
|
|
241
|
+
'itemId',
|
|
242
|
+
'Required parameter "itemId" was null or undefined when calling postDispatchItemLaunch().'
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const queryParameters: any = {};
|
|
247
|
+
|
|
248
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
249
|
+
|
|
250
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
let urlPath = `/dispatch/runtime/items/{itemId}/launch`;
|
|
254
|
+
urlPath = urlPath.replace('{itemId}', encodeURIComponent(String(requestParameters['itemId'])));
|
|
255
|
+
|
|
256
|
+
return {
|
|
257
|
+
path: urlPath,
|
|
258
|
+
method: 'POST',
|
|
259
|
+
headers: headerParameters,
|
|
260
|
+
query: queryParameters,
|
|
261
|
+
body: PostDispatchItemLaunchToJSON(requestParameters['postDispatchItemLaunch']),
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Start or resume a selected hosted course item
|
|
267
|
+
*/
|
|
268
|
+
async postDispatchItemLaunchRaw(requestParameters: PostDispatchItemLaunchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostDispatchItemLaunchResponse>> {
|
|
269
|
+
const requestOptions = await this.postDispatchItemLaunchRequestOpts(requestParameters);
|
|
270
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
271
|
+
|
|
272
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostDispatchItemLaunchResponseFromJSON(jsonValue));
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Start or resume a selected hosted course item
|
|
277
|
+
*/
|
|
278
|
+
async postDispatchItemLaunch(requestParameters: PostDispatchItemLaunchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostDispatchItemLaunchResponse> {
|
|
279
|
+
const response = await this.postDispatchItemLaunchRaw(requestParameters, initOverrides);
|
|
280
|
+
return await response.value();
|
|
68
281
|
}
|
|
69
282
|
|
|
70
283
|
/**
|
|
71
284
|
* Creates request options for postDispatchLaunch without sending the request
|
|
72
285
|
*/
|
|
73
|
-
async postDispatchLaunchRequestOpts(): Promise<runtime.RequestOpts> {
|
|
286
|
+
async postDispatchLaunchRequestOpts(requestParameters: PostDispatchLaunchRequest): Promise<runtime.RequestOpts> {
|
|
287
|
+
if (requestParameters['postDispatchLaunch'] == null) {
|
|
288
|
+
throw new runtime.RequiredError(
|
|
289
|
+
'postDispatchLaunch',
|
|
290
|
+
'Required parameter "postDispatchLaunch" was null or undefined when calling postDispatchLaunch().'
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
74
294
|
const queryParameters: any = {};
|
|
75
295
|
|
|
76
296
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
77
297
|
|
|
298
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
299
|
+
|
|
78
300
|
|
|
79
301
|
let urlPath = `/dispatch/launch`;
|
|
80
302
|
|
|
@@ -83,24 +305,218 @@ export class DispatchApi extends runtime.BaseAPI {
|
|
|
83
305
|
method: 'POST',
|
|
84
306
|
headers: headerParameters,
|
|
85
307
|
query: queryParameters,
|
|
308
|
+
body: PostDispatchLaunchToJSON(requestParameters['postDispatchLaunch']),
|
|
86
309
|
};
|
|
87
310
|
}
|
|
88
311
|
|
|
89
312
|
/**
|
|
90
313
|
* Launch a dispatch package
|
|
91
314
|
*/
|
|
92
|
-
async postDispatchLaunchRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
93
|
-
const requestOptions = await this.postDispatchLaunchRequestOpts();
|
|
315
|
+
async postDispatchLaunchRaw(requestParameters: PostDispatchLaunchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostDispatchLaunchResponse>> {
|
|
316
|
+
const requestOptions = await this.postDispatchLaunchRequestOpts(requestParameters);
|
|
94
317
|
const response = await this.request(requestOptions, initOverrides);
|
|
95
318
|
|
|
96
|
-
return new runtime.
|
|
319
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostDispatchLaunchResponseFromJSON(jsonValue));
|
|
97
320
|
}
|
|
98
321
|
|
|
99
322
|
/**
|
|
100
323
|
* Launch a dispatch package
|
|
101
324
|
*/
|
|
102
|
-
async postDispatchLaunch(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
103
|
-
await this.postDispatchLaunchRaw(initOverrides);
|
|
325
|
+
async postDispatchLaunch(requestParameters: PostDispatchLaunchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostDispatchLaunchResponse> {
|
|
326
|
+
const response = await this.postDispatchLaunchRaw(requestParameters, initOverrides);
|
|
327
|
+
return await response.value();
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Creates request options for postDispatchQuizSessionSubmit without sending the request
|
|
332
|
+
*/
|
|
333
|
+
async postDispatchQuizSessionSubmitRequestOpts(requestParameters: PostDispatchQuizSessionSubmitRequest): Promise<runtime.RequestOpts> {
|
|
334
|
+
if (requestParameters['sessionId'] == null) {
|
|
335
|
+
throw new runtime.RequiredError(
|
|
336
|
+
'sessionId',
|
|
337
|
+
'Required parameter "sessionId" was null or undefined when calling postDispatchQuizSessionSubmit().'
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
const queryParameters: any = {};
|
|
342
|
+
|
|
343
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
let urlPath = `/dispatch/runtime/quiz-sessions/{sessionId}/submit`;
|
|
347
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
348
|
+
|
|
349
|
+
return {
|
|
350
|
+
path: urlPath,
|
|
351
|
+
method: 'POST',
|
|
352
|
+
headers: headerParameters,
|
|
353
|
+
query: queryParameters,
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Submit a registration-owned native quiz session
|
|
359
|
+
*/
|
|
360
|
+
async postDispatchQuizSessionSubmitRaw(requestParameters: PostDispatchQuizSessionSubmitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizResult>> {
|
|
361
|
+
const requestOptions = await this.postDispatchQuizSessionSubmitRequestOpts(requestParameters);
|
|
362
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
363
|
+
|
|
364
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizResultFromJSON(jsonValue));
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Submit a registration-owned native quiz session
|
|
369
|
+
*/
|
|
370
|
+
async postDispatchQuizSessionSubmit(requestParameters: PostDispatchQuizSessionSubmitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizResult> {
|
|
371
|
+
const response = await this.postDispatchQuizSessionSubmitRaw(requestParameters, initOverrides);
|
|
372
|
+
return await response.value();
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Creates request options for postDispatchTokenExchange without sending the request
|
|
377
|
+
*/
|
|
378
|
+
async postDispatchTokenExchangeRequestOpts(requestParameters: PostDispatchTokenExchangeRequest): Promise<runtime.RequestOpts> {
|
|
379
|
+
if (requestParameters['postDispatchTokenExchange'] == null) {
|
|
380
|
+
throw new runtime.RequiredError(
|
|
381
|
+
'postDispatchTokenExchange',
|
|
382
|
+
'Required parameter "postDispatchTokenExchange" was null or undefined when calling postDispatchTokenExchange().'
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
const queryParameters: any = {};
|
|
387
|
+
|
|
388
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
389
|
+
|
|
390
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
let urlPath = `/dispatch/runtime/token`;
|
|
394
|
+
|
|
395
|
+
return {
|
|
396
|
+
path: urlPath,
|
|
397
|
+
method: 'POST',
|
|
398
|
+
headers: headerParameters,
|
|
399
|
+
query: queryParameters,
|
|
400
|
+
body: PostDispatchTokenExchangeToJSON(requestParameters['postDispatchTokenExchange']),
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Exchange a one-time hosted SCORM launch code
|
|
406
|
+
*/
|
|
407
|
+
async postDispatchTokenExchangeRaw(requestParameters: PostDispatchTokenExchangeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DispatchTokenResponse>> {
|
|
408
|
+
const requestOptions = await this.postDispatchTokenExchangeRequestOpts(requestParameters);
|
|
409
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
410
|
+
|
|
411
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DispatchTokenResponseFromJSON(jsonValue));
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Exchange a one-time hosted SCORM launch code
|
|
416
|
+
*/
|
|
417
|
+
async postDispatchTokenExchange(requestParameters: PostDispatchTokenExchangeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DispatchTokenResponse> {
|
|
418
|
+
const response = await this.postDispatchTokenExchangeRaw(requestParameters, initOverrides);
|
|
419
|
+
return await response.value();
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Creates request options for postDispatchTokenRefresh without sending the request
|
|
424
|
+
*/
|
|
425
|
+
async postDispatchTokenRefreshRequestOpts(): Promise<runtime.RequestOpts> {
|
|
426
|
+
const queryParameters: any = {};
|
|
427
|
+
|
|
428
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
let urlPath = `/dispatch/runtime/token/refresh`;
|
|
432
|
+
|
|
433
|
+
return {
|
|
434
|
+
path: urlPath,
|
|
435
|
+
method: 'POST',
|
|
436
|
+
headers: headerParameters,
|
|
437
|
+
query: queryParameters,
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Rotate a valid hosted SCORM access token
|
|
443
|
+
*/
|
|
444
|
+
async postDispatchTokenRefreshRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DispatchTokenResponse>> {
|
|
445
|
+
const requestOptions = await this.postDispatchTokenRefreshRequestOpts();
|
|
446
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
447
|
+
|
|
448
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DispatchTokenResponseFromJSON(jsonValue));
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Rotate a valid hosted SCORM access token
|
|
453
|
+
*/
|
|
454
|
+
async postDispatchTokenRefresh(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DispatchTokenResponse> {
|
|
455
|
+
const response = await this.postDispatchTokenRefreshRaw(initOverrides);
|
|
456
|
+
return await response.value();
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Creates request options for putDispatchQuizSessionAnswer without sending the request
|
|
461
|
+
*/
|
|
462
|
+
async putDispatchQuizSessionAnswerRequestOpts(requestParameters: PutDispatchQuizSessionAnswerRequest): Promise<runtime.RequestOpts> {
|
|
463
|
+
if (requestParameters['sessionId'] == null) {
|
|
464
|
+
throw new runtime.RequiredError(
|
|
465
|
+
'sessionId',
|
|
466
|
+
'Required parameter "sessionId" was null or undefined when calling putDispatchQuizSessionAnswer().'
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if (requestParameters['sessionQuestionId'] == null) {
|
|
471
|
+
throw new runtime.RequiredError(
|
|
472
|
+
'sessionQuestionId',
|
|
473
|
+
'Required parameter "sessionQuestionId" was null or undefined when calling putDispatchQuizSessionAnswer().'
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
if (requestParameters['putLibraryQuizSessionAnswer'] == null) {
|
|
478
|
+
throw new runtime.RequiredError(
|
|
479
|
+
'putLibraryQuizSessionAnswer',
|
|
480
|
+
'Required parameter "putLibraryQuizSessionAnswer" was null or undefined when calling putDispatchQuizSessionAnswer().'
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
const queryParameters: any = {};
|
|
485
|
+
|
|
486
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
487
|
+
|
|
488
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
let urlPath = `/dispatch/runtime/quiz-sessions/{sessionId}/answers/{sessionQuestionId}`;
|
|
492
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
493
|
+
urlPath = urlPath.replace('{sessionQuestionId}', encodeURIComponent(String(requestParameters['sessionQuestionId'])));
|
|
494
|
+
|
|
495
|
+
return {
|
|
496
|
+
path: urlPath,
|
|
497
|
+
method: 'PUT',
|
|
498
|
+
headers: headerParameters,
|
|
499
|
+
query: queryParameters,
|
|
500
|
+
body: PutLibraryQuizSessionAnswerToJSON(requestParameters['putLibraryQuizSessionAnswer']),
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Save a registration-owned native quiz answer
|
|
506
|
+
*/
|
|
507
|
+
async putDispatchQuizSessionAnswerRaw(requestParameters: PutDispatchQuizSessionAnswerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>> {
|
|
508
|
+
const requestOptions = await this.putDispatchQuizSessionAnswerRequestOpts(requestParameters);
|
|
509
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
510
|
+
|
|
511
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizSessionFromJSON(jsonValue));
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Save a registration-owned native quiz answer
|
|
516
|
+
*/
|
|
517
|
+
async putDispatchQuizSessionAnswer(requestParameters: PutDispatchQuizSessionAnswerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession> {
|
|
518
|
+
const response = await this.putDispatchQuizSessionAnswerRaw(requestParameters, initOverrides);
|
|
519
|
+
return await response.value();
|
|
104
520
|
}
|
|
105
521
|
|
|
106
522
|
}
|
package/src/apis/PlayerApi.ts
CHANGED
|
@@ -83,6 +83,21 @@ import {
|
|
|
83
83
|
ScormGetValueResponseFromJSON,
|
|
84
84
|
ScormGetValueResponseToJSON,
|
|
85
85
|
} from '../models/ScormGetValueResponse';
|
|
86
|
+
import {
|
|
87
|
+
type ScormNavigationRequest,
|
|
88
|
+
ScormNavigationRequestFromJSON,
|
|
89
|
+
ScormNavigationRequestToJSON,
|
|
90
|
+
} from '../models/ScormNavigationRequest';
|
|
91
|
+
import {
|
|
92
|
+
type ScormNavigationResponse,
|
|
93
|
+
ScormNavigationResponseFromJSON,
|
|
94
|
+
ScormNavigationResponseToJSON,
|
|
95
|
+
} from '../models/ScormNavigationResponse';
|
|
96
|
+
import {
|
|
97
|
+
type ScormRuntimeResponse,
|
|
98
|
+
ScormRuntimeResponseFromJSON,
|
|
99
|
+
ScormRuntimeResponseToJSON,
|
|
100
|
+
} from '../models/ScormRuntimeResponse';
|
|
86
101
|
import {
|
|
87
102
|
type ScormSetValueRequest,
|
|
88
103
|
ScormSetValueRequestFromJSON,
|
|
@@ -93,6 +108,11 @@ import {
|
|
|
93
108
|
ScormSetValueResponseFromJSON,
|
|
94
109
|
ScormSetValueResponseToJSON,
|
|
95
110
|
} from '../models/ScormSetValueResponse';
|
|
111
|
+
import {
|
|
112
|
+
type ScormTerminateResponse,
|
|
113
|
+
ScormTerminateResponseFromJSON,
|
|
114
|
+
ScormTerminateResponseToJSON,
|
|
115
|
+
} from '../models/ScormTerminateResponse';
|
|
96
116
|
|
|
97
117
|
export interface CommitResourceScormSessionRequest {
|
|
98
118
|
sessionId: string;
|
|
@@ -183,6 +203,11 @@ export interface InitializeResourceScormSessionRequest {
|
|
|
183
203
|
activityId?: string;
|
|
184
204
|
}
|
|
185
205
|
|
|
206
|
+
export interface NavigateResourceScormSessionRequest {
|
|
207
|
+
sessionId: string;
|
|
208
|
+
scormNavigationRequest: ScormNavigationRequest;
|
|
209
|
+
}
|
|
210
|
+
|
|
186
211
|
export interface PostResourceSessionActivityEventRequest {
|
|
187
212
|
sessionId: string;
|
|
188
213
|
activityId: string;
|
|
@@ -248,18 +273,19 @@ export class PlayerApi extends runtime.BaseAPI {
|
|
|
248
273
|
/**
|
|
249
274
|
* Commit a reusable SCORM resource session
|
|
250
275
|
*/
|
|
251
|
-
async commitResourceScormSessionRaw(requestParameters: CommitResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
276
|
+
async commitResourceScormSessionRaw(requestParameters: CommitResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScormRuntimeResponse>> {
|
|
252
277
|
const requestOptions = await this.commitResourceScormSessionRequestOpts(requestParameters);
|
|
253
278
|
const response = await this.request(requestOptions, initOverrides);
|
|
254
279
|
|
|
255
|
-
return new runtime.
|
|
280
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScormRuntimeResponseFromJSON(jsonValue));
|
|
256
281
|
}
|
|
257
282
|
|
|
258
283
|
/**
|
|
259
284
|
* Commit a reusable SCORM resource session
|
|
260
285
|
*/
|
|
261
|
-
async commitResourceScormSession(requestParameters: CommitResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
262
|
-
await this.commitResourceScormSessionRaw(requestParameters, initOverrides);
|
|
286
|
+
async commitResourceScormSession(requestParameters: CommitResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScormRuntimeResponse> {
|
|
287
|
+
const response = await this.commitResourceScormSessionRaw(requestParameters, initOverrides);
|
|
288
|
+
return await response.value();
|
|
263
289
|
}
|
|
264
290
|
|
|
265
291
|
/**
|
|
@@ -983,18 +1009,74 @@ export class PlayerApi extends runtime.BaseAPI {
|
|
|
983
1009
|
/**
|
|
984
1010
|
* Initialize a reusable SCORM resource session
|
|
985
1011
|
*/
|
|
986
|
-
async initializeResourceScormSessionRaw(requestParameters: InitializeResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
1012
|
+
async initializeResourceScormSessionRaw(requestParameters: InitializeResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScormRuntimeResponse>> {
|
|
987
1013
|
const requestOptions = await this.initializeResourceScormSessionRequestOpts(requestParameters);
|
|
988
1014
|
const response = await this.request(requestOptions, initOverrides);
|
|
989
1015
|
|
|
990
|
-
return new runtime.
|
|
1016
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScormRuntimeResponseFromJSON(jsonValue));
|
|
991
1017
|
}
|
|
992
1018
|
|
|
993
1019
|
/**
|
|
994
1020
|
* Initialize a reusable SCORM resource session
|
|
995
1021
|
*/
|
|
996
|
-
async initializeResourceScormSession(requestParameters: InitializeResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
997
|
-
await this.initializeResourceScormSessionRaw(requestParameters, initOverrides);
|
|
1022
|
+
async initializeResourceScormSession(requestParameters: InitializeResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScormRuntimeResponse> {
|
|
1023
|
+
const response = await this.initializeResourceScormSessionRaw(requestParameters, initOverrides);
|
|
1024
|
+
return await response.value();
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* Creates request options for navigateResourceScormSession without sending the request
|
|
1029
|
+
*/
|
|
1030
|
+
async navigateResourceScormSessionRequestOpts(requestParameters: NavigateResourceScormSessionRequest): Promise<runtime.RequestOpts> {
|
|
1031
|
+
if (requestParameters['sessionId'] == null) {
|
|
1032
|
+
throw new runtime.RequiredError(
|
|
1033
|
+
'sessionId',
|
|
1034
|
+
'Required parameter "sessionId" was null or undefined when calling navigateResourceScormSession().'
|
|
1035
|
+
);
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
if (requestParameters['scormNavigationRequest'] == null) {
|
|
1039
|
+
throw new runtime.RequiredError(
|
|
1040
|
+
'scormNavigationRequest',
|
|
1041
|
+
'Required parameter "scormNavigationRequest" was null or undefined when calling navigateResourceScormSession().'
|
|
1042
|
+
);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
const queryParameters: any = {};
|
|
1046
|
+
|
|
1047
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1048
|
+
|
|
1049
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
let urlPath = `/resource/sessions/{sessionId}/navigation`;
|
|
1053
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
1054
|
+
|
|
1055
|
+
return {
|
|
1056
|
+
path: urlPath,
|
|
1057
|
+
method: 'POST',
|
|
1058
|
+
headers: headerParameters,
|
|
1059
|
+
query: queryParameters,
|
|
1060
|
+
body: ScormNavigationRequestToJSON(requestParameters['scormNavigationRequest']),
|
|
1061
|
+
};
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* Process a SCORM 2004 sequencing and navigation request
|
|
1066
|
+
*/
|
|
1067
|
+
async navigateResourceScormSessionRaw(requestParameters: NavigateResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScormNavigationResponse>> {
|
|
1068
|
+
const requestOptions = await this.navigateResourceScormSessionRequestOpts(requestParameters);
|
|
1069
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1070
|
+
|
|
1071
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScormNavigationResponseFromJSON(jsonValue));
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* Process a SCORM 2004 sequencing and navigation request
|
|
1076
|
+
*/
|
|
1077
|
+
async navigateResourceScormSession(requestParameters: NavigateResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScormNavigationResponse> {
|
|
1078
|
+
const response = await this.navigateResourceScormSessionRaw(requestParameters, initOverrides);
|
|
1079
|
+
return await response.value();
|
|
998
1080
|
}
|
|
999
1081
|
|
|
1000
1082
|
/**
|
|
@@ -1253,18 +1335,19 @@ export class PlayerApi extends runtime.BaseAPI {
|
|
|
1253
1335
|
/**
|
|
1254
1336
|
* Terminate a reusable SCORM resource session
|
|
1255
1337
|
*/
|
|
1256
|
-
async terminateResourceScormSessionRaw(requestParameters: TerminateResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
1338
|
+
async terminateResourceScormSessionRaw(requestParameters: TerminateResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScormTerminateResponse>> {
|
|
1257
1339
|
const requestOptions = await this.terminateResourceScormSessionRequestOpts(requestParameters);
|
|
1258
1340
|
const response = await this.request(requestOptions, initOverrides);
|
|
1259
1341
|
|
|
1260
|
-
return new runtime.
|
|
1342
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScormTerminateResponseFromJSON(jsonValue));
|
|
1261
1343
|
}
|
|
1262
1344
|
|
|
1263
1345
|
/**
|
|
1264
1346
|
* Terminate a reusable SCORM resource session
|
|
1265
1347
|
*/
|
|
1266
|
-
async terminateResourceScormSession(requestParameters: TerminateResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
1267
|
-
await this.terminateResourceScormSessionRaw(requestParameters, initOverrides);
|
|
1348
|
+
async terminateResourceScormSession(requestParameters: TerminateResourceScormSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScormTerminateResponse> {
|
|
1349
|
+
const response = await this.terminateResourceScormSessionRaw(requestParameters, initOverrides);
|
|
1350
|
+
return await response.value();
|
|
1268
1351
|
}
|
|
1269
1352
|
|
|
1270
1353
|
}
|