import { CountMinSketchOptions, JsBloomOptions } from '@getkoala/edge-api-client'; import type { Profile } from '../analytics/collector'; import { Context } from '../analytics/event-context'; import type { Event } from '../analytics/event-queue'; import { PageView } from '../analytics/page/page-tracker'; export interface AccountScore { fit_grade: number; fit_grade_letter: 'A' | 'B' | 'C' | 'D' | 'F'; intent_grade: number; intent_score_level: 'Very High' | 'High' | 'Medium' | 'Low' | 'None'; overall_grade: number; } export interface QualificationResult { account_score?: AccountScore; } export declare type AnonymousProfile = { c?: CountMinSketchOptions; b?: JsBloomOptions; }; export interface Qualification { profile_id: string; qualification: QualificationResult; a?: AnonymousProfile; } export declare type Identify = { context: Context; type: 'identify'; traits?: Record; sent_at?: string; }; /** * Qualify a profile and get the results. * This is ideal for when you need to know the * score before finishing an async operation. */ export declare function qualify(project: string, profile: Profile): Promise; export declare function collectIdentify(project: string, profile: Profile, identify: Identify): true | Promise; export declare function collectEvents(project: string, profile_id: string, events?: Event[]): true | Promise | undefined; export declare function collectPages(project: string, profile_id: string, page_views?: PageView[]): true | Promise | undefined;