import * as z from "zod";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { SequencedRecordBatch, SequencedRecordBatch$Outbound } from "./sequencedrecordbatch.js";
/**
 * Sequence number for the next record on this stream, in case the requested `start_seq_num` was larger.
 *
 * @remarks
 * If returned in a streaming read session, this will be a terminal reply.
 */
export type NextSeqNum = {
    /**
     * Sequence number for the next record on this stream, in case the requested `start_seq_num` was larger.
     *
     * @remarks
     * If returned in a streaming read session, this will be a terminal reply.
     */
    nextSeqNum: number;
};
/**
 * Sequence number for the first record on this stream, in case the requested `start_seq_num` is smaller.
 *
 * @remarks
 * If returned in a streaming read session, this will be a terminal reply, to signal that there is uncertainty about whether some records may be omitted.
 * The client can re-establish the session starting at this sequence number.
 */
export type FirstSeqNum = {
    /**
     * Sequence number for the first record on this stream, in case the requested `start_seq_num` is smaller.
     *
     * @remarks
     * If returned in a streaming read session, this will be a terminal reply, to signal that there is uncertainty about whether some records may be omitted.
     * The client can re-establish the session starting at this sequence number.
     */
    firstSeqNum: number;
};
/**
 * Batch of records.
 *
 * @remarks
 * This batch can be empty only if a `ReadLimit` was provided in the associated read request, but the first record
 * that could have been returned would violate the limit.
 */
export type Batch = {
    /**
     * A batch of sequenced records.
     */
    batch: SequencedRecordBatch;
};
/**
 * Reply which can be a batch of records, or a sequence number if the request could not be satisfied.
 */
export type Output = Batch | FirstSeqNum | NextSeqNum;
/** @internal */
export declare const NextSeqNum$inboundSchema: z.ZodType<NextSeqNum, z.ZodTypeDef, unknown>;
/** @internal */
export type NextSeqNum$Outbound = {
    next_seq_num: number;
};
/** @internal */
export declare const NextSeqNum$outboundSchema: z.ZodType<NextSeqNum$Outbound, z.ZodTypeDef, NextSeqNum>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace NextSeqNum$ {
    /** @deprecated use `NextSeqNum$inboundSchema` instead. */
    const inboundSchema: z.ZodType<NextSeqNum, z.ZodTypeDef, unknown>;
    /** @deprecated use `NextSeqNum$outboundSchema` instead. */
    const outboundSchema: z.ZodType<NextSeqNum$Outbound, z.ZodTypeDef, NextSeqNum>;
    /** @deprecated use `NextSeqNum$Outbound` instead. */
    type Outbound = NextSeqNum$Outbound;
}
export declare function nextSeqNumToJSON(nextSeqNum: NextSeqNum): string;
export declare function nextSeqNumFromJSON(jsonString: string): SafeParseResult<NextSeqNum, SDKValidationError>;
/** @internal */
export declare const FirstSeqNum$inboundSchema: z.ZodType<FirstSeqNum, z.ZodTypeDef, unknown>;
/** @internal */
export type FirstSeqNum$Outbound = {
    first_seq_num: number;
};
/** @internal */
export declare const FirstSeqNum$outboundSchema: z.ZodType<FirstSeqNum$Outbound, z.ZodTypeDef, FirstSeqNum>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace FirstSeqNum$ {
    /** @deprecated use `FirstSeqNum$inboundSchema` instead. */
    const inboundSchema: z.ZodType<FirstSeqNum, z.ZodTypeDef, unknown>;
    /** @deprecated use `FirstSeqNum$outboundSchema` instead. */
    const outboundSchema: z.ZodType<FirstSeqNum$Outbound, z.ZodTypeDef, FirstSeqNum>;
    /** @deprecated use `FirstSeqNum$Outbound` instead. */
    type Outbound = FirstSeqNum$Outbound;
}
export declare function firstSeqNumToJSON(firstSeqNum: FirstSeqNum): string;
export declare function firstSeqNumFromJSON(jsonString: string): SafeParseResult<FirstSeqNum, SDKValidationError>;
/** @internal */
export declare const Batch$inboundSchema: z.ZodType<Batch, z.ZodTypeDef, unknown>;
/** @internal */
export type Batch$Outbound = {
    batch: SequencedRecordBatch$Outbound;
};
/** @internal */
export declare const Batch$outboundSchema: z.ZodType<Batch$Outbound, z.ZodTypeDef, Batch>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace Batch$ {
    /** @deprecated use `Batch$inboundSchema` instead. */
    const inboundSchema: z.ZodType<Batch, z.ZodTypeDef, unknown>;
    /** @deprecated use `Batch$outboundSchema` instead. */
    const outboundSchema: z.ZodType<Batch$Outbound, z.ZodTypeDef, Batch>;
    /** @deprecated use `Batch$Outbound` instead. */
    type Outbound = Batch$Outbound;
}
export declare function batchToJSON(batch: Batch): string;
export declare function batchFromJSON(jsonString: string): SafeParseResult<Batch, SDKValidationError>;
/** @internal */
export declare const Output$inboundSchema: z.ZodType<Output, z.ZodTypeDef, unknown>;
/** @internal */
export type Output$Outbound = Batch$Outbound | FirstSeqNum$Outbound | NextSeqNum$Outbound;
/** @internal */
export declare const Output$outboundSchema: z.ZodType<Output$Outbound, z.ZodTypeDef, Output>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace Output$ {
    /** @deprecated use `Output$inboundSchema` instead. */
    const inboundSchema: z.ZodType<Output, z.ZodTypeDef, unknown>;
    /** @deprecated use `Output$outboundSchema` instead. */
    const outboundSchema: z.ZodType<Output$Outbound, z.ZodTypeDef, Output>;
    /** @deprecated use `Output$Outbound` instead. */
    type Outbound = Output$Outbound;
}
export declare function outputToJSON(output: Output): string;
export declare function outputFromJSON(jsonString: string): SafeParseResult<Output, SDKValidationError>;
//# sourceMappingURL=output.d.ts.map