import { PagingInfo } from './Pagination';
export interface IApiResponse<T> {
    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<T> extends IApiResponse<T> {
    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<any>;
    post: (props: PostProps) => Promise<any>;
    put: (props: PutProps) => Promise<any>;
    patch: (props: PatchProps) => Promise<any>;
    destroy: (props: DestroyProps) => Promise<any>;
};
export {};
