import { FsCancelToken } from './token';
export declare enum FsHttpMethod {
    GET = "GET",
    DELETE = "DELETE",
    HEAD = "HEAD",
    PURGE = "PURGE",
    OPTIONS = "OPTIONS",
    POST = "POST",
    PUT = "PUT",
    PATH = "PATH"
}
export interface FsRetryConfig {
    retry: number;
    onRetry?: (requestConfig: any) => void;
    retryMaxTime?: number;
    retryFactor?: number;
}
export interface FsAuthConfig {
    username: string;
    password: string;
}
export interface FsRequestHeaders {
    [name: string]: string;
}
export interface FsRequestParams {
    [name: string]: string | number;
}
/**
 * Request runtime data like retryCount etc
 */
export interface FsRequestRuntime {
    retryCount?: number;
    [name: string]: any;
}
export interface FsRequestOptions {
    url?: string;
    data?: any;
    method?: FsHttpMethod;
    mode?: RequestMode;
    cache?: RequestCache;
    redirect?: RequestRedirect;
    params?: FsRequestParams;
    filestackHeaders?: boolean;
    headers?: FsRequestHeaders;
    timeout?: number;
    cancelToken?: FsCancelToken;
    retry?: FsRetryConfig;
    onProgress?: (pr: ProgressEvent) => any;
    auth?: FsAuthConfig;
    runtime?: FsRequestRuntime;
}
export interface FsResponse {
    status: number;
    statusText: string;
    headers: any;
    data: any;
    config: FsRequestOptions;
}
