/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { Formatters } from "@elaraai/east-ui-components"; import { type OutlineLine } from "./model/cards.js"; import { type QueryWords } from "./model/words.js"; import type { QueryRoot } from "./one-shot.js"; import { type SavedQuery } from "./session.js"; /** What a saved query, or a recent run, is here. */ export interface QueryAbout { /** * The data source its steps start from; for a program that is not steps, * the first its root reads — else the first bound. */ readonly source: string; /** Its description: the author's, else the sentence generated from its steps; `undefined` when there is neither. */ readonly description: string | undefined; /** Why it can't open here, in the builder's words; `undefined` when it can. */ readonly refusal: string | undefined; /** Its steps: how many, and one outline line per finished step; `undefined` for a program that is not steps. */ readonly steps: { readonly count: number; readonly outline: readonly OutlineLine[]; } | undefined; /** How many problems it has here: the errors its check finds. */ readonly problems: number; /** The first, in plain words; `undefined` when it has none. */ readonly problem: string | undefined; /** What it gives, in words — "Up to 10 shipped orders"; `undefined` while it has problems. */ readonly gives: string | undefined; } /** * What a saved query, or a recent run, is against a root: its steps parsed * and checked once (`Query Editor Spec.md` §4.10, §5). * * @param saved - The saved query, or the run * @param root - The root the surface's data sources make * @param words - The words * @returns What it is here */ export declare function queryAbout(saved: SavedQuery, root: QueryRoot, words: QueryWords): QueryAbout; /** * When a query was saved, or a run ran, in a card's words — "14:02" today, * "Tue" within the last six days, "Sep 12" this year, else "Sep 12, 2025" — * in the viewer's locale and time zone. * * @param at - When * @param now - The moment it is read at * @param formatters - The locale's formatters * @returns The words */ export declare function whenWords(at: Date, now: Date, formatters: Formatters): string; //# sourceMappingURL=about.d.ts.map