From 2e6b9c3025565255aaf937df5fe51fe9c9d779c0 Mon Sep 17 00:00:00 2001 From: Jimmy Pettersson Date: Fri, 18 Sep 2026 17:15:27 +0200 Subject: [PATCH] feat(feeds): add reaction write outcome fields Adds outcome, previous_reaction_type and counter_delta to AddReactionResponse and AddCommentReactionResponse, from the v2 serverside spec (GetStream/chat#17241). Scoped to just these two interfaces rather than a full regeneration: a wholesale regen also pulls in every other spec change since the last refresh, which is a much wider surface than this needs. Co-Authored-By: Claude Opus 5 (1M context) --- src/gen/models/index.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index c8db36d..5c312e8 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -1492,11 +1492,21 @@ export interface AddCommentReactionRequest { } export interface AddCommentReactionResponse { + /** + * The change this write made to the number of reactions the user holds on this target: 1 when outcome is 'created', 0 when it is 'replaced' or 'unchanged'. These endpoints never return -1; a successful delete-reaction call is what decrements the count. With enforce_unique this is the delta of the user's reaction on the target; without it, the delta of reactions of this type. + */ + counter_delta: number; + /** * Duration of the request */ duration: string; + /** + * What this write did to the user's reaction on this target. One of: created, replaced, unchanged. 'created' means a new reaction was written and nothing was replaced; 'replaced' means enforce_unique removed one or more of the user's other reaction types; 'unchanged' means the user already held this reaction type (its custom data may still have been updated). Without enforce_unique a user can hold several reaction types on one target, so 'created' then means 'this reaction type was newly added', not 'the user's first reaction on this target'. + */ + outcome: string; + comment: CommentResponse; reaction: FeedsReactionResponse; @@ -1517,6 +1527,11 @@ export interface AddCommentReactionResponse { */ notification_task_id?: string; + /** + * The reaction type this write replaced, or null when nothing was replaced. Non-null exactly when outcome is 'replaced'. If enforce_unique removed several reactions — possible only for data created before enforce_unique was adopted — this is the most recently created one. + */ + previous_reaction_type?: string; + reference_activity?: ActivityResponse; } @@ -1684,8 +1699,18 @@ export interface AddReactionRequest { } export interface AddReactionResponse { + /** + * The change this write made to the number of reactions the user holds on this target: 1 when outcome is 'created', 0 when it is 'replaced' or 'unchanged'. These endpoints never return -1; a successful delete-reaction call is what decrements the count. With enforce_unique this is the delta of the user's reaction on the target; without it, the delta of reactions of this type. + */ + counter_delta: number; + duration: string; + /** + * What this write did to the user's reaction on this target. One of: created, replaced, unchanged. 'created' means a new reaction was written and nothing was replaced; 'replaced' means enforce_unique removed one or more of the user's other reaction types; 'unchanged' means the user already held this reaction type (its custom data may still have been updated). Without enforce_unique a user can hold several reaction types on one target, so 'created' then means 'this reaction type was newly added', not 'the user's first reaction on this target'. + */ + outcome: string; + activity: ActivityResponse; reaction: FeedsReactionResponse; @@ -1706,6 +1731,11 @@ export interface AddReactionResponse { */ notification_task_id?: string; + /** + * The reaction type this write replaced, or null when nothing was replaced. Non-null exactly when outcome is 'replaced'. If enforce_unique removed several reactions — possible only for data created before enforce_unique was adopted — this is the most recently created one. + */ + previous_reaction_type?: string; + reference_activity?: ActivityResponse; }