UNPKG

drizzle-cube

Version:

Drizzle ORM-first semantic layer with Cube.js compatibility. Type-safe analytics and dashboards with SQL injection protection.

29 lines (28 loc) 1.15 kB
import { default as React } from 'react'; import { CubeClient } from '../client/CubeClient'; import { CubeQueryOptions, CubeApiOptions, FeaturesConfig } from '../types'; import { CubeMeta, FieldLabelMap } from '../hooks/useCubeMeta'; interface CubeContextValue { cubeApi: CubeClient; options?: CubeQueryOptions; meta: CubeMeta | null; labelMap: FieldLabelMap; metaLoading: boolean; metaError: string | null; getFieldLabel: (fieldName: string) => string; refetchMeta: () => void; updateApiConfig: (apiOptions: CubeApiOptions, token?: string) => void; features: FeaturesConfig; } interface CubeProviderProps { cubeApi?: CubeClient; apiOptions?: CubeApiOptions; token?: string; options?: CubeQueryOptions; features?: FeaturesConfig; children: React.ReactNode; } export declare function CubeProvider({ cubeApi: initialCubeApi, apiOptions: initialApiOptions, token: initialToken, options, features, // Default to AI enabled for backward compatibility children }: CubeProviderProps): import("react/jsx-runtime").JSX.Element; export declare function useCubeContext(): CubeContextValue; export {};