Discriminated union of every creative asset instance recognised by the AdCP creative protocol. Narrow by asset_type to access the per-type fields:
asset_type
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 }} Copy
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 creative_manifest.assets[<key>] values. The assets map itself is Record<string, AssetInstance> — keys come from the format's declared asset slot ids; values are these instances.
creative_manifest.assets[<key>]
assets
Record<string, AssetInstance>
Discriminated union of every creative asset instance recognised by the AdCP creative protocol. Narrow by
asset_typeto access the per-type fields:This is the type to use for
creative_manifest.assets[<key>]values. Theassetsmap itself isRecord<string, AssetInstance>— keys come from the format's declared asset slot ids; values are these instances.