UNPKG

ecoledirecte.js

Version:

Good-looking client for EcoleDirecte's private API.

43 lines (42 loc) 1.43 kB
import { Account } from "../accounts"; export declare function toISODate(date: Date | string | number): string; /** * * @description Makes bytes human-readable */ export declare function formatBytes(bytes: number): string; export declare function makeRequest(options: { method: "GET" | "POST"; path: string; body?: Record<string, unknown>; guard?: boolean; teachRoot?: boolean; expectBuffer?: boolean; }, context?: Record<string, unknown>, account?: Account, token?: string): Promise<any>; export declare const USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"; export declare const EdHeaders: { authority: string; accept: string; "accept-language": string; "content-type": string; origin: string; "sec-fetch-dest": string; "sec-fetch-mode": string; "sec-fetch-site": string; referer: string; "user-agent": string; }; export type FullConfig = { root: string; rootp: string; addedHeaders: Record<string, string>; }; export type PartialConfig = Partial<FullConfig>; export declare const DefaultConfig: FullConfig; export declare class ConfigConstructor { source: PartialConfig; static instance: ConfigConstructor; constructor(source?: PartialConfig); get<K extends keyof FullConfig>(key: K): FullConfig[K]; } export declare const Config: ConfigConstructor;