academe-kit 0.11.7 → 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
@@ -72,7 +72,7 @@ declare function CosmicStarsCanvas({ containerRef }: CosmicStarsCanvasProps): re
72
72
  type FrameKind = 'sphere' | 'pentagon' | 'hexagonWings' | 'circleLaurel' | 'hexagonRibbon' | 'shieldWings' | 'pentagonCrown';
73
73
 
74
74
  type JourneyStepSize = 'sm' | 'md';
75
- type JourneyStepType = 'challenge' | 'course' | 'tutorial' | 'publication' | 'evaluation' | 'certificate';
75
+ type JourneyStepType = 'challenge' | 'course' | 'tutorial' | 'publication' | 'evaluation' | 'certificate' | 'redirect';
76
76
  interface JourneyStepProps {
77
77
  color?: string;
78
78
  stepType?: JourneyStepType;
@@ -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;
@@ -16263,7 +16287,7 @@ interface components {
16263
16287
  * @example course
16264
16288
  * @enum {string}
16265
16289
  */
16266
- type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
16290
+ type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
16267
16291
  /**
16268
16292
  * @description Cor hex do step catalog
16269
16293
  * @example #8030D8
@@ -16295,6 +16319,11 @@ interface components {
16295
16319
  * @example Introdução a IA
16296
16320
  */
16297
16321
  courseModuleName?: string | null;
16322
+ /**
16323
+ * @description URL de redirecionamento desta etapa (apenas quando type=redirect)
16324
+ * @example https://exemplo.com/atividade
16325
+ */
16326
+ redirectUrl?: string | null;
16298
16327
  };
16299
16328
  /** @description Desafio da jornada com suas etapas e status computados */
16300
16329
  JourneyChallengeView: {
@@ -23210,12 +23239,12 @@ declare function createQuizService(apiClient: AcademeApiClient): {
23210
23239
  "application/json": {
23211
23240
  status?: string;
23212
23241
  data?: {
23213
- question_text: string;
23214
- question_type: "multiple_choice" | "true_false";
23215
- points: number;
23216
- options: {
23217
- text: string;
23218
- 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;
23219
23248
  }[];
23220
23249
  }[];
23221
23250
  };
@@ -23543,8 +23572,8 @@ declare function createQuizService(apiClient: AcademeApiClient): {
23543
23572
  type: "multiple_choice" | "true_false" | "open";
23544
23573
  points?: number;
23545
23574
  options?: {
23546
- text: string;
23547
- is_correct: boolean;
23575
+ text?: string;
23576
+ is_correct?: boolean;
23548
23577
  }[];
23549
23578
  }[];
23550
23579
  };
@@ -23574,8 +23603,8 @@ declare function createQuizService(apiClient: AcademeApiClient): {
23574
23603
  type: "multiple_choice" | "true_false" | "open";
23575
23604
  points?: number;
23576
23605
  options?: {
23577
- text: string;
23578
- is_correct: boolean;
23606
+ text?: string;
23607
+ is_correct?: boolean;
23579
23608
  }[];
23580
23609
  }[];
23581
23610
  };
@@ -26637,6 +26666,7 @@ declare function createChallengeService(apiClient: AcademeApiClient): {
26637
26666
  tutorialTitle?: string;
26638
26667
  tutorialDescription?: string;
26639
26668
  tutorialVideoUrl?: string;
26669
+ redirectUrl?: string;
26640
26670
  isActive?: boolean;
26641
26671
  };
26642
26672
  };
@@ -26671,6 +26701,7 @@ declare function createChallengeService(apiClient: AcademeApiClient): {
26671
26701
  tutorialTitle?: string;
26672
26702
  tutorialDescription?: string;
26673
26703
  tutorialVideoUrl?: string;
26704
+ redirectUrl?: string;
26674
26705
  isActive?: boolean;
26675
26706
  };
26676
26707
  }, `${string}/${string}`>>;
@@ -27034,7 +27065,7 @@ declare function createStepService(apiClient: AcademeApiClient): {
27034
27065
  getAll(params?: GetStepsParams): Promise<openapi_fetch.FetchResponse<{
27035
27066
  parameters: {
27036
27067
  query?: {
27037
- type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
27068
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
27038
27069
  isActive?: boolean;
27039
27070
  };
27040
27071
  header?: never;
@@ -27060,7 +27091,7 @@ declare function createStepService(apiClient: AcademeApiClient): {
27060
27091
  }, {
27061
27092
  params: {
27062
27093
  query: {
27063
- type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
27094
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
27064
27095
  isActive?: boolean;
27065
27096
  } | undefined;
27066
27097
  };
@@ -27118,7 +27149,7 @@ declare function createStepService(apiClient: AcademeApiClient): {
27118
27149
  name: string;
27119
27150
  color: string;
27120
27151
  icon: string;
27121
- type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
27152
+ type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
27122
27153
  isActive?: boolean;
27123
27154
  };
27124
27155
  };
@@ -27144,7 +27175,7 @@ declare function createStepService(apiClient: AcademeApiClient): {
27144
27175
  name: string;
27145
27176
  color: string;
27146
27177
  icon: string;
27147
- type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
27178
+ type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
27148
27179
  isActive?: boolean;
27149
27180
  };
27150
27181
  }, `${string}/${string}`>>;
@@ -27166,7 +27197,7 @@ declare function createStepService(apiClient: AcademeApiClient): {
27166
27197
  name?: string;
27167
27198
  color?: string;
27168
27199
  icon?: string;
27169
- type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
27200
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
27170
27201
  isActive?: boolean;
27171
27202
  };
27172
27203
  };
@@ -27198,7 +27229,7 @@ declare function createStepService(apiClient: AcademeApiClient): {
27198
27229
  name?: string;
27199
27230
  color?: string;
27200
27231
  icon?: string;
27201
- type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
27232
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate" | "redirect";
27202
27233
  isActive?: boolean;
27203
27234
  };
27204
27235
  }, `${string}/${string}`>>;
package/dist/index.esm.js CHANGED
@@ -10739,6 +10739,7 @@ const STEP_TYPE_TO_THEME = {
10739
10739
  publication: 'orange',
10740
10740
  evaluation: 'gold',
10741
10741
  certificate: 'green',
10742
+ redirect: 'blue',
10742
10743
  };
10743
10744
  // Espelha a página de journey do app: todo step é uma esfera 3D, diferenciada
10744
10745
  // apenas por cor (STEP_TYPE_TO_THEME) e ícone. Os frames de polígono seguem
@@ -10750,6 +10751,7 @@ const STEP_TYPE_TO_FRAME = {
10750
10751
  publication: 'sphere',
10751
10752
  evaluation: 'sphere',
10752
10753
  certificate: 'sphere',
10754
+ redirect: 'sphere',
10753
10755
  };
10754
10756
  const INACTIVE_THEME = {
10755
10757
  shadow: '#0a0a0a',