UNPKG

@docsvision/webclient

Version:

Type definitions for DocsVision WebClient scripts and extensions.

18 lines (17 loc) 1.17 kB
import { RequestOptions } from '@docsvision/webclient/Legacy/Utils'; import { ICommonResponse } from "@docsvision/webclient/System/ICommonResponse"; import { RequestMethods } from "@docsvision/webclient/System/IRequestInfo"; export interface IRequestManager { get<TResponse>(url: string, options?: RequestOptions): Promise<TResponse>; post<TResponse>(url: string, data: any, options?: RequestOptions): Promise<TResponse>; rawRequest(url: string, data: any, method: RequestMethods, routeChangeProtection?: boolean): Promise<XMLHttpRequest>; readonly busy: boolean; processRawResponse<T>(rawResponse: any, showSuccessNotification?: boolean, options?: RequestOptions): ICommonResponse<T>; processResponse<T>(response: ICommonResponse<T>, showSuccessNotification?: boolean, options?: RequestOptions): void; processErrorResponse(httpRequest: XMLHttpRequest): any; processRequestComplete(httpRequest: any, successCallback: any, routeTimestamp?: number): boolean; } export declare type $RequestManager = { requestManager: IRequestManager; }; export declare const $RequestManager: string | ((model?: $RequestManager) => IRequestManager);