import type { AdCategory } from "./catalog.ts"; export interface AdNeed { productType: string; budget?: { maxMinor: number; currency: string } | undefined; requiredAttributes?: string[] | undefined; excludedAttributes?: string[] | undefined; fulfilment?: "delivery" | "pickup" | "online" | "onsite" | undefined; } export interface AdContext { requestId: string; sessionId: string; category: AdCategory; country: string; city?: string | undefined; language: "ru" | "kk" | "en"; placement: "chat_card" | "generation_wait"; intent: "buy" | "research" | "create"; age: "adult" | "minor" | "unknown"; adsAllowed: boolean; sensitive: boolean; need?: AdNeed | undefined; userTurn?: number | undefined; opportunity?: | { confidence: number; shouldShow: boolean; source: "rules" | "model" } | undefined; } export interface AdCardData { advertiser: string; title: string; description: string; cta: string; imageUrl: string | null; disclosure: string; } export interface AdDecision { decisionId: string; expiresAt: string; card: AdCardData; tracking: { destinationUrl?: string | undefined; impressionUrl: string; clickUrl: string; leadUrl: string; token: string; }; }