diff --git a/packages/cubejs-client-core/index.d.ts b/packages/cubejs-client-core/index.d.ts index 1483af07dfb61..ea4c875466392 100644 --- a/packages/cubejs-client-core/index.d.ts +++ b/packages/cubejs-client-core/index.d.ts @@ -943,10 +943,22 @@ declare module '@cubejs-client/core' { format?: 'currency' | 'percent'; }; - export type TCubeDimension = BaseCubeMember & { + export type CubeTimeDimensionGranularity = { + name: string; + title: string; + } + + export type BaseCubeDimension = BaseCubeMember & { primaryKey?: boolean; suggestFilterValues: boolean; - }; + } + + export type CubeTimeDimension = BaseCubeDimension & + { type: 'time'; granularities?: CubeTimeDimensionGranularity[] }; + + export type TCubeDimension = + (BaseCubeDimension & { type: Exclude }) | + CubeTimeDimension; export type TCubeSegment = Omit;