@elastic/elasticsearch 7.14.0 → 7.17.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/README.md +5 -6
- package/api/api/delete_by_query.js +2 -2
- package/api/api/fleet.js +61 -2
- package/api/api/indices.js +86 -2
- package/api/api/ingest.js +2 -2
- package/api/api/migration.js +47 -0
- package/api/api/ml.js +40 -2
- package/api/api/nodes.js +68 -2
- package/api/api/open_point_in_time.js +12 -7
- package/api/api/search_mvt.js +87 -0
- package/api/api/security.js +22 -0
- package/api/api/transform.js +33 -12
- package/api/api/update_by_query.js +2 -2
- package/api/index.js +3 -0
- package/api/new.d.ts +264 -254
- package/api/requestParams.d.ts +100 -17
- package/api/types.d.ts +3426 -2017
- package/index.d.ts +111 -12
- package/index.js +29 -2
- package/lib/Connection.d.ts +1 -0
- package/lib/Connection.js +57 -2
- package/lib/Transport.d.ts +6 -2
- package/lib/Transport.js +47 -26
- package/lib/errors.js +3 -1
- package/lib/pool/BaseConnectionPool.js +3 -0
- package/lib/pool/index.d.ts +1 -0
- package/package.json +5 -4
- package/free-report-junit.xml +0 -123
- package/platinum-report-junit.xml +0 -18
package/api/api/transform.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 = ['force', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'exclude_generated', 'defer_validation', '
|
|
27
|
-
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' }
|
|
26
|
+
const acceptedQuerystring = ['force', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'exclude_generated', 'defer_validation', 'wait_for_completion', 'wait_for_checkpoint', 'dry_run']
|
|
27
|
+
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' }
|
|
28
28
|
|
|
29
29
|
function TransformApi (transport, ConfigurationError) {
|
|
30
30
|
this.transport = transport
|
|
@@ -114,18 +114,17 @@ TransformApi.prototype.getTransformStats = function transformGetTransformStatsAp
|
|
|
114
114
|
TransformApi.prototype.previewTransform = function transformPreviewTransformApi (params, options, callback) {
|
|
115
115
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
if (params.body == null) {
|
|
119
|
-
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
120
|
-
return handleError(err, callback)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
let { method, body, ...querystring } = params
|
|
117
|
+
let { method, body, transformId, transform_id, ...querystring } = params
|
|
124
118
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
125
119
|
|
|
126
120
|
let path = ''
|
|
127
|
-
if (
|
|
128
|
-
|
|
121
|
+
if ((transform_id || transformId) != null) {
|
|
122
|
+
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
123
|
+
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_preview'
|
|
124
|
+
} else {
|
|
125
|
+
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
126
|
+
path = '/' + '_transform' + '/' + '_preview'
|
|
127
|
+
}
|
|
129
128
|
|
|
130
129
|
// build request object
|
|
131
130
|
const request = {
|
|
@@ -254,6 +253,27 @@ TransformApi.prototype.updateTransform = function transformUpdateTransformApi (p
|
|
|
254
253
|
return this.transport.request(request, options, callback)
|
|
255
254
|
}
|
|
256
255
|
|
|
256
|
+
TransformApi.prototype.upgradeTransforms = function transformUpgradeTransformsApi (params, options, callback) {
|
|
257
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
258
|
+
|
|
259
|
+
let { method, body, ...querystring } = params
|
|
260
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
261
|
+
|
|
262
|
+
let path = ''
|
|
263
|
+
if (method == null) method = 'POST'
|
|
264
|
+
path = '/' + '_transform' + '/' + '_upgrade'
|
|
265
|
+
|
|
266
|
+
// build request object
|
|
267
|
+
const request = {
|
|
268
|
+
method,
|
|
269
|
+
path,
|
|
270
|
+
body: body || '',
|
|
271
|
+
querystring
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return this.transport.request(request, options, callback)
|
|
275
|
+
}
|
|
276
|
+
|
|
257
277
|
Object.defineProperties(TransformApi.prototype, {
|
|
258
278
|
delete_transform: { get () { return this.deleteTransform } },
|
|
259
279
|
get_transform: { get () { return this.getTransform } },
|
|
@@ -262,7 +282,8 @@ Object.defineProperties(TransformApi.prototype, {
|
|
|
262
282
|
put_transform: { get () { return this.putTransform } },
|
|
263
283
|
start_transform: { get () { return this.startTransform } },
|
|
264
284
|
stop_transform: { get () { return this.stopTransform } },
|
|
265
|
-
update_transform: { get () { return this.updateTransform } }
|
|
285
|
+
update_transform: { get () { return this.updateTransform } },
|
|
286
|
+
upgrade_transforms: { get () { return this.upgradeTransforms } }
|
|
266
287
|
})
|
|
267
288
|
|
|
268
289
|
module.exports = TransformApi
|
|
@@ -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 = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '
|
|
27
|
-
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs',
|
|
26
|
+
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
|
27
|
+
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|
28
28
|
|
|
29
29
|
function updateByQueryApi (params, options, callback) {
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
package/api/index.js
CHANGED
|
@@ -74,6 +74,7 @@ const RollupApi = require('./api/rollup')
|
|
|
74
74
|
const scriptsPainlessExecuteApi = require('./api/scripts_painless_execute')
|
|
75
75
|
const scrollApi = require('./api/scroll')
|
|
76
76
|
const searchApi = require('./api/search')
|
|
77
|
+
const searchMvtApi = require('./api/search_mvt')
|
|
77
78
|
const searchShardsApi = require('./api/search_shards')
|
|
78
79
|
const searchTemplateApi = require('./api/search_template')
|
|
79
80
|
const SearchableSnapshotsApi = require('./api/searchable_snapshots')
|
|
@@ -200,6 +201,7 @@ ESAPI.prototype.renderSearchTemplate = renderSearchTemplateApi
|
|
|
200
201
|
ESAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi
|
|
201
202
|
ESAPI.prototype.scroll = scrollApi
|
|
202
203
|
ESAPI.prototype.search = searchApi
|
|
204
|
+
ESAPI.prototype.searchMvt = searchMvtApi
|
|
203
205
|
ESAPI.prototype.searchShards = searchShardsApi
|
|
204
206
|
ESAPI.prototype.searchTemplate = searchTemplateApi
|
|
205
207
|
ESAPI.prototype.termsEnum = termsEnumApi
|
|
@@ -397,6 +399,7 @@ Object.defineProperties(ESAPI.prototype, {
|
|
|
397
399
|
}
|
|
398
400
|
},
|
|
399
401
|
scripts_painless_execute: { get () { return this.scriptsPainlessExecute } },
|
|
402
|
+
search_mvt: { get () { return this.searchMvt } },
|
|
400
403
|
search_shards: { get () { return this.searchShards } },
|
|
401
404
|
search_template: { get () { return this.searchTemplate } },
|
|
402
405
|
searchableSnapshots: {
|