import moment from 'moment-timezone'; import { QueryDateRange, TimeSeriesOptions } from '@cubejs-backend/shared'; import { BaseQuery } from './BaseQuery'; export declare class Granularity { private readonly query; readonly granularity: string; readonly granularityInterval: string; readonly queryTimezone: string; readonly granularityOffset: string | undefined; origin: moment.Moment; private readonly predefinedGranularity; constructor(query: BaseQuery, timeDimension: any); private fixOriginForWeeksIfNeeded; isPredefined(): boolean; /** * @returns origin date string in Query timezone */ originLocalFormatted(): string; /** * @returns origin date string in UTC timezone */ originUtcFormatted(): string; minGranularity(): string; timeSeriesForInterval(dateRange: QueryDateRange, options?: TimeSeriesOptions): QueryDateRange[]; resolvedGranularity(): string; /** * Returns the smallest granularity for the granularityInterval */ granularityFromInterval(): string; /** * Returns the smallest granularity for the granularityOffset */ granularityFromOffset(): string; /** * Returns the smallest granularity for the provided interval string * Interval may be presented as `1 year 2 months 3 weeks 4 days 5 hours 6 minutes 7 seconds * It is important to bubble up from the smallest, as this is used e.g. for minimum rollup granularity */ private granularityFromIntervalString; isAlignedWithDateRange([startStr, endStr]: QueryDateRange): boolean; isNaturalAligned(): boolean; } //# sourceMappingURL=Granularity.d.ts.map