@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
|
@@ -0,0 +1,124 @@
|
|
|
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 ShutdownApi (transport, ConfigurationError) {
|
|
30
|
+
this.transport = transport
|
|
31
|
+
this[kConfigurationError] = ConfigurationError
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
ShutdownApi.prototype.deleteNode = function shutdownDeleteNodeApi (params, options, callback) {
|
|
35
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
|
+
|
|
37
|
+
// check required parameters
|
|
38
|
+
if (params.node_id == null && params.nodeId == null) {
|
|
39
|
+
const err = new this[kConfigurationError]('Missing required parameter: node_id or nodeId')
|
|
40
|
+
return handleError(err, callback)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let { method, body, nodeId, node_id, ...querystring } = params
|
|
44
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
45
|
+
|
|
46
|
+
let path = ''
|
|
47
|
+
if (method == null) method = 'DELETE'
|
|
48
|
+
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'shutdown'
|
|
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
|
+
ShutdownApi.prototype.getNode = function shutdownGetNodeApi (params, options, callback) {
|
|
62
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
63
|
+
|
|
64
|
+
let { method, body, nodeId, node_id, ...querystring } = params
|
|
65
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
66
|
+
|
|
67
|
+
let path = ''
|
|
68
|
+
if ((node_id || nodeId) != null) {
|
|
69
|
+
if (method == null) method = 'GET'
|
|
70
|
+
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'shutdown'
|
|
71
|
+
} else {
|
|
72
|
+
if (method == null) method = 'GET'
|
|
73
|
+
path = '/' + '_nodes' + '/' + 'shutdown'
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// build request object
|
|
77
|
+
const request = {
|
|
78
|
+
method,
|
|
79
|
+
path,
|
|
80
|
+
body: null,
|
|
81
|
+
querystring
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return this.transport.request(request, options, callback)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
ShutdownApi.prototype.putNode = function shutdownPutNodeApi (params, options, callback) {
|
|
88
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
89
|
+
|
|
90
|
+
// check required parameters
|
|
91
|
+
if (params.node_id == null && params.nodeId == null) {
|
|
92
|
+
const err = new this[kConfigurationError]('Missing required parameter: node_id or nodeId')
|
|
93
|
+
return handleError(err, callback)
|
|
94
|
+
}
|
|
95
|
+
if (params.body == null) {
|
|
96
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
97
|
+
return handleError(err, callback)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
let { method, body, nodeId, node_id, ...querystring } = params
|
|
101
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
102
|
+
|
|
103
|
+
let path = ''
|
|
104
|
+
if (method == null) method = 'PUT'
|
|
105
|
+
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'shutdown'
|
|
106
|
+
|
|
107
|
+
// build request object
|
|
108
|
+
const request = {
|
|
109
|
+
method,
|
|
110
|
+
path,
|
|
111
|
+
body: body || '',
|
|
112
|
+
querystring
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return this.transport.request(request, options, callback)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
Object.defineProperties(ShutdownApi.prototype, {
|
|
119
|
+
delete_node: { get () { return this.deleteNode } },
|
|
120
|
+
get_node: { get () { return this.getNode } },
|
|
121
|
+
put_node: { get () { return this.putNode } }
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
module.exports = ShutdownApi
|
package/api/api/slm.js
CHANGED
|
@@ -35,15 +35,15 @@ SlmApi.prototype.deleteLifecycle = function slmDeleteLifecycleApi (params, optio
|
|
|
35
35
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
36
|
|
|
37
37
|
// check required parameters
|
|
38
|
-
if (params
|
|
38
|
+
if (params.policy_id == null && params.policyId == null) {
|
|
39
39
|
const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId')
|
|
40
40
|
return handleError(err, callback)
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
let { method, body, policyId, policy_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 = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId)
|
|
49
49
|
|
|
@@ -62,15 +62,15 @@ SlmApi.prototype.executeLifecycle = function slmExecuteLifecycleApi (params, opt
|
|
|
62
62
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
63
63
|
|
|
64
64
|
// check required parameters
|
|
65
|
-
if (params
|
|
65
|
+
if (params.policy_id == null && params.policyId == null) {
|
|
66
66
|
const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId')
|
|
67
67
|
return handleError(err, callback)
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
let { method, body, policyId, policy_id, ...querystring } = params
|
|
71
71
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
let path = ''
|
|
74
74
|
if (method == null) method = 'PUT'
|
|
75
75
|
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId) + '/' + '_execute'
|
|
76
76
|
|
|
@@ -88,10 +88,10 @@ SlmApi.prototype.executeLifecycle = function slmExecuteLifecycleApi (params, opt
|
|
|
88
88
|
SlmApi.prototype.executeRetention = function slmExecuteRetentionApi (params, options, callback) {
|
|
89
89
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
let { method, body, ...querystring } = params
|
|
92
92
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
let path = ''
|
|
95
95
|
if (method == null) method = 'POST'
|
|
96
96
|
path = '/' + '_slm' + '/' + '_execute_retention'
|
|
97
97
|
|
|
@@ -109,10 +109,10 @@ SlmApi.prototype.executeRetention = function slmExecuteRetentionApi (params, opt
|
|
|
109
109
|
SlmApi.prototype.getLifecycle = function slmGetLifecycleApi (params, options, callback) {
|
|
110
110
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
let { method, body, policyId, policy_id, ...querystring } = params
|
|
113
113
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
let path = ''
|
|
116
116
|
if ((policy_id || policyId) != null) {
|
|
117
117
|
if (method == null) method = 'GET'
|
|
118
118
|
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId)
|
|
@@ -135,10 +135,10 @@ SlmApi.prototype.getLifecycle = function slmGetLifecycleApi (params, options, ca
|
|
|
135
135
|
SlmApi.prototype.getStats = function slmGetStatsApi (params, options, callback) {
|
|
136
136
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
let { method, body, ...querystring } = params
|
|
139
139
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
let path = ''
|
|
142
142
|
if (method == null) method = 'GET'
|
|
143
143
|
path = '/' + '_slm' + '/' + 'stats'
|
|
144
144
|
|
|
@@ -156,10 +156,10 @@ SlmApi.prototype.getStats = function slmGetStatsApi (params, options, callback)
|
|
|
156
156
|
SlmApi.prototype.getStatus = function slmGetStatusApi (params, options, callback) {
|
|
157
157
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
let { method, body, ...querystring } = params
|
|
160
160
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
let path = ''
|
|
163
163
|
if (method == null) method = 'GET'
|
|
164
164
|
path = '/' + '_slm' + '/' + 'status'
|
|
165
165
|
|
|
@@ -178,15 +178,15 @@ SlmApi.prototype.putLifecycle = function slmPutLifecycleApi (params, options, ca
|
|
|
178
178
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
179
179
|
|
|
180
180
|
// check required parameters
|
|
181
|
-
if (params
|
|
181
|
+
if (params.policy_id == null && params.policyId == null) {
|
|
182
182
|
const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId')
|
|
183
183
|
return handleError(err, callback)
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
let { method, body, policyId, policy_id, ...querystring } = params
|
|
187
187
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
let path = ''
|
|
190
190
|
if (method == null) method = 'PUT'
|
|
191
191
|
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId)
|
|
192
192
|
|
|
@@ -204,10 +204,10 @@ SlmApi.prototype.putLifecycle = function slmPutLifecycleApi (params, options, ca
|
|
|
204
204
|
SlmApi.prototype.start = function slmStartApi (params, options, callback) {
|
|
205
205
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
let { method, body, ...querystring } = params
|
|
208
208
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
let path = ''
|
|
211
211
|
if (method == null) method = 'POST'
|
|
212
212
|
path = '/' + '_slm' + '/' + 'start'
|
|
213
213
|
|
|
@@ -225,10 +225,10 @@ SlmApi.prototype.start = function slmStartApi (params, options, callback) {
|
|
|
225
225
|
SlmApi.prototype.stop = function slmStopApi (params, options, callback) {
|
|
226
226
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
let { method, body, ...querystring } = params
|
|
229
229
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
230
230
|
|
|
231
|
-
|
|
231
|
+
let path = ''
|
|
232
232
|
if (method == null) method = 'POST'
|
|
233
233
|
path = '/' + '_slm' + '/' + 'stop'
|
|
234
234
|
|
package/api/api/snapshot.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 = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion', 'verify', 'ignore_unavailable', 'verbose', 'local']
|
|
27
|
-
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletion: 'wait_for_completion', ignoreUnavailable: 'ignore_unavailable' }
|
|
26
|
+
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion', 'verify', 'ignore_unavailable', 'index_details', 'include_repository', 'verbose', 'local', 'blob_count', 'concurrency', 'read_node_count', 'early_read_node_count', 'seed', 'rare_action_probability', 'max_blob_size', 'max_total_data_size', 'detailed', 'rarely_abort_writes']
|
|
27
|
+
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletion: 'wait_for_completion', ignoreUnavailable: 'ignore_unavailable', indexDetails: 'index_details', includeRepository: 'include_repository', blobCount: 'blob_count', readNodeCount: 'read_node_count', earlyReadNodeCount: 'early_read_node_count', rareActionProbability: 'rare_action_probability', maxBlobSize: 'max_blob_size', maxTotalDataSize: 'max_total_data_size', rarelyAbortWrites: 'rarely_abort_writes' }
|
|
28
28
|
|
|
29
29
|
function SnapshotApi (transport, ConfigurationError) {
|
|
30
30
|
this.transport = transport
|
|
@@ -35,15 +35,15 @@ SnapshotApi.prototype.cleanupRepository = function snapshotCleanupRepositoryApi
|
|
|
35
35
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
36
|
|
|
37
37
|
// check required parameters
|
|
38
|
-
if (params
|
|
38
|
+
if (params.repository == null) {
|
|
39
39
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
|
40
40
|
return handleError(err, callback)
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
let { method, body, repository, ...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 = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_cleanup'
|
|
49
49
|
|
|
@@ -62,36 +62,36 @@ SnapshotApi.prototype.clone = function snapshotCloneApi (params, options, callba
|
|
|
62
62
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
63
63
|
|
|
64
64
|
// check required parameters
|
|
65
|
-
if (params
|
|
65
|
+
if (params.repository == null) {
|
|
66
66
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
|
67
67
|
return handleError(err, callback)
|
|
68
68
|
}
|
|
69
|
-
if (params
|
|
69
|
+
if (params.snapshot == null) {
|
|
70
70
|
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
|
71
71
|
return handleError(err, callback)
|
|
72
72
|
}
|
|
73
|
-
if (params
|
|
73
|
+
if (params.target_snapshot == null && params.targetSnapshot == null) {
|
|
74
74
|
const err = new this[kConfigurationError]('Missing required parameter: target_snapshot or targetSnapshot')
|
|
75
75
|
return handleError(err, callback)
|
|
76
76
|
}
|
|
77
|
-
if (params
|
|
77
|
+
if (params.body == null) {
|
|
78
78
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
79
79
|
return handleError(err, callback)
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// check required url components
|
|
83
|
-
if ((params
|
|
83
|
+
if ((params.target_snapshot != null || params.targetSnapshot != null) && (params.snapshot == null || params.repository == null)) {
|
|
84
84
|
const err = new this[kConfigurationError]('Missing required parameter of the url: snapshot, repository')
|
|
85
85
|
return handleError(err, callback)
|
|
86
|
-
} else if (params
|
|
86
|
+
} else if (params.snapshot != null && (params.repository == null)) {
|
|
87
87
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
|
88
88
|
return handleError(err, callback)
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
let { method, body, repository, snapshot, targetSnapshot, target_snapshot, ...querystring } = params
|
|
92
92
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
let path = ''
|
|
95
95
|
if (method == null) method = 'PUT'
|
|
96
96
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_clone' + '/' + encodeURIComponent(target_snapshot || targetSnapshot)
|
|
97
97
|
|
|
@@ -110,25 +110,25 @@ SnapshotApi.prototype.create = function snapshotCreateApi (params, options, call
|
|
|
110
110
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
111
111
|
|
|
112
112
|
// check required parameters
|
|
113
|
-
if (params
|
|
113
|
+
if (params.repository == null) {
|
|
114
114
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
|
115
115
|
return handleError(err, callback)
|
|
116
116
|
}
|
|
117
|
-
if (params
|
|
117
|
+
if (params.snapshot == null) {
|
|
118
118
|
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
|
119
119
|
return handleError(err, callback)
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// check required url components
|
|
123
|
-
if (params
|
|
123
|
+
if (params.snapshot != null && (params.repository == null)) {
|
|
124
124
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
|
125
125
|
return handleError(err, callback)
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
let { method, body, repository, snapshot, ...querystring } = params
|
|
129
129
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
let path = ''
|
|
132
132
|
if (method == null) method = 'PUT'
|
|
133
133
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
|
134
134
|
|
|
@@ -147,19 +147,19 @@ SnapshotApi.prototype.createRepository = function snapshotCreateRepositoryApi (p
|
|
|
147
147
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
148
148
|
|
|
149
149
|
// check required parameters
|
|
150
|
-
if (params
|
|
150
|
+
if (params.repository == null) {
|
|
151
151
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
|
152
152
|
return handleError(err, callback)
|
|
153
153
|
}
|
|
154
|
-
if (params
|
|
154
|
+
if (params.body == null) {
|
|
155
155
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
156
156
|
return handleError(err, callback)
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
let { method, body, repository, ...querystring } = params
|
|
160
160
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
let path = ''
|
|
163
163
|
if (method == null) method = 'PUT'
|
|
164
164
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
|
|
165
165
|
|
|
@@ -178,25 +178,25 @@ SnapshotApi.prototype.delete = function snapshotDeleteApi (params, options, call
|
|
|
178
178
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
179
179
|
|
|
180
180
|
// check required parameters
|
|
181
|
-
if (params
|
|
181
|
+
if (params.repository == null) {
|
|
182
182
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
|
183
183
|
return handleError(err, callback)
|
|
184
184
|
}
|
|
185
|
-
if (params
|
|
185
|
+
if (params.snapshot == null) {
|
|
186
186
|
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
|
187
187
|
return handleError(err, callback)
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
// check required url components
|
|
191
|
-
if (params
|
|
191
|
+
if (params.snapshot != null && (params.repository == null)) {
|
|
192
192
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
|
193
193
|
return handleError(err, callback)
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
|
|
196
|
+
let { method, body, repository, snapshot, ...querystring } = params
|
|
197
197
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
let path = ''
|
|
200
200
|
if (method == null) method = 'DELETE'
|
|
201
201
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
|
202
202
|
|
|
@@ -215,15 +215,15 @@ SnapshotApi.prototype.deleteRepository = function snapshotDeleteRepositoryApi (p
|
|
|
215
215
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
216
216
|
|
|
217
217
|
// check required parameters
|
|
218
|
-
if (params
|
|
218
|
+
if (params.repository == null) {
|
|
219
219
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
|
220
220
|
return handleError(err, callback)
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
|
|
223
|
+
let { method, body, repository, ...querystring } = params
|
|
224
224
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
225
225
|
|
|
226
|
-
|
|
226
|
+
let path = ''
|
|
227
227
|
if (method == null) method = 'DELETE'
|
|
228
228
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
|
|
229
229
|
|
|
@@ -242,25 +242,25 @@ SnapshotApi.prototype.get = function snapshotGetApi (params, options, callback)
|
|
|
242
242
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
243
243
|
|
|
244
244
|
// check required parameters
|
|
245
|
-
if (params
|
|
245
|
+
if (params.repository == null) {
|
|
246
246
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
|
247
247
|
return handleError(err, callback)
|
|
248
248
|
}
|
|
249
|
-
if (params
|
|
249
|
+
if (params.snapshot == null) {
|
|
250
250
|
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
|
251
251
|
return handleError(err, callback)
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
// check required url components
|
|
255
|
-
if (params
|
|
255
|
+
if (params.snapshot != null && (params.repository == null)) {
|
|
256
256
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
|
257
257
|
return handleError(err, callback)
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
|
|
260
|
+
let { method, body, repository, snapshot, ...querystring } = params
|
|
261
261
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
262
262
|
|
|
263
|
-
|
|
263
|
+
let path = ''
|
|
264
264
|
if (method == null) method = 'GET'
|
|
265
265
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
|
266
266
|
|
|
@@ -278,10 +278,10 @@ SnapshotApi.prototype.get = function snapshotGetApi (params, options, callback)
|
|
|
278
278
|
SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi (params, options, callback) {
|
|
279
279
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
let { method, body, repository, ...querystring } = params
|
|
282
282
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
283
283
|
|
|
284
|
-
|
|
284
|
+
let path = ''
|
|
285
285
|
if ((repository) != null) {
|
|
286
286
|
if (method == null) method = 'GET'
|
|
287
287
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
|
|
@@ -301,29 +301,56 @@ SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi (params,
|
|
|
301
301
|
return this.transport.request(request, options, callback)
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
+
SnapshotApi.prototype.repositoryAnalyze = function snapshotRepositoryAnalyzeApi (params, options, callback) {
|
|
305
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
306
|
+
|
|
307
|
+
// check required parameters
|
|
308
|
+
if (params.repository == null) {
|
|
309
|
+
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
|
310
|
+
return handleError(err, callback)
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
let { method, body, repository, ...querystring } = params
|
|
314
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
315
|
+
|
|
316
|
+
let path = ''
|
|
317
|
+
if (method == null) method = 'POST'
|
|
318
|
+
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_analyze'
|
|
319
|
+
|
|
320
|
+
// build request object
|
|
321
|
+
const request = {
|
|
322
|
+
method,
|
|
323
|
+
path,
|
|
324
|
+
body: body || '',
|
|
325
|
+
querystring
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
return this.transport.request(request, options, callback)
|
|
329
|
+
}
|
|
330
|
+
|
|
304
331
|
SnapshotApi.prototype.restore = function snapshotRestoreApi (params, options, callback) {
|
|
305
332
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
306
333
|
|
|
307
334
|
// check required parameters
|
|
308
|
-
if (params
|
|
335
|
+
if (params.repository == null) {
|
|
309
336
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
|
310
337
|
return handleError(err, callback)
|
|
311
338
|
}
|
|
312
|
-
if (params
|
|
339
|
+
if (params.snapshot == null) {
|
|
313
340
|
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
|
314
341
|
return handleError(err, callback)
|
|
315
342
|
}
|
|
316
343
|
|
|
317
344
|
// check required url components
|
|
318
|
-
if (params
|
|
345
|
+
if (params.snapshot != null && (params.repository == null)) {
|
|
319
346
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
|
320
347
|
return handleError(err, callback)
|
|
321
348
|
}
|
|
322
349
|
|
|
323
|
-
|
|
350
|
+
let { method, body, repository, snapshot, ...querystring } = params
|
|
324
351
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
325
352
|
|
|
326
|
-
|
|
353
|
+
let path = ''
|
|
327
354
|
if (method == null) method = 'POST'
|
|
328
355
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_restore'
|
|
329
356
|
|
|
@@ -342,15 +369,15 @@ SnapshotApi.prototype.status = function snapshotStatusApi (params, options, call
|
|
|
342
369
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
343
370
|
|
|
344
371
|
// check required url components
|
|
345
|
-
if (params
|
|
372
|
+
if (params.snapshot != null && (params.repository == null)) {
|
|
346
373
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
|
347
374
|
return handleError(err, callback)
|
|
348
375
|
}
|
|
349
376
|
|
|
350
|
-
|
|
377
|
+
let { method, body, repository, snapshot, ...querystring } = params
|
|
351
378
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
352
379
|
|
|
353
|
-
|
|
380
|
+
let path = ''
|
|
354
381
|
if ((repository) != null && (snapshot) != null) {
|
|
355
382
|
if (method == null) method = 'GET'
|
|
356
383
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_status'
|
|
@@ -377,15 +404,15 @@ SnapshotApi.prototype.verifyRepository = function snapshotVerifyRepositoryApi (p
|
|
|
377
404
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
378
405
|
|
|
379
406
|
// check required parameters
|
|
380
|
-
if (params
|
|
407
|
+
if (params.repository == null) {
|
|
381
408
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
|
382
409
|
return handleError(err, callback)
|
|
383
410
|
}
|
|
384
411
|
|
|
385
|
-
|
|
412
|
+
let { method, body, repository, ...querystring } = params
|
|
386
413
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
387
414
|
|
|
388
|
-
|
|
415
|
+
let path = ''
|
|
389
416
|
if (method == null) method = 'POST'
|
|
390
417
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_verify'
|
|
391
418
|
|
|
@@ -405,6 +432,7 @@ Object.defineProperties(SnapshotApi.prototype, {
|
|
|
405
432
|
create_repository: { get () { return this.createRepository } },
|
|
406
433
|
delete_repository: { get () { return this.deleteRepository } },
|
|
407
434
|
get_repository: { get () { return this.getRepository } },
|
|
435
|
+
repository_analyze: { get () { return this.repositoryAnalyze } },
|
|
408
436
|
verify_repository: { get () { return this.verifyRepository } }
|
|
409
437
|
})
|
|
410
438
|
|