import * as z from "zod"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type RetrieveDocumentsRequest = { /** * The name of the index to retrieve documents from */ indexName: string; /** * The search query used for retrieving documents */ query: string; /** * The number of documents to retrieve */ topK: number; /** * Between 0 and 1, configures balance between keyword and semantic retrieval */ alpha?: number | undefined; /** * Whether to rerank the results after retrieval */ rerank?: boolean | undefined; /** * The filter object is used to specify query criteria for filtering results. * * @remarks * Each key in the filter object represents a field name, and its value is a dictionary * of comparison operators. Logical operators can be used within these dictionaries * to combine multiple conditions. * * - **Comparison Operators**: * - **`$eq`**: Checks if a field is equal to a specified value (string, number, or boolean). * - Simplified form: `"field1": "value1"` is equivalent to `"field1": {"$eq": "value1"}`. * - **`$ne`**: Checks if a field is not equal to a specified value (string, number, or boolean). * - **`$gt`**: Checks if a field is greater than a specified numeric value. * - **`$gte`**: Checks if a field is greater than or equal to a specified numeric value. * - **`$lt`**: Checks if a field is less than a specified numeric value. * - **`$lte`**: Checks if a field is less than or equal to a specified numeric value. * - **`$in`**: Checks if a field's value is within a specified list of values (strings, numbers). * - **`$nin`**: Checks if a field's value is not within a specified list of values (strings, numbers). * * - **Logical Operators** (used within field-specific dictionaries): * - **`$and`**: An array of filter objects, all of which must evaluate to true. * - **`$or`**: An array of filter objects, at least one of which must evaluate to true. * * Example: * ```json * { * "field1": "value1", // Simplified equals check * "field2": {"$gt": 10}, * "field3": { * "$or": [ * {"$in": ["value2", "value3"]}, * {"$ne": "value4"} * ] * } * } * ``` */ metadataFilter?: { [k: string]: any; } | undefined; }; /** @internal */ export declare const RetrieveDocumentsRequest$inboundSchema: z.ZodType; /** @internal */ export type RetrieveDocumentsRequest$Outbound = { index_name: string; query: string; top_k: number; alpha?: number | undefined; rerank?: boolean | undefined; metadata_filter?: { [k: string]: any; } | undefined; }; /** @internal */ export declare const RetrieveDocumentsRequest$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace RetrieveDocumentsRequest$ { /** @deprecated use `RetrieveDocumentsRequest$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `RetrieveDocumentsRequest$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `RetrieveDocumentsRequest$Outbound` instead. */ type Outbound = RetrieveDocumentsRequest$Outbound; } export declare function retrieveDocumentsRequestToJSON(retrieveDocumentsRequest: RetrieveDocumentsRequest): string; export declare function retrieveDocumentsRequestFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=retrievedocumentsrequest.d.ts.map