/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const SelectMessageEventEntityType = {
    Message: "message",
};
/** @internal */
export const SelectMessageEventEntityType$inboundSchema = z.nativeEnum(SelectMessageEventEntityType);
/** @internal */
export const SelectMessageEventEntityType$outboundSchema = SelectMessageEventEntityType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SelectMessageEventEntityType$;
(function (SelectMessageEventEntityType$) {
    /** @deprecated use `SelectMessageEventEntityType$inboundSchema` instead. */
    SelectMessageEventEntityType$.inboundSchema = SelectMessageEventEntityType$inboundSchema;
    /** @deprecated use `SelectMessageEventEntityType$outboundSchema` instead. */
    SelectMessageEventEntityType$.outboundSchema = SelectMessageEventEntityType$outboundSchema;
})(SelectMessageEventEntityType$ || (SelectMessageEventEntityType$ = {}));
/** @internal */
export const SelectMessageEvent$inboundSchema = z.object({
    id: z.string(),
    type: z.string(),
    messageId: z.string(),
    createdAt: z.string(),
    projectId: z.nullable(z.string()),
    integrationId: z.nullable(z.string()),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
    entityType: SelectMessageEventEntityType$inboundSchema,
});
/** @internal */
export const SelectMessageEvent$outboundSchema = z.object({
    id: z.string(),
    type: z.string(),
    messageId: z.string(),
    createdAt: z.string(),
    projectId: z.nullable(z.string()),
    integrationId: z.nullable(z.string()),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
    entityType: SelectMessageEventEntityType$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SelectMessageEvent$;
(function (SelectMessageEvent$) {
    /** @deprecated use `SelectMessageEvent$inboundSchema` instead. */
    SelectMessageEvent$.inboundSchema = SelectMessageEvent$inboundSchema;
    /** @deprecated use `SelectMessageEvent$outboundSchema` instead. */
    SelectMessageEvent$.outboundSchema = SelectMessageEvent$outboundSchema;
})(SelectMessageEvent$ || (SelectMessageEvent$ = {}));
export function selectMessageEventToJSON(selectMessageEvent) {
    return JSON.stringify(SelectMessageEvent$outboundSchema.parse(selectMessageEvent));
}
export function selectMessageEventFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SelectMessageEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SelectMessageEvent' from JSON`);
}
//# sourceMappingURL=selectmessageevent.js.map