From f396791a8f8705d7bc29f86007df15a5bed111c8 Mon Sep 17 00:00:00 2001 From: Uros Smolnik Date: Wed, 6 Jul 2016 15:27:37 -0700 Subject: [PATCH 1/2] elasticsearch: added existsType and putMaaping --- elasticsearch/elasticsearch.d.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/elasticsearch/elasticsearch.d.ts b/elasticsearch/elasticsearch.d.ts index 5b7ba8055c..4eb44759f4 100644 --- a/elasticsearch/elasticsearch.d.ts +++ b/elasticsearch/elasticsearch.d.ts @@ -38,6 +38,8 @@ declare module Elasticsearch { create(params: IndicesCreateParams): PromiseLike; exists(params: IndicesIndexExitsParams, callback: (error: any, response: any, status: any) => void): void; exists(params: IndicesIndexExitsParams): PromiseLike; + existsType(params: IndicesIndexExitsParams & {type: string}, callback: (error: any, response: any, status: any) => void): void; + existsType(params: IndicesIndexExitsParams & {type: string}): PromiseLike; get(params: IndicesGetParams, callback: (error: any, response: any, status: any) => void): void; get(params: IndicesGetParams): PromiseLike; getAlias(params: IndicesGetAliasParams, callback: (error: any, response: any, status: any) => void): void; @@ -46,6 +48,8 @@ declare module Elasticsearch { putAlias(params: IndicesPutAliasParams): PromiseLike; putTemplate(params: IndicesPutTemplateParams, callback: (error: any, response: any) => void): void; putTemplate(params: IndicesPutTemplateParams): PromiseLike; + putMapping(params: IndicesPutMappingParams, callback: (error: any, response: any) => void): void; + putMapping(params: IndicesPutMappingParams): PromiseLike; refresh(params: IndicesRefreshParams, callback: (error: any, response: any) => void): void; refresh(params: IndicesRefreshParams): PromiseLike; } @@ -125,6 +129,17 @@ declare module Elasticsearch { body: string | any; } + export interface IndicesPutMappingParams extends GenericParams { + timeout?: Date | number; + masterTimeout?: Date | number; + ignoreUnavailable?: boolean; + allowNoIndices?: boolean; + expandWildcards?: string; + updateAllTypes?: boolean; + index: string | string[] | boolean; + type: string; + } + export interface IndicesGetAliasParams extends GenericParams { ignoreUnavailable?: boolean; allowNoIndices?: boolean; From 9878f5ecee5292c5c413f8d64e223b145de6e93c Mon Sep 17 00:00:00 2001 From: Uros Smolnik Date: Thu, 7 Jul 2016 15:17:28 -0700 Subject: [PATCH 2/2] elasticsearch: expandWildcards type --- elasticsearch/elasticsearch.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticsearch/elasticsearch.d.ts b/elasticsearch/elasticsearch.d.ts index 4eb44759f4..d32b2a8845 100644 --- a/elasticsearch/elasticsearch.d.ts +++ b/elasticsearch/elasticsearch.d.ts @@ -134,7 +134,7 @@ declare module Elasticsearch { masterTimeout?: Date | number; ignoreUnavailable?: boolean; allowNoIndices?: boolean; - expandWildcards?: string; + expandWildcards?: "open" | "closed" | "none" | "all"; updateAllTypes?: boolean; index: string | string[] | boolean; type: string; @@ -143,7 +143,7 @@ declare module Elasticsearch { export interface IndicesGetAliasParams extends GenericParams { ignoreUnavailable?: boolean; allowNoIndices?: boolean; - expandWildcards?: string; + expandWildcards?: "open" | "closed" | "none" | "all"; local?: boolean; index?: string | string[] | boolean; name: string | string[] | boolean; @@ -275,7 +275,7 @@ declare module Elasticsearch { export interface SuggestParams extends GenericParams { ignoreUnavailable?: boolean; allowNoIndices?: boolean; - expandWildcards?: string; + expandWildcards?: "open" | "closed" | "none" | "all"; preference?: string; routing?: string; source?: string;