import { WeavyClient } from './weavy';
import { Constructor } from '../types/generic.types';
import { FetchOptions, HeaderContentType, HttpMethodType, HttpUploadMethodType } from '../types/http.types';
export interface WeavyFetchProps {
    /**
     * Gets defaulted fetch options that includes authorization headers for the current user.
     *
     * @param options { FetchOptions } - Any RequestInit compatible fetch options that should be defaulted and updated with current Authorization.
     * @param authorized { boolean } - Whether to embed authorization token for the endpoint. Set to `false` for any endpoint that doesn't require authorization. Defaults to `true`.
     * @returns {Promise<RequestInit>} Options for Fetch or Request
     */
    fetchOptions: (options?: FetchOptions, authorized?: boolean) => Promise<RequestInit>;
    /**
     * Fetch data from the Web API. Includes token handling and acts on behalf of the current user.
     *
     * @param url { string | URL } - The URL to the Web API endpoint. Note: Only Web API URL:s are supported.
     * @param options { FetchOptions } Optional RequestInit compatible fetch options. Note that `method` is limited to "GET" | "POST" | "PUT" | "DELETE" | "PATCH".
     * @returns { Promise<Response> } A standard fetch() Response
     */
    fetch: (url: string | URL, options?: FetchOptions) => Promise<Response>;
    /**
     * Upload data to the Web API using a progress callback function to monitor the progress.
     *
     * @param url { string | URL } - The URL to the Web API endpoint. Note: Only Web API URL:s are supported.
     * @param method { "POST" | "PUT" | "PATCH" } - The http method to use.
     * @param body { string | FormData } - The data to send.
     * @param [contentType] {HeaderContentType} - Optional content type of the body. Defaults to "application/json;charset=utf-8"
     * @param onProgress {(progress: number) => void} Callback function for the progress. The progress parameter is provided as 0-100 percent.
     * @returns { Promise<Response> } A standard fetch() Response
     */
    upload: (url: string | URL, method: HttpUploadMethodType, body: string | FormData, contentType?: HeaderContentType, onProgress?: (progress: number) => void) => Promise<Response>;
    /**
     * Gets an Web API URL and returns a Response.
     *
     * @deprecated Use .fetch(url) instead.
     * @param url { string | URL } - The URL to the API endpoint.
     * @returns { Promise<Response> } A standard fetch() Response
     */
    get: (url: string | URL) => Promise<Response>;
    /**
     * Posts data to the Web API and returns a Response.
     *
     * @deprecated Use .fetch(url, options) instead.
     * @param url {string | URL} - The URL of the API endpoint
     * @param method { "GET" | "POST" | "PUT" | "DELETE" | "PATCH" } - The http method to use.
     * @param [body] {BodyInit} - The body data to send. JSON must be encoded as a string.
     * @param [contentType] {HeaderContentType} - The content type of the body. Defaults to "application/json;charset=utf-8".
     * @returns { Promise<Response> } A standard fetch() Response
     */
    post: (url: string | URL, method: HttpMethodType, body?: BodyInit, contentType?: HeaderContentType) => Promise<Response>;
}
export declare const WeavyFetchMixin: <TBase extends Constructor<WeavyClient>>(Base: TBase) => {
    new (...args: any[]): {
        fetchOptions(this: /*elided*/ any & WeavyClient & import('./weavy').StrictWeavyOptions & import('./settings').WeavySettingsProps & import('./network').WeavyNetworkProps & import('./authentication').WeavyAuthenticationProps & import('./localization').WeavyLocalizationProps & import('./connection').WeavyConnectionProps & import('./query').WeavyQueryProps & import('./version').WeavyVersionProps & WeavyFetchProps & import('./styles').WeavyStylesProps & import('./realtime').WeavyRealtimeProps & import('./api').WeavyApiProps & import('./context').WeavyContextProviderProps, options?: FetchOptions, authorized?: boolean): Promise<RequestInit>;
        fetch(this: /*elided*/ any & WeavyClient & import('./weavy').StrictWeavyOptions & import('./settings').WeavySettingsProps & import('./network').WeavyNetworkProps & import('./authentication').WeavyAuthenticationProps & import('./localization').WeavyLocalizationProps & import('./connection').WeavyConnectionProps & import('./query').WeavyQueryProps & import('./version').WeavyVersionProps & WeavyFetchProps & import('./styles').WeavyStylesProps & import('./realtime').WeavyRealtimeProps & import('./api').WeavyApiProps & import('./context').WeavyContextProviderProps, url: string | URL, options?: FetchOptions, retry?: boolean): Promise<Response>;
        upload(this: /*elided*/ any & WeavyClient & import('./weavy').StrictWeavyOptions & import('./settings').WeavySettingsProps & import('./network').WeavyNetworkProps & import('./authentication').WeavyAuthenticationProps & import('./localization').WeavyLocalizationProps & import('./connection').WeavyConnectionProps & import('./query').WeavyQueryProps & import('./version').WeavyVersionProps & WeavyFetchProps & import('./styles').WeavyStylesProps & import('./realtime').WeavyRealtimeProps & import('./api').WeavyApiProps & import('./context').WeavyContextProviderProps, url: string | URL, method: HttpUploadMethodType, body: string | FormData, contentType?: HeaderContentType, onProgress?: (progress: number) => void, retry?: boolean): Promise<Response>;
        get(this: /*elided*/ any & WeavyClient & import('./weavy').StrictWeavyOptions & import('./settings').WeavySettingsProps & import('./network').WeavyNetworkProps & import('./authentication').WeavyAuthenticationProps & import('./localization').WeavyLocalizationProps & import('./connection').WeavyConnectionProps & import('./query').WeavyQueryProps & import('./version').WeavyVersionProps & WeavyFetchProps & import('./styles').WeavyStylesProps & import('./realtime').WeavyRealtimeProps & import('./api').WeavyApiProps & import('./context').WeavyContextProviderProps, url: string | URL): Promise<Response>;
        post(this: /*elided*/ any & WeavyClient & import('./weavy').StrictWeavyOptions & import('./settings').WeavySettingsProps & import('./network').WeavyNetworkProps & import('./authentication').WeavyAuthenticationProps & import('./localization').WeavyLocalizationProps & import('./connection').WeavyConnectionProps & import('./query').WeavyQueryProps & import('./version').WeavyVersionProps & WeavyFetchProps & import('./styles').WeavyStylesProps & import('./realtime').WeavyRealtimeProps & import('./api').WeavyApiProps & import('./context').WeavyContextProviderProps, url: string | URL, method: HttpMethodType, body?: BodyInit, contentType?: HeaderContentType): Promise<Response>;
        readonly weavySid: string;
        readonly weavyId: string;
        readonly host: HTMLElement;
        cloudFilePickerUrl: string | URL;
        disableEnvironmentImports: boolean;
        gcTime: number;
        scrollBehavior: "smooth" | "instant" | "auto";
        staleTime: number;
        tokenFactoryRetryDelay: number;
        tokenFactoryTimeout: number;
        "__#16@#resolveUrl"?: (url: URL) => void;
        "__#16@#whenUrl": Promise<unknown>;
        whenUrl(): Promise<void>;
        "__#16@#url"?: URL;
        get url(): URL | undefined;
        set url(url: string | URL | null | undefined);
        readonly cachePrefix: string;
        reset(): Promise<void>;
        "__#16@#isDestroyed": boolean;
        readonly isDestroyed: boolean;
        destroy(): void;
    };
} & TBase;
//# sourceMappingURL=fetch.d.ts.map