Skip to content

feat(feeds-client): regenerate for reaction write outcome fields - #311

Open
JimmyPettersson85 wants to merge 1 commit into
mainfrom
feature/feeds-1886-reaction-write-outcome
Open

JimmyPettersson85 wants to merge 1 commit into
mainfrom
feature/feeds-1886-reaction-write-outcome

Conversation

@JimmyPettersson85

@JimmyPettersson85 JimmyPettersson85 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Regenerates @stream-io/feeds-client from the v2 feeds clientside spec, which now carries three new fields on AddReactionResponse and AddCommentReactionResponse:

Field Type Meaning
outcome stringcreated | replaced | unchanged what the write did to the user's reaction on the target
previous_reaction_type string? the reaction type enforce_unique removed
counter_delta number0 | 1 change to the user's reaction count on the target

Backend PR: GetStream/chat#17241 (FEEDS-1886). With enforce_unique=true the previous reaction is replaced silently, and nothing in the response told the caller whether the reaction was new or a swap — so a customer keeping their own per-user reaction counter had to read before writing, or delete-then-add.

Counting recipe: add → outcome === 'created' ? +1 : 0; delete → 2xx ? -1 : 0.

Merge order

Merges before the backend, per the usual flow: SDKs merge and release first, then the chat repo bumps its pinned SDK versions, then GetStream/chat#17241 merges.

Generated from that PR's branch spec, so if its API surface changes during review this needs regenerating before release.

Notes

The diff is larger than the three fields because src/gen was last refreshed against an older chat spec, so this also picks up everything that landed since.

Generated against the chat PR branch's releases/v2/feeds-clientside-api.yaml rather than via generate-openapi.sh, which hardcodes CHAT_DIR="../chat" and would have used whatever branch that sibling checkout happened to be on.

Testing

  • yarn lint:gen applied.
  • yarn build:client clean — vite build and tsc -p tsconfig.lib.json both exit 0; fields confirmed present in the built dist/types/gen/models/index.d.ts.
  • Typechecked the chat repo's QA test against this build by linking it in: the de-casted enforce-unique.test.ts reports 25 errors against npm 2.5.0 (17 of them the three new fields) and 0 field errors against this build. The remaining 8 are a pre-existing Property 'activity' does not exist on type 'WSEvent' gap, unrelated to this change.
  • The chat repo's QA CI picks this branch up by name — GetStream/chat#17241 adds the FEEDS_JS_SDK_BRANCH swap that was previously missing for this package.

🤖 Generated with Claude Code

Regenerated from the v2 feeds clientside spec, which now carries outcome,
previous_reaction_type and counter_delta on AddReactionResponse and
AddCommentReactionResponse (GetStream/chat#17241).

The regen also picks up everything else that landed on the chat spec since
the last refresh.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (5)
  • packages/feeds-client/src/gen/feeds/FeedApi.ts is excluded by !**/gen/**
  • packages/feeds-client/src/gen/feeds/FeedsApi.ts is excluded by !**/gen/**
  • packages/feeds-client/src/gen/model-decoders/decoders.ts is excluded by !**/gen/**
  • packages/feeds-client/src/gen/models/index.ts is excluded by !**/gen/**
  • packages/feeds-client/src/gen/moderation/ModerationApi.ts is excluded by !**/gen/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: ad77ff69-de85-479c-ab7d-8d73cd01970e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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