import { ConsistencyLevel } from '../data/index.js'; import { Metadata } from 'nice-grpc'; import { AggregateReply, AggregateRequest_Aggregation, AggregateRequest_GroupBy } from '../proto/v1/aggregate.js'; import { Filters } from '../proto/v1/base.js'; import { Hybrid, NearAudioSearch, NearDepthSearch, NearIMUSearch, NearImageSearch, NearObject, NearTextSearch, NearThermalSearch, NearVector, NearVideoSearch } from '../proto/v1/base_search.js'; import { WeaviateClient } from '../proto/v1/weaviate.js'; import { RetryOptions } from 'nice-grpc-client-middleware-retry'; import Base from './base.js'; export type BaseAggregateArgs = { aggregations?: AggregateRequest_Aggregation[]; filters?: Filters; groupBy?: AggregateRequest_GroupBy; limit?: number; objectLimit?: number; }; export type AggregateFetchArgs = BaseAggregateArgs; export type AggregateHybridArgs = BaseAggregateArgs & { hybrid: Hybrid; }; export type AggregateNearAudioArgs = BaseAggregateArgs & { nearAudio: NearAudioSearch; }; export type AggregateNearDepthArgs = BaseAggregateArgs & { nearDepth: NearDepthSearch; }; export type AggregateNearImageArgs = BaseAggregateArgs & { nearImage: NearImageSearch; }; export type AggregateNearIMUArgs = BaseAggregateArgs & { nearIMU: NearIMUSearch; }; export type AggregateNearObjectArgs = BaseAggregateArgs & { nearObject: NearObject; }; export type AggregateNearTextArgs = BaseAggregateArgs & { nearText: NearTextSearch; }; export type AggregateNearThermalArgs = BaseAggregateArgs & { nearThermal: NearThermalSearch; }; export type AggregateNearVectorArgs = BaseAggregateArgs & { nearVector: NearVector; }; export type AggregateNearVideoArgs = BaseAggregateArgs & { nearVideo: NearVideoSearch; }; export interface Aggregate { withFetch: (args: AggregateFetchArgs) => Promise; withHybrid: (args: AggregateHybridArgs) => Promise; withNearAudio: (args: AggregateNearAudioArgs) => Promise; withNearDepth: (args: AggregateNearDepthArgs) => Promise; withNearImage: (args: AggregateNearImageArgs) => Promise; withNearIMU: (args: AggregateNearIMUArgs) => Promise; withNearObject: (args: AggregateNearObjectArgs) => Promise; withNearText: (args: AggregateNearTextArgs) => Promise; withNearThermal: (args: AggregateNearThermalArgs) => Promise; withNearVector: (args: AggregateNearVectorArgs) => Promise; withNearVideo: (args: AggregateNearVideoArgs) => Promise; } export default class Aggregator extends Base implements Aggregate { static use(connection: WeaviateClient, collection: string, metadata: Metadata, timeout: number, consistencyLevel?: ConsistencyLevel, tenant?: string): Aggregate; withFetch: (args: AggregateFetchArgs) => Promise; withHybrid: (args: AggregateHybridArgs) => Promise; withNearAudio: (args: AggregateNearAudioArgs) => Promise; withNearDepth: (args: AggregateNearDepthArgs) => Promise; withNearImage: (args: AggregateNearImageArgs) => Promise; withNearIMU: (args: AggregateNearIMUArgs) => Promise; withNearObject: (args: AggregateNearObjectArgs) => Promise; withNearText: (args: AggregateNearTextArgs) => Promise; withNearThermal: (args: AggregateNearThermalArgs) => Promise; withNearVector: (args: AggregateNearVectorArgs) => Promise; withNearVideo: (args: AggregateNearVideoArgs) => Promise; private call; }