import * as z from "zod/v3";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
export declare const CreateKnowledgeRequestBodyKnowledgeType: {
    readonly External: "external";
};
export type CreateKnowledgeRequestBodyKnowledgeType = ClosedEnum<typeof CreateKnowledgeRequestBodyKnowledgeType>;
export type ExternalConfig = {
    /**
     * The name of the external knowledge base.
     */
    name: string;
    /**
     * The API URL of the external knowledge base.
     */
    apiUrl: string;
    /**
     * The API key to access the external knowledge base.
     */
    apiKey: string;
};
export type RequestBody2 = {
    type?: CreateKnowledgeRequestBodyKnowledgeType | undefined;
    key: string;
    description?: string | undefined;
    externalConfig: ExternalConfig;
};
export declare const CreateKnowledgeRequestBodyType: {
    readonly Internal: "internal";
};
export type CreateKnowledgeRequestBodyType = ClosedEnum<typeof CreateKnowledgeRequestBodyType>;
/**
 * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
 */
export declare const RetrievalType: {
    readonly VectorSearch: "vector_search";
    readonly KeywordSearch: "keyword_search";
    readonly HybridSearch: "hybrid_search";
};
/**
 * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
 */
export type RetrievalType = ClosedEnum<typeof RetrievalType>;
/**
 * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
 */
export type CreateKnowledgeRequestBodyRerankConfig = {
    /**
     * The number of results to return by the reranking model
     */
    topK?: number | undefined;
    /**
     * The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
     */
    rerankThreshold?: number | undefined;
    /**
     * The rerank model to use for the knowledge base.
     */
    rerankModel: string;
};
/**
 * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
 */
export type CreateKnowledgeRequestBodyAgenticRagConfig = {
    /**
     * The model to use for the Agentic RAG
     */
    model: string;
};
/**
 * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
 */
export type RetrievalSettings = {
    /**
     * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
     */
    retrievalType?: RetrievalType | undefined;
    /**
     * The number of results to return from the search.
     */
    topK?: number | undefined;
    /**
     * The threshold value used to filter the search results, only documents with a relevance score greater than the threshold will be returned
     */
    threshold?: number | undefined;
    /**
     * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
     */
    rerankConfig?: CreateKnowledgeRequestBodyRerankConfig | null | undefined;
    /**
     * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
     */
    agenticRagConfig?: CreateKnowledgeRequestBodyAgenticRagConfig | null | undefined;
};
export type RequestBody1 = {
    type?: CreateKnowledgeRequestBodyType | undefined;
    key: string;
    description?: string | undefined;
    /**
     * The embeddings model to use for the knowledge base in the format "provider/model" for public models or "workspaceKey@provider/model" for private workspace models. This model will be used to embed the chunks when they are added to the knowledge base.
     */
    embeddingModel: string;
    /**
     * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
     */
    retrievalSettings?: RetrievalSettings | undefined;
    /**
     * Entity storage path.
     *
     * @remarks
     *
     * With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`.
     *
     * With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
     */
    path: string;
};
export type CreateKnowledgeRequestBody = RequestBody1 | RequestBody2;
export declare const CreateKnowledgeResponseBodyKnowledgeType: {
    readonly External: "external";
};
export type CreateKnowledgeResponseBodyKnowledgeType = ClosedEnum<typeof CreateKnowledgeResponseBodyKnowledgeType>;
/**
 * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
 */
export type CreateKnowledgeResponseBodyRerankConfig = {
    /**
     * The number of results to return by the reranking model
     */
    topK: number;
    /**
     * The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
     */
    rerankThreshold: number;
    /**
     * The rerank model to use for the knowledge base.
     */
    rerankModel: string;
};
/**
 * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
 */
export type CreateKnowledgeResponseBodyAgenticRagConfig = {
    /**
     * The model to use for the Agentic RAG
     */
    model: string;
};
/**
 * The retrieval settings for the knowledge base.
 */
export type CreateKnowledgeResponseBodyRetrievalSettings = {
    /**
     * The number of results to return from the search.
     */
    topK: number;
    /**
     * The threshold value used to filter the search results, only documents with a relevance score greater than the threshold will be returned
     */
    threshold: number;
    /**
     * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
     */
    rerankConfig?: CreateKnowledgeResponseBodyRerankConfig | null | undefined;
    /**
     * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
     */
    agenticRagConfig?: CreateKnowledgeResponseBodyAgenticRagConfig | null | undefined;
};
export type ResponseBodyExternalConfig = {
    /**
     * The name of the external knowledge base.
     */
    name: string;
    /**
     * The API URL of the external knowledge base.
     */
    apiUrl: string;
};
export type ResponseBody2 = {
    /**
     * The unique identifier of the knowledge base.
     */
    id: string;
    /**
     * The creation date of the knowledge base.
     */
    created: string;
    /**
     * The description of the knowledge base.
     */
    description?: string | null | undefined;
    /**
     * The unique key of the knowledge base.
     */
    key: string;
    /**
     * The project/domain ID of the knowledge base.
     */
    domainId: string;
    /**
     * Entity storage path.
     *
     * @remarks
     *
     * With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`.
     *
     * With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
     */
    path?: string | undefined;
    createdById?: string | null | undefined;
    updatedById?: string | null | undefined;
    /**
     * The last update date of the knowledge base.
     */
    updated: string;
    type: CreateKnowledgeResponseBodyKnowledgeType;
    /**
     * The retrieval settings for the knowledge base.
     */
    retrievalSettings?: CreateKnowledgeResponseBodyRetrievalSettings | undefined;
    externalConfig: ResponseBodyExternalConfig;
};
export declare const CreateKnowledgeResponseBodyType: {
    readonly Internal: "internal";
};
export type CreateKnowledgeResponseBodyType = ClosedEnum<typeof CreateKnowledgeResponseBodyType>;
/**
 * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
 */
export declare const ResponseBodyRetrievalType: {
    readonly VectorSearch: "vector_search";
    readonly KeywordSearch: "keyword_search";
    readonly HybridSearch: "hybrid_search";
};
/**
 * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
 */
export type ResponseBodyRetrievalType = ClosedEnum<typeof ResponseBodyRetrievalType>;
/**
 * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
 */
export type ResponseBodyRerankConfig = {
    /**
     * The number of results to return by the reranking model
     */
    topK: number;
    /**
     * The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
     */
    rerankThreshold: number;
    /**
     * The rerank model to use for the knowledge base.
     */
    rerankModel: string;
};
/**
 * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
 */
export type ResponseBodyAgenticRagConfig = {
    /**
     * The model to use for the Agentic RAG
     */
    model: string;
};
/**
 * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
 */
export type ResponseBodyRetrievalSettings = {
    /**
     * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
     */
    retrievalType: ResponseBodyRetrievalType;
    /**
     * The number of results to return from the search.
     */
    topK: number;
    /**
     * The threshold value used to filter the search results, only documents with a relevance score greater than the threshold will be returned
     */
    threshold: number;
    /**
     * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
     */
    rerankConfig?: ResponseBodyRerankConfig | null | undefined;
    /**
     * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
     */
    agenticRagConfig?: ResponseBodyAgenticRagConfig | null | undefined;
};
export type ResponseBody1 = {
    /**
     * The unique identifier of the knowledge base.
     */
    id: string;
    /**
     * The creation date of the knowledge base.
     */
    created: string;
    /**
     * The description of the knowledge base.
     */
    description?: string | null | undefined;
    /**
     * The unique key of the knowledge base.
     */
    key: string;
    /**
     * The project/domain ID of the knowledge base.
     */
    domainId: string;
    /**
     * Entity storage path.
     *
     * @remarks
     *
     * With workspace-level API keys, use the format `project/folder/subfolder/...`. The first element identifies the project, followed by nested folders (auto-created as needed). Example: `Default/agents`.
     *
     * With project-level API keys, the project is predetermined by the API key, so the path is relative to that project. Example: `agents`. For backward compatibility, a leading project name is ignored when it matches the scoped project.
     */
    path?: string | undefined;
    createdById?: string | null | undefined;
    updatedById?: string | null | undefined;
    /**
     * The last update date of the knowledge base.
     */
    updated: string;
    type: CreateKnowledgeResponseBodyType;
    /**
     * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
     */
    retrievalSettings?: ResponseBodyRetrievalSettings | undefined;
    /**
     * The embeddings model used for the knowledge base.
     */
    model: string;
};
/**
 * Knowledge successfully created
 */
export type CreateKnowledgeResponseBody = ResponseBody1 | ResponseBody2;
/** @internal */
export declare const CreateKnowledgeRequestBodyKnowledgeType$outboundSchema: z.ZodNativeEnum<typeof CreateKnowledgeRequestBodyKnowledgeType>;
/** @internal */
export type ExternalConfig$Outbound = {
    name: string;
    api_url: string;
    api_key: string;
};
/** @internal */
export declare const ExternalConfig$outboundSchema: z.ZodType<ExternalConfig$Outbound, z.ZodTypeDef, ExternalConfig>;
export declare function externalConfigToJSON(externalConfig: ExternalConfig): string;
/** @internal */
export type RequestBody2$Outbound = {
    type: string;
    key: string;
    description?: string | undefined;
    external_config: ExternalConfig$Outbound;
};
/** @internal */
export declare const RequestBody2$outboundSchema: z.ZodType<RequestBody2$Outbound, z.ZodTypeDef, RequestBody2>;
export declare function requestBody2ToJSON(requestBody2: RequestBody2): string;
/** @internal */
export declare const CreateKnowledgeRequestBodyType$outboundSchema: z.ZodNativeEnum<typeof CreateKnowledgeRequestBodyType>;
/** @internal */
export declare const RetrievalType$outboundSchema: z.ZodNativeEnum<typeof RetrievalType>;
/** @internal */
export type CreateKnowledgeRequestBodyRerankConfig$Outbound = {
    top_k: number;
    rerank_threshold: number;
    rerank_model: string;
};
/** @internal */
export declare const CreateKnowledgeRequestBodyRerankConfig$outboundSchema: z.ZodType<CreateKnowledgeRequestBodyRerankConfig$Outbound, z.ZodTypeDef, CreateKnowledgeRequestBodyRerankConfig>;
export declare function createKnowledgeRequestBodyRerankConfigToJSON(createKnowledgeRequestBodyRerankConfig: CreateKnowledgeRequestBodyRerankConfig): string;
/** @internal */
export type CreateKnowledgeRequestBodyAgenticRagConfig$Outbound = {
    model: string;
};
/** @internal */
export declare const CreateKnowledgeRequestBodyAgenticRagConfig$outboundSchema: z.ZodType<CreateKnowledgeRequestBodyAgenticRagConfig$Outbound, z.ZodTypeDef, CreateKnowledgeRequestBodyAgenticRagConfig>;
export declare function createKnowledgeRequestBodyAgenticRagConfigToJSON(createKnowledgeRequestBodyAgenticRagConfig: CreateKnowledgeRequestBodyAgenticRagConfig): string;
/** @internal */
export type RetrievalSettings$Outbound = {
    retrieval_type: string;
    top_k: number;
    threshold: number;
    rerank_config?: CreateKnowledgeRequestBodyRerankConfig$Outbound | null | undefined;
    agentic_rag_config?: CreateKnowledgeRequestBodyAgenticRagConfig$Outbound | null | undefined;
};
/** @internal */
export declare const RetrievalSettings$outboundSchema: z.ZodType<RetrievalSettings$Outbound, z.ZodTypeDef, RetrievalSettings>;
export declare function retrievalSettingsToJSON(retrievalSettings: RetrievalSettings): string;
/** @internal */
export type RequestBody1$Outbound = {
    type: string;
    key: string;
    description?: string | undefined;
    embedding_model: string;
    retrieval_settings?: RetrievalSettings$Outbound | undefined;
    path: string;
};
/** @internal */
export declare const RequestBody1$outboundSchema: z.ZodType<RequestBody1$Outbound, z.ZodTypeDef, RequestBody1>;
export declare function requestBody1ToJSON(requestBody1: RequestBody1): string;
/** @internal */
export type CreateKnowledgeRequestBody$Outbound = RequestBody1$Outbound | RequestBody2$Outbound;
/** @internal */
export declare const CreateKnowledgeRequestBody$outboundSchema: z.ZodType<CreateKnowledgeRequestBody$Outbound, z.ZodTypeDef, CreateKnowledgeRequestBody>;
export declare function createKnowledgeRequestBodyToJSON(createKnowledgeRequestBody: CreateKnowledgeRequestBody): string;
/** @internal */
export declare const CreateKnowledgeResponseBodyKnowledgeType$inboundSchema: z.ZodNativeEnum<typeof CreateKnowledgeResponseBodyKnowledgeType>;
/** @internal */
export declare const CreateKnowledgeResponseBodyRerankConfig$inboundSchema: z.ZodType<CreateKnowledgeResponseBodyRerankConfig, z.ZodTypeDef, unknown>;
export declare function createKnowledgeResponseBodyRerankConfigFromJSON(jsonString: string): SafeParseResult<CreateKnowledgeResponseBodyRerankConfig, SDKValidationError>;
/** @internal */
export declare const CreateKnowledgeResponseBodyAgenticRagConfig$inboundSchema: z.ZodType<CreateKnowledgeResponseBodyAgenticRagConfig, z.ZodTypeDef, unknown>;
export declare function createKnowledgeResponseBodyAgenticRagConfigFromJSON(jsonString: string): SafeParseResult<CreateKnowledgeResponseBodyAgenticRagConfig, SDKValidationError>;
/** @internal */
export declare const CreateKnowledgeResponseBodyRetrievalSettings$inboundSchema: z.ZodType<CreateKnowledgeResponseBodyRetrievalSettings, z.ZodTypeDef, unknown>;
export declare function createKnowledgeResponseBodyRetrievalSettingsFromJSON(jsonString: string): SafeParseResult<CreateKnowledgeResponseBodyRetrievalSettings, SDKValidationError>;
/** @internal */
export declare const ResponseBodyExternalConfig$inboundSchema: z.ZodType<ResponseBodyExternalConfig, z.ZodTypeDef, unknown>;
export declare function responseBodyExternalConfigFromJSON(jsonString: string): SafeParseResult<ResponseBodyExternalConfig, SDKValidationError>;
/** @internal */
export declare const ResponseBody2$inboundSchema: z.ZodType<ResponseBody2, z.ZodTypeDef, unknown>;
export declare function responseBody2FromJSON(jsonString: string): SafeParseResult<ResponseBody2, SDKValidationError>;
/** @internal */
export declare const CreateKnowledgeResponseBodyType$inboundSchema: z.ZodNativeEnum<typeof CreateKnowledgeResponseBodyType>;
/** @internal */
export declare const ResponseBodyRetrievalType$inboundSchema: z.ZodNativeEnum<typeof ResponseBodyRetrievalType>;
/** @internal */
export declare const ResponseBodyRerankConfig$inboundSchema: z.ZodType<ResponseBodyRerankConfig, z.ZodTypeDef, unknown>;
export declare function responseBodyRerankConfigFromJSON(jsonString: string): SafeParseResult<ResponseBodyRerankConfig, SDKValidationError>;
/** @internal */
export declare const ResponseBodyAgenticRagConfig$inboundSchema: z.ZodType<ResponseBodyAgenticRagConfig, z.ZodTypeDef, unknown>;
export declare function responseBodyAgenticRagConfigFromJSON(jsonString: string): SafeParseResult<ResponseBodyAgenticRagConfig, SDKValidationError>;
/** @internal */
export declare const ResponseBodyRetrievalSettings$inboundSchema: z.ZodType<ResponseBodyRetrievalSettings, z.ZodTypeDef, unknown>;
export declare function responseBodyRetrievalSettingsFromJSON(jsonString: string): SafeParseResult<ResponseBodyRetrievalSettings, SDKValidationError>;
/** @internal */
export declare const ResponseBody1$inboundSchema: z.ZodType<ResponseBody1, z.ZodTypeDef, unknown>;
export declare function responseBody1FromJSON(jsonString: string): SafeParseResult<ResponseBody1, SDKValidationError>;
/** @internal */
export declare const CreateKnowledgeResponseBody$inboundSchema: z.ZodType<CreateKnowledgeResponseBody, z.ZodTypeDef, unknown>;
export declare function createKnowledgeResponseBodyFromJSON(jsonString: string): SafeParseResult<CreateKnowledgeResponseBody, SDKValidationError>;
//# sourceMappingURL=createknowledge.d.ts.map