import type Question from "../../metabase-lib/v1/Question";
import type { DashCardId, DashboardId, Dataset, VisualizationSettings } from "../../metabase-types/api";
import type { DownloadsState, State } from "../../metabase-types/store";
export interface DownloadQueryResultsOpts {
    type: string;
    question: Question;
    result: Dataset;
    enableFormatting?: boolean;
    enablePivot?: boolean;
    dashboardId?: DashboardId;
    dashcardId?: DashCardId;
    uuid?: string;
    token?: string;
    params?: Record<string, unknown>;
    visualizationSettings?: VisualizationSettings;
}
export type ResourceType = "question" | "dashcard" | "ad-hoc-question";
export type ResourceAccessedVia = "internal" | "public-link" | "static-embed" | "interactive-iframe-embed" | "sdk-embed";
export type DownloadedResourceInfo = {
    resourceType: ResourceType;
    accessedVia: ResourceAccessedVia;
};
export declare const downloadQueryResults: import("@reduxjs/toolkit").AsyncThunk<void, DownloadQueryResultsOpts, {
    state?: unknown;
    dispatch?: import("@reduxjs/toolkit").ThunkDispatch<unknown, unknown, import("@reduxjs/toolkit").UnknownAction> | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare const downloadDataset: import("@reduxjs/toolkit").AsyncThunk<{
    id: number;
    name: string;
}, {
    opts: DownloadQueryResultsOpts;
    id: number;
}, {
    state?: unknown;
    dispatch?: import("@reduxjs/toolkit").ThunkDispatch<unknown, unknown, import("@reduxjs/toolkit").UnknownAction> | undefined;
    extra?: unknown;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export declare function getDatasetDownloadUrl(url: string, params?: URLSearchParams | string): string;
export declare const getDownloads: (state: State) => DownloadsState;
export declare const hasActiveDownloads: (state: State) => boolean;
export declare const clearAll: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"metabase/downloads/clearAll">;
export declare const reducer: import("@reduxjs/toolkit").Reducer<DownloadsState>;
