mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-05-24 01:12:54 -04:00
17 lines
539 B
TypeScript
17 lines
539 B
TypeScript
import { AxiosResponse } from "axios";
|
|
|
|
interface RequestResponse<T> {
|
|
response: AxiosResponse<T> | null;
|
|
data: T | null;
|
|
error: any;
|
|
}
|
|
|
|
export interface ApiRequestInstance {
|
|
get<T>(url: string, data?: object): Promise<RequestResponse<T>>;
|
|
post<T>(url: string, data: object): Promise<RequestResponse<T>>;
|
|
put<T>(url: string, data: object): Promise<RequestResponse<T>>;
|
|
patch<T>(url: string, data: object): Promise<RequestResponse<T>>;
|
|
delete<T>(url: string, data: object): Promise<RequestResponse<T>>;
|
|
}
|
|
|