/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { InsertConversationEvent$inboundSchema, InsertConversationEvent$outboundSchema, } from "./insertconversationevent.js";
import { InsertMessageEvent$inboundSchema, InsertMessageEvent$outboundSchema, } from "./insertmessageevent.js";
import { InsertSearchEvent$inboundSchema, InsertSearchEvent$outboundSchema, } from "./insertsearchevent.js";
/** @internal */
export const InsertEvent$inboundSchema = z.union([
    InsertMessageEvent$inboundSchema,
    InsertConversationEvent$inboundSchema,
    InsertSearchEvent$inboundSchema,
]);
/** @internal */
export const InsertEvent$outboundSchema = z.union([
    InsertMessageEvent$outboundSchema,
    InsertConversationEvent$outboundSchema,
    InsertSearchEvent$outboundSchema,
]);
export function insertEventToJSON(insertEvent) {
    return JSON.stringify(InsertEvent$outboundSchema.parse(insertEvent));
}
export function insertEventFromJSON(jsonString) {
    return safeParse(jsonString, (x) => InsertEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InsertEvent' from JSON`);
}
//# sourceMappingURL=insertevent.js.map