33 lines
886 B
TypeScript
33 lines
886 B
TypeScript
|
/*
|
||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||
|
* or more contributor license agreements. Licensed under the Elastic License;
|
||
|
* you may not use this file except in compliance with the Elastic License.
|
||
|
*/
|
||
|
|
||
|
import { ExpressionValueFilter } from '.';
|
||
|
|
||
|
export enum FilterType {
|
||
|
luceneQueryString = 'luceneQueryString',
|
||
|
time = 'time',
|
||
|
exactly = 'exactly',
|
||
|
}
|
||
|
|
||
|
export type CanvasTimeFilter = ExpressionValueFilter & {
|
||
|
filterType: typeof FilterType.time;
|
||
|
to: string;
|
||
|
from: string;
|
||
|
};
|
||
|
|
||
|
export type CanvasLuceneFilter = ExpressionValueFilter & {
|
||
|
filterType: typeof FilterType.luceneQueryString;
|
||
|
query: string;
|
||
|
};
|
||
|
|
||
|
export type CanvasExactlyFilter = ExpressionValueFilter & {
|
||
|
filterType: typeof FilterType.exactly;
|
||
|
value: string;
|
||
|
column: string;
|
||
|
};
|
||
|
|
||
|
export type CanvasFilter = CanvasTimeFilter | CanvasExactlyFilter | CanvasLuceneFilter;
|