Repository navigation
feature/2519 added previously unsupported asset subtypes (without parsing) - #2520
Merged
JoernBerkefeld merged 33 commits intoSep 5, 2026
Merged
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:4f07f79Base: develop@c6c18a1
Details (changed files):
|
# Conflicts: # @types/lib/metadataTypes/Asset.d.ts.map
Contributor
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. |
…lerplate vscode extension recommendations
…ntent in asset-webstudio
Replace ~40 per-id get-response.json and idIN query POST fixtures with a single assets-pool.json (15 ids, full GET bodies) plus a dynamic read engine in resourceFactory.js that serves GET by-id, GET by-key and assetType.id-in query POSTs by projecting the pool to a canonical query column-set. Query projection retains data/legacyData so downstream types (journey, emailSend, triggeredSend, ContentBlock) resolve their email via the query-cached legacyId; asset 808714 carries a queryOverrides for its divergent query-view legacyId. Kept two file-based exceptions (slashfolder scenario, customerKey equal-op). Count assertions adjusted for the honest pollution-drop (off-type by-id GETs 1209971/950143 no longer forced). Full suite green (314 passing / 0 failing).
Fork's console runs git hooks with a pseudo-TTY, so chalk/eslint/listr emit ANSI color codes that are hard to read in a plain-text log viewer. Unset FORCE_COLOR and set NO_COLOR=1 at the top of each hook so output stays plain text.
…med types dont interfere with each other
…th dynamic asset pool + engine Replace the static per-combination `query/post-response-assetType.idIN*.json` asset fixtures with a single one-body-per-id asset pool (`assets-pool.json`) plus a query projection engine in `resourceFactory.js`. The engine serves each asset body from the pool by-id / by-key and projects the `assetType.id-in` query responses dynamically, instead of relying on hand-maintained idIN fixture files. Add an optional `queryExclude` gate so pool entries that exist only to be resolved by-id / by-key (e.g. an asset referenced by a mobilePush message) never surface in an `assetType.id-in` query response. The count-assertion deltas in the asset, automation and general tests are justified: off-type by-id GETs are no longer fabricated, so retrieve/cache/API-history counts reflect the real projected asset set.
…D coverage Add dedicated test coverage and fixtures for the mobilePush and mobilePushApp types (retrieve / CRUD via the push v1 API) and for journeys that reference a mobilePush message. The old `legacy/v1/beta/push/application` response fixture is removed in favor of the new `push/v1/application` path. All fixtures are sanitized and contain no client data — keys such as `testExisting_mobilePush_asset_DEV` and `testExisting_journey_Push` are synthetic. The event.test count bump (5->6) is caused by the shared eventDefinitions fixture now carrying an extra APIEvent entry used by the push-journey coverage.
… retrieve (async/await) The mobilePush, mobilePushApp, mobileMessage and mobileKeyword retrieve paths wrapped an `await`ed API call in a synchronous try/catch, so a rejected promise escaped the guard and hard-failed the whole retrieve instead of degrading to `0 downloaded` when a key does not exist or a BU list is empty. Await inside the catch guard so the expected error is caught. The two APIs report the not-found error differently, so the guards differ: - MobilePush / MobilePushApp use the REST `/push/v1/...` API, whose 400 body carries `errorcode 10006`. - MobileMessage / MobileKeyword use the legacy mobile API, whose 400 has no errorcode, so the guard falls back to the axios `ERR_BAD_REQUEST` code. MobilePush additionally degrades a keyless empty-BU 500 (`ERR_BAD_RESPONSE`) to `0 downloaded`. Add the supporting REST error-injection harness (`addRestErrorOverride` / `resetRestErrorOverrides` / `rejectWithAxiosError` in resourceFactory.js and the `mockRESTError` wrapper in utils.js) plus the shared `rest400/rest400-validationError/ rest500` response fixtures, and regression `it` blocks in the mobileMessage and mobileKeyword tests covering the graceful wrong-key path.
Fills the create-without-update gap in the mobilePush suite; exercises the upsert PUT /push/v1/message/<id> path (MetadataType.updateREST) instead of only create.
# Conflicts: # package-lock.json # package.json
JoernBerkefeld
deleted the
feature/2519-add-missing-asset-sub-sub-types
branch
September 5, 2026 16:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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