import { Json } from "../interfaces";
import { CancelToken } from "axios";
/**
 * Define query parameters.
 */
export interface QueryParams {
    [key: string]: string | string[];
}
/**
 * Define http headers
 */
export interface HTTPHeaders {
    [key: string]: string;
}
/**
 * Defines an HTTP method.
 */
export declare type HTTPMethod = "POST" | "GET" | "PUT" | "DELETE" | "PATCH";
/**
 * Defines an http request error.
 */
export interface HTTPError {
    message: string;
    code?: string;
}
/**
 * Holds response data from the server.
 */
export interface Response {
    error?: HTTPError;
    data?: Json | Array<Json>;
    status?: number;
    headers?: HTTPHeaders;
}
/**
 * Defines the server configuration
 */
export interface ServerConfig {
    headers?: HTTPHeaders;
    timeout?: number;
    baseurl?: string;
    retries?: number;
    token?: Token;
}
/**
 * Defines the configuration for the request object.
 */
export interface RequestConfig {
    retries?: number;
    headers?: HTTPHeaders;
    data?: Json | File | FormData;
    queryParams?: QueryParams;
    onUploadProgress?: UploadProgress;
    cancelToken?: CancelToken;
}
/**
 * Token interface
 */
export interface Token {
    tokenString: string;
    exp: Date;
}
export interface TokenPayload {
    exp: number;
}
export interface UploadProgress {
    onUploadProgress: (progressEvent: {
        loaded: number;
        total: number;
    }) => void;
}
