@elastic/elasticsearch 7.11.0 → 7.14.1
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/README.md +4 -2
- package/api/api/async_search.js +11 -11
- package/api/api/autoscaling.js +12 -12
- package/api/api/bulk.js +4 -4
- package/api/api/cat.js +127 -127
- package/api/api/ccr.js +40 -40
- package/api/api/clear_scroll.js +2 -2
- package/api/api/close_point_in_time.js +2 -2
- package/api/api/cluster.js +36 -36
- package/api/api/count.js +3 -3
- package/api/api/create.js +5 -5
- package/api/api/dangling_indices.js +8 -8
- package/api/api/delete.js +4 -4
- package/api/api/delete_by_query.js +5 -5
- package/api/api/delete_by_query_rethrottle.js +4 -4
- package/api/api/delete_script.js +3 -3
- package/api/api/enrich.js +14 -14
- package/api/api/eql.js +41 -10
- package/api/api/exists.js +4 -4
- package/api/api/exists_source.js +6 -6
- package/api/api/explain.js +4 -4
- package/api/api/features.js +81 -0
- package/api/api/field_caps.js +2 -2
- package/api/api/fleet.js +65 -0
- package/api/api/get.js +4 -4
- package/api/api/get_script.js +3 -3
- package/api/api/get_script_context.js +2 -2
- package/api/api/get_script_languages.js +2 -2
- package/api/api/get_source.js +4 -4
- package/api/api/graph.js +4 -4
- package/api/api/ilm.js +50 -28
- package/api/api/index.js +4 -4
- package/api/api/indices.js +381 -381
- package/api/api/info.js +2 -2
- package/api/api/ingest.js +37 -15
- package/api/api/license.js +14 -14
- package/api/api/logstash.js +125 -0
- package/api/api/mget.js +4 -4
- package/api/api/migration.js +2 -2
- package/api/api/ml.js +338 -208
- package/api/api/monitoring.js +3 -3
- package/api/api/msearch.js +4 -4
- package/api/api/msearch_template.js +4 -4
- package/api/api/mtermvectors.js +3 -3
- package/api/api/nodes.js +12 -12
- package/api/api/open_point_in_time.js +2 -2
- package/api/api/ping.js +2 -2
- package/api/api/put_script.js +5 -5
- package/api/api/rank_eval.js +3 -3
- package/api/api/reindex.js +3 -3
- package/api/api/reindex_rethrottle.js +4 -4
- package/api/api/render_search_template.js +2 -2
- package/api/api/rollup.js +31 -31
- package/api/api/scripts_painless_execute.js +2 -2
- package/api/api/scroll.js +2 -2
- package/api/api/search.js +5 -5
- package/api/api/search_shards.js +2 -2
- package/api/api/search_template.js +4 -4
- package/api/api/searchable_snapshots.js +42 -15
- package/api/api/security.js +464 -86
- package/api/api/shutdown.js +124 -0
- package/api/api/slm.js +21 -21
- package/api/api/snapshot.js +76 -48
- package/api/api/sql.js +96 -12
- package/api/api/ssl.js +2 -2
- package/api/api/tasks.js +7 -7
- package/api/api/terms_enum.js +56 -0
- package/api/api/termvectors.js +3 -3
- package/api/api/text_structure.js +65 -0
- package/api/api/transform.js +25 -25
- package/api/api/update.js +5 -5
- package/api/api/update_by_query.js +4 -4
- package/api/api/update_by_query_rethrottle.js +4 -4
- package/api/api/watcher.js +29 -29
- package/api/api/xpack.js +4 -4
- package/api/index.js +179 -120
- package/api/new.d.ts +1584 -0
- package/api/requestParams.d.ts +203 -7
- package/api/types.d.ts +15455 -0
- package/api/utils.js +4 -4
- package/free-report-junit.xml +3410 -0
- package/index.d.ts +326 -23
- package/index.js +28 -36
- package/lib/Connection.js +6 -4
- package/lib/Helpers.d.ts +4 -2
- package/lib/Helpers.js +31 -17
- package/lib/Serializer.d.ts +5 -0
- package/lib/Serializer.js +17 -6
- package/lib/Transport.d.ts +4 -2
- package/lib/Transport.js +194 -79
- package/lib/errors.d.ts +7 -0
- package/lib/errors.js +26 -2
- package/lib/pool/BaseConnectionPool.js +3 -3
- package/lib/pool/ConnectionPool.js +4 -5
- package/lib/pool/index.d.ts +5 -0
- package/package.json +26 -26
- package/api/kibana.d.ts +0 -485
package/api/api/indices.js
CHANGED
|
@@ -35,25 +35,25 @@ IndicesApi.prototype.addBlock = function indicesAddBlockApi (params, options, ca
|
|
|
35
35
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
36
|
|
|
37
37
|
// check required parameters
|
|
38
|
-
if (params
|
|
38
|
+
if (params.index == null) {
|
|
39
39
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
40
40
|
return handleError(err, callback)
|
|
41
41
|
}
|
|
42
|
-
if (params
|
|
42
|
+
if (params.block == null) {
|
|
43
43
|
const err = new this[kConfigurationError]('Missing required parameter: block')
|
|
44
44
|
return handleError(err, callback)
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// check required url components
|
|
48
|
-
if (params
|
|
48
|
+
if (params.block != null && (params.index == null)) {
|
|
49
49
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
50
50
|
return handleError(err, callback)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
let { method, body, index, block, ...querystring } = params
|
|
54
54
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
let path = ''
|
|
57
57
|
if (method == null) method = 'PUT'
|
|
58
58
|
path = '/' + encodeURIComponent(index) + '/' + '_block' + '/' + encodeURIComponent(block)
|
|
59
59
|
|
|
@@ -71,10 +71,10 @@ IndicesApi.prototype.addBlock = function indicesAddBlockApi (params, options, ca
|
|
|
71
71
|
IndicesApi.prototype.analyze = function indicesAnalyzeApi (params, options, callback) {
|
|
72
72
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
let { method, body, index, ...querystring } = params
|
|
75
75
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
let path = ''
|
|
78
78
|
if ((index) != null) {
|
|
79
79
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
80
80
|
path = '/' + encodeURIComponent(index) + '/' + '_analyze'
|
|
@@ -97,10 +97,10 @@ IndicesApi.prototype.analyze = function indicesAnalyzeApi (params, options, call
|
|
|
97
97
|
IndicesApi.prototype.clearCache = function indicesClearCacheApi (params, options, callback) {
|
|
98
98
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
let { method, body, index, ...querystring } = params
|
|
101
101
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
let path = ''
|
|
104
104
|
if ((index) != null) {
|
|
105
105
|
if (method == null) method = 'POST'
|
|
106
106
|
path = '/' + encodeURIComponent(index) + '/' + '_cache' + '/' + 'clear'
|
|
@@ -124,25 +124,25 @@ IndicesApi.prototype.clone = function indicesCloneApi (params, options, callback
|
|
|
124
124
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
125
125
|
|
|
126
126
|
// check required parameters
|
|
127
|
-
if (params
|
|
127
|
+
if (params.index == null) {
|
|
128
128
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
129
129
|
return handleError(err, callback)
|
|
130
130
|
}
|
|
131
|
-
if (params
|
|
131
|
+
if (params.target == null) {
|
|
132
132
|
const err = new this[kConfigurationError]('Missing required parameter: target')
|
|
133
133
|
return handleError(err, callback)
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
// check required url components
|
|
137
|
-
if (params
|
|
137
|
+
if (params.target != null && (params.index == null)) {
|
|
138
138
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
139
139
|
return handleError(err, callback)
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
let { method, body, index, target, ...querystring } = params
|
|
143
143
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
let path = ''
|
|
146
146
|
if (method == null) method = 'PUT'
|
|
147
147
|
path = '/' + encodeURIComponent(index) + '/' + '_clone' + '/' + encodeURIComponent(target)
|
|
148
148
|
|
|
@@ -161,15 +161,15 @@ IndicesApi.prototype.close = function indicesCloseApi (params, options, callback
|
|
|
161
161
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
162
162
|
|
|
163
163
|
// check required parameters
|
|
164
|
-
if (params
|
|
164
|
+
if (params.index == null) {
|
|
165
165
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
166
166
|
return handleError(err, callback)
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
let { method, body, index, ...querystring } = params
|
|
170
170
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
171
171
|
|
|
172
|
-
|
|
172
|
+
let path = ''
|
|
173
173
|
if (method == null) method = 'POST'
|
|
174
174
|
path = '/' + encodeURIComponent(index) + '/' + '_close'
|
|
175
175
|
|
|
@@ -188,15 +188,15 @@ IndicesApi.prototype.create = function indicesCreateApi (params, options, callba
|
|
|
188
188
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
189
189
|
|
|
190
190
|
// check required parameters
|
|
191
|
-
if (params
|
|
191
|
+
if (params.index == null) {
|
|
192
192
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
193
193
|
return handleError(err, callback)
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
|
|
196
|
+
let { method, body, index, ...querystring } = params
|
|
197
197
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
let path = ''
|
|
200
200
|
if (method == null) method = 'PUT'
|
|
201
201
|
path = '/' + encodeURIComponent(index)
|
|
202
202
|
|
|
@@ -211,19 +211,72 @@ IndicesApi.prototype.create = function indicesCreateApi (params, options, callba
|
|
|
211
211
|
return this.transport.request(request, options, callback)
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
+
IndicesApi.prototype.createDataStream = function indicesCreateDataStreamApi (params, options, callback) {
|
|
215
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
216
|
+
|
|
217
|
+
// check required parameters
|
|
218
|
+
if (params.name == null) {
|
|
219
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
220
|
+
return handleError(err, callback)
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
let { method, body, name, ...querystring } = params
|
|
224
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
225
|
+
|
|
226
|
+
let path = ''
|
|
227
|
+
if (method == null) method = 'PUT'
|
|
228
|
+
path = '/' + '_data_stream' + '/' + encodeURIComponent(name)
|
|
229
|
+
|
|
230
|
+
// build request object
|
|
231
|
+
const request = {
|
|
232
|
+
method,
|
|
233
|
+
path,
|
|
234
|
+
body: body || '',
|
|
235
|
+
querystring
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return this.transport.request(request, options, callback)
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
IndicesApi.prototype.dataStreamsStats = function indicesDataStreamsStatsApi (params, options, callback) {
|
|
242
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
243
|
+
|
|
244
|
+
let { method, body, name, ...querystring } = params
|
|
245
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
246
|
+
|
|
247
|
+
let path = ''
|
|
248
|
+
if ((name) != null) {
|
|
249
|
+
if (method == null) method = 'GET'
|
|
250
|
+
path = '/' + '_data_stream' + '/' + encodeURIComponent(name) + '/' + '_stats'
|
|
251
|
+
} else {
|
|
252
|
+
if (method == null) method = 'GET'
|
|
253
|
+
path = '/' + '_data_stream' + '/' + '_stats'
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// build request object
|
|
257
|
+
const request = {
|
|
258
|
+
method,
|
|
259
|
+
path,
|
|
260
|
+
body: null,
|
|
261
|
+
querystring
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return this.transport.request(request, options, callback)
|
|
265
|
+
}
|
|
266
|
+
|
|
214
267
|
IndicesApi.prototype.delete = function indicesDeleteApi (params, options, callback) {
|
|
215
268
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
216
269
|
|
|
217
270
|
// check required parameters
|
|
218
|
-
if (params
|
|
271
|
+
if (params.index == null) {
|
|
219
272
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
220
273
|
return handleError(err, callback)
|
|
221
274
|
}
|
|
222
275
|
|
|
223
|
-
|
|
276
|
+
let { method, body, index, ...querystring } = params
|
|
224
277
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
225
278
|
|
|
226
|
-
|
|
279
|
+
let path = ''
|
|
227
280
|
if (method == null) method = 'DELETE'
|
|
228
281
|
path = '/' + encodeURIComponent(index)
|
|
229
282
|
|
|
@@ -242,25 +295,25 @@ IndicesApi.prototype.deleteAlias = function indicesDeleteAliasApi (params, optio
|
|
|
242
295
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
243
296
|
|
|
244
297
|
// check required parameters
|
|
245
|
-
if (params
|
|
298
|
+
if (params.index == null) {
|
|
246
299
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
247
300
|
return handleError(err, callback)
|
|
248
301
|
}
|
|
249
|
-
if (params
|
|
302
|
+
if (params.name == null) {
|
|
250
303
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
251
304
|
return handleError(err, callback)
|
|
252
305
|
}
|
|
253
306
|
|
|
254
307
|
// check required url components
|
|
255
|
-
if (params
|
|
308
|
+
if (params.name != null && (params.index == null)) {
|
|
256
309
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
257
310
|
return handleError(err, callback)
|
|
258
311
|
}
|
|
259
312
|
|
|
260
|
-
|
|
313
|
+
let { method, body, index, name, ...querystring } = params
|
|
261
314
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
262
315
|
|
|
263
|
-
|
|
316
|
+
let path = ''
|
|
264
317
|
if ((index) != null && (name) != null) {
|
|
265
318
|
if (method == null) method = 'DELETE'
|
|
266
319
|
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
|
@@ -280,19 +333,46 @@ IndicesApi.prototype.deleteAlias = function indicesDeleteAliasApi (params, optio
|
|
|
280
333
|
return this.transport.request(request, options, callback)
|
|
281
334
|
}
|
|
282
335
|
|
|
336
|
+
IndicesApi.prototype.deleteDataStream = function indicesDeleteDataStreamApi (params, options, callback) {
|
|
337
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
338
|
+
|
|
339
|
+
// check required parameters
|
|
340
|
+
if (params.name == null) {
|
|
341
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
342
|
+
return handleError(err, callback)
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
let { method, body, name, ...querystring } = params
|
|
346
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
347
|
+
|
|
348
|
+
let path = ''
|
|
349
|
+
if (method == null) method = 'DELETE'
|
|
350
|
+
path = '/' + '_data_stream' + '/' + encodeURIComponent(name)
|
|
351
|
+
|
|
352
|
+
// build request object
|
|
353
|
+
const request = {
|
|
354
|
+
method,
|
|
355
|
+
path,
|
|
356
|
+
body: body || '',
|
|
357
|
+
querystring
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
return this.transport.request(request, options, callback)
|
|
361
|
+
}
|
|
362
|
+
|
|
283
363
|
IndicesApi.prototype.deleteIndexTemplate = function indicesDeleteIndexTemplateApi (params, options, callback) {
|
|
284
364
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
285
365
|
|
|
286
366
|
// check required parameters
|
|
287
|
-
if (params
|
|
367
|
+
if (params.name == null) {
|
|
288
368
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
289
369
|
return handleError(err, callback)
|
|
290
370
|
}
|
|
291
371
|
|
|
292
|
-
|
|
372
|
+
let { method, body, name, ...querystring } = params
|
|
293
373
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
294
374
|
|
|
295
|
-
|
|
375
|
+
let path = ''
|
|
296
376
|
if (method == null) method = 'DELETE'
|
|
297
377
|
path = '/' + '_index_template' + '/' + encodeURIComponent(name)
|
|
298
378
|
|
|
@@ -311,15 +391,15 @@ IndicesApi.prototype.deleteTemplate = function indicesDeleteTemplateApi (params,
|
|
|
311
391
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
312
392
|
|
|
313
393
|
// check required parameters
|
|
314
|
-
if (params
|
|
394
|
+
if (params.name == null) {
|
|
315
395
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
316
396
|
return handleError(err, callback)
|
|
317
397
|
}
|
|
318
398
|
|
|
319
|
-
|
|
399
|
+
let { method, body, name, ...querystring } = params
|
|
320
400
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
321
401
|
|
|
322
|
-
|
|
402
|
+
let path = ''
|
|
323
403
|
if (method == null) method = 'DELETE'
|
|
324
404
|
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
|
325
405
|
|
|
@@ -338,15 +418,15 @@ IndicesApi.prototype.exists = function indicesExistsApi (params, options, callba
|
|
|
338
418
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
339
419
|
|
|
340
420
|
// check required parameters
|
|
341
|
-
if (params
|
|
421
|
+
if (params.index == null) {
|
|
342
422
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
343
423
|
return handleError(err, callback)
|
|
344
424
|
}
|
|
345
425
|
|
|
346
|
-
|
|
426
|
+
let { method, body, index, ...querystring } = params
|
|
347
427
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
348
428
|
|
|
349
|
-
|
|
429
|
+
let path = ''
|
|
350
430
|
if (method == null) method = 'HEAD'
|
|
351
431
|
path = '/' + encodeURIComponent(index)
|
|
352
432
|
|
|
@@ -365,15 +445,15 @@ IndicesApi.prototype.existsAlias = function indicesExistsAliasApi (params, optio
|
|
|
365
445
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
366
446
|
|
|
367
447
|
// check required parameters
|
|
368
|
-
if (params
|
|
448
|
+
if (params.name == null) {
|
|
369
449
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
370
450
|
return handleError(err, callback)
|
|
371
451
|
}
|
|
372
452
|
|
|
373
|
-
|
|
453
|
+
let { method, body, name, index, ...querystring } = params
|
|
374
454
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
375
455
|
|
|
376
|
-
|
|
456
|
+
let path = ''
|
|
377
457
|
if ((index) != null && (name) != null) {
|
|
378
458
|
if (method == null) method = 'HEAD'
|
|
379
459
|
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
|
@@ -397,15 +477,15 @@ IndicesApi.prototype.existsIndexTemplate = function indicesExistsIndexTemplateAp
|
|
|
397
477
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
398
478
|
|
|
399
479
|
// check required parameters
|
|
400
|
-
if (params
|
|
480
|
+
if (params.name == null) {
|
|
401
481
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
402
482
|
return handleError(err, callback)
|
|
403
483
|
}
|
|
404
484
|
|
|
405
|
-
|
|
485
|
+
let { method, body, name, ...querystring } = params
|
|
406
486
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
407
487
|
|
|
408
|
-
|
|
488
|
+
let path = ''
|
|
409
489
|
if (method == null) method = 'HEAD'
|
|
410
490
|
path = '/' + '_index_template' + '/' + encodeURIComponent(name)
|
|
411
491
|
|
|
@@ -424,15 +504,15 @@ IndicesApi.prototype.existsTemplate = function indicesExistsTemplateApi (params,
|
|
|
424
504
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
425
505
|
|
|
426
506
|
// check required parameters
|
|
427
|
-
if (params
|
|
507
|
+
if (params.name == null) {
|
|
428
508
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
429
509
|
return handleError(err, callback)
|
|
430
510
|
}
|
|
431
511
|
|
|
432
|
-
|
|
512
|
+
let { method, body, name, ...querystring } = params
|
|
433
513
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
434
514
|
|
|
435
|
-
|
|
515
|
+
let path = ''
|
|
436
516
|
if (method == null) method = 'HEAD'
|
|
437
517
|
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
|
438
518
|
|
|
@@ -451,25 +531,25 @@ IndicesApi.prototype.existsType = function indicesExistsTypeApi (params, options
|
|
|
451
531
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
452
532
|
|
|
453
533
|
// check required parameters
|
|
454
|
-
if (params
|
|
534
|
+
if (params.index == null) {
|
|
455
535
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
456
536
|
return handleError(err, callback)
|
|
457
537
|
}
|
|
458
|
-
if (params
|
|
538
|
+
if (params.type == null) {
|
|
459
539
|
const err = new this[kConfigurationError]('Missing required parameter: type')
|
|
460
540
|
return handleError(err, callback)
|
|
461
541
|
}
|
|
462
542
|
|
|
463
543
|
// check required url components
|
|
464
|
-
if (params
|
|
544
|
+
if (params.type != null && (params.index == null)) {
|
|
465
545
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
466
546
|
return handleError(err, callback)
|
|
467
547
|
}
|
|
468
548
|
|
|
469
|
-
|
|
549
|
+
let { method, body, index, type, ...querystring } = params
|
|
470
550
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
471
551
|
|
|
472
|
-
|
|
552
|
+
let path = ''
|
|
473
553
|
if (method == null) method = 'HEAD'
|
|
474
554
|
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
|
475
555
|
|
|
@@ -487,10 +567,10 @@ IndicesApi.prototype.existsType = function indicesExistsTypeApi (params, options
|
|
|
487
567
|
IndicesApi.prototype.flush = function indicesFlushApi (params, options, callback) {
|
|
488
568
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
489
569
|
|
|
490
|
-
|
|
570
|
+
let { method, body, index, ...querystring } = params
|
|
491
571
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
492
572
|
|
|
493
|
-
|
|
573
|
+
let path = ''
|
|
494
574
|
if ((index) != null) {
|
|
495
575
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
496
576
|
path = '/' + encodeURIComponent(index) + '/' + '_flush'
|
|
@@ -513,10 +593,10 @@ IndicesApi.prototype.flush = function indicesFlushApi (params, options, callback
|
|
|
513
593
|
IndicesApi.prototype.flushSynced = function indicesFlushSyncedApi (params, options, callback) {
|
|
514
594
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
515
595
|
|
|
516
|
-
|
|
596
|
+
let { method, body, index, ...querystring } = params
|
|
517
597
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
518
598
|
|
|
519
|
-
|
|
599
|
+
let path = ''
|
|
520
600
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
521
601
|
path = '/' + encodeURIComponent(index) + '/' + '_flush' + '/' + 'synced'
|
|
522
602
|
|
|
@@ -534,10 +614,10 @@ IndicesApi.prototype.flushSynced = function indicesFlushSyncedApi (params, optio
|
|
|
534
614
|
IndicesApi.prototype.forcemerge = function indicesForcemergeApi (params, options, callback) {
|
|
535
615
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
536
616
|
|
|
537
|
-
|
|
617
|
+
let { method, body, index, ...querystring } = params
|
|
538
618
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
539
619
|
|
|
540
|
-
|
|
620
|
+
let path = ''
|
|
541
621
|
if ((index) != null) {
|
|
542
622
|
if (method == null) method = 'POST'
|
|
543
623
|
path = '/' + encodeURIComponent(index) + '/' + '_forcemerge'
|
|
@@ -557,19 +637,46 @@ IndicesApi.prototype.forcemerge = function indicesForcemergeApi (params, options
|
|
|
557
637
|
return this.transport.request(request, options, callback)
|
|
558
638
|
}
|
|
559
639
|
|
|
640
|
+
IndicesApi.prototype.freeze = function indicesFreezeApi (params, options, callback) {
|
|
641
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
642
|
+
|
|
643
|
+
// check required parameters
|
|
644
|
+
if (params.index == null) {
|
|
645
|
+
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
646
|
+
return handleError(err, callback)
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
let { method, body, index, ...querystring } = params
|
|
650
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
651
|
+
|
|
652
|
+
let path = ''
|
|
653
|
+
if (method == null) method = 'POST'
|
|
654
|
+
path = '/' + encodeURIComponent(index) + '/' + '_freeze'
|
|
655
|
+
|
|
656
|
+
// build request object
|
|
657
|
+
const request = {
|
|
658
|
+
method,
|
|
659
|
+
path,
|
|
660
|
+
body: body || '',
|
|
661
|
+
querystring
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
return this.transport.request(request, options, callback)
|
|
665
|
+
}
|
|
666
|
+
|
|
560
667
|
IndicesApi.prototype.get = function indicesGetApi (params, options, callback) {
|
|
561
668
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
562
669
|
|
|
563
670
|
// check required parameters
|
|
564
|
-
if (params
|
|
671
|
+
if (params.index == null) {
|
|
565
672
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
566
673
|
return handleError(err, callback)
|
|
567
674
|
}
|
|
568
675
|
|
|
569
|
-
|
|
676
|
+
let { method, body, index, ...querystring } = params
|
|
570
677
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
571
678
|
|
|
572
|
-
|
|
679
|
+
let path = ''
|
|
573
680
|
if (method == null) method = 'GET'
|
|
574
681
|
path = '/' + encodeURIComponent(index)
|
|
575
682
|
|
|
@@ -587,10 +694,10 @@ IndicesApi.prototype.get = function indicesGetApi (params, options, callback) {
|
|
|
587
694
|
IndicesApi.prototype.getAlias = function indicesGetAliasApi (params, options, callback) {
|
|
588
695
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
589
696
|
|
|
590
|
-
|
|
697
|
+
let { method, body, name, index, ...querystring } = params
|
|
591
698
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
592
699
|
|
|
593
|
-
|
|
700
|
+
let path = ''
|
|
594
701
|
if ((index) != null && (name) != null) {
|
|
595
702
|
if (method == null) method = 'GET'
|
|
596
703
|
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
|
@@ -616,19 +723,45 @@ IndicesApi.prototype.getAlias = function indicesGetAliasApi (params, options, ca
|
|
|
616
723
|
return this.transport.request(request, options, callback)
|
|
617
724
|
}
|
|
618
725
|
|
|
726
|
+
IndicesApi.prototype.getDataStream = function indicesGetDataStreamApi (params, options, callback) {
|
|
727
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
728
|
+
|
|
729
|
+
let { method, body, name, ...querystring } = params
|
|
730
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
731
|
+
|
|
732
|
+
let path = ''
|
|
733
|
+
if ((name) != null) {
|
|
734
|
+
if (method == null) method = 'GET'
|
|
735
|
+
path = '/' + '_data_stream' + '/' + encodeURIComponent(name)
|
|
736
|
+
} else {
|
|
737
|
+
if (method == null) method = 'GET'
|
|
738
|
+
path = '/' + '_data_stream'
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
// build request object
|
|
742
|
+
const request = {
|
|
743
|
+
method,
|
|
744
|
+
path,
|
|
745
|
+
body: null,
|
|
746
|
+
querystring
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
return this.transport.request(request, options, callback)
|
|
750
|
+
}
|
|
751
|
+
|
|
619
752
|
IndicesApi.prototype.getFieldMapping = function indicesGetFieldMappingApi (params, options, callback) {
|
|
620
753
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
621
754
|
|
|
622
755
|
// check required parameters
|
|
623
|
-
if (params
|
|
756
|
+
if (params.fields == null) {
|
|
624
757
|
const err = new this[kConfigurationError]('Missing required parameter: fields')
|
|
625
758
|
return handleError(err, callback)
|
|
626
759
|
}
|
|
627
760
|
|
|
628
|
-
|
|
761
|
+
let { method, body, fields, index, type, ...querystring } = params
|
|
629
762
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
630
763
|
|
|
631
|
-
|
|
764
|
+
let path = ''
|
|
632
765
|
if ((index) != null && (type) != null && (fields) != null) {
|
|
633
766
|
if (method == null) method = 'GET'
|
|
634
767
|
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
|
|
@@ -657,10 +790,10 @@ IndicesApi.prototype.getFieldMapping = function indicesGetFieldMappingApi (param
|
|
|
657
790
|
IndicesApi.prototype.getIndexTemplate = function indicesGetIndexTemplateApi (params, options, callback) {
|
|
658
791
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
659
792
|
|
|
660
|
-
|
|
793
|
+
let { method, body, name, ...querystring } = params
|
|
661
794
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
662
795
|
|
|
663
|
-
|
|
796
|
+
let path = ''
|
|
664
797
|
if ((name) != null) {
|
|
665
798
|
if (method == null) method = 'GET'
|
|
666
799
|
path = '/' + '_index_template' + '/' + encodeURIComponent(name)
|
|
@@ -683,10 +816,10 @@ IndicesApi.prototype.getIndexTemplate = function indicesGetIndexTemplateApi (par
|
|
|
683
816
|
IndicesApi.prototype.getMapping = function indicesGetMappingApi (params, options, callback) {
|
|
684
817
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
685
818
|
|
|
686
|
-
|
|
819
|
+
let { method, body, index, type, ...querystring } = params
|
|
687
820
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
688
821
|
|
|
689
|
-
|
|
822
|
+
let path = ''
|
|
690
823
|
if ((index) != null && (type) != null) {
|
|
691
824
|
if (method == null) method = 'GET'
|
|
692
825
|
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
|
@@ -715,10 +848,10 @@ IndicesApi.prototype.getMapping = function indicesGetMappingApi (params, options
|
|
|
715
848
|
IndicesApi.prototype.getSettings = function indicesGetSettingsApi (params, options, callback) {
|
|
716
849
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
717
850
|
|
|
718
|
-
|
|
851
|
+
let { method, body, index, name, ...querystring } = params
|
|
719
852
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
720
853
|
|
|
721
|
-
|
|
854
|
+
let path = ''
|
|
722
855
|
if ((index) != null && (name) != null) {
|
|
723
856
|
if (method == null) method = 'GET'
|
|
724
857
|
path = '/' + encodeURIComponent(index) + '/' + '_settings' + '/' + encodeURIComponent(name)
|
|
@@ -747,10 +880,10 @@ IndicesApi.prototype.getSettings = function indicesGetSettingsApi (params, optio
|
|
|
747
880
|
IndicesApi.prototype.getTemplate = function indicesGetTemplateApi (params, options, callback) {
|
|
748
881
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
749
882
|
|
|
750
|
-
|
|
883
|
+
let { method, body, name, ...querystring } = params
|
|
751
884
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
752
885
|
|
|
753
|
-
|
|
886
|
+
let path = ''
|
|
754
887
|
if ((name) != null) {
|
|
755
888
|
if (method == null) method = 'GET'
|
|
756
889
|
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
|
@@ -773,10 +906,10 @@ IndicesApi.prototype.getTemplate = function indicesGetTemplateApi (params, optio
|
|
|
773
906
|
IndicesApi.prototype.getUpgrade = function indicesGetUpgradeApi (params, options, callback) {
|
|
774
907
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
775
908
|
|
|
776
|
-
|
|
909
|
+
let { method, body, index, ...querystring } = params
|
|
777
910
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
778
911
|
|
|
779
|
-
|
|
912
|
+
let path = ''
|
|
780
913
|
if (method == null) method = 'GET'
|
|
781
914
|
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
|
782
915
|
|
|
@@ -791,19 +924,46 @@ IndicesApi.prototype.getUpgrade = function indicesGetUpgradeApi (params, options
|
|
|
791
924
|
return this.transport.request(request, options, callback)
|
|
792
925
|
}
|
|
793
926
|
|
|
927
|
+
IndicesApi.prototype.migrateToDataStream = function indicesMigrateToDataStreamApi (params, options, callback) {
|
|
928
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
929
|
+
|
|
930
|
+
// check required parameters
|
|
931
|
+
if (params.name == null) {
|
|
932
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
933
|
+
return handleError(err, callback)
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
let { method, body, name, ...querystring } = params
|
|
937
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
938
|
+
|
|
939
|
+
let path = ''
|
|
940
|
+
if (method == null) method = 'POST'
|
|
941
|
+
path = '/' + '_data_stream' + '/' + '_migrate' + '/' + encodeURIComponent(name)
|
|
942
|
+
|
|
943
|
+
// build request object
|
|
944
|
+
const request = {
|
|
945
|
+
method,
|
|
946
|
+
path,
|
|
947
|
+
body: body || '',
|
|
948
|
+
querystring
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
return this.transport.request(request, options, callback)
|
|
952
|
+
}
|
|
953
|
+
|
|
794
954
|
IndicesApi.prototype.open = function indicesOpenApi (params, options, callback) {
|
|
795
955
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
796
956
|
|
|
797
957
|
// check required parameters
|
|
798
|
-
if (params
|
|
958
|
+
if (params.index == null) {
|
|
799
959
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
800
960
|
return handleError(err, callback)
|
|
801
961
|
}
|
|
802
962
|
|
|
803
|
-
|
|
963
|
+
let { method, body, index, ...querystring } = params
|
|
804
964
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
805
965
|
|
|
806
|
-
|
|
966
|
+
let path = ''
|
|
807
967
|
if (method == null) method = 'POST'
|
|
808
968
|
path = '/' + encodeURIComponent(index) + '/' + '_open'
|
|
809
969
|
|
|
@@ -818,29 +978,56 @@ IndicesApi.prototype.open = function indicesOpenApi (params, options, callback)
|
|
|
818
978
|
return this.transport.request(request, options, callback)
|
|
819
979
|
}
|
|
820
980
|
|
|
981
|
+
IndicesApi.prototype.promoteDataStream = function indicesPromoteDataStreamApi (params, options, callback) {
|
|
982
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
983
|
+
|
|
984
|
+
// check required parameters
|
|
985
|
+
if (params.name == null) {
|
|
986
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
987
|
+
return handleError(err, callback)
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
let { method, body, name, ...querystring } = params
|
|
991
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
992
|
+
|
|
993
|
+
let path = ''
|
|
994
|
+
if (method == null) method = 'POST'
|
|
995
|
+
path = '/' + '_data_stream' + '/' + '_promote' + '/' + encodeURIComponent(name)
|
|
996
|
+
|
|
997
|
+
// build request object
|
|
998
|
+
const request = {
|
|
999
|
+
method,
|
|
1000
|
+
path,
|
|
1001
|
+
body: body || '',
|
|
1002
|
+
querystring
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
return this.transport.request(request, options, callback)
|
|
1006
|
+
}
|
|
1007
|
+
|
|
821
1008
|
IndicesApi.prototype.putAlias = function indicesPutAliasApi (params, options, callback) {
|
|
822
1009
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
823
1010
|
|
|
824
1011
|
// check required parameters
|
|
825
|
-
if (params
|
|
1012
|
+
if (params.index == null) {
|
|
826
1013
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
827
1014
|
return handleError(err, callback)
|
|
828
1015
|
}
|
|
829
|
-
if (params
|
|
1016
|
+
if (params.name == null) {
|
|
830
1017
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
831
1018
|
return handleError(err, callback)
|
|
832
1019
|
}
|
|
833
1020
|
|
|
834
1021
|
// check required url components
|
|
835
|
-
if (params
|
|
1022
|
+
if (params.name != null && (params.index == null)) {
|
|
836
1023
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
837
1024
|
return handleError(err, callback)
|
|
838
1025
|
}
|
|
839
1026
|
|
|
840
|
-
|
|
1027
|
+
let { method, body, index, name, ...querystring } = params
|
|
841
1028
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
842
1029
|
|
|
843
|
-
|
|
1030
|
+
let path = ''
|
|
844
1031
|
if ((index) != null && (name) != null) {
|
|
845
1032
|
if (method == null) method = 'PUT'
|
|
846
1033
|
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
|
@@ -864,19 +1051,19 @@ IndicesApi.prototype.putIndexTemplate = function indicesPutIndexTemplateApi (par
|
|
|
864
1051
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
865
1052
|
|
|
866
1053
|
// check required parameters
|
|
867
|
-
if (params
|
|
1054
|
+
if (params.name == null) {
|
|
868
1055
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
869
1056
|
return handleError(err, callback)
|
|
870
1057
|
}
|
|
871
|
-
if (params
|
|
1058
|
+
if (params.body == null) {
|
|
872
1059
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
873
1060
|
return handleError(err, callback)
|
|
874
1061
|
}
|
|
875
1062
|
|
|
876
|
-
|
|
1063
|
+
let { method, body, name, ...querystring } = params
|
|
877
1064
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
878
1065
|
|
|
879
|
-
|
|
1066
|
+
let path = ''
|
|
880
1067
|
if (method == null) method = 'PUT'
|
|
881
1068
|
path = '/' + '_index_template' + '/' + encodeURIComponent(name)
|
|
882
1069
|
|
|
@@ -895,15 +1082,15 @@ IndicesApi.prototype.putMapping = function indicesPutMappingApi (params, options
|
|
|
895
1082
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
896
1083
|
|
|
897
1084
|
// check required parameters
|
|
898
|
-
if (params
|
|
1085
|
+
if (params.body == null) {
|
|
899
1086
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
900
1087
|
return handleError(err, callback)
|
|
901
1088
|
}
|
|
902
1089
|
|
|
903
|
-
|
|
1090
|
+
let { method, body, index, type, ...querystring } = params
|
|
904
1091
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
905
1092
|
|
|
906
|
-
|
|
1093
|
+
let path = ''
|
|
907
1094
|
if ((index) != null && (type) != null) {
|
|
908
1095
|
if (method == null) method = 'PUT'
|
|
909
1096
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mapping'
|
|
@@ -945,15 +1132,15 @@ IndicesApi.prototype.putSettings = function indicesPutSettingsApi (params, optio
|
|
|
945
1132
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
946
1133
|
|
|
947
1134
|
// check required parameters
|
|
948
|
-
if (params
|
|
1135
|
+
if (params.body == null) {
|
|
949
1136
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
950
1137
|
return handleError(err, callback)
|
|
951
1138
|
}
|
|
952
1139
|
|
|
953
|
-
|
|
1140
|
+
let { method, body, index, ...querystring } = params
|
|
954
1141
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
955
1142
|
|
|
956
|
-
|
|
1143
|
+
let path = ''
|
|
957
1144
|
if ((index) != null) {
|
|
958
1145
|
if (method == null) method = 'PUT'
|
|
959
1146
|
path = '/' + encodeURIComponent(index) + '/' + '_settings'
|
|
@@ -977,19 +1164,19 @@ IndicesApi.prototype.putTemplate = function indicesPutTemplateApi (params, optio
|
|
|
977
1164
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
978
1165
|
|
|
979
1166
|
// check required parameters
|
|
980
|
-
if (params
|
|
1167
|
+
if (params.name == null) {
|
|
981
1168
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
982
1169
|
return handleError(err, callback)
|
|
983
1170
|
}
|
|
984
|
-
if (params
|
|
1171
|
+
if (params.body == null) {
|
|
985
1172
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
986
1173
|
return handleError(err, callback)
|
|
987
1174
|
}
|
|
988
1175
|
|
|
989
|
-
|
|
1176
|
+
let { method, body, name, ...querystring } = params
|
|
990
1177
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
991
1178
|
|
|
992
|
-
|
|
1179
|
+
let path = ''
|
|
993
1180
|
if (method == null) method = 'PUT'
|
|
994
1181
|
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
|
995
1182
|
|
|
@@ -1007,10 +1194,10 @@ IndicesApi.prototype.putTemplate = function indicesPutTemplateApi (params, optio
|
|
|
1007
1194
|
IndicesApi.prototype.recovery = function indicesRecoveryApi (params, options, callback) {
|
|
1008
1195
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1009
1196
|
|
|
1010
|
-
|
|
1197
|
+
let { method, body, index, ...querystring } = params
|
|
1011
1198
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1012
1199
|
|
|
1013
|
-
|
|
1200
|
+
let path = ''
|
|
1014
1201
|
if ((index) != null) {
|
|
1015
1202
|
if (method == null) method = 'GET'
|
|
1016
1203
|
path = '/' + encodeURIComponent(index) + '/' + '_recovery'
|
|
@@ -1033,10 +1220,10 @@ IndicesApi.prototype.recovery = function indicesRecoveryApi (params, options, ca
|
|
|
1033
1220
|
IndicesApi.prototype.refresh = function indicesRefreshApi (params, options, callback) {
|
|
1034
1221
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1035
1222
|
|
|
1036
|
-
|
|
1223
|
+
let { method, body, index, ...querystring } = params
|
|
1037
1224
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1038
1225
|
|
|
1039
|
-
|
|
1226
|
+
let path = ''
|
|
1040
1227
|
if ((index) != null) {
|
|
1041
1228
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1042
1229
|
path = '/' + encodeURIComponent(index) + '/' + '_refresh'
|
|
@@ -1056,19 +1243,46 @@ IndicesApi.prototype.refresh = function indicesRefreshApi (params, options, call
|
|
|
1056
1243
|
return this.transport.request(request, options, callback)
|
|
1057
1244
|
}
|
|
1058
1245
|
|
|
1246
|
+
IndicesApi.prototype.reloadSearchAnalyzers = function indicesReloadSearchAnalyzersApi (params, options, callback) {
|
|
1247
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1248
|
+
|
|
1249
|
+
// check required parameters
|
|
1250
|
+
if (params.index == null) {
|
|
1251
|
+
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
1252
|
+
return handleError(err, callback)
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
let { method, body, index, ...querystring } = params
|
|
1256
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1257
|
+
|
|
1258
|
+
let path = ''
|
|
1259
|
+
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1260
|
+
path = '/' + encodeURIComponent(index) + '/' + '_reload_search_analyzers'
|
|
1261
|
+
|
|
1262
|
+
// build request object
|
|
1263
|
+
const request = {
|
|
1264
|
+
method,
|
|
1265
|
+
path,
|
|
1266
|
+
body: body || '',
|
|
1267
|
+
querystring
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
return this.transport.request(request, options, callback)
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1059
1273
|
IndicesApi.prototype.resolveIndex = function indicesResolveIndexApi (params, options, callback) {
|
|
1060
1274
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1061
1275
|
|
|
1062
1276
|
// check required parameters
|
|
1063
|
-
if (params
|
|
1277
|
+
if (params.name == null) {
|
|
1064
1278
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
1065
1279
|
return handleError(err, callback)
|
|
1066
1280
|
}
|
|
1067
1281
|
|
|
1068
|
-
|
|
1282
|
+
let { method, body, name, ...querystring } = params
|
|
1069
1283
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1070
1284
|
|
|
1071
|
-
|
|
1285
|
+
let path = ''
|
|
1072
1286
|
if (method == null) method = 'GET'
|
|
1073
1287
|
path = '/' + '_resolve' + '/' + 'index' + '/' + encodeURIComponent(name)
|
|
1074
1288
|
|
|
@@ -1087,21 +1301,21 @@ IndicesApi.prototype.rollover = function indicesRolloverApi (params, options, ca
|
|
|
1087
1301
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1088
1302
|
|
|
1089
1303
|
// check required parameters
|
|
1090
|
-
if (params
|
|
1304
|
+
if (params.alias == null) {
|
|
1091
1305
|
const err = new this[kConfigurationError]('Missing required parameter: alias')
|
|
1092
1306
|
return handleError(err, callback)
|
|
1093
1307
|
}
|
|
1094
1308
|
|
|
1095
1309
|
// check required url components
|
|
1096
|
-
if ((params
|
|
1310
|
+
if ((params.new_index != null || params.newIndex != null) && (params.alias == null)) {
|
|
1097
1311
|
const err = new this[kConfigurationError]('Missing required parameter of the url: alias')
|
|
1098
1312
|
return handleError(err, callback)
|
|
1099
1313
|
}
|
|
1100
1314
|
|
|
1101
|
-
|
|
1315
|
+
let { method, body, alias, newIndex, new_index, ...querystring } = params
|
|
1102
1316
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1103
1317
|
|
|
1104
|
-
|
|
1318
|
+
let path = ''
|
|
1105
1319
|
if ((alias) != null && (new_index || newIndex) != null) {
|
|
1106
1320
|
if (method == null) method = 'POST'
|
|
1107
1321
|
path = '/' + encodeURIComponent(alias) + '/' + '_rollover' + '/' + encodeURIComponent(new_index || newIndex)
|
|
@@ -1124,10 +1338,10 @@ IndicesApi.prototype.rollover = function indicesRolloverApi (params, options, ca
|
|
|
1124
1338
|
IndicesApi.prototype.segments = function indicesSegmentsApi (params, options, callback) {
|
|
1125
1339
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1126
1340
|
|
|
1127
|
-
|
|
1341
|
+
let { method, body, index, ...querystring } = params
|
|
1128
1342
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1129
1343
|
|
|
1130
|
-
|
|
1344
|
+
let path = ''
|
|
1131
1345
|
if ((index) != null) {
|
|
1132
1346
|
if (method == null) method = 'GET'
|
|
1133
1347
|
path = '/' + encodeURIComponent(index) + '/' + '_segments'
|
|
@@ -1150,10 +1364,10 @@ IndicesApi.prototype.segments = function indicesSegmentsApi (params, options, ca
|
|
|
1150
1364
|
IndicesApi.prototype.shardStores = function indicesShardStoresApi (params, options, callback) {
|
|
1151
1365
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1152
1366
|
|
|
1153
|
-
|
|
1367
|
+
let { method, body, index, ...querystring } = params
|
|
1154
1368
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1155
1369
|
|
|
1156
|
-
|
|
1370
|
+
let path = ''
|
|
1157
1371
|
if ((index) != null) {
|
|
1158
1372
|
if (method == null) method = 'GET'
|
|
1159
1373
|
path = '/' + encodeURIComponent(index) + '/' + '_shard_stores'
|
|
@@ -1177,25 +1391,25 @@ IndicesApi.prototype.shrink = function indicesShrinkApi (params, options, callba
|
|
|
1177
1391
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1178
1392
|
|
|
1179
1393
|
// check required parameters
|
|
1180
|
-
if (params
|
|
1394
|
+
if (params.index == null) {
|
|
1181
1395
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
1182
1396
|
return handleError(err, callback)
|
|
1183
1397
|
}
|
|
1184
|
-
if (params
|
|
1398
|
+
if (params.target == null) {
|
|
1185
1399
|
const err = new this[kConfigurationError]('Missing required parameter: target')
|
|
1186
1400
|
return handleError(err, callback)
|
|
1187
1401
|
}
|
|
1188
1402
|
|
|
1189
1403
|
// check required url components
|
|
1190
|
-
if (params
|
|
1404
|
+
if (params.target != null && (params.index == null)) {
|
|
1191
1405
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
1192
1406
|
return handleError(err, callback)
|
|
1193
1407
|
}
|
|
1194
1408
|
|
|
1195
|
-
|
|
1409
|
+
let { method, body, index, target, ...querystring } = params
|
|
1196
1410
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1197
1411
|
|
|
1198
|
-
|
|
1412
|
+
let path = ''
|
|
1199
1413
|
if (method == null) method = 'PUT'
|
|
1200
1414
|
path = '/' + encodeURIComponent(index) + '/' + '_shrink' + '/' + encodeURIComponent(target)
|
|
1201
1415
|
|
|
@@ -1214,15 +1428,15 @@ IndicesApi.prototype.simulateIndexTemplate = function indicesSimulateIndexTempla
|
|
|
1214
1428
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1215
1429
|
|
|
1216
1430
|
// check required parameters
|
|
1217
|
-
if (params
|
|
1431
|
+
if (params.name == null) {
|
|
1218
1432
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
1219
1433
|
return handleError(err, callback)
|
|
1220
1434
|
}
|
|
1221
1435
|
|
|
1222
|
-
|
|
1436
|
+
let { method, body, name, ...querystring } = params
|
|
1223
1437
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1224
1438
|
|
|
1225
|
-
|
|
1439
|
+
let path = ''
|
|
1226
1440
|
if (method == null) method = 'POST'
|
|
1227
1441
|
path = '/' + '_index_template' + '/' + '_simulate_index' + '/' + encodeURIComponent(name)
|
|
1228
1442
|
|
|
@@ -1240,10 +1454,10 @@ IndicesApi.prototype.simulateIndexTemplate = function indicesSimulateIndexTempla
|
|
|
1240
1454
|
IndicesApi.prototype.simulateTemplate = function indicesSimulateTemplateApi (params, options, callback) {
|
|
1241
1455
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1242
1456
|
|
|
1243
|
-
|
|
1457
|
+
let { method, body, name, ...querystring } = params
|
|
1244
1458
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1245
1459
|
|
|
1246
|
-
|
|
1460
|
+
let path = ''
|
|
1247
1461
|
if ((name) != null) {
|
|
1248
1462
|
if (method == null) method = 'POST'
|
|
1249
1463
|
path = '/' + '_index_template' + '/' + '_simulate' + '/' + encodeURIComponent(name)
|
|
@@ -1267,25 +1481,25 @@ IndicesApi.prototype.split = function indicesSplitApi (params, options, callback
|
|
|
1267
1481
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1268
1482
|
|
|
1269
1483
|
// check required parameters
|
|
1270
|
-
if (params
|
|
1484
|
+
if (params.index == null) {
|
|
1271
1485
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
1272
1486
|
return handleError(err, callback)
|
|
1273
1487
|
}
|
|
1274
|
-
if (params
|
|
1488
|
+
if (params.target == null) {
|
|
1275
1489
|
const err = new this[kConfigurationError]('Missing required parameter: target')
|
|
1276
1490
|
return handleError(err, callback)
|
|
1277
1491
|
}
|
|
1278
1492
|
|
|
1279
1493
|
// check required url components
|
|
1280
|
-
if (params
|
|
1494
|
+
if (params.target != null && (params.index == null)) {
|
|
1281
1495
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
1282
1496
|
return handleError(err, callback)
|
|
1283
1497
|
}
|
|
1284
1498
|
|
|
1285
|
-
|
|
1499
|
+
let { method, body, index, target, ...querystring } = params
|
|
1286
1500
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1287
1501
|
|
|
1288
|
-
|
|
1502
|
+
let path = ''
|
|
1289
1503
|
if (method == null) method = 'PUT'
|
|
1290
1504
|
path = '/' + encodeURIComponent(index) + '/' + '_split' + '/' + encodeURIComponent(target)
|
|
1291
1505
|
|
|
@@ -1303,10 +1517,10 @@ IndicesApi.prototype.split = function indicesSplitApi (params, options, callback
|
|
|
1303
1517
|
IndicesApi.prototype.stats = function indicesStatsApi (params, options, callback) {
|
|
1304
1518
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1305
1519
|
|
|
1306
|
-
|
|
1520
|
+
let { method, body, metric, index, ...querystring } = params
|
|
1307
1521
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1308
1522
|
|
|
1309
|
-
|
|
1523
|
+
let path = ''
|
|
1310
1524
|
if ((index) != null && (metric) != null) {
|
|
1311
1525
|
if (method == null) method = 'GET'
|
|
1312
1526
|
path = '/' + encodeURIComponent(index) + '/' + '_stats' + '/' + encodeURIComponent(metric)
|
|
@@ -1332,184 +1546,21 @@ IndicesApi.prototype.stats = function indicesStatsApi (params, options, callback
|
|
|
1332
1546
|
return this.transport.request(request, options, callback)
|
|
1333
1547
|
}
|
|
1334
1548
|
|
|
1335
|
-
IndicesApi.prototype.
|
|
1336
|
-
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1337
|
-
|
|
1338
|
-
// check required parameters
|
|
1339
|
-
if (params['body'] == null) {
|
|
1340
|
-
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
1341
|
-
return handleError(err, callback)
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
var { method, body, ...querystring } = params
|
|
1345
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1346
|
-
|
|
1347
|
-
var path = ''
|
|
1348
|
-
if (method == null) method = 'POST'
|
|
1349
|
-
path = '/' + '_aliases'
|
|
1350
|
-
|
|
1351
|
-
// build request object
|
|
1352
|
-
const request = {
|
|
1353
|
-
method,
|
|
1354
|
-
path,
|
|
1355
|
-
body: body || '',
|
|
1356
|
-
querystring
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
return this.transport.request(request, options, callback)
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
IndicesApi.prototype.upgrade = function indicesUpgradeApi (params, options, callback) {
|
|
1363
|
-
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1364
|
-
|
|
1365
|
-
var { method, body, index, ...querystring } = params
|
|
1366
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1367
|
-
|
|
1368
|
-
var path = ''
|
|
1369
|
-
if (method == null) method = 'POST'
|
|
1370
|
-
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
|
1371
|
-
|
|
1372
|
-
// build request object
|
|
1373
|
-
const request = {
|
|
1374
|
-
method,
|
|
1375
|
-
path,
|
|
1376
|
-
body: body || '',
|
|
1377
|
-
querystring
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
return this.transport.request(request, options, callback)
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
IndicesApi.prototype.validateQuery = function indicesValidateQueryApi (params, options, callback) {
|
|
1384
|
-
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1385
|
-
|
|
1386
|
-
// check required url components
|
|
1387
|
-
if (params['type'] != null && (params['index'] == null)) {
|
|
1388
|
-
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
1389
|
-
return handleError(err, callback)
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
var { method, body, index, type, ...querystring } = params
|
|
1393
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1394
|
-
|
|
1395
|
-
var path = ''
|
|
1396
|
-
if ((index) != null && (type) != null) {
|
|
1397
|
-
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1398
|
-
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_validate' + '/' + 'query'
|
|
1399
|
-
} else if ((index) != null) {
|
|
1400
|
-
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1401
|
-
path = '/' + encodeURIComponent(index) + '/' + '_validate' + '/' + 'query'
|
|
1402
|
-
} else {
|
|
1403
|
-
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1404
|
-
path = '/' + '_validate' + '/' + 'query'
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
// build request object
|
|
1408
|
-
const request = {
|
|
1409
|
-
method,
|
|
1410
|
-
path,
|
|
1411
|
-
body: body || '',
|
|
1412
|
-
querystring
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
return this.transport.request(request, options, callback)
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
IndicesApi.prototype.createDataStream = function indicesCreateDataStreamApi (params, options, callback) {
|
|
1419
|
-
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1420
|
-
|
|
1421
|
-
// check required parameters
|
|
1422
|
-
if (params['name'] == null) {
|
|
1423
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
1424
|
-
return handleError(err, callback)
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
var { method, body, name, ...querystring } = params
|
|
1428
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1429
|
-
|
|
1430
|
-
var path = ''
|
|
1431
|
-
if (method == null) method = 'PUT'
|
|
1432
|
-
path = '/' + '_data_stream' + '/' + encodeURIComponent(name)
|
|
1433
|
-
|
|
1434
|
-
// build request object
|
|
1435
|
-
const request = {
|
|
1436
|
-
method,
|
|
1437
|
-
path,
|
|
1438
|
-
body: body || '',
|
|
1439
|
-
querystring
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
return this.transport.request(request, options, callback)
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
IndicesApi.prototype.dataStreamsStats = function indicesDataStreamsStatsApi (params, options, callback) {
|
|
1446
|
-
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1447
|
-
|
|
1448
|
-
var { method, body, name, ...querystring } = params
|
|
1449
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1450
|
-
|
|
1451
|
-
var path = ''
|
|
1452
|
-
if ((name) != null) {
|
|
1453
|
-
if (method == null) method = 'GET'
|
|
1454
|
-
path = '/' + '_data_stream' + '/' + encodeURIComponent(name) + '/' + '_stats'
|
|
1455
|
-
} else {
|
|
1456
|
-
if (method == null) method = 'GET'
|
|
1457
|
-
path = '/' + '_data_stream' + '/' + '_stats'
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
// build request object
|
|
1461
|
-
const request = {
|
|
1462
|
-
method,
|
|
1463
|
-
path,
|
|
1464
|
-
body: null,
|
|
1465
|
-
querystring
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
return this.transport.request(request, options, callback)
|
|
1469
|
-
}
|
|
1470
|
-
|
|
1471
|
-
IndicesApi.prototype.deleteDataStream = function indicesDeleteDataStreamApi (params, options, callback) {
|
|
1472
|
-
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1473
|
-
|
|
1474
|
-
// check required parameters
|
|
1475
|
-
if (params['name'] == null) {
|
|
1476
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
1477
|
-
return handleError(err, callback)
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
var { method, body, name, ...querystring } = params
|
|
1481
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1482
|
-
|
|
1483
|
-
var path = ''
|
|
1484
|
-
if (method == null) method = 'DELETE'
|
|
1485
|
-
path = '/' + '_data_stream' + '/' + encodeURIComponent(name)
|
|
1486
|
-
|
|
1487
|
-
// build request object
|
|
1488
|
-
const request = {
|
|
1489
|
-
method,
|
|
1490
|
-
path,
|
|
1491
|
-
body: body || '',
|
|
1492
|
-
querystring
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
return this.transport.request(request, options, callback)
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
IndicesApi.prototype.freeze = function indicesFreezeApi (params, options, callback) {
|
|
1549
|
+
IndicesApi.prototype.unfreeze = function indicesUnfreezeApi (params, options, callback) {
|
|
1499
1550
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1500
1551
|
|
|
1501
1552
|
// check required parameters
|
|
1502
|
-
if (params
|
|
1553
|
+
if (params.index == null) {
|
|
1503
1554
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
1504
1555
|
return handleError(err, callback)
|
|
1505
1556
|
}
|
|
1506
1557
|
|
|
1507
|
-
|
|
1558
|
+
let { method, body, index, ...querystring } = params
|
|
1508
1559
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1509
1560
|
|
|
1510
|
-
|
|
1561
|
+
let path = ''
|
|
1511
1562
|
if (method == null) method = 'POST'
|
|
1512
|
-
path = '/' + encodeURIComponent(index) + '/' + '
|
|
1563
|
+
path = '/' + encodeURIComponent(index) + '/' + '_unfreeze'
|
|
1513
1564
|
|
|
1514
1565
|
// build request object
|
|
1515
1566
|
const request = {
|
|
@@ -1522,47 +1573,21 @@ IndicesApi.prototype.freeze = function indicesFreezeApi (params, options, callba
|
|
|
1522
1573
|
return this.transport.request(request, options, callback)
|
|
1523
1574
|
}
|
|
1524
1575
|
|
|
1525
|
-
IndicesApi.prototype.
|
|
1526
|
-
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1527
|
-
|
|
1528
|
-
var { method, body, name, ...querystring } = params
|
|
1529
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1530
|
-
|
|
1531
|
-
var path = ''
|
|
1532
|
-
if ((name) != null) {
|
|
1533
|
-
if (method == null) method = 'GET'
|
|
1534
|
-
path = '/' + '_data_stream' + '/' + encodeURIComponent(name)
|
|
1535
|
-
} else {
|
|
1536
|
-
if (method == null) method = 'GET'
|
|
1537
|
-
path = '/' + '_data_stream'
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
// build request object
|
|
1541
|
-
const request = {
|
|
1542
|
-
method,
|
|
1543
|
-
path,
|
|
1544
|
-
body: null,
|
|
1545
|
-
querystring
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
return this.transport.request(request, options, callback)
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
IndicesApi.prototype.migrateToDataStream = function indicesMigrateToDataStreamApi (params, options, callback) {
|
|
1576
|
+
IndicesApi.prototype.updateAliases = function indicesUpdateAliasesApi (params, options, callback) {
|
|
1552
1577
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1553
1578
|
|
|
1554
1579
|
// check required parameters
|
|
1555
|
-
if (params
|
|
1556
|
-
const err = new this[kConfigurationError]('Missing required parameter:
|
|
1580
|
+
if (params.body == null) {
|
|
1581
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
1557
1582
|
return handleError(err, callback)
|
|
1558
1583
|
}
|
|
1559
1584
|
|
|
1560
|
-
|
|
1585
|
+
let { method, body, ...querystring } = params
|
|
1561
1586
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1562
1587
|
|
|
1563
|
-
|
|
1588
|
+
let path = ''
|
|
1564
1589
|
if (method == null) method = 'POST'
|
|
1565
|
-
path = '/' + '
|
|
1590
|
+
path = '/' + '_aliases'
|
|
1566
1591
|
|
|
1567
1592
|
// build request object
|
|
1568
1593
|
const request = {
|
|
@@ -1575,21 +1600,15 @@ IndicesApi.prototype.migrateToDataStream = function indicesMigrateToDataStreamAp
|
|
|
1575
1600
|
return this.transport.request(request, options, callback)
|
|
1576
1601
|
}
|
|
1577
1602
|
|
|
1578
|
-
IndicesApi.prototype.
|
|
1603
|
+
IndicesApi.prototype.upgrade = function indicesUpgradeApi (params, options, callback) {
|
|
1579
1604
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1580
1605
|
|
|
1581
|
-
|
|
1582
|
-
if (params['name'] == null) {
|
|
1583
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
1584
|
-
return handleError(err, callback)
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
var { method, body, name, ...querystring } = params
|
|
1606
|
+
let { method, body, index, ...querystring } = params
|
|
1588
1607
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1589
1608
|
|
|
1590
|
-
|
|
1609
|
+
let path = ''
|
|
1591
1610
|
if (method == null) method = 'POST'
|
|
1592
|
-
path = '/' +
|
|
1611
|
+
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
|
1593
1612
|
|
|
1594
1613
|
// build request object
|
|
1595
1614
|
const request = {
|
|
@@ -1602,49 +1621,30 @@ IndicesApi.prototype.promoteDataStream = function indicesPromoteDataStreamApi (p
|
|
|
1602
1621
|
return this.transport.request(request, options, callback)
|
|
1603
1622
|
}
|
|
1604
1623
|
|
|
1605
|
-
IndicesApi.prototype.
|
|
1624
|
+
IndicesApi.prototype.validateQuery = function indicesValidateQueryApi (params, options, callback) {
|
|
1606
1625
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1607
1626
|
|
|
1608
|
-
// check required
|
|
1609
|
-
if (params
|
|
1610
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
1627
|
+
// check required url components
|
|
1628
|
+
if (params.type != null && (params.index == null)) {
|
|
1629
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
1611
1630
|
return handleError(err, callback)
|
|
1612
1631
|
}
|
|
1613
1632
|
|
|
1614
|
-
|
|
1633
|
+
let { method, body, index, type, ...querystring } = params
|
|
1615
1634
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1616
1635
|
|
|
1617
|
-
|
|
1618
|
-
if (
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
return this.transport.request(request, options, callback)
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
IndicesApi.prototype.unfreeze = function indicesUnfreezeApi (params, options, callback) {
|
|
1633
|
-
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1634
|
-
|
|
1635
|
-
// check required parameters
|
|
1636
|
-
if (params['index'] == null) {
|
|
1637
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
1638
|
-
return handleError(err, callback)
|
|
1636
|
+
let path = ''
|
|
1637
|
+
if ((index) != null && (type) != null) {
|
|
1638
|
+
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1639
|
+
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_validate' + '/' + 'query'
|
|
1640
|
+
} else if ((index) != null) {
|
|
1641
|
+
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1642
|
+
path = '/' + encodeURIComponent(index) + '/' + '_validate' + '/' + 'query'
|
|
1643
|
+
} else {
|
|
1644
|
+
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1645
|
+
path = '/' + '_validate' + '/' + 'query'
|
|
1639
1646
|
}
|
|
1640
1647
|
|
|
1641
|
-
var { method, body, index, ...querystring } = params
|
|
1642
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1643
|
-
|
|
1644
|
-
var path = ''
|
|
1645
|
-
if (method == null) method = 'POST'
|
|
1646
|
-
path = '/' + encodeURIComponent(index) + '/' + '_unfreeze'
|
|
1647
|
-
|
|
1648
1648
|
// build request object
|
|
1649
1649
|
const request = {
|
|
1650
1650
|
method,
|
|
@@ -1659,7 +1659,10 @@ IndicesApi.prototype.unfreeze = function indicesUnfreezeApi (params, options, ca
|
|
|
1659
1659
|
Object.defineProperties(IndicesApi.prototype, {
|
|
1660
1660
|
add_block: { get () { return this.addBlock } },
|
|
1661
1661
|
clear_cache: { get () { return this.clearCache } },
|
|
1662
|
+
create_data_stream: { get () { return this.createDataStream } },
|
|
1663
|
+
data_streams_stats: { get () { return this.dataStreamsStats } },
|
|
1662
1664
|
delete_alias: { get () { return this.deleteAlias } },
|
|
1665
|
+
delete_data_stream: { get () { return this.deleteDataStream } },
|
|
1663
1666
|
delete_index_template: { get () { return this.deleteIndexTemplate } },
|
|
1664
1667
|
delete_template: { get () { return this.deleteTemplate } },
|
|
1665
1668
|
exists_alias: { get () { return this.existsAlias } },
|
|
@@ -1668,30 +1671,27 @@ Object.defineProperties(IndicesApi.prototype, {
|
|
|
1668
1671
|
exists_type: { get () { return this.existsType } },
|
|
1669
1672
|
flush_synced: { get () { return this.flushSynced } },
|
|
1670
1673
|
get_alias: { get () { return this.getAlias } },
|
|
1674
|
+
get_data_stream: { get () { return this.getDataStream } },
|
|
1671
1675
|
get_field_mapping: { get () { return this.getFieldMapping } },
|
|
1672
1676
|
get_index_template: { get () { return this.getIndexTemplate } },
|
|
1673
1677
|
get_mapping: { get () { return this.getMapping } },
|
|
1674
1678
|
get_settings: { get () { return this.getSettings } },
|
|
1675
1679
|
get_template: { get () { return this.getTemplate } },
|
|
1676
1680
|
get_upgrade: { get () { return this.getUpgrade } },
|
|
1681
|
+
migrate_to_data_stream: { get () { return this.migrateToDataStream } },
|
|
1682
|
+
promote_data_stream: { get () { return this.promoteDataStream } },
|
|
1677
1683
|
put_alias: { get () { return this.putAlias } },
|
|
1678
1684
|
put_index_template: { get () { return this.putIndexTemplate } },
|
|
1679
1685
|
put_mapping: { get () { return this.putMapping } },
|
|
1680
1686
|
put_settings: { get () { return this.putSettings } },
|
|
1681
1687
|
put_template: { get () { return this.putTemplate } },
|
|
1688
|
+
reload_search_analyzers: { get () { return this.reloadSearchAnalyzers } },
|
|
1682
1689
|
resolve_index: { get () { return this.resolveIndex } },
|
|
1683
1690
|
shard_stores: { get () { return this.shardStores } },
|
|
1684
1691
|
simulate_index_template: { get () { return this.simulateIndexTemplate } },
|
|
1685
1692
|
simulate_template: { get () { return this.simulateTemplate } },
|
|
1686
1693
|
update_aliases: { get () { return this.updateAliases } },
|
|
1687
|
-
validate_query: { get () { return this.validateQuery } }
|
|
1688
|
-
create_data_stream: { get () { return this.createDataStream } },
|
|
1689
|
-
data_streams_stats: { get () { return this.dataStreamsStats } },
|
|
1690
|
-
delete_data_stream: { get () { return this.deleteDataStream } },
|
|
1691
|
-
get_data_stream: { get () { return this.getDataStream } },
|
|
1692
|
-
migrate_to_data_stream: { get () { return this.migrateToDataStream } },
|
|
1693
|
-
promote_data_stream: { get () { return this.promoteDataStream } },
|
|
1694
|
-
reload_search_analyzers: { get () { return this.reloadSearchAnalyzers } }
|
|
1694
|
+
validate_query: { get () { return this.validateQuery } }
|
|
1695
1695
|
})
|
|
1696
1696
|
|
|
1697
1697
|
module.exports = IndicesApi
|