import * as z from "zod";
import { Result as SafeParseResult } from "../../types/fp.js";
import { S2Error } from "./s2error.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
/**
 * Sequence number did not match the tail of the stream.
 *
 * @remarks
 * The expected next sequence number is returned.
 */
export type SeqNumData = {
    /**
     * Sequence number did not match the tail of the stream.
     *
     * @remarks
     * The expected next sequence number is returned.
     */
    seqNumMismatch: number;
};
/**
 * Sequence number did not match the tail of the stream.
 *
 * @remarks
 * The expected next sequence number is returned.
 */
export declare class SeqNum extends S2Error {
    /**
     * Sequence number did not match the tail of the stream.
     *
     * @remarks
     * The expected next sequence number is returned.
     */
    seqNumMismatch: number;
    /** The original data that was passed to this error instance. */
    data$: SeqNumData;
    constructor(err: SeqNumData, httpMeta: {
        response: Response;
        request: Request;
        body: string;
    });
}
/**
 * Fencing token did not match.
 *
 * @remarks
 * The expected fencing token is returned.
 */
export type FencingTokenData = {
    /**
     * Fencing token did not match.
     *
     * @remarks
     * The expected fencing token is returned.
     */
    fencingTokenMismatch: string;
};
/**
 * Fencing token did not match.
 *
 * @remarks
 * The expected fencing token is returned.
 */
export declare class FencingToken extends S2Error {
    /**
     * Fencing token did not match.
     *
     * @remarks
     * The expected fencing token is returned.
     */
    fencingTokenMismatch: string;
    /** The original data that was passed to this error instance. */
    data$: FencingTokenData;
    constructor(err: FencingTokenData, httpMeta: {
        response: Response;
        request: Request;
        body: string;
    });
}
/**
 * Aborted due to a failed condition.
 */
export type AppendConditionFailed = FencingToken | SeqNum;
/** @internal */
export declare const SeqNum$inboundSchema: z.ZodType<SeqNum, z.ZodTypeDef, unknown>;
/** @internal */
export type SeqNum$Outbound = {
    seq_num_mismatch: number;
};
/** @internal */
export declare const SeqNum$outboundSchema: z.ZodType<SeqNum$Outbound, z.ZodTypeDef, SeqNum>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace SeqNum$ {
    /** @deprecated use `SeqNum$inboundSchema` instead. */
    const inboundSchema: z.ZodType<SeqNum, z.ZodTypeDef, unknown>;
    /** @deprecated use `SeqNum$outboundSchema` instead. */
    const outboundSchema: z.ZodType<SeqNum$Outbound, z.ZodTypeDef, SeqNum>;
    /** @deprecated use `SeqNum$Outbound` instead. */
    type Outbound = SeqNum$Outbound;
}
/** @internal */
export declare const FencingToken$inboundSchema: z.ZodType<FencingToken, z.ZodTypeDef, unknown>;
/** @internal */
export type FencingToken$Outbound = {
    fencing_token_mismatch: string;
};
/** @internal */
export declare const FencingToken$outboundSchema: z.ZodType<FencingToken$Outbound, z.ZodTypeDef, FencingToken>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace FencingToken$ {
    /** @deprecated use `FencingToken$inboundSchema` instead. */
    const inboundSchema: z.ZodType<FencingToken, z.ZodTypeDef, unknown>;
    /** @deprecated use `FencingToken$outboundSchema` instead. */
    const outboundSchema: z.ZodType<FencingToken$Outbound, z.ZodTypeDef, FencingToken>;
    /** @deprecated use `FencingToken$Outbound` instead. */
    type Outbound = FencingToken$Outbound;
}
/** @internal */
export declare const AppendConditionFailed$inboundSchema: z.ZodType<AppendConditionFailed, z.ZodTypeDef, unknown>;
/** @internal */
export type AppendConditionFailed$Outbound = FencingToken$Outbound | SeqNum$Outbound;
/** @internal */
export declare const AppendConditionFailed$outboundSchema: z.ZodType<AppendConditionFailed$Outbound, z.ZodTypeDef, AppendConditionFailed>;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export declare namespace AppendConditionFailed$ {
    /** @deprecated use `AppendConditionFailed$inboundSchema` instead. */
    const inboundSchema: z.ZodType<AppendConditionFailed, z.ZodTypeDef, unknown>;
    /** @deprecated use `AppendConditionFailed$outboundSchema` instead. */
    const outboundSchema: z.ZodType<AppendConditionFailed$Outbound, z.ZodTypeDef, AppendConditionFailed>;
    /** @deprecated use `AppendConditionFailed$Outbound` instead. */
    type Outbound = AppendConditionFailed$Outbound;
}
export declare function appendConditionFailedToJSON(appendConditionFailed: AppendConditionFailed): string;
export declare function appendConditionFailedFromJSON(jsonString: string): SafeParseResult<AppendConditionFailed, SDKValidationError>;
//# sourceMappingURL=appendconditionfailed.d.ts.map