1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 11:58:13 +00:00

style: add booleanhuman

This commit is contained in:
James Cook 2022-02-06 15:23:30 +00:00
parent 5fdd84622e
commit bc76946200
2 changed files with 15 additions and 14 deletions

View file

@ -21,7 +21,7 @@
"dist/**" "dist/**"
], ],
"devDependencies": { "devDependencies": {
"@types/node": "^17.0.13", "@types/node": "^17.0.15",
"@typescript-eslint/eslint-plugin": "^5.10.2", "@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2", "@typescript-eslint/parser": "^5.10.2",
"eslint": "^8.8.0", "eslint": "^8.8.0",

View file

@ -1,4 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
type BooleanHumean = "yes" | "no";
export interface Student { export interface Student {
id: number; id: number;
name: string; name: string;
@ -143,8 +144,8 @@ export interface Homework {
state: "not_completed" | "late" | "completed" | null; state: "not_completed" | "late" | "completed" | null;
mark: any | null; mark: any | null;
mark_relative: number; mark_relative: number;
ticked: "yes" | "no"; ticked: BooleanHumean;
allow_attachments: "yes" | "no"; allow_attachments: BooleanHumean;
first_seen_date: string; first_seen_date: string;
last_seen_date: string; last_seen_date: string;
attachments: Array<any>; attachments: Array<any>;
@ -212,7 +213,7 @@ export type BadgesResponse = Array<Badge>;
export interface Detention { export interface Detention {
id: number; id: number;
attended: "yes" | "no" | "upscaled" | "pending"; attended: BooleanHumean | "upscaled" | "pending";
date: string | null; date: string | null;
length: number | null; length: number | null;
location: string | null; location: string | null;
@ -223,9 +224,9 @@ export interface Detention {
first_name: string; first_name: string;
last_name: string; last_name: string;
school: { school: {
opt_notes_names: "yes" | "no"; opt_notes_names: BooleanHumean;
opt_notes_comments: "yes" | "no"; opt_notes_comments: BooleanHumean;
opt_notes_comments_pupils: "yes" | "no"; opt_notes_comments_pupils: BooleanHumean;
}; };
}; };
lesson: { lesson: {
@ -258,7 +259,7 @@ export interface Annoucement {
school_name: string; school_name: string;
teacher_name: string; teacher_name: string;
school_logo: string | null; school_logo: string | null;
sticky: "yes" | "no"; sticky: BooleanHumean;
state: string | null; state: string | null;
timestamp: string; timestamp: string;
attachments: Array<{ attachments: Array<{
@ -267,14 +268,14 @@ export interface Annoucement {
}>; }>;
for_pupils: Array<any>; for_pupils: Array<any>;
comment_visibility: string; comment_visibility: string;
allow_comments: "yes" | "no"; allow_comments: BooleanHumean;
allow_reactions: "yes" | "no"; allow_reactions: BooleanHumean;
allow_consent: "yes" | "no"; allow_consent: BooleanHumean;
priority_pinned: "yes" | "no"; priority_pinned: BooleanHumean;
requires_consent: "yes" | "no"; requires_consent: BooleanHumean;
can_change_consent: boolean; can_change_consent: boolean;
consent: string | null; consent: string | null;
pupil_consents: Array<any>; pupil_consents: Array<any>;
} }
export type AnnoucementsResponse = Array<Annoucement> export type AnnoucementsResponse = Array<Annoucement>;