Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

Commit

Permalink
Refactor: Update type definitions for PapillonVieScolaire interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacha338 committed Jun 19, 2024
1 parent e08d856 commit 74d2360
Showing 1 changed file with 44 additions and 44 deletions.
88 changes: 44 additions & 44 deletions fetch/types/vie_scolaire.ts
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
import type { PapillonAttachment } from './attachment';

export interface PapillonVieScolaire {
delays: PapillonDelay[]
absences: PapillonAbsence[]
punishments: PapillonPunishment[]
observations: PapillonObservation[]
delays: PapillonDelay[];
absences: PapillonAbsence[];
punishments: PapillonPunishment[];
observations: PapillonObservation[];
}

export interface CachedPapillonVieScolaire extends PapillonVieScolaire {
timestamp: number
timestamp: number;
}

export interface PapillonAbsence {
id: string
from: number
to: number
justified: boolean
hours: string
administrativelyFixed: boolean
reasons: [string | null]
id: string;
from: number;
to: number;
justified: boolean;
hours: string;
administrativelyFixed: boolean;
reasons: (string | null)[];
}

export interface PapillonDelay {
id: string
date: number
id: string;
date: number;
/** Duration in minutes. */
duration: number
justified: boolean
justification: string | null
reasons: [string | null]
duration: number;
justified: boolean;
justification: string | null;
reasons: (string | null)[];
}

export interface PapillonPunishmentSchedule {
id: string
start: number
id: string;
start: number;
/** In minutes. */
duration: number
duration: number;
}

export interface PapillonPunishment {
id: string
schedulable: boolean
schedule: PapillonPunishmentSchedule[] // TODO in Pawnote
date: number
given_by: string
exclusion: boolean
during_lesson: boolean
id: string;
schedulable: boolean;
schedule: PapillonPunishmentSchedule[]; // TODO in Pawnote
date: number;
given_by: string;
exclusion: boolean;
during_lesson: boolean;
homework: {
text: string
documents: PapillonAttachment[]
}
text: string;
documents: PapillonAttachment[];
};
reason: {
text: string[]
circumstances: string
documents: PapillonAttachment[]
}
nature: string
text: string[];
circumstances: string;
documents: PapillonAttachment[];
};
nature: string;
/** In minutes. */
duration: number
duration: number;
}

export interface PapillonObservation {
id: string
date: number
sectionName: string
sectionType: PapillonObservationType
subjectName?: string
shouldParentsJustify: boolean
reasons: [string | null]
id: string;
date: number;
sectionName: string;
sectionType: PapillonObservationType;
subjectName?: string;
shouldParentsJustify: boolean;
reasons: (string | null)[];
}

export enum PapillonObservationType {
Expand Down

0 comments on commit 74d2360

Please sign in to comment.