@elastic/elasticsearch 7.15.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/.dockerignore +5 -0
- package/LICENSE +202 -0
- package/README.md +232 -0
- package/api/api/async_search.js +141 -0
- package/api/api/autoscaling.js +147 -0
- package/api/api/bulk.js +70 -0
- package/api/api/cat.js +648 -0
- package/api/api/ccr.js +403 -0
- package/api/api/clear_scroll.js +55 -0
- package/api/api/close_point_in_time.js +50 -0
- package/api/api/cluster.js +420 -0
- package/api/api/count.js +64 -0
- package/api/api/create.js +69 -0
- package/api/api/dangling_indices.js +115 -0
- package/api/api/delete.js +65 -0
- package/api/api/delete_by_query.js +71 -0
- package/api/api/delete_by_query_rethrottle.js +60 -0
- package/api/api/delete_script.js +56 -0
- package/api/api/enrich.js +173 -0
- package/api/api/eql.js +150 -0
- package/api/api/exists.js +65 -0
- package/api/api/exists_source.js +74 -0
- package/api/api/explain.js +65 -0
- package/api/api/features.js +81 -0
- package/api/api/field_caps.js +55 -0
- package/api/api/fleet.js +65 -0
- package/api/api/get.js +65 -0
- package/api/api/get_script.js +56 -0
- package/api/api/get_script_context.js +50 -0
- package/api/api/get_script_languages.js +50 -0
- package/api/api/get_source.js +65 -0
- package/api/api/graph.js +72 -0
- package/api/api/ilm.js +317 -0
- package/api/api/index.js +71 -0
- package/api/api/indices.js +1753 -0
- package/api/api/info.js +50 -0
- package/api/api/ingest.js +200 -0
- package/api/api/license.js +188 -0
- package/api/api/logstash.js +125 -0
- package/api/api/mget.js +70 -0
- package/api/api/migration.js +60 -0
- package/api/api/ml.js +2010 -0
- package/api/api/monitoring.js +66 -0
- package/api/api/msearch.js +70 -0
- package/api/api/msearch_template.js +70 -0
- package/api/api/mtermvectors.js +64 -0
- package/api/api/nodes.js +268 -0
- package/api/api/open_point_in_time.js +56 -0
- package/api/api/ping.js +50 -0
- package/api/api/put_script.js +71 -0
- package/api/api/rank_eval.js +61 -0
- package/api/api/reindex.js +56 -0
- package/api/api/reindex_rethrottle.js +60 -0
- package/api/api/render_search_template.js +55 -0
- package/api/api/rollup.js +319 -0
- package/api/api/scripts_painless_execute.js +50 -0
- package/api/api/scroll.js +55 -0
- package/api/api/search.js +64 -0
- package/api/api/search_mvt.js +87 -0
- package/api/api/search_shards.js +55 -0
- package/api/api/search_template.js +70 -0
- package/api/api/searchable_snapshots.js +186 -0
- package/api/api/security.js +1261 -0
- package/api/api/shutdown.js +124 -0
- package/api/api/slm.js +256 -0
- package/api/api/snapshot.js +439 -0
- package/api/api/sql.js +203 -0
- package/api/api/ssl.js +55 -0
- package/api/api/tasks.js +108 -0
- package/api/api/terms_enum.js +56 -0
- package/api/api/termvectors.js +67 -0
- package/api/api/text_structure.js +65 -0
- package/api/api/transform.js +268 -0
- package/api/api/update.js +69 -0
- package/api/api/update_by_query.js +67 -0
- package/api/api/update_by_query_rethrottle.js +60 -0
- package/api/api/watcher.js +333 -0
- package/api/api/xpack.js +76 -0
- package/api/index.js +508 -0
- package/api/new.d.ts +1585 -0
- package/api/requestParams.d.ts +2920 -0
- package/api/types.d.ts +15420 -0
- package/api/utils.js +58 -0
- package/codecov.yml +14 -0
- package/index.d.ts +2991 -0
- package/index.js +349 -0
- package/index.mjs +29 -0
- package/lib/Connection.d.ts +99 -0
- package/lib/Connection.js +392 -0
- package/lib/Helpers.d.ts +124 -0
- package/lib/Helpers.js +770 -0
- package/lib/Serializer.d.ts +30 -0
- package/lib/Serializer.js +94 -0
- package/lib/Transport.d.ts +162 -0
- package/lib/Transport.js +689 -0
- package/lib/errors.d.ts +90 -0
- package/lib/errors.js +159 -0
- package/lib/pool/BaseConnectionPool.js +262 -0
- package/lib/pool/CloudConnectionPool.js +64 -0
- package/lib/pool/ConnectionPool.js +246 -0
- package/lib/pool/index.d.ts +220 -0
- package/lib/pool/index.js +30 -0
- package/package.json +106 -0
package/api/api/ccr.js
ADDED
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to Elasticsearch B.V. under one or more contributor
|
|
3
|
+
* license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright
|
|
5
|
+
* ownership. Elasticsearch B.V. licenses this file to you under
|
|
6
|
+
* the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
'use strict'
|
|
21
|
+
|
|
22
|
+
/* eslint camelcase: 0 */
|
|
23
|
+
/* eslint no-unused-vars: 0 */
|
|
24
|
+
|
|
25
|
+
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
|
26
|
+
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_active_shards']
|
|
27
|
+
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', waitForActiveShards: 'wait_for_active_shards' }
|
|
28
|
+
|
|
29
|
+
function CcrApi (transport, ConfigurationError) {
|
|
30
|
+
this.transport = transport
|
|
31
|
+
this[kConfigurationError] = ConfigurationError
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
CcrApi.prototype.deleteAutoFollowPattern = function ccrDeleteAutoFollowPatternApi (params, options, callback) {
|
|
35
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
|
+
|
|
37
|
+
// check required parameters
|
|
38
|
+
if (params.name == null) {
|
|
39
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
40
|
+
return handleError(err, callback)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let { method, body, name, ...querystring } = params
|
|
44
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
45
|
+
|
|
46
|
+
let path = ''
|
|
47
|
+
if (method == null) method = 'DELETE'
|
|
48
|
+
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
|
49
|
+
|
|
50
|
+
// build request object
|
|
51
|
+
const request = {
|
|
52
|
+
method,
|
|
53
|
+
path,
|
|
54
|
+
body: body || '',
|
|
55
|
+
querystring
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return this.transport.request(request, options, callback)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
CcrApi.prototype.follow = function ccrFollowApi (params, options, callback) {
|
|
62
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
63
|
+
|
|
64
|
+
// check required parameters
|
|
65
|
+
if (params.index == null) {
|
|
66
|
+
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
67
|
+
return handleError(err, callback)
|
|
68
|
+
}
|
|
69
|
+
if (params.body == null) {
|
|
70
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
71
|
+
return handleError(err, callback)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
let { method, body, index, ...querystring } = params
|
|
75
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
76
|
+
|
|
77
|
+
let path = ''
|
|
78
|
+
if (method == null) method = 'PUT'
|
|
79
|
+
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'follow'
|
|
80
|
+
|
|
81
|
+
// build request object
|
|
82
|
+
const request = {
|
|
83
|
+
method,
|
|
84
|
+
path,
|
|
85
|
+
body: body || '',
|
|
86
|
+
querystring
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return this.transport.request(request, options, callback)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
CcrApi.prototype.followInfo = function ccrFollowInfoApi (params, options, callback) {
|
|
93
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
94
|
+
|
|
95
|
+
// check required parameters
|
|
96
|
+
if (params.index == null) {
|
|
97
|
+
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
98
|
+
return handleError(err, callback)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
let { method, body, index, ...querystring } = params
|
|
102
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
103
|
+
|
|
104
|
+
let path = ''
|
|
105
|
+
if (method == null) method = 'GET'
|
|
106
|
+
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'info'
|
|
107
|
+
|
|
108
|
+
// build request object
|
|
109
|
+
const request = {
|
|
110
|
+
method,
|
|
111
|
+
path,
|
|
112
|
+
body: null,
|
|
113
|
+
querystring
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return this.transport.request(request, options, callback)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
CcrApi.prototype.followStats = function ccrFollowStatsApi (params, options, callback) {
|
|
120
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
121
|
+
|
|
122
|
+
// check required parameters
|
|
123
|
+
if (params.index == null) {
|
|
124
|
+
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
125
|
+
return handleError(err, callback)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
let { method, body, index, ...querystring } = params
|
|
129
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
130
|
+
|
|
131
|
+
let path = ''
|
|
132
|
+
if (method == null) method = 'GET'
|
|
133
|
+
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'stats'
|
|
134
|
+
|
|
135
|
+
// build request object
|
|
136
|
+
const request = {
|
|
137
|
+
method,
|
|
138
|
+
path,
|
|
139
|
+
body: null,
|
|
140
|
+
querystring
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return this.transport.request(request, options, callback)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
CcrApi.prototype.forgetFollower = function ccrForgetFollowerApi (params, options, callback) {
|
|
147
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
148
|
+
|
|
149
|
+
// check required parameters
|
|
150
|
+
if (params.index == null) {
|
|
151
|
+
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
152
|
+
return handleError(err, callback)
|
|
153
|
+
}
|
|
154
|
+
if (params.body == null) {
|
|
155
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
156
|
+
return handleError(err, callback)
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
let { method, body, index, ...querystring } = params
|
|
160
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
161
|
+
|
|
162
|
+
let path = ''
|
|
163
|
+
if (method == null) method = 'POST'
|
|
164
|
+
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'forget_follower'
|
|
165
|
+
|
|
166
|
+
// build request object
|
|
167
|
+
const request = {
|
|
168
|
+
method,
|
|
169
|
+
path,
|
|
170
|
+
body: body || '',
|
|
171
|
+
querystring
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return this.transport.request(request, options, callback)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
CcrApi.prototype.getAutoFollowPattern = function ccrGetAutoFollowPatternApi (params, options, callback) {
|
|
178
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
179
|
+
|
|
180
|
+
let { method, body, name, ...querystring } = params
|
|
181
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
182
|
+
|
|
183
|
+
let path = ''
|
|
184
|
+
if ((name) != null) {
|
|
185
|
+
if (method == null) method = 'GET'
|
|
186
|
+
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
|
187
|
+
} else {
|
|
188
|
+
if (method == null) method = 'GET'
|
|
189
|
+
path = '/' + '_ccr' + '/' + 'auto_follow'
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// build request object
|
|
193
|
+
const request = {
|
|
194
|
+
method,
|
|
195
|
+
path,
|
|
196
|
+
body: null,
|
|
197
|
+
querystring
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return this.transport.request(request, options, callback)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
CcrApi.prototype.pauseAutoFollowPattern = function ccrPauseAutoFollowPatternApi (params, options, callback) {
|
|
204
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
205
|
+
|
|
206
|
+
// check required parameters
|
|
207
|
+
if (params.name == null) {
|
|
208
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
209
|
+
return handleError(err, callback)
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
let { method, body, name, ...querystring } = params
|
|
213
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
214
|
+
|
|
215
|
+
let path = ''
|
|
216
|
+
if (method == null) method = 'POST'
|
|
217
|
+
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) + '/' + 'pause'
|
|
218
|
+
|
|
219
|
+
// build request object
|
|
220
|
+
const request = {
|
|
221
|
+
method,
|
|
222
|
+
path,
|
|
223
|
+
body: body || '',
|
|
224
|
+
querystring
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return this.transport.request(request, options, callback)
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
CcrApi.prototype.pauseFollow = function ccrPauseFollowApi (params, options, callback) {
|
|
231
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
232
|
+
|
|
233
|
+
// check required parameters
|
|
234
|
+
if (params.index == null) {
|
|
235
|
+
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
236
|
+
return handleError(err, callback)
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
let { method, body, index, ...querystring } = params
|
|
240
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
241
|
+
|
|
242
|
+
let path = ''
|
|
243
|
+
if (method == null) method = 'POST'
|
|
244
|
+
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'pause_follow'
|
|
245
|
+
|
|
246
|
+
// build request object
|
|
247
|
+
const request = {
|
|
248
|
+
method,
|
|
249
|
+
path,
|
|
250
|
+
body: body || '',
|
|
251
|
+
querystring
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
return this.transport.request(request, options, callback)
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
CcrApi.prototype.putAutoFollowPattern = function ccrPutAutoFollowPatternApi (params, options, callback) {
|
|
258
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
259
|
+
|
|
260
|
+
// check required parameters
|
|
261
|
+
if (params.name == null) {
|
|
262
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
263
|
+
return handleError(err, callback)
|
|
264
|
+
}
|
|
265
|
+
if (params.body == null) {
|
|
266
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
267
|
+
return handleError(err, callback)
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
let { method, body, name, ...querystring } = params
|
|
271
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
272
|
+
|
|
273
|
+
let path = ''
|
|
274
|
+
if (method == null) method = 'PUT'
|
|
275
|
+
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
|
276
|
+
|
|
277
|
+
// build request object
|
|
278
|
+
const request = {
|
|
279
|
+
method,
|
|
280
|
+
path,
|
|
281
|
+
body: body || '',
|
|
282
|
+
querystring
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
return this.transport.request(request, options, callback)
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
CcrApi.prototype.resumeAutoFollowPattern = function ccrResumeAutoFollowPatternApi (params, options, callback) {
|
|
289
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
290
|
+
|
|
291
|
+
// check required parameters
|
|
292
|
+
if (params.name == null) {
|
|
293
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
294
|
+
return handleError(err, callback)
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
let { method, body, name, ...querystring } = params
|
|
298
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
299
|
+
|
|
300
|
+
let path = ''
|
|
301
|
+
if (method == null) method = 'POST'
|
|
302
|
+
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) + '/' + 'resume'
|
|
303
|
+
|
|
304
|
+
// build request object
|
|
305
|
+
const request = {
|
|
306
|
+
method,
|
|
307
|
+
path,
|
|
308
|
+
body: body || '',
|
|
309
|
+
querystring
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return this.transport.request(request, options, callback)
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
CcrApi.prototype.resumeFollow = function ccrResumeFollowApi (params, options, callback) {
|
|
316
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
317
|
+
|
|
318
|
+
// check required parameters
|
|
319
|
+
if (params.index == null) {
|
|
320
|
+
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
321
|
+
return handleError(err, callback)
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
let { method, body, index, ...querystring } = params
|
|
325
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
326
|
+
|
|
327
|
+
let path = ''
|
|
328
|
+
if (method == null) method = 'POST'
|
|
329
|
+
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'resume_follow'
|
|
330
|
+
|
|
331
|
+
// build request object
|
|
332
|
+
const request = {
|
|
333
|
+
method,
|
|
334
|
+
path,
|
|
335
|
+
body: body || '',
|
|
336
|
+
querystring
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
return this.transport.request(request, options, callback)
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
CcrApi.prototype.stats = function ccrStatsApi (params, options, callback) {
|
|
343
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
344
|
+
|
|
345
|
+
let { method, body, ...querystring } = params
|
|
346
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
347
|
+
|
|
348
|
+
let path = ''
|
|
349
|
+
if (method == null) method = 'GET'
|
|
350
|
+
path = '/' + '_ccr' + '/' + 'stats'
|
|
351
|
+
|
|
352
|
+
// build request object
|
|
353
|
+
const request = {
|
|
354
|
+
method,
|
|
355
|
+
path,
|
|
356
|
+
body: null,
|
|
357
|
+
querystring
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
return this.transport.request(request, options, callback)
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
CcrApi.prototype.unfollow = function ccrUnfollowApi (params, options, callback) {
|
|
364
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
365
|
+
|
|
366
|
+
// check required parameters
|
|
367
|
+
if (params.index == null) {
|
|
368
|
+
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
369
|
+
return handleError(err, callback)
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
let { method, body, index, ...querystring } = params
|
|
373
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
374
|
+
|
|
375
|
+
let path = ''
|
|
376
|
+
if (method == null) method = 'POST'
|
|
377
|
+
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'unfollow'
|
|
378
|
+
|
|
379
|
+
// build request object
|
|
380
|
+
const request = {
|
|
381
|
+
method,
|
|
382
|
+
path,
|
|
383
|
+
body: body || '',
|
|
384
|
+
querystring
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
return this.transport.request(request, options, callback)
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
Object.defineProperties(CcrApi.prototype, {
|
|
391
|
+
delete_auto_follow_pattern: { get () { return this.deleteAutoFollowPattern } },
|
|
392
|
+
follow_info: { get () { return this.followInfo } },
|
|
393
|
+
follow_stats: { get () { return this.followStats } },
|
|
394
|
+
forget_follower: { get () { return this.forgetFollower } },
|
|
395
|
+
get_auto_follow_pattern: { get () { return this.getAutoFollowPattern } },
|
|
396
|
+
pause_auto_follow_pattern: { get () { return this.pauseAutoFollowPattern } },
|
|
397
|
+
pause_follow: { get () { return this.pauseFollow } },
|
|
398
|
+
put_auto_follow_pattern: { get () { return this.putAutoFollowPattern } },
|
|
399
|
+
resume_auto_follow_pattern: { get () { return this.resumeAutoFollowPattern } },
|
|
400
|
+
resume_follow: { get () { return this.resumeFollow } }
|
|
401
|
+
})
|
|
402
|
+
|
|
403
|
+
module.exports = CcrApi
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to Elasticsearch B.V. under one or more contributor
|
|
3
|
+
* license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright
|
|
5
|
+
* ownership. Elasticsearch B.V. licenses this file to you under
|
|
6
|
+
* the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
'use strict'
|
|
21
|
+
|
|
22
|
+
/* eslint camelcase: 0 */
|
|
23
|
+
/* eslint no-unused-vars: 0 */
|
|
24
|
+
|
|
25
|
+
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
|
26
|
+
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']
|
|
27
|
+
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|
28
|
+
|
|
29
|
+
function clearScrollApi (params, options, callback) {
|
|
30
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
|
+
|
|
32
|
+
let { method, body, scrollId, scroll_id, ...querystring } = params
|
|
33
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
34
|
+
|
|
35
|
+
let path = ''
|
|
36
|
+
if ((scroll_id || scrollId) != null) {
|
|
37
|
+
if (method == null) method = 'DELETE'
|
|
38
|
+
path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)
|
|
39
|
+
} else {
|
|
40
|
+
if (method == null) method = 'DELETE'
|
|
41
|
+
path = '/' + '_search' + '/' + 'scroll'
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// build request object
|
|
45
|
+
const request = {
|
|
46
|
+
method,
|
|
47
|
+
path,
|
|
48
|
+
body: body || '',
|
|
49
|
+
querystring
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return this.transport.request(request, options, callback)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
module.exports = clearScrollApi
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to Elasticsearch B.V. under one or more contributor
|
|
3
|
+
* license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright
|
|
5
|
+
* ownership. Elasticsearch B.V. licenses this file to you under
|
|
6
|
+
* the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
'use strict'
|
|
21
|
+
|
|
22
|
+
/* eslint camelcase: 0 */
|
|
23
|
+
/* eslint no-unused-vars: 0 */
|
|
24
|
+
|
|
25
|
+
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
|
26
|
+
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']
|
|
27
|
+
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|
28
|
+
|
|
29
|
+
function closePointInTimeApi (params, options, callback) {
|
|
30
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
|
+
|
|
32
|
+
let { method, body, ...querystring } = params
|
|
33
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
34
|
+
|
|
35
|
+
let path = ''
|
|
36
|
+
if (method == null) method = 'DELETE'
|
|
37
|
+
path = '/' + '_pit'
|
|
38
|
+
|
|
39
|
+
// build request object
|
|
40
|
+
const request = {
|
|
41
|
+
method,
|
|
42
|
+
path,
|
|
43
|
+
body: body || '',
|
|
44
|
+
querystring
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return this.transport.request(request, options, callback)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = closePointInTimeApi
|