flow like the river

This commit is contained in:
root 2025-11-07 00:06:12 +01:00
commit 013fe673f3
42435 changed files with 5764238 additions and 0 deletions

View file

@ -0,0 +1,39 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class AsyncSearch {
transport: Transport;
constructor(transport: Transport);
/**
* Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/async-search.html | Elasticsearch API documentation}
*/
delete(this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchDeleteResponse>;
delete(this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchDeleteResponse, unknown>>;
delete(this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchDeleteResponse>;
/**
* Retrieves the results of a previously submitted async search request given its ID.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/async-search.html | Elasticsearch API documentation}
*/
get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>>(this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchGetResponse<TDocument, TAggregations>>;
get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>>(this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchGetResponse<TDocument, TAggregations>, unknown>>;
get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>>(this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchGetResponse<TDocument, TAggregations>>;
/**
* Retrieves the status of a previously submitted async search request given its ID.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/async-search.html | Elasticsearch API documentation}
*/
status(this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchStatusResponse>;
status(this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchStatusResponse, unknown>>;
status(this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchStatusResponse>;
/**
* Executes a search request asynchronously.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/async-search.html | Elasticsearch API documentation}
*/
submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>>(this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchSubmitResponse<TDocument, TAggregations>>;
submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>>(this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchSubmitResponse<TDocument, TAggregations>, unknown>>;
submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>>(this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchSubmitResponse<TDocument, TAggregations>>;
}
export {};

View file

@ -0,0 +1,131 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
class AsyncSearch {
constructor(transport) {
Object.defineProperty(this, "transport", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.transport = transport;
}
async delete(params, options) {
const acceptedPath = ['id'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = `/_async_search/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async get(params, options) {
const acceptedPath = ['id'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/_async_search/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async status(params, options) {
const acceptedPath = ['id'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/_async_search/status/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async submit(params, options) {
const acceptedPath = ['index'];
const acceptedBody = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'knn', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) { // eslint-disable-line
// @ts-expect-error
querystring[key] = params[key];
}
else {
// @ts-expect-error
body[key] = params[key];
}
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.index != null) {
method = 'POST';
path = `/${encodeURIComponent(params.index.toString())}/_async_search`;
}
else {
method = 'POST';
path = '/_async_search';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
}
exports.default = AsyncSearch;
//# sourceMappingURL=async_search.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"async_search.js","sourceRoot":"","sources":["../../../src/api/api/async_search.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAsBH,MAAqB,WAAW;IAE9B,YAAa,SAAoB;QADjC;;;;;WAAoB;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IASD,KAAK,CAAC,MAAM,CAAc,MAAgE,EAAE,OAAiC;QAC3H,MAAM,YAAY,GAAa,CAAC,IAAI,CAAC,CAAA;QACrC,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;QAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,SAAQ;aACT;iBAAM,IAAI,GAAG,KAAK,MAAM,EAAE;gBACzB,mBAAmB;gBACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MA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E;aAAM;YACL,MAAM,GAAG,MAAM,CAAA;YACf,IAAI,GAAG,gBAAgB,CAAA;SACxB;QACD,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;CACF;AAvID,8BAuIC"}

View file

@ -0,0 +1,39 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class Autoscaling {
transport: Transport;
constructor(transport: Transport);
/**
* Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/autoscaling-delete-autoscaling-policy.html | Elasticsearch API documentation}
*/
deleteAutoscalingPolicy(this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingDeleteAutoscalingPolicyResponse>;
deleteAutoscalingPolicy(this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingDeleteAutoscalingPolicyResponse, unknown>>;
deleteAutoscalingPolicy(this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<T.AutoscalingDeleteAutoscalingPolicyResponse>;
/**
* Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
*/
getAutoscalingCapacity(this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingGetAutoscalingCapacityResponse>;
getAutoscalingCapacity(this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingGetAutoscalingCapacityResponse, unknown>>;
getAutoscalingCapacity(this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptions): Promise<T.AutoscalingGetAutoscalingCapacityResponse>;
/**
* Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
*/
getAutoscalingPolicy(this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingGetAutoscalingPolicyResponse>;
getAutoscalingPolicy(this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingGetAutoscalingPolicyResponse, unknown>>;
getAutoscalingPolicy(this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<T.AutoscalingGetAutoscalingPolicyResponse>;
/**
* Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/autoscaling-put-autoscaling-policy.html | Elasticsearch API documentation}
*/
putAutoscalingPolicy(this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingPutAutoscalingPolicyResponse>;
putAutoscalingPolicy(this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingPutAutoscalingPolicyResponse, unknown>>;
putAutoscalingPolicy(this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<T.AutoscalingPutAutoscalingPolicyResponse>;
}
export {};

View file

@ -0,0 +1,109 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
class Autoscaling {
constructor(transport) {
Object.defineProperty(this, "transport", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.transport = transport;
}
async deleteAutoscalingPolicy(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = `/_autoscaling/policy/${encodeURIComponent(params.name.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async getAutoscalingCapacity(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_autoscaling/capacity';
return await this.transport.request({ path, method, querystring, body }, options);
}
async getAutoscalingPolicy(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/_autoscaling/policy/${encodeURIComponent(params.name.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async putAutoscalingPolicy(params, options) {
var _a;
const acceptedPath = ['name'];
const acceptedBody = ['policy'];
const querystring = {};
// @ts-expect-error
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
for (const key in params) {
if (acceptedBody.includes(key)) {
// @ts-expect-error
body = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'PUT';
const path = `/_autoscaling/policy/${encodeURIComponent(params.name.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
}
exports.default = Autoscaling;
//# sourceMappingURL=autoscaling.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"autoscaling.js","sourceRoot":"","sources":["../../../src/api/api/autoscaling.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAsBH,MAAqB,WAAW;IAE9B,YAAa,SAAoB;QADjC;;;;;WAAoB;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IASD,KAAK,CAAC,uBAAuB,CAAc,MAAkG,EAAE,OAAiC;QAC9K,MAAM,YAAY,GAAa,CAAC,MAAM,CAAC,CAAA;QACvC,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;QAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,SAAQ;aACT;iBAAM,IAAI,GAAG,KAAK,MAAM,EAAE;gBACzB,mBAAmB;gBACnB,WAAW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,wBAAwB,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;QACjF,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;CACF;AAnHD,8BAmHC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Allows to perform multiple index/update/delete operations in a single request.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/docs-bulk.html | Elasticsearch API documentation}
*/
export default function BulkApi<TDocument = unknown, TPartialDocument = unknown>(this: That, params: T.BulkRequest<TDocument, TPartialDocument> | TB.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.BulkResponse>;
export default function BulkApi<TDocument = unknown, TPartialDocument = unknown>(this: That, params: T.BulkRequest<TDocument, TPartialDocument> | TB.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.BulkResponse, unknown>>;
export default function BulkApi<TDocument = unknown, TPartialDocument = unknown>(this: That, params: T.BulkRequest<TDocument, TPartialDocument> | TB.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions): Promise<T.BulkResponse>;
export {};

View file

@ -0,0 +1,54 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function BulkApi(params, options) {
var _a;
const acceptedPath = ['index'];
const acceptedBody = ['operations'];
const querystring = {};
// @ts-expect-error
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
for (const key in params) {
if (acceptedBody.includes(key)) {
// @ts-expect-error
body = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.index != null) {
method = 'POST';
path = `/${encodeURIComponent(params.index.toString())}/_bulk`;
}
else {
method = 'POST';
path = '/_bulk';
}
return await this.transport.request({ path, method, querystring, bulkBody: body }, options);
}
exports.default = BulkApi;
//# sourceMappingURL=bulk.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"bulk.js","sourceRoot":"","sources":["../../../src/api/api/bulk.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,OAAO,CAA+D,MAAgG,EAAE,OAAiC;;IACrO,MAAM,YAAY,GAAa,CAAC,OAAO,CAAC,CAAA;IACxC,MAAM,YAAY,GAAa,CAAC,YAAY,CAAC,CAAA;IAC7C,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,mBAAmB;IACnB,IAAI,IAAI,GAAQ,MAAA,MAAM,CAAC,IAAI,mCAAI,SAAS,CAAA;IAExC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,mBAAmB;YACnB,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SACnB;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,EAAE;QACxB,MAAM,GAAG,MAAM,CAAA;QACf,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAA;KAC/D;SAAM;QACL,MAAM,GAAG,MAAM,CAAA;QACf,IAAI,GAAG,QAAQ,CAAA;KAChB;IACD,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AAC7F,CAAC;AA7BD,0BA6BC"}

View file

@ -0,0 +1,193 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class Cat {
transport: Transport;
constructor(transport: Transport);
/**
* Shows information about currently configured aliases to indices including filter and routing infos.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-alias.html | Elasticsearch API documentation}
*/
aliases(this: That, params?: T.CatAliasesRequest | TB.CatAliasesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatAliasesResponse>;
aliases(this: That, params?: T.CatAliasesRequest | TB.CatAliasesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatAliasesResponse, unknown>>;
aliases(this: That, params?: T.CatAliasesRequest | TB.CatAliasesRequest, options?: TransportRequestOptions): Promise<T.CatAliasesResponse>;
/**
* Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-allocation.html | Elasticsearch API documentation}
*/
allocation(this: That, params?: T.CatAllocationRequest | TB.CatAllocationRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatAllocationResponse>;
allocation(this: That, params?: T.CatAllocationRequest | TB.CatAllocationRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatAllocationResponse, unknown>>;
allocation(this: That, params?: T.CatAllocationRequest | TB.CatAllocationRequest, options?: TransportRequestOptions): Promise<T.CatAllocationResponse>;
/**
* Returns information about existing component_templates templates.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-component-templates.html | Elasticsearch API documentation}
*/
componentTemplates(this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatComponentTemplatesResponse>;
componentTemplates(this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatComponentTemplatesResponse, unknown>>;
componentTemplates(this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptions): Promise<T.CatComponentTemplatesResponse>;
/**
* Provides quick access to the document count of the entire cluster, or individual indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-count.html | Elasticsearch API documentation}
*/
count(this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatCountResponse>;
count(this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatCountResponse, unknown>>;
count(this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptions): Promise<T.CatCountResponse>;
/**
* Shows how much heap memory is currently being used by fielddata on every data node in the cluster.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-fielddata.html | Elasticsearch API documentation}
*/
fielddata(this: That, params?: T.CatFielddataRequest | TB.CatFielddataRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatFielddataResponse>;
fielddata(this: That, params?: T.CatFielddataRequest | TB.CatFielddataRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatFielddataResponse, unknown>>;
fielddata(this: That, params?: T.CatFielddataRequest | TB.CatFielddataRequest, options?: TransportRequestOptions): Promise<T.CatFielddataResponse>;
/**
* Returns a concise representation of the cluster health.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-health.html | Elasticsearch API documentation}
*/
health(this: That, params?: T.CatHealthRequest | TB.CatHealthRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatHealthResponse>;
health(this: That, params?: T.CatHealthRequest | TB.CatHealthRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatHealthResponse, unknown>>;
health(this: That, params?: T.CatHealthRequest | TB.CatHealthRequest, options?: TransportRequestOptions): Promise<T.CatHealthResponse>;
/**
* Returns help for the Cat APIs.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat.html | Elasticsearch API documentation}
*/
help(this: That, params?: T.CatHelpRequest | TB.CatHelpRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatHelpResponse>;
help(this: That, params?: T.CatHelpRequest | TB.CatHelpRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatHelpResponse, unknown>>;
help(this: That, params?: T.CatHelpRequest | TB.CatHelpRequest, options?: TransportRequestOptions): Promise<T.CatHelpResponse>;
/**
* Returns information about indices: number of primaries and replicas, document counts, disk size, ...
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-indices.html | Elasticsearch API documentation}
*/
indices(this: That, params?: T.CatIndicesRequest | TB.CatIndicesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatIndicesResponse>;
indices(this: That, params?: T.CatIndicesRequest | TB.CatIndicesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatIndicesResponse, unknown>>;
indices(this: That, params?: T.CatIndicesRequest | TB.CatIndicesRequest, options?: TransportRequestOptions): Promise<T.CatIndicesResponse>;
/**
* Returns information about the master node.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-master.html | Elasticsearch API documentation}
*/
master(this: That, params?: T.CatMasterRequest | TB.CatMasterRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMasterResponse>;
master(this: That, params?: T.CatMasterRequest | TB.CatMasterRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatMasterResponse, unknown>>;
master(this: That, params?: T.CatMasterRequest | TB.CatMasterRequest, options?: TransportRequestOptions): Promise<T.CatMasterResponse>;
/**
* Gets configuration and usage information about data frame analytics jobs.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-dfanalytics.html | Elasticsearch API documentation}
*/
mlDataFrameAnalytics(this: That, params?: T.CatMlDataFrameAnalyticsRequest | TB.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMlDataFrameAnalyticsResponse>;
mlDataFrameAnalytics(this: That, params?: T.CatMlDataFrameAnalyticsRequest | TB.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatMlDataFrameAnalyticsResponse, unknown>>;
mlDataFrameAnalytics(this: That, params?: T.CatMlDataFrameAnalyticsRequest | TB.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise<T.CatMlDataFrameAnalyticsResponse>;
/**
* Gets configuration and usage information about datafeeds.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-datafeeds.html | Elasticsearch API documentation}
*/
mlDatafeeds(this: That, params?: T.CatMlDatafeedsRequest | TB.CatMlDatafeedsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMlDatafeedsResponse>;
mlDatafeeds(this: That, params?: T.CatMlDatafeedsRequest | TB.CatMlDatafeedsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatMlDatafeedsResponse, unknown>>;
mlDatafeeds(this: That, params?: T.CatMlDatafeedsRequest | TB.CatMlDatafeedsRequest, options?: TransportRequestOptions): Promise<T.CatMlDatafeedsResponse>;
/**
* Gets configuration and usage information about anomaly detection jobs.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-anomaly-detectors.html | Elasticsearch API documentation}
*/
mlJobs(this: That, params?: T.CatMlJobsRequest | TB.CatMlJobsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMlJobsResponse>;
mlJobs(this: That, params?: T.CatMlJobsRequest | TB.CatMlJobsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatMlJobsResponse, unknown>>;
mlJobs(this: That, params?: T.CatMlJobsRequest | TB.CatMlJobsRequest, options?: TransportRequestOptions): Promise<T.CatMlJobsResponse>;
/**
* Gets configuration and usage information about inference trained models.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-trained-model.html | Elasticsearch API documentation}
*/
mlTrainedModels(this: That, params?: T.CatMlTrainedModelsRequest | TB.CatMlTrainedModelsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMlTrainedModelsResponse>;
mlTrainedModels(this: That, params?: T.CatMlTrainedModelsRequest | TB.CatMlTrainedModelsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatMlTrainedModelsResponse, unknown>>;
mlTrainedModels(this: That, params?: T.CatMlTrainedModelsRequest | TB.CatMlTrainedModelsRequest, options?: TransportRequestOptions): Promise<T.CatMlTrainedModelsResponse>;
/**
* Returns information about custom node attributes.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-nodeattrs.html | Elasticsearch API documentation}
*/
nodeattrs(this: That, params?: T.CatNodeattrsRequest | TB.CatNodeattrsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatNodeattrsResponse>;
nodeattrs(this: That, params?: T.CatNodeattrsRequest | TB.CatNodeattrsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatNodeattrsResponse, unknown>>;
nodeattrs(this: That, params?: T.CatNodeattrsRequest | TB.CatNodeattrsRequest, options?: TransportRequestOptions): Promise<T.CatNodeattrsResponse>;
/**
* Returns basic statistics about performance of cluster nodes.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-nodes.html | Elasticsearch API documentation}
*/
nodes(this: That, params?: T.CatNodesRequest | TB.CatNodesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatNodesResponse>;
nodes(this: That, params?: T.CatNodesRequest | TB.CatNodesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatNodesResponse, unknown>>;
nodes(this: That, params?: T.CatNodesRequest | TB.CatNodesRequest, options?: TransportRequestOptions): Promise<T.CatNodesResponse>;
/**
* Returns a concise representation of the cluster pending tasks.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-pending-tasks.html | Elasticsearch API documentation}
*/
pendingTasks(this: That, params?: T.CatPendingTasksRequest | TB.CatPendingTasksRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatPendingTasksResponse>;
pendingTasks(this: That, params?: T.CatPendingTasksRequest | TB.CatPendingTasksRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatPendingTasksResponse, unknown>>;
pendingTasks(this: That, params?: T.CatPendingTasksRequest | TB.CatPendingTasksRequest, options?: TransportRequestOptions): Promise<T.CatPendingTasksResponse>;
/**
* Returns information about installed plugins across nodes node.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-plugins.html | Elasticsearch API documentation}
*/
plugins(this: That, params?: T.CatPluginsRequest | TB.CatPluginsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatPluginsResponse>;
plugins(this: That, params?: T.CatPluginsRequest | TB.CatPluginsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatPluginsResponse, unknown>>;
plugins(this: That, params?: T.CatPluginsRequest | TB.CatPluginsRequest, options?: TransportRequestOptions): Promise<T.CatPluginsResponse>;
/**
* Returns information about index shard recoveries, both on-going completed.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-recovery.html | Elasticsearch API documentation}
*/
recovery(this: That, params?: T.CatRecoveryRequest | TB.CatRecoveryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatRecoveryResponse>;
recovery(this: That, params?: T.CatRecoveryRequest | TB.CatRecoveryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatRecoveryResponse, unknown>>;
recovery(this: That, params?: T.CatRecoveryRequest | TB.CatRecoveryRequest, options?: TransportRequestOptions): Promise<T.CatRecoveryResponse>;
/**
* Returns information about snapshot repositories registered in the cluster.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-repositories.html | Elasticsearch API documentation}
*/
repositories(this: That, params?: T.CatRepositoriesRequest | TB.CatRepositoriesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatRepositoriesResponse>;
repositories(this: That, params?: T.CatRepositoriesRequest | TB.CatRepositoriesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatRepositoriesResponse, unknown>>;
repositories(this: That, params?: T.CatRepositoriesRequest | TB.CatRepositoriesRequest, options?: TransportRequestOptions): Promise<T.CatRepositoriesResponse>;
/**
* Provides low-level information about the segments in the shards of an index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-segments.html | Elasticsearch API documentation}
*/
segments(this: That, params?: T.CatSegmentsRequest | TB.CatSegmentsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatSegmentsResponse>;
segments(this: That, params?: T.CatSegmentsRequest | TB.CatSegmentsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatSegmentsResponse, unknown>>;
segments(this: That, params?: T.CatSegmentsRequest | TB.CatSegmentsRequest, options?: TransportRequestOptions): Promise<T.CatSegmentsResponse>;
/**
* Provides a detailed view of shard allocation on nodes.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-shards.html | Elasticsearch API documentation}
*/
shards(this: That, params?: T.CatShardsRequest | TB.CatShardsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatShardsResponse>;
shards(this: That, params?: T.CatShardsRequest | TB.CatShardsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatShardsResponse, unknown>>;
shards(this: That, params?: T.CatShardsRequest | TB.CatShardsRequest, options?: TransportRequestOptions): Promise<T.CatShardsResponse>;
/**
* Returns all snapshots in a specific repository.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-snapshots.html | Elasticsearch API documentation}
*/
snapshots(this: That, params?: T.CatSnapshotsRequest | TB.CatSnapshotsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatSnapshotsResponse>;
snapshots(this: That, params?: T.CatSnapshotsRequest | TB.CatSnapshotsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatSnapshotsResponse, unknown>>;
snapshots(this: That, params?: T.CatSnapshotsRequest | TB.CatSnapshotsRequest, options?: TransportRequestOptions): Promise<T.CatSnapshotsResponse>;
/**
* Returns information about the tasks currently executing on one or more nodes in the cluster.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/tasks.html | Elasticsearch API documentation}
*/
tasks(this: That, params?: T.CatTasksRequest | TB.CatTasksRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatTasksResponse>;
tasks(this: That, params?: T.CatTasksRequest | TB.CatTasksRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatTasksResponse, unknown>>;
tasks(this: That, params?: T.CatTasksRequest | TB.CatTasksRequest, options?: TransportRequestOptions): Promise<T.CatTasksResponse>;
/**
* Returns information about existing templates.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-templates.html | Elasticsearch API documentation}
*/
templates(this: That, params?: T.CatTemplatesRequest | TB.CatTemplatesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatTemplatesResponse>;
templates(this: That, params?: T.CatTemplatesRequest | TB.CatTemplatesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatTemplatesResponse, unknown>>;
templates(this: That, params?: T.CatTemplatesRequest | TB.CatTemplatesRequest, options?: TransportRequestOptions): Promise<T.CatTemplatesResponse>;
/**
* Returns cluster-wide thread pool statistics per node. By default the active, queue and rejected statistics are returned for all thread pools.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-thread-pool.html | Elasticsearch API documentation}
*/
threadPool(this: That, params?: T.CatThreadPoolRequest | TB.CatThreadPoolRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatThreadPoolResponse>;
threadPool(this: That, params?: T.CatThreadPoolRequest | TB.CatThreadPoolRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatThreadPoolResponse, unknown>>;
threadPool(this: That, params?: T.CatThreadPoolRequest | TB.CatThreadPoolRequest, options?: TransportRequestOptions): Promise<T.CatThreadPoolResponse>;
/**
* Gets configuration and usage information about transforms.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cat-transforms.html | Elasticsearch API documentation}
*/
transforms(this: That, params?: T.CatTransformsRequest | TB.CatTransformsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatTransformsResponse>;
transforms(this: That, params?: T.CatTransformsRequest | TB.CatTransformsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatTransformsResponse, unknown>>;
transforms(this: That, params?: T.CatTransformsRequest | TB.CatTransformsRequest, options?: TransportRequestOptions): Promise<T.CatTransformsResponse>;
}
export {};

View file

@ -0,0 +1,637 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
class Cat {
constructor(transport) {
Object.defineProperty(this, "transport", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.transport = transport;
}
async aliases(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.name != null) {
method = 'GET';
path = `/_cat/aliases/${encodeURIComponent(params.name.toString())}`;
}
else {
method = 'GET';
path = '/_cat/aliases';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async allocation(params, options) {
const acceptedPath = ['node_id'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.node_id != null) {
method = 'GET';
path = `/_cat/allocation/${encodeURIComponent(params.node_id.toString())}`;
}
else {
method = 'GET';
path = '/_cat/allocation';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async componentTemplates(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.name != null) {
method = 'GET';
path = `/_cat/component_templates/${encodeURIComponent(params.name.toString())}`;
}
else {
method = 'GET';
path = '/_cat/component_templates';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async count(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.index != null) {
method = 'GET';
path = `/_cat/count/${encodeURIComponent(params.index.toString())}`;
}
else {
method = 'GET';
path = '/_cat/count';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async fielddata(params, options) {
const acceptedPath = ['fields'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.fields != null) {
method = 'GET';
path = `/_cat/fielddata/${encodeURIComponent(params.fields.toString())}`;
}
else {
method = 'GET';
path = '/_cat/fielddata';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async health(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_cat/health';
return await this.transport.request({ path, method, querystring, body }, options);
}
async help(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_cat';
return await this.transport.request({ path, method, querystring, body }, options);
}
async indices(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.index != null) {
method = 'GET';
path = `/_cat/indices/${encodeURIComponent(params.index.toString())}`;
}
else {
method = 'GET';
path = '/_cat/indices';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async master(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_cat/master';
return await this.transport.request({ path, method, querystring, body }, options);
}
async mlDataFrameAnalytics(params, options) {
const acceptedPath = ['id'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.id != null) {
method = 'GET';
path = `/_cat/ml/data_frame/analytics/${encodeURIComponent(params.id.toString())}`;
}
else {
method = 'GET';
path = '/_cat/ml/data_frame/analytics';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async mlDatafeeds(params, options) {
const acceptedPath = ['datafeed_id'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.datafeed_id != null) {
method = 'GET';
path = `/_cat/ml/datafeeds/${encodeURIComponent(params.datafeed_id.toString())}`;
}
else {
method = 'GET';
path = '/_cat/ml/datafeeds';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async mlJobs(params, options) {
const acceptedPath = ['job_id'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.job_id != null) {
method = 'GET';
path = `/_cat/ml/anomaly_detectors/${encodeURIComponent(params.job_id.toString())}`;
}
else {
method = 'GET';
path = '/_cat/ml/anomaly_detectors';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async mlTrainedModels(params, options) {
const acceptedPath = ['model_id'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.model_id != null) {
method = 'GET';
path = `/_cat/ml/trained_models/${encodeURIComponent(params.model_id.toString())}`;
}
else {
method = 'GET';
path = '/_cat/ml/trained_models';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async nodeattrs(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_cat/nodeattrs';
return await this.transport.request({ path, method, querystring, body }, options);
}
async nodes(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_cat/nodes';
return await this.transport.request({ path, method, querystring, body }, options);
}
async pendingTasks(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_cat/pending_tasks';
return await this.transport.request({ path, method, querystring, body }, options);
}
async plugins(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_cat/plugins';
return await this.transport.request({ path, method, querystring, body }, options);
}
async recovery(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.index != null) {
method = 'GET';
path = `/_cat/recovery/${encodeURIComponent(params.index.toString())}`;
}
else {
method = 'GET';
path = '/_cat/recovery';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async repositories(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_cat/repositories';
return await this.transport.request({ path, method, querystring, body }, options);
}
async segments(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.index != null) {
method = 'GET';
path = `/_cat/segments/${encodeURIComponent(params.index.toString())}`;
}
else {
method = 'GET';
path = '/_cat/segments';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async shards(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.index != null) {
method = 'GET';
path = `/_cat/shards/${encodeURIComponent(params.index.toString())}`;
}
else {
method = 'GET';
path = '/_cat/shards';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async snapshots(params, options) {
const acceptedPath = ['repository'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.repository != null) {
method = 'GET';
path = `/_cat/snapshots/${encodeURIComponent(params.repository.toString())}`;
}
else {
method = 'GET';
path = '/_cat/snapshots';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async tasks(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_cat/tasks';
return await this.transport.request({ path, method, querystring, body }, options);
}
async templates(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.name != null) {
method = 'GET';
path = `/_cat/templates/${encodeURIComponent(params.name.toString())}`;
}
else {
method = 'GET';
path = '/_cat/templates';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async threadPool(params, options) {
const acceptedPath = ['thread_pool_patterns'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.thread_pool_patterns != null) {
method = 'GET';
path = `/_cat/thread_pool/${encodeURIComponent(params.thread_pool_patterns.toString())}`;
}
else {
method = 'GET';
path = '/_cat/thread_pool';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async transforms(params, options) {
const acceptedPath = ['transform_id'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.transform_id != null) {
method = 'GET';
path = `/_cat/transforms/${encodeURIComponent(params.transform_id.toString())}`;
}
else {
method = 'GET';
path = '/_cat/transforms';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
}
exports.default = Cat;
//# sourceMappingURL=cat.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,102 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class Ccr {
transport: Transport;
constructor(transport: Transport);
/**
* Deletes auto-follow patterns.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-delete-auto-follow-pattern.html | Elasticsearch API documentation}
*/
deleteAutoFollowPattern(this: That, params: T.CcrDeleteAutoFollowPatternRequest | TB.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrDeleteAutoFollowPatternResponse>;
deleteAutoFollowPattern(this: That, params: T.CcrDeleteAutoFollowPatternRequest | TB.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrDeleteAutoFollowPatternResponse, unknown>>;
deleteAutoFollowPattern(this: That, params: T.CcrDeleteAutoFollowPatternRequest | TB.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<T.CcrDeleteAutoFollowPatternResponse>;
/**
* Creates a new follower index configured to follow the referenced leader index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-put-follow.html | Elasticsearch API documentation}
*/
follow(this: That, params: T.CcrFollowRequest | TB.CcrFollowRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrFollowResponse>;
follow(this: That, params: T.CcrFollowRequest | TB.CcrFollowRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrFollowResponse, unknown>>;
follow(this: That, params: T.CcrFollowRequest | TB.CcrFollowRequest, options?: TransportRequestOptions): Promise<T.CcrFollowResponse>;
/**
* Retrieves information about all follower indices, including parameters and status for each follower index
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-get-follow-info.html | Elasticsearch API documentation}
*/
followInfo(this: That, params: T.CcrFollowInfoRequest | TB.CcrFollowInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrFollowInfoResponse>;
followInfo(this: That, params: T.CcrFollowInfoRequest | TB.CcrFollowInfoRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrFollowInfoResponse, unknown>>;
followInfo(this: That, params: T.CcrFollowInfoRequest | TB.CcrFollowInfoRequest, options?: TransportRequestOptions): Promise<T.CcrFollowInfoResponse>;
/**
* Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-get-follow-stats.html | Elasticsearch API documentation}
*/
followStats(this: That, params: T.CcrFollowStatsRequest | TB.CcrFollowStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrFollowStatsResponse>;
followStats(this: That, params: T.CcrFollowStatsRequest | TB.CcrFollowStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrFollowStatsResponse, unknown>>;
followStats(this: That, params: T.CcrFollowStatsRequest | TB.CcrFollowStatsRequest, options?: TransportRequestOptions): Promise<T.CcrFollowStatsResponse>;
/**
* Removes the follower retention leases from the leader.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-post-forget-follower.html | Elasticsearch API documentation}
*/
forgetFollower(this: That, params: T.CcrForgetFollowerRequest | TB.CcrForgetFollowerRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrForgetFollowerResponse>;
forgetFollower(this: That, params: T.CcrForgetFollowerRequest | TB.CcrForgetFollowerRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrForgetFollowerResponse, unknown>>;
forgetFollower(this: That, params: T.CcrForgetFollowerRequest | TB.CcrForgetFollowerRequest, options?: TransportRequestOptions): Promise<T.CcrForgetFollowerResponse>;
/**
* Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-get-auto-follow-pattern.html | Elasticsearch API documentation}
*/
getAutoFollowPattern(this: That, params?: T.CcrGetAutoFollowPatternRequest | TB.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrGetAutoFollowPatternResponse>;
getAutoFollowPattern(this: That, params?: T.CcrGetAutoFollowPatternRequest | TB.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrGetAutoFollowPatternResponse, unknown>>;
getAutoFollowPattern(this: That, params?: T.CcrGetAutoFollowPatternRequest | TB.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<T.CcrGetAutoFollowPatternResponse>;
/**
* Pauses an auto-follow pattern
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-pause-auto-follow-pattern.html | Elasticsearch API documentation}
*/
pauseAutoFollowPattern(this: That, params: T.CcrPauseAutoFollowPatternRequest | TB.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrPauseAutoFollowPatternResponse>;
pauseAutoFollowPattern(this: That, params: T.CcrPauseAutoFollowPatternRequest | TB.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrPauseAutoFollowPatternResponse, unknown>>;
pauseAutoFollowPattern(this: That, params: T.CcrPauseAutoFollowPatternRequest | TB.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<T.CcrPauseAutoFollowPatternResponse>;
/**
* Pauses a follower index. The follower index will not fetch any additional operations from the leader index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-post-pause-follow.html | Elasticsearch API documentation}
*/
pauseFollow(this: That, params: T.CcrPauseFollowRequest | TB.CcrPauseFollowRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrPauseFollowResponse>;
pauseFollow(this: That, params: T.CcrPauseFollowRequest | TB.CcrPauseFollowRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrPauseFollowResponse, unknown>>;
pauseFollow(this: That, params: T.CcrPauseFollowRequest | TB.CcrPauseFollowRequest, options?: TransportRequestOptions): Promise<T.CcrPauseFollowResponse>;
/**
* Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-put-auto-follow-pattern.html | Elasticsearch API documentation}
*/
putAutoFollowPattern(this: That, params: T.CcrPutAutoFollowPatternRequest | TB.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrPutAutoFollowPatternResponse>;
putAutoFollowPattern(this: That, params: T.CcrPutAutoFollowPatternRequest | TB.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrPutAutoFollowPatternResponse, unknown>>;
putAutoFollowPattern(this: That, params: T.CcrPutAutoFollowPatternRequest | TB.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<T.CcrPutAutoFollowPatternResponse>;
/**
* Resumes an auto-follow pattern that has been paused
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-resume-auto-follow-pattern.html | Elasticsearch API documentation}
*/
resumeAutoFollowPattern(this: That, params: T.CcrResumeAutoFollowPatternRequest | TB.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrResumeAutoFollowPatternResponse>;
resumeAutoFollowPattern(this: That, params: T.CcrResumeAutoFollowPatternRequest | TB.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrResumeAutoFollowPatternResponse, unknown>>;
resumeAutoFollowPattern(this: That, params: T.CcrResumeAutoFollowPatternRequest | TB.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<T.CcrResumeAutoFollowPatternResponse>;
/**
* Resumes a follower index that has been paused
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-post-resume-follow.html | Elasticsearch API documentation}
*/
resumeFollow(this: That, params: T.CcrResumeFollowRequest | TB.CcrResumeFollowRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrResumeFollowResponse>;
resumeFollow(this: That, params: T.CcrResumeFollowRequest | TB.CcrResumeFollowRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrResumeFollowResponse, unknown>>;
resumeFollow(this: That, params: T.CcrResumeFollowRequest | TB.CcrResumeFollowRequest, options?: TransportRequestOptions): Promise<T.CcrResumeFollowResponse>;
/**
* Gets all stats related to cross-cluster replication.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-get-stats.html | Elasticsearch API documentation}
*/
stats(this: That, params?: T.CcrStatsRequest | TB.CcrStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrStatsResponse>;
stats(this: That, params?: T.CcrStatsRequest | TB.CcrStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrStatsResponse, unknown>>;
stats(this: That, params?: T.CcrStatsRequest | TB.CcrStatsRequest, options?: TransportRequestOptions): Promise<T.CcrStatsResponse>;
/**
* Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ccr-post-unfollow.html | Elasticsearch API documentation}
*/
unfollow(this: That, params: T.CcrUnfollowRequest | TB.CcrUnfollowRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrUnfollowResponse>;
unfollow(this: That, params: T.CcrUnfollowRequest | TB.CcrUnfollowRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrUnfollowResponse, unknown>>;
unfollow(this: That, params: T.CcrUnfollowRequest | TB.CcrUnfollowRequest, options?: TransportRequestOptions): Promise<T.CcrUnfollowResponse>;
}
export {};

View file

@ -0,0 +1,320 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
class Ccr {
constructor(transport) {
Object.defineProperty(this, "transport", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.transport = transport;
}
async deleteAutoFollowPattern(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = `/_ccr/auto_follow/${encodeURIComponent(params.name.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async follow(params, options) {
const acceptedPath = ['index'];
const acceptedBody = ['leader_index', 'max_outstanding_read_requests', 'max_outstanding_write_requests', 'max_read_request_operation_count', 'max_read_request_size', 'max_retry_delay', 'max_write_buffer_count', 'max_write_buffer_size', 'max_write_request_operation_count', 'max_write_request_size', 'read_poll_timeout', 'remote_cluster'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'PUT';
const path = `/${encodeURIComponent(params.index.toString())}/_ccr/follow`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async followInfo(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/${encodeURIComponent(params.index.toString())}/_ccr/info`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async followStats(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/${encodeURIComponent(params.index.toString())}/_ccr/stats`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async forgetFollower(params, options) {
const acceptedPath = ['index'];
const acceptedBody = ['follower_cluster', 'follower_index', 'follower_index_uuid', 'leader_remote_cluster'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = `/${encodeURIComponent(params.index.toString())}/_ccr/forget_follower`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async getAutoFollowPattern(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.name != null) {
method = 'GET';
path = `/_ccr/auto_follow/${encodeURIComponent(params.name.toString())}`;
}
else {
method = 'GET';
path = '/_ccr/auto_follow';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async pauseAutoFollowPattern(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = `/_ccr/auto_follow/${encodeURIComponent(params.name.toString())}/pause`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async pauseFollow(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = `/${encodeURIComponent(params.index.toString())}/_ccr/pause_follow`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async putAutoFollowPattern(params, options) {
const acceptedPath = ['name'];
const acceptedBody = ['remote_cluster', 'follow_index_pattern', 'leader_index_patterns', 'leader_index_exclusion_patterns', 'max_outstanding_read_requests', 'settings', 'max_outstanding_write_requests', 'read_poll_timeout', 'max_read_request_operation_count', 'max_read_request_size', 'max_retry_delay', 'max_write_buffer_count', 'max_write_buffer_size', 'max_write_request_operation_count', 'max_write_request_size'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'PUT';
const path = `/_ccr/auto_follow/${encodeURIComponent(params.name.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async resumeAutoFollowPattern(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = `/_ccr/auto_follow/${encodeURIComponent(params.name.toString())}/resume`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async resumeFollow(params, options) {
const acceptedPath = ['index'];
const acceptedBody = ['max_outstanding_read_requests', 'max_outstanding_write_requests', 'max_read_request_operation_count', 'max_read_request_size', 'max_retry_delay', 'max_write_buffer_count', 'max_write_buffer_size', 'max_write_request_operation_count', 'max_write_request_size', 'read_poll_timeout'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = `/${encodeURIComponent(params.index.toString())}/_ccr/resume_follow`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async stats(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_ccr/stats';
return await this.transport.request({ path, method, querystring, body }, options);
}
async unfollow(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = `/${encodeURIComponent(params.index.toString())}/_ccr/unfollow`;
return await this.transport.request({ path, method, querystring, body }, options);
}
}
exports.default = Ccr;
//# sourceMappingURL=ccr.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Explicitly clears the search context for a scroll.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/clear-scroll-api.html | Elasticsearch API documentation}
*/
export default function ClearScrollApi(this: That, params?: T.ClearScrollRequest | TB.ClearScrollRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClearScrollResponse>;
export default function ClearScrollApi(this: That, params?: T.ClearScrollRequest | TB.ClearScrollRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClearScrollResponse, unknown>>;
export default function ClearScrollApi(this: That, params?: T.ClearScrollRequest | TB.ClearScrollRequest, options?: TransportRequestOptions): Promise<T.ClearScrollResponse>;
export {};

View file

@ -0,0 +1,54 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function ClearScrollApi(params, options) {
const acceptedPath = [];
const acceptedBody = ['scroll_id'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = '/_search/scroll';
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = ClearScrollApi;
//# sourceMappingURL=clear_scroll.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"clear_scroll.js","sourceRoot":"","sources":["../../../src/api/api/clear_scroll.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,cAAc,CAAc,MAAqD,EAAE,OAAiC;IAChJ,MAAM,YAAY,GAAa,EAAE,CAAA;IACjC,MAAM,YAAY,GAAa,CAAC,WAAW,CAAC,CAAA;IAC5C,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,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAA;IACrB,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,QAAQ,CAAA;IACvB,MAAM,IAAI,GAAG,iBAAiB,CAAA;IAC9B,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AA9BD,iCA8BC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Close a point in time
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/point-in-time-api.html | Elasticsearch API documentation}
*/
export default function ClosePointInTimeApi(this: That, params: T.ClosePointInTimeRequest | TB.ClosePointInTimeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClosePointInTimeResponse>;
export default function ClosePointInTimeApi(this: That, params: T.ClosePointInTimeRequest | TB.ClosePointInTimeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClosePointInTimeResponse, unknown>>;
export default function ClosePointInTimeApi(this: That, params: T.ClosePointInTimeRequest | TB.ClosePointInTimeRequest, options?: TransportRequestOptions): Promise<T.ClosePointInTimeResponse>;
export {};

View file

@ -0,0 +1,53 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function ClosePointInTimeApi(params, options) {
const acceptedPath = [];
const acceptedBody = ['id'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = '/_pit';
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = ClosePointInTimeApi;
//# sourceMappingURL=close_point_in_time.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"close_point_in_time.js","sourceRoot":"","sources":["../../../src/api/api/close_point_in_time.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,mBAAmB,CAAc,MAA8D,EAAE,OAAiC;IAC9J,MAAM,YAAY,GAAa,EAAE,CAAA;IACjC,MAAM,YAAY,GAAa,CAAC,IAAI,CAAC,CAAA;IACrC,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,QAAQ,CAAA;IACvB,MAAM,IAAI,GAAG,OAAO,CAAA;IACpB,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AA7BD,sCA6BC"}

View file

@ -0,0 +1,123 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class Cluster {
transport: Transport;
constructor(transport: Transport);
/**
* Provides explanations for shard allocations in the cluster.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cluster-allocation-explain.html | Elasticsearch API documentation}
*/
allocationExplain(this: That, params?: T.ClusterAllocationExplainRequest | TB.ClusterAllocationExplainRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterAllocationExplainResponse>;
allocationExplain(this: That, params?: T.ClusterAllocationExplainRequest | TB.ClusterAllocationExplainRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterAllocationExplainResponse, unknown>>;
allocationExplain(this: That, params?: T.ClusterAllocationExplainRequest | TB.ClusterAllocationExplainRequest, options?: TransportRequestOptions): Promise<T.ClusterAllocationExplainResponse>;
/**
* Deletes a component template
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-component-template.html | Elasticsearch API documentation}
*/
deleteComponentTemplate(this: That, params: T.ClusterDeleteComponentTemplateRequest | TB.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterDeleteComponentTemplateResponse>;
deleteComponentTemplate(this: That, params: T.ClusterDeleteComponentTemplateRequest | TB.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterDeleteComponentTemplateResponse, unknown>>;
deleteComponentTemplate(this: That, params: T.ClusterDeleteComponentTemplateRequest | TB.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptions): Promise<T.ClusterDeleteComponentTemplateResponse>;
/**
* Clears cluster voting config exclusions.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/voting-config-exclusions.html | Elasticsearch API documentation}
*/
deleteVotingConfigExclusions(this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest | TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterDeleteVotingConfigExclusionsResponse>;
deleteVotingConfigExclusions(this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest | TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterDeleteVotingConfigExclusionsResponse, unknown>>;
deleteVotingConfigExclusions(this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest | TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptions): Promise<T.ClusterDeleteVotingConfigExclusionsResponse>;
/**
* Returns information about whether a particular component template exist
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-component-template.html | Elasticsearch API documentation}
*/
existsComponentTemplate(this: That, params: T.ClusterExistsComponentTemplateRequest | TB.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterExistsComponentTemplateResponse>;
existsComponentTemplate(this: That, params: T.ClusterExistsComponentTemplateRequest | TB.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterExistsComponentTemplateResponse, unknown>>;
existsComponentTemplate(this: That, params: T.ClusterExistsComponentTemplateRequest | TB.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptions): Promise<T.ClusterExistsComponentTemplateResponse>;
/**
* Returns one or more component templates
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-component-template.html | Elasticsearch API documentation}
*/
getComponentTemplate(this: That, params?: T.ClusterGetComponentTemplateRequest | TB.ClusterGetComponentTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterGetComponentTemplateResponse>;
getComponentTemplate(this: That, params?: T.ClusterGetComponentTemplateRequest | TB.ClusterGetComponentTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterGetComponentTemplateResponse, unknown>>;
getComponentTemplate(this: That, params?: T.ClusterGetComponentTemplateRequest | TB.ClusterGetComponentTemplateRequest, options?: TransportRequestOptions): Promise<T.ClusterGetComponentTemplateResponse>;
/**
* Returns cluster settings.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cluster-get-settings.html | Elasticsearch API documentation}
*/
getSettings(this: That, params?: T.ClusterGetSettingsRequest | TB.ClusterGetSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterGetSettingsResponse>;
getSettings(this: That, params?: T.ClusterGetSettingsRequest | TB.ClusterGetSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterGetSettingsResponse, unknown>>;
getSettings(this: That, params?: T.ClusterGetSettingsRequest | TB.ClusterGetSettingsRequest, options?: TransportRequestOptions): Promise<T.ClusterGetSettingsResponse>;
/**
* Returns basic information about the health of the cluster.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cluster-health.html | Elasticsearch API documentation}
*/
health(this: That, params?: T.ClusterHealthRequest | TB.ClusterHealthRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterHealthResponse>;
health(this: That, params?: T.ClusterHealthRequest | TB.ClusterHealthRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterHealthResponse, unknown>>;
health(this: That, params?: T.ClusterHealthRequest | TB.ClusterHealthRequest, options?: TransportRequestOptions): Promise<T.ClusterHealthResponse>;
/**
* Returns different information about the cluster.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cluster-info.html | Elasticsearch API documentation}
*/
info(this: That, params: T.ClusterInfoRequest | TB.ClusterInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterInfoResponse>;
info(this: That, params: T.ClusterInfoRequest | TB.ClusterInfoRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterInfoResponse, unknown>>;
info(this: That, params: T.ClusterInfoRequest | TB.ClusterInfoRequest, options?: TransportRequestOptions): Promise<T.ClusterInfoResponse>;
/**
* Returns a list of any cluster-level changes (e.g. create index, update mapping, allocate or fail shard) which have not yet been executed.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cluster-pending.html | Elasticsearch API documentation}
*/
pendingTasks(this: That, params?: T.ClusterPendingTasksRequest | TB.ClusterPendingTasksRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterPendingTasksResponse>;
pendingTasks(this: That, params?: T.ClusterPendingTasksRequest | TB.ClusterPendingTasksRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterPendingTasksResponse, unknown>>;
pendingTasks(this: That, params?: T.ClusterPendingTasksRequest | TB.ClusterPendingTasksRequest, options?: TransportRequestOptions): Promise<T.ClusterPendingTasksResponse>;
/**
* Updates the cluster voting config exclusions by node ids or node names.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/voting-config-exclusions.html | Elasticsearch API documentation}
*/
postVotingConfigExclusions(this: That, params?: T.ClusterPostVotingConfigExclusionsRequest | TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterPostVotingConfigExclusionsResponse>;
postVotingConfigExclusions(this: That, params?: T.ClusterPostVotingConfigExclusionsRequest | TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterPostVotingConfigExclusionsResponse, unknown>>;
postVotingConfigExclusions(this: That, params?: T.ClusterPostVotingConfigExclusionsRequest | TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptions): Promise<T.ClusterPostVotingConfigExclusionsResponse>;
/**
* Creates or updates a component template
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-component-template.html | Elasticsearch API documentation}
*/
putComponentTemplate(this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterPutComponentTemplateResponse>;
putComponentTemplate(this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterPutComponentTemplateResponse, unknown>>;
putComponentTemplate(this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): Promise<T.ClusterPutComponentTemplateResponse>;
/**
* Updates the cluster settings.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cluster-update-settings.html | Elasticsearch API documentation}
*/
putSettings(this: That, params?: T.ClusterPutSettingsRequest | TB.ClusterPutSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterPutSettingsResponse>;
putSettings(this: That, params?: T.ClusterPutSettingsRequest | TB.ClusterPutSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterPutSettingsResponse, unknown>>;
putSettings(this: That, params?: T.ClusterPutSettingsRequest | TB.ClusterPutSettingsRequest, options?: TransportRequestOptions): Promise<T.ClusterPutSettingsResponse>;
/**
* Returns the information about configured remote clusters.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cluster-remote-info.html | Elasticsearch API documentation}
*/
remoteInfo(this: That, params?: T.ClusterRemoteInfoRequest | TB.ClusterRemoteInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterRemoteInfoResponse>;
remoteInfo(this: That, params?: T.ClusterRemoteInfoRequest | TB.ClusterRemoteInfoRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterRemoteInfoResponse, unknown>>;
remoteInfo(this: That, params?: T.ClusterRemoteInfoRequest | TB.ClusterRemoteInfoRequest, options?: TransportRequestOptions): Promise<T.ClusterRemoteInfoResponse>;
/**
* Allows to manually change the allocation of individual shards in the cluster.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cluster-reroute.html | Elasticsearch API documentation}
*/
reroute(this: That, params?: T.ClusterRerouteRequest | TB.ClusterRerouteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterRerouteResponse>;
reroute(this: That, params?: T.ClusterRerouteRequest | TB.ClusterRerouteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterRerouteResponse, unknown>>;
reroute(this: That, params?: T.ClusterRerouteRequest | TB.ClusterRerouteRequest, options?: TransportRequestOptions): Promise<T.ClusterRerouteResponse>;
/**
* Returns a comprehensive information about the state of the cluster.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cluster-state.html | Elasticsearch API documentation}
*/
state(this: That, params?: T.ClusterStateRequest | TB.ClusterStateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterStateResponse>;
state(this: That, params?: T.ClusterStateRequest | TB.ClusterStateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterStateResponse, unknown>>;
state(this: That, params?: T.ClusterStateRequest | TB.ClusterStateRequest, options?: TransportRequestOptions): Promise<T.ClusterStateResponse>;
/**
* Returns high-level overview of cluster statistics.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/cluster-stats.html | Elasticsearch API documentation}
*/
stats(this: That, params?: T.ClusterStatsRequest | TB.ClusterStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterStatsResponse>;
stats(this: That, params?: T.ClusterStatsRequest | TB.ClusterStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterStatsResponse, unknown>>;
stats(this: That, params?: T.ClusterStatsRequest | TB.ClusterStatsRequest, options?: TransportRequestOptions): Promise<T.ClusterStatsResponse>;
}
export {};

View file

@ -0,0 +1,409 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
class Cluster {
constructor(transport) {
Object.defineProperty(this, "transport", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.transport = transport;
}
async allocationExplain(params, options) {
const acceptedPath = [];
const acceptedBody = ['current_node', 'index', 'primary', 'shard'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = body != null ? 'POST' : 'GET';
const path = '/_cluster/allocation/explain';
return await this.transport.request({ path, method, querystring, body }, options);
}
async deleteComponentTemplate(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = `/_component_template/${encodeURIComponent(params.name.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async deleteVotingConfigExclusions(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = '/_cluster/voting_config_exclusions';
return await this.transport.request({ path, method, querystring, body }, options);
}
async existsComponentTemplate(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'HEAD';
const path = `/_component_template/${encodeURIComponent(params.name.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async getComponentTemplate(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.name != null) {
method = 'GET';
path = `/_component_template/${encodeURIComponent(params.name.toString())}`;
}
else {
method = 'GET';
path = '/_component_template';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async getSettings(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_cluster/settings';
return await this.transport.request({ path, method, querystring, body }, options);
}
async health(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.index != null) {
method = 'GET';
path = `/_cluster/health/${encodeURIComponent(params.index.toString())}`;
}
else {
method = 'GET';
path = '/_cluster/health';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async info(params, options) {
const acceptedPath = ['target'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/_info/${encodeURIComponent(params.target.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async pendingTasks(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_cluster/pending_tasks';
return await this.transport.request({ path, method, querystring, body }, options);
}
async postVotingConfigExclusions(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = '/_cluster/voting_config_exclusions';
return await this.transport.request({ path, method, querystring, body }, options);
}
async putComponentTemplate(params, options) {
const acceptedPath = ['name'];
const acceptedBody = ['template', 'version', '_meta', 'allow_auto_create'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'PUT';
const path = `/_component_template/${encodeURIComponent(params.name.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async putSettings(params, options) {
const acceptedPath = [];
const acceptedBody = ['persistent', 'transient'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'PUT';
const path = '/_cluster/settings';
return await this.transport.request({ path, method, querystring, body }, options);
}
async remoteInfo(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_remote/info';
return await this.transport.request({ path, method, querystring, body }, options);
}
async reroute(params, options) {
const acceptedPath = [];
const acceptedBody = ['commands'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = '/_cluster/reroute';
return await this.transport.request({ path, method, querystring, body }, options);
}
async state(params, options) {
const acceptedPath = ['metric', 'index'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.metric != null && params.index != null) {
method = 'GET';
path = `/_cluster/state/${encodeURIComponent(params.metric.toString())}/${encodeURIComponent(params.index.toString())}`;
}
else if (params.metric != null) {
method = 'GET';
path = `/_cluster/state/${encodeURIComponent(params.metric.toString())}`;
}
else {
method = 'GET';
path = '/_cluster/state';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async stats(params, options) {
const acceptedPath = ['node_id'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.node_id != null) {
method = 'GET';
path = `/_cluster/stats/nodes/${encodeURIComponent(params.node_id.toString())}`;
}
else {
method = 'GET';
path = '/_cluster/stats';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
}
exports.default = Cluster;
//# sourceMappingURL=cluster.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Returns number of documents matching a query.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/search-count.html | Elasticsearch API documentation}
*/
export default function CountApi(this: That, params?: T.CountRequest | TB.CountRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CountResponse>;
export default function CountApi(this: That, params?: T.CountRequest | TB.CountRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CountResponse, unknown>>;
export default function CountApi(this: That, params?: T.CountRequest | TB.CountRequest, options?: TransportRequestOptions): Promise<T.CountResponse>;
export {};

View file

@ -0,0 +1,62 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function CountApi(params, options) {
const acceptedPath = ['index'];
const acceptedBody = ['query'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.index != null) {
method = body != null ? 'POST' : 'GET';
path = `/${encodeURIComponent(params.index.toString())}/_count`;
}
else {
method = body != null ? 'POST' : 'GET';
path = '/_count';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = CountApi;
//# sourceMappingURL=count.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"count.js","sourceRoot":"","sources":["../../../src/api/api/count.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,QAAQ,CAAc,MAAyC,EAAE,OAAiC;IAC9H,MAAM,YAAY,GAAa,CAAC,OAAO,CAAC,CAAA;IACxC,MAAM,YAAY,GAAa,CAAC,OAAO,CAAC,CAAA;IACxC,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,mBAAmB;IACnB,MAAM,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,SAAS,CAAA;KACjB;IACD,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AArCD,2BAqCC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Creates a new document in the index. Returns a 409 response when a document with a same ID already exists in the index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/docs-index_.html | Elasticsearch API documentation}
*/
export default function CreateApi<TDocument = unknown>(this: That, params: T.CreateRequest<TDocument> | TB.CreateRequest<TDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.CreateResponse>;
export default function CreateApi<TDocument = unknown>(this: That, params: T.CreateRequest<TDocument> | TB.CreateRequest<TDocument>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CreateResponse, unknown>>;
export default function CreateApi<TDocument = unknown>(this: That, params: T.CreateRequest<TDocument> | TB.CreateRequest<TDocument>, options?: TransportRequestOptions): Promise<T.CreateResponse>;
export {};

View file

@ -0,0 +1,46 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function CreateApi(params, options) {
var _a;
const acceptedPath = ['id', 'index'];
const acceptedBody = ['document'];
const querystring = {};
// @ts-expect-error
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
for (const key in params) {
if (acceptedBody.includes(key)) {
// @ts-expect-error
body = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'PUT';
const path = `/${encodeURIComponent(params.index.toString())}/_create/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = CreateApi;
//# sourceMappingURL=create.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/api/api/create.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,SAAS,CAAmC,MAAgE,EAAE,OAAiC;;IAC3K,MAAM,YAAY,GAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,YAAY,GAAa,CAAC,UAAU,CAAC,CAAA;IAC3C,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,mBAAmB;IACnB,IAAI,IAAI,GAAQ,MAAA,MAAM,CAAC,IAAI,mCAAI,SAAS,CAAA;IAExC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,mBAAmB;YACnB,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SACnB;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,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,YAAY,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IAClH,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAtBD,4BAsBC"}

View file

@ -0,0 +1,32 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class DanglingIndices {
transport: Transport;
constructor(transport: Transport);
/**
* Deletes the specified dangling index
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/modules-gateway-dangling-indices.html | Elasticsearch API documentation}
*/
deleteDanglingIndex(this: That, params: T.DanglingIndicesDeleteDanglingIndexRequest | TB.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DanglingIndicesDeleteDanglingIndexResponse>;
deleteDanglingIndex(this: That, params: T.DanglingIndicesDeleteDanglingIndexRequest | TB.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DanglingIndicesDeleteDanglingIndexResponse, unknown>>;
deleteDanglingIndex(this: That, params: T.DanglingIndicesDeleteDanglingIndexRequest | TB.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptions): Promise<T.DanglingIndicesDeleteDanglingIndexResponse>;
/**
* Imports the specified dangling index
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/modules-gateway-dangling-indices.html | Elasticsearch API documentation}
*/
importDanglingIndex(this: That, params: T.DanglingIndicesImportDanglingIndexRequest | TB.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DanglingIndicesImportDanglingIndexResponse>;
importDanglingIndex(this: That, params: T.DanglingIndicesImportDanglingIndexRequest | TB.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DanglingIndicesImportDanglingIndexResponse, unknown>>;
importDanglingIndex(this: That, params: T.DanglingIndicesImportDanglingIndexRequest | TB.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptions): Promise<T.DanglingIndicesImportDanglingIndexResponse>;
/**
* Returns all dangling indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/modules-gateway-dangling-indices.html | Elasticsearch API documentation}
*/
listDanglingIndices(this: That, params?: T.DanglingIndicesListDanglingIndicesRequest | TB.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DanglingIndicesListDanglingIndicesResponse>;
listDanglingIndices(this: That, params?: T.DanglingIndicesListDanglingIndicesRequest | TB.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DanglingIndicesListDanglingIndicesResponse, unknown>>;
listDanglingIndices(this: That, params?: T.DanglingIndicesListDanglingIndicesRequest | TB.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptions): Promise<T.DanglingIndicesListDanglingIndicesResponse>;
}
export {};

View file

@ -0,0 +1,85 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
class DanglingIndices {
constructor(transport) {
Object.defineProperty(this, "transport", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.transport = transport;
}
async deleteDanglingIndex(params, options) {
const acceptedPath = ['index_uuid'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = `/_dangling/${encodeURIComponent(params.index_uuid.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async importDanglingIndex(params, options) {
const acceptedPath = ['index_uuid'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = `/_dangling/${encodeURIComponent(params.index_uuid.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async listDanglingIndices(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_dangling';
return await this.transport.request({ path, method, querystring, body }, options);
}
}
exports.default = DanglingIndices;
//# sourceMappingURL=dangling_indices.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"dangling_indices.js","sourceRoot":"","sources":["../../../src/api/api/dangling_indices.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAsBH,MAAqB,eAAe;IAElC,YAAa,SAAoB;QADjC;;;;;WAAoB;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IASD,KAAK,CAAC,mBAAmB,CAAc,MAAkG,EAAE,OAAiC;QAC1K,MAAM,YAAY,GAAa,CAAC,YAAY,CAAC,CAAA;QAC7C,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;QAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,C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AAY,GAAa,EAAE,CAAA;QACjC,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;QAEtB,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAA;QACrB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,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,KAAK,CAAA;QACpB,MAAM,IAAI,GAAG,YAAY,CAAA;QACzB,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;CACF;AApFD,kCAoFC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Removes a document from the index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/docs-delete.html | Elasticsearch API documentation}
*/
export default function DeleteApi(this: That, params: T.DeleteRequest | TB.DeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DeleteResponse>;
export default function DeleteApi(this: That, params: T.DeleteRequest | TB.DeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DeleteResponse, unknown>>;
export default function DeleteApi(this: That, params: T.DeleteRequest | TB.DeleteRequest, options?: TransportRequestOptions): Promise<T.DeleteResponse>;
export {};

View file

@ -0,0 +1,39 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function DeleteApi(params, options) {
const acceptedPath = ['id', 'index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = `/${encodeURIComponent(params.index.toString())}/_doc/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = DeleteApi;
//# sourceMappingURL=delete.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/api/api/delete.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,SAAS,CAAc,MAA0C,EAAE,OAAiC;IAChI,MAAM,YAAY,GAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,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,QAAQ,CAAA;IACvB,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,SAAS,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IAC/G,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAjBD,4BAiBC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Deletes documents matching the provided query.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/docs-delete-by-query.html | Elasticsearch API documentation}
*/
export default function DeleteByQueryApi(this: That, params: T.DeleteByQueryRequest | TB.DeleteByQueryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DeleteByQueryResponse>;
export default function DeleteByQueryApi(this: That, params: T.DeleteByQueryRequest | TB.DeleteByQueryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DeleteByQueryResponse, unknown>>;
export default function DeleteByQueryApi(this: That, params: T.DeleteByQueryRequest | TB.DeleteByQueryRequest, options?: TransportRequestOptions): Promise<T.DeleteByQueryResponse>;
export {};

View file

@ -0,0 +1,53 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function DeleteByQueryApi(params, options) {
const acceptedPath = ['index'];
const acceptedBody = ['max_docs', 'query', 'slice'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = `/${encodeURIComponent(params.index.toString())}/_delete_by_query`;
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = DeleteByQueryApi;
//# sourceMappingURL=delete_by_query.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"delete_by_query.js","sourceRoot":"","sources":["../../../src/api/api/delete_by_query.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,gBAAgB,CAAc,MAAwD,EAAE,OAAiC;IACrJ,MAAM,YAAY,GAAa,CAAC,OAAO,CAAC,CAAA;IACxC,MAAM,YAAY,GAAa,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IAC7D,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,MAAM,CAAA;IACrB,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,mBAAmB,CAAA;IAC/E,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AA7BD,mCA6BC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Changes the number of requests per second for a particular Delete By Query operation.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/docs-delete-by-query.html | Elasticsearch API documentation}
*/
export default function DeleteByQueryRethrottleApi(this: That, params: T.DeleteByQueryRethrottleRequest | TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DeleteByQueryRethrottleResponse>;
export default function DeleteByQueryRethrottleApi(this: That, params: T.DeleteByQueryRethrottleRequest | TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DeleteByQueryRethrottleResponse, unknown>>;
export default function DeleteByQueryRethrottleApi(this: That, params: T.DeleteByQueryRethrottleRequest | TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptions): Promise<T.DeleteByQueryRethrottleResponse>;
export {};

View file

@ -0,0 +1,39 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function DeleteByQueryRethrottleApi(params, options) {
const acceptedPath = ['task_id'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = `/_delete_by_query/${encodeURIComponent(params.task_id.toString())}/_rethrottle`;
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = DeleteByQueryRethrottleApi;
//# sourceMappingURL=delete_by_query_rethrottle.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"delete_by_query_rethrottle.js","sourceRoot":"","sources":["../../../src/api/api/delete_by_query_rethrottle.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,0BAA0B,CAAc,MAA4E,EAAE,OAAiC;IACnL,MAAM,YAAY,GAAa,CAAC,SAAS,CAAC,CAAA;IAC1C,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,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,MAAM,CAAA;IACrB,MAAM,IAAI,GAAG,qBAAqB,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,cAAc,CAAA;IAC7F,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAjBD,6CAiBC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Deletes a script.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/modules-scripting.html | Elasticsearch API documentation}
*/
export default function DeleteScriptApi(this: That, params: T.DeleteScriptRequest | TB.DeleteScriptRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DeleteScriptResponse>;
export default function DeleteScriptApi(this: That, params: T.DeleteScriptRequest | TB.DeleteScriptRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DeleteScriptResponse, unknown>>;
export default function DeleteScriptApi(this: That, params: T.DeleteScriptRequest | TB.DeleteScriptRequest, options?: TransportRequestOptions): Promise<T.DeleteScriptResponse>;
export {};

View file

@ -0,0 +1,39 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function DeleteScriptApi(params, options) {
const acceptedPath = ['id'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = `/_scripts/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = DeleteScriptApi;
//# sourceMappingURL=delete_script.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"delete_script.js","sourceRoot":"","sources":["../../../src/api/api/delete_script.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,eAAe,CAAc,MAAsD,EAAE,OAAiC;IAClJ,MAAM,YAAY,GAAa,CAAC,IAAI,CAAC,CAAA;IACrC,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,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,QAAQ,CAAA;IACvB,MAAM,IAAI,GAAG,aAAa,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IACpE,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAjBD,kCAiBC"}

View file

@ -0,0 +1,46 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class Enrich {
transport: Transport;
constructor(transport: Transport);
/**
* Deletes an existing enrich policy and its enrich index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/delete-enrich-policy-api.html | Elasticsearch API documentation}
*/
deletePolicy(this: That, params: T.EnrichDeletePolicyRequest | TB.EnrichDeletePolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EnrichDeletePolicyResponse>;
deletePolicy(this: That, params: T.EnrichDeletePolicyRequest | TB.EnrichDeletePolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EnrichDeletePolicyResponse, unknown>>;
deletePolicy(this: That, params: T.EnrichDeletePolicyRequest | TB.EnrichDeletePolicyRequest, options?: TransportRequestOptions): Promise<T.EnrichDeletePolicyResponse>;
/**
* Creates the enrich index for an existing enrich policy.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/execute-enrich-policy-api.html | Elasticsearch API documentation}
*/
executePolicy(this: That, params: T.EnrichExecutePolicyRequest | TB.EnrichExecutePolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EnrichExecutePolicyResponse>;
executePolicy(this: That, params: T.EnrichExecutePolicyRequest | TB.EnrichExecutePolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EnrichExecutePolicyResponse, unknown>>;
executePolicy(this: That, params: T.EnrichExecutePolicyRequest | TB.EnrichExecutePolicyRequest, options?: TransportRequestOptions): Promise<T.EnrichExecutePolicyResponse>;
/**
* Gets information about an enrich policy.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/get-enrich-policy-api.html | Elasticsearch API documentation}
*/
getPolicy(this: That, params?: T.EnrichGetPolicyRequest | TB.EnrichGetPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EnrichGetPolicyResponse>;
getPolicy(this: That, params?: T.EnrichGetPolicyRequest | TB.EnrichGetPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EnrichGetPolicyResponse, unknown>>;
getPolicy(this: That, params?: T.EnrichGetPolicyRequest | TB.EnrichGetPolicyRequest, options?: TransportRequestOptions): Promise<T.EnrichGetPolicyResponse>;
/**
* Creates a new enrich policy.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/put-enrich-policy-api.html | Elasticsearch API documentation}
*/
putPolicy(this: That, params: T.EnrichPutPolicyRequest | TB.EnrichPutPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EnrichPutPolicyResponse>;
putPolicy(this: That, params: T.EnrichPutPolicyRequest | TB.EnrichPutPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EnrichPutPolicyResponse, unknown>>;
putPolicy(this: That, params: T.EnrichPutPolicyRequest | TB.EnrichPutPolicyRequest, options?: TransportRequestOptions): Promise<T.EnrichPutPolicyResponse>;
/**
* Gets enrich coordinator statistics and information about enrich policies that are currently executing.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/enrich-stats-api.html | Elasticsearch API documentation}
*/
stats(this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EnrichStatsResponse>;
stats(this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EnrichStatsResponse, unknown>>;
stats(this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptions): Promise<T.EnrichStatsResponse>;
}
export {};

View file

@ -0,0 +1,142 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
class Enrich {
constructor(transport) {
Object.defineProperty(this, "transport", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.transport = transport;
}
async deletePolicy(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = `/_enrich/policy/${encodeURIComponent(params.name.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async executePolicy(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'PUT';
const path = `/_enrich/policy/${encodeURIComponent(params.name.toString())}/_execute`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async getPolicy(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.name != null) {
method = 'GET';
path = `/_enrich/policy/${encodeURIComponent(params.name.toString())}`;
}
else {
method = 'GET';
path = '/_enrich/policy';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async putPolicy(params, options) {
const acceptedPath = ['name'];
const acceptedBody = ['geo_match', 'match', 'range'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'PUT';
const path = `/_enrich/policy/${encodeURIComponent(params.name.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async stats(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_enrich/_stats';
return await this.transport.request({ path, method, querystring, body }, options);
}
}
exports.default = Enrich;
//# sourceMappingURL=enrich.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"enrich.js","sourceRoot":"","sources":["../../../src/api/api/enrich.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAsBH,MAAqB,MAAM;IAEzB,YAAa,SAAoB;QADjC;;;;;WAAoB;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IASD,KAAK,CAAC,YAAY,CAAc,MAAkE,EAAE,OAAiC;QACnI,MAAM,YAAY,GAAa,CAAC,MAAM,CAAC,CAAA;QACvC,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;QAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,SAAQ;aACT;iBAAM,IAAI,GAAG,KAAK,MAAM,EAAE;gBACzB,mBAAmB;gBACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAA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AAC,GAAG,CAAC,CAAA;aAC/B;SACF;QAED,MAAM,MAAM,GAAG,KAAK,CAAA;QACpB,MAAM,IAAI,GAAG,iBAAiB,CAAA;QAC9B,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;CACF;AA5JD,yBA4JC"}

View file

@ -0,0 +1,39 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class Eql {
transport: Transport;
constructor(transport: Transport);
/**
* Deletes an async EQL search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/eql-search-api.html | Elasticsearch API documentation}
*/
delete(this: That, params: T.EqlDeleteRequest | TB.EqlDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EqlDeleteResponse>;
delete(this: That, params: T.EqlDeleteRequest | TB.EqlDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EqlDeleteResponse, unknown>>;
delete(this: That, params: T.EqlDeleteRequest | TB.EqlDeleteRequest, options?: TransportRequestOptions): Promise<T.EqlDeleteResponse>;
/**
* Returns async results from previously executed Event Query Language (EQL) search
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/eql-search-api.html | Elasticsearch API documentation}
*/
get<TEvent = unknown>(this: That, params: T.EqlGetRequest | TB.EqlGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EqlGetResponse<TEvent>>;
get<TEvent = unknown>(this: That, params: T.EqlGetRequest | TB.EqlGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EqlGetResponse<TEvent>, unknown>>;
get<TEvent = unknown>(this: That, params: T.EqlGetRequest | TB.EqlGetRequest, options?: TransportRequestOptions): Promise<T.EqlGetResponse<TEvent>>;
/**
* Returns the status of a previously submitted async or stored Event Query Language (EQL) search
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/eql-search-api.html | Elasticsearch API documentation}
*/
getStatus(this: That, params: T.EqlGetStatusRequest | TB.EqlGetStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EqlGetStatusResponse>;
getStatus(this: That, params: T.EqlGetStatusRequest | TB.EqlGetStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EqlGetStatusResponse, unknown>>;
getStatus(this: That, params: T.EqlGetStatusRequest | TB.EqlGetStatusRequest, options?: TransportRequestOptions): Promise<T.EqlGetStatusResponse>;
/**
* Returns results matching a query expressed in Event Query Language (EQL)
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/eql-search-api.html | Elasticsearch API documentation}
*/
search<TEvent = unknown>(this: That, params: T.EqlSearchRequest | TB.EqlSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EqlSearchResponse<TEvent>>;
search<TEvent = unknown>(this: That, params: T.EqlSearchRequest | TB.EqlSearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EqlSearchResponse<TEvent>, unknown>>;
search<TEvent = unknown>(this: That, params: T.EqlSearchRequest | TB.EqlSearchRequest, options?: TransportRequestOptions): Promise<T.EqlSearchResponse<TEvent>>;
}
export {};

View file

@ -0,0 +1,115 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
class Eql {
constructor(transport) {
Object.defineProperty(this, "transport", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.transport = transport;
}
async delete(params, options) {
const acceptedPath = ['id'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = `/_eql/search/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async get(params, options) {
const acceptedPath = ['id'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/_eql/search/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async getStatus(params, options) {
const acceptedPath = ['id'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/_eql/search/status/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async search(params, options) {
const acceptedPath = ['index'];
const acceptedBody = ['query', 'case_sensitive', 'event_category_field', 'tiebreaker_field', 'timestamp_field', 'fetch_size', 'filter', 'keep_alive', 'keep_on_completion', 'wait_for_completion_timeout', 'size', 'fields', 'result_position', 'runtime_mappings'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = body != null ? 'POST' : 'GET';
const path = `/${encodeURIComponent(params.index.toString())}/_eql/search`;
return await this.transport.request({ path, method, querystring, body }, options);
}
}
exports.default = Eql;
//# sourceMappingURL=eql.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"eql.js","sourceRoot":"","sources":["../../../src/api/api/eql.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAsBH,MAAqB,GAAG;IAEtB,YAAa,SAAoB;QADjC;;;;;WAAoB;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IASD,KAAK,CAAC,MAAM,CAAc,MAAgD,EAAE,OAAiC;QAC3G,MAAM,YAAY,GAAa,CAAC,IAAI,CAAC,CAAA;QACrC,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;QAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,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,QAAQ,CAAA;QACvB,MAAM,IAAI,GAAG,gBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;QACvE,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;IASD,KAAK,CAAC,GAAG,CAAgC,MAA0C,EAAE,OAAiC;QACpH,MAAM,YAAY,GAAa,CAAC,IAAI,CAAC,CAAA;QACrC,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,MAAM,IAA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AAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;QAC5C,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,cAAc,CAAA;QAC1E,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;CACF;AAzHD,sBAyHC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Returns information about whether a document exists in an index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/docs-get.html | Elasticsearch API documentation}
*/
export default function ExistsApi(this: That, params: T.ExistsRequest | TB.ExistsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ExistsResponse>;
export default function ExistsApi(this: That, params: T.ExistsRequest | TB.ExistsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ExistsResponse, unknown>>;
export default function ExistsApi(this: That, params: T.ExistsRequest | TB.ExistsRequest, options?: TransportRequestOptions): Promise<T.ExistsResponse>;
export {};

View file

@ -0,0 +1,39 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function ExistsApi(params, options) {
const acceptedPath = ['id', 'index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'HEAD';
const path = `/${encodeURIComponent(params.index.toString())}/_doc/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = ExistsApi;
//# sourceMappingURL=exists.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"exists.js","sourceRoot":"","sources":["../../../src/api/api/exists.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,SAAS,CAAc,MAA0C,EAAE,OAAiC;IAChI,MAAM,YAAY,GAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,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,MAAM,CAAA;IACrB,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,SAAS,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IAC/G,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAjBD,4BAiBC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Returns information about whether a document source exists in an index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/docs-get.html | Elasticsearch API documentation}
*/
export default function ExistsSourceApi(this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ExistsSourceResponse>;
export default function ExistsSourceApi(this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ExistsSourceResponse, unknown>>;
export default function ExistsSourceApi(this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptions): Promise<T.ExistsSourceResponse>;
export {};

View file

@ -0,0 +1,39 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function ExistsSourceApi(params, options) {
const acceptedPath = ['id', 'index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'HEAD';
const path = `/${encodeURIComponent(params.index.toString())}/_source/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = ExistsSourceApi;
//# sourceMappingURL=exists_source.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"exists_source.js","sourceRoot":"","sources":["../../../src/api/api/exists_source.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,eAAe,CAAc,MAAsD,EAAE,OAAiC;IAClJ,MAAM,YAAY,GAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,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,MAAM,CAAA;IACrB,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,YAAY,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IAClH,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAjBD,kCAiBC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Returns information about why a specific matches (or doesn't match) a query.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/search-explain.html | Elasticsearch API documentation}
*/
export default function ExplainApi<TDocument = unknown>(this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ExplainResponse<TDocument>>;
export default function ExplainApi<TDocument = unknown>(this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ExplainResponse<TDocument>, unknown>>;
export default function ExplainApi<TDocument = unknown>(this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptions): Promise<T.ExplainResponse<TDocument>>;
export {};

View file

@ -0,0 +1,53 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function ExplainApi(params, options) {
const acceptedPath = ['id', 'index'];
const acceptedBody = ['query'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = body != null ? 'POST' : 'GET';
const path = `/${encodeURIComponent(params.index.toString())}/_explain/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = ExplainApi;
//# sourceMappingURL=explain.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"explain.js","sourceRoot":"","sources":["../../../src/api/api/explain.ts"],"names":[],"mappings":";A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AAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IACnH,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AA7BD,6BA6BC"}

View file

@ -0,0 +1,25 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class Features {
transport: Transport;
constructor(transport: Transport);
/**
* Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/get-features-api.html | Elasticsearch API documentation}
*/
getFeatures(this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FeaturesGetFeaturesResponse>;
getFeatures(this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FeaturesGetFeaturesResponse, unknown>>;
getFeatures(this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptions): Promise<T.FeaturesGetFeaturesResponse>;
/**
* Resets the internal state of features, usually by deleting system indices
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/modules-snapshots.html | Elasticsearch API documentation}
*/
resetFeatures(this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FeaturesResetFeaturesResponse>;
resetFeatures(this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FeaturesResetFeaturesResponse, unknown>>;
resetFeatures(this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptions): Promise<T.FeaturesResetFeaturesResponse>;
}
export {};

View file

@ -0,0 +1,69 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
class Features {
constructor(transport) {
Object.defineProperty(this, "transport", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.transport = transport;
}
async getFeatures(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_features';
return await this.transport.request({ path, method, querystring, body }, options);
}
async resetFeatures(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = '/_features/_reset';
return await this.transport.request({ path, method, querystring, body }, options);
}
}
exports.default = Features;
//# sourceMappingURL=features.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"features.js","sourceRoot":"","sources":["../../../src/api/api/features.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAsBH,MAAqB,QAAQ;IAE3B,YAAa,SAAoB;QADjC;;;;;WAAoB;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;I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AAI,GAAG,mBAAmB,CAAA;QAChC,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;CACF;AA3DD,2BA2DC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Returns the information about the capabilities of fields among multiple indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/search-field-caps.html | Elasticsearch API documentation}
*/
export default function FieldCapsApi(this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FieldCapsResponse>;
export default function FieldCapsApi(this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FieldCapsResponse, unknown>>;
export default function FieldCapsApi(this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptions): Promise<T.FieldCapsResponse>;
export {};

View file

@ -0,0 +1,62 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function FieldCapsApi(params, options) {
const acceptedPath = ['index'];
const acceptedBody = ['fields', 'index_filter', 'runtime_mappings'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.index != null) {
method = body != null ? 'POST' : 'GET';
path = `/${encodeURIComponent(params.index.toString())}/_field_caps`;
}
else {
method = body != null ? 'POST' : 'GET';
path = '/_field_caps';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = FieldCapsApi;
//# sourceMappingURL=field_caps.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"field_caps.js","sourceRoot":"","sources":["../../../src/api/api/field_caps.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,YAAY,CAAc,MAAiD,EAAE,OAAiC;IAC1I,MAAM,YAAY,GAAa,CAAC,OAAO,CAAC,CAAA;IACxC,MAAM,YAAY,GAAa,CAAC,QAAQ,EAAE,cAAc,EAAE,kBAAkB,CAAC,CAAA;IAC7E,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,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAA;IACrB,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,EAAE;QACxB,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,cAAc,CAAA;KACrE;SAAM;QACL,MAAM,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;QACtC,IAAI,GAAG,cAAc,CAAA;KACtB;IACD,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AArCD,+BAqCC"}

View file

@ -0,0 +1,30 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class Fleet {
transport: Transport;
constructor(transport: Transport);
/**
* Returns the current global checkpoints for an index. This API is design for internal use by the fleet server project.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/get-global-checkpoints.html | Elasticsearch API documentation}
*/
globalCheckpoints(this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FleetGlobalCheckpointsResponse>;
globalCheckpoints(this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FleetGlobalCheckpointsResponse, unknown>>;
globalCheckpoints(this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptions): Promise<T.FleetGlobalCheckpointsResponse>;
/**
* Multi Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project.
*/
msearch<TDocument = unknown>(this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FleetMsearchResponse<TDocument>>;
msearch<TDocument = unknown>(this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FleetMsearchResponse<TDocument>, unknown>>;
msearch<TDocument = unknown>(this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptions): Promise<T.FleetMsearchResponse<TDocument>>;
/**
* Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project.
*/
search<TDocument = unknown>(this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FleetSearchResponse<TDocument>>;
search<TDocument = unknown>(this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FleetSearchResponse<TDocument>, unknown>>;
search<TDocument = unknown>(this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptions): Promise<T.FleetSearchResponse<TDocument>>;
}
export {};

View file

@ -0,0 +1,113 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
class Fleet {
constructor(transport) {
Object.defineProperty(this, "transport", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.transport = transport;
}
async globalCheckpoints(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/${encodeURIComponent(params.index.toString())}/_fleet/global_checkpoints`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async msearch(params, options) {
var _a;
const acceptedPath = ['index'];
const acceptedBody = ['searches'];
const querystring = {};
// @ts-expect-error
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
for (const key in params) {
if (acceptedBody.includes(key)) {
// @ts-expect-error
body = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.index != null) {
method = body != null ? 'POST' : 'GET';
path = `/${encodeURIComponent(params.index.toString())}/_fleet/_fleet_msearch`;
}
else {
method = body != null ? 'POST' : 'GET';
path = '/_fleet/_fleet_msearch';
}
return await this.transport.request({ path, method, querystring, bulkBody: body }, options);
}
async search(params, options) {
const acceptedPath = ['index'];
const acceptedBody = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = body != null ? 'POST' : 'GET';
const path = `/${encodeURIComponent(params.index.toString())}/_fleet/_fleet_search`;
return await this.transport.request({ path, method, querystring, body }, options);
}
}
exports.default = Fleet;
//# sourceMappingURL=fleet.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"fleet.js","sourceRoot":"","sources":["../../../src/api/api/fleet.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAsBH,MAAqB,KAAK;IAExB,YAAa,SAAoB;QADjC;;;;;WAAoB;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IASD,KAAK,CAAC,iBAAiB,CAAc,MAA0E,EAAE,OAAiC;QAChJ,MAAM,YAAY,GAAa,CAAC,OAAO,CAAC,CAAA;QACxC,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;QAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,SAAQ;aACT;iBAAM,IAAI,GAAG,KAAK,MAAM,EAAE;g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GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;SACtD;QAED,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,IAAI,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAA;gBACjB,mBAAmB;gBACnB,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;aACxB;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,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;QAC5C,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,uBAAuB,CAAA;QACnF,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;CACF;AAzGD,wBAyGC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Returns a document.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/docs-get.html | Elasticsearch API documentation}
*/
export default function GetApi<TDocument = unknown>(this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetResponse<TDocument>>;
export default function GetApi<TDocument = unknown>(this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.GetResponse<TDocument>, unknown>>;
export default function GetApi<TDocument = unknown>(this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptions): Promise<T.GetResponse<TDocument>>;
export {};

View file

@ -0,0 +1,39 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function GetApi(params, options) {
const acceptedPath = ['id', 'index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/${encodeURIComponent(params.index.toString())}/_doc/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = GetApi;
//# sourceMappingURL=get.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/api/api/get.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,MAAM,CAAmC,MAAoC,EAAE,OAAiC;IAC5I,MAAM,YAAY,GAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,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,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,SAAS,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IAC/G,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAjBD,yBAiBC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Returns a script.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/modules-scripting.html | Elasticsearch API documentation}
*/
export default function GetScriptApi(this: That, params: T.GetScriptRequest | TB.GetScriptRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetScriptResponse>;
export default function GetScriptApi(this: That, params: T.GetScriptRequest | TB.GetScriptRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.GetScriptResponse, unknown>>;
export default function GetScriptApi(this: That, params: T.GetScriptRequest | TB.GetScriptRequest, options?: TransportRequestOptions): Promise<T.GetScriptResponse>;
export {};

View file

@ -0,0 +1,39 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function GetScriptApi(params, options) {
const acceptedPath = ['id'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/_scripts/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = GetScriptApi;
//# sourceMappingURL=get_script.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"get_script.js","sourceRoot":"","sources":["../../../src/api/api/get_script.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,YAAY,CAAc,MAAgD,EAAE,OAAiC;IACzI,MAAM,YAAY,GAAa,CAAC,IAAI,CAAC,CAAA;IACrC,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,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,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,aAAa,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IACpE,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAjBD,+BAiBC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Returns all script contexts.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/painless/8.9/painless-contexts.html | Elasticsearch API documentation}
*/
export default function GetScriptContextApi(this: That, params?: T.GetScriptContextRequest | TB.GetScriptContextRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetScriptContextResponse>;
export default function GetScriptContextApi(this: That, params?: T.GetScriptContextRequest | TB.GetScriptContextRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.GetScriptContextResponse, unknown>>;
export default function GetScriptContextApi(this: That, params?: T.GetScriptContextRequest | TB.GetScriptContextRequest, options?: TransportRequestOptions): Promise<T.GetScriptContextResponse>;
export {};

View file

@ -0,0 +1,40 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function GetScriptContextApi(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_script_context';
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = GetScriptContextApi;
//# sourceMappingURL=get_script_context.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"get_script_context.js","sourceRoot":"","sources":["../../../src/api/api/get_script_context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,mBAAmB,CAAc,MAA+D,EAAE,OAAiC;IAC/J,MAAM,YAAY,GAAa,EAAE,CAAA;IACjC,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAA;IACrB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,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,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,kBAAkB,CAAA;IAC/B,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAlBD,sCAkBC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Returns available script types, languages and contexts
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/modules-scripting.html | Elasticsearch API documentation}
*/
export default function GetScriptLanguagesApi(this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetScriptLanguagesResponse>;
export default function GetScriptLanguagesApi(this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.GetScriptLanguagesResponse, unknown>>;
export default function GetScriptLanguagesApi(this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptions): Promise<T.GetScriptLanguagesResponse>;
export {};

View file

@ -0,0 +1,40 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function GetScriptLanguagesApi(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_script_language';
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = GetScriptLanguagesApi;
//# sourceMappingURL=get_script_languages.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"get_script_languages.js","sourceRoot":"","sources":["../../../src/api/api/get_script_languages.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,qBAAqB,CAAc,MAAmE,EAAE,OAAiC;IACrK,MAAM,YAAY,GAAa,EAAE,CAAA;IACjC,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAA;IACrB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,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,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,mBAAmB,CAAA;IAChC,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAlBD,wCAkBC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Returns the source of a document.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/docs-get.html | Elasticsearch API documentation}
*/
export default function GetSourceApi<TDocument = unknown>(this: That, params: T.GetSourceRequest | TB.GetSourceRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetSourceResponse<TDocument>>;
export default function GetSourceApi<TDocument = unknown>(this: That, params: T.GetSourceRequest | TB.GetSourceRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.GetSourceResponse<TDocument>, unknown>>;
export default function GetSourceApi<TDocument = unknown>(this: That, params: T.GetSourceRequest | TB.GetSourceRequest, options?: TransportRequestOptions): Promise<T.GetSourceResponse<TDocument>>;
export {};

View file

@ -0,0 +1,39 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function GetSourceApi(params, options) {
const acceptedPath = ['id', 'index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/${encodeURIComponent(params.index.toString())}/_source/${encodeURIComponent(params.id.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = GetSourceApi;
//# sourceMappingURL=get_source.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"get_source.js","sourceRoot":"","sources":["../../../src/api/api/get_source.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,YAAY,CAAmC,MAAgD,EAAE,OAAiC;IAC9J,MAAM,YAAY,GAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,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,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,YAAY,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IAClH,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAjBD,+BAiBC"}

View file

@ -0,0 +1,18 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class Graph {
transport: Transport;
constructor(transport: Transport);
/**
* Explore extracted and summarized information about the documents and terms in an index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/graph-explore-api.html | Elasticsearch API documentation}
*/
explore(this: That, params: T.GraphExploreRequest | TB.GraphExploreRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GraphExploreResponse>;
explore(this: That, params: T.GraphExploreRequest | TB.GraphExploreRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.GraphExploreResponse, unknown>>;
explore(this: That, params: T.GraphExploreRequest | TB.GraphExploreRequest, options?: TransportRequestOptions): Promise<T.GraphExploreResponse>;
}
export {};

View file

@ -0,0 +1,64 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
class Graph {
constructor(transport) {
Object.defineProperty(this, "transport", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.transport = transport;
}
async explore(params, options) {
const acceptedPath = ['index'];
const acceptedBody = ['connections', 'controls', 'query', 'vertices'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = body != null ? 'POST' : 'GET';
const path = `/${encodeURIComponent(params.index.toString())}/_graph/explore`;
return await this.transport.request({ path, method, querystring, body }, options);
}
}
exports.default = Graph;
//# sourceMappingURL=graph.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../src/api/api/graph.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAsBH,MAAqB,KAAK;IAExB,YAAa,SAAoB;QADjC;;;;;WAAoB;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IASD,KAAK,CAAC,OAAO,CAAc,MAAsD,EAAE,OAAiC;QAClH,MAAM,YAAY,GAAa,CAAC,OAAO,CAAC,CAAA;QACxC,MAAM,YAAY,GAAa,CAAC,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAA;QAC/E,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,mBAAmB;QACnB,MAAM,QAAQ,GAAQ,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAA;QAClC,IAAI,IAAkC,CAAA;QACtC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YAChC,IAAI,GAAG,QAAQ,CAAA;SAChB;aAAM;YACL,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;SACtD;QAED,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,IAAI,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAA;gBACjB,mBAAmB;gBACnB,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;aACxB;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,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;QAC5C,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,iBAAiB,CAAA;QAC7E,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;CACF;AA3CD,wBA2CC"}

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Returns the health of the cluster.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/health-api.html | Elasticsearch API documentation}
*/
export default function HealthReportApi(this: That, params?: T.HealthReportRequest | TB.HealthReportRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.HealthReportResponse>;
export default function HealthReportApi(this: That, params?: T.HealthReportRequest | TB.HealthReportRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.HealthReportResponse, unknown>>;
export default function HealthReportApi(this: That, params?: T.HealthReportRequest | TB.HealthReportRequest, options?: TransportRequestOptions): Promise<T.HealthReportResponse>;
export {};

View file

@ -0,0 +1,48 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function HealthReportApi(params, options) {
const acceptedPath = ['feature'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.feature != null) {
method = 'GET';
path = `/_health_report/${encodeURIComponent(params.feature.toString())}`;
}
else {
method = 'GET';
path = '/_health_report';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = HealthReportApi;
//# sourceMappingURL=health_report.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"health_report.js","sourceRoot":"","sources":["../../../src/api/api/health_report.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,eAAe,CAAc,MAAuD,EAAE,OAAiC;IACnJ,MAAM,YAAY,GAAa,CAAC,SAAS,CAAC,CAAA;IAC1C,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAA;IACrB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,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,OAAO,IAAI,IAAI,EAAE;QAC1B,MAAM,GAAG,KAAK,CAAA;QACd,IAAI,GAAG,mBAAmB,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;KAC1E;SAAM;QACL,MAAM,GAAG,KAAK,CAAA;QACd,IAAI,GAAG,iBAAiB,CAAA;KACzB;IACD,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAzBD,kCAyBC"}

View file

@ -0,0 +1,88 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class Ilm {
transport: Transport;
constructor(transport: Transport);
/**
* Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ilm-delete-lifecycle.html | Elasticsearch API documentation}
*/
deleteLifecycle(this: That, params: T.IlmDeleteLifecycleRequest | TB.IlmDeleteLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmDeleteLifecycleResponse>;
deleteLifecycle(this: That, params: T.IlmDeleteLifecycleRequest | TB.IlmDeleteLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmDeleteLifecycleResponse, unknown>>;
deleteLifecycle(this: That, params: T.IlmDeleteLifecycleRequest | TB.IlmDeleteLifecycleRequest, options?: TransportRequestOptions): Promise<T.IlmDeleteLifecycleResponse>;
/**
* Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ilm-explain-lifecycle.html | Elasticsearch API documentation}
*/
explainLifecycle(this: That, params: T.IlmExplainLifecycleRequest | TB.IlmExplainLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmExplainLifecycleResponse>;
explainLifecycle(this: That, params: T.IlmExplainLifecycleRequest | TB.IlmExplainLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmExplainLifecycleResponse, unknown>>;
explainLifecycle(this: That, params: T.IlmExplainLifecycleRequest | TB.IlmExplainLifecycleRequest, options?: TransportRequestOptions): Promise<T.IlmExplainLifecycleResponse>;
/**
* Returns the specified policy definition. Includes the policy version and last modified date.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ilm-get-lifecycle.html | Elasticsearch API documentation}
*/
getLifecycle(this: That, params?: T.IlmGetLifecycleRequest | TB.IlmGetLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmGetLifecycleResponse>;
getLifecycle(this: That, params?: T.IlmGetLifecycleRequest | TB.IlmGetLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmGetLifecycleResponse, unknown>>;
getLifecycle(this: That, params?: T.IlmGetLifecycleRequest | TB.IlmGetLifecycleRequest, options?: TransportRequestOptions): Promise<T.IlmGetLifecycleResponse>;
/**
* Retrieves the current index lifecycle management (ILM) status.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ilm-get-status.html | Elasticsearch API documentation}
*/
getStatus(this: That, params?: T.IlmGetStatusRequest | TB.IlmGetStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmGetStatusResponse>;
getStatus(this: That, params?: T.IlmGetStatusRequest | TB.IlmGetStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmGetStatusResponse, unknown>>;
getStatus(this: That, params?: T.IlmGetStatusRequest | TB.IlmGetStatusRequest, options?: TransportRequestOptions): Promise<T.IlmGetStatusResponse>;
/**
* Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ilm-migrate-to-data-tiers.html | Elasticsearch API documentation}
*/
migrateToDataTiers(this: That, params?: T.IlmMigrateToDataTiersRequest | TB.IlmMigrateToDataTiersRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmMigrateToDataTiersResponse>;
migrateToDataTiers(this: That, params?: T.IlmMigrateToDataTiersRequest | TB.IlmMigrateToDataTiersRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmMigrateToDataTiersResponse, unknown>>;
migrateToDataTiers(this: That, params?: T.IlmMigrateToDataTiersRequest | TB.IlmMigrateToDataTiersRequest, options?: TransportRequestOptions): Promise<T.IlmMigrateToDataTiersResponse>;
/**
* Manually moves an index into the specified step and executes that step.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ilm-move-to-step.html | Elasticsearch API documentation}
*/
moveToStep(this: That, params: T.IlmMoveToStepRequest | TB.IlmMoveToStepRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmMoveToStepResponse>;
moveToStep(this: That, params: T.IlmMoveToStepRequest | TB.IlmMoveToStepRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmMoveToStepResponse, unknown>>;
moveToStep(this: That, params: T.IlmMoveToStepRequest | TB.IlmMoveToStepRequest, options?: TransportRequestOptions): Promise<T.IlmMoveToStepResponse>;
/**
* Creates a lifecycle policy
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ilm-put-lifecycle.html | Elasticsearch API documentation}
*/
putLifecycle(this: That, params: T.IlmPutLifecycleRequest | TB.IlmPutLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmPutLifecycleResponse>;
putLifecycle(this: That, params: T.IlmPutLifecycleRequest | TB.IlmPutLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmPutLifecycleResponse, unknown>>;
putLifecycle(this: That, params: T.IlmPutLifecycleRequest | TB.IlmPutLifecycleRequest, options?: TransportRequestOptions): Promise<T.IlmPutLifecycleResponse>;
/**
* Removes the assigned lifecycle policy and stops managing the specified index
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ilm-remove-policy.html | Elasticsearch API documentation}
*/
removePolicy(this: That, params: T.IlmRemovePolicyRequest | TB.IlmRemovePolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmRemovePolicyResponse>;
removePolicy(this: That, params: T.IlmRemovePolicyRequest | TB.IlmRemovePolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmRemovePolicyResponse, unknown>>;
removePolicy(this: That, params: T.IlmRemovePolicyRequest | TB.IlmRemovePolicyRequest, options?: TransportRequestOptions): Promise<T.IlmRemovePolicyResponse>;
/**
* Retries executing the policy for an index that is in the ERROR step.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ilm-retry-policy.html | Elasticsearch API documentation}
*/
retry(this: That, params: T.IlmRetryRequest | TB.IlmRetryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmRetryResponse>;
retry(this: That, params: T.IlmRetryRequest | TB.IlmRetryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmRetryResponse, unknown>>;
retry(this: That, params: T.IlmRetryRequest | TB.IlmRetryRequest, options?: TransportRequestOptions): Promise<T.IlmRetryResponse>;
/**
* Start the index lifecycle management (ILM) plugin.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ilm-start.html | Elasticsearch API documentation}
*/
start(this: That, params?: T.IlmStartRequest | TB.IlmStartRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmStartResponse>;
start(this: That, params?: T.IlmStartRequest | TB.IlmStartRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmStartResponse, unknown>>;
start(this: That, params?: T.IlmStartRequest | TB.IlmStartRequest, options?: TransportRequestOptions): Promise<T.IlmStartResponse>;
/**
* Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/ilm-stop.html | Elasticsearch API documentation}
*/
stop(this: That, params?: T.IlmStopRequest | TB.IlmStopRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmStopResponse>;
stop(this: That, params?: T.IlmStopRequest | TB.IlmStopRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmStopResponse, unknown>>;
stop(this: That, params?: T.IlmStopRequest | TB.IlmStopRequest, options?: TransportRequestOptions): Promise<T.IlmStopResponse>;
}
export {};

View file

@ -0,0 +1,275 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
class Ilm {
constructor(transport) {
Object.defineProperty(this, "transport", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.transport = transport;
}
async deleteLifecycle(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'DELETE';
const path = `/_ilm/policy/${encodeURIComponent(params.name.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async explainLifecycle(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = `/${encodeURIComponent(params.index.toString())}/_ilm/explain`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async getLifecycle(params, options) {
const acceptedPath = ['name'];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.name != null) {
method = 'GET';
path = `/_ilm/policy/${encodeURIComponent(params.name.toString())}`;
}
else {
method = 'GET';
path = '/_ilm/policy';
}
return await this.transport.request({ path, method, querystring, body }, options);
}
async getStatus(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'GET';
const path = '/_ilm/status';
return await this.transport.request({ path, method, querystring, body }, options);
}
async migrateToDataTiers(params, options) {
const acceptedPath = [];
const acceptedBody = ['legacy_template_to_delete', 'node_attribute'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = '/_ilm/migrate_to_data_tiers';
return await this.transport.request({ path, method, querystring, body }, options);
}
async moveToStep(params, options) {
const acceptedPath = ['index'];
const acceptedBody = ['current_step', 'next_step'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = `/_ilm/move/${encodeURIComponent(params.index.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async putLifecycle(params, options) {
const acceptedPath = ['name'];
const acceptedBody = ['policy'];
const querystring = {};
// @ts-expect-error
const userBody = params === null || params === void 0 ? void 0 : params.body;
let body;
if (typeof userBody === 'string') {
body = userBody;
}
else {
body = userBody != null ? { ...userBody } : undefined;
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body !== null && body !== void 0 ? body : {};
// @ts-expect-error
body[key] = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'PUT';
const path = `/_ilm/policy/${encodeURIComponent(params.name.toString())}`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async removePolicy(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = `/${encodeURIComponent(params.index.toString())}/_ilm/remove`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async retry(params, options) {
const acceptedPath = ['index'];
const querystring = {};
const body = undefined;
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = `/${encodeURIComponent(params.index.toString())}/_ilm/retry`;
return await this.transport.request({ path, method, querystring, body }, options);
}
async start(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = '/_ilm/start';
return await this.transport.request({ path, method, querystring, body }, options);
}
async stop(params, options) {
const acceptedPath = [];
const querystring = {};
const body = undefined;
params = params !== null && params !== void 0 ? params : {};
for (const key in params) {
if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
const method = 'POST';
const path = '/_ilm/stop';
return await this.transport.request({ path, method, querystring, body }, options);
}
}
exports.default = Ilm;
//# sourceMappingURL=ilm.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Creates or updates a document in an index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/docs-index_.html | Elasticsearch API documentation}
*/
export default function IndexApi<TDocument = unknown>(this: That, params: T.IndexRequest<TDocument> | TB.IndexRequest<TDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndexResponse>;
export default function IndexApi<TDocument = unknown>(this: That, params: T.IndexRequest<TDocument> | TB.IndexRequest<TDocument>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndexResponse, unknown>>;
export default function IndexApi<TDocument = unknown>(this: That, params: T.IndexRequest<TDocument> | TB.IndexRequest<TDocument>, options?: TransportRequestOptions): Promise<T.IndexResponse>;
export {};

View file

@ -0,0 +1,54 @@
"use strict";
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
async function IndexApi(params, options) {
var _a;
const acceptedPath = ['id', 'index'];
const acceptedBody = ['document'];
const querystring = {};
// @ts-expect-error
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
for (const key in params) {
if (acceptedBody.includes(key)) {
// @ts-expect-error
body = params[key];
}
else if (acceptedPath.includes(key)) {
continue;
}
else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key];
}
}
let method = '';
let path = '';
if (params.index != null && params.id != null) {
method = 'PUT';
path = `/${encodeURIComponent(params.index.toString())}/_doc/${encodeURIComponent(params.id.toString())}`;
}
else {
method = 'POST';
path = `/${encodeURIComponent(params.index.toString())}/_doc`;
}
return await this.transport.request({ path, method, querystring, body }, options);
}
exports.default = IndexApi;
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/api/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BY,KAAK,UAAU,QAAQ,CAAmC,MAA8D,EAAE,OAAiC;;IACxK,MAAM,YAAY,GAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,YAAY,GAAa,CAAC,UAAU,CAAC,C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@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
export default class Indices {
transport: Transport;
constructor(transport: Transport);
/**
* Adds a block to an index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/index-modules-blocks.html | Elasticsearch API documentation}
*/
addBlock(this: That, params: T.IndicesAddBlockRequest | TB.IndicesAddBlockRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesAddBlockResponse>;
addBlock(this: That, params: T.IndicesAddBlockRequest | TB.IndicesAddBlockRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesAddBlockResponse, unknown>>;
addBlock(this: That, params: T.IndicesAddBlockRequest | TB.IndicesAddBlockRequest, options?: TransportRequestOptions): Promise<T.IndicesAddBlockResponse>;
/**
* Performs the analysis process on a text and return the tokens breakdown of the text.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-analyze.html | Elasticsearch API documentation}
*/
analyze(this: That, params?: T.IndicesAnalyzeRequest | TB.IndicesAnalyzeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesAnalyzeResponse>;
analyze(this: That, params?: T.IndicesAnalyzeRequest | TB.IndicesAnalyzeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesAnalyzeResponse, unknown>>;
analyze(this: That, params?: T.IndicesAnalyzeRequest | TB.IndicesAnalyzeRequest, options?: TransportRequestOptions): Promise<T.IndicesAnalyzeResponse>;
/**
* Clears all or specific caches for one or more indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-clearcache.html | Elasticsearch API documentation}
*/
clearCache(this: That, params?: T.IndicesClearCacheRequest | TB.IndicesClearCacheRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesClearCacheResponse>;
clearCache(this: That, params?: T.IndicesClearCacheRequest | TB.IndicesClearCacheRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesClearCacheResponse, unknown>>;
clearCache(this: That, params?: T.IndicesClearCacheRequest | TB.IndicesClearCacheRequest, options?: TransportRequestOptions): Promise<T.IndicesClearCacheResponse>;
/**
* Clones an index
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-clone-index.html | Elasticsearch API documentation}
*/
clone(this: That, params: T.IndicesCloneRequest | TB.IndicesCloneRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesCloneResponse>;
clone(this: That, params: T.IndicesCloneRequest | TB.IndicesCloneRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesCloneResponse, unknown>>;
clone(this: That, params: T.IndicesCloneRequest | TB.IndicesCloneRequest, options?: TransportRequestOptions): Promise<T.IndicesCloneResponse>;
/**
* Closes an index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-open-close.html | Elasticsearch API documentation}
*/
close(this: That, params: T.IndicesCloseRequest | TB.IndicesCloseRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesCloseResponse>;
close(this: That, params: T.IndicesCloseRequest | TB.IndicesCloseRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesCloseResponse, unknown>>;
close(this: That, params: T.IndicesCloseRequest | TB.IndicesCloseRequest, options?: TransportRequestOptions): Promise<T.IndicesCloseResponse>;
/**
* Creates an index with optional settings and mappings.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-create-index.html | Elasticsearch API documentation}
*/
create(this: That, params: T.IndicesCreateRequest | TB.IndicesCreateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesCreateResponse>;
create(this: That, params: T.IndicesCreateRequest | TB.IndicesCreateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesCreateResponse, unknown>>;
create(this: That, params: T.IndicesCreateRequest | TB.IndicesCreateRequest, options?: TransportRequestOptions): Promise<T.IndicesCreateResponse>;
/**
* Creates a data stream
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/data-streams.html | Elasticsearch API documentation}
*/
createDataStream(this: That, params: T.IndicesCreateDataStreamRequest | TB.IndicesCreateDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesCreateDataStreamResponse>;
createDataStream(this: That, params: T.IndicesCreateDataStreamRequest | TB.IndicesCreateDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesCreateDataStreamResponse, unknown>>;
createDataStream(this: That, params: T.IndicesCreateDataStreamRequest | TB.IndicesCreateDataStreamRequest, options?: TransportRequestOptions): Promise<T.IndicesCreateDataStreamResponse>;
/**
* Provides statistics on operations happening in a data stream.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/data-streams.html | Elasticsearch API documentation}
*/
dataStreamsStats(this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDataStreamsStatsResponse>;
dataStreamsStats(this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDataStreamsStatsResponse, unknown>>;
dataStreamsStats(this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptions): Promise<T.IndicesDataStreamsStatsResponse>;
/**
* Deletes an index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-delete-index.html | Elasticsearch API documentation}
*/
delete(this: That, params: T.IndicesDeleteRequest | TB.IndicesDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDeleteResponse>;
delete(this: That, params: T.IndicesDeleteRequest | TB.IndicesDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDeleteResponse, unknown>>;
delete(this: That, params: T.IndicesDeleteRequest | TB.IndicesDeleteRequest, options?: TransportRequestOptions): Promise<T.IndicesDeleteResponse>;
/**
* Deletes an alias.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-aliases.html | Elasticsearch API documentation}
*/
deleteAlias(this: That, params: T.IndicesDeleteAliasRequest | TB.IndicesDeleteAliasRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDeleteAliasResponse>;
deleteAlias(this: That, params: T.IndicesDeleteAliasRequest | TB.IndicesDeleteAliasRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDeleteAliasResponse, unknown>>;
deleteAlias(this: That, params: T.IndicesDeleteAliasRequest | TB.IndicesDeleteAliasRequest, options?: TransportRequestOptions): Promise<T.IndicesDeleteAliasResponse>;
/**
* Deletes the data lifecycle of the selected data streams.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/dlm-delete-lifecycle.html | Elasticsearch API documentation}
*/
deleteDataLifecycle(this: That, params: T.IndicesDeleteDataLifecycleRequest | TB.IndicesDeleteDataLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDeleteDataLifecycleResponse>;
deleteDataLifecycle(this: That, params: T.IndicesDeleteDataLifecycleRequest | TB.IndicesDeleteDataLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDeleteDataLifecycleResponse, unknown>>;
deleteDataLifecycle(this: That, params: T.IndicesDeleteDataLifecycleRequest | TB.IndicesDeleteDataLifecycleRequest, options?: TransportRequestOptions): Promise<T.IndicesDeleteDataLifecycleResponse>;
/**
* Deletes a data stream.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/data-streams.html | Elasticsearch API documentation}
*/
deleteDataStream(this: That, params: T.IndicesDeleteDataStreamRequest | TB.IndicesDeleteDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDeleteDataStreamResponse>;
deleteDataStream(this: That, params: T.IndicesDeleteDataStreamRequest | TB.IndicesDeleteDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDeleteDataStreamResponse, unknown>>;
deleteDataStream(this: That, params: T.IndicesDeleteDataStreamRequest | TB.IndicesDeleteDataStreamRequest, options?: TransportRequestOptions): Promise<T.IndicesDeleteDataStreamResponse>;
/**
* Deletes an index template.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-templates.html | Elasticsearch API documentation}
*/
deleteIndexTemplate(this: That, params: T.IndicesDeleteIndexTemplateRequest | TB.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDeleteIndexTemplateResponse>;
deleteIndexTemplate(this: That, params: T.IndicesDeleteIndexTemplateRequest | TB.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDeleteIndexTemplateResponse, unknown>>;
deleteIndexTemplate(this: That, params: T.IndicesDeleteIndexTemplateRequest | TB.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesDeleteIndexTemplateResponse>;
/**
* Deletes an index template.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-templates.html | Elasticsearch API documentation}
*/
deleteTemplate(this: That, params: T.IndicesDeleteTemplateRequest | TB.IndicesDeleteTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDeleteTemplateResponse>;
deleteTemplate(this: That, params: T.IndicesDeleteTemplateRequest | TB.IndicesDeleteTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDeleteTemplateResponse, unknown>>;
deleteTemplate(this: That, params: T.IndicesDeleteTemplateRequest | TB.IndicesDeleteTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesDeleteTemplateResponse>;
/**
* Analyzes the disk usage of each field of an index or data stream
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-disk-usage.html | Elasticsearch API documentation}
*/
diskUsage(this: That, params: T.IndicesDiskUsageRequest | TB.IndicesDiskUsageRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDiskUsageResponse>;
diskUsage(this: That, params: T.IndicesDiskUsageRequest | TB.IndicesDiskUsageRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDiskUsageResponse, unknown>>;
diskUsage(this: That, params: T.IndicesDiskUsageRequest | TB.IndicesDiskUsageRequest, options?: TransportRequestOptions): Promise<T.IndicesDiskUsageResponse>;
/**
* Downsample an index
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/xpack-rollup.html | Elasticsearch API documentation}
*/
downsample(this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDownsampleResponse>;
downsample(this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDownsampleResponse, unknown>>;
downsample(this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptions): Promise<T.IndicesDownsampleResponse>;
/**
* Returns information about whether a particular index exists.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-exists.html | Elasticsearch API documentation}
*/
exists(this: That, params: T.IndicesExistsRequest | TB.IndicesExistsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesExistsResponse>;
exists(this: That, params: T.IndicesExistsRequest | TB.IndicesExistsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesExistsResponse, unknown>>;
exists(this: That, params: T.IndicesExistsRequest | TB.IndicesExistsRequest, options?: TransportRequestOptions): Promise<T.IndicesExistsResponse>;
/**
* Returns information about whether a particular alias exists.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-aliases.html | Elasticsearch API documentation}
*/
existsAlias(this: That, params: T.IndicesExistsAliasRequest | TB.IndicesExistsAliasRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesExistsAliasResponse>;
existsAlias(this: That, params: T.IndicesExistsAliasRequest | TB.IndicesExistsAliasRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesExistsAliasResponse, unknown>>;
existsAlias(this: That, params: T.IndicesExistsAliasRequest | TB.IndicesExistsAliasRequest, options?: TransportRequestOptions): Promise<T.IndicesExistsAliasResponse>;
/**
* Returns information about whether a particular index template exists.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-templates.html | Elasticsearch API documentation}
*/
existsIndexTemplate(this: That, params: T.IndicesExistsIndexTemplateRequest | TB.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesExistsIndexTemplateResponse>;
existsIndexTemplate(this: That, params: T.IndicesExistsIndexTemplateRequest | TB.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesExistsIndexTemplateResponse, unknown>>;
existsIndexTemplate(this: That, params: T.IndicesExistsIndexTemplateRequest | TB.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesExistsIndexTemplateResponse>;
/**
* Returns information about whether a particular index template exists.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-templates.html | Elasticsearch API documentation}
*/
existsTemplate(this: That, params: T.IndicesExistsTemplateRequest | TB.IndicesExistsTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesExistsTemplateResponse>;
existsTemplate(this: That, params: T.IndicesExistsTemplateRequest | TB.IndicesExistsTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesExistsTemplateResponse, unknown>>;
existsTemplate(this: That, params: T.IndicesExistsTemplateRequest | TB.IndicesExistsTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesExistsTemplateResponse>;
/**
* Retrieves information about the index's current DLM lifecycle, such as any potential encountered error, time since creation etc.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/dlm-explain-lifecycle.html | Elasticsearch API documentation}
*/
explainDataLifecycle(this: That, params: T.IndicesExplainDataLifecycleRequest | TB.IndicesExplainDataLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesExplainDataLifecycleResponse>;
explainDataLifecycle(this: That, params: T.IndicesExplainDataLifecycleRequest | TB.IndicesExplainDataLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesExplainDataLifecycleResponse, unknown>>;
explainDataLifecycle(this: That, params: T.IndicesExplainDataLifecycleRequest | TB.IndicesExplainDataLifecycleRequest, options?: TransportRequestOptions): Promise<T.IndicesExplainDataLifecycleResponse>;
/**
* Returns the field usage stats for each field of an index
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/field-usage-stats.html | Elasticsearch API documentation}
*/
fieldUsageStats(this: That, params: T.IndicesFieldUsageStatsRequest | TB.IndicesFieldUsageStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesFieldUsageStatsResponse>;
fieldUsageStats(this: That, params: T.IndicesFieldUsageStatsRequest | TB.IndicesFieldUsageStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesFieldUsageStatsResponse, unknown>>;
fieldUsageStats(this: That, params: T.IndicesFieldUsageStatsRequest | TB.IndicesFieldUsageStatsRequest, options?: TransportRequestOptions): Promise<T.IndicesFieldUsageStatsResponse>;
/**
* Performs the flush operation on one or more indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-flush.html | Elasticsearch API documentation}
*/
flush(this: That, params?: T.IndicesFlushRequest | TB.IndicesFlushRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesFlushResponse>;
flush(this: That, params?: T.IndicesFlushRequest | TB.IndicesFlushRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesFlushResponse, unknown>>;
flush(this: That, params?: T.IndicesFlushRequest | TB.IndicesFlushRequest, options?: TransportRequestOptions): Promise<T.IndicesFlushResponse>;
/**
* Performs the force merge operation on one or more indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-forcemerge.html | Elasticsearch API documentation}
*/
forcemerge(this: That, params?: T.IndicesForcemergeRequest | TB.IndicesForcemergeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesForcemergeResponse>;
forcemerge(this: That, params?: T.IndicesForcemergeRequest | TB.IndicesForcemergeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesForcemergeResponse, unknown>>;
forcemerge(this: That, params?: T.IndicesForcemergeRequest | TB.IndicesForcemergeRequest, options?: TransportRequestOptions): Promise<T.IndicesForcemergeResponse>;
/**
* Returns information about one or more indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-get-index.html | Elasticsearch API documentation}
*/
get(this: That, params: T.IndicesGetRequest | TB.IndicesGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetResponse>;
get(this: That, params: T.IndicesGetRequest | TB.IndicesGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetResponse, unknown>>;
get(this: That, params: T.IndicesGetRequest | TB.IndicesGetRequest, options?: TransportRequestOptions): Promise<T.IndicesGetResponse>;
/**
* Returns an alias.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-aliases.html | Elasticsearch API documentation}
*/
getAlias(this: That, params?: T.IndicesGetAliasRequest | TB.IndicesGetAliasRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetAliasResponse>;
getAlias(this: That, params?: T.IndicesGetAliasRequest | TB.IndicesGetAliasRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetAliasResponse, unknown>>;
getAlias(this: That, params?: T.IndicesGetAliasRequest | TB.IndicesGetAliasRequest, options?: TransportRequestOptions): Promise<T.IndicesGetAliasResponse>;
/**
* Returns the data lifecycle of the selected data streams.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/dlm-get-lifecycle.html | Elasticsearch API documentation}
*/
getDataLifecycle(this: That, params: T.IndicesGetDataLifecycleRequest | TB.IndicesGetDataLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetDataLifecycleResponse>;
getDataLifecycle(this: That, params: T.IndicesGetDataLifecycleRequest | TB.IndicesGetDataLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetDataLifecycleResponse, unknown>>;
getDataLifecycle(this: That, params: T.IndicesGetDataLifecycleRequest | TB.IndicesGetDataLifecycleRequest, options?: TransportRequestOptions): Promise<T.IndicesGetDataLifecycleResponse>;
/**
* Returns data streams.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/data-streams.html | Elasticsearch API documentation}
*/
getDataStream(this: That, params?: T.IndicesGetDataStreamRequest | TB.IndicesGetDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetDataStreamResponse>;
getDataStream(this: That, params?: T.IndicesGetDataStreamRequest | TB.IndicesGetDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetDataStreamResponse, unknown>>;
getDataStream(this: That, params?: T.IndicesGetDataStreamRequest | TB.IndicesGetDataStreamRequest, options?: TransportRequestOptions): Promise<T.IndicesGetDataStreamResponse>;
/**
* Returns mapping for one or more fields.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-get-field-mapping.html | Elasticsearch API documentation}
*/
getFieldMapping(this: That, params: T.IndicesGetFieldMappingRequest | TB.IndicesGetFieldMappingRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetFieldMappingResponse>;
getFieldMapping(this: That, params: T.IndicesGetFieldMappingRequest | TB.IndicesGetFieldMappingRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetFieldMappingResponse, unknown>>;
getFieldMapping(this: That, params: T.IndicesGetFieldMappingRequest | TB.IndicesGetFieldMappingRequest, options?: TransportRequestOptions): Promise<T.IndicesGetFieldMappingResponse>;
/**
* Returns an index template.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-templates.html | Elasticsearch API documentation}
*/
getIndexTemplate(this: That, params?: T.IndicesGetIndexTemplateRequest | TB.IndicesGetIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetIndexTemplateResponse>;
getIndexTemplate(this: That, params?: T.IndicesGetIndexTemplateRequest | TB.IndicesGetIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetIndexTemplateResponse, unknown>>;
getIndexTemplate(this: That, params?: T.IndicesGetIndexTemplateRequest | TB.IndicesGetIndexTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesGetIndexTemplateResponse>;
/**
* Returns mappings for one or more indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-get-mapping.html | Elasticsearch API documentation}
*/
getMapping(this: That, params?: T.IndicesGetMappingRequest | TB.IndicesGetMappingRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetMappingResponse>;
getMapping(this: That, params?: T.IndicesGetMappingRequest | TB.IndicesGetMappingRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetMappingResponse, unknown>>;
getMapping(this: That, params?: T.IndicesGetMappingRequest | TB.IndicesGetMappingRequest, options?: TransportRequestOptions): Promise<T.IndicesGetMappingResponse>;
/**
* Returns settings for one or more indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-get-settings.html | Elasticsearch API documentation}
*/
getSettings(this: That, params?: T.IndicesGetSettingsRequest | TB.IndicesGetSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetSettingsResponse>;
getSettings(this: That, params?: T.IndicesGetSettingsRequest | TB.IndicesGetSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetSettingsResponse, unknown>>;
getSettings(this: That, params?: T.IndicesGetSettingsRequest | TB.IndicesGetSettingsRequest, options?: TransportRequestOptions): Promise<T.IndicesGetSettingsResponse>;
/**
* Returns an index template.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-templates.html | Elasticsearch API documentation}
*/
getTemplate(this: That, params?: T.IndicesGetTemplateRequest | TB.IndicesGetTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetTemplateResponse>;
getTemplate(this: That, params?: T.IndicesGetTemplateRequest | TB.IndicesGetTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetTemplateResponse, unknown>>;
getTemplate(this: That, params?: T.IndicesGetTemplateRequest | TB.IndicesGetTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesGetTemplateResponse>;
/**
* Migrates an alias to a data stream
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/data-streams.html | Elasticsearch API documentation}
*/
migrateToDataStream(this: That, params: T.IndicesMigrateToDataStreamRequest | TB.IndicesMigrateToDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesMigrateToDataStreamResponse>;
migrateToDataStream(this: That, params: T.IndicesMigrateToDataStreamRequest | TB.IndicesMigrateToDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesMigrateToDataStreamResponse, unknown>>;
migrateToDataStream(this: That, params: T.IndicesMigrateToDataStreamRequest | TB.IndicesMigrateToDataStreamRequest, options?: TransportRequestOptions): Promise<T.IndicesMigrateToDataStreamResponse>;
/**
* Modifies a data stream
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/data-streams.html | Elasticsearch API documentation}
*/
modifyDataStream(this: That, params: T.IndicesModifyDataStreamRequest | TB.IndicesModifyDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesModifyDataStreamResponse>;
modifyDataStream(this: That, params: T.IndicesModifyDataStreamRequest | TB.IndicesModifyDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesModifyDataStreamResponse, unknown>>;
modifyDataStream(this: That, params: T.IndicesModifyDataStreamRequest | TB.IndicesModifyDataStreamRequest, options?: TransportRequestOptions): Promise<T.IndicesModifyDataStreamResponse>;
/**
* Opens an index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-open-close.html | Elasticsearch API documentation}
*/
open(this: That, params: T.IndicesOpenRequest | TB.IndicesOpenRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesOpenResponse>;
open(this: That, params: T.IndicesOpenRequest | TB.IndicesOpenRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesOpenResponse, unknown>>;
open(this: That, params: T.IndicesOpenRequest | TB.IndicesOpenRequest, options?: TransportRequestOptions): Promise<T.IndicesOpenResponse>;
/**
* Promotes a data stream from a replicated data stream managed by CCR to a regular data stream
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/data-streams.html | Elasticsearch API documentation}
*/
promoteDataStream(this: That, params: T.IndicesPromoteDataStreamRequest | TB.IndicesPromoteDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesPromoteDataStreamResponse>;
promoteDataStream(this: That, params: T.IndicesPromoteDataStreamRequest | TB.IndicesPromoteDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesPromoteDataStreamResponse, unknown>>;
promoteDataStream(this: That, params: T.IndicesPromoteDataStreamRequest | TB.IndicesPromoteDataStreamRequest, options?: TransportRequestOptions): Promise<T.IndicesPromoteDataStreamResponse>;
/**
* Creates or updates an alias.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-aliases.html | Elasticsearch API documentation}
*/
putAlias(this: That, params: T.IndicesPutAliasRequest | TB.IndicesPutAliasRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesPutAliasResponse>;
putAlias(this: That, params: T.IndicesPutAliasRequest | TB.IndicesPutAliasRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesPutAliasResponse, unknown>>;
putAlias(this: That, params: T.IndicesPutAliasRequest | TB.IndicesPutAliasRequest, options?: TransportRequestOptions): Promise<T.IndicesPutAliasResponse>;
/**
* Updates the data lifecycle of the selected data streams.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/dlm-put-lifecycle.html | Elasticsearch API documentation}
*/
putDataLifecycle(this: That, params: T.IndicesPutDataLifecycleRequest | TB.IndicesPutDataLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesPutDataLifecycleResponse>;
putDataLifecycle(this: That, params: T.IndicesPutDataLifecycleRequest | TB.IndicesPutDataLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesPutDataLifecycleResponse, unknown>>;
putDataLifecycle(this: That, params: T.IndicesPutDataLifecycleRequest | TB.IndicesPutDataLifecycleRequest, options?: TransportRequestOptions): Promise<T.IndicesPutDataLifecycleResponse>;
/**
* Creates or updates an index template.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-templates.html | Elasticsearch API documentation}
*/
putIndexTemplate(this: That, params: T.IndicesPutIndexTemplateRequest | TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesPutIndexTemplateResponse>;
putIndexTemplate(this: That, params: T.IndicesPutIndexTemplateRequest | TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesPutIndexTemplateResponse, unknown>>;
putIndexTemplate(this: That, params: T.IndicesPutIndexTemplateRequest | TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesPutIndexTemplateResponse>;
/**
* Updates the index mappings.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-put-mapping.html | Elasticsearch API documentation}
*/
putMapping(this: That, params: T.IndicesPutMappingRequest | TB.IndicesPutMappingRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesPutMappingResponse>;
putMapping(this: That, params: T.IndicesPutMappingRequest | TB.IndicesPutMappingRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesPutMappingResponse, unknown>>;
putMapping(this: That, params: T.IndicesPutMappingRequest | TB.IndicesPutMappingRequest, options?: TransportRequestOptions): Promise<T.IndicesPutMappingResponse>;
/**
* Updates the index settings.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-update-settings.html | Elasticsearch API documentation}
*/
putSettings(this: That, params: T.IndicesPutSettingsRequest | TB.IndicesPutSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesPutSettingsResponse>;
putSettings(this: That, params: T.IndicesPutSettingsRequest | TB.IndicesPutSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesPutSettingsResponse, unknown>>;
putSettings(this: That, params: T.IndicesPutSettingsRequest | TB.IndicesPutSettingsRequest, options?: TransportRequestOptions): Promise<T.IndicesPutSettingsResponse>;
/**
* Creates or updates an index template.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-templates.html | Elasticsearch API documentation}
*/
putTemplate(this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesPutTemplateResponse>;
putTemplate(this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesPutTemplateResponse, unknown>>;
putTemplate(this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesPutTemplateResponse>;
/**
* Returns information about ongoing index shard recoveries.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-recovery.html | Elasticsearch API documentation}
*/
recovery(this: That, params?: T.IndicesRecoveryRequest | TB.IndicesRecoveryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesRecoveryResponse>;
recovery(this: That, params?: T.IndicesRecoveryRequest | TB.IndicesRecoveryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesRecoveryResponse, unknown>>;
recovery(this: That, params?: T.IndicesRecoveryRequest | TB.IndicesRecoveryRequest, options?: TransportRequestOptions): Promise<T.IndicesRecoveryResponse>;
/**
* Performs the refresh operation in one or more indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-refresh.html | Elasticsearch API documentation}
*/
refresh(this: That, params?: T.IndicesRefreshRequest | TB.IndicesRefreshRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesRefreshResponse>;
refresh(this: That, params?: T.IndicesRefreshRequest | TB.IndicesRefreshRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesRefreshResponse, unknown>>;
refresh(this: That, params?: T.IndicesRefreshRequest | TB.IndicesRefreshRequest, options?: TransportRequestOptions): Promise<T.IndicesRefreshResponse>;
/**
* Reloads an index's search analyzers and their resources.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-reload-analyzers.html | Elasticsearch API documentation}
*/
reloadSearchAnalyzers(this: That, params: T.IndicesReloadSearchAnalyzersRequest | TB.IndicesReloadSearchAnalyzersRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesReloadSearchAnalyzersResponse>;
reloadSearchAnalyzers(this: That, params: T.IndicesReloadSearchAnalyzersRequest | TB.IndicesReloadSearchAnalyzersRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesReloadSearchAnalyzersResponse, unknown>>;
reloadSearchAnalyzers(this: That, params: T.IndicesReloadSearchAnalyzersRequest | TB.IndicesReloadSearchAnalyzersRequest, options?: TransportRequestOptions): Promise<T.IndicesReloadSearchAnalyzersResponse>;
/**
* Returns information about any matching indices, aliases, and data streams
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-resolve-index-api.html | Elasticsearch API documentation}
*/
resolveIndex(this: That, params: T.IndicesResolveIndexRequest | TB.IndicesResolveIndexRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesResolveIndexResponse>;
resolveIndex(this: That, params: T.IndicesResolveIndexRequest | TB.IndicesResolveIndexRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesResolveIndexResponse, unknown>>;
resolveIndex(this: That, params: T.IndicesResolveIndexRequest | TB.IndicesResolveIndexRequest, options?: TransportRequestOptions): Promise<T.IndicesResolveIndexResponse>;
/**
* Updates an alias to point to a new index when the existing index is considered to be too large or too old.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-rollover-index.html | Elasticsearch API documentation}
*/
rollover(this: That, params: T.IndicesRolloverRequest | TB.IndicesRolloverRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesRolloverResponse>;
rollover(this: That, params: T.IndicesRolloverRequest | TB.IndicesRolloverRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesRolloverResponse, unknown>>;
rollover(this: That, params: T.IndicesRolloverRequest | TB.IndicesRolloverRequest, options?: TransportRequestOptions): Promise<T.IndicesRolloverResponse>;
/**
* Provides low-level information about segments in a Lucene index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-segments.html | Elasticsearch API documentation}
*/
segments(this: That, params?: T.IndicesSegmentsRequest | TB.IndicesSegmentsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesSegmentsResponse>;
segments(this: That, params?: T.IndicesSegmentsRequest | TB.IndicesSegmentsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesSegmentsResponse, unknown>>;
segments(this: That, params?: T.IndicesSegmentsRequest | TB.IndicesSegmentsRequest, options?: TransportRequestOptions): Promise<T.IndicesSegmentsResponse>;
/**
* Provides store information for shard copies of indices.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-shards-stores.html | Elasticsearch API documentation}
*/
shardStores(this: That, params?: T.IndicesShardStoresRequest | TB.IndicesShardStoresRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesShardStoresResponse>;
shardStores(this: That, params?: T.IndicesShardStoresRequest | TB.IndicesShardStoresRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesShardStoresResponse, unknown>>;
shardStores(this: That, params?: T.IndicesShardStoresRequest | TB.IndicesShardStoresRequest, options?: TransportRequestOptions): Promise<T.IndicesShardStoresResponse>;
/**
* Allow to shrink an existing index into a new index with fewer primary shards.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-shrink-index.html | Elasticsearch API documentation}
*/
shrink(this: That, params: T.IndicesShrinkRequest | TB.IndicesShrinkRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesShrinkResponse>;
shrink(this: That, params: T.IndicesShrinkRequest | TB.IndicesShrinkRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesShrinkResponse, unknown>>;
shrink(this: That, params: T.IndicesShrinkRequest | TB.IndicesShrinkRequest, options?: TransportRequestOptions): Promise<T.IndicesShrinkResponse>;
/**
* Simulate matching the given index name against the index templates in the system
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-templates.html | Elasticsearch API documentation}
*/
simulateIndexTemplate(this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesSimulateIndexTemplateResponse>;
simulateIndexTemplate(this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesSimulateIndexTemplateResponse, unknown>>;
simulateIndexTemplate(this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesSimulateIndexTemplateResponse>;
/**
* Simulate resolving the given template name or body
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-templates.html | Elasticsearch API documentation}
*/
simulateTemplate(this: That, params: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesSimulateTemplateResponse>;
simulateTemplate(this: That, params: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesSimulateTemplateResponse, unknown>>;
simulateTemplate(this: That, params: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesSimulateTemplateResponse>;
/**
* Allows you to split an existing index into a new index with more primary shards.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-split-index.html | Elasticsearch API documentation}
*/
split(this: That, params: T.IndicesSplitRequest | TB.IndicesSplitRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesSplitResponse>;
split(this: That, params: T.IndicesSplitRequest | TB.IndicesSplitRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesSplitResponse, unknown>>;
split(this: That, params: T.IndicesSplitRequest | TB.IndicesSplitRequest, options?: TransportRequestOptions): Promise<T.IndicesSplitResponse>;
/**
* Provides statistics on operations happening in an index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-stats.html | Elasticsearch API documentation}
*/
stats(this: That, params?: T.IndicesStatsRequest | TB.IndicesStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesStatsResponse>;
stats(this: That, params?: T.IndicesStatsRequest | TB.IndicesStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesStatsResponse, unknown>>;
stats(this: That, params?: T.IndicesStatsRequest | TB.IndicesStatsRequest, options?: TransportRequestOptions): Promise<T.IndicesStatsResponse>;
/**
* Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/unfreeze-index-api.html | Elasticsearch API documentation}
*/
unfreeze(this: That, params: T.IndicesUnfreezeRequest | TB.IndicesUnfreezeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesUnfreezeResponse>;
unfreeze(this: That, params: T.IndicesUnfreezeRequest | TB.IndicesUnfreezeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesUnfreezeResponse, unknown>>;
unfreeze(this: That, params: T.IndicesUnfreezeRequest | TB.IndicesUnfreezeRequest, options?: TransportRequestOptions): Promise<T.IndicesUnfreezeResponse>;
/**
* Updates index aliases.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/indices-aliases.html | Elasticsearch API documentation}
*/
updateAliases(this: That, params?: T.IndicesUpdateAliasesRequest | TB.IndicesUpdateAliasesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesUpdateAliasesResponse>;
updateAliases(this: That, params?: T.IndicesUpdateAliasesRequest | TB.IndicesUpdateAliasesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesUpdateAliasesResponse, unknown>>;
updateAliases(this: That, params?: T.IndicesUpdateAliasesRequest | TB.IndicesUpdateAliasesRequest, options?: TransportRequestOptions): Promise<T.IndicesUpdateAliasesResponse>;
/**
* Allows a user to validate a potentially expensive query without executing it.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/search-validate.html | Elasticsearch API documentation}
*/
validateQuery(this: That, params?: T.IndicesValidateQueryRequest | TB.IndicesValidateQueryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesValidateQueryResponse>;
validateQuery(this: That, params?: T.IndicesValidateQueryRequest | TB.IndicesValidateQueryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesValidateQueryResponse, unknown>>;
validateQuery(this: That, params?: T.IndicesValidateQueryRequest | TB.IndicesValidateQueryRequest, options?: TransportRequestOptions): Promise<T.IndicesValidateQueryResponse>;
}
export {};

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,14 @@
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
import * as T from '../types';
import * as TB from '../typesWithBodyKey';
interface That {
transport: Transport;
}
/**
* Returns basic information about the cluster.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/index.html | Elasticsearch API documentation}
*/
export default function InfoApi(this: That, params?: T.InfoRequest | TB.InfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InfoResponse>;
export default function InfoApi(this: That, params?: T.InfoRequest | TB.InfoRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.InfoResponse, unknown>>;
export default function InfoApi(this: That, params?: T.InfoRequest | TB.InfoRequest, options?: TransportRequestOptions): Promise<T.InfoResponse>;
export {};

Some files were not shown because too many files have changed in this diff Show more