/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const SelectSearchEventEntityType = {
    Search: "search",
};
/** @internal */
export const SelectSearchEventEntityType$inboundSchema = z.nativeEnum(SelectSearchEventEntityType);
/** @internal */
export const SelectSearchEventEntityType$outboundSchema = SelectSearchEventEntityType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SelectSearchEventEntityType$;
(function (SelectSearchEventEntityType$) {
    /** @deprecated use `SelectSearchEventEntityType$inboundSchema` instead. */
    SelectSearchEventEntityType$.inboundSchema = SelectSearchEventEntityType$inboundSchema;
    /** @deprecated use `SelectSearchEventEntityType$outboundSchema` instead. */
    SelectSearchEventEntityType$.outboundSchema = SelectSearchEventEntityType$outboundSchema;
})(SelectSearchEventEntityType$ || (SelectSearchEventEntityType$ = {}));
/** @internal */
export const SelectSearchEvent$inboundSchema = z.object({
    id: z.string(),
    type: z.string(),
    searchQuery: 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: SelectSearchEventEntityType$inboundSchema,
});
/** @internal */
export const SelectSearchEvent$outboundSchema = z.object({
    id: z.string(),
    type: z.string(),
    searchQuery: 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: SelectSearchEventEntityType$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SelectSearchEvent$;
(function (SelectSearchEvent$) {
    /** @deprecated use `SelectSearchEvent$inboundSchema` instead. */
    SelectSearchEvent$.inboundSchema = SelectSearchEvent$inboundSchema;
    /** @deprecated use `SelectSearchEvent$outboundSchema` instead. */
    SelectSearchEvent$.outboundSchema = SelectSearchEvent$outboundSchema;
})(SelectSearchEvent$ || (SelectSearchEvent$ = {}));
export function selectSearchEventToJSON(selectSearchEvent) {
    return JSON.stringify(SelectSearchEvent$outboundSchema.parse(selectSearchEvent));
}
export function selectSearchEventFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SelectSearchEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SelectSearchEvent' from JSON`);
}
//# sourceMappingURL=selectsearchevent.js.map