@halo-ads/types
v0.1.0
Published
Shared TypeScript types for Halo Ads SDK — zero runtime, import-only
Readme
@halo-ads/types
Shared TypeScript types for the Halo Ads SDK — zero runtime, import-only.
This package is a pure type library. It exports no JavaScript at runtime; all exports are interface, type, and enum declarations.
Install
pnpm add @halo-ads/typesKey types
| Type | Description |
|---|---|
| HaloConfig | SDK initialisation options |
| Ad | A resolved ad creative |
| AdFormat | banner \| card \| native \| carousel \| interstitial |
| AdTheme | CSS-variable-style theme tokens |
| AdRequest / AdResponse | Fetch request/response shapes |
| TrackEventName / TrackEventPayload | Analytics event envelope |
| UserProfile | Client-side user profile (interests, device, geo) |
| IAdProvider | Interface for swapping mock ↔ real API |
| HaloAdsInstance | Full SDK surface interface |
Usage
import type { Ad, AdFormat, HaloConfig } from '@halo-ads/types';
const config: HaloConfig = {
publisherId: 'pub_xxx',
apiKey: 'pk_live_...',
environment: 'production',
};