Skip to content

feat: support changeQuoteRequestState on quote requests - #409

Merged
mvantellingen merged 1 commit into
mainfrom
feat/quote-request-change-state
Aug 14, 2026
Merged

feat: support changeQuoteRequestState on quote requests#409
mvantellingen merged 1 commit into
mainfrom
feat/quote-request-change-state

Conversation

@korsvanloon

Copy link
Copy Markdown
Collaborator

The quote-request update handler implements setCustomField, setCustomType and transitionState, but not changeQuoteRequestState — so cancelling a quote request, which maps to that action, cannot be exercised against the mock.

transitionState is not a substitute for it. It moves a quote request through a custom State machine; changeQuoteRequestState sets the built-in quoteRequestState enum. The SDK declares them as two distinct actions.

Changes

  • changeQuoteRequestState on QuoteRequestUpdateHandler, following the same shape as changeOrderState on the order handler — a plain assignment, no transition validation, consistent with how the other change*State actions behave here.
  • A test covering the update through the service endpoint.

MyQuoteRequestRepository extends QuoteRequestRepository, so the /me path picks this up unchanged.

Verification

pnpm tsc, pnpm biome check and pnpm test (790 tests) all pass.

The quote-request update handler implemented setCustomField, setCustomType and
transitionState, but not changeQuoteRequestState, so cancelling a quote request
could not be exercised against the mock. transitionState is not a substitute:
it moves a quote request through a custom State machine, while
changeQuoteRequestState sets the built-in quoteRequestState enum.
@changeset-bot

changeset-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 54a4d8e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@labdigital/commercetools-mock Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mvantellingen
mvantellingen merged commit 2a84115 into main Aug 14, 2026
10 checks passed
@mvantellingen
mvantellingen deleted the feat/quote-request-change-state branch August 14, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants