academe-kit 0.11.5 → 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 +46 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +753 -3
- package/dist/index.esm.js +46 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/AcademeLoading/AcademeLoading.d.ts +9 -2
- package/dist/types/components/AcademeLoading/index.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/services/QuizService.d.ts +178 -0
- package/dist/types/services/SubmissionService.d.ts +29 -0
- package/dist/types/types/academe-api.d.ts +536 -0
- package/package.json +1 -1
|
@@ -27,6 +27,8 @@ export interface AcademeLoadingColors {
|
|
|
27
27
|
/** Círculo branco ("face"). */
|
|
28
28
|
white: string;
|
|
29
29
|
}
|
|
30
|
+
/** Tema visual da vinheta. `light` (default) preserva o fundo claro atual; `dark` usa o fundo escuro da marca. */
|
|
31
|
+
export type AcademeLoadingTheme = "light" | "dark";
|
|
30
32
|
export interface AcademeLoadingProps {
|
|
31
33
|
/** Lado do palco quadrado, em px. Default 320. */
|
|
32
34
|
size?: number;
|
|
@@ -43,9 +45,14 @@ export interface AcademeLoadingProps {
|
|
|
43
45
|
pulseWhileLoading?: boolean;
|
|
44
46
|
/** Chamado ao concluir (após a saída, ou após a vinheta completa). */
|
|
45
47
|
onFinish?: () => void;
|
|
46
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Tema visual base. `light` (default) mantém o fundo claro atual; `dark` aplica
|
|
50
|
+
* a paleta escura da marca. O `colors` ainda sobrescreve qualquer token por cima.
|
|
51
|
+
*/
|
|
52
|
+
theme?: AcademeLoadingTheme;
|
|
53
|
+
/** Sobrescreve tokens de cor (merge com os defaults do tema selecionado). */
|
|
47
54
|
colors?: Partial<AcademeLoadingColors>;
|
|
48
55
|
className?: string;
|
|
49
56
|
style?: React.CSSProperties;
|
|
50
57
|
}
|
|
51
|
-
export declare function AcademeLoading({ size, duration, loading, autoPlay, pulseWhileLoading, onFinish, colors, className, style, }: AcademeLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare function AcademeLoading({ size, duration, loading, autoPlay, pulseWhileLoading, onFinish, theme, colors, className, style, }: AcademeLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { AcademeLoading } from "./AcademeLoading";
|
|
2
|
-
export type { AcademeLoadingProps, AcademeLoadingColors, } from "./AcademeLoading";
|
|
2
|
+
export type { AcademeLoadingProps, AcademeLoadingColors, AcademeLoadingTheme, } from "./AcademeLoading";
|
|
3
3
|
export { LogoA } from "./LogoA";
|
|
4
4
|
export type { LogoAProps } from "./LogoA";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export type { CosmicStarsCanvasProps } from "./components/CosmicStarsCanvas";
|
|
|
12
12
|
export { JourneyStep, JourneyCrystalPin } from "./components/JourneyStep";
|
|
13
13
|
export type { JourneyStepProps, JourneyStepSize, JourneyStepType, JourneyCrystalPinProps, FrameKind, } from "./components/JourneyStep";
|
|
14
14
|
export { AcademeLoading, LogoA } from "./components/AcademeLoading";
|
|
15
|
-
export type { AcademeLoadingProps, AcademeLoadingColors, LogoAProps, } from "./components/AcademeLoading";
|
|
15
|
+
export type { AcademeLoadingProps, AcademeLoadingColors, AcademeLoadingTheme, LogoAProps, } from "./components/AcademeLoading";
|
|
16
16
|
export { AcademeAuthProvider, useAcademeAuth, } from "./context/SecurityProvider";
|
|
17
17
|
export { useProtectedAppColors } from "./components/ProtectedApp";
|
|
18
18
|
export type { AcademeKeycloakContextProps, SecurityProviderProps, KeycloakUser, SecurityContextType, AcademeUser, } from "./context/SecurityProvider/types";
|
|
@@ -18,6 +18,9 @@ type GetQuizzesParams = {
|
|
|
18
18
|
page?: number;
|
|
19
19
|
limit?: number;
|
|
20
20
|
};
|
|
21
|
+
type GetQuizzesWithContextParams = paths['/quiz/with-context']['get']['parameters']['query'];
|
|
22
|
+
type GenerateQuizQuestionsBody = paths['/quiz/generate-questions']['post']['requestBody']['content']['application/json'];
|
|
23
|
+
type BulkCreateQuizQuestionsBody = paths['/quiz-questions/bulk']['post']['requestBody']['content']['application/json'];
|
|
21
24
|
type GetQuizQuestionsParams = paths['/quiz-questions']['get']['parameters']['query'];
|
|
22
25
|
type GetQuizQuestionAnswersParams = paths['/quiz-question-answers']['get']['parameters']['query'];
|
|
23
26
|
type GetQuizAttemptsParams = paths['/quiz-attempts']['get']['parameters']['query'];
|
|
@@ -63,6 +66,125 @@ export declare function createQuizService(apiClient: AcademeApiClient): {
|
|
|
63
66
|
query: GetQuizzesParams | undefined;
|
|
64
67
|
};
|
|
65
68
|
}, `${string}/${string}`>>;
|
|
69
|
+
/**
|
|
70
|
+
* List quizzes enriched with their course/module/category context.
|
|
71
|
+
* Tailored for the backoffice listing.
|
|
72
|
+
*/
|
|
73
|
+
getAllWithContext(params?: GetQuizzesWithContextParams): Promise<import("openapi-fetch").FetchResponse<{
|
|
74
|
+
parameters: {
|
|
75
|
+
query?: {
|
|
76
|
+
title?: string;
|
|
77
|
+
isActive?: boolean;
|
|
78
|
+
createdBy?: string;
|
|
79
|
+
search?: string;
|
|
80
|
+
page?: number;
|
|
81
|
+
limit?: number;
|
|
82
|
+
};
|
|
83
|
+
header?: never;
|
|
84
|
+
path?: never;
|
|
85
|
+
cookie?: never;
|
|
86
|
+
};
|
|
87
|
+
requestBody?: never;
|
|
88
|
+
responses: {
|
|
89
|
+
200: {
|
|
90
|
+
headers: {
|
|
91
|
+
[name: string]: unknown;
|
|
92
|
+
};
|
|
93
|
+
content: {
|
|
94
|
+
"application/json": {
|
|
95
|
+
status?: string;
|
|
96
|
+
data?: (components["schemas"]["Quiz"] & {
|
|
97
|
+
context?: {
|
|
98
|
+
course?: {
|
|
99
|
+
id?: string;
|
|
100
|
+
title?: string;
|
|
101
|
+
} | null;
|
|
102
|
+
module?: {
|
|
103
|
+
id?: string;
|
|
104
|
+
title?: string;
|
|
105
|
+
} | null;
|
|
106
|
+
category?: {
|
|
107
|
+
id?: string;
|
|
108
|
+
name?: string;
|
|
109
|
+
color?: string | null;
|
|
110
|
+
} | null;
|
|
111
|
+
} | null;
|
|
112
|
+
})[];
|
|
113
|
+
meta?: components["schemas"]["PaginationMeta"];
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
401: components["responses"]["Unauthorized"];
|
|
118
|
+
500: components["responses"]["ServerError"];
|
|
119
|
+
};
|
|
120
|
+
}, {
|
|
121
|
+
params: {
|
|
122
|
+
query: {
|
|
123
|
+
title?: string;
|
|
124
|
+
isActive?: boolean;
|
|
125
|
+
createdBy?: string;
|
|
126
|
+
search?: string;
|
|
127
|
+
page?: number;
|
|
128
|
+
limit?: number;
|
|
129
|
+
} | undefined;
|
|
130
|
+
};
|
|
131
|
+
}, `${string}/${string}`>>;
|
|
132
|
+
/**
|
|
133
|
+
* Generate quiz questions from a base text using AI.
|
|
134
|
+
* The OpenRouter key lives only on the server — this just calls the
|
|
135
|
+
* authenticated backend endpoint.
|
|
136
|
+
*/
|
|
137
|
+
generateQuestions(body: GenerateQuizQuestionsBody): Promise<import("openapi-fetch").FetchResponse<{
|
|
138
|
+
parameters: {
|
|
139
|
+
query?: never;
|
|
140
|
+
header?: never;
|
|
141
|
+
path?: never;
|
|
142
|
+
cookie?: never;
|
|
143
|
+
};
|
|
144
|
+
requestBody: {
|
|
145
|
+
content: {
|
|
146
|
+
"application/json": {
|
|
147
|
+
text: string;
|
|
148
|
+
numQuestions: number;
|
|
149
|
+
difficulty?: "facil" | "normal" | "dificil";
|
|
150
|
+
existingQuestions?: string[];
|
|
151
|
+
model?: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
responses: {
|
|
156
|
+
200: {
|
|
157
|
+
headers: {
|
|
158
|
+
[name: string]: unknown;
|
|
159
|
+
};
|
|
160
|
+
content: {
|
|
161
|
+
"application/json": {
|
|
162
|
+
status?: string;
|
|
163
|
+
data?: {
|
|
164
|
+
question_text: string;
|
|
165
|
+
question_type: "multiple_choice" | "true_false";
|
|
166
|
+
points: number;
|
|
167
|
+
options: {
|
|
168
|
+
text: string;
|
|
169
|
+
is_correct: boolean;
|
|
170
|
+
}[];
|
|
171
|
+
}[];
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
400: components["responses"]["BadRequest"];
|
|
176
|
+
401: components["responses"]["Unauthorized"];
|
|
177
|
+
500: components["responses"]["ServerError"];
|
|
178
|
+
};
|
|
179
|
+
}, {
|
|
180
|
+
body: {
|
|
181
|
+
text: string;
|
|
182
|
+
numQuestions: number;
|
|
183
|
+
difficulty?: "facil" | "normal" | "dificil";
|
|
184
|
+
existingQuestions?: string[];
|
|
185
|
+
model?: string;
|
|
186
|
+
};
|
|
187
|
+
}, `${string}/${string}`>>;
|
|
66
188
|
/**
|
|
67
189
|
* Get quiz by ID
|
|
68
190
|
*/
|
|
@@ -353,6 +475,62 @@ export declare function createQuizService(apiClient: AcademeApiClient): {
|
|
|
353
475
|
points?: number;
|
|
354
476
|
};
|
|
355
477
|
}, `${string}/${string}`>>;
|
|
478
|
+
/**
|
|
479
|
+
* Bulk create quiz questions (with their answers) for a quiz.
|
|
480
|
+
*/
|
|
481
|
+
bulkCreateQuestions(body: BulkCreateQuizQuestionsBody): Promise<import("openapi-fetch").FetchResponse<{
|
|
482
|
+
parameters: {
|
|
483
|
+
query?: never;
|
|
484
|
+
header?: never;
|
|
485
|
+
path?: never;
|
|
486
|
+
cookie?: never;
|
|
487
|
+
};
|
|
488
|
+
requestBody: {
|
|
489
|
+
content: {
|
|
490
|
+
"application/json": {
|
|
491
|
+
quizId: string;
|
|
492
|
+
questions: {
|
|
493
|
+
text: string;
|
|
494
|
+
type: "multiple_choice" | "true_false" | "open";
|
|
495
|
+
points?: number;
|
|
496
|
+
options?: {
|
|
497
|
+
text: string;
|
|
498
|
+
is_correct: boolean;
|
|
499
|
+
}[];
|
|
500
|
+
}[];
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
responses: {
|
|
505
|
+
201: {
|
|
506
|
+
headers: {
|
|
507
|
+
[name: string]: unknown;
|
|
508
|
+
};
|
|
509
|
+
content: {
|
|
510
|
+
"application/json": {
|
|
511
|
+
status?: string;
|
|
512
|
+
data?: components["schemas"]["QuizQuestion"][];
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
400: components["responses"]["BadRequest"];
|
|
517
|
+
401: components["responses"]["Unauthorized"];
|
|
518
|
+
500: components["responses"]["ServerError"];
|
|
519
|
+
};
|
|
520
|
+
}, {
|
|
521
|
+
body: {
|
|
522
|
+
quizId: string;
|
|
523
|
+
questions: {
|
|
524
|
+
text: string;
|
|
525
|
+
type: "multiple_choice" | "true_false" | "open";
|
|
526
|
+
points?: number;
|
|
527
|
+
options?: {
|
|
528
|
+
text: string;
|
|
529
|
+
is_correct: boolean;
|
|
530
|
+
}[];
|
|
531
|
+
}[];
|
|
532
|
+
};
|
|
533
|
+
}, `${string}/${string}`>>;
|
|
356
534
|
/**
|
|
357
535
|
* Update quiz question
|
|
358
536
|
*/
|
|
@@ -129,6 +129,11 @@ export declare function createSubmissionService(apiClient: AcademeApiClient): {
|
|
|
129
129
|
institutionId: string;
|
|
130
130
|
groupId?: string;
|
|
131
131
|
description?: string;
|
|
132
|
+
items?: {
|
|
133
|
+
fileId?: string | null;
|
|
134
|
+
url?: string | null;
|
|
135
|
+
index?: number;
|
|
136
|
+
}[];
|
|
132
137
|
};
|
|
133
138
|
};
|
|
134
139
|
};
|
|
@@ -141,6 +146,30 @@ export declare function createSubmissionService(apiClient: AcademeApiClient): {
|
|
|
141
146
|
"application/json": {
|
|
142
147
|
status?: string;
|
|
143
148
|
data?: import("../types/academe-api").components["schemas"]["Submission"];
|
|
149
|
+
meta?: {
|
|
150
|
+
advance?: {
|
|
151
|
+
action?: "started" | "completed" | "finished";
|
|
152
|
+
challengeId?: string;
|
|
153
|
+
currentStep?: {
|
|
154
|
+
id?: string;
|
|
155
|
+
index?: number;
|
|
156
|
+
name?: string;
|
|
157
|
+
startedAt?: string | null;
|
|
158
|
+
completedAt?: string | null;
|
|
159
|
+
} | null;
|
|
160
|
+
nextStep?: {
|
|
161
|
+
id?: string;
|
|
162
|
+
index?: number;
|
|
163
|
+
name?: string;
|
|
164
|
+
startedAt?: string | null;
|
|
165
|
+
} | null;
|
|
166
|
+
autoCompletedSteps?: {
|
|
167
|
+
id?: string;
|
|
168
|
+
index?: number;
|
|
169
|
+
name?: string;
|
|
170
|
+
}[];
|
|
171
|
+
} | null;
|
|
172
|
+
};
|
|
144
173
|
};
|
|
145
174
|
};
|
|
146
175
|
};
|