@elastic/elasticsearch 7.15.0 → 8.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -11
- package/index.d.ts +4 -2971
- package/index.js +25 -321
- package/lib/api/api/async_search.d.ts +23 -0
- package/lib/api/api/async_search.js +130 -0
- package/lib/api/api/async_search.js.map +1 -0
- package/lib/api/api/autoscaling.d.ts +23 -0
- package/lib/api/api/autoscaling.js +109 -0
- package/lib/api/api/autoscaling.js.map +1 -0
- package/lib/api/api/bulk.d.ts +10 -0
- package/lib/api/api/bulk.js +58 -0
- package/lib/api/api/bulk.js.map +1 -0
- package/lib/api/api/cat.d.ts +86 -0
- package/lib/api/api/cat.js +611 -0
- package/lib/api/api/cat.js.map +1 -0
- package/lib/api/api/ccr.d.ts +50 -0
- package/lib/api/api/ccr.js +320 -0
- package/lib/api/api/ccr.js.map +1 -0
- package/lib/api/api/clear_scroll.d.ts +10 -0
- package/lib/api/api/clear_scroll.js +54 -0
- package/lib/api/api/clear_scroll.js.map +1 -0
- package/lib/api/api/close_point_in_time.d.ts +10 -0
- package/lib/api/api/close_point_in_time.js +53 -0
- package/lib/api/api/close_point_in_time.js.map +1 -0
- package/lib/api/api/cluster.d.ts +56 -0
- package/lib/api/api/cluster.js +392 -0
- package/lib/api/api/cluster.js.map +1 -0
- package/lib/api/api/count.d.ts +10 -0
- package/lib/api/api/count.js +62 -0
- package/lib/api/api/count.js.map +1 -0
- package/lib/api/api/create.d.ts +10 -0
- package/lib/api/api/create.js +46 -0
- package/lib/api/api/create.js.map +1 -0
- package/lib/api/api/dangling_indices.d.ts +20 -0
- package/lib/api/api/dangling_indices.js +85 -0
- package/lib/api/api/dangling_indices.js.map +1 -0
- package/lib/api/api/delete.d.ts +10 -0
- package/lib/api/api/delete.js +39 -0
- package/lib/api/api/delete.js.map +1 -0
- package/lib/api/api/delete_by_query.d.ts +10 -0
- package/lib/api/api/delete_by_query.js +53 -0
- package/lib/api/api/delete_by_query.js.map +1 -0
- package/lib/api/api/delete_by_query_rethrottle.d.ts +10 -0
- package/lib/api/api/delete_by_query_rethrottle.js +39 -0
- package/lib/api/api/delete_by_query_rethrottle.js.map +1 -0
- package/lib/api/api/delete_script.d.ts +10 -0
- package/lib/api/api/delete_script.js +39 -0
- package/lib/api/api/delete_script.js.map +1 -0
- package/lib/api/api/enrich.d.ts +26 -0
- package/lib/api/api/enrich.js +142 -0
- package/lib/api/api/enrich.js.map +1 -0
- package/lib/api/api/eql.d.ts +23 -0
- package/lib/api/api/eql.js +115 -0
- package/lib/api/api/eql.js.map +1 -0
- package/lib/api/api/exists.d.ts +10 -0
- package/lib/api/api/exists.js +39 -0
- package/lib/api/api/exists.js.map +1 -0
- package/lib/api/api/exists_source.d.ts +10 -0
- package/lib/api/api/exists_source.js +39 -0
- package/lib/api/api/exists_source.js.map +1 -0
- package/lib/api/api/explain.d.ts +10 -0
- package/lib/api/api/explain.js +53 -0
- package/lib/api/api/explain.js.map +1 -0
- package/lib/api/api/features.d.ts +17 -0
- package/lib/api/api/features.js +69 -0
- package/lib/api/api/features.js.map +1 -0
- package/lib/api/api/field_caps.d.ts +10 -0
- package/lib/api/api/field_caps.js +62 -0
- package/lib/api/api/field_caps.js.map +1 -0
- package/lib/api/api/fleet.d.ts +20 -0
- package/lib/api/api/fleet.js +92 -0
- package/lib/api/api/fleet.js.map +1 -0
- package/lib/api/api/get.d.ts +10 -0
- package/lib/api/api/get.js +39 -0
- package/lib/api/api/get.js.map +1 -0
- package/lib/api/api/get_script.d.ts +10 -0
- package/lib/api/api/get_script.js +39 -0
- package/lib/api/api/get_script.js.map +1 -0
- package/lib/api/api/get_script_context.d.ts +10 -0
- package/lib/api/api/get_script_context.js +40 -0
- package/lib/api/api/get_script_context.js.map +1 -0
- package/lib/api/api/get_script_languages.d.ts +10 -0
- package/lib/api/api/get_script_languages.js +40 -0
- package/lib/api/api/get_script_languages.js.map +1 -0
- package/lib/api/api/get_source.d.ts +10 -0
- package/lib/api/api/get_source.js +39 -0
- package/lib/api/api/get_source.js.map +1 -0
- package/lib/api/api/graph.d.ts +14 -0
- package/lib/api/api/graph.js +64 -0
- package/lib/api/api/graph.js.map +1 -0
- package/lib/api/api/ilm.d.ts +44 -0
- package/lib/api/api/ilm.js +260 -0
- package/lib/api/api/ilm.js.map +1 -0
- package/lib/api/api/index.d.ts +10 -0
- package/lib/api/api/index.js +54 -0
- package/lib/api/api/index.js.map +1 -0
- package/lib/api/api/indices.d.ts +173 -0
- package/lib/api/api/indices.js +1381 -0
- package/lib/api/api/indices.js.map +1 -0
- package/lib/api/api/info.d.ts +10 -0
- package/lib/{Serializer.d.ts → api/api/info.js} +21 -11
- package/lib/api/api/info.js.map +1 -0
- package/lib/api/api/ingest.d.ts +29 -0
- package/lib/api/api/ingest.js +183 -0
- package/lib/api/api/ingest.js.map +1 -0
- package/lib/api/api/knn_search.d.ts +10 -0
- package/lib/api/api/knn_search.js +53 -0
- package/lib/api/api/knn_search.js.map +1 -0
- package/lib/api/api/license.d.ts +32 -0
- package/lib/api/api/license.js +173 -0
- package/lib/api/api/license.js.map +1 -0
- package/lib/api/api/logstash.d.ts +20 -0
- package/lib/api/api/logstash.js +91 -0
- package/lib/api/api/logstash.js.map +1 -0
- package/lib/api/api/mget.d.ts +10 -0
- package/lib/api/api/mget.js +62 -0
- package/lib/api/api/mget.js.map +1 -0
- package/lib/api/api/migration.d.ts +20 -0
- package/lib/api/api/migration.js +93 -0
- package/lib/api/api/migration.js.map +1 -0
- package/lib/api/api/ml.d.ts +221 -0
- package/lib/api/api/ml.js +1818 -0
- package/lib/api/api/ml.js.map +1 -0
- package/lib/api/api/monitoring.d.ts +14 -0
- package/lib/api/api/monitoring.js +57 -0
- package/lib/api/api/monitoring.js.map +1 -0
- package/lib/api/api/msearch.d.ts +10 -0
- package/lib/api/api/msearch.js +54 -0
- package/lib/api/api/msearch.js.map +1 -0
- package/lib/api/api/msearch_template.d.ts +10 -0
- package/lib/api/api/msearch_template.js +54 -0
- package/lib/api/api/msearch_template.js.map +1 -0
- package/lib/api/api/mtermvectors.d.ts +10 -0
- package/lib/api/api/mtermvectors.js +62 -0
- package/lib/api/api/mtermvectors.js.map +1 -0
- package/lib/api/api/nodes.d.ts +32 -0
- package/lib/api/api/nodes.js +243 -0
- package/lib/api/api/nodes.js.map +1 -0
- package/lib/api/api/open_point_in_time.d.ts +10 -0
- package/lib/api/api/open_point_in_time.js +39 -0
- package/lib/api/api/open_point_in_time.js.map +1 -0
- package/lib/api/api/ping.d.ts +10 -0
- package/lib/api/api/ping.js +40 -0
- package/lib/api/api/ping.js.map +1 -0
- package/lib/api/api/put_script.d.ts +10 -0
- package/lib/api/api/put_script.js +61 -0
- package/lib/api/api/put_script.js.map +1 -0
- package/lib/api/api/rank_eval.d.ts +10 -0
- package/lib/api/api/rank_eval.js +61 -0
- package/lib/api/api/rank_eval.js.map +1 -0
- package/lib/api/api/reindex.d.ts +10 -0
- package/lib/api/api/reindex.js +54 -0
- package/lib/api/api/reindex.js.map +1 -0
- package/lib/api/api/reindex_rethrottle.d.ts +10 -0
- package/lib/api/api/reindex_rethrottle.js +39 -0
- package/lib/api/api/reindex_rethrottle.js.map +1 -0
- package/lib/api/api/render_search_template.d.ts +10 -0
- package/lib/api/api/render_search_template.js +62 -0
- package/lib/api/api/render_search_template.js.map +1 -0
- package/lib/api/api/rollup.d.ts +38 -0
- package/lib/api/api/rollup.js +239 -0
- package/lib/api/api/rollup.js.map +1 -0
- package/lib/api/api/scripts_painless_execute.d.ts +10 -0
- package/lib/api/api/scripts_painless_execute.js +54 -0
- package/lib/api/api/scripts_painless_execute.js.map +1 -0
- package/lib/api/api/scroll.d.ts +10 -0
- package/lib/api/api/scroll.js +53 -0
- package/lib/api/api/scroll.js.map +1 -0
- package/lib/api/api/search.d.ts +10 -0
- package/lib/api/api/search.js +68 -0
- package/lib/api/api/search.js.map +1 -0
- package/lib/api/api/search_mvt.d.ts +10 -0
- package/lib/api/api/search_mvt.js +53 -0
- package/lib/api/api/search_mvt.js.map +1 -0
- package/lib/api/api/search_shards.d.ts +10 -0
- package/lib/api/api/search_shards.js +48 -0
- package/lib/api/api/search_shards.js.map +1 -0
- package/lib/api/api/search_template.d.ts +10 -0
- package/lib/api/api/search_template.js +62 -0
- package/lib/api/api/search_template.js.map +1 -0
- package/lib/api/api/searchable_snapshots.d.ts +23 -0
- package/lib/api/api/searchable_snapshots.js +141 -0
- package/lib/api/api/searchable_snapshots.js.map +1 -0
- package/lib/api/api/security.d.ts +140 -0
- package/lib/api/api/security.js +998 -0
- package/lib/api/api/security.js.map +1 -0
- package/lib/api/api/shutdown.d.ts +20 -0
- package/lib/api/api/shutdown.js +93 -0
- package/lib/api/api/shutdown.js.map +1 -0
- package/lib/api/api/slm.d.ts +38 -0
- package/lib/api/api/slm.js +214 -0
- package/lib/api/api/slm.js.map +1 -0
- package/lib/api/api/snapshot.d.ts +47 -0
- package/lib/api/api/snapshot.js +315 -0
- package/lib/api/api/snapshot.js.map +1 -0
- package/lib/api/api/sql.d.ts +29 -0
- package/lib/api/api/sql.js +178 -0
- package/lib/api/api/sql.js.map +1 -0
- package/lib/api/api/ssl.d.ts +14 -0
- package/lib/api/api/ssl.js +51 -0
- package/lib/api/api/ssl.js.map +1 -0
- package/lib/api/api/tasks.d.ts +20 -0
- package/lib/api/api/tasks.js +94 -0
- package/lib/api/api/tasks.js.map +1 -0
- package/lib/api/api/terms_enum.d.ts +10 -0
- package/lib/api/api/terms_enum.js +53 -0
- package/lib/api/api/terms_enum.js.map +1 -0
- package/lib/api/api/termvectors.d.ts +10 -0
- package/lib/api/api/termvectors.js +61 -0
- package/lib/api/api/termvectors.js.map +1 -0
- package/lib/api/api/text_structure.d.ts +14 -0
- package/lib/api/api/text_structure.js +57 -0
- package/lib/api/api/text_structure.js.map +1 -0
- package/lib/api/api/transform.d.ts +38 -0
- package/lib/api/api/transform.js +246 -0
- package/lib/api/api/transform.js.map +1 -0
- package/lib/api/api/update.d.ts +10 -0
- package/lib/api/api/update.js +53 -0
- package/lib/api/api/update.js.map +1 -0
- package/lib/api/api/update_by_query.d.ts +10 -0
- package/lib/api/api/update_by_query.js +53 -0
- package/lib/api/api/update_by_query.js.map +1 -0
- package/lib/api/api/update_by_query_rethrottle.d.ts +10 -0
- package/lib/api/api/update_by_query_rethrottle.js +39 -0
- package/lib/api/api/update_by_query_rethrottle.js.map +1 -0
- package/lib/api/api/watcher.d.ts +44 -0
- package/lib/api/api/watcher.js +291 -0
- package/lib/api/api/watcher.js.map +1 -0
- package/lib/api/api/xpack.d.ts +17 -0
- package/lib/api/api/xpack.js +69 -0
- package/lib/api/api/xpack.js.map +1 -0
- package/lib/api/index.d.ts +225 -0
- package/lib/api/index.js +520 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/types.d.ts +13525 -0
- package/lib/{pool/index.js → api/types.js} +3 -12
- package/lib/api/types.js.map +1 -0
- package/lib/api/typesWithBodyKey.d.ts +13931 -0
- package/{index.mjs → lib/api/typesWithBodyKey.js} +3 -11
- package/lib/api/typesWithBodyKey.js.map +1 -0
- package/lib/client.d.ts +69 -0
- package/lib/client.js +282 -0
- package/lib/client.js.map +1 -0
- package/lib/helpers.d.ts +148 -0
- package/lib/helpers.js +769 -0
- package/lib/helpers.js.map +1 -0
- package/lib/sniffingTransport.d.ts +4 -0
- package/lib/sniffingTransport.js +56 -0
- package/lib/sniffingTransport.js.map +1 -0
- package/package.json +46 -59
- package/tsconfig.json +37 -0
- package/api/api/async_search.js +0 -141
- package/api/api/autoscaling.js +0 -147
- package/api/api/bulk.js +0 -70
- package/api/api/cat.js +0 -648
- package/api/api/ccr.js +0 -403
- package/api/api/clear_scroll.js +0 -55
- package/api/api/close_point_in_time.js +0 -50
- package/api/api/cluster.js +0 -420
- package/api/api/count.js +0 -64
- package/api/api/create.js +0 -69
- package/api/api/dangling_indices.js +0 -115
- package/api/api/delete.js +0 -65
- package/api/api/delete_by_query.js +0 -71
- package/api/api/delete_by_query_rethrottle.js +0 -60
- package/api/api/delete_script.js +0 -56
- package/api/api/enrich.js +0 -173
- package/api/api/eql.js +0 -150
- package/api/api/exists.js +0 -65
- package/api/api/exists_source.js +0 -74
- package/api/api/explain.js +0 -65
- package/api/api/features.js +0 -81
- package/api/api/field_caps.js +0 -55
- package/api/api/fleet.js +0 -65
- package/api/api/get.js +0 -65
- package/api/api/get_script.js +0 -56
- package/api/api/get_script_context.js +0 -50
- package/api/api/get_script_languages.js +0 -50
- package/api/api/get_source.js +0 -65
- package/api/api/graph.js +0 -72
- package/api/api/ilm.js +0 -317
- package/api/api/index.js +0 -71
- package/api/api/indices.js +0 -1753
- package/api/api/info.js +0 -50
- package/api/api/ingest.js +0 -200
- package/api/api/license.js +0 -188
- package/api/api/logstash.js +0 -125
- package/api/api/mget.js +0 -70
- package/api/api/migration.js +0 -60
- package/api/api/ml.js +0 -2010
- package/api/api/monitoring.js +0 -66
- package/api/api/msearch.js +0 -70
- package/api/api/msearch_template.js +0 -70
- package/api/api/mtermvectors.js +0 -64
- package/api/api/nodes.js +0 -268
- package/api/api/open_point_in_time.js +0 -56
- package/api/api/ping.js +0 -50
- package/api/api/put_script.js +0 -71
- package/api/api/rank_eval.js +0 -61
- package/api/api/reindex.js +0 -56
- package/api/api/reindex_rethrottle.js +0 -60
- package/api/api/render_search_template.js +0 -55
- package/api/api/rollup.js +0 -319
- package/api/api/scripts_painless_execute.js +0 -50
- package/api/api/scroll.js +0 -55
- package/api/api/search.js +0 -64
- package/api/api/search_mvt.js +0 -87
- package/api/api/search_shards.js +0 -55
- package/api/api/search_template.js +0 -70
- package/api/api/searchable_snapshots.js +0 -186
- package/api/api/security.js +0 -1261
- package/api/api/shutdown.js +0 -124
- package/api/api/slm.js +0 -256
- package/api/api/snapshot.js +0 -439
- package/api/api/sql.js +0 -203
- package/api/api/ssl.js +0 -55
- package/api/api/tasks.js +0 -108
- package/api/api/terms_enum.js +0 -56
- package/api/api/termvectors.js +0 -67
- package/api/api/text_structure.js +0 -65
- package/api/api/transform.js +0 -268
- package/api/api/update.js +0 -69
- package/api/api/update_by_query.js +0 -67
- package/api/api/update_by_query_rethrottle.js +0 -60
- package/api/api/watcher.js +0 -333
- package/api/api/xpack.js +0 -76
- package/api/index.js +0 -508
- package/api/new.d.ts +0 -1585
- package/api/requestParams.d.ts +0 -2920
- package/api/types.d.ts +0 -15420
- package/api/utils.js +0 -58
- package/lib/Connection.d.ts +0 -99
- package/lib/Connection.js +0 -392
- package/lib/Helpers.d.ts +0 -124
- package/lib/Helpers.js +0 -770
- package/lib/Serializer.js +0 -94
- package/lib/Transport.d.ts +0 -162
- package/lib/Transport.js +0 -689
- package/lib/errors.d.ts +0 -90
- package/lib/errors.js +0 -159
- package/lib/pool/BaseConnectionPool.js +0 -262
- package/lib/pool/CloudConnectionPool.js +0 -64
- package/lib/pool/ConnectionPool.js +0 -246
- package/lib/pool/index.d.ts +0 -220
package/index.js
CHANGED
|
@@ -19,331 +19,35 @@
|
|
|
19
19
|
|
|
20
20
|
'use strict'
|
|
21
21
|
|
|
22
|
-
const {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// clean prerelease
|
|
37
|
-
clientVersion = clientVersion.slice(0, clientVersion.indexOf('-')) + 'p'
|
|
38
|
-
}
|
|
39
|
-
const nodeVersion = process.versions.node
|
|
40
|
-
|
|
41
|
-
const kInitialOptions = Symbol('elasticsearchjs-initial-options')
|
|
42
|
-
const kChild = Symbol('elasticsearchjs-child')
|
|
43
|
-
const kExtensions = Symbol('elasticsearchjs-extensions')
|
|
44
|
-
const kEventEmitter = Symbol('elasticsearchjs-event-emitter')
|
|
45
|
-
|
|
46
|
-
const ESAPI = require('./api')
|
|
47
|
-
|
|
48
|
-
class Client extends ESAPI {
|
|
49
|
-
constructor (opts = {}) {
|
|
50
|
-
super({ ConfigurationError })
|
|
51
|
-
if (opts.cloud && opts[kChild] === undefined) {
|
|
52
|
-
const { id, username, password } = opts.cloud
|
|
53
|
-
// the cloud id is `cluster-name:base64encodedurl`
|
|
54
|
-
// the url is a string divided by two '$', the first is the cloud url
|
|
55
|
-
// the second the elasticsearch instance, the third the kibana instance
|
|
56
|
-
const cloudUrls = Buffer.from(id.split(':')[1], 'base64').toString().split('$')
|
|
57
|
-
|
|
58
|
-
// TODO: remove username and password here in 8
|
|
59
|
-
if (username && password) {
|
|
60
|
-
opts.auth = Object.assign({}, opts.auth, { username, password })
|
|
61
|
-
}
|
|
62
|
-
opts.node = `https://${cloudUrls[1]}.${cloudUrls[0]}`
|
|
63
|
-
|
|
64
|
-
// Cloud has better performances with compression enabled
|
|
65
|
-
// see https://github.com/elastic/elasticsearch-py/pull/704.
|
|
66
|
-
// So unless the user specifies otherwise, we enable compression.
|
|
67
|
-
if (opts.compression == null) opts.compression = 'gzip'
|
|
68
|
-
if (opts.suggestCompression == null) opts.suggestCompression = true
|
|
69
|
-
if (opts.ssl == null ||
|
|
70
|
-
(opts.ssl && opts.ssl.secureProtocol == null)) {
|
|
71
|
-
opts.ssl = opts.ssl || {}
|
|
72
|
-
opts.ssl.secureProtocol = 'TLSv1_2_method'
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (!opts.node && !opts.nodes) {
|
|
77
|
-
throw new ConfigurationError('Missing node(s) option')
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (opts[kChild] === undefined) {
|
|
81
|
-
const checkAuth = getAuth(opts.node || opts.nodes)
|
|
82
|
-
if (checkAuth && checkAuth.username && checkAuth.password) {
|
|
83
|
-
opts.auth = Object.assign({}, opts.auth, { username: checkAuth.username, password: checkAuth.password })
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const options = opts[kChild] !== undefined
|
|
88
|
-
? opts[kChild].initialOptions
|
|
89
|
-
: Object.assign({}, {
|
|
90
|
-
Connection,
|
|
91
|
-
Transport,
|
|
92
|
-
Serializer,
|
|
93
|
-
ConnectionPool: opts.cloud ? CloudConnectionPool : ConnectionPool,
|
|
94
|
-
maxRetries: 3,
|
|
95
|
-
requestTimeout: 30000,
|
|
96
|
-
pingTimeout: 3000,
|
|
97
|
-
sniffInterval: false,
|
|
98
|
-
sniffOnStart: false,
|
|
99
|
-
sniffEndpoint: '_nodes/_all/http',
|
|
100
|
-
sniffOnConnectionFault: false,
|
|
101
|
-
resurrectStrategy: 'ping',
|
|
102
|
-
suggestCompression: false,
|
|
103
|
-
compression: false,
|
|
104
|
-
ssl: null,
|
|
105
|
-
caFingerprint: null,
|
|
106
|
-
agent: null,
|
|
107
|
-
headers: {},
|
|
108
|
-
nodeFilter: null,
|
|
109
|
-
nodeSelector: 'round-robin',
|
|
110
|
-
generateRequestId: null,
|
|
111
|
-
name: 'elasticsearch-js',
|
|
112
|
-
auth: null,
|
|
113
|
-
opaqueIdPrefix: null,
|
|
114
|
-
context: null,
|
|
115
|
-
proxy: null,
|
|
116
|
-
enableMetaHeader: true,
|
|
117
|
-
disablePrototypePoisoningProtection: false
|
|
118
|
-
}, opts)
|
|
119
|
-
|
|
120
|
-
if (options.caFingerprint !== null && isHttpConnection(opts.node || opts.nodes)) {
|
|
121
|
-
throw new ConfigurationError('You can\'t configure the caFingerprint with a http connection')
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (process.env.ELASTIC_CLIENT_APIVERSIONING === 'true') {
|
|
125
|
-
options.headers = Object.assign({ accept: 'application/vnd.elasticsearch+json; compatible-with=7' }, options.headers)
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
this[kInitialOptions] = options
|
|
129
|
-
this[kExtensions] = []
|
|
130
|
-
this.name = options.name
|
|
131
|
-
|
|
132
|
-
if (options.enableMetaHeader) {
|
|
133
|
-
options.headers['x-elastic-client-meta'] = `es=${clientVersion},js=${nodeVersion},t=${clientVersion},hc=${nodeVersion}`
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
if (opts[kChild] !== undefined) {
|
|
137
|
-
this.serializer = options[kChild].serializer
|
|
138
|
-
this.connectionPool = options[kChild].connectionPool
|
|
139
|
-
this[kEventEmitter] = options[kChild].eventEmitter
|
|
140
|
-
} else {
|
|
141
|
-
this[kEventEmitter] = new EventEmitter()
|
|
142
|
-
this.serializer = new options.Serializer({
|
|
143
|
-
disablePrototypePoisoningProtection: options.disablePrototypePoisoningProtection
|
|
144
|
-
})
|
|
145
|
-
this.connectionPool = new options.ConnectionPool({
|
|
146
|
-
pingTimeout: options.pingTimeout,
|
|
147
|
-
resurrectStrategy: options.resurrectStrategy,
|
|
148
|
-
ssl: options.ssl,
|
|
149
|
-
agent: options.agent,
|
|
150
|
-
proxy: options.proxy,
|
|
151
|
-
Connection: options.Connection,
|
|
152
|
-
auth: options.auth,
|
|
153
|
-
emit: this[kEventEmitter].emit.bind(this[kEventEmitter]),
|
|
154
|
-
caFingerprint: options.caFingerprint,
|
|
155
|
-
sniffEnabled: options.sniffInterval !== false ||
|
|
156
|
-
options.sniffOnStart !== false ||
|
|
157
|
-
options.sniffOnConnectionFault !== false
|
|
158
|
-
})
|
|
159
|
-
// Add the connections before initialize the Transport
|
|
160
|
-
this.connectionPool.addConnection(options.node || options.nodes)
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
this.transport = new options.Transport({
|
|
164
|
-
emit: this[kEventEmitter].emit.bind(this[kEventEmitter]),
|
|
165
|
-
connectionPool: this.connectionPool,
|
|
166
|
-
serializer: this.serializer,
|
|
167
|
-
maxRetries: options.maxRetries,
|
|
168
|
-
requestTimeout: options.requestTimeout,
|
|
169
|
-
sniffInterval: options.sniffInterval,
|
|
170
|
-
sniffOnStart: options.sniffOnStart,
|
|
171
|
-
sniffOnConnectionFault: options.sniffOnConnectionFault,
|
|
172
|
-
sniffEndpoint: options.sniffEndpoint,
|
|
173
|
-
suggestCompression: options.suggestCompression,
|
|
174
|
-
compression: options.compression,
|
|
175
|
-
headers: options.headers,
|
|
176
|
-
nodeFilter: options.nodeFilter,
|
|
177
|
-
nodeSelector: options.nodeSelector,
|
|
178
|
-
generateRequestId: options.generateRequestId,
|
|
179
|
-
name: options.name,
|
|
180
|
-
opaqueIdPrefix: options.opaqueIdPrefix,
|
|
181
|
-
context: options.context
|
|
182
|
-
})
|
|
183
|
-
|
|
184
|
-
this.helpers = new Helpers({
|
|
185
|
-
client: this,
|
|
186
|
-
maxRetries: options.maxRetries,
|
|
187
|
-
metaHeader: options.enableMetaHeader
|
|
188
|
-
? `es=${clientVersion},js=${nodeVersion},t=${clientVersion},hc=${nodeVersion}`
|
|
189
|
-
: null
|
|
190
|
-
})
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
get emit () {
|
|
194
|
-
return this[kEventEmitter].emit.bind(this[kEventEmitter])
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
get on () {
|
|
198
|
-
return this[kEventEmitter].on.bind(this[kEventEmitter])
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
get once () {
|
|
202
|
-
return this[kEventEmitter].once.bind(this[kEventEmitter])
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
get off () {
|
|
206
|
-
return this[kEventEmitter].off.bind(this[kEventEmitter])
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
extend (name, opts, fn) {
|
|
210
|
-
if (typeof opts === 'function') {
|
|
211
|
-
fn = opts
|
|
212
|
-
opts = {}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
let [namespace, method] = name.split('.')
|
|
216
|
-
if (method == null) {
|
|
217
|
-
method = namespace
|
|
218
|
-
namespace = null
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
if (namespace != null) {
|
|
222
|
-
if (this[namespace] != null && this[namespace][method] != null && opts.force !== true) {
|
|
223
|
-
throw new Error(`The method "${method}" already exists on namespace "${namespace}"`)
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
if (this[namespace] == null) this[namespace] = {}
|
|
227
|
-
this[namespace][method] = fn({
|
|
228
|
-
makeRequest: this.transport.request.bind(this.transport),
|
|
229
|
-
result: { body: null, statusCode: null, headers: null, warnings: null },
|
|
230
|
-
ConfigurationError
|
|
231
|
-
})
|
|
232
|
-
} else {
|
|
233
|
-
if (this[method] != null && opts.force !== true) {
|
|
234
|
-
throw new Error(`The method "${method}" already exists`)
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
this[method] = fn({
|
|
238
|
-
makeRequest: this.transport.request.bind(this.transport),
|
|
239
|
-
result: { body: null, statusCode: null, headers: null, warnings: null },
|
|
240
|
-
ConfigurationError
|
|
241
|
-
})
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
this[kExtensions].push({ name, opts, fn })
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
child (opts) {
|
|
248
|
-
// Merge the new options with the initial ones
|
|
249
|
-
const options = Object.assign({}, this[kInitialOptions], opts)
|
|
250
|
-
// Pass to the child client the parent instances that cannot be overriden
|
|
251
|
-
options[kChild] = {
|
|
252
|
-
connectionPool: this.connectionPool,
|
|
253
|
-
serializer: this.serializer,
|
|
254
|
-
eventEmitter: this[kEventEmitter],
|
|
255
|
-
initialOptions: options
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
/* istanbul ignore else */
|
|
259
|
-
if (options.auth !== undefined) {
|
|
260
|
-
options.headers = prepareHeaders(options.headers, options.auth)
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
const client = new Client(options)
|
|
264
|
-
// sync product check
|
|
265
|
-
const tSymbol = Object.getOwnPropertySymbols(this.transport)
|
|
266
|
-
.filter(symbol => symbol.description === 'product check')[0]
|
|
267
|
-
client.transport[tSymbol] = this.transport[tSymbol]
|
|
268
|
-
// Add parent extensions
|
|
269
|
-
if (this[kExtensions].length > 0) {
|
|
270
|
-
this[kExtensions].forEach(({ name, opts, fn }) => {
|
|
271
|
-
client.extend(name, opts, fn)
|
|
272
|
-
})
|
|
273
|
-
}
|
|
274
|
-
return client
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
close (callback) {
|
|
278
|
-
if (callback == null) {
|
|
279
|
-
return new Promise((resolve, reject) => {
|
|
280
|
-
this.close(resolve)
|
|
281
|
-
})
|
|
282
|
-
}
|
|
283
|
-
debug('Closing the client')
|
|
284
|
-
this.connectionPool.empty(callback)
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
function getAuth (node) {
|
|
289
|
-
if (Array.isArray(node)) {
|
|
290
|
-
for (const url of node) {
|
|
291
|
-
const auth = getUsernameAndPassword(url)
|
|
292
|
-
if (auth.username !== '' && auth.password !== '') {
|
|
293
|
-
return auth
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
return null
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
const auth = getUsernameAndPassword(node)
|
|
301
|
-
if (auth.username !== '' && auth.password !== '') {
|
|
302
|
-
return auth
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
return null
|
|
306
|
-
|
|
307
|
-
function getUsernameAndPassword (node) {
|
|
308
|
-
/* istanbul ignore else */
|
|
309
|
-
if (typeof node === 'string') {
|
|
310
|
-
const { username, password } = new URL(node)
|
|
311
|
-
return {
|
|
312
|
-
username: decodeURIComponent(username),
|
|
313
|
-
password: decodeURIComponent(password)
|
|
314
|
-
}
|
|
315
|
-
} else if (node.url instanceof URL) {
|
|
316
|
-
return {
|
|
317
|
-
username: decodeURIComponent(node.url.username),
|
|
318
|
-
password: decodeURIComponent(node.url.password)
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
function isHttpConnection (node) {
|
|
325
|
-
if (Array.isArray(node)) {
|
|
326
|
-
return node.some((n) => (typeof n === 'string' ? new URL(n).protocol : n.url.protocol) === 'http:')
|
|
327
|
-
} else {
|
|
328
|
-
return (typeof node === 'string' ? new URL(node).protocol : node.url.protocol) === 'http:'
|
|
329
|
-
}
|
|
330
|
-
}
|
|
22
|
+
const {
|
|
23
|
+
Diagnostic,
|
|
24
|
+
Transport,
|
|
25
|
+
WeightedConnectionPool,
|
|
26
|
+
ClusterConnectionPool,
|
|
27
|
+
BaseConnectionPool,
|
|
28
|
+
CloudConnectionPool,
|
|
29
|
+
BaseConnection,
|
|
30
|
+
HttpConnection,
|
|
31
|
+
UndiciConnection,
|
|
32
|
+
Serializer,
|
|
33
|
+
errors,
|
|
34
|
+
events
|
|
35
|
+
} = require('@elastic/transport')
|
|
331
36
|
|
|
332
|
-
const
|
|
333
|
-
RESPONSE: 'response',
|
|
334
|
-
REQUEST: 'request',
|
|
335
|
-
SNIFF: 'sniff',
|
|
336
|
-
RESURRECT: 'resurrect',
|
|
337
|
-
SERIALIZATION: 'serialization',
|
|
338
|
-
DESERIALIZATION: 'deserialization'
|
|
339
|
-
}
|
|
37
|
+
const { default: Client } = require('./lib/client')
|
|
340
38
|
|
|
341
39
|
module.exports = {
|
|
342
40
|
Client,
|
|
41
|
+
Diagnostic,
|
|
343
42
|
Transport,
|
|
344
|
-
|
|
345
|
-
|
|
43
|
+
WeightedConnectionPool,
|
|
44
|
+
ClusterConnectionPool,
|
|
45
|
+
BaseConnectionPool,
|
|
46
|
+
CloudConnectionPool,
|
|
47
|
+
BaseConnection,
|
|
48
|
+
HttpConnection,
|
|
49
|
+
UndiciConnection,
|
|
346
50
|
Serializer,
|
|
347
|
-
|
|
348
|
-
|
|
51
|
+
errors,
|
|
52
|
+
events
|
|
349
53
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
|
|
2
|
+
import * as T from '../types';
|
|
3
|
+
import * as TB from '../typesWithBodyKey';
|
|
4
|
+
interface That {
|
|
5
|
+
transport: Transport;
|
|
6
|
+
}
|
|
7
|
+
export default class AsyncSearch {
|
|
8
|
+
transport: Transport;
|
|
9
|
+
constructor(transport: Transport);
|
|
10
|
+
delete(this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchDeleteResponse>;
|
|
11
|
+
delete(this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchDeleteResponse, unknown>>;
|
|
12
|
+
delete(this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchDeleteResponse>;
|
|
13
|
+
get<TDocument = unknown>(this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchGetResponse<TDocument>>;
|
|
14
|
+
get<TDocument = unknown>(this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchGetResponse<TDocument>, unknown>>;
|
|
15
|
+
get<TDocument = unknown>(this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchGetResponse<TDocument>>;
|
|
16
|
+
status<TDocument = unknown>(this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchStatusResponse<TDocument>>;
|
|
17
|
+
status<TDocument = unknown>(this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchStatusResponse<TDocument>, unknown>>;
|
|
18
|
+
status<TDocument = unknown>(this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchStatusResponse<TDocument>>;
|
|
19
|
+
submit<TDocument = unknown>(this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchSubmitResponse<TDocument>>;
|
|
20
|
+
submit<TDocument = unknown>(this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchSubmitResponse<TDocument>, unknown>>;
|
|
21
|
+
submit<TDocument = unknown>(this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchSubmitResponse<TDocument>>;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Licensed to Elasticsearch B.V. under one or more contributor
|
|
4
|
+
* license agreements. See the NOTICE file distributed with
|
|
5
|
+
* this work for additional information regarding copyright
|
|
6
|
+
* ownership. Elasticsearch B.V. licenses this file to you under
|
|
7
|
+
* the Apache License, Version 2.0 (the "License"); you may
|
|
8
|
+
* not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing,
|
|
14
|
+
* software distributed under the License is distributed on an
|
|
15
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
* KIND, either express or implied. See the License for the
|
|
17
|
+
* specific language governing permissions and limitations
|
|
18
|
+
* under the License.
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
class AsyncSearch {
|
|
22
|
+
constructor(transport) {
|
|
23
|
+
Object.defineProperty(this, "transport", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: void 0
|
|
28
|
+
});
|
|
29
|
+
this.transport = transport;
|
|
30
|
+
}
|
|
31
|
+
async delete(params, options) {
|
|
32
|
+
const acceptedPath = ['id'];
|
|
33
|
+
const querystring = {};
|
|
34
|
+
const body = undefined;
|
|
35
|
+
for (const key in params) {
|
|
36
|
+
if (acceptedPath.includes(key)) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
else if (key !== 'body') {
|
|
40
|
+
// @ts-expect-error
|
|
41
|
+
querystring[key] = params[key];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const method = 'DELETE';
|
|
45
|
+
const path = `/_async_search/${encodeURIComponent(params.id.toString())}`;
|
|
46
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
47
|
+
}
|
|
48
|
+
async get(params, options) {
|
|
49
|
+
const acceptedPath = ['id'];
|
|
50
|
+
const querystring = {};
|
|
51
|
+
const body = undefined;
|
|
52
|
+
for (const key in params) {
|
|
53
|
+
if (acceptedPath.includes(key)) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
else if (key !== 'body') {
|
|
57
|
+
// @ts-expect-error
|
|
58
|
+
querystring[key] = params[key];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const method = 'GET';
|
|
62
|
+
const path = `/_async_search/${encodeURIComponent(params.id.toString())}`;
|
|
63
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
64
|
+
}
|
|
65
|
+
async status(params, options) {
|
|
66
|
+
const acceptedPath = ['id'];
|
|
67
|
+
const querystring = {};
|
|
68
|
+
const body = undefined;
|
|
69
|
+
for (const key in params) {
|
|
70
|
+
if (acceptedPath.includes(key)) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
else if (key !== 'body') {
|
|
74
|
+
// @ts-expect-error
|
|
75
|
+
querystring[key] = params[key];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const method = 'GET';
|
|
79
|
+
const path = `/_async_search/status/${encodeURIComponent(params.id.toString())}`;
|
|
80
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
81
|
+
}
|
|
82
|
+
async submit(params, options) {
|
|
83
|
+
const acceptedPath = ['index'];
|
|
84
|
+
const acceptedBody = ['aggregations', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'];
|
|
85
|
+
const querystring = {};
|
|
86
|
+
// @ts-expect-error
|
|
87
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
88
|
+
let body;
|
|
89
|
+
if (typeof userBody === 'string') {
|
|
90
|
+
body = userBody;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
94
|
+
}
|
|
95
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
96
|
+
for (const key in params) {
|
|
97
|
+
if (acceptedBody.includes(key)) {
|
|
98
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
99
|
+
// @ts-expect-error
|
|
100
|
+
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) {
|
|
101
|
+
querystring[key] = params[key];
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
// @ts-expect-error
|
|
105
|
+
body[key] = params[key];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
else if (acceptedPath.includes(key)) {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
else if (key !== 'body') {
|
|
112
|
+
// @ts-expect-error
|
|
113
|
+
querystring[key] = params[key];
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
let method = '';
|
|
117
|
+
let path = '';
|
|
118
|
+
if (params.index != null) {
|
|
119
|
+
method = 'POST';
|
|
120
|
+
path = `/${encodeURIComponent(params.index.toString())}/_async_search`;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
method = 'POST';
|
|
124
|
+
path = '/_async_search';
|
|
125
|
+
}
|
|
126
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.default = AsyncSearch;
|
|
130
|
+
//# sourceMappingURL=async_search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async_search.js","sourceRoot":"","sources":["../../../src/api/api/async_search.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAsBH,MAAqB,WAAW;IAE9B,YAAa,SAAoB;QADjC;;;;;WAAoB;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAKD,KAAK,CAAC,MAAM,CAAc,MAAgE,EAAE,OAAiC;QAC3H,MAAM,YAAY,GAAa,CAAC,IAAI,CAAC,CAAA;QACrC,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;QAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,SAAQ;aACT;iBAAM,IAAI,GAAG,KAAK,MAAM,EAAE;gBACzB,mBAAmB;gBACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;aAC/B;SACF;QAED,MAAM,MAAM,GAAG,QAAQ,CAAA;QACvB,MAAM,IAAI,GAAG,kBAAkB,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;QACzE,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;IAKD,KAAK,CAAC,GAAG,CAAmC,MAA0D,EAAE,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AAE,CAAA;gBACjB,mBAAmB;gBACnB,IAAI,GAAG,KAAK,MAAM,IAAI,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;oBAClF,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;iBAC/B;qBAAM;oBACL,mBAAmB;oBACnB,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;iBACxB;aACF;iBAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBACrC,SAAQ;aACT;iBAAM,IAAI,GAAG,KAAK,MAAM,EAAE;gBACzB,mBAAmB;gBACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;aAC/B;SACF;QAED,IAAI,MAAM,GAAG,EAAE,CAAA;QACf,IAAI,IAAI,GAAG,EAAE,CAAA;QACb,IAAI,MAAM,CAAC,KAAK,IAAI,IAAI,EAAE;YACxB,MAAM,GAAG,MAAM,CAAA;YACf,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,gBAAgB,CAAA;SACvE;aAAM;YACL,MAAM,GAAG,MAAM,CAAA;YACf,IAAI,GAAG,gBAAgB,CAAA;SACxB;QACD,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;CACF;AAtHD,8BAsHC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
|
|
2
|
+
import * as T from '../types';
|
|
3
|
+
import * as TB from '../typesWithBodyKey';
|
|
4
|
+
interface That {
|
|
5
|
+
transport: Transport;
|
|
6
|
+
}
|
|
7
|
+
export default class Autoscaling {
|
|
8
|
+
transport: Transport;
|
|
9
|
+
constructor(transport: Transport);
|
|
10
|
+
deleteAutoscalingPolicy(this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingDeleteAutoscalingPolicyResponse>;
|
|
11
|
+
deleteAutoscalingPolicy(this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingDeleteAutoscalingPolicyResponse, unknown>>;
|
|
12
|
+
deleteAutoscalingPolicy(this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<T.AutoscalingDeleteAutoscalingPolicyResponse>;
|
|
13
|
+
getAutoscalingCapacity(this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingGetAutoscalingCapacityResponse>;
|
|
14
|
+
getAutoscalingCapacity(this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingGetAutoscalingCapacityResponse, unknown>>;
|
|
15
|
+
getAutoscalingCapacity(this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptions): Promise<T.AutoscalingGetAutoscalingCapacityResponse>;
|
|
16
|
+
getAutoscalingPolicy(this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingGetAutoscalingPolicyResponse>;
|
|
17
|
+
getAutoscalingPolicy(this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingGetAutoscalingPolicyResponse, unknown>>;
|
|
18
|
+
getAutoscalingPolicy(this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<T.AutoscalingGetAutoscalingPolicyResponse>;
|
|
19
|
+
putAutoscalingPolicy(this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingPutAutoscalingPolicyResponse>;
|
|
20
|
+
putAutoscalingPolicy(this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingPutAutoscalingPolicyResponse, unknown>>;
|
|
21
|
+
putAutoscalingPolicy(this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<T.AutoscalingPutAutoscalingPolicyResponse>;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Licensed to Elasticsearch B.V. under one or more contributor
|
|
4
|
+
* license agreements. See the NOTICE file distributed with
|
|
5
|
+
* this work for additional information regarding copyright
|
|
6
|
+
* ownership. Elasticsearch B.V. licenses this file to you under
|
|
7
|
+
* the Apache License, Version 2.0 (the "License"); you may
|
|
8
|
+
* not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing,
|
|
14
|
+
* software distributed under the License is distributed on an
|
|
15
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
* KIND, either express or implied. See the License for the
|
|
17
|
+
* specific language governing permissions and limitations
|
|
18
|
+
* under the License.
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
class Autoscaling {
|
|
22
|
+
constructor(transport) {
|
|
23
|
+
Object.defineProperty(this, "transport", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: void 0
|
|
28
|
+
});
|
|
29
|
+
this.transport = transport;
|
|
30
|
+
}
|
|
31
|
+
async deleteAutoscalingPolicy(params, options) {
|
|
32
|
+
const acceptedPath = ['name'];
|
|
33
|
+
const querystring = {};
|
|
34
|
+
const body = undefined;
|
|
35
|
+
for (const key in params) {
|
|
36
|
+
if (acceptedPath.includes(key)) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
else if (key !== 'body') {
|
|
40
|
+
// @ts-expect-error
|
|
41
|
+
querystring[key] = params[key];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const method = 'DELETE';
|
|
45
|
+
const path = `/_autoscaling/policy/${encodeURIComponent(params.name.toString())}`;
|
|
46
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
47
|
+
}
|
|
48
|
+
async getAutoscalingCapacity(params, options) {
|
|
49
|
+
const acceptedPath = [];
|
|
50
|
+
const querystring = {};
|
|
51
|
+
const body = undefined;
|
|
52
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
53
|
+
for (const key in params) {
|
|
54
|
+
if (acceptedPath.includes(key)) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
else if (key !== 'body') {
|
|
58
|
+
// @ts-expect-error
|
|
59
|
+
querystring[key] = params[key];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const method = 'GET';
|
|
63
|
+
const path = '/_autoscaling/capacity';
|
|
64
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
65
|
+
}
|
|
66
|
+
async getAutoscalingPolicy(params, options) {
|
|
67
|
+
const acceptedPath = ['name'];
|
|
68
|
+
const querystring = {};
|
|
69
|
+
const body = undefined;
|
|
70
|
+
for (const key in params) {
|
|
71
|
+
if (acceptedPath.includes(key)) {
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
else if (key !== 'body') {
|
|
75
|
+
// @ts-expect-error
|
|
76
|
+
querystring[key] = params[key];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const method = 'GET';
|
|
80
|
+
const path = `/_autoscaling/policy/${encodeURIComponent(params.name.toString())}`;
|
|
81
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
82
|
+
}
|
|
83
|
+
async putAutoscalingPolicy(params, options) {
|
|
84
|
+
var _a;
|
|
85
|
+
const acceptedPath = ['name'];
|
|
86
|
+
const acceptedBody = ['policy'];
|
|
87
|
+
const querystring = {};
|
|
88
|
+
// @ts-expect-error
|
|
89
|
+
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
90
|
+
for (const key in params) {
|
|
91
|
+
if (acceptedBody.includes(key)) {
|
|
92
|
+
// @ts-expect-error
|
|
93
|
+
body = params[key];
|
|
94
|
+
}
|
|
95
|
+
else if (acceptedPath.includes(key)) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
else if (key !== 'body') {
|
|
99
|
+
// @ts-expect-error
|
|
100
|
+
querystring[key] = params[key];
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const method = 'PUT';
|
|
104
|
+
const path = `/_autoscaling/policy/${encodeURIComponent(params.name.toString())}`;
|
|
105
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.default = Autoscaling;
|
|
109
|
+
//# sourceMappingURL=autoscaling.js.map
|
|
@@ -0,0 +1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ACvC,MAAM,YAAY,GAAa,CAAC,QAAQ,CAAC,CAAA;QACzC,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,mBAAmB;QACnB,IAAI,IAAI,GAAQ,MAAA,MAAM,CAAC,IAAI,mCAAI,SAAS,CAAA;QAExC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,mBAAmB;gBACnB,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;aACnB;iBAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBACrC,SAAQ;aACT;iBAAM,IAAI,GAAG,KAAK,MAAM,EAAE;gBACzB,mBAAmB;gBACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;aAC/B;SACF;QAED,MAAM,MAAM,GAAG,KAAK,CAAA;QACpB,MAAM,IAAI,GAAG,wBAAwB,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;QACjF,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;CACF;AAnGD,8BAmGC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
|
|
2
|
+
import * as T from '../types';
|
|
3
|
+
import * as TB from '../typesWithBodyKey';
|
|
4
|
+
interface That {
|
|
5
|
+
transport: Transport;
|
|
6
|
+
}
|
|
7
|
+
export default function BulkApi<TSource = unknown>(this: That, params: T.BulkRequest<TSource> | TB.BulkRequest<TSource>, options?: TransportRequestOptionsWithOutMeta): Promise<T.BulkResponse>;
|
|
8
|
+
export default function BulkApi<TSource = unknown>(this: That, params: T.BulkRequest<TSource> | TB.BulkRequest<TSource>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.BulkResponse, unknown>>;
|
|
9
|
+
export default function BulkApi<TSource = unknown>(this: That, params: T.BulkRequest<TSource> | TB.BulkRequest<TSource>, options?: TransportRequestOptions): Promise<T.BulkResponse>;
|
|
10
|
+
export {};
|