@easyedu/js-lsm-api 1.139.0 → 1.140.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 +10 -0
- package/README.md +15 -2
- package/dist/apis/ContentLibraryQuizApi.d.ts +86 -0
- package/dist/apis/ContentLibraryQuizApi.js +216 -0
- package/dist/apis/DispatchApi.d.ts +53 -0
- package/dist/apis/DispatchApi.js +135 -0
- package/dist/esm/apis/ContentLibraryQuizApi.d.ts +86 -0
- package/dist/esm/apis/ContentLibraryQuizApi.js +216 -0
- package/dist/esm/apis/DispatchApi.d.ts +53 -0
- package/dist/esm/apis/DispatchApi.js +135 -0
- package/dist/esm/models/GetAttemptAllowance.d.ts +9 -3
- package/dist/esm/models/GetAttemptAllowance.js +4 -0
- package/dist/esm/models/GetCourseVersionItem.d.ts +1 -1
- package/dist/esm/models/GetLibraryQuizResult.d.ts +30 -0
- package/dist/esm/models/GetLibraryQuizResult.js +20 -0
- package/dist/esm/models/GetLibraryQuizSession.d.ts +43 -0
- package/dist/esm/models/GetLibraryQuizSession.js +27 -0
- package/dist/esm/models/GetLibraryQuizVersion.d.ts +19 -0
- package/dist/esm/models/GetLibraryQuizVersion.js +13 -0
- package/dist/esm/models/GetQuestionAnswerChoicesInner.d.ts +6 -0
- package/dist/esm/models/GetQuestionAnswerChoicesInner.js +4 -0
- package/dist/esm/models/GetQuizSettings.d.ts +56 -0
- package/dist/esm/models/GetQuizSettings.js +57 -0
- package/dist/esm/models/HostedScormOutlineEntry.d.ts +1 -1
- package/dist/esm/models/LibraryQuizQuestionFeedback.d.ts +78 -0
- package/dist/esm/models/LibraryQuizQuestionFeedback.js +66 -0
- package/dist/esm/models/LibraryQuizSessionAnswerChoice.d.ts +6 -0
- package/dist/esm/models/LibraryQuizSessionAnswerChoice.js +2 -0
- package/dist/esm/models/LibraryQuizSessionQuestion.d.ts +19 -0
- package/dist/esm/models/LibraryQuizSessionQuestion.js +11 -0
- package/dist/esm/models/PostCourseVersionItem.d.ts +1 -1
- package/dist/esm/models/PostLibraryQuiz.d.ts +21 -2
- package/dist/esm/models/PostLibraryQuiz.js +7 -0
- package/dist/esm/models/PostQuestionAnswerChoicesInner.d.ts +6 -0
- package/dist/esm/models/PostQuestionAnswerChoicesInner.js +2 -0
- package/dist/esm/models/PutCourseVersionItem.d.ts +1 -1
- package/dist/esm/models/PutLibraryQuizSessionQuestionFlag.d.ts +32 -0
- package/dist/esm/models/PutLibraryQuizSessionQuestionFlag.js +43 -0
- package/dist/esm/models/PutLibraryQuizVersion.d.ts +19 -0
- package/dist/esm/models/PutLibraryQuizVersion.js +7 -0
- package/dist/esm/models/PutQuestionAnswerChoicesInner.d.ts +6 -0
- package/dist/esm/models/PutQuestionAnswerChoicesInner.js +2 -0
- package/dist/esm/models/PutQuizSettings.d.ts +44 -0
- package/dist/esm/models/PutQuizSettings.js +51 -0
- package/dist/esm/models/QuizFeedbackTiming.d.ts +25 -0
- package/dist/esm/models/QuizFeedbackTiming.js +43 -0
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/models/GetAttemptAllowance.d.ts +9 -3
- package/dist/models/GetAttemptAllowance.js +4 -0
- package/dist/models/GetCourseVersionItem.d.ts +1 -1
- package/dist/models/GetLibraryQuizResult.d.ts +30 -0
- package/dist/models/GetLibraryQuizResult.js +20 -0
- package/dist/models/GetLibraryQuizSession.d.ts +43 -0
- package/dist/models/GetLibraryQuizSession.js +27 -0
- package/dist/models/GetLibraryQuizVersion.d.ts +19 -0
- package/dist/models/GetLibraryQuizVersion.js +13 -0
- package/dist/models/GetQuestionAnswerChoicesInner.d.ts +6 -0
- package/dist/models/GetQuestionAnswerChoicesInner.js +4 -0
- package/dist/models/GetQuizSettings.d.ts +56 -0
- package/dist/models/GetQuizSettings.js +64 -0
- package/dist/models/HostedScormOutlineEntry.d.ts +1 -1
- package/dist/models/LibraryQuizQuestionFeedback.d.ts +78 -0
- package/dist/models/LibraryQuizQuestionFeedback.js +74 -0
- package/dist/models/LibraryQuizSessionAnswerChoice.d.ts +6 -0
- package/dist/models/LibraryQuizSessionAnswerChoice.js +2 -0
- package/dist/models/LibraryQuizSessionQuestion.d.ts +19 -0
- package/dist/models/LibraryQuizSessionQuestion.js +11 -0
- package/dist/models/PostCourseVersionItem.d.ts +1 -1
- package/dist/models/PostLibraryQuiz.d.ts +21 -2
- package/dist/models/PostLibraryQuiz.js +7 -0
- package/dist/models/PostQuestionAnswerChoicesInner.d.ts +6 -0
- package/dist/models/PostQuestionAnswerChoicesInner.js +2 -0
- package/dist/models/PutCourseVersionItem.d.ts +1 -1
- package/dist/models/PutLibraryQuizSessionQuestionFlag.d.ts +32 -0
- package/dist/models/PutLibraryQuizSessionQuestionFlag.js +50 -0
- package/dist/models/PutLibraryQuizVersion.d.ts +19 -0
- package/dist/models/PutLibraryQuizVersion.js +7 -0
- package/dist/models/PutQuestionAnswerChoicesInner.d.ts +6 -0
- package/dist/models/PutQuestionAnswerChoicesInner.js +2 -0
- package/dist/models/PutQuizSettings.d.ts +44 -0
- package/dist/models/PutQuizSettings.js +58 -0
- package/dist/models/QuizFeedbackTiming.d.ts +25 -0
- package/dist/models/QuizFeedbackTiming.js +51 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/ContentLibraryQuizApi.md +343 -0
- package/docs/DispatchApi.md +214 -0
- package/docs/GetAttemptAllowance.md +2 -0
- package/docs/GetLibraryQuizResult.md +10 -0
- package/docs/GetLibraryQuizSession.md +14 -0
- package/docs/GetLibraryQuizVersion.md +6 -0
- package/docs/GetQuestionAnswerChoicesInner.md +2 -0
- package/docs/GetQuizSettings.md +43 -0
- package/docs/LibraryQuizQuestionFeedback.md +47 -0
- package/docs/LibraryQuizSessionAnswerChoice.md +2 -0
- package/docs/LibraryQuizSessionQuestion.md +6 -0
- package/docs/PostLibraryQuiz.md +6 -0
- package/docs/PostQuestionAnswerChoicesInner.md +2 -0
- package/docs/PutLibraryQuizSessionQuestionFlag.md +34 -0
- package/docs/PutLibraryQuizVersion.md +6 -0
- package/docs/PutQuestionAnswerChoicesInner.md +2 -0
- package/docs/PutQuizSettings.md +38 -0
- package/docs/QuizFeedbackTiming.md +33 -0
- package/package.json +1 -1
- package/src/apis/ContentLibraryQuizApi.ts +287 -0
- package/src/apis/DispatchApi.ts +185 -0
- package/src/models/GetAttemptAllowance.ts +12 -3
- package/src/models/GetCourseVersionItem.ts +1 -1
- package/src/models/GetLibraryQuizResult.ts +45 -0
- package/src/models/GetLibraryQuizSession.ts +69 -0
- package/src/models/GetLibraryQuizVersion.ts +34 -0
- package/src/models/GetQuestionAnswerChoicesInner.ts +9 -0
- package/src/models/GetQuizSettings.ts +101 -0
- package/src/models/HostedScormOutlineEntry.ts +1 -1
- package/src/models/LibraryQuizQuestionFeedback.ts +135 -0
- package/src/models/LibraryQuizSessionAnswerChoice.ts +8 -0
- package/src/models/LibraryQuizSessionQuestion.ts +33 -0
- package/src/models/PostCourseVersionItem.ts +1 -1
- package/src/models/PostLibraryQuiz.ts +33 -2
- package/src/models/PostQuestionAnswerChoicesInner.ts +8 -0
- package/src/models/PutCourseVersionItem.ts +1 -1
- package/src/models/PutLibraryQuizSessionQuestionFlag.ts +66 -0
- package/src/models/PutLibraryQuizVersion.ts +31 -0
- package/src/models/PutQuestionAnswerChoicesInner.ts +8 -0
- package/src/models/PutQuizSettings.ts +84 -0
- package/src/models/QuizFeedbackTiming.ts +53 -0
- package/src/models/index.ts +5 -0
|
@@ -58,6 +58,11 @@ import {
|
|
|
58
58
|
GetLibraryQuizVersionFromJSON,
|
|
59
59
|
GetLibraryQuizVersionToJSON,
|
|
60
60
|
} from '../models/GetLibraryQuizVersion';
|
|
61
|
+
import {
|
|
62
|
+
type GetQuizSettings,
|
|
63
|
+
GetQuizSettingsFromJSON,
|
|
64
|
+
GetQuizSettingsToJSON,
|
|
65
|
+
} from '../models/GetQuizSettings';
|
|
61
66
|
import {
|
|
62
67
|
type LibraryQuizCriterion,
|
|
63
68
|
LibraryQuizCriterionFromJSON,
|
|
@@ -118,11 +123,21 @@ import {
|
|
|
118
123
|
PutLibraryQuizSessionOverrideFromJSON,
|
|
119
124
|
PutLibraryQuizSessionOverrideToJSON,
|
|
120
125
|
} from '../models/PutLibraryQuizSessionOverride';
|
|
126
|
+
import {
|
|
127
|
+
type PutLibraryQuizSessionQuestionFlag,
|
|
128
|
+
PutLibraryQuizSessionQuestionFlagFromJSON,
|
|
129
|
+
PutLibraryQuizSessionQuestionFlagToJSON,
|
|
130
|
+
} from '../models/PutLibraryQuizSessionQuestionFlag';
|
|
121
131
|
import {
|
|
122
132
|
type PutLibraryQuizVersion,
|
|
123
133
|
PutLibraryQuizVersionFromJSON,
|
|
124
134
|
PutLibraryQuizVersionToJSON,
|
|
125
135
|
} from '../models/PutLibraryQuizVersion';
|
|
136
|
+
import {
|
|
137
|
+
type PutQuizSettings,
|
|
138
|
+
PutQuizSettingsFromJSON,
|
|
139
|
+
PutQuizSettingsToJSON,
|
|
140
|
+
} from '../models/PutQuizSettings';
|
|
126
141
|
import {
|
|
127
142
|
type ResourceSessionEnvironment,
|
|
128
143
|
ResourceSessionEnvironmentFromJSON,
|
|
@@ -221,6 +236,15 @@ export interface PostLibraryQuizSessionRequest {
|
|
|
221
236
|
postLibraryQuizSession?: PostLibraryQuizSession;
|
|
222
237
|
}
|
|
223
238
|
|
|
239
|
+
export interface PostLibraryQuizSessionAnswerCheckRequest {
|
|
240
|
+
sessionId: string;
|
|
241
|
+
sessionQuestionId: string;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export interface PostLibraryQuizSessionStartRequest {
|
|
245
|
+
sessionId: string;
|
|
246
|
+
}
|
|
247
|
+
|
|
224
248
|
export interface PostLibraryQuizSessionSubmitRequest {
|
|
225
249
|
sessionId: string;
|
|
226
250
|
}
|
|
@@ -274,12 +298,22 @@ export interface PutLibraryQuizSessionOverrideRequest {
|
|
|
274
298
|
putLibraryQuizSessionOverride: PutLibraryQuizSessionOverride;
|
|
275
299
|
}
|
|
276
300
|
|
|
301
|
+
export interface PutLibraryQuizSessionQuestionFlagRequest {
|
|
302
|
+
sessionId: string;
|
|
303
|
+
sessionQuestionId: string;
|
|
304
|
+
putLibraryQuizSessionQuestionFlag: PutLibraryQuizSessionQuestionFlag;
|
|
305
|
+
}
|
|
306
|
+
|
|
277
307
|
export interface PutLibraryQuizVersionRequest {
|
|
278
308
|
quizId: string;
|
|
279
309
|
versionId: string;
|
|
280
310
|
putLibraryQuizVersion: PutLibraryQuizVersion;
|
|
281
311
|
}
|
|
282
312
|
|
|
313
|
+
export interface PutQuizSettingsRequest {
|
|
314
|
+
putQuizSettings: PutQuizSettings;
|
|
315
|
+
}
|
|
316
|
+
|
|
283
317
|
/**
|
|
284
318
|
*
|
|
285
319
|
*/
|
|
@@ -867,6 +901,45 @@ export class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
867
901
|
return await response.value();
|
|
868
902
|
}
|
|
869
903
|
|
|
904
|
+
/**
|
|
905
|
+
* Creates request options for getQuizSettings without sending the request
|
|
906
|
+
*/
|
|
907
|
+
async getQuizSettingsRequestOpts(): Promise<runtime.RequestOpts> {
|
|
908
|
+
const queryParameters: any = {};
|
|
909
|
+
|
|
910
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
let urlPath = `/content-library/quiz-settings`;
|
|
914
|
+
|
|
915
|
+
return {
|
|
916
|
+
path: urlPath,
|
|
917
|
+
method: 'GET',
|
|
918
|
+
headers: headerParameters,
|
|
919
|
+
query: queryParameters,
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Returns the attempt limit, time limit, and passing score that are copied into each new quiz. A portal that has never saved its own values gets the built-in defaults (5 attempts, 60 minutes, 70%).
|
|
925
|
+
* Get the selected portal\'s defaults for new quizzes
|
|
926
|
+
*/
|
|
927
|
+
async getQuizSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuizSettings>> {
|
|
928
|
+
const requestOptions = await this.getQuizSettingsRequestOpts();
|
|
929
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
930
|
+
|
|
931
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetQuizSettingsFromJSON(jsonValue));
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Returns the attempt limit, time limit, and passing score that are copied into each new quiz. A portal that has never saved its own values gets the built-in defaults (5 attempts, 60 minutes, 70%).
|
|
936
|
+
* Get the selected portal\'s defaults for new quizzes
|
|
937
|
+
*/
|
|
938
|
+
async getQuizSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuizSettings> {
|
|
939
|
+
const response = await this.getQuizSettingsRaw(initOverrides);
|
|
940
|
+
return await response.value();
|
|
941
|
+
}
|
|
942
|
+
|
|
870
943
|
/**
|
|
871
944
|
* Creates request options for postCourseLibraryQuizSession without sending the request
|
|
872
945
|
*/
|
|
@@ -1146,6 +1219,108 @@ export class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
1146
1219
|
return await response.value();
|
|
1147
1220
|
}
|
|
1148
1221
|
|
|
1222
|
+
/**
|
|
1223
|
+
* Creates request options for postLibraryQuizSessionAnswerCheck without sending the request
|
|
1224
|
+
*/
|
|
1225
|
+
async postLibraryQuizSessionAnswerCheckRequestOpts(requestParameters: PostLibraryQuizSessionAnswerCheckRequest): Promise<runtime.RequestOpts> {
|
|
1226
|
+
if (requestParameters['sessionId'] == null) {
|
|
1227
|
+
throw new runtime.RequiredError(
|
|
1228
|
+
'sessionId',
|
|
1229
|
+
'Required parameter "sessionId" was null or undefined when calling postLibraryQuizSessionAnswerCheck().'
|
|
1230
|
+
);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
if (requestParameters['sessionQuestionId'] == null) {
|
|
1234
|
+
throw new runtime.RequiredError(
|
|
1235
|
+
'sessionQuestionId',
|
|
1236
|
+
'Required parameter "sessionQuestionId" was null or undefined when calling postLibraryQuizSessionAnswerCheck().'
|
|
1237
|
+
);
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
const queryParameters: any = {};
|
|
1241
|
+
|
|
1242
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
let urlPath = `/quiz/sessions/{sessionId}/answers/{sessionQuestionId}/check`;
|
|
1246
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
1247
|
+
urlPath = urlPath.replace('{sessionQuestionId}', encodeURIComponent(String(requestParameters['sessionQuestionId'])));
|
|
1248
|
+
|
|
1249
|
+
return {
|
|
1250
|
+
path: urlPath,
|
|
1251
|
+
method: 'POST',
|
|
1252
|
+
headers: headerParameters,
|
|
1253
|
+
query: queryParameters,
|
|
1254
|
+
};
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
/**
|
|
1258
|
+
* Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
1259
|
+
* Check a saved answer for immediate feedback
|
|
1260
|
+
*/
|
|
1261
|
+
async postLibraryQuizSessionAnswerCheckRaw(requestParameters: PostLibraryQuizSessionAnswerCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>> {
|
|
1262
|
+
const requestOptions = await this.postLibraryQuizSessionAnswerCheckRequestOpts(requestParameters);
|
|
1263
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1264
|
+
|
|
1265
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizSessionFromJSON(jsonValue));
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
1270
|
+
* Check a saved answer for immediate feedback
|
|
1271
|
+
*/
|
|
1272
|
+
async postLibraryQuizSessionAnswerCheck(requestParameters: PostLibraryQuizSessionAnswerCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession> {
|
|
1273
|
+
const response = await this.postLibraryQuizSessionAnswerCheckRaw(requestParameters, initOverrides);
|
|
1274
|
+
return await response.value();
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* Creates request options for postLibraryQuizSessionStart without sending the request
|
|
1279
|
+
*/
|
|
1280
|
+
async postLibraryQuizSessionStartRequestOpts(requestParameters: PostLibraryQuizSessionStartRequest): Promise<runtime.RequestOpts> {
|
|
1281
|
+
if (requestParameters['sessionId'] == null) {
|
|
1282
|
+
throw new runtime.RequiredError(
|
|
1283
|
+
'sessionId',
|
|
1284
|
+
'Required parameter "sessionId" was null or undefined when calling postLibraryQuizSessionStart().'
|
|
1285
|
+
);
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
const queryParameters: any = {};
|
|
1289
|
+
|
|
1290
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
let urlPath = `/quiz/sessions/{sessionId}/start`;
|
|
1294
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
1295
|
+
|
|
1296
|
+
return {
|
|
1297
|
+
path: urlPath,
|
|
1298
|
+
method: 'POST',
|
|
1299
|
+
headers: headerParameters,
|
|
1300
|
+
query: queryParameters,
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
/**
|
|
1305
|
+
* Marks the attempt as started and starts its time limit. Answers cannot be saved before the attempt has started. Calling this again for an attempt that already started returns it unchanged.
|
|
1306
|
+
* Begin a quiz attempt from its introduction page
|
|
1307
|
+
*/
|
|
1308
|
+
async postLibraryQuizSessionStartRaw(requestParameters: PostLibraryQuizSessionStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>> {
|
|
1309
|
+
const requestOptions = await this.postLibraryQuizSessionStartRequestOpts(requestParameters);
|
|
1310
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1311
|
+
|
|
1312
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizSessionFromJSON(jsonValue));
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* Marks the attempt as started and starts its time limit. Answers cannot be saved before the attempt has started. Calling this again for an attempt that already started returns it unchanged.
|
|
1317
|
+
* Begin a quiz attempt from its introduction page
|
|
1318
|
+
*/
|
|
1319
|
+
async postLibraryQuizSessionStart(requestParameters: PostLibraryQuizSessionStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession> {
|
|
1320
|
+
const response = await this.postLibraryQuizSessionStartRaw(requestParameters, initOverrides);
|
|
1321
|
+
return await response.value();
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1149
1324
|
/**
|
|
1150
1325
|
* Creates request options for postLibraryQuizSessionSubmit without sending the request
|
|
1151
1326
|
*/
|
|
@@ -1707,6 +1882,69 @@ export class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
1707
1882
|
return await response.value();
|
|
1708
1883
|
}
|
|
1709
1884
|
|
|
1885
|
+
/**
|
|
1886
|
+
* Creates request options for putLibraryQuizSessionQuestionFlag without sending the request
|
|
1887
|
+
*/
|
|
1888
|
+
async putLibraryQuizSessionQuestionFlagRequestOpts(requestParameters: PutLibraryQuizSessionQuestionFlagRequest): Promise<runtime.RequestOpts> {
|
|
1889
|
+
if (requestParameters['sessionId'] == null) {
|
|
1890
|
+
throw new runtime.RequiredError(
|
|
1891
|
+
'sessionId',
|
|
1892
|
+
'Required parameter "sessionId" was null or undefined when calling putLibraryQuizSessionQuestionFlag().'
|
|
1893
|
+
);
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
if (requestParameters['sessionQuestionId'] == null) {
|
|
1897
|
+
throw new runtime.RequiredError(
|
|
1898
|
+
'sessionQuestionId',
|
|
1899
|
+
'Required parameter "sessionQuestionId" was null or undefined when calling putLibraryQuizSessionQuestionFlag().'
|
|
1900
|
+
);
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
if (requestParameters['putLibraryQuizSessionQuestionFlag'] == null) {
|
|
1904
|
+
throw new runtime.RequiredError(
|
|
1905
|
+
'putLibraryQuizSessionQuestionFlag',
|
|
1906
|
+
'Required parameter "putLibraryQuizSessionQuestionFlag" was null or undefined when calling putLibraryQuizSessionQuestionFlag().'
|
|
1907
|
+
);
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
const queryParameters: any = {};
|
|
1911
|
+
|
|
1912
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1913
|
+
|
|
1914
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1915
|
+
|
|
1916
|
+
|
|
1917
|
+
let urlPath = `/quiz/sessions/{sessionId}/questions/{sessionQuestionId}/flag`;
|
|
1918
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
1919
|
+
urlPath = urlPath.replace('{sessionQuestionId}', encodeURIComponent(String(requestParameters['sessionQuestionId'])));
|
|
1920
|
+
|
|
1921
|
+
return {
|
|
1922
|
+
path: urlPath,
|
|
1923
|
+
method: 'PUT',
|
|
1924
|
+
headers: headerParameters,
|
|
1925
|
+
query: queryParameters,
|
|
1926
|
+
body: PutLibraryQuizSessionQuestionFlagToJSON(requestParameters['putLibraryQuizSessionQuestionFlag']),
|
|
1927
|
+
};
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
/**
|
|
1931
|
+
* Flag or unflag a question to review before submitting
|
|
1932
|
+
*/
|
|
1933
|
+
async putLibraryQuizSessionQuestionFlagRaw(requestParameters: PutLibraryQuizSessionQuestionFlagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>> {
|
|
1934
|
+
const requestOptions = await this.putLibraryQuizSessionQuestionFlagRequestOpts(requestParameters);
|
|
1935
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1936
|
+
|
|
1937
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizSessionFromJSON(jsonValue));
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* Flag or unflag a question to review before submitting
|
|
1942
|
+
*/
|
|
1943
|
+
async putLibraryQuizSessionQuestionFlag(requestParameters: PutLibraryQuizSessionQuestionFlagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession> {
|
|
1944
|
+
const response = await this.putLibraryQuizSessionQuestionFlagRaw(requestParameters, initOverrides);
|
|
1945
|
+
return await response.value();
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1710
1948
|
/**
|
|
1711
1949
|
* Creates request options for putLibraryQuizVersion without sending the request
|
|
1712
1950
|
*/
|
|
@@ -1770,4 +2008,53 @@ export class ContentLibraryQuizApi extends runtime.BaseAPI {
|
|
|
1770
2008
|
return await response.value();
|
|
1771
2009
|
}
|
|
1772
2010
|
|
|
2011
|
+
/**
|
|
2012
|
+
* Creates request options for putQuizSettings without sending the request
|
|
2013
|
+
*/
|
|
2014
|
+
async putQuizSettingsRequestOpts(requestParameters: PutQuizSettingsRequest): Promise<runtime.RequestOpts> {
|
|
2015
|
+
if (requestParameters['putQuizSettings'] == null) {
|
|
2016
|
+
throw new runtime.RequiredError(
|
|
2017
|
+
'putQuizSettings',
|
|
2018
|
+
'Required parameter "putQuizSettings" was null or undefined when calling putQuizSettings().'
|
|
2019
|
+
);
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
const queryParameters: any = {};
|
|
2023
|
+
|
|
2024
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2025
|
+
|
|
2026
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2027
|
+
|
|
2028
|
+
|
|
2029
|
+
let urlPath = `/content-library/quiz-settings`;
|
|
2030
|
+
|
|
2031
|
+
return {
|
|
2032
|
+
path: urlPath,
|
|
2033
|
+
method: 'PUT',
|
|
2034
|
+
headers: headerParameters,
|
|
2035
|
+
query: queryParameters,
|
|
2036
|
+
body: PutQuizSettingsToJSON(requestParameters['putQuizSettings']),
|
|
2037
|
+
};
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
/**
|
|
2041
|
+
* Existing quizzes keep their own settings; only quizzes created afterwards start from the new defaults.
|
|
2042
|
+
* Update the selected portal\'s defaults for new quizzes
|
|
2043
|
+
*/
|
|
2044
|
+
async putQuizSettingsRaw(requestParameters: PutQuizSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuizSettings>> {
|
|
2045
|
+
const requestOptions = await this.putQuizSettingsRequestOpts(requestParameters);
|
|
2046
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
2047
|
+
|
|
2048
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetQuizSettingsFromJSON(jsonValue));
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
/**
|
|
2052
|
+
* Existing quizzes keep their own settings; only quizzes created afterwards start from the new defaults.
|
|
2053
|
+
* Update the selected portal\'s defaults for new quizzes
|
|
2054
|
+
*/
|
|
2055
|
+
async putQuizSettings(requestParameters: PutQuizSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuizSettings> {
|
|
2056
|
+
const response = await this.putQuizSettingsRaw(requestParameters, initOverrides);
|
|
2057
|
+
return await response.value();
|
|
2058
|
+
}
|
|
2059
|
+
|
|
1773
2060
|
}
|
package/src/apis/DispatchApi.ts
CHANGED
|
@@ -68,6 +68,11 @@ import {
|
|
|
68
68
|
PutLibraryQuizSessionAnswerFromJSON,
|
|
69
69
|
PutLibraryQuizSessionAnswerToJSON,
|
|
70
70
|
} from '../models/PutLibraryQuizSessionAnswer';
|
|
71
|
+
import {
|
|
72
|
+
type PutLibraryQuizSessionQuestionFlag,
|
|
73
|
+
PutLibraryQuizSessionQuestionFlagFromJSON,
|
|
74
|
+
PutLibraryQuizSessionQuestionFlagToJSON,
|
|
75
|
+
} from '../models/PutLibraryQuizSessionQuestionFlag';
|
|
71
76
|
|
|
72
77
|
export interface GetDispatchQuizSessionRequest {
|
|
73
78
|
sessionId: string;
|
|
@@ -90,6 +95,15 @@ export interface PostDispatchLaunchRequest {
|
|
|
90
95
|
postDispatchLaunch: PostDispatchLaunch;
|
|
91
96
|
}
|
|
92
97
|
|
|
98
|
+
export interface PostDispatchQuizSessionAnswerCheckRequest {
|
|
99
|
+
sessionId: string;
|
|
100
|
+
sessionQuestionId: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface PostDispatchQuizSessionStartRequest {
|
|
104
|
+
sessionId: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
93
107
|
export interface PostDispatchQuizSessionSubmitRequest {
|
|
94
108
|
sessionId: string;
|
|
95
109
|
}
|
|
@@ -104,6 +118,12 @@ export interface PutDispatchQuizSessionAnswerRequest {
|
|
|
104
118
|
putLibraryQuizSessionAnswer: PutLibraryQuizSessionAnswer;
|
|
105
119
|
}
|
|
106
120
|
|
|
121
|
+
export interface PutDispatchQuizSessionQuestionFlagRequest {
|
|
122
|
+
sessionId: string;
|
|
123
|
+
sessionQuestionId: string;
|
|
124
|
+
putLibraryQuizSessionQuestionFlag: PutLibraryQuizSessionQuestionFlag;
|
|
125
|
+
}
|
|
126
|
+
|
|
107
127
|
/**
|
|
108
128
|
*
|
|
109
129
|
*/
|
|
@@ -378,6 +398,108 @@ export class DispatchApi extends runtime.BaseAPI {
|
|
|
378
398
|
return await response.value();
|
|
379
399
|
}
|
|
380
400
|
|
|
401
|
+
/**
|
|
402
|
+
* Creates request options for postDispatchQuizSessionAnswerCheck without sending the request
|
|
403
|
+
*/
|
|
404
|
+
async postDispatchQuizSessionAnswerCheckRequestOpts(requestParameters: PostDispatchQuizSessionAnswerCheckRequest): Promise<runtime.RequestOpts> {
|
|
405
|
+
if (requestParameters['sessionId'] == null) {
|
|
406
|
+
throw new runtime.RequiredError(
|
|
407
|
+
'sessionId',
|
|
408
|
+
'Required parameter "sessionId" was null or undefined when calling postDispatchQuizSessionAnswerCheck().'
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
if (requestParameters['sessionQuestionId'] == null) {
|
|
413
|
+
throw new runtime.RequiredError(
|
|
414
|
+
'sessionQuestionId',
|
|
415
|
+
'Required parameter "sessionQuestionId" was null or undefined when calling postDispatchQuizSessionAnswerCheck().'
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
const queryParameters: any = {};
|
|
420
|
+
|
|
421
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
let urlPath = `/dispatch/runtime/quiz-sessions/{sessionId}/answers/{sessionQuestionId}/check`;
|
|
425
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
426
|
+
urlPath = urlPath.replace('{sessionQuestionId}', encodeURIComponent(String(requestParameters['sessionQuestionId'])));
|
|
427
|
+
|
|
428
|
+
return {
|
|
429
|
+
path: urlPath,
|
|
430
|
+
method: 'POST',
|
|
431
|
+
headers: headerParameters,
|
|
432
|
+
query: queryParameters,
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
438
|
+
* Check a saved answer for immediate feedback
|
|
439
|
+
*/
|
|
440
|
+
async postDispatchQuizSessionAnswerCheckRaw(requestParameters: PostDispatchQuizSessionAnswerCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>> {
|
|
441
|
+
const requestOptions = await this.postDispatchQuizSessionAnswerCheckRequestOpts(requestParameters);
|
|
442
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
443
|
+
|
|
444
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizSessionFromJSON(jsonValue));
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Available when the quiz shows feedback after each question. Locks the saved answer and returns the session with that question\'s feedback.
|
|
449
|
+
* Check a saved answer for immediate feedback
|
|
450
|
+
*/
|
|
451
|
+
async postDispatchQuizSessionAnswerCheck(requestParameters: PostDispatchQuizSessionAnswerCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession> {
|
|
452
|
+
const response = await this.postDispatchQuizSessionAnswerCheckRaw(requestParameters, initOverrides);
|
|
453
|
+
return await response.value();
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Creates request options for postDispatchQuizSessionStart without sending the request
|
|
458
|
+
*/
|
|
459
|
+
async postDispatchQuizSessionStartRequestOpts(requestParameters: PostDispatchQuizSessionStartRequest): Promise<runtime.RequestOpts> {
|
|
460
|
+
if (requestParameters['sessionId'] == null) {
|
|
461
|
+
throw new runtime.RequiredError(
|
|
462
|
+
'sessionId',
|
|
463
|
+
'Required parameter "sessionId" was null or undefined when calling postDispatchQuizSessionStart().'
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
const queryParameters: any = {};
|
|
468
|
+
|
|
469
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
let urlPath = `/dispatch/runtime/quiz-sessions/{sessionId}/start`;
|
|
473
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
474
|
+
|
|
475
|
+
return {
|
|
476
|
+
path: urlPath,
|
|
477
|
+
method: 'POST',
|
|
478
|
+
headers: headerParameters,
|
|
479
|
+
query: queryParameters,
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Marks the attempt as started and starts its time limit. Answers cannot be saved before the attempt has started. Calling this again for an attempt that already started returns it unchanged.
|
|
485
|
+
* Begin a quiz attempt from its introduction page
|
|
486
|
+
*/
|
|
487
|
+
async postDispatchQuizSessionStartRaw(requestParameters: PostDispatchQuizSessionStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>> {
|
|
488
|
+
const requestOptions = await this.postDispatchQuizSessionStartRequestOpts(requestParameters);
|
|
489
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
490
|
+
|
|
491
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizSessionFromJSON(jsonValue));
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Marks the attempt as started and starts its time limit. Answers cannot be saved before the attempt has started. Calling this again for an attempt that already started returns it unchanged.
|
|
496
|
+
* Begin a quiz attempt from its introduction page
|
|
497
|
+
*/
|
|
498
|
+
async postDispatchQuizSessionStart(requestParameters: PostDispatchQuizSessionStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession> {
|
|
499
|
+
const response = await this.postDispatchQuizSessionStartRaw(requestParameters, initOverrides);
|
|
500
|
+
return await response.value();
|
|
501
|
+
}
|
|
502
|
+
|
|
381
503
|
/**
|
|
382
504
|
* Creates request options for postDispatchQuizSessionSubmit without sending the request
|
|
383
505
|
*/
|
|
@@ -572,4 +694,67 @@ export class DispatchApi extends runtime.BaseAPI {
|
|
|
572
694
|
return await response.value();
|
|
573
695
|
}
|
|
574
696
|
|
|
697
|
+
/**
|
|
698
|
+
* Creates request options for putDispatchQuizSessionQuestionFlag without sending the request
|
|
699
|
+
*/
|
|
700
|
+
async putDispatchQuizSessionQuestionFlagRequestOpts(requestParameters: PutDispatchQuizSessionQuestionFlagRequest): Promise<runtime.RequestOpts> {
|
|
701
|
+
if (requestParameters['sessionId'] == null) {
|
|
702
|
+
throw new runtime.RequiredError(
|
|
703
|
+
'sessionId',
|
|
704
|
+
'Required parameter "sessionId" was null or undefined when calling putDispatchQuizSessionQuestionFlag().'
|
|
705
|
+
);
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
if (requestParameters['sessionQuestionId'] == null) {
|
|
709
|
+
throw new runtime.RequiredError(
|
|
710
|
+
'sessionQuestionId',
|
|
711
|
+
'Required parameter "sessionQuestionId" was null or undefined when calling putDispatchQuizSessionQuestionFlag().'
|
|
712
|
+
);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
if (requestParameters['putLibraryQuizSessionQuestionFlag'] == null) {
|
|
716
|
+
throw new runtime.RequiredError(
|
|
717
|
+
'putLibraryQuizSessionQuestionFlag',
|
|
718
|
+
'Required parameter "putLibraryQuizSessionQuestionFlag" was null or undefined when calling putDispatchQuizSessionQuestionFlag().'
|
|
719
|
+
);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
const queryParameters: any = {};
|
|
723
|
+
|
|
724
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
725
|
+
|
|
726
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
let urlPath = `/dispatch/runtime/quiz-sessions/{sessionId}/questions/{sessionQuestionId}/flag`;
|
|
730
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
731
|
+
urlPath = urlPath.replace('{sessionQuestionId}', encodeURIComponent(String(requestParameters['sessionQuestionId'])));
|
|
732
|
+
|
|
733
|
+
return {
|
|
734
|
+
path: urlPath,
|
|
735
|
+
method: 'PUT',
|
|
736
|
+
headers: headerParameters,
|
|
737
|
+
query: queryParameters,
|
|
738
|
+
body: PutLibraryQuizSessionQuestionFlagToJSON(requestParameters['putLibraryQuizSessionQuestionFlag']),
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Flag or unflag a question to review before submitting
|
|
744
|
+
*/
|
|
745
|
+
async putDispatchQuizSessionQuestionFlagRaw(requestParameters: PutDispatchQuizSessionQuestionFlagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetLibraryQuizSession>> {
|
|
746
|
+
const requestOptions = await this.putDispatchQuizSessionQuestionFlagRequestOpts(requestParameters);
|
|
747
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
748
|
+
|
|
749
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetLibraryQuizSessionFromJSON(jsonValue));
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* Flag or unflag a question to review before submitting
|
|
754
|
+
*/
|
|
755
|
+
async putDispatchQuizSessionQuestionFlag(requestParameters: PutDispatchQuizSessionQuestionFlagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetLibraryQuizSession> {
|
|
756
|
+
const response = await this.putDispatchQuizSessionQuestionFlagRaw(requestParameters, initOverrides);
|
|
757
|
+
return await response.value();
|
|
758
|
+
}
|
|
759
|
+
|
|
575
760
|
}
|
|
@@ -44,7 +44,7 @@ export interface GetAttemptAllowance {
|
|
|
44
44
|
*/
|
|
45
45
|
userId: string;
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* The placement's attempt limit. Zero means unlimited.
|
|
48
48
|
* @type {number}
|
|
49
49
|
* @memberof GetAttemptAllowance
|
|
50
50
|
*/
|
|
@@ -56,7 +56,7 @@ export interface GetAttemptAllowance {
|
|
|
56
56
|
*/
|
|
57
57
|
additionalAttempts: number;
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* The limit including extra attempts. Zero means unlimited.
|
|
60
60
|
* @type {number}
|
|
61
61
|
* @memberof GetAttemptAllowance
|
|
62
62
|
*/
|
|
@@ -68,11 +68,17 @@ export interface GetAttemptAllowance {
|
|
|
68
68
|
*/
|
|
69
69
|
attemptsUsed: number;
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
71
|
+
* Zero when attempts are unlimited; check `unlimited` first.
|
|
72
72
|
* @type {number}
|
|
73
73
|
* @memberof GetAttemptAllowance
|
|
74
74
|
*/
|
|
75
75
|
attemptsRemaining: number;
|
|
76
|
+
/**
|
|
77
|
+
* The placement allows unlimited attempts.
|
|
78
|
+
* @type {boolean}
|
|
79
|
+
* @memberof GetAttemptAllowance
|
|
80
|
+
*/
|
|
81
|
+
unlimited: boolean;
|
|
76
82
|
}
|
|
77
83
|
|
|
78
84
|
/**
|
|
@@ -88,6 +94,7 @@ export function instanceOfGetAttemptAllowance(value: object): value is GetAttemp
|
|
|
88
94
|
if (!('effectiveMaxAttempts' in value) || value['effectiveMaxAttempts'] === undefined) return false;
|
|
89
95
|
if (!('attemptsUsed' in value) || value['attemptsUsed'] === undefined) return false;
|
|
90
96
|
if (!('attemptsRemaining' in value) || value['attemptsRemaining'] === undefined) return false;
|
|
97
|
+
if (!('unlimited' in value) || value['unlimited'] === undefined) return false;
|
|
91
98
|
return true;
|
|
92
99
|
}
|
|
93
100
|
|
|
@@ -110,6 +117,7 @@ export function GetAttemptAllowanceFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
110
117
|
'effectiveMaxAttempts': json['effective_max_attempts'],
|
|
111
118
|
'attemptsUsed': json['attempts_used'],
|
|
112
119
|
'attemptsRemaining': json['attempts_remaining'],
|
|
120
|
+
'unlimited': json['unlimited'],
|
|
113
121
|
};
|
|
114
122
|
}
|
|
115
123
|
|
|
@@ -133,6 +141,7 @@ export function GetAttemptAllowanceToJSONTyped(value?: GetAttemptAllowance | nul
|
|
|
133
141
|
'effective_max_attempts': value['effectiveMaxAttempts'],
|
|
134
142
|
'attempts_used': value['attemptsUsed'],
|
|
135
143
|
'attempts_remaining': value['attemptsRemaining'],
|
|
144
|
+
'unlimited': value['unlimited'],
|
|
136
145
|
};
|
|
137
146
|
}
|
|
138
147
|
|