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.
- package/dist/index.cjs +37 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +731 -17
- package/dist/index.esm.js +37 -25
- package/dist/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/services/ChallengeService.d.ts +41 -3
- package/dist/types/services/QuizService.d.ts +2 -0
- package/dist/types/services/ReportService.d.ts +56 -0
- package/dist/types/services/SubmissionService.d.ts +8 -1
- package/dist/types/types/academe-api.d.ts +623 -12
- package/package.json +2 -2
|
@@ -2019,6 +2019,12 @@ export interface paths {
|
|
|
2019
2019
|
templatesOnly?: boolean;
|
|
2020
2020
|
/** @description Search by title */
|
|
2021
2021
|
search?: string;
|
|
2022
|
+
/**
|
|
2023
|
+
* @description Comma-separated list of extra relations to load. Currently supported:
|
|
2024
|
+
* `steps` — embeds each challenge's `steps` (with their catalog `step`).
|
|
2025
|
+
* Opt-in to avoid penalizing list views that don't need them.
|
|
2026
|
+
*/
|
|
2027
|
+
include?: "steps";
|
|
2022
2028
|
/** @description Page number */
|
|
2023
2029
|
page?: components["parameters"]["page"];
|
|
2024
2030
|
/** @description Items per page */
|
|
@@ -2073,6 +2079,11 @@ export interface paths {
|
|
|
2073
2079
|
maxGroupMembers?: number;
|
|
2074
2080
|
/** @default false */
|
|
2075
2081
|
isInviteOnly?: boolean;
|
|
2082
|
+
/**
|
|
2083
|
+
* Format: uuid
|
|
2084
|
+
* @description Curso ao qual o desafio está associado (agrupa a jornada no dashboard)
|
|
2085
|
+
*/
|
|
2086
|
+
courseId: string;
|
|
2076
2087
|
/** Format: uuid */
|
|
2077
2088
|
institutionId?: string | null;
|
|
2078
2089
|
/** Format: uuid */
|
|
@@ -2215,6 +2226,8 @@ export interface paths {
|
|
|
2215
2226
|
maxGroupMembers?: number;
|
|
2216
2227
|
isInviteOnly?: boolean;
|
|
2217
2228
|
/** Format: uuid */
|
|
2229
|
+
courseId?: string;
|
|
2230
|
+
/** Format: uuid */
|
|
2218
2231
|
serieId?: string;
|
|
2219
2232
|
index?: number;
|
|
2220
2233
|
/** @enum {string} */
|
|
@@ -2321,9 +2334,10 @@ export interface paths {
|
|
|
2321
2334
|
/**
|
|
2322
2335
|
* Add a step to the challenge
|
|
2323
2336
|
* @description Polymorphic validation:
|
|
2324
|
-
* - When step.type=course, courseId is required
|
|
2325
2337
|
* - When step.type=tutorial, tutorialVideoUrl is required
|
|
2326
|
-
* -
|
|
2338
|
+
* - The course of a step is determined by the parent challenge's courseId.
|
|
2339
|
+
* Optionally, courseModuleId pinpoints a specific module within that course.
|
|
2340
|
+
* - tutorial fields are optional on any step type.
|
|
2327
2341
|
*/
|
|
2328
2342
|
post: {
|
|
2329
2343
|
parameters: {
|
|
@@ -2347,8 +2361,6 @@ export interface paths {
|
|
|
2347
2361
|
description?: string;
|
|
2348
2362
|
index: number;
|
|
2349
2363
|
/** Format: uuid */
|
|
2350
|
-
courseId?: string;
|
|
2351
|
-
/** Format: uuid */
|
|
2352
2364
|
courseModuleId?: string;
|
|
2353
2365
|
tutorialTitle?: string;
|
|
2354
2366
|
tutorialDescription?: string;
|
|
@@ -2778,6 +2790,91 @@ export interface paths {
|
|
|
2778
2790
|
};
|
|
2779
2791
|
trace?: never;
|
|
2780
2792
|
};
|
|
2793
|
+
"/challenges/{id}/quiz-attempts": {
|
|
2794
|
+
parameters: {
|
|
2795
|
+
query?: never;
|
|
2796
|
+
header?: never;
|
|
2797
|
+
path?: never;
|
|
2798
|
+
cookie?: never;
|
|
2799
|
+
};
|
|
2800
|
+
/**
|
|
2801
|
+
* Get a user's quiz attempts for this challenge's course modules
|
|
2802
|
+
* @description Returns the quiz attempts of `userId` on every quiz attached to a course
|
|
2803
|
+
* module that is referenced by one of this challenge's steps. Optionally
|
|
2804
|
+
* includes the issued certificate per attempt.
|
|
2805
|
+
*
|
|
2806
|
+
* Each entry corresponds to a `challenges_steps` row that has a non-null
|
|
2807
|
+
* `course_module_id` whose `course_module.quiz_id` is also non-null.
|
|
2808
|
+
* `attempt` is `null` when the user has not yet attempted that quiz.
|
|
2809
|
+
*/
|
|
2810
|
+
get: {
|
|
2811
|
+
parameters: {
|
|
2812
|
+
query?: {
|
|
2813
|
+
/** @description Defaults to the authenticated user when omitted. */
|
|
2814
|
+
userId?: string;
|
|
2815
|
+
};
|
|
2816
|
+
header?: never;
|
|
2817
|
+
path: {
|
|
2818
|
+
/** @description Resource ID */
|
|
2819
|
+
id: components["parameters"]["id"];
|
|
2820
|
+
};
|
|
2821
|
+
cookie?: never;
|
|
2822
|
+
};
|
|
2823
|
+
requestBody?: never;
|
|
2824
|
+
responses: {
|
|
2825
|
+
/** @description List of quiz attempts (one per quiz-bearing challenge step) */
|
|
2826
|
+
200: {
|
|
2827
|
+
headers: {
|
|
2828
|
+
[name: string]: unknown;
|
|
2829
|
+
};
|
|
2830
|
+
content: {
|
|
2831
|
+
"application/json": {
|
|
2832
|
+
/** @example success */
|
|
2833
|
+
status?: string;
|
|
2834
|
+
data?: {
|
|
2835
|
+
/** Format: uuid */
|
|
2836
|
+
challengeStepId?: string;
|
|
2837
|
+
challengeStepName?: string;
|
|
2838
|
+
challengeStepIndex?: number;
|
|
2839
|
+
/** Format: uuid */
|
|
2840
|
+
courseModuleId?: string;
|
|
2841
|
+
courseModuleTitle?: string;
|
|
2842
|
+
/** Format: uuid */
|
|
2843
|
+
quizId?: string;
|
|
2844
|
+
quizTitle?: string;
|
|
2845
|
+
attempt?: {
|
|
2846
|
+
/** Format: uuid */
|
|
2847
|
+
id?: string;
|
|
2848
|
+
score?: number;
|
|
2849
|
+
passed?: boolean;
|
|
2850
|
+
/** Format: date-time */
|
|
2851
|
+
startedAt?: string;
|
|
2852
|
+
/** Format: date-time */
|
|
2853
|
+
completedAt?: string | null;
|
|
2854
|
+
} | null;
|
|
2855
|
+
certificate?: {
|
|
2856
|
+
/** Format: uuid */
|
|
2857
|
+
id?: string;
|
|
2858
|
+
certificateNumber?: string;
|
|
2859
|
+
url?: string | null;
|
|
2860
|
+
} | null;
|
|
2861
|
+
}[];
|
|
2862
|
+
};
|
|
2863
|
+
};
|
|
2864
|
+
};
|
|
2865
|
+
400: components["responses"]["BadRequest"];
|
|
2866
|
+
401: components["responses"]["Unauthorized"];
|
|
2867
|
+
404: components["responses"]["NotFound"];
|
|
2868
|
+
};
|
|
2869
|
+
};
|
|
2870
|
+
put?: never;
|
|
2871
|
+
post?: never;
|
|
2872
|
+
delete?: never;
|
|
2873
|
+
options?: never;
|
|
2874
|
+
head?: never;
|
|
2875
|
+
patch?: never;
|
|
2876
|
+
trace?: never;
|
|
2877
|
+
};
|
|
2781
2878
|
"/classrooms": {
|
|
2782
2879
|
parameters: {
|
|
2783
2880
|
query?: never;
|
|
@@ -9476,6 +9573,8 @@ export interface paths {
|
|
|
9476
9573
|
page?: number;
|
|
9477
9574
|
/** @description Items per page */
|
|
9478
9575
|
limit?: number;
|
|
9576
|
+
/** @description When true, returns questions in random order with shuffled answer alternatives. Each request reshuffles independently. */
|
|
9577
|
+
randomize?: boolean;
|
|
9479
9578
|
};
|
|
9480
9579
|
header?: never;
|
|
9481
9580
|
path?: never;
|
|
@@ -10529,6 +10628,76 @@ export interface paths {
|
|
|
10529
10628
|
patch?: never;
|
|
10530
10629
|
trace?: never;
|
|
10531
10630
|
};
|
|
10631
|
+
"/reports/encourage-dashboard/{id}": {
|
|
10632
|
+
parameters: {
|
|
10633
|
+
query?: never;
|
|
10634
|
+
header?: never;
|
|
10635
|
+
path?: never;
|
|
10636
|
+
cookie?: never;
|
|
10637
|
+
};
|
|
10638
|
+
/**
|
|
10639
|
+
* Payload completo da nova tela /new-dashboard
|
|
10640
|
+
* @description Retorna o dashboard agregado por instituição: overview, KPIs,
|
|
10641
|
+
* licenças (apenas tipo aluno), jornada (cursos deduplicados),
|
|
10642
|
+
* submissões, desempenho por turma, top 10 alunos (por certificados,
|
|
10643
|
+
* desempate por nota) e top 10 professores (por avaliações).
|
|
10644
|
+
*/
|
|
10645
|
+
get: {
|
|
10646
|
+
parameters: {
|
|
10647
|
+
query?: never;
|
|
10648
|
+
header?: never;
|
|
10649
|
+
path: {
|
|
10650
|
+
/** @description ID da instituição */
|
|
10651
|
+
id: string;
|
|
10652
|
+
};
|
|
10653
|
+
cookie?: never;
|
|
10654
|
+
};
|
|
10655
|
+
requestBody?: never;
|
|
10656
|
+
responses: {
|
|
10657
|
+
/** @description Payload completo do encourage dashboard */
|
|
10658
|
+
200: {
|
|
10659
|
+
headers: {
|
|
10660
|
+
[name: string]: unknown;
|
|
10661
|
+
};
|
|
10662
|
+
content: {
|
|
10663
|
+
"application/json": {
|
|
10664
|
+
/** @example success */
|
|
10665
|
+
status?: string;
|
|
10666
|
+
data?: components["schemas"]["EncourageDashboardResponse"];
|
|
10667
|
+
};
|
|
10668
|
+
};
|
|
10669
|
+
};
|
|
10670
|
+
/** @description institutionId inválido */
|
|
10671
|
+
400: {
|
|
10672
|
+
headers: {
|
|
10673
|
+
[name: string]: unknown;
|
|
10674
|
+
};
|
|
10675
|
+
content?: never;
|
|
10676
|
+
};
|
|
10677
|
+
/** @description Não autenticado */
|
|
10678
|
+
401: {
|
|
10679
|
+
headers: {
|
|
10680
|
+
[name: string]: unknown;
|
|
10681
|
+
};
|
|
10682
|
+
content?: never;
|
|
10683
|
+
};
|
|
10684
|
+
/** @description Erro interno */
|
|
10685
|
+
500: {
|
|
10686
|
+
headers: {
|
|
10687
|
+
[name: string]: unknown;
|
|
10688
|
+
};
|
|
10689
|
+
content?: never;
|
|
10690
|
+
};
|
|
10691
|
+
};
|
|
10692
|
+
};
|
|
10693
|
+
put?: never;
|
|
10694
|
+
post?: never;
|
|
10695
|
+
delete?: never;
|
|
10696
|
+
options?: never;
|
|
10697
|
+
head?: never;
|
|
10698
|
+
patch?: never;
|
|
10699
|
+
trace?: never;
|
|
10700
|
+
};
|
|
10532
10701
|
"/roles": {
|
|
10533
10702
|
parameters: {
|
|
10534
10703
|
query?: never;
|
|
@@ -11535,7 +11704,22 @@ export interface paths {
|
|
|
11535
11704
|
/** @example success */
|
|
11536
11705
|
status?: string;
|
|
11537
11706
|
data?: components["schemas"]["Submission"][];
|
|
11538
|
-
meta?: components["schemas"]["PaginationMeta"]
|
|
11707
|
+
meta?: components["schemas"]["PaginationMeta"] & {
|
|
11708
|
+
/**
|
|
11709
|
+
* @description Contagem por status, ignorando o filtro `status`. Útil para
|
|
11710
|
+
* alimentar abas/pills sem requisições adicionais.
|
|
11711
|
+
*/
|
|
11712
|
+
statusCounts?: {
|
|
11713
|
+
/** @example 12 */
|
|
11714
|
+
submitted?: number;
|
|
11715
|
+
/** @example 4 */
|
|
11716
|
+
ai_evaluated?: number;
|
|
11717
|
+
/** @example 30 */
|
|
11718
|
+
approved?: number;
|
|
11719
|
+
/** @example 2 */
|
|
11720
|
+
rejected?: number;
|
|
11721
|
+
};
|
|
11722
|
+
};
|
|
11539
11723
|
};
|
|
11540
11724
|
};
|
|
11541
11725
|
};
|
|
@@ -12197,6 +12381,208 @@ export interface paths {
|
|
|
12197
12381
|
patch?: never;
|
|
12198
12382
|
trace?: never;
|
|
12199
12383
|
};
|
|
12384
|
+
"/user-challenge-progress/journey": {
|
|
12385
|
+
parameters: {
|
|
12386
|
+
query?: never;
|
|
12387
|
+
header?: never;
|
|
12388
|
+
path?: never;
|
|
12389
|
+
cookie?: never;
|
|
12390
|
+
};
|
|
12391
|
+
/**
|
|
12392
|
+
* Jornada completa pré-computada do aluno autenticado
|
|
12393
|
+
* @description Retorna todos os desafios da série com suas etapas e o status de progresso do aluno
|
|
12394
|
+
* já computados pelo backend. Substitui as ~25 chamadas HTTP paralelas que o frontend
|
|
12395
|
+
* fazia anteriormente para montar a tela de jornada.
|
|
12396
|
+
*
|
|
12397
|
+
* **Regra de prioridade:** para cada `index` de desafio dentro da série, o backend
|
|
12398
|
+
* prefere o challenge específico da instituição do aluno sobre o template global
|
|
12399
|
+
* (`institution_id IS NULL`). Isso permite que escolas customizem desafios pontuais
|
|
12400
|
+
* sem recriar toda a jornada.
|
|
12401
|
+
*
|
|
12402
|
+
* **Resolução da série:** se `serieId` não for informado, o backend resolve
|
|
12403
|
+
* automaticamente a partir da turma (`institutionClassroom`) do aluno. Se o aluno
|
|
12404
|
+
* não estiver em nenhuma turma e `serieId` também não for passado, retorna
|
|
12405
|
+
* `challenges: []` com `serieId: null`.
|
|
12406
|
+
*
|
|
12407
|
+
* **Status por etapa:** `done` = completedAt preenchido; `current` = primeira etapa
|
|
12408
|
+
* não concluída (apenas uma por vez); `locked` = todas as demais.
|
|
12409
|
+
*
|
|
12410
|
+
* **Progresso:** para etapas `type=course` no status `current`, o campo `progress`
|
|
12411
|
+
* reflete o percentual de lições concluídas no módulo. Para `done` é sempre 100,
|
|
12412
|
+
* para `locked` é sempre 0.
|
|
12413
|
+
*/
|
|
12414
|
+
get: {
|
|
12415
|
+
parameters: {
|
|
12416
|
+
query?: {
|
|
12417
|
+
/**
|
|
12418
|
+
* @description ID da série a filtrar. Opcional — se omitido, o backend resolve pela turma do aluno.
|
|
12419
|
+
* Útil para pré-visualização administrativa ou quando o aluno pertence a múltiplas séries.
|
|
12420
|
+
*/
|
|
12421
|
+
serieId?: string;
|
|
12422
|
+
};
|
|
12423
|
+
header?: never;
|
|
12424
|
+
path?: never;
|
|
12425
|
+
cookie?: never;
|
|
12426
|
+
};
|
|
12427
|
+
requestBody?: never;
|
|
12428
|
+
responses: {
|
|
12429
|
+
/** @description Jornada pré-computada com desafios e etapas */
|
|
12430
|
+
200: {
|
|
12431
|
+
headers: {
|
|
12432
|
+
[name: string]: unknown;
|
|
12433
|
+
};
|
|
12434
|
+
content: {
|
|
12435
|
+
/**
|
|
12436
|
+
* @example {
|
|
12437
|
+
* "status": "success",
|
|
12438
|
+
* "data": {
|
|
12439
|
+
* "serieId": "a1b2c3d4-0000-0000-0000-000000000001",
|
|
12440
|
+
* "serieLabel": "6º ANO",
|
|
12441
|
+
* "challenges": [
|
|
12442
|
+
* {
|
|
12443
|
+
* "id": "a1b2c3d4-0000-0000-0000-000000000002",
|
|
12444
|
+
* "title": "Desafio 1 — Energia Limpa",
|
|
12445
|
+
* "index": 0,
|
|
12446
|
+
* "courseId": "a1b2c3d4-0000-0000-0000-000000000003",
|
|
12447
|
+
* "isUpcoming": false,
|
|
12448
|
+
* "steps": [
|
|
12449
|
+
* {
|
|
12450
|
+
* "id": "a1b2c3d4-0000-0000-0000-000000000010",
|
|
12451
|
+
* "name": "Inicie o desafio",
|
|
12452
|
+
* "index": 0,
|
|
12453
|
+
* "type": "challenge",
|
|
12454
|
+
* "color": "#1AC84A",
|
|
12455
|
+
* "icon": "LuStar",
|
|
12456
|
+
* "status": "done",
|
|
12457
|
+
* "progress": 100,
|
|
12458
|
+
* "courseModuleId": null,
|
|
12459
|
+
* "courseModuleName": null
|
|
12460
|
+
* },
|
|
12461
|
+
* {
|
|
12462
|
+
* "id": "a1b2c3d4-0000-0000-0000-000000000011",
|
|
12463
|
+
* "name": "Módulo de IA",
|
|
12464
|
+
* "index": 1,
|
|
12465
|
+
* "type": "course",
|
|
12466
|
+
* "color": "#8030D8",
|
|
12467
|
+
* "icon": "LuCirclePlay",
|
|
12468
|
+
* "status": "current",
|
|
12469
|
+
* "progress": 67,
|
|
12470
|
+
* "courseModuleId": "a1b2c3d4-0000-0000-0000-000000000020",
|
|
12471
|
+
* "courseModuleName": "Introdução a IA"
|
|
12472
|
+
* }
|
|
12473
|
+
* ]
|
|
12474
|
+
* }
|
|
12475
|
+
* ]
|
|
12476
|
+
* }
|
|
12477
|
+
* }
|
|
12478
|
+
*/
|
|
12479
|
+
"application/json": {
|
|
12480
|
+
/** @example success */
|
|
12481
|
+
status?: string;
|
|
12482
|
+
data?: components["schemas"]["JourneyView"];
|
|
12483
|
+
};
|
|
12484
|
+
};
|
|
12485
|
+
};
|
|
12486
|
+
/** @description serieId inválido (não é um UUID) */
|
|
12487
|
+
400: {
|
|
12488
|
+
headers: {
|
|
12489
|
+
[name: string]: unknown;
|
|
12490
|
+
};
|
|
12491
|
+
content: {
|
|
12492
|
+
"application/json": components["schemas"]["Error"];
|
|
12493
|
+
};
|
|
12494
|
+
};
|
|
12495
|
+
401: components["responses"]["Unauthorized"];
|
|
12496
|
+
};
|
|
12497
|
+
};
|
|
12498
|
+
put?: never;
|
|
12499
|
+
post?: never;
|
|
12500
|
+
delete?: never;
|
|
12501
|
+
options?: never;
|
|
12502
|
+
head?: never;
|
|
12503
|
+
patch?: never;
|
|
12504
|
+
trace?: never;
|
|
12505
|
+
};
|
|
12506
|
+
"/user-challenge-progress/challenges/{id}/advance": {
|
|
12507
|
+
parameters: {
|
|
12508
|
+
query?: never;
|
|
12509
|
+
header?: never;
|
|
12510
|
+
path?: never;
|
|
12511
|
+
cookie?: never;
|
|
12512
|
+
};
|
|
12513
|
+
get?: never;
|
|
12514
|
+
put?: never;
|
|
12515
|
+
/**
|
|
12516
|
+
* Advance one tick in the user's journey on a challenge
|
|
12517
|
+
* @description Unified journey advancement, agnostic of step type. Each call performs ONE action:
|
|
12518
|
+
*
|
|
12519
|
+
* 1. Resolves the current step = first active step (by index) not yet completed by the user.
|
|
12520
|
+
* 2. If no progress row exists for that step → creates one (action='started').
|
|
12521
|
+
* 3. If progress row exists with completed_at IS NULL → sets completed_at (action='completed').
|
|
12522
|
+
* 4. If all steps are completed → no-op (action='finished').
|
|
12523
|
+
*
|
|
12524
|
+
* Web and mobile clients must use this endpoint regardless of the step type
|
|
12525
|
+
* (challenge, course, tutorial, publication, evaluation, certificate).
|
|
12526
|
+
*/
|
|
12527
|
+
post: {
|
|
12528
|
+
parameters: {
|
|
12529
|
+
query?: never;
|
|
12530
|
+
header?: never;
|
|
12531
|
+
path: {
|
|
12532
|
+
/** @description Resource ID */
|
|
12533
|
+
id: components["parameters"]["id"];
|
|
12534
|
+
};
|
|
12535
|
+
cookie?: never;
|
|
12536
|
+
};
|
|
12537
|
+
requestBody?: never;
|
|
12538
|
+
responses: {
|
|
12539
|
+
/** @description Tick result */
|
|
12540
|
+
200: {
|
|
12541
|
+
headers: {
|
|
12542
|
+
[name: string]: unknown;
|
|
12543
|
+
};
|
|
12544
|
+
content: {
|
|
12545
|
+
"application/json": {
|
|
12546
|
+
/** @example success */
|
|
12547
|
+
status?: string;
|
|
12548
|
+
data?: {
|
|
12549
|
+
/** @enum {string} */
|
|
12550
|
+
action?: "started" | "completed" | "finished";
|
|
12551
|
+
/** Format: uuid */
|
|
12552
|
+
challengeId?: string;
|
|
12553
|
+
currentStep?: {
|
|
12554
|
+
/** Format: uuid */
|
|
12555
|
+
id?: string;
|
|
12556
|
+
index?: number;
|
|
12557
|
+
name?: string;
|
|
12558
|
+
/** Format: date-time */
|
|
12559
|
+
startedAt?: string | null;
|
|
12560
|
+
/** Format: date-time */
|
|
12561
|
+
completedAt?: string | null;
|
|
12562
|
+
} | null;
|
|
12563
|
+
/** @description Next step in the journey. When action='completed', this step is also auto-started on the same call (startedAt populated). */
|
|
12564
|
+
nextStep?: {
|
|
12565
|
+
/** Format: uuid */
|
|
12566
|
+
id?: string;
|
|
12567
|
+
index?: number;
|
|
12568
|
+
name?: string;
|
|
12569
|
+
/** Format: date-time */
|
|
12570
|
+
startedAt?: string | null;
|
|
12571
|
+
} | null;
|
|
12572
|
+
};
|
|
12573
|
+
};
|
|
12574
|
+
};
|
|
12575
|
+
};
|
|
12576
|
+
401: components["responses"]["Unauthorized"];
|
|
12577
|
+
404: components["responses"]["NotFound"];
|
|
12578
|
+
};
|
|
12579
|
+
};
|
|
12580
|
+
delete?: never;
|
|
12581
|
+
options?: never;
|
|
12582
|
+
head?: never;
|
|
12583
|
+
patch?: never;
|
|
12584
|
+
trace?: never;
|
|
12585
|
+
};
|
|
12200
12586
|
"/user-challenge-progress/steps/{stepId}/start": {
|
|
12201
12587
|
parameters: {
|
|
12202
12588
|
query?: never;
|
|
@@ -12207,9 +12593,12 @@ export interface paths {
|
|
|
12207
12593
|
get?: never;
|
|
12208
12594
|
put?: never;
|
|
12209
12595
|
/**
|
|
12210
|
-
*
|
|
12211
|
-
* @description Creates a user_challenge_progress row. If one already exists
|
|
12596
|
+
* [Internal/Admin] Force-start a specific challenge step (idempotent)
|
|
12597
|
+
* @description Creates a user_challenge_progress row for the given step. If one already exists,
|
|
12212
12598
|
* returns the existing row (idempotent).
|
|
12599
|
+
*
|
|
12600
|
+
* Client apps (web/mobile) should use POST /user-challenge-progress/challenges/{id}/advance
|
|
12601
|
+
* instead. This endpoint is retained for internal/admin tooling that needs to force a state.
|
|
12213
12602
|
*/
|
|
12214
12603
|
post: {
|
|
12215
12604
|
parameters: {
|
|
@@ -12256,8 +12645,12 @@ export interface paths {
|
|
|
12256
12645
|
get?: never;
|
|
12257
12646
|
put?: never;
|
|
12258
12647
|
/**
|
|
12259
|
-
*
|
|
12260
|
-
* @description Sets completed_at on the user's progress row
|
|
12648
|
+
* [Internal/Admin] Force-complete a specific challenge step
|
|
12649
|
+
* @description Sets completed_at on the user's progress row for the given step. Idempotent
|
|
12650
|
+
* (no-op if already completed).
|
|
12651
|
+
*
|
|
12652
|
+
* Client apps (web/mobile) should use POST /user-challenge-progress/challenges/{id}/advance
|
|
12653
|
+
* instead. This endpoint is retained for internal/admin tooling that needs to force a state.
|
|
12261
12654
|
*/
|
|
12262
12655
|
post: {
|
|
12263
12656
|
parameters: {
|
|
@@ -14274,6 +14667,9 @@ export interface components {
|
|
|
14274
14667
|
createdAt: string;
|
|
14275
14668
|
/** Format: date-time */
|
|
14276
14669
|
updatedAt: string;
|
|
14670
|
+
organization?: components["schemas"]["Organization"] | null;
|
|
14671
|
+
address?: components["schemas"]["Address"] | null;
|
|
14672
|
+
institutionReward?: Record<string, never> | null;
|
|
14277
14673
|
};
|
|
14278
14674
|
Organization: {
|
|
14279
14675
|
/** Format: uuid */
|
|
@@ -14819,6 +15215,11 @@ export interface components {
|
|
|
14819
15215
|
maxGroupMembers?: number;
|
|
14820
15216
|
/** @example false */
|
|
14821
15217
|
isInviteOnly?: boolean;
|
|
15218
|
+
/**
|
|
15219
|
+
* Format: uuid
|
|
15220
|
+
* @description Curso ao qual o desafio está associado (agrupa a jornada no dashboard)
|
|
15221
|
+
*/
|
|
15222
|
+
courseId?: string;
|
|
14822
15223
|
/**
|
|
14823
15224
|
* Format: uuid
|
|
14824
15225
|
* @description Null para template global
|
|
@@ -14854,6 +15255,8 @@ export interface components {
|
|
|
14854
15255
|
createdAt?: string;
|
|
14855
15256
|
/** Format: date-time */
|
|
14856
15257
|
updatedAt?: string;
|
|
15258
|
+
/** @description Populado quando `include=steps` é informado no GET /challenges, ou via GET /challenges/{id} */
|
|
15259
|
+
steps?: components["schemas"]["ChallengeStep"][];
|
|
14857
15260
|
};
|
|
14858
15261
|
ChallengeMedia: {
|
|
14859
15262
|
/** Format: uuid */
|
|
@@ -14882,10 +15285,8 @@ export interface components {
|
|
|
14882
15285
|
index?: number;
|
|
14883
15286
|
/**
|
|
14884
15287
|
* Format: uuid
|
|
14885
|
-
* @description
|
|
15288
|
+
* @description Opcional. Quando step type=course, aponta para o módulo específico do curso do challenge.
|
|
14886
15289
|
*/
|
|
14887
|
-
courseId?: string | null;
|
|
14888
|
-
/** Format: uuid */
|
|
14889
15290
|
courseModuleId?: string | null;
|
|
14890
15291
|
tutorialTitle?: string | null;
|
|
14891
15292
|
tutorialDescription?: string | null;
|
|
@@ -14896,6 +15297,8 @@ export interface components {
|
|
|
14896
15297
|
createdAt?: string;
|
|
14897
15298
|
/** Format: date-time */
|
|
14898
15299
|
updatedAt?: string;
|
|
15300
|
+
/** @description Catálogo do step (cor, ícone, tipo). Populado junto com o relation `steps.step`. */
|
|
15301
|
+
step?: components["schemas"]["Step"];
|
|
14899
15302
|
};
|
|
14900
15303
|
/** @description Item do checklist descritivo de entrega */
|
|
14901
15304
|
ChallengeDeliveryStep: {
|
|
@@ -14967,6 +15370,99 @@ export interface components {
|
|
|
14967
15370
|
/** Format: date-time */
|
|
14968
15371
|
updatedAt?: string;
|
|
14969
15372
|
};
|
|
15373
|
+
/** @description Etapa de um desafio com status computado pelo backend */
|
|
15374
|
+
JourneyStepView: {
|
|
15375
|
+
/**
|
|
15376
|
+
* Format: uuid
|
|
15377
|
+
* @description ID do challenge_step
|
|
15378
|
+
*/
|
|
15379
|
+
id: string;
|
|
15380
|
+
/** @example Módulo de IA */
|
|
15381
|
+
name: string;
|
|
15382
|
+
/**
|
|
15383
|
+
* @description Ordem da etapa dentro do desafio
|
|
15384
|
+
* @example 1
|
|
15385
|
+
*/
|
|
15386
|
+
index: number;
|
|
15387
|
+
/**
|
|
15388
|
+
* @description Tipo da etapa (do catálogo de steps)
|
|
15389
|
+
* @example course
|
|
15390
|
+
* @enum {string}
|
|
15391
|
+
*/
|
|
15392
|
+
type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
|
|
15393
|
+
/**
|
|
15394
|
+
* @description Cor hex do step catalog
|
|
15395
|
+
* @example #8030D8
|
|
15396
|
+
*/
|
|
15397
|
+
color: string;
|
|
15398
|
+
/**
|
|
15399
|
+
* @description Nome do ícone Lucide do step catalog
|
|
15400
|
+
* @example LuCirclePlay
|
|
15401
|
+
*/
|
|
15402
|
+
icon: string;
|
|
15403
|
+
/**
|
|
15404
|
+
* @description Status computado pelo backend: done=concluído, current=etapa ativa, locked=ainda bloqueado
|
|
15405
|
+
* @example current
|
|
15406
|
+
* @enum {string}
|
|
15407
|
+
*/
|
|
15408
|
+
status: "done" | "current" | "locked";
|
|
15409
|
+
/**
|
|
15410
|
+
* @description Percentual de progresso (0-100). Para done=100, para locked=0, para current=% do curso ou 0
|
|
15411
|
+
* @example 67
|
|
15412
|
+
*/
|
|
15413
|
+
progress: number;
|
|
15414
|
+
/**
|
|
15415
|
+
* Format: uuid
|
|
15416
|
+
* @description ID do módulo do curso referenciado por esta etapa (apenas quando type=course)
|
|
15417
|
+
*/
|
|
15418
|
+
courseModuleId?: string | null;
|
|
15419
|
+
/**
|
|
15420
|
+
* @description Título do módulo do curso (apenas quando courseModuleId não é null)
|
|
15421
|
+
* @example Introdução a IA
|
|
15422
|
+
*/
|
|
15423
|
+
courseModuleName?: string | null;
|
|
15424
|
+
};
|
|
15425
|
+
/** @description Desafio da jornada com suas etapas e status computados */
|
|
15426
|
+
JourneyChallengeView: {
|
|
15427
|
+
/**
|
|
15428
|
+
* Format: uuid
|
|
15429
|
+
* @description ID do challenge
|
|
15430
|
+
*/
|
|
15431
|
+
id: string;
|
|
15432
|
+
/** @example Desafio 1 — Energia Limpa */
|
|
15433
|
+
title: string;
|
|
15434
|
+
/**
|
|
15435
|
+
* @description Ordem do desafio na série
|
|
15436
|
+
* @example 0
|
|
15437
|
+
*/
|
|
15438
|
+
index: number;
|
|
15439
|
+
/**
|
|
15440
|
+
* Format: uuid
|
|
15441
|
+
* @description Curso ao qual o desafio está associado
|
|
15442
|
+
*/
|
|
15443
|
+
courseId: string;
|
|
15444
|
+
/**
|
|
15445
|
+
* @description True quando o desafio ainda não está disponível para o aluno (challenge seguinte ao ativo com steps pendentes)
|
|
15446
|
+
* @example false
|
|
15447
|
+
*/
|
|
15448
|
+
isUpcoming: boolean;
|
|
15449
|
+
steps: components["schemas"]["JourneyStepView"][];
|
|
15450
|
+
};
|
|
15451
|
+
/** @description Resposta completa do endpoint GET /user-challenge-progress/journey — dados pré-computados para renderização direta da tela de jornada */
|
|
15452
|
+
JourneyView: {
|
|
15453
|
+
/** @description Desafios da jornada ordenados por index, com prioridade escola > template aplicada */
|
|
15454
|
+
challenges: components["schemas"]["JourneyChallengeView"][];
|
|
15455
|
+
/**
|
|
15456
|
+
* Format: uuid
|
|
15457
|
+
* @description ID da série resolvida (da turma do aluno, ou do query param serieId)
|
|
15458
|
+
*/
|
|
15459
|
+
serieId: string | null;
|
|
15460
|
+
/**
|
|
15461
|
+
* @description Rótulo legível da série para exibição na UI
|
|
15462
|
+
* @example 6º ANO
|
|
15463
|
+
*/
|
|
15464
|
+
serieLabel: string | null;
|
|
15465
|
+
};
|
|
14970
15466
|
/** @description Aggregated progress of a user on a course or module, derived from users_course_log completion events */
|
|
14971
15467
|
UsersCourseLogProgress: {
|
|
14972
15468
|
/**
|
|
@@ -15905,6 +16401,121 @@ export interface components {
|
|
|
15905
16401
|
totalStudents?: number;
|
|
15906
16402
|
year?: number;
|
|
15907
16403
|
};
|
|
16404
|
+
EncourageActivePeriod: {
|
|
16405
|
+
/** Format: uuid */
|
|
16406
|
+
id?: string;
|
|
16407
|
+
/** Format: date-time */
|
|
16408
|
+
start?: string;
|
|
16409
|
+
/** Format: date-time */
|
|
16410
|
+
end?: string;
|
|
16411
|
+
/** @example Bimestre */
|
|
16412
|
+
label?: string;
|
|
16413
|
+
/** @example 4 */
|
|
16414
|
+
periodsPerYear?: number;
|
|
16415
|
+
};
|
|
16416
|
+
EncourageOverview: {
|
|
16417
|
+
userFirstName?: string;
|
|
16418
|
+
institutionName?: string;
|
|
16419
|
+
activePeriod?: components["schemas"]["EncourageActivePeriod"];
|
|
16420
|
+
/** Format: float */
|
|
16421
|
+
globalProgressPct?: number;
|
|
16422
|
+
};
|
|
16423
|
+
EncourageKpis: {
|
|
16424
|
+
totalStudents?: number;
|
|
16425
|
+
/** Format: float */
|
|
16426
|
+
totalStudentsDeltaPct?: number;
|
|
16427
|
+
completedProjects?: number;
|
|
16428
|
+
/** Format: float */
|
|
16429
|
+
completedProjectsDeltaPct?: number;
|
|
16430
|
+
/** Format: float */
|
|
16431
|
+
engagementRatePct?: number;
|
|
16432
|
+
/** Format: float */
|
|
16433
|
+
engagementRateDeltaPct?: number;
|
|
16434
|
+
neverLoggedIn?: number;
|
|
16435
|
+
neverLoggedInDelta?: number;
|
|
16436
|
+
};
|
|
16437
|
+
/** @description Licenças do tipo aluno (seats.group_id → group.type = 'student') */
|
|
16438
|
+
EncourageLicenses: {
|
|
16439
|
+
used?: number;
|
|
16440
|
+
total?: number;
|
|
16441
|
+
/** Format: float */
|
|
16442
|
+
pct?: number;
|
|
16443
|
+
available?: number;
|
|
16444
|
+
};
|
|
16445
|
+
EncourageJourneyCourse: {
|
|
16446
|
+
/** Format: uuid */
|
|
16447
|
+
courseId?: string;
|
|
16448
|
+
title?: string;
|
|
16449
|
+
/** Format: date-time */
|
|
16450
|
+
dueDate?: string;
|
|
16451
|
+
/** Format: float */
|
|
16452
|
+
progressPct?: number;
|
|
16453
|
+
challengesCount?: number;
|
|
16454
|
+
color?: string;
|
|
16455
|
+
};
|
|
16456
|
+
EncourageJourney: {
|
|
16457
|
+
totalCourses?: number;
|
|
16458
|
+
/** Format: float */
|
|
16459
|
+
averageProgressPct?: number;
|
|
16460
|
+
/** @enum {string} */
|
|
16461
|
+
periodKind?: "semester" | "trimester" | "bimester";
|
|
16462
|
+
courses?: components["schemas"]["EncourageJourneyCourse"][];
|
|
16463
|
+
};
|
|
16464
|
+
EncourageSubmissions: {
|
|
16465
|
+
total?: number;
|
|
16466
|
+
evaluated?: number;
|
|
16467
|
+
awaitingTeacher?: number;
|
|
16468
|
+
awaitingAi?: number;
|
|
16469
|
+
};
|
|
16470
|
+
EncourageClassPerformance: {
|
|
16471
|
+
/** Format: uuid */
|
|
16472
|
+
classroomId?: string;
|
|
16473
|
+
/** @example 2º A — Médio */
|
|
16474
|
+
name?: string;
|
|
16475
|
+
/** @example Manhã */
|
|
16476
|
+
meta?: string;
|
|
16477
|
+
/** @description Total de alunos cadastrados na turma */
|
|
16478
|
+
studentsCount?: number;
|
|
16479
|
+
/** @description Alunos que submeteram pelo menos 1 challenge do período ativo */
|
|
16480
|
+
submittedCount?: number;
|
|
16481
|
+
/** Format: float */
|
|
16482
|
+
progressPct?: number;
|
|
16483
|
+
/** @enum {string} */
|
|
16484
|
+
level?: "high" | "medium" | "low";
|
|
16485
|
+
};
|
|
16486
|
+
EncourageTopStudent: {
|
|
16487
|
+
/** Format: uuid */
|
|
16488
|
+
userId?: string;
|
|
16489
|
+
rank?: number;
|
|
16490
|
+
name?: string;
|
|
16491
|
+
initials?: string;
|
|
16492
|
+
avatarColor?: string;
|
|
16493
|
+
certificates?: number;
|
|
16494
|
+
/** Format: float */
|
|
16495
|
+
averageScore?: number;
|
|
16496
|
+
};
|
|
16497
|
+
EncourageTopTeacher: {
|
|
16498
|
+
/** Format: uuid */
|
|
16499
|
+
userId?: string;
|
|
16500
|
+
rank?: number;
|
|
16501
|
+
name?: string;
|
|
16502
|
+
initials?: string;
|
|
16503
|
+
avatarColor?: string;
|
|
16504
|
+
evaluationsCount?: number;
|
|
16505
|
+
averageEvaluationSeconds?: number;
|
|
16506
|
+
/** Format: float */
|
|
16507
|
+
averageScore?: number;
|
|
16508
|
+
};
|
|
16509
|
+
EncourageDashboardResponse: {
|
|
16510
|
+
overview?: components["schemas"]["EncourageOverview"];
|
|
16511
|
+
kpis?: components["schemas"]["EncourageKpis"];
|
|
16512
|
+
licenses?: components["schemas"]["EncourageLicenses"];
|
|
16513
|
+
journey?: components["schemas"]["EncourageJourney"];
|
|
16514
|
+
submissions?: components["schemas"]["EncourageSubmissions"];
|
|
16515
|
+
classes?: components["schemas"]["EncourageClassPerformance"][];
|
|
16516
|
+
topStudents?: components["schemas"]["EncourageTopStudent"][];
|
|
16517
|
+
topTeachers?: components["schemas"]["EncourageTopTeacher"][];
|
|
16518
|
+
};
|
|
15908
16519
|
UserCreationRequest: {
|
|
15909
16520
|
/**
|
|
15910
16521
|
* Format: uuid
|