import ClickHouse from '@posthog/clickhouse'; import { PluginEvent } from '@posthog/plugin-scaffold'; import { DateTime } from 'luxon'; import { IEvent } from '../../config/idl/protos'; import { Element, Hub, Person, PostgresSessionRecordingEvent, SessionRecordingEvent } from '../../types'; import { Client } from '../../utils/celery/client'; import { DB } from '../../utils/db/db'; import { KafkaProducerWrapper } from '../../utils/db/kafka-producer-wrapper'; import { GroupTypeManager } from './group-type-manager'; import { PersonManager } from './person-manager'; import { TeamManager } from './team-manager'; export interface EventProcessingResult { event: IEvent | SessionRecordingEvent | PostgresSessionRecordingEvent; eventId?: number; elements?: Element[]; } export declare class EventsProcessor { pluginsServer: Hub; db: DB; clickhouse: ClickHouse | undefined; kafkaProducer: KafkaProducerWrapper | undefined; celery: Client; teamManager: TeamManager; personManager: PersonManager; groupTypeManager: GroupTypeManager; constructor(pluginsServer: Hub); processEvent(distinctId: string, ip: string | null, data: PluginEvent, teamId: number, now: DateTime, sentAt: DateTime | null, eventUuid: string): Promise; handleTimestamp(data: PluginEvent, now: DateTime, sentAt: DateTime | null): DateTime; isNewPersonPropertiesUpdateEnabled(teamId: number): boolean; private updatePersonProperties; private updatePersonPropertiesDeprecated; private setIsIdentified; private handleIdentifyOrAlias; private alias; mergePeople({ mergeInto, mergeIntoDistinctId, otherPerson, otherPersonDistinctId, totalMergeAttempts, shouldIdentifyPerson, }: { mergeInto: Person; mergeIntoDistinctId: string; otherPerson: Person; otherPersonDistinctId: string; totalMergeAttempts: number; shouldIdentifyPerson?: boolean; }): Promise; private capture; private createEvent; private createSessionRecordingEvent; private createPersonIfDistinctIdIsNew; private upsertGroup; }