kibana/x-pack/plugins/canvas/types/filters.ts
Corey Robertson dbb603f979
[Canvas][tech-debt] Ensure cursor is called until full results are received (#73347)
* Ensure cursor is called until full results are receeived

* Fix Typecheck

* Convert dependencies to typescript

* Fix typings

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-31 09:21:47 -04:00

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;