@atrysglobal/babel-ripper
Version:
Interface and strict typing toolkit for accessing the BABEL unified translation service.
29 lines (28 loc) • 1.03 kB
TypeScript
import { AxiosInstance } from 'axios';
export interface AxiosInstanceParams {
apiKey: string;
baseURL: string;
timeout?: number;
}
export declare abstract class BabelProxyHttp {
/**
* Receives basic communication values with babel service
* and builds axios admissible configuration object.
*
* @param {string} baseURL - Babel API backend address.
* @param {number} timeout - Response timeout (client side).
*
* @returns {AxiosRequestConfig} - Axios configuration object.
*/
private static resolveInstanceConfig;
/**
* Creates and provides an Axios instance to communicate
* with Babel's translation service.
*
* @param {string} apiKey - Authentication API Key with Babel service.
* @param {string} baseURL - Babel API backend address.
* @param {number} timeout - Response timeout (client side).
* @returns {AxiosInstance}
*/
static getAxiosInstance({ apiKey, baseURL, timeout, }: AxiosInstanceParams): AxiosInstance;
}