refactor: adjust code after updated dependencies

Closes #39
This commit is contained in:
Jovan Krunić
2019-06-05 13:58:26 +02:00
committed by Rainer Killinger
parent 42c7350c36
commit 8b457c9911
24 changed files with 574 additions and 343 deletions

View File

@@ -15,7 +15,9 @@
*/
import {SCThingType} from '@openstapps/core';
import {SCThing} from '@openstapps/core';
import {NameList} from 'elasticsearch';
/* tslint:disable:completed-docs */ // TODO: document properties of interfaces
/**
* An elasticsearch bucket aggregation
* @see https://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-aggregations-bucket.html
@@ -60,9 +62,11 @@ export interface ElasticsearchObject<T extends SCThing> {
_source: T;
_type: string;
_version?: number;
fields?: any;
fields?: NameList;
// tslint:disable: no-any
highlight?: any;
inner_hits?: any;
// tslint:enable: no-any
matched_queries?: string[];
sort?: string[];
}
@@ -156,7 +160,7 @@ export interface ESBooleanFilter<T> {
export interface ESFunctionScoreQuery {
function_score: {
functions: ESFunctionScoreQueryFunction[];
query: ESBooleanFilter<any>;
query: ESBooleanFilter<unknown>;
score_mode: 'multiply';
};
}