import { FunctionContext } from "./functions"; import { AnalyticsServerEvent } from "./analytics"; export type ProfileResult = { profileId?: string; destinationId?: string; tableName?: string; traits: Record; }; export type ProfileUser = { profileId: string; userId?: string; anonymousId?: string; traits: Record; }; export type ProfileBuilderContext = { profileBuilder: { id: string; version: number; }; }; export type ProfileFunction = ( events: Iterable, user: ProfileUser, context: FunctionContext & ProfileBuilderContext ) => Promise;