import { BaseToolOptions, Tool, JSONToolOutput, ToolEmitter, ToolInput, BaseToolRunOptions } from '../base.cjs';
import { RunContext } from '../../context.cjs';
import { z } from 'zod';
import { AnyToolSchemaLike } from '../../internals/helpers/schema.cjs';
import { ClientOptions, estypes, Client } from '@elastic/elasticsearch';
import 'ajv';
import '../../errors.cjs';
import '../../internals/types.cjs';
import '../../internals/helpers/guards.cjs';
import '../../internals/serializable.cjs';
import 'promise-based-task';
import '../../cache/base.cjs';
import '../../emitter-BWtGHYn0.cjs';
import '../../internals/helpers/promise.cjs';
import 'zod-to-json-schema';

/**
 * Copyright 2025 IBM Corp.
 *
 * Licensed 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.
 */

interface ElasticSearchToolOptions extends BaseToolOptions {
    connection: ClientOptions;
}
type ElasticSearchToolResult = estypes.CatIndicesResponse | estypes.IndicesGetMappingResponse | estypes.SearchResponse;
declare const ElasticSearchAction: {
    readonly ListIndices: "LIST_INDICES";
    readonly GetIndexDetails: "GET_INDEX_DETAILS";
    readonly Search: "SEARCH";
};
declare class ElasticSearchTool extends Tool<JSONToolOutput<ElasticSearchToolResult>, ElasticSearchToolOptions> {
    name: string;
    description: string;
    inputSchema(): z.ZodObject<{
        action: z.ZodNativeEnum<{
            readonly ListIndices: "LIST_INDICES";
            readonly GetIndexDetails: "GET_INDEX_DETAILS";
            readonly Search: "SEARCH";
        }>;
        indexName: z.ZodOptional<z.ZodString>;
        query: z.ZodOptional<z.ZodString>;
        start: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
        size: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
    }, "strip", z.ZodTypeAny, {
        action: "LIST_INDICES" | "GET_INDEX_DETAILS" | "SEARCH";
        start?: number | undefined;
        query?: string | undefined;
        indexName?: string | undefined;
        size?: number | undefined;
    }, {
        action: "LIST_INDICES" | "GET_INDEX_DETAILS" | "SEARCH";
        start?: number | undefined;
        query?: string | undefined;
        indexName?: string | undefined;
        size?: number | undefined;
    }>;
    readonly emitter: ToolEmitter<ToolInput<this>, JSONToolOutput<ElasticSearchToolResult>>;
    protected validateInput(schema: AnyToolSchemaLike, input: unknown): asserts input is ToolInput<this>;
    constructor(options: ElasticSearchToolOptions);
    protected client(): Promise<Client>;
    protected _run(input: ToolInput<this>, _options: Partial<BaseToolRunOptions>, run: RunContext<this>): Promise<JSONToolOutput<any>>;
    protected listIndices(signal?: AbortSignal): Promise<estypes.CatIndicesResponse>;
    protected getIndexDetails(input: ToolInput<this>, signal: AbortSignal): Promise<estypes.IndicesGetMappingResponse>;
    protected search(input: ToolInput<this>, signal: AbortSignal): Promise<estypes.SearchResponse>;
}

export { ElasticSearchAction, ElasticSearchTool, type ElasticSearchToolOptions, type ElasticSearchToolResult };
