export interface AgileResponse { data: DataType; timedout?: boolean; status: number; raw?: Response; type?: string | null; } export interface apiConfig { options: RequestInit; baseURL?: string; path?: string; timeout?: number; } export default class API { config: apiConfig; constructor(config?: apiConfig); /** * Get request */ get(endpoint: string, options?: RequestInit): Promise>; /** * Post request */ post(endpoint: string, payload?: any, options?: RequestInit): Promise>; /** * Put request */ put(endpoint: string, payload?: any, options?: RequestInit): Promise>; /** * Patch request */ patch(endpoint: string, payload?: any, options?: RequestInit): Promise>; /** * Delete request */ delete(endpoint: string, payload?: any, options?: RequestInit): Promise>; /** * @internal * Will handle the request */ private send; }