@elastic/elasticsearch 8.13.1 → 8.14.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 (265) hide show
  1. package/catalog-info.yaml +3 -6
  2. package/lib/api/api/async_search.d.ts +4 -4
  3. package/lib/api/api/async_search.js +28 -4
  4. package/lib/api/api/async_search.js.map +1 -1
  5. package/lib/api/api/autoscaling.d.ts +4 -4
  6. package/lib/api/api/autoscaling.js +25 -4
  7. package/lib/api/api/autoscaling.js.map +1 -1
  8. package/lib/api/api/bulk.d.ts +1 -1
  9. package/lib/api/api/bulk.js +7 -1
  10. package/lib/api/api/bulk.js.map +1 -1
  11. package/lib/api/api/cat.d.ts +26 -26
  12. package/lib/api/api/cat.js +155 -26
  13. package/lib/api/api/cat.js.map +1 -1
  14. package/lib/api/api/ccr.d.ts +13 -13
  15. package/lib/api/api/ccr.js +88 -13
  16. package/lib/api/api/ccr.js.map +1 -1
  17. package/lib/api/api/clear_scroll.d.ts +1 -1
  18. package/lib/api/api/clear_scroll.js +7 -1
  19. package/lib/api/api/clear_scroll.js.map +1 -1
  20. package/lib/api/api/close_point_in_time.d.ts +1 -1
  21. package/lib/api/api/close_point_in_time.js +4 -1
  22. package/lib/api/api/close_point_in_time.js.map +1 -1
  23. package/lib/api/api/cluster.d.ts +16 -16
  24. package/lib/api/api/cluster.js +90 -17
  25. package/lib/api/api/cluster.js.map +1 -1
  26. package/lib/api/api/connector.d.ts +231 -0
  27. package/lib/api/api/connector.js +980 -0
  28. package/lib/api/api/connector.js.map +1 -0
  29. package/lib/api/api/count.d.ts +1 -1
  30. package/lib/api/api/count.js +7 -1
  31. package/lib/api/api/count.js.map +1 -1
  32. package/lib/api/api/create.d.ts +1 -1
  33. package/lib/api/api/create.js +8 -1
  34. package/lib/api/api/create.js.map +1 -1
  35. package/lib/api/api/dangling_indices.d.ts +3 -3
  36. package/lib/api/api/dangling_indices.js +18 -3
  37. package/lib/api/api/dangling_indices.js.map +1 -1
  38. package/lib/api/api/delete.d.ts +1 -1
  39. package/lib/api/api/delete.js +8 -1
  40. package/lib/api/api/delete.js.map +1 -1
  41. package/lib/api/api/delete_by_query.d.ts +1 -1
  42. package/lib/api/api/delete_by_query.js +7 -1
  43. package/lib/api/api/delete_by_query.js.map +1 -1
  44. package/lib/api/api/delete_by_query_rethrottle.d.ts +1 -1
  45. package/lib/api/api/delete_by_query_rethrottle.js +7 -1
  46. package/lib/api/api/delete_by_query_rethrottle.js.map +1 -1
  47. package/lib/api/api/delete_script.d.ts +1 -1
  48. package/lib/api/api/delete_script.js +7 -1
  49. package/lib/api/api/delete_script.js.map +1 -1
  50. package/lib/api/api/enrich.d.ts +5 -5
  51. package/lib/api/api/enrich.js +32 -5
  52. package/lib/api/api/enrich.js.map +1 -1
  53. package/lib/api/api/eql.d.ts +4 -4
  54. package/lib/api/api/eql.js +28 -4
  55. package/lib/api/api/eql.js.map +1 -1
  56. package/lib/api/api/esql.d.ts +15 -1
  57. package/lib/api/api/esql.js +47 -1
  58. package/lib/api/api/esql.js.map +1 -1
  59. package/lib/api/api/exists.d.ts +1 -1
  60. package/lib/api/api/exists.js +8 -1
  61. package/lib/api/api/exists.js.map +1 -1
  62. package/lib/api/api/exists_source.d.ts +1 -1
  63. package/lib/api/api/exists_source.js +8 -1
  64. package/lib/api/api/exists_source.js.map +1 -1
  65. package/lib/api/api/explain.d.ts +1 -1
  66. package/lib/api/api/explain.js +8 -1
  67. package/lib/api/api/explain.js.map +1 -1
  68. package/lib/api/api/features.d.ts +2 -2
  69. package/lib/api/api/features.js +8 -2
  70. package/lib/api/api/features.js.map +1 -1
  71. package/lib/api/api/field_caps.d.ts +1 -1
  72. package/lib/api/api/field_caps.js +7 -1
  73. package/lib/api/api/field_caps.js.map +1 -1
  74. package/lib/api/api/fleet.d.ts +1 -1
  75. package/lib/api/api/fleet.js +39 -6
  76. package/lib/api/api/fleet.js.map +1 -1
  77. package/lib/api/api/get.d.ts +1 -1
  78. package/lib/api/api/get.js +8 -1
  79. package/lib/api/api/get.js.map +1 -1
  80. package/lib/api/api/get_script.d.ts +1 -1
  81. package/lib/api/api/get_script.js +7 -1
  82. package/lib/api/api/get_script.js.map +1 -1
  83. package/lib/api/api/get_script_context.d.ts +1 -1
  84. package/lib/api/api/get_script_context.js +4 -1
  85. package/lib/api/api/get_script_context.js.map +1 -1
  86. package/lib/api/api/get_script_languages.d.ts +1 -1
  87. package/lib/api/api/get_script_languages.js +4 -1
  88. package/lib/api/api/get_script_languages.js.map +1 -1
  89. package/lib/api/api/get_source.d.ts +1 -1
  90. package/lib/api/api/get_source.js +8 -1
  91. package/lib/api/api/get_source.js.map +1 -1
  92. package/lib/api/api/graph.d.ts +1 -1
  93. package/lib/api/api/graph.js +7 -1
  94. package/lib/api/api/graph.js.map +1 -1
  95. package/lib/api/api/health_report.d.ts +1 -1
  96. package/lib/api/api/health_report.js +7 -1
  97. package/lib/api/api/health_report.js.map +1 -1
  98. package/lib/api/api/ilm.d.ts +11 -11
  99. package/lib/api/api/ilm.js +65 -11
  100. package/lib/api/api/ilm.js.map +1 -1
  101. package/lib/api/api/index.d.ts +1 -1
  102. package/lib/api/api/index.js +8 -1
  103. package/lib/api/api/index.js.map +1 -1
  104. package/lib/api/api/indices.d.ts +62 -62
  105. package/lib/api/api/indices.js +435 -80
  106. package/lib/api/api/indices.js.map +1 -1
  107. package/lib/api/api/inference.d.ts +4 -4
  108. package/lib/api/api/inference.js +38 -6
  109. package/lib/api/api/inference.js.map +1 -1
  110. package/lib/api/api/info.d.ts +1 -1
  111. package/lib/api/api/info.js +4 -1
  112. package/lib/api/api/info.js.map +1 -1
  113. package/lib/api/api/ingest.d.ts +6 -6
  114. package/lib/api/api/ingest.js +36 -6
  115. package/lib/api/api/ingest.js.map +1 -1
  116. package/lib/api/api/knn_search.d.ts +1 -1
  117. package/lib/api/api/knn_search.js +7 -1
  118. package/lib/api/api/knn_search.js.map +1 -1
  119. package/lib/api/api/license.d.ts +7 -7
  120. package/lib/api/api/license.js +28 -7
  121. package/lib/api/api/license.js.map +1 -1
  122. package/lib/api/api/logstash.d.ts +3 -3
  123. package/lib/api/api/logstash.js +21 -3
  124. package/lib/api/api/logstash.js.map +1 -1
  125. package/lib/api/api/mget.d.ts +1 -1
  126. package/lib/api/api/mget.js +7 -1
  127. package/lib/api/api/mget.js.map +1 -1
  128. package/lib/api/api/migration.d.ts +3 -3
  129. package/lib/api/api/migration.js +15 -3
  130. package/lib/api/api/migration.js.map +1 -1
  131. package/lib/api/api/ml.d.ts +76 -76
  132. package/lib/api/api/ml.js +525 -76
  133. package/lib/api/api/ml.js.map +1 -1
  134. package/lib/api/api/monitoring.d.ts +1 -1
  135. package/lib/api/api/monitoring.js +7 -1
  136. package/lib/api/api/monitoring.js.map +1 -1
  137. package/lib/api/api/msearch.d.ts +1 -1
  138. package/lib/api/api/msearch.js +7 -1
  139. package/lib/api/api/msearch.js.map +1 -1
  140. package/lib/api/api/msearch_template.d.ts +1 -1
  141. package/lib/api/api/msearch_template.js +7 -1
  142. package/lib/api/api/msearch_template.js.map +1 -1
  143. package/lib/api/api/mtermvectors.d.ts +1 -1
  144. package/lib/api/api/mtermvectors.js +7 -1
  145. package/lib/api/api/mtermvectors.js.map +1 -1
  146. package/lib/api/api/nodes.d.ts +7 -7
  147. package/lib/api/api/nodes.js +54 -7
  148. package/lib/api/api/nodes.js.map +1 -1
  149. package/lib/api/api/open_point_in_time.d.ts +1 -1
  150. package/lib/api/api/open_point_in_time.js +7 -1
  151. package/lib/api/api/open_point_in_time.js.map +1 -1
  152. package/lib/api/api/ping.d.ts +1 -1
  153. package/lib/api/api/ping.js +4 -1
  154. package/lib/api/api/ping.js.map +1 -1
  155. package/lib/api/api/profiling.d.ts +39 -0
  156. package/lib/api/api/profiling.js +113 -0
  157. package/lib/api/api/profiling.js.map +1 -0
  158. package/lib/api/api/put_script.d.ts +1 -1
  159. package/lib/api/api/put_script.js +8 -1
  160. package/lib/api/api/put_script.js.map +1 -1
  161. package/lib/api/api/query_ruleset.d.ts +4 -4
  162. package/lib/api/api/query_ruleset.js +25 -4
  163. package/lib/api/api/query_ruleset.js.map +1 -1
  164. package/lib/api/api/rank_eval.d.ts +1 -1
  165. package/lib/api/api/rank_eval.js +7 -1
  166. package/lib/api/api/rank_eval.js.map +1 -1
  167. package/lib/api/api/reindex.d.ts +1 -1
  168. package/lib/api/api/reindex.js +4 -1
  169. package/lib/api/api/reindex.js.map +1 -1
  170. package/lib/api/api/reindex_rethrottle.d.ts +1 -1
  171. package/lib/api/api/reindex_rethrottle.js +7 -1
  172. package/lib/api/api/reindex_rethrottle.js.map +1 -1
  173. package/lib/api/api/render_search_template.d.ts +1 -1
  174. package/lib/api/api/render_search_template.js +7 -1
  175. package/lib/api/api/render_search_template.js.map +1 -1
  176. package/lib/api/api/rollup.d.ts +8 -8
  177. package/lib/api/api/rollup.js +56 -8
  178. package/lib/api/api/rollup.js.map +1 -1
  179. package/lib/api/api/scripts_painless_execute.d.ts +1 -1
  180. package/lib/api/api/scripts_painless_execute.js +4 -1
  181. package/lib/api/api/scripts_painless_execute.js.map +1 -1
  182. package/lib/api/api/scroll.d.ts +1 -1
  183. package/lib/api/api/scroll.js +7 -1
  184. package/lib/api/api/scroll.js.map +1 -1
  185. package/lib/api/api/search.d.ts +1 -1
  186. package/lib/api/api/search.js +8 -2
  187. package/lib/api/api/search.js.map +1 -1
  188. package/lib/api/api/search_application.d.ts +9 -9
  189. package/lib/api/api/search_application.js +68 -10
  190. package/lib/api/api/search_application.js.map +1 -1
  191. package/lib/api/api/search_mvt.d.ts +1 -1
  192. package/lib/api/api/search_mvt.js +11 -1
  193. package/lib/api/api/search_mvt.js.map +1 -1
  194. package/lib/api/api/search_shards.d.ts +1 -1
  195. package/lib/api/api/search_shards.js +7 -1
  196. package/lib/api/api/search_shards.js.map +1 -1
  197. package/lib/api/api/search_template.d.ts +1 -1
  198. package/lib/api/api/search_template.js +7 -1
  199. package/lib/api/api/search_template.js.map +1 -1
  200. package/lib/api/api/searchable_snapshots.d.ts +4 -4
  201. package/lib/api/api/searchable_snapshots.js +29 -4
  202. package/lib/api/api/searchable_snapshots.js.map +1 -1
  203. package/lib/api/api/security.d.ts +66 -59
  204. package/lib/api/api/security.js +359 -59
  205. package/lib/api/api/security.js.map +1 -1
  206. package/lib/api/api/shutdown.js +21 -3
  207. package/lib/api/api/shutdown.js.map +1 -1
  208. package/lib/api/api/simulate.d.ts +18 -0
  209. package/lib/api/api/simulate.js +64 -0
  210. package/lib/api/api/simulate.js.map +1 -0
  211. package/lib/api/api/slm.d.ts +9 -9
  212. package/lib/api/api/slm.js +48 -9
  213. package/lib/api/api/slm.js.map +1 -1
  214. package/lib/api/api/snapshot.d.ts +12 -12
  215. package/lib/api/api/snapshot.js +91 -12
  216. package/lib/api/api/snapshot.js.map +1 -1
  217. package/lib/api/api/sql.d.ts +6 -6
  218. package/lib/api/api/sql.js +33 -6
  219. package/lib/api/api/sql.js.map +1 -1
  220. package/lib/api/api/ssl.d.ts +1 -1
  221. package/lib/api/api/ssl.js +4 -1
  222. package/lib/api/api/ssl.js.map +1 -1
  223. package/lib/api/api/synonyms.d.ts +7 -7
  224. package/lib/api/api/synonyms.js +49 -7
  225. package/lib/api/api/synonyms.js.map +1 -1
  226. package/lib/api/api/tasks.d.ts +3 -3
  227. package/lib/api/api/tasks.js +18 -3
  228. package/lib/api/api/tasks.js.map +1 -1
  229. package/lib/api/api/terms_enum.d.ts +1 -1
  230. package/lib/api/api/terms_enum.js +7 -1
  231. package/lib/api/api/terms_enum.js.map +1 -1
  232. package/lib/api/api/termvectors.d.ts +1 -1
  233. package/lib/api/api/termvectors.js +8 -1
  234. package/lib/api/api/termvectors.js.map +1 -1
  235. package/lib/api/api/text_structure.d.ts +16 -2
  236. package/lib/api/api/text_structure.js +48 -2
  237. package/lib/api/api/text_structure.js.map +1 -1
  238. package/lib/api/api/transform.d.ts +11 -11
  239. package/lib/api/api/transform.js +74 -11
  240. package/lib/api/api/transform.js.map +1 -1
  241. package/lib/api/api/update.d.ts +1 -1
  242. package/lib/api/api/update.js +8 -1
  243. package/lib/api/api/update.js.map +1 -1
  244. package/lib/api/api/update_by_query.d.ts +2 -2
  245. package/lib/api/api/update_by_query.js +7 -1
  246. package/lib/api/api/update_by_query.js.map +1 -1
  247. package/lib/api/api/update_by_query_rethrottle.d.ts +1 -1
  248. package/lib/api/api/update_by_query_rethrottle.js +7 -1
  249. package/lib/api/api/update_by_query_rethrottle.js.map +1 -1
  250. package/lib/api/api/watcher.d.ts +13 -13
  251. package/lib/api/api/watcher.js +77 -13
  252. package/lib/api/api/watcher.js.map +1 -1
  253. package/lib/api/api/xpack.d.ts +2 -2
  254. package/lib/api/api/xpack.js +8 -2
  255. package/lib/api/api/xpack.js.map +1 -1
  256. package/lib/api/index.d.ts +12 -0
  257. package/lib/api/index.js +38 -2
  258. package/lib/api/index.js.map +1 -1
  259. package/lib/api/types.d.ts +590 -95
  260. package/lib/api/typesWithBodyKey.d.ts +644 -99
  261. package/lib/helpers.d.ts +29 -0
  262. package/lib/helpers.js +96 -20
  263. package/lib/helpers.js.map +1 -1
  264. package/package.json +3 -3
  265. package/Makefile +0 -11
@@ -0,0 +1,980 @@
1
+ "use strict";
2
+ /*
3
+ * Licensed to Elasticsearch B.V. under one or more contributor
4
+ * license agreements. See the NOTICE file distributed with
5
+ * this work for additional information regarding copyright
6
+ * ownership. Elasticsearch B.V. licenses this file to you under
7
+ * the Apache License, Version 2.0 (the "License"); you may
8
+ * not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing,
14
+ * software distributed under the License is distributed on an
15
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ * KIND, either express or implied. See the License for the
17
+ * specific language governing permissions and limitations
18
+ * under the License.
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ class Connector {
22
+ constructor(transport) {
23
+ Object.defineProperty(this, "transport", {
24
+ enumerable: true,
25
+ configurable: true,
26
+ writable: true,
27
+ value: void 0
28
+ });
29
+ this.transport = transport;
30
+ }
31
+ async checkIn(params, options) {
32
+ const acceptedPath = ['connector_id'];
33
+ const querystring = {};
34
+ const body = undefined;
35
+ for (const key in params) {
36
+ if (acceptedPath.includes(key)) {
37
+ continue;
38
+ }
39
+ else if (key !== 'body') {
40
+ // @ts-expect-error
41
+ querystring[key] = params[key];
42
+ }
43
+ }
44
+ const method = 'PUT';
45
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_check_in`;
46
+ const meta = {
47
+ name: 'connector.check_in',
48
+ pathParts: {
49
+ connector_id: params.connector_id
50
+ }
51
+ };
52
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
53
+ }
54
+ async delete(params, options) {
55
+ const acceptedPath = ['connector_id'];
56
+ const querystring = {};
57
+ const body = undefined;
58
+ for (const key in params) {
59
+ if (acceptedPath.includes(key)) {
60
+ continue;
61
+ }
62
+ else if (key !== 'body') {
63
+ // @ts-expect-error
64
+ querystring[key] = params[key];
65
+ }
66
+ }
67
+ const method = 'DELETE';
68
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}`;
69
+ const meta = {
70
+ name: 'connector.delete',
71
+ pathParts: {
72
+ connector_id: params.connector_id
73
+ }
74
+ };
75
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
76
+ }
77
+ async get(params, options) {
78
+ const acceptedPath = ['connector_id'];
79
+ const querystring = {};
80
+ const body = undefined;
81
+ for (const key in params) {
82
+ if (acceptedPath.includes(key)) {
83
+ continue;
84
+ }
85
+ else if (key !== 'body') {
86
+ // @ts-expect-error
87
+ querystring[key] = params[key];
88
+ }
89
+ }
90
+ const method = 'GET';
91
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}`;
92
+ const meta = {
93
+ name: 'connector.get',
94
+ pathParts: {
95
+ connector_id: params.connector_id
96
+ }
97
+ };
98
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
99
+ }
100
+ async lastSync(params, options) {
101
+ const acceptedPath = ['connector_id'];
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'];
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
+ }
113
+ for (const key in params) {
114
+ if (acceptedBody.includes(key)) {
115
+ body = body !== null && body !== void 0 ? body : {};
116
+ // @ts-expect-error
117
+ body[key] = params[key];
118
+ }
119
+ else if (acceptedPath.includes(key)) {
120
+ continue;
121
+ }
122
+ else if (key !== 'body') {
123
+ // @ts-expect-error
124
+ querystring[key] = params[key];
125
+ }
126
+ }
127
+ const method = 'PUT';
128
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_last_sync`;
129
+ const meta = {
130
+ name: 'connector.last_sync',
131
+ pathParts: {
132
+ connector_id: params.connector_id
133
+ }
134
+ };
135
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
136
+ }
137
+ async list(params, options) {
138
+ const acceptedPath = [];
139
+ const querystring = {};
140
+ const body = undefined;
141
+ params = params !== null && params !== void 0 ? params : {};
142
+ for (const key in params) {
143
+ if (acceptedPath.includes(key)) {
144
+ continue;
145
+ }
146
+ else if (key !== 'body') {
147
+ // @ts-expect-error
148
+ querystring[key] = params[key];
149
+ }
150
+ }
151
+ const method = 'GET';
152
+ const path = '/_connector';
153
+ const meta = {
154
+ name: 'connector.list'
155
+ };
156
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
157
+ }
158
+ async post(params, options) {
159
+ const acceptedPath = [];
160
+ const acceptedBody = ['description', 'index_name', 'is_native', 'language', 'name', 'service_type'];
161
+ 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
+ }
171
+ for (const key in params) {
172
+ if (acceptedBody.includes(key)) {
173
+ body = body !== null && body !== void 0 ? body : {};
174
+ // @ts-expect-error
175
+ body[key] = params[key];
176
+ }
177
+ else if (acceptedPath.includes(key)) {
178
+ continue;
179
+ }
180
+ else if (key !== 'body') {
181
+ // @ts-expect-error
182
+ querystring[key] = params[key];
183
+ }
184
+ }
185
+ const method = 'POST';
186
+ const path = '/_connector';
187
+ const meta = {
188
+ name: 'connector.post'
189
+ };
190
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
191
+ }
192
+ async put(params, options) {
193
+ const acceptedPath = ['connector_id'];
194
+ const acceptedBody = ['description', 'index_name', 'is_native', 'language', 'name', 'service_type'];
195
+ const querystring = {};
196
+ // @ts-expect-error
197
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
198
+ let body;
199
+ if (typeof userBody === 'string') {
200
+ body = userBody;
201
+ }
202
+ else {
203
+ body = userBody != null ? { ...userBody } : undefined;
204
+ }
205
+ for (const key in params) {
206
+ if (acceptedBody.includes(key)) {
207
+ body = body !== null && body !== void 0 ? body : {};
208
+ // @ts-expect-error
209
+ body[key] = params[key];
210
+ }
211
+ else if (acceptedPath.includes(key)) {
212
+ continue;
213
+ }
214
+ else if (key !== 'body') {
215
+ // @ts-expect-error
216
+ querystring[key] = params[key];
217
+ }
218
+ }
219
+ const method = 'PUT';
220
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}`;
221
+ const meta = {
222
+ name: 'connector.put',
223
+ pathParts: {
224
+ connector_id: params.connector_id
225
+ }
226
+ };
227
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
228
+ }
229
+ async secretDelete(params, options) {
230
+ const acceptedPath = ['id'];
231
+ const querystring = {};
232
+ const body = undefined;
233
+ params = params !== null && params !== void 0 ? params : {};
234
+ for (const key in params) {
235
+ if (acceptedPath.includes(key)) {
236
+ continue;
237
+ }
238
+ else if (key !== 'body') {
239
+ querystring[key] = params[key];
240
+ }
241
+ }
242
+ const method = 'DELETE';
243
+ const path = `/_connector/_secret/${encodeURIComponent(params.id.toString())}`;
244
+ const meta = {
245
+ name: 'connector.secret_delete',
246
+ pathParts: {
247
+ id: params.id
248
+ }
249
+ };
250
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
251
+ }
252
+ async secretGet(params, options) {
253
+ const acceptedPath = ['id'];
254
+ const querystring = {};
255
+ const body = undefined;
256
+ params = params !== null && params !== void 0 ? params : {};
257
+ for (const key in params) {
258
+ if (acceptedPath.includes(key)) {
259
+ continue;
260
+ }
261
+ else if (key !== 'body') {
262
+ querystring[key] = params[key];
263
+ }
264
+ }
265
+ const method = 'GET';
266
+ const path = `/_connector/_secret/${encodeURIComponent(params.id.toString())}`;
267
+ const meta = {
268
+ name: 'connector.secret_get',
269
+ pathParts: {
270
+ id: params.id
271
+ }
272
+ };
273
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
274
+ }
275
+ async secretPost(params, options) {
276
+ const acceptedPath = [];
277
+ const querystring = {};
278
+ const body = undefined;
279
+ params = params !== null && params !== void 0 ? params : {};
280
+ for (const key in params) {
281
+ if (acceptedPath.includes(key)) {
282
+ continue;
283
+ }
284
+ else if (key !== 'body') {
285
+ querystring[key] = params[key];
286
+ }
287
+ }
288
+ const method = 'POST';
289
+ const path = '/_connector/_secret';
290
+ const meta = {
291
+ name: 'connector.secret_post'
292
+ };
293
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
294
+ }
295
+ async secretPut(params, options) {
296
+ const acceptedPath = ['id'];
297
+ const querystring = {};
298
+ const body = undefined;
299
+ params = params !== null && params !== void 0 ? params : {};
300
+ for (const key in params) {
301
+ if (acceptedPath.includes(key)) {
302
+ continue;
303
+ }
304
+ else if (key !== 'body') {
305
+ querystring[key] = params[key];
306
+ }
307
+ }
308
+ const method = 'PUT';
309
+ const path = `/_connector/_secret/${encodeURIComponent(params.id.toString())}`;
310
+ const meta = {
311
+ name: 'connector.secret_put',
312
+ pathParts: {
313
+ id: params.id
314
+ }
315
+ };
316
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
317
+ }
318
+ async syncJobCancel(params, options) {
319
+ const acceptedPath = ['connector_sync_job_id'];
320
+ const querystring = {};
321
+ const body = undefined;
322
+ for (const key in params) {
323
+ if (acceptedPath.includes(key)) {
324
+ continue;
325
+ }
326
+ else if (key !== 'body') {
327
+ // @ts-expect-error
328
+ querystring[key] = params[key];
329
+ }
330
+ }
331
+ const method = 'PUT';
332
+ const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}/_cancel`;
333
+ const meta = {
334
+ name: 'connector.sync_job_cancel',
335
+ pathParts: {
336
+ connector_sync_job_id: params.connector_sync_job_id
337
+ }
338
+ };
339
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
340
+ }
341
+ async syncJobCheckIn(params, options) {
342
+ const acceptedPath = ['connector_sync_job_id'];
343
+ const querystring = {};
344
+ const body = undefined;
345
+ params = params !== null && params !== void 0 ? params : {};
346
+ for (const key in params) {
347
+ if (acceptedPath.includes(key)) {
348
+ continue;
349
+ }
350
+ else if (key !== 'body') {
351
+ querystring[key] = params[key];
352
+ }
353
+ }
354
+ const method = 'PUT';
355
+ const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}/_check_in`;
356
+ const meta = {
357
+ name: 'connector.sync_job_check_in',
358
+ pathParts: {
359
+ connector_sync_job_id: params.connector_sync_job_id
360
+ }
361
+ };
362
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
363
+ }
364
+ async syncJobDelete(params, options) {
365
+ const acceptedPath = ['connector_sync_job_id'];
366
+ const querystring = {};
367
+ const body = undefined;
368
+ for (const key in params) {
369
+ if (acceptedPath.includes(key)) {
370
+ continue;
371
+ }
372
+ else if (key !== 'body') {
373
+ // @ts-expect-error
374
+ querystring[key] = params[key];
375
+ }
376
+ }
377
+ const method = 'DELETE';
378
+ const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}`;
379
+ const meta = {
380
+ name: 'connector.sync_job_delete',
381
+ pathParts: {
382
+ connector_sync_job_id: params.connector_sync_job_id
383
+ }
384
+ };
385
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
386
+ }
387
+ async syncJobError(params, options) {
388
+ const acceptedPath = ['connector_sync_job_id'];
389
+ const querystring = {};
390
+ const body = undefined;
391
+ params = params !== null && params !== void 0 ? params : {};
392
+ for (const key in params) {
393
+ if (acceptedPath.includes(key)) {
394
+ continue;
395
+ }
396
+ else if (key !== 'body') {
397
+ querystring[key] = params[key];
398
+ }
399
+ }
400
+ const method = 'PUT';
401
+ const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}/_error`;
402
+ const meta = {
403
+ name: 'connector.sync_job_error',
404
+ pathParts: {
405
+ connector_sync_job_id: params.connector_sync_job_id
406
+ }
407
+ };
408
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
409
+ }
410
+ async syncJobGet(params, options) {
411
+ const acceptedPath = ['connector_sync_job_id'];
412
+ const querystring = {};
413
+ const body = undefined;
414
+ for (const key in params) {
415
+ if (acceptedPath.includes(key)) {
416
+ continue;
417
+ }
418
+ else if (key !== 'body') {
419
+ // @ts-expect-error
420
+ querystring[key] = params[key];
421
+ }
422
+ }
423
+ const method = 'GET';
424
+ const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}`;
425
+ const meta = {
426
+ name: 'connector.sync_job_get',
427
+ pathParts: {
428
+ connector_sync_job_id: params.connector_sync_job_id
429
+ }
430
+ };
431
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
432
+ }
433
+ async syncJobList(params, options) {
434
+ const acceptedPath = [];
435
+ const querystring = {};
436
+ const body = undefined;
437
+ params = params !== null && params !== void 0 ? params : {};
438
+ for (const key in params) {
439
+ if (acceptedPath.includes(key)) {
440
+ continue;
441
+ }
442
+ else if (key !== 'body') {
443
+ // @ts-expect-error
444
+ querystring[key] = params[key];
445
+ }
446
+ }
447
+ const method = 'GET';
448
+ const path = '/_connector/_sync_job';
449
+ const meta = {
450
+ name: 'connector.sync_job_list'
451
+ };
452
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
453
+ }
454
+ async syncJobPost(params, options) {
455
+ const acceptedPath = [];
456
+ const acceptedBody = ['id', 'job_type', 'trigger_method'];
457
+ const querystring = {};
458
+ // @ts-expect-error
459
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
460
+ let body;
461
+ if (typeof userBody === 'string') {
462
+ body = userBody;
463
+ }
464
+ else {
465
+ body = userBody != null ? { ...userBody } : undefined;
466
+ }
467
+ for (const key in params) {
468
+ if (acceptedBody.includes(key)) {
469
+ body = body !== null && body !== void 0 ? body : {};
470
+ // @ts-expect-error
471
+ body[key] = params[key];
472
+ }
473
+ else if (acceptedPath.includes(key)) {
474
+ continue;
475
+ }
476
+ else if (key !== 'body') {
477
+ // @ts-expect-error
478
+ querystring[key] = params[key];
479
+ }
480
+ }
481
+ const method = 'POST';
482
+ const path = '/_connector/_sync_job';
483
+ const meta = {
484
+ name: 'connector.sync_job_post'
485
+ };
486
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
487
+ }
488
+ async syncJobUpdateStats(params, options) {
489
+ const acceptedPath = ['connector_sync_job_id'];
490
+ const querystring = {};
491
+ const body = undefined;
492
+ params = params !== null && params !== void 0 ? params : {};
493
+ for (const key in params) {
494
+ if (acceptedPath.includes(key)) {
495
+ continue;
496
+ }
497
+ else if (key !== 'body') {
498
+ querystring[key] = params[key];
499
+ }
500
+ }
501
+ const method = 'PUT';
502
+ const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}/_stats`;
503
+ const meta = {
504
+ name: 'connector.sync_job_update_stats',
505
+ pathParts: {
506
+ connector_sync_job_id: params.connector_sync_job_id
507
+ }
508
+ };
509
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
510
+ }
511
+ async updateActiveFiltering(params, options) {
512
+ const acceptedPath = ['connector_id'];
513
+ const querystring = {};
514
+ const body = undefined;
515
+ for (const key in params) {
516
+ if (acceptedPath.includes(key)) {
517
+ continue;
518
+ }
519
+ else if (key !== 'body') {
520
+ // @ts-expect-error
521
+ querystring[key] = params[key];
522
+ }
523
+ }
524
+ const method = 'PUT';
525
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_filtering/_activate`;
526
+ const meta = {
527
+ name: 'connector.update_active_filtering',
528
+ pathParts: {
529
+ connector_id: params.connector_id
530
+ }
531
+ };
532
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
533
+ }
534
+ async updateApiKeyId(params, options) {
535
+ const acceptedPath = ['connector_id'];
536
+ const acceptedBody = ['api_key_id', 'api_key_secret_id'];
537
+ const querystring = {};
538
+ // @ts-expect-error
539
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
540
+ let body;
541
+ if (typeof userBody === 'string') {
542
+ body = userBody;
543
+ }
544
+ else {
545
+ body = userBody != null ? { ...userBody } : undefined;
546
+ }
547
+ for (const key in params) {
548
+ if (acceptedBody.includes(key)) {
549
+ body = body !== null && body !== void 0 ? body : {};
550
+ // @ts-expect-error
551
+ body[key] = params[key];
552
+ }
553
+ else if (acceptedPath.includes(key)) {
554
+ continue;
555
+ }
556
+ else if (key !== 'body') {
557
+ // @ts-expect-error
558
+ querystring[key] = params[key];
559
+ }
560
+ }
561
+ const method = 'PUT';
562
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_api_key_id`;
563
+ const meta = {
564
+ name: 'connector.update_api_key_id',
565
+ pathParts: {
566
+ connector_id: params.connector_id
567
+ }
568
+ };
569
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
570
+ }
571
+ async updateConfiguration(params, options) {
572
+ const acceptedPath = ['connector_id'];
573
+ const acceptedBody = ['configuration', 'values'];
574
+ const querystring = {};
575
+ // @ts-expect-error
576
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
577
+ let body;
578
+ if (typeof userBody === 'string') {
579
+ body = userBody;
580
+ }
581
+ else {
582
+ body = userBody != null ? { ...userBody } : undefined;
583
+ }
584
+ for (const key in params) {
585
+ if (acceptedBody.includes(key)) {
586
+ body = body !== null && body !== void 0 ? body : {};
587
+ // @ts-expect-error
588
+ body[key] = params[key];
589
+ }
590
+ else if (acceptedPath.includes(key)) {
591
+ continue;
592
+ }
593
+ else if (key !== 'body') {
594
+ // @ts-expect-error
595
+ querystring[key] = params[key];
596
+ }
597
+ }
598
+ const method = 'PUT';
599
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_configuration`;
600
+ const meta = {
601
+ name: 'connector.update_configuration',
602
+ pathParts: {
603
+ connector_id: params.connector_id
604
+ }
605
+ };
606
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
607
+ }
608
+ async updateError(params, options) {
609
+ const acceptedPath = ['connector_id'];
610
+ const acceptedBody = ['error'];
611
+ const querystring = {};
612
+ // @ts-expect-error
613
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
614
+ let body;
615
+ if (typeof userBody === 'string') {
616
+ body = userBody;
617
+ }
618
+ else {
619
+ body = userBody != null ? { ...userBody } : undefined;
620
+ }
621
+ for (const key in params) {
622
+ if (acceptedBody.includes(key)) {
623
+ body = body !== null && body !== void 0 ? body : {};
624
+ // @ts-expect-error
625
+ body[key] = params[key];
626
+ }
627
+ else if (acceptedPath.includes(key)) {
628
+ continue;
629
+ }
630
+ else if (key !== 'body') {
631
+ // @ts-expect-error
632
+ querystring[key] = params[key];
633
+ }
634
+ }
635
+ const method = 'PUT';
636
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_error`;
637
+ const meta = {
638
+ name: 'connector.update_error',
639
+ pathParts: {
640
+ connector_id: params.connector_id
641
+ }
642
+ };
643
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
644
+ }
645
+ async updateFiltering(params, options) {
646
+ const acceptedPath = ['connector_id'];
647
+ const acceptedBody = ['filtering', 'rules', 'advanced_snippet'];
648
+ const querystring = {};
649
+ // @ts-expect-error
650
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
651
+ let body;
652
+ if (typeof userBody === 'string') {
653
+ body = userBody;
654
+ }
655
+ else {
656
+ body = userBody != null ? { ...userBody } : undefined;
657
+ }
658
+ for (const key in params) {
659
+ if (acceptedBody.includes(key)) {
660
+ body = body !== null && body !== void 0 ? body : {};
661
+ // @ts-expect-error
662
+ body[key] = params[key];
663
+ }
664
+ else if (acceptedPath.includes(key)) {
665
+ continue;
666
+ }
667
+ else if (key !== 'body') {
668
+ // @ts-expect-error
669
+ querystring[key] = params[key];
670
+ }
671
+ }
672
+ const method = 'PUT';
673
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_filtering`;
674
+ const meta = {
675
+ name: 'connector.update_filtering',
676
+ pathParts: {
677
+ connector_id: params.connector_id
678
+ }
679
+ };
680
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
681
+ }
682
+ async updateFilteringValidation(params, options) {
683
+ const acceptedPath = ['connector_id'];
684
+ const acceptedBody = ['validation'];
685
+ const querystring = {};
686
+ // @ts-expect-error
687
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
688
+ let body;
689
+ if (typeof userBody === 'string') {
690
+ body = userBody;
691
+ }
692
+ else {
693
+ body = userBody != null ? { ...userBody } : undefined;
694
+ }
695
+ for (const key in params) {
696
+ if (acceptedBody.includes(key)) {
697
+ body = body !== null && body !== void 0 ? body : {};
698
+ // @ts-expect-error
699
+ body[key] = params[key];
700
+ }
701
+ else if (acceptedPath.includes(key)) {
702
+ continue;
703
+ }
704
+ else if (key !== 'body') {
705
+ // @ts-expect-error
706
+ querystring[key] = params[key];
707
+ }
708
+ }
709
+ const method = 'PUT';
710
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_filtering/_validation`;
711
+ const meta = {
712
+ name: 'connector.update_filtering_validation',
713
+ pathParts: {
714
+ connector_id: params.connector_id
715
+ }
716
+ };
717
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
718
+ }
719
+ async updateIndexName(params, options) {
720
+ const acceptedPath = ['connector_id'];
721
+ const acceptedBody = ['index_name'];
722
+ const querystring = {};
723
+ // @ts-expect-error
724
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
725
+ let body;
726
+ if (typeof userBody === 'string') {
727
+ body = userBody;
728
+ }
729
+ else {
730
+ body = userBody != null ? { ...userBody } : undefined;
731
+ }
732
+ for (const key in params) {
733
+ if (acceptedBody.includes(key)) {
734
+ body = body !== null && body !== void 0 ? body : {};
735
+ // @ts-expect-error
736
+ body[key] = params[key];
737
+ }
738
+ else if (acceptedPath.includes(key)) {
739
+ continue;
740
+ }
741
+ else if (key !== 'body') {
742
+ // @ts-expect-error
743
+ querystring[key] = params[key];
744
+ }
745
+ }
746
+ const method = 'PUT';
747
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_index_name`;
748
+ const meta = {
749
+ name: 'connector.update_index_name',
750
+ pathParts: {
751
+ connector_id: params.connector_id
752
+ }
753
+ };
754
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
755
+ }
756
+ async updateName(params, options) {
757
+ const acceptedPath = ['connector_id'];
758
+ const acceptedBody = ['name', 'description'];
759
+ const querystring = {};
760
+ // @ts-expect-error
761
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
762
+ let body;
763
+ if (typeof userBody === 'string') {
764
+ body = userBody;
765
+ }
766
+ else {
767
+ body = userBody != null ? { ...userBody } : undefined;
768
+ }
769
+ for (const key in params) {
770
+ if (acceptedBody.includes(key)) {
771
+ body = body !== null && body !== void 0 ? body : {};
772
+ // @ts-expect-error
773
+ body[key] = params[key];
774
+ }
775
+ else if (acceptedPath.includes(key)) {
776
+ continue;
777
+ }
778
+ else if (key !== 'body') {
779
+ // @ts-expect-error
780
+ querystring[key] = params[key];
781
+ }
782
+ }
783
+ const method = 'PUT';
784
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_name`;
785
+ const meta = {
786
+ name: 'connector.update_name',
787
+ pathParts: {
788
+ connector_id: params.connector_id
789
+ }
790
+ };
791
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
792
+ }
793
+ async updateNative(params, options) {
794
+ const acceptedPath = ['connector_id'];
795
+ const acceptedBody = ['is_native'];
796
+ const querystring = {};
797
+ // @ts-expect-error
798
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
799
+ let body;
800
+ if (typeof userBody === 'string') {
801
+ body = userBody;
802
+ }
803
+ else {
804
+ body = userBody != null ? { ...userBody } : undefined;
805
+ }
806
+ for (const key in params) {
807
+ if (acceptedBody.includes(key)) {
808
+ body = body !== null && body !== void 0 ? body : {};
809
+ // @ts-expect-error
810
+ body[key] = params[key];
811
+ }
812
+ else if (acceptedPath.includes(key)) {
813
+ continue;
814
+ }
815
+ else if (key !== 'body') {
816
+ // @ts-expect-error
817
+ querystring[key] = params[key];
818
+ }
819
+ }
820
+ const method = 'PUT';
821
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_native`;
822
+ const meta = {
823
+ name: 'connector.update_native',
824
+ pathParts: {
825
+ connector_id: params.connector_id
826
+ }
827
+ };
828
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
829
+ }
830
+ async updatePipeline(params, options) {
831
+ const acceptedPath = ['connector_id'];
832
+ const acceptedBody = ['pipeline'];
833
+ const querystring = {};
834
+ // @ts-expect-error
835
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
836
+ let body;
837
+ if (typeof userBody === 'string') {
838
+ body = userBody;
839
+ }
840
+ else {
841
+ body = userBody != null ? { ...userBody } : undefined;
842
+ }
843
+ for (const key in params) {
844
+ if (acceptedBody.includes(key)) {
845
+ body = body !== null && body !== void 0 ? body : {};
846
+ // @ts-expect-error
847
+ body[key] = params[key];
848
+ }
849
+ else if (acceptedPath.includes(key)) {
850
+ continue;
851
+ }
852
+ else if (key !== 'body') {
853
+ // @ts-expect-error
854
+ querystring[key] = params[key];
855
+ }
856
+ }
857
+ const method = 'PUT';
858
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_pipeline`;
859
+ const meta = {
860
+ name: 'connector.update_pipeline',
861
+ pathParts: {
862
+ connector_id: params.connector_id
863
+ }
864
+ };
865
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
866
+ }
867
+ async updateScheduling(params, options) {
868
+ const acceptedPath = ['connector_id'];
869
+ const acceptedBody = ['scheduling'];
870
+ const querystring = {};
871
+ // @ts-expect-error
872
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
873
+ let body;
874
+ if (typeof userBody === 'string') {
875
+ body = userBody;
876
+ }
877
+ else {
878
+ body = userBody != null ? { ...userBody } : undefined;
879
+ }
880
+ for (const key in params) {
881
+ if (acceptedBody.includes(key)) {
882
+ body = body !== null && body !== void 0 ? body : {};
883
+ // @ts-expect-error
884
+ body[key] = params[key];
885
+ }
886
+ else if (acceptedPath.includes(key)) {
887
+ continue;
888
+ }
889
+ else if (key !== 'body') {
890
+ // @ts-expect-error
891
+ querystring[key] = params[key];
892
+ }
893
+ }
894
+ const method = 'PUT';
895
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_scheduling`;
896
+ const meta = {
897
+ name: 'connector.update_scheduling',
898
+ pathParts: {
899
+ connector_id: params.connector_id
900
+ }
901
+ };
902
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
903
+ }
904
+ async updateServiceType(params, options) {
905
+ const acceptedPath = ['connector_id'];
906
+ const acceptedBody = ['service_type'];
907
+ const querystring = {};
908
+ // @ts-expect-error
909
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
910
+ let body;
911
+ if (typeof userBody === 'string') {
912
+ body = userBody;
913
+ }
914
+ else {
915
+ body = userBody != null ? { ...userBody } : undefined;
916
+ }
917
+ for (const key in params) {
918
+ if (acceptedBody.includes(key)) {
919
+ body = body !== null && body !== void 0 ? body : {};
920
+ // @ts-expect-error
921
+ body[key] = params[key];
922
+ }
923
+ else if (acceptedPath.includes(key)) {
924
+ continue;
925
+ }
926
+ else if (key !== 'body') {
927
+ // @ts-expect-error
928
+ querystring[key] = params[key];
929
+ }
930
+ }
931
+ const method = 'PUT';
932
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_service_type`;
933
+ const meta = {
934
+ name: 'connector.update_service_type',
935
+ pathParts: {
936
+ connector_id: params.connector_id
937
+ }
938
+ };
939
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
940
+ }
941
+ async updateStatus(params, options) {
942
+ const acceptedPath = ['connector_id'];
943
+ const acceptedBody = ['status'];
944
+ const querystring = {};
945
+ // @ts-expect-error
946
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
947
+ let body;
948
+ if (typeof userBody === 'string') {
949
+ body = userBody;
950
+ }
951
+ else {
952
+ body = userBody != null ? { ...userBody } : undefined;
953
+ }
954
+ for (const key in params) {
955
+ if (acceptedBody.includes(key)) {
956
+ body = body !== null && body !== void 0 ? body : {};
957
+ // @ts-expect-error
958
+ body[key] = params[key];
959
+ }
960
+ else if (acceptedPath.includes(key)) {
961
+ continue;
962
+ }
963
+ else if (key !== 'body') {
964
+ // @ts-expect-error
965
+ querystring[key] = params[key];
966
+ }
967
+ }
968
+ const method = 'PUT';
969
+ const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_status`;
970
+ const meta = {
971
+ name: 'connector.update_status',
972
+ pathParts: {
973
+ connector_id: params.connector_id
974
+ }
975
+ };
976
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
977
+ }
978
+ }
979
+ exports.default = Connector;
980
+ //# sourceMappingURL=connector.js.map