declare global { const kils: kils_sdk.kils type file = kils_sdk.file type list = kils_sdk.list type json = kils_sdk.json type peer = kils_sdk.peer type base = kils_sdk.base function JsonRecover(dst: any, src: any); interface Number { Mysql(): kils_sdk.mysql; Guest(): kils_sdk.Socket; AsTxt(): string; Cloud(): kils_sdk.cloud; Email(to: string[], title: string, body: string, attachment?: kils_sdk.form): boolean; } interface String { Json(): json; Byte(): ArrayBuffer; Atob(): ArrayBuffer; Wget(): ArrayBuffer | null; Sign(val: string): string; Wait(expire: number): void; Gget(): string; Gset(val: string, expire: number): void; Http(header?: json): kils_sdk.http; Tree(ext: boolean): json; File(auth?: kils_sdk.auth | boolean): file; Exec(peer: peer): string | null; Call(path: string, data: ArrayBuffer): ArrayBuffer | null; Cert(pass: string, Extra?: string): kils_sdk.cert | null; } interface ArrayBuffer { Hex(): string; Md5(): string; Char(): string; Btoa(): string; Rand(range?: string): ArrayBuffer; } namespace kils_sdk { const enum ENV { SDK_Version = "4.0.0.2073813" } interface base { Handle(peer: peer): void; } interface json extends Object { [key: number | string]: any } interface list extends Array { [index: number]: any; get length(): number } interface form { Set(name: string, data: string | file | ArrayBuffer): void; Get(name: string): any; Has(name: string): boolean; } interface file { Name(): string; Size(): number; Lock(sort: number, flag: number): boolean; Save(data: form | file | ArrayBuffer): boolean; Remove(): boolean; } interface zip { Free(): void List(): string[] Read(name:string):file; Save(name: string, file: file): boolean; } interface query { Insert(...args: any): number | null; Update(...args: any): number | null; Number(...args: any): number | null; String(...args: any): string | null; Select(...args: any): Array | null; } interface http { Read(url: string, attachment: form | null): ArrayBuffer | null; Save(url: string, attachment: form | null, target: file): boolean; } interface Socket { } interface mysql { Dts(): string Ver(): string Close() DBSet(jons: ArrayBuffer): boolean Qurey(i: number | string): query Backup(name: string): file Recover(jons: ArrayBuffer): boolean NewQuery(sql: string): query } interface auth { (path: string, sort: number, flag: number, cok: cookie): boolean; } interface cloud { Sms(to: string[], args: string[]): boolean; Face(BankCard: string, Phone: string, Name: string, IdCard: string): boolean; Read(url: string): ArrayBuffer | null; Write(url: string, data: ArrayBuffer): boolean; Earse(url: string): boolean; UpLoad(url: string, file: file): boolean; Archive(url: string, form: form): boolean; DownLoad(url: string, file: file): boolean; } interface cert { Pfx: ArrayBuffer Hash: ArrayBuffer Extra: string } interface cookie { Clear(): void; GetIdx(): number; GetVar(key: string): string; SetIdx(v: number): void; SetVar(key: string, val: string): void; SetRand(v: string): void; ChkRand(v: string): boolean; SessionID(): string; } interface peer { Cookie: cookie; Header(key: string, val: string): void; Result(msg: any, err?: number): void; Stream(data: form | file | ArrayBuffer | null, filename?: string): void; ReqAddr(): string[]; ReqHost(): string; ReqCert(): cert | null; ReqFile(): file | null; ReqJson(): json | null; ReqHeader(key: string): string; } interface kils { Version: string; NulFile: file NulJson: json NulList: list Data(obj: file): ArrayBuffer | null; Exit(): void; Form(): form; Echo(...args: any): void; Zipr(file: file, pass?: string): zip | null; Timer(next: number, freq: number): number; Global(keys: string[]): json; } } } export { };