academe-kit 0.10.2 → 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 +24 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +211 -81
- package/dist/index.esm.js +24 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/services/SubmissionService.d.ts +1 -15
- package/dist/types/services/UserProgressService.d.ts +66 -1
- package/dist/types/types/academe-api.d.ts +141 -64
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10809,7 +10809,7 @@ interface paths {
|
|
|
10809
10809
|
get: {
|
|
10810
10810
|
parameters: {
|
|
10811
10811
|
query?: {
|
|
10812
|
-
/** @description UUID do educational_model_period, OU a string literal `"all"` para considerar todos os bimestres. Omitido = corrente. */
|
|
10812
|
+
/** @description UUID do educational_model_period, OU a string literal `"all"` para considerar todos os bimestres do ano letivo. Omitido = corrente. */
|
|
10813
10813
|
periodId?: string;
|
|
10814
10814
|
/** @description Quando presente, restringe o cálculo a UM challenge específico dentro do recorte temporal. */
|
|
10815
10815
|
challengeId?: string;
|
|
@@ -10836,18 +10836,21 @@ interface paths {
|
|
|
10836
10836
|
};
|
|
10837
10837
|
};
|
|
10838
10838
|
};
|
|
10839
|
+
/** @description institutionId inválido ou querystring inválida */
|
|
10839
10840
|
400: {
|
|
10840
10841
|
headers: {
|
|
10841
10842
|
[name: string]: unknown;
|
|
10842
10843
|
};
|
|
10843
10844
|
content?: never;
|
|
10844
10845
|
};
|
|
10846
|
+
/** @description Não autenticado */
|
|
10845
10847
|
401: {
|
|
10846
10848
|
headers: {
|
|
10847
10849
|
[name: string]: unknown;
|
|
10848
10850
|
};
|
|
10849
10851
|
content?: never;
|
|
10850
10852
|
};
|
|
10853
|
+
/** @description Erro interno */
|
|
10851
10854
|
500: {
|
|
10852
10855
|
headers: {
|
|
10853
10856
|
[name: string]: unknown;
|
|
@@ -11848,13 +11851,13 @@ interface paths {
|
|
|
11848
11851
|
userId?: string;
|
|
11849
11852
|
groupId?: string;
|
|
11850
11853
|
institutionId?: string;
|
|
11854
|
+
/** @description Filtra por turma (institution_classroom) do aluno na instituição */
|
|
11851
11855
|
institutionClassroomId?: string;
|
|
11856
|
+
/** @description Filtra por série (serie) da turma do aluno na instituição */
|
|
11852
11857
|
serieId?: string;
|
|
11853
11858
|
status?: "submitted" | "ai_evaluated" | "approved" | "rejected";
|
|
11854
|
-
/** @description Busca por nome ou e-mail do aluno */
|
|
11859
|
+
/** @description Busca por nome ou e-mail do aluno (submissão) */
|
|
11855
11860
|
search?: string;
|
|
11856
|
-
/** @description UUID de um educational_model_period. Recorta as submissões cuja data de envio (submittedAt) cai no intervalo [start, end] do período. Omitido = todos os períodos. */
|
|
11857
|
-
periodId?: string;
|
|
11858
11861
|
/** @description Page number */
|
|
11859
11862
|
page?: components["parameters"]["page"];
|
|
11860
11863
|
/** @description Items per page */
|
|
@@ -11875,16 +11878,7 @@ interface paths {
|
|
|
11875
11878
|
"application/json": {
|
|
11876
11879
|
/** @example success */
|
|
11877
11880
|
status?: string;
|
|
11878
|
-
data?:
|
|
11879
|
-
/** @description Período letivo cujo intervalo contém a data de envio (submittedAt). Null quando a escola não tem períodos ou o envio caiu fora de qualquer período. */
|
|
11880
|
-
period?: {
|
|
11881
|
-
id?: string;
|
|
11882
|
-
/** @description 0-based (0 = 1º período) */
|
|
11883
|
-
index?: number;
|
|
11884
|
-
/** @example 1º Bimestre */
|
|
11885
|
-
label?: string;
|
|
11886
|
-
} | null;
|
|
11887
|
-
})[];
|
|
11881
|
+
data?: components["schemas"]["Submission"][];
|
|
11888
11882
|
meta?: components["schemas"]["PaginationMeta"] & {
|
|
11889
11883
|
/**
|
|
11890
11884
|
* @description Contagem por status, ignorando o filtro `status`. Útil para
|
|
@@ -11900,14 +11894,6 @@ interface paths {
|
|
|
11900
11894
|
/** @example 2 */
|
|
11901
11895
|
rejected?: number;
|
|
11902
11896
|
};
|
|
11903
|
-
/** @description Períodos letivos da escola (ORDER BY start ASC) para o dropdown de filtro. */
|
|
11904
|
-
periods?: {
|
|
11905
|
-
id?: string;
|
|
11906
|
-
index?: number;
|
|
11907
|
-
/** @example 1º Bimestre */
|
|
11908
|
-
label?: string;
|
|
11909
|
-
isCurrent?: boolean;
|
|
11910
|
-
}[];
|
|
11911
11897
|
};
|
|
11912
11898
|
};
|
|
11913
11899
|
};
|
|
@@ -12608,6 +12594,11 @@ interface paths {
|
|
|
12608
12594
|
* Útil para pré-visualização administrativa ou quando o aluno pertence a múltiplas séries.
|
|
12609
12595
|
*/
|
|
12610
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;
|
|
12611
12602
|
};
|
|
12612
12603
|
header?: never;
|
|
12613
12604
|
path?: never;
|
|
@@ -12999,6 +12990,86 @@ interface paths {
|
|
|
12999
12990
|
patch?: never;
|
|
13000
12991
|
trace?: never;
|
|
13001
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
|
+
};
|
|
13002
13073
|
"/user-creation-requests": {
|
|
13003
13074
|
parameters: {
|
|
13004
13075
|
query?: never;
|
|
@@ -14844,10 +14915,10 @@ interface components {
|
|
|
14844
14915
|
maxStudents: number;
|
|
14845
14916
|
/** @example true */
|
|
14846
14917
|
isActive: boolean;
|
|
14847
|
-
/** Format:
|
|
14848
|
-
|
|
14849
|
-
/** Format:
|
|
14850
|
-
|
|
14918
|
+
/** Format: uuid */
|
|
14919
|
+
logoFileId?: string | null;
|
|
14920
|
+
/** Format: uuid */
|
|
14921
|
+
capaFileId?: string | null;
|
|
14851
14922
|
/** Format: uuid */
|
|
14852
14923
|
addressId?: string | null;
|
|
14853
14924
|
/** Format: uuid */
|
|
@@ -14856,8 +14927,8 @@ interface components {
|
|
|
14856
14927
|
createdAt: string;
|
|
14857
14928
|
/** Format: date-time */
|
|
14858
14929
|
updatedAt: string;
|
|
14859
|
-
organization?: components["schemas"]["Organization"]
|
|
14860
|
-
address?: components["schemas"]["Address"]
|
|
14930
|
+
organization?: components["schemas"]["Organization"];
|
|
14931
|
+
address?: components["schemas"]["Address"];
|
|
14861
14932
|
institutionReward?: Record<string, never> | null;
|
|
14862
14933
|
};
|
|
14863
14934
|
Organization: {
|
|
@@ -16658,30 +16729,6 @@ interface components {
|
|
|
16658
16729
|
/** @description Última submissão por (aluno, challenge do bimestre corrente) ainda SEM teacher_score */
|
|
16659
16730
|
awaitingTeacher?: number;
|
|
16660
16731
|
};
|
|
16661
|
-
StudentsJourneyStatusSummary: {
|
|
16662
|
-
/** @description Alunos sem step concluído nos challenges do recorte */
|
|
16663
|
-
notStarted?: number;
|
|
16664
|
-
/** @description Tem step concluído mas sem submissão */
|
|
16665
|
-
inJourney?: number;
|
|
16666
|
-
/** @description Submissão pendente de avaliação (teacher_score nulo) */
|
|
16667
|
-
inReview?: number;
|
|
16668
|
-
/** @description Submissão já avaliada (teacher_score preenchido) */
|
|
16669
|
-
completed?: number;
|
|
16670
|
-
};
|
|
16671
|
-
StudentsJourneyStatusScope: {
|
|
16672
|
-
/** @description UUID do bimestre alvo; null quando allPeriods */
|
|
16673
|
-
periodId?: string | null;
|
|
16674
|
-
/** @description UUID do challenge alvo; null quando todos do recorte */
|
|
16675
|
-
challengeId?: string | null;
|
|
16676
|
-
/** @description Quantidade de challenges no recorte */
|
|
16677
|
-
challengesCount?: number;
|
|
16678
|
-
/** @description Total de alunos ativos da escola — fecha com a soma dos 4 status */
|
|
16679
|
-
totalStudents?: number;
|
|
16680
|
-
};
|
|
16681
|
-
StudentsJourneyStatusResponse: {
|
|
16682
|
-
summary?: components["schemas"]["StudentsJourneyStatusSummary"];
|
|
16683
|
-
scope?: components["schemas"]["StudentsJourneyStatusScope"];
|
|
16684
|
-
};
|
|
16685
16732
|
EncourageClassPerformance: {
|
|
16686
16733
|
/** Format: uuid */
|
|
16687
16734
|
classroomId?: string;
|
|
@@ -16731,6 +16778,36 @@ interface components {
|
|
|
16731
16778
|
topStudents?: components["schemas"]["EncourageTopStudent"][];
|
|
16732
16779
|
topTeachers?: components["schemas"]["EncourageTopTeacher"][];
|
|
16733
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
|
+
};
|
|
16734
16811
|
UserCreationRequest: {
|
|
16735
16812
|
/**
|
|
16736
16813
|
* Format: uuid
|
|
@@ -16805,15 +16882,15 @@ interface components {
|
|
|
16805
16882
|
*/
|
|
16806
16883
|
isActive: boolean;
|
|
16807
16884
|
/**
|
|
16808
|
-
* Format:
|
|
16809
|
-
* @
|
|
16885
|
+
* Format: uuid
|
|
16886
|
+
* @description ID do storage_file usado como logo
|
|
16810
16887
|
*/
|
|
16811
|
-
|
|
16888
|
+
logoFileId?: string;
|
|
16812
16889
|
/**
|
|
16813
|
-
* Format:
|
|
16814
|
-
* @
|
|
16890
|
+
* Format: uuid
|
|
16891
|
+
* @description ID do storage_file usado como capa/banner
|
|
16815
16892
|
*/
|
|
16816
|
-
|
|
16893
|
+
capaFileId?: string;
|
|
16817
16894
|
/** Format: uuid */
|
|
16818
16895
|
addressId?: string;
|
|
16819
16896
|
/** Format: uuid */
|
|
@@ -16838,15 +16915,15 @@ interface components {
|
|
|
16838
16915
|
/** @example true */
|
|
16839
16916
|
isActive?: boolean;
|
|
16840
16917
|
/**
|
|
16841
|
-
* Format:
|
|
16842
|
-
* @
|
|
16918
|
+
* Format: uuid
|
|
16919
|
+
* @description ID do storage_file usado como logo
|
|
16843
16920
|
*/
|
|
16844
|
-
|
|
16921
|
+
logoFileId?: string;
|
|
16845
16922
|
/**
|
|
16846
|
-
* Format:
|
|
16847
|
-
* @
|
|
16923
|
+
* Format: uuid
|
|
16924
|
+
* @description ID do storage_file usado como capa/banner
|
|
16848
16925
|
*/
|
|
16849
|
-
|
|
16926
|
+
capaFileId?: string;
|
|
16850
16927
|
/** Format: uuid */
|
|
16851
16928
|
addressId?: string;
|
|
16852
16929
|
/** Format: uuid */
|
|
@@ -26391,7 +26468,6 @@ declare function createSubmissionService(apiClient: AcademeApiClient): {
|
|
|
26391
26468
|
serieId?: string;
|
|
26392
26469
|
status?: "submitted" | "ai_evaluated" | "approved" | "rejected";
|
|
26393
26470
|
search?: string;
|
|
26394
|
-
periodId?: string;
|
|
26395
26471
|
page?: components["parameters"]["page"];
|
|
26396
26472
|
limit?: components["parameters"]["limit"];
|
|
26397
26473
|
};
|
|
@@ -26408,13 +26484,7 @@ declare function createSubmissionService(apiClient: AcademeApiClient): {
|
|
|
26408
26484
|
content: {
|
|
26409
26485
|
"application/json": {
|
|
26410
26486
|
status?: string;
|
|
26411
|
-
data?:
|
|
26412
|
-
period?: {
|
|
26413
|
-
id?: string;
|
|
26414
|
-
index?: number;
|
|
26415
|
-
label?: string;
|
|
26416
|
-
} | null;
|
|
26417
|
-
})[];
|
|
26487
|
+
data?: components["schemas"]["Submission"][];
|
|
26418
26488
|
meta?: components["schemas"]["PaginationMeta"] & {
|
|
26419
26489
|
statusCounts?: {
|
|
26420
26490
|
submitted?: number;
|
|
@@ -26422,12 +26492,6 @@ declare function createSubmissionService(apiClient: AcademeApiClient): {
|
|
|
26422
26492
|
approved?: number;
|
|
26423
26493
|
rejected?: number;
|
|
26424
26494
|
};
|
|
26425
|
-
periods?: {
|
|
26426
|
-
id?: string;
|
|
26427
|
-
index?: number;
|
|
26428
|
-
label?: string;
|
|
26429
|
-
isCurrent?: boolean;
|
|
26430
|
-
}[];
|
|
26431
26495
|
};
|
|
26432
26496
|
};
|
|
26433
26497
|
};
|
|
@@ -26445,7 +26509,6 @@ declare function createSubmissionService(apiClient: AcademeApiClient): {
|
|
|
26445
26509
|
serieId?: string;
|
|
26446
26510
|
status?: "submitted" | "ai_evaluated" | "approved" | "rejected";
|
|
26447
26511
|
search?: string;
|
|
26448
|
-
periodId?: string;
|
|
26449
26512
|
page?: components["parameters"]["page"];
|
|
26450
26513
|
limit?: components["parameters"]["limit"];
|
|
26451
26514
|
} | undefined;
|
|
@@ -26742,6 +26805,8 @@ declare function createSubmissionService(apiClient: AcademeApiClient): {
|
|
|
26742
26805
|
};
|
|
26743
26806
|
type SubmissionService = ReturnType<typeof createSubmissionService>;
|
|
26744
26807
|
|
|
26808
|
+
type JourneyStepView = components["schemas"]["JourneyStepView"];
|
|
26809
|
+
type JourneyChallengeView = components["schemas"]["JourneyChallengeView"];
|
|
26745
26810
|
type JourneyView = components["schemas"]["JourneyView"];
|
|
26746
26811
|
/**
|
|
26747
26812
|
* Service do agregado `user-challenge-progress` — o caminho oficial para os
|
|
@@ -26752,8 +26817,12 @@ declare function createUserProgressService(apiClient: AcademeApiClient): {
|
|
|
26752
26817
|
/**
|
|
26753
26818
|
* Jornada pré-computada do usuário (status, progress, color, icon,
|
|
26754
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.
|
|
26755
26824
|
*/
|
|
26756
|
-
getJourney(serieId?: string): Promise<JourneyView>;
|
|
26825
|
+
getJourney(serieId?: string, userId?: string): Promise<JourneyView>;
|
|
26757
26826
|
/**
|
|
26758
26827
|
* Visão step-by-step do progresso do usuário em um desafio. Cada step traz
|
|
26759
26828
|
* `myStartedAt`, `myCompletedAt` e (em desafios em grupo) os agregados do
|
|
@@ -26975,6 +27044,67 @@ declare function createUserProgressService(apiClient: AcademeApiClient): {
|
|
|
26975
27044
|
};
|
|
26976
27045
|
};
|
|
26977
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}`>>;
|
|
26978
27108
|
};
|
|
26979
27109
|
type UserProgressService = ReturnType<typeof createUserProgressService>;
|
|
26980
27110
|
|
|
@@ -27099,4 +27229,4 @@ declare enum NINA_ROLES {
|
|
|
27099
27229
|
}
|
|
27100
27230
|
|
|
27101
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 };
|
|
27102
|
-
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 };
|
package/dist/index.esm.js
CHANGED
|
@@ -6369,10 +6369,19 @@ function createUserProgressService(apiClient) {
|
|
|
6369
6369
|
/**
|
|
6370
6370
|
* Jornada pré-computada do usuário (status, progress, color, icon,
|
|
6371
6371
|
* isUpcoming, série) — base de renderização direta da tela de jornada.
|
|
6372
|
+
*
|
|
6373
|
+
* `userId` é [Admin]: quando informado, retorna a jornada do usuário-alvo
|
|
6374
|
+
* (ex.: backoffice visualizando a jornada de um aluno); omitido = jornada
|
|
6375
|
+
* do próprio usuário autenticado.
|
|
6372
6376
|
*/
|
|
6373
|
-
async getJourney(serieId) {
|
|
6377
|
+
async getJourney(serieId, userId) {
|
|
6378
|
+
const query = {};
|
|
6379
|
+
if (serieId)
|
|
6380
|
+
query.serieId = serieId;
|
|
6381
|
+
if (userId)
|
|
6382
|
+
query.userId = userId;
|
|
6374
6383
|
const res = await apiClient.GET("/user-challenge-progress/journey", {
|
|
6375
|
-
params: { query:
|
|
6384
|
+
params: { query: Object.keys(query).length > 0 ? query : undefined },
|
|
6376
6385
|
});
|
|
6377
6386
|
return res.data.data;
|
|
6378
6387
|
},
|
|
@@ -6433,6 +6442,19 @@ function createUserProgressService(apiClient) {
|
|
|
6433
6442
|
params: { path: { stepId } },
|
|
6434
6443
|
});
|
|
6435
6444
|
},
|
|
6445
|
+
/**
|
|
6446
|
+
* [Admin] Conclui de uma vez TODAS as etapas ativas de um desafio para um
|
|
6447
|
+
* usuário-alvo, criando a linha de progresso quando não existir. Idempotente
|
|
6448
|
+
* — etapas já concluídas não são alteradas.
|
|
6449
|
+
*
|
|
6450
|
+
* Diferente de `advance` (que avança um tick por vez para o usuário
|
|
6451
|
+
* autenticado), aqui o desafio inteiro é concluído de uma vez para o usuário
|
|
6452
|
+
* identificado no path. Em desafios em grupo, apenas o progresso do
|
|
6453
|
+
* usuário-alvo é concluído; os demais membros não são afetados.
|
|
6454
|
+
*/
|
|
6455
|
+
completeAllForUser(challengeId, userId) {
|
|
6456
|
+
return apiClient.POST("/user-challenge-progress/challenges/{id}/users/{userId}/complete-all", { params: { path: { id: challengeId, userId } } });
|
|
6457
|
+
},
|
|
6436
6458
|
};
|
|
6437
6459
|
}
|
|
6438
6460
|
|