"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.GetOneKnowledgeResponseBody$outboundSchema = exports.GetOneKnowledgeResponseBody$inboundSchema = exports.GetOneKnowledgeResponseBody1$outboundSchema = exports.GetOneKnowledgeResponseBody1$inboundSchema = exports.GetOneKnowledgeResponseBodyRetrievalSettings$outboundSchema = exports.GetOneKnowledgeResponseBodyRetrievalSettings$inboundSchema = exports.GetOneKnowledgeResponseBodyAgenticRagConfig$outboundSchema = exports.GetOneKnowledgeResponseBodyAgenticRagConfig$inboundSchema = exports.GetOneKnowledgeResponseBodyRerankConfig$outboundSchema = exports.GetOneKnowledgeResponseBodyRerankConfig$inboundSchema = exports.GetOneKnowledgeResponseBodyRetrievalType$outboundSchema = exports.GetOneKnowledgeResponseBodyRetrievalType$inboundSchema = exports.GetOneKnowledgeResponseBodyType$outboundSchema = exports.GetOneKnowledgeResponseBodyType$inboundSchema = exports.GetOneKnowledgeResponseBody2$outboundSchema = exports.GetOneKnowledgeResponseBody2$inboundSchema = exports.GetOneKnowledgeResponseBodyExternalConfig$outboundSchema = exports.GetOneKnowledgeResponseBodyExternalConfig$inboundSchema = exports.GetOneKnowledgeResponseBodyKnowledgeRetrievalSettings$outboundSchema = exports.GetOneKnowledgeResponseBodyKnowledgeRetrievalSettings$inboundSchema = exports.GetOneKnowledgeResponseBodyKnowledgeAgenticRagConfig$outboundSchema = exports.GetOneKnowledgeResponseBodyKnowledgeAgenticRagConfig$inboundSchema = exports.GetOneKnowledgeResponseBodyKnowledgeRerankConfig$outboundSchema = exports.GetOneKnowledgeResponseBodyKnowledgeRerankConfig$inboundSchema = exports.GetOneKnowledgeResponseBodyKnowledgeType$outboundSchema = exports.GetOneKnowledgeResponseBodyKnowledgeType$inboundSchema = exports.GetOneKnowledgeRequest$outboundSchema = exports.GetOneKnowledgeRequest$inboundSchema = exports.GetOneKnowledgeResponseBodyRetrievalType = exports.GetOneKnowledgeResponseBodyType = exports.GetOneKnowledgeResponseBodyKnowledgeType = void 0;
exports.getOneKnowledgeRequestToJSON = getOneKnowledgeRequestToJSON;
exports.getOneKnowledgeRequestFromJSON = getOneKnowledgeRequestFromJSON;
exports.getOneKnowledgeResponseBodyKnowledgeRerankConfigToJSON = getOneKnowledgeResponseBodyKnowledgeRerankConfigToJSON;
exports.getOneKnowledgeResponseBodyKnowledgeRerankConfigFromJSON = getOneKnowledgeResponseBodyKnowledgeRerankConfigFromJSON;
exports.getOneKnowledgeResponseBodyKnowledgeAgenticRagConfigToJSON = getOneKnowledgeResponseBodyKnowledgeAgenticRagConfigToJSON;
exports.getOneKnowledgeResponseBodyKnowledgeAgenticRagConfigFromJSON = getOneKnowledgeResponseBodyKnowledgeAgenticRagConfigFromJSON;
exports.getOneKnowledgeResponseBodyKnowledgeRetrievalSettingsToJSON = getOneKnowledgeResponseBodyKnowledgeRetrievalSettingsToJSON;
exports.getOneKnowledgeResponseBodyKnowledgeRetrievalSettingsFromJSON = getOneKnowledgeResponseBodyKnowledgeRetrievalSettingsFromJSON;
exports.getOneKnowledgeResponseBodyExternalConfigToJSON = getOneKnowledgeResponseBodyExternalConfigToJSON;
exports.getOneKnowledgeResponseBodyExternalConfigFromJSON = getOneKnowledgeResponseBodyExternalConfigFromJSON;
exports.getOneKnowledgeResponseBody2ToJSON = getOneKnowledgeResponseBody2ToJSON;
exports.getOneKnowledgeResponseBody2FromJSON = getOneKnowledgeResponseBody2FromJSON;
exports.getOneKnowledgeResponseBodyRerankConfigToJSON = getOneKnowledgeResponseBodyRerankConfigToJSON;
exports.getOneKnowledgeResponseBodyRerankConfigFromJSON = getOneKnowledgeResponseBodyRerankConfigFromJSON;
exports.getOneKnowledgeResponseBodyAgenticRagConfigToJSON = getOneKnowledgeResponseBodyAgenticRagConfigToJSON;
exports.getOneKnowledgeResponseBodyAgenticRagConfigFromJSON = getOneKnowledgeResponseBodyAgenticRagConfigFromJSON;
exports.getOneKnowledgeResponseBodyRetrievalSettingsToJSON = getOneKnowledgeResponseBodyRetrievalSettingsToJSON;
exports.getOneKnowledgeResponseBodyRetrievalSettingsFromJSON = getOneKnowledgeResponseBodyRetrievalSettingsFromJSON;
exports.getOneKnowledgeResponseBody1ToJSON = getOneKnowledgeResponseBody1ToJSON;
exports.getOneKnowledgeResponseBody1FromJSON = getOneKnowledgeResponseBody1FromJSON;
exports.getOneKnowledgeResponseBodyToJSON = getOneKnowledgeResponseBodyToJSON;
exports.getOneKnowledgeResponseBodyFromJSON = getOneKnowledgeResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.GetOneKnowledgeResponseBodyKnowledgeType = {
    External: "external",
};
exports.GetOneKnowledgeResponseBodyType = {
    Internal: "internal",
};
/**
 * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
 */
exports.GetOneKnowledgeResponseBodyRetrievalType = {
    VectorSearch: "vector_search",
    KeywordSearch: "keyword_search",
    HybridSearch: "hybrid_search",
};
/** @internal */
exports.GetOneKnowledgeRequest$inboundSchema = z.object({
    knowledge_id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "knowledge_id": "knowledgeId",
    });
});
/** @internal */
exports.GetOneKnowledgeRequest$outboundSchema = z.object({
    knowledgeId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        knowledgeId: "knowledge_id",
    });
});
function getOneKnowledgeRequestToJSON(getOneKnowledgeRequest) {
    return JSON.stringify(exports.GetOneKnowledgeRequest$outboundSchema.parse(getOneKnowledgeRequest));
}
function getOneKnowledgeRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneKnowledgeRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneKnowledgeRequest' from JSON`);
}
/** @internal */
exports.GetOneKnowledgeResponseBodyKnowledgeType$inboundSchema = z
    .nativeEnum(exports.GetOneKnowledgeResponseBodyKnowledgeType);
/** @internal */
exports.GetOneKnowledgeResponseBodyKnowledgeType$outboundSchema = exports.GetOneKnowledgeResponseBodyKnowledgeType$inboundSchema;
/** @internal */
exports.GetOneKnowledgeResponseBodyKnowledgeRerankConfig$inboundSchema = z.object({
    top_k: z.number().int().default(5),
    rerank_threshold: z.number().default(0.5),
    rerank_model: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "top_k": "topK",
        "rerank_threshold": "rerankThreshold",
        "rerank_model": "rerankModel",
    });
});
/** @internal */
exports.GetOneKnowledgeResponseBodyKnowledgeRerankConfig$outboundSchema = z.object({
    topK: z.number().int().default(5),
    rerankThreshold: z.number().default(0.5),
    rerankModel: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        topK: "top_k",
        rerankThreshold: "rerank_threshold",
        rerankModel: "rerank_model",
    });
});
function getOneKnowledgeResponseBodyKnowledgeRerankConfigToJSON(getOneKnowledgeResponseBodyKnowledgeRerankConfig) {
    return JSON.stringify(exports.GetOneKnowledgeResponseBodyKnowledgeRerankConfig$outboundSchema.parse(getOneKnowledgeResponseBodyKnowledgeRerankConfig));
}
function getOneKnowledgeResponseBodyKnowledgeRerankConfigFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneKnowledgeResponseBodyKnowledgeRerankConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneKnowledgeResponseBodyKnowledgeRerankConfig' from JSON`);
}
/** @internal */
exports.GetOneKnowledgeResponseBodyKnowledgeAgenticRagConfig$inboundSchema = z.object({
    model: z.string(),
});
/** @internal */
exports.GetOneKnowledgeResponseBodyKnowledgeAgenticRagConfig$outboundSchema = z.object({
    model: z.string(),
});
function getOneKnowledgeResponseBodyKnowledgeAgenticRagConfigToJSON(getOneKnowledgeResponseBodyKnowledgeAgenticRagConfig) {
    return JSON.stringify(exports.GetOneKnowledgeResponseBodyKnowledgeAgenticRagConfig$outboundSchema.parse(getOneKnowledgeResponseBodyKnowledgeAgenticRagConfig));
}
function getOneKnowledgeResponseBodyKnowledgeAgenticRagConfigFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneKnowledgeResponseBodyKnowledgeAgenticRagConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneKnowledgeResponseBodyKnowledgeAgenticRagConfig' from JSON`);
}
/** @internal */
exports.GetOneKnowledgeResponseBodyKnowledgeRetrievalSettings$inboundSchema = z.object({
    top_k: z.number().int().default(5),
    threshold: z.number().default(0),
    rerank_config: z.nullable(z.lazy(() => exports.GetOneKnowledgeResponseBodyKnowledgeRerankConfig$inboundSchema)).optional(),
    agentic_rag_config: z.nullable(z.lazy(() => exports.GetOneKnowledgeResponseBodyKnowledgeAgenticRagConfig$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "top_k": "topK",
        "rerank_config": "rerankConfig",
        "agentic_rag_config": "agenticRagConfig",
    });
});
/** @internal */
exports.GetOneKnowledgeResponseBodyKnowledgeRetrievalSettings$outboundSchema = z.object({
    topK: z.number().int().default(5),
    threshold: z.number().default(0),
    rerankConfig: z.nullable(z.lazy(() => exports.GetOneKnowledgeResponseBodyKnowledgeRerankConfig$outboundSchema)).optional(),
    agenticRagConfig: z.nullable(z.lazy(() => exports.GetOneKnowledgeResponseBodyKnowledgeAgenticRagConfig$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        topK: "top_k",
        rerankConfig: "rerank_config",
        agenticRagConfig: "agentic_rag_config",
    });
});
function getOneKnowledgeResponseBodyKnowledgeRetrievalSettingsToJSON(getOneKnowledgeResponseBodyKnowledgeRetrievalSettings) {
    return JSON.stringify(exports.GetOneKnowledgeResponseBodyKnowledgeRetrievalSettings$outboundSchema.parse(getOneKnowledgeResponseBodyKnowledgeRetrievalSettings));
}
function getOneKnowledgeResponseBodyKnowledgeRetrievalSettingsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneKnowledgeResponseBodyKnowledgeRetrievalSettings$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneKnowledgeResponseBodyKnowledgeRetrievalSettings' from JSON`);
}
/** @internal */
exports.GetOneKnowledgeResponseBodyExternalConfig$inboundSchema = z.object({
    name: z.string(),
    api_url: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "api_url": "apiUrl",
    });
});
/** @internal */
exports.GetOneKnowledgeResponseBodyExternalConfig$outboundSchema = z.object({
    name: z.string(),
    apiUrl: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        apiUrl: "api_url",
    });
});
function getOneKnowledgeResponseBodyExternalConfigToJSON(getOneKnowledgeResponseBodyExternalConfig) {
    return JSON.stringify(exports.GetOneKnowledgeResponseBodyExternalConfig$outboundSchema.parse(getOneKnowledgeResponseBodyExternalConfig));
}
function getOneKnowledgeResponseBodyExternalConfigFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneKnowledgeResponseBodyExternalConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneKnowledgeResponseBodyExternalConfig' from JSON`);
}
/** @internal */
exports.GetOneKnowledgeResponseBody2$inboundSchema = z.object({
    _id: z.string(),
    created: z.string(),
    description: z.string().optional(),
    key: z.string(),
    domain_id: z.string(),
    path: z.string().optional(),
    created_by_id: z.nullable(z.string()).optional(),
    updated_by_id: z.nullable(z.string()).optional(),
    updated: z.string(),
    type: exports.GetOneKnowledgeResponseBodyKnowledgeType$inboundSchema.default("external"),
    retrieval_settings: z.lazy(() => exports.GetOneKnowledgeResponseBodyKnowledgeRetrievalSettings$inboundSchema).optional(),
    external_config: z.lazy(() => exports.GetOneKnowledgeResponseBodyExternalConfig$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "domain_id": "domainId",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "retrieval_settings": "retrievalSettings",
        "external_config": "externalConfig",
    });
});
/** @internal */
exports.GetOneKnowledgeResponseBody2$outboundSchema = z.object({
    id: z.string(),
    created: z.string(),
    description: z.string().optional(),
    key: z.string(),
    domainId: z.string(),
    path: z.string().optional(),
    createdById: z.nullable(z.string()).optional(),
    updatedById: z.nullable(z.string()).optional(),
    updated: z.string(),
    type: exports.GetOneKnowledgeResponseBodyKnowledgeType$outboundSchema.default("external"),
    retrievalSettings: z.lazy(() => exports.GetOneKnowledgeResponseBodyKnowledgeRetrievalSettings$outboundSchema).optional(),
    externalConfig: z.lazy(() => exports.GetOneKnowledgeResponseBodyExternalConfig$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        domainId: "domain_id",
        createdById: "created_by_id",
        updatedById: "updated_by_id",
        retrievalSettings: "retrieval_settings",
        externalConfig: "external_config",
    });
});
function getOneKnowledgeResponseBody2ToJSON(getOneKnowledgeResponseBody2) {
    return JSON.stringify(exports.GetOneKnowledgeResponseBody2$outboundSchema.parse(getOneKnowledgeResponseBody2));
}
function getOneKnowledgeResponseBody2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneKnowledgeResponseBody2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneKnowledgeResponseBody2' from JSON`);
}
/** @internal */
exports.GetOneKnowledgeResponseBodyType$inboundSchema = z.nativeEnum(exports.GetOneKnowledgeResponseBodyType);
/** @internal */
exports.GetOneKnowledgeResponseBodyType$outboundSchema = exports.GetOneKnowledgeResponseBodyType$inboundSchema;
/** @internal */
exports.GetOneKnowledgeResponseBodyRetrievalType$inboundSchema = z
    .nativeEnum(exports.GetOneKnowledgeResponseBodyRetrievalType);
/** @internal */
exports.GetOneKnowledgeResponseBodyRetrievalType$outboundSchema = exports.GetOneKnowledgeResponseBodyRetrievalType$inboundSchema;
/** @internal */
exports.GetOneKnowledgeResponseBodyRerankConfig$inboundSchema = z.object({
    top_k: z.number().int().default(5),
    rerank_threshold: z.number().default(0.5),
    rerank_model: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "top_k": "topK",
        "rerank_threshold": "rerankThreshold",
        "rerank_model": "rerankModel",
    });
});
/** @internal */
exports.GetOneKnowledgeResponseBodyRerankConfig$outboundSchema = z.object({
    topK: z.number().int().default(5),
    rerankThreshold: z.number().default(0.5),
    rerankModel: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        topK: "top_k",
        rerankThreshold: "rerank_threshold",
        rerankModel: "rerank_model",
    });
});
function getOneKnowledgeResponseBodyRerankConfigToJSON(getOneKnowledgeResponseBodyRerankConfig) {
    return JSON.stringify(exports.GetOneKnowledgeResponseBodyRerankConfig$outboundSchema.parse(getOneKnowledgeResponseBodyRerankConfig));
}
function getOneKnowledgeResponseBodyRerankConfigFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneKnowledgeResponseBodyRerankConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneKnowledgeResponseBodyRerankConfig' from JSON`);
}
/** @internal */
exports.GetOneKnowledgeResponseBodyAgenticRagConfig$inboundSchema = z.object({
    model: z.string(),
});
/** @internal */
exports.GetOneKnowledgeResponseBodyAgenticRagConfig$outboundSchema = z.object({
    model: z.string(),
});
function getOneKnowledgeResponseBodyAgenticRagConfigToJSON(getOneKnowledgeResponseBodyAgenticRagConfig) {
    return JSON.stringify(exports.GetOneKnowledgeResponseBodyAgenticRagConfig$outboundSchema.parse(getOneKnowledgeResponseBodyAgenticRagConfig));
}
function getOneKnowledgeResponseBodyAgenticRagConfigFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneKnowledgeResponseBodyAgenticRagConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneKnowledgeResponseBodyAgenticRagConfig' from JSON`);
}
/** @internal */
exports.GetOneKnowledgeResponseBodyRetrievalSettings$inboundSchema = z.object({
    retrieval_type: exports.GetOneKnowledgeResponseBodyRetrievalType$inboundSchema
        .default("hybrid_search"),
    top_k: z.number().int().default(5),
    threshold: z.number().default(0),
    rerank_config: z.nullable(z.lazy(() => exports.GetOneKnowledgeResponseBodyRerankConfig$inboundSchema)).optional(),
    agentic_rag_config: z.nullable(z.lazy(() => exports.GetOneKnowledgeResponseBodyAgenticRagConfig$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "retrieval_type": "retrievalType",
        "top_k": "topK",
        "rerank_config": "rerankConfig",
        "agentic_rag_config": "agenticRagConfig",
    });
});
/** @internal */
exports.GetOneKnowledgeResponseBodyRetrievalSettings$outboundSchema = z.object({
    retrievalType: exports.GetOneKnowledgeResponseBodyRetrievalType$outboundSchema
        .default("hybrid_search"),
    topK: z.number().int().default(5),
    threshold: z.number().default(0),
    rerankConfig: z.nullable(z.lazy(() => exports.GetOneKnowledgeResponseBodyRerankConfig$outboundSchema)).optional(),
    agenticRagConfig: z.nullable(z.lazy(() => exports.GetOneKnowledgeResponseBodyAgenticRagConfig$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        retrievalType: "retrieval_type",
        topK: "top_k",
        rerankConfig: "rerank_config",
        agenticRagConfig: "agentic_rag_config",
    });
});
function getOneKnowledgeResponseBodyRetrievalSettingsToJSON(getOneKnowledgeResponseBodyRetrievalSettings) {
    return JSON.stringify(exports.GetOneKnowledgeResponseBodyRetrievalSettings$outboundSchema.parse(getOneKnowledgeResponseBodyRetrievalSettings));
}
function getOneKnowledgeResponseBodyRetrievalSettingsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneKnowledgeResponseBodyRetrievalSettings$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneKnowledgeResponseBodyRetrievalSettings' from JSON`);
}
/** @internal */
exports.GetOneKnowledgeResponseBody1$inboundSchema = z.object({
    _id: z.string(),
    created: z.string(),
    description: z.string().optional(),
    key: z.string(),
    domain_id: z.string(),
    path: z.string().optional(),
    created_by_id: z.nullable(z.string()).optional(),
    updated_by_id: z.nullable(z.string()).optional(),
    updated: z.string(),
    type: exports.GetOneKnowledgeResponseBodyType$inboundSchema.default("internal"),
    retrieval_settings: z.lazy(() => exports.GetOneKnowledgeResponseBodyRetrievalSettings$inboundSchema).optional(),
    model: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "domain_id": "domainId",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "retrieval_settings": "retrievalSettings",
    });
});
/** @internal */
exports.GetOneKnowledgeResponseBody1$outboundSchema = z.object({
    id: z.string(),
    created: z.string(),
    description: z.string().optional(),
    key: z.string(),
    domainId: z.string(),
    path: z.string().optional(),
    createdById: z.nullable(z.string()).optional(),
    updatedById: z.nullable(z.string()).optional(),
    updated: z.string(),
    type: exports.GetOneKnowledgeResponseBodyType$outboundSchema.default("internal"),
    retrievalSettings: z.lazy(() => exports.GetOneKnowledgeResponseBodyRetrievalSettings$outboundSchema).optional(),
    model: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        domainId: "domain_id",
        createdById: "created_by_id",
        updatedById: "updated_by_id",
        retrievalSettings: "retrieval_settings",
    });
});
function getOneKnowledgeResponseBody1ToJSON(getOneKnowledgeResponseBody1) {
    return JSON.stringify(exports.GetOneKnowledgeResponseBody1$outboundSchema.parse(getOneKnowledgeResponseBody1));
}
function getOneKnowledgeResponseBody1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneKnowledgeResponseBody1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneKnowledgeResponseBody1' from JSON`);
}
/** @internal */
exports.GetOneKnowledgeResponseBody$inboundSchema = z.union([
    z.lazy(() => exports.GetOneKnowledgeResponseBody1$inboundSchema),
    z.lazy(() => exports.GetOneKnowledgeResponseBody2$inboundSchema),
]);
/** @internal */
exports.GetOneKnowledgeResponseBody$outboundSchema = z.union([
    z.lazy(() => exports.GetOneKnowledgeResponseBody1$outboundSchema),
    z.lazy(() => exports.GetOneKnowledgeResponseBody2$outboundSchema),
]);
function getOneKnowledgeResponseBodyToJSON(getOneKnowledgeResponseBody) {
    return JSON.stringify(exports.GetOneKnowledgeResponseBody$outboundSchema.parse(getOneKnowledgeResponseBody));
}
function getOneKnowledgeResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetOneKnowledgeResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetOneKnowledgeResponseBody' from JSON`);
}
//# sourceMappingURL=getoneknowledge.js.map