diff --git a/elasticsearch/elasticsearch.d.ts b/elasticsearch/elasticsearch.d.ts index 5b7ba8055c..d32b2a8845 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,10 +129,21 @@ declare module Elasticsearch { body: string | any; } + export interface IndicesPutMappingParams extends GenericParams { + timeout?: Date | number; + masterTimeout?: Date | number; + ignoreUnavailable?: boolean; + allowNoIndices?: boolean; + expandWildcards?: "open" | "closed" | "none" | "all"; + updateAllTypes?: boolean; + index: string | string[] | boolean; + type: string; + } + 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; @@ -260,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;