academe-kit 0.12.0 → 0.12.1

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
@@ -2503,6 +2503,7 @@ interface paths {
2503
2503
  * Add a step to the challenge
2504
2504
  * @description Polymorphic validation:
2505
2505
  * - When step.type=tutorial, tutorialVideoUrl is required
2506
+ * - When step.type=redirect, redirectUrl is required
2506
2507
  * - The course of a step is determined by the parent challenge's courseId.
2507
2508
  * Optionally, courseModuleId pinpoints a specific module within that course.
2508
2509
  * - tutorial fields are optional on any step type.
@@ -2533,6 +2534,8 @@ interface paths {
2533
2534
  tutorialTitle?: string;
2534
2535
  tutorialDescription?: string;
2535
2536
  tutorialVideoUrl?: string;
2537
+ /** @description Required when parent step type=redirect */
2538
+ redirectUrl?: string;
2536
2539
  /** @default true */
2537
2540
  isActive?: boolean;
2538
2541
  };
@@ -9805,6 +9808,69 @@ interface paths {
9805
9808
  };
9806
9809
  trace?: never;
9807
9810
  };
9811
+ "/quiz-questions/bulk": {
9812
+ parameters: {
9813
+ query?: never;
9814
+ header?: never;
9815
+ path?: never;
9816
+ cookie?: never;
9817
+ };
9818
+ get?: never;
9819
+ put?: never;
9820
+ /**
9821
+ * Bulk create quiz questions
9822
+ * @description Cria várias perguntas (com suas respostas) de uma vez para um quiz. A ordem é atribuída sequencialmente a partir da última pergunta existente.
9823
+ */
9824
+ post: {
9825
+ parameters: {
9826
+ query?: never;
9827
+ header?: never;
9828
+ path?: never;
9829
+ cookie?: never;
9830
+ };
9831
+ requestBody: {
9832
+ content: {
9833
+ "application/json": {
9834
+ /** Format: uuid */
9835
+ quizId: string;
9836
+ questions: {
9837
+ text: string;
9838
+ /** @enum {string} */
9839
+ type: "multiple_choice" | "true_false" | "open";
9840
+ points?: number;
9841
+ options?: {
9842
+ text?: string;
9843
+ is_correct?: boolean;
9844
+ }[];
9845
+ }[];
9846
+ };
9847
+ };
9848
+ };
9849
+ responses: {
9850
+ /** @description Perguntas criadas */
9851
+ 201: {
9852
+ headers: {
9853
+ [name: string]: unknown;
9854
+ };
9855
+ content: {
9856
+ "application/json": {
9857
+ /** @example success */
9858
+ status?: string;
9859
+ data?: components["schemas"]["QuizQuestion"][];
9860
+ };
9861
+ };
9862
+ };
9863
+ 400: components["responses"]["BadRequest"];
9864
+ 401: components["responses"]["Unauthorized"];
9865
+ 500: components["responses"]["ServerError"];
9866
+ };
9867
+ };
9868
+ delete?: never;
9869
+ options?: never;
9870
+ head?: never;
9871
+ patch?: never;
9872
+ trace?: never;
9873
+ };
9808
9874
  "/quiz-questions": {
9809
9875
  parameters: {
9810
9876
  query?: never;
@@ -9899,67 +9965,6 @@ interface paths {
9899
9965
  patch?: never;
9900
9966
  trace?: never;
9901
9967
  };
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
- };
9963
9968
  "/quiz-questions/{id}": {
9964
9969
  parameters: {
9965
9970
  query?: never;
@@ -10181,7 +10186,7 @@ interface paths {
10181
10186
  };
10182
10187
  /**
10183
10188
  * 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.
10189
+ * @description Retrieve a paginated list of quizzes, each enriched with the course, module and category it belongs to. The relation is resolved on the server (Course.quizId / CourseModule.quizId), so consumers don't need to load every course to build the link map. `context` is null for standalone quizzes.
10185
10190
  */
10186
10191
  get: {
10187
10192
  parameters: {
@@ -10217,16 +10222,20 @@ interface paths {
10217
10222
  data?: (components["schemas"]["Quiz"] & {
10218
10223
  context?: {
10219
10224
  course?: {
10225
+ /** Format: uuid */
10220
10226
  id?: string;
10221
10227
  title?: string;
10222
10228
  } | null;
10223
10229
  module?: {
10230
+ /** Format: uuid */
10224
10231
  id?: string;
10225
10232
  title?: string;
10226
10233
  } | null;
10227
10234
  category?: {
10235
+ /** Format: uuid */
10228
10236
  id?: string;
10229
10237
  name?: string;
10238
+ /** @example #44bd32 */
10230
10239
  color?: string | null;
10231
10240
  } | null;
10232
10241
  } | null;
@@ -10258,7 +10267,7 @@ interface paths {
10258
10267
  put?: never;
10259
10268
  /**
10260
10269
  * Generate quiz questions with AI
10261
- * @description Gera perguntas a partir de um texto base via IA. Não persiste — apenas devolve.
10270
+ * @description Gera perguntas de quiz a partir de um texto base usando IA (OpenRouter). NÃO persiste nada — apenas devolve as perguntas geradas para revisão no frontend. A chave da IA vive apenas no servidor.
10262
10271
  */
10263
10272
  post: {
10264
10273
  parameters: {
@@ -10270,16 +10279,23 @@ interface paths {
10270
10279
  requestBody: {
10271
10280
  content: {
10272
10281
  "application/json": {
10282
+ /** @description Texto base para gerar as perguntas */
10273
10283
  text: string;
10274
10284
  numQuestions: number;
10285
+ /**
10286
+ * @default normal
10287
+ * @enum {string}
10288
+ */
10275
10289
  difficulty?: "facil" | "normal" | "dificil";
10290
+ /** @description Textos de perguntas já existentes (para não repetir) */
10276
10291
  existingQuestions?: string[];
10292
+ /** @description Modelo de IA a usar (OpenRouter); default do servidor quando omitido */
10277
10293
  model?: string;
10278
10294
  };
10279
10295
  };
10280
10296
  };
10281
10297
  responses: {
10282
- /** @description Generated questions */
10298
+ /** @description Perguntas geradas */
10283
10299
  200: {
10284
10300
  headers: {
10285
10301
  [name: string]: unknown;
@@ -10289,12 +10305,13 @@ interface paths {
10289
10305
  /** @example success */
10290
10306
  status?: string;
10291
10307
  data?: {
10292
- question_text: string;
10293
- question_type: "multiple_choice" | "true_false";
10294
- points: number;
10295
- options: {
10296
- text: string;
10297
- is_correct: boolean;
10308
+ question_text?: string;
10309
+ /** @enum {string} */
10310
+ question_type?: "multiple_choice" | "true_false";
10311
+ points?: number;
10312
+ options?: {
10313
+ text?: string;
10314
+ is_correct?: boolean;
10298
10315
  }[];
10299
10316
  }[];
10300
10317
  };
@@ -11996,7 +12013,7 @@ interface paths {
11996
12013
  parameters: {
11997
12014
  query?: {
11998
12015
  /** @description Filter by step type */
11999
- type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
12016
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
12000
12017
  /** @description Filter by active status */
12001
12018
  isActive?: boolean;
12002
12019
  };
@@ -12045,7 +12062,7 @@ interface paths {
12045
12062
  /** @example play-circle */
12046
12063
  icon: string;
12047
12064
  /** @enum {string} */
12048
- type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
12065
+ type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
12049
12066
  /** @default true */
12050
12067
  isActive?: boolean;
12051
12068
  };
@@ -12172,7 +12189,7 @@ interface paths {
12172
12189
  color?: string;
12173
12190
  icon?: string;
12174
12191
  /** @enum {string} */
12175
- type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
12192
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
12176
12193
  isActive?: boolean;
12177
12194
  };
12178
12195
  };
@@ -15797,6 +15814,11 @@ interface components {
15797
15814
  id?: string;
15798
15815
  /** @example Essential Skills */
15799
15816
  name?: string;
15817
+ /**
15818
+ * @description Hex color code for backoffice display. Null when not set.
15819
+ * @example #44bd32
15820
+ */
15821
+ color?: string | null;
15800
15822
  /** Format: date-time */
15801
15823
  createdAt?: string;
15802
15824
  /** Format: date-time */
@@ -16068,7 +16090,7 @@ interface components {
16068
16090
  /** @example play-circle */
16069
16091
  icon?: string;
16070
16092
  /** @enum {string} */
16071
- type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
16093
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
16072
16094
  /** @example true */
16073
16095
  isActive?: boolean;
16074
16096
  /** Format: date-time */
@@ -16166,6 +16188,8 @@ interface components {
16166
16188
  tutorialDescription?: string | null;
16167
16189
  /** @description Obrigatório quando step type=tutorial */
16168
16190
  tutorialVideoUrl?: string | null;
16191
+ /** @description Obrigatório quando step type=redirect. URL para onde o aluno é redirecionado ao clicar na etapa. */
16192
+ redirectUrl?: string | null;
16169
16193
  isActive?: boolean;
16170
16194
  /** Format: date-time */
16171
16195
  createdAt?: string;
@@ -16295,7 +16319,10 @@ interface components {
16295
16319
  * @example Introdução a IA
16296
16320
  */
16297
16321
  courseModuleName?: string | null;
16298
- /** @description URL de redirecionamento desta etapa (apenas quando type=redirect) */
16322
+ /**
16323
+ * @description URL de redirecionamento desta etapa (apenas quando type=redirect)
16324
+ * @example https://exemplo.com/atividade
16325
+ */
16299
16326
  redirectUrl?: string | null;
16300
16327
  };
16301
16328
  /** @description Desafio da jornada com suas etapas e status computados */
@@ -23212,12 +23239,12 @@ declare function createQuizService(apiClient: AcademeApiClient): {
23212
23239
  "application/json": {
23213
23240
  status?: string;
23214
23241
  data?: {
23215
- question_text: string;
23216
- question_type: "multiple_choice" | "true_false";
23217
- points: number;
23218
- options: {
23219
- text: string;
23220
- is_correct: boolean;
23242
+ question_text?: string;
23243
+ question_type?: "multiple_choice" | "true_false";
23244
+ points?: number;
23245
+ options?: {
23246
+ text?: string;
23247
+ is_correct?: boolean;
23221
23248
  }[];
23222
23249
  }[];
23223
23250
  };
@@ -23545,8 +23572,8 @@ declare function createQuizService(apiClient: AcademeApiClient): {
23545
23572
  type: "multiple_choice" | "true_false" | "open";
23546
23573
  points?: number;
23547
23574
  options?: {
23548
- text: string;
23549
- is_correct: boolean;
23575
+ text?: string;
23576
+ is_correct?: boolean;
23550
23577
  }[];
23551
23578
  }[];
23552
23579
  };
@@ -23576,8 +23603,8 @@ declare function createQuizService(apiClient: AcademeApiClient): {
23576
23603
  type: "multiple_choice" | "true_false" | "open";
23577
23604
  points?: number;
23578
23605
  options?: {
23579
- text: string;
23580
- is_correct: boolean;
23606
+ text?: string;
23607
+ is_correct?: boolean;
23581
23608
  }[];
23582
23609
  }[];
23583
23610
  };
@@ -26639,6 +26666,7 @@ declare function createChallengeService(apiClient: AcademeApiClient): {
26639
26666
  tutorialTitle?: string;
26640
26667
  tutorialDescription?: string;
26641
26668
  tutorialVideoUrl?: string;
26669
+ redirectUrl?: string;
26642
26670
  isActive?: boolean;
26643
26671
  };
26644
26672
  };
@@ -26673,6 +26701,7 @@ declare function createChallengeService(apiClient: AcademeApiClient): {
26673
26701
  tutorialTitle?: string;
26674
26702
  tutorialDescription?: string;
26675
26703
  tutorialVideoUrl?: string;
26704
+ redirectUrl?: string;
26676
26705
  isActive?: boolean;
26677
26706
  };
26678
26707
  }, `${string}/${string}`>>;
@@ -27036,7 +27065,7 @@ declare function createStepService(apiClient: AcademeApiClient): {
27036
27065
  getAll(params?: GetStepsParams): Promise<openapi_fetch.FetchResponse<{
27037
27066
  parameters: {
27038
27067
  query?: {
27039
- type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
27068
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
27040
27069
  isActive?: boolean;
27041
27070
  };
27042
27071
  header?: never;
@@ -27062,7 +27091,7 @@ declare function createStepService(apiClient: AcademeApiClient): {
27062
27091
  }, {
27063
27092
  params: {
27064
27093
  query: {
27065
- type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
27094
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
27066
27095
  isActive?: boolean;
27067
27096
  } | undefined;
27068
27097
  };
@@ -27120,7 +27149,7 @@ declare function createStepService(apiClient: AcademeApiClient): {
27120
27149
  name: string;
27121
27150
  color: string;
27122
27151
  icon: string;
27123
- type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
27152
+ type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
27124
27153
  isActive?: boolean;
27125
27154
  };
27126
27155
  };
@@ -27146,7 +27175,7 @@ declare function createStepService(apiClient: AcademeApiClient): {
27146
27175
  name: string;
27147
27176
  color: string;
27148
27177
  icon: string;
27149
- type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
27178
+ type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
27150
27179
  isActive?: boolean;
27151
27180
  };
27152
27181
  }, `${string}/${string}`>>;
@@ -27168,7 +27197,7 @@ declare function createStepService(apiClient: AcademeApiClient): {
27168
27197
  name?: string;
27169
27198
  color?: string;
27170
27199
  icon?: string;
27171
- type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
27200
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
27172
27201
  isActive?: boolean;
27173
27202
  };
27174
27203
  };
@@ -27200,7 +27229,7 @@ declare function createStepService(apiClient: AcademeApiClient): {
27200
27229
  name?: string;
27201
27230
  color?: string;
27202
27231
  icon?: string;
27203
- type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
27232
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
27204
27233
  isActive?: boolean;
27205
27234
  };
27206
27235
  }, `${string}/${string}`>>;