Skip to content

Conversation

@xsahil03x
Copy link
Member

@xsahil03x xsahil03x commented Nov 21, 2025

Fixes: #59

Description of the pull request

This PR regenerates the client-side API models and endpoints, incorporating numerous additions and breaking changes from a recent backend API update.

Breaking Changes

  • queryFollowSuggestions: The method signature and return type have changed. It now returns a Result<List<FeedSuggestionData>> instead of Result<List<FeedData>>. The new FeedSuggestionData model includes additional metadata like reason, recommendationScore, and algorithmScores.
  • FeedsReactionData.id: The logic for generating a reaction's unique ID has been updated to correctly include the commentId when present, ensuring proper identification for comment reactions.

Features

  • Collections API: Added full support for the Collections API, including new request/response models and endpoints for creating, reading, updating, and deleting collections (CreateCollections, ReadCollections, UpdateCollections, DeleteCollections).
  • ActivityData Enhancements: Added hidden and preview boolean fields to the ActivityData model to support content hiding and previewing functionalities.
  • FeedSuggestionData Model: Introduced a new FeedSuggestionData model to encapsulate feed suggestions, providing richer context with algorithmic scores and reasons.
  • Moderation and Deletion Reasons: Added an optional reason field to various deletion and moderation requests (DeleteActivityRequest, DeleteCommentRequest, DeleteReactionRequest, DeleteUserRequest, BlockActionRequest, ShadowBlockActionRequest) to provide context for moderation actions.

Other Key Changes

  • API Model Updates:
    • ActivityRequest and UpdateActivityRequest now include collectionRefs, restrictReplies, and skipEnrichUrl.
    • ActivityResponse now includes collections, moderationAction, preview, hidden, and restrictReplies.
    • ChannelMemberResponse and related models have been significantly expanded with new fields like banned, createdAt, custom, role, and more.
    • ChannelResponse and Channel models now include filterTags.
    • Introduced ActivityFeedbackEvent for real-time feedback updates.
    • Deprecated muteUser and report from ActivityFeedbackRequest.
  • Endpoint and Request Adjustments:
    • Made addCommentRequest in the addComment endpoint nullable.
    • Removed the deprecated activitySelectorOptions from FeedQuery and GetOrCreateFeedRequest.
  • Testing: Added tests for the new queryFollowSuggestions functionality to validate the handling of FeedSuggestionData.

This PR regenerates the client-side API models and endpoints, incorporating numerous additions and breaking changes from a recent backend API update.

### Breaking Changes
- **`queryFollowSuggestions`:** The method signature and return type have changed. It now returns a `Result<List<FeedSuggestionData>>` instead of `Result<List<FeedData>>`. The new `FeedSuggestionData` model includes additional metadata like `reason`, `recommendationScore`, and `algorithmScores`.
- **`FeedsReactionData.id`:** The logic for generating a reaction's unique ID has been updated to correctly include the `commentId` when present, ensuring proper identification for comment reactions.

### Features
- **Collections API:** Added full support for the Collections API, including new request/response models and endpoints for creating, reading, updating, and deleting collections (`CreateCollections`, `ReadCollections`, `UpdateCollections`, `DeleteCollections`).
- **`ActivityData` Enhancements:** Added `hidden` and `preview` boolean fields to the `ActivityData` model to support content hiding and previewing functionalities.
- **`FeedSuggestionData` Model:** Introduced a new `FeedSuggestionData` model to encapsulate feed suggestions, providing richer context with algorithmic scores and reasons.
- **Moderation and Deletion Reasons:** Added an optional `reason` field to various deletion and moderation requests (`DeleteActivityRequest`, `DeleteCommentRequest`, `DeleteReactionRequest`, `DeleteUserRequest`, `BlockActionRequest`, `ShadowBlockActionRequest`) to provide context for moderation actions.

### Other Key Changes
- **API Model Updates:**
  - `ActivityRequest` and `UpdateActivityRequest` now include `collectionRefs`, `restrictReplies`, and `skipEnrichUrl`.
  - `ActivityResponse` now includes `collections`, `moderationAction`, `preview`, `hidden`, and `restrictReplies`.
  - `ChannelMemberResponse` and related models have been significantly expanded with new fields like `banned`, `createdAt`, `custom`, `role`, and more.
  - `ChannelResponse` and `Channel` models now include `filterTags`.
  - Introduced `ActivityFeedbackEvent` for real-time feedback updates.
  - Deprecated `muteUser` and `report` from `ActivityFeedbackRequest`.
- **Endpoint and Request Adjustments:**
  - Made `addCommentRequest` in the `addComment` endpoint nullable.
  - Removed the deprecated `activitySelectorOptions` from `FeedQuery` and `GetOrCreateFeedRequest`.
- **Testing:** Added tests for the new `queryFollowSuggestions` functionality to validate the handling of `FeedSuggestionData`.
@xsahil03x xsahil03x requested a review from a team as a code owner November 21, 2025 22:33
This commit pins the `retrofit` dependency to a version range of `>=4.6.0 <=4.9.0`.

This change is necessary to avoid a breaking change introduced in `retrofit` version 4.10.0. The version constraint is applied in the root `melos.yaml` and the `packages/stream_feeds/pubspec.yaml` file.
@xsahil03x xsahil03x force-pushed the feat/update-generated-code branch from 0efe9d1 to 3879c94 Compare November 25, 2025 00:47
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 91.17647% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.42%. Comparing base (6b47a72) to head (3879c94).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ream_feeds/lib/src/models/feeds_reaction_data.dart 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #56      +/-   ##
==========================================
+ Coverage   42.81%   43.42%   +0.61%     
==========================================
  Files         120      121       +1     
  Lines        3646     3675      +29     
==========================================
+ Hits         1561     1596      +35     
+ Misses       2085     2079       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xsahil03x xsahil03x merged commit 5649be7 into main Nov 25, 2025
10 checks passed
@xsahil03x xsahil03x deleted the feat/update-generated-code branch November 25, 2025 11:36
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.

Error trying to run on iOS

3 participants