import { Language } from '@skolplattformen/curriculum' ; import { EventEmitter } from 'events' ; import { DateTime } from 'luxon' ; import { LoginStatusChecker } from './loginStatus' ; import { CalendarItem , Classmate , MenuItem , NewsItem , Notification , User , Skola24Child , EtjanstChild , TimetableEntry , ScheduleItem , SchoolContact , Teacher } from './types' ; export interface Api extends EventEmitter { isFake : boolean ; isLoggedIn : boolean ; getPersonalNumber ( ) : string | undefined ; login ( personalNumber ? ) : Promise < LoginStatusChecker > ; setSessionCookie ( sessionCookie ) : Promise < void > ; getSessionHeaders ( url ) : Promise < { [ index ] : string ; } > ; getUser ( ) : Promise < User > ; getChildren ( ) : Promise < EtjanstChild [ ] > ; getCalendar ( child ) : Promise < CalendarItem [ ] > ; getClassmates ( child ) : Promise < Classmate [ ] > ; getNews ( child ) : Promise < NewsItem [ ] > ; getNewsDetails ( child , item ) : Promise < any > ; getMenu ( child ) : Promise < MenuItem [ ] > ; getNotifications ( child ) : Promise < Notification [ ] > ; getTeachers ( child ) : Promise < Teacher [ ] > ; getSchedule ( child , from , to ) : Promise < ScheduleItem [ ] > ; getSchoolContacts ( child ) : Promise < SchoolContact [ ] > ; getSkola24Children ( ) : Promise < Skola24Child [ ] > ; getTimetable ( child , week , year , lang ) : Promise < TimetableEntry [ ] > ; logout ( ) : Promise < void > ; }