@elastic/elasticsearch 8.14.0 → 8.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/catalog-info.yaml +9 -9
- package/lib/api/api/async_search.d.ts +8 -8
- package/lib/api/api/async_search.js +28 -4
- package/lib/api/api/async_search.js.map +1 -1
- package/lib/api/api/autoscaling.d.ts +4 -4
- package/lib/api/api/autoscaling.js +25 -4
- package/lib/api/api/autoscaling.js.map +1 -1
- package/lib/api/api/bulk.d.ts +2 -2
- package/lib/api/api/bulk.js +7 -1
- package/lib/api/api/bulk.js.map +1 -1
- package/lib/api/api/capabilities.d.ts +14 -0
- package/lib/api/api/capabilities.js +42 -0
- package/lib/api/api/capabilities.js.map +1 -0
- package/lib/api/api/cat.d.ts +51 -51
- package/lib/api/api/cat.js +155 -26
- package/lib/api/api/cat.js.map +1 -1
- package/lib/api/api/ccr.d.ts +13 -13
- package/lib/api/api/ccr.js +88 -13
- package/lib/api/api/ccr.js.map +1 -1
- package/lib/api/api/clear_scroll.d.ts +2 -2
- package/lib/api/api/clear_scroll.js +7 -1
- package/lib/api/api/clear_scroll.js.map +1 -1
- package/lib/api/api/close_point_in_time.d.ts +2 -2
- package/lib/api/api/close_point_in_time.js +4 -1
- package/lib/api/api/close_point_in_time.js.map +1 -1
- package/lib/api/api/cluster.d.ts +24 -24
- package/lib/api/api/cluster.js +89 -16
- package/lib/api/api/cluster.js.map +1 -1
- package/lib/api/api/connector.d.ts +245 -0
- package/lib/api/api/connector.js +1036 -0
- package/lib/api/api/connector.js.map +1 -0
- package/lib/api/api/count.d.ts +1 -1
- package/lib/api/api/count.js +7 -1
- package/lib/api/api/count.js.map +1 -1
- package/lib/api/api/create.d.ts +2 -2
- package/lib/api/api/create.js +8 -1
- package/lib/api/api/create.js.map +1 -1
- package/lib/api/api/dangling_indices.d.ts +3 -3
- package/lib/api/api/dangling_indices.js +18 -3
- package/lib/api/api/dangling_indices.js.map +1 -1
- package/lib/api/api/delete.d.ts +2 -2
- package/lib/api/api/delete.js +8 -1
- package/lib/api/api/delete.js.map +1 -1
- package/lib/api/api/delete_by_query.d.ts +2 -2
- package/lib/api/api/delete_by_query.js +7 -1
- package/lib/api/api/delete_by_query.js.map +1 -1
- package/lib/api/api/delete_by_query_rethrottle.d.ts +1 -1
- package/lib/api/api/delete_by_query_rethrottle.js +7 -1
- package/lib/api/api/delete_by_query_rethrottle.js.map +1 -1
- package/lib/api/api/delete_script.d.ts +2 -2
- package/lib/api/api/delete_script.js +7 -1
- package/lib/api/api/delete_script.js.map +1 -1
- package/lib/api/api/enrich.d.ts +8 -8
- package/lib/api/api/enrich.js +32 -5
- package/lib/api/api/enrich.js.map +1 -1
- package/lib/api/api/eql.d.ts +7 -7
- package/lib/api/api/eql.js +28 -4
- package/lib/api/api/eql.js.map +1 -1
- package/lib/api/api/esql.d.ts +16 -2
- package/lib/api/api/esql.js +47 -1
- package/lib/api/api/esql.js.map +1 -1
- package/lib/api/api/exists.d.ts +2 -2
- package/lib/api/api/exists.js +8 -1
- package/lib/api/api/exists.js.map +1 -1
- package/lib/api/api/exists_source.d.ts +2 -2
- package/lib/api/api/exists_source.js +8 -1
- package/lib/api/api/exists_source.js.map +1 -1
- package/lib/api/api/explain.d.ts +2 -2
- package/lib/api/api/explain.js +8 -1
- package/lib/api/api/explain.js.map +1 -1
- package/lib/api/api/features.d.ts +2 -2
- package/lib/api/api/features.js +8 -2
- package/lib/api/api/features.js.map +1 -1
- package/lib/api/api/field_caps.d.ts +2 -2
- package/lib/api/api/field_caps.js +7 -1
- package/lib/api/api/field_caps.js.map +1 -1
- package/lib/api/api/fleet.d.ts +3 -3
- package/lib/api/api/fleet.js +39 -6
- package/lib/api/api/fleet.js.map +1 -1
- package/lib/api/api/get.d.ts +1 -1
- package/lib/api/api/get.js +8 -1
- package/lib/api/api/get.js.map +1 -1
- package/lib/api/api/get_script.d.ts +2 -2
- package/lib/api/api/get_script.js +7 -1
- package/lib/api/api/get_script.js.map +1 -1
- package/lib/api/api/get_script_context.d.ts +1 -1
- package/lib/api/api/get_script_context.js +4 -1
- package/lib/api/api/get_script_context.js.map +1 -1
- package/lib/api/api/get_script_languages.d.ts +1 -1
- package/lib/api/api/get_script_languages.js +4 -1
- package/lib/api/api/get_script_languages.js.map +1 -1
- package/lib/api/api/get_source.d.ts +1 -1
- package/lib/api/api/get_source.js +8 -1
- package/lib/api/api/get_source.js.map +1 -1
- package/lib/api/api/graph.d.ts +2 -2
- package/lib/api/api/graph.js +7 -1
- package/lib/api/api/graph.js.map +1 -1
- package/lib/api/api/health_report.d.ts +1 -1
- package/lib/api/api/health_report.js +7 -1
- package/lib/api/api/health_report.js.map +1 -1
- package/lib/api/api/ilm.d.ts +16 -16
- package/lib/api/api/ilm.js +65 -11
- package/lib/api/api/ilm.js.map +1 -1
- package/lib/api/api/index.d.ts +2 -2
- package/lib/api/api/index.js +8 -1
- package/lib/api/api/index.js.map +1 -1
- package/lib/api/api/indices.d.ts +111 -111
- package/lib/api/api/indices.js +420 -59
- package/lib/api/api/indices.js.map +1 -1
- package/lib/api/api/inference.d.ts +17 -17
- package/lib/api/api/inference.js +42 -9
- package/lib/api/api/inference.js.map +1 -1
- package/lib/api/api/info.d.ts +1 -1
- package/lib/api/api/info.js +4 -1
- package/lib/api/api/info.js.map +1 -1
- package/lib/api/api/ingest.d.ts +33 -12
- package/lib/api/api/ingest.js +113 -6
- package/lib/api/api/ingest.js.map +1 -1
- package/lib/api/api/knn_search.d.ts +1 -1
- package/lib/api/api/knn_search.js +7 -1
- package/lib/api/api/knn_search.js.map +1 -1
- package/lib/api/api/license.d.ts +10 -10
- package/lib/api/api/license.js +28 -7
- package/lib/api/api/license.js.map +1 -1
- package/lib/api/api/logstash.d.ts +6 -6
- package/lib/api/api/logstash.js +21 -3
- package/lib/api/api/logstash.js.map +1 -1
- package/lib/api/api/mget.d.ts +1 -1
- package/lib/api/api/mget.js +7 -1
- package/lib/api/api/mget.js.map +1 -1
- package/lib/api/api/migration.d.ts +3 -3
- package/lib/api/api/migration.js +15 -3
- package/lib/api/api/migration.js.map +1 -1
- package/lib/api/api/ml.d.ts +131 -131
- package/lib/api/api/ml.js +508 -73
- package/lib/api/api/ml.js.map +1 -1
- package/lib/api/api/monitoring.d.ts +1 -1
- package/lib/api/api/monitoring.js +7 -1
- package/lib/api/api/monitoring.js.map +1 -1
- package/lib/api/api/msearch.d.ts +1 -1
- package/lib/api/api/msearch.js +7 -1
- package/lib/api/api/msearch.js.map +1 -1
- package/lib/api/api/msearch_template.d.ts +2 -2
- package/lib/api/api/msearch_template.js +7 -1
- package/lib/api/api/msearch_template.js.map +1 -1
- package/lib/api/api/mtermvectors.d.ts +1 -1
- package/lib/api/api/mtermvectors.js +7 -1
- package/lib/api/api/mtermvectors.js.map +1 -1
- package/lib/api/api/nodes.d.ts +14 -14
- package/lib/api/api/nodes.js +54 -7
- package/lib/api/api/nodes.js.map +1 -1
- package/lib/api/api/open_point_in_time.d.ts +2 -2
- package/lib/api/api/open_point_in_time.js +7 -1
- package/lib/api/api/open_point_in_time.js.map +1 -1
- package/lib/api/api/ping.d.ts +1 -1
- package/lib/api/api/ping.js +4 -1
- package/lib/api/api/ping.js.map +1 -1
- package/lib/api/api/profiling.d.ts +39 -0
- package/lib/api/api/{query_ruleset.js → profiling.js} +38 -41
- package/lib/api/api/profiling.js.map +1 -0
- package/lib/api/api/put_script.d.ts +2 -2
- package/lib/api/api/put_script.js +8 -1
- package/lib/api/api/put_script.js.map +1 -1
- package/lib/api/api/query_rules.d.ts +60 -0
- package/lib/api/api/query_rules.js +223 -0
- package/lib/api/api/query_rules.js.map +1 -0
- package/lib/api/api/rank_eval.d.ts +2 -2
- package/lib/api/api/rank_eval.js +7 -1
- package/lib/api/api/rank_eval.js.map +1 -1
- package/lib/api/api/reindex.d.ts +1 -1
- package/lib/api/api/reindex.js +4 -1
- package/lib/api/api/reindex.js.map +1 -1
- package/lib/api/api/reindex_rethrottle.d.ts +2 -2
- package/lib/api/api/reindex_rethrottle.js +7 -1
- package/lib/api/api/reindex_rethrottle.js.map +1 -1
- package/lib/api/api/render_search_template.d.ts +2 -2
- package/lib/api/api/render_search_template.js +7 -1
- package/lib/api/api/render_search_template.js.map +1 -1
- package/lib/api/api/rollup.d.ts +10 -10
- package/lib/api/api/rollup.js +56 -8
- package/lib/api/api/rollup.js.map +1 -1
- package/lib/api/api/scripts_painless_execute.d.ts +2 -2
- package/lib/api/api/scripts_painless_execute.js +4 -1
- package/lib/api/api/scripts_painless_execute.js.map +1 -1
- package/lib/api/api/scroll.d.ts +1 -1
- package/lib/api/api/scroll.js +7 -1
- package/lib/api/api/scroll.js.map +1 -1
- package/lib/api/api/search.d.ts +2 -2
- package/lib/api/api/search.js +7 -1
- package/lib/api/api/search.js.map +1 -1
- package/lib/api/api/search_application.d.ts +11 -11
- package/lib/api/api/search_application.js +68 -10
- package/lib/api/api/search_application.js.map +1 -1
- package/lib/api/api/search_mvt.d.ts +1 -1
- package/lib/api/api/search_mvt.js +11 -1
- package/lib/api/api/search_mvt.js.map +1 -1
- package/lib/api/api/search_shards.d.ts +1 -1
- package/lib/api/api/search_shards.js +7 -1
- package/lib/api/api/search_shards.js.map +1 -1
- package/lib/api/api/search_template.d.ts +2 -2
- package/lib/api/api/search_template.js +7 -1
- package/lib/api/api/search_template.js.map +1 -1
- package/lib/api/api/searchable_snapshots.d.ts +4 -4
- package/lib/api/api/searchable_snapshots.js +29 -4
- package/lib/api/api/searchable_snapshots.js.map +1 -1
- package/lib/api/api/security.d.ts +110 -82
- package/lib/api/api/security.js +478 -60
- package/lib/api/api/security.js.map +1 -1
- package/lib/api/api/shutdown.js +21 -3
- package/lib/api/api/shutdown.js.map +1 -1
- package/lib/api/api/simulate.d.ts +18 -0
- package/lib/api/api/simulate.js +64 -0
- package/lib/api/api/simulate.js.map +1 -0
- package/lib/api/api/slm.d.ts +9 -9
- package/lib/api/api/slm.js +48 -9
- package/lib/api/api/slm.js.map +1 -1
- package/lib/api/api/snapshot.d.ts +13 -13
- package/lib/api/api/snapshot.js +91 -12
- package/lib/api/api/snapshot.js.map +1 -1
- package/lib/api/api/sql.d.ts +6 -6
- package/lib/api/api/sql.js +33 -6
- package/lib/api/api/sql.js.map +1 -1
- package/lib/api/api/ssl.d.ts +1 -1
- package/lib/api/api/ssl.js +4 -1
- package/lib/api/api/ssl.js.map +1 -1
- package/lib/api/api/synonyms.d.ts +8 -8
- package/lib/api/api/synonyms.js +49 -7
- package/lib/api/api/synonyms.js.map +1 -1
- package/lib/api/api/tasks.d.ts +4 -4
- package/lib/api/api/tasks.js +18 -3
- package/lib/api/api/tasks.js.map +1 -1
- package/lib/api/api/terms_enum.d.ts +1 -1
- package/lib/api/api/terms_enum.js +7 -1
- package/lib/api/api/terms_enum.js.map +1 -1
- package/lib/api/api/termvectors.d.ts +1 -1
- package/lib/api/api/termvectors.js +8 -1
- package/lib/api/api/termvectors.js.map +1 -1
- package/lib/api/api/text_structure.d.ts +16 -2
- package/lib/api/api/text_structure.js +48 -2
- package/lib/api/api/text_structure.js.map +1 -1
- package/lib/api/api/transform.d.ts +26 -19
- package/lib/api/api/transform.js +94 -11
- package/lib/api/api/transform.js.map +1 -1
- package/lib/api/api/update.d.ts +1 -1
- package/lib/api/api/update.js +8 -1
- package/lib/api/api/update.js.map +1 -1
- package/lib/api/api/update_by_query.d.ts +2 -2
- package/lib/api/api/update_by_query.js +7 -1
- package/lib/api/api/update_by_query.js.map +1 -1
- package/lib/api/api/update_by_query_rethrottle.d.ts +1 -1
- package/lib/api/api/update_by_query_rethrottle.js +7 -1
- package/lib/api/api/update_by_query_rethrottle.js.map +1 -1
- package/lib/api/api/watcher.d.ts +14 -14
- package/lib/api/api/watcher.js +77 -13
- package/lib/api/api/watcher.js.map +1 -1
- package/lib/api/api/xpack.d.ts +4 -4
- package/lib/api/api/xpack.js +8 -2
- package/lib/api/api/xpack.js.map +1 -1
- package/lib/api/index.d.ts +18 -4
- package/lib/api/index.js +45 -7
- package/lib/api/index.js.map +1 -1
- package/lib/api/types.d.ts +428 -220
- package/lib/api/typesWithBodyKey.d.ts +444 -221
- package/package.json +3 -3
- package/lib/api/api/query_ruleset.d.ts +0 -39
- package/lib/api/api/query_ruleset.js.map +0 -1
package/lib/api/api/security.js
CHANGED
|
@@ -57,7 +57,10 @@ class Security {
|
|
|
57
57
|
}
|
|
58
58
|
const method = 'POST';
|
|
59
59
|
const path = '/_security/profile/_activate';
|
|
60
|
-
|
|
60
|
+
const meta = {
|
|
61
|
+
name: 'security.activate_user_profile'
|
|
62
|
+
};
|
|
63
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
61
64
|
}
|
|
62
65
|
async authenticate(params, options) {
|
|
63
66
|
const acceptedPath = [];
|
|
@@ -75,7 +78,78 @@ class Security {
|
|
|
75
78
|
}
|
|
76
79
|
const method = 'GET';
|
|
77
80
|
const path = '/_security/_authenticate';
|
|
78
|
-
|
|
81
|
+
const meta = {
|
|
82
|
+
name: 'security.authenticate'
|
|
83
|
+
};
|
|
84
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
85
|
+
}
|
|
86
|
+
async bulkDeleteRole(params, options) {
|
|
87
|
+
const acceptedPath = [];
|
|
88
|
+
const acceptedBody = ['names'];
|
|
89
|
+
const querystring = {};
|
|
90
|
+
// @ts-expect-error
|
|
91
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
92
|
+
let body;
|
|
93
|
+
if (typeof userBody === 'string') {
|
|
94
|
+
body = userBody;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
98
|
+
}
|
|
99
|
+
for (const key in params) {
|
|
100
|
+
if (acceptedBody.includes(key)) {
|
|
101
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
102
|
+
// @ts-expect-error
|
|
103
|
+
body[key] = params[key];
|
|
104
|
+
}
|
|
105
|
+
else if (acceptedPath.includes(key)) {
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
else if (key !== 'body') {
|
|
109
|
+
// @ts-expect-error
|
|
110
|
+
querystring[key] = params[key];
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
const method = 'DELETE';
|
|
114
|
+
const path = '/_security/role';
|
|
115
|
+
const meta = {
|
|
116
|
+
name: 'security.bulk_delete_role'
|
|
117
|
+
};
|
|
118
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
119
|
+
}
|
|
120
|
+
async bulkPutRole(params, options) {
|
|
121
|
+
const acceptedPath = [];
|
|
122
|
+
const acceptedBody = ['roles'];
|
|
123
|
+
const querystring = {};
|
|
124
|
+
// @ts-expect-error
|
|
125
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
126
|
+
let body;
|
|
127
|
+
if (typeof userBody === 'string') {
|
|
128
|
+
body = userBody;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
132
|
+
}
|
|
133
|
+
for (const key in params) {
|
|
134
|
+
if (acceptedBody.includes(key)) {
|
|
135
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
136
|
+
// @ts-expect-error
|
|
137
|
+
body[key] = params[key];
|
|
138
|
+
}
|
|
139
|
+
else if (acceptedPath.includes(key)) {
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
else if (key !== 'body') {
|
|
143
|
+
// @ts-expect-error
|
|
144
|
+
querystring[key] = params[key];
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const method = 'POST';
|
|
148
|
+
const path = '/_security/role';
|
|
149
|
+
const meta = {
|
|
150
|
+
name: 'security.bulk_put_role'
|
|
151
|
+
};
|
|
152
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
79
153
|
}
|
|
80
154
|
async bulkUpdateApiKeys(params, options) {
|
|
81
155
|
const acceptedPath = [];
|
|
@@ -92,7 +166,10 @@ class Security {
|
|
|
92
166
|
}
|
|
93
167
|
const method = 'POST';
|
|
94
168
|
const path = '/_security/api_key/_bulk_update';
|
|
95
|
-
|
|
169
|
+
const meta = {
|
|
170
|
+
name: 'security.bulk_update_api_keys'
|
|
171
|
+
};
|
|
172
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
96
173
|
}
|
|
97
174
|
async changePassword(params, options) {
|
|
98
175
|
const acceptedPath = ['username'];
|
|
@@ -132,7 +209,13 @@ class Security {
|
|
|
132
209
|
method = 'PUT';
|
|
133
210
|
path = '/_security/user/_password';
|
|
134
211
|
}
|
|
135
|
-
|
|
212
|
+
const meta = {
|
|
213
|
+
name: 'security.change_password',
|
|
214
|
+
pathParts: {
|
|
215
|
+
username: params.username
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
136
219
|
}
|
|
137
220
|
async clearApiKeyCache(params, options) {
|
|
138
221
|
const acceptedPath = ['ids'];
|
|
@@ -149,7 +232,13 @@ class Security {
|
|
|
149
232
|
}
|
|
150
233
|
const method = 'POST';
|
|
151
234
|
const path = `/_security/api_key/${encodeURIComponent(params.ids.toString())}/_clear_cache`;
|
|
152
|
-
|
|
235
|
+
const meta = {
|
|
236
|
+
name: 'security.clear_api_key_cache',
|
|
237
|
+
pathParts: {
|
|
238
|
+
ids: params.ids
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
153
242
|
}
|
|
154
243
|
async clearCachedPrivileges(params, options) {
|
|
155
244
|
const acceptedPath = ['application'];
|
|
@@ -166,7 +255,13 @@ class Security {
|
|
|
166
255
|
}
|
|
167
256
|
const method = 'POST';
|
|
168
257
|
const path = `/_security/privilege/${encodeURIComponent(params.application.toString())}/_clear_cache`;
|
|
169
|
-
|
|
258
|
+
const meta = {
|
|
259
|
+
name: 'security.clear_cached_privileges',
|
|
260
|
+
pathParts: {
|
|
261
|
+
application: params.application
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
170
265
|
}
|
|
171
266
|
async clearCachedRealms(params, options) {
|
|
172
267
|
const acceptedPath = ['realms'];
|
|
@@ -183,7 +278,13 @@ class Security {
|
|
|
183
278
|
}
|
|
184
279
|
const method = 'POST';
|
|
185
280
|
const path = `/_security/realm/${encodeURIComponent(params.realms.toString())}/_clear_cache`;
|
|
186
|
-
|
|
281
|
+
const meta = {
|
|
282
|
+
name: 'security.clear_cached_realms',
|
|
283
|
+
pathParts: {
|
|
284
|
+
realms: params.realms
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
187
288
|
}
|
|
188
289
|
async clearCachedRoles(params, options) {
|
|
189
290
|
const acceptedPath = ['name'];
|
|
@@ -200,7 +301,13 @@ class Security {
|
|
|
200
301
|
}
|
|
201
302
|
const method = 'POST';
|
|
202
303
|
const path = `/_security/role/${encodeURIComponent(params.name.toString())}/_clear_cache`;
|
|
203
|
-
|
|
304
|
+
const meta = {
|
|
305
|
+
name: 'security.clear_cached_roles',
|
|
306
|
+
pathParts: {
|
|
307
|
+
name: params.name
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
204
311
|
}
|
|
205
312
|
async clearCachedServiceTokens(params, options) {
|
|
206
313
|
const acceptedPath = ['namespace', 'service', 'name'];
|
|
@@ -217,7 +324,15 @@ class Security {
|
|
|
217
324
|
}
|
|
218
325
|
const method = 'POST';
|
|
219
326
|
const path = `/_security/service/${encodeURIComponent(params.namespace.toString())}/${encodeURIComponent(params.service.toString())}/credential/token/${encodeURIComponent(params.name.toString())}/_clear_cache`;
|
|
220
|
-
|
|
327
|
+
const meta = {
|
|
328
|
+
name: 'security.clear_cached_service_tokens',
|
|
329
|
+
pathParts: {
|
|
330
|
+
namespace: params.namespace,
|
|
331
|
+
service: params.service,
|
|
332
|
+
name: params.name
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
221
336
|
}
|
|
222
337
|
async createApiKey(params, options) {
|
|
223
338
|
const acceptedPath = [];
|
|
@@ -249,7 +364,10 @@ class Security {
|
|
|
249
364
|
}
|
|
250
365
|
const method = 'PUT';
|
|
251
366
|
const path = '/_security/api_key';
|
|
252
|
-
|
|
367
|
+
const meta = {
|
|
368
|
+
name: 'security.create_api_key'
|
|
369
|
+
};
|
|
370
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
253
371
|
}
|
|
254
372
|
async createCrossClusterApiKey(params, options) {
|
|
255
373
|
const acceptedPath = [];
|
|
@@ -266,7 +384,10 @@ class Security {
|
|
|
266
384
|
}
|
|
267
385
|
const method = 'POST';
|
|
268
386
|
const path = '/_security/cross_cluster/api_key';
|
|
269
|
-
|
|
387
|
+
const meta = {
|
|
388
|
+
name: 'security.create_cross_cluster_api_key'
|
|
389
|
+
};
|
|
390
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
270
391
|
}
|
|
271
392
|
async createServiceToken(params, options) {
|
|
272
393
|
const acceptedPath = ['namespace', 'service', 'name'];
|
|
@@ -291,7 +412,15 @@ class Security {
|
|
|
291
412
|
method = 'POST';
|
|
292
413
|
path = `/_security/service/${encodeURIComponent(params.namespace.toString())}/${encodeURIComponent(params.service.toString())}/credential/token`;
|
|
293
414
|
}
|
|
294
|
-
|
|
415
|
+
const meta = {
|
|
416
|
+
name: 'security.create_service_token',
|
|
417
|
+
pathParts: {
|
|
418
|
+
namespace: params.namespace,
|
|
419
|
+
service: params.service,
|
|
420
|
+
name: params.name
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
295
424
|
}
|
|
296
425
|
async deletePrivileges(params, options) {
|
|
297
426
|
const acceptedPath = ['application', 'name'];
|
|
@@ -308,7 +437,14 @@ class Security {
|
|
|
308
437
|
}
|
|
309
438
|
const method = 'DELETE';
|
|
310
439
|
const path = `/_security/privilege/${encodeURIComponent(params.application.toString())}/${encodeURIComponent(params.name.toString())}`;
|
|
311
|
-
|
|
440
|
+
const meta = {
|
|
441
|
+
name: 'security.delete_privileges',
|
|
442
|
+
pathParts: {
|
|
443
|
+
application: params.application,
|
|
444
|
+
name: params.name
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
312
448
|
}
|
|
313
449
|
async deleteRole(params, options) {
|
|
314
450
|
const acceptedPath = ['name'];
|
|
@@ -325,7 +461,13 @@ class Security {
|
|
|
325
461
|
}
|
|
326
462
|
const method = 'DELETE';
|
|
327
463
|
const path = `/_security/role/${encodeURIComponent(params.name.toString())}`;
|
|
328
|
-
|
|
464
|
+
const meta = {
|
|
465
|
+
name: 'security.delete_role',
|
|
466
|
+
pathParts: {
|
|
467
|
+
name: params.name
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
329
471
|
}
|
|
330
472
|
async deleteRoleMapping(params, options) {
|
|
331
473
|
const acceptedPath = ['name'];
|
|
@@ -342,7 +484,13 @@ class Security {
|
|
|
342
484
|
}
|
|
343
485
|
const method = 'DELETE';
|
|
344
486
|
const path = `/_security/role_mapping/${encodeURIComponent(params.name.toString())}`;
|
|
345
|
-
|
|
487
|
+
const meta = {
|
|
488
|
+
name: 'security.delete_role_mapping',
|
|
489
|
+
pathParts: {
|
|
490
|
+
name: params.name
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
346
494
|
}
|
|
347
495
|
async deleteServiceToken(params, options) {
|
|
348
496
|
const acceptedPath = ['namespace', 'service', 'name'];
|
|
@@ -359,7 +507,15 @@ class Security {
|
|
|
359
507
|
}
|
|
360
508
|
const method = 'DELETE';
|
|
361
509
|
const path = `/_security/service/${encodeURIComponent(params.namespace.toString())}/${encodeURIComponent(params.service.toString())}/credential/token/${encodeURIComponent(params.name.toString())}`;
|
|
362
|
-
|
|
510
|
+
const meta = {
|
|
511
|
+
name: 'security.delete_service_token',
|
|
512
|
+
pathParts: {
|
|
513
|
+
namespace: params.namespace,
|
|
514
|
+
service: params.service,
|
|
515
|
+
name: params.name
|
|
516
|
+
}
|
|
517
|
+
};
|
|
518
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
363
519
|
}
|
|
364
520
|
async deleteUser(params, options) {
|
|
365
521
|
const acceptedPath = ['username'];
|
|
@@ -376,7 +532,13 @@ class Security {
|
|
|
376
532
|
}
|
|
377
533
|
const method = 'DELETE';
|
|
378
534
|
const path = `/_security/user/${encodeURIComponent(params.username.toString())}`;
|
|
379
|
-
|
|
535
|
+
const meta = {
|
|
536
|
+
name: 'security.delete_user',
|
|
537
|
+
pathParts: {
|
|
538
|
+
username: params.username
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
380
542
|
}
|
|
381
543
|
async disableUser(params, options) {
|
|
382
544
|
const acceptedPath = ['username'];
|
|
@@ -393,7 +555,13 @@ class Security {
|
|
|
393
555
|
}
|
|
394
556
|
const method = 'PUT';
|
|
395
557
|
const path = `/_security/user/${encodeURIComponent(params.username.toString())}/_disable`;
|
|
396
|
-
|
|
558
|
+
const meta = {
|
|
559
|
+
name: 'security.disable_user',
|
|
560
|
+
pathParts: {
|
|
561
|
+
username: params.username
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
397
565
|
}
|
|
398
566
|
async disableUserProfile(params, options) {
|
|
399
567
|
const acceptedPath = ['uid'];
|
|
@@ -410,7 +578,13 @@ class Security {
|
|
|
410
578
|
}
|
|
411
579
|
const method = 'PUT';
|
|
412
580
|
const path = `/_security/profile/${encodeURIComponent(params.uid.toString())}/_disable`;
|
|
413
|
-
|
|
581
|
+
const meta = {
|
|
582
|
+
name: 'security.disable_user_profile',
|
|
583
|
+
pathParts: {
|
|
584
|
+
uid: params.uid
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
414
588
|
}
|
|
415
589
|
async enableUser(params, options) {
|
|
416
590
|
const acceptedPath = ['username'];
|
|
@@ -427,7 +601,13 @@ class Security {
|
|
|
427
601
|
}
|
|
428
602
|
const method = 'PUT';
|
|
429
603
|
const path = `/_security/user/${encodeURIComponent(params.username.toString())}/_enable`;
|
|
430
|
-
|
|
604
|
+
const meta = {
|
|
605
|
+
name: 'security.enable_user',
|
|
606
|
+
pathParts: {
|
|
607
|
+
username: params.username
|
|
608
|
+
}
|
|
609
|
+
};
|
|
610
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
431
611
|
}
|
|
432
612
|
async enableUserProfile(params, options) {
|
|
433
613
|
const acceptedPath = ['uid'];
|
|
@@ -444,7 +624,13 @@ class Security {
|
|
|
444
624
|
}
|
|
445
625
|
const method = 'PUT';
|
|
446
626
|
const path = `/_security/profile/${encodeURIComponent(params.uid.toString())}/_enable`;
|
|
447
|
-
|
|
627
|
+
const meta = {
|
|
628
|
+
name: 'security.enable_user_profile',
|
|
629
|
+
pathParts: {
|
|
630
|
+
uid: params.uid
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
448
634
|
}
|
|
449
635
|
async enrollKibana(params, options) {
|
|
450
636
|
const acceptedPath = [];
|
|
@@ -462,7 +648,10 @@ class Security {
|
|
|
462
648
|
}
|
|
463
649
|
const method = 'GET';
|
|
464
650
|
const path = '/_security/enroll/kibana';
|
|
465
|
-
|
|
651
|
+
const meta = {
|
|
652
|
+
name: 'security.enroll_kibana'
|
|
653
|
+
};
|
|
654
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
466
655
|
}
|
|
467
656
|
async enrollNode(params, options) {
|
|
468
657
|
const acceptedPath = [];
|
|
@@ -480,7 +669,10 @@ class Security {
|
|
|
480
669
|
}
|
|
481
670
|
const method = 'GET';
|
|
482
671
|
const path = '/_security/enroll/node';
|
|
483
|
-
|
|
672
|
+
const meta = {
|
|
673
|
+
name: 'security.enroll_node'
|
|
674
|
+
};
|
|
675
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
484
676
|
}
|
|
485
677
|
async getApiKey(params, options) {
|
|
486
678
|
const acceptedPath = [];
|
|
@@ -498,7 +690,10 @@ class Security {
|
|
|
498
690
|
}
|
|
499
691
|
const method = 'GET';
|
|
500
692
|
const path = '/_security/api_key';
|
|
501
|
-
|
|
693
|
+
const meta = {
|
|
694
|
+
name: 'security.get_api_key'
|
|
695
|
+
};
|
|
696
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
502
697
|
}
|
|
503
698
|
async getBuiltinPrivileges(params, options) {
|
|
504
699
|
const acceptedPath = [];
|
|
@@ -516,7 +711,10 @@ class Security {
|
|
|
516
711
|
}
|
|
517
712
|
const method = 'GET';
|
|
518
713
|
const path = '/_security/privilege/_builtin';
|
|
519
|
-
|
|
714
|
+
const meta = {
|
|
715
|
+
name: 'security.get_builtin_privileges'
|
|
716
|
+
};
|
|
717
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
520
718
|
}
|
|
521
719
|
async getPrivileges(params, options) {
|
|
522
720
|
const acceptedPath = ['application', 'name'];
|
|
@@ -546,7 +744,14 @@ class Security {
|
|
|
546
744
|
method = 'GET';
|
|
547
745
|
path = '/_security/privilege';
|
|
548
746
|
}
|
|
549
|
-
|
|
747
|
+
const meta = {
|
|
748
|
+
name: 'security.get_privileges',
|
|
749
|
+
pathParts: {
|
|
750
|
+
application: params.application,
|
|
751
|
+
name: params.name
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
550
755
|
}
|
|
551
756
|
async getRole(params, options) {
|
|
552
757
|
const acceptedPath = ['name'];
|
|
@@ -572,7 +777,13 @@ class Security {
|
|
|
572
777
|
method = 'GET';
|
|
573
778
|
path = '/_security/role';
|
|
574
779
|
}
|
|
575
|
-
|
|
780
|
+
const meta = {
|
|
781
|
+
name: 'security.get_role',
|
|
782
|
+
pathParts: {
|
|
783
|
+
name: params.name
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
576
787
|
}
|
|
577
788
|
async getRoleMapping(params, options) {
|
|
578
789
|
const acceptedPath = ['name'];
|
|
@@ -598,7 +809,13 @@ class Security {
|
|
|
598
809
|
method = 'GET';
|
|
599
810
|
path = '/_security/role_mapping';
|
|
600
811
|
}
|
|
601
|
-
|
|
812
|
+
const meta = {
|
|
813
|
+
name: 'security.get_role_mapping',
|
|
814
|
+
pathParts: {
|
|
815
|
+
name: params.name
|
|
816
|
+
}
|
|
817
|
+
};
|
|
818
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
602
819
|
}
|
|
603
820
|
async getServiceAccounts(params, options) {
|
|
604
821
|
const acceptedPath = ['namespace', 'service'];
|
|
@@ -628,7 +845,14 @@ class Security {
|
|
|
628
845
|
method = 'GET';
|
|
629
846
|
path = '/_security/service';
|
|
630
847
|
}
|
|
631
|
-
|
|
848
|
+
const meta = {
|
|
849
|
+
name: 'security.get_service_accounts',
|
|
850
|
+
pathParts: {
|
|
851
|
+
namespace: params.namespace,
|
|
852
|
+
service: params.service
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
632
856
|
}
|
|
633
857
|
async getServiceCredentials(params, options) {
|
|
634
858
|
const acceptedPath = ['namespace', 'service'];
|
|
@@ -645,7 +869,14 @@ class Security {
|
|
|
645
869
|
}
|
|
646
870
|
const method = 'GET';
|
|
647
871
|
const path = `/_security/service/${encodeURIComponent(params.namespace.toString())}/${encodeURIComponent(params.service.toString())}/credential`;
|
|
648
|
-
|
|
872
|
+
const meta = {
|
|
873
|
+
name: 'security.get_service_credentials',
|
|
874
|
+
pathParts: {
|
|
875
|
+
namespace: params.namespace,
|
|
876
|
+
service: params.service
|
|
877
|
+
}
|
|
878
|
+
};
|
|
879
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
649
880
|
}
|
|
650
881
|
async getSettings(params, options) {
|
|
651
882
|
const acceptedPath = [];
|
|
@@ -662,7 +893,10 @@ class Security {
|
|
|
662
893
|
}
|
|
663
894
|
const method = 'GET';
|
|
664
895
|
const path = '/_security/settings';
|
|
665
|
-
|
|
896
|
+
const meta = {
|
|
897
|
+
name: 'security.get_settings'
|
|
898
|
+
};
|
|
899
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
666
900
|
}
|
|
667
901
|
async getToken(params, options) {
|
|
668
902
|
const acceptedPath = [];
|
|
@@ -694,7 +928,10 @@ class Security {
|
|
|
694
928
|
}
|
|
695
929
|
const method = 'POST';
|
|
696
930
|
const path = '/_security/oauth2/token';
|
|
697
|
-
|
|
931
|
+
const meta = {
|
|
932
|
+
name: 'security.get_token'
|
|
933
|
+
};
|
|
934
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
698
935
|
}
|
|
699
936
|
async getUser(params, options) {
|
|
700
937
|
const acceptedPath = ['username'];
|
|
@@ -720,7 +957,13 @@ class Security {
|
|
|
720
957
|
method = 'GET';
|
|
721
958
|
path = '/_security/user';
|
|
722
959
|
}
|
|
723
|
-
|
|
960
|
+
const meta = {
|
|
961
|
+
name: 'security.get_user',
|
|
962
|
+
pathParts: {
|
|
963
|
+
username: params.username
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
724
967
|
}
|
|
725
968
|
async getUserPrivileges(params, options) {
|
|
726
969
|
const acceptedPath = [];
|
|
@@ -738,7 +981,10 @@ class Security {
|
|
|
738
981
|
}
|
|
739
982
|
const method = 'GET';
|
|
740
983
|
const path = '/_security/user/_privileges';
|
|
741
|
-
|
|
984
|
+
const meta = {
|
|
985
|
+
name: 'security.get_user_privileges'
|
|
986
|
+
};
|
|
987
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
742
988
|
}
|
|
743
989
|
async getUserProfile(params, options) {
|
|
744
990
|
const acceptedPath = ['uid'];
|
|
@@ -755,7 +1001,13 @@ class Security {
|
|
|
755
1001
|
}
|
|
756
1002
|
const method = 'GET';
|
|
757
1003
|
const path = `/_security/profile/${encodeURIComponent(params.uid.toString())}`;
|
|
758
|
-
|
|
1004
|
+
const meta = {
|
|
1005
|
+
name: 'security.get_user_profile',
|
|
1006
|
+
pathParts: {
|
|
1007
|
+
uid: params.uid
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
1010
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
759
1011
|
}
|
|
760
1012
|
async grantApiKey(params, options) {
|
|
761
1013
|
const acceptedPath = [];
|
|
@@ -786,7 +1038,10 @@ class Security {
|
|
|
786
1038
|
}
|
|
787
1039
|
const method = 'POST';
|
|
788
1040
|
const path = '/_security/api_key/grant';
|
|
789
|
-
|
|
1041
|
+
const meta = {
|
|
1042
|
+
name: 'security.grant_api_key'
|
|
1043
|
+
};
|
|
1044
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
790
1045
|
}
|
|
791
1046
|
async hasPrivileges(params, options) {
|
|
792
1047
|
const acceptedPath = ['user'];
|
|
@@ -826,7 +1081,13 @@ class Security {
|
|
|
826
1081
|
method = body != null ? 'POST' : 'GET';
|
|
827
1082
|
path = '/_security/user/_has_privileges';
|
|
828
1083
|
}
|
|
829
|
-
|
|
1084
|
+
const meta = {
|
|
1085
|
+
name: 'security.has_privileges',
|
|
1086
|
+
pathParts: {
|
|
1087
|
+
user: params.user
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
830
1091
|
}
|
|
831
1092
|
async hasPrivilegesUserProfile(params, options) {
|
|
832
1093
|
const acceptedPath = [];
|
|
@@ -857,7 +1118,10 @@ class Security {
|
|
|
857
1118
|
}
|
|
858
1119
|
const method = body != null ? 'POST' : 'GET';
|
|
859
1120
|
const path = '/_security/profile/_has_privileges';
|
|
860
|
-
|
|
1121
|
+
const meta = {
|
|
1122
|
+
name: 'security.has_privileges_user_profile'
|
|
1123
|
+
};
|
|
1124
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
861
1125
|
}
|
|
862
1126
|
async invalidateApiKey(params, options) {
|
|
863
1127
|
const acceptedPath = [];
|
|
@@ -889,7 +1153,10 @@ class Security {
|
|
|
889
1153
|
}
|
|
890
1154
|
const method = 'DELETE';
|
|
891
1155
|
const path = '/_security/api_key';
|
|
892
|
-
|
|
1156
|
+
const meta = {
|
|
1157
|
+
name: 'security.invalidate_api_key'
|
|
1158
|
+
};
|
|
1159
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
893
1160
|
}
|
|
894
1161
|
async invalidateToken(params, options) {
|
|
895
1162
|
const acceptedPath = [];
|
|
@@ -921,7 +1188,10 @@ class Security {
|
|
|
921
1188
|
}
|
|
922
1189
|
const method = 'DELETE';
|
|
923
1190
|
const path = '/_security/oauth2/token';
|
|
924
|
-
|
|
1191
|
+
const meta = {
|
|
1192
|
+
name: 'security.invalidate_token'
|
|
1193
|
+
};
|
|
1194
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
925
1195
|
}
|
|
926
1196
|
async oidcAuthenticate(params, options) {
|
|
927
1197
|
const acceptedPath = [];
|
|
@@ -938,7 +1208,10 @@ class Security {
|
|
|
938
1208
|
}
|
|
939
1209
|
const method = 'POST';
|
|
940
1210
|
const path = '/_security/oidc/authenticate';
|
|
941
|
-
|
|
1211
|
+
const meta = {
|
|
1212
|
+
name: 'security.oidc_authenticate'
|
|
1213
|
+
};
|
|
1214
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
942
1215
|
}
|
|
943
1216
|
async oidcLogout(params, options) {
|
|
944
1217
|
const acceptedPath = [];
|
|
@@ -955,7 +1228,10 @@ class Security {
|
|
|
955
1228
|
}
|
|
956
1229
|
const method = 'POST';
|
|
957
1230
|
const path = '/_security/oidc/logout';
|
|
958
|
-
|
|
1231
|
+
const meta = {
|
|
1232
|
+
name: 'security.oidc_logout'
|
|
1233
|
+
};
|
|
1234
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
959
1235
|
}
|
|
960
1236
|
async oidcPrepareAuthentication(params, options) {
|
|
961
1237
|
const acceptedPath = [];
|
|
@@ -972,7 +1248,10 @@ class Security {
|
|
|
972
1248
|
}
|
|
973
1249
|
const method = 'POST';
|
|
974
1250
|
const path = '/_security/oidc/prepare';
|
|
975
|
-
|
|
1251
|
+
const meta = {
|
|
1252
|
+
name: 'security.oidc_prepare_authentication'
|
|
1253
|
+
};
|
|
1254
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
976
1255
|
}
|
|
977
1256
|
async putPrivileges(params, options) {
|
|
978
1257
|
var _a;
|
|
@@ -996,11 +1275,14 @@ class Security {
|
|
|
996
1275
|
}
|
|
997
1276
|
const method = 'PUT';
|
|
998
1277
|
const path = '/_security/privilege';
|
|
999
|
-
|
|
1278
|
+
const meta = {
|
|
1279
|
+
name: 'security.put_privileges'
|
|
1280
|
+
};
|
|
1281
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1000
1282
|
}
|
|
1001
1283
|
async putRole(params, options) {
|
|
1002
1284
|
const acceptedPath = ['name'];
|
|
1003
|
-
const acceptedBody = ['applications', 'cluster', 'global', 'indices', 'metadata', 'run_as', 'transient_metadata'];
|
|
1285
|
+
const acceptedBody = ['applications', 'cluster', 'global', 'indices', 'metadata', 'run_as', 'description', 'transient_metadata'];
|
|
1004
1286
|
const querystring = {};
|
|
1005
1287
|
// @ts-expect-error
|
|
1006
1288
|
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
@@ -1027,7 +1309,13 @@ class Security {
|
|
|
1027
1309
|
}
|
|
1028
1310
|
const method = 'PUT';
|
|
1029
1311
|
const path = `/_security/role/${encodeURIComponent(params.name.toString())}`;
|
|
1030
|
-
|
|
1312
|
+
const meta = {
|
|
1313
|
+
name: 'security.put_role',
|
|
1314
|
+
pathParts: {
|
|
1315
|
+
name: params.name
|
|
1316
|
+
}
|
|
1317
|
+
};
|
|
1318
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1031
1319
|
}
|
|
1032
1320
|
async putRoleMapping(params, options) {
|
|
1033
1321
|
const acceptedPath = ['name'];
|
|
@@ -1058,7 +1346,13 @@ class Security {
|
|
|
1058
1346
|
}
|
|
1059
1347
|
const method = 'PUT';
|
|
1060
1348
|
const path = `/_security/role_mapping/${encodeURIComponent(params.name.toString())}`;
|
|
1061
|
-
|
|
1349
|
+
const meta = {
|
|
1350
|
+
name: 'security.put_role_mapping',
|
|
1351
|
+
pathParts: {
|
|
1352
|
+
name: params.name
|
|
1353
|
+
}
|
|
1354
|
+
};
|
|
1355
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1062
1356
|
}
|
|
1063
1357
|
async putUser(params, options) {
|
|
1064
1358
|
const acceptedPath = [];
|
|
@@ -1089,7 +1383,13 @@ class Security {
|
|
|
1089
1383
|
}
|
|
1090
1384
|
const method = 'PUT';
|
|
1091
1385
|
const path = `/_security/user/${encodeURIComponent(params.username.toString())}`;
|
|
1092
|
-
|
|
1386
|
+
const meta = {
|
|
1387
|
+
name: 'security.put_user',
|
|
1388
|
+
pathParts: {
|
|
1389
|
+
username: params.username
|
|
1390
|
+
}
|
|
1391
|
+
};
|
|
1392
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1093
1393
|
}
|
|
1094
1394
|
async queryApiKeys(params, options) {
|
|
1095
1395
|
const acceptedPath = [];
|
|
@@ -1121,7 +1421,80 @@ class Security {
|
|
|
1121
1421
|
}
|
|
1122
1422
|
const method = body != null ? 'POST' : 'GET';
|
|
1123
1423
|
const path = '/_security/_query/api_key';
|
|
1124
|
-
|
|
1424
|
+
const meta = {
|
|
1425
|
+
name: 'security.query_api_keys'
|
|
1426
|
+
};
|
|
1427
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1428
|
+
}
|
|
1429
|
+
async queryRole(params, options) {
|
|
1430
|
+
const acceptedPath = [];
|
|
1431
|
+
const acceptedBody = ['query', 'from', 'sort', 'size', 'search_after'];
|
|
1432
|
+
const querystring = {};
|
|
1433
|
+
// @ts-expect-error
|
|
1434
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1435
|
+
let body;
|
|
1436
|
+
if (typeof userBody === 'string') {
|
|
1437
|
+
body = userBody;
|
|
1438
|
+
}
|
|
1439
|
+
else {
|
|
1440
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
1441
|
+
}
|
|
1442
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
1443
|
+
for (const key in params) {
|
|
1444
|
+
if (acceptedBody.includes(key)) {
|
|
1445
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
1446
|
+
// @ts-expect-error
|
|
1447
|
+
body[key] = params[key];
|
|
1448
|
+
}
|
|
1449
|
+
else if (acceptedPath.includes(key)) {
|
|
1450
|
+
continue;
|
|
1451
|
+
}
|
|
1452
|
+
else if (key !== 'body') {
|
|
1453
|
+
// @ts-expect-error
|
|
1454
|
+
querystring[key] = params[key];
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
const method = body != null ? 'POST' : 'GET';
|
|
1458
|
+
const path = '/_security/_query/role';
|
|
1459
|
+
const meta = {
|
|
1460
|
+
name: 'security.query_role'
|
|
1461
|
+
};
|
|
1462
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1463
|
+
}
|
|
1464
|
+
async queryUser(params, options) {
|
|
1465
|
+
const acceptedPath = [];
|
|
1466
|
+
const acceptedBody = ['query', 'from', 'sort', 'size', 'search_after'];
|
|
1467
|
+
const querystring = {};
|
|
1468
|
+
// @ts-expect-error
|
|
1469
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1470
|
+
let body;
|
|
1471
|
+
if (typeof userBody === 'string') {
|
|
1472
|
+
body = userBody;
|
|
1473
|
+
}
|
|
1474
|
+
else {
|
|
1475
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
1476
|
+
}
|
|
1477
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
1478
|
+
for (const key in params) {
|
|
1479
|
+
if (acceptedBody.includes(key)) {
|
|
1480
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
1481
|
+
// @ts-expect-error
|
|
1482
|
+
body[key] = params[key];
|
|
1483
|
+
}
|
|
1484
|
+
else if (acceptedPath.includes(key)) {
|
|
1485
|
+
continue;
|
|
1486
|
+
}
|
|
1487
|
+
else if (key !== 'body') {
|
|
1488
|
+
// @ts-expect-error
|
|
1489
|
+
querystring[key] = params[key];
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
const method = body != null ? 'POST' : 'GET';
|
|
1493
|
+
const path = '/_security/_query/user';
|
|
1494
|
+
const meta = {
|
|
1495
|
+
name: 'security.query_user'
|
|
1496
|
+
};
|
|
1497
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1125
1498
|
}
|
|
1126
1499
|
async samlAuthenticate(params, options) {
|
|
1127
1500
|
const acceptedPath = [];
|
|
@@ -1152,7 +1525,10 @@ class Security {
|
|
|
1152
1525
|
}
|
|
1153
1526
|
const method = 'POST';
|
|
1154
1527
|
const path = '/_security/saml/authenticate';
|
|
1155
|
-
|
|
1528
|
+
const meta = {
|
|
1529
|
+
name: 'security.saml_authenticate'
|
|
1530
|
+
};
|
|
1531
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1156
1532
|
}
|
|
1157
1533
|
async samlCompleteLogout(params, options) {
|
|
1158
1534
|
const acceptedPath = [];
|
|
@@ -1183,7 +1559,10 @@ class Security {
|
|
|
1183
1559
|
}
|
|
1184
1560
|
const method = 'POST';
|
|
1185
1561
|
const path = '/_security/saml/complete_logout';
|
|
1186
|
-
|
|
1562
|
+
const meta = {
|
|
1563
|
+
name: 'security.saml_complete_logout'
|
|
1564
|
+
};
|
|
1565
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1187
1566
|
}
|
|
1188
1567
|
async samlInvalidate(params, options) {
|
|
1189
1568
|
const acceptedPath = [];
|
|
@@ -1214,7 +1593,10 @@ class Security {
|
|
|
1214
1593
|
}
|
|
1215
1594
|
const method = 'POST';
|
|
1216
1595
|
const path = '/_security/saml/invalidate';
|
|
1217
|
-
|
|
1596
|
+
const meta = {
|
|
1597
|
+
name: 'security.saml_invalidate'
|
|
1598
|
+
};
|
|
1599
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1218
1600
|
}
|
|
1219
1601
|
async samlLogout(params, options) {
|
|
1220
1602
|
const acceptedPath = [];
|
|
@@ -1245,7 +1627,10 @@ class Security {
|
|
|
1245
1627
|
}
|
|
1246
1628
|
const method = 'POST';
|
|
1247
1629
|
const path = '/_security/saml/logout';
|
|
1248
|
-
|
|
1630
|
+
const meta = {
|
|
1631
|
+
name: 'security.saml_logout'
|
|
1632
|
+
};
|
|
1633
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1249
1634
|
}
|
|
1250
1635
|
async samlPrepareAuthentication(params, options) {
|
|
1251
1636
|
const acceptedPath = [];
|
|
@@ -1277,7 +1662,10 @@ class Security {
|
|
|
1277
1662
|
}
|
|
1278
1663
|
const method = 'POST';
|
|
1279
1664
|
const path = '/_security/saml/prepare';
|
|
1280
|
-
|
|
1665
|
+
const meta = {
|
|
1666
|
+
name: 'security.saml_prepare_authentication'
|
|
1667
|
+
};
|
|
1668
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1281
1669
|
}
|
|
1282
1670
|
async samlServiceProviderMetadata(params, options) {
|
|
1283
1671
|
const acceptedPath = ['realm_name'];
|
|
@@ -1294,7 +1682,13 @@ class Security {
|
|
|
1294
1682
|
}
|
|
1295
1683
|
const method = 'GET';
|
|
1296
1684
|
const path = `/_security/saml/metadata/${encodeURIComponent(params.realm_name.toString())}`;
|
|
1297
|
-
|
|
1685
|
+
const meta = {
|
|
1686
|
+
name: 'security.saml_service_provider_metadata',
|
|
1687
|
+
pathParts: {
|
|
1688
|
+
realm_name: params.realm_name
|
|
1689
|
+
}
|
|
1690
|
+
};
|
|
1691
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1298
1692
|
}
|
|
1299
1693
|
async suggestUserProfiles(params, options) {
|
|
1300
1694
|
const acceptedPath = [];
|
|
@@ -1326,7 +1720,10 @@ class Security {
|
|
|
1326
1720
|
}
|
|
1327
1721
|
const method = body != null ? 'POST' : 'GET';
|
|
1328
1722
|
const path = '/_security/profile/_suggest';
|
|
1329
|
-
|
|
1723
|
+
const meta = {
|
|
1724
|
+
name: 'security.suggest_user_profiles'
|
|
1725
|
+
};
|
|
1726
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1330
1727
|
}
|
|
1331
1728
|
async updateApiKey(params, options) {
|
|
1332
1729
|
const acceptedPath = ['id'];
|
|
@@ -1357,7 +1754,13 @@ class Security {
|
|
|
1357
1754
|
}
|
|
1358
1755
|
const method = 'PUT';
|
|
1359
1756
|
const path = `/_security/api_key/${encodeURIComponent(params.id.toString())}`;
|
|
1360
|
-
|
|
1757
|
+
const meta = {
|
|
1758
|
+
name: 'security.update_api_key',
|
|
1759
|
+
pathParts: {
|
|
1760
|
+
id: params.id
|
|
1761
|
+
}
|
|
1762
|
+
};
|
|
1763
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1361
1764
|
}
|
|
1362
1765
|
async updateCrossClusterApiKey(params, options) {
|
|
1363
1766
|
const acceptedPath = ['id'];
|
|
@@ -1374,7 +1777,13 @@ class Security {
|
|
|
1374
1777
|
}
|
|
1375
1778
|
const method = 'PUT';
|
|
1376
1779
|
const path = `/_security/cross_cluster/api_key/${encodeURIComponent(params.id.toString())}`;
|
|
1377
|
-
|
|
1780
|
+
const meta = {
|
|
1781
|
+
name: 'security.update_cross_cluster_api_key',
|
|
1782
|
+
pathParts: {
|
|
1783
|
+
id: params.id
|
|
1784
|
+
}
|
|
1785
|
+
};
|
|
1786
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1378
1787
|
}
|
|
1379
1788
|
async updateSettings(params, options) {
|
|
1380
1789
|
const acceptedPath = [];
|
|
@@ -1391,7 +1800,10 @@ class Security {
|
|
|
1391
1800
|
}
|
|
1392
1801
|
const method = 'PUT';
|
|
1393
1802
|
const path = '/_security/settings';
|
|
1394
|
-
|
|
1803
|
+
const meta = {
|
|
1804
|
+
name: 'security.update_settings'
|
|
1805
|
+
};
|
|
1806
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1395
1807
|
}
|
|
1396
1808
|
async updateUserProfileData(params, options) {
|
|
1397
1809
|
const acceptedPath = ['uid'];
|
|
@@ -1422,7 +1834,13 @@ class Security {
|
|
|
1422
1834
|
}
|
|
1423
1835
|
const method = 'PUT';
|
|
1424
1836
|
const path = `/_security/profile/${encodeURIComponent(params.uid.toString())}/_data`;
|
|
1425
|
-
|
|
1837
|
+
const meta = {
|
|
1838
|
+
name: 'security.update_user_profile_data',
|
|
1839
|
+
pathParts: {
|
|
1840
|
+
uid: params.uid
|
|
1841
|
+
}
|
|
1842
|
+
};
|
|
1843
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1426
1844
|
}
|
|
1427
1845
|
}
|
|
1428
1846
|
exports.default = Security;
|