dsl-builder-test
Version:
OpenSearch Query Builder - Extract from OpenSearch Dashboards
19 lines (18 loc) • 868 B
TypeScript
import { IFieldType } from './types';
import { IndexPatternField } from './index_pattern_field';
import { FieldSpec, IndexPatternFieldMap } from '../types';
import { IndexPattern } from '../index_patterns';
export interface IIndexPatternFieldList extends Array<IndexPatternField> {
add(field: FieldSpec): void;
getAll(): IndexPatternField[];
getByName(name: IndexPatternField['name']): IndexPatternField | undefined;
getByType(type: IndexPatternField['type']): IndexPatternField[];
remove(field: IFieldType): void;
removeAll(): void;
replaceAll(specs: FieldSpec[]): void;
update(field: FieldSpec): void;
toSpec(options?: {
getFormatterForField?: IndexPattern['getFormatterForField'];
}): IndexPatternFieldMap;
}
export declare const fieldList: (specs?: FieldSpec[], shortDotsEnable?: boolean) => IIndexPatternFieldList;