@elastic/elasticsearch 7.11.0 → 7.14.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 +4 -2
- package/api/api/async_search.js +11 -11
- package/api/api/autoscaling.js +12 -12
- package/api/api/bulk.js +4 -4
- package/api/api/cat.js +127 -127
- package/api/api/ccr.js +40 -40
- package/api/api/clear_scroll.js +2 -2
- package/api/api/close_point_in_time.js +2 -2
- package/api/api/cluster.js +36 -36
- package/api/api/count.js +3 -3
- package/api/api/create.js +5 -5
- package/api/api/dangling_indices.js +8 -8
- package/api/api/delete.js +4 -4
- package/api/api/delete_by_query.js +5 -5
- package/api/api/delete_by_query_rethrottle.js +4 -4
- package/api/api/delete_script.js +3 -3
- package/api/api/enrich.js +14 -14
- package/api/api/eql.js +41 -10
- package/api/api/exists.js +4 -4
- package/api/api/exists_source.js +6 -6
- package/api/api/explain.js +4 -4
- package/api/api/features.js +81 -0
- package/api/api/field_caps.js +2 -2
- package/api/api/fleet.js +65 -0
- package/api/api/get.js +4 -4
- package/api/api/get_script.js +3 -3
- package/api/api/get_script_context.js +2 -2
- package/api/api/get_script_languages.js +2 -2
- package/api/api/get_source.js +4 -4
- package/api/api/graph.js +4 -4
- package/api/api/ilm.js +50 -28
- package/api/api/index.js +4 -4
- package/api/api/indices.js +381 -381
- package/api/api/info.js +2 -2
- package/api/api/ingest.js +37 -15
- package/api/api/license.js +14 -14
- package/api/api/logstash.js +125 -0
- package/api/api/mget.js +4 -4
- package/api/api/migration.js +2 -2
- package/api/api/ml.js +338 -208
- package/api/api/monitoring.js +3 -3
- package/api/api/msearch.js +4 -4
- package/api/api/msearch_template.js +4 -4
- package/api/api/mtermvectors.js +3 -3
- package/api/api/nodes.js +12 -12
- package/api/api/open_point_in_time.js +2 -2
- package/api/api/ping.js +2 -2
- package/api/api/put_script.js +5 -5
- package/api/api/rank_eval.js +3 -3
- package/api/api/reindex.js +3 -3
- package/api/api/reindex_rethrottle.js +4 -4
- package/api/api/render_search_template.js +2 -2
- package/api/api/rollup.js +31 -31
- package/api/api/scripts_painless_execute.js +2 -2
- package/api/api/scroll.js +2 -2
- package/api/api/search.js +5 -5
- package/api/api/search_shards.js +2 -2
- package/api/api/search_template.js +4 -4
- package/api/api/searchable_snapshots.js +42 -15
- package/api/api/security.js +464 -86
- package/api/api/shutdown.js +124 -0
- package/api/api/slm.js +21 -21
- package/api/api/snapshot.js +76 -48
- package/api/api/sql.js +96 -12
- package/api/api/ssl.js +2 -2
- package/api/api/tasks.js +7 -7
- package/api/api/terms_enum.js +56 -0
- package/api/api/termvectors.js +3 -3
- package/api/api/text_structure.js +65 -0
- package/api/api/transform.js +25 -25
- package/api/api/update.js +5 -5
- package/api/api/update_by_query.js +4 -4
- package/api/api/update_by_query_rethrottle.js +4 -4
- package/api/api/watcher.js +29 -29
- package/api/api/xpack.js +4 -4
- package/api/index.js +179 -120
- package/api/new.d.ts +1584 -0
- package/api/requestParams.d.ts +203 -7
- package/api/types.d.ts +15455 -0
- package/api/utils.js +4 -4
- package/free-report-junit.xml +3410 -0
- package/index.d.ts +326 -23
- package/index.js +28 -36
- package/lib/Connection.js +6 -4
- package/lib/Helpers.d.ts +4 -2
- package/lib/Helpers.js +31 -17
- package/lib/Serializer.d.ts +5 -0
- package/lib/Serializer.js +17 -6
- package/lib/Transport.d.ts +4 -2
- package/lib/Transport.js +194 -79
- package/lib/errors.d.ts +7 -0
- package/lib/errors.js +26 -2
- package/lib/pool/BaseConnectionPool.js +3 -3
- package/lib/pool/ConnectionPool.js +4 -5
- package/lib/pool/index.d.ts +5 -0
- package/package.json +26 -26
- package/api/kibana.d.ts +0 -485
package/api/api/sql.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 = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'format']
|
|
27
|
-
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|
26
|
+
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'delimiter', 'format', 'keep_alive', 'wait_for_completion_timeout']
|
|
27
|
+
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', keepAlive: 'keep_alive', waitForCompletionTimeout: 'wait_for_completion_timeout' }
|
|
28
28
|
|
|
29
29
|
function SqlApi (transport, ConfigurationError) {
|
|
30
30
|
this.transport = transport
|
|
@@ -35,15 +35,15 @@ SqlApi.prototype.clearCursor = function sqlClearCursorApi (params, options, call
|
|
|
35
35
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
36
|
|
|
37
37
|
// check required parameters
|
|
38
|
-
if (params
|
|
38
|
+
if (params.body == null) {
|
|
39
39
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
40
40
|
return handleError(err, callback)
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
let { method, body, ...querystring } = params
|
|
44
44
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
let path = ''
|
|
47
47
|
if (method == null) method = 'POST'
|
|
48
48
|
path = '/' + '_sql' + '/' + 'close'
|
|
49
49
|
|
|
@@ -58,19 +58,100 @@ SqlApi.prototype.clearCursor = function sqlClearCursorApi (params, options, call
|
|
|
58
58
|
return this.transport.request(request, options, callback)
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
SqlApi.prototype.deleteAsync = function sqlDeleteAsyncApi (params, options, callback) {
|
|
62
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
63
|
+
|
|
64
|
+
// check required parameters
|
|
65
|
+
if (params.id == null) {
|
|
66
|
+
const err = new this[kConfigurationError]('Missing required parameter: id')
|
|
67
|
+
return handleError(err, callback)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
let { method, body, id, ...querystring } = params
|
|
71
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
72
|
+
|
|
73
|
+
let path = ''
|
|
74
|
+
if (method == null) method = 'DELETE'
|
|
75
|
+
path = '/' + '_sql' + '/' + 'async' + '/' + 'delete' + '/' + encodeURIComponent(id)
|
|
76
|
+
|
|
77
|
+
// build request object
|
|
78
|
+
const request = {
|
|
79
|
+
method,
|
|
80
|
+
path,
|
|
81
|
+
body: body || '',
|
|
82
|
+
querystring
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return this.transport.request(request, options, callback)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
SqlApi.prototype.getAsync = function sqlGetAsyncApi (params, options, callback) {
|
|
89
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
90
|
+
|
|
91
|
+
// check required parameters
|
|
92
|
+
if (params.id == null) {
|
|
93
|
+
const err = new this[kConfigurationError]('Missing required parameter: id')
|
|
94
|
+
return handleError(err, callback)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
let { method, body, id, ...querystring } = params
|
|
98
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
99
|
+
|
|
100
|
+
let path = ''
|
|
101
|
+
if (method == null) method = 'GET'
|
|
102
|
+
path = '/' + '_sql' + '/' + 'async' + '/' + encodeURIComponent(id)
|
|
103
|
+
|
|
104
|
+
// build request object
|
|
105
|
+
const request = {
|
|
106
|
+
method,
|
|
107
|
+
path,
|
|
108
|
+
body: null,
|
|
109
|
+
querystring
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return this.transport.request(request, options, callback)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
SqlApi.prototype.getAsyncStatus = function sqlGetAsyncStatusApi (params, options, callback) {
|
|
116
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
117
|
+
|
|
118
|
+
// check required parameters
|
|
119
|
+
if (params.id == null) {
|
|
120
|
+
const err = new this[kConfigurationError]('Missing required parameter: id')
|
|
121
|
+
return handleError(err, callback)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
let { method, body, id, ...querystring } = params
|
|
125
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
126
|
+
|
|
127
|
+
let path = ''
|
|
128
|
+
if (method == null) method = 'GET'
|
|
129
|
+
path = '/' + '_sql' + '/' + 'async' + '/' + 'status' + '/' + encodeURIComponent(id)
|
|
130
|
+
|
|
131
|
+
// build request object
|
|
132
|
+
const request = {
|
|
133
|
+
method,
|
|
134
|
+
path,
|
|
135
|
+
body: null,
|
|
136
|
+
querystring
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return this.transport.request(request, options, callback)
|
|
140
|
+
}
|
|
141
|
+
|
|
61
142
|
SqlApi.prototype.query = function sqlQueryApi (params, options, callback) {
|
|
62
143
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
63
144
|
|
|
64
145
|
// check required parameters
|
|
65
|
-
if (params
|
|
146
|
+
if (params.body == null) {
|
|
66
147
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
67
148
|
return handleError(err, callback)
|
|
68
149
|
}
|
|
69
150
|
|
|
70
|
-
|
|
151
|
+
let { method, body, ...querystring } = params
|
|
71
152
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
72
153
|
|
|
73
|
-
|
|
154
|
+
let path = ''
|
|
74
155
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
75
156
|
path = '/' + '_sql'
|
|
76
157
|
|
|
@@ -89,15 +170,15 @@ SqlApi.prototype.translate = function sqlTranslateApi (params, options, callback
|
|
|
89
170
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
90
171
|
|
|
91
172
|
// check required parameters
|
|
92
|
-
if (params
|
|
173
|
+
if (params.body == null) {
|
|
93
174
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
94
175
|
return handleError(err, callback)
|
|
95
176
|
}
|
|
96
177
|
|
|
97
|
-
|
|
178
|
+
let { method, body, ...querystring } = params
|
|
98
179
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
99
180
|
|
|
100
|
-
|
|
181
|
+
let path = ''
|
|
101
182
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
102
183
|
path = '/' + '_sql' + '/' + 'translate'
|
|
103
184
|
|
|
@@ -113,7 +194,10 @@ SqlApi.prototype.translate = function sqlTranslateApi (params, options, callback
|
|
|
113
194
|
}
|
|
114
195
|
|
|
115
196
|
Object.defineProperties(SqlApi.prototype, {
|
|
116
|
-
clear_cursor: { get () { return this.clearCursor } }
|
|
197
|
+
clear_cursor: { get () { return this.clearCursor } },
|
|
198
|
+
delete_async: { get () { return this.deleteAsync } },
|
|
199
|
+
get_async: { get () { return this.getAsync } },
|
|
200
|
+
get_async_status: { get () { return this.getAsyncStatus } }
|
|
117
201
|
})
|
|
118
202
|
|
|
119
203
|
module.exports = SqlApi
|
package/api/api/ssl.js
CHANGED
|
@@ -34,10 +34,10 @@ function SslApi (transport, ConfigurationError) {
|
|
|
34
34
|
SslApi.prototype.certificates = function sslCertificatesApi (params, options, callback) {
|
|
35
35
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
let { method, body, ...querystring } = params
|
|
38
38
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
let path = ''
|
|
41
41
|
if (method == null) method = 'GET'
|
|
42
42
|
path = '/' + '_ssl' + '/' + 'certificates'
|
|
43
43
|
|
package/api/api/tasks.js
CHANGED
|
@@ -34,10 +34,10 @@ function TasksApi (transport, ConfigurationError) {
|
|
|
34
34
|
TasksApi.prototype.cancel = function tasksCancelApi (params, options, callback) {
|
|
35
35
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
let { method, body, taskId, task_id, ...querystring } = params
|
|
38
38
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
let path = ''
|
|
41
41
|
if ((task_id || taskId) != null) {
|
|
42
42
|
if (method == null) method = 'POST'
|
|
43
43
|
path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_cancel'
|
|
@@ -61,15 +61,15 @@ TasksApi.prototype.get = function tasksGetApi (params, options, callback) {
|
|
|
61
61
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
62
62
|
|
|
63
63
|
// check required parameters
|
|
64
|
-
if (params
|
|
64
|
+
if (params.task_id == null && params.taskId == null) {
|
|
65
65
|
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
|
|
66
66
|
return handleError(err, callback)
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
let { method, body, taskId, task_id, ...querystring } = params
|
|
70
70
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
let path = ''
|
|
73
73
|
if (method == null) method = 'GET'
|
|
74
74
|
path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId)
|
|
75
75
|
|
|
@@ -87,10 +87,10 @@ TasksApi.prototype.get = function tasksGetApi (params, options, callback) {
|
|
|
87
87
|
TasksApi.prototype.list = function tasksListApi (params, options, callback) {
|
|
88
88
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
let { method, body, ...querystring } = params
|
|
91
91
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
let path = ''
|
|
94
94
|
if (method == null) method = 'GET'
|
|
95
95
|
path = '/' + '_tasks'
|
|
96
96
|
|
|
@@ -0,0 +1,56 @@
|
|
|
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 termsEnumApi (params, options, callback) {
|
|
30
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
|
+
|
|
32
|
+
// check required parameters
|
|
33
|
+
if (params.index == null) {
|
|
34
|
+
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
35
|
+
return handleError(err, callback)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
let { method, body, index, ...querystring } = params
|
|
39
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
40
|
+
|
|
41
|
+
let path = ''
|
|
42
|
+
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
43
|
+
path = '/' + encodeURIComponent(index) + '/' + '_terms_enum'
|
|
44
|
+
|
|
45
|
+
// build request object
|
|
46
|
+
const request = {
|
|
47
|
+
method,
|
|
48
|
+
path,
|
|
49
|
+
body: body || '',
|
|
50
|
+
querystring
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return this.transport.request(request, options, callback)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
module.exports = termsEnumApi
|
package/api/api/termvectors.js
CHANGED
|
@@ -30,15 +30,15 @@ function termvectorsApi (params, options, callback) {
|
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
32
|
// check required parameters
|
|
33
|
-
if (params
|
|
33
|
+
if (params.index == null) {
|
|
34
34
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
35
35
|
return handleError(err, callback)
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
let { method, body, index, id, type, ...querystring } = params
|
|
39
39
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
let path = ''
|
|
42
42
|
if ((index) != null && (type) != null && (id) != null) {
|
|
43
43
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
44
44
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_termvectors'
|
|
@@ -0,0 +1,65 @@
|
|
|
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 = ['lines_to_sample', 'line_merge_size_limit', 'timeout', 'charset', 'format', 'has_header_row', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'timestamp_field', 'timestamp_format', 'explain', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
|
27
|
+
const snakeCase = { linesToSample: 'lines_to_sample', lineMergeSizeLimit: 'line_merge_size_limit', hasHeaderRow: 'has_header_row', columnNames: 'column_names', shouldTrimFields: 'should_trim_fields', grokPattern: 'grok_pattern', timestampField: 'timestamp_field', timestampFormat: 'timestamp_format', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|
28
|
+
|
|
29
|
+
function TextStructureApi (transport, ConfigurationError) {
|
|
30
|
+
this.transport = transport
|
|
31
|
+
this[kConfigurationError] = ConfigurationError
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
TextStructureApi.prototype.findStructure = function textStructureFindStructureApi (params, options, callback) {
|
|
35
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
|
+
|
|
37
|
+
// check required parameters
|
|
38
|
+
if (params.body == null) {
|
|
39
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
40
|
+
return handleError(err, callback)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let { method, body, ...querystring } = params
|
|
44
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
45
|
+
|
|
46
|
+
let path = ''
|
|
47
|
+
if (method == null) method = 'POST'
|
|
48
|
+
path = '/' + '_text_structure' + '/' + 'find_structure'
|
|
49
|
+
|
|
50
|
+
// build request object
|
|
51
|
+
const request = {
|
|
52
|
+
method,
|
|
53
|
+
path,
|
|
54
|
+
bulkBody: body,
|
|
55
|
+
querystring
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return this.transport.request(request, options, callback)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
Object.defineProperties(TextStructureApi.prototype, {
|
|
62
|
+
find_structure: { get () { return this.findStructure } }
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
module.exports = TextStructureApi
|
package/api/api/transform.js
CHANGED
|
@@ -35,15 +35,15 @@ TransformApi.prototype.deleteTransform = function transformDeleteTransformApi (p
|
|
|
35
35
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
36
|
|
|
37
37
|
// check required parameters
|
|
38
|
-
if (params
|
|
38
|
+
if (params.transform_id == null && params.transformId == null) {
|
|
39
39
|
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
|
40
40
|
return handleError(err, callback)
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
let { method, body, transformId, transform_id, ...querystring } = params
|
|
44
44
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
let path = ''
|
|
47
47
|
if (method == null) method = 'DELETE'
|
|
48
48
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
|
|
49
49
|
|
|
@@ -61,10 +61,10 @@ TransformApi.prototype.deleteTransform = function transformDeleteTransformApi (p
|
|
|
61
61
|
TransformApi.prototype.getTransform = function transformGetTransformApi (params, options, callback) {
|
|
62
62
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
let { method, body, transformId, transform_id, ...querystring } = params
|
|
65
65
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
let path = ''
|
|
68
68
|
if ((transform_id || transformId) != null) {
|
|
69
69
|
if (method == null) method = 'GET'
|
|
70
70
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
|
|
@@ -88,15 +88,15 @@ TransformApi.prototype.getTransformStats = function transformGetTransformStatsAp
|
|
|
88
88
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
89
89
|
|
|
90
90
|
// check required parameters
|
|
91
|
-
if (params
|
|
91
|
+
if (params.transform_id == null && params.transformId == null) {
|
|
92
92
|
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
|
93
93
|
return handleError(err, callback)
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
let { method, body, transformId, transform_id, ...querystring } = params
|
|
97
97
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
let path = ''
|
|
100
100
|
if (method == null) method = 'GET'
|
|
101
101
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stats'
|
|
102
102
|
|
|
@@ -115,15 +115,15 @@ TransformApi.prototype.previewTransform = function transformPreviewTransformApi
|
|
|
115
115
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
116
116
|
|
|
117
117
|
// check required parameters
|
|
118
|
-
if (params
|
|
118
|
+
if (params.body == null) {
|
|
119
119
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
120
120
|
return handleError(err, callback)
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
let { method, body, ...querystring } = params
|
|
124
124
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
let path = ''
|
|
127
127
|
if (method == null) method = 'POST'
|
|
128
128
|
path = '/' + '_transform' + '/' + '_preview'
|
|
129
129
|
|
|
@@ -142,19 +142,19 @@ TransformApi.prototype.putTransform = function transformPutTransformApi (params,
|
|
|
142
142
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
143
143
|
|
|
144
144
|
// check required parameters
|
|
145
|
-
if (params
|
|
145
|
+
if (params.transform_id == null && params.transformId == null) {
|
|
146
146
|
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
|
147
147
|
return handleError(err, callback)
|
|
148
148
|
}
|
|
149
|
-
if (params
|
|
149
|
+
if (params.body == null) {
|
|
150
150
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
151
151
|
return handleError(err, callback)
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
let { method, body, transformId, transform_id, ...querystring } = params
|
|
155
155
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
let path = ''
|
|
158
158
|
if (method == null) method = 'PUT'
|
|
159
159
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
|
|
160
160
|
|
|
@@ -173,15 +173,15 @@ TransformApi.prototype.startTransform = function transformStartTransformApi (par
|
|
|
173
173
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
174
174
|
|
|
175
175
|
// check required parameters
|
|
176
|
-
if (params
|
|
176
|
+
if (params.transform_id == null && params.transformId == null) {
|
|
177
177
|
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
|
178
178
|
return handleError(err, callback)
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
|
|
181
|
+
let { method, body, transformId, transform_id, ...querystring } = params
|
|
182
182
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
let path = ''
|
|
185
185
|
if (method == null) method = 'POST'
|
|
186
186
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_start'
|
|
187
187
|
|
|
@@ -200,15 +200,15 @@ TransformApi.prototype.stopTransform = function transformStopTransformApi (param
|
|
|
200
200
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
201
201
|
|
|
202
202
|
// check required parameters
|
|
203
|
-
if (params
|
|
203
|
+
if (params.transform_id == null && params.transformId == null) {
|
|
204
204
|
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
|
205
205
|
return handleError(err, callback)
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
|
|
208
|
+
let { method, body, transformId, transform_id, ...querystring } = params
|
|
209
209
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
let path = ''
|
|
212
212
|
if (method == null) method = 'POST'
|
|
213
213
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stop'
|
|
214
214
|
|
|
@@ -227,19 +227,19 @@ TransformApi.prototype.updateTransform = function transformUpdateTransformApi (p
|
|
|
227
227
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
228
228
|
|
|
229
229
|
// check required parameters
|
|
230
|
-
if (params
|
|
230
|
+
if (params.transform_id == null && params.transformId == null) {
|
|
231
231
|
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
|
232
232
|
return handleError(err, callback)
|
|
233
233
|
}
|
|
234
|
-
if (params
|
|
234
|
+
if (params.body == null) {
|
|
235
235
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
236
236
|
return handleError(err, callback)
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
|
|
239
|
+
let { method, body, transformId, transform_id, ...querystring } = params
|
|
240
240
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
241
241
|
|
|
242
|
-
|
|
242
|
+
let path = ''
|
|
243
243
|
if (method == null) method = 'POST'
|
|
244
244
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_update'
|
|
245
245
|
|
package/api/api/update.js
CHANGED
|
@@ -30,23 +30,23 @@ function updateApi (params, options, callback) {
|
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
32
|
// check required parameters
|
|
33
|
-
if (params
|
|
33
|
+
if (params.id == null) {
|
|
34
34
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
|
35
35
|
return handleError(err, callback)
|
|
36
36
|
}
|
|
37
|
-
if (params
|
|
37
|
+
if (params.index == null) {
|
|
38
38
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
39
39
|
return handleError(err, callback)
|
|
40
40
|
}
|
|
41
|
-
if (params
|
|
41
|
+
if (params.body == null) {
|
|
42
42
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
43
43
|
return handleError(err, callback)
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
let { method, body, id, index, type, ...querystring } = params
|
|
47
47
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
let path = ''
|
|
50
50
|
if ((index) != null && (type) != null && (id) != null) {
|
|
51
51
|
if (method == null) method = 'POST'
|
|
52
52
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_update'
|
|
@@ -30,21 +30,21 @@ function updateByQueryApi (params, options, callback) {
|
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
32
|
// check required parameters
|
|
33
|
-
if (params
|
|
33
|
+
if (params.index == null) {
|
|
34
34
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
35
35
|
return handleError(err, callback)
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
// check required url components
|
|
39
|
-
if (params
|
|
39
|
+
if (params.type != null && (params.index == null)) {
|
|
40
40
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
41
41
|
return handleError(err, callback)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
let { method, body, index, type, ...querystring } = params
|
|
45
45
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
let path = ''
|
|
48
48
|
if ((index) != null && (type) != null) {
|
|
49
49
|
if (method == null) method = 'POST'
|
|
50
50
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_update_by_query'
|
|
@@ -30,19 +30,19 @@ function updateByQueryRethrottleApi (params, options, callback) {
|
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
32
|
// check required parameters
|
|
33
|
-
if (params
|
|
33
|
+
if (params.task_id == null && params.taskId == null) {
|
|
34
34
|
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
|
|
35
35
|
return handleError(err, callback)
|
|
36
36
|
}
|
|
37
|
-
if (params
|
|
37
|
+
if (params.requests_per_second == null && params.requestsPerSecond == null) {
|
|
38
38
|
const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond')
|
|
39
39
|
return handleError(err, callback)
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
let { method, body, taskId, task_id, ...querystring } = params
|
|
43
43
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
let path = ''
|
|
46
46
|
if (method == null) method = 'POST'
|
|
47
47
|
path = '/' + '_update_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
|
|
48
48
|
|