import { WebApiConfiguration } from '../core/web-api-configuration'; import { WebApiContext } from '../core/web-api-context'; /** * @export * @interface CallOptions */ export interface CallOptions { url: string; method?: string; params?: any; data?: any; } /** * @export * @interface Response */ export interface Response { data?: any; status?: number; headers?: any; config?: any; } /** * @export * @abstract * @class WebApiClient * @implements {PathSegment} */ export declare abstract class WebApiClient implements PathSegment { config: WebApiConfiguration; sharedContext: WebApiContext; private apiBasePath; static GlobalRequestHeaders: any; /** * Creates an instance of WebApiClient. * @param {WebApiConfiguration} config * @param {string} basePath * * @memberOf WebApiClient */ constructor(config: WebApiConfiguration, basePath: string); /** * Returns Base URL for all resources in this client. * @returns {string} * * @memberOf WebApiClient */ getPath(): string; /** * Prepares request for API call * @param {string} url * @param {string} method * @param {any=} params * @param {any=} data * @param {any=} headers * @param {string} [responseType] * @returns {Promise} * * @memberOf WebApiClient */ callApi(url: string, method: string, params?: any, data?: any, headers?: any, responseType?: string): Promise; /** * @private * @param {string} url * @param {string} method * @param {any=} params * @param {any=} data * @param {any=} headers * @param {string=} responseType * @returns {any} * * @memberOf WebApiClient */ private makeCall(url, method, params?, data?, headers?, responseType?); private _ensureRightConfiguration; } /** * @export * @interface PathSegment */ export interface PathSegment { /** * @returns {string} * * @memberOf PathSegment */ getPath(): string; }