import { When } from "./When.js"; export interface SelectTarget { query?: SelectQuery[]; pivot?: SelectTarget; select?: Select[]; value?: unknown; all?: boolean; hits?: number | null; limit?: number | null; format?: SelectFormat; pattern?: string; collate?: boolean; comment?: string; context?: number | null; distinct?: boolean; negate?: boolean; removeNulls?: boolean; waitfor?: boolean; when?: When; } export interface Select extends SelectTarget { name?: string; repeated?: boolean; required?: boolean; type?: SelectType; union?: SelectTarget[]; } export type SelectType = "string" | "number" | "boolean" | "object"; export type SelectQuery = [string, ...SelectQueryOp[]]; export type SelectQueryOp = [string, ...unknown[]]; export type SelectQueryOperator = string; export type SelectQueryOperand = unknown; export type SelectFormat = "href" | "multiline" | "singleline" | "innertext" | "textcontent" | "none"; export type SelectOn = "any" | "all" | "none";