/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: b6143be31167
 */
import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const TextChunk$inboundSchema = z.object({
    type: z.literal("text").default("text"),
    text: z.string(),
});
/** @internal */
export const TextChunk$outboundSchema = z.object({
    type: z.literal("text").default("text"),
    text: z.string(),
});
export function textChunkToJSON(textChunk) {
    return JSON.stringify(TextChunk$outboundSchema.parse(textChunk));
}
export function textChunkFromJSON(jsonString) {
    return safeParse(jsonString, (x) => TextChunk$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TextChunk' from JSON`);
}
//# sourceMappingURL=textchunk.js.map