export declare type JSONObject = { [key: string]: any; }; export declare type JSONArray = Array; export declare type JSONValue = string | number | boolean | null | JSONObject | JSONArray; export interface AnalyticsEvent { type: 'track'; event: string; properties?: JSONValue; received_at?: Date; } export interface PageDefault { path: string; referrer?: string; search?: string; title?: string; url?: string; utm?: Record; } export interface PageView { page: PageDefault; visit_start?: Date; visit_end?: Date; } export interface TrafficSource { type: 'utm' | 'referrer'; value: string; } export interface AccountScore { fit_grade: number; fit_grade_letter: 'A' | 'B' | 'C' | 'D' | 'F'; } export interface Raw { events?: AnalyticsEvent[]; traits?: Record; firmographics?: Record; person?: Record; pageViews?: PageView[]; trafficSources?: TrafficSource[]; accountScore?: AccountScore; } import { CountMinSketchOptions, JsBloomOptions } from '@getkoala/js-bloom'; export * from '@getkoala/js-bloom'; import { Company } from './company'; import { Events } from './events'; import { inSegment, when } from './in-segment'; import type { Indexable, Profile } from './indexing'; import { Page } from './page'; import { Person } from './person'; import { Traits } from './traits'; export declare type BuildOptions = { b?: JsBloomOptions; c?: CountMinSketchOptions; }; import { Scores } from './scores'; import { RawProfile } from './raw-profile'; export interface EdgeAPI { traits: Traits; events: Events; page: Page; company: Company; person: Person; scores: { account: Scores; }; inSegment: typeof inSegment; when: typeof when; raw: Profile; index: (indexable: Indexable | Indexable[]) => void; rawProfile?: RawProfile; } export declare function build(data: BuildOptions): EdgeAPI; export declare function anonymize(raw: Raw): Profile;