Feat/taxonomy publishing#345
Conversation
…taxonomy management
feat dx-3628 get all taxonomies
get a single taxonomy
…seDataMock for consistency in tests
feat: Add Term and TermQuery classes
… and adjust related tests
Feat/dx 3632 terms loacales
feat: Add ancestors method to Term class and update related tests
…ion and fetch methods
…lished status and feature flag requirements
feat: Add descendants method to Term class and update related tests
…y-api Feat/dx 3797 update taxonomy api
|
We regret to inform you that you are currently not able to merge your changes into the main branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the development branch. Our team will then review the changes and work with you to ensure a successful merge into the main branch. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
1 similar comment
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Adds locale-aware retrieval for taxonomy and term CDA endpoints
(cdn.contentstack.io) to cover the localized-delivery flow (CD-11371).
- Taxonomy.fetch(locale?) — pass locale to GET /taxonomies/{uid}
- TermQuery.locale(code) + includeFallback() — chainable params on
GET /taxonomies/{uid}/terms for locale and fallback filtering
- Term.fetch(locale?) — pass locale to GET /taxonomies/{uid}/terms/{uid}
- Fixed incorrect JSDoc on Term.fetch (copy-paste from descendants)
- Fixed broken test imports pointing to non-existent src/lib/* paths
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: add locale and includeFallback support to taxonomy CDA delivery
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
…rmQuery Add chainable helpers so common CDA query params can be sent on the published taxonomy/term endpoints, which previously issued requests with no params at all: - Term: depth(), includeFallback(), includeBranch(), param(), addParams() and locale support on fetch(); all request methods (fetch/locales/ ancestors/descendants) now forward _queryParams. - Taxonomy: includeFallback(), includeBranch(), param(), addParams(), and locale support on fetch() (fetch() now forwards _queryParams). - TermQuery: depth(), skip(), limit(), includeCount(), includeFallback(), includeBranch(), locale(), param(), addParams(). Also fix broken unit-test imports (src/lib/* -> src/taxonomy/*, src/query/*) so the taxonomy suites load, and add coverage asserting the params reach the request. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
…m-query Add mock fixtures and unit/API test cases exercising locale-based fetch and query behavior across Taxonomy, Term, and TermQuery.
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Summary
Adds support for the published Taxonomy Content Delivery API (CDA) to the delivery SDK. Consumers can now fetch published taxonomies and terms, walk the term tree (ancestors/descendants), retrieve localized term versions, and query entries by taxonomy/term — all through a fluent, chainable API off the stack instance.
What's new
New classes wired into
Stack:stack.taxonomy()TaxonomyQuerystack.taxonomy(uid)Taxonomystack.taxonomy(uid).term(termUid)Termstack.taxonomy(uid).term()TermQueryEndpoint coverage
GET /taxonomiesstack.taxonomy().find()GET /taxonomies/:uidstack.taxonomy(uid).fetch()GET /taxonomies/:uid/termsstack.taxonomy(uid).term().find()GET /taxonomies/:uid/terms/:termstack.taxonomy(uid).term(term).fetch()GET .../terms/:term/localesstack.taxonomy(uid).term(term).locales()GET .../terms/:term/ancestorsstack.taxonomy(uid).term(term).ancestors()GET .../terms/:term/descendantsstack.taxonomy(uid).term(term).descendants()Query-parameter support
Chainable helpers to apply the common CDA query parameters:
Taxonomy:includeFallback(),includeBranch(),param(),addParams(), and alocaleargument onfetch(locale?).Term:depth(),includeFallback(),includeBranch(),param(),addParams(), and alocaleargument onfetch(locale?); params are forwarded onfetch/locales/ancestors/descendants.TermQuery:depth(),skip(),limit(),includeCount(),includeFallback(),includeBranch(),locale(),param(),addParams().Types
BaseTaxonomy,BaseTermresponse interfaces.TaxonomyQueryOperationenum for tree operators ($above,$below,$eq_above,$eq_below) used in entry-by-taxonomy queries.Usage
Testing
Taxonomy,Term,TermQuery, andTaxonomyQuery, including assertions that the query parameters reach the request.Notes / follow-ups
/taxonomies/entries(entries-by-taxonomy) path is set onTaxonomyQuerybutfind()currently resolves to/taxonomies; wiring a dedicated call for entries-by-taxonomy with tree operators is a follow-up.Term.locales()targets/taxonomies/:uid/terms/:uid/locales; confirm against the finalized CDA route (/taxonomy_definitions/...in the spec) before release.