import { type DateAttributeGranularity } from "@gooddata/sdk-model"; declare const WIRE_ABSOLUTE_GRANULARITIES: readonly ["GDC.time.date", "GDC.time.month", "GDC.time.quarter", "GDC.time.year"]; /** * Granularities an absolute date filter can express on the wire as a period literal. */ export type WireAbsoluteGranularity = (typeof WIRE_ABSOLUTE_GRANULARITIES)[number]; /** * Granularities whose ranges can be sent as period literals rather than as days. */ export type PeriodLiteralGranularity = Exclude; export declare function isWireAbsoluteGranularity(granularity: DateAttributeGranularity | undefined): granularity is WireAbsoluteGranularity; /** * Tells whether an absolute date filter at the granularity can be sent as period literals rather than * as its days. */ export declare function hasPeriodLiteral(granularity: DateAttributeGranularity | undefined): granularity is PeriodLiteralGranularity; /** * Converts a day into the literal of the period of the given granularity that contains it. */ export declare function toPeriodLiteral(granularity: WireAbsoluteGranularity, day: string): string; /** * Converts a period literal into the first and the last day of that period. */ export declare function fromPeriodLiteral(granularity: WireAbsoluteGranularity, literal: string): { first: string; last: string; }; /** * Converts a range of days into the literals of its first and last period of the given granularity. * * @returns undefined when a day is not in the YYYY-MM-DD format or the range is not whole periods */ export declare function toWholePeriodLiterals(granularity: PeriodLiteralGranularity, from: string, to: string): { from: string; to: string; } | undefined; export {}; //# sourceMappingURL=absoluteGranularityLiterals.d.ts.map