@gyldendalas/gyldendal-divine-api 0.2.8 → 0.2.9
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/dist/index.cjs +18 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1074,6 +1074,7 @@ var AIBotService = class extends base_service_default {
|
|
|
1074
1074
|
};
|
|
1075
1075
|
|
|
1076
1076
|
// src/services/quiz_service.ts
|
|
1077
|
+
var REQUEST_TIMEOUT = 1e4;
|
|
1077
1078
|
var QuizService = class extends base_service_default {
|
|
1078
1079
|
discoverUrlPrefix() {
|
|
1079
1080
|
switch (this.environment) {
|
|
@@ -1106,7 +1107,7 @@ var QuizService = class extends base_service_default {
|
|
|
1106
1107
|
isbn,
|
|
1107
1108
|
quiz,
|
|
1108
1109
|
extraHeaders,
|
|
1109
|
-
timeout =
|
|
1110
|
+
timeout = REQUEST_TIMEOUT
|
|
1110
1111
|
}) {
|
|
1111
1112
|
const url = `${this.getUrlPrefix()}/isbn/${isbn}/quiz/${quiz}`;
|
|
1112
1113
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1118,7 +1119,7 @@ var QuizService = class extends base_service_default {
|
|
|
1118
1119
|
quiz,
|
|
1119
1120
|
shared,
|
|
1120
1121
|
extraHeaders,
|
|
1121
|
-
timeout =
|
|
1122
|
+
timeout = REQUEST_TIMEOUT
|
|
1122
1123
|
}) {
|
|
1123
1124
|
const url = shared ? `${this.getUrlPrefix()}/shared/student/${quiz}` : `${this.getUrlPrefix()}/isbn/${isbn}/quiz/${quiz}`;
|
|
1124
1125
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1130,7 +1131,7 @@ var QuizService = class extends base_service_default {
|
|
|
1130
1131
|
quizUnitId,
|
|
1131
1132
|
shared,
|
|
1132
1133
|
extraHeaders,
|
|
1133
|
-
timeout =
|
|
1134
|
+
timeout = REQUEST_TIMEOUT
|
|
1134
1135
|
}) {
|
|
1135
1136
|
const url = shared ? `${this.getUrlPrefix()}/shared/student/${quizUnitId}` : `${this.getUrlPrefix()}/isbn/${isbn}/student/${quizUnitId}`;
|
|
1136
1137
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1142,7 +1143,7 @@ var QuizService = class extends base_service_default {
|
|
|
1142
1143
|
quizUnitId,
|
|
1143
1144
|
questionID,
|
|
1144
1145
|
extraHeaders,
|
|
1145
|
-
timeout =
|
|
1146
|
+
timeout = REQUEST_TIMEOUT
|
|
1146
1147
|
}) {
|
|
1147
1148
|
const url = `${this.getUrlPrefix()}/isbn/${isbn}/student/${quizUnitId}/question/${questionID}`;
|
|
1148
1149
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1160,7 +1161,7 @@ var QuizService = class extends base_service_default {
|
|
|
1160
1161
|
answer,
|
|
1161
1162
|
shared,
|
|
1162
1163
|
extraHeaders,
|
|
1163
|
-
timeout =
|
|
1164
|
+
timeout = REQUEST_TIMEOUT
|
|
1164
1165
|
}) {
|
|
1165
1166
|
const url = shared ? `${this.getUrlPrefix()}/shared/student/${quizUnitId}` : `${this.getUrlPrefix()}/isbn/${isbn}/student/${quizUnitId}`;
|
|
1166
1167
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1177,7 +1178,7 @@ var QuizService = class extends base_service_default {
|
|
|
1177
1178
|
quizUnitId,
|
|
1178
1179
|
shared,
|
|
1179
1180
|
extraHeaders,
|
|
1180
|
-
timeout =
|
|
1181
|
+
timeout = REQUEST_TIMEOUT
|
|
1181
1182
|
}) {
|
|
1182
1183
|
const url = shared ? `${this.getUrlPrefix()}/shared/student/${quizUnitId}/finish` : `${this.getUrlPrefix()}/isbn/${isbn}/student/${quizUnitId}`;
|
|
1183
1184
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1194,7 +1195,7 @@ var QuizService = class extends base_service_default {
|
|
|
1194
1195
|
quizUnitId,
|
|
1195
1196
|
shared,
|
|
1196
1197
|
extraHeaders,
|
|
1197
|
-
timeout =
|
|
1198
|
+
timeout = REQUEST_TIMEOUT
|
|
1198
1199
|
}) {
|
|
1199
1200
|
const url = shared ? `${this.getUrlPrefix()}/shared/student/${quizUnitId}/result` : `${this.getUrlPrefix()}/isbn/${isbn}/student/overview/${quizUnitId}`;
|
|
1200
1201
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1207,7 +1208,7 @@ var QuizService = class extends base_service_default {
|
|
|
1207
1208
|
async createSharedQuiz({
|
|
1208
1209
|
quizData,
|
|
1209
1210
|
extraHeaders,
|
|
1210
|
-
timeout =
|
|
1211
|
+
timeout = REQUEST_TIMEOUT
|
|
1211
1212
|
}) {
|
|
1212
1213
|
const url = `${this.getUrlPrefix()}/shared/quiz`;
|
|
1213
1214
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1224,7 +1225,7 @@ var QuizService = class extends base_service_default {
|
|
|
1224
1225
|
quizData,
|
|
1225
1226
|
action,
|
|
1226
1227
|
extraHeaders,
|
|
1227
|
-
timeout =
|
|
1228
|
+
timeout = REQUEST_TIMEOUT
|
|
1228
1229
|
}) {
|
|
1229
1230
|
const url = `${this.getUrlPrefix()}/shared/quiz/${quizSessionId}`;
|
|
1230
1231
|
const method = action === "edit" ? "PUT" : "POST";
|
|
@@ -1245,7 +1246,7 @@ var QuizService = class extends base_service_default {
|
|
|
1245
1246
|
async getTeachersQuizProblems({
|
|
1246
1247
|
quizSessionId,
|
|
1247
1248
|
extraHeaders,
|
|
1248
|
-
timeout =
|
|
1249
|
+
timeout = REQUEST_TIMEOUT
|
|
1249
1250
|
}) {
|
|
1250
1251
|
const url = `${this.getUrlPrefix()}/shared/teacher/quizzes/${quizSessionId}/problems`;
|
|
1251
1252
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1256,7 +1257,7 @@ var QuizService = class extends base_service_default {
|
|
|
1256
1257
|
quizSessionId,
|
|
1257
1258
|
quizUnitId,
|
|
1258
1259
|
extraHeaders,
|
|
1259
|
-
timeout =
|
|
1260
|
+
timeout = REQUEST_TIMEOUT
|
|
1260
1261
|
}) {
|
|
1261
1262
|
const url = `${this.getUrlPrefix()}/shared/teacher/quizzes/${quizSessionId}/units/${quizUnitId}`;
|
|
1262
1263
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1268,7 +1269,7 @@ var QuizService = class extends base_service_default {
|
|
|
1268
1269
|
questionId,
|
|
1269
1270
|
activate,
|
|
1270
1271
|
extraHeaders,
|
|
1271
|
-
timeout =
|
|
1272
|
+
timeout = REQUEST_TIMEOUT
|
|
1272
1273
|
}) {
|
|
1273
1274
|
const url = `${this.getUrlPrefix()}/shared/teacher/quiz/${quizSessionId}/question/${questionId}`;
|
|
1274
1275
|
const method = activate ? "PATCH" : "DELETE";
|
|
@@ -1283,7 +1284,7 @@ var QuizService = class extends base_service_default {
|
|
|
1283
1284
|
}
|
|
1284
1285
|
async getTeachersQuizzes({
|
|
1285
1286
|
extraHeaders,
|
|
1286
|
-
timeout =
|
|
1287
|
+
timeout = REQUEST_TIMEOUT
|
|
1287
1288
|
}) {
|
|
1288
1289
|
const url = `${this.getUrlPrefix()}/shared/teacher/quizzes`;
|
|
1289
1290
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1292,7 +1293,7 @@ var QuizService = class extends base_service_default {
|
|
|
1292
1293
|
}
|
|
1293
1294
|
async getStudentsQuizzes({
|
|
1294
1295
|
extraHeaders,
|
|
1295
|
-
timeout =
|
|
1296
|
+
timeout = REQUEST_TIMEOUT
|
|
1296
1297
|
}) {
|
|
1297
1298
|
const url = `${this.getUrlPrefix()}/shared/student/quizzes`;
|
|
1298
1299
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1302,7 +1303,7 @@ var QuizService = class extends base_service_default {
|
|
|
1302
1303
|
async getTeachersQuiz({
|
|
1303
1304
|
quizSessionId,
|
|
1304
1305
|
extraHeaders,
|
|
1305
|
-
timeout =
|
|
1306
|
+
timeout = REQUEST_TIMEOUT
|
|
1306
1307
|
}) {
|
|
1307
1308
|
const url = `${this.getUrlPrefix()}/shared/teacher/quizzes/${quizSessionId}`;
|
|
1308
1309
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1313,7 +1314,7 @@ var QuizService = class extends base_service_default {
|
|
|
1313
1314
|
quizSessionId,
|
|
1314
1315
|
archive,
|
|
1315
1316
|
extraHeaders,
|
|
1316
|
-
timeout =
|
|
1317
|
+
timeout = REQUEST_TIMEOUT
|
|
1317
1318
|
}) {
|
|
1318
1319
|
const url = `${this.getUrlPrefix()}/shared/quiz/${quizSessionId}`;
|
|
1319
1320
|
const method = archive ? "DELETE" : "PATCH";
|
|
@@ -1330,7 +1331,7 @@ var QuizService = class extends base_service_default {
|
|
|
1330
1331
|
quizSessionId,
|
|
1331
1332
|
quizUnitId,
|
|
1332
1333
|
extraHeaders,
|
|
1333
|
-
timeout =
|
|
1334
|
+
timeout = REQUEST_TIMEOUT
|
|
1334
1335
|
}) {
|
|
1335
1336
|
const url = `${this.getUrlPrefix()}/shared/teacher/quizzes/${quizSessionId}/units/${quizUnitId}`;
|
|
1336
1337
|
const headers = this.makeHeaders(extraHeaders);
|