UNPKG

@heknon/node-webtop

Version:

A Backend for an unofficial WebTop (SmartSchool - Israel) API.

102 lines (101 loc) 2.75 kB
export interface SchoolHour { from: Time; to: Time; } export interface Lesson { teacherName: string; subjectName: string; level: number; room: string | number; lessonStartTime: Time; lessonEndTime: Time; lessonSchoolBeginHour: number; } export interface Time { hour: number; minute: number; } export interface Class { grade: number; number: number; level: number; } export interface PersonalDetails { email: string; cellphone: string; emailUponUpdate: boolean | number; canReverifiedEmail: boolean; showMyCellphone: boolean | number; showMyEmail: boolean | number; } export interface PushNotifications { pushNotification_messages: number; pushNotification_timetableChanges: number; pushNotification_timetableChangesEvents: number; pushNotification_timetableChangesTests: number; pushNotification_timetableChangesGeneralMessages: number; pushNotification_discipline: number; pushNotification_homework: number; pushNotification_grades: number; pushNotification_periodGrades: number; pushNotification_matriculationGrades: number; } export interface WebtopSecurityData { securityId: string; securityValue: string; } export interface GradeResponse { eventName: string; eventType: string; date: string; subject: string; teacher: string; grade: string; } export interface EventResponse { hourNum: string; hourEnd: string; hourName: string; hourEndName: string; hourType: string; description: string; room: string; } export interface HomeworkResponse { subject: string; /** * Name of hour, formatted as: from-to hourNum || 09:45-10:30 3 */ hourName: string; hour: string; status: string; lessonSubject: string; homeWork: string; } export interface LessonResponse { /** * Class number in day */ hourNum: string; /** * Name of hour, formatted as: from-to hourNum || 09:45-10:30 3 */ hourName: string; /** * Example: * 'אסמבלר, שטרקמן צבי, חדר: 218' * ClassName, TeacherName, Room: RoomNum */ hourData: string[]; } export interface WebTopUserData { id: number; key: string; name: string; type: string; } export declare type WebTopUsersResponse = Promise<WebTopUserData[]>; export declare type GradesResponse = Promise<GradeResponse[]>; export declare type LessonsResponse = Promise<LessonResponse[]>; export declare type EventsResponse = Promise<EventResponse[]>; export declare type AllHomeworkResponse = Promise<HomeworkResponse[]>;