UNPKG

@konvo-ai/sdk-web

Version:

KonvoAI Conversational Ad SDK for Web Applications - Intelligent contextual advertising with AI-powered decision engine

40 lines (39 loc) 807 B
export interface KonvoAIConfig { apiKey: string; baseUrl?: string; autoIntegrate?: boolean; chatSelectors?: string[]; } export interface User { anonId: string; country?: string; language?: string; } export interface Chat { lastUserMsg: string; context?: string; } export type Surface = 'inline-chip' | 'banner' | 'interstitial' | 'native'; export interface DecideInput { user: User; chat: Chat; surface: Surface; } export interface AdRender { title: string; desc: string; imageUrl?: string; cta: { label: string; handler: () => void; }; } export interface DecideResponse { decisionId: string; fill: boolean; render?: AdRender; } export interface TrackingToken { decisionId: string; timestamp: number; }