import * as HttpClient from "@effect/platform/HttpClient";
import type * as HttpClientError from "@effect/platform/HttpClientError";
import * as Context from "effect/Context";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as Schema from "effect/Schema";
import * as Stream from "effect/Stream";
import * as Error from "./Error.ts";
export declare const JsonLinesErrorUnion: Schema.Union<[typeof Error.DatasetStoreError, typeof Error.PlanningError, typeof Error.CatalogForSqlError]>;
/**
 * Error type for the json lines api service.
 */
export type JsonLinesError = Error.DatasetStoreError | Error.PlanningError | Error.CatalogForSqlError;
declare const JsonLines_base: Context.TagClass<JsonLines, "Amp/JsonLines", {
    /**
     * Creates a stream of results from a sql query.
     *
     * @param schema - The schema of the results.
     * @param sql - The sql query to execute.
     * @returns A stream of results.
     */
    readonly stream: {
        <A, I, R>(schema: Schema.Schema<A, I, R>): (sql: TemplateStringsArray) => Stream.Stream<A, HttpClientError.HttpClientError | JsonLinesError, R>;
        <A, I, R>(schema: Schema.Schema<A, I, R>): (sql: string) => Stream.Stream<A, HttpClientError.HttpClientError | JsonLinesError, R>;
    };
    /**
     * Queries the json lines api and returns the results.
     *
     * @param schema - The schema of the results.
     * @param sql - The sql query to execute.
     * @returns The results.
     */
    readonly query: {
        <A, I, R>(schema: Schema.Schema<A, I, R>): (sql: TemplateStringsArray) => Effect.Effect<Array<A>, HttpClientError.HttpClientError | JsonLinesError, R>;
        <A, I, R>(schema: Schema.Schema<A, I, R>): (sql: string) => Effect.Effect<Array<A>, HttpClientError.HttpClientError | JsonLinesError, R>;
    };
}>;
/**
 * Service definition for the jsonl api.
 */
export declare class JsonLines extends JsonLines_base {
}
/**
 * Creates a json lines api service.
 *
 * @param url - The url for the json lines api.
 * @returns The json lines api service.
 */
export declare const make: (url: string) => Effect.Effect<{
    stream: {
        <A, I, R>(schema: Schema.Schema<A, I, R>): (sql: TemplateStringsArray) => Stream.Stream<A, HttpClientError.HttpClientError | JsonLinesError, R>;
        <A, I, R>(schema: Schema.Schema<A, I, R>): (sql: string) => Stream.Stream<A, HttpClientError.HttpClientError | JsonLinesError, R>;
    };
    query: {
        <A, I, R>(schema: Schema.Schema<A, I, R>): (sql: TemplateStringsArray) => Effect.Effect<Array<A>, HttpClientError.HttpClientError | JsonLinesError, R>;
        <A, I, R>(schema: Schema.Schema<A, I, R>): (sql: string) => Effect.Effect<Array<A>, HttpClientError.HttpClientError | JsonLinesError, R>;
    };
}, never, HttpClient.HttpClient>;
/**
 * Creates a json lines api service layer.
 *
 * @param url - The url for the json lines api.
 * @returns The json lines api service layer.
 */
export declare const layer: (url: string) => Layer.Layer<JsonLines, never, never>;
export {};
//# sourceMappingURL=JsonLines.d.ts.map