/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: c5cc252be3b5
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import * as openEnums from "../../types/enums.js";
export const BaseFieldDefinitionType = {
    Enum: "ENUM",
    Text: "TEXT",
    Int: "INT",
    Float: "FLOAT",
    Bool: "BOOL",
    Timestamp: "TIMESTAMP",
    Array: "ARRAY",
    Map: "MAP",
};
export const SupportedOperator = {
    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 BaseFieldDefinitionType$inboundSchema = openEnums.inboundSchema(BaseFieldDefinitionType);
/** @internal */
export const SupportedOperator$inboundSchema = openEnums.inboundSchema(SupportedOperator);
/** @internal */
export const BaseFieldDefinition$inboundSchema = z.object({
    name: z.string(),
    label: z.string(),
    type: BaseFieldDefinitionType$inboundSchema,
    group: z.nullable(z.string()).optional(),
    supported_operators: z.array(SupportedOperator$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "supported_operators": "supportedOperators",
    });
});
export function baseFieldDefinitionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => BaseFieldDefinition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BaseFieldDefinition' from JSON`);
}
//# sourceMappingURL=basefielddefinition.js.map