@elastic/elasticsearch
Advanced tools
Comparing version 6.8.0 to 6.8.1
@@ -23,3 +23,3 @@ /* | ||
import { EventEmitter } from 'events'; | ||
import { SecureContextOptions } from 'tls'; | ||
import { ConnectionOptions as TlsConnectionOptions } from 'tls'; | ||
import Transport, { | ||
@@ -35,2 +35,3 @@ ApiResponse, | ||
} from './lib/Transport'; | ||
import { URL } from 'url'; | ||
import Connection, { AgentOptions, agentFn } from './lib/Connection'; | ||
@@ -77,4 +78,18 @@ import ConnectionPool, { ResurrectEvent } from './lib/ConnectionPool'; | ||
interface NodeOptions { | ||
url: URL; | ||
id?: string; | ||
agent?: AgentOptions; | ||
ssl?: TlsConnectionOptions; | ||
headers?: anyObject; | ||
roles?: { | ||
master: boolean; | ||
data: boolean; | ||
ingest: boolean; | ||
ml: boolean; | ||
} | ||
} | ||
interface ClientOptions { | ||
node?: string | string[]; | ||
node?: string | string[] | NodeOptions | NodeOptions[]; | ||
nodes?: string | string[]; | ||
@@ -95,3 +110,3 @@ Connection?: typeof Connection; | ||
compression?: 'gzip'; | ||
ssl?: SecureContextOptions; | ||
ssl?: TlsConnectionOptions; | ||
agent?: AgentOptions | agentFn; | ||
@@ -595,3 +610,4 @@ nodeFilter?: nodeFilterFn; | ||
ClientOptions, | ||
NodeOptions, | ||
ClientExtendsCallbackOptions | ||
}; |
@@ -25,3 +25,3 @@ /* | ||
import * as http from 'http'; | ||
import { SecureContextOptions } from 'tls'; | ||
import { ConnectionOptions as TlsConnectionOptions } from 'tls'; | ||
@@ -32,3 +32,3 @@ export declare type agentFn = () => any; | ||
url: URL; | ||
ssl?: SecureContextOptions; | ||
ssl?: TlsConnectionOptions; | ||
id?: string; | ||
@@ -64,3 +64,3 @@ headers?: any; | ||
url: URL; | ||
ssl: SecureContextOptions | null; | ||
ssl: TlsConnectionOptions | null; | ||
id: string; | ||
@@ -67,0 +67,0 @@ headers: any; |
@@ -234,3 +234,3 @@ /* | ||
return { | ||
url: this.url, | ||
url: stripAuth(this.url.toString()), | ||
id: this.id, | ||
@@ -248,3 +248,3 @@ headers: this.headers, | ||
return { | ||
url: this.url, | ||
url: stripAuth(this.url.toString()), | ||
id: this.id, | ||
@@ -251,0 +251,0 @@ headers: this.headers, |
@@ -7,3 +7,3 @@ { | ||
"homepage": "http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html", | ||
"version": "6.8.0", | ||
"version": "6.8.1", | ||
"keywords": [ | ||
@@ -10,0 +10,0 @@ "elasticsearch", |
1107194
28912