mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-11-04 03:28:28 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			547 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			547 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?: T | object): Promise<RequestResponse<T>>;
 | 
						|
  post<T>(url: string, data: T | object | any): Promise<RequestResponse<T>>;
 | 
						|
  put<T>(url: string, data: T | object): Promise<RequestResponse<T>>;
 | 
						|
  patch<T>(url: string, data: T | object): Promise<RequestResponse<T>>;
 | 
						|
  delete<T>(url: string, data?: T | object): Promise<RequestResponse<T>>;
 | 
						|
}
 |