@elastic/elasticsearch-canary
Advanced tools
Comparing version 8.0.0-canary.4 to 8.0.0-canary.5
@@ -26,4 +26,4 @@ /* | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') | ||
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', 'full_id', 'include_bootstrap', 'active_only', 'detailed', 'index', 'ignore_unavailable', 'nodes', 'actions', 'parent_task_id', 'allow_no_match', 'allow_no_datafeeds', 'allow_no_jobs', 'from', 'size'] | ||
const snakeCase = { expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', includeUnloadedSegments: 'include_unloaded_segments', fullId: 'full_id', includeBootstrap: 'include_bootstrap', activeOnly: 'active_only', ignoreUnavailable: 'ignore_unavailable', parentTaskId: 'parent_task_id', allowNoMatch: 'allow_no_match', allowNoDatafeeds: 'allow_no_datafeeds', allowNoJobs: 'allow_no_jobs' } | ||
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'] | ||
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' } | ||
@@ -228,11 +228,16 @@ function CatApi (transport, ConfigurationError) { | ||
CatApi.prototype.nodeattrs = function catNodeattrsApi (params, options, callback) { | ||
CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, ...querystring } = params | ||
let { method, body, id, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'nodeattrs' | ||
if ((id) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics' | ||
} | ||
@@ -250,11 +255,16 @@ // build request object | ||
CatApi.prototype.nodes = function catNodesApi (params, options, callback) { | ||
CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, ...querystring } = params | ||
let { method, body, datafeedId, datafeed_id, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'nodes' | ||
if ((datafeed_id || datafeedId) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' | ||
} | ||
@@ -272,11 +282,16 @@ // build request object | ||
CatApi.prototype.pendingTasks = function catPendingTasksApi (params, options, callback) { | ||
CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, ...querystring } = params | ||
let { method, body, jobId, job_id, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'pending_tasks' | ||
if ((job_id || jobId) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors' | ||
} | ||
@@ -294,11 +309,16 @@ // build request object | ||
CatApi.prototype.plugins = function catPluginsApi (params, options, callback) { | ||
CatApi.prototype.mlTrainedModels = function catMlTrainedModelsApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, ...querystring } = params | ||
let { method, body, modelId, model_id, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'plugins' | ||
if ((model_id || modelId) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' | ||
} | ||
@@ -316,16 +336,11 @@ // build request object | ||
CatApi.prototype.recovery = function catRecoveryApi (params, options, callback) { | ||
CatApi.prototype.nodeattrs = function catNodeattrsApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, index, ...querystring } = params | ||
let { method, body, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((index) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'recovery' + '/' + encodeURIComponent(index) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'recovery' | ||
} | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'nodeattrs' | ||
@@ -343,3 +358,3 @@ // build request object | ||
CatApi.prototype.repositories = function catRepositoriesApi (params, options, callback) { | ||
CatApi.prototype.nodes = function catNodesApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
@@ -352,3 +367,3 @@ | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'repositories' | ||
path = '/' + '_cat' + '/' + 'nodes' | ||
@@ -366,16 +381,11 @@ // build request object | ||
CatApi.prototype.segments = function catSegmentsApi (params, options, callback) { | ||
CatApi.prototype.pendingTasks = function catPendingTasksApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, index, ...querystring } = params | ||
let { method, body, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((index) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'segments' + '/' + encodeURIComponent(index) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'segments' | ||
} | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'pending_tasks' | ||
@@ -393,16 +403,11 @@ // build request object | ||
CatApi.prototype.shards = function catShardsApi (params, options, callback) { | ||
CatApi.prototype.plugins = function catPluginsApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, index, ...querystring } = params | ||
let { method, body, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((index) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'shards' + '/' + encodeURIComponent(index) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'shards' | ||
} | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'plugins' | ||
@@ -420,15 +425,15 @@ // build request object | ||
CatApi.prototype.snapshots = function catSnapshotsApi (params, options, callback) { | ||
CatApi.prototype.recovery = function catRecoveryApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, repository, ...querystring } = params | ||
let { method, body, index, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((repository) != null) { | ||
if ((index) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'snapshots' + '/' + encodeURIComponent(repository) | ||
path = '/' + '_cat' + '/' + 'recovery' + '/' + encodeURIComponent(index) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'snapshots' | ||
path = '/' + '_cat' + '/' + 'recovery' | ||
} | ||
@@ -447,3 +452,3 @@ | ||
CatApi.prototype.tasks = function catTasksApi (params, options, callback) { | ||
CatApi.prototype.repositories = function catRepositoriesApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
@@ -456,3 +461,3 @@ | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'tasks' | ||
path = '/' + '_cat' + '/' + 'repositories' | ||
@@ -470,15 +475,15 @@ // build request object | ||
CatApi.prototype.templates = function catTemplatesApi (params, options, callback) { | ||
CatApi.prototype.segments = function catSegmentsApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, name, ...querystring } = params | ||
let { method, body, index, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((name) != null) { | ||
if ((index) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'templates' + '/' + encodeURIComponent(name) | ||
path = '/' + '_cat' + '/' + 'segments' + '/' + encodeURIComponent(index) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'templates' | ||
path = '/' + '_cat' + '/' + 'segments' | ||
} | ||
@@ -497,15 +502,15 @@ | ||
CatApi.prototype.threadPool = function catThreadPoolApi (params, options, callback) { | ||
CatApi.prototype.shards = function catShardsApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, threadPoolPatterns, thread_pool_patterns, ...querystring } = params | ||
let { method, body, index, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((thread_pool_patterns || threadPoolPatterns) != null) { | ||
if ((index) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'thread_pool' + '/' + encodeURIComponent(thread_pool_patterns || threadPoolPatterns) | ||
path = '/' + '_cat' + '/' + 'shards' + '/' + encodeURIComponent(index) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'thread_pool' | ||
path = '/' + '_cat' + '/' + 'shards' | ||
} | ||
@@ -524,15 +529,15 @@ | ||
CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (params, options, callback) { | ||
CatApi.prototype.snapshots = function catSnapshotsApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, id, ...querystring } = params | ||
let { method, body, repository, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((id) != null) { | ||
if ((repository) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id) | ||
path = '/' + '_cat' + '/' + 'snapshots' + '/' + encodeURIComponent(repository) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics' | ||
path = '/' + '_cat' + '/' + 'snapshots' | ||
} | ||
@@ -551,16 +556,11 @@ | ||
CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, callback) { | ||
CatApi.prototype.tasks = function catTasksApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, datafeedId, datafeed_id, ...querystring } = params | ||
let { method, body, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((datafeed_id || datafeedId) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' | ||
} | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'tasks' | ||
@@ -578,15 +578,15 @@ // build request object | ||
CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) { | ||
CatApi.prototype.templates = function catTemplatesApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, jobId, job_id, ...querystring } = params | ||
let { method, body, name, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((job_id || jobId) != null) { | ||
if ((name) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) | ||
path = '/' + '_cat' + '/' + 'templates' + '/' + encodeURIComponent(name) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors' | ||
path = '/' + '_cat' + '/' + 'templates' | ||
} | ||
@@ -605,15 +605,15 @@ | ||
CatApi.prototype.mlTrainedModels = function catMlTrainedModelsApi (params, options, callback) { | ||
CatApi.prototype.threadPool = function catThreadPoolApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, modelId, model_id, ...querystring } = params | ||
let { method, body, threadPoolPatterns, thread_pool_patterns, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((model_id || modelId) != null) { | ||
if ((thread_pool_patterns || threadPoolPatterns) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId) | ||
path = '/' + '_cat' + '/' + 'thread_pool' + '/' + encodeURIComponent(thread_pool_patterns || threadPoolPatterns) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' | ||
path = '/' + '_cat' + '/' + 'thread_pool' | ||
} | ||
@@ -659,10 +659,10 @@ | ||
Object.defineProperties(CatApi.prototype, { | ||
pending_tasks: { get () { return this.pendingTasks } }, | ||
thread_pool: { get () { return this.threadPool } }, | ||
ml_data_frame_analytics: { get () { return this.mlDataFrameAnalytics } }, | ||
ml_datafeeds: { get () { return this.mlDatafeeds } }, | ||
ml_jobs: { get () { return this.mlJobs } }, | ||
ml_trained_models: { get () { return this.mlTrainedModels } } | ||
ml_trained_models: { get () { return this.mlTrainedModels } }, | ||
pending_tasks: { get () { return this.pendingTasks } }, | ||
thread_pool: { get () { return this.threadPool } } | ||
}) | ||
module.exports = CatApi |
@@ -214,2 +214,55 @@ /* | ||
IndicesApi.prototype.createDataStream = function indicesCreateDataStreamApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.name == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: name') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, name, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'PUT' | ||
path = '/' + '_data_stream' + '/' + encodeURIComponent(name) | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.dataStreamsStats = function indicesDataStreamsStatsApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, name, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((name) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_data_stream' + '/' + encodeURIComponent(name) + '/' + '_stats' | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_data_stream' + '/' + '_stats' | ||
} | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: null, | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.delete = function indicesDeleteApi (params, options, callback) { | ||
@@ -284,2 +337,29 @@ ;[params, options, callback] = normalizeArguments(params, options, callback) | ||
IndicesApi.prototype.deleteDataStream = function indicesDeleteDataStreamApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.name == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: name') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, name, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'DELETE' | ||
path = '/' + '_data_stream' + '/' + encodeURIComponent(name) | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.deleteIndexTemplate = function indicesDeleteIndexTemplateApi (params, options, callback) { | ||
@@ -541,2 +621,29 @@ ;[params, options, callback] = normalizeArguments(params, options, callback) | ||
IndicesApi.prototype.freeze = function indicesFreezeApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.index == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: index') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, index, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'POST' | ||
path = '/' + encodeURIComponent(index) + '/' + '_freeze' | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.get = function indicesGetApi (params, options, callback) { | ||
@@ -601,2 +708,28 @@ ;[params, options, callback] = normalizeArguments(params, options, callback) | ||
IndicesApi.prototype.getDataStream = function indicesGetDataStreamApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, name, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((name) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_data_stream' + '/' + encodeURIComponent(name) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_data_stream' | ||
} | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: null, | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.getFieldMapping = function indicesGetFieldMappingApi (params, options, callback) { | ||
@@ -744,2 +877,29 @@ ;[params, options, callback] = normalizeArguments(params, options, callback) | ||
IndicesApi.prototype.migrateToDataStream = function indicesMigrateToDataStreamApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.name == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: name') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, name, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'POST' | ||
path = '/' + '_data_stream' + '/' + '_migrate' + '/' + encodeURIComponent(name) | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.open = function indicesOpenApi (params, options, callback) { | ||
@@ -772,2 +932,29 @@ ;[params, options, callback] = normalizeArguments(params, options, callback) | ||
IndicesApi.prototype.promoteDataStream = function indicesPromoteDataStreamApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.name == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: name') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, name, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'POST' | ||
path = '/' + '_data_stream' + '/' + '_promote' + '/' + encodeURIComponent(name) | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.putAlias = function indicesPutAliasApi (params, options, callback) { | ||
@@ -992,2 +1179,29 @@ ;[params, options, callback] = normalizeArguments(params, options, callback) | ||
IndicesApi.prototype.reloadSearchAnalyzers = function indicesReloadSearchAnalyzersApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.index == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: index') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, index, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = body == null ? 'GET' : 'POST' | ||
path = '/' + encodeURIComponent(index) + '/' + '_reload_search_analyzers' | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.resolveIndex = function indicesResolveIndexApi (params, options, callback) { | ||
@@ -1269,148 +1483,6 @@ ;[params, options, callback] = normalizeArguments(params, options, callback) | ||
IndicesApi.prototype.updateAliases = function indicesUpdateAliasesApi (params, options, callback) { | ||
IndicesApi.prototype.unfreeze = function indicesUnfreezeApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.body == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: body') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'POST' | ||
path = '/' + '_aliases' | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.validateQuery = function indicesValidateQueryApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required url components | ||
if (params.type != null && (params.index == null)) { | ||
const err = new this[kConfigurationError]('Missing required parameter of the url: index') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, index, type, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((index) != null && (type) != null) { | ||
if (method == null) method = body == null ? 'GET' : 'POST' | ||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_validate' + '/' + 'query' | ||
} else if ((index) != null) { | ||
if (method == null) method = body == null ? 'GET' : 'POST' | ||
path = '/' + encodeURIComponent(index) + '/' + '_validate' + '/' + 'query' | ||
} else { | ||
if (method == null) method = body == null ? 'GET' : 'POST' | ||
path = '/' + '_validate' + '/' + 'query' | ||
} | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.createDataStream = function indicesCreateDataStreamApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.name == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: name') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, name, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'PUT' | ||
path = '/' + '_data_stream' + '/' + encodeURIComponent(name) | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.dataStreamsStats = function indicesDataStreamsStatsApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, name, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((name) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_data_stream' + '/' + encodeURIComponent(name) + '/' + '_stats' | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_data_stream' + '/' + '_stats' | ||
} | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: null, | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.deleteDataStream = function indicesDeleteDataStreamApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.name == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: name') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, name, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'DELETE' | ||
path = '/' + '_data_stream' + '/' + encodeURIComponent(name) | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.freeze = function indicesFreezeApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.index == null) { | ||
@@ -1426,3 +1498,3 @@ const err = new this[kConfigurationError]('Missing required parameter: index') | ||
if (method == null) method = 'POST' | ||
path = '/' + encodeURIComponent(index) + '/' + '_freeze' | ||
path = '/' + encodeURIComponent(index) + '/' + '_unfreeze' | ||
@@ -1440,38 +1512,12 @@ // build request object | ||
IndicesApi.prototype.getDataStream = function indicesGetDataStreamApi (params, options, callback) { | ||
IndicesApi.prototype.updateAliases = function indicesUpdateAliasesApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, name, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((name) != null) { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_data_stream' + '/' + encodeURIComponent(name) | ||
} else { | ||
if (method == null) method = 'GET' | ||
path = '/' + '_data_stream' | ||
} | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: null, | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.migrateToDataStream = function indicesMigrateToDataStreamApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.name == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: name') | ||
if (params.body == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: body') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, name, ...querystring } = params | ||
let { method, body, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
@@ -1481,3 +1527,3 @@ | ||
if (method == null) method = 'POST' | ||
path = '/' + '_data_stream' + '/' + '_migrate' + '/' + encodeURIComponent(name) | ||
path = '/' + '_aliases' | ||
@@ -1495,45 +1541,26 @@ // build request object | ||
IndicesApi.prototype.promoteDataStream = function indicesPromoteDataStreamApi (params, options, callback) { | ||
IndicesApi.prototype.validateQuery = function indicesValidateQueryApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.name == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: name') | ||
// check required url components | ||
if (params.type != null && (params.index == null)) { | ||
const err = new this[kConfigurationError]('Missing required parameter of the url: index') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, name, ...querystring } = params | ||
let { method, body, index, type, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'POST' | ||
path = '/' + '_data_stream' + '/' + '_promote' + '/' + encodeURIComponent(name) | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
if ((index) != null && (type) != null) { | ||
if (method == null) method = body == null ? 'GET' : 'POST' | ||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_validate' + '/' + 'query' | ||
} else if ((index) != null) { | ||
if (method == null) method = body == null ? 'GET' : 'POST' | ||
path = '/' + encodeURIComponent(index) + '/' + '_validate' + '/' + 'query' | ||
} else { | ||
if (method == null) method = body == null ? 'GET' : 'POST' | ||
path = '/' + '_validate' + '/' + 'query' | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IndicesApi.prototype.reloadSearchAnalyzers = function indicesReloadSearchAnalyzersApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.index == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: index') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, index, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = body == null ? 'GET' : 'POST' | ||
path = '/' + encodeURIComponent(index) + '/' + '_reload_search_analyzers' | ||
// build request object | ||
@@ -1550,33 +1577,9 @@ const request = { | ||
IndicesApi.prototype.unfreeze = function indicesUnfreezeApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
// check required parameters | ||
if (params.index == null) { | ||
const err = new this[kConfigurationError]('Missing required parameter: index') | ||
return handleError(err, callback) | ||
} | ||
let { method, body, index, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'POST' | ||
path = '/' + encodeURIComponent(index) + '/' + '_unfreeze' | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
Object.defineProperties(IndicesApi.prototype, { | ||
add_block: { get () { return this.addBlock } }, | ||
clear_cache: { get () { return this.clearCache } }, | ||
create_data_stream: { get () { return this.createDataStream } }, | ||
data_streams_stats: { get () { return this.dataStreamsStats } }, | ||
delete_alias: { get () { return this.deleteAlias } }, | ||
delete_data_stream: { get () { return this.deleteDataStream } }, | ||
delete_index_template: { get () { return this.deleteIndexTemplate } }, | ||
@@ -1589,2 +1592,3 @@ delete_template: { get () { return this.deleteTemplate } }, | ||
get_alias: { get () { return this.getAlias } }, | ||
get_data_stream: { get () { return this.getDataStream } }, | ||
get_field_mapping: { get () { return this.getFieldMapping } }, | ||
@@ -1595,2 +1599,4 @@ get_index_template: { get () { return this.getIndexTemplate } }, | ||
get_template: { get () { return this.getTemplate } }, | ||
migrate_to_data_stream: { get () { return this.migrateToDataStream } }, | ||
promote_data_stream: { get () { return this.promoteDataStream } }, | ||
put_alias: { get () { return this.putAlias } }, | ||
@@ -1601,2 +1607,3 @@ put_index_template: { get () { return this.putIndexTemplate } }, | ||
put_template: { get () { return this.putTemplate } }, | ||
reload_search_analyzers: { get () { return this.reloadSearchAnalyzers } }, | ||
resolve_index: { get () { return this.resolveIndex } }, | ||
@@ -1607,12 +1614,5 @@ shard_stores: { get () { return this.shardStores } }, | ||
update_aliases: { get () { return this.updateAliases } }, | ||
validate_query: { get () { return this.validateQuery } }, | ||
create_data_stream: { get () { return this.createDataStream } }, | ||
data_streams_stats: { get () { return this.dataStreamsStats } }, | ||
delete_data_stream: { get () { return this.deleteDataStream } }, | ||
get_data_stream: { get () { return this.getDataStream } }, | ||
migrate_to_data_stream: { get () { return this.migrateToDataStream } }, | ||
promote_data_stream: { get () { return this.promoteDataStream } }, | ||
reload_search_analyzers: { get () { return this.reloadSearchAnalyzers } } | ||
validate_query: { get () { return this.validateQuery } } | ||
}) | ||
module.exports = IndicesApi |
@@ -61,2 +61,23 @@ /* | ||
IngestApi.prototype.geoIpStats = function ingestGeoIpStatsApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
let { method, body, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'GET' | ||
path = '/' + '_ingest' + '/' + 'geoip' + '/' + 'stats' | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: null, | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
IngestApi.prototype.getPipeline = function ingestGetPipelineApi (params, options, callback) { | ||
@@ -174,2 +195,3 @@ ;[params, options, callback] = normalizeArguments(params, options, callback) | ||
delete_pipeline: { get () { return this.deletePipeline } }, | ||
geo_ip_stats: { get () { return this.geoIpStats } }, | ||
get_pipeline: { get () { return this.getPipeline } }, | ||
@@ -176,0 +198,0 @@ processor_grok: { get () { return this.processorGrok } }, |
@@ -59,3 +59,3 @@ /* | ||
path, | ||
bulkBody: body, | ||
body: body || '', | ||
querystring | ||
@@ -62,0 +62,0 @@ } |
@@ -54,3 +54,3 @@ /* | ||
path, | ||
body: body || '', | ||
bulkBody: body, | ||
querystring | ||
@@ -57,0 +57,0 @@ } |
273
api/index.js
@@ -22,5 +22,9 @@ /* | ||
const AsyncSearchApi = require('./api/async_search') | ||
const AutoscalingApi = require('./api/autoscaling') | ||
const bulkApi = require('./api/bulk') | ||
const CatApi = require('./api/cat') | ||
const CcrApi = require('./api/ccr') | ||
const clearScrollApi = require('./api/clear_scroll') | ||
const closePointInTimeApi = require('./api/close_point_in_time') | ||
const ClusterApi = require('./api/cluster') | ||
@@ -34,2 +38,4 @@ const countApi = require('./api/count') | ||
const deleteScriptApi = require('./api/delete_script') | ||
const EnrichApi = require('./api/enrich') | ||
const EqlApi = require('./api/eql') | ||
const existsApi = require('./api/exists') | ||
@@ -45,2 +51,4 @@ const existsSourceApi = require('./api/exists_source') | ||
const getSourceApi = require('./api/get_source') | ||
const GraphApi = require('./api/graph') | ||
const IlmApi = require('./api/ilm') | ||
const indexApi = require('./api/index') | ||
@@ -50,3 +58,8 @@ const IndicesApi = require('./api/indices') | ||
const IngestApi = require('./api/ingest') | ||
const LicenseApi = require('./api/license') | ||
const LogstashApi = require('./api/logstash') | ||
const mgetApi = require('./api/mget') | ||
const MigrationApi = require('./api/migration') | ||
const MlApi = require('./api/ml') | ||
const MonitoringApi = require('./api/monitoring') | ||
const msearchApi = require('./api/msearch') | ||
@@ -56,2 +69,3 @@ const msearchTemplateApi = require('./api/msearch_template') | ||
const NodesApi = require('./api/nodes') | ||
const openPointInTimeApi = require('./api/open_point_in_time') | ||
const pingApi = require('./api/ping') | ||
@@ -63,2 +77,3 @@ const putScriptApi = require('./api/put_script') | ||
const renderSearchTemplateApi = require('./api/render_search_template') | ||
const RollupApi = require('./api/rollup') | ||
const scriptsPainlessExecuteApi = require('./api/scripts_painless_execute') | ||
@@ -69,30 +84,16 @@ const scrollApi = require('./api/scroll') | ||
const searchTemplateApi = require('./api/search_template') | ||
const SnapshotApi = require('./api/snapshot') | ||
const TasksApi = require('./api/tasks') | ||
const termvectorsApi = require('./api/termvectors') | ||
const updateApi = require('./api/update') | ||
const updateByQueryApi = require('./api/update_by_query') | ||
const updateByQueryRethrottleApi = require('./api/update_by_query_rethrottle') | ||
const AsyncSearchApi = require('./api/async_search') | ||
const AutoscalingApi = require('./api/autoscaling') | ||
const CcrApi = require('./api/ccr') | ||
const closePointInTimeApi = require('./api/close_point_in_time') | ||
const EnrichApi = require('./api/enrich') | ||
const EqlApi = require('./api/eql') | ||
const GraphApi = require('./api/graph') | ||
const IlmApi = require('./api/ilm') | ||
const LicenseApi = require('./api/license') | ||
const LogstashApi = require('./api/logstash') | ||
const MigrationApi = require('./api/migration') | ||
const MlApi = require('./api/ml') | ||
const MonitoringApi = require('./api/monitoring') | ||
const openPointInTimeApi = require('./api/open_point_in_time') | ||
const RollupApi = require('./api/rollup') | ||
const SearchableSnapshotsApi = require('./api/searchable_snapshots') | ||
const SecurityApi = require('./api/security') | ||
const ShutdownApi = require('./api/shutdown') | ||
const SlmApi = require('./api/slm') | ||
const SnapshotApi = require('./api/snapshot') | ||
const SqlApi = require('./api/sql') | ||
const SslApi = require('./api/ssl') | ||
const TasksApi = require('./api/tasks') | ||
const termvectorsApi = require('./api/termvectors') | ||
const TextStructureApi = require('./api/text_structure') | ||
const TransformApi = require('./api/transform') | ||
const updateApi = require('./api/update') | ||
const updateByQueryApi = require('./api/update_by_query') | ||
const updateByQueryRethrottleApi = require('./api/update_by_query_rethrottle') | ||
const WatcherApi = require('./api/watcher') | ||
@@ -102,18 +103,15 @@ const XpackApi = require('./api/xpack') | ||
const { kConfigurationError } = require('./utils') | ||
const kAsyncSearch = Symbol('AsyncSearch') | ||
const kAutoscaling = Symbol('Autoscaling') | ||
const kCat = Symbol('Cat') | ||
const kCcr = Symbol('Ccr') | ||
const kCluster = Symbol('Cluster') | ||
const kDanglingIndices = Symbol('DanglingIndices') | ||
const kFeatures = Symbol('Features') | ||
const kIndices = Symbol('Indices') | ||
const kIngest = Symbol('Ingest') | ||
const kNodes = Symbol('Nodes') | ||
const kSnapshot = Symbol('Snapshot') | ||
const kTasks = Symbol('Tasks') | ||
const kAsyncSearch = Symbol('AsyncSearch') | ||
const kAutoscaling = Symbol('Autoscaling') | ||
const kCcr = Symbol('Ccr') | ||
const kEnrich = Symbol('Enrich') | ||
const kEql = Symbol('Eql') | ||
const kFeatures = Symbol('Features') | ||
const kGraph = Symbol('Graph') | ||
const kIlm = Symbol('Ilm') | ||
const kIndices = Symbol('Indices') | ||
const kIngest = Symbol('Ingest') | ||
const kLicense = Symbol('License') | ||
@@ -124,8 +122,12 @@ const kLogstash = Symbol('Logstash') | ||
const kMonitoring = Symbol('Monitoring') | ||
const kNodes = Symbol('Nodes') | ||
const kRollup = Symbol('Rollup') | ||
const kSearchableSnapshots = Symbol('SearchableSnapshots') | ||
const kSecurity = Symbol('Security') | ||
const kShutdown = Symbol('Shutdown') | ||
const kSlm = Symbol('Slm') | ||
const kSnapshot = Symbol('Snapshot') | ||
const kSql = Symbol('Sql') | ||
const kSsl = Symbol('Ssl') | ||
const kTasks = Symbol('Tasks') | ||
const kTextStructure = Symbol('TextStructure') | ||
@@ -138,18 +140,15 @@ const kTransform = Symbol('Transform') | ||
this[kConfigurationError] = opts.ConfigurationError | ||
this[kAsyncSearch] = null | ||
this[kAutoscaling] = null | ||
this[kCat] = null | ||
this[kCcr] = null | ||
this[kCluster] = null | ||
this[kDanglingIndices] = null | ||
this[kFeatures] = null | ||
this[kIndices] = null | ||
this[kIngest] = null | ||
this[kNodes] = null | ||
this[kSnapshot] = null | ||
this[kTasks] = null | ||
this[kAsyncSearch] = null | ||
this[kAutoscaling] = null | ||
this[kCcr] = null | ||
this[kEnrich] = null | ||
this[kEql] = null | ||
this[kFeatures] = null | ||
this[kGraph] = null | ||
this[kIlm] = null | ||
this[kIndices] = null | ||
this[kIngest] = null | ||
this[kLicense] = null | ||
@@ -160,8 +159,12 @@ this[kLogstash] = null | ||
this[kMonitoring] = null | ||
this[kNodes] = null | ||
this[kRollup] = null | ||
this[kSearchableSnapshots] = null | ||
this[kSecurity] = null | ||
this[kShutdown] = null | ||
this[kSlm] = null | ||
this[kSnapshot] = null | ||
this[kSql] = null | ||
this[kSsl] = null | ||
this[kTasks] = null | ||
this[kTextStructure] = null | ||
@@ -175,2 +178,3 @@ this[kTransform] = null | ||
ESAPI.prototype.clearScroll = clearScrollApi | ||
ESAPI.prototype.closePointInTime = closePointInTimeApi | ||
ESAPI.prototype.count = countApi | ||
@@ -197,2 +201,3 @@ ESAPI.prototype.create = createApi | ||
ESAPI.prototype.mtermvectors = mtermvectorsApi | ||
ESAPI.prototype.openPointInTime = openPointInTimeApi | ||
ESAPI.prototype.ping = pingApi | ||
@@ -213,6 +218,21 @@ ESAPI.prototype.putScript = putScriptApi | ||
ESAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi | ||
ESAPI.prototype.closePointInTime = closePointInTimeApi | ||
ESAPI.prototype.openPointInTime = openPointInTimeApi | ||
Object.defineProperties(ESAPI.prototype, { | ||
asyncSearch: { | ||
get () { | ||
if (this[kAsyncSearch] === null) { | ||
this[kAsyncSearch] = new AsyncSearchApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kAsyncSearch] | ||
} | ||
}, | ||
async_search: { get () { return this.asyncSearch } }, | ||
autoscaling: { | ||
get () { | ||
if (this[kAutoscaling] === null) { | ||
this[kAutoscaling] = new AutoscalingApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kAutoscaling] | ||
} | ||
}, | ||
cat: { | ||
@@ -226,3 +246,12 @@ get () { | ||
}, | ||
ccr: { | ||
get () { | ||
if (this[kCcr] === null) { | ||
this[kCcr] = new CcrApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kCcr] | ||
} | ||
}, | ||
clear_scroll: { get () { return this.clearScroll } }, | ||
close_point_in_time: { get () { return this.closePointInTime } }, | ||
cluster: { | ||
@@ -248,92 +277,2 @@ get () { | ||
delete_script: { get () { return this.deleteScript } }, | ||
exists_source: { get () { return this.existsSource } }, | ||
features: { | ||
get () { | ||
if (this[kFeatures] === null) { | ||
this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kFeatures] | ||
} | ||
}, | ||
field_caps: { get () { return this.fieldCaps } }, | ||
get_script: { get () { return this.getScript } }, | ||
get_script_context: { get () { return this.getScriptContext } }, | ||
get_script_languages: { get () { return this.getScriptLanguages } }, | ||
get_source: { get () { return this.getSource } }, | ||
indices: { | ||
get () { | ||
if (this[kIndices] === null) { | ||
this[kIndices] = new IndicesApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kIndices] | ||
} | ||
}, | ||
ingest: { | ||
get () { | ||
if (this[kIngest] === null) { | ||
this[kIngest] = new IngestApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kIngest] | ||
} | ||
}, | ||
msearch_template: { get () { return this.msearchTemplate } }, | ||
nodes: { | ||
get () { | ||
if (this[kNodes] === null) { | ||
this[kNodes] = new NodesApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kNodes] | ||
} | ||
}, | ||
put_script: { get () { return this.putScript } }, | ||
rank_eval: { get () { return this.rankEval } }, | ||
reindex_rethrottle: { get () { return this.reindexRethrottle } }, | ||
render_search_template: { get () { return this.renderSearchTemplate } }, | ||
scripts_painless_execute: { get () { return this.scriptsPainlessExecute } }, | ||
search_shards: { get () { return this.searchShards } }, | ||
search_template: { get () { return this.searchTemplate } }, | ||
snapshot: { | ||
get () { | ||
if (this[kSnapshot] === null) { | ||
this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kSnapshot] | ||
} | ||
}, | ||
tasks: { | ||
get () { | ||
if (this[kTasks] === null) { | ||
this[kTasks] = new TasksApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kTasks] | ||
} | ||
}, | ||
update_by_query: { get () { return this.updateByQuery } }, | ||
update_by_query_rethrottle: { get () { return this.updateByQueryRethrottle } }, | ||
asyncSearch: { | ||
get () { | ||
if (this[kAsyncSearch] === null) { | ||
this[kAsyncSearch] = new AsyncSearchApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kAsyncSearch] | ||
} | ||
}, | ||
async_search: { get () { return this.asyncSearch } }, | ||
autoscaling: { | ||
get () { | ||
if (this[kAutoscaling] === null) { | ||
this[kAutoscaling] = new AutoscalingApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kAutoscaling] | ||
} | ||
}, | ||
ccr: { | ||
get () { | ||
if (this[kCcr] === null) { | ||
this[kCcr] = new CcrApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kCcr] | ||
} | ||
}, | ||
close_point_in_time: { get () { return this.closePointInTime } }, | ||
enrich: { | ||
@@ -355,2 +294,16 @@ get () { | ||
}, | ||
exists_source: { get () { return this.existsSource } }, | ||
features: { | ||
get () { | ||
if (this[kFeatures] === null) { | ||
this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kFeatures] | ||
} | ||
}, | ||
field_caps: { get () { return this.fieldCaps } }, | ||
get_script: { get () { return this.getScript } }, | ||
get_script_context: { get () { return this.getScriptContext } }, | ||
get_script_languages: { get () { return this.getScriptLanguages } }, | ||
get_source: { get () { return this.getSource } }, | ||
graph: { | ||
@@ -372,2 +325,18 @@ get () { | ||
}, | ||
indices: { | ||
get () { | ||
if (this[kIndices] === null) { | ||
this[kIndices] = new IndicesApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kIndices] | ||
} | ||
}, | ||
ingest: { | ||
get () { | ||
if (this[kIngest] === null) { | ||
this[kIngest] = new IngestApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kIngest] | ||
} | ||
}, | ||
license: { | ||
@@ -413,3 +382,16 @@ get () { | ||
}, | ||
msearch_template: { get () { return this.msearchTemplate } }, | ||
nodes: { | ||
get () { | ||
if (this[kNodes] === null) { | ||
this[kNodes] = new NodesApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kNodes] | ||
} | ||
}, | ||
open_point_in_time: { get () { return this.openPointInTime } }, | ||
put_script: { get () { return this.putScript } }, | ||
rank_eval: { get () { return this.rankEval } }, | ||
reindex_rethrottle: { get () { return this.reindexRethrottle } }, | ||
render_search_template: { get () { return this.renderSearchTemplate } }, | ||
rollup: { | ||
@@ -423,2 +405,5 @@ get () { | ||
}, | ||
scripts_painless_execute: { get () { return this.scriptsPainlessExecute } }, | ||
search_shards: { get () { return this.searchShards } }, | ||
search_template: { get () { return this.searchTemplate } }, | ||
searchableSnapshots: { | ||
@@ -441,2 +426,10 @@ get () { | ||
}, | ||
shutdown: { | ||
get () { | ||
if (this[kShutdown] === null) { | ||
this[kShutdown] = new ShutdownApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kShutdown] | ||
} | ||
}, | ||
slm: { | ||
@@ -450,2 +443,10 @@ get () { | ||
}, | ||
snapshot: { | ||
get () { | ||
if (this[kSnapshot] === null) { | ||
this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kSnapshot] | ||
} | ||
}, | ||
sql: { | ||
@@ -467,2 +468,10 @@ get () { | ||
}, | ||
tasks: { | ||
get () { | ||
if (this[kTasks] === null) { | ||
this[kTasks] = new TasksApi(this.transport, this[kConfigurationError]) | ||
} | ||
return this[kTasks] | ||
} | ||
}, | ||
textStructure: { | ||
@@ -485,2 +494,4 @@ get () { | ||
}, | ||
update_by_query: { get () { return this.updateByQuery } }, | ||
update_by_query_rethrottle: { get () { return this.updateByQueryRethrottle } }, | ||
watcher: { | ||
@@ -487,0 +498,0 @@ get () { |
@@ -5,3 +5,3 @@ { | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"types": "./api/new.d.ts", | ||
"exports": { | ||
@@ -15,4 +15,4 @@ ".": { | ||
"homepage": "http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html", | ||
"version": "8.0.0-canary.4", | ||
"versionCanary": "8.0.0-canary.4", | ||
"version": "8.0.0-canary.5", | ||
"versionCanary": "8.0.0-canary.5", | ||
"keywords": [ | ||
@@ -55,2 +55,3 @@ "elasticsearch", | ||
"convert-hrtime": "^3.0.0", | ||
"cross-zip": "^4.0.0", | ||
"dedent": "^0.7.0", | ||
@@ -64,2 +65,3 @@ "deepmerge": "^4.2.2", | ||
"minimist": "^1.2.5", | ||
"node-fetch": "^2.6.1", | ||
"ora": "^5.3.0", | ||
@@ -109,3 +111,3 @@ "pretty-hrtime": "^1.0.3", | ||
}, | ||
"commitHash": "f86a79cb" | ||
} | ||
"commitHash": "b22558f0" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1780161
33124
27