forked from a2br/ecoledirecte-api-types
/
schoolLife.ts
47 lines (41 loc) · 1.1 KB
/
schoolLife.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Thanks to https://github.com/EduWireApps/ecoledirecte-api-docs/blob/main/README.md#vie-scolaire
import { failureRes } from "../failure";
export type schoolLifeRes = schoolLifeResSuccess | failureRes;
export type schoolLifeResSuccess = {
code: 200;
token: string;
host: string;
data: schoolLifeResData;
};
export type schoolLifeItem = {
id: number;
idEleve: number;
nomEleve: string;
typeElement: "Punition" | "Retard" | "Absence" | string;
date: string;
displayDate: string;
libelle: "RETENUE" | string;
motif: string;
justifie: boolean;
par: string;
commentaire: string;
typeJustification: string;
justifieEd: boolean;
aFaire: string;
dateDeroulement: string;
}
export type schoolLifeResData = {
sanctionsEncouragements: Array<schoolLifeItem>,
absencesRetards: Array<schoolLifeItem>,
parametrage: {
justificationEnLigne: boolean;
absenceCommentaire: boolean;
retardCommentaire: boolean;
sanctionsVisible: boolean;
sanctionParQui: boolean;
sanctionCommentaire: boolean;
encouragementsVisible: boolean;
encouragementParQui: boolean;
encouragementCommentaire: boolean;
}
};