/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const InsertConversationEventEntityType = {
    Conversation: "conversation",
};
/** @internal */
export const InsertConversationEventEntityType$inboundSchema = z.nativeEnum(InsertConversationEventEntityType);
/** @internal */
export const InsertConversationEventEntityType$outboundSchema = InsertConversationEventEntityType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InsertConversationEventEntityType$;
(function (InsertConversationEventEntityType$) {
    /** @deprecated use `InsertConversationEventEntityType$inboundSchema` instead. */
    InsertConversationEventEntityType$.inboundSchema = InsertConversationEventEntityType$inboundSchema;
    /** @deprecated use `InsertConversationEventEntityType$outboundSchema` instead. */
    InsertConversationEventEntityType$.outboundSchema = InsertConversationEventEntityType$outboundSchema;
})(InsertConversationEventEntityType$ || (InsertConversationEventEntityType$ = {}));
/** @internal */
export const InsertConversationEvent$inboundSchema = z.object({
    id: z.string().optional(),
    type: z.string(),
    conversationId: z.string(),
    createdAt: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    projectId: z.nullable(z.string()).optional(),
    integrationId: z.nullable(z.string()).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
    entityType: InsertConversationEventEntityType$inboundSchema,
});
/** @internal */
export const InsertConversationEvent$outboundSchema = z.object({
    id: z.string().optional(),
    type: z.string(),
    conversationId: z.string(),
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    projectId: z.nullable(z.string()).optional(),
    integrationId: z.nullable(z.string()).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
    entityType: InsertConversationEventEntityType$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InsertConversationEvent$;
(function (InsertConversationEvent$) {
    /** @deprecated use `InsertConversationEvent$inboundSchema` instead. */
    InsertConversationEvent$.inboundSchema = InsertConversationEvent$inboundSchema;
    /** @deprecated use `InsertConversationEvent$outboundSchema` instead. */
    InsertConversationEvent$.outboundSchema = InsertConversationEvent$outboundSchema;
})(InsertConversationEvent$ || (InsertConversationEvent$ = {}));
export function insertConversationEventToJSON(insertConversationEvent) {
    return JSON.stringify(InsertConversationEvent$outboundSchema.parse(insertConversationEvent));
}
export function insertConversationEventFromJSON(jsonString) {
    return safeParse(jsonString, (x) => InsertConversationEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InsertConversationEvent' from JSON`);
}
//# sourceMappingURL=insertconversationevent.js.map