academe-kit 0.16.0 → 0.17.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/dist/index.d.ts CHANGED
@@ -11579,6 +11579,62 @@ interface paths {
11579
11579
  };
11580
11580
  trace?: never;
11581
11581
  };
11582
+ "/quiz-questions/{id}/generate-explanations": {
11583
+ parameters: {
11584
+ query?: never;
11585
+ header?: never;
11586
+ path?: never;
11587
+ cookie?: never;
11588
+ };
11589
+ get?: never;
11590
+ put?: never;
11591
+ /**
11592
+ * Generate answer explanations with AI
11593
+ * @description Preenche via IA a explicação de cada alternativa de uma pergunta que já existe — o backfill dos quizzes criados antes da feature. Sobrescreve as explicações existentes; o backoffice confirma antes de chamar.
11594
+ */
11595
+ post: {
11596
+ parameters: {
11597
+ query?: never;
11598
+ header?: never;
11599
+ path: {
11600
+ id: string;
11601
+ };
11602
+ cookie?: never;
11603
+ };
11604
+ requestBody?: {
11605
+ content: {
11606
+ "application/json": {
11607
+ /** @description Modelo OpenRouter a usar. Omitido, usa o padrão do servidor. */
11608
+ model?: string;
11609
+ };
11610
+ };
11611
+ };
11612
+ responses: {
11613
+ /** @description Pergunta com as alternativas atualizadas */
11614
+ 200: {
11615
+ headers: {
11616
+ [name: string]: unknown;
11617
+ };
11618
+ content: {
11619
+ "application/json": {
11620
+ /** @example success */
11621
+ status?: string;
11622
+ data?: components["schemas"]["QuizQuestion"];
11623
+ };
11624
+ };
11625
+ };
11626
+ 400: components["responses"]["BadRequest"];
11627
+ 401: components["responses"]["Unauthorized"];
11628
+ 404: components["responses"]["NotFound"];
11629
+ 500: components["responses"]["ServerError"];
11630
+ };
11631
+ };
11632
+ delete?: never;
11633
+ options?: never;
11634
+ head?: never;
11635
+ patch?: never;
11636
+ trace?: never;
11637
+ };
11582
11638
  "/quiz-questions/bulk": {
11583
11639
  parameters: {
11584
11640
  query?: never;
@@ -11612,6 +11668,8 @@ interface paths {
11612
11668
  options?: {
11613
11669
  text?: string;
11614
11670
  is_correct?: boolean;
11671
+ /** @description Resumo revelado ao aluno ao confirmar a resposta. */
11672
+ explanation?: string;
11615
11673
  }[];
11616
11674
  }[];
11617
11675
  };
@@ -12083,6 +12141,8 @@ interface paths {
12083
12141
  options?: {
12084
12142
  text?: string;
12085
12143
  is_correct?: boolean;
12144
+ /** @description Resumo revelado ao aluno ao confirmar a resposta. String vazia quando a IA não produziu. */
12145
+ explanation?: string;
12086
12146
  }[];
12087
12147
  }[];
12088
12148
  };
@@ -20456,6 +20516,11 @@ interface components {
20456
20516
  answer?: string;
20457
20517
  /** @example true */
20458
20518
  isCorrect?: boolean;
20519
+ /**
20520
+ * @description Resumo revelado ao aluno ao confirmar a resposta. Na alternativa correta explica o conceito; nas incorretas, o erro que a opção representa. NULL nas perguntas anteriores à feature.
20521
+ * @example O 'S' significa 'Secure' e indica que o protocolo utiliza SSL/TLS.
20522
+ */
20523
+ explanation?: string | null;
20459
20524
  /** Format: date-time */
20460
20525
  createdAt?: string;
20461
20526
  /** Format: date-time */
@@ -20468,10 +20533,14 @@ interface components {
20468
20533
  answer: string;
20469
20534
  /** @example true */
20470
20535
  isCorrect: boolean;
20536
+ /** @description Resumo revelado ao aluno ao confirmar a resposta. String vazia limpa. */
20537
+ explanation?: string;
20471
20538
  };
20472
20539
  UpdateQuizQuestionAnswerDto: {
20473
20540
  answer?: string;
20474
20541
  isCorrect?: boolean;
20542
+ /** @description Resumo revelado ao aluno ao confirmar a resposta. String vazia limpa. */
20543
+ explanation?: string;
20475
20544
  };
20476
20545
  QuizAttempt: {
20477
20546
  /** Format: uuid */
@@ -25658,6 +25727,7 @@ type GetQuizzesParams = {
25658
25727
  type GetQuizzesWithContextParams = paths['/quiz/with-context']['get']['parameters']['query'];
25659
25728
  type GenerateQuizQuestionsBody = paths['/quiz/generate-questions']['post']['requestBody']['content']['application/json'];
25660
25729
  type BulkCreateQuizQuestionsBody = paths['/quiz-questions/bulk']['post']['requestBody']['content']['application/json'];
25730
+ type GenerateQuizExplanationsBody = NonNullable<paths['/quiz-questions/{id}/generate-explanations']['post']['requestBody']>['content']['application/json'];
25661
25731
  type GetQuizQuestionsParams = paths['/quiz-questions']['get']['parameters']['query'];
25662
25732
  type GetQuizQuestionAnswersParams = paths['/quiz-question-answers']['get']['parameters']['query'];
25663
25733
  type GetQuizAttemptsParams = paths['/quiz-attempts']['get']['parameters']['query'];
@@ -25804,6 +25874,7 @@ declare function createQuizService(apiClient: AcademeApiClient): {
25804
25874
  options?: {
25805
25875
  text?: string;
25806
25876
  is_correct?: boolean;
25877
+ explanation?: string;
25807
25878
  }[];
25808
25879
  }[];
25809
25880
  };
@@ -26133,6 +26204,7 @@ declare function createQuizService(apiClient: AcademeApiClient): {
26133
26204
  options?: {
26134
26205
  text?: string;
26135
26206
  is_correct?: boolean;
26207
+ explanation?: string;
26136
26208
  }[];
26137
26209
  }[];
26138
26210
  };
@@ -26164,10 +26236,60 @@ declare function createQuizService(apiClient: AcademeApiClient): {
26164
26236
  options?: {
26165
26237
  text?: string;
26166
26238
  is_correct?: boolean;
26239
+ explanation?: string;
26167
26240
  }[];
26168
26241
  }[];
26169
26242
  };
26170
26243
  }, `${string}/${string}`>>;
26244
+ /**
26245
+ * Generate the explanation of every answer of an existing question, with AI.
26246
+ *
26247
+ * Backfill das perguntas criadas antes de a explicação existir. Sobrescreve
26248
+ * o que houver — confirme com o usuário antes de chamar.
26249
+ */
26250
+ generateQuestionExplanations(id: string, body?: GenerateQuizExplanationsBody): Promise<openapi_fetch.FetchResponse<{
26251
+ parameters: {
26252
+ query?: never;
26253
+ header?: never;
26254
+ path: {
26255
+ id: string;
26256
+ };
26257
+ cookie?: never;
26258
+ };
26259
+ requestBody?: {
26260
+ content: {
26261
+ "application/json": {
26262
+ model?: string;
26263
+ };
26264
+ };
26265
+ };
26266
+ responses: {
26267
+ 200: {
26268
+ headers: {
26269
+ [name: string]: unknown;
26270
+ };
26271
+ content: {
26272
+ "application/json": {
26273
+ status?: string;
26274
+ data?: components["schemas"]["QuizQuestion"];
26275
+ };
26276
+ };
26277
+ };
26278
+ 400: components["responses"]["BadRequest"];
26279
+ 401: components["responses"]["Unauthorized"];
26280
+ 404: components["responses"]["NotFound"];
26281
+ 500: components["responses"]["ServerError"];
26282
+ };
26283
+ }, {
26284
+ params: {
26285
+ path: {
26286
+ id: string;
26287
+ };
26288
+ };
26289
+ body: {
26290
+ model?: string;
26291
+ };
26292
+ }, `${string}/${string}`>>;
26171
26293
  /**
26172
26294
  * Update quiz question
26173
26295
  */
@@ -26365,6 +26487,7 @@ declare function createQuizService(apiClient: AcademeApiClient): {
26365
26487
  questionId: string;
26366
26488
  answer: string;
26367
26489
  isCorrect: boolean;
26490
+ explanation?: string;
26368
26491
  };
26369
26492
  }, `${string}/${string}`>>;
26370
26493
  /**
@@ -26410,6 +26533,7 @@ declare function createQuizService(apiClient: AcademeApiClient): {
26410
26533
  body: {
26411
26534
  answer?: string;
26412
26535
  isCorrect?: boolean;
26536
+ explanation?: string;
26413
26537
  };
26414
26538
  }, `${string}/${string}`>>;
26415
26539
  /**
package/dist/index.esm.js CHANGED
@@ -5515,6 +5515,18 @@ function createQuizService(apiClient) {
5515
5515
  body,
5516
5516
  });
5517
5517
  },
5518
+ /**
5519
+ * Generate the explanation of every answer of an existing question, with AI.
5520
+ *
5521
+ * Backfill das perguntas criadas antes de a explicação existir. Sobrescreve
5522
+ * o que houver — confirme com o usuário antes de chamar.
5523
+ */
5524
+ generateQuestionExplanations(id, body) {
5525
+ return apiClient.POST('/quiz-questions/{id}/generate-explanations', {
5526
+ params: { path: { id } },
5527
+ body: body ?? {},
5528
+ });
5529
+ },
5518
5530
  /**
5519
5531
  * Update quiz question
5520
5532
  */