/** * TypeScript shapes of the ES|QL and PromQL language definition JSON * generated by the Elasticsearch docs tooling and synced into * `elasticsearch/` by the grammar sync CI job. */ export interface CommandOutputColumn { type: string; default?: boolean; } export interface CommandOutputDefinition { /** `'none'` or the dimension that selects a variant. */ vary_by: string; /** Name of the command parameter that selects the active variant, if any. */ selected_by?: string; /** Map of variant name. */ variants: Record>; } /** A single item from `elasticsearch/esql//definition/commands/`. */ export interface CommandDefinition { name: string; /** License tier required for the command, e.g. `'PLATINUM'`. */ license?: string; observabilityTier?: string; /** Output column metadata for commands that produce a fixed set of columns. */ output?: CommandOutputDefinition; } export interface ParamHint { kind: string; entityType?: string; allowedValues?: string[]; constraints?: Record; } export interface SignatureParam { name: string; type: string; optional: boolean; /** * Present only in PromQL definitions, where it varies per signature. For * ES|QL definitions it is identical across all signatures of a definition * and lives in the docs modules instead. */ description?: string; hint?: ParamHint; /** Named map-parameter descriptors in the upstream pseudo-format, kept verbatim. */ mapParams?: string; } export interface Signature { params: SignatureParam[]; variadic: boolean; returnType: string; /** License tier required for this specific signature, e.g. `'PLATINUM'`. */ license?: string; } export interface DefinitionDocs { description: string; examples?: string[]; note?: string; /** * ES|QL only: parameter descriptions by parameter name. */ params?: Record; } /** A single item from `elasticsearch/esql//definition/functions/`. */ export interface FunctionDefinition { /** Function kind: 'scalar' | 'agg' | 'grouping' | etc. */ type: string; name: string; signatures: Signature[]; preview: boolean; snapshotOnly: boolean; license?: string; observabilityTier?: string; tsdbCompatible?: boolean; } /** A single item from `elasticsearch/esql//definition/operators/`. */ export interface OperatorDefinition { /** The operator symbol as written in queries, e.g. `'+'`, `'::'`, `'IN'`. */ operator: string; name: string; titleName?: string; signatures: Signature[]; preview: boolean; snapshotOnly: boolean; } /** A single item from `elasticsearch/esql//definition/settings/` — a `SET` command setting. */ export interface SettingDefinition { name: string; /** Accepted value types, e.g. `['boolean', 'map_param']`. */ type: string[]; description: string; serverlessOnly: boolean; preview: boolean; snapshotOnly: boolean; /** Named map-parameter descriptors in the upstream pseudo-format, kept verbatim. */ mapParams?: string; } export type InlineCastMap = Record; /** A single item from `elasticsearch/promql//definition/functions/`. */ export interface PromqlFunctionDefinition { /** Function kind: 'value_transformation' | 'within_series' | ... */ type: string; name: string; signatures: Signature[]; snapshotOnly: boolean; } /** A single item from `elasticsearch/promql//definition/operators/`. */ export interface PromqlOperatorDefinition { /** Operator kind: 'operator' | 'label_matching_operator' | ... */ type: string; /** The operator symbol as written in queries, e.g. `'+'`, `'=~'`. */ operator: string; name: string; signatures: Signature[]; snapshotOnly: boolean; } //# sourceMappingURL=definition_types.d.ts.map