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

feat: announcements meta response

This commit is contained in:
James Cook 2023-09-14 19:38:21 +01:00
parent bb986b71a8
commit 45ef7c7ce9
2 changed files with 6 additions and 4 deletions

View file

@ -276,7 +276,7 @@ export class BaseClient {
method: "GET", method: "GET",
}, },
) )
).data; );
} }
/** /**
* Gets the current student's detentions * Gets the current student's detentions

View file

@ -361,12 +361,14 @@ export interface Announcement {
priority_pinned: "yes" | "no"; priority_pinned: "yes" | "no";
requires_consent: "yes" | "no"; requires_consent: "yes" | "no";
can_change_consent: boolean; can_change_consent: boolean;
consent: string | null; consent: unknown | null;
pupil_consents: Array<unknown>; pupil_consents: Array<unknown>;
} }
// TODO: Update typings to include meta response. Currently not possible since I don't have access export type AnnouncementsResponse = ClassChartsResponse<
export type AnnouncementsResponse = Array<Announcement>; Array<Announcement>,
[]
>;
export interface Pupil extends Student { export interface Pupil extends Student {
school_name: string; school_name: string;