academe-kit 0.14.0 → 0.15.0
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 +88 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5030 -2957
- package/dist/index.esm.js +88 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/services/ChallengeGroupService.d.ts +124 -0
- package/dist/types/services/ChallengeService.d.ts +2 -0
- package/dist/types/services/QuizService.d.ts +10 -10
- package/dist/types/services/StepService.d.ts +6 -6
- package/dist/types/services/SubmissionService.d.ts +2 -64
- package/dist/types/services/UserProgressService.d.ts +17 -2
- package/dist/types/services/index.d.ts +3 -0
- package/dist/types/types/academe-api.d.ts +4664 -2670
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -6403,6 +6403,7 @@ function createSubmissionService(apiClient) {
|
|
|
6403
6403
|
* Moves status from submitted → ai_evaluated.
|
|
6404
6404
|
*/
|
|
6405
6405
|
aiEvaluate(submissionId, data) {
|
|
6406
|
+
// Path não tipado no OpenAPI (ver AiEvaluationBody) → cast, padrão do kit.
|
|
6406
6407
|
return apiClient.POST("/submissions/{id}/ai-evaluation", {
|
|
6407
6408
|
params: { path: { id: submissionId } },
|
|
6408
6409
|
body: data,
|
|
@@ -6568,6 +6569,92 @@ function createWatchlistService(apiClient) {
|
|
|
6568
6569
|
};
|
|
6569
6570
|
}
|
|
6570
6571
|
|
|
6572
|
+
function createChallengeGroupService(apiClient) {
|
|
6573
|
+
// Paths novos ainda não tipados no schema gerado — cast (ver docstring acima).
|
|
6574
|
+
const GET = apiClient.GET;
|
|
6575
|
+
const POST = apiClient.POST;
|
|
6576
|
+
const DELETE = apiClient.DELETE;
|
|
6577
|
+
return {
|
|
6578
|
+
// ----- Grupos ---------------------------------------------------------
|
|
6579
|
+
/** Lista os grupos de um desafio (com membros). */
|
|
6580
|
+
listGroups(challengeId) {
|
|
6581
|
+
return GET("/challenge-groups", {
|
|
6582
|
+
params: { query: { challengeId } },
|
|
6583
|
+
});
|
|
6584
|
+
},
|
|
6585
|
+
/** Detalha um grupo (com desafio e membros). */
|
|
6586
|
+
getGroup(groupId) {
|
|
6587
|
+
return GET("/challenge-groups/{id}", {
|
|
6588
|
+
params: { path: { id: groupId } },
|
|
6589
|
+
});
|
|
6590
|
+
},
|
|
6591
|
+
/** Cria um grupo. Com `joinAsMember`, o criador entra como líder. */
|
|
6592
|
+
createGroup(body) {
|
|
6593
|
+
return POST("/challenge-groups", { body });
|
|
6594
|
+
},
|
|
6595
|
+
/** Lista membros de um grupo. */
|
|
6596
|
+
listMembers(groupId) {
|
|
6597
|
+
return GET("/challenge-groups/{id}/members", {
|
|
6598
|
+
params: { path: { id: groupId } },
|
|
6599
|
+
});
|
|
6600
|
+
},
|
|
6601
|
+
/** Remove um membro do grupo (sair/expulsar). */
|
|
6602
|
+
removeMember(groupId, userId) {
|
|
6603
|
+
return DELETE("/challenge-groups/{id}/members/{userId}", {
|
|
6604
|
+
params: { path: { id: groupId, userId } },
|
|
6605
|
+
});
|
|
6606
|
+
},
|
|
6607
|
+
/** Remove o grupo. */
|
|
6608
|
+
deleteGroup(groupId) {
|
|
6609
|
+
return DELETE("/challenge-groups/{id}", {
|
|
6610
|
+
params: { path: { id: groupId } },
|
|
6611
|
+
});
|
|
6612
|
+
},
|
|
6613
|
+
// ----- Colegas elegíveis ---------------------------------------------
|
|
6614
|
+
/**
|
|
6615
|
+
* Colegas de turma elegíveis para convidar (mesma turma do aluno, anotados
|
|
6616
|
+
* com `membership`: free | in_group | invited).
|
|
6617
|
+
*/
|
|
6618
|
+
getEligibleClassmates(challengeId, institutionId) {
|
|
6619
|
+
return GET("/challenges/{id}/eligible-classmates", {
|
|
6620
|
+
params: {
|
|
6621
|
+
path: { id: challengeId },
|
|
6622
|
+
query: institutionId ? { institutionId } : {},
|
|
6623
|
+
},
|
|
6624
|
+
});
|
|
6625
|
+
},
|
|
6626
|
+
// ----- Convites -------------------------------------------------------
|
|
6627
|
+
/** Meus convites (recebidos por padrão), opcionalmente filtrados por status. */
|
|
6628
|
+
listInvites(params) {
|
|
6629
|
+
return GET("/challenge-group-invites", {
|
|
6630
|
+
params: { query: params ?? {} },
|
|
6631
|
+
});
|
|
6632
|
+
},
|
|
6633
|
+
/** Convida um colega para um grupo. */
|
|
6634
|
+
createInvite(body) {
|
|
6635
|
+
return POST("/challenge-group-invites", { body });
|
|
6636
|
+
},
|
|
6637
|
+
/** Aceita um convite recebido (cria a membership no backend). */
|
|
6638
|
+
acceptInvite(inviteId) {
|
|
6639
|
+
return POST("/challenge-group-invites/{id}/accept", {
|
|
6640
|
+
params: { path: { id: inviteId } },
|
|
6641
|
+
});
|
|
6642
|
+
},
|
|
6643
|
+
/** Recusa um convite recebido. */
|
|
6644
|
+
declineInvite(inviteId) {
|
|
6645
|
+
return POST("/challenge-group-invites/{id}/decline", {
|
|
6646
|
+
params: { path: { id: inviteId } },
|
|
6647
|
+
});
|
|
6648
|
+
},
|
|
6649
|
+
/** Cancela um convite pendente que EU enviei. */
|
|
6650
|
+
cancelInvite(inviteId) {
|
|
6651
|
+
return DELETE("/challenge-group-invites/{id}", {
|
|
6652
|
+
params: { path: { id: inviteId } },
|
|
6653
|
+
});
|
|
6654
|
+
},
|
|
6655
|
+
};
|
|
6656
|
+
}
|
|
6657
|
+
|
|
6571
6658
|
function createAcademeApiClient(baseUrl) {
|
|
6572
6659
|
return createClient({ baseUrl });
|
|
6573
6660
|
}
|
|
@@ -6597,6 +6684,7 @@ function createAcademeServices(apiClient) {
|
|
|
6597
6684
|
userProgress: createUserProgressService(apiClient),
|
|
6598
6685
|
vitrine: createVitrineService(apiClient),
|
|
6599
6686
|
watchlist: createWatchlistService(apiClient),
|
|
6687
|
+
challengeGroup: createChallengeGroupService(apiClient),
|
|
6600
6688
|
};
|
|
6601
6689
|
}
|
|
6602
6690
|
|