import { Context, Configuration as GentraceConfiguration, PipelineRun, StepRun } from "@gentrace/core"; import { DeleteManyOptions, DeleteOneOptions, FetchOptions, FetchResponse, Index, Pinecone, PineconeConfiguration, PineconeRecord, QueryOptions, QueryResponse, RecordMetadata, UpdateOptions } from "@pinecone-database/pinecone"; export type GentraceParams = { pipelineSlug?: string; gentrace?: Context; }; type PineconePipelineHandlerOptions = { pipelineRun?: PipelineRun; config?: PineconeConfiguration; gentraceConfig: GentraceConfiguration; }; export type ModifyFirstParam = T extends (param1: infer P, ...args: infer A) => infer R ? (param1: U, ...args: A) => R : never; export type ModifySecondParam = T extends (param1: infer P1, param2: infer P2, ...args: infer A) => infer R ? (param1: P1, param2?: U, ...args: A) => R : never; export type ModifyReturnType = T extends (...args: infer A) => infer R ? (...args: A) => NewReturn : never; type AppendGentraceParams any> = (...args: [...Parameters, GentraceParams?]) => ReturnType; type FetchFunctionType = typeof Index.prototype.fetch; type ModifiedFetchFunction = FunctionWithPipelineRunId>; type UpdateFunctionType = typeof Index.prototype.update; type ModifiedUpdateFunction = FunctionWithPipelineRunId>; type QueryFunctionType = typeof Index.prototype.query; type ModifiedQueryFunction = FunctionWithPipelineRunId>; type UpsertFunctionType = typeof Index.prototype.upsert; type ModifiedUpsertFunction = FunctionWithPipelineRunId>; type DeleteOneFunctionType = typeof Index.prototype.deleteOne; type ModifiedDeleteOneFunction = FunctionWithPipelineRunId>; type DeleteManyFunctionType = typeof Index.prototype.deleteMany; type ModifiedDeleteManyFunction = FunctionWithPipelineRunId>; type DeleteAllFunctionType = typeof Index.prototype.deleteAll; type ModifiedDeleteAllFunction = FunctionWithPipelineRunId>; export type ModifiedNamespaceFunction = (namespace: string) => ModifiedIndex; export type ModifiedIndex = Omit & { fetch: ModifiedFetchFunction; update: ModifiedUpdateFunction; query: ModifiedQueryFunction; upsert: ModifiedUpsertFunction; deleteOne: ModifiedDeleteOneFunction; deleteMany: ModifiedDeleteManyFunction; deleteAll: ModifiedDeleteAllFunction; namespace: ModifiedNamespaceFunction; }; export type FunctionWithPipelineRunId any> = (...args: Parameters) => Promise> & { pipelineRunId: string; }>; export declare class PineconePipelineHandler extends Pinecone { protected pipelineRun?: PipelineRun; protected gentraceConfig: GentraceConfiguration; protected configProtected?: PineconeConfiguration; constructor({ pipelineRun, config, gentraceConfig, }: PineconePipelineHandlerOptions); setPipelineRun(pipelineRun: PipelineRun): void; private setupSelfContainedPipelineRun; indexInner(index: string, namespace?: string): ModifiedIndex; } export declare class PineconeFetchStepRun extends StepRun { inputs: { ids: FetchOptions; }; response: FetchResponse; constructor(elapsedTime: number, startTime: string, endTime: string, inputs: { ids: FetchOptions; }, response: FetchResponse, context: Context); } export declare class PineconeQueryStepRun extends StepRun { inputs: QueryOptions; response: QueryResponse; constructor(elapsedTime: number, startTime: string, endTime: string, inputs: Omit, modelParams: Pick, response: QueryResponse, context: Context); } export declare class PineconeUpdateStepRun extends StepRun { inputs: UpdateOptions; response: object; constructor(elapsedTime: number, startTime: string, endTime: string, inputs: UpdateOptions, response: object, context: Context); } export declare class PineconeUpsertStepRun extends StepRun { inputs: { records: PineconeRecord[]; }; response: any; constructor(elapsedTime: number, startTime: string, endTime: string, inputs: { records: PineconeRecord[]; }, context: Context); } export declare class PineconeDeleteOneStepRun extends StepRun { inputs: DeleteOneOptions; response: object; constructor(elapsedTime: number, startTime: string, endTime: string, inputs: { recordId: DeleteOneOptions; }, context: Context); } export declare class PineconeDeleteManyStepRun extends StepRun { inputs: DeleteManyOptions; response: object; constructor(elapsedTime: number, startTime: string, endTime: string, inputs: { options: DeleteManyOptions; }, context: Context); } export declare class PineconeDeleteAllStepRun extends StepRun { response: object; constructor(elapsedTime: number, startTime: string, endTime: string, context: Context); } export {};