import { AxiosPromise } from 'axios'; import Response from '../util/Response'; export interface GameAdEventPayload { /** Opaque token returned by the server-created advertising manifest. */ token: string; /** Client idempotency UUID. Reuse is valid only within the same ad session. */ event_uuid?: string; /** Provider that produced or attempted the event. */ provider: string; /** Stable Glitch placement name, such as game_banner or game_video. */ placement: string; /** Normalized creative/ad format. */ format: 'banner' | 'video' | 'interstitial' | 'rewarded' | 'in_game_image' | 'in_game_video' | 'other'; /** Normalized SDK/ad lifecycle event. */ event_type: 'sdk_ready' | 'request_started' | 'loaded' | 'channel_registered' | 'measurement' | 'no_fill' | 'fallback_shown' | 'started' | 'impression' | 'viewable' | 'clicked' | 'completed' | 'skipped' | 'closed' | 'paused_game' | 'resumed_game' | 'error'; /** Optional provider-native event or impression identifier. */ provider_event_id?: string; /** Non-sensitive provider diagnostics and event context. */ metadata?: Record; /** ISO 8601 client-observed timestamp. Defaults to server receipt time. */ occurred_at?: string; } /** Provider-neutral intrinsic-ad surface declared by a game developer. */ export interface GameInGameAdPlacement { id?: string; title_id?: string; provider?: 'anzu'; placement_key: string; channel_name: string; surface_type: 'mesh' | 'sprite' | 'ui_image' | 'raw_image' | 'html' | 'electron_shell'; scene_name?: string | null; aspect_ratio: number; allow_images: boolean; allow_videos: boolean; allow_audio?: boolean; is_dynamic: boolean; is_clickable: boolean; shrink_to_fit: boolean; fallback_media_url?: string | null; status: 'active' | 'disabled'; metadata?: Record | null; } /** Public delivery identity for a provider and runtime platform. */ export interface GameAdProviderApp { id?: string; title_id?: string | null; provider: 'anzu'; platform: 'web' | 'electron_macos' | 'electron_windows' | 'electron_linux' | 'unity_webgl' | 'cocos_web' | 'construct_web'; app_key: string; bundle_id?: string | null; mode: 'integration' | 'production'; integration_type: 'managed' | 'direct'; status: 'active' | 'disabled' | 'pending'; metadata?: Record | null; } /** * Typed client for platform-served game advertising. * * These endpoints manage publisher inventory displayed around playable games; * they are intentionally separate from APIs used to buy advertising campaigns. */ declare class GameAdvertising { /** Return developer-visible ad-earnings settings for a title. */ static settings(title_id: string): AxiosPromise>; /** Update developer ad-earnings activation and optional title provider ID. */ static updateSettings(title_id: string, data: object): AxiosPromise>; /** Resolve ad eligibility and create an expiring provider manifest/session. */ static createSession(title_id: string, data: object): AxiosPromise>; /** Store one normalized, idempotent event for an advertising session. */ static storeEvent(title_id: string, session_id: string, data: GameAdEventPayload): AxiosPromise>; /** Return developer-visible estimated/finalized earnings and delivery totals. */ static revenueSummary(title_id: string, params?: Record): AxiosPromise>; /** Return every intrinsic-ad surface configured for a title. */ static inGamePlacements(title_id: string): AxiosPromise>; /** Atomically replace a title's provider-neutral intrinsic-ad surfaces. */ static replaceInGamePlacements(title_id: string, placements: GameInGameAdPlacement[]): AxiosPromise>; /** Return site-admin delivery settings, aggregate metrics, and recent revenue. */ static adminDashboard(): AxiosPromise>; /** Partially update platform-wide providers and delivery frequency. */ static adminUpdateSettings(data: object): AxiosPromise>; /** Import or reconcile one provider revenue report row. */ static adminStoreRevenue(data: object): AxiosPromise>; /** Return public provider app keys and platform mappings for site admins. */ static adminProviderApps(): AxiosPromise>; /** Create or update a provider app mapping without accepting report secrets. */ static adminUpsertProviderApp(data: GameAdProviderApp): AxiosPromise>; } export default GameAdvertising;