import { EarnLayerClient } from './EarnLayerClient'; import { DisplayAd } from './types'; export interface FetchAdParams { conversationId?: string; adType?: 'banner' | 'popup' | 'video' | 'thinking'; placement?: string; thinkingAdTimeout?: number; } export class DisplayAdFetcher { private client: EarnLayerClient; constructor(client: EarnLayerClient) { this.client = client; } async fetchAd(params: FetchAdParams): Promise { if (!params.conversationId) { throw new Error('conversationId is required to fetch display ads'); } return this.client.getDisplayAd(params.conversationId, params.adType, params.thinkingAdTimeout); } }