import type { MeetingRecord } from "./meeting-directory.js"; /** A stretch of time someone typed: from its start, up to but not including its end. */ export type MeetingDateRange = { from: Date; to: Date; }; /** * The time a query names, when the whole query is a date: "today", * "yesterday", a weekday (the latest one, today included; "last friday" is the * one before today), "this week", "last week", a month ("october", the latest * one), a day of a month ("30 oct", "oct 30", "30. oktober", with or without * a year), "30.10", "30.10.2026" or "2026-10-30". Null otherwise. */ export declare function meetingDateRange(query: string, now?: Date): MeetingDateRange | null; /** How the server found a meeting for the query. */ export type MeetingMatch = "words" | "person" | "date"; export type FoundMeeting = { meeting: MeetingRecord; match: MeetingMatch; }; export type RankedMeeting = { meeting: MeetingRecord; rank: number; loose: boolean; }; /** * Ranks meetings for a query. `known` are the newest meetings the menu already * holds (their titles match at once); `found` are the server's answers, each * with how it matched. A meeting keeps its best reason, and newer meetings win * ties. */ export declare function rankMeetings(known: readonly MeetingRecord[], found: readonly FoundMeeting[], query: string, range: MeetingDateRange | null): RankedMeeting[]; /** Meetings for the empty menu: the newest ones, without the one on screen. */ export declare function recentMeetings(known: readonly MeetingRecord[], currentMeetingId: string | null, limit: number): MeetingRecord[];