import xhrConnector from "./connector/http/xhrConnector"; import httpConnector from "./connector/http/httpConnector"; import { KyofuucObject, KyofuucEnvironment } from "./helper"; import { Config, WsConfig, HttpConfig, transformRequestData, transformResponseData, WsConnection, WsConnector } from "./types"; import { Ws, IWs, Http, IHttp, WsState, EventQueue, Interceptor, HandlerType } from "./core"; import { CacheManager, MapCacheManager, CookieCacheManager, StorageCacheManager, LocalStorageCacheManager, SessionStorageCacheManager } from "./cachemanager"; import { MissingCacheError, InvalidParameterError, NoEventFoundWithIdError, UnregisteredRequestTypeError, UnregisteredResponseTypeError, NoSufficientCacheSpaceLeftError } from "./exception"; export declare class Ffs implements IHttp, IWs { Ws: typeof Ws; Ffs: typeof Ffs; Http: typeof Http; Utils: { Buffer: BufferConstructor; buildCacheKey(config: HttpConfig): string; presentElseImport(item: any, actual: Function, fallback: Function): any; safeStringify(obj: any, indent?: number): string; getCalculateAndSetStorageSize(storage: Storage): number; getStorageEntries(storage: Storage, cb: (key: string, value: any) => void): void; storageSpaceUsed(storage: Storage): number; getCookieEntries(document: { cookie: string; }, cb: (key: string, value: string) => void): void; cookieSpaceUsed(document: { cookie: string; }): number; addCookie(document: { cookie: string; }, options: { name: string; value: string; expires?: Date; path?: string; }): void; removeCookie(document: { cookie: string; }, name: string): void; getCookie(document: { cookie: string; }, name: string): string | undefined; randomString(length?: number, characters?: string): string; isArray(val: any): val is any[]; isURLSearchParams(val: any): boolean; isDate(val: any): boolean; isObject(val: any): boolean; forEach(obj: any, fn: Function): void; cherryPick(obj: KyofuucObject, cherryPicks: string[], remove?: boolean, rebuilds?: KyofuucObject): KyofuucObject; mergeObjects(obj1: KyofuucObject, obj2: KyofuucObject, cherryPicks?: string[]): KyofuucObject; encodeParamURI(val: string): string; isAbsoluteURL(url: string): boolean; isRelativeURL(url: string): boolean; combineUrls(baseUrl: string, relativeUrl: string): string; buildFullUrl(config: Config, stripAuth?: boolean): string | undefined; stripAuthFromUrl(fullUrl: string): string; buildUrlWithQuery(url: string, query: KyofuucObject | URLSearchParams, querySerializer?: import("./types").QuerySerializer): string; buildUrlWithQueryFromConfig(config: Config): string | undefined; basicAuthFromUrl(fullUrl: string): { username: string; password: string; } | undefined; parseUrl(url: string): URL; isFunction(val: any): boolean; isStream(val: any): boolean; isString(val: any): val is string; isPlainObject(val: any): boolean; isArrayBuffer(val: any): boolean; isFormData(val: any): boolean; kyofuucError(message: string | Error, config: Config, code: import("./helper").ErrorCode, request?: any, response?: import("./types").Response): any; envIsNodeJs(): boolean; resolveResponse(response: import("./types").Response, resolve: (result: import("./types").Response) => void, reject: (result: Error) => void): void; toArrayBuffer(buffer: Buffer): ArrayBuffer; stripBOM(content: string): string; stringifyAuth(auth?: import("./types").BasicAuth): string | undefined; envIsBrowser(): boolean; toBase64(value: string): string; fromBase64(value: string): string; trim(str: string): string; length(str: any): any; parseHeaders(headers: string): KyofuucObject; addMsToDate(date: Date, ms: number): Date; dateDiffInMs(date1: Date, date2: Date): number; }; Method: { GET: string; PUT: string; POST: string; HEAD: string; PATCH: string; DELETE: string; OPTIONS: string; }; private _ws; WsState: typeof WsState; Defaults: { VERSION: string; MaxObjectEntrySize: number; ENVIRONMENT: KyofuucEnvironment; MaxCookieLength: number; MaxStorageSpace: number; defaultHttpConnector(): any; getDefaultWSConnector(): any; wsConfig(config: WsConfig): WsConfig; httpConfig(config: HttpConfig): HttpConfig; }; http: any; private _http; https: any; EventQueue: typeof EventQueue; RequestType: { TEXT: string; JSON: string; STREAM: string; BUFFER: string; RAW_TEXT: string; RAW_JSON: string; FORM_DATA: string; ARRAY_BUFFER: string; URL_SEARCH_PARAMS: string; }; Interceptor: typeof Interceptor; HandlerType: typeof HandlerType; xhrConnector: typeof xhrConnector; ResponseType: { TEXT: string; JSON: string; STREAM: string; BUFFER: string; RAW_TEXT: string; RAW_JSON: string; NOCONTENT: string; ARRAY_BUFFER: string; }; httpConnector: typeof httpConnector; WebSocket: any; EventQueueType: { HTTP_REQUEST: string; }; MapCacheManager: typeof MapCacheManager; CompressionType: { GZIP: string; UNZIP: string; BROTLI: string; GUNZIP: string; INFLATE: string; DEFLATE: string; COMPRESS: string; }; RequestProcessor: { _RegisteredTransformers: KyofuucObject; register(type: string, transformer: import("./types").RequestTransformer): void; unregister(type: string): void; transform(type: string, data: any): { buffer: Buffer | string; contentType: string; }; }; ResponseProcessor: { _RegisteredTransformers: KyofuucObject>; register(type: string, transformer: import("./types").ResponseTransformer): void; unregister(type: string): void; transform(type: string, data: any): { data: any; contentType?: string; }; }; MissingCacheError: typeof MissingCacheError; XMLHttpRequest: any; CookieCacheManager: typeof CookieCacheManager; StorageCacheManager: typeof StorageCacheManager; CompressionProcessor: { _RegisteredCompressTransformers: KyofuucObject; _RegisteredDecompressTransformers: KyofuucObject; register(type: string, flow: import("./types").Flow, transformer: import("./types").CompressionTransformer): void; unregister(type: string, flow: import("./types").Flow): void; transform(type: string, flow: import("./types").Flow): import("stream").Stream; }; transformRequestData: typeof transformRequestData; transformResponseData: typeof transformResponseData; InvalidParameterError: typeof InvalidParameterError; NoEventFoundWithIdError: typeof NoEventFoundWithIdError; LocalStorageCacheManager: typeof LocalStorageCacheManager; SessionStorageCacheManager: typeof SessionStorageCacheManager; UnregisteredRequestTypeError: typeof UnregisteredRequestTypeError; UnregisteredResponseTypeError: typeof UnregisteredResponseTypeError; NoSufficientCacheSpaceLeftError: typeof NoSufficientCacheSpaceLeftError; constructor(config?: HttpConfig | WsConfig); static init(config?: HttpConfig | WsConfig): Ffs; init(config?: HttpConfig | WsConfig): Ffs; setEnvironment(env: KyofuucEnvironment): void; getConfig(type?: "HTTP" | "WS"): any; updateConfig(newConfig: Config | HttpConfig | WsConfig, merge?: boolean): void; getUrl(config: HttpConfig): string; queueRequest(config: HttpConfig): void; retryRequests(cache?: CacheManager): Promise; get(url: string, config?: HttpConfig | undefined): Promise; head(url: string, config?: HttpConfig | undefined): Promise; delete(url: string, config?: HttpConfig | undefined): Promise; options(url: string, config?: HttpConfig | undefined): Promise; put(url: string, data: any, config?: HttpConfig | undefined): Promise; post(url: string, data: any, config?: HttpConfig | undefined): Promise; patch(url: string, data: any, config?: HttpConfig | undefined): Promise; request(urlOrConfig: string | HttpConfig, config?: HttpConfig | undefined): Promise; ws(config: WsConfig): IWs; close(): void; getState(): WsState; getBufferedAmount(): number; sendMessage(message: any): void; getLastReconnectionCount(): number; getBinaryType(): string | undefined; setBinaryType(binaryType: string): void; reconnect(connector?: WsConnector | undefined): IWs; getConnection(): WsConnection | undefined; connect(urlOrConfig: string | WsConfig, config?: WsConfig | undefined): IWs; onOpen(cb: (ws: IWs, event: any, options?: KyofuucObject | undefined) => void, options?: KyofuucObject | undefined): void; onClose(cb: (ws: IWs, event: any, options?: KyofuucObject | undefined) => void, options?: KyofuucObject | undefined, always?: boolean): void; onError(cb: (ws: IWs, error: Error, options?: KyofuucObject | undefined) => void, options?: KyofuucObject | undefined): void; onStateChange(cb: (ws: IWs, state: WsState, options?: KyofuucObject | undefined) => void, options?: KyofuucObject | undefined): void; onMessage(cb: (ws: IWs, event: any, message: any, options?: KyofuucObject | undefined) => void, options?: KyofuucObject | undefined): void; } export * from "./core"; export * from "./types"; export * from "./helper"; export * from "./exception"; export * from "./cachemanager"; export * from "./connector/http/xhrConnector"; export * from "./connector/http/httpConnector"; export declare const ffs: Ffs; export default ffs;