Skip to content

feature/2519 added previously unsupported asset subtypes (without parsing)#2520

Open
JoernBerkefeld wants to merge 5 commits intodevelopfrom
feature/2519-add-missing-asset-sub-sub-types
Open

feature/2519 added previously unsupported asset subtypes (without parsing)#2520
JoernBerkefeld wants to merge 5 commits intodevelopfrom
feature/2519-add-missing-asset-sub-sub-types

Conversation

@JoernBerkefeld
Copy link
Contributor

PR details

What changes did you make? (Give an overview)

Further details (optional)

added to (new) asset-package:

packagedefinition
packagedeployment
added to asset-block:

enhanceddynamicblock
iccloudpageblock
einsteincontentselectionblock
einsteincontenttesting
added to asset-template:

jsonmessagetemplate (whatsapp)
jbtemplate (journey template)

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • test scripts updated
  • Wiki updated (if applicable)

added to (new) asset-package:

packagedefinition
packagedeployment
added to asset-block:

enhanceddynamicblock
iccloudpageblock
einsteincontentselectionblock
einsteincontenttesting
added to asset-template:

jsonmessagetemplate (whatsapp)
jbtemplate (journey template)
@JoernBerkefeld JoernBerkefeld added this to the 9.1.0 milestone Feb 27, 2026
@JoernBerkefeld JoernBerkefeld self-assigned this Feb 27, 2026
@JoernBerkefeld JoernBerkefeld added the c/asset COMPONENT label Feb 27, 2026
@JoernBerkefeld JoernBerkefeld linked an issue Feb 27, 2026 that may be closed by this pull request
@github-actions github-actions bot added the enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story" label Feb 27, 2026
@github-actions
Copy link

github-actions bot commented Feb 28, 2026

Coverage Report

Commit:b54ad85
Base: develop@f9861bd

Type Base This PR
Total Statements Coverage  71%  71%  (+0%)
Total Branches Coverage  70.78%  70.78%  (+0%)
Total Functions Coverage  83.71%  83.71%  (+0%)
Total Lines Coverage  71%  71%  (+0%)
Details (changed files):
File Statements Branches Functions Lines

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds additional SFMC Content Builder asset “sub-sub-types” to the Asset metadata definition (so they can be retrieved/grouped without special parsing), and updates test REST fixtures and generated TypeScript typings accordingly.

Changes:

  • Extended Asset.definition.js with new subtype mappings (notably package, additional block subtypes, and new template subtypes) and updated assetType ID mapping.
  • Updated generated @types definitions to reflect the new subtype/ID entries.
  • Added new REST mock response fixtures for the new/changed assetType.id IN (...) query combinations.

Reviewed changes

Copilot reviewed 1 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/metadataTypes/definitions/Asset.definition.js Adds new subtype(s) and extended subtype mappings + assetType ID mappings.
@types/lib/metadataTypes/definitions/Asset.definition.d.ts Updates generated type defs for the new subtype mappings.
@types/lib/metadataTypes/Asset.d.ts Updates generated Asset typings to include new extended subtypes and IDs.
@types/lib/metadataTypes/Asset.d.ts.map Updated sourcemap for the generated typings.
test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN1,205,206,232.json New REST fixture for a revised assetType.id IN (...) query.
test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN5,207,208,209,230.json New REST fixture for message-related assetType IDs (includes 230).
test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN4,214,231,235.json New REST fixture for template-related assetType IDs.
test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN3,195,196,197,198,199,200,201,202,203,210,211,212,213,229,233,234,238.json New REST fixture for block-related assetType IDs (incl. newly added ones).
test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN223,224,225,226,227,228,229,231,232,233,234,235,238.json New REST fixture for updated cache/chunk query combinations.
test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN225,226,227,228,229,232,233,234,238.json New REST fixture for updated cache/chunk query combinations.
test/resources/9999999/asset/v1/content/assets/query/post-response-assetType.idIN219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,238,240,241,242,243,244,245.json New REST fixture for updated cache/chunk query combinations.

Comment on lines 21 to 25
typeRetrieveByDefault: [
'asset',
'block',
'cloudpage',
'code',
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typeRetrieveByDefault now includes cloudpage, which changes the behavior of mcdev retrieve asset (it will pull CloudPage assets by default) and will likely break existing expectations/tests that assumed cloudpages were opt-in via asset-cloudpage. If this is not intentional for #2519, remove cloudpage from the default list; otherwise, update tests + PR description to reflect this breaking default-change.

Copilot uses AI. Check for mistakes.
// 1
'webpage',
'webtemplate',
'icemailformblock',
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsonmessage (assetTypeId 230) was removed from the asset subtype and added to message. This changes where mobile message assets are retrieved/saved (asset-message instead of asset-asset) and can break dependency caching (e.g. Transactional Push currently depends on asset-asset to resolve r__asset_key). Either keep jsonmessage under asset for backward compatibility, or update dependent metadata definitions/tests to depend on asset-message (and ensure the cache includes 230).

Suggested change
'icemailformblock',
'icemailformblock',
'jsonmessage',

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/asset COMPONENT enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] add missing asset sub-sub-types

2 participants