diff --git a/src/index.d.ts b/src/index.d.ts index 394c117..98dd16a 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -317,7 +317,7 @@ declare namespace esb { * * @param {string} queryType */ - class Query { + export class Query { constructor(queryType: string); /** diff --git a/src/index.js b/src/index.js index 1867218..ea465fd 100644 --- a/src/index.js +++ b/src/index.js @@ -13,6 +13,7 @@ const { Rescore, InnerHits, SearchTemplate, + Query, util: { constructorWrapper } } = require('./core'); @@ -167,6 +168,9 @@ exports.requestBodySearch = constructorWrapper(RequestBodySearch); /* ============ ============ ============ */ /* ============== Queries =============== */ /* ============ ============ ============ */ +exports.Query = Query; +exports.query = constructorWrapper(Query); + exports.MatchAllQuery = MatchAllQuery; exports.matchAllQuery = constructorWrapper(MatchAllQuery);