@elastic/elasticsearch 7.12.0 → 7.13.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/api/api/cat.js +91 -91
- package/api/api/features.js +23 -1
- package/api/api/fleet.js +65 -0
- package/api/api/indices.js +246 -246
- package/api/api/ingest.js +23 -1
- package/api/api/ml.js +141 -11
- package/api/api/nodes.js +2 -2
- package/api/api/searchable_snapshots.js +29 -2
- package/api/api/security.js +210 -0
- package/api/api/shutdown.js +124 -0
- package/api/api/snapshot.js +2 -2
- package/api/api/text_structure.js +1 -1
- package/api/index.js +153 -131
- package/api/new.d.ts +1498 -0
- package/api/requestParams.d.ts +105 -5
- package/api/types.d.ts +13881 -0
- package/free-report-junit.xml +3406 -9
- package/index.d.ts +179 -37
- package/index.js +5 -13
- package/lib/Connection.js +2 -2
- package/lib/Helpers.js +11 -11
- package/lib/Serializer.d.ts +5 -0
- package/lib/Serializer.js +10 -1
- package/lib/Transport.d.ts +1 -1
- package/lib/Transport.js +2 -2
- package/lib/errors.js +14 -1
- package/package.json +16 -16
package/api/api/cat.js
CHANGED
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
/* eslint no-unused-vars: 0 */
|
|
24
24
|
|
|
25
25
|
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
|
26
|
-
const acceptedQuerystring = ['format', 'local', 'h', 'help', 's', 'v', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'bytes', 'master_timeout', 'fields', 'time', 'ts', 'health', 'pri', 'include_unloaded_segments', '
|
|
27
|
-
const snakeCase = { expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', includeUnloadedSegments: 'include_unloaded_segments',
|
|
26
|
+
const acceptedQuerystring = ['format', 'local', 'h', 'help', 's', 'v', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'bytes', 'master_timeout', 'fields', 'time', 'ts', 'health', 'pri', 'include_unloaded_segments', 'allow_no_match', 'allow_no_datafeeds', 'allow_no_jobs', 'from', 'size', 'full_id', 'include_bootstrap', 'active_only', 'detailed', 'index', 'ignore_unavailable', 'nodes', 'actions', 'parent_task_id']
|
|
27
|
+
const snakeCase = { expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', includeUnloadedSegments: 'include_unloaded_segments', allowNoMatch: 'allow_no_match', allowNoDatafeeds: 'allow_no_datafeeds', allowNoJobs: 'allow_no_jobs', fullId: 'full_id', includeBootstrap: 'include_bootstrap', activeOnly: 'active_only', ignoreUnavailable: 'ignore_unavailable', parentTaskId: 'parent_task_id' }
|
|
28
28
|
|
|
29
29
|
function CatApi (transport, ConfigurationError) {
|
|
30
30
|
this.transport = transport
|
|
@@ -224,15 +224,20 @@ CatApi.prototype.master = function catMasterApi (params, options, callback) {
|
|
|
224
224
|
return this.transport.request(request, options, callback)
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
CatApi.prototype.
|
|
227
|
+
CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (params, options, callback) {
|
|
228
228
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
229
229
|
|
|
230
|
-
let { method, body, ...querystring } = params
|
|
230
|
+
let { method, body, id, ...querystring } = params
|
|
231
231
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
232
232
|
|
|
233
233
|
let path = ''
|
|
234
|
-
if (
|
|
235
|
-
|
|
234
|
+
if ((id) != null) {
|
|
235
|
+
if (method == null) method = 'GET'
|
|
236
|
+
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id)
|
|
237
|
+
} else {
|
|
238
|
+
if (method == null) method = 'GET'
|
|
239
|
+
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics'
|
|
240
|
+
}
|
|
236
241
|
|
|
237
242
|
// build request object
|
|
238
243
|
const request = {
|
|
@@ -245,15 +250,20 @@ CatApi.prototype.nodeattrs = function catNodeattrsApi (params, options, callback
|
|
|
245
250
|
return this.transport.request(request, options, callback)
|
|
246
251
|
}
|
|
247
252
|
|
|
248
|
-
CatApi.prototype.
|
|
253
|
+
CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, callback) {
|
|
249
254
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
250
255
|
|
|
251
|
-
let { method, body, ...querystring } = params
|
|
256
|
+
let { method, body, datafeedId, datafeed_id, ...querystring } = params
|
|
252
257
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
253
258
|
|
|
254
259
|
let path = ''
|
|
255
|
-
if (
|
|
256
|
-
|
|
260
|
+
if ((datafeed_id || datafeedId) != null) {
|
|
261
|
+
if (method == null) method = 'GET'
|
|
262
|
+
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
|
|
263
|
+
} else {
|
|
264
|
+
if (method == null) method = 'GET'
|
|
265
|
+
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds'
|
|
266
|
+
}
|
|
257
267
|
|
|
258
268
|
// build request object
|
|
259
269
|
const request = {
|
|
@@ -266,15 +276,20 @@ CatApi.prototype.nodes = function catNodesApi (params, options, callback) {
|
|
|
266
276
|
return this.transport.request(request, options, callback)
|
|
267
277
|
}
|
|
268
278
|
|
|
269
|
-
CatApi.prototype.
|
|
279
|
+
CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) {
|
|
270
280
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
271
281
|
|
|
272
|
-
let { method, body, ...querystring } = params
|
|
282
|
+
let { method, body, jobId, job_id, ...querystring } = params
|
|
273
283
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
274
284
|
|
|
275
285
|
let path = ''
|
|
276
|
-
if (
|
|
277
|
-
|
|
286
|
+
if ((job_id || jobId) != null) {
|
|
287
|
+
if (method == null) method = 'GET'
|
|
288
|
+
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
|
|
289
|
+
} else {
|
|
290
|
+
if (method == null) method = 'GET'
|
|
291
|
+
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors'
|
|
292
|
+
}
|
|
278
293
|
|
|
279
294
|
// build request object
|
|
280
295
|
const request = {
|
|
@@ -287,15 +302,20 @@ CatApi.prototype.pendingTasks = function catPendingTasksApi (params, options, ca
|
|
|
287
302
|
return this.transport.request(request, options, callback)
|
|
288
303
|
}
|
|
289
304
|
|
|
290
|
-
CatApi.prototype.
|
|
305
|
+
CatApi.prototype.mlTrainedModels = function catMlTrainedModelsApi (params, options, callback) {
|
|
291
306
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
292
307
|
|
|
293
|
-
let { method, body, ...querystring } = params
|
|
308
|
+
let { method, body, modelId, model_id, ...querystring } = params
|
|
294
309
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
295
310
|
|
|
296
311
|
let path = ''
|
|
297
|
-
if (
|
|
298
|
-
|
|
312
|
+
if ((model_id || modelId) != null) {
|
|
313
|
+
if (method == null) method = 'GET'
|
|
314
|
+
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
|
|
315
|
+
} else {
|
|
316
|
+
if (method == null) method = 'GET'
|
|
317
|
+
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models'
|
|
318
|
+
}
|
|
299
319
|
|
|
300
320
|
// build request object
|
|
301
321
|
const request = {
|
|
@@ -308,20 +328,15 @@ CatApi.prototype.plugins = function catPluginsApi (params, options, callback) {
|
|
|
308
328
|
return this.transport.request(request, options, callback)
|
|
309
329
|
}
|
|
310
330
|
|
|
311
|
-
CatApi.prototype.
|
|
331
|
+
CatApi.prototype.nodeattrs = function catNodeattrsApi (params, options, callback) {
|
|
312
332
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
313
333
|
|
|
314
|
-
let { method, body,
|
|
334
|
+
let { method, body, ...querystring } = params
|
|
315
335
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
316
336
|
|
|
317
337
|
let path = ''
|
|
318
|
-
if (
|
|
319
|
-
|
|
320
|
-
path = '/' + '_cat' + '/' + 'recovery' + '/' + encodeURIComponent(index)
|
|
321
|
-
} else {
|
|
322
|
-
if (method == null) method = 'GET'
|
|
323
|
-
path = '/' + '_cat' + '/' + 'recovery'
|
|
324
|
-
}
|
|
338
|
+
if (method == null) method = 'GET'
|
|
339
|
+
path = '/' + '_cat' + '/' + 'nodeattrs'
|
|
325
340
|
|
|
326
341
|
// build request object
|
|
327
342
|
const request = {
|
|
@@ -334,7 +349,7 @@ CatApi.prototype.recovery = function catRecoveryApi (params, options, callback)
|
|
|
334
349
|
return this.transport.request(request, options, callback)
|
|
335
350
|
}
|
|
336
351
|
|
|
337
|
-
CatApi.prototype.
|
|
352
|
+
CatApi.prototype.nodes = function catNodesApi (params, options, callback) {
|
|
338
353
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
339
354
|
|
|
340
355
|
let { method, body, ...querystring } = params
|
|
@@ -342,7 +357,7 @@ CatApi.prototype.repositories = function catRepositoriesApi (params, options, ca
|
|
|
342
357
|
|
|
343
358
|
let path = ''
|
|
344
359
|
if (method == null) method = 'GET'
|
|
345
|
-
path = '/' + '_cat' + '/' + '
|
|
360
|
+
path = '/' + '_cat' + '/' + 'nodes'
|
|
346
361
|
|
|
347
362
|
// build request object
|
|
348
363
|
const request = {
|
|
@@ -355,20 +370,15 @@ CatApi.prototype.repositories = function catRepositoriesApi (params, options, ca
|
|
|
355
370
|
return this.transport.request(request, options, callback)
|
|
356
371
|
}
|
|
357
372
|
|
|
358
|
-
CatApi.prototype.
|
|
373
|
+
CatApi.prototype.pendingTasks = function catPendingTasksApi (params, options, callback) {
|
|
359
374
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
360
375
|
|
|
361
|
-
let { method, body,
|
|
376
|
+
let { method, body, ...querystring } = params
|
|
362
377
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
363
378
|
|
|
364
379
|
let path = ''
|
|
365
|
-
if (
|
|
366
|
-
|
|
367
|
-
path = '/' + '_cat' + '/' + 'segments' + '/' + encodeURIComponent(index)
|
|
368
|
-
} else {
|
|
369
|
-
if (method == null) method = 'GET'
|
|
370
|
-
path = '/' + '_cat' + '/' + 'segments'
|
|
371
|
-
}
|
|
380
|
+
if (method == null) method = 'GET'
|
|
381
|
+
path = '/' + '_cat' + '/' + 'pending_tasks'
|
|
372
382
|
|
|
373
383
|
// build request object
|
|
374
384
|
const request = {
|
|
@@ -381,20 +391,15 @@ CatApi.prototype.segments = function catSegmentsApi (params, options, callback)
|
|
|
381
391
|
return this.transport.request(request, options, callback)
|
|
382
392
|
}
|
|
383
393
|
|
|
384
|
-
CatApi.prototype.
|
|
394
|
+
CatApi.prototype.plugins = function catPluginsApi (params, options, callback) {
|
|
385
395
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
386
396
|
|
|
387
|
-
let { method, body,
|
|
397
|
+
let { method, body, ...querystring } = params
|
|
388
398
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
389
399
|
|
|
390
400
|
let path = ''
|
|
391
|
-
if (
|
|
392
|
-
|
|
393
|
-
path = '/' + '_cat' + '/' + 'shards' + '/' + encodeURIComponent(index)
|
|
394
|
-
} else {
|
|
395
|
-
if (method == null) method = 'GET'
|
|
396
|
-
path = '/' + '_cat' + '/' + 'shards'
|
|
397
|
-
}
|
|
401
|
+
if (method == null) method = 'GET'
|
|
402
|
+
path = '/' + '_cat' + '/' + 'plugins'
|
|
398
403
|
|
|
399
404
|
// build request object
|
|
400
405
|
const request = {
|
|
@@ -407,19 +412,19 @@ CatApi.prototype.shards = function catShardsApi (params, options, callback) {
|
|
|
407
412
|
return this.transport.request(request, options, callback)
|
|
408
413
|
}
|
|
409
414
|
|
|
410
|
-
CatApi.prototype.
|
|
415
|
+
CatApi.prototype.recovery = function catRecoveryApi (params, options, callback) {
|
|
411
416
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
412
417
|
|
|
413
|
-
let { method, body,
|
|
418
|
+
let { method, body, index, ...querystring } = params
|
|
414
419
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
415
420
|
|
|
416
421
|
let path = ''
|
|
417
|
-
if ((
|
|
422
|
+
if ((index) != null) {
|
|
418
423
|
if (method == null) method = 'GET'
|
|
419
|
-
path = '/' + '_cat' + '/' + '
|
|
424
|
+
path = '/' + '_cat' + '/' + 'recovery' + '/' + encodeURIComponent(index)
|
|
420
425
|
} else {
|
|
421
426
|
if (method == null) method = 'GET'
|
|
422
|
-
path = '/' + '_cat' + '/' + '
|
|
427
|
+
path = '/' + '_cat' + '/' + 'recovery'
|
|
423
428
|
}
|
|
424
429
|
|
|
425
430
|
// build request object
|
|
@@ -433,7 +438,7 @@ CatApi.prototype.snapshots = function catSnapshotsApi (params, options, callback
|
|
|
433
438
|
return this.transport.request(request, options, callback)
|
|
434
439
|
}
|
|
435
440
|
|
|
436
|
-
CatApi.prototype.
|
|
441
|
+
CatApi.prototype.repositories = function catRepositoriesApi (params, options, callback) {
|
|
437
442
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
438
443
|
|
|
439
444
|
let { method, body, ...querystring } = params
|
|
@@ -441,7 +446,7 @@ CatApi.prototype.tasks = function catTasksApi (params, options, callback) {
|
|
|
441
446
|
|
|
442
447
|
let path = ''
|
|
443
448
|
if (method == null) method = 'GET'
|
|
444
|
-
path = '/' + '_cat' + '/' + '
|
|
449
|
+
path = '/' + '_cat' + '/' + 'repositories'
|
|
445
450
|
|
|
446
451
|
// build request object
|
|
447
452
|
const request = {
|
|
@@ -454,19 +459,19 @@ CatApi.prototype.tasks = function catTasksApi (params, options, callback) {
|
|
|
454
459
|
return this.transport.request(request, options, callback)
|
|
455
460
|
}
|
|
456
461
|
|
|
457
|
-
CatApi.prototype.
|
|
462
|
+
CatApi.prototype.segments = function catSegmentsApi (params, options, callback) {
|
|
458
463
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
459
464
|
|
|
460
|
-
let { method, body,
|
|
465
|
+
let { method, body, index, ...querystring } = params
|
|
461
466
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
462
467
|
|
|
463
468
|
let path = ''
|
|
464
|
-
if ((
|
|
469
|
+
if ((index) != null) {
|
|
465
470
|
if (method == null) method = 'GET'
|
|
466
|
-
path = '/' + '_cat' + '/' + '
|
|
471
|
+
path = '/' + '_cat' + '/' + 'segments' + '/' + encodeURIComponent(index)
|
|
467
472
|
} else {
|
|
468
473
|
if (method == null) method = 'GET'
|
|
469
|
-
path = '/' + '_cat' + '/' + '
|
|
474
|
+
path = '/' + '_cat' + '/' + 'segments'
|
|
470
475
|
}
|
|
471
476
|
|
|
472
477
|
// build request object
|
|
@@ -480,19 +485,19 @@ CatApi.prototype.templates = function catTemplatesApi (params, options, callback
|
|
|
480
485
|
return this.transport.request(request, options, callback)
|
|
481
486
|
}
|
|
482
487
|
|
|
483
|
-
CatApi.prototype.
|
|
488
|
+
CatApi.prototype.shards = function catShardsApi (params, options, callback) {
|
|
484
489
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
485
490
|
|
|
486
|
-
let { method, body,
|
|
491
|
+
let { method, body, index, ...querystring } = params
|
|
487
492
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
488
493
|
|
|
489
494
|
let path = ''
|
|
490
|
-
if ((
|
|
495
|
+
if ((index) != null) {
|
|
491
496
|
if (method == null) method = 'GET'
|
|
492
|
-
path = '/' + '_cat' + '/' + '
|
|
497
|
+
path = '/' + '_cat' + '/' + 'shards' + '/' + encodeURIComponent(index)
|
|
493
498
|
} else {
|
|
494
499
|
if (method == null) method = 'GET'
|
|
495
|
-
path = '/' + '_cat' + '/' + '
|
|
500
|
+
path = '/' + '_cat' + '/' + 'shards'
|
|
496
501
|
}
|
|
497
502
|
|
|
498
503
|
// build request object
|
|
@@ -506,19 +511,19 @@ CatApi.prototype.threadPool = function catThreadPoolApi (params, options, callba
|
|
|
506
511
|
return this.transport.request(request, options, callback)
|
|
507
512
|
}
|
|
508
513
|
|
|
509
|
-
CatApi.prototype.
|
|
514
|
+
CatApi.prototype.snapshots = function catSnapshotsApi (params, options, callback) {
|
|
510
515
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
511
516
|
|
|
512
|
-
let { method, body,
|
|
517
|
+
let { method, body, repository, ...querystring } = params
|
|
513
518
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
514
519
|
|
|
515
520
|
let path = ''
|
|
516
|
-
if ((
|
|
521
|
+
if ((repository) != null) {
|
|
517
522
|
if (method == null) method = 'GET'
|
|
518
|
-
path = '/' + '_cat' + '/' + '
|
|
523
|
+
path = '/' + '_cat' + '/' + 'snapshots' + '/' + encodeURIComponent(repository)
|
|
519
524
|
} else {
|
|
520
525
|
if (method == null) method = 'GET'
|
|
521
|
-
path = '/' + '_cat' + '/' + '
|
|
526
|
+
path = '/' + '_cat' + '/' + 'snapshots'
|
|
522
527
|
}
|
|
523
528
|
|
|
524
529
|
// build request object
|
|
@@ -532,20 +537,15 @@ CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (par
|
|
|
532
537
|
return this.transport.request(request, options, callback)
|
|
533
538
|
}
|
|
534
539
|
|
|
535
|
-
CatApi.prototype.
|
|
540
|
+
CatApi.prototype.tasks = function catTasksApi (params, options, callback) {
|
|
536
541
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
537
542
|
|
|
538
|
-
let { method, body,
|
|
543
|
+
let { method, body, ...querystring } = params
|
|
539
544
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
540
545
|
|
|
541
546
|
let path = ''
|
|
542
|
-
if (
|
|
543
|
-
|
|
544
|
-
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
|
|
545
|
-
} else {
|
|
546
|
-
if (method == null) method = 'GET'
|
|
547
|
-
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds'
|
|
548
|
-
}
|
|
547
|
+
if (method == null) method = 'GET'
|
|
548
|
+
path = '/' + '_cat' + '/' + 'tasks'
|
|
549
549
|
|
|
550
550
|
// build request object
|
|
551
551
|
const request = {
|
|
@@ -558,19 +558,19 @@ CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, call
|
|
|
558
558
|
return this.transport.request(request, options, callback)
|
|
559
559
|
}
|
|
560
560
|
|
|
561
|
-
CatApi.prototype.
|
|
561
|
+
CatApi.prototype.templates = function catTemplatesApi (params, options, callback) {
|
|
562
562
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
563
563
|
|
|
564
|
-
let { method, body,
|
|
564
|
+
let { method, body, name, ...querystring } = params
|
|
565
565
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
566
566
|
|
|
567
567
|
let path = ''
|
|
568
|
-
if ((
|
|
568
|
+
if ((name) != null) {
|
|
569
569
|
if (method == null) method = 'GET'
|
|
570
|
-
path = '/' + '_cat' + '/' + '
|
|
570
|
+
path = '/' + '_cat' + '/' + 'templates' + '/' + encodeURIComponent(name)
|
|
571
571
|
} else {
|
|
572
572
|
if (method == null) method = 'GET'
|
|
573
|
-
path = '/' + '_cat' + '/' + '
|
|
573
|
+
path = '/' + '_cat' + '/' + 'templates'
|
|
574
574
|
}
|
|
575
575
|
|
|
576
576
|
// build request object
|
|
@@ -584,19 +584,19 @@ CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) {
|
|
|
584
584
|
return this.transport.request(request, options, callback)
|
|
585
585
|
}
|
|
586
586
|
|
|
587
|
-
CatApi.prototype.
|
|
587
|
+
CatApi.prototype.threadPool = function catThreadPoolApi (params, options, callback) {
|
|
588
588
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
589
589
|
|
|
590
|
-
let { method, body,
|
|
590
|
+
let { method, body, threadPoolPatterns, thread_pool_patterns, ...querystring } = params
|
|
591
591
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
592
592
|
|
|
593
593
|
let path = ''
|
|
594
|
-
if ((
|
|
594
|
+
if ((thread_pool_patterns || threadPoolPatterns) != null) {
|
|
595
595
|
if (method == null) method = 'GET'
|
|
596
|
-
path = '/' + '_cat' + '/' + '
|
|
596
|
+
path = '/' + '_cat' + '/' + 'thread_pool' + '/' + encodeURIComponent(thread_pool_patterns || threadPoolPatterns)
|
|
597
597
|
} else {
|
|
598
598
|
if (method == null) method = 'GET'
|
|
599
|
-
path = '/' + '_cat' + '/' + '
|
|
599
|
+
path = '/' + '_cat' + '/' + 'thread_pool'
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
// build request object
|
|
@@ -637,12 +637,12 @@ CatApi.prototype.transforms = function catTransformsApi (params, options, callba
|
|
|
637
637
|
}
|
|
638
638
|
|
|
639
639
|
Object.defineProperties(CatApi.prototype, {
|
|
640
|
-
pending_tasks: { get () { return this.pendingTasks } },
|
|
641
|
-
thread_pool: { get () { return this.threadPool } },
|
|
642
640
|
ml_data_frame_analytics: { get () { return this.mlDataFrameAnalytics } },
|
|
643
641
|
ml_datafeeds: { get () { return this.mlDatafeeds } },
|
|
644
642
|
ml_jobs: { get () { return this.mlJobs } },
|
|
645
|
-
ml_trained_models: { get () { return this.mlTrainedModels } }
|
|
643
|
+
ml_trained_models: { get () { return this.mlTrainedModels } },
|
|
644
|
+
pending_tasks: { get () { return this.pendingTasks } },
|
|
645
|
+
thread_pool: { get () { return this.threadPool } }
|
|
646
646
|
})
|
|
647
647
|
|
|
648
648
|
module.exports = CatApi
|
package/api/api/features.js
CHANGED
|
@@ -52,8 +52,30 @@ FeaturesApi.prototype.getFeatures = function featuresGetFeaturesApi (params, opt
|
|
|
52
52
|
return this.transport.request(request, options, callback)
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
FeaturesApi.prototype.resetFeatures = function featuresResetFeaturesApi (params, options, callback) {
|
|
56
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
57
|
+
|
|
58
|
+
let { method, body, ...querystring } = params
|
|
59
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
60
|
+
|
|
61
|
+
let path = ''
|
|
62
|
+
if (method == null) method = 'POST'
|
|
63
|
+
path = '/' + '_features' + '/' + '_reset'
|
|
64
|
+
|
|
65
|
+
// build request object
|
|
66
|
+
const request = {
|
|
67
|
+
method,
|
|
68
|
+
path,
|
|
69
|
+
body: body || '',
|
|
70
|
+
querystring
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return this.transport.request(request, options, callback)
|
|
74
|
+
}
|
|
75
|
+
|
|
55
76
|
Object.defineProperties(FeaturesApi.prototype, {
|
|
56
|
-
get_features: { get () { return this.getFeatures } }
|
|
77
|
+
get_features: { get () { return this.getFeatures } },
|
|
78
|
+
reset_features: { get () { return this.resetFeatures } }
|
|
57
79
|
})
|
|
58
80
|
|
|
59
81
|
module.exports = FeaturesApi
|
package/api/api/fleet.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
/* eslint camelcase: 0 */
|
|
23
|
+
/* eslint no-unused-vars: 0 */
|
|
24
|
+
|
|
25
|
+
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
|
26
|
+
const acceptedQuerystring = ['wait_for_advance', 'wait_for_index', 'checkpoints', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
|
27
|
+
const snakeCase = { waitForAdvance: 'wait_for_advance', waitForIndex: 'wait_for_index', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|
28
|
+
|
|
29
|
+
function FleetApi (transport, ConfigurationError) {
|
|
30
|
+
this.transport = transport
|
|
31
|
+
this[kConfigurationError] = ConfigurationError
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
FleetApi.prototype.globalCheckpoints = function fleetGlobalCheckpointsApi (params, options, callback) {
|
|
35
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
|
+
|
|
37
|
+
// check required parameters
|
|
38
|
+
if (params.index == null) {
|
|
39
|
+
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
40
|
+
return handleError(err, callback)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let { method, body, index, ...querystring } = params
|
|
44
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
45
|
+
|
|
46
|
+
let path = ''
|
|
47
|
+
if (method == null) method = 'GET'
|
|
48
|
+
path = '/' + encodeURIComponent(index) + '/' + '_fleet' + '/' + 'global_checkpoints'
|
|
49
|
+
|
|
50
|
+
// build request object
|
|
51
|
+
const request = {
|
|
52
|
+
method,
|
|
53
|
+
path,
|
|
54
|
+
body: null,
|
|
55
|
+
querystring
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return this.transport.request(request, options, callback)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
Object.defineProperties(FleetApi.prototype, {
|
|
62
|
+
global_checkpoints: { get () { return this.globalCheckpoints } }
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
module.exports = FleetApi
|