/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 4374f7f8136c
 */
import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
import * as openEnums from "../../types/enums.js";
export const Op = {
    Lt: "lt",
    Lte: "lte",
    Gt: "gt",
    Gte: "gte",
    Startswith: "startswith",
    Istartswith: "istartswith",
    Endswith: "endswith",
    Iendswith: "iendswith",
    Contains: "contains",
    Icontains: "icontains",
    Matches: "matches",
    Notcontains: "notcontains",
    Inotcontains: "inotcontains",
    Eq: "eq",
    Neq: "neq",
    Isnull: "isnull",
    Includes: "includes",
    Excludes: "excludes",
    LenEq: "len_eq",
};
/** @internal */
export const Op$inboundSchema = openEnums.inboundSchema(Op);
/** @internal */
export const Op$outboundSchema = openEnums
    .outboundSchema(Op);
/** @internal */
export const FilterCondition$inboundSchema = z.object({
    field: z.string(),
    op: Op$inboundSchema,
    value: z.any(),
});
/** @internal */
export const FilterCondition$outboundSchema = z.object({
    field: z.string(),
    op: Op$outboundSchema,
    value: z.any(),
});
export function filterConditionToJSON(filterCondition) {
    return JSON.stringify(FilterCondition$outboundSchema.parse(filterCondition));
}
export function filterConditionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => FilterCondition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FilterCondition' from JSON`);
}
//# sourceMappingURL=filtercondition.js.map