import { type IInsightDefinition, type ObjRef } from "@gooddata/sdk-model"; import { type DataViewFacade, type GoodDataSdkError, type UseCancelablePromiseCallbacks, type UseCancelablePromiseState } from "@gooddata/sdk-ui"; import { type ICustomWidget } from "../../../model/types/layoutTypes.js"; /** * Configuration options for the {@link useCustomWidgetInsightDataView} hook. * * @public */ export interface IUseCustomWidgetInsightDataViewConfig { /** * Custom widget in the context of which the execution should be run. This affects which filters will be used. */ widget: ICustomWidget; /** * Insight to execute or a reference to it. * * @remarks * The filters will be automatically merged with the filters on the dashboard. * Note: When the insight is not provided, hook is locked in a "pending" state. */ insight?: IInsightDefinition | ObjRef; /** * Enable or disable real execution cancellation. * * This means that if the execution request is not yet finished and the execution changes, * the request will be cancelled and the new execution will be started. */ enableExecutionCancelling?: boolean; } /** * Callbacks for {@link useCustomWidgetInsightDataView} hook. * * @public */ export type UseCustomWidgetInsightDataViewCallbacks = UseCancelablePromiseCallbacks; /** * This hook provides an easy way to read a data view for an insight from a custom widget. * It resolves the appropriate filters for the widget based on the filters currently set on the whole dashboard. * * @public */ export declare function useCustomWidgetInsightDataView({ widget, insight, enableExecutionCancelling, onCancel, onError, onLoading, onPending, onSuccess }: IUseCustomWidgetInsightDataViewConfig & UseCustomWidgetInsightDataViewCallbacks): UseCancelablePromiseState; //# sourceMappingURL=useCustomWidgetInsightDataView.d.ts.map