Skip to content

Latest commit

 

History

History
248 lines (145 loc) · 4.61 KB

modules.md

File metadata and controls

248 lines (145 loc) · 4.61 KB

@ceajs/core / Exports

@ceajs/core

Table of contents

Namespaces

Type aliases

Variables

Functions

Type aliases

CookieRawObject

Ƭ CookieRawObject: Object

Index signature

▪ [K: string]: string

Defined in

src/types/cookie.ts:3


SchoolConf

Ƭ SchoolConf: Object

Index signature

▪ [school: string]: SchoolConfOpts

Defined in

src/types/conf.ts:24


SchoolConfOpts

Ƭ SchoolConfOpts: Object

Type declaration

Name Type
authOrigin string
captchaAuthMode CaptchaAuthMode
chineseName string
defaultAddr string
edgeCase SchoolEdgeCase
isCloud boolean
loginURL? string
preAuthURL string

Defined in

src/types/conf.ts:28


StringKV

Ƭ StringKV: Object

Index signature

▪ [key: string]: string

Defined in

src/types/helper.ts:1


UserConfOpts

Ƭ UserConfOpts: Object

Type declaration

Name Type
addr [""] | [string, string, string]
alias string
captcha? "MANUAL" | "OCR"
password string
retry? number
school string
signedDataMonth? `${number}-${number}`
username string

Defined in

src/types/conf.ts:13


UsersConf

Ƭ UsersConf: Object

Type declaration

Name Type
localEdgeCasesFile? string
notifier? [`${number}`, string, string]
users UserConfOpts[]

Defined in

src/types/conf.ts:8

Variables

log

log: LogRouter

Defined in

src/utils/logger.ts:28

Functions

cookieParse

cookieParse(host, headers): CookieMap

Parse http response headers' cookie

Parameters

Name Type
host string
headers Headers

Returns

CookieMap

Defined in

src/utils/cookie-helper.ts:7


cookieStr

cookieStr(host, cookieMap): string

Construct a cookie object based on host

Parameters

Name Type
host string
cookieMap CookieMap

Returns

string

Defined in

src/utils/cookie-helper.ts:50


getSchoolInfos

getSchoolInfos(__namedParameters): Promise<SchoolConf | null>

Parameters

Name Type
__namedParameters UsersConf

Returns

Promise<SchoolConf | null>

Defined in

src/conf.ts:31


handleCookie

handleCookie(): Promise<void>

Iterate through all users: complete unified auth -> store cookie

Returns

Promise<void>

Defined in

src/index.ts:32


loadConfFromToml

loadConfFromToml(customFilePath?): UsersConf | null

Parameters

Name Type
customFilePath? string

Returns

UsersConf | null

Defined in

src/conf.ts:15