import { type AbsoluteDate } from '../../../../../api/search/date/date-format.js'; import { type RelativeDate } from '../../../../../api/search/date/relative-date.js'; import type { FacetValueState } from '../../../../../features/facets/facet-api/value.js'; import type { DateRangeRequest } from '../../../../../features/facets/range-facets/date-facet-set/interfaces/request.js'; export type DateRangeInput = AbsoluteDate | RelativeDate; export interface DateRangeOptions { /** * The starting value for the date range. A date range can be either absolute or [relative](https://docs.coveo.com/en/headless/latest/reference/documents/Search.DateFacet.relative-date-format.html). */ start: DateRangeInput; /** * The ending value for the date range. A date range can be either absolute or [relative](https://docs.coveo.com/en/headless/latest/reference/documents/Search.DateFacet.relative-date-format.html). */ end: DateRangeInput; /** * Whether to include the end value in the range. * * @defaultValue `false` */ endInclusive?: boolean; /** * The current facet value state. * * @defaultValue `idle` */ state?: FacetValueState; /** * Allows specifying a custom string date format. See [Day.js](https://day.js.org/docs/en/parse/string-format#list-of-all-available-parsing-tokens) for possible parsing tokens. Assumes [ISO 8601](https://day.js.org/docs/en/parse/string) format by default. */ dateFormat?: string; } /** * Creates a `DateRangeRequest`. * * @param config - The options with which to create a `DateRangeRequest`. * @returns A new `DateRangeRequest`. */ export declare function buildDateRange(config: DateRangeOptions): DateRangeRequest;