1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 19:59:37 +00:00

fix: update incorrect student typings (#38)

This commit is contained in:
Veloi 2023-09-24 21:09:20 +01:00 committed by GitHub
parent b2af13c315
commit c8f7ab4fb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@ export interface Student {
is_disabled: boolean; is_disabled: boolean;
display_two_way_communications: boolean; display_two_way_communications: boolean;
display_absences: boolean; display_absences: boolean;
can_upload_attachments: string | null; can_upload_attachments: boolean | null;
display_event_badges: boolean; display_event_badges: boolean;
display_avatars: boolean; display_avatars: boolean;
display_concern_submission: boolean; display_concern_submission: boolean;
@ -123,10 +123,10 @@ export interface ActivityPoint {
custom_class: string | null; custom_class: string | null;
}; };
pupil_name: string; pupil_name: string;
lesson_name: string; lesson_name: string | null;
teacher_name: string; teacher_name: string;
room_name: string | null; room_name: string | null;
note: string; note: string | null;
_can_delete: boolean; _can_delete: boolean;
badges: string | undefined; badges: string | undefined;
detention_date: string | null; detention_date: string | null;
@ -138,7 +138,7 @@ export type ActivityResponseData = Array<ActivityPoint>;
interface ActivityResponseMeta { interface ActivityResponseMeta {
start_date: string; start_date: string;
end_date: string; end_date: string;
last_id: boolean; last_id: number | boolean;
step_size: string; step_size: string;
detention_alias_uc: string; detention_alias_uc: string;
} }
@ -192,8 +192,8 @@ export interface Homework {
mark_relative: number; mark_relative: number;
ticked: "yes" | "no"; ticked: "yes" | "no";
allow_attachments: boolean; allow_attachments: boolean;
first_seen_date: string; first_seen_date: string | null;
last_seen_date: string; last_seen_date: string | null;
attachments: Array<unknown>; attachments: Array<unknown>;
has_feedback: boolean; has_feedback: boolean;
}; };
@ -321,7 +321,7 @@ export interface Detention {
id: number; id: number;
name: string; name: string;
}; };
}; } | null;
lesson_pupil_behaviour: { lesson_pupil_behaviour: {
reason: string; reason: string;
}; };
@ -330,7 +330,7 @@ export interface Detention {
first_name: string; first_name: string;
last_name: string; last_name: string;
title: string; title: string;
}; } | null;
detention_type: { detention_type: {
name: string; name: string;
}; };
@ -424,7 +424,7 @@ export interface GetAttendanceOptions {
export interface AttendancePeriod { export interface AttendancePeriod {
code: string; code: string;
status: "present" | "ignore"; status: "present" | "ignore";
late_minutes: number; late_minutes: number | string;
lesson_name?: string; lesson_name?: string;
room_name?: string; room_name?: string;
} }
@ -435,7 +435,7 @@ export interface AttendanceMeta {
start_date: string; start_date: string;
end_date: string; end_date: string;
percentage: string; percentage: string;
percentage_since_august: string; percentage_singe_august: string;
} }
export type AttendanceData = Record<string, Record<string, AttendancePeriod>>; export type AttendanceData = Record<string, Record<string, AttendancePeriod>>;
@ -457,7 +457,7 @@ export type RewardsData = {
unable_to_purchase_reason: string; unable_to_purchase_reason: string;
once_per_pupil: boolean; once_per_pupil: boolean;
purchased: boolean; purchased: boolean;
purchased_count: string; purchased_count: string | number;
price_balance_difference: number; price_balance_difference: number;
}[]; }[];