import { AnalyticsFormat, InferParams, InferResultByFormat, QueryKey, UseAnalyticsQueryOptions, UseAnalyticsQueryResult } from "./types.js"; //#region src/react/hooks/use-analytics-query.d.ts /** * Subscribe to an analytics query over SSE and returns its latest result. * Integration hook between client and analytics plugin. * * The return type is automatically inferred based on the format: * - `format: "JSON_ARRAY"` (default): Returns typed array from QueryRegistry * - `format: "ARROW_STREAM"`: Returns TypedArrowTable with row type preserved * * Note: User context execution is determined by query file naming: * - `queryKey.obo.sql`: Executes as user (OBO = on-behalf-of / user delegation) * - `queryKey.sql`: Executes as service principal * * @param queryKey - Analytics query identifier * @param parameters - Query parameters (type-safe based on QueryRegistry) * @param options - Analytics query settings including format * @returns Query result state with format-appropriate data type * * @example JSON format (default) * ```typescript * const { data } = useAnalyticsQuery("spend_data", params); * // data: Array<{ group_key: string; cost_usd: number; ... }> | null * ``` * * @example Arrow format * ```typescript * const { data } = useAnalyticsQuery("spend_data", params, { format: "ARROW_STREAM" }); * // data: TypedArrowTable<{ group_key: string; cost_usd: number; ... }> | null * ``` */ declare function useAnalyticsQuery(queryKey: K, parameters?: InferParams | null, options?: UseAnalyticsQueryOptions): UseAnalyticsQueryResult>; //#endregion export { useAnalyticsQuery }; //# sourceMappingURL=use-analytics-query.d.ts.map