@adcp/sdk API Reference - v14.0.0-beta.6
    Preparing search index...

    Type Alias AssetInstance

    AssetInstance: AssetVariant

    Discriminated union of every creative asset instance recognised by the AdCP creative protocol. Narrow by asset_type to access the per-type fields:

    function describe(asset: AssetInstance): string {
    switch (asset.asset_type) {
    case 'image':
    return `${asset.width}x${asset.height} @ ${asset.url}`;
    case 'video':
    return `${asset.duration_ms ?? 0}ms ${asset.container_format ?? ''}`;
    case 'html':
    return `${asset.content.length}B inline HTML`;
    // ...all branches required — exhaustiveness is enforced
    }
    }

    This is the type to use for individual values in creative_manifest.assets[<key>]. The assets map itself is Record<string, AssetInstance | AssetInstance[]> — keys come from the format's declared asset slot ids; values are single instances or arrays for slots whose format declaration accepts multiple assets.