@elastic/elasticsearch 8.14.0 → 8.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog-info.yaml +9 -9
- package/lib/api/api/async_search.d.ts +8 -8
- package/lib/api/api/async_search.js +28 -4
- package/lib/api/api/async_search.js.map +1 -1
- package/lib/api/api/autoscaling.d.ts +4 -4
- package/lib/api/api/autoscaling.js +25 -4
- package/lib/api/api/autoscaling.js.map +1 -1
- package/lib/api/api/bulk.d.ts +2 -2
- package/lib/api/api/bulk.js +7 -1
- package/lib/api/api/bulk.js.map +1 -1
- package/lib/api/api/capabilities.d.ts +14 -0
- package/lib/api/api/capabilities.js +42 -0
- package/lib/api/api/capabilities.js.map +1 -0
- package/lib/api/api/cat.d.ts +51 -51
- package/lib/api/api/cat.js +155 -26
- package/lib/api/api/cat.js.map +1 -1
- package/lib/api/api/ccr.d.ts +13 -13
- package/lib/api/api/ccr.js +88 -13
- package/lib/api/api/ccr.js.map +1 -1
- package/lib/api/api/clear_scroll.d.ts +2 -2
- package/lib/api/api/clear_scroll.js +7 -1
- package/lib/api/api/clear_scroll.js.map +1 -1
- package/lib/api/api/close_point_in_time.d.ts +2 -2
- package/lib/api/api/close_point_in_time.js +4 -1
- package/lib/api/api/close_point_in_time.js.map +1 -1
- package/lib/api/api/cluster.d.ts +24 -24
- package/lib/api/api/cluster.js +89 -16
- package/lib/api/api/cluster.js.map +1 -1
- package/lib/api/api/connector.d.ts +245 -0
- package/lib/api/api/connector.js +1036 -0
- package/lib/api/api/connector.js.map +1 -0
- package/lib/api/api/count.d.ts +1 -1
- package/lib/api/api/count.js +7 -1
- package/lib/api/api/count.js.map +1 -1
- package/lib/api/api/create.d.ts +2 -2
- package/lib/api/api/create.js +8 -1
- package/lib/api/api/create.js.map +1 -1
- package/lib/api/api/dangling_indices.d.ts +3 -3
- package/lib/api/api/dangling_indices.js +18 -3
- package/lib/api/api/dangling_indices.js.map +1 -1
- package/lib/api/api/delete.d.ts +2 -2
- package/lib/api/api/delete.js +8 -1
- package/lib/api/api/delete.js.map +1 -1
- package/lib/api/api/delete_by_query.d.ts +2 -2
- package/lib/api/api/delete_by_query.js +7 -1
- package/lib/api/api/delete_by_query.js.map +1 -1
- package/lib/api/api/delete_by_query_rethrottle.d.ts +1 -1
- package/lib/api/api/delete_by_query_rethrottle.js +7 -1
- package/lib/api/api/delete_by_query_rethrottle.js.map +1 -1
- package/lib/api/api/delete_script.d.ts +2 -2
- package/lib/api/api/delete_script.js +7 -1
- package/lib/api/api/delete_script.js.map +1 -1
- package/lib/api/api/enrich.d.ts +8 -8
- package/lib/api/api/enrich.js +32 -5
- package/lib/api/api/enrich.js.map +1 -1
- package/lib/api/api/eql.d.ts +7 -7
- package/lib/api/api/eql.js +28 -4
- package/lib/api/api/eql.js.map +1 -1
- package/lib/api/api/esql.d.ts +16 -2
- package/lib/api/api/esql.js +47 -1
- package/lib/api/api/esql.js.map +1 -1
- package/lib/api/api/exists.d.ts +2 -2
- package/lib/api/api/exists.js +8 -1
- package/lib/api/api/exists.js.map +1 -1
- package/lib/api/api/exists_source.d.ts +2 -2
- package/lib/api/api/exists_source.js +8 -1
- package/lib/api/api/exists_source.js.map +1 -1
- package/lib/api/api/explain.d.ts +2 -2
- package/lib/api/api/explain.js +8 -1
- package/lib/api/api/explain.js.map +1 -1
- package/lib/api/api/features.d.ts +2 -2
- package/lib/api/api/features.js +8 -2
- package/lib/api/api/features.js.map +1 -1
- package/lib/api/api/field_caps.d.ts +2 -2
- package/lib/api/api/field_caps.js +7 -1
- package/lib/api/api/field_caps.js.map +1 -1
- package/lib/api/api/fleet.d.ts +3 -3
- package/lib/api/api/fleet.js +39 -6
- package/lib/api/api/fleet.js.map +1 -1
- package/lib/api/api/get.d.ts +1 -1
- package/lib/api/api/get.js +8 -1
- package/lib/api/api/get.js.map +1 -1
- package/lib/api/api/get_script.d.ts +2 -2
- package/lib/api/api/get_script.js +7 -1
- package/lib/api/api/get_script.js.map +1 -1
- package/lib/api/api/get_script_context.d.ts +1 -1
- package/lib/api/api/get_script_context.js +4 -1
- package/lib/api/api/get_script_context.js.map +1 -1
- package/lib/api/api/get_script_languages.d.ts +1 -1
- package/lib/api/api/get_script_languages.js +4 -1
- package/lib/api/api/get_script_languages.js.map +1 -1
- package/lib/api/api/get_source.d.ts +1 -1
- package/lib/api/api/get_source.js +8 -1
- package/lib/api/api/get_source.js.map +1 -1
- package/lib/api/api/graph.d.ts +2 -2
- package/lib/api/api/graph.js +7 -1
- package/lib/api/api/graph.js.map +1 -1
- package/lib/api/api/health_report.d.ts +1 -1
- package/lib/api/api/health_report.js +7 -1
- package/lib/api/api/health_report.js.map +1 -1
- package/lib/api/api/ilm.d.ts +16 -16
- package/lib/api/api/ilm.js +65 -11
- package/lib/api/api/ilm.js.map +1 -1
- package/lib/api/api/index.d.ts +2 -2
- package/lib/api/api/index.js +8 -1
- package/lib/api/api/index.js.map +1 -1
- package/lib/api/api/indices.d.ts +111 -111
- package/lib/api/api/indices.js +420 -59
- package/lib/api/api/indices.js.map +1 -1
- package/lib/api/api/inference.d.ts +17 -17
- package/lib/api/api/inference.js +42 -9
- package/lib/api/api/inference.js.map +1 -1
- package/lib/api/api/info.d.ts +1 -1
- package/lib/api/api/info.js +4 -1
- package/lib/api/api/info.js.map +1 -1
- package/lib/api/api/ingest.d.ts +33 -12
- package/lib/api/api/ingest.js +113 -6
- package/lib/api/api/ingest.js.map +1 -1
- package/lib/api/api/knn_search.d.ts +1 -1
- package/lib/api/api/knn_search.js +7 -1
- package/lib/api/api/knn_search.js.map +1 -1
- package/lib/api/api/license.d.ts +10 -10
- package/lib/api/api/license.js +28 -7
- package/lib/api/api/license.js.map +1 -1
- package/lib/api/api/logstash.d.ts +6 -6
- package/lib/api/api/logstash.js +21 -3
- package/lib/api/api/logstash.js.map +1 -1
- package/lib/api/api/mget.d.ts +1 -1
- package/lib/api/api/mget.js +7 -1
- package/lib/api/api/mget.js.map +1 -1
- package/lib/api/api/migration.d.ts +3 -3
- package/lib/api/api/migration.js +15 -3
- package/lib/api/api/migration.js.map +1 -1
- package/lib/api/api/ml.d.ts +131 -131
- package/lib/api/api/ml.js +508 -73
- package/lib/api/api/ml.js.map +1 -1
- package/lib/api/api/monitoring.d.ts +1 -1
- package/lib/api/api/monitoring.js +7 -1
- package/lib/api/api/monitoring.js.map +1 -1
- package/lib/api/api/msearch.d.ts +1 -1
- package/lib/api/api/msearch.js +7 -1
- package/lib/api/api/msearch.js.map +1 -1
- package/lib/api/api/msearch_template.d.ts +2 -2
- package/lib/api/api/msearch_template.js +7 -1
- package/lib/api/api/msearch_template.js.map +1 -1
- package/lib/api/api/mtermvectors.d.ts +1 -1
- package/lib/api/api/mtermvectors.js +7 -1
- package/lib/api/api/mtermvectors.js.map +1 -1
- package/lib/api/api/nodes.d.ts +14 -14
- package/lib/api/api/nodes.js +54 -7
- package/lib/api/api/nodes.js.map +1 -1
- package/lib/api/api/open_point_in_time.d.ts +2 -2
- package/lib/api/api/open_point_in_time.js +7 -1
- package/lib/api/api/open_point_in_time.js.map +1 -1
- package/lib/api/api/ping.d.ts +1 -1
- package/lib/api/api/ping.js +4 -1
- package/lib/api/api/ping.js.map +1 -1
- package/lib/api/api/profiling.d.ts +39 -0
- package/lib/api/api/{query_ruleset.js → profiling.js} +38 -41
- package/lib/api/api/profiling.js.map +1 -0
- package/lib/api/api/put_script.d.ts +2 -2
- package/lib/api/api/put_script.js +8 -1
- package/lib/api/api/put_script.js.map +1 -1
- package/lib/api/api/query_rules.d.ts +60 -0
- package/lib/api/api/query_rules.js +223 -0
- package/lib/api/api/query_rules.js.map +1 -0
- package/lib/api/api/rank_eval.d.ts +2 -2
- package/lib/api/api/rank_eval.js +7 -1
- package/lib/api/api/rank_eval.js.map +1 -1
- package/lib/api/api/reindex.d.ts +1 -1
- package/lib/api/api/reindex.js +4 -1
- package/lib/api/api/reindex.js.map +1 -1
- package/lib/api/api/reindex_rethrottle.d.ts +2 -2
- package/lib/api/api/reindex_rethrottle.js +7 -1
- package/lib/api/api/reindex_rethrottle.js.map +1 -1
- package/lib/api/api/render_search_template.d.ts +2 -2
- package/lib/api/api/render_search_template.js +7 -1
- package/lib/api/api/render_search_template.js.map +1 -1
- package/lib/api/api/rollup.d.ts +10 -10
- package/lib/api/api/rollup.js +56 -8
- package/lib/api/api/rollup.js.map +1 -1
- package/lib/api/api/scripts_painless_execute.d.ts +2 -2
- package/lib/api/api/scripts_painless_execute.js +4 -1
- package/lib/api/api/scripts_painless_execute.js.map +1 -1
- package/lib/api/api/scroll.d.ts +1 -1
- package/lib/api/api/scroll.js +7 -1
- package/lib/api/api/scroll.js.map +1 -1
- package/lib/api/api/search.d.ts +2 -2
- package/lib/api/api/search.js +7 -1
- package/lib/api/api/search.js.map +1 -1
- package/lib/api/api/search_application.d.ts +11 -11
- package/lib/api/api/search_application.js +68 -10
- package/lib/api/api/search_application.js.map +1 -1
- package/lib/api/api/search_mvt.d.ts +1 -1
- package/lib/api/api/search_mvt.js +11 -1
- package/lib/api/api/search_mvt.js.map +1 -1
- package/lib/api/api/search_shards.d.ts +1 -1
- package/lib/api/api/search_shards.js +7 -1
- package/lib/api/api/search_shards.js.map +1 -1
- package/lib/api/api/search_template.d.ts +2 -2
- package/lib/api/api/search_template.js +7 -1
- package/lib/api/api/search_template.js.map +1 -1
- package/lib/api/api/searchable_snapshots.d.ts +4 -4
- package/lib/api/api/searchable_snapshots.js +29 -4
- package/lib/api/api/searchable_snapshots.js.map +1 -1
- package/lib/api/api/security.d.ts +110 -82
- package/lib/api/api/security.js +478 -60
- package/lib/api/api/security.js.map +1 -1
- package/lib/api/api/shutdown.js +21 -3
- package/lib/api/api/shutdown.js.map +1 -1
- package/lib/api/api/simulate.d.ts +18 -0
- package/lib/api/api/simulate.js +64 -0
- package/lib/api/api/simulate.js.map +1 -0
- package/lib/api/api/slm.d.ts +9 -9
- package/lib/api/api/slm.js +48 -9
- package/lib/api/api/slm.js.map +1 -1
- package/lib/api/api/snapshot.d.ts +13 -13
- package/lib/api/api/snapshot.js +91 -12
- package/lib/api/api/snapshot.js.map +1 -1
- package/lib/api/api/sql.d.ts +6 -6
- package/lib/api/api/sql.js +33 -6
- package/lib/api/api/sql.js.map +1 -1
- package/lib/api/api/ssl.d.ts +1 -1
- package/lib/api/api/ssl.js +4 -1
- package/lib/api/api/ssl.js.map +1 -1
- package/lib/api/api/synonyms.d.ts +8 -8
- package/lib/api/api/synonyms.js +49 -7
- package/lib/api/api/synonyms.js.map +1 -1
- package/lib/api/api/tasks.d.ts +4 -4
- package/lib/api/api/tasks.js +18 -3
- package/lib/api/api/tasks.js.map +1 -1
- package/lib/api/api/terms_enum.d.ts +1 -1
- package/lib/api/api/terms_enum.js +7 -1
- package/lib/api/api/terms_enum.js.map +1 -1
- package/lib/api/api/termvectors.d.ts +1 -1
- package/lib/api/api/termvectors.js +8 -1
- package/lib/api/api/termvectors.js.map +1 -1
- package/lib/api/api/text_structure.d.ts +16 -2
- package/lib/api/api/text_structure.js +48 -2
- package/lib/api/api/text_structure.js.map +1 -1
- package/lib/api/api/transform.d.ts +26 -19
- package/lib/api/api/transform.js +94 -11
- package/lib/api/api/transform.js.map +1 -1
- package/lib/api/api/update.d.ts +1 -1
- package/lib/api/api/update.js +8 -1
- package/lib/api/api/update.js.map +1 -1
- package/lib/api/api/update_by_query.d.ts +2 -2
- package/lib/api/api/update_by_query.js +7 -1
- package/lib/api/api/update_by_query.js.map +1 -1
- package/lib/api/api/update_by_query_rethrottle.d.ts +1 -1
- package/lib/api/api/update_by_query_rethrottle.js +7 -1
- package/lib/api/api/update_by_query_rethrottle.js.map +1 -1
- package/lib/api/api/watcher.d.ts +14 -14
- package/lib/api/api/watcher.js +77 -13
- package/lib/api/api/watcher.js.map +1 -1
- package/lib/api/api/xpack.d.ts +4 -4
- package/lib/api/api/xpack.js +8 -2
- package/lib/api/api/xpack.js.map +1 -1
- package/lib/api/index.d.ts +18 -4
- package/lib/api/index.js +45 -7
- package/lib/api/index.js.map +1 -1
- package/lib/api/types.d.ts +428 -220
- package/lib/api/typesWithBodyKey.d.ts +444 -221
- package/package.json +3 -3
- package/lib/api/api/query_ruleset.d.ts +0 -39
- package/lib/api/api/query_ruleset.js.map +0 -1
|
@@ -0,0 +1,1036 @@
|
|
|
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', 'sync_cursor'];
|
|
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
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
172
|
+
for (const key in params) {
|
|
173
|
+
if (acceptedBody.includes(key)) {
|
|
174
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
175
|
+
// @ts-expect-error
|
|
176
|
+
body[key] = params[key];
|
|
177
|
+
}
|
|
178
|
+
else if (acceptedPath.includes(key)) {
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
else if (key !== 'body') {
|
|
182
|
+
// @ts-expect-error
|
|
183
|
+
querystring[key] = params[key];
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
const method = 'POST';
|
|
187
|
+
const path = '/_connector';
|
|
188
|
+
const meta = {
|
|
189
|
+
name: 'connector.post'
|
|
190
|
+
};
|
|
191
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
192
|
+
}
|
|
193
|
+
async put(params, options) {
|
|
194
|
+
const acceptedPath = ['connector_id'];
|
|
195
|
+
const acceptedBody = ['description', 'index_name', 'is_native', 'language', 'name', 'service_type'];
|
|
196
|
+
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
|
+
}
|
|
206
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
207
|
+
for (const key in params) {
|
|
208
|
+
if (acceptedBody.includes(key)) {
|
|
209
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
210
|
+
// @ts-expect-error
|
|
211
|
+
body[key] = params[key];
|
|
212
|
+
}
|
|
213
|
+
else if (acceptedPath.includes(key)) {
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
else if (key !== 'body') {
|
|
217
|
+
// @ts-expect-error
|
|
218
|
+
querystring[key] = params[key];
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
let method = '';
|
|
222
|
+
let path = '';
|
|
223
|
+
if (params.connector_id != null) {
|
|
224
|
+
method = 'PUT';
|
|
225
|
+
path = `/_connector/${encodeURIComponent(params.connector_id.toString())}`;
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
method = 'PUT';
|
|
229
|
+
path = '/_connector';
|
|
230
|
+
}
|
|
231
|
+
const meta = {
|
|
232
|
+
name: 'connector.put',
|
|
233
|
+
pathParts: {
|
|
234
|
+
connector_id: params.connector_id
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
238
|
+
}
|
|
239
|
+
async secretDelete(params, options) {
|
|
240
|
+
const acceptedPath = ['id'];
|
|
241
|
+
const querystring = {};
|
|
242
|
+
const body = undefined;
|
|
243
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
244
|
+
for (const key in params) {
|
|
245
|
+
if (acceptedPath.includes(key)) {
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
else if (key !== 'body') {
|
|
249
|
+
querystring[key] = params[key];
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
const method = 'DELETE';
|
|
253
|
+
const path = `/_connector/_secret/${encodeURIComponent(params.id.toString())}`;
|
|
254
|
+
const meta = {
|
|
255
|
+
name: 'connector.secret_delete',
|
|
256
|
+
pathParts: {
|
|
257
|
+
id: params.id
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
261
|
+
}
|
|
262
|
+
async secretGet(params, options) {
|
|
263
|
+
const acceptedPath = ['id'];
|
|
264
|
+
const querystring = {};
|
|
265
|
+
const body = undefined;
|
|
266
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
267
|
+
for (const key in params) {
|
|
268
|
+
if (acceptedPath.includes(key)) {
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
else if (key !== 'body') {
|
|
272
|
+
querystring[key] = params[key];
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
const method = 'GET';
|
|
276
|
+
const path = `/_connector/_secret/${encodeURIComponent(params.id.toString())}`;
|
|
277
|
+
const meta = {
|
|
278
|
+
name: 'connector.secret_get',
|
|
279
|
+
pathParts: {
|
|
280
|
+
id: params.id
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
284
|
+
}
|
|
285
|
+
async secretPost(params, options) {
|
|
286
|
+
const acceptedPath = [];
|
|
287
|
+
const querystring = {};
|
|
288
|
+
const body = undefined;
|
|
289
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
290
|
+
for (const key in params) {
|
|
291
|
+
if (acceptedPath.includes(key)) {
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
else if (key !== 'body') {
|
|
295
|
+
querystring[key] = params[key];
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
const method = 'POST';
|
|
299
|
+
const path = '/_connector/_secret';
|
|
300
|
+
const meta = {
|
|
301
|
+
name: 'connector.secret_post'
|
|
302
|
+
};
|
|
303
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
304
|
+
}
|
|
305
|
+
async secretPut(params, options) {
|
|
306
|
+
const acceptedPath = ['id'];
|
|
307
|
+
const querystring = {};
|
|
308
|
+
const body = undefined;
|
|
309
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
310
|
+
for (const key in params) {
|
|
311
|
+
if (acceptedPath.includes(key)) {
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
else if (key !== 'body') {
|
|
315
|
+
querystring[key] = params[key];
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
const method = 'PUT';
|
|
319
|
+
const path = `/_connector/_secret/${encodeURIComponent(params.id.toString())}`;
|
|
320
|
+
const meta = {
|
|
321
|
+
name: 'connector.secret_put',
|
|
322
|
+
pathParts: {
|
|
323
|
+
id: params.id
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
327
|
+
}
|
|
328
|
+
async syncJobCancel(params, options) {
|
|
329
|
+
const acceptedPath = ['connector_sync_job_id'];
|
|
330
|
+
const querystring = {};
|
|
331
|
+
const body = undefined;
|
|
332
|
+
for (const key in params) {
|
|
333
|
+
if (acceptedPath.includes(key)) {
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
336
|
+
else if (key !== 'body') {
|
|
337
|
+
// @ts-expect-error
|
|
338
|
+
querystring[key] = params[key];
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
const method = 'PUT';
|
|
342
|
+
const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}/_cancel`;
|
|
343
|
+
const meta = {
|
|
344
|
+
name: 'connector.sync_job_cancel',
|
|
345
|
+
pathParts: {
|
|
346
|
+
connector_sync_job_id: params.connector_sync_job_id
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
350
|
+
}
|
|
351
|
+
async syncJobCheckIn(params, options) {
|
|
352
|
+
const acceptedPath = ['connector_sync_job_id'];
|
|
353
|
+
const querystring = {};
|
|
354
|
+
const body = undefined;
|
|
355
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
356
|
+
for (const key in params) {
|
|
357
|
+
if (acceptedPath.includes(key)) {
|
|
358
|
+
continue;
|
|
359
|
+
}
|
|
360
|
+
else if (key !== 'body') {
|
|
361
|
+
querystring[key] = params[key];
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
const method = 'PUT';
|
|
365
|
+
const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}/_check_in`;
|
|
366
|
+
const meta = {
|
|
367
|
+
name: 'connector.sync_job_check_in',
|
|
368
|
+
pathParts: {
|
|
369
|
+
connector_sync_job_id: params.connector_sync_job_id
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
373
|
+
}
|
|
374
|
+
async syncJobClaim(params, options) {
|
|
375
|
+
const acceptedPath = ['connector_sync_job_id'];
|
|
376
|
+
const querystring = {};
|
|
377
|
+
const body = undefined;
|
|
378
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
379
|
+
for (const key in params) {
|
|
380
|
+
if (acceptedPath.includes(key)) {
|
|
381
|
+
continue;
|
|
382
|
+
}
|
|
383
|
+
else if (key !== 'body') {
|
|
384
|
+
querystring[key] = params[key];
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
const method = 'PUT';
|
|
388
|
+
const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}/_claim`;
|
|
389
|
+
const meta = {
|
|
390
|
+
name: 'connector.sync_job_claim',
|
|
391
|
+
pathParts: {
|
|
392
|
+
connector_sync_job_id: params.connector_sync_job_id
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
396
|
+
}
|
|
397
|
+
async syncJobDelete(params, options) {
|
|
398
|
+
const acceptedPath = ['connector_sync_job_id'];
|
|
399
|
+
const querystring = {};
|
|
400
|
+
const body = undefined;
|
|
401
|
+
for (const key in params) {
|
|
402
|
+
if (acceptedPath.includes(key)) {
|
|
403
|
+
continue;
|
|
404
|
+
}
|
|
405
|
+
else if (key !== 'body') {
|
|
406
|
+
// @ts-expect-error
|
|
407
|
+
querystring[key] = params[key];
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
const method = 'DELETE';
|
|
411
|
+
const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}`;
|
|
412
|
+
const meta = {
|
|
413
|
+
name: 'connector.sync_job_delete',
|
|
414
|
+
pathParts: {
|
|
415
|
+
connector_sync_job_id: params.connector_sync_job_id
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
419
|
+
}
|
|
420
|
+
async syncJobError(params, options) {
|
|
421
|
+
const acceptedPath = ['connector_sync_job_id'];
|
|
422
|
+
const querystring = {};
|
|
423
|
+
const body = undefined;
|
|
424
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
425
|
+
for (const key in params) {
|
|
426
|
+
if (acceptedPath.includes(key)) {
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
else if (key !== 'body') {
|
|
430
|
+
querystring[key] = params[key];
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
const method = 'PUT';
|
|
434
|
+
const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}/_error`;
|
|
435
|
+
const meta = {
|
|
436
|
+
name: 'connector.sync_job_error',
|
|
437
|
+
pathParts: {
|
|
438
|
+
connector_sync_job_id: params.connector_sync_job_id
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
442
|
+
}
|
|
443
|
+
async syncJobGet(params, options) {
|
|
444
|
+
const acceptedPath = ['connector_sync_job_id'];
|
|
445
|
+
const querystring = {};
|
|
446
|
+
const body = undefined;
|
|
447
|
+
for (const key in params) {
|
|
448
|
+
if (acceptedPath.includes(key)) {
|
|
449
|
+
continue;
|
|
450
|
+
}
|
|
451
|
+
else if (key !== 'body') {
|
|
452
|
+
// @ts-expect-error
|
|
453
|
+
querystring[key] = params[key];
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
const method = 'GET';
|
|
457
|
+
const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}`;
|
|
458
|
+
const meta = {
|
|
459
|
+
name: 'connector.sync_job_get',
|
|
460
|
+
pathParts: {
|
|
461
|
+
connector_sync_job_id: params.connector_sync_job_id
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
465
|
+
}
|
|
466
|
+
async syncJobList(params, options) {
|
|
467
|
+
const acceptedPath = [];
|
|
468
|
+
const querystring = {};
|
|
469
|
+
const body = undefined;
|
|
470
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
471
|
+
for (const key in params) {
|
|
472
|
+
if (acceptedPath.includes(key)) {
|
|
473
|
+
continue;
|
|
474
|
+
}
|
|
475
|
+
else if (key !== 'body') {
|
|
476
|
+
// @ts-expect-error
|
|
477
|
+
querystring[key] = params[key];
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
const method = 'GET';
|
|
481
|
+
const path = '/_connector/_sync_job';
|
|
482
|
+
const meta = {
|
|
483
|
+
name: 'connector.sync_job_list'
|
|
484
|
+
};
|
|
485
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
486
|
+
}
|
|
487
|
+
async syncJobPost(params, options) {
|
|
488
|
+
const acceptedPath = [];
|
|
489
|
+
const acceptedBody = ['id', 'job_type', 'trigger_method'];
|
|
490
|
+
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
|
+
}
|
|
500
|
+
for (const key in params) {
|
|
501
|
+
if (acceptedBody.includes(key)) {
|
|
502
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
503
|
+
// @ts-expect-error
|
|
504
|
+
body[key] = params[key];
|
|
505
|
+
}
|
|
506
|
+
else if (acceptedPath.includes(key)) {
|
|
507
|
+
continue;
|
|
508
|
+
}
|
|
509
|
+
else if (key !== 'body') {
|
|
510
|
+
// @ts-expect-error
|
|
511
|
+
querystring[key] = params[key];
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
const method = 'POST';
|
|
515
|
+
const path = '/_connector/_sync_job';
|
|
516
|
+
const meta = {
|
|
517
|
+
name: 'connector.sync_job_post'
|
|
518
|
+
};
|
|
519
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
520
|
+
}
|
|
521
|
+
async syncJobUpdateStats(params, options) {
|
|
522
|
+
const acceptedPath = ['connector_sync_job_id'];
|
|
523
|
+
const querystring = {};
|
|
524
|
+
const body = undefined;
|
|
525
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
526
|
+
for (const key in params) {
|
|
527
|
+
if (acceptedPath.includes(key)) {
|
|
528
|
+
continue;
|
|
529
|
+
}
|
|
530
|
+
else if (key !== 'body') {
|
|
531
|
+
querystring[key] = params[key];
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
const method = 'PUT';
|
|
535
|
+
const path = `/_connector/_sync_job/${encodeURIComponent(params.connector_sync_job_id.toString())}/_stats`;
|
|
536
|
+
const meta = {
|
|
537
|
+
name: 'connector.sync_job_update_stats',
|
|
538
|
+
pathParts: {
|
|
539
|
+
connector_sync_job_id: params.connector_sync_job_id
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
543
|
+
}
|
|
544
|
+
async updateActiveFiltering(params, options) {
|
|
545
|
+
const acceptedPath = ['connector_id'];
|
|
546
|
+
const querystring = {};
|
|
547
|
+
const body = undefined;
|
|
548
|
+
for (const key in params) {
|
|
549
|
+
if (acceptedPath.includes(key)) {
|
|
550
|
+
continue;
|
|
551
|
+
}
|
|
552
|
+
else if (key !== 'body') {
|
|
553
|
+
// @ts-expect-error
|
|
554
|
+
querystring[key] = params[key];
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
const method = 'PUT';
|
|
558
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_filtering/_activate`;
|
|
559
|
+
const meta = {
|
|
560
|
+
name: 'connector.update_active_filtering',
|
|
561
|
+
pathParts: {
|
|
562
|
+
connector_id: params.connector_id
|
|
563
|
+
}
|
|
564
|
+
};
|
|
565
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
566
|
+
}
|
|
567
|
+
async updateApiKeyId(params, options) {
|
|
568
|
+
const acceptedPath = ['connector_id'];
|
|
569
|
+
const acceptedBody = ['api_key_id', 'api_key_secret_id'];
|
|
570
|
+
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
|
+
}
|
|
580
|
+
for (const key in params) {
|
|
581
|
+
if (acceptedBody.includes(key)) {
|
|
582
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
583
|
+
// @ts-expect-error
|
|
584
|
+
body[key] = params[key];
|
|
585
|
+
}
|
|
586
|
+
else if (acceptedPath.includes(key)) {
|
|
587
|
+
continue;
|
|
588
|
+
}
|
|
589
|
+
else if (key !== 'body') {
|
|
590
|
+
// @ts-expect-error
|
|
591
|
+
querystring[key] = params[key];
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
const method = 'PUT';
|
|
595
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_api_key_id`;
|
|
596
|
+
const meta = {
|
|
597
|
+
name: 'connector.update_api_key_id',
|
|
598
|
+
pathParts: {
|
|
599
|
+
connector_id: params.connector_id
|
|
600
|
+
}
|
|
601
|
+
};
|
|
602
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
603
|
+
}
|
|
604
|
+
async updateConfiguration(params, options) {
|
|
605
|
+
const acceptedPath = ['connector_id'];
|
|
606
|
+
const acceptedBody = ['configuration', 'values'];
|
|
607
|
+
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
|
+
}
|
|
617
|
+
for (const key in params) {
|
|
618
|
+
if (acceptedBody.includes(key)) {
|
|
619
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
620
|
+
// @ts-expect-error
|
|
621
|
+
body[key] = params[key];
|
|
622
|
+
}
|
|
623
|
+
else if (acceptedPath.includes(key)) {
|
|
624
|
+
continue;
|
|
625
|
+
}
|
|
626
|
+
else if (key !== 'body') {
|
|
627
|
+
// @ts-expect-error
|
|
628
|
+
querystring[key] = params[key];
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
const method = 'PUT';
|
|
632
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_configuration`;
|
|
633
|
+
const meta = {
|
|
634
|
+
name: 'connector.update_configuration',
|
|
635
|
+
pathParts: {
|
|
636
|
+
connector_id: params.connector_id
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
640
|
+
}
|
|
641
|
+
async updateError(params, options) {
|
|
642
|
+
const acceptedPath = ['connector_id'];
|
|
643
|
+
const acceptedBody = ['error'];
|
|
644
|
+
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
|
+
}
|
|
654
|
+
for (const key in params) {
|
|
655
|
+
if (acceptedBody.includes(key)) {
|
|
656
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
657
|
+
// @ts-expect-error
|
|
658
|
+
body[key] = params[key];
|
|
659
|
+
}
|
|
660
|
+
else if (acceptedPath.includes(key)) {
|
|
661
|
+
continue;
|
|
662
|
+
}
|
|
663
|
+
else if (key !== 'body') {
|
|
664
|
+
// @ts-expect-error
|
|
665
|
+
querystring[key] = params[key];
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
const method = 'PUT';
|
|
669
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_error`;
|
|
670
|
+
const meta = {
|
|
671
|
+
name: 'connector.update_error',
|
|
672
|
+
pathParts: {
|
|
673
|
+
connector_id: params.connector_id
|
|
674
|
+
}
|
|
675
|
+
};
|
|
676
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
677
|
+
}
|
|
678
|
+
async updateFeatures(params, options) {
|
|
679
|
+
const acceptedPath = ['connector_id'];
|
|
680
|
+
const querystring = {};
|
|
681
|
+
const body = undefined;
|
|
682
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
683
|
+
for (const key in params) {
|
|
684
|
+
if (acceptedPath.includes(key)) {
|
|
685
|
+
continue;
|
|
686
|
+
}
|
|
687
|
+
else if (key !== 'body') {
|
|
688
|
+
querystring[key] = params[key];
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
const method = 'PUT';
|
|
692
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_features`;
|
|
693
|
+
const meta = {
|
|
694
|
+
name: 'connector.update_features',
|
|
695
|
+
pathParts: {
|
|
696
|
+
connector_id: params.connector_id
|
|
697
|
+
}
|
|
698
|
+
};
|
|
699
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
700
|
+
}
|
|
701
|
+
async updateFiltering(params, options) {
|
|
702
|
+
const acceptedPath = ['connector_id'];
|
|
703
|
+
const acceptedBody = ['filtering', 'rules', 'advanced_snippet'];
|
|
704
|
+
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
|
+
}
|
|
714
|
+
for (const key in params) {
|
|
715
|
+
if (acceptedBody.includes(key)) {
|
|
716
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
717
|
+
// @ts-expect-error
|
|
718
|
+
body[key] = params[key];
|
|
719
|
+
}
|
|
720
|
+
else if (acceptedPath.includes(key)) {
|
|
721
|
+
continue;
|
|
722
|
+
}
|
|
723
|
+
else if (key !== 'body') {
|
|
724
|
+
// @ts-expect-error
|
|
725
|
+
querystring[key] = params[key];
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
const method = 'PUT';
|
|
729
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_filtering`;
|
|
730
|
+
const meta = {
|
|
731
|
+
name: 'connector.update_filtering',
|
|
732
|
+
pathParts: {
|
|
733
|
+
connector_id: params.connector_id
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
737
|
+
}
|
|
738
|
+
async updateFilteringValidation(params, options) {
|
|
739
|
+
const acceptedPath = ['connector_id'];
|
|
740
|
+
const acceptedBody = ['validation'];
|
|
741
|
+
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
|
+
}
|
|
751
|
+
for (const key in params) {
|
|
752
|
+
if (acceptedBody.includes(key)) {
|
|
753
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
754
|
+
// @ts-expect-error
|
|
755
|
+
body[key] = params[key];
|
|
756
|
+
}
|
|
757
|
+
else if (acceptedPath.includes(key)) {
|
|
758
|
+
continue;
|
|
759
|
+
}
|
|
760
|
+
else if (key !== 'body') {
|
|
761
|
+
// @ts-expect-error
|
|
762
|
+
querystring[key] = params[key];
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
const method = 'PUT';
|
|
766
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_filtering/_validation`;
|
|
767
|
+
const meta = {
|
|
768
|
+
name: 'connector.update_filtering_validation',
|
|
769
|
+
pathParts: {
|
|
770
|
+
connector_id: params.connector_id
|
|
771
|
+
}
|
|
772
|
+
};
|
|
773
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
774
|
+
}
|
|
775
|
+
async updateIndexName(params, options) {
|
|
776
|
+
const acceptedPath = ['connector_id'];
|
|
777
|
+
const acceptedBody = ['index_name'];
|
|
778
|
+
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
|
+
}
|
|
788
|
+
for (const key in params) {
|
|
789
|
+
if (acceptedBody.includes(key)) {
|
|
790
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
791
|
+
// @ts-expect-error
|
|
792
|
+
body[key] = params[key];
|
|
793
|
+
}
|
|
794
|
+
else if (acceptedPath.includes(key)) {
|
|
795
|
+
continue;
|
|
796
|
+
}
|
|
797
|
+
else if (key !== 'body') {
|
|
798
|
+
// @ts-expect-error
|
|
799
|
+
querystring[key] = params[key];
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
const method = 'PUT';
|
|
803
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_index_name`;
|
|
804
|
+
const meta = {
|
|
805
|
+
name: 'connector.update_index_name',
|
|
806
|
+
pathParts: {
|
|
807
|
+
connector_id: params.connector_id
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
811
|
+
}
|
|
812
|
+
async updateName(params, options) {
|
|
813
|
+
const acceptedPath = ['connector_id'];
|
|
814
|
+
const acceptedBody = ['name', 'description'];
|
|
815
|
+
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
|
+
}
|
|
825
|
+
for (const key in params) {
|
|
826
|
+
if (acceptedBody.includes(key)) {
|
|
827
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
828
|
+
// @ts-expect-error
|
|
829
|
+
body[key] = params[key];
|
|
830
|
+
}
|
|
831
|
+
else if (acceptedPath.includes(key)) {
|
|
832
|
+
continue;
|
|
833
|
+
}
|
|
834
|
+
else if (key !== 'body') {
|
|
835
|
+
// @ts-expect-error
|
|
836
|
+
querystring[key] = params[key];
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
const method = 'PUT';
|
|
840
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_name`;
|
|
841
|
+
const meta = {
|
|
842
|
+
name: 'connector.update_name',
|
|
843
|
+
pathParts: {
|
|
844
|
+
connector_id: params.connector_id
|
|
845
|
+
}
|
|
846
|
+
};
|
|
847
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
848
|
+
}
|
|
849
|
+
async updateNative(params, options) {
|
|
850
|
+
const acceptedPath = ['connector_id'];
|
|
851
|
+
const acceptedBody = ['is_native'];
|
|
852
|
+
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
|
+
}
|
|
862
|
+
for (const key in params) {
|
|
863
|
+
if (acceptedBody.includes(key)) {
|
|
864
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
865
|
+
// @ts-expect-error
|
|
866
|
+
body[key] = params[key];
|
|
867
|
+
}
|
|
868
|
+
else if (acceptedPath.includes(key)) {
|
|
869
|
+
continue;
|
|
870
|
+
}
|
|
871
|
+
else if (key !== 'body') {
|
|
872
|
+
// @ts-expect-error
|
|
873
|
+
querystring[key] = params[key];
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
const method = 'PUT';
|
|
877
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_native`;
|
|
878
|
+
const meta = {
|
|
879
|
+
name: 'connector.update_native',
|
|
880
|
+
pathParts: {
|
|
881
|
+
connector_id: params.connector_id
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
885
|
+
}
|
|
886
|
+
async updatePipeline(params, options) {
|
|
887
|
+
const acceptedPath = ['connector_id'];
|
|
888
|
+
const acceptedBody = ['pipeline'];
|
|
889
|
+
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
|
+
}
|
|
899
|
+
for (const key in params) {
|
|
900
|
+
if (acceptedBody.includes(key)) {
|
|
901
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
902
|
+
// @ts-expect-error
|
|
903
|
+
body[key] = params[key];
|
|
904
|
+
}
|
|
905
|
+
else if (acceptedPath.includes(key)) {
|
|
906
|
+
continue;
|
|
907
|
+
}
|
|
908
|
+
else if (key !== 'body') {
|
|
909
|
+
// @ts-expect-error
|
|
910
|
+
querystring[key] = params[key];
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
const method = 'PUT';
|
|
914
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_pipeline`;
|
|
915
|
+
const meta = {
|
|
916
|
+
name: 'connector.update_pipeline',
|
|
917
|
+
pathParts: {
|
|
918
|
+
connector_id: params.connector_id
|
|
919
|
+
}
|
|
920
|
+
};
|
|
921
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
922
|
+
}
|
|
923
|
+
async updateScheduling(params, options) {
|
|
924
|
+
const acceptedPath = ['connector_id'];
|
|
925
|
+
const acceptedBody = ['scheduling'];
|
|
926
|
+
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
|
+
}
|
|
936
|
+
for (const key in params) {
|
|
937
|
+
if (acceptedBody.includes(key)) {
|
|
938
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
939
|
+
// @ts-expect-error
|
|
940
|
+
body[key] = params[key];
|
|
941
|
+
}
|
|
942
|
+
else if (acceptedPath.includes(key)) {
|
|
943
|
+
continue;
|
|
944
|
+
}
|
|
945
|
+
else if (key !== 'body') {
|
|
946
|
+
// @ts-expect-error
|
|
947
|
+
querystring[key] = params[key];
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
const method = 'PUT';
|
|
951
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_scheduling`;
|
|
952
|
+
const meta = {
|
|
953
|
+
name: 'connector.update_scheduling',
|
|
954
|
+
pathParts: {
|
|
955
|
+
connector_id: params.connector_id
|
|
956
|
+
}
|
|
957
|
+
};
|
|
958
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
959
|
+
}
|
|
960
|
+
async updateServiceType(params, options) {
|
|
961
|
+
const acceptedPath = ['connector_id'];
|
|
962
|
+
const acceptedBody = ['service_type'];
|
|
963
|
+
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
|
+
}
|
|
973
|
+
for (const key in params) {
|
|
974
|
+
if (acceptedBody.includes(key)) {
|
|
975
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
976
|
+
// @ts-expect-error
|
|
977
|
+
body[key] = params[key];
|
|
978
|
+
}
|
|
979
|
+
else if (acceptedPath.includes(key)) {
|
|
980
|
+
continue;
|
|
981
|
+
}
|
|
982
|
+
else if (key !== 'body') {
|
|
983
|
+
// @ts-expect-error
|
|
984
|
+
querystring[key] = params[key];
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
const method = 'PUT';
|
|
988
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_service_type`;
|
|
989
|
+
const meta = {
|
|
990
|
+
name: 'connector.update_service_type',
|
|
991
|
+
pathParts: {
|
|
992
|
+
connector_id: params.connector_id
|
|
993
|
+
}
|
|
994
|
+
};
|
|
995
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
996
|
+
}
|
|
997
|
+
async updateStatus(params, options) {
|
|
998
|
+
const acceptedPath = ['connector_id'];
|
|
999
|
+
const acceptedBody = ['status'];
|
|
1000
|
+
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
|
+
}
|
|
1010
|
+
for (const key in params) {
|
|
1011
|
+
if (acceptedBody.includes(key)) {
|
|
1012
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
1013
|
+
// @ts-expect-error
|
|
1014
|
+
body[key] = params[key];
|
|
1015
|
+
}
|
|
1016
|
+
else if (acceptedPath.includes(key)) {
|
|
1017
|
+
continue;
|
|
1018
|
+
}
|
|
1019
|
+
else if (key !== 'body') {
|
|
1020
|
+
// @ts-expect-error
|
|
1021
|
+
querystring[key] = params[key];
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
const method = 'PUT';
|
|
1025
|
+
const path = `/_connector/${encodeURIComponent(params.connector_id.toString())}/_status`;
|
|
1026
|
+
const meta = {
|
|
1027
|
+
name: 'connector.update_status',
|
|
1028
|
+
pathParts: {
|
|
1029
|
+
connector_id: params.connector_id
|
|
1030
|
+
}
|
|
1031
|
+
};
|
|
1032
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
exports.default = Connector;
|
|
1036
|
+
//# sourceMappingURL=connector.js.map
|