@daveyplate/supabase-swr-entities
Version:
An entity management library for Supabase and SWR
11 lines (10 loc) • 558 B
TypeScript
import { HTTP_METHOD } from "next/dist/server/web/http";
interface APIFunctions {
getAPI: (path: string) => Promise<Record<string, any>>;
postAPI: (path: string, body?: Record<string, any>) => Promise<Record<string, any>>;
patchAPI: (path: string, body?: Record<string, any>) => Promise<Record<string, any>>;
deleteAPI: (path: string) => Promise<Record<string, any>>;
requestAPI: (path: string, method: HTTP_METHOD, body?: Record<string, any>) => Promise<Record<string, any>>;
}
export declare function useAPI(): APIFunctions;
export {};