@elastic/elasticsearch 8.16.2 → 9.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/catalog-info.yaml +4 -1
  2. package/lib/api/api/async_search.d.ts +16 -17
  3. package/lib/api/api/async_search.js +5 -16
  4. package/lib/api/api/async_search.js.map +1 -1
  5. package/lib/api/api/autoscaling.d.ts +16 -17
  6. package/lib/api/api/autoscaling.js +5 -7
  7. package/lib/api/api/autoscaling.js.map +1 -1
  8. package/lib/api/api/bulk.d.ts +4 -5
  9. package/lib/api/api/bulk.js +3 -5
  10. package/lib/api/api/bulk.js.map +1 -1
  11. package/lib/api/api/capabilities.d.ts +3 -4
  12. package/lib/api/api/capabilities.js +2 -2
  13. package/lib/api/api/capabilities.js.map +1 -1
  14. package/lib/api/api/cat.d.ts +121 -122
  15. package/lib/api/api/cat.js +26 -26
  16. package/lib/api/api/cat.js.map +1 -1
  17. package/lib/api/api/ccr.d.ts +52 -53
  18. package/lib/api/api/ccr.js +18 -54
  19. package/lib/api/api/ccr.js.map +1 -1
  20. package/lib/api/api/clear_scroll.d.ts +4 -5
  21. package/lib/api/api/clear_scroll.js +3 -12
  22. package/lib/api/api/clear_scroll.js.map +1 -1
  23. package/lib/api/api/close_point_in_time.d.ts +4 -5
  24. package/lib/api/api/close_point_in_time.js +3 -12
  25. package/lib/api/api/close_point_in_time.js.map +1 -1
  26. package/lib/api/api/cluster.d.ts +64 -65
  27. package/lib/api/api/cluster.js +20 -56
  28. package/lib/api/api/cluster.js.map +1 -1
  29. package/lib/api/api/connector.d.ts +132 -133
  30. package/lib/api/api/connector.js +50 -194
  31. package/lib/api/api/connector.js.map +1 -1
  32. package/lib/api/api/count.d.ts +5 -6
  33. package/lib/api/api/count.js +3 -12
  34. package/lib/api/api/count.js.map +1 -1
  35. package/lib/api/api/create.d.ts +4 -5
  36. package/lib/api/api/create.js +3 -5
  37. package/lib/api/api/create.js.map +1 -1
  38. package/lib/api/api/dangling_indices.d.ts +12 -13
  39. package/lib/api/api/dangling_indices.js +3 -3
  40. package/lib/api/api/dangling_indices.js.map +1 -1
  41. package/lib/api/api/delete.d.ts +4 -5
  42. package/lib/api/api/delete.js +2 -2
  43. package/lib/api/api/delete.js.map +1 -1
  44. package/lib/api/api/delete_by_query.d.ts +4 -5
  45. package/lib/api/api/delete_by_query.js +3 -12
  46. package/lib/api/api/delete_by_query.js.map +1 -1
  47. package/lib/api/api/delete_by_query_rethrottle.d.ts +4 -5
  48. package/lib/api/api/delete_by_query_rethrottle.js +2 -2
  49. package/lib/api/api/delete_by_query_rethrottle.js.map +1 -1
  50. package/lib/api/api/delete_script.d.ts +4 -5
  51. package/lib/api/api/delete_script.js +2 -2
  52. package/lib/api/api/delete_script.js.map +1 -1
  53. package/lib/api/api/enrich.d.ts +21 -22
  54. package/lib/api/api/enrich.js +6 -15
  55. package/lib/api/api/enrich.js.map +1 -1
  56. package/lib/api/api/eql.d.ts +20 -21
  57. package/lib/api/api/eql.js +6 -15
  58. package/lib/api/api/eql.js.map +1 -1
  59. package/lib/api/api/esql.d.ts +13 -14
  60. package/lib/api/api/esql.js +4 -13
  61. package/lib/api/api/esql.js.map +1 -1
  62. package/lib/api/api/exists.d.ts +4 -5
  63. package/lib/api/api/exists.js +2 -2
  64. package/lib/api/api/exists.js.map +1 -1
  65. package/lib/api/api/exists_source.d.ts +4 -5
  66. package/lib/api/api/exists_source.js +2 -2
  67. package/lib/api/api/exists_source.js.map +1 -1
  68. package/lib/api/api/explain.d.ts +4 -5
  69. package/lib/api/api/explain.js +3 -12
  70. package/lib/api/api/explain.js.map +1 -1
  71. package/lib/api/api/features.d.ts +8 -9
  72. package/lib/api/api/features.js +2 -2
  73. package/lib/api/api/features.js.map +1 -1
  74. package/lib/api/api/field_caps.d.ts +4 -5
  75. package/lib/api/api/field_caps.js +3 -12
  76. package/lib/api/api/field_caps.js.map +1 -1
  77. package/lib/api/api/fleet.d.ts +22 -23
  78. package/lib/api/api/fleet.js +8 -19
  79. package/lib/api/api/fleet.js.map +1 -1
  80. package/lib/api/api/get.d.ts +4 -5
  81. package/lib/api/api/get.js +2 -2
  82. package/lib/api/api/get.js.map +1 -1
  83. package/lib/api/api/get_script.d.ts +4 -5
  84. package/lib/api/api/get_script.js +2 -2
  85. package/lib/api/api/get_script.js.map +1 -1
  86. package/lib/api/api/get_script_context.d.ts +4 -5
  87. package/lib/api/api/get_script_context.js +2 -2
  88. package/lib/api/api/get_script_context.js.map +1 -1
  89. package/lib/api/api/get_script_languages.d.ts +4 -5
  90. package/lib/api/api/get_script_languages.js +2 -2
  91. package/lib/api/api/get_script_languages.js.map +1 -1
  92. package/lib/api/api/get_source.d.ts +4 -5
  93. package/lib/api/api/get_source.js +2 -2
  94. package/lib/api/api/get_source.js.map +1 -1
  95. package/lib/api/api/graph.d.ts +5 -6
  96. package/lib/api/api/graph.js +2 -11
  97. package/lib/api/api/graph.js.map +1 -1
  98. package/lib/api/api/health_report.d.ts +4 -5
  99. package/lib/api/api/health_report.js +2 -2
  100. package/lib/api/api/health_report.js.map +1 -1
  101. package/lib/api/api/ilm.d.ts +44 -45
  102. package/lib/api/api/ilm.js +14 -41
  103. package/lib/api/api/ilm.js.map +1 -1
  104. package/lib/api/api/index.d.ts +4 -5
  105. package/lib/api/api/index.js +3 -5
  106. package/lib/api/api/index.js.map +1 -1
  107. package/lib/api/api/indices.d.ts +238 -239
  108. package/lib/api/api/indices.js +77 -216
  109. package/lib/api/api/indices.js.map +1 -1
  110. package/lib/api/api/inference.d.ts +20 -21
  111. package/lib/api/api/inference.js +7 -18
  112. package/lib/api/api/inference.js.map +1 -1
  113. package/lib/api/api/info.d.ts +4 -5
  114. package/lib/api/api/info.js +2 -2
  115. package/lib/api/api/info.js.map +1 -1
  116. package/lib/api/api/ingest.d.ts +57 -58
  117. package/lib/api/api/ingest.js +15 -42
  118. package/lib/api/api/ingest.js.map +1 -1
  119. package/lib/api/api/knn_search.d.ts +4 -5
  120. package/lib/api/api/knn_search.js +3 -12
  121. package/lib/api/api/knn_search.js.map +1 -1
  122. package/lib/api/api/license.d.ts +28 -29
  123. package/lib/api/api/license.js +8 -17
  124. package/lib/api/api/license.js.map +1 -1
  125. package/lib/api/api/logstash.d.ts +12 -13
  126. package/lib/api/api/logstash.js +4 -6
  127. package/lib/api/api/logstash.js.map +1 -1
  128. package/lib/api/api/mget.d.ts +4 -5
  129. package/lib/api/api/mget.js +3 -12
  130. package/lib/api/api/mget.js.map +1 -1
  131. package/lib/api/api/migration.d.ts +12 -13
  132. package/lib/api/api/migration.js +3 -3
  133. package/lib/api/api/migration.js.map +1 -1
  134. package/lib/api/api/ml.d.ts +293 -294
  135. package/lib/api/api/ml.js +112 -449
  136. package/lib/api/api/ml.js.map +1 -1
  137. package/lib/api/api/monitoring.d.ts +4 -5
  138. package/lib/api/api/monitoring.js +2 -4
  139. package/lib/api/api/monitoring.js.map +1 -1
  140. package/lib/api/api/msearch.d.ts +4 -5
  141. package/lib/api/api/msearch.js +3 -5
  142. package/lib/api/api/msearch.js.map +1 -1
  143. package/lib/api/api/msearch_template.d.ts +4 -5
  144. package/lib/api/api/msearch_template.js +3 -5
  145. package/lib/api/api/msearch_template.js.map +1 -1
  146. package/lib/api/api/mtermvectors.d.ts +4 -5
  147. package/lib/api/api/mtermvectors.js +3 -12
  148. package/lib/api/api/mtermvectors.js.map +1 -1
  149. package/lib/api/api/nodes.d.ts +28 -29
  150. package/lib/api/api/nodes.js +8 -17
  151. package/lib/api/api/nodes.js.map +1 -1
  152. package/lib/api/api/open_point_in_time.d.ts +4 -5
  153. package/lib/api/api/open_point_in_time.js +3 -12
  154. package/lib/api/api/open_point_in_time.js.map +1 -1
  155. package/lib/api/api/ping.d.ts +4 -5
  156. package/lib/api/api/ping.js +2 -2
  157. package/lib/api/api/ping.js.map +1 -1
  158. package/lib/api/api/profiling.d.ts +16 -17
  159. package/lib/api/api/profiling.js +4 -4
  160. package/lib/api/api/profiling.js.map +1 -1
  161. package/lib/api/api/put_script.d.ts +4 -5
  162. package/lib/api/api/put_script.js +3 -12
  163. package/lib/api/api/put_script.js.map +1 -1
  164. package/lib/api/api/query_rules.d.ts +40 -41
  165. package/lib/api/api/query_rules.js +11 -38
  166. package/lib/api/api/query_rules.js.map +1 -1
  167. package/lib/api/api/rank_eval.d.ts +4 -5
  168. package/lib/api/api/rank_eval.js +3 -12
  169. package/lib/api/api/rank_eval.js.map +1 -1
  170. package/lib/api/api/reindex.d.ts +4 -5
  171. package/lib/api/api/reindex.js +3 -12
  172. package/lib/api/api/reindex.js.map +1 -1
  173. package/lib/api/api/reindex_rethrottle.d.ts +4 -5
  174. package/lib/api/api/reindex_rethrottle.js +2 -2
  175. package/lib/api/api/reindex_rethrottle.js.map +1 -1
  176. package/lib/api/api/render_search_template.d.ts +4 -5
  177. package/lib/api/api/render_search_template.js +3 -12
  178. package/lib/api/api/render_search_template.js.map +1 -1
  179. package/lib/api/api/rollup.d.ts +32 -33
  180. package/lib/api/api/rollup.js +10 -28
  181. package/lib/api/api/rollup.js.map +1 -1
  182. package/lib/api/api/scripts_painless_execute.d.ts +4 -5
  183. package/lib/api/api/scripts_painless_execute.js +3 -12
  184. package/lib/api/api/scripts_painless_execute.js.map +1 -1
  185. package/lib/api/api/scroll.d.ts +4 -5
  186. package/lib/api/api/scroll.js +3 -12
  187. package/lib/api/api/scroll.js.map +1 -1
  188. package/lib/api/api/search.d.ts +4 -5
  189. package/lib/api/api/search.js +3 -14
  190. package/lib/api/api/search.js.map +1 -1
  191. package/lib/api/api/search_application.d.ts +39 -40
  192. package/lib/api/api/search_application.js +12 -23
  193. package/lib/api/api/search_application.js.map +1 -1
  194. package/lib/api/api/search_mvt.d.ts +4 -5
  195. package/lib/api/api/search_mvt.js +3 -12
  196. package/lib/api/api/search_mvt.js.map +1 -1
  197. package/lib/api/api/search_shards.d.ts +4 -5
  198. package/lib/api/api/search_shards.js +2 -2
  199. package/lib/api/api/search_shards.js.map +1 -1
  200. package/lib/api/api/search_template.d.ts +4 -5
  201. package/lib/api/api/search_template.js +3 -12
  202. package/lib/api/api/search_template.js.map +1 -1
  203. package/lib/api/api/searchable_snapshots.d.ts +16 -17
  204. package/lib/api/api/searchable_snapshots.js +5 -14
  205. package/lib/api/api/searchable_snapshots.js.map +1 -1
  206. package/lib/api/api/security.d.ts +253 -254
  207. package/lib/api/api/security.js +92 -337
  208. package/lib/api/api/security.js.map +1 -1
  209. package/lib/api/api/shutdown.d.ts +9 -10
  210. package/lib/api/api/shutdown.js +4 -13
  211. package/lib/api/api/shutdown.js.map +1 -1
  212. package/lib/api/api/simulate.d.ts +4 -5
  213. package/lib/api/api/simulate.js +1 -1
  214. package/lib/api/api/simulate.js.map +1 -1
  215. package/lib/api/api/slm.d.ts +36 -37
  216. package/lib/api/api/slm.js +10 -19
  217. package/lib/api/api/slm.js.map +1 -1
  218. package/lib/api/api/snapshot.d.ts +52 -53
  219. package/lib/api/api/snapshot.js +17 -46
  220. package/lib/api/api/snapshot.js.map +1 -1
  221. package/lib/api/api/sql.d.ts +30 -31
  222. package/lib/api/api/sql.js +9 -36
  223. package/lib/api/api/sql.js.map +1 -1
  224. package/lib/api/api/ssl.d.ts +4 -5
  225. package/lib/api/api/ssl.js +1 -1
  226. package/lib/api/api/ssl.js.map +1 -1
  227. package/lib/api/api/synonyms.d.ts +35 -36
  228. package/lib/api/api/synonyms.js +9 -27
  229. package/lib/api/api/synonyms.js.map +1 -1
  230. package/lib/api/api/tasks.d.ts +12 -13
  231. package/lib/api/api/tasks.js +3 -3
  232. package/lib/api/api/tasks.js.map +1 -1
  233. package/lib/api/api/terms_enum.d.ts +4 -5
  234. package/lib/api/api/terms_enum.js +3 -12
  235. package/lib/api/api/terms_enum.js.map +1 -1
  236. package/lib/api/api/termvectors.d.ts +4 -5
  237. package/lib/api/api/termvectors.js +3 -12
  238. package/lib/api/api/termvectors.js.map +1 -1
  239. package/lib/api/api/text_structure.d.ts +16 -17
  240. package/lib/api/api/text_structure.js +6 -17
  241. package/lib/api/api/text_structure.js.map +1 -1
  242. package/lib/api/api/transform.d.ts +48 -49
  243. package/lib/api/api/transform.js +15 -42
  244. package/lib/api/api/transform.js.map +1 -1
  245. package/lib/api/api/update.d.ts +4 -5
  246. package/lib/api/api/update.js +3 -12
  247. package/lib/api/api/update.js.map +1 -1
  248. package/lib/api/api/update_by_query.d.ts +4 -5
  249. package/lib/api/api/update_by_query.js +3 -12
  250. package/lib/api/api/update_by_query.js.map +1 -1
  251. package/lib/api/api/update_by_query_rethrottle.d.ts +4 -5
  252. package/lib/api/api/update_by_query_rethrottle.js +2 -2
  253. package/lib/api/api/update_by_query_rethrottle.js.map +1 -1
  254. package/lib/api/api/watcher.d.ts +52 -53
  255. package/lib/api/api/watcher.js +16 -43
  256. package/lib/api/api/watcher.js.map +1 -1
  257. package/lib/api/api/xpack.d.ts +8 -9
  258. package/lib/api/api/xpack.js +2 -2
  259. package/lib/api/api/xpack.js.map +1 -1
  260. package/lib/api/index.js +1 -1
  261. package/lib/api/index.js.map +1 -1
  262. package/lib/api/types.d.ts +131 -72
  263. package/lib/client.d.ts +82 -2
  264. package/lib/client.js +11 -4
  265. package/lib/client.js.map +1 -1
  266. package/lib/helpers.d.ts +0 -3
  267. package/lib/helpers.js +8 -7
  268. package/lib/helpers.js.map +1 -1
  269. package/package.json +33 -33
  270. package/renovate.json +29 -0
  271. package/lib/api/typesWithBodyKey.d.ts +0 -18163
  272. package/lib/api/typesWithBodyKey.js +0 -21
  273. package/lib/api/typesWithBodyKey.js.map +0 -1
@@ -36,7 +36,7 @@ class Connector {
36
36
  if (acceptedPath.includes(key)) {
37
37
  continue;
38
38
  }
39
- else if (key !== 'body') {
39
+ else {
40
40
  // @ts-expect-error
41
41
  querystring[key] = params[key];
42
42
  }
@@ -59,7 +59,7 @@ class Connector {
59
59
  if (acceptedPath.includes(key)) {
60
60
  continue;
61
61
  }
62
- else if (key !== 'body') {
62
+ else {
63
63
  // @ts-expect-error
64
64
  querystring[key] = params[key];
65
65
  }
@@ -82,7 +82,7 @@ class Connector {
82
82
  if (acceptedPath.includes(key)) {
83
83
  continue;
84
84
  }
85
- else if (key !== 'body') {
85
+ else {
86
86
  // @ts-expect-error
87
87
  querystring[key] = params[key];
88
88
  }
@@ -101,25 +101,16 @@ class Connector {
101
101
  const acceptedPath = ['connector_id'];
102
102
  const acceptedBody = ['last_access_control_sync_error', 'last_access_control_sync_scheduled_at', 'last_access_control_sync_status', 'last_deleted_document_count', 'last_incremental_sync_scheduled_at', 'last_indexed_document_count', 'last_seen', 'last_sync_error', 'last_sync_scheduled_at', 'last_sync_status', 'last_synced', 'sync_cursor'];
103
103
  const querystring = {};
104
- // @ts-expect-error
105
- const userBody = params === null || params === void 0 ? void 0 : params.body;
106
- let body;
107
- if (typeof userBody === 'string') {
108
- body = userBody;
109
- }
110
- else {
111
- body = userBody != null ? { ...userBody } : undefined;
112
- }
104
+ const body = {};
113
105
  for (const key in params) {
114
106
  if (acceptedBody.includes(key)) {
115
- body = body !== null && body !== void 0 ? body : {};
116
107
  // @ts-expect-error
117
108
  body[key] = params[key];
118
109
  }
119
110
  else if (acceptedPath.includes(key)) {
120
111
  continue;
121
112
  }
122
- else if (key !== 'body') {
113
+ else {
123
114
  // @ts-expect-error
124
115
  querystring[key] = params[key];
125
116
  }
@@ -143,7 +134,7 @@ class Connector {
143
134
  if (acceptedPath.includes(key)) {
144
135
  continue;
145
136
  }
146
- else if (key !== 'body') {
137
+ else {
147
138
  // @ts-expect-error
148
139
  querystring[key] = params[key];
149
140
  }
@@ -159,26 +150,17 @@ class Connector {
159
150
  const acceptedPath = [];
160
151
  const acceptedBody = ['description', 'index_name', 'is_native', 'language', 'name', 'service_type'];
161
152
  const querystring = {};
162
- // @ts-expect-error
163
- const userBody = params === null || params === void 0 ? void 0 : params.body;
164
- let body;
165
- if (typeof userBody === 'string') {
166
- body = userBody;
167
- }
168
- else {
169
- body = userBody != null ? { ...userBody } : undefined;
170
- }
153
+ const body = {};
171
154
  params = params !== null && params !== void 0 ? params : {};
172
155
  for (const key in params) {
173
156
  if (acceptedBody.includes(key)) {
174
- body = body !== null && body !== void 0 ? body : {};
175
157
  // @ts-expect-error
176
158
  body[key] = params[key];
177
159
  }
178
160
  else if (acceptedPath.includes(key)) {
179
161
  continue;
180
162
  }
181
- else if (key !== 'body') {
163
+ else {
182
164
  // @ts-expect-error
183
165
  querystring[key] = params[key];
184
166
  }
@@ -194,26 +176,17 @@ class Connector {
194
176
  const acceptedPath = ['connector_id'];
195
177
  const acceptedBody = ['description', 'index_name', 'is_native', 'language', 'name', 'service_type'];
196
178
  const querystring = {};
197
- // @ts-expect-error
198
- const userBody = params === null || params === void 0 ? void 0 : params.body;
199
- let body;
200
- if (typeof userBody === 'string') {
201
- body = userBody;
202
- }
203
- else {
204
- body = userBody != null ? { ...userBody } : undefined;
205
- }
179
+ const body = {};
206
180
  params = params !== null && params !== void 0 ? params : {};
207
181
  for (const key in params) {
208
182
  if (acceptedBody.includes(key)) {
209
- body = body !== null && body !== void 0 ? body : {};
210
183
  // @ts-expect-error
211
184
  body[key] = params[key];
212
185
  }
213
186
  else if (acceptedPath.includes(key)) {
214
187
  continue;
215
188
  }
216
- else if (key !== 'body') {
189
+ else {
217
190
  // @ts-expect-error
218
191
  querystring[key] = params[key];
219
192
  }
@@ -245,7 +218,7 @@ class Connector {
245
218
  if (acceptedPath.includes(key)) {
246
219
  continue;
247
220
  }
248
- else if (key !== 'body') {
221
+ else {
249
222
  querystring[key] = params[key];
250
223
  }
251
224
  }
@@ -268,7 +241,7 @@ class Connector {
268
241
  if (acceptedPath.includes(key)) {
269
242
  continue;
270
243
  }
271
- else if (key !== 'body') {
244
+ else {
272
245
  querystring[key] = params[key];
273
246
  }
274
247
  }
@@ -291,7 +264,7 @@ class Connector {
291
264
  if (acceptedPath.includes(key)) {
292
265
  continue;
293
266
  }
294
- else if (key !== 'body') {
267
+ else {
295
268
  querystring[key] = params[key];
296
269
  }
297
270
  }
@@ -311,7 +284,7 @@ class Connector {
311
284
  if (acceptedPath.includes(key)) {
312
285
  continue;
313
286
  }
314
- else if (key !== 'body') {
287
+ else {
315
288
  querystring[key] = params[key];
316
289
  }
317
290
  }
@@ -333,7 +306,7 @@ class Connector {
333
306
  if (acceptedPath.includes(key)) {
334
307
  continue;
335
308
  }
336
- else if (key !== 'body') {
309
+ else {
337
310
  // @ts-expect-error
338
311
  querystring[key] = params[key];
339
312
  }
@@ -357,7 +330,7 @@ class Connector {
357
330
  if (acceptedPath.includes(key)) {
358
331
  continue;
359
332
  }
360
- else if (key !== 'body') {
333
+ else {
361
334
  querystring[key] = params[key];
362
335
  }
363
336
  }
@@ -380,7 +353,7 @@ class Connector {
380
353
  if (acceptedPath.includes(key)) {
381
354
  continue;
382
355
  }
383
- else if (key !== 'body') {
356
+ else {
384
357
  querystring[key] = params[key];
385
358
  }
386
359
  }
@@ -402,7 +375,7 @@ class Connector {
402
375
  if (acceptedPath.includes(key)) {
403
376
  continue;
404
377
  }
405
- else if (key !== 'body') {
378
+ else {
406
379
  // @ts-expect-error
407
380
  querystring[key] = params[key];
408
381
  }
@@ -426,7 +399,7 @@ class Connector {
426
399
  if (acceptedPath.includes(key)) {
427
400
  continue;
428
401
  }
429
- else if (key !== 'body') {
402
+ else {
430
403
  querystring[key] = params[key];
431
404
  }
432
405
  }
@@ -448,7 +421,7 @@ class Connector {
448
421
  if (acceptedPath.includes(key)) {
449
422
  continue;
450
423
  }
451
- else if (key !== 'body') {
424
+ else {
452
425
  // @ts-expect-error
453
426
  querystring[key] = params[key];
454
427
  }
@@ -472,7 +445,7 @@ class Connector {
472
445
  if (acceptedPath.includes(key)) {
473
446
  continue;
474
447
  }
475
- else if (key !== 'body') {
448
+ else {
476
449
  // @ts-expect-error
477
450
  querystring[key] = params[key];
478
451
  }
@@ -488,25 +461,16 @@ class Connector {
488
461
  const acceptedPath = [];
489
462
  const acceptedBody = ['id', 'job_type', 'trigger_method'];
490
463
  const querystring = {};
491
- // @ts-expect-error
492
- const userBody = params === null || params === void 0 ? void 0 : params.body;
493
- let body;
494
- if (typeof userBody === 'string') {
495
- body = userBody;
496
- }
497
- else {
498
- body = userBody != null ? { ...userBody } : undefined;
499
- }
464
+ const body = {};
500
465
  for (const key in params) {
501
466
  if (acceptedBody.includes(key)) {
502
- body = body !== null && body !== void 0 ? body : {};
503
467
  // @ts-expect-error
504
468
  body[key] = params[key];
505
469
  }
506
470
  else if (acceptedPath.includes(key)) {
507
471
  continue;
508
472
  }
509
- else if (key !== 'body') {
473
+ else {
510
474
  // @ts-expect-error
511
475
  querystring[key] = params[key];
512
476
  }
@@ -527,7 +491,7 @@ class Connector {
527
491
  if (acceptedPath.includes(key)) {
528
492
  continue;
529
493
  }
530
- else if (key !== 'body') {
494
+ else {
531
495
  querystring[key] = params[key];
532
496
  }
533
497
  }
@@ -549,7 +513,7 @@ class Connector {
549
513
  if (acceptedPath.includes(key)) {
550
514
  continue;
551
515
  }
552
- else if (key !== 'body') {
516
+ else {
553
517
  // @ts-expect-error
554
518
  querystring[key] = params[key];
555
519
  }
@@ -568,25 +532,16 @@ class Connector {
568
532
  const acceptedPath = ['connector_id'];
569
533
  const acceptedBody = ['api_key_id', 'api_key_secret_id'];
570
534
  const querystring = {};
571
- // @ts-expect-error
572
- const userBody = params === null || params === void 0 ? void 0 : params.body;
573
- let body;
574
- if (typeof userBody === 'string') {
575
- body = userBody;
576
- }
577
- else {
578
- body = userBody != null ? { ...userBody } : undefined;
579
- }
535
+ const body = {};
580
536
  for (const key in params) {
581
537
  if (acceptedBody.includes(key)) {
582
- body = body !== null && body !== void 0 ? body : {};
583
538
  // @ts-expect-error
584
539
  body[key] = params[key];
585
540
  }
586
541
  else if (acceptedPath.includes(key)) {
587
542
  continue;
588
543
  }
589
- else if (key !== 'body') {
544
+ else {
590
545
  // @ts-expect-error
591
546
  querystring[key] = params[key];
592
547
  }
@@ -605,25 +560,16 @@ class Connector {
605
560
  const acceptedPath = ['connector_id'];
606
561
  const acceptedBody = ['configuration', 'values'];
607
562
  const querystring = {};
608
- // @ts-expect-error
609
- const userBody = params === null || params === void 0 ? void 0 : params.body;
610
- let body;
611
- if (typeof userBody === 'string') {
612
- body = userBody;
613
- }
614
- else {
615
- body = userBody != null ? { ...userBody } : undefined;
616
- }
563
+ const body = {};
617
564
  for (const key in params) {
618
565
  if (acceptedBody.includes(key)) {
619
- body = body !== null && body !== void 0 ? body : {};
620
566
  // @ts-expect-error
621
567
  body[key] = params[key];
622
568
  }
623
569
  else if (acceptedPath.includes(key)) {
624
570
  continue;
625
571
  }
626
- else if (key !== 'body') {
572
+ else {
627
573
  // @ts-expect-error
628
574
  querystring[key] = params[key];
629
575
  }
@@ -642,25 +588,16 @@ class Connector {
642
588
  const acceptedPath = ['connector_id'];
643
589
  const acceptedBody = ['error'];
644
590
  const querystring = {};
645
- // @ts-expect-error
646
- const userBody = params === null || params === void 0 ? void 0 : params.body;
647
- let body;
648
- if (typeof userBody === 'string') {
649
- body = userBody;
650
- }
651
- else {
652
- body = userBody != null ? { ...userBody } : undefined;
653
- }
591
+ const body = {};
654
592
  for (const key in params) {
655
593
  if (acceptedBody.includes(key)) {
656
- body = body !== null && body !== void 0 ? body : {};
657
594
  // @ts-expect-error
658
595
  body[key] = params[key];
659
596
  }
660
597
  else if (acceptedPath.includes(key)) {
661
598
  continue;
662
599
  }
663
- else if (key !== 'body') {
600
+ else {
664
601
  // @ts-expect-error
665
602
  querystring[key] = params[key];
666
603
  }
@@ -684,7 +621,7 @@ class Connector {
684
621
  if (acceptedPath.includes(key)) {
685
622
  continue;
686
623
  }
687
- else if (key !== 'body') {
624
+ else {
688
625
  querystring[key] = params[key];
689
626
  }
690
627
  }
@@ -702,25 +639,16 @@ class Connector {
702
639
  const acceptedPath = ['connector_id'];
703
640
  const acceptedBody = ['filtering', 'rules', 'advanced_snippet'];
704
641
  const querystring = {};
705
- // @ts-expect-error
706
- const userBody = params === null || params === void 0 ? void 0 : params.body;
707
- let body;
708
- if (typeof userBody === 'string') {
709
- body = userBody;
710
- }
711
- else {
712
- body = userBody != null ? { ...userBody } : undefined;
713
- }
642
+ const body = {};
714
643
  for (const key in params) {
715
644
  if (acceptedBody.includes(key)) {
716
- body = body !== null && body !== void 0 ? body : {};
717
645
  // @ts-expect-error
718
646
  body[key] = params[key];
719
647
  }
720
648
  else if (acceptedPath.includes(key)) {
721
649
  continue;
722
650
  }
723
- else if (key !== 'body') {
651
+ else {
724
652
  // @ts-expect-error
725
653
  querystring[key] = params[key];
726
654
  }
@@ -739,25 +667,16 @@ class Connector {
739
667
  const acceptedPath = ['connector_id'];
740
668
  const acceptedBody = ['validation'];
741
669
  const querystring = {};
742
- // @ts-expect-error
743
- const userBody = params === null || params === void 0 ? void 0 : params.body;
744
- let body;
745
- if (typeof userBody === 'string') {
746
- body = userBody;
747
- }
748
- else {
749
- body = userBody != null ? { ...userBody } : undefined;
750
- }
670
+ const body = {};
751
671
  for (const key in params) {
752
672
  if (acceptedBody.includes(key)) {
753
- body = body !== null && body !== void 0 ? body : {};
754
673
  // @ts-expect-error
755
674
  body[key] = params[key];
756
675
  }
757
676
  else if (acceptedPath.includes(key)) {
758
677
  continue;
759
678
  }
760
- else if (key !== 'body') {
679
+ else {
761
680
  // @ts-expect-error
762
681
  querystring[key] = params[key];
763
682
  }
@@ -776,25 +695,16 @@ class Connector {
776
695
  const acceptedPath = ['connector_id'];
777
696
  const acceptedBody = ['index_name'];
778
697
  const querystring = {};
779
- // @ts-expect-error
780
- const userBody = params === null || params === void 0 ? void 0 : params.body;
781
- let body;
782
- if (typeof userBody === 'string') {
783
- body = userBody;
784
- }
785
- else {
786
- body = userBody != null ? { ...userBody } : undefined;
787
- }
698
+ const body = {};
788
699
  for (const key in params) {
789
700
  if (acceptedBody.includes(key)) {
790
- body = body !== null && body !== void 0 ? body : {};
791
701
  // @ts-expect-error
792
702
  body[key] = params[key];
793
703
  }
794
704
  else if (acceptedPath.includes(key)) {
795
705
  continue;
796
706
  }
797
- else if (key !== 'body') {
707
+ else {
798
708
  // @ts-expect-error
799
709
  querystring[key] = params[key];
800
710
  }
@@ -813,25 +723,16 @@ class Connector {
813
723
  const acceptedPath = ['connector_id'];
814
724
  const acceptedBody = ['name', 'description'];
815
725
  const querystring = {};
816
- // @ts-expect-error
817
- const userBody = params === null || params === void 0 ? void 0 : params.body;
818
- let body;
819
- if (typeof userBody === 'string') {
820
- body = userBody;
821
- }
822
- else {
823
- body = userBody != null ? { ...userBody } : undefined;
824
- }
726
+ const body = {};
825
727
  for (const key in params) {
826
728
  if (acceptedBody.includes(key)) {
827
- body = body !== null && body !== void 0 ? body : {};
828
729
  // @ts-expect-error
829
730
  body[key] = params[key];
830
731
  }
831
732
  else if (acceptedPath.includes(key)) {
832
733
  continue;
833
734
  }
834
- else if (key !== 'body') {
735
+ else {
835
736
  // @ts-expect-error
836
737
  querystring[key] = params[key];
837
738
  }
@@ -850,25 +751,16 @@ class Connector {
850
751
  const acceptedPath = ['connector_id'];
851
752
  const acceptedBody = ['is_native'];
852
753
  const querystring = {};
853
- // @ts-expect-error
854
- const userBody = params === null || params === void 0 ? void 0 : params.body;
855
- let body;
856
- if (typeof userBody === 'string') {
857
- body = userBody;
858
- }
859
- else {
860
- body = userBody != null ? { ...userBody } : undefined;
861
- }
754
+ const body = {};
862
755
  for (const key in params) {
863
756
  if (acceptedBody.includes(key)) {
864
- body = body !== null && body !== void 0 ? body : {};
865
757
  // @ts-expect-error
866
758
  body[key] = params[key];
867
759
  }
868
760
  else if (acceptedPath.includes(key)) {
869
761
  continue;
870
762
  }
871
- else if (key !== 'body') {
763
+ else {
872
764
  // @ts-expect-error
873
765
  querystring[key] = params[key];
874
766
  }
@@ -887,25 +779,16 @@ class Connector {
887
779
  const acceptedPath = ['connector_id'];
888
780
  const acceptedBody = ['pipeline'];
889
781
  const querystring = {};
890
- // @ts-expect-error
891
- const userBody = params === null || params === void 0 ? void 0 : params.body;
892
- let body;
893
- if (typeof userBody === 'string') {
894
- body = userBody;
895
- }
896
- else {
897
- body = userBody != null ? { ...userBody } : undefined;
898
- }
782
+ const body = {};
899
783
  for (const key in params) {
900
784
  if (acceptedBody.includes(key)) {
901
- body = body !== null && body !== void 0 ? body : {};
902
785
  // @ts-expect-error
903
786
  body[key] = params[key];
904
787
  }
905
788
  else if (acceptedPath.includes(key)) {
906
789
  continue;
907
790
  }
908
- else if (key !== 'body') {
791
+ else {
909
792
  // @ts-expect-error
910
793
  querystring[key] = params[key];
911
794
  }
@@ -924,25 +807,16 @@ class Connector {
924
807
  const acceptedPath = ['connector_id'];
925
808
  const acceptedBody = ['scheduling'];
926
809
  const querystring = {};
927
- // @ts-expect-error
928
- const userBody = params === null || params === void 0 ? void 0 : params.body;
929
- let body;
930
- if (typeof userBody === 'string') {
931
- body = userBody;
932
- }
933
- else {
934
- body = userBody != null ? { ...userBody } : undefined;
935
- }
810
+ const body = {};
936
811
  for (const key in params) {
937
812
  if (acceptedBody.includes(key)) {
938
- body = body !== null && body !== void 0 ? body : {};
939
813
  // @ts-expect-error
940
814
  body[key] = params[key];
941
815
  }
942
816
  else if (acceptedPath.includes(key)) {
943
817
  continue;
944
818
  }
945
- else if (key !== 'body') {
819
+ else {
946
820
  // @ts-expect-error
947
821
  querystring[key] = params[key];
948
822
  }
@@ -961,25 +835,16 @@ class Connector {
961
835
  const acceptedPath = ['connector_id'];
962
836
  const acceptedBody = ['service_type'];
963
837
  const querystring = {};
964
- // @ts-expect-error
965
- const userBody = params === null || params === void 0 ? void 0 : params.body;
966
- let body;
967
- if (typeof userBody === 'string') {
968
- body = userBody;
969
- }
970
- else {
971
- body = userBody != null ? { ...userBody } : undefined;
972
- }
838
+ const body = {};
973
839
  for (const key in params) {
974
840
  if (acceptedBody.includes(key)) {
975
- body = body !== null && body !== void 0 ? body : {};
976
841
  // @ts-expect-error
977
842
  body[key] = params[key];
978
843
  }
979
844
  else if (acceptedPath.includes(key)) {
980
845
  continue;
981
846
  }
982
- else if (key !== 'body') {
847
+ else {
983
848
  // @ts-expect-error
984
849
  querystring[key] = params[key];
985
850
  }
@@ -998,25 +863,16 @@ class Connector {
998
863
  const acceptedPath = ['connector_id'];
999
864
  const acceptedBody = ['status'];
1000
865
  const querystring = {};
1001
- // @ts-expect-error
1002
- const userBody = params === null || params === void 0 ? void 0 : params.body;
1003
- let body;
1004
- if (typeof userBody === 'string') {
1005
- body = userBody;
1006
- }
1007
- else {
1008
- body = userBody != null ? { ...userBody } : undefined;
1009
- }
866
+ const body = {};
1010
867
  for (const key in params) {
1011
868
  if (acceptedBody.includes(key)) {
1012
- body = body !== null && body !== void 0 ? body : {};
1013
869
  // @ts-expect-error
1014
870
  body[key] = params[key];
1015
871
  }
1016
872
  else if (acceptedPath.includes(key)) {
1017
873
  continue;
1018
874
  }
1019
- else if (key !== 'body') {
875
+ else {
1020
876
  // @ts-expect-error
1021
877
  querystring[key] = params[key];
1022
878
  }