"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SearchKnowledgeAndGt$inboundSchema = exports.SearchKnowledgeAndGte$outboundSchema = exports.SearchKnowledgeAndGte$inboundSchema = exports.SearchKnowledgeAndLt$outboundSchema = exports.SearchKnowledgeAndLt$inboundSchema = exports.SearchKnowledgeAndLte$outboundSchema = exports.SearchKnowledgeAndLte$inboundSchema = exports.SearchKnowledgeAndIn$outboundSchema = exports.SearchKnowledgeAndIn$inboundSchema = exports.SearchKnowledgeAndKnowledgeIn$outboundSchema = exports.SearchKnowledgeAndKnowledgeIn$inboundSchema = exports.SearchKnowledgeAndNin$outboundSchema = exports.SearchKnowledgeAndNin$inboundSchema = exports.SearchKnowledgeAndKnowledgeNin$outboundSchema = exports.SearchKnowledgeAndKnowledgeNin$inboundSchema = exports.SearchKnowledgeAndExists$outboundSchema = exports.SearchKnowledgeAndExists$inboundSchema = exports.FilterByOr$outboundSchema = exports.FilterByOr$inboundSchema = exports.SearchKnowledgeFilterByOr$outboundSchema = exports.SearchKnowledgeFilterByOr$inboundSchema = exports.SearchKnowledgeOrEq$outboundSchema = exports.SearchKnowledgeOrEq$inboundSchema = exports.SearchKnowledgeOrKnowledgeEq$outboundSchema = exports.SearchKnowledgeOrKnowledgeEq$inboundSchema = exports.SearchKnowledgeOrNe$outboundSchema = exports.SearchKnowledgeOrNe$inboundSchema = exports.SearchKnowledgeOrKnowledgeNe$outboundSchema = exports.SearchKnowledgeOrKnowledgeNe$inboundSchema = exports.SearchKnowledgeOrGt$outboundSchema = exports.SearchKnowledgeOrGt$inboundSchema = exports.SearchKnowledgeOrGte$outboundSchema = exports.SearchKnowledgeOrGte$inboundSchema = exports.SearchKnowledgeOrLt$outboundSchema = exports.SearchKnowledgeOrLt$inboundSchema = exports.SearchKnowledgeOrLte$outboundSchema = exports.SearchKnowledgeOrLte$inboundSchema = exports.SearchKnowledgeOrIn$outboundSchema = exports.SearchKnowledgeOrIn$inboundSchema = exports.SearchKnowledgeOrKnowledgeIn$outboundSchema = exports.SearchKnowledgeOrKnowledgeIn$inboundSchema = exports.SearchKnowledgeOrNin$outboundSchema = exports.SearchKnowledgeOrNin$inboundSchema = exports.SearchKnowledgeOrKnowledgeNin$outboundSchema = exports.SearchKnowledgeOrKnowledgeNin$inboundSchema = exports.SearchKnowledgeOrExists$outboundSchema = exports.SearchKnowledgeOrExists$inboundSchema = exports.SearchType$outboundSchema = exports.SearchType$inboundSchema = exports.SearchType = void 0;
exports.SearchKnowledgeRequestBody$inboundSchema = exports.AgenticRagConfig$outboundSchema = exports.AgenticRagConfig$inboundSchema = exports.RerankConfig$outboundSchema = exports.RerankConfig$inboundSchema = exports.SearchOptions$outboundSchema = exports.SearchOptions$inboundSchema = exports.FilterBy$outboundSchema = exports.FilterBy$inboundSchema = exports.FilterBy1$outboundSchema = exports.FilterBy1$inboundSchema = exports.SearchKnowledge1Eq$outboundSchema = exports.SearchKnowledge1Eq$inboundSchema = exports.SearchKnowledge1KnowledgeEq$outboundSchema = exports.SearchKnowledge1KnowledgeEq$inboundSchema = exports.SearchKnowledge1Ne$outboundSchema = exports.SearchKnowledge1Ne$inboundSchema = exports.SearchKnowledge1KnowledgeNe$outboundSchema = exports.SearchKnowledge1KnowledgeNe$inboundSchema = exports.SearchKnowledge1Gt$outboundSchema = exports.SearchKnowledge1Gt$inboundSchema = exports.SearchKnowledge1Gte$outboundSchema = exports.SearchKnowledge1Gte$inboundSchema = exports.SearchKnowledge1Lt$outboundSchema = exports.SearchKnowledge1Lt$inboundSchema = exports.SearchKnowledge1Lte$outboundSchema = exports.SearchKnowledge1Lte$inboundSchema = exports.SearchKnowledge1In$outboundSchema = exports.SearchKnowledge1In$inboundSchema = exports.SearchKnowledge1KnowledgeIn$outboundSchema = exports.SearchKnowledge1KnowledgeIn$inboundSchema = exports.SearchKnowledge1Nin$outboundSchema = exports.SearchKnowledge1Nin$inboundSchema = exports.SearchKnowledge1KnowledgeNin$outboundSchema = exports.SearchKnowledge1KnowledgeNin$inboundSchema = exports.SearchKnowledge1Exists$outboundSchema = exports.SearchKnowledge1Exists$inboundSchema = exports.FilterByAnd$outboundSchema = exports.FilterByAnd$inboundSchema = exports.SearchKnowledgeFilterByAnd$outboundSchema = exports.SearchKnowledgeFilterByAnd$inboundSchema = exports.SearchKnowledgeAndEq$outboundSchema = exports.SearchKnowledgeAndEq$inboundSchema = exports.SearchKnowledgeAndKnowledgeEq$outboundSchema = exports.SearchKnowledgeAndKnowledgeEq$inboundSchema = exports.SearchKnowledgeAndNe$outboundSchema = exports.SearchKnowledgeAndNe$inboundSchema = exports.SearchKnowledgeAndKnowledgeNe$outboundSchema = exports.SearchKnowledgeAndKnowledgeNe$inboundSchema = exports.SearchKnowledgeAndGt$outboundSchema = void 0;
exports.SearchKnowledgeResponseBody$outboundSchema = exports.SearchKnowledgeResponseBody$inboundSchema = exports.Matches$outboundSchema = exports.Matches$inboundSchema = exports.Scores$outboundSchema = exports.Scores$inboundSchema = exports.SearchKnowledgeRequest$outboundSchema = exports.SearchKnowledgeRequest$inboundSchema = exports.SearchKnowledgeRequestBody$outboundSchema = void 0;
exports.searchKnowledgeOrExistsToJSON = searchKnowledgeOrExistsToJSON;
exports.searchKnowledgeOrExistsFromJSON = searchKnowledgeOrExistsFromJSON;
exports.searchKnowledgeOrKnowledgeNinToJSON = searchKnowledgeOrKnowledgeNinToJSON;
exports.searchKnowledgeOrKnowledgeNinFromJSON = searchKnowledgeOrKnowledgeNinFromJSON;
exports.searchKnowledgeOrNinToJSON = searchKnowledgeOrNinToJSON;
exports.searchKnowledgeOrNinFromJSON = searchKnowledgeOrNinFromJSON;
exports.searchKnowledgeOrKnowledgeInToJSON = searchKnowledgeOrKnowledgeInToJSON;
exports.searchKnowledgeOrKnowledgeInFromJSON = searchKnowledgeOrKnowledgeInFromJSON;
exports.searchKnowledgeOrInToJSON = searchKnowledgeOrInToJSON;
exports.searchKnowledgeOrInFromJSON = searchKnowledgeOrInFromJSON;
exports.searchKnowledgeOrLteToJSON = searchKnowledgeOrLteToJSON;
exports.searchKnowledgeOrLteFromJSON = searchKnowledgeOrLteFromJSON;
exports.searchKnowledgeOrLtToJSON = searchKnowledgeOrLtToJSON;
exports.searchKnowledgeOrLtFromJSON = searchKnowledgeOrLtFromJSON;
exports.searchKnowledgeOrGteToJSON = searchKnowledgeOrGteToJSON;
exports.searchKnowledgeOrGteFromJSON = searchKnowledgeOrGteFromJSON;
exports.searchKnowledgeOrGtToJSON = searchKnowledgeOrGtToJSON;
exports.searchKnowledgeOrGtFromJSON = searchKnowledgeOrGtFromJSON;
exports.searchKnowledgeOrKnowledgeNeToJSON = searchKnowledgeOrKnowledgeNeToJSON;
exports.searchKnowledgeOrKnowledgeNeFromJSON = searchKnowledgeOrKnowledgeNeFromJSON;
exports.searchKnowledgeOrNeToJSON = searchKnowledgeOrNeToJSON;
exports.searchKnowledgeOrNeFromJSON = searchKnowledgeOrNeFromJSON;
exports.searchKnowledgeOrKnowledgeEqToJSON = searchKnowledgeOrKnowledgeEqToJSON;
exports.searchKnowledgeOrKnowledgeEqFromJSON = searchKnowledgeOrKnowledgeEqFromJSON;
exports.searchKnowledgeOrEqToJSON = searchKnowledgeOrEqToJSON;
exports.searchKnowledgeOrEqFromJSON = searchKnowledgeOrEqFromJSON;
exports.searchKnowledgeFilterByOrToJSON = searchKnowledgeFilterByOrToJSON;
exports.searchKnowledgeFilterByOrFromJSON = searchKnowledgeFilterByOrFromJSON;
exports.filterByOrToJSON = filterByOrToJSON;
exports.filterByOrFromJSON = filterByOrFromJSON;
exports.searchKnowledgeAndExistsToJSON = searchKnowledgeAndExistsToJSON;
exports.searchKnowledgeAndExistsFromJSON = searchKnowledgeAndExistsFromJSON;
exports.searchKnowledgeAndKnowledgeNinToJSON = searchKnowledgeAndKnowledgeNinToJSON;
exports.searchKnowledgeAndKnowledgeNinFromJSON = searchKnowledgeAndKnowledgeNinFromJSON;
exports.searchKnowledgeAndNinToJSON = searchKnowledgeAndNinToJSON;
exports.searchKnowledgeAndNinFromJSON = searchKnowledgeAndNinFromJSON;
exports.searchKnowledgeAndKnowledgeInToJSON = searchKnowledgeAndKnowledgeInToJSON;
exports.searchKnowledgeAndKnowledgeInFromJSON = searchKnowledgeAndKnowledgeInFromJSON;
exports.searchKnowledgeAndInToJSON = searchKnowledgeAndInToJSON;
exports.searchKnowledgeAndInFromJSON = searchKnowledgeAndInFromJSON;
exports.searchKnowledgeAndLteToJSON = searchKnowledgeAndLteToJSON;
exports.searchKnowledgeAndLteFromJSON = searchKnowledgeAndLteFromJSON;
exports.searchKnowledgeAndLtToJSON = searchKnowledgeAndLtToJSON;
exports.searchKnowledgeAndLtFromJSON = searchKnowledgeAndLtFromJSON;
exports.searchKnowledgeAndGteToJSON = searchKnowledgeAndGteToJSON;
exports.searchKnowledgeAndGteFromJSON = searchKnowledgeAndGteFromJSON;
exports.searchKnowledgeAndGtToJSON = searchKnowledgeAndGtToJSON;
exports.searchKnowledgeAndGtFromJSON = searchKnowledgeAndGtFromJSON;
exports.searchKnowledgeAndKnowledgeNeToJSON = searchKnowledgeAndKnowledgeNeToJSON;
exports.searchKnowledgeAndKnowledgeNeFromJSON = searchKnowledgeAndKnowledgeNeFromJSON;
exports.searchKnowledgeAndNeToJSON = searchKnowledgeAndNeToJSON;
exports.searchKnowledgeAndNeFromJSON = searchKnowledgeAndNeFromJSON;
exports.searchKnowledgeAndKnowledgeEqToJSON = searchKnowledgeAndKnowledgeEqToJSON;
exports.searchKnowledgeAndKnowledgeEqFromJSON = searchKnowledgeAndKnowledgeEqFromJSON;
exports.searchKnowledgeAndEqToJSON = searchKnowledgeAndEqToJSON;
exports.searchKnowledgeAndEqFromJSON = searchKnowledgeAndEqFromJSON;
exports.searchKnowledgeFilterByAndToJSON = searchKnowledgeFilterByAndToJSON;
exports.searchKnowledgeFilterByAndFromJSON = searchKnowledgeFilterByAndFromJSON;
exports.filterByAndToJSON = filterByAndToJSON;
exports.filterByAndFromJSON = filterByAndFromJSON;
exports.searchKnowledge1ExistsToJSON = searchKnowledge1ExistsToJSON;
exports.searchKnowledge1ExistsFromJSON = searchKnowledge1ExistsFromJSON;
exports.searchKnowledge1KnowledgeNinToJSON = searchKnowledge1KnowledgeNinToJSON;
exports.searchKnowledge1KnowledgeNinFromJSON = searchKnowledge1KnowledgeNinFromJSON;
exports.searchKnowledge1NinToJSON = searchKnowledge1NinToJSON;
exports.searchKnowledge1NinFromJSON = searchKnowledge1NinFromJSON;
exports.searchKnowledge1KnowledgeInToJSON = searchKnowledge1KnowledgeInToJSON;
exports.searchKnowledge1KnowledgeInFromJSON = searchKnowledge1KnowledgeInFromJSON;
exports.searchKnowledge1InToJSON = searchKnowledge1InToJSON;
exports.searchKnowledge1InFromJSON = searchKnowledge1InFromJSON;
exports.searchKnowledge1LteToJSON = searchKnowledge1LteToJSON;
exports.searchKnowledge1LteFromJSON = searchKnowledge1LteFromJSON;
exports.searchKnowledge1LtToJSON = searchKnowledge1LtToJSON;
exports.searchKnowledge1LtFromJSON = searchKnowledge1LtFromJSON;
exports.searchKnowledge1GteToJSON = searchKnowledge1GteToJSON;
exports.searchKnowledge1GteFromJSON = searchKnowledge1GteFromJSON;
exports.searchKnowledge1GtToJSON = searchKnowledge1GtToJSON;
exports.searchKnowledge1GtFromJSON = searchKnowledge1GtFromJSON;
exports.searchKnowledge1KnowledgeNeToJSON = searchKnowledge1KnowledgeNeToJSON;
exports.searchKnowledge1KnowledgeNeFromJSON = searchKnowledge1KnowledgeNeFromJSON;
exports.searchKnowledge1NeToJSON = searchKnowledge1NeToJSON;
exports.searchKnowledge1NeFromJSON = searchKnowledge1NeFromJSON;
exports.searchKnowledge1KnowledgeEqToJSON = searchKnowledge1KnowledgeEqToJSON;
exports.searchKnowledge1KnowledgeEqFromJSON = searchKnowledge1KnowledgeEqFromJSON;
exports.searchKnowledge1EqToJSON = searchKnowledge1EqToJSON;
exports.searchKnowledge1EqFromJSON = searchKnowledge1EqFromJSON;
exports.filterBy1ToJSON = filterBy1ToJSON;
exports.filterBy1FromJSON = filterBy1FromJSON;
exports.filterByToJSON = filterByToJSON;
exports.filterByFromJSON = filterByFromJSON;
exports.searchOptionsToJSON = searchOptionsToJSON;
exports.searchOptionsFromJSON = searchOptionsFromJSON;
exports.rerankConfigToJSON = rerankConfigToJSON;
exports.rerankConfigFromJSON = rerankConfigFromJSON;
exports.agenticRagConfigToJSON = agenticRagConfigToJSON;
exports.agenticRagConfigFromJSON = agenticRagConfigFromJSON;
exports.searchKnowledgeRequestBodyToJSON = searchKnowledgeRequestBodyToJSON;
exports.searchKnowledgeRequestBodyFromJSON = searchKnowledgeRequestBodyFromJSON;
exports.searchKnowledgeRequestToJSON = searchKnowledgeRequestToJSON;
exports.searchKnowledgeRequestFromJSON = searchKnowledgeRequestFromJSON;
exports.scoresToJSON = scoresToJSON;
exports.scoresFromJSON = scoresFromJSON;
exports.matchesToJSON = matchesToJSON;
exports.matchesFromJSON = matchesFromJSON;
exports.searchKnowledgeResponseBodyToJSON = searchKnowledgeResponseBodyToJSON;
exports.searchKnowledgeResponseBodyFromJSON = searchKnowledgeResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * The type of search to perform. If not provided, will default to the knowledge base configured `retrieval_type`
 */
exports.SearchType = {
    VectorSearch: "vector_search",
    KeywordSearch: "keyword_search",
    HybridSearch: "hybrid_search",
};
/** @internal */
exports.SearchType$inboundSchema = z
    .nativeEnum(exports.SearchType);
/** @internal */
exports.SearchType$outboundSchema = exports.SearchType$inboundSchema;
/** @internal */
exports.SearchKnowledgeOrExists$inboundSchema = z.object({
    exists: z.boolean(),
});
/** @internal */
exports.SearchKnowledgeOrExists$outboundSchema = z.object({
    exists: z.boolean(),
});
function searchKnowledgeOrExistsToJSON(searchKnowledgeOrExists) {
    return JSON.stringify(exports.SearchKnowledgeOrExists$outboundSchema.parse(searchKnowledgeOrExists));
}
function searchKnowledgeOrExistsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrExists$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrExists' from JSON`);
}
/** @internal */
exports.SearchKnowledgeOrKnowledgeNin$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.SearchKnowledgeOrKnowledgeNin$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function searchKnowledgeOrKnowledgeNinToJSON(searchKnowledgeOrKnowledgeNin) {
    return JSON.stringify(exports.SearchKnowledgeOrKnowledgeNin$outboundSchema.parse(searchKnowledgeOrKnowledgeNin));
}
function searchKnowledgeOrKnowledgeNinFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrKnowledgeNin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrKnowledgeNin' from JSON`);
}
/** @internal */
exports.SearchKnowledgeOrNin$inboundSchema = z.object({
    nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
/** @internal */
exports.SearchKnowledgeOrNin$outboundSchema = z.object({
    nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function searchKnowledgeOrNinToJSON(searchKnowledgeOrNin) {
    return JSON.stringify(exports.SearchKnowledgeOrNin$outboundSchema.parse(searchKnowledgeOrNin));
}
function searchKnowledgeOrNinFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrNin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrNin' from JSON`);
}
/** @internal */
exports.SearchKnowledgeOrKnowledgeIn$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.SearchKnowledgeOrKnowledgeIn$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function searchKnowledgeOrKnowledgeInToJSON(searchKnowledgeOrKnowledgeIn) {
    return JSON.stringify(exports.SearchKnowledgeOrKnowledgeIn$outboundSchema.parse(searchKnowledgeOrKnowledgeIn));
}
function searchKnowledgeOrKnowledgeInFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrKnowledgeIn$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrKnowledgeIn' from JSON`);
}
/** @internal */
exports.SearchKnowledgeOrIn$inboundSchema = z.object({
    in: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
/** @internal */
exports.SearchKnowledgeOrIn$outboundSchema = z.object({
    in: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function searchKnowledgeOrInToJSON(searchKnowledgeOrIn) {
    return JSON.stringify(exports.SearchKnowledgeOrIn$outboundSchema.parse(searchKnowledgeOrIn));
}
function searchKnowledgeOrInFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrIn$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrIn' from JSON`);
}
/** @internal */
exports.SearchKnowledgeOrLte$inboundSchema = z.object({
    lte: z.number(),
});
/** @internal */
exports.SearchKnowledgeOrLte$outboundSchema = z.object({
    lte: z.number(),
});
function searchKnowledgeOrLteToJSON(searchKnowledgeOrLte) {
    return JSON.stringify(exports.SearchKnowledgeOrLte$outboundSchema.parse(searchKnowledgeOrLte));
}
function searchKnowledgeOrLteFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrLte$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrLte' from JSON`);
}
/** @internal */
exports.SearchKnowledgeOrLt$inboundSchema = z.object({
    lt: z.number(),
});
/** @internal */
exports.SearchKnowledgeOrLt$outboundSchema = z.object({
    lt: z.number(),
});
function searchKnowledgeOrLtToJSON(searchKnowledgeOrLt) {
    return JSON.stringify(exports.SearchKnowledgeOrLt$outboundSchema.parse(searchKnowledgeOrLt));
}
function searchKnowledgeOrLtFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrLt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrLt' from JSON`);
}
/** @internal */
exports.SearchKnowledgeOrGte$inboundSchema = z.object({
    gte: z.number(),
});
/** @internal */
exports.SearchKnowledgeOrGte$outboundSchema = z.object({
    gte: z.number(),
});
function searchKnowledgeOrGteToJSON(searchKnowledgeOrGte) {
    return JSON.stringify(exports.SearchKnowledgeOrGte$outboundSchema.parse(searchKnowledgeOrGte));
}
function searchKnowledgeOrGteFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrGte$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrGte' from JSON`);
}
/** @internal */
exports.SearchKnowledgeOrGt$inboundSchema = z.object({
    gt: z.number(),
});
/** @internal */
exports.SearchKnowledgeOrGt$outboundSchema = z.object({
    gt: z.number(),
});
function searchKnowledgeOrGtToJSON(searchKnowledgeOrGt) {
    return JSON.stringify(exports.SearchKnowledgeOrGt$outboundSchema.parse(searchKnowledgeOrGt));
}
function searchKnowledgeOrGtFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrGt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrGt' from JSON`);
}
/** @internal */
exports.SearchKnowledgeOrKnowledgeNe$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.SearchKnowledgeOrKnowledgeNe$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function searchKnowledgeOrKnowledgeNeToJSON(searchKnowledgeOrKnowledgeNe) {
    return JSON.stringify(exports.SearchKnowledgeOrKnowledgeNe$outboundSchema.parse(searchKnowledgeOrKnowledgeNe));
}
function searchKnowledgeOrKnowledgeNeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrKnowledgeNe$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrKnowledgeNe' from JSON`);
}
/** @internal */
exports.SearchKnowledgeOrNe$inboundSchema = z.object({
    ne: z.union([z.string(), z.number(), z.boolean()]),
});
/** @internal */
exports.SearchKnowledgeOrNe$outboundSchema = z.object({
    ne: z.union([z.string(), z.number(), z.boolean()]),
});
function searchKnowledgeOrNeToJSON(searchKnowledgeOrNe) {
    return JSON.stringify(exports.SearchKnowledgeOrNe$outboundSchema.parse(searchKnowledgeOrNe));
}
function searchKnowledgeOrNeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrNe$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrNe' from JSON`);
}
/** @internal */
exports.SearchKnowledgeOrKnowledgeEq$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.SearchKnowledgeOrKnowledgeEq$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function searchKnowledgeOrKnowledgeEqToJSON(searchKnowledgeOrKnowledgeEq) {
    return JSON.stringify(exports.SearchKnowledgeOrKnowledgeEq$outboundSchema.parse(searchKnowledgeOrKnowledgeEq));
}
function searchKnowledgeOrKnowledgeEqFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrKnowledgeEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrKnowledgeEq' from JSON`);
}
/** @internal */
exports.SearchKnowledgeOrEq$inboundSchema = z.object({
    eq: z.union([z.string(), z.number(), z.boolean()]),
});
/** @internal */
exports.SearchKnowledgeOrEq$outboundSchema = z.object({
    eq: z.union([z.string(), z.number(), z.boolean()]),
});
function searchKnowledgeOrEqToJSON(searchKnowledgeOrEq) {
    return JSON.stringify(exports.SearchKnowledgeOrEq$outboundSchema.parse(searchKnowledgeOrEq));
}
function searchKnowledgeOrEqFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeOrEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeOrEq' from JSON`);
}
/** @internal */
exports.SearchKnowledgeFilterByOr$inboundSchema = z.union([
    z.lazy(() => exports.SearchKnowledgeOrEq$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrNe$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrGt$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrGte$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrLt$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrLte$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrIn$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrNin$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrExists$inboundSchema),
]);
/** @internal */
exports.SearchKnowledgeFilterByOr$outboundSchema = z.union([
    z.lazy(() => exports.SearchKnowledgeOrEq$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrNe$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrGt$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrGte$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrLt$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrLte$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrIn$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrNin$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeOrExists$outboundSchema),
]);
function searchKnowledgeFilterByOrToJSON(searchKnowledgeFilterByOr) {
    return JSON.stringify(exports.SearchKnowledgeFilterByOr$outboundSchema.parse(searchKnowledgeFilterByOr));
}
function searchKnowledgeFilterByOrFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeFilterByOr$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeFilterByOr' from JSON`);
}
/** @internal */
exports.FilterByOr$inboundSchema = z.object({
    or: z.array(z.record(z.union([
        z.lazy(() => exports.SearchKnowledgeOrEq$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrNe$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrGt$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrGte$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrLt$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrLte$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrIn$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrNin$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrExists$inboundSchema),
    ]))),
});
/** @internal */
exports.FilterByOr$outboundSchema = z.object({
    or: z.array(z.record(z.union([
        z.lazy(() => exports.SearchKnowledgeOrEq$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrNe$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrGt$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrGte$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrLt$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrLte$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrIn$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrNin$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeOrExists$outboundSchema),
    ]))),
});
function filterByOrToJSON(filterByOr) {
    return JSON.stringify(exports.FilterByOr$outboundSchema.parse(filterByOr));
}
function filterByOrFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FilterByOr$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FilterByOr' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndExists$inboundSchema = z.object({
    exists: z.boolean(),
});
/** @internal */
exports.SearchKnowledgeAndExists$outboundSchema = z.object({
    exists: z.boolean(),
});
function searchKnowledgeAndExistsToJSON(searchKnowledgeAndExists) {
    return JSON.stringify(exports.SearchKnowledgeAndExists$outboundSchema.parse(searchKnowledgeAndExists));
}
function searchKnowledgeAndExistsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndExists$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndExists' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndKnowledgeNin$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.SearchKnowledgeAndKnowledgeNin$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function searchKnowledgeAndKnowledgeNinToJSON(searchKnowledgeAndKnowledgeNin) {
    return JSON.stringify(exports.SearchKnowledgeAndKnowledgeNin$outboundSchema.parse(searchKnowledgeAndKnowledgeNin));
}
function searchKnowledgeAndKnowledgeNinFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndKnowledgeNin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndKnowledgeNin' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndNin$inboundSchema = z.object({
    nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
/** @internal */
exports.SearchKnowledgeAndNin$outboundSchema = z.object({
    nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function searchKnowledgeAndNinToJSON(searchKnowledgeAndNin) {
    return JSON.stringify(exports.SearchKnowledgeAndNin$outboundSchema.parse(searchKnowledgeAndNin));
}
function searchKnowledgeAndNinFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndNin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndNin' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndKnowledgeIn$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.SearchKnowledgeAndKnowledgeIn$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function searchKnowledgeAndKnowledgeInToJSON(searchKnowledgeAndKnowledgeIn) {
    return JSON.stringify(exports.SearchKnowledgeAndKnowledgeIn$outboundSchema.parse(searchKnowledgeAndKnowledgeIn));
}
function searchKnowledgeAndKnowledgeInFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndKnowledgeIn$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndKnowledgeIn' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndIn$inboundSchema = z.object({
    in: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
/** @internal */
exports.SearchKnowledgeAndIn$outboundSchema = z.object({
    in: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function searchKnowledgeAndInToJSON(searchKnowledgeAndIn) {
    return JSON.stringify(exports.SearchKnowledgeAndIn$outboundSchema.parse(searchKnowledgeAndIn));
}
function searchKnowledgeAndInFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndIn$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndIn' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndLte$inboundSchema = z.object({
    lte: z.number(),
});
/** @internal */
exports.SearchKnowledgeAndLte$outboundSchema = z.object({
    lte: z.number(),
});
function searchKnowledgeAndLteToJSON(searchKnowledgeAndLte) {
    return JSON.stringify(exports.SearchKnowledgeAndLte$outboundSchema.parse(searchKnowledgeAndLte));
}
function searchKnowledgeAndLteFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndLte$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndLte' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndLt$inboundSchema = z.object({
    lt: z.number(),
});
/** @internal */
exports.SearchKnowledgeAndLt$outboundSchema = z.object({
    lt: z.number(),
});
function searchKnowledgeAndLtToJSON(searchKnowledgeAndLt) {
    return JSON.stringify(exports.SearchKnowledgeAndLt$outboundSchema.parse(searchKnowledgeAndLt));
}
function searchKnowledgeAndLtFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndLt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndLt' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndGte$inboundSchema = z.object({
    gte: z.number(),
});
/** @internal */
exports.SearchKnowledgeAndGte$outboundSchema = z.object({
    gte: z.number(),
});
function searchKnowledgeAndGteToJSON(searchKnowledgeAndGte) {
    return JSON.stringify(exports.SearchKnowledgeAndGte$outboundSchema.parse(searchKnowledgeAndGte));
}
function searchKnowledgeAndGteFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndGte$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndGte' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndGt$inboundSchema = z.object({
    gt: z.number(),
});
/** @internal */
exports.SearchKnowledgeAndGt$outboundSchema = z.object({
    gt: z.number(),
});
function searchKnowledgeAndGtToJSON(searchKnowledgeAndGt) {
    return JSON.stringify(exports.SearchKnowledgeAndGt$outboundSchema.parse(searchKnowledgeAndGt));
}
function searchKnowledgeAndGtFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndGt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndGt' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndKnowledgeNe$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.SearchKnowledgeAndKnowledgeNe$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function searchKnowledgeAndKnowledgeNeToJSON(searchKnowledgeAndKnowledgeNe) {
    return JSON.stringify(exports.SearchKnowledgeAndKnowledgeNe$outboundSchema.parse(searchKnowledgeAndKnowledgeNe));
}
function searchKnowledgeAndKnowledgeNeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndKnowledgeNe$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndKnowledgeNe' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndNe$inboundSchema = z.object({
    ne: z.union([z.string(), z.number(), z.boolean()]),
});
/** @internal */
exports.SearchKnowledgeAndNe$outboundSchema = z.object({
    ne: z.union([z.string(), z.number(), z.boolean()]),
});
function searchKnowledgeAndNeToJSON(searchKnowledgeAndNe) {
    return JSON.stringify(exports.SearchKnowledgeAndNe$outboundSchema.parse(searchKnowledgeAndNe));
}
function searchKnowledgeAndNeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndNe$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndNe' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndKnowledgeEq$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.SearchKnowledgeAndKnowledgeEq$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function searchKnowledgeAndKnowledgeEqToJSON(searchKnowledgeAndKnowledgeEq) {
    return JSON.stringify(exports.SearchKnowledgeAndKnowledgeEq$outboundSchema.parse(searchKnowledgeAndKnowledgeEq));
}
function searchKnowledgeAndKnowledgeEqFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndKnowledgeEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndKnowledgeEq' from JSON`);
}
/** @internal */
exports.SearchKnowledgeAndEq$inboundSchema = z.object({
    eq: z.union([z.string(), z.number(), z.boolean()]),
});
/** @internal */
exports.SearchKnowledgeAndEq$outboundSchema = z.object({
    eq: z.union([z.string(), z.number(), z.boolean()]),
});
function searchKnowledgeAndEqToJSON(searchKnowledgeAndEq) {
    return JSON.stringify(exports.SearchKnowledgeAndEq$outboundSchema.parse(searchKnowledgeAndEq));
}
function searchKnowledgeAndEqFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeAndEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeAndEq' from JSON`);
}
/** @internal */
exports.SearchKnowledgeFilterByAnd$inboundSchema = z.union([
    z.lazy(() => exports.SearchKnowledgeAndEq$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndNe$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndGt$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndGte$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndLt$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndLte$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndIn$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndNin$inboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndExists$inboundSchema),
]);
/** @internal */
exports.SearchKnowledgeFilterByAnd$outboundSchema = z.union([
    z.lazy(() => exports.SearchKnowledgeAndEq$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndNe$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndGt$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndGte$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndLt$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndLte$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndIn$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndNin$outboundSchema),
    z.lazy(() => exports.SearchKnowledgeAndExists$outboundSchema),
]);
function searchKnowledgeFilterByAndToJSON(searchKnowledgeFilterByAnd) {
    return JSON.stringify(exports.SearchKnowledgeFilterByAnd$outboundSchema.parse(searchKnowledgeFilterByAnd));
}
function searchKnowledgeFilterByAndFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeFilterByAnd$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeFilterByAnd' from JSON`);
}
/** @internal */
exports.FilterByAnd$inboundSchema = z.object({
    and: z.array(z.record(z.union([
        z.lazy(() => exports.SearchKnowledgeAndEq$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndNe$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndGt$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndGte$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndLt$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndLte$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndIn$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndNin$inboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndExists$inboundSchema),
    ]))),
});
/** @internal */
exports.FilterByAnd$outboundSchema = z.object({
    and: z.array(z.record(z.union([
        z.lazy(() => exports.SearchKnowledgeAndEq$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndNe$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndGt$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndGte$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndLt$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndLte$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndIn$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndNin$outboundSchema),
        z.lazy(() => exports.SearchKnowledgeAndExists$outboundSchema),
    ]))),
});
function filterByAndToJSON(filterByAnd) {
    return JSON.stringify(exports.FilterByAnd$outboundSchema.parse(filterByAnd));
}
function filterByAndFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FilterByAnd$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FilterByAnd' from JSON`);
}
/** @internal */
exports.SearchKnowledge1Exists$inboundSchema = z.object({
    exists: z.boolean(),
});
/** @internal */
exports.SearchKnowledge1Exists$outboundSchema = z.object({
    exists: z.boolean(),
});
function searchKnowledge1ExistsToJSON(searchKnowledge1Exists) {
    return JSON.stringify(exports.SearchKnowledge1Exists$outboundSchema.parse(searchKnowledge1Exists));
}
function searchKnowledge1ExistsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1Exists$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1Exists' from JSON`);
}
/** @internal */
exports.SearchKnowledge1KnowledgeNin$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.SearchKnowledge1KnowledgeNin$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function searchKnowledge1KnowledgeNinToJSON(searchKnowledge1KnowledgeNin) {
    return JSON.stringify(exports.SearchKnowledge1KnowledgeNin$outboundSchema.parse(searchKnowledge1KnowledgeNin));
}
function searchKnowledge1KnowledgeNinFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1KnowledgeNin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1KnowledgeNin' from JSON`);
}
/** @internal */
exports.SearchKnowledge1Nin$inboundSchema = z.object({
    nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
/** @internal */
exports.SearchKnowledge1Nin$outboundSchema = z.object({
    nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function searchKnowledge1NinToJSON(searchKnowledge1Nin) {
    return JSON.stringify(exports.SearchKnowledge1Nin$outboundSchema.parse(searchKnowledge1Nin));
}
function searchKnowledge1NinFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1Nin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1Nin' from JSON`);
}
/** @internal */
exports.SearchKnowledge1KnowledgeIn$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.SearchKnowledge1KnowledgeIn$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function searchKnowledge1KnowledgeInToJSON(searchKnowledge1KnowledgeIn) {
    return JSON.stringify(exports.SearchKnowledge1KnowledgeIn$outboundSchema.parse(searchKnowledge1KnowledgeIn));
}
function searchKnowledge1KnowledgeInFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1KnowledgeIn$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1KnowledgeIn' from JSON`);
}
/** @internal */
exports.SearchKnowledge1In$inboundSchema = z.object({
    in: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
/** @internal */
exports.SearchKnowledge1In$outboundSchema = z.object({
    in: z.array(z.union([z.string(), z.number(), z.boolean()])),
});
function searchKnowledge1InToJSON(searchKnowledge1In) {
    return JSON.stringify(exports.SearchKnowledge1In$outboundSchema.parse(searchKnowledge1In));
}
function searchKnowledge1InFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1In$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1In' from JSON`);
}
/** @internal */
exports.SearchKnowledge1Lte$inboundSchema = z.object({
    lte: z.number(),
});
/** @internal */
exports.SearchKnowledge1Lte$outboundSchema = z.object({
    lte: z.number(),
});
function searchKnowledge1LteToJSON(searchKnowledge1Lte) {
    return JSON.stringify(exports.SearchKnowledge1Lte$outboundSchema.parse(searchKnowledge1Lte));
}
function searchKnowledge1LteFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1Lte$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1Lte' from JSON`);
}
/** @internal */
exports.SearchKnowledge1Lt$inboundSchema = z.object({
    lt: z.number(),
});
/** @internal */
exports.SearchKnowledge1Lt$outboundSchema = z.object({
    lt: z.number(),
});
function searchKnowledge1LtToJSON(searchKnowledge1Lt) {
    return JSON.stringify(exports.SearchKnowledge1Lt$outboundSchema.parse(searchKnowledge1Lt));
}
function searchKnowledge1LtFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1Lt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1Lt' from JSON`);
}
/** @internal */
exports.SearchKnowledge1Gte$inboundSchema = z.object({
    gte: z.number(),
});
/** @internal */
exports.SearchKnowledge1Gte$outboundSchema = z.object({
    gte: z.number(),
});
function searchKnowledge1GteToJSON(searchKnowledge1Gte) {
    return JSON.stringify(exports.SearchKnowledge1Gte$outboundSchema.parse(searchKnowledge1Gte));
}
function searchKnowledge1GteFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1Gte$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1Gte' from JSON`);
}
/** @internal */
exports.SearchKnowledge1Gt$inboundSchema = z.object({
    gt: z.number(),
});
/** @internal */
exports.SearchKnowledge1Gt$outboundSchema = z.object({
    gt: z.number(),
});
function searchKnowledge1GtToJSON(searchKnowledge1Gt) {
    return JSON.stringify(exports.SearchKnowledge1Gt$outboundSchema.parse(searchKnowledge1Gt));
}
function searchKnowledge1GtFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1Gt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1Gt' from JSON`);
}
/** @internal */
exports.SearchKnowledge1KnowledgeNe$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.SearchKnowledge1KnowledgeNe$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function searchKnowledge1KnowledgeNeToJSON(searchKnowledge1KnowledgeNe) {
    return JSON.stringify(exports.SearchKnowledge1KnowledgeNe$outboundSchema.parse(searchKnowledge1KnowledgeNe));
}
function searchKnowledge1KnowledgeNeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1KnowledgeNe$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1KnowledgeNe' from JSON`);
}
/** @internal */
exports.SearchKnowledge1Ne$inboundSchema = z.object({
    ne: z.union([z.string(), z.number(), z.boolean()]),
});
/** @internal */
exports.SearchKnowledge1Ne$outboundSchema = z.object({
    ne: z.union([z.string(), z.number(), z.boolean()]),
});
function searchKnowledge1NeToJSON(searchKnowledge1Ne) {
    return JSON.stringify(exports.SearchKnowledge1Ne$outboundSchema.parse(searchKnowledge1Ne));
}
function searchKnowledge1NeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1Ne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1Ne' from JSON`);
}
/** @internal */
exports.SearchKnowledge1KnowledgeEq$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.SearchKnowledge1KnowledgeEq$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function searchKnowledge1KnowledgeEqToJSON(searchKnowledge1KnowledgeEq) {
    return JSON.stringify(exports.SearchKnowledge1KnowledgeEq$outboundSchema.parse(searchKnowledge1KnowledgeEq));
}
function searchKnowledge1KnowledgeEqFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1KnowledgeEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1KnowledgeEq' from JSON`);
}
/** @internal */
exports.SearchKnowledge1Eq$inboundSchema = z.object({
    eq: z.union([z.string(), z.number(), z.boolean()]),
});
/** @internal */
exports.SearchKnowledge1Eq$outboundSchema = z.object({
    eq: z.union([z.string(), z.number(), z.boolean()]),
});
function searchKnowledge1EqToJSON(searchKnowledge1Eq) {
    return JSON.stringify(exports.SearchKnowledge1Eq$outboundSchema.parse(searchKnowledge1Eq));
}
function searchKnowledge1EqFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledge1Eq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledge1Eq' from JSON`);
}
/** @internal */
exports.FilterBy1$inboundSchema = z.union([
    z.lazy(() => exports.SearchKnowledge1Eq$inboundSchema),
    z.lazy(() => exports.SearchKnowledge1Ne$inboundSchema),
    z.lazy(() => exports.SearchKnowledge1Gt$inboundSchema),
    z.lazy(() => exports.SearchKnowledge1Gte$inboundSchema),
    z.lazy(() => exports.SearchKnowledge1Lt$inboundSchema),
    z.lazy(() => exports.SearchKnowledge1Lte$inboundSchema),
    z.lazy(() => exports.SearchKnowledge1In$inboundSchema),
    z.lazy(() => exports.SearchKnowledge1Nin$inboundSchema),
    z.lazy(() => exports.SearchKnowledge1Exists$inboundSchema),
]);
/** @internal */
exports.FilterBy1$outboundSchema = z.union([
    z.lazy(() => exports.SearchKnowledge1Eq$outboundSchema),
    z.lazy(() => exports.SearchKnowledge1Ne$outboundSchema),
    z.lazy(() => exports.SearchKnowledge1Gt$outboundSchema),
    z.lazy(() => exports.SearchKnowledge1Gte$outboundSchema),
    z.lazy(() => exports.SearchKnowledge1Lt$outboundSchema),
    z.lazy(() => exports.SearchKnowledge1Lte$outboundSchema),
    z.lazy(() => exports.SearchKnowledge1In$outboundSchema),
    z.lazy(() => exports.SearchKnowledge1Nin$outboundSchema),
    z.lazy(() => exports.SearchKnowledge1Exists$outboundSchema),
]);
function filterBy1ToJSON(filterBy1) {
    return JSON.stringify(exports.FilterBy1$outboundSchema.parse(filterBy1));
}
function filterBy1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FilterBy1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FilterBy1' from JSON`);
}
/** @internal */
exports.FilterBy$inboundSchema = z.union([
    z.lazy(() => exports.FilterByAnd$inboundSchema),
    z.lazy(() => exports.FilterByOr$inboundSchema),
    z.record(z.union([
        z.lazy(() => exports.SearchKnowledge1Eq$inboundSchema),
        z.lazy(() => exports.SearchKnowledge1Ne$inboundSchema),
        z.lazy(() => exports.SearchKnowledge1Gt$inboundSchema),
        z.lazy(() => exports.SearchKnowledge1Gte$inboundSchema),
        z.lazy(() => exports.SearchKnowledge1Lt$inboundSchema),
        z.lazy(() => exports.SearchKnowledge1Lte$inboundSchema),
        z.lazy(() => exports.SearchKnowledge1In$inboundSchema),
        z.lazy(() => exports.SearchKnowledge1Nin$inboundSchema),
        z.lazy(() => exports.SearchKnowledge1Exists$inboundSchema),
    ])),
]);
/** @internal */
exports.FilterBy$outboundSchema = z.union([
    z.lazy(() => exports.FilterByAnd$outboundSchema),
    z.lazy(() => exports.FilterByOr$outboundSchema),
    z.record(z.union([
        z.lazy(() => exports.SearchKnowledge1Eq$outboundSchema),
        z.lazy(() => exports.SearchKnowledge1Ne$outboundSchema),
        z.lazy(() => exports.SearchKnowledge1Gt$outboundSchema),
        z.lazy(() => exports.SearchKnowledge1Gte$outboundSchema),
        z.lazy(() => exports.SearchKnowledge1Lt$outboundSchema),
        z.lazy(() => exports.SearchKnowledge1Lte$outboundSchema),
        z.lazy(() => exports.SearchKnowledge1In$outboundSchema),
        z.lazy(() => exports.SearchKnowledge1Nin$outboundSchema),
        z.lazy(() => exports.SearchKnowledge1Exists$outboundSchema),
    ])),
]);
function filterByToJSON(filterBy) {
    return JSON.stringify(exports.FilterBy$outboundSchema.parse(filterBy));
}
function filterByFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FilterBy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FilterBy' from JSON`);
}
/** @internal */
exports.SearchOptions$inboundSchema = z.object({
    include_vectors: z.boolean().optional(),
    include_metadata: z.boolean().optional(),
    include_scores: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "include_vectors": "includeVectors",
        "include_metadata": "includeMetadata",
        "include_scores": "includeScores",
    });
});
/** @internal */
exports.SearchOptions$outboundSchema = z.object({
    includeVectors: z.boolean().optional(),
    includeMetadata: z.boolean().optional(),
    includeScores: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        includeVectors: "include_vectors",
        includeMetadata: "include_metadata",
        includeScores: "include_scores",
    });
});
function searchOptionsToJSON(searchOptions) {
    return JSON.stringify(exports.SearchOptions$outboundSchema.parse(searchOptions));
}
function searchOptionsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchOptions' from JSON`);
}
/** @internal */
exports.RerankConfig$inboundSchema = z.object({
    model: z.string(),
    threshold: z.number().default(0),
    top_k: z.number().int().default(10),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "top_k": "topK",
    });
});
/** @internal */
exports.RerankConfig$outboundSchema = z.object({
    model: z.string(),
    threshold: z.number().default(0),
    topK: z.number().int().default(10),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        topK: "top_k",
    });
});
function rerankConfigToJSON(rerankConfig) {
    return JSON.stringify(exports.RerankConfig$outboundSchema.parse(rerankConfig));
}
function rerankConfigFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RerankConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RerankConfig' from JSON`);
}
/** @internal */
exports.AgenticRagConfig$inboundSchema = z.object({
    model: z.string(),
});
/** @internal */
exports.AgenticRagConfig$outboundSchema = z.object({
    model: z.string(),
});
function agenticRagConfigToJSON(agenticRagConfig) {
    return JSON.stringify(exports.AgenticRagConfig$outboundSchema.parse(agenticRagConfig));
}
function agenticRagConfigFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AgenticRagConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgenticRagConfig' from JSON`);
}
/** @internal */
exports.SearchKnowledgeRequestBody$inboundSchema = z.object({
    query: z.string(),
    top_k: z.number().int().optional(),
    threshold: z.number().optional(),
    search_type: exports.SearchType$inboundSchema.default("hybrid_search"),
    filter_by: z.union([
        z.lazy(() => exports.FilterByAnd$inboundSchema),
        z.lazy(() => exports.FilterByOr$inboundSchema),
        z.record(z.union([
            z.lazy(() => exports.SearchKnowledge1Eq$inboundSchema),
            z.lazy(() => exports.SearchKnowledge1Ne$inboundSchema),
            z.lazy(() => exports.SearchKnowledge1Gt$inboundSchema),
            z.lazy(() => exports.SearchKnowledge1Gte$inboundSchema),
            z.lazy(() => exports.SearchKnowledge1Lt$inboundSchema),
            z.lazy(() => exports.SearchKnowledge1Lte$inboundSchema),
            z.lazy(() => exports.SearchKnowledge1In$inboundSchema),
            z.lazy(() => exports.SearchKnowledge1Nin$inboundSchema),
            z.lazy(() => exports.SearchKnowledge1Exists$inboundSchema),
        ])),
    ]).optional(),
    search_options: z.lazy(() => exports.SearchOptions$inboundSchema).optional(),
    rerank_config: z.lazy(() => exports.RerankConfig$inboundSchema).optional(),
    agentic_rag_config: z.lazy(() => exports.AgenticRagConfig$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "top_k": "topK",
        "search_type": "searchType",
        "filter_by": "filterBy",
        "search_options": "searchOptions",
        "rerank_config": "rerankConfig",
        "agentic_rag_config": "agenticRagConfig",
    });
});
/** @internal */
exports.SearchKnowledgeRequestBody$outboundSchema = z.object({
    query: z.string(),
    topK: z.number().int().optional(),
    threshold: z.number().optional(),
    searchType: exports.SearchType$outboundSchema.default("hybrid_search"),
    filterBy: z.union([
        z.lazy(() => exports.FilterByAnd$outboundSchema),
        z.lazy(() => exports.FilterByOr$outboundSchema),
        z.record(z.union([
            z.lazy(() => exports.SearchKnowledge1Eq$outboundSchema),
            z.lazy(() => exports.SearchKnowledge1Ne$outboundSchema),
            z.lazy(() => exports.SearchKnowledge1Gt$outboundSchema),
            z.lazy(() => exports.SearchKnowledge1Gte$outboundSchema),
            z.lazy(() => exports.SearchKnowledge1Lt$outboundSchema),
            z.lazy(() => exports.SearchKnowledge1Lte$outboundSchema),
            z.lazy(() => exports.SearchKnowledge1In$outboundSchema),
            z.lazy(() => exports.SearchKnowledge1Nin$outboundSchema),
            z.lazy(() => exports.SearchKnowledge1Exists$outboundSchema),
        ])),
    ]).optional(),
    searchOptions: z.lazy(() => exports.SearchOptions$outboundSchema).optional(),
    rerankConfig: z.lazy(() => exports.RerankConfig$outboundSchema).optional(),
    agenticRagConfig: z.lazy(() => exports.AgenticRagConfig$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        topK: "top_k",
        searchType: "search_type",
        filterBy: "filter_by",
        searchOptions: "search_options",
        rerankConfig: "rerank_config",
        agenticRagConfig: "agentic_rag_config",
    });
});
function searchKnowledgeRequestBodyToJSON(searchKnowledgeRequestBody) {
    return JSON.stringify(exports.SearchKnowledgeRequestBody$outboundSchema.parse(searchKnowledgeRequestBody));
}
function searchKnowledgeRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeRequestBody' from JSON`);
}
/** @internal */
exports.SearchKnowledgeRequest$inboundSchema = z.object({
    knowledge_id: z.string(),
    RequestBody: z.lazy(() => exports.SearchKnowledgeRequestBody$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "knowledge_id": "knowledgeId",
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.SearchKnowledgeRequest$outboundSchema = z.object({
    knowledgeId: z.string(),
    requestBody: z.lazy(() => exports.SearchKnowledgeRequestBody$outboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        knowledgeId: "knowledge_id",
        requestBody: "RequestBody",
    });
});
function searchKnowledgeRequestToJSON(searchKnowledgeRequest) {
    return JSON.stringify(exports.SearchKnowledgeRequest$outboundSchema.parse(searchKnowledgeRequest));
}
function searchKnowledgeRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeRequest' from JSON`);
}
/** @internal */
exports.Scores$inboundSchema = z
    .object({
    rerank_score: z.number().optional(),
    search_score: z.number().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "rerank_score": "rerankScore",
        "search_score": "searchScore",
    });
});
/** @internal */
exports.Scores$outboundSchema = z.object({
    rerankScore: z.number().optional(),
    searchScore: z.number().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        rerankScore: "rerank_score",
        searchScore: "search_score",
    });
});
function scoresToJSON(scores) {
    return JSON.stringify(exports.Scores$outboundSchema.parse(scores));
}
function scoresFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Scores$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Scores' from JSON`);
}
/** @internal */
exports.Matches$inboundSchema = z.object({
    id: z.string(),
    text: z.string(),
    vector: z.array(z.number()).optional(),
    metadata: z.record(z.any()).optional(),
    scores: z.lazy(() => exports.Scores$inboundSchema).optional(),
});
/** @internal */
exports.Matches$outboundSchema = z.object({
    id: z.string(),
    text: z.string(),
    vector: z.array(z.number()).optional(),
    metadata: z.record(z.any()).optional(),
    scores: z.lazy(() => exports.Scores$outboundSchema).optional(),
});
function matchesToJSON(matches) {
    return JSON.stringify(exports.Matches$outboundSchema.parse(matches));
}
function matchesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Matches$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Matches' from JSON`);
}
/** @internal */
exports.SearchKnowledgeResponseBody$inboundSchema = z.object({
    matches: z.array(z.lazy(() => exports.Matches$inboundSchema)),
});
/** @internal */
exports.SearchKnowledgeResponseBody$outboundSchema = z.object({
    matches: z.array(z.lazy(() => exports.Matches$outboundSchema)),
});
function searchKnowledgeResponseBodyToJSON(searchKnowledgeResponseBody) {
    return JSON.stringify(exports.SearchKnowledgeResponseBody$outboundSchema.parse(searchKnowledgeResponseBody));
}
function searchKnowledgeResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchKnowledgeResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchKnowledgeResponseBody' from JSON`);
}
//# sourceMappingURL=searchknowledge.js.map