@elastic/elasticsearch 7.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +5 -0
- package/LICENSE +202 -0
- package/README.md +232 -0
- package/api/api/async_search.js +141 -0
- package/api/api/autoscaling.js +147 -0
- package/api/api/bulk.js +70 -0
- package/api/api/cat.js +648 -0
- package/api/api/ccr.js +403 -0
- package/api/api/clear_scroll.js +55 -0
- package/api/api/close_point_in_time.js +50 -0
- package/api/api/cluster.js +420 -0
- package/api/api/count.js +64 -0
- package/api/api/create.js +69 -0
- package/api/api/dangling_indices.js +115 -0
- package/api/api/delete.js +65 -0
- package/api/api/delete_by_query.js +71 -0
- package/api/api/delete_by_query_rethrottle.js +60 -0
- package/api/api/delete_script.js +56 -0
- package/api/api/enrich.js +173 -0
- package/api/api/eql.js +150 -0
- package/api/api/exists.js +65 -0
- package/api/api/exists_source.js +74 -0
- package/api/api/explain.js +65 -0
- package/api/api/features.js +81 -0
- package/api/api/field_caps.js +55 -0
- package/api/api/fleet.js +65 -0
- package/api/api/get.js +65 -0
- package/api/api/get_script.js +56 -0
- package/api/api/get_script_context.js +50 -0
- package/api/api/get_script_languages.js +50 -0
- package/api/api/get_source.js +65 -0
- package/api/api/graph.js +72 -0
- package/api/api/ilm.js +317 -0
- package/api/api/index.js +71 -0
- package/api/api/indices.js +1753 -0
- package/api/api/info.js +50 -0
- package/api/api/ingest.js +200 -0
- package/api/api/license.js +188 -0
- package/api/api/logstash.js +125 -0
- package/api/api/mget.js +70 -0
- package/api/api/migration.js +60 -0
- package/api/api/ml.js +2010 -0
- package/api/api/monitoring.js +66 -0
- package/api/api/msearch.js +70 -0
- package/api/api/msearch_template.js +70 -0
- package/api/api/mtermvectors.js +64 -0
- package/api/api/nodes.js +268 -0
- package/api/api/open_point_in_time.js +56 -0
- package/api/api/ping.js +50 -0
- package/api/api/put_script.js +71 -0
- package/api/api/rank_eval.js +61 -0
- package/api/api/reindex.js +56 -0
- package/api/api/reindex_rethrottle.js +60 -0
- package/api/api/render_search_template.js +55 -0
- package/api/api/rollup.js +319 -0
- package/api/api/scripts_painless_execute.js +50 -0
- package/api/api/scroll.js +55 -0
- package/api/api/search.js +64 -0
- package/api/api/search_mvt.js +87 -0
- package/api/api/search_shards.js +55 -0
- package/api/api/search_template.js +70 -0
- package/api/api/searchable_snapshots.js +186 -0
- package/api/api/security.js +1261 -0
- package/api/api/shutdown.js +124 -0
- package/api/api/slm.js +256 -0
- package/api/api/snapshot.js +439 -0
- package/api/api/sql.js +203 -0
- package/api/api/ssl.js +55 -0
- package/api/api/tasks.js +108 -0
- package/api/api/terms_enum.js +56 -0
- package/api/api/termvectors.js +67 -0
- package/api/api/text_structure.js +65 -0
- package/api/api/transform.js +268 -0
- package/api/api/update.js +69 -0
- package/api/api/update_by_query.js +67 -0
- package/api/api/update_by_query_rethrottle.js +60 -0
- package/api/api/watcher.js +333 -0
- package/api/api/xpack.js +76 -0
- package/api/index.js +508 -0
- package/api/new.d.ts +1585 -0
- package/api/requestParams.d.ts +2920 -0
- package/api/types.d.ts +15420 -0
- package/api/utils.js +58 -0
- package/codecov.yml +14 -0
- package/index.d.ts +2991 -0
- package/index.js +349 -0
- package/index.mjs +29 -0
- package/lib/Connection.d.ts +99 -0
- package/lib/Connection.js +392 -0
- package/lib/Helpers.d.ts +124 -0
- package/lib/Helpers.js +770 -0
- package/lib/Serializer.d.ts +30 -0
- package/lib/Serializer.js +94 -0
- package/lib/Transport.d.ts +162 -0
- package/lib/Transport.js +689 -0
- package/lib/errors.d.ts +90 -0
- package/lib/errors.js +159 -0
- package/lib/pool/BaseConnectionPool.js +262 -0
- package/lib/pool/CloudConnectionPool.js +64 -0
- package/lib/pool/ConnectionPool.js +246 -0
- package/lib/pool/index.d.ts +220 -0
- package/lib/pool/index.js +30 -0
- package/package.json +106 -0
package/api/index.js
ADDED
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to Elasticsearch B.V. under one or more contributor
|
|
3
|
+
* license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright
|
|
5
|
+
* ownership. Elasticsearch B.V. licenses this file to you under
|
|
6
|
+
* the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
'use strict'
|
|
21
|
+
|
|
22
|
+
const AsyncSearchApi = require('./api/async_search')
|
|
23
|
+
const AutoscalingApi = require('./api/autoscaling')
|
|
24
|
+
const bulkApi = require('./api/bulk')
|
|
25
|
+
const CatApi = require('./api/cat')
|
|
26
|
+
const CcrApi = require('./api/ccr')
|
|
27
|
+
const clearScrollApi = require('./api/clear_scroll')
|
|
28
|
+
const closePointInTimeApi = require('./api/close_point_in_time')
|
|
29
|
+
const ClusterApi = require('./api/cluster')
|
|
30
|
+
const countApi = require('./api/count')
|
|
31
|
+
const createApi = require('./api/create')
|
|
32
|
+
const DanglingIndicesApi = require('./api/dangling_indices')
|
|
33
|
+
const deleteApi = require('./api/delete')
|
|
34
|
+
const deleteByQueryApi = require('./api/delete_by_query')
|
|
35
|
+
const deleteByQueryRethrottleApi = require('./api/delete_by_query_rethrottle')
|
|
36
|
+
const deleteScriptApi = require('./api/delete_script')
|
|
37
|
+
const EnrichApi = require('./api/enrich')
|
|
38
|
+
const EqlApi = require('./api/eql')
|
|
39
|
+
const existsApi = require('./api/exists')
|
|
40
|
+
const existsSourceApi = require('./api/exists_source')
|
|
41
|
+
const explainApi = require('./api/explain')
|
|
42
|
+
const FeaturesApi = require('./api/features')
|
|
43
|
+
const fieldCapsApi = require('./api/field_caps')
|
|
44
|
+
const FleetApi = require('./api/fleet')
|
|
45
|
+
const getApi = require('./api/get')
|
|
46
|
+
const getScriptApi = require('./api/get_script')
|
|
47
|
+
const getScriptContextApi = require('./api/get_script_context')
|
|
48
|
+
const getScriptLanguagesApi = require('./api/get_script_languages')
|
|
49
|
+
const getSourceApi = require('./api/get_source')
|
|
50
|
+
const GraphApi = require('./api/graph')
|
|
51
|
+
const IlmApi = require('./api/ilm')
|
|
52
|
+
const indexApi = require('./api/index')
|
|
53
|
+
const IndicesApi = require('./api/indices')
|
|
54
|
+
const infoApi = require('./api/info')
|
|
55
|
+
const IngestApi = require('./api/ingest')
|
|
56
|
+
const LicenseApi = require('./api/license')
|
|
57
|
+
const LogstashApi = require('./api/logstash')
|
|
58
|
+
const mgetApi = require('./api/mget')
|
|
59
|
+
const MigrationApi = require('./api/migration')
|
|
60
|
+
const MlApi = require('./api/ml')
|
|
61
|
+
const MonitoringApi = require('./api/monitoring')
|
|
62
|
+
const msearchApi = require('./api/msearch')
|
|
63
|
+
const msearchTemplateApi = require('./api/msearch_template')
|
|
64
|
+
const mtermvectorsApi = require('./api/mtermvectors')
|
|
65
|
+
const NodesApi = require('./api/nodes')
|
|
66
|
+
const openPointInTimeApi = require('./api/open_point_in_time')
|
|
67
|
+
const pingApi = require('./api/ping')
|
|
68
|
+
const putScriptApi = require('./api/put_script')
|
|
69
|
+
const rankEvalApi = require('./api/rank_eval')
|
|
70
|
+
const reindexApi = require('./api/reindex')
|
|
71
|
+
const reindexRethrottleApi = require('./api/reindex_rethrottle')
|
|
72
|
+
const renderSearchTemplateApi = require('./api/render_search_template')
|
|
73
|
+
const RollupApi = require('./api/rollup')
|
|
74
|
+
const scriptsPainlessExecuteApi = require('./api/scripts_painless_execute')
|
|
75
|
+
const scrollApi = require('./api/scroll')
|
|
76
|
+
const searchApi = require('./api/search')
|
|
77
|
+
const searchMvtApi = require('./api/search_mvt')
|
|
78
|
+
const searchShardsApi = require('./api/search_shards')
|
|
79
|
+
const searchTemplateApi = require('./api/search_template')
|
|
80
|
+
const SearchableSnapshotsApi = require('./api/searchable_snapshots')
|
|
81
|
+
const SecurityApi = require('./api/security')
|
|
82
|
+
const ShutdownApi = require('./api/shutdown')
|
|
83
|
+
const SlmApi = require('./api/slm')
|
|
84
|
+
const SnapshotApi = require('./api/snapshot')
|
|
85
|
+
const SqlApi = require('./api/sql')
|
|
86
|
+
const SslApi = require('./api/ssl')
|
|
87
|
+
const TasksApi = require('./api/tasks')
|
|
88
|
+
const termsEnumApi = require('./api/terms_enum')
|
|
89
|
+
const termvectorsApi = require('./api/termvectors')
|
|
90
|
+
const TextStructureApi = require('./api/text_structure')
|
|
91
|
+
const TransformApi = require('./api/transform')
|
|
92
|
+
const updateApi = require('./api/update')
|
|
93
|
+
const updateByQueryApi = require('./api/update_by_query')
|
|
94
|
+
const updateByQueryRethrottleApi = require('./api/update_by_query_rethrottle')
|
|
95
|
+
const WatcherApi = require('./api/watcher')
|
|
96
|
+
const XpackApi = require('./api/xpack')
|
|
97
|
+
|
|
98
|
+
const { kConfigurationError } = require('./utils')
|
|
99
|
+
const kAsyncSearch = Symbol('AsyncSearch')
|
|
100
|
+
const kAutoscaling = Symbol('Autoscaling')
|
|
101
|
+
const kCat = Symbol('Cat')
|
|
102
|
+
const kCcr = Symbol('Ccr')
|
|
103
|
+
const kCluster = Symbol('Cluster')
|
|
104
|
+
const kDanglingIndices = Symbol('DanglingIndices')
|
|
105
|
+
const kEnrich = Symbol('Enrich')
|
|
106
|
+
const kEql = Symbol('Eql')
|
|
107
|
+
const kFeatures = Symbol('Features')
|
|
108
|
+
const kFleet = Symbol('Fleet')
|
|
109
|
+
const kGraph = Symbol('Graph')
|
|
110
|
+
const kIlm = Symbol('Ilm')
|
|
111
|
+
const kIndices = Symbol('Indices')
|
|
112
|
+
const kIngest = Symbol('Ingest')
|
|
113
|
+
const kLicense = Symbol('License')
|
|
114
|
+
const kLogstash = Symbol('Logstash')
|
|
115
|
+
const kMigration = Symbol('Migration')
|
|
116
|
+
const kMl = Symbol('Ml')
|
|
117
|
+
const kMonitoring = Symbol('Monitoring')
|
|
118
|
+
const kNodes = Symbol('Nodes')
|
|
119
|
+
const kRollup = Symbol('Rollup')
|
|
120
|
+
const kSearchableSnapshots = Symbol('SearchableSnapshots')
|
|
121
|
+
const kSecurity = Symbol('Security')
|
|
122
|
+
const kShutdown = Symbol('Shutdown')
|
|
123
|
+
const kSlm = Symbol('Slm')
|
|
124
|
+
const kSnapshot = Symbol('Snapshot')
|
|
125
|
+
const kSql = Symbol('Sql')
|
|
126
|
+
const kSsl = Symbol('Ssl')
|
|
127
|
+
const kTasks = Symbol('Tasks')
|
|
128
|
+
const kTextStructure = Symbol('TextStructure')
|
|
129
|
+
const kTransform = Symbol('Transform')
|
|
130
|
+
const kWatcher = Symbol('Watcher')
|
|
131
|
+
const kXpack = Symbol('Xpack')
|
|
132
|
+
|
|
133
|
+
function ESAPI (opts) {
|
|
134
|
+
this[kConfigurationError] = opts.ConfigurationError
|
|
135
|
+
this[kAsyncSearch] = null
|
|
136
|
+
this[kAutoscaling] = null
|
|
137
|
+
this[kCat] = null
|
|
138
|
+
this[kCcr] = null
|
|
139
|
+
this[kCluster] = null
|
|
140
|
+
this[kDanglingIndices] = null
|
|
141
|
+
this[kEnrich] = null
|
|
142
|
+
this[kEql] = null
|
|
143
|
+
this[kFeatures] = null
|
|
144
|
+
this[kFleet] = null
|
|
145
|
+
this[kGraph] = null
|
|
146
|
+
this[kIlm] = null
|
|
147
|
+
this[kIndices] = null
|
|
148
|
+
this[kIngest] = null
|
|
149
|
+
this[kLicense] = null
|
|
150
|
+
this[kLogstash] = null
|
|
151
|
+
this[kMigration] = null
|
|
152
|
+
this[kMl] = null
|
|
153
|
+
this[kMonitoring] = null
|
|
154
|
+
this[kNodes] = null
|
|
155
|
+
this[kRollup] = null
|
|
156
|
+
this[kSearchableSnapshots] = null
|
|
157
|
+
this[kSecurity] = null
|
|
158
|
+
this[kShutdown] = null
|
|
159
|
+
this[kSlm] = null
|
|
160
|
+
this[kSnapshot] = null
|
|
161
|
+
this[kSql] = null
|
|
162
|
+
this[kSsl] = null
|
|
163
|
+
this[kTasks] = null
|
|
164
|
+
this[kTextStructure] = null
|
|
165
|
+
this[kTransform] = null
|
|
166
|
+
this[kWatcher] = null
|
|
167
|
+
this[kXpack] = null
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
ESAPI.prototype.bulk = bulkApi
|
|
171
|
+
ESAPI.prototype.clearScroll = clearScrollApi
|
|
172
|
+
ESAPI.prototype.closePointInTime = closePointInTimeApi
|
|
173
|
+
ESAPI.prototype.count = countApi
|
|
174
|
+
ESAPI.prototype.create = createApi
|
|
175
|
+
ESAPI.prototype.delete = deleteApi
|
|
176
|
+
ESAPI.prototype.deleteByQuery = deleteByQueryApi
|
|
177
|
+
ESAPI.prototype.deleteByQueryRethrottle = deleteByQueryRethrottleApi
|
|
178
|
+
ESAPI.prototype.deleteScript = deleteScriptApi
|
|
179
|
+
ESAPI.prototype.exists = existsApi
|
|
180
|
+
ESAPI.prototype.existsSource = existsSourceApi
|
|
181
|
+
ESAPI.prototype.explain = explainApi
|
|
182
|
+
ESAPI.prototype.fieldCaps = fieldCapsApi
|
|
183
|
+
ESAPI.prototype.get = getApi
|
|
184
|
+
ESAPI.prototype.getScript = getScriptApi
|
|
185
|
+
ESAPI.prototype.getScriptContext = getScriptContextApi
|
|
186
|
+
ESAPI.prototype.getScriptLanguages = getScriptLanguagesApi
|
|
187
|
+
ESAPI.prototype.getSource = getSourceApi
|
|
188
|
+
ESAPI.prototype.index = indexApi
|
|
189
|
+
ESAPI.prototype.info = infoApi
|
|
190
|
+
ESAPI.prototype.mget = mgetApi
|
|
191
|
+
ESAPI.prototype.msearch = msearchApi
|
|
192
|
+
ESAPI.prototype.msearchTemplate = msearchTemplateApi
|
|
193
|
+
ESAPI.prototype.mtermvectors = mtermvectorsApi
|
|
194
|
+
ESAPI.prototype.openPointInTime = openPointInTimeApi
|
|
195
|
+
ESAPI.prototype.ping = pingApi
|
|
196
|
+
ESAPI.prototype.putScript = putScriptApi
|
|
197
|
+
ESAPI.prototype.rankEval = rankEvalApi
|
|
198
|
+
ESAPI.prototype.reindex = reindexApi
|
|
199
|
+
ESAPI.prototype.reindexRethrottle = reindexRethrottleApi
|
|
200
|
+
ESAPI.prototype.renderSearchTemplate = renderSearchTemplateApi
|
|
201
|
+
ESAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi
|
|
202
|
+
ESAPI.prototype.scroll = scrollApi
|
|
203
|
+
ESAPI.prototype.search = searchApi
|
|
204
|
+
ESAPI.prototype.searchMvt = searchMvtApi
|
|
205
|
+
ESAPI.prototype.searchShards = searchShardsApi
|
|
206
|
+
ESAPI.prototype.searchTemplate = searchTemplateApi
|
|
207
|
+
ESAPI.prototype.termsEnum = termsEnumApi
|
|
208
|
+
ESAPI.prototype.termvectors = termvectorsApi
|
|
209
|
+
ESAPI.prototype.update = updateApi
|
|
210
|
+
ESAPI.prototype.updateByQuery = updateByQueryApi
|
|
211
|
+
ESAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi
|
|
212
|
+
|
|
213
|
+
Object.defineProperties(ESAPI.prototype, {
|
|
214
|
+
asyncSearch: {
|
|
215
|
+
get () {
|
|
216
|
+
if (this[kAsyncSearch] === null) {
|
|
217
|
+
this[kAsyncSearch] = new AsyncSearchApi(this.transport, this[kConfigurationError])
|
|
218
|
+
}
|
|
219
|
+
return this[kAsyncSearch]
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
async_search: { get () { return this.asyncSearch } },
|
|
223
|
+
autoscaling: {
|
|
224
|
+
get () {
|
|
225
|
+
if (this[kAutoscaling] === null) {
|
|
226
|
+
this[kAutoscaling] = new AutoscalingApi(this.transport, this[kConfigurationError])
|
|
227
|
+
}
|
|
228
|
+
return this[kAutoscaling]
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
cat: {
|
|
232
|
+
get () {
|
|
233
|
+
if (this[kCat] === null) {
|
|
234
|
+
this[kCat] = new CatApi(this.transport, this[kConfigurationError])
|
|
235
|
+
}
|
|
236
|
+
return this[kCat]
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
ccr: {
|
|
240
|
+
get () {
|
|
241
|
+
if (this[kCcr] === null) {
|
|
242
|
+
this[kCcr] = new CcrApi(this.transport, this[kConfigurationError])
|
|
243
|
+
}
|
|
244
|
+
return this[kCcr]
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
clear_scroll: { get () { return this.clearScroll } },
|
|
248
|
+
close_point_in_time: { get () { return this.closePointInTime } },
|
|
249
|
+
cluster: {
|
|
250
|
+
get () {
|
|
251
|
+
if (this[kCluster] === null) {
|
|
252
|
+
this[kCluster] = new ClusterApi(this.transport, this[kConfigurationError])
|
|
253
|
+
}
|
|
254
|
+
return this[kCluster]
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
danglingIndices: {
|
|
258
|
+
get () {
|
|
259
|
+
if (this[kDanglingIndices] === null) {
|
|
260
|
+
this[kDanglingIndices] = new DanglingIndicesApi(this.transport, this[kConfigurationError])
|
|
261
|
+
}
|
|
262
|
+
return this[kDanglingIndices]
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
dangling_indices: { get () { return this.danglingIndices } },
|
|
266
|
+
delete_by_query: { get () { return this.deleteByQuery } },
|
|
267
|
+
delete_by_query_rethrottle: { get () { return this.deleteByQueryRethrottle } },
|
|
268
|
+
delete_script: { get () { return this.deleteScript } },
|
|
269
|
+
enrich: {
|
|
270
|
+
get () {
|
|
271
|
+
if (this[kEnrich] === null) {
|
|
272
|
+
this[kEnrich] = new EnrichApi(this.transport, this[kConfigurationError])
|
|
273
|
+
}
|
|
274
|
+
return this[kEnrich]
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
eql: {
|
|
278
|
+
get () {
|
|
279
|
+
if (this[kEql] === null) {
|
|
280
|
+
this[kEql] = new EqlApi(this.transport, this[kConfigurationError])
|
|
281
|
+
}
|
|
282
|
+
return this[kEql]
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
exists_source: { get () { return this.existsSource } },
|
|
286
|
+
features: {
|
|
287
|
+
get () {
|
|
288
|
+
if (this[kFeatures] === null) {
|
|
289
|
+
this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError])
|
|
290
|
+
}
|
|
291
|
+
return this[kFeatures]
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
field_caps: { get () { return this.fieldCaps } },
|
|
295
|
+
fleet: {
|
|
296
|
+
get () {
|
|
297
|
+
if (this[kFleet] === null) {
|
|
298
|
+
this[kFleet] = new FleetApi(this.transport, this[kConfigurationError])
|
|
299
|
+
}
|
|
300
|
+
return this[kFleet]
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
get_script: { get () { return this.getScript } },
|
|
304
|
+
get_script_context: { get () { return this.getScriptContext } },
|
|
305
|
+
get_script_languages: { get () { return this.getScriptLanguages } },
|
|
306
|
+
get_source: { get () { return this.getSource } },
|
|
307
|
+
graph: {
|
|
308
|
+
get () {
|
|
309
|
+
if (this[kGraph] === null) {
|
|
310
|
+
this[kGraph] = new GraphApi(this.transport, this[kConfigurationError])
|
|
311
|
+
}
|
|
312
|
+
return this[kGraph]
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
ilm: {
|
|
316
|
+
get () {
|
|
317
|
+
if (this[kIlm] === null) {
|
|
318
|
+
this[kIlm] = new IlmApi(this.transport, this[kConfigurationError])
|
|
319
|
+
}
|
|
320
|
+
return this[kIlm]
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
indices: {
|
|
324
|
+
get () {
|
|
325
|
+
if (this[kIndices] === null) {
|
|
326
|
+
this[kIndices] = new IndicesApi(this.transport, this[kConfigurationError])
|
|
327
|
+
}
|
|
328
|
+
return this[kIndices]
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
ingest: {
|
|
332
|
+
get () {
|
|
333
|
+
if (this[kIngest] === null) {
|
|
334
|
+
this[kIngest] = new IngestApi(this.transport, this[kConfigurationError])
|
|
335
|
+
}
|
|
336
|
+
return this[kIngest]
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
license: {
|
|
340
|
+
get () {
|
|
341
|
+
if (this[kLicense] === null) {
|
|
342
|
+
this[kLicense] = new LicenseApi(this.transport, this[kConfigurationError])
|
|
343
|
+
}
|
|
344
|
+
return this[kLicense]
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
logstash: {
|
|
348
|
+
get () {
|
|
349
|
+
if (this[kLogstash] === null) {
|
|
350
|
+
this[kLogstash] = new LogstashApi(this.transport, this[kConfigurationError])
|
|
351
|
+
}
|
|
352
|
+
return this[kLogstash]
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
migration: {
|
|
356
|
+
get () {
|
|
357
|
+
if (this[kMigration] === null) {
|
|
358
|
+
this[kMigration] = new MigrationApi(this.transport, this[kConfigurationError])
|
|
359
|
+
}
|
|
360
|
+
return this[kMigration]
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
ml: {
|
|
364
|
+
get () {
|
|
365
|
+
if (this[kMl] === null) {
|
|
366
|
+
this[kMl] = new MlApi(this.transport, this[kConfigurationError])
|
|
367
|
+
}
|
|
368
|
+
return this[kMl]
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
monitoring: {
|
|
372
|
+
get () {
|
|
373
|
+
if (this[kMonitoring] === null) {
|
|
374
|
+
this[kMonitoring] = new MonitoringApi(this.transport, this[kConfigurationError])
|
|
375
|
+
}
|
|
376
|
+
return this[kMonitoring]
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
msearch_template: { get () { return this.msearchTemplate } },
|
|
380
|
+
nodes: {
|
|
381
|
+
get () {
|
|
382
|
+
if (this[kNodes] === null) {
|
|
383
|
+
this[kNodes] = new NodesApi(this.transport, this[kConfigurationError])
|
|
384
|
+
}
|
|
385
|
+
return this[kNodes]
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
open_point_in_time: { get () { return this.openPointInTime } },
|
|
389
|
+
put_script: { get () { return this.putScript } },
|
|
390
|
+
rank_eval: { get () { return this.rankEval } },
|
|
391
|
+
reindex_rethrottle: { get () { return this.reindexRethrottle } },
|
|
392
|
+
render_search_template: { get () { return this.renderSearchTemplate } },
|
|
393
|
+
rollup: {
|
|
394
|
+
get () {
|
|
395
|
+
if (this[kRollup] === null) {
|
|
396
|
+
this[kRollup] = new RollupApi(this.transport, this[kConfigurationError])
|
|
397
|
+
}
|
|
398
|
+
return this[kRollup]
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
scripts_painless_execute: { get () { return this.scriptsPainlessExecute } },
|
|
402
|
+
search_mvt: { get () { return this.searchMvt } },
|
|
403
|
+
search_shards: { get () { return this.searchShards } },
|
|
404
|
+
search_template: { get () { return this.searchTemplate } },
|
|
405
|
+
searchableSnapshots: {
|
|
406
|
+
get () {
|
|
407
|
+
if (this[kSearchableSnapshots] === null) {
|
|
408
|
+
this[kSearchableSnapshots] = new SearchableSnapshotsApi(this.transport, this[kConfigurationError])
|
|
409
|
+
}
|
|
410
|
+
return this[kSearchableSnapshots]
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
searchable_snapshots: { get () { return this.searchableSnapshots } },
|
|
414
|
+
security: {
|
|
415
|
+
get () {
|
|
416
|
+
if (this[kSecurity] === null) {
|
|
417
|
+
this[kSecurity] = new SecurityApi(this.transport, this[kConfigurationError])
|
|
418
|
+
}
|
|
419
|
+
return this[kSecurity]
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
shutdown: {
|
|
423
|
+
get () {
|
|
424
|
+
if (this[kShutdown] === null) {
|
|
425
|
+
this[kShutdown] = new ShutdownApi(this.transport, this[kConfigurationError])
|
|
426
|
+
}
|
|
427
|
+
return this[kShutdown]
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
slm: {
|
|
431
|
+
get () {
|
|
432
|
+
if (this[kSlm] === null) {
|
|
433
|
+
this[kSlm] = new SlmApi(this.transport, this[kConfigurationError])
|
|
434
|
+
}
|
|
435
|
+
return this[kSlm]
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
snapshot: {
|
|
439
|
+
get () {
|
|
440
|
+
if (this[kSnapshot] === null) {
|
|
441
|
+
this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError])
|
|
442
|
+
}
|
|
443
|
+
return this[kSnapshot]
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
sql: {
|
|
447
|
+
get () {
|
|
448
|
+
if (this[kSql] === null) {
|
|
449
|
+
this[kSql] = new SqlApi(this.transport, this[kConfigurationError])
|
|
450
|
+
}
|
|
451
|
+
return this[kSql]
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
ssl: {
|
|
455
|
+
get () {
|
|
456
|
+
if (this[kSsl] === null) {
|
|
457
|
+
this[kSsl] = new SslApi(this.transport, this[kConfigurationError])
|
|
458
|
+
}
|
|
459
|
+
return this[kSsl]
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
tasks: {
|
|
463
|
+
get () {
|
|
464
|
+
if (this[kTasks] === null) {
|
|
465
|
+
this[kTasks] = new TasksApi(this.transport, this[kConfigurationError])
|
|
466
|
+
}
|
|
467
|
+
return this[kTasks]
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
terms_enum: { get () { return this.termsEnum } },
|
|
471
|
+
textStructure: {
|
|
472
|
+
get () {
|
|
473
|
+
if (this[kTextStructure] === null) {
|
|
474
|
+
this[kTextStructure] = new TextStructureApi(this.transport, this[kConfigurationError])
|
|
475
|
+
}
|
|
476
|
+
return this[kTextStructure]
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
text_structure: { get () { return this.textStructure } },
|
|
480
|
+
transform: {
|
|
481
|
+
get () {
|
|
482
|
+
if (this[kTransform] === null) {
|
|
483
|
+
this[kTransform] = new TransformApi(this.transport, this[kConfigurationError])
|
|
484
|
+
}
|
|
485
|
+
return this[kTransform]
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
update_by_query: { get () { return this.updateByQuery } },
|
|
489
|
+
update_by_query_rethrottle: { get () { return this.updateByQueryRethrottle } },
|
|
490
|
+
watcher: {
|
|
491
|
+
get () {
|
|
492
|
+
if (this[kWatcher] === null) {
|
|
493
|
+
this[kWatcher] = new WatcherApi(this.transport, this[kConfigurationError])
|
|
494
|
+
}
|
|
495
|
+
return this[kWatcher]
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
xpack: {
|
|
499
|
+
get () {
|
|
500
|
+
if (this[kXpack] === null) {
|
|
501
|
+
this[kXpack] = new XpackApi(this.transport, this[kConfigurationError])
|
|
502
|
+
}
|
|
503
|
+
return this[kXpack]
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
})
|
|
507
|
+
|
|
508
|
+
module.exports = ESAPI
|