@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.
Files changed (97) hide show
  1. package/README.md +4 -2
  2. package/api/api/async_search.js +11 -11
  3. package/api/api/autoscaling.js +12 -12
  4. package/api/api/bulk.js +4 -4
  5. package/api/api/cat.js +127 -127
  6. package/api/api/ccr.js +40 -40
  7. package/api/api/clear_scroll.js +2 -2
  8. package/api/api/close_point_in_time.js +2 -2
  9. package/api/api/cluster.js +36 -36
  10. package/api/api/count.js +3 -3
  11. package/api/api/create.js +5 -5
  12. package/api/api/dangling_indices.js +8 -8
  13. package/api/api/delete.js +4 -4
  14. package/api/api/delete_by_query.js +5 -5
  15. package/api/api/delete_by_query_rethrottle.js +4 -4
  16. package/api/api/delete_script.js +3 -3
  17. package/api/api/enrich.js +14 -14
  18. package/api/api/eql.js +41 -10
  19. package/api/api/exists.js +4 -4
  20. package/api/api/exists_source.js +6 -6
  21. package/api/api/explain.js +4 -4
  22. package/api/api/features.js +81 -0
  23. package/api/api/field_caps.js +2 -2
  24. package/api/api/fleet.js +65 -0
  25. package/api/api/get.js +4 -4
  26. package/api/api/get_script.js +3 -3
  27. package/api/api/get_script_context.js +2 -2
  28. package/api/api/get_script_languages.js +2 -2
  29. package/api/api/get_source.js +4 -4
  30. package/api/api/graph.js +4 -4
  31. package/api/api/ilm.js +50 -28
  32. package/api/api/index.js +4 -4
  33. package/api/api/indices.js +381 -381
  34. package/api/api/info.js +2 -2
  35. package/api/api/ingest.js +37 -15
  36. package/api/api/license.js +14 -14
  37. package/api/api/logstash.js +125 -0
  38. package/api/api/mget.js +4 -4
  39. package/api/api/migration.js +2 -2
  40. package/api/api/ml.js +338 -208
  41. package/api/api/monitoring.js +3 -3
  42. package/api/api/msearch.js +4 -4
  43. package/api/api/msearch_template.js +4 -4
  44. package/api/api/mtermvectors.js +3 -3
  45. package/api/api/nodes.js +12 -12
  46. package/api/api/open_point_in_time.js +2 -2
  47. package/api/api/ping.js +2 -2
  48. package/api/api/put_script.js +5 -5
  49. package/api/api/rank_eval.js +3 -3
  50. package/api/api/reindex.js +3 -3
  51. package/api/api/reindex_rethrottle.js +4 -4
  52. package/api/api/render_search_template.js +2 -2
  53. package/api/api/rollup.js +31 -31
  54. package/api/api/scripts_painless_execute.js +2 -2
  55. package/api/api/scroll.js +2 -2
  56. package/api/api/search.js +5 -5
  57. package/api/api/search_shards.js +2 -2
  58. package/api/api/search_template.js +4 -4
  59. package/api/api/searchable_snapshots.js +42 -15
  60. package/api/api/security.js +464 -86
  61. package/api/api/shutdown.js +124 -0
  62. package/api/api/slm.js +21 -21
  63. package/api/api/snapshot.js +76 -48
  64. package/api/api/sql.js +96 -12
  65. package/api/api/ssl.js +2 -2
  66. package/api/api/tasks.js +7 -7
  67. package/api/api/terms_enum.js +56 -0
  68. package/api/api/termvectors.js +3 -3
  69. package/api/api/text_structure.js +65 -0
  70. package/api/api/transform.js +25 -25
  71. package/api/api/update.js +5 -5
  72. package/api/api/update_by_query.js +4 -4
  73. package/api/api/update_by_query_rethrottle.js +4 -4
  74. package/api/api/watcher.js +29 -29
  75. package/api/api/xpack.js +4 -4
  76. package/api/index.js +179 -120
  77. package/api/new.d.ts +1584 -0
  78. package/api/requestParams.d.ts +203 -7
  79. package/api/types.d.ts +15455 -0
  80. package/api/utils.js +4 -4
  81. package/free-report-junit.xml +3410 -0
  82. package/index.d.ts +326 -23
  83. package/index.js +28 -36
  84. package/lib/Connection.js +6 -4
  85. package/lib/Helpers.d.ts +4 -2
  86. package/lib/Helpers.js +31 -17
  87. package/lib/Serializer.d.ts +5 -0
  88. package/lib/Serializer.js +17 -6
  89. package/lib/Transport.d.ts +4 -2
  90. package/lib/Transport.js +194 -79
  91. package/lib/errors.d.ts +7 -0
  92. package/lib/errors.js +26 -2
  93. package/lib/pool/BaseConnectionPool.js +3 -3
  94. package/lib/pool/ConnectionPool.js +4 -5
  95. package/lib/pool/index.d.ts +5 -0
  96. package/package.json +26 -26
  97. 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['policy_id'] == null && params['policyId'] == null) {
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
- var { method, body, policyId, policy_id, ...querystring } = params
43
+ let { method, body, policyId, policy_id, ...querystring } = params
44
44
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
45
45
 
46
- var path = ''
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['policy_id'] == null && params['policyId'] == null) {
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
- var { method, body, policyId, policy_id, ...querystring } = params
70
+ let { method, body, policyId, policy_id, ...querystring } = params
71
71
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
72
72
 
73
- var path = ''
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
- var { method, body, ...querystring } = params
91
+ let { method, body, ...querystring } = params
92
92
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
93
93
 
94
- var path = ''
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
- var { method, body, policyId, policy_id, ...querystring } = params
112
+ let { method, body, policyId, policy_id, ...querystring } = params
113
113
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
114
114
 
115
- var path = ''
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
- var { method, body, ...querystring } = params
138
+ let { method, body, ...querystring } = params
139
139
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
140
140
 
141
- var path = ''
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
- var { method, body, ...querystring } = params
159
+ let { method, body, ...querystring } = params
160
160
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
161
161
 
162
- var path = ''
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['policy_id'] == null && params['policyId'] == null) {
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
- var { method, body, policyId, policy_id, ...querystring } = params
186
+ let { method, body, policyId, policy_id, ...querystring } = params
187
187
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
188
188
 
189
- var path = ''
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
- var { method, body, ...querystring } = params
207
+ let { method, body, ...querystring } = params
208
208
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
209
209
 
210
- var path = ''
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
- var { method, body, ...querystring } = params
228
+ let { method, body, ...querystring } = params
229
229
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
230
230
 
231
- var path = ''
231
+ let path = ''
232
232
  if (method == null) method = 'POST'
233
233
  path = '/' + '_slm' + '/' + 'stop'
234
234
 
@@ -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['repository'] == null) {
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
- var { method, body, repository, ...querystring } = params
43
+ let { method, body, repository, ...querystring } = params
44
44
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
45
45
 
46
- var path = ''
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['repository'] == null) {
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['snapshot'] == null) {
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['target_snapshot'] == null && params['targetSnapshot'] == null) {
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['body'] == null) {
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['target_snapshot'] != null || params['targetSnapshot'] != null) && (params['snapshot'] == null || params['repository'] == null)) {
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['snapshot'] != null && (params['repository'] == null)) {
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
- var { method, body, repository, snapshot, targetSnapshot, target_snapshot, ...querystring } = params
91
+ let { method, body, repository, snapshot, targetSnapshot, target_snapshot, ...querystring } = params
92
92
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
93
93
 
94
- var path = ''
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['repository'] == null) {
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['snapshot'] == null) {
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['snapshot'] != null && (params['repository'] == null)) {
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
- var { method, body, repository, snapshot, ...querystring } = params
128
+ let { method, body, repository, snapshot, ...querystring } = params
129
129
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
130
130
 
131
- var path = ''
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['repository'] == null) {
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['body'] == null) {
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
- var { method, body, repository, ...querystring } = params
159
+ let { method, body, repository, ...querystring } = params
160
160
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
161
161
 
162
- var path = ''
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['repository'] == null) {
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['snapshot'] == null) {
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['snapshot'] != null && (params['repository'] == null)) {
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
- var { method, body, repository, snapshot, ...querystring } = params
196
+ let { method, body, repository, snapshot, ...querystring } = params
197
197
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
198
198
 
199
- var path = ''
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['repository'] == null) {
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
- var { method, body, repository, ...querystring } = params
223
+ let { method, body, repository, ...querystring } = params
224
224
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
225
225
 
226
- var path = ''
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['repository'] == null) {
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['snapshot'] == null) {
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['snapshot'] != null && (params['repository'] == null)) {
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
- var { method, body, repository, snapshot, ...querystring } = params
260
+ let { method, body, repository, snapshot, ...querystring } = params
261
261
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
262
262
 
263
- var path = ''
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
- var { method, body, repository, ...querystring } = params
281
+ let { method, body, repository, ...querystring } = params
282
282
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
283
283
 
284
- var path = ''
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['repository'] == null) {
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['snapshot'] == null) {
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['snapshot'] != null && (params['repository'] == null)) {
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
- var { method, body, repository, snapshot, ...querystring } = params
350
+ let { method, body, repository, snapshot, ...querystring } = params
324
351
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
325
352
 
326
- var path = ''
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['snapshot'] != null && (params['repository'] == null)) {
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
- var { method, body, repository, snapshot, ...querystring } = params
377
+ let { method, body, repository, snapshot, ...querystring } = params
351
378
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
352
379
 
353
- var path = ''
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['repository'] == null) {
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
- var { method, body, repository, ...querystring } = params
412
+ let { method, body, repository, ...querystring } = params
386
413
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
387
414
 
388
- var path = ''
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