@elastic/elasticsearch-canary
Advanced tools
Comparing version 7.16.0-canary.4 to 7.16.0-canary.5
@@ -26,4 +26,4 @@ /* | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') | ||
const acceptedQuerystring = ['include_yes_decisions', 'include_disk_info', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'timeout', 'master_timeout', 'wait_for_removal', 'local', 'flat_settings', 'include_defaults', 'expand_wildcards', 'level', 'wait_for_active_shards', 'wait_for_nodes', 'wait_for_events', 'wait_for_no_relocating_shards', 'wait_for_no_initializing_shards', 'wait_for_status', 'node_ids', 'node_names', 'create', 'dry_run', 'explain', 'retry_failed', 'metric', 'wait_for_metadata_version', 'wait_for_timeout', 'ignore_unavailable', 'allow_no_indices'] | ||
const snakeCase = { includeYesDecisions: 'include_yes_decisions', includeDiskInfo: 'include_disk_info', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', waitForRemoval: 'wait_for_removal', flatSettings: 'flat_settings', includeDefaults: 'include_defaults', expandWildcards: 'expand_wildcards', waitForActiveShards: 'wait_for_active_shards', waitForNodes: 'wait_for_nodes', waitForEvents: 'wait_for_events', waitForNoRelocatingShards: 'wait_for_no_relocating_shards', waitForNoInitializingShards: 'wait_for_no_initializing_shards', waitForStatus: 'wait_for_status', nodeIds: 'node_ids', nodeNames: 'node_names', dryRun: 'dry_run', retryFailed: 'retry_failed', waitForMetadataVersion: 'wait_for_metadata_version', waitForTimeout: 'wait_for_timeout', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices' } | ||
const acceptedQuerystring = ['include_yes_decisions', 'include_disk_info', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'timeout', 'master_timeout', 'wait_for_removal', 'local', 'flat_settings', 'include_defaults', 'expand_wildcards', 'level', 'wait_for_active_shards', 'wait_for_nodes', 'wait_for_events', 'wait_for_no_relocating_shards', 'wait_for_no_initializing_shards', 'wait_for_status', 'return_200_for_cluster_health_timeout', 'node_ids', 'node_names', 'create', 'dry_run', 'explain', 'retry_failed', 'metric', 'wait_for_metadata_version', 'wait_for_timeout', 'ignore_unavailable', 'allow_no_indices'] | ||
const snakeCase = { includeYesDecisions: 'include_yes_decisions', includeDiskInfo: 'include_disk_info', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', waitForRemoval: 'wait_for_removal', flatSettings: 'flat_settings', includeDefaults: 'include_defaults', expandWildcards: 'expand_wildcards', waitForActiveShards: 'wait_for_active_shards', waitForNodes: 'wait_for_nodes', waitForEvents: 'wait_for_events', waitForNoRelocatingShards: 'wait_for_no_relocating_shards', waitForNoInitializingShards: 'wait_for_no_initializing_shards', waitForStatus: 'wait_for_status', return_200ForClusterHealthTimeout: 'return_200_for_cluster_health_timeout', nodeIds: 'node_ids', nodeNames: 'node_names', dryRun: 'dry_run', retryFailed: 'retry_failed', waitForMetadataVersion: 'wait_for_metadata_version', waitForTimeout: 'wait_for_timeout', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices' } | ||
@@ -30,0 +30,0 @@ function ClusterApi (transport, ConfigurationError) { |
@@ -26,4 +26,4 @@ /* | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') | ||
const acceptedQuerystring = ['wait_for_advance', 'wait_for_index', 'checkpoints', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] | ||
const snakeCase = { waitForAdvance: 'wait_for_advance', waitForIndex: 'wait_for_index', errorTrace: 'error_trace', filterPath: 'filter_path' } | ||
const acceptedQuerystring = ['wait_for_advance', 'wait_for_index', 'checkpoints', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_checkpoints', 'wait_for_checkpoints_timeout', 'allow_partial_search_results'] | ||
const snakeCase = { waitForAdvance: 'wait_for_advance', waitForIndex: 'wait_for_index', errorTrace: 'error_trace', filterPath: 'filter_path', waitForCheckpoints: 'wait_for_checkpoints', waitForCheckpointsTimeout: 'wait_for_checkpoints_timeout', allowPartialSearchResults: 'allow_partial_search_results' } | ||
@@ -62,2 +62,61 @@ function FleetApi (transport, ConfigurationError) { | ||
FleetApi.prototype.msearch = function fleetMsearchApi (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, index, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((index) != null) { | ||
if (method == null) method = body == null ? 'GET' : 'POST' | ||
path = '/' + encodeURIComponent(index) + '/' + '_fleet' + '/' + '_msearch' | ||
} else { | ||
if (method == null) method = body == null ? 'GET' : 'POST' | ||
path = '/' + '_fleet' + '/' + '_msearch' | ||
} | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
bulkBody: body, | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
FleetApi.prototype.search = function fleetSearchApi (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) + '/' + '_fleet' + '/' + '_search' | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
Object.defineProperties(FleetApi.prototype, { | ||
@@ -64,0 +123,0 @@ global_checkpoints: { get () { return this.globalCheckpoints } } |
@@ -1008,2 +1008,29 @@ /* | ||
IndicesApi.prototype.modifyDataStream = function indicesModifyDataStreamApi (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 = '/' + '_data_stream' + '/' + '_modify' | ||
// 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) { | ||
@@ -1739,2 +1766,3 @@ ;[params, options, callback] = normalizeArguments(params, options, callback) | ||
migrate_to_data_stream: { get () { return this.migrateToDataStream } }, | ||
modify_data_stream: { get () { return this.modifyDataStream } }, | ||
promote_data_stream: { get () { return this.promoteDataStream } }, | ||
@@ -1741,0 +1769,0 @@ put_alias: { get () { return this.putAlias } }, |
@@ -26,4 +26,4 @@ /* | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') | ||
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'summary', 'verbose'] | ||
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path' } | ||
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'summary', 'if_version', 'verbose'] | ||
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path', ifVersion: 'if_version' } | ||
@@ -30,0 +30,0 @@ function IngestApi (transport, ConfigurationError) { |
@@ -60,2 +60,49 @@ /* | ||
MigrationApi.prototype.getFeatureUpgradeStatus = function migrationGetFeatureUpgradeStatusApi (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 = '/' + '_migration' + '/' + 'system_features' | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: null, | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
MigrationApi.prototype.postFeatureUpgrade = function migrationPostFeatureUpgradeApi (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 = 'POST' | ||
path = '/' + '_migration' + '/' + 'system_features' | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
Object.defineProperties(MigrationApi.prototype, { | ||
get_feature_upgrade_status: { get () { return this.getFeatureUpgradeStatus } }, | ||
post_feature_upgrade: { get () { return this.postFeatureUpgrade } } | ||
}) | ||
module.exports = MigrationApi |
@@ -34,3 +34,3 @@ /* | ||
NodesApi.prototype.clearMeteringArchive = function nodesClearMeteringArchiveApi (params, options, callback) { | ||
NodesApi.prototype.clearRepositoriesMeteringArchive = function nodesClearRepositoriesMeteringArchiveApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
@@ -72,3 +72,3 @@ | ||
NodesApi.prototype.getMeteringInfo = function nodesGetMeteringInfoApi (params, options, callback) { | ||
NodesApi.prototype.getRepositoriesMeteringInfo = function nodesGetRepositoriesMeteringInfoApi (params, options, callback) { | ||
;[params, options, callback] = normalizeArguments(params, options, callback) | ||
@@ -264,4 +264,4 @@ | ||
Object.defineProperties(NodesApi.prototype, { | ||
clear_metering_archive: { get () { return this.clearMeteringArchive } }, | ||
get_metering_info: { get () { return this.getMeteringInfo } }, | ||
clear_repositories_metering_archive: { get () { return this.clearRepositoriesMeteringArchive } }, | ||
get_repositories_metering_info: { get () { return this.getRepositoriesMeteringInfo } }, | ||
hot_threads: { get () { return this.hotThreads } }, | ||
@@ -268,0 +268,0 @@ reload_secure_settings: { get () { return this.reloadSecureSettings } } |
@@ -32,2 +32,8 @@ /* | ||
// 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 | ||
@@ -37,9 +43,4 @@ querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if ((index) != null) { | ||
if (method == null) method = 'POST' | ||
path = '/' + encodeURIComponent(index) + '/' + '_pit' | ||
} else { | ||
if (method == null) method = 'POST' | ||
path = '/' + '_pit' | ||
} | ||
if (method == null) method = 'POST' | ||
path = '/' + encodeURIComponent(index) + '/' + '_pit' | ||
@@ -46,0 +47,0 @@ // build request object |
@@ -26,4 +26,4 @@ /* | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') | ||
const acceptedQuerystring = ['exact_bounds', 'extent', 'grid_precision', 'grid_type', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] | ||
const snakeCase = { exactBounds: 'exact_bounds', gridPrecision: 'grid_precision', gridType: 'grid_type', errorTrace: 'error_trace', filterPath: 'filter_path' } | ||
const acceptedQuerystring = ['exact_bounds', 'extent', 'grid_precision', 'grid_type', 'size', 'track_total_hits', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] | ||
const snakeCase = { exactBounds: 'exact_bounds', gridPrecision: 'grid_precision', gridType: 'grid_type', trackTotalHits: 'track_total_hits', errorTrace: 'error_trace', filterPath: 'filter_path' } | ||
@@ -30,0 +30,0 @@ function searchMvtApi (params, options, callback) { |
@@ -26,4 +26,4 @@ /* | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') | ||
const acceptedQuerystring = ['force', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'exclude_generated', 'defer_validation', 'timeout', 'wait_for_completion', 'wait_for_checkpoint'] | ||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', allowNoMatch: 'allow_no_match', excludeGenerated: 'exclude_generated', deferValidation: 'defer_validation', waitForCompletion: 'wait_for_completion', waitForCheckpoint: 'wait_for_checkpoint' } | ||
const acceptedQuerystring = ['force', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'exclude_generated', 'defer_validation', 'timeout', 'wait_for_completion', 'wait_for_checkpoint', 'dry_run'] | ||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', allowNoMatch: 'allow_no_match', excludeGenerated: 'exclude_generated', deferValidation: 'defer_validation', waitForCompletion: 'wait_for_completion', waitForCheckpoint: 'wait_for_checkpoint', dryRun: 'dry_run' } | ||
@@ -118,14 +118,13 @@ function TransformApi (transport, ConfigurationError) { | ||
// 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 | ||
let { method, body, transformId, transform_id, ...querystring } = params | ||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) | ||
let path = '' | ||
if (method == null) method = 'POST' | ||
path = '/' + '_transform' + '/' + '_preview' | ||
if ((transform_id || transformId) != null) { | ||
if (method == null) method = body == null ? 'GET' : 'POST' | ||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_preview' | ||
} else { | ||
if (method == null) method = body == null ? 'GET' : 'POST' | ||
path = '/' + '_transform' + '/' + '_preview' | ||
} | ||
@@ -259,2 +258,23 @@ // build request object | ||
TransformApi.prototype.upgradeTransforms = function transformUpgradeTransformsApi (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 = 'POST' | ||
path = '/' + '_transform' + '/' + '_upgrade' | ||
// build request object | ||
const request = { | ||
method, | ||
path, | ||
body: body || '', | ||
querystring | ||
} | ||
return this.transport.request(request, options, callback) | ||
} | ||
Object.defineProperties(TransformApi.prototype, { | ||
@@ -268,5 +288,6 @@ delete_transform: { get () { return this.deleteTransform } }, | ||
stop_transform: { get () { return this.stopTransform } }, | ||
update_transform: { get () { return this.updateTransform } } | ||
update_transform: { get () { return this.updateTransform } }, | ||
upgrade_transforms: { get () { return this.upgradeTransforms } } | ||
}) | ||
module.exports = TransformApi |
@@ -174,6 +174,10 @@ /* | ||
then (onFulfilled, onRejected) { | ||
return p.then(onFulfilled, onRejected) | ||
if (p != null) { | ||
return p.then(onFulfilled, onRejected) | ||
} | ||
}, | ||
catch (onRejected) { | ||
return p.catch(onRejected) | ||
if (p != null) { | ||
return p.catch(onRejected) | ||
} | ||
}, | ||
@@ -187,3 +191,5 @@ abort () { | ||
finally (onFinally) { | ||
return p.finally(onFinally) | ||
if (p != null) { | ||
return p.finally(onFinally) | ||
} | ||
} | ||
@@ -190,0 +196,0 @@ } |
@@ -11,7 +11,7 @@ { | ||
}, | ||
"./": "./" | ||
"./*": "./*" | ||
}, | ||
"homepage": "http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html", | ||
"version": "7.16.0-canary.4", | ||
"versionCanary": "7.16.0-canary.4", | ||
"version": "7.16.0-canary.5", | ||
"versionCanary": "7.16.0-canary.5", | ||
"keywords": [ | ||
@@ -107,3 +107,3 @@ "elasticsearch", | ||
}, | ||
"commitHash": "8ad6d993" | ||
"commitHash": "249d2a63" | ||
} |
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
Sorry, the diff of this file is too big to display
2034968
37014