@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.js
CHANGED
|
@@ -1033,6 +1033,7 @@ var AIBotService = class extends base_service_default {
|
|
|
1033
1033
|
};
|
|
1034
1034
|
|
|
1035
1035
|
// src/services/quiz_service.ts
|
|
1036
|
+
var REQUEST_TIMEOUT = 1e4;
|
|
1036
1037
|
var QuizService = class extends base_service_default {
|
|
1037
1038
|
discoverUrlPrefix() {
|
|
1038
1039
|
switch (this.environment) {
|
|
@@ -1065,7 +1066,7 @@ var QuizService = class extends base_service_default {
|
|
|
1065
1066
|
isbn,
|
|
1066
1067
|
quiz,
|
|
1067
1068
|
extraHeaders,
|
|
1068
|
-
timeout =
|
|
1069
|
+
timeout = REQUEST_TIMEOUT
|
|
1069
1070
|
}) {
|
|
1070
1071
|
const url = `${this.getUrlPrefix()}/isbn/${isbn}/quiz/${quiz}`;
|
|
1071
1072
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1077,7 +1078,7 @@ var QuizService = class extends base_service_default {
|
|
|
1077
1078
|
quiz,
|
|
1078
1079
|
shared,
|
|
1079
1080
|
extraHeaders,
|
|
1080
|
-
timeout =
|
|
1081
|
+
timeout = REQUEST_TIMEOUT
|
|
1081
1082
|
}) {
|
|
1082
1083
|
const url = shared ? `${this.getUrlPrefix()}/shared/student/${quiz}` : `${this.getUrlPrefix()}/isbn/${isbn}/quiz/${quiz}`;
|
|
1083
1084
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1089,7 +1090,7 @@ var QuizService = class extends base_service_default {
|
|
|
1089
1090
|
quizUnitId,
|
|
1090
1091
|
shared,
|
|
1091
1092
|
extraHeaders,
|
|
1092
|
-
timeout =
|
|
1093
|
+
timeout = REQUEST_TIMEOUT
|
|
1093
1094
|
}) {
|
|
1094
1095
|
const url = shared ? `${this.getUrlPrefix()}/shared/student/${quizUnitId}` : `${this.getUrlPrefix()}/isbn/${isbn}/student/${quizUnitId}`;
|
|
1095
1096
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1101,7 +1102,7 @@ var QuizService = class extends base_service_default {
|
|
|
1101
1102
|
quizUnitId,
|
|
1102
1103
|
questionID,
|
|
1103
1104
|
extraHeaders,
|
|
1104
|
-
timeout =
|
|
1105
|
+
timeout = REQUEST_TIMEOUT
|
|
1105
1106
|
}) {
|
|
1106
1107
|
const url = `${this.getUrlPrefix()}/isbn/${isbn}/student/${quizUnitId}/question/${questionID}`;
|
|
1107
1108
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1119,7 +1120,7 @@ var QuizService = class extends base_service_default {
|
|
|
1119
1120
|
answer,
|
|
1120
1121
|
shared,
|
|
1121
1122
|
extraHeaders,
|
|
1122
|
-
timeout =
|
|
1123
|
+
timeout = REQUEST_TIMEOUT
|
|
1123
1124
|
}) {
|
|
1124
1125
|
const url = shared ? `${this.getUrlPrefix()}/shared/student/${quizUnitId}` : `${this.getUrlPrefix()}/isbn/${isbn}/student/${quizUnitId}`;
|
|
1125
1126
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1136,7 +1137,7 @@ var QuizService = class extends base_service_default {
|
|
|
1136
1137
|
quizUnitId,
|
|
1137
1138
|
shared,
|
|
1138
1139
|
extraHeaders,
|
|
1139
|
-
timeout =
|
|
1140
|
+
timeout = REQUEST_TIMEOUT
|
|
1140
1141
|
}) {
|
|
1141
1142
|
const url = shared ? `${this.getUrlPrefix()}/shared/student/${quizUnitId}/finish` : `${this.getUrlPrefix()}/isbn/${isbn}/student/${quizUnitId}`;
|
|
1142
1143
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1153,7 +1154,7 @@ var QuizService = class extends base_service_default {
|
|
|
1153
1154
|
quizUnitId,
|
|
1154
1155
|
shared,
|
|
1155
1156
|
extraHeaders,
|
|
1156
|
-
timeout =
|
|
1157
|
+
timeout = REQUEST_TIMEOUT
|
|
1157
1158
|
}) {
|
|
1158
1159
|
const url = shared ? `${this.getUrlPrefix()}/shared/student/${quizUnitId}/result` : `${this.getUrlPrefix()}/isbn/${isbn}/student/overview/${quizUnitId}`;
|
|
1159
1160
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1166,7 +1167,7 @@ var QuizService = class extends base_service_default {
|
|
|
1166
1167
|
async createSharedQuiz({
|
|
1167
1168
|
quizData,
|
|
1168
1169
|
extraHeaders,
|
|
1169
|
-
timeout =
|
|
1170
|
+
timeout = REQUEST_TIMEOUT
|
|
1170
1171
|
}) {
|
|
1171
1172
|
const url = `${this.getUrlPrefix()}/shared/quiz`;
|
|
1172
1173
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1183,7 +1184,7 @@ var QuizService = class extends base_service_default {
|
|
|
1183
1184
|
quizData,
|
|
1184
1185
|
action,
|
|
1185
1186
|
extraHeaders,
|
|
1186
|
-
timeout =
|
|
1187
|
+
timeout = REQUEST_TIMEOUT
|
|
1187
1188
|
}) {
|
|
1188
1189
|
const url = `${this.getUrlPrefix()}/shared/quiz/${quizSessionId}`;
|
|
1189
1190
|
const method = action === "edit" ? "PUT" : "POST";
|
|
@@ -1204,7 +1205,7 @@ var QuizService = class extends base_service_default {
|
|
|
1204
1205
|
async getTeachersQuizProblems({
|
|
1205
1206
|
quizSessionId,
|
|
1206
1207
|
extraHeaders,
|
|
1207
|
-
timeout =
|
|
1208
|
+
timeout = REQUEST_TIMEOUT
|
|
1208
1209
|
}) {
|
|
1209
1210
|
const url = `${this.getUrlPrefix()}/shared/teacher/quizzes/${quizSessionId}/problems`;
|
|
1210
1211
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1215,7 +1216,7 @@ var QuizService = class extends base_service_default {
|
|
|
1215
1216
|
quizSessionId,
|
|
1216
1217
|
quizUnitId,
|
|
1217
1218
|
extraHeaders,
|
|
1218
|
-
timeout =
|
|
1219
|
+
timeout = REQUEST_TIMEOUT
|
|
1219
1220
|
}) {
|
|
1220
1221
|
const url = `${this.getUrlPrefix()}/shared/teacher/quizzes/${quizSessionId}/units/${quizUnitId}`;
|
|
1221
1222
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1227,7 +1228,7 @@ var QuizService = class extends base_service_default {
|
|
|
1227
1228
|
questionId,
|
|
1228
1229
|
activate,
|
|
1229
1230
|
extraHeaders,
|
|
1230
|
-
timeout =
|
|
1231
|
+
timeout = REQUEST_TIMEOUT
|
|
1231
1232
|
}) {
|
|
1232
1233
|
const url = `${this.getUrlPrefix()}/shared/teacher/quiz/${quizSessionId}/question/${questionId}`;
|
|
1233
1234
|
const method = activate ? "PATCH" : "DELETE";
|
|
@@ -1242,7 +1243,7 @@ var QuizService = class extends base_service_default {
|
|
|
1242
1243
|
}
|
|
1243
1244
|
async getTeachersQuizzes({
|
|
1244
1245
|
extraHeaders,
|
|
1245
|
-
timeout =
|
|
1246
|
+
timeout = REQUEST_TIMEOUT
|
|
1246
1247
|
}) {
|
|
1247
1248
|
const url = `${this.getUrlPrefix()}/shared/teacher/quizzes`;
|
|
1248
1249
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1251,7 +1252,7 @@ var QuizService = class extends base_service_default {
|
|
|
1251
1252
|
}
|
|
1252
1253
|
async getStudentsQuizzes({
|
|
1253
1254
|
extraHeaders,
|
|
1254
|
-
timeout =
|
|
1255
|
+
timeout = REQUEST_TIMEOUT
|
|
1255
1256
|
}) {
|
|
1256
1257
|
const url = `${this.getUrlPrefix()}/shared/student/quizzes`;
|
|
1257
1258
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1261,7 +1262,7 @@ var QuizService = class extends base_service_default {
|
|
|
1261
1262
|
async getTeachersQuiz({
|
|
1262
1263
|
quizSessionId,
|
|
1263
1264
|
extraHeaders,
|
|
1264
|
-
timeout =
|
|
1265
|
+
timeout = REQUEST_TIMEOUT
|
|
1265
1266
|
}) {
|
|
1266
1267
|
const url = `${this.getUrlPrefix()}/shared/teacher/quizzes/${quizSessionId}`;
|
|
1267
1268
|
const headers = this.makeHeaders(extraHeaders);
|
|
@@ -1272,7 +1273,7 @@ var QuizService = class extends base_service_default {
|
|
|
1272
1273
|
quizSessionId,
|
|
1273
1274
|
archive,
|
|
1274
1275
|
extraHeaders,
|
|
1275
|
-
timeout =
|
|
1276
|
+
timeout = REQUEST_TIMEOUT
|
|
1276
1277
|
}) {
|
|
1277
1278
|
const url = `${this.getUrlPrefix()}/shared/quiz/${quizSessionId}`;
|
|
1278
1279
|
const method = archive ? "DELETE" : "PATCH";
|
|
@@ -1289,7 +1290,7 @@ var QuizService = class extends base_service_default {
|
|
|
1289
1290
|
quizSessionId,
|
|
1290
1291
|
quizUnitId,
|
|
1291
1292
|
extraHeaders,
|
|
1292
|
-
timeout =
|
|
1293
|
+
timeout = REQUEST_TIMEOUT
|
|
1293
1294
|
}) {
|
|
1294
1295
|
const url = `${this.getUrlPrefix()}/shared/teacher/quizzes/${quizSessionId}/units/${quizUnitId}`;
|
|
1295
1296
|
const headers = this.makeHeaders(extraHeaders);
|