Skip to content

Conversation

@michaelphamcf
Copy link
Contributor

@michaelphamcf michaelphamcf commented Sep 2, 2025

Summary

JIRA: DX-210

entry.update takes releaseId and delegates to release entry update endpoint.

Description

  • Add releaseId to entry.update params
  • If request has releaseId, call release.entry.update endpoint
  • Unit tests for entry.update
  • Integration tests for entry.update

Motivation and Context

Checklist (check all before merging)

  • Both unit and integration tests are passing
  • There are no breaking changes
  • Changes are reflected in the documentation

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

@michaelphamcf michaelphamcf changed the title Feat/dx 210 entry update to take release id 2 feat: entry.update supports releaseId Sep 2, 2025
@michaelphamcf michaelphamcf changed the title feat: entry.update supports releaseId feat: entry.update supports releaseId [DX-210] Sep 2, 2025
@michaelphamcf michaelphamcf force-pushed the feat/DX-210-entry-update-to-take-release-id-2 branch from 51db2d8 to 412a4fb Compare September 2, 2025 19:44
@michaelphamcf michaelphamcf marked this pull request as ready for review September 2, 2025 20:06
@michaelphamcf michaelphamcf requested a review from a team as a code owner September 2, 2025 20:06
Copy link
Contributor

@whitelisab whitelisab left a comment

Choose a reason for hiding this comment

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

Just one clarification question, otherwise approving!

export const update: RestEndpoint<'Entry', 'update'> = <T extends KeyValueMap = KeyValueMap>(
http: AxiosInstance,
params: GetSpaceEnvironmentParams & { entryId: string },
params: UpdateEntryParams,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to support QueryParams here if releaseEntry.update has that as part of the Params type?

Copy link
Contributor Author

@michaelphamcf michaelphamcf Sep 2, 2025

Choose a reason for hiding this comment

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

Oh right, I had that mentally noted but forgot! Thanks for the reminder.

@michaelphamcf michaelphamcf merged commit bed1b7d into canary Sep 3, 2025
6 checks passed
@michaelphamcf michaelphamcf deleted the feat/DX-210-entry-update-to-take-release-id-2 branch September 3, 2025 15:08
@contentful-automation
Copy link
Contributor

🎉 This PR is included in version 11.55.0-canary.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@contentful-automation
Copy link
Contributor

🎉 This PR is included in version 11.58.0-canary.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@contentful-automation
Copy link
Contributor

🎉 This PR is included in version 11.59.0-canary.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

whitelisab added a commit that referenced this pull request Sep 24, 2025
* feat: add releaseSchema defaults to plain client creation [DX-184] (#2664)

* feat: add releaseSchema defaults to plain client creation

* fix: rename releaseSchema to releaseSchemaVersion

* fix: forgot to fix test

* feat(default): release-id (#2666)

* feat: add support for releaseSchemaVersion in create/query methods [DX-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 support for release.entry.* pattern [DX-192] (#2667)

* 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

* feat: release/update endpoint reflects schemaVersion param [DX-188] (#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]>

* Dx 194 Add unit tests for release.entry.get (#2674)

* 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(releases): release.entry.getMany() (#2673)

* DX-202 Update entry.get to pass in releaseId (#2679)

* 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

* feat: update entry.getMany to include releasev2 params [DX-203] (#2685)

* 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 [DX-206] (#2692)

* feat: add release.entry.update method

* feat: add entry.release.patch method (#2695)

* fix: delete entry2 as part of entry integration test cleanup [DX-258] (#2700)

* chore: add canary build to release/releasev2 branch [DX-212] (#2696)

* chore: add canary build to release/releasev2 branch

* chore: update readme with info on current experimental features

* chore: creating canary branch for canary prerelease builds

* chore: add canary branch to release process in ci config

* feat: add release.entry.createWithId method [DX-61] (#2724)

* 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 handle releaseId [DX-209] (#2725)

* 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: update entry.createWithId to accept releaseId [DX-208] (#2727)

* feat: entry.update supports releaseId [DX-210] (#2728)

* 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 release.entry.create method (#2730)

* feat: entry.create supports releaseId [DX-207] (#2732)

* feat: add releaseId support to entry.create

* chore: add QueryParams to be consistent with release.entry.create

* fix: remove startDate from releasev2 payload [DX-380] (#2739)

* feat: remove release[lte] endpoint [TOL-3408] (#2747)

* feat: remove release[lte] endpoint

* fix: delete more old tests, fix return types

* fix(types): add release to entitymetasysprops [] (#2749)

* feat: add support for release asset endpoints [TOL-3357] (#2750)

* fix(types): add release to entitymetasysprops []

* feat(release-assets): add support for assets inside of a release [TOL-3357]

* fix(types): export ReleasePaylodV2 [] (#2754)

* fix: update types, add tests, and cleanup [DX-397] (#2755)

* chore: update experimental features in readme

---------

Co-authored-by: Ely Lucas <[email protected]>
Co-authored-by: ethan ozelius <[email protected]>
Co-authored-by: Tyler Pina <[email protected]>
Co-authored-by: Michael Pham <[email protected]>
Co-authored-by: MayaGillilan <[email protected]>
Co-authored-by: Chris Helgert <[email protected]>
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.

3 participants