import { PagingInfo } from './Pagination'; export interface IApiResponse { data: T; error?: IErrorObject | IServerError; page_info?: PagingInfo; errors?: string[]; id: number | string; type: string; } export type IServerError = string; export interface IErrorObject { message: string; code: string; param?: string; } export interface IApiResponseCollection extends IApiResponse { page_info: PagingInfo; } interface GetProps { authToken: string; endpoint: string; params?: any; signal?: AbortSignal; headers?: HeadersInit; } interface PostProps { authToken?: string; endpoint: string; body?: any; params?: any; signal?: AbortSignal; headers?: HeadersInit; } interface PutProps { authToken: string; endpoint: string; body?: any; params?: any; signal?: AbortSignal; } interface PatchProps { authToken: string; endpoint: string; body?: any; params?: any; signal?: AbortSignal; } interface DestroyProps { authToken: string; endpoint: string; params?: any; signal?: AbortSignal; } export declare const Api: () => { get: (props: GetProps) => Promise; post: (props: PostProps) => Promise; put: (props: PutProps) => Promise; patch: (props: PatchProps) => Promise; destroy: (props: DestroyProps) => Promise; }; export {};