/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: e19d33d1244c
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const ResponseErrorEvent$inboundSchema = z.object({
    type: z.literal("conversation.response.error"),
    created_at: z.iso.datetime({ offset: true }).transform(v => new Date(v))
        .optional(),
    message: z.string(),
    code: z.int(),
}).transform((v) => {
    return remap$(v, {
        "created_at": "createdAt",
    });
});
export function responseErrorEventFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseErrorEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseErrorEvent' from JSON`);
}
//# sourceMappingURL=responseerrorevent.js.map