///
import { LibBookRecord, LibFuzzySearchResult, Library, LibraryFloor, LibrarySeat, LibrarySection, LibRoomBookRecord, LibRoomRes, SocketStatus } from "./models/home/library";
import { Course } from "./models/home/report";
import { Form } from "./models/home/assessment";
import { NewsSlice, NewsSubscription, ChannelTag } from "./models/news/news";
import { ValidReceiptTypes } from "./lib/sports";
import { Priority } from "./lib/cr";
import { CrTimetable, SearchCoursePriorityQuery, SearchParams } from "./models/cr/cr";
import { BankPaymentByMonth } from "./models/home/bank";
import { CalendarData } from "./models/schedule/calendar";
import { BookChapter } from "./models/home/reserves-lib";
import { Invoice } from "./models/home/invoice";
import { LoginError } from "./utils/error";
import { Classroom, ClassroomStateResult } from "./models/home/classroom";
import { CardTransactionType } from "./models/card/transaction";
import { CardRechargeType } from "./models/card/recharge";
export declare class InfoHelper {
userId: string;
password: string;
/**
* Mock account and password.
*
* Due to various reasons, consumers of this library might hope to get
* some fake data, without literally making a request to the school
* website.
*
* We make this possible by creating an internal mocking account. The
* default userId and password of this account are both "8888", while you
* can change this behavior by modifying `helper.MOCK`.
*
* After you have logged in with the mocking account, almost every
* operation will respond with a fake value.
*
* You can easily get whether the user is using a mocking account by
* invoking `helper.mocked()`.
*/
MOCK: string;
/**
* We consider an account to be mocked if its userId and password are both "8888".
*/
mocked: () => boolean;
/**
* Returns whether the user is graduate.
*
* We detect a user's graduation status through the fifth digit (index 4) of his/her student ID.
*
* That is, we think a user is graduate iff the fifth digit of his/her student ID is 2 or 3.
*/
graduate: () => boolean;
/**
* Invoked before logging in.
*
* Override this value to customize.
*/
clearCookieHandler: () => Promise;
/**
* Invoked when a login error occurs.
*
* Override this value to customize.
*/
loginErrorHook: ((e: LoginError) => any) | undefined;
/**
* Login with userId and password.
*/
login: (auth: {
userId?: string;
password?: string;
}) => Promise;
/**
* Log out and clear fields `userId` and `password` of this `InfoHelper` instance
*/
logout: () => Promise;
/**
* THIS METHOD IS INTENDED FOR APP USE ONLY.
*
* ANY BREAKING CHANGES SHALL NOT BE DOCUMENTED.
*/
appStartUp: (platform: "ios" | "android") => Promise<{
bookingRecords: LibBookRecord[];
sportsReservationRecords: import("./models/home/sports").SportsReservationRecord[];
crTimetable: CrTimetable[];
balance: number;
latestAnnounces: import("./models/app/announcement").Announcement[];
latestVersion: import("./models/app/version").Version;
}>;
appUsageStat: (usage: number) => Promise;
getLatestAnnounces: () => Promise;
getLatestVersion: (platform: "ios" | "android") => Promise;
submitFeedback: (content: string, appversion: string, os: string, nickname: string, contact: string, phonemodel: string) => Promise;
getFeedbackReplies: () => Promise;
getWeChatGroupQRCodeContent: () => Promise;
getPrivacyUrl: () => string;
/**
* Switch the language.
*
* This will affect the language of data returned from some APIs.
*
* @param lang either "zh" or "en"
*/
switchLang: (lang: "zh" | "en") => Promise;
/**
* Get the user's full name and email name (i.e. username for email
* account)
*/
getUserInfo: () => Promise<{
fullName: string;
emailName: string;
}>;
/**
* A naive API that sends an email from the user's Tsinghua mail.
* @param subject Subject of email
* @param content Content of email
* @param recipient Recipient of email. Sending an email to multiple
* recipients is not supported yet.
*/
naiveSendMail: (subject: string, content: string, recipient: string) => Promise;
/**
* Get the school report of the user.
*
* @param bx a boolean indicating whether to contain only required and
* restricted courses (and omit elective courses)
* @param newGPA a boolean indicating whether to adopt the new GPA policy
* @param flag switch between first degree (1), second degree (2) and
* minor courses (3), defaults to 1
*
* Note that `bx` takes effect only if `flag` equals to `1`
*/
getReport: (bx: boolean, newGPA: boolean, flag?: number) => Promise;
/**
* Get the assessment list of teaching evaluation.
*
* @return An array of courses. Each course is represented with a
* three-element tuple, referring to name of course, whether
* the course has been evaluated and the url of its evaluation
* form (which can then be passed into `getAssessmentForm`.
*/
getAssessmentList: () => Promise<[string, boolean, string][]>;
/**
* Get the evaluation form of a course from its url.
* @param url the corresponding form url to the course to evaluate
*/
getAssessmentForm: (url: string) => Promise