import { AppendOutput, BasinConfig, BasinInfo, CheckTailResponse, CreateBasinRequest, CreateStreamRequest, Output, ReadResponse, StreamConfig, StreamInfo } from "./models/components";
import { ListBasinsRequest, ListBasinsResponse, ListStreamsRequest, ListStreamsResponse, ReadRequest as ReadRequestInner, AppendRequest as AppendRequestInner } from "./models/operations";
import { PageIterator } from "./types";
import { S2Endpoints } from "./endpoints";
import { HTTPClient } from "./lib/http";
export type ReadRequest = Omit<ReadRequestInner, "stream">;
export type AppendRequest = Omit<AppendRequestInner, "stream">;
export type { GetBasinConfigRequest, ListBasinsRequest, ListBasinsResponse, ListStreamsRequest, ListStreamsResponse, ReconfigureBasinRequest, } from "./models/operations";
export type { BasinConfig, BasinInfo, CheckTailResponse, CreateBasinRequest, CreateStreamRequest, Output, ReadResponse, StreamConfig, StreamInfo, } from "./models/components";
export * from "./endpoints";
export type S2ClientConfig = {
    authToken?: string;
    userAgent?: string;
    requestTimeout?: number;
    endpoints?: S2Endpoints;
    appedRetryPolicy?: AppendRetryPolicy;
    maxRetries?: number;
    initialBackoffMs?: number;
    maxBackoffMs?: number;
    httpClient?: HTTPClient;
};
/**
 * Override the client level configuration for a specific operation.
 *
 * @remarks
 * Only `authToken` can be overridden for now.
 */
export type S2OperationConfig = {
    authToken?: string;
};
/**
 * Retry policy for appends.
 */
export declare enum AppendRetryPolicy {
    /**
     * Retry all eligible failures encountered during an append.
     * This could result in append batches being duplicated on the stream.
     */
    All = 0,
    /**
     * Retry only failures with no side effects.
     * Will not attempt to retry failures where it cannot be concluded whether an append may become durable, in order to prevent duplicates.
     */
    NoSideEffects = 1
}
export declare class S2Client {
    private config;
    private _account?;
    get account(): S2Account;
    private _basin?;
    basin(basinName: string): S2Basin;
    constructor(config?: S2ClientConfig);
}
declare class S2Account {
    private _account;
    private config;
    private readonly accountURLSuffx;
    constructor(config: S2ClientConfig);
    get URL(): string;
    basin(basinName: string): S2Basin;
    private overrideConfig;
    listBasins(request?: ListBasinsRequest, opConfig?: S2OperationConfig): Promise<PageIterator<ListBasinsResponse, {
        cursor: string;
    }>>;
    getBasinConfig(basin: string, opConfig?: S2OperationConfig): Promise<BasinConfig | undefined>;
    createBasin(basin: string, request?: CreateBasinRequest, opConfig?: S2OperationConfig): Promise<BasinInfo | undefined>;
    deleteBasin(basin: string, if_exists?: boolean, opConfig?: S2OperationConfig): Promise<void>;
    reconfigureBasin(basin: string, config: BasinConfig, opConfig?: S2OperationConfig): Promise<BasinConfig | undefined>;
}
declare class S2Basin {
    private _basin;
    private _stream;
    private basinName;
    private config;
    private clientKind;
    private readonly basinURLSuffx;
    private get URL();
    constructor(basinName: string, config: S2ClientConfig);
    stream(streamName: string): Stream;
    private overrideConfig;
    listStreams(request?: ListStreamsRequest, opConfig?: S2OperationConfig): Promise<PageIterator<ListStreamsResponse, {
        cursor: string;
    }>>;
    getStreamConfig(stream: string, opConfig?: S2OperationConfig): Promise<StreamConfig | undefined>;
    createStream(stream: string, request?: CreateStreamRequest, opConfig?: S2OperationConfig): Promise<StreamInfo | undefined>;
    deleteStream(stream: string, if_exists?: boolean, opConfig?: S2OperationConfig): Promise<void | undefined>;
    reconfigureStream(stream: string, config: StreamConfig, opConfig?: S2OperationConfig): Promise<StreamConfig>;
}
declare class Stream {
    private _stream;
    private streamName;
    private config;
    private clientKind;
    private readonly basinURLSuffx;
    private get basinURL();
    private overrideConfig;
    constructor(basinName: string, streamName: string, config: S2ClientConfig);
    checkTail(opConfig?: S2OperationConfig): Promise<CheckTailResponse>;
    append(request: AppendRequest, opConfig?: S2OperationConfig): Promise<AppendOutput>;
    read(request: ReadRequest, opConfig?: S2OperationConfig): Promise<Output>;
    readStream(request: ReadRequest, opConfig?: S2OperationConfig): AsyncGenerator<ReadResponse, void, undefined>;
}
export declare function genS2RequestToken(): string;
//# sourceMappingURL=index.extras.d.ts.map