2021-05-03 19:42:26 +02:00
|
|
|
/*
|
|
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
|
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
|
|
* 2.0.
|
|
|
|
*/
|
|
|
|
|
|
|
|
import { ApiResponse } from '@elastic/elasticsearch/lib/Transport';
|
2021-06-08 15:06:06 +02:00
|
|
|
import { estypes } from '@elastic/elasticsearch';
|
2021-05-03 19:42:26 +02:00
|
|
|
import { IKibanaSearchRequest } from 'src/plugins/data/common';
|
|
|
|
import { ExpressionValueFilter } from '.';
|
|
|
|
export interface EssqlSearchStrategyRequest extends IKibanaSearchRequest {
|
|
|
|
count: number;
|
|
|
|
query: string;
|
|
|
|
params?: Array<string | number | boolean>;
|
|
|
|
timezone?: string;
|
|
|
|
filter: ExpressionValueFilter[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface EssqlSearchStrategyResponse {
|
|
|
|
columns: Array<{
|
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
meta: {
|
|
|
|
type: string;
|
|
|
|
};
|
|
|
|
}>;
|
|
|
|
rows: any[];
|
|
|
|
|
2021-06-08 15:06:06 +02:00
|
|
|
rawResponse: ApiResponse<estypes.SqlQueryResponse>;
|
2021-05-03 19:42:26 +02:00
|
|
|
}
|