UNPKG

@atomic-utils/clients

Version:
19 lines (18 loc) 784 B
import { AxiosError, AxiosPromise, AxiosRequestConfig, AxiosRequestHeaders, Method } from 'axios'; import { IOptions } from './options'; /** * Oracle client */ export declare class BaseClient { opts: IOptions; constructor(opts: IOptions); request(method: Method, endpoint: string, params?: IParams, data?: IParams, headers?: AxiosRequestHeaders): Promise<any>; axiosCall(config: AxiosRequestConfig): AxiosPromise<any>; get(endpoint: string, params?: IParams, headers?: AxiosRequestHeaders): any; post(endpoint: string, params?: IParams, headers?: AxiosRequestHeaders): any; put(endpoint: string, params?: IParams, headers?: AxiosRequestHeaders): any; handleError: (error: AxiosError) => void; } export interface IParams { [x: string]: unknown; }