feature/2519 added previously unsupported asset subtypes (without parsing)#2520
feature/2519 added previously unsupported asset subtypes (without parsing)#2520JoernBerkefeld wants to merge 5 commits intodevelopfrom
Conversation
added to (new) asset-package: packagedefinition packagedeployment added to asset-block: enhanceddynamicblock iccloudpageblock einsteincontentselectionblock einsteincontenttesting added to asset-template: jsonmessagetemplate (whatsapp) jbtemplate (journey template)
Coverage ReportCommit:b54ad85Base: develop@f9861bd
Details (changed files):
|
# Conflicts: # @types/lib/metadataTypes/Asset.d.ts.map
There was a problem hiding this comment.
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.jswith new subtype mappings (notablypackage, additionalblocksubtypes, and newtemplatesubtypes) and updated assetType ID mapping. - Updated generated
@typesdefinitions 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. |
| typeRetrieveByDefault: [ | ||
| 'asset', | ||
| 'block', | ||
| 'cloudpage', | ||
| 'code', |
There was a problem hiding this comment.
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.
| // 1 | ||
| 'webpage', | ||
| 'webtemplate', | ||
| 'icemailformblock', |
There was a problem hiding this comment.
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).
| 'icemailformblock', | |
| 'icemailformblock', | |
| 'jsonmessage', |
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