@@ -192,6 +192,50 @@ SecurityApi.prototype.clearCachedRoles = function securityClearCachedRolesApi (p
192
192
return this . transport . request ( request , options , callback )
193
193
}
194
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
+
195
239
SecurityApi . prototype . createApiKey = function securityCreateApiKeyApi ( params , options , callback ) {
196
240
; [ params , options , callback ] = normalizeArguments ( params , options , callback )
197
241
@@ -219,6 +263,51 @@ SecurityApi.prototype.createApiKey = function securityCreateApiKeyApi (params, o
219
263
return this . transport . request ( request , options , callback )
220
264
}
221
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
+
222
311
SecurityApi . prototype . deletePrivileges = function securityDeletePrivilegesApi ( params , options , callback ) {
223
312
; [ params , options , callback ] = normalizeArguments ( params , options , callback )
224
313
@@ -310,6 +399,50 @@ SecurityApi.prototype.deleteRoleMapping = function securityDeleteRoleMappingApi
310
399
return this . transport . request ( request , options , callback )
311
400
}
312
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
+
313
446
SecurityApi . prototype . deleteUser = function securityDeleteUserApi ( params , options , callback ) {
314
447
; [ params , options , callback ] = normalizeArguments ( params , options , callback )
315
448
@@ -520,6 +653,78 @@ SecurityApi.prototype.getRoleMapping = function securityGetRoleMappingApi (param
520
653
return this . transport . request ( request , options , callback )
521
654
}
522
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
+
523
728
SecurityApi . prototype . getToken = function securityGetTokenApi ( params , options , callback ) {
524
729
; [ params , options , callback ] = normalizeArguments ( params , options , callback )
525
730
@@ -833,10 +1038,13 @@ Object.defineProperties(SecurityApi.prototype, {
833
1038
clear_cached_privileges : { get ( ) { return this . clearCachedPrivileges } } ,
834
1039
clear_cached_realms : { get ( ) { return this . clearCachedRealms } } ,
835
1040
clear_cached_roles : { get ( ) { return this . clearCachedRoles } } ,
1041
+ clear_cached_service_tokens : { get ( ) { return this . clearCachedServiceTokens } } ,
836
1042
create_api_key : { get ( ) { return this . createApiKey } } ,
1043
+ create_service_token : { get ( ) { return this . createServiceToken } } ,
837
1044
delete_privileges : { get ( ) { return this . deletePrivileges } } ,
838
1045
delete_role : { get ( ) { return this . deleteRole } } ,
839
1046
delete_role_mapping : { get ( ) { return this . deleteRoleMapping } } ,
1047
+ delete_service_token : { get ( ) { return this . deleteServiceToken } } ,
840
1048
delete_user : { get ( ) { return this . deleteUser } } ,
841
1049
disable_user : { get ( ) { return this . disableUser } } ,
842
1050
enable_user : { get ( ) { return this . enableUser } } ,
@@ -845,6 +1053,8 @@ Object.defineProperties(SecurityApi.prototype, {
845
1053
get_privileges : { get ( ) { return this . getPrivileges } } ,
846
1054
get_role : { get ( ) { return this . getRole } } ,
847
1055
get_role_mapping : { get ( ) { return this . getRoleMapping } } ,
1056
+ get_service_accounts : { get ( ) { return this . getServiceAccounts } } ,
1057
+ get_service_credentials : { get ( ) { return this . getServiceCredentials } } ,
848
1058
get_token : { get ( ) { return this . getToken } } ,
849
1059
get_user : { get ( ) { return this . getUser } } ,
850
1060
get_user_privileges : { get ( ) { return this . getUserPrivileges } } ,
0 commit comments