@elastic/elasticsearch 8.17.1 → 9.0.0-alpha.2
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/lib/api/api/async_search.d.ts +16 -17
- package/lib/api/api/async_search.js +50 -20
- package/lib/api/api/async_search.js.map +1 -1
- package/lib/api/api/autoscaling.d.ts +16 -17
- package/lib/api/api/autoscaling.js +42 -12
- package/lib/api/api/autoscaling.js.map +1 -1
- package/lib/api/api/bulk.d.ts +4 -5
- package/lib/api/api/bulk.js +3 -3
- package/lib/api/api/bulk.js.map +1 -1
- package/lib/api/api/capabilities.d.ts +3 -4
- package/lib/api/api/capabilities.js +13 -3
- package/lib/api/api/capabilities.js.map +1 -1
- package/lib/api/api/cat.d.ts +104 -105
- package/lib/api/api/cat.js +338 -78
- package/lib/api/api/cat.js.map +1 -1
- package/lib/api/api/ccr.d.ts +52 -53
- package/lib/api/api/ccr.js +162 -64
- package/lib/api/api/ccr.js.map +1 -1
- package/lib/api/api/clear_scroll.d.ts +4 -5
- package/lib/api/api/clear_scroll.js +11 -9
- package/lib/api/api/clear_scroll.js.map +1 -1
- package/lib/api/api/close_point_in_time.d.ts +4 -5
- package/lib/api/api/close_point_in_time.js +11 -9
- package/lib/api/api/close_point_in_time.js.map +1 -1
- package/lib/api/api/cluster.d.ts +64 -65
- package/lib/api/api/cluster.js +200 -72
- package/lib/api/api/cluster.js.map +1 -1
- package/lib/api/api/connector.d.ts +132 -133
- package/lib/api/api/connector.js +402 -222
- package/lib/api/api/connector.js.map +1 -1
- package/lib/api/api/count.d.ts +5 -6
- package/lib/api/api/count.js +11 -9
- package/lib/api/api/count.js.map +1 -1
- package/lib/api/api/create.d.ts +5 -6
- package/lib/api/api/create.js +3 -3
- package/lib/api/api/create.js.map +1 -1
- package/lib/api/api/dangling_indices.d.ts +12 -13
- package/lib/api/api/dangling_indices.js +39 -9
- package/lib/api/api/dangling_indices.js.map +1 -1
- package/lib/api/api/delete.d.ts +4 -5
- package/lib/api/api/delete.js +13 -3
- package/lib/api/api/delete.js.map +1 -1
- package/lib/api/api/delete_by_query.d.ts +4 -5
- package/lib/api/api/delete_by_query.js +11 -9
- package/lib/api/api/delete_by_query.js.map +1 -1
- package/lib/api/api/delete_by_query_rethrottle.d.ts +4 -5
- package/lib/api/api/delete_by_query_rethrottle.js +13 -3
- package/lib/api/api/delete_by_query_rethrottle.js.map +1 -1
- package/lib/api/api/delete_script.d.ts +4 -5
- package/lib/api/api/delete_script.js +13 -3
- package/lib/api/api/delete_script.js.map +1 -1
- package/lib/api/api/enrich.d.ts +20 -21
- package/lib/api/api/enrich.js +63 -21
- package/lib/api/api/enrich.js.map +1 -1
- package/lib/api/api/eql.d.ts +16 -17
- package/lib/api/api/eql.js +51 -19
- package/lib/api/api/eql.js.map +1 -1
- package/lib/api/api/esql.d.ts +16 -17
- package/lib/api/api/esql.js +50 -26
- package/lib/api/api/esql.js.map +1 -1
- package/lib/api/api/exists.d.ts +4 -5
- package/lib/api/api/exists.js +13 -3
- package/lib/api/api/exists.js.map +1 -1
- package/lib/api/api/exists_source.d.ts +4 -5
- package/lib/api/api/exists_source.js +13 -3
- package/lib/api/api/exists_source.js.map +1 -1
- package/lib/api/api/explain.d.ts +5 -6
- package/lib/api/api/explain.js +11 -9
- package/lib/api/api/explain.js.map +1 -1
- package/lib/api/api/features.d.ts +8 -9
- package/lib/api/api/features.js +26 -6
- package/lib/api/api/features.js.map +1 -1
- package/lib/api/api/field_caps.d.ts +4 -5
- package/lib/api/api/field_caps.js +11 -9
- package/lib/api/api/field_caps.js.map +1 -1
- package/lib/api/api/fleet.d.ts +22 -23
- package/lib/api/api/fleet.js +66 -24
- package/lib/api/api/fleet.js.map +1 -1
- package/lib/api/api/get.d.ts +4 -5
- package/lib/api/api/get.js +13 -3
- package/lib/api/api/get.js.map +1 -1
- package/lib/api/api/get_script.d.ts +4 -5
- package/lib/api/api/get_script.js +13 -3
- package/lib/api/api/get_script.js.map +1 -1
- package/lib/api/api/get_script_context.d.ts +4 -5
- package/lib/api/api/get_script_context.js +13 -3
- package/lib/api/api/get_script_context.js.map +1 -1
- package/lib/api/api/get_script_languages.d.ts +4 -5
- package/lib/api/api/get_script_languages.js +13 -3
- package/lib/api/api/get_script_languages.js.map +1 -1
- package/lib/api/api/get_source.d.ts +4 -5
- package/lib/api/api/get_source.js +13 -3
- package/lib/api/api/get_source.js.map +1 -1
- package/lib/api/api/graph.d.ts +4 -5
- package/lib/api/api/graph.js +11 -9
- package/lib/api/api/graph.js.map +1 -1
- package/lib/api/api/health_report.d.ts +4 -5
- package/lib/api/api/health_report.js +13 -3
- package/lib/api/api/health_report.js.map +1 -1
- package/lib/api/api/ilm.d.ts +44 -45
- package/lib/api/api/ilm.js +137 -51
- package/lib/api/api/ilm.js.map +1 -1
- package/lib/api/api/index.d.ts +5 -6
- package/lib/api/api/index.js +3 -3
- package/lib/api/api/index.js.map +1 -1
- package/lib/api/api/indices.d.ts +264 -244
- package/lib/api/api/indices.js +837 -295
- package/lib/api/api/indices.js.map +1 -1
- package/lib/api/api/inference.d.ts +31 -25
- package/lib/api/api/inference.js +102 -30
- package/lib/api/api/inference.js.map +1 -1
- package/lib/api/api/info.d.ts +4 -5
- package/lib/api/api/info.js +13 -3
- package/lib/api/api/info.js.map +1 -1
- package/lib/api/api/ingest.d.ts +48 -49
- package/lib/api/api/ingest.js +140 -54
- package/lib/api/api/ingest.js.map +1 -1
- package/lib/api/api/knn_search.d.ts +5 -6
- package/lib/api/api/knn_search.js +11 -9
- package/lib/api/api/knn_search.js.map +1 -1
- package/lib/api/api/license.d.ts +28 -29
- package/lib/api/api/license.js +89 -27
- package/lib/api/api/license.js.map +1 -1
- package/lib/api/api/logstash.d.ts +12 -13
- package/lib/api/api/logstash.js +29 -9
- package/lib/api/api/logstash.js.map +1 -1
- package/lib/api/api/mget.d.ts +5 -6
- package/lib/api/api/mget.js +11 -9
- package/lib/api/api/mget.js.map +1 -1
- package/lib/api/api/migration.d.ts +12 -13
- package/lib/api/api/migration.js +39 -9
- package/lib/api/api/migration.js.map +1 -1
- package/lib/api/api/ml.d.ts +292 -293
- package/lib/api/api/ml.js +855 -441
- package/lib/api/api/ml.js.map +1 -1
- package/lib/api/api/monitoring.d.ts +4 -5
- package/lib/api/api/monitoring.js +3 -3
- package/lib/api/api/monitoring.js.map +1 -1
- package/lib/api/api/msearch.d.ts +4 -5
- package/lib/api/api/msearch.js +3 -3
- package/lib/api/api/msearch.js.map +1 -1
- package/lib/api/api/msearch_template.d.ts +5 -6
- package/lib/api/api/msearch_template.js +3 -3
- package/lib/api/api/msearch_template.js.map +1 -1
- package/lib/api/api/mtermvectors.d.ts +5 -6
- package/lib/api/api/mtermvectors.js +11 -9
- package/lib/api/api/mtermvectors.js.map +1 -1
- package/lib/api/api/nodes.d.ts +28 -29
- package/lib/api/api/nodes.js +89 -27
- package/lib/api/api/nodes.js.map +1 -1
- package/lib/api/api/open_point_in_time.d.ts +4 -5
- package/lib/api/api/open_point_in_time.js +11 -9
- package/lib/api/api/open_point_in_time.js.map +1 -1
- package/lib/api/api/ping.d.ts +4 -5
- package/lib/api/api/ping.js +13 -3
- package/lib/api/api/ping.js.map +1 -1
- package/lib/api/api/profiling.d.ts +16 -17
- package/lib/api/api/profiling.js +52 -12
- package/lib/api/api/profiling.js.map +1 -1
- package/lib/api/api/put_script.d.ts +4 -5
- package/lib/api/api/put_script.js +11 -9
- package/lib/api/api/put_script.js.map +1 -1
- package/lib/api/api/query_rules.d.ts +32 -33
- package/lib/api/api/query_rules.js +98 -42
- package/lib/api/api/query_rules.js.map +1 -1
- package/lib/api/api/rank_eval.d.ts +4 -5
- package/lib/api/api/rank_eval.js +11 -9
- package/lib/api/api/rank_eval.js.map +1 -1
- package/lib/api/api/reindex.d.ts +5 -6
- package/lib/api/api/reindex.js +11 -9
- package/lib/api/api/reindex.js.map +1 -1
- package/lib/api/api/reindex_rethrottle.d.ts +4 -5
- package/lib/api/api/reindex_rethrottle.js +13 -3
- package/lib/api/api/reindex_rethrottle.js.map +1 -1
- package/lib/api/api/render_search_template.d.ts +4 -5
- package/lib/api/api/render_search_template.js +13 -11
- package/lib/api/api/render_search_template.js.map +1 -1
- package/lib/api/api/rollup.d.ts +32 -33
- package/lib/api/api/rollup.js +100 -36
- package/lib/api/api/rollup.js.map +1 -1
- package/lib/api/api/scripts_painless_execute.d.ts +5 -6
- package/lib/api/api/scripts_painless_execute.js +11 -9
- package/lib/api/api/scripts_painless_execute.js.map +1 -1
- package/lib/api/api/scroll.d.ts +4 -5
- package/lib/api/api/scroll.js +11 -9
- package/lib/api/api/scroll.js.map +1 -1
- package/lib/api/api/search.d.ts +4 -5
- package/lib/api/api/search.js +11 -11
- package/lib/api/api/search.js.map +1 -1
- package/lib/api/api/search_application.d.ts +40 -41
- package/lib/api/api/search_application.js +106 -42
- package/lib/api/api/search_application.js.map +1 -1
- package/lib/api/api/search_mvt.d.ts +5 -6
- package/lib/api/api/search_mvt.js +11 -9
- package/lib/api/api/search_mvt.js.map +1 -1
- package/lib/api/api/search_shards.d.ts +5 -6
- package/lib/api/api/search_shards.js +13 -3
- package/lib/api/api/search_shards.js.map +1 -1
- package/lib/api/api/search_template.d.ts +4 -5
- package/lib/api/api/search_template.js +11 -9
- package/lib/api/api/search_template.js.map +1 -1
- package/lib/api/api/searchable_snapshots.d.ts +16 -17
- package/lib/api/api/searchable_snapshots.js +50 -18
- package/lib/api/api/searchable_snapshots.js.map +1 -1
- package/lib/api/api/security.d.ts +256 -257
- package/lib/api/api/security.js +756 -390
- package/lib/api/api/security.js.map +1 -1
- package/lib/api/api/shutdown.d.ts +12 -13
- package/lib/api/api/shutdown.js +37 -15
- package/lib/api/api/shutdown.js.map +1 -1
- package/lib/api/api/simulate.d.ts +4 -5
- package/lib/api/api/simulate.js +11 -9
- package/lib/api/api/simulate.js.map +1 -1
- package/lib/api/api/slm.d.ts +36 -37
- package/lib/api/api/slm.js +115 -33
- package/lib/api/api/slm.js.map +1 -1
- package/lib/api/api/snapshot.d.ts +56 -57
- package/lib/api/api/snapshot.js +154 -58
- package/lib/api/api/snapshot.js.map +1 -1
- package/lib/api/api/sql.d.ts +24 -25
- package/lib/api/api/sql.js +72 -36
- package/lib/api/api/sql.js.map +1 -1
- package/lib/api/api/ssl.d.ts +4 -5
- package/lib/api/api/ssl.js +13 -3
- package/lib/api/api/ssl.js.map +1 -1
- package/lib/api/api/synonyms.d.ts +28 -29
- package/lib/api/api/synonyms.js +87 -33
- package/lib/api/api/synonyms.js.map +1 -1
- package/lib/api/api/tasks.d.ts +12 -13
- package/lib/api/api/tasks.js +39 -9
- package/lib/api/api/tasks.js.map +1 -1
- package/lib/api/api/terms_enum.d.ts +5 -6
- package/lib/api/api/terms_enum.js +11 -9
- package/lib/api/api/terms_enum.js.map +1 -1
- package/lib/api/api/termvectors.d.ts +5 -6
- package/lib/api/api/termvectors.js +11 -9
- package/lib/api/api/termvectors.js.map +1 -1
- package/lib/api/api/text_structure.d.ts +16 -17
- package/lib/api/api/text_structure.js +38 -24
- package/lib/api/api/text_structure.js.map +1 -1
- package/lib/api/api/transform.d.ts +48 -49
- package/lib/api/api/transform.js +150 -54
- package/lib/api/api/transform.js.map +1 -1
- package/lib/api/api/update.d.ts +4 -5
- package/lib/api/api/update.js +11 -9
- package/lib/api/api/update.js.map +1 -1
- package/lib/api/api/update_by_query.d.ts +4 -5
- package/lib/api/api/update_by_query.js +11 -9
- package/lib/api/api/update_by_query.js.map +1 -1
- package/lib/api/api/update_by_query_rethrottle.d.ts +4 -5
- package/lib/api/api/update_by_query_rethrottle.js +13 -3
- package/lib/api/api/update_by_query_rethrottle.js.map +1 -1
- package/lib/api/api/watcher.d.ts +52 -53
- package/lib/api/api/watcher.js +161 -63
- package/lib/api/api/watcher.js.map +1 -1
- package/lib/api/api/xpack.d.ts +8 -9
- package/lib/api/api/xpack.js +26 -6
- package/lib/api/api/xpack.js.map +1 -1
- package/lib/api/types.d.ts +12987 -170
- package/lib/client.js +4 -12
- package/lib/client.js.map +1 -1
- package/lib/helpers.js +1 -1
- package/lib/helpers.js.map +1 -1
- package/package.json +6 -7
- package/renovate.json +26 -0
- package/lib/api/typesWithBodyKey.d.ts +0 -18871
- package/lib/api/typesWithBodyKey.js +0 -21
- package/lib/api/typesWithBodyKey.js.map +0 -1
package/lib/api/api/security.js
CHANGED
|
@@ -31,15 +31,17 @@ class Security {
|
|
|
31
31
|
async activateUserProfile(params, options) {
|
|
32
32
|
const acceptedPath = [];
|
|
33
33
|
const acceptedBody = ['access_token', 'grant_type', 'password', 'username'];
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
34
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
35
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
37
36
|
let body;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
38
|
+
if (userBody != null) {
|
|
39
|
+
if (typeof userBody === 'string') {
|
|
40
|
+
body = userBody;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
body = { ...userBody };
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
for (const key in params) {
|
|
45
47
|
if (acceptedBody.includes(key)) {
|
|
@@ -50,7 +52,7 @@ class Security {
|
|
|
50
52
|
else if (acceptedPath.includes(key)) {
|
|
51
53
|
continue;
|
|
52
54
|
}
|
|
53
|
-
else if (key !== 'body') {
|
|
55
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
54
56
|
// @ts-expect-error
|
|
55
57
|
querystring[key] = params[key];
|
|
56
58
|
}
|
|
@@ -64,14 +66,24 @@ class Security {
|
|
|
64
66
|
}
|
|
65
67
|
async authenticate(params, options) {
|
|
66
68
|
const acceptedPath = [];
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
70
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
71
|
+
let body;
|
|
72
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
73
|
+
if (userBody != null) {
|
|
74
|
+
if (typeof userBody === 'string') {
|
|
75
|
+
body = userBody;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
body = { ...userBody };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
69
81
|
params = params !== null && params !== void 0 ? params : {};
|
|
70
82
|
for (const key in params) {
|
|
71
83
|
if (acceptedPath.includes(key)) {
|
|
72
84
|
continue;
|
|
73
85
|
}
|
|
74
|
-
else if (key !== 'body') {
|
|
86
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
75
87
|
// @ts-expect-error
|
|
76
88
|
querystring[key] = params[key];
|
|
77
89
|
}
|
|
@@ -86,15 +98,17 @@ class Security {
|
|
|
86
98
|
async bulkDeleteRole(params, options) {
|
|
87
99
|
const acceptedPath = [];
|
|
88
100
|
const acceptedBody = ['names'];
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
101
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
102
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
92
103
|
let body;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
104
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
105
|
+
if (userBody != null) {
|
|
106
|
+
if (typeof userBody === 'string') {
|
|
107
|
+
body = userBody;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
body = { ...userBody };
|
|
111
|
+
}
|
|
98
112
|
}
|
|
99
113
|
for (const key in params) {
|
|
100
114
|
if (acceptedBody.includes(key)) {
|
|
@@ -105,7 +119,7 @@ class Security {
|
|
|
105
119
|
else if (acceptedPath.includes(key)) {
|
|
106
120
|
continue;
|
|
107
121
|
}
|
|
108
|
-
else if (key !== 'body') {
|
|
122
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
109
123
|
// @ts-expect-error
|
|
110
124
|
querystring[key] = params[key];
|
|
111
125
|
}
|
|
@@ -120,15 +134,17 @@ class Security {
|
|
|
120
134
|
async bulkPutRole(params, options) {
|
|
121
135
|
const acceptedPath = [];
|
|
122
136
|
const acceptedBody = ['roles'];
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
137
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
138
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
126
139
|
let body;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
140
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
141
|
+
if (userBody != null) {
|
|
142
|
+
if (typeof userBody === 'string') {
|
|
143
|
+
body = userBody;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
body = { ...userBody };
|
|
147
|
+
}
|
|
132
148
|
}
|
|
133
149
|
for (const key in params) {
|
|
134
150
|
if (acceptedBody.includes(key)) {
|
|
@@ -139,7 +155,7 @@ class Security {
|
|
|
139
155
|
else if (acceptedPath.includes(key)) {
|
|
140
156
|
continue;
|
|
141
157
|
}
|
|
142
|
-
else if (key !== 'body') {
|
|
158
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
143
159
|
// @ts-expect-error
|
|
144
160
|
querystring[key] = params[key];
|
|
145
161
|
}
|
|
@@ -154,15 +170,17 @@ class Security {
|
|
|
154
170
|
async bulkUpdateApiKeys(params, options) {
|
|
155
171
|
const acceptedPath = [];
|
|
156
172
|
const acceptedBody = ['expiration', 'ids', 'metadata', 'role_descriptors'];
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
173
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
174
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
160
175
|
let body;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
176
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
177
|
+
if (userBody != null) {
|
|
178
|
+
if (typeof userBody === 'string') {
|
|
179
|
+
body = userBody;
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
body = { ...userBody };
|
|
183
|
+
}
|
|
166
184
|
}
|
|
167
185
|
for (const key in params) {
|
|
168
186
|
if (acceptedBody.includes(key)) {
|
|
@@ -173,7 +191,7 @@ class Security {
|
|
|
173
191
|
else if (acceptedPath.includes(key)) {
|
|
174
192
|
continue;
|
|
175
193
|
}
|
|
176
|
-
else if (key !== 'body') {
|
|
194
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
177
195
|
// @ts-expect-error
|
|
178
196
|
querystring[key] = params[key];
|
|
179
197
|
}
|
|
@@ -188,15 +206,17 @@ class Security {
|
|
|
188
206
|
async changePassword(params, options) {
|
|
189
207
|
const acceptedPath = ['username'];
|
|
190
208
|
const acceptedBody = ['password', 'password_hash'];
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
209
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
210
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
194
211
|
let body;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
212
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
213
|
+
if (userBody != null) {
|
|
214
|
+
if (typeof userBody === 'string') {
|
|
215
|
+
body = userBody;
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
body = { ...userBody };
|
|
219
|
+
}
|
|
200
220
|
}
|
|
201
221
|
params = params !== null && params !== void 0 ? params : {};
|
|
202
222
|
for (const key in params) {
|
|
@@ -208,7 +228,7 @@ class Security {
|
|
|
208
228
|
else if (acceptedPath.includes(key)) {
|
|
209
229
|
continue;
|
|
210
230
|
}
|
|
211
|
-
else if (key !== 'body') {
|
|
231
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
212
232
|
// @ts-expect-error
|
|
213
233
|
querystring[key] = params[key];
|
|
214
234
|
}
|
|
@@ -233,13 +253,23 @@ class Security {
|
|
|
233
253
|
}
|
|
234
254
|
async clearApiKeyCache(params, options) {
|
|
235
255
|
const acceptedPath = ['ids'];
|
|
236
|
-
const
|
|
237
|
-
const
|
|
256
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
257
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
258
|
+
let body;
|
|
259
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
260
|
+
if (userBody != null) {
|
|
261
|
+
if (typeof userBody === 'string') {
|
|
262
|
+
body = userBody;
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
body = { ...userBody };
|
|
266
|
+
}
|
|
267
|
+
}
|
|
238
268
|
for (const key in params) {
|
|
239
269
|
if (acceptedPath.includes(key)) {
|
|
240
270
|
continue;
|
|
241
271
|
}
|
|
242
|
-
else if (key !== 'body') {
|
|
272
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
243
273
|
// @ts-expect-error
|
|
244
274
|
querystring[key] = params[key];
|
|
245
275
|
}
|
|
@@ -256,13 +286,23 @@ class Security {
|
|
|
256
286
|
}
|
|
257
287
|
async clearCachedPrivileges(params, options) {
|
|
258
288
|
const acceptedPath = ['application'];
|
|
259
|
-
const
|
|
260
|
-
const
|
|
289
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
290
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
291
|
+
let body;
|
|
292
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
293
|
+
if (userBody != null) {
|
|
294
|
+
if (typeof userBody === 'string') {
|
|
295
|
+
body = userBody;
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
body = { ...userBody };
|
|
299
|
+
}
|
|
300
|
+
}
|
|
261
301
|
for (const key in params) {
|
|
262
302
|
if (acceptedPath.includes(key)) {
|
|
263
303
|
continue;
|
|
264
304
|
}
|
|
265
|
-
else if (key !== 'body') {
|
|
305
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
266
306
|
// @ts-expect-error
|
|
267
307
|
querystring[key] = params[key];
|
|
268
308
|
}
|
|
@@ -279,13 +319,23 @@ class Security {
|
|
|
279
319
|
}
|
|
280
320
|
async clearCachedRealms(params, options) {
|
|
281
321
|
const acceptedPath = ['realms'];
|
|
282
|
-
const
|
|
283
|
-
const
|
|
322
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
323
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
324
|
+
let body;
|
|
325
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
326
|
+
if (userBody != null) {
|
|
327
|
+
if (typeof userBody === 'string') {
|
|
328
|
+
body = userBody;
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
body = { ...userBody };
|
|
332
|
+
}
|
|
333
|
+
}
|
|
284
334
|
for (const key in params) {
|
|
285
335
|
if (acceptedPath.includes(key)) {
|
|
286
336
|
continue;
|
|
287
337
|
}
|
|
288
|
-
else if (key !== 'body') {
|
|
338
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
289
339
|
// @ts-expect-error
|
|
290
340
|
querystring[key] = params[key];
|
|
291
341
|
}
|
|
@@ -302,13 +352,23 @@ class Security {
|
|
|
302
352
|
}
|
|
303
353
|
async clearCachedRoles(params, options) {
|
|
304
354
|
const acceptedPath = ['name'];
|
|
305
|
-
const
|
|
306
|
-
const
|
|
355
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
356
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
357
|
+
let body;
|
|
358
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
359
|
+
if (userBody != null) {
|
|
360
|
+
if (typeof userBody === 'string') {
|
|
361
|
+
body = userBody;
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
body = { ...userBody };
|
|
365
|
+
}
|
|
366
|
+
}
|
|
307
367
|
for (const key in params) {
|
|
308
368
|
if (acceptedPath.includes(key)) {
|
|
309
369
|
continue;
|
|
310
370
|
}
|
|
311
|
-
else if (key !== 'body') {
|
|
371
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
312
372
|
// @ts-expect-error
|
|
313
373
|
querystring[key] = params[key];
|
|
314
374
|
}
|
|
@@ -325,13 +385,23 @@ class Security {
|
|
|
325
385
|
}
|
|
326
386
|
async clearCachedServiceTokens(params, options) {
|
|
327
387
|
const acceptedPath = ['namespace', 'service', 'name'];
|
|
328
|
-
const
|
|
329
|
-
const
|
|
388
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
389
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
390
|
+
let body;
|
|
391
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
392
|
+
if (userBody != null) {
|
|
393
|
+
if (typeof userBody === 'string') {
|
|
394
|
+
body = userBody;
|
|
395
|
+
}
|
|
396
|
+
else {
|
|
397
|
+
body = { ...userBody };
|
|
398
|
+
}
|
|
399
|
+
}
|
|
330
400
|
for (const key in params) {
|
|
331
401
|
if (acceptedPath.includes(key)) {
|
|
332
402
|
continue;
|
|
333
403
|
}
|
|
334
|
-
else if (key !== 'body') {
|
|
404
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
335
405
|
// @ts-expect-error
|
|
336
406
|
querystring[key] = params[key];
|
|
337
407
|
}
|
|
@@ -351,15 +421,17 @@ class Security {
|
|
|
351
421
|
async createApiKey(params, options) {
|
|
352
422
|
const acceptedPath = [];
|
|
353
423
|
const acceptedBody = ['expiration', 'name', 'role_descriptors', 'metadata'];
|
|
354
|
-
const
|
|
355
|
-
|
|
356
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
424
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
425
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
357
426
|
let body;
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
427
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
428
|
+
if (userBody != null) {
|
|
429
|
+
if (typeof userBody === 'string') {
|
|
430
|
+
body = userBody;
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
body = { ...userBody };
|
|
434
|
+
}
|
|
363
435
|
}
|
|
364
436
|
params = params !== null && params !== void 0 ? params : {};
|
|
365
437
|
for (const key in params) {
|
|
@@ -371,7 +443,7 @@ class Security {
|
|
|
371
443
|
else if (acceptedPath.includes(key)) {
|
|
372
444
|
continue;
|
|
373
445
|
}
|
|
374
|
-
else if (key !== 'body') {
|
|
446
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
375
447
|
// @ts-expect-error
|
|
376
448
|
querystring[key] = params[key];
|
|
377
449
|
}
|
|
@@ -386,15 +458,17 @@ class Security {
|
|
|
386
458
|
async createCrossClusterApiKey(params, options) {
|
|
387
459
|
const acceptedPath = [];
|
|
388
460
|
const acceptedBody = ['access', 'expiration', 'metadata', 'name'];
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
461
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
462
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
392
463
|
let body;
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
464
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
465
|
+
if (userBody != null) {
|
|
466
|
+
if (typeof userBody === 'string') {
|
|
467
|
+
body = userBody;
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
body = { ...userBody };
|
|
471
|
+
}
|
|
398
472
|
}
|
|
399
473
|
for (const key in params) {
|
|
400
474
|
if (acceptedBody.includes(key)) {
|
|
@@ -405,7 +479,7 @@ class Security {
|
|
|
405
479
|
else if (acceptedPath.includes(key)) {
|
|
406
480
|
continue;
|
|
407
481
|
}
|
|
408
|
-
else if (key !== 'body') {
|
|
482
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
409
483
|
// @ts-expect-error
|
|
410
484
|
querystring[key] = params[key];
|
|
411
485
|
}
|
|
@@ -419,13 +493,23 @@ class Security {
|
|
|
419
493
|
}
|
|
420
494
|
async createServiceToken(params, options) {
|
|
421
495
|
const acceptedPath = ['namespace', 'service', 'name'];
|
|
422
|
-
const
|
|
423
|
-
const
|
|
496
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
497
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
498
|
+
let body;
|
|
499
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
500
|
+
if (userBody != null) {
|
|
501
|
+
if (typeof userBody === 'string') {
|
|
502
|
+
body = userBody;
|
|
503
|
+
}
|
|
504
|
+
else {
|
|
505
|
+
body = { ...userBody };
|
|
506
|
+
}
|
|
507
|
+
}
|
|
424
508
|
for (const key in params) {
|
|
425
509
|
if (acceptedPath.includes(key)) {
|
|
426
510
|
continue;
|
|
427
511
|
}
|
|
428
|
-
else if (key !== 'body') {
|
|
512
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
429
513
|
// @ts-expect-error
|
|
430
514
|
querystring[key] = params[key];
|
|
431
515
|
}
|
|
@@ -453,15 +537,17 @@ class Security {
|
|
|
453
537
|
async delegatePki(params, options) {
|
|
454
538
|
const acceptedPath = [];
|
|
455
539
|
const acceptedBody = ['x509_certificate_chain'];
|
|
456
|
-
const
|
|
457
|
-
|
|
458
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
540
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
541
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
459
542
|
let body;
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
543
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
544
|
+
if (userBody != null) {
|
|
545
|
+
if (typeof userBody === 'string') {
|
|
546
|
+
body = userBody;
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
body = { ...userBody };
|
|
550
|
+
}
|
|
465
551
|
}
|
|
466
552
|
for (const key in params) {
|
|
467
553
|
if (acceptedBody.includes(key)) {
|
|
@@ -472,7 +558,7 @@ class Security {
|
|
|
472
558
|
else if (acceptedPath.includes(key)) {
|
|
473
559
|
continue;
|
|
474
560
|
}
|
|
475
|
-
else if (key !== 'body') {
|
|
561
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
476
562
|
// @ts-expect-error
|
|
477
563
|
querystring[key] = params[key];
|
|
478
564
|
}
|
|
@@ -486,13 +572,23 @@ class Security {
|
|
|
486
572
|
}
|
|
487
573
|
async deletePrivileges(params, options) {
|
|
488
574
|
const acceptedPath = ['application', 'name'];
|
|
489
|
-
const
|
|
490
|
-
const
|
|
575
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
576
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
577
|
+
let body;
|
|
578
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
579
|
+
if (userBody != null) {
|
|
580
|
+
if (typeof userBody === 'string') {
|
|
581
|
+
body = userBody;
|
|
582
|
+
}
|
|
583
|
+
else {
|
|
584
|
+
body = { ...userBody };
|
|
585
|
+
}
|
|
586
|
+
}
|
|
491
587
|
for (const key in params) {
|
|
492
588
|
if (acceptedPath.includes(key)) {
|
|
493
589
|
continue;
|
|
494
590
|
}
|
|
495
|
-
else if (key !== 'body') {
|
|
591
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
496
592
|
// @ts-expect-error
|
|
497
593
|
querystring[key] = params[key];
|
|
498
594
|
}
|
|
@@ -510,13 +606,23 @@ class Security {
|
|
|
510
606
|
}
|
|
511
607
|
async deleteRole(params, options) {
|
|
512
608
|
const acceptedPath = ['name'];
|
|
513
|
-
const
|
|
514
|
-
const
|
|
609
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
610
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
611
|
+
let body;
|
|
612
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
613
|
+
if (userBody != null) {
|
|
614
|
+
if (typeof userBody === 'string') {
|
|
615
|
+
body = userBody;
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
body = { ...userBody };
|
|
619
|
+
}
|
|
620
|
+
}
|
|
515
621
|
for (const key in params) {
|
|
516
622
|
if (acceptedPath.includes(key)) {
|
|
517
623
|
continue;
|
|
518
624
|
}
|
|
519
|
-
else if (key !== 'body') {
|
|
625
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
520
626
|
// @ts-expect-error
|
|
521
627
|
querystring[key] = params[key];
|
|
522
628
|
}
|
|
@@ -533,13 +639,23 @@ class Security {
|
|
|
533
639
|
}
|
|
534
640
|
async deleteRoleMapping(params, options) {
|
|
535
641
|
const acceptedPath = ['name'];
|
|
536
|
-
const
|
|
537
|
-
const
|
|
642
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
643
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
644
|
+
let body;
|
|
645
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
646
|
+
if (userBody != null) {
|
|
647
|
+
if (typeof userBody === 'string') {
|
|
648
|
+
body = userBody;
|
|
649
|
+
}
|
|
650
|
+
else {
|
|
651
|
+
body = { ...userBody };
|
|
652
|
+
}
|
|
653
|
+
}
|
|
538
654
|
for (const key in params) {
|
|
539
655
|
if (acceptedPath.includes(key)) {
|
|
540
656
|
continue;
|
|
541
657
|
}
|
|
542
|
-
else if (key !== 'body') {
|
|
658
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
543
659
|
// @ts-expect-error
|
|
544
660
|
querystring[key] = params[key];
|
|
545
661
|
}
|
|
@@ -556,13 +672,23 @@ class Security {
|
|
|
556
672
|
}
|
|
557
673
|
async deleteServiceToken(params, options) {
|
|
558
674
|
const acceptedPath = ['namespace', 'service', 'name'];
|
|
559
|
-
const
|
|
560
|
-
const
|
|
675
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
676
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
677
|
+
let body;
|
|
678
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
679
|
+
if (userBody != null) {
|
|
680
|
+
if (typeof userBody === 'string') {
|
|
681
|
+
body = userBody;
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
body = { ...userBody };
|
|
685
|
+
}
|
|
686
|
+
}
|
|
561
687
|
for (const key in params) {
|
|
562
688
|
if (acceptedPath.includes(key)) {
|
|
563
689
|
continue;
|
|
564
690
|
}
|
|
565
|
-
else if (key !== 'body') {
|
|
691
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
566
692
|
// @ts-expect-error
|
|
567
693
|
querystring[key] = params[key];
|
|
568
694
|
}
|
|
@@ -581,13 +707,23 @@ class Security {
|
|
|
581
707
|
}
|
|
582
708
|
async deleteUser(params, options) {
|
|
583
709
|
const acceptedPath = ['username'];
|
|
584
|
-
const
|
|
585
|
-
const
|
|
710
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
711
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
712
|
+
let body;
|
|
713
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
714
|
+
if (userBody != null) {
|
|
715
|
+
if (typeof userBody === 'string') {
|
|
716
|
+
body = userBody;
|
|
717
|
+
}
|
|
718
|
+
else {
|
|
719
|
+
body = { ...userBody };
|
|
720
|
+
}
|
|
721
|
+
}
|
|
586
722
|
for (const key in params) {
|
|
587
723
|
if (acceptedPath.includes(key)) {
|
|
588
724
|
continue;
|
|
589
725
|
}
|
|
590
|
-
else if (key !== 'body') {
|
|
726
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
591
727
|
// @ts-expect-error
|
|
592
728
|
querystring[key] = params[key];
|
|
593
729
|
}
|
|
@@ -604,13 +740,23 @@ class Security {
|
|
|
604
740
|
}
|
|
605
741
|
async disableUser(params, options) {
|
|
606
742
|
const acceptedPath = ['username'];
|
|
607
|
-
const
|
|
608
|
-
const
|
|
743
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
744
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
745
|
+
let body;
|
|
746
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
747
|
+
if (userBody != null) {
|
|
748
|
+
if (typeof userBody === 'string') {
|
|
749
|
+
body = userBody;
|
|
750
|
+
}
|
|
751
|
+
else {
|
|
752
|
+
body = { ...userBody };
|
|
753
|
+
}
|
|
754
|
+
}
|
|
609
755
|
for (const key in params) {
|
|
610
756
|
if (acceptedPath.includes(key)) {
|
|
611
757
|
continue;
|
|
612
758
|
}
|
|
613
|
-
else if (key !== 'body') {
|
|
759
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
614
760
|
// @ts-expect-error
|
|
615
761
|
querystring[key] = params[key];
|
|
616
762
|
}
|
|
@@ -627,13 +773,23 @@ class Security {
|
|
|
627
773
|
}
|
|
628
774
|
async disableUserProfile(params, options) {
|
|
629
775
|
const acceptedPath = ['uid'];
|
|
630
|
-
const
|
|
631
|
-
const
|
|
776
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
777
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
778
|
+
let body;
|
|
779
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
780
|
+
if (userBody != null) {
|
|
781
|
+
if (typeof userBody === 'string') {
|
|
782
|
+
body = userBody;
|
|
783
|
+
}
|
|
784
|
+
else {
|
|
785
|
+
body = { ...userBody };
|
|
786
|
+
}
|
|
787
|
+
}
|
|
632
788
|
for (const key in params) {
|
|
633
789
|
if (acceptedPath.includes(key)) {
|
|
634
790
|
continue;
|
|
635
791
|
}
|
|
636
|
-
else if (key !== 'body') {
|
|
792
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
637
793
|
// @ts-expect-error
|
|
638
794
|
querystring[key] = params[key];
|
|
639
795
|
}
|
|
@@ -650,13 +806,23 @@ class Security {
|
|
|
650
806
|
}
|
|
651
807
|
async enableUser(params, options) {
|
|
652
808
|
const acceptedPath = ['username'];
|
|
653
|
-
const
|
|
654
|
-
const
|
|
809
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
810
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
811
|
+
let body;
|
|
812
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
813
|
+
if (userBody != null) {
|
|
814
|
+
if (typeof userBody === 'string') {
|
|
815
|
+
body = userBody;
|
|
816
|
+
}
|
|
817
|
+
else {
|
|
818
|
+
body = { ...userBody };
|
|
819
|
+
}
|
|
820
|
+
}
|
|
655
821
|
for (const key in params) {
|
|
656
822
|
if (acceptedPath.includes(key)) {
|
|
657
823
|
continue;
|
|
658
824
|
}
|
|
659
|
-
else if (key !== 'body') {
|
|
825
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
660
826
|
// @ts-expect-error
|
|
661
827
|
querystring[key] = params[key];
|
|
662
828
|
}
|
|
@@ -673,13 +839,23 @@ class Security {
|
|
|
673
839
|
}
|
|
674
840
|
async enableUserProfile(params, options) {
|
|
675
841
|
const acceptedPath = ['uid'];
|
|
676
|
-
const
|
|
677
|
-
const
|
|
842
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
843
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
844
|
+
let body;
|
|
845
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
846
|
+
if (userBody != null) {
|
|
847
|
+
if (typeof userBody === 'string') {
|
|
848
|
+
body = userBody;
|
|
849
|
+
}
|
|
850
|
+
else {
|
|
851
|
+
body = { ...userBody };
|
|
852
|
+
}
|
|
853
|
+
}
|
|
678
854
|
for (const key in params) {
|
|
679
855
|
if (acceptedPath.includes(key)) {
|
|
680
856
|
continue;
|
|
681
857
|
}
|
|
682
|
-
else if (key !== 'body') {
|
|
858
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
683
859
|
// @ts-expect-error
|
|
684
860
|
querystring[key] = params[key];
|
|
685
861
|
}
|
|
@@ -696,14 +872,24 @@ class Security {
|
|
|
696
872
|
}
|
|
697
873
|
async enrollKibana(params, options) {
|
|
698
874
|
const acceptedPath = [];
|
|
699
|
-
const
|
|
700
|
-
const
|
|
875
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
876
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
877
|
+
let body;
|
|
878
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
879
|
+
if (userBody != null) {
|
|
880
|
+
if (typeof userBody === 'string') {
|
|
881
|
+
body = userBody;
|
|
882
|
+
}
|
|
883
|
+
else {
|
|
884
|
+
body = { ...userBody };
|
|
885
|
+
}
|
|
886
|
+
}
|
|
701
887
|
params = params !== null && params !== void 0 ? params : {};
|
|
702
888
|
for (const key in params) {
|
|
703
889
|
if (acceptedPath.includes(key)) {
|
|
704
890
|
continue;
|
|
705
891
|
}
|
|
706
|
-
else if (key !== 'body') {
|
|
892
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
707
893
|
// @ts-expect-error
|
|
708
894
|
querystring[key] = params[key];
|
|
709
895
|
}
|
|
@@ -717,14 +903,24 @@ class Security {
|
|
|
717
903
|
}
|
|
718
904
|
async enrollNode(params, options) {
|
|
719
905
|
const acceptedPath = [];
|
|
720
|
-
const
|
|
721
|
-
const
|
|
906
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
907
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
908
|
+
let body;
|
|
909
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
910
|
+
if (userBody != null) {
|
|
911
|
+
if (typeof userBody === 'string') {
|
|
912
|
+
body = userBody;
|
|
913
|
+
}
|
|
914
|
+
else {
|
|
915
|
+
body = { ...userBody };
|
|
916
|
+
}
|
|
917
|
+
}
|
|
722
918
|
params = params !== null && params !== void 0 ? params : {};
|
|
723
919
|
for (const key in params) {
|
|
724
920
|
if (acceptedPath.includes(key)) {
|
|
725
921
|
continue;
|
|
726
922
|
}
|
|
727
|
-
else if (key !== 'body') {
|
|
923
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
728
924
|
// @ts-expect-error
|
|
729
925
|
querystring[key] = params[key];
|
|
730
926
|
}
|
|
@@ -738,14 +934,24 @@ class Security {
|
|
|
738
934
|
}
|
|
739
935
|
async getApiKey(params, options) {
|
|
740
936
|
const acceptedPath = [];
|
|
741
|
-
const
|
|
742
|
-
const
|
|
937
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
938
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
939
|
+
let body;
|
|
940
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
941
|
+
if (userBody != null) {
|
|
942
|
+
if (typeof userBody === 'string') {
|
|
943
|
+
body = userBody;
|
|
944
|
+
}
|
|
945
|
+
else {
|
|
946
|
+
body = { ...userBody };
|
|
947
|
+
}
|
|
948
|
+
}
|
|
743
949
|
params = params !== null && params !== void 0 ? params : {};
|
|
744
950
|
for (const key in params) {
|
|
745
951
|
if (acceptedPath.includes(key)) {
|
|
746
952
|
continue;
|
|
747
953
|
}
|
|
748
|
-
else if (key !== 'body') {
|
|
954
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
749
955
|
// @ts-expect-error
|
|
750
956
|
querystring[key] = params[key];
|
|
751
957
|
}
|
|
@@ -759,14 +965,24 @@ class Security {
|
|
|
759
965
|
}
|
|
760
966
|
async getBuiltinPrivileges(params, options) {
|
|
761
967
|
const acceptedPath = [];
|
|
762
|
-
const
|
|
763
|
-
const
|
|
968
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
969
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
970
|
+
let body;
|
|
971
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
972
|
+
if (userBody != null) {
|
|
973
|
+
if (typeof userBody === 'string') {
|
|
974
|
+
body = userBody;
|
|
975
|
+
}
|
|
976
|
+
else {
|
|
977
|
+
body = { ...userBody };
|
|
978
|
+
}
|
|
979
|
+
}
|
|
764
980
|
params = params !== null && params !== void 0 ? params : {};
|
|
765
981
|
for (const key in params) {
|
|
766
982
|
if (acceptedPath.includes(key)) {
|
|
767
983
|
continue;
|
|
768
984
|
}
|
|
769
|
-
else if (key !== 'body') {
|
|
985
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
770
986
|
// @ts-expect-error
|
|
771
987
|
querystring[key] = params[key];
|
|
772
988
|
}
|
|
@@ -780,14 +996,24 @@ class Security {
|
|
|
780
996
|
}
|
|
781
997
|
async getPrivileges(params, options) {
|
|
782
998
|
const acceptedPath = ['application', 'name'];
|
|
783
|
-
const
|
|
784
|
-
const
|
|
999
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1000
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1001
|
+
let body;
|
|
1002
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1003
|
+
if (userBody != null) {
|
|
1004
|
+
if (typeof userBody === 'string') {
|
|
1005
|
+
body = userBody;
|
|
1006
|
+
}
|
|
1007
|
+
else {
|
|
1008
|
+
body = { ...userBody };
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
785
1011
|
params = params !== null && params !== void 0 ? params : {};
|
|
786
1012
|
for (const key in params) {
|
|
787
1013
|
if (acceptedPath.includes(key)) {
|
|
788
1014
|
continue;
|
|
789
1015
|
}
|
|
790
|
-
else if (key !== 'body') {
|
|
1016
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
791
1017
|
// @ts-expect-error
|
|
792
1018
|
querystring[key] = params[key];
|
|
793
1019
|
}
|
|
@@ -817,14 +1043,24 @@ class Security {
|
|
|
817
1043
|
}
|
|
818
1044
|
async getRole(params, options) {
|
|
819
1045
|
const acceptedPath = ['name'];
|
|
820
|
-
const
|
|
821
|
-
const
|
|
1046
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1047
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1048
|
+
let body;
|
|
1049
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1050
|
+
if (userBody != null) {
|
|
1051
|
+
if (typeof userBody === 'string') {
|
|
1052
|
+
body = userBody;
|
|
1053
|
+
}
|
|
1054
|
+
else {
|
|
1055
|
+
body = { ...userBody };
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
822
1058
|
params = params !== null && params !== void 0 ? params : {};
|
|
823
1059
|
for (const key in params) {
|
|
824
1060
|
if (acceptedPath.includes(key)) {
|
|
825
1061
|
continue;
|
|
826
1062
|
}
|
|
827
|
-
else if (key !== 'body') {
|
|
1063
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
828
1064
|
// @ts-expect-error
|
|
829
1065
|
querystring[key] = params[key];
|
|
830
1066
|
}
|
|
@@ -849,14 +1085,24 @@ class Security {
|
|
|
849
1085
|
}
|
|
850
1086
|
async getRoleMapping(params, options) {
|
|
851
1087
|
const acceptedPath = ['name'];
|
|
852
|
-
const
|
|
853
|
-
const
|
|
1088
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1089
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1090
|
+
let body;
|
|
1091
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1092
|
+
if (userBody != null) {
|
|
1093
|
+
if (typeof userBody === 'string') {
|
|
1094
|
+
body = userBody;
|
|
1095
|
+
}
|
|
1096
|
+
else {
|
|
1097
|
+
body = { ...userBody };
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
854
1100
|
params = params !== null && params !== void 0 ? params : {};
|
|
855
1101
|
for (const key in params) {
|
|
856
1102
|
if (acceptedPath.includes(key)) {
|
|
857
1103
|
continue;
|
|
858
1104
|
}
|
|
859
|
-
else if (key !== 'body') {
|
|
1105
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
860
1106
|
// @ts-expect-error
|
|
861
1107
|
querystring[key] = params[key];
|
|
862
1108
|
}
|
|
@@ -881,14 +1127,24 @@ class Security {
|
|
|
881
1127
|
}
|
|
882
1128
|
async getServiceAccounts(params, options) {
|
|
883
1129
|
const acceptedPath = ['namespace', 'service'];
|
|
884
|
-
const
|
|
885
|
-
const
|
|
1130
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1131
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1132
|
+
let body;
|
|
1133
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1134
|
+
if (userBody != null) {
|
|
1135
|
+
if (typeof userBody === 'string') {
|
|
1136
|
+
body = userBody;
|
|
1137
|
+
}
|
|
1138
|
+
else {
|
|
1139
|
+
body = { ...userBody };
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
886
1142
|
params = params !== null && params !== void 0 ? params : {};
|
|
887
1143
|
for (const key in params) {
|
|
888
1144
|
if (acceptedPath.includes(key)) {
|
|
889
1145
|
continue;
|
|
890
1146
|
}
|
|
891
|
-
else if (key !== 'body') {
|
|
1147
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
892
1148
|
// @ts-expect-error
|
|
893
1149
|
querystring[key] = params[key];
|
|
894
1150
|
}
|
|
@@ -918,13 +1174,23 @@ class Security {
|
|
|
918
1174
|
}
|
|
919
1175
|
async getServiceCredentials(params, options) {
|
|
920
1176
|
const acceptedPath = ['namespace', 'service'];
|
|
921
|
-
const
|
|
922
|
-
const
|
|
1177
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1178
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1179
|
+
let body;
|
|
1180
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1181
|
+
if (userBody != null) {
|
|
1182
|
+
if (typeof userBody === 'string') {
|
|
1183
|
+
body = userBody;
|
|
1184
|
+
}
|
|
1185
|
+
else {
|
|
1186
|
+
body = { ...userBody };
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
923
1189
|
for (const key in params) {
|
|
924
1190
|
if (acceptedPath.includes(key)) {
|
|
925
1191
|
continue;
|
|
926
1192
|
}
|
|
927
|
-
else if (key !== 'body') {
|
|
1193
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
928
1194
|
// @ts-expect-error
|
|
929
1195
|
querystring[key] = params[key];
|
|
930
1196
|
}
|
|
@@ -942,14 +1208,24 @@ class Security {
|
|
|
942
1208
|
}
|
|
943
1209
|
async getSettings(params, options) {
|
|
944
1210
|
const acceptedPath = [];
|
|
945
|
-
const
|
|
946
|
-
const
|
|
1211
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1212
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1213
|
+
let body;
|
|
1214
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1215
|
+
if (userBody != null) {
|
|
1216
|
+
if (typeof userBody === 'string') {
|
|
1217
|
+
body = userBody;
|
|
1218
|
+
}
|
|
1219
|
+
else {
|
|
1220
|
+
body = { ...userBody };
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
947
1223
|
params = params !== null && params !== void 0 ? params : {};
|
|
948
1224
|
for (const key in params) {
|
|
949
1225
|
if (acceptedPath.includes(key)) {
|
|
950
1226
|
continue;
|
|
951
1227
|
}
|
|
952
|
-
else if (key !== 'body') {
|
|
1228
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
953
1229
|
// @ts-expect-error
|
|
954
1230
|
querystring[key] = params[key];
|
|
955
1231
|
}
|
|
@@ -964,15 +1240,17 @@ class Security {
|
|
|
964
1240
|
async getToken(params, options) {
|
|
965
1241
|
const acceptedPath = [];
|
|
966
1242
|
const acceptedBody = ['grant_type', 'scope', 'password', 'kerberos_ticket', 'refresh_token', 'username'];
|
|
967
|
-
const
|
|
968
|
-
|
|
969
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1243
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1244
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
970
1245
|
let body;
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
1246
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1247
|
+
if (userBody != null) {
|
|
1248
|
+
if (typeof userBody === 'string') {
|
|
1249
|
+
body = userBody;
|
|
1250
|
+
}
|
|
1251
|
+
else {
|
|
1252
|
+
body = { ...userBody };
|
|
1253
|
+
}
|
|
976
1254
|
}
|
|
977
1255
|
params = params !== null && params !== void 0 ? params : {};
|
|
978
1256
|
for (const key in params) {
|
|
@@ -984,7 +1262,7 @@ class Security {
|
|
|
984
1262
|
else if (acceptedPath.includes(key)) {
|
|
985
1263
|
continue;
|
|
986
1264
|
}
|
|
987
|
-
else if (key !== 'body') {
|
|
1265
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
988
1266
|
// @ts-expect-error
|
|
989
1267
|
querystring[key] = params[key];
|
|
990
1268
|
}
|
|
@@ -998,14 +1276,24 @@ class Security {
|
|
|
998
1276
|
}
|
|
999
1277
|
async getUser(params, options) {
|
|
1000
1278
|
const acceptedPath = ['username'];
|
|
1001
|
-
const
|
|
1002
|
-
const
|
|
1279
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1280
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1281
|
+
let body;
|
|
1282
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1283
|
+
if (userBody != null) {
|
|
1284
|
+
if (typeof userBody === 'string') {
|
|
1285
|
+
body = userBody;
|
|
1286
|
+
}
|
|
1287
|
+
else {
|
|
1288
|
+
body = { ...userBody };
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1003
1291
|
params = params !== null && params !== void 0 ? params : {};
|
|
1004
1292
|
for (const key in params) {
|
|
1005
1293
|
if (acceptedPath.includes(key)) {
|
|
1006
1294
|
continue;
|
|
1007
1295
|
}
|
|
1008
|
-
else if (key !== 'body') {
|
|
1296
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1009
1297
|
// @ts-expect-error
|
|
1010
1298
|
querystring[key] = params[key];
|
|
1011
1299
|
}
|
|
@@ -1030,14 +1318,24 @@ class Security {
|
|
|
1030
1318
|
}
|
|
1031
1319
|
async getUserPrivileges(params, options) {
|
|
1032
1320
|
const acceptedPath = [];
|
|
1033
|
-
const
|
|
1034
|
-
const
|
|
1321
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1322
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1323
|
+
let body;
|
|
1324
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1325
|
+
if (userBody != null) {
|
|
1326
|
+
if (typeof userBody === 'string') {
|
|
1327
|
+
body = userBody;
|
|
1328
|
+
}
|
|
1329
|
+
else {
|
|
1330
|
+
body = { ...userBody };
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1035
1333
|
params = params !== null && params !== void 0 ? params : {};
|
|
1036
1334
|
for (const key in params) {
|
|
1037
1335
|
if (acceptedPath.includes(key)) {
|
|
1038
1336
|
continue;
|
|
1039
1337
|
}
|
|
1040
|
-
else if (key !== 'body') {
|
|
1338
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1041
1339
|
// @ts-expect-error
|
|
1042
1340
|
querystring[key] = params[key];
|
|
1043
1341
|
}
|
|
@@ -1051,13 +1349,23 @@ class Security {
|
|
|
1051
1349
|
}
|
|
1052
1350
|
async getUserProfile(params, options) {
|
|
1053
1351
|
const acceptedPath = ['uid'];
|
|
1054
|
-
const
|
|
1055
|
-
const
|
|
1352
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1353
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1354
|
+
let body;
|
|
1355
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1356
|
+
if (userBody != null) {
|
|
1357
|
+
if (typeof userBody === 'string') {
|
|
1358
|
+
body = userBody;
|
|
1359
|
+
}
|
|
1360
|
+
else {
|
|
1361
|
+
body = { ...userBody };
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1056
1364
|
for (const key in params) {
|
|
1057
1365
|
if (acceptedPath.includes(key)) {
|
|
1058
1366
|
continue;
|
|
1059
1367
|
}
|
|
1060
|
-
else if (key !== 'body') {
|
|
1368
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1061
1369
|
// @ts-expect-error
|
|
1062
1370
|
querystring[key] = params[key];
|
|
1063
1371
|
}
|
|
@@ -1075,15 +1383,17 @@ class Security {
|
|
|
1075
1383
|
async grantApiKey(params, options) {
|
|
1076
1384
|
const acceptedPath = [];
|
|
1077
1385
|
const acceptedBody = ['api_key', 'grant_type', 'access_token', 'username', 'password', 'run_as'];
|
|
1078
|
-
const
|
|
1079
|
-
|
|
1080
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1386
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1387
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1081
1388
|
let body;
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1389
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1390
|
+
if (userBody != null) {
|
|
1391
|
+
if (typeof userBody === 'string') {
|
|
1392
|
+
body = userBody;
|
|
1393
|
+
}
|
|
1394
|
+
else {
|
|
1395
|
+
body = { ...userBody };
|
|
1396
|
+
}
|
|
1087
1397
|
}
|
|
1088
1398
|
for (const key in params) {
|
|
1089
1399
|
if (acceptedBody.includes(key)) {
|
|
@@ -1094,7 +1404,7 @@ class Security {
|
|
|
1094
1404
|
else if (acceptedPath.includes(key)) {
|
|
1095
1405
|
continue;
|
|
1096
1406
|
}
|
|
1097
|
-
else if (key !== 'body') {
|
|
1407
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1098
1408
|
// @ts-expect-error
|
|
1099
1409
|
querystring[key] = params[key];
|
|
1100
1410
|
}
|
|
@@ -1109,15 +1419,17 @@ class Security {
|
|
|
1109
1419
|
async hasPrivileges(params, options) {
|
|
1110
1420
|
const acceptedPath = ['user'];
|
|
1111
1421
|
const acceptedBody = ['application', 'cluster', 'index'];
|
|
1112
|
-
const
|
|
1113
|
-
|
|
1114
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1422
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1423
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1115
1424
|
let body;
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1425
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1426
|
+
if (userBody != null) {
|
|
1427
|
+
if (typeof userBody === 'string') {
|
|
1428
|
+
body = userBody;
|
|
1429
|
+
}
|
|
1430
|
+
else {
|
|
1431
|
+
body = { ...userBody };
|
|
1432
|
+
}
|
|
1121
1433
|
}
|
|
1122
1434
|
params = params !== null && params !== void 0 ? params : {};
|
|
1123
1435
|
for (const key in params) {
|
|
@@ -1129,7 +1441,7 @@ class Security {
|
|
|
1129
1441
|
else if (acceptedPath.includes(key)) {
|
|
1130
1442
|
continue;
|
|
1131
1443
|
}
|
|
1132
|
-
else if (key !== 'body') {
|
|
1444
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1133
1445
|
// @ts-expect-error
|
|
1134
1446
|
querystring[key] = params[key];
|
|
1135
1447
|
}
|
|
@@ -1155,15 +1467,17 @@ class Security {
|
|
|
1155
1467
|
async hasPrivilegesUserProfile(params, options) {
|
|
1156
1468
|
const acceptedPath = [];
|
|
1157
1469
|
const acceptedBody = ['uids', 'privileges'];
|
|
1158
|
-
const
|
|
1159
|
-
|
|
1160
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1470
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1471
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1161
1472
|
let body;
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1473
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1474
|
+
if (userBody != null) {
|
|
1475
|
+
if (typeof userBody === 'string') {
|
|
1476
|
+
body = userBody;
|
|
1477
|
+
}
|
|
1478
|
+
else {
|
|
1479
|
+
body = { ...userBody };
|
|
1480
|
+
}
|
|
1167
1481
|
}
|
|
1168
1482
|
for (const key in params) {
|
|
1169
1483
|
if (acceptedBody.includes(key)) {
|
|
@@ -1174,7 +1488,7 @@ class Security {
|
|
|
1174
1488
|
else if (acceptedPath.includes(key)) {
|
|
1175
1489
|
continue;
|
|
1176
1490
|
}
|
|
1177
|
-
else if (key !== 'body') {
|
|
1491
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1178
1492
|
// @ts-expect-error
|
|
1179
1493
|
querystring[key] = params[key];
|
|
1180
1494
|
}
|
|
@@ -1189,15 +1503,17 @@ class Security {
|
|
|
1189
1503
|
async invalidateApiKey(params, options) {
|
|
1190
1504
|
const acceptedPath = [];
|
|
1191
1505
|
const acceptedBody = ['id', 'ids', 'name', 'owner', 'realm_name', 'username'];
|
|
1192
|
-
const
|
|
1193
|
-
|
|
1194
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1506
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1507
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1195
1508
|
let body;
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1509
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1510
|
+
if (userBody != null) {
|
|
1511
|
+
if (typeof userBody === 'string') {
|
|
1512
|
+
body = userBody;
|
|
1513
|
+
}
|
|
1514
|
+
else {
|
|
1515
|
+
body = { ...userBody };
|
|
1516
|
+
}
|
|
1201
1517
|
}
|
|
1202
1518
|
params = params !== null && params !== void 0 ? params : {};
|
|
1203
1519
|
for (const key in params) {
|
|
@@ -1209,7 +1525,7 @@ class Security {
|
|
|
1209
1525
|
else if (acceptedPath.includes(key)) {
|
|
1210
1526
|
continue;
|
|
1211
1527
|
}
|
|
1212
|
-
else if (key !== 'body') {
|
|
1528
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1213
1529
|
// @ts-expect-error
|
|
1214
1530
|
querystring[key] = params[key];
|
|
1215
1531
|
}
|
|
@@ -1224,15 +1540,17 @@ class Security {
|
|
|
1224
1540
|
async invalidateToken(params, options) {
|
|
1225
1541
|
const acceptedPath = [];
|
|
1226
1542
|
const acceptedBody = ['token', 'refresh_token', 'realm_name', 'username'];
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1229
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1543
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1544
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1230
1545
|
let body;
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1546
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1547
|
+
if (userBody != null) {
|
|
1548
|
+
if (typeof userBody === 'string') {
|
|
1549
|
+
body = userBody;
|
|
1550
|
+
}
|
|
1551
|
+
else {
|
|
1552
|
+
body = { ...userBody };
|
|
1553
|
+
}
|
|
1236
1554
|
}
|
|
1237
1555
|
params = params !== null && params !== void 0 ? params : {};
|
|
1238
1556
|
for (const key in params) {
|
|
@@ -1244,7 +1562,7 @@ class Security {
|
|
|
1244
1562
|
else if (acceptedPath.includes(key)) {
|
|
1245
1563
|
continue;
|
|
1246
1564
|
}
|
|
1247
|
-
else if (key !== 'body') {
|
|
1565
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1248
1566
|
// @ts-expect-error
|
|
1249
1567
|
querystring[key] = params[key];
|
|
1250
1568
|
}
|
|
@@ -1259,15 +1577,17 @@ class Security {
|
|
|
1259
1577
|
async oidcAuthenticate(params, options) {
|
|
1260
1578
|
const acceptedPath = [];
|
|
1261
1579
|
const acceptedBody = ['nonce', 'realm', 'redirect_uri', 'state'];
|
|
1262
|
-
const
|
|
1263
|
-
|
|
1264
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1580
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1581
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1265
1582
|
let body;
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1583
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1584
|
+
if (userBody != null) {
|
|
1585
|
+
if (typeof userBody === 'string') {
|
|
1586
|
+
body = userBody;
|
|
1587
|
+
}
|
|
1588
|
+
else {
|
|
1589
|
+
body = { ...userBody };
|
|
1590
|
+
}
|
|
1271
1591
|
}
|
|
1272
1592
|
for (const key in params) {
|
|
1273
1593
|
if (acceptedBody.includes(key)) {
|
|
@@ -1278,7 +1598,7 @@ class Security {
|
|
|
1278
1598
|
else if (acceptedPath.includes(key)) {
|
|
1279
1599
|
continue;
|
|
1280
1600
|
}
|
|
1281
|
-
else if (key !== 'body') {
|
|
1601
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1282
1602
|
// @ts-expect-error
|
|
1283
1603
|
querystring[key] = params[key];
|
|
1284
1604
|
}
|
|
@@ -1293,15 +1613,17 @@ class Security {
|
|
|
1293
1613
|
async oidcLogout(params, options) {
|
|
1294
1614
|
const acceptedPath = [];
|
|
1295
1615
|
const acceptedBody = ['access_token', 'refresh_token'];
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1298
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1616
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1617
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1299
1618
|
let body;
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1619
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1620
|
+
if (userBody != null) {
|
|
1621
|
+
if (typeof userBody === 'string') {
|
|
1622
|
+
body = userBody;
|
|
1623
|
+
}
|
|
1624
|
+
else {
|
|
1625
|
+
body = { ...userBody };
|
|
1626
|
+
}
|
|
1305
1627
|
}
|
|
1306
1628
|
for (const key in params) {
|
|
1307
1629
|
if (acceptedBody.includes(key)) {
|
|
@@ -1312,7 +1634,7 @@ class Security {
|
|
|
1312
1634
|
else if (acceptedPath.includes(key)) {
|
|
1313
1635
|
continue;
|
|
1314
1636
|
}
|
|
1315
|
-
else if (key !== 'body') {
|
|
1637
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1316
1638
|
// @ts-expect-error
|
|
1317
1639
|
querystring[key] = params[key];
|
|
1318
1640
|
}
|
|
@@ -1327,15 +1649,17 @@ class Security {
|
|
|
1327
1649
|
async oidcPrepareAuthentication(params, options) {
|
|
1328
1650
|
const acceptedPath = [];
|
|
1329
1651
|
const acceptedBody = ['iss', 'login_hint', 'nonce', 'realm', 'state'];
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1332
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1652
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1653
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1333
1654
|
let body;
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1655
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1656
|
+
if (userBody != null) {
|
|
1657
|
+
if (typeof userBody === 'string') {
|
|
1658
|
+
body = userBody;
|
|
1659
|
+
}
|
|
1660
|
+
else {
|
|
1661
|
+
body = { ...userBody };
|
|
1662
|
+
}
|
|
1339
1663
|
}
|
|
1340
1664
|
params = params !== null && params !== void 0 ? params : {};
|
|
1341
1665
|
for (const key in params) {
|
|
@@ -1347,7 +1671,7 @@ class Security {
|
|
|
1347
1671
|
else if (acceptedPath.includes(key)) {
|
|
1348
1672
|
continue;
|
|
1349
1673
|
}
|
|
1350
|
-
else if (key !== 'body') {
|
|
1674
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1351
1675
|
// @ts-expect-error
|
|
1352
1676
|
querystring[key] = params[key];
|
|
1353
1677
|
}
|
|
@@ -1363,8 +1687,8 @@ class Security {
|
|
|
1363
1687
|
var _a;
|
|
1364
1688
|
const acceptedPath = [];
|
|
1365
1689
|
const acceptedBody = ['privileges'];
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1690
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1691
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1368
1692
|
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
1369
1693
|
for (const key in params) {
|
|
1370
1694
|
if (acceptedBody.includes(key)) {
|
|
@@ -1374,7 +1698,7 @@ class Security {
|
|
|
1374
1698
|
else if (acceptedPath.includes(key)) {
|
|
1375
1699
|
continue;
|
|
1376
1700
|
}
|
|
1377
|
-
else if (key !== 'body') {
|
|
1701
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1378
1702
|
// @ts-expect-error
|
|
1379
1703
|
querystring[key] = params[key];
|
|
1380
1704
|
}
|
|
@@ -1389,15 +1713,17 @@ class Security {
|
|
|
1389
1713
|
async putRole(params, options) {
|
|
1390
1714
|
const acceptedPath = ['name'];
|
|
1391
1715
|
const acceptedBody = ['applications', 'cluster', 'global', 'indices', 'remote_indices', 'remote_cluster', 'metadata', 'run_as', 'description', 'transient_metadata'];
|
|
1392
|
-
const
|
|
1393
|
-
|
|
1394
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1716
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1717
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1395
1718
|
let body;
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1719
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1720
|
+
if (userBody != null) {
|
|
1721
|
+
if (typeof userBody === 'string') {
|
|
1722
|
+
body = userBody;
|
|
1723
|
+
}
|
|
1724
|
+
else {
|
|
1725
|
+
body = { ...userBody };
|
|
1726
|
+
}
|
|
1401
1727
|
}
|
|
1402
1728
|
for (const key in params) {
|
|
1403
1729
|
if (acceptedBody.includes(key)) {
|
|
@@ -1408,7 +1734,7 @@ class Security {
|
|
|
1408
1734
|
else if (acceptedPath.includes(key)) {
|
|
1409
1735
|
continue;
|
|
1410
1736
|
}
|
|
1411
|
-
else if (key !== 'body') {
|
|
1737
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1412
1738
|
// @ts-expect-error
|
|
1413
1739
|
querystring[key] = params[key];
|
|
1414
1740
|
}
|
|
@@ -1426,15 +1752,17 @@ class Security {
|
|
|
1426
1752
|
async putRoleMapping(params, options) {
|
|
1427
1753
|
const acceptedPath = ['name'];
|
|
1428
1754
|
const acceptedBody = ['enabled', 'metadata', 'roles', 'role_templates', 'rules', 'run_as'];
|
|
1429
|
-
const
|
|
1430
|
-
|
|
1431
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1755
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1756
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1432
1757
|
let body;
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1758
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1759
|
+
if (userBody != null) {
|
|
1760
|
+
if (typeof userBody === 'string') {
|
|
1761
|
+
body = userBody;
|
|
1762
|
+
}
|
|
1763
|
+
else {
|
|
1764
|
+
body = { ...userBody };
|
|
1765
|
+
}
|
|
1438
1766
|
}
|
|
1439
1767
|
for (const key in params) {
|
|
1440
1768
|
if (acceptedBody.includes(key)) {
|
|
@@ -1445,7 +1773,7 @@ class Security {
|
|
|
1445
1773
|
else if (acceptedPath.includes(key)) {
|
|
1446
1774
|
continue;
|
|
1447
1775
|
}
|
|
1448
|
-
else if (key !== 'body') {
|
|
1776
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1449
1777
|
// @ts-expect-error
|
|
1450
1778
|
querystring[key] = params[key];
|
|
1451
1779
|
}
|
|
@@ -1463,15 +1791,17 @@ class Security {
|
|
|
1463
1791
|
async putUser(params, options) {
|
|
1464
1792
|
const acceptedPath = [];
|
|
1465
1793
|
const acceptedBody = ['username', 'email', 'full_name', 'metadata', 'password', 'password_hash', 'roles', 'enabled'];
|
|
1466
|
-
const
|
|
1467
|
-
|
|
1468
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1794
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1795
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1469
1796
|
let body;
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1797
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1798
|
+
if (userBody != null) {
|
|
1799
|
+
if (typeof userBody === 'string') {
|
|
1800
|
+
body = userBody;
|
|
1801
|
+
}
|
|
1802
|
+
else {
|
|
1803
|
+
body = { ...userBody };
|
|
1804
|
+
}
|
|
1475
1805
|
}
|
|
1476
1806
|
for (const key in params) {
|
|
1477
1807
|
if (acceptedBody.includes(key)) {
|
|
@@ -1482,7 +1812,7 @@ class Security {
|
|
|
1482
1812
|
else if (acceptedPath.includes(key)) {
|
|
1483
1813
|
continue;
|
|
1484
1814
|
}
|
|
1485
|
-
else if (key !== 'body') {
|
|
1815
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1486
1816
|
// @ts-expect-error
|
|
1487
1817
|
querystring[key] = params[key];
|
|
1488
1818
|
}
|
|
@@ -1500,15 +1830,17 @@ class Security {
|
|
|
1500
1830
|
async queryApiKeys(params, options) {
|
|
1501
1831
|
const acceptedPath = [];
|
|
1502
1832
|
const acceptedBody = ['aggregations', 'aggs', 'query', 'from', 'sort', 'size', 'search_after'];
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1505
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1833
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1834
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1506
1835
|
let body;
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1836
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1837
|
+
if (userBody != null) {
|
|
1838
|
+
if (typeof userBody === 'string') {
|
|
1839
|
+
body = userBody;
|
|
1840
|
+
}
|
|
1841
|
+
else {
|
|
1842
|
+
body = { ...userBody };
|
|
1843
|
+
}
|
|
1512
1844
|
}
|
|
1513
1845
|
params = params !== null && params !== void 0 ? params : {};
|
|
1514
1846
|
for (const key in params) {
|
|
@@ -1520,7 +1852,7 @@ class Security {
|
|
|
1520
1852
|
else if (acceptedPath.includes(key)) {
|
|
1521
1853
|
continue;
|
|
1522
1854
|
}
|
|
1523
|
-
else if (key !== 'body') {
|
|
1855
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1524
1856
|
// @ts-expect-error
|
|
1525
1857
|
querystring[key] = params[key];
|
|
1526
1858
|
}
|
|
@@ -1535,15 +1867,17 @@ class Security {
|
|
|
1535
1867
|
async queryRole(params, options) {
|
|
1536
1868
|
const acceptedPath = [];
|
|
1537
1869
|
const acceptedBody = ['query', 'from', 'sort', 'size', 'search_after'];
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1540
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1870
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1871
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1541
1872
|
let body;
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1873
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1874
|
+
if (userBody != null) {
|
|
1875
|
+
if (typeof userBody === 'string') {
|
|
1876
|
+
body = userBody;
|
|
1877
|
+
}
|
|
1878
|
+
else {
|
|
1879
|
+
body = { ...userBody };
|
|
1880
|
+
}
|
|
1547
1881
|
}
|
|
1548
1882
|
params = params !== null && params !== void 0 ? params : {};
|
|
1549
1883
|
for (const key in params) {
|
|
@@ -1555,7 +1889,7 @@ class Security {
|
|
|
1555
1889
|
else if (acceptedPath.includes(key)) {
|
|
1556
1890
|
continue;
|
|
1557
1891
|
}
|
|
1558
|
-
else if (key !== 'body') {
|
|
1892
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1559
1893
|
// @ts-expect-error
|
|
1560
1894
|
querystring[key] = params[key];
|
|
1561
1895
|
}
|
|
@@ -1570,15 +1904,17 @@ class Security {
|
|
|
1570
1904
|
async queryUser(params, options) {
|
|
1571
1905
|
const acceptedPath = [];
|
|
1572
1906
|
const acceptedBody = ['query', 'from', 'sort', 'size', 'search_after'];
|
|
1573
|
-
const
|
|
1574
|
-
|
|
1575
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1907
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1908
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1576
1909
|
let body;
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1910
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1911
|
+
if (userBody != null) {
|
|
1912
|
+
if (typeof userBody === 'string') {
|
|
1913
|
+
body = userBody;
|
|
1914
|
+
}
|
|
1915
|
+
else {
|
|
1916
|
+
body = { ...userBody };
|
|
1917
|
+
}
|
|
1582
1918
|
}
|
|
1583
1919
|
params = params !== null && params !== void 0 ? params : {};
|
|
1584
1920
|
for (const key in params) {
|
|
@@ -1590,7 +1926,7 @@ class Security {
|
|
|
1590
1926
|
else if (acceptedPath.includes(key)) {
|
|
1591
1927
|
continue;
|
|
1592
1928
|
}
|
|
1593
|
-
else if (key !== 'body') {
|
|
1929
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1594
1930
|
// @ts-expect-error
|
|
1595
1931
|
querystring[key] = params[key];
|
|
1596
1932
|
}
|
|
@@ -1605,15 +1941,17 @@ class Security {
|
|
|
1605
1941
|
async samlAuthenticate(params, options) {
|
|
1606
1942
|
const acceptedPath = [];
|
|
1607
1943
|
const acceptedBody = ['content', 'ids', 'realm'];
|
|
1608
|
-
const
|
|
1609
|
-
|
|
1610
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1944
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1945
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1611
1946
|
let body;
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1947
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1948
|
+
if (userBody != null) {
|
|
1949
|
+
if (typeof userBody === 'string') {
|
|
1950
|
+
body = userBody;
|
|
1951
|
+
}
|
|
1952
|
+
else {
|
|
1953
|
+
body = { ...userBody };
|
|
1954
|
+
}
|
|
1617
1955
|
}
|
|
1618
1956
|
for (const key in params) {
|
|
1619
1957
|
if (acceptedBody.includes(key)) {
|
|
@@ -1624,7 +1962,7 @@ class Security {
|
|
|
1624
1962
|
else if (acceptedPath.includes(key)) {
|
|
1625
1963
|
continue;
|
|
1626
1964
|
}
|
|
1627
|
-
else if (key !== 'body') {
|
|
1965
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1628
1966
|
// @ts-expect-error
|
|
1629
1967
|
querystring[key] = params[key];
|
|
1630
1968
|
}
|
|
@@ -1639,15 +1977,17 @@ class Security {
|
|
|
1639
1977
|
async samlCompleteLogout(params, options) {
|
|
1640
1978
|
const acceptedPath = [];
|
|
1641
1979
|
const acceptedBody = ['realm', 'ids', 'query_string', 'content'];
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1644
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1980
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1981
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1645
1982
|
let body;
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1983
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1984
|
+
if (userBody != null) {
|
|
1985
|
+
if (typeof userBody === 'string') {
|
|
1986
|
+
body = userBody;
|
|
1987
|
+
}
|
|
1988
|
+
else {
|
|
1989
|
+
body = { ...userBody };
|
|
1990
|
+
}
|
|
1651
1991
|
}
|
|
1652
1992
|
for (const key in params) {
|
|
1653
1993
|
if (acceptedBody.includes(key)) {
|
|
@@ -1658,7 +1998,7 @@ class Security {
|
|
|
1658
1998
|
else if (acceptedPath.includes(key)) {
|
|
1659
1999
|
continue;
|
|
1660
2000
|
}
|
|
1661
|
-
else if (key !== 'body') {
|
|
2001
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1662
2002
|
// @ts-expect-error
|
|
1663
2003
|
querystring[key] = params[key];
|
|
1664
2004
|
}
|
|
@@ -1673,15 +2013,17 @@ class Security {
|
|
|
1673
2013
|
async samlInvalidate(params, options) {
|
|
1674
2014
|
const acceptedPath = [];
|
|
1675
2015
|
const acceptedBody = ['acs', 'query_string', 'realm'];
|
|
1676
|
-
const
|
|
1677
|
-
|
|
1678
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2016
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2017
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1679
2018
|
let body;
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
2019
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2020
|
+
if (userBody != null) {
|
|
2021
|
+
if (typeof userBody === 'string') {
|
|
2022
|
+
body = userBody;
|
|
2023
|
+
}
|
|
2024
|
+
else {
|
|
2025
|
+
body = { ...userBody };
|
|
2026
|
+
}
|
|
1685
2027
|
}
|
|
1686
2028
|
for (const key in params) {
|
|
1687
2029
|
if (acceptedBody.includes(key)) {
|
|
@@ -1692,7 +2034,7 @@ class Security {
|
|
|
1692
2034
|
else if (acceptedPath.includes(key)) {
|
|
1693
2035
|
continue;
|
|
1694
2036
|
}
|
|
1695
|
-
else if (key !== 'body') {
|
|
2037
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1696
2038
|
// @ts-expect-error
|
|
1697
2039
|
querystring[key] = params[key];
|
|
1698
2040
|
}
|
|
@@ -1707,15 +2049,17 @@ class Security {
|
|
|
1707
2049
|
async samlLogout(params, options) {
|
|
1708
2050
|
const acceptedPath = [];
|
|
1709
2051
|
const acceptedBody = ['token', 'refresh_token'];
|
|
1710
|
-
const
|
|
1711
|
-
|
|
1712
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2052
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2053
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1713
2054
|
let body;
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
2055
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2056
|
+
if (userBody != null) {
|
|
2057
|
+
if (typeof userBody === 'string') {
|
|
2058
|
+
body = userBody;
|
|
2059
|
+
}
|
|
2060
|
+
else {
|
|
2061
|
+
body = { ...userBody };
|
|
2062
|
+
}
|
|
1719
2063
|
}
|
|
1720
2064
|
for (const key in params) {
|
|
1721
2065
|
if (acceptedBody.includes(key)) {
|
|
@@ -1726,7 +2070,7 @@ class Security {
|
|
|
1726
2070
|
else if (acceptedPath.includes(key)) {
|
|
1727
2071
|
continue;
|
|
1728
2072
|
}
|
|
1729
|
-
else if (key !== 'body') {
|
|
2073
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1730
2074
|
// @ts-expect-error
|
|
1731
2075
|
querystring[key] = params[key];
|
|
1732
2076
|
}
|
|
@@ -1741,15 +2085,17 @@ class Security {
|
|
|
1741
2085
|
async samlPrepareAuthentication(params, options) {
|
|
1742
2086
|
const acceptedPath = [];
|
|
1743
2087
|
const acceptedBody = ['acs', 'realm', 'relay_state'];
|
|
1744
|
-
const
|
|
1745
|
-
|
|
1746
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2088
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2089
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1747
2090
|
let body;
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
2091
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2092
|
+
if (userBody != null) {
|
|
2093
|
+
if (typeof userBody === 'string') {
|
|
2094
|
+
body = userBody;
|
|
2095
|
+
}
|
|
2096
|
+
else {
|
|
2097
|
+
body = { ...userBody };
|
|
2098
|
+
}
|
|
1753
2099
|
}
|
|
1754
2100
|
params = params !== null && params !== void 0 ? params : {};
|
|
1755
2101
|
for (const key in params) {
|
|
@@ -1761,7 +2107,7 @@ class Security {
|
|
|
1761
2107
|
else if (acceptedPath.includes(key)) {
|
|
1762
2108
|
continue;
|
|
1763
2109
|
}
|
|
1764
|
-
else if (key !== 'body') {
|
|
2110
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1765
2111
|
// @ts-expect-error
|
|
1766
2112
|
querystring[key] = params[key];
|
|
1767
2113
|
}
|
|
@@ -1775,13 +2121,23 @@ class Security {
|
|
|
1775
2121
|
}
|
|
1776
2122
|
async samlServiceProviderMetadata(params, options) {
|
|
1777
2123
|
const acceptedPath = ['realm_name'];
|
|
1778
|
-
const
|
|
1779
|
-
const
|
|
2124
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2125
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
2126
|
+
let body;
|
|
2127
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2128
|
+
if (userBody != null) {
|
|
2129
|
+
if (typeof userBody === 'string') {
|
|
2130
|
+
body = userBody;
|
|
2131
|
+
}
|
|
2132
|
+
else {
|
|
2133
|
+
body = { ...userBody };
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
1780
2136
|
for (const key in params) {
|
|
1781
2137
|
if (acceptedPath.includes(key)) {
|
|
1782
2138
|
continue;
|
|
1783
2139
|
}
|
|
1784
|
-
else if (key !== 'body') {
|
|
2140
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1785
2141
|
// @ts-expect-error
|
|
1786
2142
|
querystring[key] = params[key];
|
|
1787
2143
|
}
|
|
@@ -1799,15 +2155,17 @@ class Security {
|
|
|
1799
2155
|
async suggestUserProfiles(params, options) {
|
|
1800
2156
|
const acceptedPath = [];
|
|
1801
2157
|
const acceptedBody = ['name', 'size', 'data', 'hint'];
|
|
1802
|
-
const
|
|
1803
|
-
|
|
1804
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2158
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2159
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1805
2160
|
let body;
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
2161
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2162
|
+
if (userBody != null) {
|
|
2163
|
+
if (typeof userBody === 'string') {
|
|
2164
|
+
body = userBody;
|
|
2165
|
+
}
|
|
2166
|
+
else {
|
|
2167
|
+
body = { ...userBody };
|
|
2168
|
+
}
|
|
1811
2169
|
}
|
|
1812
2170
|
params = params !== null && params !== void 0 ? params : {};
|
|
1813
2171
|
for (const key in params) {
|
|
@@ -1819,7 +2177,7 @@ class Security {
|
|
|
1819
2177
|
else if (acceptedPath.includes(key)) {
|
|
1820
2178
|
continue;
|
|
1821
2179
|
}
|
|
1822
|
-
else if (key !== 'body') {
|
|
2180
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1823
2181
|
// @ts-expect-error
|
|
1824
2182
|
querystring[key] = params[key];
|
|
1825
2183
|
}
|
|
@@ -1834,15 +2192,17 @@ class Security {
|
|
|
1834
2192
|
async updateApiKey(params, options) {
|
|
1835
2193
|
const acceptedPath = ['id'];
|
|
1836
2194
|
const acceptedBody = ['role_descriptors', 'metadata', 'expiration'];
|
|
1837
|
-
const
|
|
1838
|
-
|
|
1839
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2195
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2196
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1840
2197
|
let body;
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
2198
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2199
|
+
if (userBody != null) {
|
|
2200
|
+
if (typeof userBody === 'string') {
|
|
2201
|
+
body = userBody;
|
|
2202
|
+
}
|
|
2203
|
+
else {
|
|
2204
|
+
body = { ...userBody };
|
|
2205
|
+
}
|
|
1846
2206
|
}
|
|
1847
2207
|
for (const key in params) {
|
|
1848
2208
|
if (acceptedBody.includes(key)) {
|
|
@@ -1853,7 +2213,7 @@ class Security {
|
|
|
1853
2213
|
else if (acceptedPath.includes(key)) {
|
|
1854
2214
|
continue;
|
|
1855
2215
|
}
|
|
1856
|
-
else if (key !== 'body') {
|
|
2216
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1857
2217
|
// @ts-expect-error
|
|
1858
2218
|
querystring[key] = params[key];
|
|
1859
2219
|
}
|
|
@@ -1871,15 +2231,17 @@ class Security {
|
|
|
1871
2231
|
async updateCrossClusterApiKey(params, options) {
|
|
1872
2232
|
const acceptedPath = ['id'];
|
|
1873
2233
|
const acceptedBody = ['access', 'expiration', 'metadata'];
|
|
1874
|
-
const
|
|
1875
|
-
|
|
1876
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2234
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2235
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1877
2236
|
let body;
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
2237
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2238
|
+
if (userBody != null) {
|
|
2239
|
+
if (typeof userBody === 'string') {
|
|
2240
|
+
body = userBody;
|
|
2241
|
+
}
|
|
2242
|
+
else {
|
|
2243
|
+
body = { ...userBody };
|
|
2244
|
+
}
|
|
1883
2245
|
}
|
|
1884
2246
|
for (const key in params) {
|
|
1885
2247
|
if (acceptedBody.includes(key)) {
|
|
@@ -1890,7 +2252,7 @@ class Security {
|
|
|
1890
2252
|
else if (acceptedPath.includes(key)) {
|
|
1891
2253
|
continue;
|
|
1892
2254
|
}
|
|
1893
|
-
else if (key !== 'body') {
|
|
2255
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1894
2256
|
// @ts-expect-error
|
|
1895
2257
|
querystring[key] = params[key];
|
|
1896
2258
|
}
|
|
@@ -1908,15 +2270,17 @@ class Security {
|
|
|
1908
2270
|
async updateSettings(params, options) {
|
|
1909
2271
|
const acceptedPath = [];
|
|
1910
2272
|
const acceptedBody = ['security', 'security-profile', 'security-tokens'];
|
|
1911
|
-
const
|
|
1912
|
-
|
|
1913
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2273
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2274
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1914
2275
|
let body;
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
2276
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2277
|
+
if (userBody != null) {
|
|
2278
|
+
if (typeof userBody === 'string') {
|
|
2279
|
+
body = userBody;
|
|
2280
|
+
}
|
|
2281
|
+
else {
|
|
2282
|
+
body = { ...userBody };
|
|
2283
|
+
}
|
|
1920
2284
|
}
|
|
1921
2285
|
params = params !== null && params !== void 0 ? params : {};
|
|
1922
2286
|
for (const key in params) {
|
|
@@ -1928,7 +2292,7 @@ class Security {
|
|
|
1928
2292
|
else if (acceptedPath.includes(key)) {
|
|
1929
2293
|
continue;
|
|
1930
2294
|
}
|
|
1931
|
-
else if (key !== 'body') {
|
|
2295
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1932
2296
|
// @ts-expect-error
|
|
1933
2297
|
querystring[key] = params[key];
|
|
1934
2298
|
}
|
|
@@ -1943,15 +2307,17 @@ class Security {
|
|
|
1943
2307
|
async updateUserProfileData(params, options) {
|
|
1944
2308
|
const acceptedPath = ['uid'];
|
|
1945
2309
|
const acceptedBody = ['labels', 'data'];
|
|
1946
|
-
const
|
|
1947
|
-
|
|
1948
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2310
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2311
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1949
2312
|
let body;
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
2313
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2314
|
+
if (userBody != null) {
|
|
2315
|
+
if (typeof userBody === 'string') {
|
|
2316
|
+
body = userBody;
|
|
2317
|
+
}
|
|
2318
|
+
else {
|
|
2319
|
+
body = { ...userBody };
|
|
2320
|
+
}
|
|
1955
2321
|
}
|
|
1956
2322
|
for (const key in params) {
|
|
1957
2323
|
if (acceptedBody.includes(key)) {
|
|
@@ -1962,7 +2328,7 @@ class Security {
|
|
|
1962
2328
|
else if (acceptedPath.includes(key)) {
|
|
1963
2329
|
continue;
|
|
1964
2330
|
}
|
|
1965
|
-
else if (key !== 'body') {
|
|
2331
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1966
2332
|
// @ts-expect-error
|
|
1967
2333
|
querystring[key] = params[key];
|
|
1968
2334
|
}
|