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

types: added user homework attachment + homework link types

This commit is contained in:
veloii 2024-05-27 22:24:06 +01:00
parent 04b133da01
commit 9066f77e0e
No known key found for this signature in database

View file

@ -165,12 +165,34 @@ export interface GetHomeworkOptions {
*/
to?: string;
}
/**
* Teacher uploaded attachments
*/
export interface ValidatedHomeworkAttachment {
id: number;
file_name: string;
file: string;
validated_file: string;
}
/**
* Teacher uploaded links
*/
export interface ValidatedLink {
link: string;
validated_link: string;
}
/**
* User uploaded attachments
*/
export interface HomeworkAttachment {
id: number;
file_name: string;
file: string;
validated_file: string;
teacher_note: string;
teacher_homework_attachments: Array<unknown>;
can_delete: boolean;
}
export interface Homework {
lesson: string;
subject: string;
@ -192,12 +214,13 @@ export interface Homework {
mark_relative: number;
ticked: "yes" | "no";
allow_attachments: boolean;
allow_marking_completed: boolean;
first_seen_date: string | null;
last_seen_date: string | null;
attachments: unknown[];
attachments: HomeworkAttachment[];
has_feedback: boolean;
};
validated_links: unknown[];
validated_links: ValidatedLink[];
validated_attachments: ValidatedHomeworkAttachment[];
}
export type HomeworksResponseData = Homework[];