import { AccessPassport, ResourceAccessPolicy } from "../access-control"; import { JSONObject } from "../common/jsonTypes"; import { BaseRetriever, BaseRetrieverQueryParams } from "./retriever"; export type CSVRetrieverQuery = { primaryKeyColumn: string; }; export type CSVRetrieverConfig = { path: string; sourceAccessPolicies: ResourceAccessPolicy[]; }; export interface CSVRetrieverQueryParams extends BaseRetrieverQueryParams { accessPassport: AccessPassport; } /** * Retrieve structured data from a CSV file as a JSON object for use in completion generation. */ export declare class CSVRetriever extends BaseRetriever { filePath: string; sourceAccessPolicies: ResourceAccessPolicy[]; constructor(config: CSVRetrieverConfig); private checkSourceAccess; /** * Get the data relevant to the given query and which the current identity can access. * If the current identity does not have access to the data, return null. * @param params The retriever query params to use for the query. * @returns A promise that resolves to the retrieved data, or null if no data accessible. */ retrieveData(params: CSVRetrieverQueryParams): Promise; }