import { type Client, type Transport } from "@connectrpc/connect";
import type { RecordBatch } from "apache-arrow";
import * as Context from "effect/Context";
import * as Layer from "effect/Layer";
import * as Stream from "effect/Stream";
import * as Model from "../Model.ts";
import * as Flight from "../proto/Flight_pb.ts";
export * as Flight from "../proto/Flight_pb.ts";
export * as FlightSql from "../proto/FlightSql_pb.ts";
declare const ResponseBatch_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
    readonly _tag: "ResponseBatch";
};
/**
 * A record batch with metadata.
 */
export declare class ResponseBatch extends ResponseBatch_base<{
    data: RecordBatch;
    metadata: Model.RecordBatchMetadata;
}> {
}
declare const ArrowFlightError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
    readonly _tag: "ArrowFlightError";
} & Readonly<A>;
/**
 * Error type for the Arrow Flight service.
 */
export declare class ArrowFlightError extends ArrowFlightError_base<{
    cause?: unknown;
    message: string;
}> {
}
declare const ArrowFlight_base: Context.TagClass<ArrowFlight, "Amp/ArrowFlight", {
    /**
     * The client for the Arrow Flight service.
     */
    readonly client: Client<typeof Flight.FlightService>;
    /**
     * A stream of record batches from a sql query.
     *
     * @param sql - The sql query to execute.
     * @param watermark - Optional resume watermark for streaming.
     * @returns A stream of record batches.
     */
    readonly stream: {
        (sql: TemplateStringsArray): Stream.Stream<ResponseBatch, ArrowFlightError>;
        (sql: string): Stream.Stream<ResponseBatch, ArrowFlightError>;
    };
}>;
/**
 * Service definition for the Arrow Flight api.
 */
export declare class ArrowFlight extends ArrowFlight_base {
}
/**
 * Creates a new Arrow Flight service instance.
 *
 * @param transport - The transport to use for the Arrow Flight service instance.
 * @returns A new Arrow Flight service instance.
 */
export declare const make: (transport: Transport) => {
    client: Client<import("@bufbuild/protobuf/codegenv1").GenService<{
        handshake: {
            methodKind: "bidi_streaming";
            input: typeof Flight.HandshakeRequestSchema;
            output: typeof Flight.HandshakeResponseSchema;
        };
        listFlights: {
            methodKind: "server_streaming";
            input: typeof Flight.CriteriaSchema;
            output: typeof Flight.FlightInfoSchema;
        };
        getFlightInfo: {
            methodKind: "unary";
            input: typeof Flight.FlightDescriptorSchema;
            output: typeof Flight.FlightInfoSchema;
        };
        pollFlightInfo: {
            methodKind: "unary";
            input: typeof Flight.FlightDescriptorSchema;
            output: typeof Flight.PollInfoSchema;
        };
        getSchema: {
            methodKind: "unary";
            input: typeof Flight.FlightDescriptorSchema;
            output: typeof Flight.SchemaResultSchema;
        };
        doGet: {
            methodKind: "server_streaming";
            input: typeof Flight.TicketSchema;
            output: typeof Flight.FlightDataSchema;
        };
        doPut: {
            methodKind: "bidi_streaming";
            input: typeof Flight.FlightDataSchema;
            output: typeof Flight.PutResultSchema;
        };
        doExchange: {
            methodKind: "bidi_streaming";
            input: typeof Flight.FlightDataSchema;
            output: typeof Flight.FlightDataSchema;
        };
        doAction: {
            methodKind: "server_streaming";
            input: typeof Flight.ActionSchema;
            output: typeof Flight.ResultSchema;
        };
        listActions: {
            methodKind: "server_streaming";
            input: typeof Flight.EmptySchema;
            output: typeof Flight.ActionTypeSchema;
        };
    }>>;
    stream: {
        (sql: TemplateStringsArray): Stream.Stream<ResponseBatch, ArrowFlightError>;
        (sql: string): Stream.Stream<ResponseBatch, ArrowFlightError>;
    };
};
/**
 * Creates a layer for the Arrow Flight service.
 *
 * @param transport - The transport to use for the Arrow Flight service.
 * @returns A layer for the Arrow Flight service.
 */
export declare const layer: (transport: Transport) => Layer.Layer<ArrowFlight, never, never>;
//# sourceMappingURL=ArrowFlight.d.ts.map