academe-kit 0.11.6 → 0.11.7
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 +29 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +378 -0
- package/dist/index.esm.js +29 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/types/services/QuizService.d.ts +178 -0
- package/dist/types/types/academe-api.d.ts +200 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9899,6 +9899,67 @@ interface paths {
|
|
|
9899
9899
|
patch?: never;
|
|
9900
9900
|
trace?: never;
|
|
9901
9901
|
};
|
|
9902
|
+
"/quiz-questions/bulk": {
|
|
9903
|
+
parameters: {
|
|
9904
|
+
query?: never;
|
|
9905
|
+
header?: never;
|
|
9906
|
+
path?: never;
|
|
9907
|
+
cookie?: never;
|
|
9908
|
+
};
|
|
9909
|
+
get?: never;
|
|
9910
|
+
put?: never;
|
|
9911
|
+
/**
|
|
9912
|
+
* Bulk create quiz questions
|
|
9913
|
+
* @description Cria várias perguntas (com respostas) de uma vez para um quiz.
|
|
9914
|
+
*/
|
|
9915
|
+
post: {
|
|
9916
|
+
parameters: {
|
|
9917
|
+
query?: never;
|
|
9918
|
+
header?: never;
|
|
9919
|
+
path?: never;
|
|
9920
|
+
cookie?: never;
|
|
9921
|
+
};
|
|
9922
|
+
requestBody: {
|
|
9923
|
+
content: {
|
|
9924
|
+
"application/json": {
|
|
9925
|
+
quizId: string;
|
|
9926
|
+
questions: {
|
|
9927
|
+
text: string;
|
|
9928
|
+
type: "multiple_choice" | "true_false" | "open";
|
|
9929
|
+
points?: number;
|
|
9930
|
+
options?: {
|
|
9931
|
+
text: string;
|
|
9932
|
+
is_correct: boolean;
|
|
9933
|
+
}[];
|
|
9934
|
+
}[];
|
|
9935
|
+
};
|
|
9936
|
+
};
|
|
9937
|
+
};
|
|
9938
|
+
responses: {
|
|
9939
|
+
/** @description Questions created */
|
|
9940
|
+
201: {
|
|
9941
|
+
headers: {
|
|
9942
|
+
[name: string]: unknown;
|
|
9943
|
+
};
|
|
9944
|
+
content: {
|
|
9945
|
+
"application/json": {
|
|
9946
|
+
/** @example success */
|
|
9947
|
+
status?: string;
|
|
9948
|
+
data?: components["schemas"]["QuizQuestion"][];
|
|
9949
|
+
};
|
|
9950
|
+
};
|
|
9951
|
+
};
|
|
9952
|
+
400: components["responses"]["BadRequest"];
|
|
9953
|
+
401: components["responses"]["Unauthorized"];
|
|
9954
|
+
500: components["responses"]["ServerError"];
|
|
9955
|
+
};
|
|
9956
|
+
};
|
|
9957
|
+
delete?: never;
|
|
9958
|
+
options?: never;
|
|
9959
|
+
head?: never;
|
|
9960
|
+
patch?: never;
|
|
9961
|
+
trace?: never;
|
|
9962
|
+
};
|
|
9902
9963
|
"/quiz-questions/{id}": {
|
|
9903
9964
|
parameters: {
|
|
9904
9965
|
query?: never;
|
|
@@ -10111,6 +10172,145 @@ interface paths {
|
|
|
10111
10172
|
patch?: never;
|
|
10112
10173
|
trace?: never;
|
|
10113
10174
|
};
|
|
10175
|
+
"/quiz/with-context": {
|
|
10176
|
+
parameters: {
|
|
10177
|
+
query?: never;
|
|
10178
|
+
header?: never;
|
|
10179
|
+
path?: never;
|
|
10180
|
+
cookie?: never;
|
|
10181
|
+
};
|
|
10182
|
+
/**
|
|
10183
|
+
* List quizzes with course/module/category context
|
|
10184
|
+
* @description Retrieve a paginated list of quizzes, each enriched with the course, module and category it belongs to. `context` is null for standalone quizzes.
|
|
10185
|
+
*/
|
|
10186
|
+
get: {
|
|
10187
|
+
parameters: {
|
|
10188
|
+
query?: {
|
|
10189
|
+
/** @description Filter by quiz title */
|
|
10190
|
+
title?: string;
|
|
10191
|
+
/** @description Filter by active status */
|
|
10192
|
+
isActive?: boolean;
|
|
10193
|
+
/** @description Filter by creator user ID */
|
|
10194
|
+
createdBy?: string;
|
|
10195
|
+
/** @description Search in title */
|
|
10196
|
+
search?: string;
|
|
10197
|
+
/** @description Page number */
|
|
10198
|
+
page?: number;
|
|
10199
|
+
/** @description Items per page */
|
|
10200
|
+
limit?: number;
|
|
10201
|
+
};
|
|
10202
|
+
header?: never;
|
|
10203
|
+
path?: never;
|
|
10204
|
+
cookie?: never;
|
|
10205
|
+
};
|
|
10206
|
+
requestBody?: never;
|
|
10207
|
+
responses: {
|
|
10208
|
+
/** @description List of quizzes with context */
|
|
10209
|
+
200: {
|
|
10210
|
+
headers: {
|
|
10211
|
+
[name: string]: unknown;
|
|
10212
|
+
};
|
|
10213
|
+
content: {
|
|
10214
|
+
"application/json": {
|
|
10215
|
+
/** @example success */
|
|
10216
|
+
status?: string;
|
|
10217
|
+
data?: (components["schemas"]["Quiz"] & {
|
|
10218
|
+
context?: {
|
|
10219
|
+
course?: {
|
|
10220
|
+
id?: string;
|
|
10221
|
+
title?: string;
|
|
10222
|
+
} | null;
|
|
10223
|
+
module?: {
|
|
10224
|
+
id?: string;
|
|
10225
|
+
title?: string;
|
|
10226
|
+
} | null;
|
|
10227
|
+
category?: {
|
|
10228
|
+
id?: string;
|
|
10229
|
+
name?: string;
|
|
10230
|
+
color?: string | null;
|
|
10231
|
+
} | null;
|
|
10232
|
+
} | null;
|
|
10233
|
+
})[];
|
|
10234
|
+
meta?: components["schemas"]["PaginationMeta"];
|
|
10235
|
+
};
|
|
10236
|
+
};
|
|
10237
|
+
};
|
|
10238
|
+
401: components["responses"]["Unauthorized"];
|
|
10239
|
+
500: components["responses"]["ServerError"];
|
|
10240
|
+
};
|
|
10241
|
+
};
|
|
10242
|
+
put?: never;
|
|
10243
|
+
post?: never;
|
|
10244
|
+
delete?: never;
|
|
10245
|
+
options?: never;
|
|
10246
|
+
head?: never;
|
|
10247
|
+
patch?: never;
|
|
10248
|
+
trace?: never;
|
|
10249
|
+
};
|
|
10250
|
+
"/quiz/generate-questions": {
|
|
10251
|
+
parameters: {
|
|
10252
|
+
query?: never;
|
|
10253
|
+
header?: never;
|
|
10254
|
+
path?: never;
|
|
10255
|
+
cookie?: never;
|
|
10256
|
+
};
|
|
10257
|
+
get?: never;
|
|
10258
|
+
put?: never;
|
|
10259
|
+
/**
|
|
10260
|
+
* Generate quiz questions with AI
|
|
10261
|
+
* @description Gera perguntas a partir de um texto base via IA. Não persiste — apenas devolve.
|
|
10262
|
+
*/
|
|
10263
|
+
post: {
|
|
10264
|
+
parameters: {
|
|
10265
|
+
query?: never;
|
|
10266
|
+
header?: never;
|
|
10267
|
+
path?: never;
|
|
10268
|
+
cookie?: never;
|
|
10269
|
+
};
|
|
10270
|
+
requestBody: {
|
|
10271
|
+
content: {
|
|
10272
|
+
"application/json": {
|
|
10273
|
+
text: string;
|
|
10274
|
+
numQuestions: number;
|
|
10275
|
+
difficulty?: "facil" | "normal" | "dificil";
|
|
10276
|
+
existingQuestions?: string[];
|
|
10277
|
+
model?: string;
|
|
10278
|
+
};
|
|
10279
|
+
};
|
|
10280
|
+
};
|
|
10281
|
+
responses: {
|
|
10282
|
+
/** @description Generated questions */
|
|
10283
|
+
200: {
|
|
10284
|
+
headers: {
|
|
10285
|
+
[name: string]: unknown;
|
|
10286
|
+
};
|
|
10287
|
+
content: {
|
|
10288
|
+
"application/json": {
|
|
10289
|
+
/** @example success */
|
|
10290
|
+
status?: string;
|
|
10291
|
+
data?: {
|
|
10292
|
+
question_text: string;
|
|
10293
|
+
question_type: "multiple_choice" | "true_false";
|
|
10294
|
+
points: number;
|
|
10295
|
+
options: {
|
|
10296
|
+
text: string;
|
|
10297
|
+
is_correct: boolean;
|
|
10298
|
+
}[];
|
|
10299
|
+
}[];
|
|
10300
|
+
};
|
|
10301
|
+
};
|
|
10302
|
+
};
|
|
10303
|
+
400: components["responses"]["BadRequest"];
|
|
10304
|
+
401: components["responses"]["Unauthorized"];
|
|
10305
|
+
500: components["responses"]["ServerError"];
|
|
10306
|
+
};
|
|
10307
|
+
};
|
|
10308
|
+
delete?: never;
|
|
10309
|
+
options?: never;
|
|
10310
|
+
head?: never;
|
|
10311
|
+
patch?: never;
|
|
10312
|
+
trace?: never;
|
|
10313
|
+
};
|
|
10114
10314
|
"/quiz/{id}": {
|
|
10115
10315
|
parameters: {
|
|
10116
10316
|
query?: never;
|
|
@@ -22867,6 +23067,9 @@ type GetQuizzesParams = {
|
|
|
22867
23067
|
page?: number;
|
|
22868
23068
|
limit?: number;
|
|
22869
23069
|
};
|
|
23070
|
+
type GetQuizzesWithContextParams = paths['/quiz/with-context']['get']['parameters']['query'];
|
|
23071
|
+
type GenerateQuizQuestionsBody = paths['/quiz/generate-questions']['post']['requestBody']['content']['application/json'];
|
|
23072
|
+
type BulkCreateQuizQuestionsBody = paths['/quiz-questions/bulk']['post']['requestBody']['content']['application/json'];
|
|
22870
23073
|
type GetQuizQuestionsParams = paths['/quiz-questions']['get']['parameters']['query'];
|
|
22871
23074
|
type GetQuizQuestionAnswersParams = paths['/quiz-question-answers']['get']['parameters']['query'];
|
|
22872
23075
|
type GetQuizAttemptsParams = paths['/quiz-attempts']['get']['parameters']['query'];
|
|
@@ -22912,6 +23115,125 @@ declare function createQuizService(apiClient: AcademeApiClient): {
|
|
|
22912
23115
|
query: GetQuizzesParams | undefined;
|
|
22913
23116
|
};
|
|
22914
23117
|
}, `${string}/${string}`>>;
|
|
23118
|
+
/**
|
|
23119
|
+
* List quizzes enriched with their course/module/category context.
|
|
23120
|
+
* Tailored for the backoffice listing.
|
|
23121
|
+
*/
|
|
23122
|
+
getAllWithContext(params?: GetQuizzesWithContextParams): Promise<openapi_fetch.FetchResponse<{
|
|
23123
|
+
parameters: {
|
|
23124
|
+
query?: {
|
|
23125
|
+
title?: string;
|
|
23126
|
+
isActive?: boolean;
|
|
23127
|
+
createdBy?: string;
|
|
23128
|
+
search?: string;
|
|
23129
|
+
page?: number;
|
|
23130
|
+
limit?: number;
|
|
23131
|
+
};
|
|
23132
|
+
header?: never;
|
|
23133
|
+
path?: never;
|
|
23134
|
+
cookie?: never;
|
|
23135
|
+
};
|
|
23136
|
+
requestBody?: never;
|
|
23137
|
+
responses: {
|
|
23138
|
+
200: {
|
|
23139
|
+
headers: {
|
|
23140
|
+
[name: string]: unknown;
|
|
23141
|
+
};
|
|
23142
|
+
content: {
|
|
23143
|
+
"application/json": {
|
|
23144
|
+
status?: string;
|
|
23145
|
+
data?: (components["schemas"]["Quiz"] & {
|
|
23146
|
+
context?: {
|
|
23147
|
+
course?: {
|
|
23148
|
+
id?: string;
|
|
23149
|
+
title?: string;
|
|
23150
|
+
} | null;
|
|
23151
|
+
module?: {
|
|
23152
|
+
id?: string;
|
|
23153
|
+
title?: string;
|
|
23154
|
+
} | null;
|
|
23155
|
+
category?: {
|
|
23156
|
+
id?: string;
|
|
23157
|
+
name?: string;
|
|
23158
|
+
color?: string | null;
|
|
23159
|
+
} | null;
|
|
23160
|
+
} | null;
|
|
23161
|
+
})[];
|
|
23162
|
+
meta?: components["schemas"]["PaginationMeta"];
|
|
23163
|
+
};
|
|
23164
|
+
};
|
|
23165
|
+
};
|
|
23166
|
+
401: components["responses"]["Unauthorized"];
|
|
23167
|
+
500: components["responses"]["ServerError"];
|
|
23168
|
+
};
|
|
23169
|
+
}, {
|
|
23170
|
+
params: {
|
|
23171
|
+
query: {
|
|
23172
|
+
title?: string;
|
|
23173
|
+
isActive?: boolean;
|
|
23174
|
+
createdBy?: string;
|
|
23175
|
+
search?: string;
|
|
23176
|
+
page?: number;
|
|
23177
|
+
limit?: number;
|
|
23178
|
+
} | undefined;
|
|
23179
|
+
};
|
|
23180
|
+
}, `${string}/${string}`>>;
|
|
23181
|
+
/**
|
|
23182
|
+
* Generate quiz questions from a base text using AI.
|
|
23183
|
+
* The OpenRouter key lives only on the server — this just calls the
|
|
23184
|
+
* authenticated backend endpoint.
|
|
23185
|
+
*/
|
|
23186
|
+
generateQuestions(body: GenerateQuizQuestionsBody): Promise<openapi_fetch.FetchResponse<{
|
|
23187
|
+
parameters: {
|
|
23188
|
+
query?: never;
|
|
23189
|
+
header?: never;
|
|
23190
|
+
path?: never;
|
|
23191
|
+
cookie?: never;
|
|
23192
|
+
};
|
|
23193
|
+
requestBody: {
|
|
23194
|
+
content: {
|
|
23195
|
+
"application/json": {
|
|
23196
|
+
text: string;
|
|
23197
|
+
numQuestions: number;
|
|
23198
|
+
difficulty?: "facil" | "normal" | "dificil";
|
|
23199
|
+
existingQuestions?: string[];
|
|
23200
|
+
model?: string;
|
|
23201
|
+
};
|
|
23202
|
+
};
|
|
23203
|
+
};
|
|
23204
|
+
responses: {
|
|
23205
|
+
200: {
|
|
23206
|
+
headers: {
|
|
23207
|
+
[name: string]: unknown;
|
|
23208
|
+
};
|
|
23209
|
+
content: {
|
|
23210
|
+
"application/json": {
|
|
23211
|
+
status?: string;
|
|
23212
|
+
data?: {
|
|
23213
|
+
question_text: string;
|
|
23214
|
+
question_type: "multiple_choice" | "true_false";
|
|
23215
|
+
points: number;
|
|
23216
|
+
options: {
|
|
23217
|
+
text: string;
|
|
23218
|
+
is_correct: boolean;
|
|
23219
|
+
}[];
|
|
23220
|
+
}[];
|
|
23221
|
+
};
|
|
23222
|
+
};
|
|
23223
|
+
};
|
|
23224
|
+
400: components["responses"]["BadRequest"];
|
|
23225
|
+
401: components["responses"]["Unauthorized"];
|
|
23226
|
+
500: components["responses"]["ServerError"];
|
|
23227
|
+
};
|
|
23228
|
+
}, {
|
|
23229
|
+
body: {
|
|
23230
|
+
text: string;
|
|
23231
|
+
numQuestions: number;
|
|
23232
|
+
difficulty?: "facil" | "normal" | "dificil";
|
|
23233
|
+
existingQuestions?: string[];
|
|
23234
|
+
model?: string;
|
|
23235
|
+
};
|
|
23236
|
+
}, `${string}/${string}`>>;
|
|
22915
23237
|
/**
|
|
22916
23238
|
* Get quiz by ID
|
|
22917
23239
|
*/
|
|
@@ -23202,6 +23524,62 @@ declare function createQuizService(apiClient: AcademeApiClient): {
|
|
|
23202
23524
|
points?: number;
|
|
23203
23525
|
};
|
|
23204
23526
|
}, `${string}/${string}`>>;
|
|
23527
|
+
/**
|
|
23528
|
+
* Bulk create quiz questions (with their answers) for a quiz.
|
|
23529
|
+
*/
|
|
23530
|
+
bulkCreateQuestions(body: BulkCreateQuizQuestionsBody): Promise<openapi_fetch.FetchResponse<{
|
|
23531
|
+
parameters: {
|
|
23532
|
+
query?: never;
|
|
23533
|
+
header?: never;
|
|
23534
|
+
path?: never;
|
|
23535
|
+
cookie?: never;
|
|
23536
|
+
};
|
|
23537
|
+
requestBody: {
|
|
23538
|
+
content: {
|
|
23539
|
+
"application/json": {
|
|
23540
|
+
quizId: string;
|
|
23541
|
+
questions: {
|
|
23542
|
+
text: string;
|
|
23543
|
+
type: "multiple_choice" | "true_false" | "open";
|
|
23544
|
+
points?: number;
|
|
23545
|
+
options?: {
|
|
23546
|
+
text: string;
|
|
23547
|
+
is_correct: boolean;
|
|
23548
|
+
}[];
|
|
23549
|
+
}[];
|
|
23550
|
+
};
|
|
23551
|
+
};
|
|
23552
|
+
};
|
|
23553
|
+
responses: {
|
|
23554
|
+
201: {
|
|
23555
|
+
headers: {
|
|
23556
|
+
[name: string]: unknown;
|
|
23557
|
+
};
|
|
23558
|
+
content: {
|
|
23559
|
+
"application/json": {
|
|
23560
|
+
status?: string;
|
|
23561
|
+
data?: components["schemas"]["QuizQuestion"][];
|
|
23562
|
+
};
|
|
23563
|
+
};
|
|
23564
|
+
};
|
|
23565
|
+
400: components["responses"]["BadRequest"];
|
|
23566
|
+
401: components["responses"]["Unauthorized"];
|
|
23567
|
+
500: components["responses"]["ServerError"];
|
|
23568
|
+
};
|
|
23569
|
+
}, {
|
|
23570
|
+
body: {
|
|
23571
|
+
quizId: string;
|
|
23572
|
+
questions: {
|
|
23573
|
+
text: string;
|
|
23574
|
+
type: "multiple_choice" | "true_false" | "open";
|
|
23575
|
+
points?: number;
|
|
23576
|
+
options?: {
|
|
23577
|
+
text: string;
|
|
23578
|
+
is_correct: boolean;
|
|
23579
|
+
}[];
|
|
23580
|
+
}[];
|
|
23581
|
+
};
|
|
23582
|
+
}, `${string}/${string}`>>;
|
|
23205
23583
|
/**
|
|
23206
23584
|
* Update quiz question
|
|
23207
23585
|
*/
|
package/dist/index.esm.js
CHANGED
|
@@ -5381,6 +5381,27 @@ function createQuizService(apiClient) {
|
|
|
5381
5381
|
},
|
|
5382
5382
|
});
|
|
5383
5383
|
},
|
|
5384
|
+
/**
|
|
5385
|
+
* List quizzes enriched with their course/module/category context.
|
|
5386
|
+
* Tailored for the backoffice listing.
|
|
5387
|
+
*/
|
|
5388
|
+
getAllWithContext(params) {
|
|
5389
|
+
return apiClient.GET('/quiz/with-context', {
|
|
5390
|
+
params: {
|
|
5391
|
+
query: params,
|
|
5392
|
+
},
|
|
5393
|
+
});
|
|
5394
|
+
},
|
|
5395
|
+
/**
|
|
5396
|
+
* Generate quiz questions from a base text using AI.
|
|
5397
|
+
* The OpenRouter key lives only on the server — this just calls the
|
|
5398
|
+
* authenticated backend endpoint.
|
|
5399
|
+
*/
|
|
5400
|
+
generateQuestions(body) {
|
|
5401
|
+
return apiClient.POST('/quiz/generate-questions', {
|
|
5402
|
+
body,
|
|
5403
|
+
});
|
|
5404
|
+
},
|
|
5384
5405
|
/**
|
|
5385
5406
|
* Get quiz by ID
|
|
5386
5407
|
*/
|
|
@@ -5443,6 +5464,14 @@ function createQuizService(apiClient) {
|
|
|
5443
5464
|
body: data,
|
|
5444
5465
|
});
|
|
5445
5466
|
},
|
|
5467
|
+
/**
|
|
5468
|
+
* Bulk create quiz questions (with their answers) for a quiz.
|
|
5469
|
+
*/
|
|
5470
|
+
bulkCreateQuestions(body) {
|
|
5471
|
+
return apiClient.POST('/quiz-questions/bulk', {
|
|
5472
|
+
body,
|
|
5473
|
+
});
|
|
5474
|
+
},
|
|
5446
5475
|
/**
|
|
5447
5476
|
* Update quiz question
|
|
5448
5477
|
*/
|