@elastic/elasticsearch 7.9.0 → 7.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/api/async_search.js +114 -0
- package/api/api/autoscaling.js +147 -0
- package/api/api/bulk.js +55 -98
- package/api/api/cat.js +648 -0
- package/api/api/ccr.js +403 -0
- package/api/api/clear_scroll.js +42 -69
- package/api/api/cluster.js +420 -0
- package/api/api/count.js +49 -98
- package/api/api/create.js +54 -92
- package/api/api/dangling_indices.js +115 -0
- package/api/api/delete.js +50 -89
- package/api/api/delete_by_query.js +55 -135
- package/api/api/delete_by_query_rethrottle.js +45 -74
- package/api/api/delete_script.js +41 -71
- package/api/api/enrich.js +173 -0
- package/api/api/eql.js +119 -0
- package/api/api/exists.js +50 -95
- package/api/api/exists_source.js +58 -101
- package/api/api/explain.js +50 -98
- package/api/api/field_caps.js +42 -78
- package/api/api/get.js +50 -95
- package/api/api/get_script.js +41 -70
- package/api/api/get_script_context.js +37 -64
- package/api/api/get_script_languages.js +37 -64
- package/api/api/get_source.js +50 -93
- package/api/api/graph.js +72 -0
- package/api/api/ilm.js +295 -0
- package/api/api/index.js +56 -98
- package/api/api/indices.js +1656 -0
- package/api/api/info.js +37 -64
- package/api/api/ingest.js +178 -0
- package/api/api/license.js +188 -0
- package/api/api/mget.js +55 -97
- package/api/api/migration.js +60 -0
- package/api/api/ml.js +1842 -0
- package/api/api/monitoring.js +66 -0
- package/api/api/msearch.js +55 -96
- package/api/api/msearch_template.js +55 -92
- package/api/api/mtermvectors.js +49 -91
- package/api/api/nodes.js +202 -0
- package/api/api/ping.js +37 -64
- package/api/api/put_script.js +55 -86
- package/api/api/rank_eval.js +46 -81
- package/api/api/reindex.js +41 -82
- package/api/api/reindex_rethrottle.js +45 -74
- package/api/api/render_search_template.js +42 -69
- package/api/api/rollup.js +278 -0
- package/api/api/scripts_painless_execute.js +37 -64
- package/api/api/scroll.js +42 -74
- package/api/api/search.js +49 -149
- package/api/api/search_shards.js +42 -78
- package/api/api/search_template.js +55 -103
- package/api/api/searchable_snapshots.js +159 -0
- package/api/api/security.js +805 -0
- package/api/api/slm.js +256 -0
- package/api/api/snapshot.js +363 -0
- package/api/api/sql.js +119 -0
- package/api/api/ssl.js +55 -0
- package/api/api/tasks.js +108 -0
- package/api/api/termvectors.js +52 -93
- package/api/api/transform.js +268 -0
- package/api/api/update.js +54 -102
- package/api/api/update_by_query.js +51 -135
- package/api/api/update_by_query_rethrottle.js +45 -74
- package/api/api/watcher.js +311 -0
- package/api/api/xpack.js +76 -0
- package/api/index.js +408 -685
- package/api/requestParams.d.ts +813 -813
- package/api/utils.js +58 -0
- package/index.js +49 -48
- package/lib/Connection.d.ts +1 -1
- package/lib/Connection.js +1 -0
- package/lib/Helpers.js +4 -3
- package/lib/Transport.js +31 -25
- package/package.json +1 -1
- package/api/api/async_search.delete.js +0 -78
- package/api/api/async_search.get.js +0 -82
- package/api/api/async_search.submit.js +0 -147
- package/api/api/autoscaling.delete_autoscaling_policy.js +0 -78
- package/api/api/autoscaling.get_autoscaling_decision.js +0 -72
- package/api/api/autoscaling.get_autoscaling_policy.js +0 -78
- package/api/api/autoscaling.put_autoscaling_policy.js +0 -82
- package/api/api/cat.aliases.js +0 -90
- package/api/api/cat.allocation.js +0 -91
- package/api/api/cat.count.js +0 -87
- package/api/api/cat.fielddata.js +0 -89
- package/api/api/cat.health.js +0 -84
- package/api/api/cat.help.js +0 -79
- package/api/api/cat.indices.js +0 -98
- package/api/api/cat.master.js +0 -85
- package/api/api/cat.ml_data_frame_analytics.js +0 -85
- package/api/api/cat.ml_datafeeds.js +0 -84
- package/api/api/cat.ml_jobs.js +0 -85
- package/api/api/cat.ml_trained_models.js +0 -87
- package/api/api/cat.nodeattrs.js +0 -85
- package/api/api/cat.nodes.js +0 -89
- package/api/api/cat.pending_tasks.js +0 -86
- package/api/api/cat.plugins.js +0 -85
- package/api/api/cat.recovery.js +0 -93
- package/api/api/cat.repositories.js +0 -85
- package/api/api/cat.segments.js +0 -88
- package/api/api/cat.shards.js +0 -92
- package/api/api/cat.snapshots.js +0 -92
- package/api/api/cat.tasks.js +0 -89
- package/api/api/cat.templates.js +0 -90
- package/api/api/cat.thread_pool.js +0 -92
- package/api/api/cat.transforms.js +0 -86
- package/api/api/ccr.delete_auto_follow_pattern.js +0 -78
- package/api/api/ccr.follow.js +0 -82
- package/api/api/ccr.follow_info.js +0 -78
- package/api/api/ccr.follow_stats.js +0 -78
- package/api/api/ccr.forget_follower.js +0 -82
- package/api/api/ccr.get_auto_follow_pattern.js +0 -77
- package/api/api/ccr.pause_auto_follow_pattern.js +0 -78
- package/api/api/ccr.pause_follow.js +0 -78
- package/api/api/ccr.put_auto_follow_pattern.js +0 -82
- package/api/api/ccr.resume_auto_follow_pattern.js +0 -78
- package/api/api/ccr.resume_follow.js +0 -78
- package/api/api/ccr.stats.js +0 -72
- package/api/api/ccr.unfollow.js +0 -78
- package/api/api/cluster.allocation_explain.js +0 -81
- package/api/api/cluster.delete_component_template.js +0 -86
- package/api/api/cluster.delete_voting_config_exclusions.js +0 -79
- package/api/api/cluster.exists_component_template.js +0 -86
- package/api/api/cluster.get_component_template.js +0 -85
- package/api/api/cluster.get_settings.js +0 -84
- package/api/api/cluster.health.js +0 -101
- package/api/api/cluster.pending_tasks.js +0 -81
- package/api/api/cluster.post_voting_config_exclusions.js +0 -82
- package/api/api/cluster.put_component_template.js +0 -91
- package/api/api/cluster.put_settings.js +0 -88
- package/api/api/cluster.remote_info.js +0 -77
- package/api/api/cluster.reroute.js +0 -86
- package/api/api/cluster.state.js +0 -106
- package/api/api/cluster.stats.js +0 -85
- package/api/api/dangling_indices.delete_dangling_index.js +0 -88
- package/api/api/dangling_indices.import_dangling_index.js +0 -88
- package/api/api/dangling_indices.list_dangling_indices.js +0 -77
- package/api/api/enrich.delete_policy.js +0 -78
- package/api/api/enrich.execute_policy.js +0 -78
- package/api/api/enrich.get_policy.js +0 -77
- package/api/api/enrich.put_policy.js +0 -82
- package/api/api/enrich.stats.js +0 -72
- package/api/api/eql.delete.js +0 -78
- package/api/api/eql.get.js +0 -80
- package/api/api/eql.search.js +0 -86
- package/api/api/graph.explore.js +0 -90
- package/api/api/ilm.delete_lifecycle.js +0 -78
- package/api/api/ilm.explain_lifecycle.js +0 -80
- package/api/api/ilm.get_lifecycle.js +0 -77
- package/api/api/ilm.get_status.js +0 -72
- package/api/api/ilm.move_to_step.js +0 -78
- package/api/api/ilm.put_lifecycle.js +0 -78
- package/api/api/ilm.remove_policy.js +0 -78
- package/api/api/ilm.retry.js +0 -78
- package/api/api/ilm.start.js +0 -72
- package/api/api/ilm.stop.js +0 -72
- package/api/api/indices.add_block.js +0 -102
- package/api/api/indices.analyze.js +0 -83
- package/api/api/indices.clear_cache.js +0 -93
- package/api/api/indices.clone.js +0 -98
- package/api/api/indices.close.js +0 -94
- package/api/api/indices.create.js +0 -90
- package/api/api/indices.create_data_stream.js +0 -78
- package/api/api/indices.data_streams_stats.js +0 -77
- package/api/api/indices.delete.js +0 -92
- package/api/api/indices.delete_alias.js +0 -101
- package/api/api/indices.delete_data_stream.js +0 -78
- package/api/api/indices.delete_index_template.js +0 -86
- package/api/api/indices.delete_template.js +0 -86
- package/api/api/indices.exists.js +0 -94
- package/api/api/indices.exists_alias.js +0 -95
- package/api/api/indices.exists_index_template.js +0 -88
- package/api/api/indices.exists_template.js +0 -88
- package/api/api/indices.exists_type.js +0 -100
- package/api/api/indices.flush.js +0 -91
- package/api/api/indices.flush_synced.js +0 -88
- package/api/api/indices.forcemerge.js +0 -93
- package/api/api/indices.freeze.js +0 -87
- package/api/api/indices.get.js +0 -98
- package/api/api/indices.get_alias.js +0 -95
- package/api/api/indices.get_data_stream.js +0 -77
- package/api/api/indices.get_field_mapping.js +0 -105
- package/api/api/indices.get_index_template.js +0 -87
- package/api/api/indices.get_mapping.js +0 -99
- package/api/api/indices.get_settings.js +0 -101
- package/api/api/indices.get_template.js +0 -89
- package/api/api/indices.get_upgrade.js +0 -88
- package/api/api/indices.open.js +0 -94
- package/api/api/indices.put_alias.js +0 -101
- package/api/api/indices.put_index_template.js +0 -91
- package/api/api/indices.put_mapping.js +0 -119
- package/api/api/indices.put_settings.js +0 -101
- package/api/api/indices.put_template.js +0 -93
- package/api/api/indices.recovery.js +0 -85
- package/api/api/indices.refresh.js +0 -88
- package/api/api/indices.reload_search_analyzers.js +0 -82
- package/api/api/indices.resolve_index.js +0 -85
- package/api/api/indices.rollover.js +0 -104
- package/api/api/indices.segments.js +0 -89
- package/api/api/indices.shard_stores.js +0 -89
- package/api/api/indices.shrink.js +0 -100
- package/api/api/indices.simulate_index_template.js +0 -87
- package/api/api/indices.simulate_template.js +0 -86
- package/api/api/indices.split.js +0 -100
- package/api/api/indices.stats.js +0 -104
- package/api/api/indices.unfreeze.js +0 -87
- package/api/api/indices.update_aliases.js +0 -86
- package/api/api/indices.upgrade.js +0 -92
- package/api/api/indices.validate_query.js +0 -109
- package/api/api/ingest.delete_pipeline.js +0 -86
- package/api/api/ingest.get_pipeline.js +0 -84
- package/api/api/ingest.processor_grok.js +0 -77
- package/api/api/ingest.put_pipeline.js +0 -90
- package/api/api/ingest.simulate.js +0 -89
- package/api/api/license.delete.js +0 -72
- package/api/api/license.get.js +0 -73
- package/api/api/license.get_basic_status.js +0 -72
- package/api/api/license.get_trial_status.js +0 -72
- package/api/api/license.post.js +0 -72
- package/api/api/license.post_start_basic.js +0 -72
- package/api/api/license.post_start_trial.js +0 -73
- package/api/api/migration.deprecations.js +0 -77
- package/api/api/ml.close_job.js +0 -81
- package/api/api/ml.delete_calendar.js +0 -78
- package/api/api/ml.delete_calendar_event.js +0 -88
- package/api/api/ml.delete_calendar_job.js +0 -88
- package/api/api/ml.delete_data_frame_analytics.js +0 -79
- package/api/api/ml.delete_datafeed.js +0 -78
- package/api/api/ml.delete_expired_data.js +0 -79
- package/api/api/ml.delete_filter.js +0 -78
- package/api/api/ml.delete_forecast.js +0 -91
- package/api/api/ml.delete_job.js +0 -79
- package/api/api/ml.delete_model_snapshot.js +0 -88
- package/api/api/ml.delete_trained_model.js +0 -78
- package/api/api/ml.estimate_model_memory.js +0 -78
- package/api/api/ml.evaluate_data_frame.js +0 -78
- package/api/api/ml.explain_data_frame_analytics.js +0 -77
- package/api/api/ml.find_file_structure.js +0 -99
- package/api/api/ml.flush_job.js +0 -84
- package/api/api/ml.forecast.js +0 -81
- package/api/api/ml.get_buckets.js +0 -99
- package/api/api/ml.get_calendar_events.js +0 -83
- package/api/api/ml.get_calendars.js +0 -78
- package/api/api/ml.get_categories.js +0 -91
- package/api/api/ml.get_data_frame_analytics.js +0 -80
- package/api/api/ml.get_data_frame_analytics_stats.js +0 -80
- package/api/api/ml.get_datafeed_stats.js +0 -77
- package/api/api/ml.get_datafeeds.js +0 -77
- package/api/api/ml.get_filters.js +0 -78
- package/api/api/ml.get_influencers.js +0 -87
- package/api/api/ml.get_job_stats.js +0 -77
- package/api/api/ml.get_jobs.js +0 -77
- package/api/api/ml.get_model_snapshots.js +0 -94
- package/api/api/ml.get_overall_buckets.js +0 -88
- package/api/api/ml.get_records.js +0 -87
- package/api/api/ml.get_trained_models.js +0 -86
- package/api/api/ml.get_trained_models_stats.js +0 -80
- package/api/api/ml.info.js +0 -72
- package/api/api/ml.open_job.js +0 -78
- package/api/api/ml.post_calendar_events.js +0 -82
- package/api/api/ml.post_data.js +0 -84
- package/api/api/ml.preview_datafeed.js +0 -78
- package/api/api/ml.put_calendar.js +0 -78
- package/api/api/ml.put_calendar_job.js +0 -88
- package/api/api/ml.put_data_frame_analytics.js +0 -82
- package/api/api/ml.put_datafeed.js +0 -88
- package/api/api/ml.put_filter.js +0 -82
- package/api/api/ml.put_job.js +0 -82
- package/api/api/ml.put_trained_model.js +0 -82
- package/api/api/ml.revert_model_snapshot.js +0 -88
- package/api/api/ml.set_upgrade_mode.js +0 -73
- package/api/api/ml.start_data_frame_analytics.js +0 -78
- package/api/api/ml.start_datafeed.js +0 -80
- package/api/api/ml.stop_data_frame_analytics.js +0 -81
- package/api/api/ml.stop_datafeed.js +0 -81
- package/api/api/ml.update_data_frame_analytics.js +0 -82
- package/api/api/ml.update_datafeed.js +0 -88
- package/api/api/ml.update_filter.js +0 -82
- package/api/api/ml.update_job.js +0 -82
- package/api/api/ml.update_model_snapshot.js +0 -92
- package/api/api/ml.validate.js +0 -78
- package/api/api/ml.validate_detector.js +0 -78
- package/api/api/monitoring.bulk.js +0 -87
- package/api/api/nodes.hot_threads.js +0 -98
- package/api/api/nodes.info.js +0 -91
- package/api/api/nodes.reload_secure_settings.js +0 -83
- package/api/api/nodes.stats.js +0 -105
- package/api/api/nodes.usage.js +0 -89
- package/api/api/rollup.delete_job.js +0 -78
- package/api/api/rollup.get_jobs.js +0 -77
- package/api/api/rollup.get_rollup_caps.js +0 -77
- package/api/api/rollup.get_rollup_index_caps.js +0 -78
- package/api/api/rollup.put_job.js +0 -82
- package/api/api/rollup.rollup_search.js +0 -95
- package/api/api/rollup.start_job.js +0 -78
- package/api/api/rollup.stop_job.js +0 -80
- package/api/api/searchable_snapshots.clear_cache.js +0 -83
- package/api/api/searchable_snapshots.mount.js +0 -94
- package/api/api/searchable_snapshots.repository_stats.js +0 -78
- package/api/api/searchable_snapshots.stats.js +0 -77
- package/api/api/security.authenticate.js +0 -72
- package/api/api/security.change_password.js +0 -83
- package/api/api/security.clear_cached_privileges.js +0 -78
- package/api/api/security.clear_cached_realms.js +0 -78
- package/api/api/security.clear_cached_roles.js +0 -78
- package/api/api/security.create_api_key.js +0 -78
- package/api/api/security.delete_privileges.js +0 -88
- package/api/api/security.delete_role.js +0 -78
- package/api/api/security.delete_role_mapping.js +0 -78
- package/api/api/security.delete_user.js +0 -78
- package/api/api/security.disable_user.js +0 -78
- package/api/api/security.enable_user.js +0 -78
- package/api/api/security.get_api_key.js +0 -77
- package/api/api/security.get_builtin_privileges.js +0 -72
- package/api/api/security.get_privileges.js +0 -86
- package/api/api/security.get_role.js +0 -77
- package/api/api/security.get_role_mapping.js +0 -77
- package/api/api/security.get_token.js +0 -78
- package/api/api/security.get_user.js +0 -77
- package/api/api/security.get_user_privileges.js +0 -72
- package/api/api/security.has_privileges.js +0 -83
- package/api/api/security.invalidate_api_key.js +0 -78
- package/api/api/security.invalidate_token.js +0 -78
- package/api/api/security.put_privileges.js +0 -78
- package/api/api/security.put_role.js +0 -82
- package/api/api/security.put_role_mapping.js +0 -82
- package/api/api/security.put_user.js +0 -82
- package/api/api/slm.delete_lifecycle.js +0 -78
- package/api/api/slm.execute_lifecycle.js +0 -78
- package/api/api/slm.execute_retention.js +0 -72
- package/api/api/slm.get_lifecycle.js +0 -77
- package/api/api/slm.get_stats.js +0 -72
- package/api/api/slm.get_status.js +0 -72
- package/api/api/slm.put_lifecycle.js +0 -78
- package/api/api/slm.start.js +0 -72
- package/api/api/slm.stop.js +0 -72
- package/api/api/snapshot.cleanup_repository.js +0 -86
- package/api/api/snapshot.create.js +0 -97
- package/api/api/snapshot.create_repository.js +0 -91
- package/api/api/snapshot.delete.js +0 -95
- package/api/api/snapshot.delete_repository.js +0 -86
- package/api/api/snapshot.get.js +0 -98
- package/api/api/snapshot.get_repository.js +0 -85
- package/api/api/snapshot.restore.js +0 -97
- package/api/api/snapshot.status.js +0 -95
- package/api/api/snapshot.verify_repository.js +0 -86
- package/api/api/sql.clear_cursor.js +0 -78
- package/api/api/sql.query.js +0 -78
- package/api/api/sql.translate.js +0 -78
- package/api/api/ssl.certificates.js +0 -72
- package/api/api/tasks.cancel.js +0 -88
- package/api/api/tasks.get.js +0 -86
- package/api/api/tasks.list.js +0 -87
- package/api/api/transform.delete_transform.js +0 -78
- package/api/api/transform.get_transform.js +0 -79
- package/api/api/transform.get_transform_stats.js +0 -80
- package/api/api/transform.preview_transform.js +0 -78
- package/api/api/transform.put_transform.js +0 -82
- package/api/api/transform.start_transform.js +0 -78
- package/api/api/transform.stop_transform.js +0 -84
- package/api/api/transform.update_transform.js +0 -82
- package/api/api/watcher.ack_watch.js +0 -89
- package/api/api/watcher.activate_watch.js +0 -78
- package/api/api/watcher.deactivate_watch.js +0 -78
- package/api/api/watcher.delete_watch.js +0 -78
- package/api/api/watcher.execute_watch.js +0 -77
- package/api/api/watcher.get_watch.js +0 -78
- package/api/api/watcher.put_watch.js +0 -82
- package/api/api/watcher.start.js +0 -72
- package/api/api/watcher.stats.js +0 -78
- package/api/api/watcher.stop.js +0 -72
- package/api/api/xpack.info.js +0 -73
- package/api/api/xpack.usage.js +0 -72
|
@@ -0,0 +1,805 @@
|
|
|
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
|
+
var { method, body, ...querystring } = params
|
|
38
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
39
|
+
|
|
40
|
+
var 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
|
+
var { method, body, username, ...querystring } = params
|
|
65
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
66
|
+
|
|
67
|
+
var 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.clearCachedPrivileges = function securityClearCachedPrivilegesApi (params, options, callback) {
|
|
88
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
89
|
+
|
|
90
|
+
// check required parameters
|
|
91
|
+
if (params['application'] == null) {
|
|
92
|
+
const err = new this[kConfigurationError]('Missing required parameter: application')
|
|
93
|
+
return handleError(err, callback)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
var { method, body, application, ...querystring } = params
|
|
97
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
98
|
+
|
|
99
|
+
var path = ''
|
|
100
|
+
if (method == null) method = 'POST'
|
|
101
|
+
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + '_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.clearCachedRealms = function securityClearCachedRealmsApi (params, options, callback) {
|
|
115
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
116
|
+
|
|
117
|
+
// check required parameters
|
|
118
|
+
if (params['realms'] == null) {
|
|
119
|
+
const err = new this[kConfigurationError]('Missing required parameter: realms')
|
|
120
|
+
return handleError(err, callback)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
var { method, body, realms, ...querystring } = params
|
|
124
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
125
|
+
|
|
126
|
+
var path = ''
|
|
127
|
+
if (method == null) method = 'POST'
|
|
128
|
+
path = '/' + '_security' + '/' + 'realm' + '/' + encodeURIComponent(realms) + '/' + '_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.clearCachedRoles = function securityClearCachedRolesApi (params, options, callback) {
|
|
142
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
143
|
+
|
|
144
|
+
// check required parameters
|
|
145
|
+
if (params['name'] == null) {
|
|
146
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
147
|
+
return handleError(err, callback)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
var { method, body, name, ...querystring } = params
|
|
151
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
152
|
+
|
|
153
|
+
var path = ''
|
|
154
|
+
if (method == null) method = 'POST'
|
|
155
|
+
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name) + '/' + '_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.createApiKey = function securityCreateApiKeyApi (params, options, callback) {
|
|
169
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
170
|
+
|
|
171
|
+
// check required parameters
|
|
172
|
+
if (params['body'] == null) {
|
|
173
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
174
|
+
return handleError(err, callback)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
var { method, body, ...querystring } = params
|
|
178
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
179
|
+
|
|
180
|
+
var path = ''
|
|
181
|
+
if (method == null) method = 'PUT'
|
|
182
|
+
path = '/' + '_security' + '/' + 'api_key'
|
|
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.deletePrivileges = function securityDeletePrivilegesApi (params, options, callback) {
|
|
196
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
197
|
+
|
|
198
|
+
// check required parameters
|
|
199
|
+
if (params['application'] == null) {
|
|
200
|
+
const err = new this[kConfigurationError]('Missing required parameter: application')
|
|
201
|
+
return handleError(err, callback)
|
|
202
|
+
}
|
|
203
|
+
if (params['name'] == null) {
|
|
204
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
205
|
+
return handleError(err, callback)
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// check required url components
|
|
209
|
+
if (params['name'] != null && (params['application'] == null)) {
|
|
210
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: application')
|
|
211
|
+
return handleError(err, callback)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
var { method, body, application, name, ...querystring } = params
|
|
215
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
216
|
+
|
|
217
|
+
var path = ''
|
|
218
|
+
if (method == null) method = 'DELETE'
|
|
219
|
+
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
|
|
220
|
+
|
|
221
|
+
// build request object
|
|
222
|
+
const request = {
|
|
223
|
+
method,
|
|
224
|
+
path,
|
|
225
|
+
body: body || '',
|
|
226
|
+
querystring
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return this.transport.request(request, options, callback)
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
SecurityApi.prototype.deleteRole = function securityDeleteRoleApi (params, options, callback) {
|
|
233
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
234
|
+
|
|
235
|
+
// check required parameters
|
|
236
|
+
if (params['name'] == null) {
|
|
237
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
238
|
+
return handleError(err, callback)
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
var { method, body, name, ...querystring } = params
|
|
242
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
243
|
+
|
|
244
|
+
var path = ''
|
|
245
|
+
if (method == null) method = 'DELETE'
|
|
246
|
+
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
|
247
|
+
|
|
248
|
+
// build request object
|
|
249
|
+
const request = {
|
|
250
|
+
method,
|
|
251
|
+
path,
|
|
252
|
+
body: body || '',
|
|
253
|
+
querystring
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
return this.transport.request(request, options, callback)
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
SecurityApi.prototype.deleteRoleMapping = function securityDeleteRoleMappingApi (params, options, callback) {
|
|
260
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
261
|
+
|
|
262
|
+
// check required parameters
|
|
263
|
+
if (params['name'] == null) {
|
|
264
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
265
|
+
return handleError(err, callback)
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
var { method, body, name, ...querystring } = params
|
|
269
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
270
|
+
|
|
271
|
+
var path = ''
|
|
272
|
+
if (method == null) method = 'DELETE'
|
|
273
|
+
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
|
274
|
+
|
|
275
|
+
// build request object
|
|
276
|
+
const request = {
|
|
277
|
+
method,
|
|
278
|
+
path,
|
|
279
|
+
body: body || '',
|
|
280
|
+
querystring
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
return this.transport.request(request, options, callback)
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
SecurityApi.prototype.deleteUser = function securityDeleteUserApi (params, options, callback) {
|
|
287
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
288
|
+
|
|
289
|
+
// check required parameters
|
|
290
|
+
if (params['username'] == null) {
|
|
291
|
+
const err = new this[kConfigurationError]('Missing required parameter: username')
|
|
292
|
+
return handleError(err, callback)
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
var { method, body, username, ...querystring } = params
|
|
296
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
297
|
+
|
|
298
|
+
var path = ''
|
|
299
|
+
if (method == null) method = 'DELETE'
|
|
300
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
|
301
|
+
|
|
302
|
+
// build request object
|
|
303
|
+
const request = {
|
|
304
|
+
method,
|
|
305
|
+
path,
|
|
306
|
+
body: body || '',
|
|
307
|
+
querystring
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return this.transport.request(request, options, callback)
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
SecurityApi.prototype.disableUser = function securityDisableUserApi (params, options, callback) {
|
|
314
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
315
|
+
|
|
316
|
+
// check required parameters
|
|
317
|
+
if (params['username'] == null) {
|
|
318
|
+
const err = new this[kConfigurationError]('Missing required parameter: username')
|
|
319
|
+
return handleError(err, callback)
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
var { method, body, username, ...querystring } = params
|
|
323
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
324
|
+
|
|
325
|
+
var path = ''
|
|
326
|
+
if (method == null) method = 'PUT'
|
|
327
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_disable'
|
|
328
|
+
|
|
329
|
+
// build request object
|
|
330
|
+
const request = {
|
|
331
|
+
method,
|
|
332
|
+
path,
|
|
333
|
+
body: body || '',
|
|
334
|
+
querystring
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
return this.transport.request(request, options, callback)
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
SecurityApi.prototype.enableUser = function securityEnableUserApi (params, options, callback) {
|
|
341
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
342
|
+
|
|
343
|
+
// check required parameters
|
|
344
|
+
if (params['username'] == null) {
|
|
345
|
+
const err = new this[kConfigurationError]('Missing required parameter: username')
|
|
346
|
+
return handleError(err, callback)
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
var { method, body, username, ...querystring } = params
|
|
350
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
351
|
+
|
|
352
|
+
var path = ''
|
|
353
|
+
if (method == null) method = 'PUT'
|
|
354
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_enable'
|
|
355
|
+
|
|
356
|
+
// build request object
|
|
357
|
+
const request = {
|
|
358
|
+
method,
|
|
359
|
+
path,
|
|
360
|
+
body: body || '',
|
|
361
|
+
querystring
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
return this.transport.request(request, options, callback)
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
SecurityApi.prototype.getApiKey = function securityGetApiKeyApi (params, options, callback) {
|
|
368
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
369
|
+
|
|
370
|
+
var { method, body, ...querystring } = params
|
|
371
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
372
|
+
|
|
373
|
+
var path = ''
|
|
374
|
+
if (method == null) method = 'GET'
|
|
375
|
+
path = '/' + '_security' + '/' + 'api_key'
|
|
376
|
+
|
|
377
|
+
// build request object
|
|
378
|
+
const request = {
|
|
379
|
+
method,
|
|
380
|
+
path,
|
|
381
|
+
body: null,
|
|
382
|
+
querystring
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
return this.transport.request(request, options, callback)
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
SecurityApi.prototype.getBuiltinPrivileges = function securityGetBuiltinPrivilegesApi (params, options, callback) {
|
|
389
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
390
|
+
|
|
391
|
+
var { method, body, ...querystring } = params
|
|
392
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
393
|
+
|
|
394
|
+
var path = ''
|
|
395
|
+
if (method == null) method = 'GET'
|
|
396
|
+
path = '/' + '_security' + '/' + 'privilege' + '/' + '_builtin'
|
|
397
|
+
|
|
398
|
+
// build request object
|
|
399
|
+
const request = {
|
|
400
|
+
method,
|
|
401
|
+
path,
|
|
402
|
+
body: null,
|
|
403
|
+
querystring
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
return this.transport.request(request, options, callback)
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
SecurityApi.prototype.getPrivileges = function securityGetPrivilegesApi (params, options, callback) {
|
|
410
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
411
|
+
|
|
412
|
+
// check required url components
|
|
413
|
+
if (params['name'] != null && (params['application'] == null)) {
|
|
414
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: application')
|
|
415
|
+
return handleError(err, callback)
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
var { method, body, application, name, ...querystring } = params
|
|
419
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
420
|
+
|
|
421
|
+
var path = ''
|
|
422
|
+
if ((application) != null && (name) != null) {
|
|
423
|
+
if (method == null) method = 'GET'
|
|
424
|
+
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
|
|
425
|
+
} else if ((application) != null) {
|
|
426
|
+
if (method == null) method = 'GET'
|
|
427
|
+
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application)
|
|
428
|
+
} else {
|
|
429
|
+
if (method == null) method = 'GET'
|
|
430
|
+
path = '/' + '_security' + '/' + 'privilege'
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// build request object
|
|
434
|
+
const request = {
|
|
435
|
+
method,
|
|
436
|
+
path,
|
|
437
|
+
body: null,
|
|
438
|
+
querystring
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
return this.transport.request(request, options, callback)
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
SecurityApi.prototype.getRole = function securityGetRoleApi (params, options, callback) {
|
|
445
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
446
|
+
|
|
447
|
+
var { method, body, name, ...querystring } = params
|
|
448
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
449
|
+
|
|
450
|
+
var path = ''
|
|
451
|
+
if ((name) != null) {
|
|
452
|
+
if (method == null) method = 'GET'
|
|
453
|
+
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
|
454
|
+
} else {
|
|
455
|
+
if (method == null) method = 'GET'
|
|
456
|
+
path = '/' + '_security' + '/' + 'role'
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
// build request object
|
|
460
|
+
const request = {
|
|
461
|
+
method,
|
|
462
|
+
path,
|
|
463
|
+
body: null,
|
|
464
|
+
querystring
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
return this.transport.request(request, options, callback)
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
SecurityApi.prototype.getRoleMapping = function securityGetRoleMappingApi (params, options, callback) {
|
|
471
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
472
|
+
|
|
473
|
+
var { method, body, name, ...querystring } = params
|
|
474
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
475
|
+
|
|
476
|
+
var path = ''
|
|
477
|
+
if ((name) != null) {
|
|
478
|
+
if (method == null) method = 'GET'
|
|
479
|
+
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
|
480
|
+
} else {
|
|
481
|
+
if (method == null) method = 'GET'
|
|
482
|
+
path = '/' + '_security' + '/' + 'role_mapping'
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
// build request object
|
|
486
|
+
const request = {
|
|
487
|
+
method,
|
|
488
|
+
path,
|
|
489
|
+
body: null,
|
|
490
|
+
querystring
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
return this.transport.request(request, options, callback)
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
SecurityApi.prototype.getToken = function securityGetTokenApi (params, options, callback) {
|
|
497
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
498
|
+
|
|
499
|
+
// check required parameters
|
|
500
|
+
if (params['body'] == null) {
|
|
501
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
502
|
+
return handleError(err, callback)
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
var { method, body, ...querystring } = params
|
|
506
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
507
|
+
|
|
508
|
+
var path = ''
|
|
509
|
+
if (method == null) method = 'POST'
|
|
510
|
+
path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
|
|
511
|
+
|
|
512
|
+
// build request object
|
|
513
|
+
const request = {
|
|
514
|
+
method,
|
|
515
|
+
path,
|
|
516
|
+
body: body || '',
|
|
517
|
+
querystring
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
return this.transport.request(request, options, callback)
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
SecurityApi.prototype.getUser = function securityGetUserApi (params, options, callback) {
|
|
524
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
525
|
+
|
|
526
|
+
var { method, body, username, ...querystring } = params
|
|
527
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
528
|
+
|
|
529
|
+
var path = ''
|
|
530
|
+
if ((username) != null) {
|
|
531
|
+
if (method == null) method = 'GET'
|
|
532
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
|
533
|
+
} else {
|
|
534
|
+
if (method == null) method = 'GET'
|
|
535
|
+
path = '/' + '_security' + '/' + 'user'
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// build request object
|
|
539
|
+
const request = {
|
|
540
|
+
method,
|
|
541
|
+
path,
|
|
542
|
+
body: null,
|
|
543
|
+
querystring
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
return this.transport.request(request, options, callback)
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
SecurityApi.prototype.getUserPrivileges = function securityGetUserPrivilegesApi (params, options, callback) {
|
|
550
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
551
|
+
|
|
552
|
+
var { method, body, ...querystring } = params
|
|
553
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
554
|
+
|
|
555
|
+
var path = ''
|
|
556
|
+
if (method == null) method = 'GET'
|
|
557
|
+
path = '/' + '_security' + '/' + 'user' + '/' + '_privileges'
|
|
558
|
+
|
|
559
|
+
// build request object
|
|
560
|
+
const request = {
|
|
561
|
+
method,
|
|
562
|
+
path,
|
|
563
|
+
body: null,
|
|
564
|
+
querystring
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
return this.transport.request(request, options, callback)
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
SecurityApi.prototype.hasPrivileges = function securityHasPrivilegesApi (params, options, callback) {
|
|
571
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
572
|
+
|
|
573
|
+
// check required parameters
|
|
574
|
+
if (params['body'] == null) {
|
|
575
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
576
|
+
return handleError(err, callback)
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
var { method, body, user, ...querystring } = params
|
|
580
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
581
|
+
|
|
582
|
+
var path = ''
|
|
583
|
+
if ((user) != null) {
|
|
584
|
+
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
585
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(user) + '/' + '_has_privileges'
|
|
586
|
+
} else {
|
|
587
|
+
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
588
|
+
path = '/' + '_security' + '/' + 'user' + '/' + '_has_privileges'
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
// build request object
|
|
592
|
+
const request = {
|
|
593
|
+
method,
|
|
594
|
+
path,
|
|
595
|
+
body: body || '',
|
|
596
|
+
querystring
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
return this.transport.request(request, options, callback)
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
SecurityApi.prototype.invalidateApiKey = function securityInvalidateApiKeyApi (params, options, callback) {
|
|
603
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
604
|
+
|
|
605
|
+
// check required parameters
|
|
606
|
+
if (params['body'] == null) {
|
|
607
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
608
|
+
return handleError(err, callback)
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
var { method, body, ...querystring } = params
|
|
612
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
613
|
+
|
|
614
|
+
var path = ''
|
|
615
|
+
if (method == null) method = 'DELETE'
|
|
616
|
+
path = '/' + '_security' + '/' + 'api_key'
|
|
617
|
+
|
|
618
|
+
// build request object
|
|
619
|
+
const request = {
|
|
620
|
+
method,
|
|
621
|
+
path,
|
|
622
|
+
body: body || '',
|
|
623
|
+
querystring
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
return this.transport.request(request, options, callback)
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
SecurityApi.prototype.invalidateToken = function securityInvalidateTokenApi (params, options, callback) {
|
|
630
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
631
|
+
|
|
632
|
+
// check required parameters
|
|
633
|
+
if (params['body'] == null) {
|
|
634
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
635
|
+
return handleError(err, callback)
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
var { method, body, ...querystring } = params
|
|
639
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
640
|
+
|
|
641
|
+
var path = ''
|
|
642
|
+
if (method == null) method = 'DELETE'
|
|
643
|
+
path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
|
|
644
|
+
|
|
645
|
+
// build request object
|
|
646
|
+
const request = {
|
|
647
|
+
method,
|
|
648
|
+
path,
|
|
649
|
+
body: body || '',
|
|
650
|
+
querystring
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
return this.transport.request(request, options, callback)
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
SecurityApi.prototype.putPrivileges = function securityPutPrivilegesApi (params, options, callback) {
|
|
657
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
658
|
+
|
|
659
|
+
// check required parameters
|
|
660
|
+
if (params['body'] == null) {
|
|
661
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
662
|
+
return handleError(err, callback)
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
var { method, body, ...querystring } = params
|
|
666
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
667
|
+
|
|
668
|
+
var path = ''
|
|
669
|
+
if (method == null) method = 'PUT'
|
|
670
|
+
path = '/' + '_security' + '/' + 'privilege'
|
|
671
|
+
|
|
672
|
+
// build request object
|
|
673
|
+
const request = {
|
|
674
|
+
method,
|
|
675
|
+
path,
|
|
676
|
+
body: body || '',
|
|
677
|
+
querystring
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
return this.transport.request(request, options, callback)
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
SecurityApi.prototype.putRole = function securityPutRoleApi (params, options, callback) {
|
|
684
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
685
|
+
|
|
686
|
+
// check required parameters
|
|
687
|
+
if (params['name'] == null) {
|
|
688
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
689
|
+
return handleError(err, callback)
|
|
690
|
+
}
|
|
691
|
+
if (params['body'] == null) {
|
|
692
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
693
|
+
return handleError(err, callback)
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
var { method, body, name, ...querystring } = params
|
|
697
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
698
|
+
|
|
699
|
+
var path = ''
|
|
700
|
+
if (method == null) method = 'PUT'
|
|
701
|
+
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
|
702
|
+
|
|
703
|
+
// build request object
|
|
704
|
+
const request = {
|
|
705
|
+
method,
|
|
706
|
+
path,
|
|
707
|
+
body: body || '',
|
|
708
|
+
querystring
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
return this.transport.request(request, options, callback)
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
SecurityApi.prototype.putRoleMapping = function securityPutRoleMappingApi (params, options, callback) {
|
|
715
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
716
|
+
|
|
717
|
+
// check required parameters
|
|
718
|
+
if (params['name'] == null) {
|
|
719
|
+
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
720
|
+
return handleError(err, callback)
|
|
721
|
+
}
|
|
722
|
+
if (params['body'] == null) {
|
|
723
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
724
|
+
return handleError(err, callback)
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
var { method, body, name, ...querystring } = params
|
|
728
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
729
|
+
|
|
730
|
+
var path = ''
|
|
731
|
+
if (method == null) method = 'PUT'
|
|
732
|
+
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
|
733
|
+
|
|
734
|
+
// build request object
|
|
735
|
+
const request = {
|
|
736
|
+
method,
|
|
737
|
+
path,
|
|
738
|
+
body: body || '',
|
|
739
|
+
querystring
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
return this.transport.request(request, options, callback)
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
SecurityApi.prototype.putUser = function securityPutUserApi (params, options, callback) {
|
|
746
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
747
|
+
|
|
748
|
+
// check required parameters
|
|
749
|
+
if (params['username'] == null) {
|
|
750
|
+
const err = new this[kConfigurationError]('Missing required parameter: username')
|
|
751
|
+
return handleError(err, callback)
|
|
752
|
+
}
|
|
753
|
+
if (params['body'] == null) {
|
|
754
|
+
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
755
|
+
return handleError(err, callback)
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
var { method, body, username, ...querystring } = params
|
|
759
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
760
|
+
|
|
761
|
+
var path = ''
|
|
762
|
+
if (method == null) method = 'PUT'
|
|
763
|
+
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
|
764
|
+
|
|
765
|
+
// build request object
|
|
766
|
+
const request = {
|
|
767
|
+
method,
|
|
768
|
+
path,
|
|
769
|
+
body: body || '',
|
|
770
|
+
querystring
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
return this.transport.request(request, options, callback)
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
Object.defineProperties(SecurityApi.prototype, {
|
|
777
|
+
change_password: { get () { return this.changePassword } },
|
|
778
|
+
clear_cached_privileges: { get () { return this.clearCachedPrivileges } },
|
|
779
|
+
clear_cached_realms: { get () { return this.clearCachedRealms } },
|
|
780
|
+
clear_cached_roles: { get () { return this.clearCachedRoles } },
|
|
781
|
+
create_api_key: { get () { return this.createApiKey } },
|
|
782
|
+
delete_privileges: { get () { return this.deletePrivileges } },
|
|
783
|
+
delete_role: { get () { return this.deleteRole } },
|
|
784
|
+
delete_role_mapping: { get () { return this.deleteRoleMapping } },
|
|
785
|
+
delete_user: { get () { return this.deleteUser } },
|
|
786
|
+
disable_user: { get () { return this.disableUser } },
|
|
787
|
+
enable_user: { get () { return this.enableUser } },
|
|
788
|
+
get_api_key: { get () { return this.getApiKey } },
|
|
789
|
+
get_builtin_privileges: { get () { return this.getBuiltinPrivileges } },
|
|
790
|
+
get_privileges: { get () { return this.getPrivileges } },
|
|
791
|
+
get_role: { get () { return this.getRole } },
|
|
792
|
+
get_role_mapping: { get () { return this.getRoleMapping } },
|
|
793
|
+
get_token: { get () { return this.getToken } },
|
|
794
|
+
get_user: { get () { return this.getUser } },
|
|
795
|
+
get_user_privileges: { get () { return this.getUserPrivileges } },
|
|
796
|
+
has_privileges: { get () { return this.hasPrivileges } },
|
|
797
|
+
invalidate_api_key: { get () { return this.invalidateApiKey } },
|
|
798
|
+
invalidate_token: { get () { return this.invalidateToken } },
|
|
799
|
+
put_privileges: { get () { return this.putPrivileges } },
|
|
800
|
+
put_role: { get () { return this.putRole } },
|
|
801
|
+
put_role_mapping: { get () { return this.putRoleMapping } },
|
|
802
|
+
put_user: { get () { return this.putUser } }
|
|
803
|
+
})
|
|
804
|
+
|
|
805
|
+
module.exports = SecurityApi
|