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

fix: types & format

This commit is contained in:
James Cook 2024-05-28 13:39:04 +01:00
parent 731672f23a
commit 515ac76f22

View file

@ -113,7 +113,7 @@ export interface GetActivityOptions {
export interface ActivityPoint { export interface ActivityPoint {
id: number; id: number;
type: string; type: string;
polarity: "positive" | "blank" | "negative" | string & {}; polarity: "positive" | "blank" | "negative" | (string & {});
reason: string; reason: string;
score: number; score: number;
timestamp: string; timestamp: string;
@ -178,20 +178,20 @@ export interface ValidatedHomeworkAttachment {
* Teacher uploaded links * Teacher uploaded links
*/ */
export interface ValidatedLink { export interface ValidatedLink {
link: string; link: string;
validated_link: string; validated_link: string;
} }
/** /**
* User uploaded attachments * User uploaded attachments
*/ */
export interface StudentHomeworkAttachment { export interface StudentHomeworkAttachment {
id: number; id: number;
file_name: string; file_name: string;
file: string; file: string;
validated_file: string; validated_file: string;
teacher_note: string; teacher_note: string;
teacher_homework_attachments: unknown[]; teacher_homework_attachments: unknown[];
can_delete: boolean; can_delete: boolean;
} }
export interface Homework { export interface Homework {
lesson: string; lesson: string;
@ -214,10 +214,10 @@ export interface Homework {
mark_relative: number; mark_relative: number;
ticked: "yes" | "no"; ticked: "yes" | "no";
allow_attachments: boolean; allow_attachments: boolean;
allow_marking_completed: boolean; allow_marking_completed: boolean;
first_seen_date: string | null; first_seen_date: string | null;
last_seen_date: string | null; last_seen_date: string | null;
attachments: HomeworkAttachment[]; attachments: StudentHomeworkAttachment[];
has_feedback: boolean; has_feedback: boolean;
}; };
validated_links: ValidatedLink[]; validated_links: ValidatedLink[];
@ -396,10 +396,7 @@ export interface Announcement {
pupil_consents: unknown[]; pupil_consents: unknown[];
} }
export type AnnouncementsResponse = ClassChartsResponse< export type AnnouncementsResponse = ClassChartsResponse<Announcement[], []>;
Announcement[],
[]
>;
export interface Pupil extends Student { export interface Pupil extends Student {
school_name: string; school_name: string;
@ -446,7 +443,7 @@ export interface GetAttendanceOptions {
export interface AttendancePeriod { export interface AttendancePeriod {
code: string; code: string;
status: "present" | "ignore" | string & {}; status: "present" | "ignore" | (string & {});
late_minutes: number | string; late_minutes: number | string;
lesson_name?: string; lesson_name?: string;
room_name?: string; room_name?: string;