import type { ObjectOrInterfaceDefinition, ObjectSet, QueryDefinition, SimplePropertyDef, WhereClause } from "@osdk/api";
import { type UseOsdkListResult } from "@osdk/react";
import type { SortingState } from "@tanstack/react-table";
import type { ColumnDefinition, ObjectSetOptions } from "../ObjectTableApi.js";
export interface UseObjectTableDataProps<
	Q extends ObjectOrInterfaceDefinition,
	RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,
	FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>
> {
	/** The object or interface type to load rows for. */
	objectOrInterfaceType: Q;
	/**
	* Column definitions. Used to extract derived-property (`rdp`) and
	* function-column locators so the correct `withProperties` / function data
	* is fetched. Optional — omit to load the type's base properties only.
	*/
	columnDefinitions?: Array<ColumnDefinition<Q, RDPs, FunctionColumns>>;
	/** Server-side `where` clause applied to the query. */
	filter?: WhereClause<Q, RDPs>;
	/** TanStack sorting state, converted to an OSDK `orderBy` internally. */
	sorting?: SortingState;
	/**
	* A pre-built object set to page through instead of fetching by type. When
	* provided, rows come from this set (filter / ordering still applied).
	*/
	objectSet?: ObjectSet<Q>;
	/** Extra options forwarded to `useObjectSet` when `objectSet` is provided. */
	objectSetOptions?: ObjectSetOptions<Q>;
	/**
	* Minimum interval between duplicate requests, in milliseconds.
	* @default 60000
	*/
	dedupeIntervalMs?: number;
	/**
	* Number of rows to request per page.
	* @default 50
	*/
	pageSize?: number;
	/** Whether to subscribe to live updates for the loaded objects. */
	streamUpdates?: boolean;
}
export interface UseObjectTableDataResult<
	Q extends ObjectOrInterfaceDefinition,
	RDPs extends Record<string, SimplePropertyDef> = Record<string, never>
> extends Omit<UseOsdkListResult<Q, RDPs>, "isOptimistic"> {}
/**
* This hook is a wrapper that conditionally uses either useObjectSet or useOsdkObjects
* based on whether an objectSet prop is provided.
* It extracts RDP locators from columnDefinitions and applies withProperties
* to return data containing the derived properties.
*/
export declare function useObjectTableData<
	Q extends ObjectOrInterfaceDefinition,
	RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,
	FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>
>({ objectOrInterfaceType, columnDefinitions, filter, sorting, objectSet, objectSetOptions, dedupeIntervalMs, pageSize, streamUpdates }: UseObjectTableDataProps<Q, RDPs, FunctionColumns>): UseObjectTableDataResult<Q, RDPs>;
