todofordevs
Version:
CLI for TodoForDevs - A simple task management tool for developers
26 lines (25 loc) • 1.04 kB
TypeScript
import { AxiosInstance, AxiosRequestConfig } from 'axios';
declare let api: AxiosInstance;
export declare const endpoints: {
auth: {
login: () => string;
token: (deviceCode: string) => string;
verify: () => string;
};
projects: {
list: () => string;
get: (id: string) => string;
};
tasks: {
list: (projectId: string, params?: Record<string, string>) => string;
create: (projectId: string) => string;
get: (taskId: string) => string;
update: (taskId: string) => string;
delete: (taskId: string) => string;
};
};
export declare function get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
export declare function post<T = any, D = any>(url: string, data?: D, config?: AxiosRequestConfig): Promise<T>;
export declare function put<T = any, D = any>(url: string, data?: D, config?: AxiosRequestConfig): Promise<T>;
export declare function del<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
export default api;