@adcp/sdk API Reference - v7.9.0
    Preparing search index...

    Type Alias AssetInstance

    AssetInstance:
        | ImageAsset
        | VideoAsset
        | AudioAsset
        | TextAsset
        | HTMLAsset
        | URLAsset
        | CSSAsset
        | JavaScriptAsset
        | MarkdownAsset
        | VASTAsset
        | DAASTAsset
        | BriefAsset
        | CatalogAsset
        | WebhookAsset

    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 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.