@retter/elasticsearch 8.4.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/.dockerignore +5 -0
- package/CHANGELOG.md +3 -0
- package/LICENSE +202 -0
- package/NOTICE.txt +2 -0
- package/README.md +186 -0
- package/codecov.yml +14 -0
- package/index.d.ts +27 -0
- package/index.js +55 -0
- package/lib/api/api/async_search.d.ts +23 -0
- package/lib/api/api/async_search.js +131 -0
- package/lib/api/api/async_search.js.map +1 -0
- package/lib/api/api/autoscaling.d.ts +23 -0
- package/lib/api/api/autoscaling.js +109 -0
- package/lib/api/api/autoscaling.js.map +1 -0
- package/lib/api/api/bulk.d.ts +10 -0
- package/lib/api/api/bulk.js +54 -0
- package/lib/api/api/bulk.js.map +1 -0
- package/lib/api/api/cat.d.ts +89 -0
- package/lib/api/api/cat.js +637 -0
- package/lib/api/api/cat.js.map +1 -0
- package/lib/api/api/ccr.d.ts +50 -0
- package/lib/api/api/ccr.js +320 -0
- package/lib/api/api/ccr.js.map +1 -0
- package/lib/api/api/clear_scroll.d.ts +10 -0
- package/lib/api/api/clear_scroll.js +54 -0
- package/lib/api/api/clear_scroll.js.map +1 -0
- package/lib/api/api/close_point_in_time.d.ts +10 -0
- package/lib/api/api/close_point_in_time.js +53 -0
- package/lib/api/api/close_point_in_time.js.map +1 -0
- package/lib/api/api/cluster.d.ts +56 -0
- package/lib/api/api/cluster.js +392 -0
- package/lib/api/api/cluster.js.map +1 -0
- package/lib/api/api/count.d.ts +10 -0
- package/lib/api/api/count.js +62 -0
- package/lib/api/api/count.js.map +1 -0
- package/lib/api/api/create.d.ts +10 -0
- package/lib/api/api/create.js +46 -0
- package/lib/api/api/create.js.map +1 -0
- package/lib/api/api/dangling_indices.d.ts +20 -0
- package/lib/api/api/dangling_indices.js +85 -0
- package/lib/api/api/dangling_indices.js.map +1 -0
- package/lib/api/api/delete.d.ts +10 -0
- package/lib/api/api/delete.js +39 -0
- package/lib/api/api/delete.js.map +1 -0
- package/lib/api/api/delete_by_query.d.ts +10 -0
- package/lib/api/api/delete_by_query.js +53 -0
- package/lib/api/api/delete_by_query.js.map +1 -0
- package/lib/api/api/delete_by_query_rethrottle.d.ts +10 -0
- package/lib/api/api/delete_by_query_rethrottle.js +39 -0
- package/lib/api/api/delete_by_query_rethrottle.js.map +1 -0
- package/lib/api/api/delete_script.d.ts +10 -0
- package/lib/api/api/delete_script.js +39 -0
- package/lib/api/api/delete_script.js.map +1 -0
- package/lib/api/api/enrich.d.ts +26 -0
- package/lib/api/api/enrich.js +142 -0
- package/lib/api/api/enrich.js.map +1 -0
- package/lib/api/api/eql.d.ts +23 -0
- package/lib/api/api/eql.js +115 -0
- package/lib/api/api/eql.js.map +1 -0
- package/lib/api/api/exists.d.ts +10 -0
- package/lib/api/api/exists.js +39 -0
- package/lib/api/api/exists.js.map +1 -0
- package/lib/api/api/exists_source.d.ts +10 -0
- package/lib/api/api/exists_source.js +39 -0
- package/lib/api/api/exists_source.js.map +1 -0
- package/lib/api/api/explain.d.ts +10 -0
- package/lib/api/api/explain.js +53 -0
- package/lib/api/api/explain.js.map +1 -0
- package/lib/api/api/features.d.ts +17 -0
- package/lib/api/api/features.js +69 -0
- package/lib/api/api/features.js.map +1 -0
- package/lib/api/api/field_caps.d.ts +10 -0
- package/lib/api/api/field_caps.js +61 -0
- package/lib/api/api/field_caps.js.map +1 -0
- package/lib/api/api/fleet.d.ts +20 -0
- package/lib/api/api/fleet.js +113 -0
- package/lib/api/api/fleet.js.map +1 -0
- package/lib/api/api/get.d.ts +10 -0
- package/lib/api/api/get.js +39 -0
- package/lib/api/api/get.js.map +1 -0
- package/lib/api/api/get_script.d.ts +10 -0
- package/lib/api/api/get_script.js +39 -0
- package/lib/api/api/get_script.js.map +1 -0
- package/lib/api/api/get_script_context.d.ts +10 -0
- package/lib/api/api/get_script_context.js +40 -0
- package/lib/api/api/get_script_context.js.map +1 -0
- package/lib/api/api/get_script_languages.d.ts +10 -0
- package/lib/api/api/get_script_languages.js +40 -0
- package/lib/api/api/get_script_languages.js.map +1 -0
- package/lib/api/api/get_source.d.ts +10 -0
- package/lib/api/api/get_source.js +39 -0
- package/lib/api/api/get_source.js.map +1 -0
- package/lib/api/api/graph.d.ts +14 -0
- package/lib/api/api/graph.js +64 -0
- package/lib/api/api/graph.js.map +1 -0
- package/lib/api/api/ilm.d.ts +44 -0
- package/lib/api/api/ilm.js +275 -0
- package/lib/api/api/ilm.js.map +1 -0
- package/lib/api/api/index.d.ts +10 -0
- package/lib/api/api/index.js +54 -0
- package/lib/api/api/index.js.map +1 -0
- package/lib/api/api/indices.d.ts +170 -0
- package/lib/api/api/indices.js +1378 -0
- package/lib/api/api/indices.js.map +1 -0
- package/lib/api/api/info.d.ts +10 -0
- package/lib/api/api/info.js +40 -0
- package/lib/api/api/info.js.map +1 -0
- package/lib/api/api/ingest.d.ts +29 -0
- package/lib/api/api/ingest.js +183 -0
- package/lib/api/api/ingest.js.map +1 -0
- package/lib/api/api/knn_search.d.ts +10 -0
- package/lib/api/api/knn_search.js +53 -0
- package/lib/api/api/knn_search.js.map +1 -0
- package/lib/api/api/license.d.ts +32 -0
- package/lib/api/api/license.js +172 -0
- package/lib/api/api/license.js.map +1 -0
- package/lib/api/api/logstash.d.ts +20 -0
- package/lib/api/api/logstash.js +91 -0
- package/lib/api/api/logstash.js.map +1 -0
- package/lib/api/api/mget.d.ts +10 -0
- package/lib/api/api/mget.js +62 -0
- package/lib/api/api/mget.js.map +1 -0
- package/lib/api/api/migration.d.ts +20 -0
- package/lib/api/api/migration.js +95 -0
- package/lib/api/api/migration.js.map +1 -0
- package/lib/api/api/ml.d.ts +224 -0
- package/lib/api/api/ml.js +1929 -0
- package/lib/api/api/ml.js.map +1 -0
- package/lib/api/api/monitoring.d.ts +14 -0
- package/lib/api/api/monitoring.js +57 -0
- package/lib/api/api/monitoring.js.map +1 -0
- package/lib/api/api/msearch.d.ts +10 -0
- package/lib/api/api/msearch.js +54 -0
- package/lib/api/api/msearch.js.map +1 -0
- package/lib/api/api/msearch_template.d.ts +10 -0
- package/lib/api/api/msearch_template.js +54 -0
- package/lib/api/api/msearch_template.js.map +1 -0
- package/lib/api/api/mtermvectors.d.ts +10 -0
- package/lib/api/api/mtermvectors.js +62 -0
- package/lib/api/api/mtermvectors.js.map +1 -0
- package/lib/api/api/nodes.d.ts +32 -0
- package/lib/api/api/nodes.js +243 -0
- package/lib/api/api/nodes.js.map +1 -0
- package/lib/api/api/open_point_in_time.d.ts +10 -0
- package/lib/api/api/open_point_in_time.js +39 -0
- package/lib/api/api/open_point_in_time.js.map +1 -0
- package/lib/api/api/ping.d.ts +10 -0
- package/lib/api/api/ping.js +40 -0
- package/lib/api/api/ping.js.map +1 -0
- package/lib/api/api/put_script.d.ts +10 -0
- package/lib/api/api/put_script.js +61 -0
- package/lib/api/api/put_script.js.map +1 -0
- package/lib/api/api/rank_eval.d.ts +10 -0
- package/lib/api/api/rank_eval.js +61 -0
- package/lib/api/api/rank_eval.js.map +1 -0
- package/lib/api/api/reindex.d.ts +10 -0
- package/lib/api/api/reindex.js +53 -0
- package/lib/api/api/reindex.js.map +1 -0
- package/lib/api/api/reindex_rethrottle.d.ts +10 -0
- package/lib/api/api/reindex_rethrottle.js +39 -0
- package/lib/api/api/reindex_rethrottle.js.map +1 -0
- package/lib/api/api/render_search_template.d.ts +10 -0
- package/lib/api/api/render_search_template.js +62 -0
- package/lib/api/api/render_search_template.js.map +1 -0
- package/lib/api/api/rollup.d.ts +38 -0
- package/lib/api/api/rollup.js +239 -0
- package/lib/api/api/rollup.js.map +1 -0
- package/lib/api/api/scripts_painless_execute.d.ts +10 -0
- package/lib/api/api/scripts_painless_execute.js +54 -0
- package/lib/api/api/scripts_painless_execute.js.map +1 -0
- package/lib/api/api/scroll.d.ts +10 -0
- package/lib/api/api/scroll.js +53 -0
- package/lib/api/api/scroll.js.map +1 -0
- package/lib/api/api/search.d.ts +10 -0
- package/lib/api/api/search.js +69 -0
- package/lib/api/api/search.js.map +1 -0
- package/lib/api/api/search_mvt.d.ts +10 -0
- package/lib/api/api/search_mvt.js +53 -0
- package/lib/api/api/search_mvt.js.map +1 -0
- package/lib/api/api/search_shards.d.ts +10 -0
- package/lib/api/api/search_shards.js +48 -0
- package/lib/api/api/search_shards.js.map +1 -0
- package/lib/api/api/search_template.d.ts +10 -0
- package/lib/api/api/search_template.js +62 -0
- package/lib/api/api/search_template.js.map +1 -0
- package/lib/api/api/searchable_snapshots.d.ts +23 -0
- package/lib/api/api/searchable_snapshots.js +142 -0
- package/lib/api/api/searchable_snapshots.js.map +1 -0
- package/lib/api/api/security.d.ts +173 -0
- package/lib/api/api/security.js +1344 -0
- package/lib/api/api/security.js.map +1 -0
- package/lib/api/api/shutdown.d.ts +20 -0
- package/lib/api/api/shutdown.js +107 -0
- package/lib/api/api/shutdown.js.map +1 -0
- package/lib/api/api/slm.d.ts +38 -0
- package/lib/api/api/slm.js +214 -0
- package/lib/api/api/slm.js.map +1 -0
- package/lib/api/api/snapshot.d.ts +47 -0
- package/lib/api/api/snapshot.js +315 -0
- package/lib/api/api/snapshot.js.map +1 -0
- package/lib/api/api/sql.d.ts +29 -0
- package/lib/api/api/sql.js +178 -0
- package/lib/api/api/sql.js.map +1 -0
- package/lib/api/api/ssl.d.ts +14 -0
- package/lib/api/api/ssl.js +51 -0
- package/lib/api/api/ssl.js.map +1 -0
- package/lib/api/api/tasks.d.ts +20 -0
- package/lib/api/api/tasks.js +94 -0
- package/lib/api/api/tasks.js.map +1 -0
- package/lib/api/api/terms_enum.d.ts +10 -0
- package/lib/api/api/terms_enum.js +53 -0
- package/lib/api/api/terms_enum.js.map +1 -0
- package/lib/api/api/termvectors.d.ts +10 -0
- package/lib/api/api/termvectors.js +61 -0
- package/lib/api/api/termvectors.js.map +1 -0
- package/lib/api/api/text_structure.d.ts +14 -0
- package/lib/api/api/text_structure.js +57 -0
- package/lib/api/api/text_structure.js.map +1 -0
- package/lib/api/api/transform.d.ts +41 -0
- package/lib/api/api/transform.js +264 -0
- package/lib/api/api/transform.js.map +1 -0
- package/lib/api/api/update.d.ts +10 -0
- package/lib/api/api/update.js +53 -0
- package/lib/api/api/update.js.map +1 -0
- package/lib/api/api/update_by_query.d.ts +10 -0
- package/lib/api/api/update_by_query.js +53 -0
- package/lib/api/api/update_by_query.js.map +1 -0
- package/lib/api/api/update_by_query_rethrottle.d.ts +10 -0
- package/lib/api/api/update_by_query_rethrottle.js +39 -0
- package/lib/api/api/update_by_query_rethrottle.js.map +1 -0
- package/lib/api/api/watcher.d.ts +44 -0
- package/lib/api/api/watcher.js +291 -0
- package/lib/api/api/watcher.js.map +1 -0
- package/lib/api/api/xpack.d.ts +17 -0
- package/lib/api/api/xpack.js +69 -0
- package/lib/api/api/xpack.js.map +1 -0
- package/lib/api/index.d.ts +225 -0
- package/lib/api/index.js +520 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/types.d.ts +15306 -0
- package/lib/api/types.js +21 -0
- package/lib/api/types.js.map +1 -0
- package/lib/api/typesWithBodyKey.d.ts +15718 -0
- package/lib/api/typesWithBodyKey.js +21 -0
- package/lib/api/typesWithBodyKey.js.map +1 -0
- package/lib/client.d.ts +70 -0
- package/lib/client.js +287 -0
- package/lib/client.js.map +1 -0
- package/lib/helpers.d.ts +149 -0
- package/lib/helpers.js +776 -0
- package/lib/helpers.js.map +1 -0
- package/lib/sniffingTransport.d.ts +4 -0
- package/lib/sniffingTransport.js +56 -0
- package/lib/sniffingTransport.js.map +1 -0
- package/package.json +93 -0
- package/tsconfig.json +37 -0
|
@@ -0,0 +1,94 @@
|
|
|
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 Tasks {
|
|
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 cancel(params, options) {
|
|
32
|
+
const acceptedPath = ['task_id'];
|
|
33
|
+
const querystring = {};
|
|
34
|
+
const body = undefined;
|
|
35
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
36
|
+
for (const key in params) {
|
|
37
|
+
if (acceptedPath.includes(key)) {
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
else if (key !== 'body') {
|
|
41
|
+
// @ts-expect-error
|
|
42
|
+
querystring[key] = params[key];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
let method = '';
|
|
46
|
+
let path = '';
|
|
47
|
+
if (params.task_id != null) {
|
|
48
|
+
method = 'POST';
|
|
49
|
+
path = `/_tasks/${encodeURIComponent(params.task_id.toString())}/_cancel`;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
method = 'POST';
|
|
53
|
+
path = '/_tasks/_cancel';
|
|
54
|
+
}
|
|
55
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
56
|
+
}
|
|
57
|
+
async get(params, options) {
|
|
58
|
+
const acceptedPath = ['task_id'];
|
|
59
|
+
const querystring = {};
|
|
60
|
+
const body = undefined;
|
|
61
|
+
for (const key in params) {
|
|
62
|
+
if (acceptedPath.includes(key)) {
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
else if (key !== 'body') {
|
|
66
|
+
// @ts-expect-error
|
|
67
|
+
querystring[key] = params[key];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const method = 'GET';
|
|
71
|
+
const path = `/_tasks/${encodeURIComponent(params.task_id.toString())}`;
|
|
72
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
73
|
+
}
|
|
74
|
+
async list(params, options) {
|
|
75
|
+
const acceptedPath = [];
|
|
76
|
+
const querystring = {};
|
|
77
|
+
const body = undefined;
|
|
78
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
79
|
+
for (const key in params) {
|
|
80
|
+
if (acceptedPath.includes(key)) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
else if (key !== 'body') {
|
|
84
|
+
// @ts-expect-error
|
|
85
|
+
querystring[key] = params[key];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const method = 'GET';
|
|
89
|
+
const path = '/_tasks';
|
|
90
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.default = Tasks;
|
|
94
|
+
//# sourceMappingURL=tasks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../../src/api/api/tasks.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
|
|
2
|
+
import * as T from '../types';
|
|
3
|
+
import * as TB from '../typesWithBodyKey';
|
|
4
|
+
interface That {
|
|
5
|
+
transport: Transport;
|
|
6
|
+
}
|
|
7
|
+
export default function TermsEnumApi(this: That, params: T.TermsEnumRequest | TB.TermsEnumRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TermsEnumResponse>;
|
|
8
|
+
export default function TermsEnumApi(this: That, params: T.TermsEnumRequest | TB.TermsEnumRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TermsEnumResponse, unknown>>;
|
|
9
|
+
export default function TermsEnumApi(this: That, params: T.TermsEnumRequest | TB.TermsEnumRequest, options?: TransportRequestOptions): Promise<T.TermsEnumResponse>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
async function TermsEnumApi(params, options) {
|
|
22
|
+
const acceptedPath = ['index'];
|
|
23
|
+
const acceptedBody = ['field', 'size', 'timeout', 'case_insensitive', 'index_filter', 'string', 'search_after'];
|
|
24
|
+
const querystring = {};
|
|
25
|
+
// @ts-expect-error
|
|
26
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
27
|
+
let body;
|
|
28
|
+
if (typeof userBody === 'string') {
|
|
29
|
+
body = userBody;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
33
|
+
}
|
|
34
|
+
for (const key in params) {
|
|
35
|
+
if (acceptedBody.includes(key)) {
|
|
36
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
37
|
+
// @ts-expect-error
|
|
38
|
+
body[key] = params[key];
|
|
39
|
+
}
|
|
40
|
+
else if (acceptedPath.includes(key)) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
else if (key !== 'body') {
|
|
44
|
+
// @ts-expect-error
|
|
45
|
+
querystring[key] = params[key];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const method = body != null ? 'POST' : 'GET';
|
|
49
|
+
const path = `/${encodeURIComponent(params.index.toString())}/_terms_enum`;
|
|
50
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
51
|
+
}
|
|
52
|
+
exports.default = TermsEnumApi;
|
|
53
|
+
//# sourceMappingURL=terms_enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms_enum.js","sourceRoot":"","sources":["../../../src/api/api/terms_enum.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAyBY,KAAK,UAAU,YAAY,CAAc,MAAgD,EAAE,OAAiC;IACzI,MAAM,YAAY,GAAa,CAAC,OAAO,CAAC,CAAA;IACxC,MAAM,YAAY,GAAa,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAA;IACzH,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,mBAAmB;IACnB,MAAM,QAAQ,GAAQ,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAA;IAClC,IAAI,IAAkC,CAAA;IACtC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,IAAI,GAAG,QAAQ,CAAA;KAChB;SAAM;QACL,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;KACtD;IAED,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,IAAI,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAA;YACjB,mBAAmB;YACnB,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SACxB;aAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACrC,SAAQ;SACT;aAAM,IAAI,GAAG,KAAK,MAAM,EAAE;YACzB,mBAAmB;YACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SAC/B;KACF;IAED,MAAM,MAAM,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;IAC5C,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,cAAc,CAAA;IAC1E,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AA7BD,+BA6BC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
|
|
2
|
+
import * as T from '../types';
|
|
3
|
+
import * as TB from '../typesWithBodyKey';
|
|
4
|
+
interface That {
|
|
5
|
+
transport: Transport;
|
|
6
|
+
}
|
|
7
|
+
export default function TermvectorsApi<TDocument = unknown>(this: That, params: T.TermvectorsRequest<TDocument> | TB.TermvectorsRequest<TDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.TermvectorsResponse>;
|
|
8
|
+
export default function TermvectorsApi<TDocument = unknown>(this: That, params: T.TermvectorsRequest<TDocument> | TB.TermvectorsRequest<TDocument>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TermvectorsResponse, unknown>>;
|
|
9
|
+
export default function TermvectorsApi<TDocument = unknown>(this: That, params: T.TermvectorsRequest<TDocument> | TB.TermvectorsRequest<TDocument>, options?: TransportRequestOptions): Promise<T.TermvectorsResponse>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
async function TermvectorsApi(params, options) {
|
|
22
|
+
const acceptedPath = ['index', 'id'];
|
|
23
|
+
const acceptedBody = ['doc', 'filter', 'per_field_analyzer'];
|
|
24
|
+
const querystring = {};
|
|
25
|
+
// @ts-expect-error
|
|
26
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
27
|
+
let body;
|
|
28
|
+
if (typeof userBody === 'string') {
|
|
29
|
+
body = userBody;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
33
|
+
}
|
|
34
|
+
for (const key in params) {
|
|
35
|
+
if (acceptedBody.includes(key)) {
|
|
36
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
37
|
+
// @ts-expect-error
|
|
38
|
+
body[key] = params[key];
|
|
39
|
+
}
|
|
40
|
+
else if (acceptedPath.includes(key)) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
else if (key !== 'body') {
|
|
44
|
+
// @ts-expect-error
|
|
45
|
+
querystring[key] = params[key];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
let method = '';
|
|
49
|
+
let path = '';
|
|
50
|
+
if (params.index != null && params.id != null) {
|
|
51
|
+
method = body != null ? 'POST' : 'GET';
|
|
52
|
+
path = `/${encodeURIComponent(params.index.toString())}/_termvectors/${encodeURIComponent(params.id.toString())}`;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
method = body != null ? 'POST' : 'GET';
|
|
56
|
+
path = `/${encodeURIComponent(params.index.toString())}/_termvectors`;
|
|
57
|
+
}
|
|
58
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
59
|
+
}
|
|
60
|
+
exports.default = TermvectorsApi;
|
|
61
|
+
//# sourceMappingURL=termvectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"termvectors.js","sourceRoot":"","sources":["../../../src/api/api/termvectors.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAyBY,KAAK,UAAU,cAAc,CAAmC,MAA0E,EAAE,OAAiC;IAC1L,MAAM,YAAY,GAAa,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;IAC9C,MAAM,YAAY,GAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,oBAAoB,CAAC,CAAA;IACtE,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,mBAAmB;IACnB,MAAM,QAAQ,GAAQ,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAA;IAClC,IAAI,IAAkC,CAAA;IACtC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,IAAI,GAAG,QAAQ,CAAA;KAChB;SAAM;QACL,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;KACtD;IAED,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,IAAI,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAA;YACjB,mBAAmB;YACnB,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SACxB;aAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACrC,SAAQ;SACT;aAAM,IAAI,GAAG,KAAK,MAAM,EAAE;YACzB,mBAAmB;YACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SAC/B;KACF;IAED,IAAI,MAAM,GAAG,EAAE,CAAA;IACf,IAAI,IAAI,GAAG,EAAE,CAAA;IACb,IAAI,MAAM,CAAC,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,EAAE,IAAI,IAAI,EAAE;QAC7C,MAAM,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;QACtC,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,iBAAiB,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;KAClH;SAAM;QACL,MAAM,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;QACtC,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,eAAe,CAAA;KACtE;IACD,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AApCD,iCAoCC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
|
|
2
|
+
import * as T from '../types';
|
|
3
|
+
import * as TB from '../typesWithBodyKey';
|
|
4
|
+
interface That {
|
|
5
|
+
transport: Transport;
|
|
6
|
+
}
|
|
7
|
+
export default class TextStructure {
|
|
8
|
+
transport: Transport;
|
|
9
|
+
constructor(transport: Transport);
|
|
10
|
+
findStructure<TJsonDocument = unknown>(this: That, params: T.TextStructureFindStructureRequest<TJsonDocument> | TB.TextStructureFindStructureRequest<TJsonDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.TextStructureFindStructureResponse>;
|
|
11
|
+
findStructure<TJsonDocument = unknown>(this: That, params: T.TextStructureFindStructureRequest<TJsonDocument> | TB.TextStructureFindStructureRequest<TJsonDocument>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TextStructureFindStructureResponse, unknown>>;
|
|
12
|
+
findStructure<TJsonDocument = unknown>(this: That, params: T.TextStructureFindStructureRequest<TJsonDocument> | TB.TextStructureFindStructureRequest<TJsonDocument>, options?: TransportRequestOptions): Promise<T.TextStructureFindStructureResponse>;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
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 TextStructure {
|
|
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 findStructure(params, options) {
|
|
32
|
+
var _a;
|
|
33
|
+
const acceptedPath = [];
|
|
34
|
+
const acceptedBody = ['text_files'];
|
|
35
|
+
const querystring = {};
|
|
36
|
+
// @ts-expect-error
|
|
37
|
+
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
38
|
+
for (const key in params) {
|
|
39
|
+
if (acceptedBody.includes(key)) {
|
|
40
|
+
// @ts-expect-error
|
|
41
|
+
body = params[key];
|
|
42
|
+
}
|
|
43
|
+
else if (acceptedPath.includes(key)) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
else if (key !== 'body') {
|
|
47
|
+
// @ts-expect-error
|
|
48
|
+
querystring[key] = params[key];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const method = 'POST';
|
|
52
|
+
const path = '/_text_structure/find_structure';
|
|
53
|
+
return await this.transport.request({ path, method, querystring, bulkBody: body }, options);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.default = TextStructure;
|
|
57
|
+
//# sourceMappingURL=text_structure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text_structure.js","sourceRoot":"","sources":["../../../src/api/api/text_structure.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAsBH,MAAqB,aAAa;IAEhC,YAAa,SAAoB;QADjC;;;;;WAAoB;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAKD,KAAK,CAAC,aAAa,CAAuC,MAAgH,EAAE,OAAiC;;QAC3M,MAAM,YAAY,GAAa,EAAE,CAAA;QACjC,MAAM,YAAY,GAAa,CAAC,YAAY,CAAC,CAAA;QAC7C,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,mBAAmB;QACnB,IAAI,IAAI,GAAQ,MAAA,MAAM,CAAC,IAAI,mCAAI,SAAS,CAAA;QAExC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,mBAAmB;gBACnB,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;aACnB;iBAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBACrC,SAAQ;aACT;iBAAM,IAAI,GAAG,KAAK,MAAM,EAAE;gBACzB,mBAAmB;gBACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;aAC/B;SACF;QAED,MAAM,MAAM,GAAG,MAAM,CAAA;QACrB,MAAM,IAAI,GAAG,iCAAiC,CAAA;QAC9C,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IAC7F,CAAC;CACF;AAhCD,gCAgCC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
|
|
2
|
+
import * as T from '../types';
|
|
3
|
+
import * as TB from '../typesWithBodyKey';
|
|
4
|
+
interface That {
|
|
5
|
+
transport: Transport;
|
|
6
|
+
}
|
|
7
|
+
export default class Transform {
|
|
8
|
+
transport: Transport;
|
|
9
|
+
constructor(transport: Transport);
|
|
10
|
+
deleteTransform(this: That, params: T.TransformDeleteTransformRequest | TB.TransformDeleteTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformDeleteTransformResponse>;
|
|
11
|
+
deleteTransform(this: That, params: T.TransformDeleteTransformRequest | TB.TransformDeleteTransformRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformDeleteTransformResponse, unknown>>;
|
|
12
|
+
deleteTransform(this: That, params: T.TransformDeleteTransformRequest | TB.TransformDeleteTransformRequest, options?: TransportRequestOptions): Promise<T.TransformDeleteTransformResponse>;
|
|
13
|
+
getTransform(this: That, params?: T.TransformGetTransformRequest | TB.TransformGetTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformGetTransformResponse>;
|
|
14
|
+
getTransform(this: That, params?: T.TransformGetTransformRequest | TB.TransformGetTransformRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformGetTransformResponse, unknown>>;
|
|
15
|
+
getTransform(this: That, params?: T.TransformGetTransformRequest | TB.TransformGetTransformRequest, options?: TransportRequestOptions): Promise<T.TransformGetTransformResponse>;
|
|
16
|
+
getTransformStats(this: That, params: T.TransformGetTransformStatsRequest | TB.TransformGetTransformStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformGetTransformStatsResponse>;
|
|
17
|
+
getTransformStats(this: That, params: T.TransformGetTransformStatsRequest | TB.TransformGetTransformStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformGetTransformStatsResponse, unknown>>;
|
|
18
|
+
getTransformStats(this: That, params: T.TransformGetTransformStatsRequest | TB.TransformGetTransformStatsRequest, options?: TransportRequestOptions): Promise<T.TransformGetTransformStatsResponse>;
|
|
19
|
+
previewTransform<TTransform = unknown>(this: That, params?: T.TransformPreviewTransformRequest | TB.TransformPreviewTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformPreviewTransformResponse<TTransform>>;
|
|
20
|
+
previewTransform<TTransform = unknown>(this: That, params?: T.TransformPreviewTransformRequest | TB.TransformPreviewTransformRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformPreviewTransformResponse<TTransform>, unknown>>;
|
|
21
|
+
previewTransform<TTransform = unknown>(this: That, params?: T.TransformPreviewTransformRequest | TB.TransformPreviewTransformRequest, options?: TransportRequestOptions): Promise<T.TransformPreviewTransformResponse<TTransform>>;
|
|
22
|
+
putTransform(this: That, params: T.TransformPutTransformRequest | TB.TransformPutTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformPutTransformResponse>;
|
|
23
|
+
putTransform(this: That, params: T.TransformPutTransformRequest | TB.TransformPutTransformRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformPutTransformResponse, unknown>>;
|
|
24
|
+
putTransform(this: That, params: T.TransformPutTransformRequest | TB.TransformPutTransformRequest, options?: TransportRequestOptions): Promise<T.TransformPutTransformResponse>;
|
|
25
|
+
resetTransform(this: That, params: T.TransformResetTransformRequest | TB.TransformResetTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformResetTransformResponse>;
|
|
26
|
+
resetTransform(this: That, params: T.TransformResetTransformRequest | TB.TransformResetTransformRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformResetTransformResponse, unknown>>;
|
|
27
|
+
resetTransform(this: That, params: T.TransformResetTransformRequest | TB.TransformResetTransformRequest, options?: TransportRequestOptions): Promise<T.TransformResetTransformResponse>;
|
|
28
|
+
startTransform(this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformStartTransformResponse>;
|
|
29
|
+
startTransform(this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformStartTransformResponse, unknown>>;
|
|
30
|
+
startTransform(this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptions): Promise<T.TransformStartTransformResponse>;
|
|
31
|
+
stopTransform(this: That, params: T.TransformStopTransformRequest | TB.TransformStopTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformStopTransformResponse>;
|
|
32
|
+
stopTransform(this: That, params: T.TransformStopTransformRequest | TB.TransformStopTransformRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformStopTransformResponse, unknown>>;
|
|
33
|
+
stopTransform(this: That, params: T.TransformStopTransformRequest | TB.TransformStopTransformRequest, options?: TransportRequestOptions): Promise<T.TransformStopTransformResponse>;
|
|
34
|
+
updateTransform(this: That, params: T.TransformUpdateTransformRequest | TB.TransformUpdateTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformUpdateTransformResponse>;
|
|
35
|
+
updateTransform(this: That, params: T.TransformUpdateTransformRequest | TB.TransformUpdateTransformRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformUpdateTransformResponse, unknown>>;
|
|
36
|
+
updateTransform(this: That, params: T.TransformUpdateTransformRequest | TB.TransformUpdateTransformRequest, options?: TransportRequestOptions): Promise<T.TransformUpdateTransformResponse>;
|
|
37
|
+
upgradeTransforms(this: That, params?: T.TransformUpgradeTransformsRequest | TB.TransformUpgradeTransformsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformUpgradeTransformsResponse>;
|
|
38
|
+
upgradeTransforms(this: That, params?: T.TransformUpgradeTransformsRequest | TB.TransformUpgradeTransformsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformUpgradeTransformsResponse, unknown>>;
|
|
39
|
+
upgradeTransforms(this: That, params?: T.TransformUpgradeTransformsRequest | TB.TransformUpgradeTransformsRequest, options?: TransportRequestOptions): Promise<T.TransformUpgradeTransformsResponse>;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,264 @@
|
|
|
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 Transform {
|
|
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 deleteTransform(params, options) {
|
|
32
|
+
const acceptedPath = ['transform_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 = 'DELETE';
|
|
45
|
+
const path = `/_transform/${encodeURIComponent(params.transform_id.toString())}`;
|
|
46
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
47
|
+
}
|
|
48
|
+
async getTransform(params, options) {
|
|
49
|
+
const acceptedPath = ['transform_id'];
|
|
50
|
+
const querystring = {};
|
|
51
|
+
const body = undefined;
|
|
52
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
53
|
+
for (const key in params) {
|
|
54
|
+
if (acceptedPath.includes(key)) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
else if (key !== 'body') {
|
|
58
|
+
// @ts-expect-error
|
|
59
|
+
querystring[key] = params[key];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
let method = '';
|
|
63
|
+
let path = '';
|
|
64
|
+
if (params.transform_id != null) {
|
|
65
|
+
method = 'GET';
|
|
66
|
+
path = `/_transform/${encodeURIComponent(params.transform_id.toString())}`;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
method = 'GET';
|
|
70
|
+
path = '/_transform';
|
|
71
|
+
}
|
|
72
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
73
|
+
}
|
|
74
|
+
async getTransformStats(params, options) {
|
|
75
|
+
const acceptedPath = ['transform_id'];
|
|
76
|
+
const querystring = {};
|
|
77
|
+
const body = undefined;
|
|
78
|
+
for (const key in params) {
|
|
79
|
+
if (acceptedPath.includes(key)) {
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
else if (key !== 'body') {
|
|
83
|
+
// @ts-expect-error
|
|
84
|
+
querystring[key] = params[key];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
const method = 'GET';
|
|
88
|
+
const path = `/_transform/${encodeURIComponent(params.transform_id.toString())}/_stats`;
|
|
89
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
90
|
+
}
|
|
91
|
+
async previewTransform(params, options) {
|
|
92
|
+
const acceptedPath = ['transform_id'];
|
|
93
|
+
const acceptedBody = ['dest', 'description', 'frequency', 'pivot', 'source', 'settings', 'sync', 'retention_policy', 'latest'];
|
|
94
|
+
const querystring = {};
|
|
95
|
+
// @ts-expect-error
|
|
96
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
97
|
+
let body;
|
|
98
|
+
if (typeof userBody === 'string') {
|
|
99
|
+
body = userBody;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
103
|
+
}
|
|
104
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
105
|
+
for (const key in params) {
|
|
106
|
+
if (acceptedBody.includes(key)) {
|
|
107
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
108
|
+
// @ts-expect-error
|
|
109
|
+
body[key] = params[key];
|
|
110
|
+
}
|
|
111
|
+
else if (acceptedPath.includes(key)) {
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
else if (key !== 'body') {
|
|
115
|
+
// @ts-expect-error
|
|
116
|
+
querystring[key] = params[key];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
let method = '';
|
|
120
|
+
let path = '';
|
|
121
|
+
if (params.transform_id != null) {
|
|
122
|
+
method = body != null ? 'POST' : 'GET';
|
|
123
|
+
path = `/_transform/${encodeURIComponent(params.transform_id.toString())}/_preview`;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
method = body != null ? 'POST' : 'GET';
|
|
127
|
+
path = '/_transform/_preview';
|
|
128
|
+
}
|
|
129
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
130
|
+
}
|
|
131
|
+
async putTransform(params, options) {
|
|
132
|
+
const acceptedPath = ['transform_id'];
|
|
133
|
+
const acceptedBody = ['dest', 'description', 'frequency', 'latest', '_meta', 'pivot', 'retention_policy', 'settings', 'source', 'sync'];
|
|
134
|
+
const querystring = {};
|
|
135
|
+
// @ts-expect-error
|
|
136
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
137
|
+
let body;
|
|
138
|
+
if (typeof userBody === 'string') {
|
|
139
|
+
body = userBody;
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
143
|
+
}
|
|
144
|
+
for (const key in params) {
|
|
145
|
+
if (acceptedBody.includes(key)) {
|
|
146
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
147
|
+
// @ts-expect-error
|
|
148
|
+
body[key] = params[key];
|
|
149
|
+
}
|
|
150
|
+
else if (acceptedPath.includes(key)) {
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
else if (key !== 'body') {
|
|
154
|
+
// @ts-expect-error
|
|
155
|
+
querystring[key] = params[key];
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
const method = 'PUT';
|
|
159
|
+
const path = `/_transform/${encodeURIComponent(params.transform_id.toString())}`;
|
|
160
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
161
|
+
}
|
|
162
|
+
async resetTransform(params, options) {
|
|
163
|
+
const acceptedPath = ['transform_id'];
|
|
164
|
+
const querystring = {};
|
|
165
|
+
const body = undefined;
|
|
166
|
+
for (const key in params) {
|
|
167
|
+
if (acceptedPath.includes(key)) {
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
else if (key !== 'body') {
|
|
171
|
+
// @ts-expect-error
|
|
172
|
+
querystring[key] = params[key];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const method = 'POST';
|
|
176
|
+
const path = `/_transform/${encodeURIComponent(params.transform_id.toString())}/_reset`;
|
|
177
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
178
|
+
}
|
|
179
|
+
async startTransform(params, options) {
|
|
180
|
+
const acceptedPath = ['transform_id'];
|
|
181
|
+
const querystring = {};
|
|
182
|
+
const body = undefined;
|
|
183
|
+
for (const key in params) {
|
|
184
|
+
if (acceptedPath.includes(key)) {
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
else if (key !== 'body') {
|
|
188
|
+
// @ts-expect-error
|
|
189
|
+
querystring[key] = params[key];
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
const method = 'POST';
|
|
193
|
+
const path = `/_transform/${encodeURIComponent(params.transform_id.toString())}/_start`;
|
|
194
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
195
|
+
}
|
|
196
|
+
async stopTransform(params, options) {
|
|
197
|
+
const acceptedPath = ['transform_id'];
|
|
198
|
+
const querystring = {};
|
|
199
|
+
const body = undefined;
|
|
200
|
+
for (const key in params) {
|
|
201
|
+
if (acceptedPath.includes(key)) {
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
else if (key !== 'body') {
|
|
205
|
+
// @ts-expect-error
|
|
206
|
+
querystring[key] = params[key];
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
const method = 'POST';
|
|
210
|
+
const path = `/_transform/${encodeURIComponent(params.transform_id.toString())}/_stop`;
|
|
211
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
212
|
+
}
|
|
213
|
+
async updateTransform(params, options) {
|
|
214
|
+
const acceptedPath = ['transform_id'];
|
|
215
|
+
const acceptedBody = ['dest', 'description', 'frequency', '_meta', 'source', 'settings', 'sync', 'retention_policy'];
|
|
216
|
+
const querystring = {};
|
|
217
|
+
// @ts-expect-error
|
|
218
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
219
|
+
let body;
|
|
220
|
+
if (typeof userBody === 'string') {
|
|
221
|
+
body = userBody;
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
225
|
+
}
|
|
226
|
+
for (const key in params) {
|
|
227
|
+
if (acceptedBody.includes(key)) {
|
|
228
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
229
|
+
// @ts-expect-error
|
|
230
|
+
body[key] = params[key];
|
|
231
|
+
}
|
|
232
|
+
else if (acceptedPath.includes(key)) {
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
else if (key !== 'body') {
|
|
236
|
+
// @ts-expect-error
|
|
237
|
+
querystring[key] = params[key];
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
const method = 'POST';
|
|
241
|
+
const path = `/_transform/${encodeURIComponent(params.transform_id.toString())}/_update`;
|
|
242
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
243
|
+
}
|
|
244
|
+
async upgradeTransforms(params, options) {
|
|
245
|
+
const acceptedPath = [];
|
|
246
|
+
const querystring = {};
|
|
247
|
+
const body = undefined;
|
|
248
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
249
|
+
for (const key in params) {
|
|
250
|
+
if (acceptedPath.includes(key)) {
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
else if (key !== 'body') {
|
|
254
|
+
// @ts-expect-error
|
|
255
|
+
querystring[key] = params[key];
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
const method = 'POST';
|
|
259
|
+
const path = '/_transform/_upgrade';
|
|
260
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
exports.default = Transform;
|
|
264
|
+
//# sourceMappingURL=transform.js.map
|