From 9066f77e0ea39a5515f15d9ce1178d378f266173 Mon Sep 17 00:00:00 2001 From: veloii <85405932+veloii@users.noreply.github.com> Date: Mon, 27 May 2024 22:24:06 +0100 Subject: [PATCH] types: added user homework attachment + homework link types --- src/types.ts | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/types.ts b/src/types.ts index 7163d75..9661af4 100644 --- a/src/types.ts +++ b/src/types.ts @@ -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; + 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[];