import { z } from "zod";
import { customScalars } from "./index.js";
export const SerializableSchema = z.lazy(() => z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.null(),
    z.array(SerializableSchema),
    z.record(z.string(), SerializableSchema),
]));
export function isSerializable(value) {
    const result = SerializableSchema.safeParse(value);
    return result.success;
}
export function getPHCustomScalarByTypeName(name) {
    const scalar = Object.values(customScalars).find((scalar) => scalar.config.name === name) ?? null;
    return scalar;
}
//# sourceMappingURL=utils.js.map