academe-kit 0.10.1 → 0.10.3
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 +203 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +595 -21
- package/dist/index.esm.js +203 -41
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/JourneyStep/frames/types.d.ts +10 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/services/ReportService.d.ts +67 -0
- package/dist/types/services/SubmissionService.d.ts +6 -0
- package/dist/types/services/UserProgressService.d.ts +304 -0
- package/dist/types/services/index.d.ts +3 -0
- package/dist/types/types/academe-api.d.ts +217 -20
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10793,6 +10793,80 @@ interface paths {
|
|
|
10793
10793
|
patch?: never;
|
|
10794
10794
|
trace?: never;
|
|
10795
10795
|
};
|
|
10796
|
+
"/reports/students-journey-status/{id}": {
|
|
10797
|
+
parameters: {
|
|
10798
|
+
query?: never;
|
|
10799
|
+
header?: never;
|
|
10800
|
+
path?: never;
|
|
10801
|
+
cookie?: never;
|
|
10802
|
+
};
|
|
10803
|
+
/**
|
|
10804
|
+
* Status de jornada dos alunos por bimestre (cards de /students)
|
|
10805
|
+
* @description Recorta os alunos ativos da escola em 4 categorias mutuamente exclusivas
|
|
10806
|
+
* (notStarted, inJourney, inReview, completed) considerando os challenges
|
|
10807
|
+
* do bimestre alvo. Cada aluno cai na categoria mais avançada que alcançou.
|
|
10808
|
+
*/
|
|
10809
|
+
get: {
|
|
10810
|
+
parameters: {
|
|
10811
|
+
query?: {
|
|
10812
|
+
/** @description UUID do educational_model_period, OU a string literal `"all"` para considerar todos os bimestres do ano letivo. Omitido = corrente. */
|
|
10813
|
+
periodId?: string;
|
|
10814
|
+
/** @description Quando presente, restringe o cálculo a UM challenge específico dentro do recorte temporal. */
|
|
10815
|
+
challengeId?: string;
|
|
10816
|
+
};
|
|
10817
|
+
header?: never;
|
|
10818
|
+
path: {
|
|
10819
|
+
/** @description UUID da instituição */
|
|
10820
|
+
id: string;
|
|
10821
|
+
};
|
|
10822
|
+
cookie?: never;
|
|
10823
|
+
};
|
|
10824
|
+
requestBody?: never;
|
|
10825
|
+
responses: {
|
|
10826
|
+
/** @description Status agregado */
|
|
10827
|
+
200: {
|
|
10828
|
+
headers: {
|
|
10829
|
+
[name: string]: unknown;
|
|
10830
|
+
};
|
|
10831
|
+
content: {
|
|
10832
|
+
"application/json": {
|
|
10833
|
+
/** @example success */
|
|
10834
|
+
status?: string;
|
|
10835
|
+
data?: components["schemas"]["StudentsJourneyStatusResponse"];
|
|
10836
|
+
};
|
|
10837
|
+
};
|
|
10838
|
+
};
|
|
10839
|
+
/** @description institutionId inválido ou querystring inválida */
|
|
10840
|
+
400: {
|
|
10841
|
+
headers: {
|
|
10842
|
+
[name: string]: unknown;
|
|
10843
|
+
};
|
|
10844
|
+
content?: never;
|
|
10845
|
+
};
|
|
10846
|
+
/** @description Não autenticado */
|
|
10847
|
+
401: {
|
|
10848
|
+
headers: {
|
|
10849
|
+
[name: string]: unknown;
|
|
10850
|
+
};
|
|
10851
|
+
content?: never;
|
|
10852
|
+
};
|
|
10853
|
+
/** @description Erro interno */
|
|
10854
|
+
500: {
|
|
10855
|
+
headers: {
|
|
10856
|
+
[name: string]: unknown;
|
|
10857
|
+
};
|
|
10858
|
+
content?: never;
|
|
10859
|
+
};
|
|
10860
|
+
};
|
|
10861
|
+
};
|
|
10862
|
+
put?: never;
|
|
10863
|
+
post?: never;
|
|
10864
|
+
delete?: never;
|
|
10865
|
+
options?: never;
|
|
10866
|
+
head?: never;
|
|
10867
|
+
patch?: never;
|
|
10868
|
+
trace?: never;
|
|
10869
|
+
};
|
|
10796
10870
|
"/roles": {
|
|
10797
10871
|
parameters: {
|
|
10798
10872
|
query?: never;
|
|
@@ -11777,7 +11851,13 @@ interface paths {
|
|
|
11777
11851
|
userId?: string;
|
|
11778
11852
|
groupId?: string;
|
|
11779
11853
|
institutionId?: string;
|
|
11854
|
+
/** @description Filtra por turma (institution_classroom) do aluno na instituição */
|
|
11855
|
+
institutionClassroomId?: string;
|
|
11856
|
+
/** @description Filtra por série (serie) da turma do aluno na instituição */
|
|
11857
|
+
serieId?: string;
|
|
11780
11858
|
status?: "submitted" | "ai_evaluated" | "approved" | "rejected";
|
|
11859
|
+
/** @description Busca por nome ou e-mail do aluno (submissão) */
|
|
11860
|
+
search?: string;
|
|
11781
11861
|
/** @description Page number */
|
|
11782
11862
|
page?: components["parameters"]["page"];
|
|
11783
11863
|
/** @description Items per page */
|
|
@@ -12514,6 +12594,11 @@ interface paths {
|
|
|
12514
12594
|
* Útil para pré-visualização administrativa ou quando o aluno pertence a múltiplas séries.
|
|
12515
12595
|
*/
|
|
12516
12596
|
serieId?: string;
|
|
12597
|
+
/**
|
|
12598
|
+
* @description [Admin] Quando presente, retorna a jornada do usuário-alvo em vez da do
|
|
12599
|
+
* autenticado. Usado pelo backoffice para visualizar a jornada de um aluno.
|
|
12600
|
+
*/
|
|
12601
|
+
userId?: string;
|
|
12517
12602
|
};
|
|
12518
12603
|
header?: never;
|
|
12519
12604
|
path?: never;
|
|
@@ -12905,6 +12990,86 @@ interface paths {
|
|
|
12905
12990
|
patch?: never;
|
|
12906
12991
|
trace?: never;
|
|
12907
12992
|
};
|
|
12993
|
+
"/user-challenge-progress/challenges/{id}/users/{userId}/complete-all": {
|
|
12994
|
+
parameters: {
|
|
12995
|
+
query?: never;
|
|
12996
|
+
header?: never;
|
|
12997
|
+
path?: never;
|
|
12998
|
+
cookie?: never;
|
|
12999
|
+
};
|
|
13000
|
+
get?: never;
|
|
13001
|
+
put?: never;
|
|
13002
|
+
/**
|
|
13003
|
+
* [Admin] Force-complete ALL steps of a challenge for a target user
|
|
13004
|
+
* @description Marks every active step (challenges_steps) of the challenge as completed for the
|
|
13005
|
+
* given target user, creating the user_challenge_progress row when it does not exist.
|
|
13006
|
+
* Idempotent: steps already completed are left untouched.
|
|
13007
|
+
*
|
|
13008
|
+
* Unlike POST /challenges/{id}/advance (which advances one tick at a time for the
|
|
13009
|
+
* authenticated user), this endpoint completes the whole challenge at once for the
|
|
13010
|
+
* user identified in the path. For group challenges, only the target user's progress
|
|
13011
|
+
* is completed — other group members are not affected.
|
|
13012
|
+
*/
|
|
13013
|
+
post: {
|
|
13014
|
+
parameters: {
|
|
13015
|
+
query?: never;
|
|
13016
|
+
header?: never;
|
|
13017
|
+
path: {
|
|
13018
|
+
/** @description ID of the challenge */
|
|
13019
|
+
id: string;
|
|
13020
|
+
/** @description ID of the target user whose progress will be completed */
|
|
13021
|
+
userId: string;
|
|
13022
|
+
};
|
|
13023
|
+
cookie?: never;
|
|
13024
|
+
};
|
|
13025
|
+
requestBody?: never;
|
|
13026
|
+
responses: {
|
|
13027
|
+
/** @description All steps completed for the target user */
|
|
13028
|
+
200: {
|
|
13029
|
+
headers: {
|
|
13030
|
+
[name: string]: unknown;
|
|
13031
|
+
};
|
|
13032
|
+
content: {
|
|
13033
|
+
"application/json": {
|
|
13034
|
+
/** @example success */
|
|
13035
|
+
status?: string;
|
|
13036
|
+
data?: {
|
|
13037
|
+
/** Format: uuid */
|
|
13038
|
+
challengeId?: string;
|
|
13039
|
+
/** Format: uuid */
|
|
13040
|
+
userId?: string;
|
|
13041
|
+
/** @description Number of active steps in the challenge */
|
|
13042
|
+
total?: number;
|
|
13043
|
+
completedSteps?: {
|
|
13044
|
+
/** Format: uuid */
|
|
13045
|
+
id?: string;
|
|
13046
|
+
index?: number;
|
|
13047
|
+
name?: string;
|
|
13048
|
+
/** Format: date-time */
|
|
13049
|
+
completedAt?: string | null;
|
|
13050
|
+
}[];
|
|
13051
|
+
};
|
|
13052
|
+
};
|
|
13053
|
+
};
|
|
13054
|
+
};
|
|
13055
|
+
401: components["responses"]["Unauthorized"];
|
|
13056
|
+
/** @description Challenge not found or has no active steps */
|
|
13057
|
+
404: {
|
|
13058
|
+
headers: {
|
|
13059
|
+
[name: string]: unknown;
|
|
13060
|
+
};
|
|
13061
|
+
content: {
|
|
13062
|
+
"application/json": components["schemas"]["Error"];
|
|
13063
|
+
};
|
|
13064
|
+
};
|
|
13065
|
+
};
|
|
13066
|
+
};
|
|
13067
|
+
delete?: never;
|
|
13068
|
+
options?: never;
|
|
13069
|
+
head?: never;
|
|
13070
|
+
patch?: never;
|
|
13071
|
+
trace?: never;
|
|
13072
|
+
};
|
|
12908
13073
|
"/user-creation-requests": {
|
|
12909
13074
|
parameters: {
|
|
12910
13075
|
query?: never;
|
|
@@ -14750,10 +14915,10 @@ interface components {
|
|
|
14750
14915
|
maxStudents: number;
|
|
14751
14916
|
/** @example true */
|
|
14752
14917
|
isActive: boolean;
|
|
14753
|
-
/** Format:
|
|
14754
|
-
|
|
14755
|
-
/** Format:
|
|
14756
|
-
|
|
14918
|
+
/** Format: uuid */
|
|
14919
|
+
logoFileId?: string | null;
|
|
14920
|
+
/** Format: uuid */
|
|
14921
|
+
capaFileId?: string | null;
|
|
14757
14922
|
/** Format: uuid */
|
|
14758
14923
|
addressId?: string | null;
|
|
14759
14924
|
/** Format: uuid */
|
|
@@ -14762,8 +14927,8 @@ interface components {
|
|
|
14762
14927
|
createdAt: string;
|
|
14763
14928
|
/** Format: date-time */
|
|
14764
14929
|
updatedAt: string;
|
|
14765
|
-
organization?: components["schemas"]["Organization"]
|
|
14766
|
-
address?: components["schemas"]["Address"]
|
|
14930
|
+
organization?: components["schemas"]["Organization"];
|
|
14931
|
+
address?: components["schemas"]["Address"];
|
|
14767
14932
|
institutionReward?: Record<string, never> | null;
|
|
14768
14933
|
};
|
|
14769
14934
|
Organization: {
|
|
@@ -16557,10 +16722,12 @@ interface components {
|
|
|
16557
16722
|
courses?: components["schemas"]["EncourageJourneyCourse"][];
|
|
16558
16723
|
};
|
|
16559
16724
|
EncourageSubmissions: {
|
|
16725
|
+
/** @description Total de alunos ativos da escola (denominador para % concluído) */
|
|
16560
16726
|
total?: number;
|
|
16561
|
-
|
|
16727
|
+
/** @description Última submissão por (aluno, challenge do bimestre corrente) com teacher_score preenchido */
|
|
16728
|
+
finalized?: number;
|
|
16729
|
+
/** @description Última submissão por (aluno, challenge do bimestre corrente) ainda SEM teacher_score */
|
|
16562
16730
|
awaitingTeacher?: number;
|
|
16563
|
-
awaitingAi?: number;
|
|
16564
16731
|
};
|
|
16565
16732
|
EncourageClassPerformance: {
|
|
16566
16733
|
/** Format: uuid */
|
|
@@ -16611,6 +16778,36 @@ interface components {
|
|
|
16611
16778
|
topStudents?: components["schemas"]["EncourageTopStudent"][];
|
|
16612
16779
|
topTeachers?: components["schemas"]["EncourageTopTeacher"][];
|
|
16613
16780
|
};
|
|
16781
|
+
StudentsJourneyStatusSummary: {
|
|
16782
|
+
/** @description Alunos sem step concluído nos challenges do recorte */
|
|
16783
|
+
notStarted?: number;
|
|
16784
|
+
/** @description Tem step concluído mas sem submissão */
|
|
16785
|
+
inJourney?: number;
|
|
16786
|
+
/** @description Submissão pendente de avaliação (teacher_score nulo) */
|
|
16787
|
+
inReview?: number;
|
|
16788
|
+
/** @description Submissão já avaliada (teacher_score preenchido) */
|
|
16789
|
+
completed?: number;
|
|
16790
|
+
};
|
|
16791
|
+
StudentsJourneyStatusScope: {
|
|
16792
|
+
/**
|
|
16793
|
+
* Format: uuid
|
|
16794
|
+
* @description UUID do bimestre alvo; null quando allPeriods
|
|
16795
|
+
*/
|
|
16796
|
+
periodId?: string | null;
|
|
16797
|
+
/**
|
|
16798
|
+
* Format: uuid
|
|
16799
|
+
* @description UUID do challenge alvo; null quando todos do recorte
|
|
16800
|
+
*/
|
|
16801
|
+
challengeId?: string | null;
|
|
16802
|
+
/** @description Quantidade de challenges no recorte */
|
|
16803
|
+
challengesCount?: number;
|
|
16804
|
+
/** @description Total de alunos ativos da escola — fecha com a soma dos 4 status */
|
|
16805
|
+
totalStudents?: number;
|
|
16806
|
+
};
|
|
16807
|
+
StudentsJourneyStatusResponse: {
|
|
16808
|
+
summary?: components["schemas"]["StudentsJourneyStatusSummary"];
|
|
16809
|
+
scope?: components["schemas"]["StudentsJourneyStatusScope"];
|
|
16810
|
+
};
|
|
16614
16811
|
UserCreationRequest: {
|
|
16615
16812
|
/**
|
|
16616
16813
|
* Format: uuid
|
|
@@ -16685,15 +16882,15 @@ interface components {
|
|
|
16685
16882
|
*/
|
|
16686
16883
|
isActive: boolean;
|
|
16687
16884
|
/**
|
|
16688
|
-
* Format:
|
|
16689
|
-
* @
|
|
16885
|
+
* Format: uuid
|
|
16886
|
+
* @description ID do storage_file usado como logo
|
|
16690
16887
|
*/
|
|
16691
|
-
|
|
16888
|
+
logoFileId?: string;
|
|
16692
16889
|
/**
|
|
16693
|
-
* Format:
|
|
16694
|
-
* @
|
|
16890
|
+
* Format: uuid
|
|
16891
|
+
* @description ID do storage_file usado como capa/banner
|
|
16695
16892
|
*/
|
|
16696
|
-
|
|
16893
|
+
capaFileId?: string;
|
|
16697
16894
|
/** Format: uuid */
|
|
16698
16895
|
addressId?: string;
|
|
16699
16896
|
/** Format: uuid */
|
|
@@ -16718,15 +16915,15 @@ interface components {
|
|
|
16718
16915
|
/** @example true */
|
|
16719
16916
|
isActive?: boolean;
|
|
16720
16917
|
/**
|
|
16721
|
-
* Format:
|
|
16722
|
-
* @
|
|
16918
|
+
* Format: uuid
|
|
16919
|
+
* @description ID do storage_file usado como logo
|
|
16723
16920
|
*/
|
|
16724
|
-
|
|
16921
|
+
logoFileId?: string;
|
|
16725
16922
|
/**
|
|
16726
|
-
* Format:
|
|
16727
|
-
* @
|
|
16923
|
+
* Format: uuid
|
|
16924
|
+
* @description ID do storage_file usado como capa/banner
|
|
16728
16925
|
*/
|
|
16729
|
-
|
|
16926
|
+
capaFileId?: string;
|
|
16730
16927
|
/** Format: uuid */
|
|
16731
16928
|
addressId?: string;
|
|
16732
16929
|
/** Format: uuid */
|
|
@@ -20276,6 +20473,73 @@ declare function createReportService(apiClient: AcademeApiClient): {
|
|
|
20276
20473
|
} | undefined;
|
|
20277
20474
|
};
|
|
20278
20475
|
}, `${string}/${string}`>>;
|
|
20476
|
+
/**
|
|
20477
|
+
* Status de jornada dos alunos para os summary cards da rota /students.
|
|
20478
|
+
*
|
|
20479
|
+
* @param id UUID da instituição.
|
|
20480
|
+
* @param params.periodId UUID do bimestre, ou `"all"` para todos os bimestres
|
|
20481
|
+
* do ano letivo. Omitido = bimestre corrente.
|
|
20482
|
+
* @param params.challengeId UUID de UM challenge específico para restringir o
|
|
20483
|
+
* cálculo dentro do recorte temporal.
|
|
20484
|
+
*/
|
|
20485
|
+
getStudentsJourneyStatusByInstitution(id: string, params?: {
|
|
20486
|
+
periodId?: string;
|
|
20487
|
+
challengeId?: string;
|
|
20488
|
+
}): Promise<openapi_fetch.FetchResponse<{
|
|
20489
|
+
parameters: {
|
|
20490
|
+
query?: {
|
|
20491
|
+
periodId?: string;
|
|
20492
|
+
challengeId?: string;
|
|
20493
|
+
};
|
|
20494
|
+
header?: never;
|
|
20495
|
+
path: {
|
|
20496
|
+
id: string;
|
|
20497
|
+
};
|
|
20498
|
+
cookie?: never;
|
|
20499
|
+
};
|
|
20500
|
+
requestBody?: never;
|
|
20501
|
+
responses: {
|
|
20502
|
+
200: {
|
|
20503
|
+
headers: {
|
|
20504
|
+
[name: string]: unknown;
|
|
20505
|
+
};
|
|
20506
|
+
content: {
|
|
20507
|
+
"application/json": {
|
|
20508
|
+
status?: string;
|
|
20509
|
+
data?: components["schemas"]["StudentsJourneyStatusResponse"];
|
|
20510
|
+
};
|
|
20511
|
+
};
|
|
20512
|
+
};
|
|
20513
|
+
400: {
|
|
20514
|
+
headers: {
|
|
20515
|
+
[name: string]: unknown;
|
|
20516
|
+
};
|
|
20517
|
+
content?: never;
|
|
20518
|
+
};
|
|
20519
|
+
401: {
|
|
20520
|
+
headers: {
|
|
20521
|
+
[name: string]: unknown;
|
|
20522
|
+
};
|
|
20523
|
+
content?: never;
|
|
20524
|
+
};
|
|
20525
|
+
500: {
|
|
20526
|
+
headers: {
|
|
20527
|
+
[name: string]: unknown;
|
|
20528
|
+
};
|
|
20529
|
+
content?: never;
|
|
20530
|
+
};
|
|
20531
|
+
};
|
|
20532
|
+
}, {
|
|
20533
|
+
params: {
|
|
20534
|
+
path: {
|
|
20535
|
+
id: string;
|
|
20536
|
+
};
|
|
20537
|
+
query: {
|
|
20538
|
+
periodId?: string;
|
|
20539
|
+
challengeId?: string;
|
|
20540
|
+
} | undefined;
|
|
20541
|
+
};
|
|
20542
|
+
}, `${string}/${string}`>>;
|
|
20279
20543
|
};
|
|
20280
20544
|
type ReportService = ReturnType<typeof createReportService>;
|
|
20281
20545
|
|
|
@@ -26200,7 +26464,10 @@ declare function createSubmissionService(apiClient: AcademeApiClient): {
|
|
|
26200
26464
|
userId?: string;
|
|
26201
26465
|
groupId?: string;
|
|
26202
26466
|
institutionId?: string;
|
|
26467
|
+
institutionClassroomId?: string;
|
|
26468
|
+
serieId?: string;
|
|
26203
26469
|
status?: "submitted" | "ai_evaluated" | "approved" | "rejected";
|
|
26470
|
+
search?: string;
|
|
26204
26471
|
page?: components["parameters"]["page"];
|
|
26205
26472
|
limit?: components["parameters"]["limit"];
|
|
26206
26473
|
};
|
|
@@ -26238,7 +26505,10 @@ declare function createSubmissionService(apiClient: AcademeApiClient): {
|
|
|
26238
26505
|
userId?: string;
|
|
26239
26506
|
groupId?: string;
|
|
26240
26507
|
institutionId?: string;
|
|
26508
|
+
institutionClassroomId?: string;
|
|
26509
|
+
serieId?: string;
|
|
26241
26510
|
status?: "submitted" | "ai_evaluated" | "approved" | "rejected";
|
|
26511
|
+
search?: string;
|
|
26242
26512
|
page?: components["parameters"]["page"];
|
|
26243
26513
|
limit?: components["parameters"]["limit"];
|
|
26244
26514
|
} | undefined;
|
|
@@ -26535,6 +26805,309 @@ declare function createSubmissionService(apiClient: AcademeApiClient): {
|
|
|
26535
26805
|
};
|
|
26536
26806
|
type SubmissionService = ReturnType<typeof createSubmissionService>;
|
|
26537
26807
|
|
|
26808
|
+
type JourneyStepView = components["schemas"]["JourneyStepView"];
|
|
26809
|
+
type JourneyChallengeView = components["schemas"]["JourneyChallengeView"];
|
|
26810
|
+
type JourneyView = components["schemas"]["JourneyView"];
|
|
26811
|
+
/**
|
|
26812
|
+
* Service do agregado `user-challenge-progress` — o caminho oficial para os
|
|
26813
|
+
* clientes (web/mobile) montarem a jornada e o progresso do usuário. Espelha
|
|
26814
|
+
* app-academe-v2/src/services/academe/user-progress.service.ts.
|
|
26815
|
+
*/
|
|
26816
|
+
declare function createUserProgressService(apiClient: AcademeApiClient): {
|
|
26817
|
+
/**
|
|
26818
|
+
* Jornada pré-computada do usuário (status, progress, color, icon,
|
|
26819
|
+
* isUpcoming, série) — base de renderização direta da tela de jornada.
|
|
26820
|
+
*
|
|
26821
|
+
* `userId` é [Admin]: quando informado, retorna a jornada do usuário-alvo
|
|
26822
|
+
* (ex.: backoffice visualizando a jornada de um aluno); omitido = jornada
|
|
26823
|
+
* do próprio usuário autenticado.
|
|
26824
|
+
*/
|
|
26825
|
+
getJourney(serieId?: string, userId?: string): Promise<JourneyView>;
|
|
26826
|
+
/**
|
|
26827
|
+
* Visão step-by-step do progresso do usuário em um desafio. Cada step traz
|
|
26828
|
+
* `myStartedAt`, `myCompletedAt` e (em desafios em grupo) os agregados do
|
|
26829
|
+
* grupo.
|
|
26830
|
+
*/
|
|
26831
|
+
getChallengeProgress(challengeId: string): Promise<openapi_fetch.FetchResponse<{
|
|
26832
|
+
parameters: {
|
|
26833
|
+
query?: never;
|
|
26834
|
+
header?: never;
|
|
26835
|
+
path: {
|
|
26836
|
+
id: components["parameters"]["id"];
|
|
26837
|
+
};
|
|
26838
|
+
cookie?: never;
|
|
26839
|
+
};
|
|
26840
|
+
requestBody?: never;
|
|
26841
|
+
responses: {
|
|
26842
|
+
200: {
|
|
26843
|
+
headers: {
|
|
26844
|
+
[name: string]: unknown;
|
|
26845
|
+
};
|
|
26846
|
+
content: {
|
|
26847
|
+
"application/json": {
|
|
26848
|
+
status?: string;
|
|
26849
|
+
data?: {
|
|
26850
|
+
challengeStepId?: string;
|
|
26851
|
+
stepName?: string;
|
|
26852
|
+
index?: number;
|
|
26853
|
+
totalMembers?: number;
|
|
26854
|
+
completedMembers?: number;
|
|
26855
|
+
groupCompleted?: boolean;
|
|
26856
|
+
myStartedAt?: string | null;
|
|
26857
|
+
myCompletedAt?: string | null;
|
|
26858
|
+
}[];
|
|
26859
|
+
};
|
|
26860
|
+
};
|
|
26861
|
+
};
|
|
26862
|
+
401: components["responses"]["Unauthorized"];
|
|
26863
|
+
404: components["responses"]["NotFound"];
|
|
26864
|
+
};
|
|
26865
|
+
}, {
|
|
26866
|
+
params: {
|
|
26867
|
+
path: {
|
|
26868
|
+
id: string;
|
|
26869
|
+
};
|
|
26870
|
+
};
|
|
26871
|
+
}, `${string}/${string}`>>;
|
|
26872
|
+
/**
|
|
26873
|
+
* Avança um tick na jornada do usuário no desafio, agnóstico do tipo da
|
|
26874
|
+
* etapa. Cada chamada executa UMA ação:
|
|
26875
|
+
* - Sem progresso na etapa atual → action='started'
|
|
26876
|
+
* - Etapa iniciada (sem completedAt) → action='completed'
|
|
26877
|
+
* - Todas as etapas concluídas → action='finished' (no-op)
|
|
26878
|
+
*
|
|
26879
|
+
* Caminho oficial para clientes (web/mobile). Não usar os endpoints
|
|
26880
|
+
* internos `/steps/{stepId}/start` ou `/steps/{stepId}/complete`.
|
|
26881
|
+
*/
|
|
26882
|
+
advance(challengeId: string): Promise<openapi_fetch.FetchResponse<{
|
|
26883
|
+
parameters: {
|
|
26884
|
+
query?: never;
|
|
26885
|
+
header?: never;
|
|
26886
|
+
path: {
|
|
26887
|
+
id: components["parameters"]["id"];
|
|
26888
|
+
};
|
|
26889
|
+
cookie?: never;
|
|
26890
|
+
};
|
|
26891
|
+
requestBody?: never;
|
|
26892
|
+
responses: {
|
|
26893
|
+
200: {
|
|
26894
|
+
headers: {
|
|
26895
|
+
[name: string]: unknown;
|
|
26896
|
+
};
|
|
26897
|
+
content: {
|
|
26898
|
+
"application/json": {
|
|
26899
|
+
status?: string;
|
|
26900
|
+
data?: {
|
|
26901
|
+
action?: "started" | "completed" | "finished";
|
|
26902
|
+
challengeId?: string;
|
|
26903
|
+
currentStep?: {
|
|
26904
|
+
id?: string;
|
|
26905
|
+
index?: number;
|
|
26906
|
+
name?: string;
|
|
26907
|
+
startedAt?: string | null;
|
|
26908
|
+
completedAt?: string | null;
|
|
26909
|
+
} | null;
|
|
26910
|
+
nextStep?: {
|
|
26911
|
+
id?: string;
|
|
26912
|
+
index?: number;
|
|
26913
|
+
name?: string;
|
|
26914
|
+
startedAt?: string | null;
|
|
26915
|
+
} | null;
|
|
26916
|
+
};
|
|
26917
|
+
};
|
|
26918
|
+
};
|
|
26919
|
+
};
|
|
26920
|
+
401: components["responses"]["Unauthorized"];
|
|
26921
|
+
404: components["responses"]["NotFound"];
|
|
26922
|
+
};
|
|
26923
|
+
}, {
|
|
26924
|
+
params: {
|
|
26925
|
+
path: {
|
|
26926
|
+
id: string;
|
|
26927
|
+
};
|
|
26928
|
+
};
|
|
26929
|
+
}, `${string}/${string}`>>;
|
|
26930
|
+
/**
|
|
26931
|
+
* Status de conclusão do grupo numa etapa. Em desafios em grupo: retorna a
|
|
26932
|
+
* agregação (`canAdvance=true` quando todos concluíram). Em desafios
|
|
26933
|
+
* individuais: retorna o status do próprio usuário.
|
|
26934
|
+
*/
|
|
26935
|
+
getStepGroupStatus(stepId: string): Promise<openapi_fetch.FetchResponse<{
|
|
26936
|
+
parameters: {
|
|
26937
|
+
query?: never;
|
|
26938
|
+
header?: never;
|
|
26939
|
+
path: {
|
|
26940
|
+
stepId: string;
|
|
26941
|
+
};
|
|
26942
|
+
cookie?: never;
|
|
26943
|
+
};
|
|
26944
|
+
requestBody?: never;
|
|
26945
|
+
responses: {
|
|
26946
|
+
200: {
|
|
26947
|
+
headers: {
|
|
26948
|
+
[name: string]: unknown;
|
|
26949
|
+
};
|
|
26950
|
+
content: {
|
|
26951
|
+
"application/json": {
|
|
26952
|
+
status?: string;
|
|
26953
|
+
data?: {
|
|
26954
|
+
isGroupChallenge?: boolean;
|
|
26955
|
+
totalMembers?: number;
|
|
26956
|
+
completedMembers?: number;
|
|
26957
|
+
canAdvance?: boolean;
|
|
26958
|
+
};
|
|
26959
|
+
};
|
|
26960
|
+
};
|
|
26961
|
+
};
|
|
26962
|
+
401: components["responses"]["Unauthorized"];
|
|
26963
|
+
404: components["responses"]["NotFound"];
|
|
26964
|
+
};
|
|
26965
|
+
}, {
|
|
26966
|
+
params: {
|
|
26967
|
+
path: {
|
|
26968
|
+
stepId: string;
|
|
26969
|
+
};
|
|
26970
|
+
};
|
|
26971
|
+
}, `${string}/${string}`>>;
|
|
26972
|
+
/**
|
|
26973
|
+
* Progresso agregado do usuário em um módulo (ou no curso inteiro quando
|
|
26974
|
+
* `moduleId` é omitido). Usado pelos steps do tipo `course` da jornada.
|
|
26975
|
+
*/
|
|
26976
|
+
getCourseProgress(courseId: string, moduleId?: string | null): Promise<openapi_fetch.FetchResponse<{
|
|
26977
|
+
parameters: {
|
|
26978
|
+
query?: never;
|
|
26979
|
+
header?: never;
|
|
26980
|
+
path: {
|
|
26981
|
+
courseId: string;
|
|
26982
|
+
moduleId: string;
|
|
26983
|
+
};
|
|
26984
|
+
cookie?: never;
|
|
26985
|
+
};
|
|
26986
|
+
requestBody?: never;
|
|
26987
|
+
responses: {
|
|
26988
|
+
200: {
|
|
26989
|
+
headers: {
|
|
26990
|
+
[name: string]: unknown;
|
|
26991
|
+
};
|
|
26992
|
+
content: {
|
|
26993
|
+
"application/json": {
|
|
26994
|
+
status?: string;
|
|
26995
|
+
data?: components["schemas"]["UsersCourseLogProgress"];
|
|
26996
|
+
};
|
|
26997
|
+
};
|
|
26998
|
+
};
|
|
26999
|
+
401: components["responses"]["Unauthorized"];
|
|
27000
|
+
404: components["responses"]["NotFound"];
|
|
27001
|
+
};
|
|
27002
|
+
}, {
|
|
27003
|
+
params: {
|
|
27004
|
+
path: {
|
|
27005
|
+
courseId: string;
|
|
27006
|
+
moduleId: string;
|
|
27007
|
+
};
|
|
27008
|
+
};
|
|
27009
|
+
}, `${string}/${string}`>>;
|
|
27010
|
+
/**
|
|
27011
|
+
* [Interno] Força o início de uma etapa específica (idempotente). Clientes
|
|
27012
|
+
* devem preferir `advance`; mantido para casos pontuais (ex.: iniciar a
|
|
27013
|
+
* próxima etapa após concluir um curso aberto a partir da jornada).
|
|
27014
|
+
*/
|
|
27015
|
+
start(stepId: string): Promise<openapi_fetch.FetchResponse<{
|
|
27016
|
+
parameters: {
|
|
27017
|
+
query?: never;
|
|
27018
|
+
header?: never;
|
|
27019
|
+
path: {
|
|
27020
|
+
stepId: string;
|
|
27021
|
+
};
|
|
27022
|
+
cookie?: never;
|
|
27023
|
+
};
|
|
27024
|
+
requestBody?: never;
|
|
27025
|
+
responses: {
|
|
27026
|
+
201: {
|
|
27027
|
+
headers: {
|
|
27028
|
+
[name: string]: unknown;
|
|
27029
|
+
};
|
|
27030
|
+
content: {
|
|
27031
|
+
"application/json": {
|
|
27032
|
+
status?: string;
|
|
27033
|
+
data?: components["schemas"]["UserChallengeProgress"];
|
|
27034
|
+
};
|
|
27035
|
+
};
|
|
27036
|
+
};
|
|
27037
|
+
401: components["responses"]["Unauthorized"];
|
|
27038
|
+
404: components["responses"]["NotFound"];
|
|
27039
|
+
};
|
|
27040
|
+
}, {
|
|
27041
|
+
params: {
|
|
27042
|
+
path: {
|
|
27043
|
+
stepId: string;
|
|
27044
|
+
};
|
|
27045
|
+
};
|
|
27046
|
+
}, `${string}/${string}`>>;
|
|
27047
|
+
/**
|
|
27048
|
+
* [Admin] Conclui de uma vez TODAS as etapas ativas de um desafio para um
|
|
27049
|
+
* usuário-alvo, criando a linha de progresso quando não existir. Idempotente
|
|
27050
|
+
* — etapas já concluídas não são alteradas.
|
|
27051
|
+
*
|
|
27052
|
+
* Diferente de `advance` (que avança um tick por vez para o usuário
|
|
27053
|
+
* autenticado), aqui o desafio inteiro é concluído de uma vez para o usuário
|
|
27054
|
+
* identificado no path. Em desafios em grupo, apenas o progresso do
|
|
27055
|
+
* usuário-alvo é concluído; os demais membros não são afetados.
|
|
27056
|
+
*/
|
|
27057
|
+
completeAllForUser(challengeId: string, userId: string): Promise<openapi_fetch.FetchResponse<{
|
|
27058
|
+
parameters: {
|
|
27059
|
+
query?: never;
|
|
27060
|
+
header?: never;
|
|
27061
|
+
path: {
|
|
27062
|
+
id: string;
|
|
27063
|
+
userId: string;
|
|
27064
|
+
};
|
|
27065
|
+
cookie?: never;
|
|
27066
|
+
};
|
|
27067
|
+
requestBody?: never;
|
|
27068
|
+
responses: {
|
|
27069
|
+
200: {
|
|
27070
|
+
headers: {
|
|
27071
|
+
[name: string]: unknown;
|
|
27072
|
+
};
|
|
27073
|
+
content: {
|
|
27074
|
+
"application/json": {
|
|
27075
|
+
status?: string;
|
|
27076
|
+
data?: {
|
|
27077
|
+
challengeId?: string;
|
|
27078
|
+
userId?: string;
|
|
27079
|
+
total?: number;
|
|
27080
|
+
completedSteps?: {
|
|
27081
|
+
id?: string;
|
|
27082
|
+
index?: number;
|
|
27083
|
+
name?: string;
|
|
27084
|
+
completedAt?: string | null;
|
|
27085
|
+
}[];
|
|
27086
|
+
};
|
|
27087
|
+
};
|
|
27088
|
+
};
|
|
27089
|
+
};
|
|
27090
|
+
401: components["responses"]["Unauthorized"];
|
|
27091
|
+
404: {
|
|
27092
|
+
headers: {
|
|
27093
|
+
[name: string]: unknown;
|
|
27094
|
+
};
|
|
27095
|
+
content: {
|
|
27096
|
+
"application/json": components["schemas"]["Error"];
|
|
27097
|
+
};
|
|
27098
|
+
};
|
|
27099
|
+
};
|
|
27100
|
+
}, {
|
|
27101
|
+
params: {
|
|
27102
|
+
path: {
|
|
27103
|
+
id: string;
|
|
27104
|
+
userId: string;
|
|
27105
|
+
};
|
|
27106
|
+
};
|
|
27107
|
+
}, `${string}/${string}`>>;
|
|
27108
|
+
};
|
|
27109
|
+
type UserProgressService = ReturnType<typeof createUserProgressService>;
|
|
27110
|
+
|
|
26538
27111
|
type AcademeApiClient = ReturnType<typeof openapi_fetch__default<paths>>;
|
|
26539
27112
|
declare function createAcademeApiClient(baseUrl: string): AcademeApiClient;
|
|
26540
27113
|
interface AcademeServices {
|
|
@@ -26559,6 +27132,7 @@ interface AcademeServices {
|
|
|
26559
27132
|
challenge: ChallengeService;
|
|
26560
27133
|
step: StepService;
|
|
26561
27134
|
submission: SubmissionService;
|
|
27135
|
+
userProgress: UserProgressService;
|
|
26562
27136
|
}
|
|
26563
27137
|
|
|
26564
27138
|
type AcademeKeycloakContextProps = {
|
|
@@ -26655,4 +27229,4 @@ declare enum NINA_ROLES {
|
|
|
26655
27229
|
}
|
|
26656
27230
|
|
|
26657
27231
|
export { AcademeAuthProvider, BACKOFFICE_ROLES, Button, CosmicDecor, CosmicStarsCanvas, DASHBOARD_ROLES, GLOBAL_ROLES, JourneyCrystalPin, JourneyStep, MIKE_ROLES, NINA_ROLES, ProtectedApp, ProtectedComponent, ProtectedRouter, STREAMING_ROLES, Spinner, WIDGET_ROLES, academeApi_d as apiTypes, cn, createAcademeApiClient, index_d as types, useAcademeAuth, useProtectedAppColors };
|
|
26658
|
-
export type { AcademeApiClient, AcademeKeycloakContextProps, AcademeServices, AcademeUser, ButtonProps, ChallengeUserQuizAttempt, ChallengeUserQuizAttemptsResponse, CosmicDecorProps, CosmicDecorVariant, CosmicPlanet, CosmicStarsCanvasProps, FrameKind, JourneyCrystalPinProps, JourneyStepProps, JourneyStepSize, JourneyStepType, KeycloakUser, RequiredClientRoles, SecurityContextType, SecurityProviderProps };
|
|
27232
|
+
export type { AcademeApiClient, AcademeKeycloakContextProps, AcademeServices, AcademeUser, ButtonProps, ChallengeUserQuizAttempt, ChallengeUserQuizAttemptsResponse, CosmicDecorProps, CosmicDecorVariant, CosmicPlanet, CosmicStarsCanvasProps, FrameKind, JourneyChallengeView, JourneyCrystalPinProps, JourneyStepProps, JourneyStepSize, JourneyStepType, JourneyStepView, JourneyView, KeycloakUser, RequiredClientRoles, SecurityContextType, SecurityProviderProps };
|