UNPKG

@devopness/sdk-js

Version:

Devopness API JS/TS SDK - Painless essential DevOps to everyone

33 lines (32 loc) 1.26 kB
import { AxiosResponse } from "axios"; export interface ConfigurationOptions { apiKey?: string; baseURL?: string; } export declare class Configuration implements ConfigurationOptions { apiKey?: string; baseURL: string; constructor(options: ConfigurationOptions); } export declare class ApiBaseService { private api; private static _accessToken; private static _onTokenExpired; static configuration: Configuration; private static SDK_VERSION; private defaultAxiosSettings; constructor(); private setupAxios; private setUserAgent; private setupAxiosRequestInterceptors; private setupAxiosResponseInterceptors; static get accessToken(): string; static set accessToken(value: string); static set onTokenExpired(callback: (accessToken: string) => void); protected isTokenExpired(response: AxiosResponse | undefined): boolean; baseURL(): string; protected post<T, B = undefined, R = AxiosResponse<T>>(endpoint: string, data?: B): Promise<R>; protected put<T, B, R = AxiosResponse<T>>(endpoint: string, data?: B): Promise<R>; protected delete<T, R = AxiosResponse<T>>(endpoint: string): Promise<R>; protected get<T, R = AxiosResponse<T>>(endpoint: string): Promise<R>; }