/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import { StreamPosition$inboundSchema, StreamPosition$outboundSchema, } from "./streamposition.js";
/** @internal */
export const TailResponse$inboundSchema = z.object({
    tail: StreamPosition$inboundSchema,
});
/** @internal */
export const TailResponse$outboundSchema = z.object({
    tail: StreamPosition$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var TailResponse$;
(function (TailResponse$) {
    /** @deprecated use `TailResponse$inboundSchema` instead. */
    TailResponse$.inboundSchema = TailResponse$inboundSchema;
    /** @deprecated use `TailResponse$outboundSchema` instead. */
    TailResponse$.outboundSchema = TailResponse$outboundSchema;
})(TailResponse$ || (TailResponse$ = {}));
export function tailResponseToJSON(tailResponse) {
    return JSON.stringify(TailResponse$outboundSchema.parse(tailResponse));
}
export function tailResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => TailResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TailResponse' from JSON`);
}
//# sourceMappingURL=tailresponse.js.map