Skip to content

Conversation

@whitelisab
Copy link
Contributor

Summary

This PR adds support for utilizing releases in the SDK.

Description

This SDK now supports:

  • New release-aware entry and asset methods
  • Optionally pass release Id to existing entry and asset methods
  • Extend releases methods to work with Release.V2 schema version
  • Optionally create a release-aware client

These changes are introduced for the plain client only.

Motivation and Context

These changes are being introduced to support the new Timeline feature in Beta, more info here

Checklist (check all before merging)

  • Both unit and integration tests are passing
  • There are no breaking changes
  • Changes are reflected in the documentation (will be done later)

When adding a new method:

  • The new method is exported through the default and plain CMA client
  • All new public types are exported from ./lib/export-types.ts
  • Added a unit test for the new method
  • Added an integration test for the new method
  • The new method is added to the documentation

elylucas and others added 30 commits June 24, 2025 14:32
…2664)

* feat: add releaseSchema defaults to plain client creation

* fix: rename releaseSchema to releaseSchemaVersion

* fix: forgot to fix test
…X-187] (#2665)

* feat: add releaseSchema defaults to plain client creation

* fix: rename releaseSchema to releaseSchemaVersion

* fix: forgot to fix test

* feat: add support for releaseSchemaVersion in create/query methods

* chore: lint fixes

* feat: add support for release.entry.* pattern

* chore: lint fixes

* chore: fix test description
* feat: add releaseSchema defaults to plain client creation

* fix: rename releaseSchema to releaseSchemaVersion

* fix: forgot to fix test

* feat: add support for releaseSchemaVersion in create/query methods

* chore: lint fixes

* feat: add support for release.entry.* pattern

* chore: lint fix

* chore: removing duplicate type
…2668)

* feat: add releaseSchema defaults to plain client creation

* fix: rename releaseSchema to releaseSchemaVersion

* fix: forgot to fix test

* feat: add support for releaseSchemaVersion in create/query methods

* chore: lint fixes

* feat: add support for release.entry.* pattern

* chore: lint fixes

* feat: add forTemplatedSpaces field for env template creation [DX-173] (#2663)

* chore: GetReleaseParams now extends GetReleaseEnvironmentParams

* feat: release/update enpoint updated to reflect Release.v2

* chore: removed unnecessary error handling from update endpoint

* chore: default integration test implemented

* chore: withoutDefault integration test implemented

* feat: all integrations tests passing

* fix: test:integration-watch action in package.json reverted to default

* fix: lint error resolved

* fix: prettier passing

---------

Co-authored-by: Ely Lucas <[email protected]>
Co-authored-by: Lisa White <[email protected]>
* add unit tests and mock for ReleaseEntry

* update test to use it.each

* Remove wrapper tests; move Rest endpoint tests to proper directory

* fix: lint prettier
* feat: entry.get takes releaseId from params to retrieve release entry

* add tests

* chore:prettier

* chore:prettier again

* chore: move entry w/ releaseId tests to existing entry integration tests file

* chore: cleanup comment, remove QueryParam that was added unnecessarily

* chore: cleanup code
* chore: getMany first attempt

* chore: new integrations test file added (from Michael)

* chore: type fixes implemented

* chore: test shell added to entry-integration.test.ts

* chore: tests implemented with necessary unimplemented release metadata tests commented out

* chore: prettier fix

* fix: entry integration scope removed from test script

* chore: prettier fix

* fix: version logic cleaned up and test query modified

* chore: prettier fix
* feat: add release.entry.update method

* feat: add entry.release.patch method (#2695)
* chore: add canary build to release/releasev2 branch

* chore: update readme with info on current experimental features
* feat: add release.entry.createWithId method [DX-61]

* fix: update types for release entry params

* test: debug integration tests

* test: update unit tests and remove changes to integration tests
* feat: entry.patch w/ releaseId alias for release.entry.patch

* chore: add unit tests

* chore: run prettier

* chore: add integration tests for entry.patch with releaseId

* chore: run lint

* chore: cleanup code

* chore: more cleanup

* chore(test): remove redundant assertion

* chore: cleanup params, console logs

* chore: handle undefined headers for typescript

* chore: use typecasting to pass param
* feat: entry.update supports releaseId

* chore: add unit tests for entry.update

* chore: use typecasting to pass param

* test: add integration tests for entry.update

* chore: keep QueryParams consistent between entry.update and release.entry.update
* feat: add releaseId support to entry.create

* chore: add QueryParams to be consistent with release.entry.create
* feat: remove release[lte] endpoint

* fix: delete more old tests, fix return types
* fix(types): add release to entitymetasysprops []

* feat(release-assets): add support for assets inside of a release [TOL-3357]
@whitelisab whitelisab requested a review from a team as a code owner September 22, 2025 18:06
elylucasctfl
elylucasctfl previously approved these changes Sep 23, 2025
Copy link
Contributor

@elylucasctfl elylucasctfl left a comment

Choose a reason for hiding this comment

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

Added that one suggestion in the readme we talked about but besides that 🚀

@whitelisab whitelisab merged commit 42f7147 into master Sep 24, 2025
7 checks passed
@whitelisab whitelisab deleted the canary branch September 24, 2025 20:07
@contentful-automation
Copy link
Contributor

🎉 This PR is included in version 11.60.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@contentful-automation
Copy link
Contributor

🎉 This PR is included in version 12.0.0-beta.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants