academe-kit 0.9.7 → 0.9.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.
@@ -16,6 +16,7 @@ export { useProtectedAppColors } from "./components/ProtectedApp";
16
16
  export type { AcademeKeycloakContextProps, SecurityProviderProps, KeycloakUser, SecurityContextType, AcademeUser, } from "./context/SecurityProvider/types";
17
17
  export { createAcademeApiClient } from "./services";
18
18
  export type { AcademeApiClient, AcademeServices } from "./services";
19
+ export type { ChallengeUserQuizAttempt, ChallengeUserQuizAttemptsResponse, } from "./services/ChallengeService";
19
20
  export { cn } from "./lib/utils";
20
21
  import "./index.css";
21
22
  import "./styles/globals.css";
@@ -9,7 +9,6 @@ export interface UpdateChallengeStepBody {
9
9
  name?: string;
10
10
  description?: string;
11
11
  index?: number;
12
- courseId?: string;
13
12
  courseModuleId?: string;
14
13
  tutorialTitle?: string;
15
14
  tutorialDescription?: string;
@@ -29,6 +28,35 @@ export interface UpdateEvaluationCriterionBody {
29
28
  description?: string;
30
29
  index?: number;
31
30
  }
31
+ export interface ChallengeUserQuizAttempt {
32
+ challengeStepId: string;
33
+ challengeStepName: string;
34
+ challengeStepIndex: number;
35
+ courseModuleId: string;
36
+ courseModuleTitle: string;
37
+ quizId: string;
38
+ quizTitle: string;
39
+ attempt: {
40
+ id: string;
41
+ score: number;
42
+ passed: boolean;
43
+ startedAt: string;
44
+ completedAt: string | null;
45
+ } | null;
46
+ certificate: {
47
+ id: string;
48
+ certificateNumber: string;
49
+ url: string | null;
50
+ } | null;
51
+ }
52
+ export interface ChallengeUserQuizAttemptsResponse {
53
+ data?: {
54
+ status?: string;
55
+ data?: ChallengeUserQuizAttempt[];
56
+ };
57
+ error?: unknown;
58
+ response: Response;
59
+ }
32
60
  export declare function createChallengeService(apiClient: AcademeApiClient): {
33
61
  /**
34
62
  * List challenges with filters and pagination
@@ -41,6 +69,7 @@ export declare function createChallengeService(apiClient: AcademeApiClient): {
41
69
  isActive?: boolean;
42
70
  templatesOnly?: boolean;
43
71
  search?: string;
72
+ include?: "steps";
44
73
  page?: import("../types/academe-api").components["parameters"]["page"];
45
74
  limit?: import("../types/academe-api").components["parameters"]["limit"];
46
75
  };
@@ -73,6 +102,7 @@ export declare function createChallengeService(apiClient: AcademeApiClient): {
73
102
  isActive?: boolean;
74
103
  templatesOnly?: boolean;
75
104
  search?: string;
105
+ include?: "steps";
76
106
  page?: import("../types/academe-api").components["parameters"]["page"];
77
107
  limit?: import("../types/academe-api").components["parameters"]["limit"];
78
108
  } | undefined;
@@ -137,6 +167,7 @@ export declare function createChallengeService(apiClient: AcademeApiClient): {
137
167
  isGroup?: boolean;
138
168
  maxGroupMembers?: number;
139
169
  isInviteOnly?: boolean;
170
+ courseId: string;
140
171
  institutionId?: string | null;
141
172
  serieId?: string;
142
173
  index?: number;
@@ -175,6 +206,7 @@ export declare function createChallengeService(apiClient: AcademeApiClient): {
175
206
  isGroup?: boolean;
176
207
  maxGroupMembers?: number;
177
208
  isInviteOnly?: boolean;
209
+ courseId: string;
178
210
  institutionId?: string | null;
179
211
  serieId?: string;
180
212
  index?: number;
@@ -208,6 +240,7 @@ export declare function createChallengeService(apiClient: AcademeApiClient): {
208
240
  isGroup?: boolean;
209
241
  maxGroupMembers?: number;
210
242
  isInviteOnly?: boolean;
243
+ courseId?: string;
211
244
  serieId?: string;
212
245
  index?: number;
213
246
  submissionType?: "images" | "videos" | "audio" | "files" | "links";
@@ -248,6 +281,7 @@ export declare function createChallengeService(apiClient: AcademeApiClient): {
248
281
  isGroup?: boolean;
249
282
  maxGroupMembers?: number;
250
283
  isInviteOnly?: boolean;
284
+ courseId?: string;
251
285
  serieId?: string;
252
286
  index?: number;
253
287
  submissionType?: "images" | "videos" | "audio" | "files" | "links";
@@ -334,6 +368,12 @@ export declare function createChallengeService(apiClient: AcademeApiClient): {
334
368
  title?: string;
335
369
  };
336
370
  }, `${string}/${string}`>>;
371
+ /**
372
+ * Get a user's quiz attempts for the quizzes attached to this challenge's
373
+ * course modules (one entry per step with course_module.quiz_id).
374
+ * Defaults to the authenticated user when userId is omitted.
375
+ */
376
+ getUserQuizAttempts(challengeId: string, userId?: string): Promise<ChallengeUserQuizAttemptsResponse>;
337
377
  /**
338
378
  * Add a step to the challenge
339
379
  */
@@ -353,7 +393,6 @@ export declare function createChallengeService(apiClient: AcademeApiClient): {
353
393
  name: string;
354
394
  description?: string;
355
395
  index: number;
356
- courseId?: string;
357
396
  courseModuleId?: string;
358
397
  tutorialTitle?: string;
359
398
  tutorialDescription?: string;
@@ -388,7 +427,6 @@ export declare function createChallengeService(apiClient: AcademeApiClient): {
388
427
  name: string;
389
428
  description?: string;
390
429
  index: number;
391
- courseId?: string;
392
430
  courseModuleId?: string;
393
431
  tutorialTitle?: string;
394
432
  tutorialDescription?: string;
@@ -240,6 +240,7 @@ export declare function createQuizService(apiClient: AcademeApiClient): {
240
240
  search?: string;
241
241
  page?: number;
242
242
  limit?: number;
243
+ randomize?: boolean;
243
244
  };
244
245
  header?: never;
245
246
  path?: never;
@@ -270,6 +271,7 @@ export declare function createQuizService(apiClient: AcademeApiClient): {
270
271
  search?: string;
271
272
  page?: number;
272
273
  limit?: number;
274
+ randomize?: boolean;
273
275
  } | undefined;
274
276
  };
275
277
  }, `${string}/${string}`>>;
@@ -570,6 +570,62 @@ export declare function createReportService(apiClient: AcademeApiClient): {
570
570
  query: GetTopStudentsParams;
571
571
  };
572
572
  }, `${string}/${string}`>>;
573
+ /**
574
+ * Get encourage dashboard for an institution
575
+ * Retorna o payload agregado da tela /new-dashboard:
576
+ * overview, KPIs, licenças (alunos), jornada (cursos), submissões,
577
+ * desempenho por turma, top alunos e top professores.
578
+ *
579
+ * @param id UUID da instituição.
580
+ */
581
+ getEncourageDashboardByInstitution(id: string): Promise<import("openapi-fetch").FetchResponse<{
582
+ parameters: {
583
+ query?: never;
584
+ header?: never;
585
+ path: {
586
+ id: string;
587
+ };
588
+ cookie?: never;
589
+ };
590
+ requestBody?: never;
591
+ responses: {
592
+ 200: {
593
+ headers: {
594
+ [name: string]: unknown;
595
+ };
596
+ content: {
597
+ "application/json": {
598
+ status?: string;
599
+ data?: import("../types/academe-api").components["schemas"]["EncourageDashboardResponse"];
600
+ };
601
+ };
602
+ };
603
+ 400: {
604
+ headers: {
605
+ [name: string]: unknown;
606
+ };
607
+ content?: never;
608
+ };
609
+ 401: {
610
+ headers: {
611
+ [name: string]: unknown;
612
+ };
613
+ content?: never;
614
+ };
615
+ 500: {
616
+ headers: {
617
+ [name: string]: unknown;
618
+ };
619
+ content?: never;
620
+ };
621
+ };
622
+ }, {
623
+ params: {
624
+ path: {
625
+ id: string;
626
+ };
627
+ };
628
+ }, `${string}/${string}`>>;
573
629
  };
574
630
  export type ReportService = ReturnType<typeof createReportService>;
575
631
  export {};
@@ -37,7 +37,14 @@ export declare function createSubmissionService(apiClient: AcademeApiClient): {
37
37
  "application/json": {
38
38
  status?: string;
39
39
  data?: import("../types/academe-api").components["schemas"]["Submission"][];
40
- meta?: import("../types/academe-api").components["schemas"]["PaginationMeta"];
40
+ meta?: import("../types/academe-api").components["schemas"]["PaginationMeta"] & {
41
+ statusCounts?: {
42
+ submitted?: number;
43
+ ai_evaluated?: number;
44
+ approved?: number;
45
+ rejected?: number;
46
+ };
47
+ };
41
48
  };
42
49
  };
43
50
  };