@elastic/elasticsearch 7.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +5 -0
- package/LICENSE +202 -0
- package/README.md +232 -0
- package/api/api/async_search.js +141 -0
- package/api/api/autoscaling.js +147 -0
- package/api/api/bulk.js +70 -0
- package/api/api/cat.js +648 -0
- package/api/api/ccr.js +403 -0
- package/api/api/clear_scroll.js +55 -0
- package/api/api/close_point_in_time.js +50 -0
- package/api/api/cluster.js +420 -0
- package/api/api/count.js +64 -0
- package/api/api/create.js +69 -0
- package/api/api/dangling_indices.js +115 -0
- package/api/api/delete.js +65 -0
- package/api/api/delete_by_query.js +71 -0
- package/api/api/delete_by_query_rethrottle.js +60 -0
- package/api/api/delete_script.js +56 -0
- package/api/api/enrich.js +173 -0
- package/api/api/eql.js +150 -0
- package/api/api/exists.js +65 -0
- package/api/api/exists_source.js +74 -0
- package/api/api/explain.js +65 -0
- package/api/api/features.js +81 -0
- package/api/api/field_caps.js +55 -0
- package/api/api/fleet.js +65 -0
- package/api/api/get.js +65 -0
- package/api/api/get_script.js +56 -0
- package/api/api/get_script_context.js +50 -0
- package/api/api/get_script_languages.js +50 -0
- package/api/api/get_source.js +65 -0
- package/api/api/graph.js +72 -0
- package/api/api/ilm.js +317 -0
- package/api/api/index.js +71 -0
- package/api/api/indices.js +1753 -0
- package/api/api/info.js +50 -0
- package/api/api/ingest.js +200 -0
- package/api/api/license.js +188 -0
- package/api/api/logstash.js +125 -0
- package/api/api/mget.js +70 -0
- package/api/api/migration.js +60 -0
- package/api/api/ml.js +2010 -0
- package/api/api/monitoring.js +66 -0
- package/api/api/msearch.js +70 -0
- package/api/api/msearch_template.js +70 -0
- package/api/api/mtermvectors.js +64 -0
- package/api/api/nodes.js +268 -0
- package/api/api/open_point_in_time.js +56 -0
- package/api/api/ping.js +50 -0
- package/api/api/put_script.js +71 -0
- package/api/api/rank_eval.js +61 -0
- package/api/api/reindex.js +56 -0
- package/api/api/reindex_rethrottle.js +60 -0
- package/api/api/render_search_template.js +55 -0
- package/api/api/rollup.js +319 -0
- package/api/api/scripts_painless_execute.js +50 -0
- package/api/api/scroll.js +55 -0
- package/api/api/search.js +64 -0
- package/api/api/search_mvt.js +87 -0
- package/api/api/search_shards.js +55 -0
- package/api/api/search_template.js +70 -0
- package/api/api/searchable_snapshots.js +186 -0
- package/api/api/security.js +1261 -0
- package/api/api/shutdown.js +124 -0
- package/api/api/slm.js +256 -0
- package/api/api/snapshot.js +439 -0
- package/api/api/sql.js +203 -0
- package/api/api/ssl.js +55 -0
- package/api/api/tasks.js +108 -0
- package/api/api/terms_enum.js +56 -0
- package/api/api/termvectors.js +67 -0
- package/api/api/text_structure.js +65 -0
- package/api/api/transform.js +268 -0
- package/api/api/update.js +69 -0
- package/api/api/update_by_query.js +67 -0
- package/api/api/update_by_query_rethrottle.js +60 -0
- package/api/api/watcher.js +333 -0
- package/api/api/xpack.js +76 -0
- package/api/index.js +508 -0
- package/api/new.d.ts +1585 -0
- package/api/requestParams.d.ts +2920 -0
- package/api/types.d.ts +15420 -0
- package/api/utils.js +58 -0
- package/codecov.yml +14 -0
- package/index.d.ts +2991 -0
- package/index.js +349 -0
- package/index.mjs +29 -0
- package/lib/Connection.d.ts +99 -0
- package/lib/Connection.js +392 -0
- package/lib/Helpers.d.ts +124 -0
- package/lib/Helpers.js +770 -0
- package/lib/Serializer.d.ts +30 -0
- package/lib/Serializer.js +94 -0
- package/lib/Transport.d.ts +162 -0
- package/lib/Transport.js +689 -0
- package/lib/errors.d.ts +90 -0
- package/lib/errors.js +159 -0
- package/lib/pool/BaseConnectionPool.js +262 -0
- package/lib/pool/CloudConnectionPool.js +64 -0
- package/lib/pool/ConnectionPool.js +246 -0
- package/lib/pool/index.d.ts +220 -0
- package/lib/pool/index.js +30 -0
- package/package.json +106 -0
|
@@ -0,0 +1,1261 @@
|
|
|
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', 'refresh', 'usernames', 'id', 'name', 'username', 'realm_name', 'owner']
|
|
27
|
+
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', realmName: 'realm_name' }
|
|
28
|
+
|
|
29
|
+
function SecurityApi (transport, ConfigurationError) {
|
|
30
|
+
this.transport = transport
|
|
31
|
+
this[kConfigurationError] = ConfigurationError
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
SecurityApi.prototype.authenticate = function securityAuthenticateApi (params, options, callback) {
|
|
35
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
|
+
|
|
37
|
+
let { method, body, ...querystring } = params
|
|
38
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
39
|
+
|
|
40
|
+
let path = ''
|
|
41
|
+
if (method == null) method = 'GET'
|
|
42
|
+
path = '/' + '_security' + '/' + '_authenticate'
|
|
43
|
+
|
|
44
|
+
// build request object
|
|
45
|
+
const request = {
|
|
46
|
+
method,
|
|
47
|
+
path,
|
|
48
|
+
body: null,
|
|
49
|
+
querystring
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return this.transport.request(request, options, callback)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
SecurityApi.prototype.changePassword = function securityChangePasswordApi (params, options, callback) {
|
|
56
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
57
|
+
|
|
58
|
+
// check required parameters
|
|
59
|
+
if (params.body == null) {
|
|
60
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
61
|
+
return handleError(err, callback)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
let { method, body, username, ...querystring } = params
|
|
65
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
66
|
+
|
|
67
|
+
let path = ''
|
|
68
|
+
if ((username) != null) {
|
|
69
|
+
if (method == null) method = 'PUT'
|
|
70
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_password'
|
|
71
|
+
} else {
|
|
72
|
+
if (method == null) method = 'PUT'
|
|
73
|
+
path = '/' + '_security' + '/' + 'user' + '/' + '_password'
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// build request object
|
|
77
|
+
const request = {
|
|
78
|
+
method,
|
|
79
|
+
path,
|
|
80
|
+
body: body || '',
|
|
81
|
+
querystring
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return this.transport.request(request, options, callback)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
SecurityApi.prototype.clearApiKeyCache = function securityClearApiKeyCacheApi (params, options, callback) {
|
|
88
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
89
|
+
|
|
90
|
+
// check required parameters
|
|
91
|
+
if (params.ids == null) {
|
|
92
|
+
const err = new this[kConfigurationError]('Missing required parameter: ids')
|
|
93
|
+
return handleError(err, callback)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
let { method, body, ids, ...querystring } = params
|
|
97
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
98
|
+
|
|
99
|
+
let path = ''
|
|
100
|
+
if (method == null) method = 'POST'
|
|
101
|
+
path = '/' + '_security' + '/' + 'api_key' + '/' + encodeURIComponent(ids) + '/' + '_clear_cache'
|
|
102
|
+
|
|
103
|
+
// build request object
|
|
104
|
+
const request = {
|
|
105
|
+
method,
|
|
106
|
+
path,
|
|
107
|
+
body: body || '',
|
|
108
|
+
querystring
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return this.transport.request(request, options, callback)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
SecurityApi.prototype.clearCachedPrivileges = function securityClearCachedPrivilegesApi (params, options, callback) {
|
|
115
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
116
|
+
|
|
117
|
+
// check required parameters
|
|
118
|
+
if (params.application == null) {
|
|
119
|
+
const err = new this[kConfigurationError]('Missing required parameter: application')
|
|
120
|
+
return handleError(err, callback)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
let { method, body, application, ...querystring } = params
|
|
124
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
125
|
+
|
|
126
|
+
let path = ''
|
|
127
|
+
if (method == null) method = 'POST'
|
|
128
|
+
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + '_clear_cache'
|
|
129
|
+
|
|
130
|
+
// build request object
|
|
131
|
+
const request = {
|
|
132
|
+
method,
|
|
133
|
+
path,
|
|
134
|
+
body: body || '',
|
|
135
|
+
querystring
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return this.transport.request(request, options, callback)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
SecurityApi.prototype.clearCachedRealms = function securityClearCachedRealmsApi (params, options, callback) {
|
|
142
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
143
|
+
|
|
144
|
+
// check required parameters
|
|
145
|
+
if (params.realms == null) {
|
|
146
|
+
const err = new this[kConfigurationError]('Missing required parameter: realms')
|
|
147
|
+
return handleError(err, callback)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
let { method, body, realms, ...querystring } = params
|
|
151
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
152
|
+
|
|
153
|
+
let path = ''
|
|
154
|
+
if (method == null) method = 'POST'
|
|
155
|
+
path = '/' + '_security' + '/' + 'realm' + '/' + encodeURIComponent(realms) + '/' + '_clear_cache'
|
|
156
|
+
|
|
157
|
+
// build request object
|
|
158
|
+
const request = {
|
|
159
|
+
method,
|
|
160
|
+
path,
|
|
161
|
+
body: body || '',
|
|
162
|
+
querystring
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return this.transport.request(request, options, callback)
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
SecurityApi.prototype.clearCachedRoles = function securityClearCachedRolesApi (params, options, callback) {
|
|
169
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
170
|
+
|
|
171
|
+
// check required parameters
|
|
172
|
+
if (params.name == null) {
|
|
173
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
174
|
+
return handleError(err, callback)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
let { method, body, name, ...querystring } = params
|
|
178
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
179
|
+
|
|
180
|
+
let path = ''
|
|
181
|
+
if (method == null) method = 'POST'
|
|
182
|
+
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name) + '/' + '_clear_cache'
|
|
183
|
+
|
|
184
|
+
// build request object
|
|
185
|
+
const request = {
|
|
186
|
+
method,
|
|
187
|
+
path,
|
|
188
|
+
body: body || '',
|
|
189
|
+
querystring
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return this.transport.request(request, options, callback)
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
SecurityApi.prototype.clearCachedServiceTokens = function securityClearCachedServiceTokensApi (params, options, callback) {
|
|
196
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
197
|
+
|
|
198
|
+
// check required parameters
|
|
199
|
+
if (params.namespace == null) {
|
|
200
|
+
const err = new this[kConfigurationError]('Missing required parameter: namespace')
|
|
201
|
+
return handleError(err, callback)
|
|
202
|
+
}
|
|
203
|
+
if (params.service == null) {
|
|
204
|
+
const err = new this[kConfigurationError]('Missing required parameter: service')
|
|
205
|
+
return handleError(err, callback)
|
|
206
|
+
}
|
|
207
|
+
if (params.name == null) {
|
|
208
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
209
|
+
return handleError(err, callback)
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// check required url components
|
|
213
|
+
if (params.name != null && (params.service == null || params.namespace == null)) {
|
|
214
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: service, namespace')
|
|
215
|
+
return handleError(err, callback)
|
|
216
|
+
} else if (params.service != null && (params.namespace == null)) {
|
|
217
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
|
|
218
|
+
return handleError(err, callback)
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
let { method, body, namespace, service, name, ...querystring } = params
|
|
222
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
223
|
+
|
|
224
|
+
let path = ''
|
|
225
|
+
if (method == null) method = 'POST'
|
|
226
|
+
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential' + '/' + 'token' + '/' + encodeURIComponent(name) + '/' + '_clear_cache'
|
|
227
|
+
|
|
228
|
+
// build request object
|
|
229
|
+
const request = {
|
|
230
|
+
method,
|
|
231
|
+
path,
|
|
232
|
+
body: body || '',
|
|
233
|
+
querystring
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return this.transport.request(request, options, callback)
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
SecurityApi.prototype.createApiKey = function securityCreateApiKeyApi (params, options, callback) {
|
|
240
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
241
|
+
|
|
242
|
+
// check required parameters
|
|
243
|
+
if (params.body == null) {
|
|
244
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
245
|
+
return handleError(err, callback)
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
let { method, body, ...querystring } = params
|
|
249
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
250
|
+
|
|
251
|
+
let path = ''
|
|
252
|
+
if (method == null) method = 'PUT'
|
|
253
|
+
path = '/' + '_security' + '/' + 'api_key'
|
|
254
|
+
|
|
255
|
+
// build request object
|
|
256
|
+
const request = {
|
|
257
|
+
method,
|
|
258
|
+
path,
|
|
259
|
+
body: body || '',
|
|
260
|
+
querystring
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return this.transport.request(request, options, callback)
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
SecurityApi.prototype.createServiceToken = function securityCreateServiceTokenApi (params, options, callback) {
|
|
267
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
268
|
+
|
|
269
|
+
// check required parameters
|
|
270
|
+
if (params.namespace == null) {
|
|
271
|
+
const err = new this[kConfigurationError]('Missing required parameter: namespace')
|
|
272
|
+
return handleError(err, callback)
|
|
273
|
+
}
|
|
274
|
+
if (params.service == null) {
|
|
275
|
+
const err = new this[kConfigurationError]('Missing required parameter: service')
|
|
276
|
+
return handleError(err, callback)
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// check required url components
|
|
280
|
+
if (params.name != null && (params.service == null || params.namespace == null)) {
|
|
281
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: service, namespace')
|
|
282
|
+
return handleError(err, callback)
|
|
283
|
+
} else if (params.service != null && (params.namespace == null)) {
|
|
284
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
|
|
285
|
+
return handleError(err, callback)
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
let { method, body, namespace, service, name, ...querystring } = params
|
|
289
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
290
|
+
|
|
291
|
+
let path = ''
|
|
292
|
+
if ((namespace) != null && (service) != null && (name) != null) {
|
|
293
|
+
if (method == null) method = 'PUT'
|
|
294
|
+
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential' + '/' + 'token' + '/' + encodeURIComponent(name)
|
|
295
|
+
} else {
|
|
296
|
+
if (method == null) method = 'POST'
|
|
297
|
+
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential' + '/' + 'token'
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// build request object
|
|
301
|
+
const request = {
|
|
302
|
+
method,
|
|
303
|
+
path,
|
|
304
|
+
body: body || '',
|
|
305
|
+
querystring
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
return this.transport.request(request, options, callback)
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
SecurityApi.prototype.deletePrivileges = function securityDeletePrivilegesApi (params, options, callback) {
|
|
312
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
313
|
+
|
|
314
|
+
// check required parameters
|
|
315
|
+
if (params.application == null) {
|
|
316
|
+
const err = new this[kConfigurationError]('Missing required parameter: application')
|
|
317
|
+
return handleError(err, callback)
|
|
318
|
+
}
|
|
319
|
+
if (params.name == null) {
|
|
320
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
321
|
+
return handleError(err, callback)
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// check required url components
|
|
325
|
+
if (params.name != null && (params.application == null)) {
|
|
326
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: application')
|
|
327
|
+
return handleError(err, callback)
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
let { method, body, application, name, ...querystring } = params
|
|
331
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
332
|
+
|
|
333
|
+
let path = ''
|
|
334
|
+
if (method == null) method = 'DELETE'
|
|
335
|
+
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
|
|
336
|
+
|
|
337
|
+
// build request object
|
|
338
|
+
const request = {
|
|
339
|
+
method,
|
|
340
|
+
path,
|
|
341
|
+
body: body || '',
|
|
342
|
+
querystring
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
return this.transport.request(request, options, callback)
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
SecurityApi.prototype.deleteRole = function securityDeleteRoleApi (params, options, callback) {
|
|
349
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
350
|
+
|
|
351
|
+
// check required parameters
|
|
352
|
+
if (params.name == null) {
|
|
353
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
354
|
+
return handleError(err, callback)
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
let { method, body, name, ...querystring } = params
|
|
358
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
359
|
+
|
|
360
|
+
let path = ''
|
|
361
|
+
if (method == null) method = 'DELETE'
|
|
362
|
+
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
|
363
|
+
|
|
364
|
+
// build request object
|
|
365
|
+
const request = {
|
|
366
|
+
method,
|
|
367
|
+
path,
|
|
368
|
+
body: body || '',
|
|
369
|
+
querystring
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
return this.transport.request(request, options, callback)
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
SecurityApi.prototype.deleteRoleMapping = function securityDeleteRoleMappingApi (params, options, callback) {
|
|
376
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
377
|
+
|
|
378
|
+
// check required parameters
|
|
379
|
+
if (params.name == null) {
|
|
380
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
381
|
+
return handleError(err, callback)
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
let { method, body, name, ...querystring } = params
|
|
385
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
386
|
+
|
|
387
|
+
let path = ''
|
|
388
|
+
if (method == null) method = 'DELETE'
|
|
389
|
+
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
|
390
|
+
|
|
391
|
+
// build request object
|
|
392
|
+
const request = {
|
|
393
|
+
method,
|
|
394
|
+
path,
|
|
395
|
+
body: body || '',
|
|
396
|
+
querystring
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
return this.transport.request(request, options, callback)
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
SecurityApi.prototype.deleteServiceToken = function securityDeleteServiceTokenApi (params, options, callback) {
|
|
403
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
404
|
+
|
|
405
|
+
// check required parameters
|
|
406
|
+
if (params.namespace == null) {
|
|
407
|
+
const err = new this[kConfigurationError]('Missing required parameter: namespace')
|
|
408
|
+
return handleError(err, callback)
|
|
409
|
+
}
|
|
410
|
+
if (params.service == null) {
|
|
411
|
+
const err = new this[kConfigurationError]('Missing required parameter: service')
|
|
412
|
+
return handleError(err, callback)
|
|
413
|
+
}
|
|
414
|
+
if (params.name == null) {
|
|
415
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
416
|
+
return handleError(err, callback)
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// check required url components
|
|
420
|
+
if (params.name != null && (params.service == null || params.namespace == null)) {
|
|
421
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: service, namespace')
|
|
422
|
+
return handleError(err, callback)
|
|
423
|
+
} else if (params.service != null && (params.namespace == null)) {
|
|
424
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
|
|
425
|
+
return handleError(err, callback)
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
let { method, body, namespace, service, name, ...querystring } = params
|
|
429
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
430
|
+
|
|
431
|
+
let path = ''
|
|
432
|
+
if (method == null) method = 'DELETE'
|
|
433
|
+
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential' + '/' + 'token' + '/' + encodeURIComponent(name)
|
|
434
|
+
|
|
435
|
+
// build request object
|
|
436
|
+
const request = {
|
|
437
|
+
method,
|
|
438
|
+
path,
|
|
439
|
+
body: body || '',
|
|
440
|
+
querystring
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
return this.transport.request(request, options, callback)
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
SecurityApi.prototype.deleteUser = function securityDeleteUserApi (params, options, callback) {
|
|
447
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
448
|
+
|
|
449
|
+
// check required parameters
|
|
450
|
+
if (params.username == null) {
|
|
451
|
+
const err = new this[kConfigurationError]('Missing required parameter: username')
|
|
452
|
+
return handleError(err, callback)
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
let { method, body, username, ...querystring } = params
|
|
456
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
457
|
+
|
|
458
|
+
let path = ''
|
|
459
|
+
if (method == null) method = 'DELETE'
|
|
460
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
|
461
|
+
|
|
462
|
+
// build request object
|
|
463
|
+
const request = {
|
|
464
|
+
method,
|
|
465
|
+
path,
|
|
466
|
+
body: body || '',
|
|
467
|
+
querystring
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
return this.transport.request(request, options, callback)
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
SecurityApi.prototype.disableUser = function securityDisableUserApi (params, options, callback) {
|
|
474
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
475
|
+
|
|
476
|
+
// check required parameters
|
|
477
|
+
if (params.username == null) {
|
|
478
|
+
const err = new this[kConfigurationError]('Missing required parameter: username')
|
|
479
|
+
return handleError(err, callback)
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
let { method, body, username, ...querystring } = params
|
|
483
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
484
|
+
|
|
485
|
+
let path = ''
|
|
486
|
+
if (method == null) method = 'PUT'
|
|
487
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_disable'
|
|
488
|
+
|
|
489
|
+
// build request object
|
|
490
|
+
const request = {
|
|
491
|
+
method,
|
|
492
|
+
path,
|
|
493
|
+
body: body || '',
|
|
494
|
+
querystring
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
return this.transport.request(request, options, callback)
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
SecurityApi.prototype.enableUser = function securityEnableUserApi (params, options, callback) {
|
|
501
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
502
|
+
|
|
503
|
+
// check required parameters
|
|
504
|
+
if (params.username == null) {
|
|
505
|
+
const err = new this[kConfigurationError]('Missing required parameter: username')
|
|
506
|
+
return handleError(err, callback)
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
let { method, body, username, ...querystring } = params
|
|
510
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
511
|
+
|
|
512
|
+
let path = ''
|
|
513
|
+
if (method == null) method = 'PUT'
|
|
514
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_enable'
|
|
515
|
+
|
|
516
|
+
// build request object
|
|
517
|
+
const request = {
|
|
518
|
+
method,
|
|
519
|
+
path,
|
|
520
|
+
body: body || '',
|
|
521
|
+
querystring
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
return this.transport.request(request, options, callback)
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
SecurityApi.prototype.getApiKey = function securityGetApiKeyApi (params, options, callback) {
|
|
528
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
529
|
+
|
|
530
|
+
let { method, body, ...querystring } = params
|
|
531
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
532
|
+
|
|
533
|
+
let path = ''
|
|
534
|
+
if (method == null) method = 'GET'
|
|
535
|
+
path = '/' + '_security' + '/' + 'api_key'
|
|
536
|
+
|
|
537
|
+
// build request object
|
|
538
|
+
const request = {
|
|
539
|
+
method,
|
|
540
|
+
path,
|
|
541
|
+
body: null,
|
|
542
|
+
querystring
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
return this.transport.request(request, options, callback)
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
SecurityApi.prototype.getBuiltinPrivileges = function securityGetBuiltinPrivilegesApi (params, options, callback) {
|
|
549
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
550
|
+
|
|
551
|
+
let { method, body, ...querystring } = params
|
|
552
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
553
|
+
|
|
554
|
+
let path = ''
|
|
555
|
+
if (method == null) method = 'GET'
|
|
556
|
+
path = '/' + '_security' + '/' + 'privilege' + '/' + '_builtin'
|
|
557
|
+
|
|
558
|
+
// build request object
|
|
559
|
+
const request = {
|
|
560
|
+
method,
|
|
561
|
+
path,
|
|
562
|
+
body: null,
|
|
563
|
+
querystring
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
return this.transport.request(request, options, callback)
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
SecurityApi.prototype.getPrivileges = function securityGetPrivilegesApi (params, options, callback) {
|
|
570
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
571
|
+
|
|
572
|
+
// check required url components
|
|
573
|
+
if (params.name != null && (params.application == null)) {
|
|
574
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: application')
|
|
575
|
+
return handleError(err, callback)
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
let { method, body, application, name, ...querystring } = params
|
|
579
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
580
|
+
|
|
581
|
+
let path = ''
|
|
582
|
+
if ((application) != null && (name) != null) {
|
|
583
|
+
if (method == null) method = 'GET'
|
|
584
|
+
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
|
|
585
|
+
} else if ((application) != null) {
|
|
586
|
+
if (method == null) method = 'GET'
|
|
587
|
+
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application)
|
|
588
|
+
} else {
|
|
589
|
+
if (method == null) method = 'GET'
|
|
590
|
+
path = '/' + '_security' + '/' + 'privilege'
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
// build request object
|
|
594
|
+
const request = {
|
|
595
|
+
method,
|
|
596
|
+
path,
|
|
597
|
+
body: null,
|
|
598
|
+
querystring
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
return this.transport.request(request, options, callback)
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
SecurityApi.prototype.getRole = function securityGetRoleApi (params, options, callback) {
|
|
605
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
606
|
+
|
|
607
|
+
let { method, body, name, ...querystring } = params
|
|
608
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
609
|
+
|
|
610
|
+
let path = ''
|
|
611
|
+
if ((name) != null) {
|
|
612
|
+
if (method == null) method = 'GET'
|
|
613
|
+
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
|
614
|
+
} else {
|
|
615
|
+
if (method == null) method = 'GET'
|
|
616
|
+
path = '/' + '_security' + '/' + 'role'
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
// build request object
|
|
620
|
+
const request = {
|
|
621
|
+
method,
|
|
622
|
+
path,
|
|
623
|
+
body: null,
|
|
624
|
+
querystring
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
return this.transport.request(request, options, callback)
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
SecurityApi.prototype.getRoleMapping = function securityGetRoleMappingApi (params, options, callback) {
|
|
631
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
632
|
+
|
|
633
|
+
let { method, body, name, ...querystring } = params
|
|
634
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
635
|
+
|
|
636
|
+
let path = ''
|
|
637
|
+
if ((name) != null) {
|
|
638
|
+
if (method == null) method = 'GET'
|
|
639
|
+
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
|
640
|
+
} else {
|
|
641
|
+
if (method == null) method = 'GET'
|
|
642
|
+
path = '/' + '_security' + '/' + 'role_mapping'
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
// build request object
|
|
646
|
+
const request = {
|
|
647
|
+
method,
|
|
648
|
+
path,
|
|
649
|
+
body: null,
|
|
650
|
+
querystring
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
return this.transport.request(request, options, callback)
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
SecurityApi.prototype.getServiceAccounts = function securityGetServiceAccountsApi (params, options, callback) {
|
|
657
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
658
|
+
|
|
659
|
+
// check required url components
|
|
660
|
+
if (params.service != null && (params.namespace == null)) {
|
|
661
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
|
|
662
|
+
return handleError(err, callback)
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
let { method, body, namespace, service, ...querystring } = params
|
|
666
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
667
|
+
|
|
668
|
+
let path = ''
|
|
669
|
+
if ((namespace) != null && (service) != null) {
|
|
670
|
+
if (method == null) method = 'GET'
|
|
671
|
+
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service)
|
|
672
|
+
} else if ((namespace) != null) {
|
|
673
|
+
if (method == null) method = 'GET'
|
|
674
|
+
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace)
|
|
675
|
+
} else {
|
|
676
|
+
if (method == null) method = 'GET'
|
|
677
|
+
path = '/' + '_security' + '/' + 'service'
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// build request object
|
|
681
|
+
const request = {
|
|
682
|
+
method,
|
|
683
|
+
path,
|
|
684
|
+
body: null,
|
|
685
|
+
querystring
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
return this.transport.request(request, options, callback)
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
SecurityApi.prototype.getServiceCredentials = function securityGetServiceCredentialsApi (params, options, callback) {
|
|
692
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
693
|
+
|
|
694
|
+
// check required parameters
|
|
695
|
+
if (params.namespace == null) {
|
|
696
|
+
const err = new this[kConfigurationError]('Missing required parameter: namespace')
|
|
697
|
+
return handleError(err, callback)
|
|
698
|
+
}
|
|
699
|
+
if (params.service == null) {
|
|
700
|
+
const err = new this[kConfigurationError]('Missing required parameter: service')
|
|
701
|
+
return handleError(err, callback)
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
// check required url components
|
|
705
|
+
if (params.service != null && (params.namespace == null)) {
|
|
706
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
|
|
707
|
+
return handleError(err, callback)
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
let { method, body, namespace, service, ...querystring } = params
|
|
711
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
712
|
+
|
|
713
|
+
let path = ''
|
|
714
|
+
if (method == null) method = 'GET'
|
|
715
|
+
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential'
|
|
716
|
+
|
|
717
|
+
// build request object
|
|
718
|
+
const request = {
|
|
719
|
+
method,
|
|
720
|
+
path,
|
|
721
|
+
body: null,
|
|
722
|
+
querystring
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
return this.transport.request(request, options, callback)
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
SecurityApi.prototype.getToken = function securityGetTokenApi (params, options, callback) {
|
|
729
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
730
|
+
|
|
731
|
+
// check required parameters
|
|
732
|
+
if (params.body == null) {
|
|
733
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
734
|
+
return handleError(err, callback)
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
let { method, body, ...querystring } = params
|
|
738
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
739
|
+
|
|
740
|
+
let path = ''
|
|
741
|
+
if (method == null) method = 'POST'
|
|
742
|
+
path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
|
|
743
|
+
|
|
744
|
+
// build request object
|
|
745
|
+
const request = {
|
|
746
|
+
method,
|
|
747
|
+
path,
|
|
748
|
+
body: body || '',
|
|
749
|
+
querystring
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
return this.transport.request(request, options, callback)
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
SecurityApi.prototype.getUser = function securityGetUserApi (params, options, callback) {
|
|
756
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
757
|
+
|
|
758
|
+
let { method, body, username, ...querystring } = params
|
|
759
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
760
|
+
|
|
761
|
+
let path = ''
|
|
762
|
+
if ((username) != null) {
|
|
763
|
+
if (method == null) method = 'GET'
|
|
764
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
|
765
|
+
} else {
|
|
766
|
+
if (method == null) method = 'GET'
|
|
767
|
+
path = '/' + '_security' + '/' + 'user'
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
// build request object
|
|
771
|
+
const request = {
|
|
772
|
+
method,
|
|
773
|
+
path,
|
|
774
|
+
body: null,
|
|
775
|
+
querystring
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
return this.transport.request(request, options, callback)
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
SecurityApi.prototype.getUserPrivileges = function securityGetUserPrivilegesApi (params, options, callback) {
|
|
782
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
783
|
+
|
|
784
|
+
let { method, body, ...querystring } = params
|
|
785
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
786
|
+
|
|
787
|
+
let path = ''
|
|
788
|
+
if (method == null) method = 'GET'
|
|
789
|
+
path = '/' + '_security' + '/' + 'user' + '/' + '_privileges'
|
|
790
|
+
|
|
791
|
+
// build request object
|
|
792
|
+
const request = {
|
|
793
|
+
method,
|
|
794
|
+
path,
|
|
795
|
+
body: null,
|
|
796
|
+
querystring
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
return this.transport.request(request, options, callback)
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
SecurityApi.prototype.grantApiKey = function securityGrantApiKeyApi (params, options, callback) {
|
|
803
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
804
|
+
|
|
805
|
+
// check required parameters
|
|
806
|
+
if (params.body == null) {
|
|
807
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
808
|
+
return handleError(err, callback)
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
let { method, body, ...querystring } = params
|
|
812
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
813
|
+
|
|
814
|
+
let path = ''
|
|
815
|
+
if (method == null) method = 'POST'
|
|
816
|
+
path = '/' + '_security' + '/' + 'api_key' + '/' + 'grant'
|
|
817
|
+
|
|
818
|
+
// build request object
|
|
819
|
+
const request = {
|
|
820
|
+
method,
|
|
821
|
+
path,
|
|
822
|
+
body: body || '',
|
|
823
|
+
querystring
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
return this.transport.request(request, options, callback)
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
SecurityApi.prototype.hasPrivileges = function securityHasPrivilegesApi (params, options, callback) {
|
|
830
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
831
|
+
|
|
832
|
+
// check required parameters
|
|
833
|
+
if (params.body == null) {
|
|
834
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
835
|
+
return handleError(err, callback)
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
let { method, body, user, ...querystring } = params
|
|
839
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
840
|
+
|
|
841
|
+
let path = ''
|
|
842
|
+
if ((user) != null) {
|
|
843
|
+
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
844
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(user) + '/' + '_has_privileges'
|
|
845
|
+
} else {
|
|
846
|
+
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
847
|
+
path = '/' + '_security' + '/' + 'user' + '/' + '_has_privileges'
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
// build request object
|
|
851
|
+
const request = {
|
|
852
|
+
method,
|
|
853
|
+
path,
|
|
854
|
+
body: body || '',
|
|
855
|
+
querystring
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
return this.transport.request(request, options, callback)
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
SecurityApi.prototype.invalidateApiKey = function securityInvalidateApiKeyApi (params, options, callback) {
|
|
862
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
863
|
+
|
|
864
|
+
// check required parameters
|
|
865
|
+
if (params.body == null) {
|
|
866
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
867
|
+
return handleError(err, callback)
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
let { method, body, ...querystring } = params
|
|
871
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
872
|
+
|
|
873
|
+
let path = ''
|
|
874
|
+
if (method == null) method = 'DELETE'
|
|
875
|
+
path = '/' + '_security' + '/' + 'api_key'
|
|
876
|
+
|
|
877
|
+
// build request object
|
|
878
|
+
const request = {
|
|
879
|
+
method,
|
|
880
|
+
path,
|
|
881
|
+
body: body || '',
|
|
882
|
+
querystring
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
return this.transport.request(request, options, callback)
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
SecurityApi.prototype.invalidateToken = function securityInvalidateTokenApi (params, options, callback) {
|
|
889
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
890
|
+
|
|
891
|
+
// check required parameters
|
|
892
|
+
if (params.body == null) {
|
|
893
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
894
|
+
return handleError(err, callback)
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
let { method, body, ...querystring } = params
|
|
898
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
899
|
+
|
|
900
|
+
let path = ''
|
|
901
|
+
if (method == null) method = 'DELETE'
|
|
902
|
+
path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
|
|
903
|
+
|
|
904
|
+
// build request object
|
|
905
|
+
const request = {
|
|
906
|
+
method,
|
|
907
|
+
path,
|
|
908
|
+
body: body || '',
|
|
909
|
+
querystring
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
return this.transport.request(request, options, callback)
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
SecurityApi.prototype.putPrivileges = function securityPutPrivilegesApi (params, options, callback) {
|
|
916
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
917
|
+
|
|
918
|
+
// check required parameters
|
|
919
|
+
if (params.body == null) {
|
|
920
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
921
|
+
return handleError(err, callback)
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
let { method, body, ...querystring } = params
|
|
925
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
926
|
+
|
|
927
|
+
let path = ''
|
|
928
|
+
if (method == null) method = 'PUT'
|
|
929
|
+
path = '/' + '_security' + '/' + 'privilege'
|
|
930
|
+
|
|
931
|
+
// build request object
|
|
932
|
+
const request = {
|
|
933
|
+
method,
|
|
934
|
+
path,
|
|
935
|
+
body: body || '',
|
|
936
|
+
querystring
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
return this.transport.request(request, options, callback)
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
SecurityApi.prototype.putRole = function securityPutRoleApi (params, options, callback) {
|
|
943
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
944
|
+
|
|
945
|
+
// check required parameters
|
|
946
|
+
if (params.name == null) {
|
|
947
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
948
|
+
return handleError(err, callback)
|
|
949
|
+
}
|
|
950
|
+
if (params.body == null) {
|
|
951
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
952
|
+
return handleError(err, callback)
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
let { method, body, name, ...querystring } = params
|
|
956
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
957
|
+
|
|
958
|
+
let path = ''
|
|
959
|
+
if (method == null) method = 'PUT'
|
|
960
|
+
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
|
961
|
+
|
|
962
|
+
// build request object
|
|
963
|
+
const request = {
|
|
964
|
+
method,
|
|
965
|
+
path,
|
|
966
|
+
body: body || '',
|
|
967
|
+
querystring
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
return this.transport.request(request, options, callback)
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
SecurityApi.prototype.putRoleMapping = function securityPutRoleMappingApi (params, options, callback) {
|
|
974
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
975
|
+
|
|
976
|
+
// check required parameters
|
|
977
|
+
if (params.name == null) {
|
|
978
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
979
|
+
return handleError(err, callback)
|
|
980
|
+
}
|
|
981
|
+
if (params.body == null) {
|
|
982
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
983
|
+
return handleError(err, callback)
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
let { method, body, name, ...querystring } = params
|
|
987
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
988
|
+
|
|
989
|
+
let path = ''
|
|
990
|
+
if (method == null) method = 'PUT'
|
|
991
|
+
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
|
992
|
+
|
|
993
|
+
// build request object
|
|
994
|
+
const request = {
|
|
995
|
+
method,
|
|
996
|
+
path,
|
|
997
|
+
body: body || '',
|
|
998
|
+
querystring
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
return this.transport.request(request, options, callback)
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
SecurityApi.prototype.putUser = function securityPutUserApi (params, options, callback) {
|
|
1005
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1006
|
+
|
|
1007
|
+
// check required parameters
|
|
1008
|
+
if (params.username == null) {
|
|
1009
|
+
const err = new this[kConfigurationError]('Missing required parameter: username')
|
|
1010
|
+
return handleError(err, callback)
|
|
1011
|
+
}
|
|
1012
|
+
if (params.body == null) {
|
|
1013
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
1014
|
+
return handleError(err, callback)
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
let { method, body, username, ...querystring } = params
|
|
1018
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1019
|
+
|
|
1020
|
+
let path = ''
|
|
1021
|
+
if (method == null) method = 'PUT'
|
|
1022
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
|
1023
|
+
|
|
1024
|
+
// build request object
|
|
1025
|
+
const request = {
|
|
1026
|
+
method,
|
|
1027
|
+
path,
|
|
1028
|
+
body: body || '',
|
|
1029
|
+
querystring
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
return this.transport.request(request, options, callback)
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
SecurityApi.prototype.queryApiKeys = function securityQueryApiKeysApi (params, options, callback) {
|
|
1036
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1037
|
+
|
|
1038
|
+
let { method, body, ...querystring } = params
|
|
1039
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1040
|
+
|
|
1041
|
+
let path = ''
|
|
1042
|
+
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1043
|
+
path = '/' + '_security' + '/' + '_query' + '/' + 'api_key'
|
|
1044
|
+
|
|
1045
|
+
// build request object
|
|
1046
|
+
const request = {
|
|
1047
|
+
method,
|
|
1048
|
+
path,
|
|
1049
|
+
body: body || '',
|
|
1050
|
+
querystring
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
return this.transport.request(request, options, callback)
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
SecurityApi.prototype.samlAuthenticate = function securitySamlAuthenticateApi (params, options, callback) {
|
|
1057
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1058
|
+
|
|
1059
|
+
// check required parameters
|
|
1060
|
+
if (params.body == null) {
|
|
1061
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
1062
|
+
return handleError(err, callback)
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
let { method, body, ...querystring } = params
|
|
1066
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1067
|
+
|
|
1068
|
+
let path = ''
|
|
1069
|
+
if (method == null) method = 'POST'
|
|
1070
|
+
path = '/' + '_security' + '/' + 'saml' + '/' + 'authenticate'
|
|
1071
|
+
|
|
1072
|
+
// build request object
|
|
1073
|
+
const request = {
|
|
1074
|
+
method,
|
|
1075
|
+
path,
|
|
1076
|
+
body: body || '',
|
|
1077
|
+
querystring
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
return this.transport.request(request, options, callback)
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
SecurityApi.prototype.samlCompleteLogout = function securitySamlCompleteLogoutApi (params, options, callback) {
|
|
1084
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1085
|
+
|
|
1086
|
+
// check required parameters
|
|
1087
|
+
if (params.body == null) {
|
|
1088
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
1089
|
+
return handleError(err, callback)
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
let { method, body, ...querystring } = params
|
|
1093
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1094
|
+
|
|
1095
|
+
let path = ''
|
|
1096
|
+
if (method == null) method = 'POST'
|
|
1097
|
+
path = '/' + '_security' + '/' + 'saml' + '/' + 'complete_logout'
|
|
1098
|
+
|
|
1099
|
+
// build request object
|
|
1100
|
+
const request = {
|
|
1101
|
+
method,
|
|
1102
|
+
path,
|
|
1103
|
+
body: body || '',
|
|
1104
|
+
querystring
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
return this.transport.request(request, options, callback)
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
SecurityApi.prototype.samlInvalidate = function securitySamlInvalidateApi (params, options, callback) {
|
|
1111
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1112
|
+
|
|
1113
|
+
// check required parameters
|
|
1114
|
+
if (params.body == null) {
|
|
1115
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
1116
|
+
return handleError(err, callback)
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
let { method, body, ...querystring } = params
|
|
1120
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1121
|
+
|
|
1122
|
+
let path = ''
|
|
1123
|
+
if (method == null) method = 'POST'
|
|
1124
|
+
path = '/' + '_security' + '/' + 'saml' + '/' + 'invalidate'
|
|
1125
|
+
|
|
1126
|
+
// build request object
|
|
1127
|
+
const request = {
|
|
1128
|
+
method,
|
|
1129
|
+
path,
|
|
1130
|
+
body: body || '',
|
|
1131
|
+
querystring
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
return this.transport.request(request, options, callback)
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
SecurityApi.prototype.samlLogout = function securitySamlLogoutApi (params, options, callback) {
|
|
1138
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1139
|
+
|
|
1140
|
+
// check required parameters
|
|
1141
|
+
if (params.body == null) {
|
|
1142
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
1143
|
+
return handleError(err, callback)
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
let { method, body, ...querystring } = params
|
|
1147
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1148
|
+
|
|
1149
|
+
let path = ''
|
|
1150
|
+
if (method == null) method = 'POST'
|
|
1151
|
+
path = '/' + '_security' + '/' + 'saml' + '/' + 'logout'
|
|
1152
|
+
|
|
1153
|
+
// build request object
|
|
1154
|
+
const request = {
|
|
1155
|
+
method,
|
|
1156
|
+
path,
|
|
1157
|
+
body: body || '',
|
|
1158
|
+
querystring
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
return this.transport.request(request, options, callback)
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
SecurityApi.prototype.samlPrepareAuthentication = function securitySamlPrepareAuthenticationApi (params, options, callback) {
|
|
1165
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1166
|
+
|
|
1167
|
+
// check required parameters
|
|
1168
|
+
if (params.body == null) {
|
|
1169
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
1170
|
+
return handleError(err, callback)
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
let { method, body, ...querystring } = params
|
|
1174
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1175
|
+
|
|
1176
|
+
let path = ''
|
|
1177
|
+
if (method == null) method = 'POST'
|
|
1178
|
+
path = '/' + '_security' + '/' + 'saml' + '/' + 'prepare'
|
|
1179
|
+
|
|
1180
|
+
// build request object
|
|
1181
|
+
const request = {
|
|
1182
|
+
method,
|
|
1183
|
+
path,
|
|
1184
|
+
body: body || '',
|
|
1185
|
+
querystring
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
return this.transport.request(request, options, callback)
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
SecurityApi.prototype.samlServiceProviderMetadata = function securitySamlServiceProviderMetadataApi (params, options, callback) {
|
|
1192
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
1193
|
+
|
|
1194
|
+
// check required parameters
|
|
1195
|
+
if (params.realm_name == null && params.realmName == null) {
|
|
1196
|
+
const err = new this[kConfigurationError]('Missing required parameter: realm_name or realmName')
|
|
1197
|
+
return handleError(err, callback)
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
let { method, body, realmName, realm_name, ...querystring } = params
|
|
1201
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1202
|
+
|
|
1203
|
+
let path = ''
|
|
1204
|
+
if (method == null) method = 'GET'
|
|
1205
|
+
path = '/' + '_security' + '/' + 'saml' + '/' + 'metadata' + '/' + encodeURIComponent(realm_name || realmName)
|
|
1206
|
+
|
|
1207
|
+
// build request object
|
|
1208
|
+
const request = {
|
|
1209
|
+
method,
|
|
1210
|
+
path,
|
|
1211
|
+
body: null,
|
|
1212
|
+
querystring
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
return this.transport.request(request, options, callback)
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
Object.defineProperties(SecurityApi.prototype, {
|
|
1219
|
+
change_password: { get () { return this.changePassword } },
|
|
1220
|
+
clear_api_key_cache: { get () { return this.clearApiKeyCache } },
|
|
1221
|
+
clear_cached_privileges: { get () { return this.clearCachedPrivileges } },
|
|
1222
|
+
clear_cached_realms: { get () { return this.clearCachedRealms } },
|
|
1223
|
+
clear_cached_roles: { get () { return this.clearCachedRoles } },
|
|
1224
|
+
clear_cached_service_tokens: { get () { return this.clearCachedServiceTokens } },
|
|
1225
|
+
create_api_key: { get () { return this.createApiKey } },
|
|
1226
|
+
create_service_token: { get () { return this.createServiceToken } },
|
|
1227
|
+
delete_privileges: { get () { return this.deletePrivileges } },
|
|
1228
|
+
delete_role: { get () { return this.deleteRole } },
|
|
1229
|
+
delete_role_mapping: { get () { return this.deleteRoleMapping } },
|
|
1230
|
+
delete_service_token: { get () { return this.deleteServiceToken } },
|
|
1231
|
+
delete_user: { get () { return this.deleteUser } },
|
|
1232
|
+
disable_user: { get () { return this.disableUser } },
|
|
1233
|
+
enable_user: { get () { return this.enableUser } },
|
|
1234
|
+
get_api_key: { get () { return this.getApiKey } },
|
|
1235
|
+
get_builtin_privileges: { get () { return this.getBuiltinPrivileges } },
|
|
1236
|
+
get_privileges: { get () { return this.getPrivileges } },
|
|
1237
|
+
get_role: { get () { return this.getRole } },
|
|
1238
|
+
get_role_mapping: { get () { return this.getRoleMapping } },
|
|
1239
|
+
get_service_accounts: { get () { return this.getServiceAccounts } },
|
|
1240
|
+
get_service_credentials: { get () { return this.getServiceCredentials } },
|
|
1241
|
+
get_token: { get () { return this.getToken } },
|
|
1242
|
+
get_user: { get () { return this.getUser } },
|
|
1243
|
+
get_user_privileges: { get () { return this.getUserPrivileges } },
|
|
1244
|
+
grant_api_key: { get () { return this.grantApiKey } },
|
|
1245
|
+
has_privileges: { get () { return this.hasPrivileges } },
|
|
1246
|
+
invalidate_api_key: { get () { return this.invalidateApiKey } },
|
|
1247
|
+
invalidate_token: { get () { return this.invalidateToken } },
|
|
1248
|
+
put_privileges: { get () { return this.putPrivileges } },
|
|
1249
|
+
put_role: { get () { return this.putRole } },
|
|
1250
|
+
put_role_mapping: { get () { return this.putRoleMapping } },
|
|
1251
|
+
put_user: { get () { return this.putUser } },
|
|
1252
|
+
query_api_keys: { get () { return this.queryApiKeys } },
|
|
1253
|
+
saml_authenticate: { get () { return this.samlAuthenticate } },
|
|
1254
|
+
saml_complete_logout: { get () { return this.samlCompleteLogout } },
|
|
1255
|
+
saml_invalidate: { get () { return this.samlInvalidate } },
|
|
1256
|
+
saml_logout: { get () { return this.samlLogout } },
|
|
1257
|
+
saml_prepare_authentication: { get () { return this.samlPrepareAuthentication } },
|
|
1258
|
+
saml_service_provider_metadata: { get () { return this.samlServiceProviderMetadata } }
|
|
1259
|
+
})
|
|
1260
|
+
|
|
1261
|
+
module.exports = SecurityApi
|