From 7955de0fdc69b4df6877c6f7459821cf2a51cd36 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 21 Nov 2025 23:32:07 +0100 Subject: [PATCH 1/3] feat(llc)!: Regenerate API models and endpoints 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>` instead of `Result>`. 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`. --- packages/stream_feeds/CHANGELOG.md | 2 + .../src/generated/api/api/default_api.dart | 22 +- .../src/generated/api/api/default_api.g.dart | 165 +++++++++- .../api/model/activity_feedback_event.dart | 53 ++++ .../activity_feedback_event.freezed.dart | 131 ++++++++ .../api/model/activity_feedback_event.g.dart | 48 +++ .../activity_feedback_event_payload.dart | 66 ++++ ...tivity_feedback_event_payload.freezed.dart | 125 ++++++++ .../activity_feedback_event_payload.g.dart | 40 +++ .../api/model/activity_feedback_request.dart | 12 - .../activity_feedback_request.freezed.dart | 35 +-- .../model/activity_feedback_request.g.dart | 6 - .../generated/api/model/activity_request.dart | 25 ++ .../api/model/activity_request.freezed.dart | 69 +++-- .../api/model/activity_request.g.dart | 18 ++ .../api/model/activity_response.dart | 20 +- .../api/model/activity_response.freezed.dart | 51 +++- .../api/model/activity_response.g.dart | 14 +- .../api/model/activity_selector_config.dart | 4 + .../activity_selector_config.freezed.dart | 12 +- .../api/model/activity_selector_config.g.dart | 2 + .../api/model/add_activity_request.dart | 25 ++ .../model/add_activity_request.freezed.dart | 69 +++-- .../api/model/add_activity_request.g.dart | 18 ++ .../api/model/add_comment_request.dart | 16 +- .../model/add_comment_request.freezed.dart | 41 ++- .../api/model/add_comment_request.g.dart | 8 +- .../api/model/app_response_fields.dart | 12 +- .../model/app_response_fields.freezed.dart | 37 +-- .../api/model/app_response_fields.g.dart | 8 +- .../api/model/block_action_request.dart | 31 ++ .../model/block_action_request.freezed.dart | 78 +++++ .../api/model/block_action_request.g.dart | 17 ++ .../api/model/bookmark_folder_response.dart | 4 + .../bookmark_folder_response.freezed.dart | 16 +- .../api/model/bookmark_folder_response.g.dart | 2 + .../lib/src/generated/api/model/channel.dart | 4 + .../generated/api/model/channel.freezed.dart | 12 +- .../src/generated/api/model/channel.g.dart | 4 + .../generated/api/model/channel_config.dart | 4 + .../api/model/channel_config.freezed.dart | 12 +- .../generated/api/model/channel_config.g.dart | 2 + .../api/model/channel_config_with_info.dart | 4 + .../channel_config_with_info.freezed.dart | 12 +- .../api/model/channel_config_with_info.g.dart | 2 + .../generated/api/model/channel_member.dart | 37 ++- .../api/model/channel_member.freezed.dart | 54 +++- .../generated/api/model/channel_member.g.dart | 24 +- .../api/model/channel_member_response.dart | 99 ++++++ .../channel_member_response.freezed.dart | 195 +++++++++++- .../api/model/channel_member_response.g.dart | 78 +++++ .../api/model/channel_own_capability.dart | 2 + .../api/model/channel_own_capability.g.dart | 1 + .../generated/api/model/channel_response.dart | 6 +- .../api/model/channel_response.freezed.dart | 18 +- .../api/model/channel_response.g.dart | 8 +- .../api/model/collection_request.dart | 39 +++ .../api/model/collection_request.freezed.dart | 93 ++++++ .../api/model/collection_request.g.dart | 21 ++ .../api/model/collection_response.dart | 53 ++++ .../model/collection_response.freezed.dart | 122 ++++++++ .../api/model/collection_response.g.dart | 43 +++ .../api/model/create_block_list_request.dart | 2 + .../model/create_block_list_request.g.dart | 1 + .../api/model/create_collections_request.dart | 31 ++ .../create_collections_request.freezed.dart | 80 +++++ .../model/create_collections_request.g.dart | 21 ++ .../model/create_collections_response.dart | 35 +++ .../create_collections_response.freezed.dart | 88 ++++++ .../model/create_collections_response.g.dart | 23 ++ .../api/model/delete_activity_request.dart | 4 + .../delete_activity_request.freezed.dart | 15 +- .../api/model/delete_activity_request.g.dart | 2 + .../model/delete_collections_response.dart | 31 ++ .../delete_collections_response.freezed.dart | 79 +++++ .../model/delete_collections_response.g.dart | 19 ++ .../api/model/delete_comment_request.dart | 35 +++ .../model/delete_comment_request.freezed.dart | 86 ++++++ .../api/model/delete_comment_request.g.dart | 21 ++ .../api/model/delete_message_request.dart | 4 + .../model/delete_message_request.freezed.dart | 15 +- .../api/model/delete_message_request.g.dart | 2 + .../api/model/delete_reaction_request.dart | 4 + .../delete_reaction_request.freezed.dart | 15 +- .../api/model/delete_reaction_request.g.dart | 2 + .../api/model/delete_user_request.dart | 4 + .../model/delete_user_request.freezed.dart | 16 +- .../api/model/delete_user_request.g.dart | 2 + .../model/denormalized_channel_fields.dart | 71 +++++ .../denormalized_channel_fields.freezed.dart | 177 +++++++++++ .../model/denormalized_channel_fields.g.dart | 39 +++ .../model/enriched_collection_response.dart | 68 +++++ .../enriched_collection_response.freezed.dart | 138 +++++++++ .../model/enriched_collection_response.g.dart | 55 ++++ .../src/generated/api/model/feed_group.dart | 8 +- .../api/model/feed_group.freezed.dart | 34 +-- .../src/generated/api/model/feed_group.g.dart | 8 +- .../api/model/feed_suggestion_response.dart | 119 ++++++++ .../feed_suggestion_response.freezed.dart | 287 ++++++++++++++++++ .../api/model/feed_suggestion_response.g.dart | 125 ++++++++ .../api/model/feeds_preferences.dart | 15 + .../api/model/feeds_preferences.freezed.dart | 12 +- .../api/model/feeds_preferences.g.dart | 11 + .../api/model/feeds_preferences_response.dart | 51 ++++ .../feeds_preferences_response.freezed.dart | 129 ++++++++ .../model/feeds_preferences_response.g.dart | 32 ++ .../api/model/filter_config_response.dart | 35 +++ .../model/filter_config_response.freezed.dart | 89 ++++++ .../api/model/filter_config_response.g.dart | 25 ++ .../api/model/flag_count_rule_parameters.dart | 31 ++ .../flag_count_rule_parameters.freezed.dart | 79 +++++ .../model/flag_count_rule_parameters.g.dart | 19 ++ .../get_follow_suggestions_response.dart | 6 +- ...t_follow_suggestions_response.freezed.dart | 23 +- .../get_follow_suggestions_response.g.dart | 5 +- .../api/model/get_or_create_feed_request.dart | 4 - .../get_or_create_feed_request.freezed.dart | 14 +- .../model/get_or_create_feed_request.g.dart | 3 - .../api/model/notification_comment.dart | 43 +++ .../model/notification_comment.freezed.dart | 105 +++++++ .../api/model/notification_comment.g.dart | 26 ++ .../api/model/notification_config.dart | 4 + .../model/notification_config.freezed.dart | 15 +- .../api/model/notification_config.g.dart | 2 + .../api/model/notification_target.dart | 4 + .../model/notification_target.freezed.dart | 11 +- .../api/model/notification_target.g.dart | 5 + .../api/model/own_user_response.dart | 2 +- .../api/model/own_user_response.freezed.dart | 6 +- .../api/model/own_user_response.g.dart | 2 +- .../api/model/push_preferences_response.dart | 48 +++ .../push_preferences_response.freezed.dart | 117 +++++++ .../model/push_preferences_response.g.dart | 44 +++ .../model/query_review_queue_response.dart | 4 + .../query_review_queue_response.freezed.dart | 12 +- .../model/query_review_queue_response.g.dart | 5 + .../lib/src/generated/api/model/reaction.dart | 57 +++- .../generated/api/model/reaction.freezed.dart | 166 +++++++--- .../src/generated/api/model/reaction.g.dart | 65 +++- .../api/model/read_collections_response.dart | 35 +++ .../read_collections_response.freezed.dart | 88 ++++++ .../model/read_collections_response.g.dart | 23 ++ .../api/model/reminder_response_data.dart | 4 +- .../model/reminder_response_data.freezed.dart | 12 +- .../api/model/reminder_response_data.g.dart | 4 +- .../api/model/review_queue_item_response.dart | 12 + .../review_queue_item_response.freezed.dart | 32 +- .../model/review_queue_item_response.g.dart | 12 + .../api/model/rule_builder_condition.dart | 8 + .../model/rule_builder_condition.freezed.dart | 25 +- .../api/model/rule_builder_condition.g.dart | 11 + .../model/shadow_block_action_request.dart | 31 ++ .../shadow_block_action_request.freezed.dart | 78 +++++ .../model/shadow_block_action_request.g.dart | 19 ++ .../api/model/stories_feed_updated_event.dart | 4 + .../stories_feed_updated_event.freezed.dart | 14 +- .../model/stories_feed_updated_event.g.dart | 4 + .../api/model/submit_action_request.dart | 16 + .../model/submit_action_request.freezed.dart | 37 ++- .../api/model/submit_action_request.g.dart | 16 + .../api/model/update_activity_request.dart | 25 ++ .../update_activity_request.freezed.dart | 32 +- .../api/model/update_activity_request.g.dart | 19 ++ .../api/model/update_collection_request.dart | 39 +++ .../update_collection_request.freezed.dart | 93 ++++++ .../model/update_collection_request.g.dart | 23 ++ .../api/model/update_collections_request.dart | 31 ++ .../update_collections_request.freezed.dart | 80 +++++ .../model/update_collections_request.g.dart | 22 ++ .../model/update_collections_response.dart | 35 +++ .../update_collections_response.freezed.dart | 88 ++++++ .../model/update_collections_response.g.dart | 23 ++ .../api/model/update_comment_request.dart | 4 + .../model/update_comment_request.freezed.dart | 18 +- .../api/model/update_comment_request.g.dart | 2 + .../generated/api/model/ws_client_event.dart | 9 + .../lib/src/generated/api/model/ws_event.dart | 9 + .../lib/src/generated/api/models.dart | 22 ++ packages/stream_feeds/lib/src/models.dart | 1 + .../lib/src/models/activity_data.dart | 18 ++ .../lib/src/models/activity_data.freezed.dart | 20 +- .../lib/src/models/bookmark_folder_data.dart | 7 + .../models/bookmark_folder_data.freezed.dart | 14 +- .../lib/src/models/feed_data.dart | 7 + .../lib/src/models/feed_data.freezed.dart | 12 +- .../lib/src/models/feed_suggestion_data.dart | 81 +++++ .../models/feed_suggestion_data.freezed.dart | 110 +++++++ .../lib/src/models/feeds_reaction_data.dart | 8 +- .../models/feeds_reaction_data.freezed.dart | 15 +- .../lib/src/repository/feeds_repository.dart | 5 +- packages/stream_feeds/lib/src/state/feed.dart | 9 +- .../lib/src/state/query/feed_query.dart | 6 - .../src/state/query/feed_query.freezed.dart | 12 +- .../stream_feeds/test/state/feed_test.dart | 51 ++++ .../stream_feeds/test/test_utils/fakes.dart | 223 ++++++++------ .../user_feed/profile/user_profile.dart | 3 +- 196 files changed, 6515 insertions(+), 489 deletions(-) create mode 100644 packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event_payload.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event_payload.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event_payload.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/block_action_request.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/block_action_request.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/block_action_request.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/collection_request.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/collection_request.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/collection_request.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/collection_response.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/collection_response.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/collection_response.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/create_collections_request.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/create_collections_request.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/create_collections_request.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/create_collections_response.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/create_collections_response.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/create_collections_response.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/delete_collections_response.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/delete_collections_response.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/delete_collections_response.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/delete_comment_request.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/delete_comment_request.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/delete_comment_request.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/denormalized_channel_fields.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/denormalized_channel_fields.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/denormalized_channel_fields.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/enriched_collection_response.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/enriched_collection_response.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/enriched_collection_response.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/feeds_preferences_response.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/feeds_preferences_response.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/feeds_preferences_response.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/filter_config_response.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/filter_config_response.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/filter_config_response.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/flag_count_rule_parameters.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/flag_count_rule_parameters.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/flag_count_rule_parameters.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/notification_comment.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/notification_comment.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/notification_comment.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/push_preferences_response.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/push_preferences_response.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/push_preferences_response.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/read_collections_response.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/read_collections_response.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/read_collections_response.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/shadow_block_action_request.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/shadow_block_action_request.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/shadow_block_action_request.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/update_collection_request.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/update_collection_request.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/update_collection_request.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/update_collections_request.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/update_collections_request.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/update_collections_request.g.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/update_collections_response.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/update_collections_response.freezed.dart create mode 100644 packages/stream_feeds/lib/src/generated/api/model/update_collections_response.g.dart create mode 100644 packages/stream_feeds/lib/src/models/feed_suggestion_data.dart create mode 100644 packages/stream_feeds/lib/src/models/feed_suggestion_data.freezed.dart diff --git a/packages/stream_feeds/CHANGELOG.md b/packages/stream_feeds/CHANGELOG.md index 8fe93c33..3736a3b3 100644 --- a/packages/stream_feeds/CHANGELOG.md +++ b/packages/stream_feeds/CHANGELOG.md @@ -1,4 +1,6 @@ ## unreleased +- [BREAKING] Change `queryFollowSuggestions` return type to `List`. +- Add `hidden` and `preview` fields to `ActivityData`. - Update follower and following counts on the feed state when receiving follow websocket events. - Fix FeedsReactionData id for updating reactions in the feed state. - Improvement for stories and minor updates to other AggregatedActivity state updates. diff --git a/packages/stream_feeds/lib/src/generated/api/api/default_api.dart b/packages/stream_feeds/lib/src/generated/api/api/default_api.dart index e889ce79..516c4634 100644 --- a/packages/stream_feeds/lib/src/generated/api/api/default_api.dart +++ b/packages/stream_feeds/lib/src/generated/api/api/default_api.dart @@ -54,7 +54,7 @@ abstract interface class DefaultApi { @POST('/api/v2/feeds/comments') Future> addComment({ - @Body() required AddCommentRequest addCommentRequest, + @Body() AddCommentRequest? addCommentRequest, }); @POST('/api/v2/feeds/comments/{id}/reactions') @@ -90,6 +90,11 @@ abstract interface class DefaultApi { @Body() required CreateBlockListRequest createBlockListRequest, }); + @POST('/api/v2/feeds/collections') + Future> createCollections({ + @Body() required CreateCollectionsRequest createCollectionsRequest, + }); + @POST('/api/v2/devices') Future> createDevice({ @Body() required CreateDeviceRequest createDeviceRequest, @@ -150,6 +155,11 @@ abstract interface class DefaultApi { @Path('folder_id') required String folderId, }); + @DELETE('/api/v2/feeds/collections') + Future> deleteCollections({ + @Query('collection_refs') required List collectionRefs, + }); + @DELETE('/api/v2/feeds/comments/{id}') Future> deleteComment({ @Path('id') required String id, @@ -423,6 +433,11 @@ abstract interface class DefaultApi { @Query('payload') QueryUsersPayload? payload, }); + @GET('/api/v2/feeds/collections') + Future> readCollections({ + @Query('collection_refs') required List collectionRefs, + }); + @POST( '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/members/reject') Future> rejectFeedMemberInvite({ @@ -495,6 +510,11 @@ abstract interface class DefaultApi { @Body() UpdateBookmarkFolderRequest? updateBookmarkFolderRequest, }); + @PATCH('/api/v2/feeds/collections') + Future> updateCollections({ + @Body() required UpdateCollectionsRequest updateCollectionsRequest, + }); + @PATCH('/api/v2/feeds/comments/{id}') Future> updateComment({ @Path('id') required String id, diff --git a/packages/stream_feeds/lib/src/generated/api/api/default_api.g.dart b/packages/stream_feeds/lib/src/generated/api/api/default_api.g.dart index c4a43851..957df63e 100644 --- a/packages/stream_feeds/lib/src/generated/api/api/default_api.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/api/default_api.g.dart @@ -264,13 +264,14 @@ class _DefaultApi implements DefaultApi { } Future _addComment({ - required AddCommentRequest addCommentRequest, + AddCommentRequest? addCommentRequest, }) async { final _extra = {}; final queryParameters = {}; + queryParameters.removeWhere((k, v) => v == null); final _headers = {}; final _data = {}; - _data.addAll(addCommentRequest.toJson()); + _data.addAll(addCommentRequest?.toJson() ?? {}); final _options = _setStreamType>( Options(method: 'POST', headers: _headers, extra: _extra) .compose( @@ -294,7 +295,7 @@ class _DefaultApi implements DefaultApi { @override Future> addComment({ - required AddCommentRequest addCommentRequest, + AddCommentRequest? addCommentRequest, }) { return _ResultCallAdapter().adapt( () => _addComment(addCommentRequest: addCommentRequest), @@ -539,6 +540,46 @@ class _DefaultApi implements DefaultApi { ); } + Future _createCollections({ + required CreateCollectionsRequest createCollectionsRequest, + }) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(createCollectionsRequest.toJson()); + final _options = _setStreamType>( + Options(method: 'POST', headers: _headers, extra: _extra) + .compose( + _dio.options, + '/api/v2/feeds/collections', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)), + ); + final _result = await _dio.fetch>(_options); + late CreateCollectionsResponse _value; + try { + _value = CreateCollectionsResponse.fromJson(_result.data!); + } on Object catch (e, s) { + errorLogger?.logError(e, s, _options); + rethrow; + } + return _value; + } + + @override + Future> createCollections({ + required CreateCollectionsRequest createCollectionsRequest, + }) { + return _ResultCallAdapter().adapt( + () => _createCollections( + createCollectionsRequest: createCollectionsRequest, + ), + ); + } + Future _createDevice({ required CreateDeviceRequest createDeviceRequest, }) async { @@ -968,6 +1009,45 @@ class _DefaultApi implements DefaultApi { ); } + Future _deleteCollections({ + required List collectionRefs, + }) async { + final _extra = {}; + final queryParameters = { + r'collection_refs': collectionRefs, + }; + final _headers = {}; + const Map? _data = null; + final _options = _setStreamType>( + Options(method: 'DELETE', headers: _headers, extra: _extra) + .compose( + _dio.options, + '/api/v2/feeds/collections', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)), + ); + final _result = await _dio.fetch>(_options); + late DeleteCollectionsResponse _value; + try { + _value = DeleteCollectionsResponse.fromJson(_result.data!); + } on Object catch (e, s) { + errorLogger?.logError(e, s, _options); + rethrow; + } + return _value; + } + + @override + Future> deleteCollections({ + required List collectionRefs, + }) { + return _ResultCallAdapter().adapt( + () => _deleteCollections(collectionRefs: collectionRefs), + ); + } + Future _deleteComment({ required String id, bool? hardDelete, @@ -2847,6 +2927,45 @@ class _DefaultApi implements DefaultApi { ); } + Future _readCollections({ + required List collectionRefs, + }) async { + final _extra = {}; + final queryParameters = { + r'collection_refs': collectionRefs, + }; + final _headers = {}; + const Map? _data = null; + final _options = _setStreamType>( + Options(method: 'GET', headers: _headers, extra: _extra) + .compose( + _dio.options, + '/api/v2/feeds/collections', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)), + ); + final _result = await _dio.fetch>(_options); + late ReadCollectionsResponse _value; + try { + _value = ReadCollectionsResponse.fromJson(_result.data!); + } on Object catch (e, s) { + errorLogger?.logError(e, s, _options); + rethrow; + } + return _value; + } + + @override + Future> readCollections({ + required List collectionRefs, + }) { + return _ResultCallAdapter().adapt( + () => _readCollections(collectionRefs: collectionRefs), + ); + } + Future _rejectFeedMemberInvite({ required String feedGroupId, required String feedId, @@ -3341,6 +3460,46 @@ class _DefaultApi implements DefaultApi { ); } + Future _updateCollections({ + required UpdateCollectionsRequest updateCollectionsRequest, + }) async { + final _extra = {}; + final queryParameters = {}; + final _headers = {}; + final _data = {}; + _data.addAll(updateCollectionsRequest.toJson()); + final _options = _setStreamType>( + Options(method: 'PATCH', headers: _headers, extra: _extra) + .compose( + _dio.options, + '/api/v2/feeds/collections', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)), + ); + final _result = await _dio.fetch>(_options); + late UpdateCollectionsResponse _value; + try { + _value = UpdateCollectionsResponse.fromJson(_result.data!); + } on Object catch (e, s) { + errorLogger?.logError(e, s, _options); + rethrow; + } + return _value; + } + + @override + Future> updateCollections({ + required UpdateCollectionsRequest updateCollectionsRequest, + }) { + return _ResultCallAdapter().adapt( + () => _updateCollections( + updateCollectionsRequest: updateCollectionsRequest, + ), + ); + } + Future _updateComment({ required String id, UpdateCommentRequest? updateCommentRequest, diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.dart new file mode 100644 index 00000000..3473af3e --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.dart @@ -0,0 +1,53 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'activity_feedback_event.g.dart'; +part 'activity_feedback_event.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ActivityFeedbackEvent extends core.WsEvent with _$ActivityFeedbackEvent { + const ActivityFeedbackEvent({ + required this.activityFeedback, + required this.createdAt, + required this.custom, + this.receivedAt, + required this.type, + this.user, + }); + + @override + final ActivityFeedbackEventPayload activityFeedback; + + @override + @EpochDateTimeConverter() + final DateTime createdAt; + + @override + final Map custom; + + @override + @EpochDateTimeConverter() + final DateTime? receivedAt; + + @override + final String type; + + @override + final UserResponseCommonFields? user; + + Map toJson() => _$ActivityFeedbackEventToJson(this); + + static ActivityFeedbackEvent fromJson(Map json) => + _$ActivityFeedbackEventFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.freezed.dart new file mode 100644 index 00000000..809da472 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.freezed.dart @@ -0,0 +1,131 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'activity_feedback_event.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$ActivityFeedbackEvent { + ActivityFeedbackEventPayload get activityFeedback; + DateTime get createdAt; + Map get custom; + DateTime? get receivedAt; + String get type; + UserResponseCommonFields? get user; + + /// Create a copy of ActivityFeedbackEvent + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ActivityFeedbackEventCopyWith get copyWith => + _$ActivityFeedbackEventCopyWithImpl( + this as ActivityFeedbackEvent, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ActivityFeedbackEvent && + super == other && + (identical(other.activityFeedback, activityFeedback) || + other.activityFeedback == activityFeedback) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.receivedAt, receivedAt) || + other.receivedAt == receivedAt) && + (identical(other.type, type) || other.type == type) && + (identical(other.user, user) || other.user == user)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + super.hashCode, + activityFeedback, + createdAt, + const DeepCollectionEquality().hash(custom), + receivedAt, + type, + user); + + @override + String toString() { + return 'ActivityFeedbackEvent(activityFeedback: $activityFeedback, createdAt: $createdAt, custom: $custom, receivedAt: $receivedAt, type: $type, user: $user)'; + } +} + +/// @nodoc +abstract mixin class $ActivityFeedbackEventCopyWith<$Res> { + factory $ActivityFeedbackEventCopyWith(ActivityFeedbackEvent value, + $Res Function(ActivityFeedbackEvent) _then) = + _$ActivityFeedbackEventCopyWithImpl; + @useResult + $Res call( + {ActivityFeedbackEventPayload activityFeedback, + DateTime createdAt, + Map custom, + DateTime? receivedAt, + String type, + UserResponseCommonFields? user}); +} + +/// @nodoc +class _$ActivityFeedbackEventCopyWithImpl<$Res> + implements $ActivityFeedbackEventCopyWith<$Res> { + _$ActivityFeedbackEventCopyWithImpl(this._self, this._then); + + final ActivityFeedbackEvent _self; + final $Res Function(ActivityFeedbackEvent) _then; + + /// Create a copy of ActivityFeedbackEvent + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? activityFeedback = null, + Object? createdAt = null, + Object? custom = null, + Object? receivedAt = freezed, + Object? type = null, + Object? user = freezed, + }) { + return _then(ActivityFeedbackEvent( + activityFeedback: null == activityFeedback + ? _self.activityFeedback + : activityFeedback // ignore: cast_nullable_to_non_nullable + as ActivityFeedbackEventPayload, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + custom: null == custom + ? _self.custom + : custom // ignore: cast_nullable_to_non_nullable + as Map, + receivedAt: freezed == receivedAt + ? _self.receivedAt + : receivedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String, + user: freezed == user + ? _self.user + : user // ignore: cast_nullable_to_non_nullable + as UserResponseCommonFields?, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.g.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.g.dart new file mode 100644 index 00000000..7289e9eb --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.g.dart @@ -0,0 +1,48 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'activity_feedback_event.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ActivityFeedbackEvent _$ActivityFeedbackEventFromJson( + Map json) => + ActivityFeedbackEvent( + activityFeedback: ActivityFeedbackEventPayload.fromJson( + json['activity_feedback'] as Map), + createdAt: const EpochDateTimeConverter() + .fromJson((json['created_at'] as num).toInt()), + custom: json['custom'] as Map, + receivedAt: _$JsonConverterFromJson( + json['received_at'], const EpochDateTimeConverter().fromJson), + type: json['type'] as String, + user: json['user'] == null + ? null + : UserResponseCommonFields.fromJson( + json['user'] as Map), + ); + +Map _$ActivityFeedbackEventToJson( + ActivityFeedbackEvent instance) => + { + 'activity_feedback': instance.activityFeedback.toJson(), + 'created_at': const EpochDateTimeConverter().toJson(instance.createdAt), + 'custom': instance.custom, + 'received_at': _$JsonConverterToJson( + instance.receivedAt, const EpochDateTimeConverter().toJson), + 'type': instance.type, + 'user': instance.user?.toJson(), + }; + +Value? _$JsonConverterFromJson( + Object? json, + Value? Function(Json json) fromJson, +) => + json == null ? null : fromJson(json as Json); + +Json? _$JsonConverterToJson( + Value? value, + Json? Function(Value value) toJson, +) => + value == null ? null : toJson(value); diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event_payload.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event_payload.dart new file mode 100644 index 00000000..97327c71 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event_payload.dart @@ -0,0 +1,66 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'activity_feedback_event_payload.g.dart'; +part 'activity_feedback_event_payload.freezed.dart'; + +@JsonEnum(alwaysCreate: true) +enum ActivityFeedbackEventPayloadAction { + @JsonValue('hide') + hide, + @JsonValue('show_less') + showLess, + @JsonValue('show_more') + showMore, + @JsonValue('_unknown') + unknown; +} + +@freezed +@immutable +@JsonSerializable() +class ActivityFeedbackEventPayload with _$ActivityFeedbackEventPayload { + const ActivityFeedbackEventPayload({ + required this.action, + required this.activityId, + required this.createdAt, + required this.updatedAt, + required this.user, + required this.value, + }); + + @override + @JsonKey(unknownEnumValue: ActivityFeedbackEventPayloadAction.unknown) + final ActivityFeedbackEventPayloadAction action; + + @override + final String activityId; + + @override + @EpochDateTimeConverter() + final DateTime createdAt; + + @override + @EpochDateTimeConverter() + final DateTime updatedAt; + + @override + final UserResponse user; + + @override + final String value; + + Map toJson() => _$ActivityFeedbackEventPayloadToJson(this); + + static ActivityFeedbackEventPayload fromJson(Map json) => + _$ActivityFeedbackEventPayloadFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event_payload.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event_payload.freezed.dart new file mode 100644 index 00000000..9dfa88dc --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event_payload.freezed.dart @@ -0,0 +1,125 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'activity_feedback_event_payload.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$ActivityFeedbackEventPayload { + ActivityFeedbackEventPayloadAction get action; + String get activityId; + DateTime get createdAt; + DateTime get updatedAt; + UserResponse get user; + String get value; + + /// Create a copy of ActivityFeedbackEventPayload + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ActivityFeedbackEventPayloadCopyWith + get copyWith => _$ActivityFeedbackEventPayloadCopyWithImpl< + ActivityFeedbackEventPayload>( + this as ActivityFeedbackEventPayload, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ActivityFeedbackEventPayload && + (identical(other.action, action) || other.action == action) && + (identical(other.activityId, activityId) || + other.activityId == activityId) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.user, user) || other.user == user) && + (identical(other.value, value) || other.value == value)); + } + + @override + int get hashCode => Object.hash( + runtimeType, action, activityId, createdAt, updatedAt, user, value); + + @override + String toString() { + return 'ActivityFeedbackEventPayload(action: $action, activityId: $activityId, createdAt: $createdAt, updatedAt: $updatedAt, user: $user, value: $value)'; + } +} + +/// @nodoc +abstract mixin class $ActivityFeedbackEventPayloadCopyWith<$Res> { + factory $ActivityFeedbackEventPayloadCopyWith( + ActivityFeedbackEventPayload value, + $Res Function(ActivityFeedbackEventPayload) _then) = + _$ActivityFeedbackEventPayloadCopyWithImpl; + @useResult + $Res call( + {ActivityFeedbackEventPayloadAction action, + String activityId, + DateTime createdAt, + DateTime updatedAt, + UserResponse user, + String value}); +} + +/// @nodoc +class _$ActivityFeedbackEventPayloadCopyWithImpl<$Res> + implements $ActivityFeedbackEventPayloadCopyWith<$Res> { + _$ActivityFeedbackEventPayloadCopyWithImpl(this._self, this._then); + + final ActivityFeedbackEventPayload _self; + final $Res Function(ActivityFeedbackEventPayload) _then; + + /// Create a copy of ActivityFeedbackEventPayload + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? action = null, + Object? activityId = null, + Object? createdAt = null, + Object? updatedAt = null, + Object? user = null, + Object? value = null, + }) { + return _then(ActivityFeedbackEventPayload( + action: null == action + ? _self.action + : action // ignore: cast_nullable_to_non_nullable + as ActivityFeedbackEventPayloadAction, + activityId: null == activityId + ? _self.activityId + : activityId // ignore: cast_nullable_to_non_nullable + as String, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + user: null == user + ? _self.user + : user // ignore: cast_nullable_to_non_nullable + as UserResponse, + value: null == value + ? _self.value + : value // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event_payload.g.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event_payload.g.dart new file mode 100644 index 00000000..90b8dc00 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event_payload.g.dart @@ -0,0 +1,40 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'activity_feedback_event_payload.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ActivityFeedbackEventPayload _$ActivityFeedbackEventPayloadFromJson( + Map json) => + ActivityFeedbackEventPayload( + action: $enumDecode( + _$ActivityFeedbackEventPayloadActionEnumMap, json['action'], + unknownValue: ActivityFeedbackEventPayloadAction.unknown), + activityId: json['activity_id'] as String, + createdAt: const EpochDateTimeConverter() + .fromJson((json['created_at'] as num).toInt()), + updatedAt: const EpochDateTimeConverter() + .fromJson((json['updated_at'] as num).toInt()), + user: UserResponse.fromJson(json['user'] as Map), + value: json['value'] as String, + ); + +Map _$ActivityFeedbackEventPayloadToJson( + ActivityFeedbackEventPayload instance) => + { + 'action': _$ActivityFeedbackEventPayloadActionEnumMap[instance.action]!, + 'activity_id': instance.activityId, + 'created_at': const EpochDateTimeConverter().toJson(instance.createdAt), + 'updated_at': const EpochDateTimeConverter().toJson(instance.updatedAt), + 'user': instance.user.toJson(), + 'value': instance.value, + }; + +const _$ActivityFeedbackEventPayloadActionEnumMap = { + ActivityFeedbackEventPayloadAction.hide: 'hide', + ActivityFeedbackEventPayloadAction.showLess: 'show_less', + ActivityFeedbackEventPayloadAction.showMore: 'show_more', + ActivityFeedbackEventPayloadAction.unknown: '_unknown', +}; diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_request.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_request.dart index 0c3fad41..795b13c1 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_request.dart @@ -19,9 +19,6 @@ part 'activity_feedback_request.freezed.dart'; class ActivityFeedbackRequest with _$ActivityFeedbackRequest { const ActivityFeedbackRequest({ this.hide, - this.muteUser, - this.reason, - this.report, this.showLess, this.showMore, }); @@ -29,15 +26,6 @@ class ActivityFeedbackRequest with _$ActivityFeedbackRequest { @override final bool? hide; - @override - final bool? muteUser; - - @override - final String? reason; - - @override - final bool? report; - @override final bool? showLess; diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_request.freezed.dart index 40184cf7..8b6f96c4 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_request.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_request.freezed.dart @@ -16,9 +16,6 @@ T _$identity(T value) => value; /// @nodoc mixin _$ActivityFeedbackRequest { bool? get hide; - bool? get muteUser; - String? get reason; - bool? get report; bool? get showLess; bool? get showMore; @@ -36,10 +33,6 @@ mixin _$ActivityFeedbackRequest { (other.runtimeType == runtimeType && other is ActivityFeedbackRequest && (identical(other.hide, hide) || other.hide == hide) && - (identical(other.muteUser, muteUser) || - other.muteUser == muteUser) && - (identical(other.reason, reason) || other.reason == reason) && - (identical(other.report, report) || other.report == report) && (identical(other.showLess, showLess) || other.showLess == showLess) && (identical(other.showMore, showMore) || @@ -47,12 +40,11 @@ mixin _$ActivityFeedbackRequest { } @override - int get hashCode => Object.hash( - runtimeType, hide, muteUser, reason, report, showLess, showMore); + int get hashCode => Object.hash(runtimeType, hide, showLess, showMore); @override String toString() { - return 'ActivityFeedbackRequest(hide: $hide, muteUser: $muteUser, reason: $reason, report: $report, showLess: $showLess, showMore: $showMore)'; + return 'ActivityFeedbackRequest(hide: $hide, showLess: $showLess, showMore: $showMore)'; } } @@ -62,13 +54,7 @@ abstract mixin class $ActivityFeedbackRequestCopyWith<$Res> { $Res Function(ActivityFeedbackRequest) _then) = _$ActivityFeedbackRequestCopyWithImpl; @useResult - $Res call( - {bool? hide, - bool? muteUser, - String? reason, - bool? report, - bool? showLess, - bool? showMore}); + $Res call({bool? hide, bool? showLess, bool? showMore}); } /// @nodoc @@ -85,9 +71,6 @@ class _$ActivityFeedbackRequestCopyWithImpl<$Res> @override $Res call({ Object? hide = freezed, - Object? muteUser = freezed, - Object? reason = freezed, - Object? report = freezed, Object? showLess = freezed, Object? showMore = freezed, }) { @@ -96,18 +79,6 @@ class _$ActivityFeedbackRequestCopyWithImpl<$Res> ? _self.hide : hide // ignore: cast_nullable_to_non_nullable as bool?, - muteUser: freezed == muteUser - ? _self.muteUser - : muteUser // ignore: cast_nullable_to_non_nullable - as bool?, - reason: freezed == reason - ? _self.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - report: freezed == report - ? _self.report - : report // ignore: cast_nullable_to_non_nullable - as bool?, showLess: freezed == showLess ? _self.showLess : showLess // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_request.g.dart index fce6c234..b81dcba8 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_feedback_request.g.dart @@ -10,9 +10,6 @@ ActivityFeedbackRequest _$ActivityFeedbackRequestFromJson( Map json) => ActivityFeedbackRequest( hide: json['hide'] as bool?, - muteUser: json['mute_user'] as bool?, - reason: json['reason'] as String?, - report: json['report'] as bool?, showLess: json['show_less'] as bool?, showMore: json['show_more'] as bool?, ); @@ -21,9 +18,6 @@ Map _$ActivityFeedbackRequestToJson( ActivityFeedbackRequest instance) => { 'hide': instance.hide, - 'mute_user': instance.muteUser, - 'reason': instance.reason, - 'report': instance.report, 'show_less': instance.showLess, 'show_more': instance.showMore, }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_request.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_request.dart index 04cb769d..9499e073 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/activity_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_request.dart @@ -13,6 +13,18 @@ import '../models.dart'; part 'activity_request.g.dart'; part 'activity_request.freezed.dart'; +@JsonEnum(alwaysCreate: true) +enum ActivityRequestRestrictReplies { + @JsonValue('everyone') + everyone, + @JsonValue('nobody') + nobody, + @JsonValue('people_i_follow') + peopleIFollow, + @JsonValue('_unknown') + unknown; +} + @JsonEnum(alwaysCreate: true) enum ActivityRequestVisibility { @JsonValue('private') @@ -31,6 +43,7 @@ enum ActivityRequestVisibility { class ActivityRequest with _$ActivityRequest { const ActivityRequest({ this.attachments, + this.collectionRefs, this.custom, this.expiresAt, required this.feeds, @@ -41,7 +54,9 @@ class ActivityRequest with _$ActivityRequest { this.mentionedUserIds, this.parentId, this.pollId, + this.restrictReplies, this.searchData, + this.skipEnrichUrl, this.text, required this.type, this.visibility, @@ -51,6 +66,9 @@ class ActivityRequest with _$ActivityRequest { @override final List? attachments; + @override + final List? collectionRefs; + @override final Map? custom; @@ -81,9 +99,16 @@ class ActivityRequest with _$ActivityRequest { @override final String? pollId; + @override + @JsonKey(unknownEnumValue: ActivityRequestRestrictReplies.unknown) + final ActivityRequestRestrictReplies? restrictReplies; + @override final Map? searchData; + @override + final bool? skipEnrichUrl; + @override final String? text; diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_request.freezed.dart index 2c28aa8f..29576fe8 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/activity_request.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_request.freezed.dart @@ -16,6 +16,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$ActivityRequest { List? get attachments; + List? get collectionRefs; Map? get custom; String? get expiresAt; List get feeds; @@ -26,7 +27,9 @@ mixin _$ActivityRequest { List? get mentionedUserIds; String? get parentId; String? get pollId; + ActivityRequestRestrictReplies? get restrictReplies; Map? get searchData; + bool? get skipEnrichUrl; String? get text; String get type; ActivityRequestVisibility? get visibility; @@ -47,6 +50,8 @@ mixin _$ActivityRequest { other is ActivityRequest && const DeepCollectionEquality() .equals(other.attachments, attachments) && + const DeepCollectionEquality() + .equals(other.collectionRefs, collectionRefs) && const DeepCollectionEquality().equals(other.custom, custom) && (identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt) && @@ -63,8 +68,12 @@ mixin _$ActivityRequest { (identical(other.parentId, parentId) || other.parentId == parentId) && (identical(other.pollId, pollId) || other.pollId == pollId) && + (identical(other.restrictReplies, restrictReplies) || + other.restrictReplies == restrictReplies) && const DeepCollectionEquality() .equals(other.searchData, searchData) && + (identical(other.skipEnrichUrl, skipEnrichUrl) || + other.skipEnrichUrl == skipEnrichUrl) && (identical(other.text, text) || other.text == text) && (identical(other.type, type) || other.type == type) && (identical(other.visibility, visibility) || @@ -74,28 +83,32 @@ mixin _$ActivityRequest { } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(attachments), - const DeepCollectionEquality().hash(custom), - expiresAt, - const DeepCollectionEquality().hash(feeds), - const DeepCollectionEquality().hash(filterTags), - id, - const DeepCollectionEquality().hash(interestTags), - location, - const DeepCollectionEquality().hash(mentionedUserIds), - parentId, - pollId, - const DeepCollectionEquality().hash(searchData), - text, - type, - visibility, - visibilityTag); + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(attachments), + const DeepCollectionEquality().hash(collectionRefs), + const DeepCollectionEquality().hash(custom), + expiresAt, + const DeepCollectionEquality().hash(feeds), + const DeepCollectionEquality().hash(filterTags), + id, + const DeepCollectionEquality().hash(interestTags), + location, + const DeepCollectionEquality().hash(mentionedUserIds), + parentId, + pollId, + restrictReplies, + const DeepCollectionEquality().hash(searchData), + skipEnrichUrl, + text, + type, + visibility, + visibilityTag + ]); @override String toString() { - return 'ActivityRequest(attachments: $attachments, custom: $custom, expiresAt: $expiresAt, feeds: $feeds, filterTags: $filterTags, id: $id, interestTags: $interestTags, location: $location, mentionedUserIds: $mentionedUserIds, parentId: $parentId, pollId: $pollId, searchData: $searchData, text: $text, type: $type, visibility: $visibility, visibilityTag: $visibilityTag)'; + return 'ActivityRequest(attachments: $attachments, collectionRefs: $collectionRefs, custom: $custom, expiresAt: $expiresAt, feeds: $feeds, filterTags: $filterTags, id: $id, interestTags: $interestTags, location: $location, mentionedUserIds: $mentionedUserIds, parentId: $parentId, pollId: $pollId, restrictReplies: $restrictReplies, searchData: $searchData, skipEnrichUrl: $skipEnrichUrl, text: $text, type: $type, visibility: $visibility, visibilityTag: $visibilityTag)'; } } @@ -107,6 +120,7 @@ abstract mixin class $ActivityRequestCopyWith<$Res> { @useResult $Res call( {List? attachments, + List? collectionRefs, Map? custom, String? expiresAt, List feeds, @@ -117,7 +131,9 @@ abstract mixin class $ActivityRequestCopyWith<$Res> { List? mentionedUserIds, String? parentId, String? pollId, + ActivityRequestRestrictReplies? restrictReplies, Map? searchData, + bool? skipEnrichUrl, String? text, String type, ActivityRequestVisibility? visibility, @@ -138,6 +154,7 @@ class _$ActivityRequestCopyWithImpl<$Res> @override $Res call({ Object? attachments = freezed, + Object? collectionRefs = freezed, Object? custom = freezed, Object? expiresAt = freezed, Object? feeds = null, @@ -148,7 +165,9 @@ class _$ActivityRequestCopyWithImpl<$Res> Object? mentionedUserIds = freezed, Object? parentId = freezed, Object? pollId = freezed, + Object? restrictReplies = freezed, Object? searchData = freezed, + Object? skipEnrichUrl = freezed, Object? text = freezed, Object? type = null, Object? visibility = freezed, @@ -159,6 +178,10 @@ class _$ActivityRequestCopyWithImpl<$Res> ? _self.attachments : attachments // ignore: cast_nullable_to_non_nullable as List?, + collectionRefs: freezed == collectionRefs + ? _self.collectionRefs + : collectionRefs // ignore: cast_nullable_to_non_nullable + as List?, custom: freezed == custom ? _self.custom : custom // ignore: cast_nullable_to_non_nullable @@ -199,10 +222,18 @@ class _$ActivityRequestCopyWithImpl<$Res> ? _self.pollId : pollId // ignore: cast_nullable_to_non_nullable as String?, + restrictReplies: freezed == restrictReplies + ? _self.restrictReplies + : restrictReplies // ignore: cast_nullable_to_non_nullable + as ActivityRequestRestrictReplies?, searchData: freezed == searchData ? _self.searchData : searchData // ignore: cast_nullable_to_non_nullable as Map?, + skipEnrichUrl: freezed == skipEnrichUrl + ? _self.skipEnrichUrl + : skipEnrichUrl // ignore: cast_nullable_to_non_nullable + as bool?, text: freezed == text ? _self.text : text // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_request.g.dart index 6562735e..c6fb84ff 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/activity_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_request.g.dart @@ -11,6 +11,9 @@ ActivityRequest _$ActivityRequestFromJson(Map json) => attachments: (json['attachments'] as List?) ?.map((e) => Attachment.fromJson(e as Map)) .toList(), + collectionRefs: (json['collection_refs'] as List?) + ?.map((e) => e as String) + .toList(), custom: json['custom'] as Map?, expiresAt: json['expires_at'] as String?, feeds: (json['feeds'] as List).map((e) => e as String).toList(), @@ -29,7 +32,11 @@ ActivityRequest _$ActivityRequestFromJson(Map json) => .toList(), parentId: json['parent_id'] as String?, pollId: json['poll_id'] as String?, + restrictReplies: $enumDecodeNullable( + _$ActivityRequestRestrictRepliesEnumMap, json['restrict_replies'], + unknownValue: ActivityRequestRestrictReplies.unknown), searchData: json['search_data'] as Map?, + skipEnrichUrl: json['skip_enrich_url'] as bool?, text: json['text'] as String?, type: json['type'] as String, visibility: $enumDecodeNullable( @@ -41,6 +48,7 @@ ActivityRequest _$ActivityRequestFromJson(Map json) => Map _$ActivityRequestToJson(ActivityRequest instance) => { 'attachments': instance.attachments?.map((e) => e.toJson()).toList(), + 'collection_refs': instance.collectionRefs, 'custom': instance.custom, 'expires_at': instance.expiresAt, 'feeds': instance.feeds, @@ -51,13 +59,23 @@ Map _$ActivityRequestToJson(ActivityRequest instance) => 'mentioned_user_ids': instance.mentionedUserIds, 'parent_id': instance.parentId, 'poll_id': instance.pollId, + 'restrict_replies': + _$ActivityRequestRestrictRepliesEnumMap[instance.restrictReplies], 'search_data': instance.searchData, + 'skip_enrich_url': instance.skipEnrichUrl, 'text': instance.text, 'type': instance.type, 'visibility': _$ActivityRequestVisibilityEnumMap[instance.visibility], 'visibility_tag': instance.visibilityTag, }; +const _$ActivityRequestRestrictRepliesEnumMap = { + ActivityRequestRestrictReplies.everyone: 'everyone', + ActivityRequestRestrictReplies.nobody: 'nobody', + ActivityRequestRestrictReplies.peopleIFollow: 'people_i_follow', + ActivityRequestRestrictReplies.unknown: '_unknown', +}; + const _$ActivityRequestVisibilityEnumMap = { ActivityRequestVisibility.private: 'private', ActivityRequestVisibility.public: 'public', diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_response.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_response.dart index 73f988c3..dbf63857 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/activity_response.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_response.dart @@ -32,6 +32,7 @@ class ActivityResponse with _$ActivityResponse { const ActivityResponse({ required this.attachments, required this.bookmarkCount, + required this.collections, required this.commentCount, required this.comments, required this.createdAt, @@ -42,7 +43,7 @@ class ActivityResponse with _$ActivityResponse { this.expiresAt, required this.feeds, required this.filterTags, - this.hidden, + required this.hidden, required this.id, required this.interestTags, this.isWatched, @@ -50,14 +51,17 @@ class ActivityResponse with _$ActivityResponse { this.location, required this.mentionedUsers, this.moderation, + this.moderationAction, this.notificationContext, required this.ownBookmarks, required this.ownReactions, this.parent, this.poll, required this.popularity, + required this.preview, required this.reactionCount, required this.reactionGroups, + required this.restrictReplies, required this.score, required this.searchData, required this.shareCount, @@ -75,6 +79,9 @@ class ActivityResponse with _$ActivityResponse { @override final int bookmarkCount; + @override + final Map collections; + @override final int commentCount; @@ -110,7 +117,7 @@ class ActivityResponse with _$ActivityResponse { final List filterTags; @override - final bool? hidden; + final bool hidden; @override final String id; @@ -133,6 +140,9 @@ class ActivityResponse with _$ActivityResponse { @override final ModerationV2Response? moderation; + @override + final String? moderationAction; + @override final NotificationContext? notificationContext; @@ -151,12 +161,18 @@ class ActivityResponse with _$ActivityResponse { @override final int popularity; + @override + final bool preview; + @override final int reactionCount; @override final Map reactionGroups; + @override + final String restrictReplies; + @override final double score; diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_response.freezed.dart index 3f052ebe..8d651ef7 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/activity_response.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_response.freezed.dart @@ -17,6 +17,7 @@ T _$identity(T value) => value; mixin _$ActivityResponse { List get attachments; int get bookmarkCount; + Map get collections; int get commentCount; List get comments; DateTime get createdAt; @@ -27,7 +28,7 @@ mixin _$ActivityResponse { DateTime? get expiresAt; List get feeds; List get filterTags; - bool? get hidden; + bool get hidden; String get id; List get interestTags; bool? get isWatched; @@ -35,14 +36,17 @@ mixin _$ActivityResponse { ActivityLocation? get location; List get mentionedUsers; ModerationV2Response? get moderation; + String? get moderationAction; NotificationContext? get notificationContext; List get ownBookmarks; List get ownReactions; ActivityResponse? get parent; PollResponseData? get poll; int get popularity; + bool get preview; int get reactionCount; Map get reactionGroups; + String get restrictReplies; double get score; Map get searchData; int get shareCount; @@ -70,6 +74,8 @@ mixin _$ActivityResponse { .equals(other.attachments, attachments) && (identical(other.bookmarkCount, bookmarkCount) || other.bookmarkCount == bookmarkCount) && + const DeepCollectionEquality() + .equals(other.collections, collections) && (identical(other.commentCount, commentCount) || other.commentCount == commentCount) && const DeepCollectionEquality().equals(other.comments, comments) && @@ -101,6 +107,8 @@ mixin _$ActivityResponse { .equals(other.mentionedUsers, mentionedUsers) && (identical(other.moderation, moderation) || other.moderation == moderation) && + (identical(other.moderationAction, moderationAction) || + other.moderationAction == moderationAction) && (identical(other.notificationContext, notificationContext) || other.notificationContext == notificationContext) && const DeepCollectionEquality() @@ -111,10 +119,13 @@ mixin _$ActivityResponse { (identical(other.poll, poll) || other.poll == poll) && (identical(other.popularity, popularity) || other.popularity == popularity) && + (identical(other.preview, preview) || other.preview == preview) && (identical(other.reactionCount, reactionCount) || other.reactionCount == reactionCount) && const DeepCollectionEquality() .equals(other.reactionGroups, reactionGroups) && + (identical(other.restrictReplies, restrictReplies) || + other.restrictReplies == restrictReplies) && (identical(other.score, score) || other.score == score) && const DeepCollectionEquality() .equals(other.searchData, searchData) && @@ -136,6 +147,7 @@ mixin _$ActivityResponse { runtimeType, const DeepCollectionEquality().hash(attachments), bookmarkCount, + const DeepCollectionEquality().hash(collections), commentCount, const DeepCollectionEquality().hash(comments), createdAt, @@ -154,14 +166,17 @@ mixin _$ActivityResponse { location, const DeepCollectionEquality().hash(mentionedUsers), moderation, + moderationAction, notificationContext, const DeepCollectionEquality().hash(ownBookmarks), const DeepCollectionEquality().hash(ownReactions), parent, poll, popularity, + preview, reactionCount, const DeepCollectionEquality().hash(reactionGroups), + restrictReplies, score, const DeepCollectionEquality().hash(searchData), shareCount, @@ -175,7 +190,7 @@ mixin _$ActivityResponse { @override String toString() { - return 'ActivityResponse(attachments: $attachments, bookmarkCount: $bookmarkCount, commentCount: $commentCount, comments: $comments, createdAt: $createdAt, currentFeed: $currentFeed, custom: $custom, deletedAt: $deletedAt, editedAt: $editedAt, expiresAt: $expiresAt, feeds: $feeds, filterTags: $filterTags, hidden: $hidden, id: $id, interestTags: $interestTags, isWatched: $isWatched, latestReactions: $latestReactions, location: $location, mentionedUsers: $mentionedUsers, moderation: $moderation, notificationContext: $notificationContext, ownBookmarks: $ownBookmarks, ownReactions: $ownReactions, parent: $parent, poll: $poll, popularity: $popularity, reactionCount: $reactionCount, reactionGroups: $reactionGroups, score: $score, searchData: $searchData, shareCount: $shareCount, text: $text, type: $type, updatedAt: $updatedAt, user: $user, visibility: $visibility, visibilityTag: $visibilityTag)'; + return 'ActivityResponse(attachments: $attachments, bookmarkCount: $bookmarkCount, collections: $collections, commentCount: $commentCount, comments: $comments, createdAt: $createdAt, currentFeed: $currentFeed, custom: $custom, deletedAt: $deletedAt, editedAt: $editedAt, expiresAt: $expiresAt, feeds: $feeds, filterTags: $filterTags, hidden: $hidden, id: $id, interestTags: $interestTags, isWatched: $isWatched, latestReactions: $latestReactions, location: $location, mentionedUsers: $mentionedUsers, moderation: $moderation, moderationAction: $moderationAction, notificationContext: $notificationContext, ownBookmarks: $ownBookmarks, ownReactions: $ownReactions, parent: $parent, poll: $poll, popularity: $popularity, preview: $preview, reactionCount: $reactionCount, reactionGroups: $reactionGroups, restrictReplies: $restrictReplies, score: $score, searchData: $searchData, shareCount: $shareCount, text: $text, type: $type, updatedAt: $updatedAt, user: $user, visibility: $visibility, visibilityTag: $visibilityTag)'; } } @@ -188,6 +203,7 @@ abstract mixin class $ActivityResponseCopyWith<$Res> { $Res call( {List attachments, int bookmarkCount, + Map collections, int commentCount, List comments, DateTime createdAt, @@ -198,7 +214,7 @@ abstract mixin class $ActivityResponseCopyWith<$Res> { DateTime? expiresAt, List feeds, List filterTags, - bool? hidden, + bool hidden, String id, List interestTags, bool? isWatched, @@ -206,14 +222,17 @@ abstract mixin class $ActivityResponseCopyWith<$Res> { ActivityLocation? location, List mentionedUsers, ModerationV2Response? moderation, + String? moderationAction, NotificationContext? notificationContext, List ownBookmarks, List ownReactions, ActivityResponse? parent, PollResponseData? poll, int popularity, + bool preview, int reactionCount, Map reactionGroups, + String restrictReplies, double score, Map searchData, int shareCount, @@ -240,6 +259,7 @@ class _$ActivityResponseCopyWithImpl<$Res> $Res call({ Object? attachments = null, Object? bookmarkCount = null, + Object? collections = null, Object? commentCount = null, Object? comments = null, Object? createdAt = null, @@ -250,7 +270,7 @@ class _$ActivityResponseCopyWithImpl<$Res> Object? expiresAt = freezed, Object? feeds = null, Object? filterTags = null, - Object? hidden = freezed, + Object? hidden = null, Object? id = null, Object? interestTags = null, Object? isWatched = freezed, @@ -258,14 +278,17 @@ class _$ActivityResponseCopyWithImpl<$Res> Object? location = freezed, Object? mentionedUsers = null, Object? moderation = freezed, + Object? moderationAction = freezed, Object? notificationContext = freezed, Object? ownBookmarks = null, Object? ownReactions = null, Object? parent = freezed, Object? poll = freezed, Object? popularity = null, + Object? preview = null, Object? reactionCount = null, Object? reactionGroups = null, + Object? restrictReplies = null, Object? score = null, Object? searchData = null, Object? shareCount = null, @@ -285,6 +308,10 @@ class _$ActivityResponseCopyWithImpl<$Res> ? _self.bookmarkCount : bookmarkCount // ignore: cast_nullable_to_non_nullable as int, + collections: null == collections + ? _self.collections + : collections // ignore: cast_nullable_to_non_nullable + as Map, commentCount: null == commentCount ? _self.commentCount : commentCount // ignore: cast_nullable_to_non_nullable @@ -325,10 +352,10 @@ class _$ActivityResponseCopyWithImpl<$Res> ? _self.filterTags : filterTags // ignore: cast_nullable_to_non_nullable as List, - hidden: freezed == hidden + hidden: null == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable - as bool?, + as bool, id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable @@ -357,6 +384,10 @@ class _$ActivityResponseCopyWithImpl<$Res> ? _self.moderation : moderation // ignore: cast_nullable_to_non_nullable as ModerationV2Response?, + moderationAction: freezed == moderationAction + ? _self.moderationAction + : moderationAction // ignore: cast_nullable_to_non_nullable + as String?, notificationContext: freezed == notificationContext ? _self.notificationContext : notificationContext // ignore: cast_nullable_to_non_nullable @@ -381,6 +412,10 @@ class _$ActivityResponseCopyWithImpl<$Res> ? _self.popularity : popularity // ignore: cast_nullable_to_non_nullable as int, + preview: null == preview + ? _self.preview + : preview // ignore: cast_nullable_to_non_nullable + as bool, reactionCount: null == reactionCount ? _self.reactionCount : reactionCount // ignore: cast_nullable_to_non_nullable @@ -389,6 +424,10 @@ class _$ActivityResponseCopyWithImpl<$Res> ? _self.reactionGroups : reactionGroups // ignore: cast_nullable_to_non_nullable as Map, + restrictReplies: null == restrictReplies + ? _self.restrictReplies + : restrictReplies // ignore: cast_nullable_to_non_nullable + as String, score: null == score ? _self.score : score // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_response.g.dart index c64c2bd7..95ffaac6 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/activity_response.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_response.g.dart @@ -12,6 +12,10 @@ ActivityResponse _$ActivityResponseFromJson(Map json) => .map((e) => Attachment.fromJson(e as Map)) .toList(), bookmarkCount: (json['bookmark_count'] as num).toInt(), + collections: (json['collections'] as Map).map( + (k, e) => MapEntry( + k, EnrichedCollectionResponse.fromJson(e as Map)), + ), commentCount: (json['comment_count'] as num).toInt(), comments: (json['comments'] as List) .map((e) => CommentResponse.fromJson(e as Map)) @@ -32,7 +36,7 @@ ActivityResponse _$ActivityResponseFromJson(Map json) => filterTags: (json['filter_tags'] as List) .map((e) => e as String) .toList(), - hidden: json['hidden'] as bool?, + hidden: json['hidden'] as bool, id: json['id'] as String, interestTags: (json['interest_tags'] as List) .map((e) => e as String) @@ -51,6 +55,7 @@ ActivityResponse _$ActivityResponseFromJson(Map json) => ? null : ModerationV2Response.fromJson( json['moderation'] as Map), + moderationAction: json['moderation_action'] as String?, notificationContext: json['notification_context'] == null ? null : NotificationContext.fromJson( @@ -68,11 +73,13 @@ ActivityResponse _$ActivityResponseFromJson(Map json) => ? null : PollResponseData.fromJson(json['poll'] as Map), popularity: (json['popularity'] as num).toInt(), + preview: json['preview'] as bool, reactionCount: (json['reaction_count'] as num).toInt(), reactionGroups: (json['reaction_groups'] as Map).map( (k, e) => MapEntry( k, ReactionGroupResponse.fromJson(e as Map)), ), + restrictReplies: json['restrict_replies'] as String, score: (json['score'] as num).toDouble(), searchData: json['search_data'] as Map, shareCount: (json['share_count'] as num).toInt(), @@ -91,6 +98,8 @@ Map _$ActivityResponseToJson(ActivityResponse instance) => { 'attachments': instance.attachments.map((e) => e.toJson()).toList(), 'bookmark_count': instance.bookmarkCount, + 'collections': + instance.collections.map((k, e) => MapEntry(k, e.toJson())), 'comment_count': instance.commentCount, 'comments': instance.comments.map((e) => e.toJson()).toList(), 'created_at': const EpochDateTimeConverter().toJson(instance.createdAt), @@ -114,15 +123,18 @@ Map _$ActivityResponseToJson(ActivityResponse instance) => 'mentioned_users': instance.mentionedUsers.map((e) => e.toJson()).toList(), 'moderation': instance.moderation?.toJson(), + 'moderation_action': instance.moderationAction, 'notification_context': instance.notificationContext?.toJson(), 'own_bookmarks': instance.ownBookmarks.map((e) => e.toJson()).toList(), 'own_reactions': instance.ownReactions.map((e) => e.toJson()).toList(), 'parent': instance.parent?.toJson(), 'poll': instance.poll?.toJson(), 'popularity': instance.popularity, + 'preview': instance.preview, 'reaction_count': instance.reactionCount, 'reaction_groups': instance.reactionGroups.map((k, e) => MapEntry(k, e.toJson())), + 'restrict_replies': instance.restrictReplies, 'score': instance.score, 'search_data': instance.searchData, 'share_count': instance.shareCount, diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.dart index 359a5632..6b1ec517 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.dart @@ -19,6 +19,7 @@ part 'activity_selector_config.freezed.dart'; class ActivitySelectorConfig with _$ActivitySelectorConfig { const ActivitySelectorConfig({ required this.cutoffTime, + this.cutoffWindow, this.filter, this.minPopularity, this.sort, @@ -29,6 +30,9 @@ class ActivitySelectorConfig with _$ActivitySelectorConfig { @EpochDateTimeConverter() final DateTime cutoffTime; + @override + final String? cutoffWindow; + @override final Map? filter; diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.freezed.dart index f03e09ea..8b4315f9 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.freezed.dart @@ -16,6 +16,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$ActivitySelectorConfig { DateTime get cutoffTime; + String? get cutoffWindow; Map? get filter; int? get minPopularity; List? get sort; @@ -36,6 +37,8 @@ mixin _$ActivitySelectorConfig { other is ActivitySelectorConfig && (identical(other.cutoffTime, cutoffTime) || other.cutoffTime == cutoffTime) && + (identical(other.cutoffWindow, cutoffWindow) || + other.cutoffWindow == cutoffWindow) && const DeepCollectionEquality().equals(other.filter, filter) && (identical(other.minPopularity, minPopularity) || other.minPopularity == minPopularity) && @@ -47,6 +50,7 @@ mixin _$ActivitySelectorConfig { int get hashCode => Object.hash( runtimeType, cutoffTime, + cutoffWindow, const DeepCollectionEquality().hash(filter), minPopularity, const DeepCollectionEquality().hash(sort), @@ -54,7 +58,7 @@ mixin _$ActivitySelectorConfig { @override String toString() { - return 'ActivitySelectorConfig(cutoffTime: $cutoffTime, filter: $filter, minPopularity: $minPopularity, sort: $sort, type: $type)'; + return 'ActivitySelectorConfig(cutoffTime: $cutoffTime, cutoffWindow: $cutoffWindow, filter: $filter, minPopularity: $minPopularity, sort: $sort, type: $type)'; } } @@ -66,6 +70,7 @@ abstract mixin class $ActivitySelectorConfigCopyWith<$Res> { @useResult $Res call( {DateTime cutoffTime, + String? cutoffWindow, Map? filter, int? minPopularity, List? sort, @@ -86,6 +91,7 @@ class _$ActivitySelectorConfigCopyWithImpl<$Res> @override $Res call({ Object? cutoffTime = null, + Object? cutoffWindow = freezed, Object? filter = freezed, Object? minPopularity = freezed, Object? sort = freezed, @@ -96,6 +102,10 @@ class _$ActivitySelectorConfigCopyWithImpl<$Res> ? _self.cutoffTime : cutoffTime // ignore: cast_nullable_to_non_nullable as DateTime, + cutoffWindow: freezed == cutoffWindow + ? _self.cutoffWindow + : cutoffWindow // ignore: cast_nullable_to_non_nullable + as String?, filter: freezed == filter ? _self.filter : filter // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.g.dart b/packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.g.dart index 2c882f01..93cb85ed 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.g.dart @@ -11,6 +11,7 @@ ActivitySelectorConfig _$ActivitySelectorConfigFromJson( ActivitySelectorConfig( cutoffTime: const EpochDateTimeConverter() .fromJson((json['cutoff_time'] as num).toInt()), + cutoffWindow: json['cutoff_window'] as String?, filter: json['filter'] as Map?, minPopularity: (json['min_popularity'] as num?)?.toInt(), sort: (json['sort'] as List?) @@ -23,6 +24,7 @@ Map _$ActivitySelectorConfigToJson( ActivitySelectorConfig instance) => { 'cutoff_time': const EpochDateTimeConverter().toJson(instance.cutoffTime), + 'cutoff_window': instance.cutoffWindow, 'filter': instance.filter, 'min_popularity': instance.minPopularity, 'sort': instance.sort?.map((e) => e.toJson()).toList(), diff --git a/packages/stream_feeds/lib/src/generated/api/model/add_activity_request.dart b/packages/stream_feeds/lib/src/generated/api/model/add_activity_request.dart index 58718b4b..8596e8a9 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/add_activity_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/add_activity_request.dart @@ -13,6 +13,18 @@ import '../models.dart'; part 'add_activity_request.g.dart'; part 'add_activity_request.freezed.dart'; +@JsonEnum(alwaysCreate: true) +enum AddActivityRequestRestrictReplies { + @JsonValue('everyone') + everyone, + @JsonValue('nobody') + nobody, + @JsonValue('people_i_follow') + peopleIFollow, + @JsonValue('_unknown') + unknown; +} + @JsonEnum(alwaysCreate: true) enum AddActivityRequestVisibility { @JsonValue('private') @@ -31,6 +43,7 @@ enum AddActivityRequestVisibility { class AddActivityRequest with _$AddActivityRequest { const AddActivityRequest({ this.attachments, + this.collectionRefs, this.custom, this.expiresAt, required this.feeds, @@ -41,7 +54,9 @@ class AddActivityRequest with _$AddActivityRequest { this.mentionedUserIds, this.parentId, this.pollId, + this.restrictReplies, this.searchData, + this.skipEnrichUrl, this.text, required this.type, this.visibility, @@ -51,6 +66,9 @@ class AddActivityRequest with _$AddActivityRequest { @override final List? attachments; + @override + final List? collectionRefs; + @override final Map? custom; @@ -81,9 +99,16 @@ class AddActivityRequest with _$AddActivityRequest { @override final String? pollId; + @override + @JsonKey(unknownEnumValue: AddActivityRequestRestrictReplies.unknown) + final AddActivityRequestRestrictReplies? restrictReplies; + @override final Map? searchData; + @override + final bool? skipEnrichUrl; + @override final String? text; diff --git a/packages/stream_feeds/lib/src/generated/api/model/add_activity_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/add_activity_request.freezed.dart index 531cee29..ff519229 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/add_activity_request.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/add_activity_request.freezed.dart @@ -16,6 +16,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$AddActivityRequest { List? get attachments; + List? get collectionRefs; Map? get custom; String? get expiresAt; List get feeds; @@ -26,7 +27,9 @@ mixin _$AddActivityRequest { List? get mentionedUserIds; String? get parentId; String? get pollId; + AddActivityRequestRestrictReplies? get restrictReplies; Map? get searchData; + bool? get skipEnrichUrl; String? get text; String get type; AddActivityRequestVisibility? get visibility; @@ -47,6 +50,8 @@ mixin _$AddActivityRequest { other is AddActivityRequest && const DeepCollectionEquality() .equals(other.attachments, attachments) && + const DeepCollectionEquality() + .equals(other.collectionRefs, collectionRefs) && const DeepCollectionEquality().equals(other.custom, custom) && (identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt) && @@ -63,8 +68,12 @@ mixin _$AddActivityRequest { (identical(other.parentId, parentId) || other.parentId == parentId) && (identical(other.pollId, pollId) || other.pollId == pollId) && + (identical(other.restrictReplies, restrictReplies) || + other.restrictReplies == restrictReplies) && const DeepCollectionEquality() .equals(other.searchData, searchData) && + (identical(other.skipEnrichUrl, skipEnrichUrl) || + other.skipEnrichUrl == skipEnrichUrl) && (identical(other.text, text) || other.text == text) && (identical(other.type, type) || other.type == type) && (identical(other.visibility, visibility) || @@ -74,28 +83,32 @@ mixin _$AddActivityRequest { } @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(attachments), - const DeepCollectionEquality().hash(custom), - expiresAt, - const DeepCollectionEquality().hash(feeds), - const DeepCollectionEquality().hash(filterTags), - id, - const DeepCollectionEquality().hash(interestTags), - location, - const DeepCollectionEquality().hash(mentionedUserIds), - parentId, - pollId, - const DeepCollectionEquality().hash(searchData), - text, - type, - visibility, - visibilityTag); + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(attachments), + const DeepCollectionEquality().hash(collectionRefs), + const DeepCollectionEquality().hash(custom), + expiresAt, + const DeepCollectionEquality().hash(feeds), + const DeepCollectionEquality().hash(filterTags), + id, + const DeepCollectionEquality().hash(interestTags), + location, + const DeepCollectionEquality().hash(mentionedUserIds), + parentId, + pollId, + restrictReplies, + const DeepCollectionEquality().hash(searchData), + skipEnrichUrl, + text, + type, + visibility, + visibilityTag + ]); @override String toString() { - return 'AddActivityRequest(attachments: $attachments, custom: $custom, expiresAt: $expiresAt, feeds: $feeds, filterTags: $filterTags, id: $id, interestTags: $interestTags, location: $location, mentionedUserIds: $mentionedUserIds, parentId: $parentId, pollId: $pollId, searchData: $searchData, text: $text, type: $type, visibility: $visibility, visibilityTag: $visibilityTag)'; + return 'AddActivityRequest(attachments: $attachments, collectionRefs: $collectionRefs, custom: $custom, expiresAt: $expiresAt, feeds: $feeds, filterTags: $filterTags, id: $id, interestTags: $interestTags, location: $location, mentionedUserIds: $mentionedUserIds, parentId: $parentId, pollId: $pollId, restrictReplies: $restrictReplies, searchData: $searchData, skipEnrichUrl: $skipEnrichUrl, text: $text, type: $type, visibility: $visibility, visibilityTag: $visibilityTag)'; } } @@ -107,6 +120,7 @@ abstract mixin class $AddActivityRequestCopyWith<$Res> { @useResult $Res call( {List? attachments, + List? collectionRefs, Map? custom, String? expiresAt, List feeds, @@ -117,7 +131,9 @@ abstract mixin class $AddActivityRequestCopyWith<$Res> { List? mentionedUserIds, String? parentId, String? pollId, + AddActivityRequestRestrictReplies? restrictReplies, Map? searchData, + bool? skipEnrichUrl, String? text, String type, AddActivityRequestVisibility? visibility, @@ -138,6 +154,7 @@ class _$AddActivityRequestCopyWithImpl<$Res> @override $Res call({ Object? attachments = freezed, + Object? collectionRefs = freezed, Object? custom = freezed, Object? expiresAt = freezed, Object? feeds = null, @@ -148,7 +165,9 @@ class _$AddActivityRequestCopyWithImpl<$Res> Object? mentionedUserIds = freezed, Object? parentId = freezed, Object? pollId = freezed, + Object? restrictReplies = freezed, Object? searchData = freezed, + Object? skipEnrichUrl = freezed, Object? text = freezed, Object? type = null, Object? visibility = freezed, @@ -159,6 +178,10 @@ class _$AddActivityRequestCopyWithImpl<$Res> ? _self.attachments : attachments // ignore: cast_nullable_to_non_nullable as List?, + collectionRefs: freezed == collectionRefs + ? _self.collectionRefs + : collectionRefs // ignore: cast_nullable_to_non_nullable + as List?, custom: freezed == custom ? _self.custom : custom // ignore: cast_nullable_to_non_nullable @@ -199,10 +222,18 @@ class _$AddActivityRequestCopyWithImpl<$Res> ? _self.pollId : pollId // ignore: cast_nullable_to_non_nullable as String?, + restrictReplies: freezed == restrictReplies + ? _self.restrictReplies + : restrictReplies // ignore: cast_nullable_to_non_nullable + as AddActivityRequestRestrictReplies?, searchData: freezed == searchData ? _self.searchData : searchData // ignore: cast_nullable_to_non_nullable as Map?, + skipEnrichUrl: freezed == skipEnrichUrl + ? _self.skipEnrichUrl + : skipEnrichUrl // ignore: cast_nullable_to_non_nullable + as bool?, text: freezed == text ? _self.text : text // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/add_activity_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/add_activity_request.g.dart index 75e5f69d..0c26588e 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/add_activity_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/add_activity_request.g.dart @@ -11,6 +11,9 @@ AddActivityRequest _$AddActivityRequestFromJson(Map json) => attachments: (json['attachments'] as List?) ?.map((e) => Attachment.fromJson(e as Map)) .toList(), + collectionRefs: (json['collection_refs'] as List?) + ?.map((e) => e as String) + .toList(), custom: json['custom'] as Map?, expiresAt: json['expires_at'] as String?, feeds: (json['feeds'] as List).map((e) => e as String).toList(), @@ -29,7 +32,11 @@ AddActivityRequest _$AddActivityRequestFromJson(Map json) => .toList(), parentId: json['parent_id'] as String?, pollId: json['poll_id'] as String?, + restrictReplies: $enumDecodeNullable( + _$AddActivityRequestRestrictRepliesEnumMap, json['restrict_replies'], + unknownValue: AddActivityRequestRestrictReplies.unknown), searchData: json['search_data'] as Map?, + skipEnrichUrl: json['skip_enrich_url'] as bool?, text: json['text'] as String?, type: json['type'] as String, visibility: $enumDecodeNullable( @@ -41,6 +48,7 @@ AddActivityRequest _$AddActivityRequestFromJson(Map json) => Map _$AddActivityRequestToJson(AddActivityRequest instance) => { 'attachments': instance.attachments?.map((e) => e.toJson()).toList(), + 'collection_refs': instance.collectionRefs, 'custom': instance.custom, 'expires_at': instance.expiresAt, 'feeds': instance.feeds, @@ -51,13 +59,23 @@ Map _$AddActivityRequestToJson(AddActivityRequest instance) => 'mentioned_user_ids': instance.mentionedUserIds, 'parent_id': instance.parentId, 'poll_id': instance.pollId, + 'restrict_replies': + _$AddActivityRequestRestrictRepliesEnumMap[instance.restrictReplies], 'search_data': instance.searchData, + 'skip_enrich_url': instance.skipEnrichUrl, 'text': instance.text, 'type': instance.type, 'visibility': _$AddActivityRequestVisibilityEnumMap[instance.visibility], 'visibility_tag': instance.visibilityTag, }; +const _$AddActivityRequestRestrictRepliesEnumMap = { + AddActivityRequestRestrictReplies.everyone: 'everyone', + AddActivityRequestRestrictReplies.nobody: 'nobody', + AddActivityRequestRestrictReplies.peopleIFollow: 'people_i_follow', + AddActivityRequestRestrictReplies.unknown: '_unknown', +}; + const _$AddActivityRequestVisibilityEnumMap = { AddActivityRequestVisibility.private: 'private', AddActivityRequestVisibility.public: 'public', diff --git a/packages/stream_feeds/lib/src/generated/api/model/add_comment_request.dart b/packages/stream_feeds/lib/src/generated/api/model/add_comment_request.dart index f32ed3ca..4d555afc 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/add_comment_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/add_comment_request.dart @@ -22,10 +22,12 @@ class AddCommentRequest with _$AddCommentRequest { this.comment, this.createNotificationActivity, this.custom, + this.id, this.mentionedUserIds, - required this.objectId, - required this.objectType, + this.objectId, + this.objectType, this.parentId, + this.skipEnrichUrl, this.skipPush, }); @@ -41,18 +43,24 @@ class AddCommentRequest with _$AddCommentRequest { @override final Map? custom; + @override + final String? id; + @override final List? mentionedUserIds; @override - final String objectId; + final String? objectId; @override - final String objectType; + final String? objectType; @override final String? parentId; + @override + final bool? skipEnrichUrl; + @override final bool? skipPush; diff --git a/packages/stream_feeds/lib/src/generated/api/model/add_comment_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/add_comment_request.freezed.dart index bff8f80b..3bbed51e 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/add_comment_request.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/add_comment_request.freezed.dart @@ -19,10 +19,12 @@ mixin _$AddCommentRequest { String? get comment; bool? get createNotificationActivity; Map? get custom; + String? get id; List? get mentionedUserIds; - String get objectId; - String get objectType; + String? get objectId; + String? get objectType; String? get parentId; + bool? get skipEnrichUrl; bool? get skipPush; /// Create a copy of AddCommentRequest @@ -46,6 +48,7 @@ mixin _$AddCommentRequest { other.createNotificationActivity == createNotificationActivity) && const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.id, id) || other.id == id) && const DeepCollectionEquality() .equals(other.mentionedUserIds, mentionedUserIds) && (identical(other.objectId, objectId) || @@ -54,6 +57,8 @@ mixin _$AddCommentRequest { other.objectType == objectType) && (identical(other.parentId, parentId) || other.parentId == parentId) && + (identical(other.skipEnrichUrl, skipEnrichUrl) || + other.skipEnrichUrl == skipEnrichUrl) && (identical(other.skipPush, skipPush) || other.skipPush == skipPush)); } @@ -65,15 +70,17 @@ mixin _$AddCommentRequest { comment, createNotificationActivity, const DeepCollectionEquality().hash(custom), + id, const DeepCollectionEquality().hash(mentionedUserIds), objectId, objectType, parentId, + skipEnrichUrl, skipPush); @override String toString() { - return 'AddCommentRequest(attachments: $attachments, comment: $comment, createNotificationActivity: $createNotificationActivity, custom: $custom, mentionedUserIds: $mentionedUserIds, objectId: $objectId, objectType: $objectType, parentId: $parentId, skipPush: $skipPush)'; + return 'AddCommentRequest(attachments: $attachments, comment: $comment, createNotificationActivity: $createNotificationActivity, custom: $custom, id: $id, mentionedUserIds: $mentionedUserIds, objectId: $objectId, objectType: $objectType, parentId: $parentId, skipEnrichUrl: $skipEnrichUrl, skipPush: $skipPush)'; } } @@ -88,10 +95,12 @@ abstract mixin class $AddCommentRequestCopyWith<$Res> { String? comment, bool? createNotificationActivity, Map? custom, + String? id, List? mentionedUserIds, - String objectId, - String objectType, + String? objectId, + String? objectType, String? parentId, + bool? skipEnrichUrl, bool? skipPush}); } @@ -112,10 +121,12 @@ class _$AddCommentRequestCopyWithImpl<$Res> Object? comment = freezed, Object? createNotificationActivity = freezed, Object? custom = freezed, + Object? id = freezed, Object? mentionedUserIds = freezed, - Object? objectId = null, - Object? objectType = null, + Object? objectId = freezed, + Object? objectType = freezed, Object? parentId = freezed, + Object? skipEnrichUrl = freezed, Object? skipPush = freezed, }) { return _then(AddCommentRequest( @@ -135,22 +146,30 @@ class _$AddCommentRequestCopyWithImpl<$Res> ? _self.custom : custom // ignore: cast_nullable_to_non_nullable as Map?, + id: freezed == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String?, mentionedUserIds: freezed == mentionedUserIds ? _self.mentionedUserIds : mentionedUserIds // ignore: cast_nullable_to_non_nullable as List?, - objectId: null == objectId + objectId: freezed == objectId ? _self.objectId : objectId // ignore: cast_nullable_to_non_nullable - as String, - objectType: null == objectType + as String?, + objectType: freezed == objectType ? _self.objectType : objectType // ignore: cast_nullable_to_non_nullable - as String, + as String?, parentId: freezed == parentId ? _self.parentId : parentId // ignore: cast_nullable_to_non_nullable as String?, + skipEnrichUrl: freezed == skipEnrichUrl + ? _self.skipEnrichUrl + : skipEnrichUrl // ignore: cast_nullable_to_non_nullable + as bool?, skipPush: freezed == skipPush ? _self.skipPush : skipPush // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/add_comment_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/add_comment_request.g.dart index 37391553..82252207 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/add_comment_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/add_comment_request.g.dart @@ -14,12 +14,14 @@ AddCommentRequest _$AddCommentRequestFromJson(Map json) => comment: json['comment'] as String?, createNotificationActivity: json['create_notification_activity'] as bool?, custom: json['custom'] as Map?, + id: json['id'] as String?, mentionedUserIds: (json['mentioned_user_ids'] as List?) ?.map((e) => e as String) .toList(), - objectId: json['object_id'] as String, - objectType: json['object_type'] as String, + objectId: json['object_id'] as String?, + objectType: json['object_type'] as String?, parentId: json['parent_id'] as String?, + skipEnrichUrl: json['skip_enrich_url'] as bool?, skipPush: json['skip_push'] as bool?, ); @@ -29,9 +31,11 @@ Map _$AddCommentRequestToJson(AddCommentRequest instance) => 'comment': instance.comment, 'create_notification_activity': instance.createNotificationActivity, 'custom': instance.custom, + 'id': instance.id, 'mentioned_user_ids': instance.mentionedUserIds, 'object_id': instance.objectId, 'object_type': instance.objectType, 'parent_id': instance.parentId, + 'skip_enrich_url': instance.skipEnrichUrl, 'skip_push': instance.skipPush, }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/app_response_fields.dart b/packages/stream_feeds/lib/src/generated/api/model/app_response_fields.dart index ac10995f..145c1f78 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/app_response_fields.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/app_response_fields.dart @@ -21,10 +21,10 @@ class AppResponseFields with _$AppResponseFields { required this.asyncUrlEnrichEnabled, required this.autoTranslationEnabled, required this.fileUploadConfig, + required this.id, required this.imageUploadConfig, required this.name, - required this.region, - required this.shard, + required this.placement, }); @override @@ -37,16 +37,16 @@ class AppResponseFields with _$AppResponseFields { final FileUploadConfig fileUploadConfig; @override - final FileUploadConfig imageUploadConfig; + final int id; @override - final String name; + final FileUploadConfig imageUploadConfig; @override - final String region; + final String name; @override - final String shard; + final String placement; Map toJson() => _$AppResponseFieldsToJson(this); diff --git a/packages/stream_feeds/lib/src/generated/api/model/app_response_fields.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/app_response_fields.freezed.dart index 0cf9f2d5..1559b429 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/app_response_fields.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/app_response_fields.freezed.dart @@ -18,10 +18,10 @@ mixin _$AppResponseFields { bool get asyncUrlEnrichEnabled; bool get autoTranslationEnabled; FileUploadConfig get fileUploadConfig; + int get id; FileUploadConfig get imageUploadConfig; String get name; - String get region; - String get shard; + String get placement; /// Create a copy of AppResponseFields /// with the given fields replaced by the non-null parameter values. @@ -42,11 +42,12 @@ mixin _$AppResponseFields { other.autoTranslationEnabled == autoTranslationEnabled) && (identical(other.fileUploadConfig, fileUploadConfig) || other.fileUploadConfig == fileUploadConfig) && + (identical(other.id, id) || other.id == id) && (identical(other.imageUploadConfig, imageUploadConfig) || other.imageUploadConfig == imageUploadConfig) && (identical(other.name, name) || other.name == name) && - (identical(other.region, region) || other.region == region) && - (identical(other.shard, shard) || other.shard == shard)); + (identical(other.placement, placement) || + other.placement == placement)); } @override @@ -55,14 +56,14 @@ mixin _$AppResponseFields { asyncUrlEnrichEnabled, autoTranslationEnabled, fileUploadConfig, + id, imageUploadConfig, name, - region, - shard); + placement); @override String toString() { - return 'AppResponseFields(asyncUrlEnrichEnabled: $asyncUrlEnrichEnabled, autoTranslationEnabled: $autoTranslationEnabled, fileUploadConfig: $fileUploadConfig, imageUploadConfig: $imageUploadConfig, name: $name, region: $region, shard: $shard)'; + return 'AppResponseFields(asyncUrlEnrichEnabled: $asyncUrlEnrichEnabled, autoTranslationEnabled: $autoTranslationEnabled, fileUploadConfig: $fileUploadConfig, id: $id, imageUploadConfig: $imageUploadConfig, name: $name, placement: $placement)'; } } @@ -76,10 +77,10 @@ abstract mixin class $AppResponseFieldsCopyWith<$Res> { {bool asyncUrlEnrichEnabled, bool autoTranslationEnabled, FileUploadConfig fileUploadConfig, + int id, FileUploadConfig imageUploadConfig, String name, - String region, - String shard}); + String placement}); } /// @nodoc @@ -98,10 +99,10 @@ class _$AppResponseFieldsCopyWithImpl<$Res> Object? asyncUrlEnrichEnabled = null, Object? autoTranslationEnabled = null, Object? fileUploadConfig = null, + Object? id = null, Object? imageUploadConfig = null, Object? name = null, - Object? region = null, - Object? shard = null, + Object? placement = null, }) { return _then(AppResponseFields( asyncUrlEnrichEnabled: null == asyncUrlEnrichEnabled @@ -116,6 +117,10 @@ class _$AppResponseFieldsCopyWithImpl<$Res> ? _self.fileUploadConfig : fileUploadConfig // ignore: cast_nullable_to_non_nullable as FileUploadConfig, + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as int, imageUploadConfig: null == imageUploadConfig ? _self.imageUploadConfig : imageUploadConfig // ignore: cast_nullable_to_non_nullable @@ -124,13 +129,9 @@ class _$AppResponseFieldsCopyWithImpl<$Res> ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, - region: null == region - ? _self.region - : region // ignore: cast_nullable_to_non_nullable - as String, - shard: null == shard - ? _self.shard - : shard // ignore: cast_nullable_to_non_nullable + placement: null == placement + ? _self.placement + : placement // ignore: cast_nullable_to_non_nullable as String, )); } diff --git a/packages/stream_feeds/lib/src/generated/api/model/app_response_fields.g.dart b/packages/stream_feeds/lib/src/generated/api/model/app_response_fields.g.dart index 3e7221ac..eccb16cf 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/app_response_fields.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/app_response_fields.g.dart @@ -12,11 +12,11 @@ AppResponseFields _$AppResponseFieldsFromJson(Map json) => autoTranslationEnabled: json['auto_translation_enabled'] as bool, fileUploadConfig: FileUploadConfig.fromJson( json['file_upload_config'] as Map), + id: (json['id'] as num).toInt(), imageUploadConfig: FileUploadConfig.fromJson( json['image_upload_config'] as Map), name: json['name'] as String, - region: json['region'] as String, - shard: json['shard'] as String, + placement: json['placement'] as String, ); Map _$AppResponseFieldsToJson(AppResponseFields instance) => @@ -24,8 +24,8 @@ Map _$AppResponseFieldsToJson(AppResponseFields instance) => 'async_url_enrich_enabled': instance.asyncUrlEnrichEnabled, 'auto_translation_enabled': instance.autoTranslationEnabled, 'file_upload_config': instance.fileUploadConfig.toJson(), + 'id': instance.id, 'image_upload_config': instance.imageUploadConfig.toJson(), 'name': instance.name, - 'region': instance.region, - 'shard': instance.shard, + 'placement': instance.placement, }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/block_action_request.dart b/packages/stream_feeds/lib/src/generated/api/model/block_action_request.dart new file mode 100644 index 00000000..081fd0e1 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/block_action_request.dart @@ -0,0 +1,31 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'block_action_request.g.dart'; +part 'block_action_request.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class BlockActionRequest with _$BlockActionRequest { + const BlockActionRequest({ + this.reason, + }); + + @override + final String? reason; + + Map toJson() => _$BlockActionRequestToJson(this); + + static BlockActionRequest fromJson(Map json) => + _$BlockActionRequestFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/block_action_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/block_action_request.freezed.dart new file mode 100644 index 00000000..98661b21 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/block_action_request.freezed.dart @@ -0,0 +1,78 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'block_action_request.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$BlockActionRequest { + String? get reason; + + /// Create a copy of BlockActionRequest + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $BlockActionRequestCopyWith get copyWith => + _$BlockActionRequestCopyWithImpl( + this as BlockActionRequest, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is BlockActionRequest && + (identical(other.reason, reason) || other.reason == reason)); + } + + @override + int get hashCode => Object.hash(runtimeType, reason); + + @override + String toString() { + return 'BlockActionRequest(reason: $reason)'; + } +} + +/// @nodoc +abstract mixin class $BlockActionRequestCopyWith<$Res> { + factory $BlockActionRequestCopyWith( + BlockActionRequest value, $Res Function(BlockActionRequest) _then) = + _$BlockActionRequestCopyWithImpl; + @useResult + $Res call({String? reason}); +} + +/// @nodoc +class _$BlockActionRequestCopyWithImpl<$Res> + implements $BlockActionRequestCopyWith<$Res> { + _$BlockActionRequestCopyWithImpl(this._self, this._then); + + final BlockActionRequest _self; + final $Res Function(BlockActionRequest) _then; + + /// Create a copy of BlockActionRequest + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? reason = freezed, + }) { + return _then(BlockActionRequest( + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/block_action_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/block_action_request.g.dart new file mode 100644 index 00000000..98923c34 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/block_action_request.g.dart @@ -0,0 +1,17 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'block_action_request.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +BlockActionRequest _$BlockActionRequestFromJson(Map json) => + BlockActionRequest( + reason: json['reason'] as String?, + ); + +Map _$BlockActionRequestToJson(BlockActionRequest instance) => + { + 'reason': instance.reason, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_response.dart b/packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_response.dart index 019c9a1f..bb65f2a7 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_response.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_response.dart @@ -23,6 +23,7 @@ class BookmarkFolderResponse with _$BookmarkFolderResponse { required this.id, required this.name, required this.updatedAt, + required this.user, }); @override @@ -42,6 +43,9 @@ class BookmarkFolderResponse with _$BookmarkFolderResponse { @EpochDateTimeConverter() final DateTime updatedAt; + @override + final UserResponse user; + Map toJson() => _$BookmarkFolderResponseToJson(this); static BookmarkFolderResponse fromJson(Map json) => diff --git a/packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_response.freezed.dart index b9f0b578..f71889fe 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_response.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_response.freezed.dart @@ -20,6 +20,7 @@ mixin _$BookmarkFolderResponse { String get id; String get name; DateTime get updatedAt; + UserResponse get user; /// Create a copy of BookmarkFolderResponse /// with the given fields replaced by the non-null parameter values. @@ -40,16 +41,17 @@ mixin _$BookmarkFolderResponse { (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && (identical(other.updatedAt, updatedAt) || - other.updatedAt == updatedAt)); + other.updatedAt == updatedAt) && + (identical(other.user, user) || other.user == user)); } @override int get hashCode => Object.hash(runtimeType, createdAt, - const DeepCollectionEquality().hash(custom), id, name, updatedAt); + const DeepCollectionEquality().hash(custom), id, name, updatedAt, user); @override String toString() { - return 'BookmarkFolderResponse(createdAt: $createdAt, custom: $custom, id: $id, name: $name, updatedAt: $updatedAt)'; + return 'BookmarkFolderResponse(createdAt: $createdAt, custom: $custom, id: $id, name: $name, updatedAt: $updatedAt, user: $user)'; } } @@ -64,7 +66,8 @@ abstract mixin class $BookmarkFolderResponseCopyWith<$Res> { Map? custom, String id, String name, - DateTime updatedAt}); + DateTime updatedAt, + UserResponse user}); } /// @nodoc @@ -85,6 +88,7 @@ class _$BookmarkFolderResponseCopyWithImpl<$Res> Object? id = null, Object? name = null, Object? updatedAt = null, + Object? user = null, }) { return _then(BookmarkFolderResponse( createdAt: null == createdAt @@ -107,6 +111,10 @@ class _$BookmarkFolderResponseCopyWithImpl<$Res> ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, + user: null == user + ? _self.user + : user // ignore: cast_nullable_to_non_nullable + as UserResponse, )); } } diff --git a/packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_response.g.dart index 6369908f..85d40728 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_response.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_response.g.dart @@ -16,6 +16,7 @@ BookmarkFolderResponse _$BookmarkFolderResponseFromJson( name: json['name'] as String, updatedAt: const EpochDateTimeConverter() .fromJson((json['updated_at'] as num).toInt()), + user: UserResponse.fromJson(json['user'] as Map), ); Map _$BookmarkFolderResponseToJson( @@ -26,4 +27,5 @@ Map _$BookmarkFolderResponseToJson( 'id': instance.id, 'name': instance.name, 'updated_at': const EpochDateTimeConverter().toJson(instance.updatedAt), + 'user': instance.user.toJson(), }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel.dart b/packages/stream_feeds/lib/src/generated/api/model/channel.dart index cfb13fca..93829b8e 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel.dart @@ -30,6 +30,7 @@ class Channel with _$Channel { required this.custom, this.deletedAt, required this.disabled, + this.filterTags, required this.frozen, required this.id, this.invites, @@ -84,6 +85,9 @@ class Channel with _$Channel { @override final bool disabled; + @override + final List? filterTags; + @override final bool frozen; diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/channel.freezed.dart index 75d18839..383773bc 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel.freezed.dart @@ -27,6 +27,7 @@ mixin _$Channel { Map get custom; DateTime? get deletedAt; bool get disabled; + List? get filterTags; bool get frozen; String get id; List? get invites; @@ -76,6 +77,8 @@ mixin _$Channel { other.deletedAt == deletedAt) && (identical(other.disabled, disabled) || other.disabled == disabled) && + const DeepCollectionEquality() + .equals(other.filterTags, filterTags) && (identical(other.frozen, frozen) || other.frozen == frozen) && (identical(other.id, id) || other.id == id) && const DeepCollectionEquality().equals(other.invites, invites) && @@ -115,6 +118,7 @@ mixin _$Channel { const DeepCollectionEquality().hash(custom), deletedAt, disabled, + const DeepCollectionEquality().hash(filterTags), frozen, id, const DeepCollectionEquality().hash(invites), @@ -133,7 +137,7 @@ mixin _$Channel { @override String toString() { - return 'Channel(activeLiveLocations: $activeLiveLocations, autoTranslationEnabled: $autoTranslationEnabled, autoTranslationLanguage: $autoTranslationLanguage, cid: $cid, config: $config, configOverrides: $configOverrides, cooldown: $cooldown, createdAt: $createdAt, createdBy: $createdBy, custom: $custom, deletedAt: $deletedAt, disabled: $disabled, frozen: $frozen, id: $id, invites: $invites, lastCampaigns: $lastCampaigns, lastMessageAt: $lastMessageAt, memberCount: $memberCount, members: $members, membersLookup: $membersLookup, messageCount: $messageCount, messageCountUpdatedAt: $messageCountUpdatedAt, team: $team, truncatedBy: $truncatedBy, type: $type, updatedAt: $updatedAt)'; + return 'Channel(activeLiveLocations: $activeLiveLocations, autoTranslationEnabled: $autoTranslationEnabled, autoTranslationLanguage: $autoTranslationLanguage, cid: $cid, config: $config, configOverrides: $configOverrides, cooldown: $cooldown, createdAt: $createdAt, createdBy: $createdBy, custom: $custom, deletedAt: $deletedAt, disabled: $disabled, filterTags: $filterTags, frozen: $frozen, id: $id, invites: $invites, lastCampaigns: $lastCampaigns, lastMessageAt: $lastMessageAt, memberCount: $memberCount, members: $members, membersLookup: $membersLookup, messageCount: $messageCount, messageCountUpdatedAt: $messageCountUpdatedAt, team: $team, truncatedBy: $truncatedBy, type: $type, updatedAt: $updatedAt)'; } } @@ -155,6 +159,7 @@ abstract mixin class $ChannelCopyWith<$Res> { Map custom, DateTime? deletedAt, bool disabled, + List? filterTags, bool frozen, String id, List? invites, @@ -195,6 +200,7 @@ class _$ChannelCopyWithImpl<$Res> implements $ChannelCopyWith<$Res> { Object? custom = null, Object? deletedAt = freezed, Object? disabled = null, + Object? filterTags = freezed, Object? frozen = null, Object? id = null, Object? invites = freezed, @@ -259,6 +265,10 @@ class _$ChannelCopyWithImpl<$Res> implements $ChannelCopyWith<$Res> { ? _self.disabled : disabled // ignore: cast_nullable_to_non_nullable as bool, + filterTags: freezed == filterTags + ? _self.filterTags + : filterTags // ignore: cast_nullable_to_non_nullable + as List?, frozen: null == frozen ? _self.frozen : frozen // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel.g.dart b/packages/stream_feeds/lib/src/generated/api/model/channel.g.dart index e8186d0c..0e17b65a 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel.g.dart @@ -30,6 +30,9 @@ Channel _$ChannelFromJson(Map json) => Channel( deletedAt: _$JsonConverterFromJson( json['deleted_at'], const EpochDateTimeConverter().fromJson), disabled: json['disabled'] as bool, + filterTags: (json['filter_tags'] as List?) + ?.map((e) => e as String) + .toList(), frozen: json['frozen'] as bool, id: json['id'] as String, invites: (json['invites'] as List?) @@ -74,6 +77,7 @@ Map _$ChannelToJson(Channel instance) => { 'deleted_at': _$JsonConverterToJson( instance.deletedAt, const EpochDateTimeConverter().toJson), 'disabled': instance.disabled, + 'filter_tags': instance.filterTags, 'frozen': instance.frozen, 'id': instance.id, 'invites': instance.invites?.map((e) => e.toJson()).toList(), diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_config.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_config.dart index d371ec18..94717838 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_config.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_config.dart @@ -66,6 +66,7 @@ class ChannelConfig with _$ChannelConfig { required this.countMessages, required this.createdAt, required this.customEvents, + required this.deliveryEvents, required this.markMessagesPending, required this.maxMessageLength, required this.mutes, @@ -129,6 +130,9 @@ class ChannelConfig with _$ChannelConfig { @override final bool customEvents; + @override + final bool deliveryEvents; + @override final bool markMessagesPending; diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_config.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_config.freezed.dart index e978c636..4936d3b7 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_config.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_config.freezed.dart @@ -27,6 +27,7 @@ mixin _$ChannelConfig { bool get countMessages; DateTime get createdAt; bool get customEvents; + bool get deliveryEvents; bool get markMessagesPending; int get maxMessageLength; bool get mutes; @@ -84,6 +85,8 @@ mixin _$ChannelConfig { other.createdAt == createdAt) && (identical(other.customEvents, customEvents) || other.customEvents == customEvents) && + (identical(other.deliveryEvents, deliveryEvents) || + other.deliveryEvents == deliveryEvents) && (identical(other.markMessagesPending, markMessagesPending) || other.markMessagesPending == markMessagesPending) && (identical(other.maxMessageLength, maxMessageLength) || @@ -138,6 +141,7 @@ mixin _$ChannelConfig { countMessages, createdAt, customEvents, + deliveryEvents, markMessagesPending, maxMessageLength, mutes, @@ -163,7 +167,7 @@ mixin _$ChannelConfig { @override String toString() { - return 'ChannelConfig(allowedFlagReasons: $allowedFlagReasons, automod: $automod, automodBehavior: $automodBehavior, automodThresholds: $automodThresholds, blocklist: $blocklist, blocklistBehavior: $blocklistBehavior, blocklists: $blocklists, commands: $commands, connectEvents: $connectEvents, countMessages: $countMessages, createdAt: $createdAt, customEvents: $customEvents, markMessagesPending: $markMessagesPending, maxMessageLength: $maxMessageLength, mutes: $mutes, name: $name, partitionSize: $partitionSize, partitionTtl: $partitionTtl, polls: $polls, pushNotifications: $pushNotifications, quotes: $quotes, reactions: $reactions, readEvents: $readEvents, reminders: $reminders, replies: $replies, search: $search, sharedLocations: $sharedLocations, skipLastMsgUpdateForSystemMsgs: $skipLastMsgUpdateForSystemMsgs, typingEvents: $typingEvents, updatedAt: $updatedAt, uploads: $uploads, urlEnrichment: $urlEnrichment, userMessageReminders: $userMessageReminders)'; + return 'ChannelConfig(allowedFlagReasons: $allowedFlagReasons, automod: $automod, automodBehavior: $automodBehavior, automodThresholds: $automodThresholds, blocklist: $blocklist, blocklistBehavior: $blocklistBehavior, blocklists: $blocklists, commands: $commands, connectEvents: $connectEvents, countMessages: $countMessages, createdAt: $createdAt, customEvents: $customEvents, deliveryEvents: $deliveryEvents, markMessagesPending: $markMessagesPending, maxMessageLength: $maxMessageLength, mutes: $mutes, name: $name, partitionSize: $partitionSize, partitionTtl: $partitionTtl, polls: $polls, pushNotifications: $pushNotifications, quotes: $quotes, reactions: $reactions, readEvents: $readEvents, reminders: $reminders, replies: $replies, search: $search, sharedLocations: $sharedLocations, skipLastMsgUpdateForSystemMsgs: $skipLastMsgUpdateForSystemMsgs, typingEvents: $typingEvents, updatedAt: $updatedAt, uploads: $uploads, urlEnrichment: $urlEnrichment, userMessageReminders: $userMessageReminders)'; } } @@ -186,6 +190,7 @@ abstract mixin class $ChannelConfigCopyWith<$Res> { bool countMessages, DateTime createdAt, bool customEvents, + bool deliveryEvents, bool markMessagesPending, int maxMessageLength, bool mutes, @@ -234,6 +239,7 @@ class _$ChannelConfigCopyWithImpl<$Res> Object? countMessages = null, Object? createdAt = null, Object? customEvents = null, + Object? deliveryEvents = null, Object? markMessagesPending = null, Object? maxMessageLength = null, Object? mutes = null, @@ -305,6 +311,10 @@ class _$ChannelConfigCopyWithImpl<$Res> ? _self.customEvents : customEvents // ignore: cast_nullable_to_non_nullable as bool, + deliveryEvents: null == deliveryEvents + ? _self.deliveryEvents + : deliveryEvents // ignore: cast_nullable_to_non_nullable + as bool, markMessagesPending: null == markMessagesPending ? _self.markMessagesPending : markMessagesPending // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_config.g.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_config.g.dart index 2a7bd914..58e8d85d 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_config.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_config.g.dart @@ -34,6 +34,7 @@ ChannelConfig _$ChannelConfigFromJson(Map json) => createdAt: const EpochDateTimeConverter() .fromJson((json['created_at'] as num).toInt()), customEvents: json['custom_events'] as bool, + deliveryEvents: json['delivery_events'] as bool, markMessagesPending: json['mark_messages_pending'] as bool, maxMessageLength: (json['max_message_length'] as num).toInt(), mutes: json['mutes'] as bool, @@ -75,6 +76,7 @@ Map _$ChannelConfigToJson(ChannelConfig instance) => 'count_messages': instance.countMessages, 'created_at': const EpochDateTimeConverter().toJson(instance.createdAt), 'custom_events': instance.customEvents, + 'delivery_events': instance.deliveryEvents, 'mark_messages_pending': instance.markMessagesPending, 'max_message_length': instance.maxMessageLength, 'mutes': instance.mutes, diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_config_with_info.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_config_with_info.dart index 9782b4a0..026727b8 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_config_with_info.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_config_with_info.dart @@ -66,6 +66,7 @@ class ChannelConfigWithInfo with _$ChannelConfigWithInfo { required this.countMessages, required this.createdAt, required this.customEvents, + required this.deliveryEvents, this.grants, required this.markMessagesPending, required this.maxMessageLength, @@ -130,6 +131,9 @@ class ChannelConfigWithInfo with _$ChannelConfigWithInfo { @override final bool customEvents; + @override + final bool deliveryEvents; + @override final Map>? grants; diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_config_with_info.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_config_with_info.freezed.dart index 93eb7f51..d796034f 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_config_with_info.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_config_with_info.freezed.dart @@ -27,6 +27,7 @@ mixin _$ChannelConfigWithInfo { bool get countMessages; DateTime get createdAt; bool get customEvents; + bool get deliveryEvents; Map>? get grants; bool get markMessagesPending; int get maxMessageLength; @@ -85,6 +86,8 @@ mixin _$ChannelConfigWithInfo { other.createdAt == createdAt) && (identical(other.customEvents, customEvents) || other.customEvents == customEvents) && + (identical(other.deliveryEvents, deliveryEvents) || + other.deliveryEvents == deliveryEvents) && const DeepCollectionEquality().equals(other.grants, grants) && (identical(other.markMessagesPending, markMessagesPending) || other.markMessagesPending == markMessagesPending) && @@ -140,6 +143,7 @@ mixin _$ChannelConfigWithInfo { countMessages, createdAt, customEvents, + deliveryEvents, const DeepCollectionEquality().hash(grants), markMessagesPending, maxMessageLength, @@ -166,7 +170,7 @@ mixin _$ChannelConfigWithInfo { @override String toString() { - return 'ChannelConfigWithInfo(allowedFlagReasons: $allowedFlagReasons, automod: $automod, automodBehavior: $automodBehavior, automodThresholds: $automodThresholds, blocklist: $blocklist, blocklistBehavior: $blocklistBehavior, blocklists: $blocklists, commands: $commands, connectEvents: $connectEvents, countMessages: $countMessages, createdAt: $createdAt, customEvents: $customEvents, grants: $grants, markMessagesPending: $markMessagesPending, maxMessageLength: $maxMessageLength, mutes: $mutes, name: $name, partitionSize: $partitionSize, partitionTtl: $partitionTtl, polls: $polls, pushNotifications: $pushNotifications, quotes: $quotes, reactions: $reactions, readEvents: $readEvents, reminders: $reminders, replies: $replies, search: $search, sharedLocations: $sharedLocations, skipLastMsgUpdateForSystemMsgs: $skipLastMsgUpdateForSystemMsgs, typingEvents: $typingEvents, updatedAt: $updatedAt, uploads: $uploads, urlEnrichment: $urlEnrichment, userMessageReminders: $userMessageReminders)'; + return 'ChannelConfigWithInfo(allowedFlagReasons: $allowedFlagReasons, automod: $automod, automodBehavior: $automodBehavior, automodThresholds: $automodThresholds, blocklist: $blocklist, blocklistBehavior: $blocklistBehavior, blocklists: $blocklists, commands: $commands, connectEvents: $connectEvents, countMessages: $countMessages, createdAt: $createdAt, customEvents: $customEvents, deliveryEvents: $deliveryEvents, grants: $grants, markMessagesPending: $markMessagesPending, maxMessageLength: $maxMessageLength, mutes: $mutes, name: $name, partitionSize: $partitionSize, partitionTtl: $partitionTtl, polls: $polls, pushNotifications: $pushNotifications, quotes: $quotes, reactions: $reactions, readEvents: $readEvents, reminders: $reminders, replies: $replies, search: $search, sharedLocations: $sharedLocations, skipLastMsgUpdateForSystemMsgs: $skipLastMsgUpdateForSystemMsgs, typingEvents: $typingEvents, updatedAt: $updatedAt, uploads: $uploads, urlEnrichment: $urlEnrichment, userMessageReminders: $userMessageReminders)'; } } @@ -189,6 +193,7 @@ abstract mixin class $ChannelConfigWithInfoCopyWith<$Res> { bool countMessages, DateTime createdAt, bool customEvents, + bool deliveryEvents, Map>? grants, bool markMessagesPending, int maxMessageLength, @@ -238,6 +243,7 @@ class _$ChannelConfigWithInfoCopyWithImpl<$Res> Object? countMessages = null, Object? createdAt = null, Object? customEvents = null, + Object? deliveryEvents = null, Object? grants = freezed, Object? markMessagesPending = null, Object? maxMessageLength = null, @@ -310,6 +316,10 @@ class _$ChannelConfigWithInfoCopyWithImpl<$Res> ? _self.customEvents : customEvents // ignore: cast_nullable_to_non_nullable as bool, + deliveryEvents: null == deliveryEvents + ? _self.deliveryEvents + : deliveryEvents // ignore: cast_nullable_to_non_nullable + as bool, grants: freezed == grants ? _self.grants : grants // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_config_with_info.g.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_config_with_info.g.dart index d9b04d46..31700b84 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_config_with_info.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_config_with_info.g.dart @@ -39,6 +39,7 @@ ChannelConfigWithInfo _$ChannelConfigWithInfoFromJson( createdAt: const EpochDateTimeConverter() .fromJson((json['created_at'] as num).toInt()), customEvents: json['custom_events'] as bool, + deliveryEvents: json['delivery_events'] as bool, grants: (json['grants'] as Map?)?.map( (k, e) => MapEntry(k, (e as List).map((e) => e as String).toList()), @@ -85,6 +86,7 @@ Map _$ChannelConfigWithInfoToJson( 'count_messages': instance.countMessages, 'created_at': const EpochDateTimeConverter().toJson(instance.createdAt), 'custom_events': instance.customEvents, + 'delivery_events': instance.deliveryEvents, 'grants': instance.grants, 'mark_messages_pending': instance.markMessagesPending, 'max_message_length': instance.maxMessageLength, diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_member.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_member.dart index 364df861..ef91fa20 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_member.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_member.dart @@ -13,20 +13,6 @@ import '../models.dart'; part 'channel_member.g.dart'; part 'channel_member.freezed.dart'; -@JsonEnum(alwaysCreate: true) -enum ChannelMemberRole { - @JsonValue('admin') - admin, - @JsonValue('member') - member, - @JsonValue('moderator') - moderator, - @JsonValue('owner') - owner, - @JsonValue('_unknown') - unknown; -} - @freezed @immutable @JsonSerializable() @@ -35,18 +21,21 @@ class ChannelMember with _$ChannelMember { this.archivedAt, this.banExpires, required this.banned, + this.blocked, + this.channel, required this.channelRole, required this.createdAt, required this.custom, this.deletedAt, this.deletedMessages, + this.hidden, this.inviteAcceptedAt, this.inviteRejectedAt, this.invited, + required this.isGlobalBanned, this.isModerator, required this.notificationsMuted, this.pinnedAt, - this.role, required this.shadowBanned, this.status, required this.updatedAt, @@ -65,6 +54,12 @@ class ChannelMember with _$ChannelMember { @override final bool banned; + @override + final bool? blocked; + + @override + final DenormalizedChannelFields? channel; + @override final String channelRole; @@ -82,6 +77,9 @@ class ChannelMember with _$ChannelMember { @override final List? deletedMessages; + @override + final bool? hidden; + @override @EpochDateTimeConverter() final DateTime? inviteAcceptedAt; @@ -93,6 +91,9 @@ class ChannelMember with _$ChannelMember { @override final bool? invited; + @override + final bool isGlobalBanned; + @override final bool? isModerator; @@ -103,10 +104,6 @@ class ChannelMember with _$ChannelMember { @EpochDateTimeConverter() final DateTime? pinnedAt; - @override - @JsonKey(unknownEnumValue: ChannelMemberRole.unknown) - final ChannelMemberRole? role; - @override final bool shadowBanned; @@ -118,7 +115,7 @@ class ChannelMember with _$ChannelMember { final DateTime updatedAt; @override - final UserResponse? user; + final User? user; @override final String? userId; diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_member.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_member.freezed.dart index d18e27db..cdf2962e 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_member.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_member.freezed.dart @@ -18,22 +18,25 @@ mixin _$ChannelMember { DateTime? get archivedAt; DateTime? get banExpires; bool get banned; + bool? get blocked; + DenormalizedChannelFields? get channel; String get channelRole; DateTime get createdAt; Map get custom; DateTime? get deletedAt; List? get deletedMessages; + bool? get hidden; DateTime? get inviteAcceptedAt; DateTime? get inviteRejectedAt; bool? get invited; + bool get isGlobalBanned; bool? get isModerator; bool get notificationsMuted; DateTime? get pinnedAt; - ChannelMemberRole? get role; bool get shadowBanned; String? get status; DateTime get updatedAt; - UserResponse? get user; + User? get user; String? get userId; /// Create a copy of ChannelMember @@ -54,6 +57,8 @@ mixin _$ChannelMember { (identical(other.banExpires, banExpires) || other.banExpires == banExpires) && (identical(other.banned, banned) || other.banned == banned) && + (identical(other.blocked, blocked) || other.blocked == blocked) && + (identical(other.channel, channel) || other.channel == channel) && (identical(other.channelRole, channelRole) || other.channelRole == channelRole) && (identical(other.createdAt, createdAt) || @@ -63,18 +68,20 @@ mixin _$ChannelMember { other.deletedAt == deletedAt) && const DeepCollectionEquality() .equals(other.deletedMessages, deletedMessages) && + (identical(other.hidden, hidden) || other.hidden == hidden) && (identical(other.inviteAcceptedAt, inviteAcceptedAt) || other.inviteAcceptedAt == inviteAcceptedAt) && (identical(other.inviteRejectedAt, inviteRejectedAt) || other.inviteRejectedAt == inviteRejectedAt) && (identical(other.invited, invited) || other.invited == invited) && + (identical(other.isGlobalBanned, isGlobalBanned) || + other.isGlobalBanned == isGlobalBanned) && (identical(other.isModerator, isModerator) || other.isModerator == isModerator) && (identical(other.notificationsMuted, notificationsMuted) || other.notificationsMuted == notificationsMuted) && (identical(other.pinnedAt, pinnedAt) || other.pinnedAt == pinnedAt) && - (identical(other.role, role) || other.role == role) && (identical(other.shadowBanned, shadowBanned) || other.shadowBanned == shadowBanned) && (identical(other.status, status) || other.status == status) && @@ -90,18 +97,21 @@ mixin _$ChannelMember { archivedAt, banExpires, banned, + blocked, + channel, channelRole, createdAt, const DeepCollectionEquality().hash(custom), deletedAt, const DeepCollectionEquality().hash(deletedMessages), + hidden, inviteAcceptedAt, inviteRejectedAt, invited, + isGlobalBanned, isModerator, notificationsMuted, pinnedAt, - role, shadowBanned, status, updatedAt, @@ -111,7 +121,7 @@ mixin _$ChannelMember { @override String toString() { - return 'ChannelMember(archivedAt: $archivedAt, banExpires: $banExpires, banned: $banned, channelRole: $channelRole, createdAt: $createdAt, custom: $custom, deletedAt: $deletedAt, deletedMessages: $deletedMessages, inviteAcceptedAt: $inviteAcceptedAt, inviteRejectedAt: $inviteRejectedAt, invited: $invited, isModerator: $isModerator, notificationsMuted: $notificationsMuted, pinnedAt: $pinnedAt, role: $role, shadowBanned: $shadowBanned, status: $status, updatedAt: $updatedAt, user: $user, userId: $userId)'; + return 'ChannelMember(archivedAt: $archivedAt, banExpires: $banExpires, banned: $banned, blocked: $blocked, channel: $channel, channelRole: $channelRole, createdAt: $createdAt, custom: $custom, deletedAt: $deletedAt, deletedMessages: $deletedMessages, hidden: $hidden, inviteAcceptedAt: $inviteAcceptedAt, inviteRejectedAt: $inviteRejectedAt, invited: $invited, isGlobalBanned: $isGlobalBanned, isModerator: $isModerator, notificationsMuted: $notificationsMuted, pinnedAt: $pinnedAt, shadowBanned: $shadowBanned, status: $status, updatedAt: $updatedAt, user: $user, userId: $userId)'; } } @@ -125,22 +135,25 @@ abstract mixin class $ChannelMemberCopyWith<$Res> { {DateTime? archivedAt, DateTime? banExpires, bool banned, + bool? blocked, + DenormalizedChannelFields? channel, String channelRole, DateTime createdAt, Map custom, DateTime? deletedAt, List? deletedMessages, + bool? hidden, DateTime? inviteAcceptedAt, DateTime? inviteRejectedAt, bool? invited, + bool isGlobalBanned, bool? isModerator, bool notificationsMuted, DateTime? pinnedAt, - ChannelMemberRole? role, bool shadowBanned, String? status, DateTime updatedAt, - UserResponse? user, + User? user, String? userId}); } @@ -160,18 +173,21 @@ class _$ChannelMemberCopyWithImpl<$Res> Object? archivedAt = freezed, Object? banExpires = freezed, Object? banned = null, + Object? blocked = freezed, + Object? channel = freezed, Object? channelRole = null, Object? createdAt = null, Object? custom = null, Object? deletedAt = freezed, Object? deletedMessages = freezed, + Object? hidden = freezed, Object? inviteAcceptedAt = freezed, Object? inviteRejectedAt = freezed, Object? invited = freezed, + Object? isGlobalBanned = null, Object? isModerator = freezed, Object? notificationsMuted = null, Object? pinnedAt = freezed, - Object? role = freezed, Object? shadowBanned = null, Object? status = freezed, Object? updatedAt = null, @@ -191,6 +207,14 @@ class _$ChannelMemberCopyWithImpl<$Res> ? _self.banned : banned // ignore: cast_nullable_to_non_nullable as bool, + blocked: freezed == blocked + ? _self.blocked + : blocked // ignore: cast_nullable_to_non_nullable + as bool?, + channel: freezed == channel + ? _self.channel + : channel // ignore: cast_nullable_to_non_nullable + as DenormalizedChannelFields?, channelRole: null == channelRole ? _self.channelRole : channelRole // ignore: cast_nullable_to_non_nullable @@ -211,6 +235,10 @@ class _$ChannelMemberCopyWithImpl<$Res> ? _self.deletedMessages : deletedMessages // ignore: cast_nullable_to_non_nullable as List?, + hidden: freezed == hidden + ? _self.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool?, inviteAcceptedAt: freezed == inviteAcceptedAt ? _self.inviteAcceptedAt : inviteAcceptedAt // ignore: cast_nullable_to_non_nullable @@ -223,6 +251,10 @@ class _$ChannelMemberCopyWithImpl<$Res> ? _self.invited : invited // ignore: cast_nullable_to_non_nullable as bool?, + isGlobalBanned: null == isGlobalBanned + ? _self.isGlobalBanned + : isGlobalBanned // ignore: cast_nullable_to_non_nullable + as bool, isModerator: freezed == isModerator ? _self.isModerator : isModerator // ignore: cast_nullable_to_non_nullable @@ -235,10 +267,6 @@ class _$ChannelMemberCopyWithImpl<$Res> ? _self.pinnedAt : pinnedAt // ignore: cast_nullable_to_non_nullable as DateTime?, - role: freezed == role - ? _self.role - : role // ignore: cast_nullable_to_non_nullable - as ChannelMemberRole?, shadowBanned: null == shadowBanned ? _self.shadowBanned : shadowBanned // ignore: cast_nullable_to_non_nullable @@ -254,7 +282,7 @@ class _$ChannelMemberCopyWithImpl<$Res> user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable - as UserResponse?, + as User?, userId: freezed == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_member.g.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_member.g.dart index 796889fd..d3d5dd7e 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_member.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_member.g.dart @@ -13,6 +13,11 @@ ChannelMember _$ChannelMemberFromJson(Map json) => banExpires: _$JsonConverterFromJson( json['ban_expires'], const EpochDateTimeConverter().fromJson), banned: json['banned'] as bool, + blocked: json['blocked'] as bool?, + channel: json['channel'] == null + ? null + : DenormalizedChannelFields.fromJson( + json['channel'] as Map), channelRole: json['channel_role'] as String, createdAt: const EpochDateTimeConverter() .fromJson((json['created_at'] as num).toInt()), @@ -22,24 +27,24 @@ ChannelMember _$ChannelMemberFromJson(Map json) => deletedMessages: (json['deleted_messages'] as List?) ?.map((e) => e as String) .toList(), + hidden: json['hidden'] as bool?, inviteAcceptedAt: _$JsonConverterFromJson( json['invite_accepted_at'], const EpochDateTimeConverter().fromJson), inviteRejectedAt: _$JsonConverterFromJson( json['invite_rejected_at'], const EpochDateTimeConverter().fromJson), invited: json['invited'] as bool?, + isGlobalBanned: json['is_global_banned'] as bool, isModerator: json['is_moderator'] as bool?, notificationsMuted: json['notifications_muted'] as bool, pinnedAt: _$JsonConverterFromJson( json['pinned_at'], const EpochDateTimeConverter().fromJson), - role: $enumDecodeNullable(_$ChannelMemberRoleEnumMap, json['role'], - unknownValue: ChannelMemberRole.unknown), shadowBanned: json['shadow_banned'] as bool, status: json['status'] as String?, updatedAt: const EpochDateTimeConverter() .fromJson((json['updated_at'] as num).toInt()), user: json['user'] == null ? null - : UserResponse.fromJson(json['user'] as Map), + : User.fromJson(json['user'] as Map), userId: json['user_id'] as String?, ); @@ -50,22 +55,25 @@ Map _$ChannelMemberToJson(ChannelMember instance) => 'ban_expires': _$JsonConverterToJson( instance.banExpires, const EpochDateTimeConverter().toJson), 'banned': instance.banned, + 'blocked': instance.blocked, + 'channel': instance.channel?.toJson(), 'channel_role': instance.channelRole, 'created_at': const EpochDateTimeConverter().toJson(instance.createdAt), 'custom': instance.custom, 'deleted_at': _$JsonConverterToJson( instance.deletedAt, const EpochDateTimeConverter().toJson), 'deleted_messages': instance.deletedMessages, + 'hidden': instance.hidden, 'invite_accepted_at': _$JsonConverterToJson( instance.inviteAcceptedAt, const EpochDateTimeConverter().toJson), 'invite_rejected_at': _$JsonConverterToJson( instance.inviteRejectedAt, const EpochDateTimeConverter().toJson), 'invited': instance.invited, + 'is_global_banned': instance.isGlobalBanned, 'is_moderator': instance.isModerator, 'notifications_muted': instance.notificationsMuted, 'pinned_at': _$JsonConverterToJson( instance.pinnedAt, const EpochDateTimeConverter().toJson), - 'role': _$ChannelMemberRoleEnumMap[instance.role], 'shadow_banned': instance.shadowBanned, 'status': instance.status, 'updated_at': const EpochDateTimeConverter().toJson(instance.updatedAt), @@ -79,14 +87,6 @@ Value? _$JsonConverterFromJson( ) => json == null ? null : fromJson(json as Json); -const _$ChannelMemberRoleEnumMap = { - ChannelMemberRole.admin: 'admin', - ChannelMemberRole.member: 'member', - ChannelMemberRole.moderator: 'moderator', - ChannelMemberRole.owner: 'owner', - ChannelMemberRole.unknown: '_unknown', -}; - Json? _$JsonConverterToJson( Value? value, Json? Function(Value value) toJson, diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_member_response.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_member_response.dart index 3a7222cb..ede071be 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_member_response.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_member_response.dart @@ -13,17 +13,116 @@ import '../models.dart'; part 'channel_member_response.g.dart'; part 'channel_member_response.freezed.dart'; +@JsonEnum(alwaysCreate: true) +enum ChannelMemberResponseRole { + @JsonValue('admin') + admin, + @JsonValue('member') + member, + @JsonValue('moderator') + moderator, + @JsonValue('owner') + owner, + @JsonValue('_unknown') + unknown; +} + @freezed @immutable @JsonSerializable() class ChannelMemberResponse with _$ChannelMemberResponse { const ChannelMemberResponse({ + this.archivedAt, + this.banExpires, + required this.banned, required this.channelRole, + required this.createdAt, + required this.custom, + this.deletedAt, + this.deletedMessages, + this.inviteAcceptedAt, + this.inviteRejectedAt, + this.invited, + this.isModerator, + required this.notificationsMuted, + this.pinnedAt, + this.role, + required this.shadowBanned, + this.status, + required this.updatedAt, + this.user, + this.userId, }); + @override + @EpochDateTimeConverter() + final DateTime? archivedAt; + + @override + @EpochDateTimeConverter() + final DateTime? banExpires; + + @override + final bool banned; + @override final String channelRole; + @override + @EpochDateTimeConverter() + final DateTime createdAt; + + @override + final Map custom; + + @override + @EpochDateTimeConverter() + final DateTime? deletedAt; + + @override + final List? deletedMessages; + + @override + @EpochDateTimeConverter() + final DateTime? inviteAcceptedAt; + + @override + @EpochDateTimeConverter() + final DateTime? inviteRejectedAt; + + @override + final bool? invited; + + @override + final bool? isModerator; + + @override + final bool notificationsMuted; + + @override + @EpochDateTimeConverter() + final DateTime? pinnedAt; + + @override + @JsonKey(unknownEnumValue: ChannelMemberResponseRole.unknown) + final ChannelMemberResponseRole? role; + + @override + final bool shadowBanned; + + @override + final String? status; + + @override + @EpochDateTimeConverter() + final DateTime updatedAt; + + @override + final UserResponse? user; + + @override + final String? userId; + Map toJson() => _$ChannelMemberResponseToJson(this); static ChannelMemberResponse fromJson(Map json) => diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_member_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_member_response.freezed.dart index 87b34416..51cf5e8a 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_member_response.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_member_response.freezed.dart @@ -15,7 +15,26 @@ T _$identity(T value) => value; /// @nodoc mixin _$ChannelMemberResponse { + DateTime? get archivedAt; + DateTime? get banExpires; + bool get banned; String get channelRole; + DateTime get createdAt; + Map get custom; + DateTime? get deletedAt; + List? get deletedMessages; + DateTime? get inviteAcceptedAt; + DateTime? get inviteRejectedAt; + bool? get invited; + bool? get isModerator; + bool get notificationsMuted; + DateTime? get pinnedAt; + ChannelMemberResponseRole? get role; + bool get shadowBanned; + String? get status; + DateTime get updatedAt; + UserResponse? get user; + String? get userId; /// Create a copy of ChannelMemberResponse /// with the given fields replaced by the non-null parameter values. @@ -30,16 +49,69 @@ mixin _$ChannelMemberResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is ChannelMemberResponse && + (identical(other.archivedAt, archivedAt) || + other.archivedAt == archivedAt) && + (identical(other.banExpires, banExpires) || + other.banExpires == banExpires) && + (identical(other.banned, banned) || other.banned == banned) && (identical(other.channelRole, channelRole) || - other.channelRole == channelRole)); + other.channelRole == channelRole) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + const DeepCollectionEquality() + .equals(other.deletedMessages, deletedMessages) && + (identical(other.inviteAcceptedAt, inviteAcceptedAt) || + other.inviteAcceptedAt == inviteAcceptedAt) && + (identical(other.inviteRejectedAt, inviteRejectedAt) || + other.inviteRejectedAt == inviteRejectedAt) && + (identical(other.invited, invited) || other.invited == invited) && + (identical(other.isModerator, isModerator) || + other.isModerator == isModerator) && + (identical(other.notificationsMuted, notificationsMuted) || + other.notificationsMuted == notificationsMuted) && + (identical(other.pinnedAt, pinnedAt) || + other.pinnedAt == pinnedAt) && + (identical(other.role, role) || other.role == role) && + (identical(other.shadowBanned, shadowBanned) || + other.shadowBanned == shadowBanned) && + (identical(other.status, status) || other.status == status) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.user, user) || other.user == user) && + (identical(other.userId, userId) || other.userId == userId)); } @override - int get hashCode => Object.hash(runtimeType, channelRole); + int get hashCode => Object.hashAll([ + runtimeType, + archivedAt, + banExpires, + banned, + channelRole, + createdAt, + const DeepCollectionEquality().hash(custom), + deletedAt, + const DeepCollectionEquality().hash(deletedMessages), + inviteAcceptedAt, + inviteRejectedAt, + invited, + isModerator, + notificationsMuted, + pinnedAt, + role, + shadowBanned, + status, + updatedAt, + user, + userId + ]); @override String toString() { - return 'ChannelMemberResponse(channelRole: $channelRole)'; + return 'ChannelMemberResponse(archivedAt: $archivedAt, banExpires: $banExpires, banned: $banned, channelRole: $channelRole, createdAt: $createdAt, custom: $custom, deletedAt: $deletedAt, deletedMessages: $deletedMessages, inviteAcceptedAt: $inviteAcceptedAt, inviteRejectedAt: $inviteRejectedAt, invited: $invited, isModerator: $isModerator, notificationsMuted: $notificationsMuted, pinnedAt: $pinnedAt, role: $role, shadowBanned: $shadowBanned, status: $status, updatedAt: $updatedAt, user: $user, userId: $userId)'; } } @@ -49,7 +121,27 @@ abstract mixin class $ChannelMemberResponseCopyWith<$Res> { $Res Function(ChannelMemberResponse) _then) = _$ChannelMemberResponseCopyWithImpl; @useResult - $Res call({String channelRole}); + $Res call( + {DateTime? archivedAt, + DateTime? banExpires, + bool banned, + String channelRole, + DateTime createdAt, + Map custom, + DateTime? deletedAt, + List? deletedMessages, + DateTime? inviteAcceptedAt, + DateTime? inviteRejectedAt, + bool? invited, + bool? isModerator, + bool notificationsMuted, + DateTime? pinnedAt, + ChannelMemberResponseRole? role, + bool shadowBanned, + String? status, + DateTime updatedAt, + UserResponse? user, + String? userId}); } /// @nodoc @@ -65,13 +157,108 @@ class _$ChannelMemberResponseCopyWithImpl<$Res> @pragma('vm:prefer-inline') @override $Res call({ + Object? archivedAt = freezed, + Object? banExpires = freezed, + Object? banned = null, Object? channelRole = null, + Object? createdAt = null, + Object? custom = null, + Object? deletedAt = freezed, + Object? deletedMessages = freezed, + Object? inviteAcceptedAt = freezed, + Object? inviteRejectedAt = freezed, + Object? invited = freezed, + Object? isModerator = freezed, + Object? notificationsMuted = null, + Object? pinnedAt = freezed, + Object? role = freezed, + Object? shadowBanned = null, + Object? status = freezed, + Object? updatedAt = null, + Object? user = freezed, + Object? userId = freezed, }) { return _then(ChannelMemberResponse( + archivedAt: freezed == archivedAt + ? _self.archivedAt + : archivedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + banExpires: freezed == banExpires + ? _self.banExpires + : banExpires // ignore: cast_nullable_to_non_nullable + as DateTime?, + banned: null == banned + ? _self.banned + : banned // ignore: cast_nullable_to_non_nullable + as bool, channelRole: null == channelRole ? _self.channelRole : channelRole // ignore: cast_nullable_to_non_nullable as String, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + custom: null == custom + ? _self.custom + : custom // ignore: cast_nullable_to_non_nullable + as Map, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + deletedMessages: freezed == deletedMessages + ? _self.deletedMessages + : deletedMessages // ignore: cast_nullable_to_non_nullable + as List?, + inviteAcceptedAt: freezed == inviteAcceptedAt + ? _self.inviteAcceptedAt + : inviteAcceptedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + inviteRejectedAt: freezed == inviteRejectedAt + ? _self.inviteRejectedAt + : inviteRejectedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + invited: freezed == invited + ? _self.invited + : invited // ignore: cast_nullable_to_non_nullable + as bool?, + isModerator: freezed == isModerator + ? _self.isModerator + : isModerator // ignore: cast_nullable_to_non_nullable + as bool?, + notificationsMuted: null == notificationsMuted + ? _self.notificationsMuted + : notificationsMuted // ignore: cast_nullable_to_non_nullable + as bool, + pinnedAt: freezed == pinnedAt + ? _self.pinnedAt + : pinnedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + role: freezed == role + ? _self.role + : role // ignore: cast_nullable_to_non_nullable + as ChannelMemberResponseRole?, + shadowBanned: null == shadowBanned + ? _self.shadowBanned + : shadowBanned // ignore: cast_nullable_to_non_nullable + as bool, + status: freezed == status + ? _self.status + : status // ignore: cast_nullable_to_non_nullable + as String?, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + user: freezed == user + ? _self.user + : user // ignore: cast_nullable_to_non_nullable + as UserResponse?, + userId: freezed == userId + ? _self.userId + : userId // ignore: cast_nullable_to_non_nullable + as String?, )); } } diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_member_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_member_response.g.dart index f0f92bf9..79a260fe 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_member_response.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_member_response.g.dart @@ -9,11 +9,89 @@ part of 'channel_member_response.dart'; ChannelMemberResponse _$ChannelMemberResponseFromJson( Map json) => ChannelMemberResponse( + archivedAt: _$JsonConverterFromJson( + json['archived_at'], const EpochDateTimeConverter().fromJson), + banExpires: _$JsonConverterFromJson( + json['ban_expires'], const EpochDateTimeConverter().fromJson), + banned: json['banned'] as bool, channelRole: json['channel_role'] as String, + createdAt: const EpochDateTimeConverter() + .fromJson((json['created_at'] as num).toInt()), + custom: json['custom'] as Map, + deletedAt: _$JsonConverterFromJson( + json['deleted_at'], const EpochDateTimeConverter().fromJson), + deletedMessages: (json['deleted_messages'] as List?) + ?.map((e) => e as String) + .toList(), + inviteAcceptedAt: _$JsonConverterFromJson( + json['invite_accepted_at'], const EpochDateTimeConverter().fromJson), + inviteRejectedAt: _$JsonConverterFromJson( + json['invite_rejected_at'], const EpochDateTimeConverter().fromJson), + invited: json['invited'] as bool?, + isModerator: json['is_moderator'] as bool?, + notificationsMuted: json['notifications_muted'] as bool, + pinnedAt: _$JsonConverterFromJson( + json['pinned_at'], const EpochDateTimeConverter().fromJson), + role: $enumDecodeNullable( + _$ChannelMemberResponseRoleEnumMap, json['role'], + unknownValue: ChannelMemberResponseRole.unknown), + shadowBanned: json['shadow_banned'] as bool, + status: json['status'] as String?, + updatedAt: const EpochDateTimeConverter() + .fromJson((json['updated_at'] as num).toInt()), + user: json['user'] == null + ? null + : UserResponse.fromJson(json['user'] as Map), + userId: json['user_id'] as String?, ); Map _$ChannelMemberResponseToJson( ChannelMemberResponse instance) => { + 'archived_at': _$JsonConverterToJson( + instance.archivedAt, const EpochDateTimeConverter().toJson), + 'ban_expires': _$JsonConverterToJson( + instance.banExpires, const EpochDateTimeConverter().toJson), + 'banned': instance.banned, 'channel_role': instance.channelRole, + 'created_at': const EpochDateTimeConverter().toJson(instance.createdAt), + 'custom': instance.custom, + 'deleted_at': _$JsonConverterToJson( + instance.deletedAt, const EpochDateTimeConverter().toJson), + 'deleted_messages': instance.deletedMessages, + 'invite_accepted_at': _$JsonConverterToJson( + instance.inviteAcceptedAt, const EpochDateTimeConverter().toJson), + 'invite_rejected_at': _$JsonConverterToJson( + instance.inviteRejectedAt, const EpochDateTimeConverter().toJson), + 'invited': instance.invited, + 'is_moderator': instance.isModerator, + 'notifications_muted': instance.notificationsMuted, + 'pinned_at': _$JsonConverterToJson( + instance.pinnedAt, const EpochDateTimeConverter().toJson), + 'role': _$ChannelMemberResponseRoleEnumMap[instance.role], + 'shadow_banned': instance.shadowBanned, + 'status': instance.status, + 'updated_at': const EpochDateTimeConverter().toJson(instance.updatedAt), + 'user': instance.user?.toJson(), + 'user_id': instance.userId, }; + +Value? _$JsonConverterFromJson( + Object? json, + Value? Function(Json json) fromJson, +) => + json == null ? null : fromJson(json as Json); + +const _$ChannelMemberResponseRoleEnumMap = { + ChannelMemberResponseRole.admin: 'admin', + ChannelMemberResponseRole.member: 'member', + ChannelMemberResponseRole.moderator: 'moderator', + ChannelMemberResponseRole.owner: 'owner', + ChannelMemberResponseRole.unknown: '_unknown', +}; + +Json? _$JsonConverterToJson( + Value? value, + Json? Function(Value value) toJson, +) => + value == null ? null : toJson(value); diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_own_capability.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_own_capability.dart index 92d00bf1..83f4f7f7 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_own_capability.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_own_capability.dart @@ -24,6 +24,8 @@ enum ChannelOwnCapability { deleteChannel, @JsonValue('delete-own-message') deleteOwnMessage, + @JsonValue('delivery-events') + deliveryEvents, @JsonValue('flag-message') flagMessage, @JsonValue('freeze-channel') diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_own_capability.g.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_own_capability.g.dart index 31ac04eb..71b93a09 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_own_capability.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_own_capability.g.dart @@ -14,6 +14,7 @@ const _$ChannelOwnCapabilityEnumMap = { ChannelOwnCapability.deleteAnyMessage: 'delete-any-message', ChannelOwnCapability.deleteChannel: 'delete-channel', ChannelOwnCapability.deleteOwnMessage: 'delete-own-message', + ChannelOwnCapability.deliveryEvents: 'delivery-events', ChannelOwnCapability.flagMessage: 'flag-message', ChannelOwnCapability.freezeChannel: 'freeze-channel', ChannelOwnCapability.joinChannel: 'join-channel', diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_response.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_response.dart index f747fbe8..f65bbbe1 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_response.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_response.dart @@ -29,6 +29,7 @@ class ChannelResponse with _$ChannelResponse { required this.custom, this.deletedAt, required this.disabled, + this.filterTags, required this.frozen, this.hidden, this.hideMessagesBefore, @@ -82,6 +83,9 @@ class ChannelResponse with _$ChannelResponse { @override final bool disabled; + @override + final List? filterTags; + @override final bool frozen; @@ -103,7 +107,7 @@ class ChannelResponse with _$ChannelResponse { final int? memberCount; @override - final List? members; + final List? members; @override final int? messageCount; diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_response.freezed.dart index b8be97f9..cccb9a39 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_response.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_response.freezed.dart @@ -26,13 +26,14 @@ mixin _$ChannelResponse { Map get custom; DateTime? get deletedAt; bool get disabled; + List? get filterTags; bool get frozen; bool? get hidden; DateTime? get hideMessagesBefore; String get id; DateTime? get lastMessageAt; int? get memberCount; - List? get members; + List? get members; int? get messageCount; DateTime? get muteExpiresAt; bool? get muted; @@ -75,6 +76,8 @@ mixin _$ChannelResponse { other.deletedAt == deletedAt) && (identical(other.disabled, disabled) || other.disabled == disabled) && + const DeepCollectionEquality() + .equals(other.filterTags, filterTags) && (identical(other.frozen, frozen) || other.frozen == frozen) && (identical(other.hidden, hidden) || other.hidden == hidden) && (identical(other.hideMessagesBefore, hideMessagesBefore) || @@ -116,6 +119,7 @@ mixin _$ChannelResponse { const DeepCollectionEquality().hash(custom), deletedAt, disabled, + const DeepCollectionEquality().hash(filterTags), frozen, hidden, hideMessagesBefore, @@ -136,7 +140,7 @@ mixin _$ChannelResponse { @override String toString() { - return 'ChannelResponse(autoTranslationEnabled: $autoTranslationEnabled, autoTranslationLanguage: $autoTranslationLanguage, blocked: $blocked, cid: $cid, config: $config, cooldown: $cooldown, createdAt: $createdAt, createdBy: $createdBy, custom: $custom, deletedAt: $deletedAt, disabled: $disabled, frozen: $frozen, hidden: $hidden, hideMessagesBefore: $hideMessagesBefore, id: $id, lastMessageAt: $lastMessageAt, memberCount: $memberCount, members: $members, messageCount: $messageCount, muteExpiresAt: $muteExpiresAt, muted: $muted, ownCapabilities: $ownCapabilities, team: $team, truncatedAt: $truncatedAt, truncatedBy: $truncatedBy, type: $type, updatedAt: $updatedAt)'; + return 'ChannelResponse(autoTranslationEnabled: $autoTranslationEnabled, autoTranslationLanguage: $autoTranslationLanguage, blocked: $blocked, cid: $cid, config: $config, cooldown: $cooldown, createdAt: $createdAt, createdBy: $createdBy, custom: $custom, deletedAt: $deletedAt, disabled: $disabled, filterTags: $filterTags, frozen: $frozen, hidden: $hidden, hideMessagesBefore: $hideMessagesBefore, id: $id, lastMessageAt: $lastMessageAt, memberCount: $memberCount, members: $members, messageCount: $messageCount, muteExpiresAt: $muteExpiresAt, muted: $muted, ownCapabilities: $ownCapabilities, team: $team, truncatedAt: $truncatedAt, truncatedBy: $truncatedBy, type: $type, updatedAt: $updatedAt)'; } } @@ -158,13 +162,14 @@ abstract mixin class $ChannelResponseCopyWith<$Res> { Map custom, DateTime? deletedAt, bool disabled, + List? filterTags, bool frozen, bool? hidden, DateTime? hideMessagesBefore, String id, DateTime? lastMessageAt, int? memberCount, - List? members, + List? members, int? messageCount, DateTime? muteExpiresAt, bool? muted, @@ -200,6 +205,7 @@ class _$ChannelResponseCopyWithImpl<$Res> Object? custom = null, Object? deletedAt = freezed, Object? disabled = null, + Object? filterTags = freezed, Object? frozen = null, Object? hidden = freezed, Object? hideMessagesBefore = freezed, @@ -262,6 +268,10 @@ class _$ChannelResponseCopyWithImpl<$Res> ? _self.disabled : disabled // ignore: cast_nullable_to_non_nullable as bool, + filterTags: freezed == filterTags + ? _self.filterTags + : filterTags // ignore: cast_nullable_to_non_nullable + as List?, frozen: null == frozen ? _self.frozen : frozen // ignore: cast_nullable_to_non_nullable @@ -289,7 +299,7 @@ class _$ChannelResponseCopyWithImpl<$Res> members: freezed == members ? _self.members : members // ignore: cast_nullable_to_non_nullable - as List?, + as List?, messageCount: freezed == messageCount ? _self.messageCount : messageCount // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/channel_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/channel_response.g.dart index 05178f27..aa1c156f 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/channel_response.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/channel_response.g.dart @@ -26,6 +26,9 @@ ChannelResponse _$ChannelResponseFromJson(Map json) => deletedAt: _$JsonConverterFromJson( json['deleted_at'], const EpochDateTimeConverter().fromJson), disabled: json['disabled'] as bool, + filterTags: (json['filter_tags'] as List?) + ?.map((e) => e as String) + .toList(), frozen: json['frozen'] as bool, hidden: json['hidden'] as bool?, hideMessagesBefore: _$JsonConverterFromJson( @@ -36,7 +39,8 @@ ChannelResponse _$ChannelResponseFromJson(Map json) => json['last_message_at'], const EpochDateTimeConverter().fromJson), memberCount: (json['member_count'] as num?)?.toInt(), members: (json['members'] as List?) - ?.map((e) => ChannelMember.fromJson(e as Map)) + ?.map( + (e) => ChannelMemberResponse.fromJson(e as Map)) .toList(), messageCount: (json['message_count'] as num?)?.toInt(), muteExpiresAt: _$JsonConverterFromJson( @@ -71,6 +75,7 @@ Map _$ChannelResponseToJson(ChannelResponse instance) => 'deleted_at': _$JsonConverterToJson( instance.deletedAt, const EpochDateTimeConverter().toJson), 'disabled': instance.disabled, + 'filter_tags': instance.filterTags, 'frozen': instance.frozen, 'hidden': instance.hidden, 'hide_messages_before': _$JsonConverterToJson( @@ -109,6 +114,7 @@ const _$ChannelOwnCapabilityEnumMap = { ChannelOwnCapability.deleteAnyMessage: 'delete-any-message', ChannelOwnCapability.deleteChannel: 'delete-channel', ChannelOwnCapability.deleteOwnMessage: 'delete-own-message', + ChannelOwnCapability.deliveryEvents: 'delivery-events', ChannelOwnCapability.flagMessage: 'flag-message', ChannelOwnCapability.freezeChannel: 'freeze-channel', ChannelOwnCapability.joinChannel: 'join-channel', diff --git a/packages/stream_feeds/lib/src/generated/api/model/collection_request.dart b/packages/stream_feeds/lib/src/generated/api/model/collection_request.dart new file mode 100644 index 00000000..2d577291 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/collection_request.dart @@ -0,0 +1,39 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'collection_request.g.dart'; +part 'collection_request.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class CollectionRequest with _$CollectionRequest { + const CollectionRequest({ + required this.custom, + this.id, + required this.name, + }); + + @override + final Map custom; + + @override + final String? id; + + @override + final String name; + + Map toJson() => _$CollectionRequestToJson(this); + + static CollectionRequest fromJson(Map json) => + _$CollectionRequestFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/collection_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/collection_request.freezed.dart new file mode 100644 index 00000000..9081361c --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/collection_request.freezed.dart @@ -0,0 +1,93 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'collection_request.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$CollectionRequest { + Map get custom; + String? get id; + String get name; + + /// Create a copy of CollectionRequest + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $CollectionRequestCopyWith get copyWith => + _$CollectionRequestCopyWithImpl( + this as CollectionRequest, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is CollectionRequest && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.id, id) || other.id == id) && + (identical(other.name, name) || other.name == name)); + } + + @override + int get hashCode => Object.hash( + runtimeType, const DeepCollectionEquality().hash(custom), id, name); + + @override + String toString() { + return 'CollectionRequest(custom: $custom, id: $id, name: $name)'; + } +} + +/// @nodoc +abstract mixin class $CollectionRequestCopyWith<$Res> { + factory $CollectionRequestCopyWith( + CollectionRequest value, $Res Function(CollectionRequest) _then) = + _$CollectionRequestCopyWithImpl; + @useResult + $Res call({Map custom, String? id, String name}); +} + +/// @nodoc +class _$CollectionRequestCopyWithImpl<$Res> + implements $CollectionRequestCopyWith<$Res> { + _$CollectionRequestCopyWithImpl(this._self, this._then); + + final CollectionRequest _self; + final $Res Function(CollectionRequest) _then; + + /// Create a copy of CollectionRequest + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? custom = null, + Object? id = freezed, + Object? name = null, + }) { + return _then(CollectionRequest( + custom: null == custom + ? _self.custom + : custom // ignore: cast_nullable_to_non_nullable + as Map, + id: freezed == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String?, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/collection_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/collection_request.g.dart new file mode 100644 index 00000000..aa9d75b6 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/collection_request.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'collection_request.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CollectionRequest _$CollectionRequestFromJson(Map json) => + CollectionRequest( + custom: json['custom'] as Map, + id: json['id'] as String?, + name: json['name'] as String, + ); + +Map _$CollectionRequestToJson(CollectionRequest instance) => + { + 'custom': instance.custom, + 'id': instance.id, + 'name': instance.name, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/collection_response.dart b/packages/stream_feeds/lib/src/generated/api/model/collection_response.dart new file mode 100644 index 00000000..887876c6 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/collection_response.dart @@ -0,0 +1,53 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'collection_response.g.dart'; +part 'collection_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class CollectionResponse with _$CollectionResponse { + const CollectionResponse({ + this.createdAt, + this.custom, + required this.id, + required this.name, + this.updatedAt, + this.userId, + }); + + @override + @EpochDateTimeConverter() + final DateTime? createdAt; + + @override + final Map? custom; + + @override + final String id; + + @override + final String name; + + @override + @EpochDateTimeConverter() + final DateTime? updatedAt; + + @override + final String? userId; + + Map toJson() => _$CollectionResponseToJson(this); + + static CollectionResponse fromJson(Map json) => + _$CollectionResponseFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/collection_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/collection_response.freezed.dart new file mode 100644 index 00000000..6d6da36b --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/collection_response.freezed.dart @@ -0,0 +1,122 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'collection_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$CollectionResponse { + DateTime? get createdAt; + Map? get custom; + String get id; + String get name; + DateTime? get updatedAt; + String? get userId; + + /// Create a copy of CollectionResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $CollectionResponseCopyWith get copyWith => + _$CollectionResponseCopyWithImpl( + this as CollectionResponse, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is CollectionResponse && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.id, id) || other.id == id) && + (identical(other.name, name) || other.name == name) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.userId, userId) || other.userId == userId)); + } + + @override + int get hashCode => Object.hash(runtimeType, createdAt, + const DeepCollectionEquality().hash(custom), id, name, updatedAt, userId); + + @override + String toString() { + return 'CollectionResponse(createdAt: $createdAt, custom: $custom, id: $id, name: $name, updatedAt: $updatedAt, userId: $userId)'; + } +} + +/// @nodoc +abstract mixin class $CollectionResponseCopyWith<$Res> { + factory $CollectionResponseCopyWith( + CollectionResponse value, $Res Function(CollectionResponse) _then) = + _$CollectionResponseCopyWithImpl; + @useResult + $Res call( + {DateTime? createdAt, + Map? custom, + String id, + String name, + DateTime? updatedAt, + String? userId}); +} + +/// @nodoc +class _$CollectionResponseCopyWithImpl<$Res> + implements $CollectionResponseCopyWith<$Res> { + _$CollectionResponseCopyWithImpl(this._self, this._then); + + final CollectionResponse _self; + final $Res Function(CollectionResponse) _then; + + /// Create a copy of CollectionResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? createdAt = freezed, + Object? custom = freezed, + Object? id = null, + Object? name = null, + Object? updatedAt = freezed, + Object? userId = freezed, + }) { + return _then(CollectionResponse( + createdAt: freezed == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + custom: freezed == custom + ? _self.custom + : custom // ignore: cast_nullable_to_non_nullable + as Map?, + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + updatedAt: freezed == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + userId: freezed == userId + ? _self.userId + : userId // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/collection_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/collection_response.g.dart new file mode 100644 index 00000000..85df3dba --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/collection_response.g.dart @@ -0,0 +1,43 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'collection_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CollectionResponse _$CollectionResponseFromJson(Map json) => + CollectionResponse( + createdAt: _$JsonConverterFromJson( + json['created_at'], const EpochDateTimeConverter().fromJson), + custom: json['custom'] as Map?, + id: json['id'] as String, + name: json['name'] as String, + updatedAt: _$JsonConverterFromJson( + json['updated_at'], const EpochDateTimeConverter().fromJson), + userId: json['user_id'] as String?, + ); + +Map _$CollectionResponseToJson(CollectionResponse instance) => + { + 'created_at': _$JsonConverterToJson( + instance.createdAt, const EpochDateTimeConverter().toJson), + 'custom': instance.custom, + 'id': instance.id, + 'name': instance.name, + 'updated_at': _$JsonConverterToJson( + instance.updatedAt, const EpochDateTimeConverter().toJson), + 'user_id': instance.userId, + }; + +Value? _$JsonConverterFromJson( + Object? json, + Value? Function(Json json) fromJson, +) => + json == null ? null : fromJson(json as Json); + +Json? _$JsonConverterToJson( + Value? value, + Json? Function(Value value) toJson, +) => + value == null ? null : toJson(value); diff --git a/packages/stream_feeds/lib/src/generated/api/model/create_block_list_request.dart b/packages/stream_feeds/lib/src/generated/api/model/create_block_list_request.dart index e6381902..d7c50a3f 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/create_block_list_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/create_block_list_request.dart @@ -21,6 +21,8 @@ enum CreateBlockListRequestType { domainAllowlist, @JsonValue('email') email, + @JsonValue('email_allowlist') + emailAllowlist, @JsonValue('regex') regex, @JsonValue('word') diff --git a/packages/stream_feeds/lib/src/generated/api/model/create_block_list_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/create_block_list_request.g.dart index d46d48b2..2391ebe5 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/create_block_list_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/create_block_list_request.g.dart @@ -34,6 +34,7 @@ const _$CreateBlockListRequestTypeEnumMap = { CreateBlockListRequestType.domain: 'domain', CreateBlockListRequestType.domainAllowlist: 'domain_allowlist', CreateBlockListRequestType.email: 'email', + CreateBlockListRequestType.emailAllowlist: 'email_allowlist', CreateBlockListRequestType.regex: 'regex', CreateBlockListRequestType.word: 'word', CreateBlockListRequestType.unknown: '_unknown', diff --git a/packages/stream_feeds/lib/src/generated/api/model/create_collections_request.dart b/packages/stream_feeds/lib/src/generated/api/model/create_collections_request.dart new file mode 100644 index 00000000..2b38031c --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/create_collections_request.dart @@ -0,0 +1,31 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'create_collections_request.g.dart'; +part 'create_collections_request.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class CreateCollectionsRequest with _$CreateCollectionsRequest { + const CreateCollectionsRequest({ + required this.collections, + }); + + @override + final List collections; + + Map toJson() => _$CreateCollectionsRequestToJson(this); + + static CreateCollectionsRequest fromJson(Map json) => + _$CreateCollectionsRequestFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/create_collections_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/create_collections_request.freezed.dart new file mode 100644 index 00000000..9d03a8d5 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/create_collections_request.freezed.dart @@ -0,0 +1,80 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'create_collections_request.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$CreateCollectionsRequest { + List get collections; + + /// Create a copy of CreateCollectionsRequest + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $CreateCollectionsRequestCopyWith get copyWith => + _$CreateCollectionsRequestCopyWithImpl( + this as CreateCollectionsRequest, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is CreateCollectionsRequest && + const DeepCollectionEquality() + .equals(other.collections, collections)); + } + + @override + int get hashCode => Object.hash( + runtimeType, const DeepCollectionEquality().hash(collections)); + + @override + String toString() { + return 'CreateCollectionsRequest(collections: $collections)'; + } +} + +/// @nodoc +abstract mixin class $CreateCollectionsRequestCopyWith<$Res> { + factory $CreateCollectionsRequestCopyWith(CreateCollectionsRequest value, + $Res Function(CreateCollectionsRequest) _then) = + _$CreateCollectionsRequestCopyWithImpl; + @useResult + $Res call({List collections}); +} + +/// @nodoc +class _$CreateCollectionsRequestCopyWithImpl<$Res> + implements $CreateCollectionsRequestCopyWith<$Res> { + _$CreateCollectionsRequestCopyWithImpl(this._self, this._then); + + final CreateCollectionsRequest _self; + final $Res Function(CreateCollectionsRequest) _then; + + /// Create a copy of CreateCollectionsRequest + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? collections = null, + }) { + return _then(CreateCollectionsRequest( + collections: null == collections + ? _self.collections + : collections // ignore: cast_nullable_to_non_nullable + as List, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/create_collections_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/create_collections_request.g.dart new file mode 100644 index 00000000..889d7d33 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/create_collections_request.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'create_collections_request.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CreateCollectionsRequest _$CreateCollectionsRequestFromJson( + Map json) => + CreateCollectionsRequest( + collections: (json['collections'] as List) + .map((e) => CollectionRequest.fromJson(e as Map)) + .toList(), + ); + +Map _$CreateCollectionsRequestToJson( + CreateCollectionsRequest instance) => + { + 'collections': instance.collections.map((e) => e.toJson()).toList(), + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/create_collections_response.dart b/packages/stream_feeds/lib/src/generated/api/model/create_collections_response.dart new file mode 100644 index 00000000..a5ab83c0 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/create_collections_response.dart @@ -0,0 +1,35 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'create_collections_response.g.dart'; +part 'create_collections_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class CreateCollectionsResponse with _$CreateCollectionsResponse { + const CreateCollectionsResponse({ + required this.collections, + required this.duration, + }); + + @override + final List collections; + + @override + final String duration; + + Map toJson() => _$CreateCollectionsResponseToJson(this); + + static CreateCollectionsResponse fromJson(Map json) => + _$CreateCollectionsResponseFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/create_collections_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/create_collections_response.freezed.dart new file mode 100644 index 00000000..51355e4b --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/create_collections_response.freezed.dart @@ -0,0 +1,88 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'create_collections_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$CreateCollectionsResponse { + List get collections; + String get duration; + + /// Create a copy of CreateCollectionsResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $CreateCollectionsResponseCopyWith get copyWith => + _$CreateCollectionsResponseCopyWithImpl( + this as CreateCollectionsResponse, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is CreateCollectionsResponse && + const DeepCollectionEquality() + .equals(other.collections, collections) && + (identical(other.duration, duration) || + other.duration == duration)); + } + + @override + int get hashCode => Object.hash( + runtimeType, const DeepCollectionEquality().hash(collections), duration); + + @override + String toString() { + return 'CreateCollectionsResponse(collections: $collections, duration: $duration)'; + } +} + +/// @nodoc +abstract mixin class $CreateCollectionsResponseCopyWith<$Res> { + factory $CreateCollectionsResponseCopyWith(CreateCollectionsResponse value, + $Res Function(CreateCollectionsResponse) _then) = + _$CreateCollectionsResponseCopyWithImpl; + @useResult + $Res call({List collections, String duration}); +} + +/// @nodoc +class _$CreateCollectionsResponseCopyWithImpl<$Res> + implements $CreateCollectionsResponseCopyWith<$Res> { + _$CreateCollectionsResponseCopyWithImpl(this._self, this._then); + + final CreateCollectionsResponse _self; + final $Res Function(CreateCollectionsResponse) _then; + + /// Create a copy of CreateCollectionsResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? collections = null, + Object? duration = null, + }) { + return _then(CreateCollectionsResponse( + collections: null == collections + ? _self.collections + : collections // ignore: cast_nullable_to_non_nullable + as List, + duration: null == duration + ? _self.duration + : duration // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/create_collections_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/create_collections_response.g.dart new file mode 100644 index 00000000..02acef40 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/create_collections_response.g.dart @@ -0,0 +1,23 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'create_collections_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CreateCollectionsResponse _$CreateCollectionsResponseFromJson( + Map json) => + CreateCollectionsResponse( + collections: (json['collections'] as List) + .map((e) => CollectionResponse.fromJson(e as Map)) + .toList(), + duration: json['duration'] as String, + ); + +Map _$CreateCollectionsResponseToJson( + CreateCollectionsResponse instance) => + { + 'collections': instance.collections.map((e) => e.toJson()).toList(), + 'duration': instance.duration, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_activity_request.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_activity_request.dart index 21aa47b3..086ce43d 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/delete_activity_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_activity_request.dart @@ -19,11 +19,15 @@ part 'delete_activity_request.freezed.dart'; class DeleteActivityRequest with _$DeleteActivityRequest { const DeleteActivityRequest({ this.hardDelete, + this.reason, }); @override final bool? hardDelete; + @override + final String? reason; + Map toJson() => _$DeleteActivityRequestToJson(this); static DeleteActivityRequest fromJson(Map json) => diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_activity_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_activity_request.freezed.dart index 8d772647..f1f4f702 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/delete_activity_request.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_activity_request.freezed.dart @@ -16,6 +16,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$DeleteActivityRequest { bool? get hardDelete; + String? get reason; /// Create a copy of DeleteActivityRequest /// with the given fields replaced by the non-null parameter values. @@ -31,15 +32,16 @@ mixin _$DeleteActivityRequest { (other.runtimeType == runtimeType && other is DeleteActivityRequest && (identical(other.hardDelete, hardDelete) || - other.hardDelete == hardDelete)); + other.hardDelete == hardDelete) && + (identical(other.reason, reason) || other.reason == reason)); } @override - int get hashCode => Object.hash(runtimeType, hardDelete); + int get hashCode => Object.hash(runtimeType, hardDelete, reason); @override String toString() { - return 'DeleteActivityRequest(hardDelete: $hardDelete)'; + return 'DeleteActivityRequest(hardDelete: $hardDelete, reason: $reason)'; } } @@ -49,7 +51,7 @@ abstract mixin class $DeleteActivityRequestCopyWith<$Res> { $Res Function(DeleteActivityRequest) _then) = _$DeleteActivityRequestCopyWithImpl; @useResult - $Res call({bool? hardDelete}); + $Res call({bool? hardDelete, String? reason}); } /// @nodoc @@ -66,12 +68,17 @@ class _$DeleteActivityRequestCopyWithImpl<$Res> @override $Res call({ Object? hardDelete = freezed, + Object? reason = freezed, }) { return _then(DeleteActivityRequest( hardDelete: freezed == hardDelete ? _self.hardDelete : hardDelete // ignore: cast_nullable_to_non_nullable as bool?, + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, )); } } diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_activity_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_activity_request.g.dart index f3c58fc8..f446557e 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/delete_activity_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_activity_request.g.dart @@ -10,10 +10,12 @@ DeleteActivityRequest _$DeleteActivityRequestFromJson( Map json) => DeleteActivityRequest( hardDelete: json['hard_delete'] as bool?, + reason: json['reason'] as String?, ); Map _$DeleteActivityRequestToJson( DeleteActivityRequest instance) => { 'hard_delete': instance.hardDelete, + 'reason': instance.reason, }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_collections_response.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_collections_response.dart new file mode 100644 index 00000000..5434bf90 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_collections_response.dart @@ -0,0 +1,31 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'delete_collections_response.g.dart'; +part 'delete_collections_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class DeleteCollectionsResponse with _$DeleteCollectionsResponse { + const DeleteCollectionsResponse({ + required this.duration, + }); + + @override + final String duration; + + Map toJson() => _$DeleteCollectionsResponseToJson(this); + + static DeleteCollectionsResponse fromJson(Map json) => + _$DeleteCollectionsResponseFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_collections_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_collections_response.freezed.dart new file mode 100644 index 00000000..e0cc406e --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_collections_response.freezed.dart @@ -0,0 +1,79 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'delete_collections_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$DeleteCollectionsResponse { + String get duration; + + /// Create a copy of DeleteCollectionsResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $DeleteCollectionsResponseCopyWith get copyWith => + _$DeleteCollectionsResponseCopyWithImpl( + this as DeleteCollectionsResponse, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is DeleteCollectionsResponse && + (identical(other.duration, duration) || + other.duration == duration)); + } + + @override + int get hashCode => Object.hash(runtimeType, duration); + + @override + String toString() { + return 'DeleteCollectionsResponse(duration: $duration)'; + } +} + +/// @nodoc +abstract mixin class $DeleteCollectionsResponseCopyWith<$Res> { + factory $DeleteCollectionsResponseCopyWith(DeleteCollectionsResponse value, + $Res Function(DeleteCollectionsResponse) _then) = + _$DeleteCollectionsResponseCopyWithImpl; + @useResult + $Res call({String duration}); +} + +/// @nodoc +class _$DeleteCollectionsResponseCopyWithImpl<$Res> + implements $DeleteCollectionsResponseCopyWith<$Res> { + _$DeleteCollectionsResponseCopyWithImpl(this._self, this._then); + + final DeleteCollectionsResponse _self; + final $Res Function(DeleteCollectionsResponse) _then; + + /// Create a copy of DeleteCollectionsResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? duration = null, + }) { + return _then(DeleteCollectionsResponse( + duration: null == duration + ? _self.duration + : duration // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_collections_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_collections_response.g.dart new file mode 100644 index 00000000..df6c066a --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_collections_response.g.dart @@ -0,0 +1,19 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'delete_collections_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DeleteCollectionsResponse _$DeleteCollectionsResponseFromJson( + Map json) => + DeleteCollectionsResponse( + duration: json['duration'] as String, + ); + +Map _$DeleteCollectionsResponseToJson( + DeleteCollectionsResponse instance) => + { + 'duration': instance.duration, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_comment_request.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_comment_request.dart new file mode 100644 index 00000000..a5ad1e26 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_comment_request.dart @@ -0,0 +1,35 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'delete_comment_request.g.dart'; +part 'delete_comment_request.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class DeleteCommentRequest with _$DeleteCommentRequest { + const DeleteCommentRequest({ + this.hardDelete, + this.reason, + }); + + @override + final bool? hardDelete; + + @override + final String? reason; + + Map toJson() => _$DeleteCommentRequestToJson(this); + + static DeleteCommentRequest fromJson(Map json) => + _$DeleteCommentRequestFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_comment_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_comment_request.freezed.dart new file mode 100644 index 00000000..8e97d2ef --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_comment_request.freezed.dart @@ -0,0 +1,86 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'delete_comment_request.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$DeleteCommentRequest { + bool? get hardDelete; + String? get reason; + + /// Create a copy of DeleteCommentRequest + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $DeleteCommentRequestCopyWith get copyWith => + _$DeleteCommentRequestCopyWithImpl( + this as DeleteCommentRequest, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is DeleteCommentRequest && + (identical(other.hardDelete, hardDelete) || + other.hardDelete == hardDelete) && + (identical(other.reason, reason) || other.reason == reason)); + } + + @override + int get hashCode => Object.hash(runtimeType, hardDelete, reason); + + @override + String toString() { + return 'DeleteCommentRequest(hardDelete: $hardDelete, reason: $reason)'; + } +} + +/// @nodoc +abstract mixin class $DeleteCommentRequestCopyWith<$Res> { + factory $DeleteCommentRequestCopyWith(DeleteCommentRequest value, + $Res Function(DeleteCommentRequest) _then) = + _$DeleteCommentRequestCopyWithImpl; + @useResult + $Res call({bool? hardDelete, String? reason}); +} + +/// @nodoc +class _$DeleteCommentRequestCopyWithImpl<$Res> + implements $DeleteCommentRequestCopyWith<$Res> { + _$DeleteCommentRequestCopyWithImpl(this._self, this._then); + + final DeleteCommentRequest _self; + final $Res Function(DeleteCommentRequest) _then; + + /// Create a copy of DeleteCommentRequest + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? hardDelete = freezed, + Object? reason = freezed, + }) { + return _then(DeleteCommentRequest( + hardDelete: freezed == hardDelete + ? _self.hardDelete + : hardDelete // ignore: cast_nullable_to_non_nullable + as bool?, + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_comment_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_comment_request.g.dart new file mode 100644 index 00000000..16b931b7 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_comment_request.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'delete_comment_request.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DeleteCommentRequest _$DeleteCommentRequestFromJson( + Map json) => + DeleteCommentRequest( + hardDelete: json['hard_delete'] as bool?, + reason: json['reason'] as String?, + ); + +Map _$DeleteCommentRequestToJson( + DeleteCommentRequest instance) => + { + 'hard_delete': instance.hardDelete, + 'reason': instance.reason, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_message_request.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_message_request.dart index 992ab535..204621cf 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/delete_message_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_message_request.dart @@ -19,11 +19,15 @@ part 'delete_message_request.freezed.dart'; class DeleteMessageRequest with _$DeleteMessageRequest { const DeleteMessageRequest({ this.hardDelete, + this.reason, }); @override final bool? hardDelete; + @override + final String? reason; + Map toJson() => _$DeleteMessageRequestToJson(this); static DeleteMessageRequest fromJson(Map json) => diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_message_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_message_request.freezed.dart index 7b1bcf9b..9d8ef9d0 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/delete_message_request.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_message_request.freezed.dart @@ -16,6 +16,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$DeleteMessageRequest { bool? get hardDelete; + String? get reason; /// Create a copy of DeleteMessageRequest /// with the given fields replaced by the non-null parameter values. @@ -31,15 +32,16 @@ mixin _$DeleteMessageRequest { (other.runtimeType == runtimeType && other is DeleteMessageRequest && (identical(other.hardDelete, hardDelete) || - other.hardDelete == hardDelete)); + other.hardDelete == hardDelete) && + (identical(other.reason, reason) || other.reason == reason)); } @override - int get hashCode => Object.hash(runtimeType, hardDelete); + int get hashCode => Object.hash(runtimeType, hardDelete, reason); @override String toString() { - return 'DeleteMessageRequest(hardDelete: $hardDelete)'; + return 'DeleteMessageRequest(hardDelete: $hardDelete, reason: $reason)'; } } @@ -49,7 +51,7 @@ abstract mixin class $DeleteMessageRequestCopyWith<$Res> { $Res Function(DeleteMessageRequest) _then) = _$DeleteMessageRequestCopyWithImpl; @useResult - $Res call({bool? hardDelete}); + $Res call({bool? hardDelete, String? reason}); } /// @nodoc @@ -66,12 +68,17 @@ class _$DeleteMessageRequestCopyWithImpl<$Res> @override $Res call({ Object? hardDelete = freezed, + Object? reason = freezed, }) { return _then(DeleteMessageRequest( hardDelete: freezed == hardDelete ? _self.hardDelete : hardDelete // ignore: cast_nullable_to_non_nullable as bool?, + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, )); } } diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_message_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_message_request.g.dart index 4c8c6404..90d3fb95 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/delete_message_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_message_request.g.dart @@ -10,10 +10,12 @@ DeleteMessageRequest _$DeleteMessageRequestFromJson( Map json) => DeleteMessageRequest( hardDelete: json['hard_delete'] as bool?, + reason: json['reason'] as String?, ); Map _$DeleteMessageRequestToJson( DeleteMessageRequest instance) => { 'hard_delete': instance.hardDelete, + 'reason': instance.reason, }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_reaction_request.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_reaction_request.dart index 4481985f..12e286dd 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/delete_reaction_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_reaction_request.dart @@ -19,11 +19,15 @@ part 'delete_reaction_request.freezed.dart'; class DeleteReactionRequest with _$DeleteReactionRequest { const DeleteReactionRequest({ this.hardDelete, + this.reason, }); @override final bool? hardDelete; + @override + final String? reason; + Map toJson() => _$DeleteReactionRequestToJson(this); static DeleteReactionRequest fromJson(Map json) => diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_reaction_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_reaction_request.freezed.dart index 8a1eba68..66a7cbda 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/delete_reaction_request.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_reaction_request.freezed.dart @@ -16,6 +16,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$DeleteReactionRequest { bool? get hardDelete; + String? get reason; /// Create a copy of DeleteReactionRequest /// with the given fields replaced by the non-null parameter values. @@ -31,15 +32,16 @@ mixin _$DeleteReactionRequest { (other.runtimeType == runtimeType && other is DeleteReactionRequest && (identical(other.hardDelete, hardDelete) || - other.hardDelete == hardDelete)); + other.hardDelete == hardDelete) && + (identical(other.reason, reason) || other.reason == reason)); } @override - int get hashCode => Object.hash(runtimeType, hardDelete); + int get hashCode => Object.hash(runtimeType, hardDelete, reason); @override String toString() { - return 'DeleteReactionRequest(hardDelete: $hardDelete)'; + return 'DeleteReactionRequest(hardDelete: $hardDelete, reason: $reason)'; } } @@ -49,7 +51,7 @@ abstract mixin class $DeleteReactionRequestCopyWith<$Res> { $Res Function(DeleteReactionRequest) _then) = _$DeleteReactionRequestCopyWithImpl; @useResult - $Res call({bool? hardDelete}); + $Res call({bool? hardDelete, String? reason}); } /// @nodoc @@ -66,12 +68,17 @@ class _$DeleteReactionRequestCopyWithImpl<$Res> @override $Res call({ Object? hardDelete = freezed, + Object? reason = freezed, }) { return _then(DeleteReactionRequest( hardDelete: freezed == hardDelete ? _self.hardDelete : hardDelete // ignore: cast_nullable_to_non_nullable as bool?, + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, )); } } diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_reaction_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_reaction_request.g.dart index 5cd6dccc..b03e68f4 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/delete_reaction_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_reaction_request.g.dart @@ -10,10 +10,12 @@ DeleteReactionRequest _$DeleteReactionRequestFromJson( Map json) => DeleteReactionRequest( hardDelete: json['hard_delete'] as bool?, + reason: json['reason'] as String?, ); Map _$DeleteReactionRequestToJson( DeleteReactionRequest instance) => { 'hard_delete': instance.hardDelete, + 'reason': instance.reason, }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_user_request.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_user_request.dart index a1651e31..c5d962f3 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/delete_user_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_user_request.dart @@ -22,6 +22,7 @@ class DeleteUserRequest with _$DeleteUserRequest { this.deleteFeedsContent, this.hardDelete, this.markMessagesDeleted, + this.reason, }); @override @@ -36,6 +37,9 @@ class DeleteUserRequest with _$DeleteUserRequest { @override final bool? markMessagesDeleted; + @override + final String? reason; + Map toJson() => _$DeleteUserRequestToJson(this); static DeleteUserRequest fromJson(Map json) => diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_user_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_user_request.freezed.dart index 2ba12d87..14c03507 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/delete_user_request.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_user_request.freezed.dart @@ -19,6 +19,7 @@ mixin _$DeleteUserRequest { bool? get deleteFeedsContent; bool? get hardDelete; bool? get markMessagesDeleted; + String? get reason; /// Create a copy of DeleteUserRequest /// with the given fields replaced by the non-null parameter values. @@ -42,16 +43,17 @@ mixin _$DeleteUserRequest { (identical(other.hardDelete, hardDelete) || other.hardDelete == hardDelete) && (identical(other.markMessagesDeleted, markMessagesDeleted) || - other.markMessagesDeleted == markMessagesDeleted)); + other.markMessagesDeleted == markMessagesDeleted) && + (identical(other.reason, reason) || other.reason == reason)); } @override int get hashCode => Object.hash(runtimeType, deleteConversationChannels, - deleteFeedsContent, hardDelete, markMessagesDeleted); + deleteFeedsContent, hardDelete, markMessagesDeleted, reason); @override String toString() { - return 'DeleteUserRequest(deleteConversationChannels: $deleteConversationChannels, deleteFeedsContent: $deleteFeedsContent, hardDelete: $hardDelete, markMessagesDeleted: $markMessagesDeleted)'; + return 'DeleteUserRequest(deleteConversationChannels: $deleteConversationChannels, deleteFeedsContent: $deleteFeedsContent, hardDelete: $hardDelete, markMessagesDeleted: $markMessagesDeleted, reason: $reason)'; } } @@ -65,7 +67,8 @@ abstract mixin class $DeleteUserRequestCopyWith<$Res> { {bool? deleteConversationChannels, bool? deleteFeedsContent, bool? hardDelete, - bool? markMessagesDeleted}); + bool? markMessagesDeleted, + String? reason}); } /// @nodoc @@ -85,6 +88,7 @@ class _$DeleteUserRequestCopyWithImpl<$Res> Object? deleteFeedsContent = freezed, Object? hardDelete = freezed, Object? markMessagesDeleted = freezed, + Object? reason = freezed, }) { return _then(DeleteUserRequest( deleteConversationChannels: freezed == deleteConversationChannels @@ -103,6 +107,10 @@ class _$DeleteUserRequestCopyWithImpl<$Res> ? _self.markMessagesDeleted : markMessagesDeleted // ignore: cast_nullable_to_non_nullable as bool?, + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, )); } } diff --git a/packages/stream_feeds/lib/src/generated/api/model/delete_user_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/delete_user_request.g.dart index b3d6667c..8e6aae81 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/delete_user_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/delete_user_request.g.dart @@ -12,6 +12,7 @@ DeleteUserRequest _$DeleteUserRequestFromJson(Map json) => deleteFeedsContent: json['delete_feeds_content'] as bool?, hardDelete: json['hard_delete'] as bool?, markMessagesDeleted: json['mark_messages_deleted'] as bool?, + reason: json['reason'] as String?, ); Map _$DeleteUserRequestToJson(DeleteUserRequest instance) => @@ -20,4 +21,5 @@ Map _$DeleteUserRequestToJson(DeleteUserRequest instance) => 'delete_feeds_content': instance.deleteFeedsContent, 'hard_delete': instance.hardDelete, 'mark_messages_deleted': instance.markMessagesDeleted, + 'reason': instance.reason, }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/denormalized_channel_fields.dart b/packages/stream_feeds/lib/src/generated/api/model/denormalized_channel_fields.dart new file mode 100644 index 00000000..f6b07f63 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/denormalized_channel_fields.dart @@ -0,0 +1,71 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'denormalized_channel_fields.g.dart'; +part 'denormalized_channel_fields.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class DenormalizedChannelFields with _$DenormalizedChannelFields { + const DenormalizedChannelFields({ + this.createdAt, + this.createdById, + this.custom, + this.disabled, + this.frozen, + this.id, + this.lastMessageAt, + this.memberCount, + this.team, + this.type, + this.updatedAt, + }); + + @override + final String? createdAt; + + @override + final String? createdById; + + @override + final Map? custom; + + @override + final bool? disabled; + + @override + final bool? frozen; + + @override + final String? id; + + @override + final String? lastMessageAt; + + @override + final int? memberCount; + + @override + final String? team; + + @override + final String? type; + + @override + final String? updatedAt; + + Map toJson() => _$DenormalizedChannelFieldsToJson(this); + + static DenormalizedChannelFields fromJson(Map json) => + _$DenormalizedChannelFieldsFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/denormalized_channel_fields.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/denormalized_channel_fields.freezed.dart new file mode 100644 index 00000000..b73acb25 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/denormalized_channel_fields.freezed.dart @@ -0,0 +1,177 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'denormalized_channel_fields.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$DenormalizedChannelFields { + String? get createdAt; + String? get createdById; + Map? get custom; + bool? get disabled; + bool? get frozen; + String? get id; + String? get lastMessageAt; + int? get memberCount; + String? get team; + String? get type; + String? get updatedAt; + + /// Create a copy of DenormalizedChannelFields + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $DenormalizedChannelFieldsCopyWith get copyWith => + _$DenormalizedChannelFieldsCopyWithImpl( + this as DenormalizedChannelFields, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is DenormalizedChannelFields && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.createdById, createdById) || + other.createdById == createdById) && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.disabled, disabled) || + other.disabled == disabled) && + (identical(other.frozen, frozen) || other.frozen == frozen) && + (identical(other.id, id) || other.id == id) && + (identical(other.lastMessageAt, lastMessageAt) || + other.lastMessageAt == lastMessageAt) && + (identical(other.memberCount, memberCount) || + other.memberCount == memberCount) && + (identical(other.team, team) || other.team == team) && + (identical(other.type, type) || other.type == type) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + createdAt, + createdById, + const DeepCollectionEquality().hash(custom), + disabled, + frozen, + id, + lastMessageAt, + memberCount, + team, + type, + updatedAt); + + @override + String toString() { + return 'DenormalizedChannelFields(createdAt: $createdAt, createdById: $createdById, custom: $custom, disabled: $disabled, frozen: $frozen, id: $id, lastMessageAt: $lastMessageAt, memberCount: $memberCount, team: $team, type: $type, updatedAt: $updatedAt)'; + } +} + +/// @nodoc +abstract mixin class $DenormalizedChannelFieldsCopyWith<$Res> { + factory $DenormalizedChannelFieldsCopyWith(DenormalizedChannelFields value, + $Res Function(DenormalizedChannelFields) _then) = + _$DenormalizedChannelFieldsCopyWithImpl; + @useResult + $Res call( + {String? createdAt, + String? createdById, + Map? custom, + bool? disabled, + bool? frozen, + String? id, + String? lastMessageAt, + int? memberCount, + String? team, + String? type, + String? updatedAt}); +} + +/// @nodoc +class _$DenormalizedChannelFieldsCopyWithImpl<$Res> + implements $DenormalizedChannelFieldsCopyWith<$Res> { + _$DenormalizedChannelFieldsCopyWithImpl(this._self, this._then); + + final DenormalizedChannelFields _self; + final $Res Function(DenormalizedChannelFields) _then; + + /// Create a copy of DenormalizedChannelFields + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? createdAt = freezed, + Object? createdById = freezed, + Object? custom = freezed, + Object? disabled = freezed, + Object? frozen = freezed, + Object? id = freezed, + Object? lastMessageAt = freezed, + Object? memberCount = freezed, + Object? team = freezed, + Object? type = freezed, + Object? updatedAt = freezed, + }) { + return _then(DenormalizedChannelFields( + createdAt: freezed == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as String?, + createdById: freezed == createdById + ? _self.createdById + : createdById // ignore: cast_nullable_to_non_nullable + as String?, + custom: freezed == custom + ? _self.custom + : custom // ignore: cast_nullable_to_non_nullable + as Map?, + disabled: freezed == disabled + ? _self.disabled + : disabled // ignore: cast_nullable_to_non_nullable + as bool?, + frozen: freezed == frozen + ? _self.frozen + : frozen // ignore: cast_nullable_to_non_nullable + as bool?, + id: freezed == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String?, + lastMessageAt: freezed == lastMessageAt + ? _self.lastMessageAt + : lastMessageAt // ignore: cast_nullable_to_non_nullable + as String?, + memberCount: freezed == memberCount + ? _self.memberCount + : memberCount // ignore: cast_nullable_to_non_nullable + as int?, + team: freezed == team + ? _self.team + : team // ignore: cast_nullable_to_non_nullable + as String?, + type: freezed == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String?, + updatedAt: freezed == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/denormalized_channel_fields.g.dart b/packages/stream_feeds/lib/src/generated/api/model/denormalized_channel_fields.g.dart new file mode 100644 index 00000000..d491b352 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/denormalized_channel_fields.g.dart @@ -0,0 +1,39 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'denormalized_channel_fields.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DenormalizedChannelFields _$DenormalizedChannelFieldsFromJson( + Map json) => + DenormalizedChannelFields( + createdAt: json['created_at'] as String?, + createdById: json['created_by_id'] as String?, + custom: json['custom'] as Map?, + disabled: json['disabled'] as bool?, + frozen: json['frozen'] as bool?, + id: json['id'] as String?, + lastMessageAt: json['last_message_at'] as String?, + memberCount: (json['member_count'] as num?)?.toInt(), + team: json['team'] as String?, + type: json['type'] as String?, + updatedAt: json['updated_at'] as String?, + ); + +Map _$DenormalizedChannelFieldsToJson( + DenormalizedChannelFields instance) => + { + 'created_at': instance.createdAt, + 'created_by_id': instance.createdById, + 'custom': instance.custom, + 'disabled': instance.disabled, + 'frozen': instance.frozen, + 'id': instance.id, + 'last_message_at': instance.lastMessageAt, + 'member_count': instance.memberCount, + 'team': instance.team, + 'type': instance.type, + 'updated_at': instance.updatedAt, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/enriched_collection_response.dart b/packages/stream_feeds/lib/src/generated/api/model/enriched_collection_response.dart new file mode 100644 index 00000000..0d43bb63 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/enriched_collection_response.dart @@ -0,0 +1,68 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'enriched_collection_response.g.dart'; +part 'enriched_collection_response.freezed.dart'; + +@JsonEnum(alwaysCreate: true) +enum EnrichedCollectionResponseStatus { + @JsonValue('notfound') + notfound, + @JsonValue('ok') + ok, + @JsonValue('_unknown') + unknown; +} + +@freezed +@immutable +@JsonSerializable() +class EnrichedCollectionResponse with _$EnrichedCollectionResponse { + const EnrichedCollectionResponse({ + this.createdAt, + this.custom, + required this.id, + required this.name, + required this.status, + this.updatedAt, + this.userId, + }); + + @override + @EpochDateTimeConverter() + final DateTime? createdAt; + + @override + final Map? custom; + + @override + final String id; + + @override + final String name; + + @override + @JsonKey(unknownEnumValue: EnrichedCollectionResponseStatus.unknown) + final EnrichedCollectionResponseStatus status; + + @override + @EpochDateTimeConverter() + final DateTime? updatedAt; + + @override + final String? userId; + + Map toJson() => _$EnrichedCollectionResponseToJson(this); + + static EnrichedCollectionResponse fromJson(Map json) => + _$EnrichedCollectionResponseFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/enriched_collection_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/enriched_collection_response.freezed.dart new file mode 100644 index 00000000..a2f46800 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/enriched_collection_response.freezed.dart @@ -0,0 +1,138 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'enriched_collection_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$EnrichedCollectionResponse { + DateTime? get createdAt; + Map? get custom; + String get id; + String get name; + EnrichedCollectionResponseStatus get status; + DateTime? get updatedAt; + String? get userId; + + /// Create a copy of EnrichedCollectionResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $EnrichedCollectionResponseCopyWith + get copyWith => + _$EnrichedCollectionResponseCopyWithImpl( + this as EnrichedCollectionResponse, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is EnrichedCollectionResponse && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.id, id) || other.id == id) && + (identical(other.name, name) || other.name == name) && + (identical(other.status, status) || other.status == status) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.userId, userId) || other.userId == userId)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + createdAt, + const DeepCollectionEquality().hash(custom), + id, + name, + status, + updatedAt, + userId); + + @override + String toString() { + return 'EnrichedCollectionResponse(createdAt: $createdAt, custom: $custom, id: $id, name: $name, status: $status, updatedAt: $updatedAt, userId: $userId)'; + } +} + +/// @nodoc +abstract mixin class $EnrichedCollectionResponseCopyWith<$Res> { + factory $EnrichedCollectionResponseCopyWith(EnrichedCollectionResponse value, + $Res Function(EnrichedCollectionResponse) _then) = + _$EnrichedCollectionResponseCopyWithImpl; + @useResult + $Res call( + {DateTime? createdAt, + Map? custom, + String id, + String name, + EnrichedCollectionResponseStatus status, + DateTime? updatedAt, + String? userId}); +} + +/// @nodoc +class _$EnrichedCollectionResponseCopyWithImpl<$Res> + implements $EnrichedCollectionResponseCopyWith<$Res> { + _$EnrichedCollectionResponseCopyWithImpl(this._self, this._then); + + final EnrichedCollectionResponse _self; + final $Res Function(EnrichedCollectionResponse) _then; + + /// Create a copy of EnrichedCollectionResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? createdAt = freezed, + Object? custom = freezed, + Object? id = null, + Object? name = null, + Object? status = null, + Object? updatedAt = freezed, + Object? userId = freezed, + }) { + return _then(EnrichedCollectionResponse( + createdAt: freezed == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + custom: freezed == custom + ? _self.custom + : custom // ignore: cast_nullable_to_non_nullable + as Map?, + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + status: null == status + ? _self.status + : status // ignore: cast_nullable_to_non_nullable + as EnrichedCollectionResponseStatus, + updatedAt: freezed == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + userId: freezed == userId + ? _self.userId + : userId // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/enriched_collection_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/enriched_collection_response.g.dart new file mode 100644 index 00000000..6943e8cc --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/enriched_collection_response.g.dart @@ -0,0 +1,55 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'enriched_collection_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +EnrichedCollectionResponse _$EnrichedCollectionResponseFromJson( + Map json) => + EnrichedCollectionResponse( + createdAt: _$JsonConverterFromJson( + json['created_at'], const EpochDateTimeConverter().fromJson), + custom: json['custom'] as Map?, + id: json['id'] as String, + name: json['name'] as String, + status: $enumDecode( + _$EnrichedCollectionResponseStatusEnumMap, json['status'], + unknownValue: EnrichedCollectionResponseStatus.unknown), + updatedAt: _$JsonConverterFromJson( + json['updated_at'], const EpochDateTimeConverter().fromJson), + userId: json['user_id'] as String?, + ); + +Map _$EnrichedCollectionResponseToJson( + EnrichedCollectionResponse instance) => + { + 'created_at': _$JsonConverterToJson( + instance.createdAt, const EpochDateTimeConverter().toJson), + 'custom': instance.custom, + 'id': instance.id, + 'name': instance.name, + 'status': _$EnrichedCollectionResponseStatusEnumMap[instance.status]!, + 'updated_at': _$JsonConverterToJson( + instance.updatedAt, const EpochDateTimeConverter().toJson), + 'user_id': instance.userId, + }; + +Value? _$JsonConverterFromJson( + Object? json, + Value? Function(Json json) fromJson, +) => + json == null ? null : fromJson(json as Json); + +const _$EnrichedCollectionResponseStatusEnumMap = { + EnrichedCollectionResponseStatus.notfound: 'notfound', + EnrichedCollectionResponseStatus.ok: 'ok', + EnrichedCollectionResponseStatus.unknown: '_unknown', +}; + +Json? _$JsonConverterToJson( + Value? value, + Json? Function(Value value) toJson, +) => + value == null ? null : toJson(value); diff --git a/packages/stream_feeds/lib/src/generated/api/model/feed_group.dart b/packages/stream_feeds/lib/src/generated/api/model/feed_group.dart index b2ade298..245753c3 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/feed_group.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/feed_group.dart @@ -22,12 +22,12 @@ class FeedGroup with _$FeedGroup { required this.activitySelectors, this.aggregation, required this.aggregationVersion, - required this.appPK, + required this.appPk, required this.createdAt, required this.custom, required this.defaultVisibility, this.deletedAt, - required this.iD, + required this.groupId, this.lastFeedGetAt, this.notification, this.pushNotification, @@ -49,7 +49,7 @@ class FeedGroup with _$FeedGroup { final int aggregationVersion; @override - final int appPK; + final int appPk; @override @EpochDateTimeConverter() @@ -66,7 +66,7 @@ class FeedGroup with _$FeedGroup { final DateTime? deletedAt; @override - final String iD; + final String groupId; @override @EpochDateTimeConverter() diff --git a/packages/stream_feeds/lib/src/generated/api/model/feed_group.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/feed_group.freezed.dart index e479cf0e..523b21b8 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/feed_group.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/feed_group.freezed.dart @@ -19,12 +19,12 @@ mixin _$FeedGroup { List get activitySelectors; AggregationConfig? get aggregation; int get aggregationVersion; - int get appPK; + int get appPk; DateTime get createdAt; Map get custom; String get defaultVisibility; DateTime? get deletedAt; - String get iD; + String get groupId; DateTime? get lastFeedGetAt; NotificationConfig? get notification; PushNotificationConfig? get pushNotification; @@ -52,7 +52,7 @@ mixin _$FeedGroup { other.aggregation == aggregation) && (identical(other.aggregationVersion, aggregationVersion) || other.aggregationVersion == aggregationVersion) && - (identical(other.appPK, appPK) || other.appPK == appPK) && + (identical(other.appPk, appPk) || other.appPk == appPk) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && const DeepCollectionEquality().equals(other.custom, custom) && @@ -60,7 +60,7 @@ mixin _$FeedGroup { other.defaultVisibility == defaultVisibility) && (identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt) && - (identical(other.iD, iD) || other.iD == iD) && + (identical(other.groupId, groupId) || other.groupId == groupId) && (identical(other.lastFeedGetAt, lastFeedGetAt) || other.lastFeedGetAt == lastFeedGetAt) && (identical(other.notification, notification) || @@ -80,12 +80,12 @@ mixin _$FeedGroup { const DeepCollectionEquality().hash(activitySelectors), aggregation, aggregationVersion, - appPK, + appPk, createdAt, const DeepCollectionEquality().hash(custom), defaultVisibility, deletedAt, - iD, + groupId, lastFeedGetAt, notification, pushNotification, @@ -95,7 +95,7 @@ mixin _$FeedGroup { @override String toString() { - return 'FeedGroup(activityProcessors: $activityProcessors, activitySelectors: $activitySelectors, aggregation: $aggregation, aggregationVersion: $aggregationVersion, appPK: $appPK, createdAt: $createdAt, custom: $custom, defaultVisibility: $defaultVisibility, deletedAt: $deletedAt, iD: $iD, lastFeedGetAt: $lastFeedGetAt, notification: $notification, pushNotification: $pushNotification, ranking: $ranking, stories: $stories, updatedAt: $updatedAt)'; + return 'FeedGroup(activityProcessors: $activityProcessors, activitySelectors: $activitySelectors, aggregation: $aggregation, aggregationVersion: $aggregationVersion, appPk: $appPk, createdAt: $createdAt, custom: $custom, defaultVisibility: $defaultVisibility, deletedAt: $deletedAt, groupId: $groupId, lastFeedGetAt: $lastFeedGetAt, notification: $notification, pushNotification: $pushNotification, ranking: $ranking, stories: $stories, updatedAt: $updatedAt)'; } } @@ -109,12 +109,12 @@ abstract mixin class $FeedGroupCopyWith<$Res> { List activitySelectors, AggregationConfig? aggregation, int aggregationVersion, - int appPK, + int appPk, DateTime createdAt, Map custom, String defaultVisibility, DateTime? deletedAt, - String iD, + String groupId, DateTime? lastFeedGetAt, NotificationConfig? notification, PushNotificationConfig? pushNotification, @@ -139,12 +139,12 @@ class _$FeedGroupCopyWithImpl<$Res> implements $FeedGroupCopyWith<$Res> { Object? activitySelectors = null, Object? aggregation = freezed, Object? aggregationVersion = null, - Object? appPK = null, + Object? appPk = null, Object? createdAt = null, Object? custom = null, Object? defaultVisibility = null, Object? deletedAt = freezed, - Object? iD = null, + Object? groupId = null, Object? lastFeedGetAt = freezed, Object? notification = freezed, Object? pushNotification = freezed, @@ -169,9 +169,9 @@ class _$FeedGroupCopyWithImpl<$Res> implements $FeedGroupCopyWith<$Res> { ? _self.aggregationVersion : aggregationVersion // ignore: cast_nullable_to_non_nullable as int, - appPK: null == appPK - ? _self.appPK - : appPK // ignore: cast_nullable_to_non_nullable + appPk: null == appPk + ? _self.appPk + : appPk // ignore: cast_nullable_to_non_nullable as int, createdAt: null == createdAt ? _self.createdAt @@ -189,9 +189,9 @@ class _$FeedGroupCopyWithImpl<$Res> implements $FeedGroupCopyWith<$Res> { ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable as DateTime?, - iD: null == iD - ? _self.iD - : iD // ignore: cast_nullable_to_non_nullable + groupId: null == groupId + ? _self.groupId + : groupId // ignore: cast_nullable_to_non_nullable as String, lastFeedGetAt: freezed == lastFeedGetAt ? _self.lastFeedGetAt diff --git a/packages/stream_feeds/lib/src/generated/api/model/feed_group.g.dart b/packages/stream_feeds/lib/src/generated/api/model/feed_group.g.dart index f36902ee..0336f06f 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/feed_group.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/feed_group.g.dart @@ -20,14 +20,14 @@ FeedGroup _$FeedGroupFromJson(Map json) => FeedGroup( : AggregationConfig.fromJson( json['aggregation'] as Map), aggregationVersion: (json['aggregation_version'] as num).toInt(), - appPK: (json['app_p_k'] as num).toInt(), + appPk: (json['app_pk'] as num).toInt(), createdAt: const EpochDateTimeConverter() .fromJson((json['created_at'] as num).toInt()), custom: json['custom'] as Map, defaultVisibility: json['default_visibility'] as String, deletedAt: _$JsonConverterFromJson( json['deleted_at'], const EpochDateTimeConverter().fromJson), - iD: json['i_d'] as String, + groupId: json['group_id'] as String, lastFeedGetAt: _$JsonConverterFromJson( json['last_feed_get_at'], const EpochDateTimeConverter().fromJson), notification: json['notification'] == null @@ -55,13 +55,13 @@ Map _$FeedGroupToJson(FeedGroup instance) => { instance.activitySelectors.map((e) => e.toJson()).toList(), 'aggregation': instance.aggregation?.toJson(), 'aggregation_version': instance.aggregationVersion, - 'app_p_k': instance.appPK, + 'app_pk': instance.appPk, 'created_at': const EpochDateTimeConverter().toJson(instance.createdAt), 'custom': instance.custom, 'default_visibility': instance.defaultVisibility, 'deleted_at': _$JsonConverterToJson( instance.deletedAt, const EpochDateTimeConverter().toJson), - 'i_d': instance.iD, + 'group_id': instance.groupId, 'last_feed_get_at': _$JsonConverterToJson( instance.lastFeedGetAt, const EpochDateTimeConverter().toJson), 'notification': instance.notification?.toJson(), diff --git a/packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.dart b/packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.dart new file mode 100644 index 00000000..2079545a --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.dart @@ -0,0 +1,119 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'feed_suggestion_response.g.dart'; +part 'feed_suggestion_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class FeedSuggestionResponse with _$FeedSuggestionResponse { + const FeedSuggestionResponse({ + this.algorithmScores, + required this.createdAt, + required this.createdBy, + this.custom, + this.deletedAt, + required this.description, + required this.feed, + this.filterTags, + required this.followerCount, + required this.followingCount, + required this.groupId, + required this.id, + required this.memberCount, + required this.name, + this.ownCapabilities, + this.ownFollows, + this.ownMembership, + required this.pinCount, + this.reason, + this.recommendationScore, + required this.updatedAt, + this.visibility, + }); + + @override + final Map? algorithmScores; + + @override + @EpochDateTimeConverter() + final DateTime createdAt; + + @override + final UserResponse createdBy; + + @override + final Map? custom; + + @override + @EpochDateTimeConverter() + final DateTime? deletedAt; + + @override + final String description; + + @override + final String feed; + + @override + final List? filterTags; + + @override + final int followerCount; + + @override + final int followingCount; + + @override + final String groupId; + + @override + final String id; + + @override + final int memberCount; + + @override + final String name; + + @override + @JsonKey(unknownEnumValue: FeedOwnCapability.unknown) + final List? ownCapabilities; + + @override + final List? ownFollows; + + @override + final FeedMemberResponse? ownMembership; + + @override + final int pinCount; + + @override + final String? reason; + + @override + final double? recommendationScore; + + @override + @EpochDateTimeConverter() + final DateTime updatedAt; + + @override + final String? visibility; + + Map toJson() => _$FeedSuggestionResponseToJson(this); + + static FeedSuggestionResponse fromJson(Map json) => + _$FeedSuggestionResponseFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.freezed.dart new file mode 100644 index 00000000..60835f6b --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.freezed.dart @@ -0,0 +1,287 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'feed_suggestion_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$FeedSuggestionResponse { + Map? get algorithmScores; + DateTime get createdAt; + UserResponse get createdBy; + Map? get custom; + DateTime? get deletedAt; + String get description; + String get feed; + List? get filterTags; + int get followerCount; + int get followingCount; + String get groupId; + String get id; + int get memberCount; + String get name; + List? get ownCapabilities; + List? get ownFollows; + FeedMemberResponse? get ownMembership; + int get pinCount; + String? get reason; + double? get recommendationScore; + DateTime get updatedAt; + String? get visibility; + + /// Create a copy of FeedSuggestionResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $FeedSuggestionResponseCopyWith get copyWith => + _$FeedSuggestionResponseCopyWithImpl( + this as FeedSuggestionResponse, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is FeedSuggestionResponse && + const DeepCollectionEquality() + .equals(other.algorithmScores, algorithmScores) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.createdBy, createdBy) || + other.createdBy == createdBy) && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.description, description) || + other.description == description) && + (identical(other.feed, feed) || other.feed == feed) && + const DeepCollectionEquality() + .equals(other.filterTags, filterTags) && + (identical(other.followerCount, followerCount) || + other.followerCount == followerCount) && + (identical(other.followingCount, followingCount) || + other.followingCount == followingCount) && + (identical(other.groupId, groupId) || other.groupId == groupId) && + (identical(other.id, id) || other.id == id) && + (identical(other.memberCount, memberCount) || + other.memberCount == memberCount) && + (identical(other.name, name) || other.name == name) && + const DeepCollectionEquality() + .equals(other.ownCapabilities, ownCapabilities) && + const DeepCollectionEquality() + .equals(other.ownFollows, ownFollows) && + (identical(other.ownMembership, ownMembership) || + other.ownMembership == ownMembership) && + (identical(other.pinCount, pinCount) || + other.pinCount == pinCount) && + (identical(other.reason, reason) || other.reason == reason) && + (identical(other.recommendationScore, recommendationScore) || + other.recommendationScore == recommendationScore) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.visibility, visibility) || + other.visibility == visibility)); + } + + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(algorithmScores), + createdAt, + createdBy, + const DeepCollectionEquality().hash(custom), + deletedAt, + description, + feed, + const DeepCollectionEquality().hash(filterTags), + followerCount, + followingCount, + groupId, + id, + memberCount, + name, + const DeepCollectionEquality().hash(ownCapabilities), + const DeepCollectionEquality().hash(ownFollows), + ownMembership, + pinCount, + reason, + recommendationScore, + updatedAt, + visibility + ]); + + @override + String toString() { + return 'FeedSuggestionResponse(algorithmScores: $algorithmScores, createdAt: $createdAt, createdBy: $createdBy, custom: $custom, deletedAt: $deletedAt, description: $description, feed: $feed, filterTags: $filterTags, followerCount: $followerCount, followingCount: $followingCount, groupId: $groupId, id: $id, memberCount: $memberCount, name: $name, ownCapabilities: $ownCapabilities, ownFollows: $ownFollows, ownMembership: $ownMembership, pinCount: $pinCount, reason: $reason, recommendationScore: $recommendationScore, updatedAt: $updatedAt, visibility: $visibility)'; + } +} + +/// @nodoc +abstract mixin class $FeedSuggestionResponseCopyWith<$Res> { + factory $FeedSuggestionResponseCopyWith(FeedSuggestionResponse value, + $Res Function(FeedSuggestionResponse) _then) = + _$FeedSuggestionResponseCopyWithImpl; + @useResult + $Res call( + {Map? algorithmScores, + DateTime createdAt, + UserResponse createdBy, + Map? custom, + DateTime? deletedAt, + String description, + String feed, + List? filterTags, + int followerCount, + int followingCount, + String groupId, + String id, + int memberCount, + String name, + List? ownCapabilities, + List? ownFollows, + FeedMemberResponse? ownMembership, + int pinCount, + String? reason, + double? recommendationScore, + DateTime updatedAt, + String? visibility}); +} + +/// @nodoc +class _$FeedSuggestionResponseCopyWithImpl<$Res> + implements $FeedSuggestionResponseCopyWith<$Res> { + _$FeedSuggestionResponseCopyWithImpl(this._self, this._then); + + final FeedSuggestionResponse _self; + final $Res Function(FeedSuggestionResponse) _then; + + /// Create a copy of FeedSuggestionResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? algorithmScores = freezed, + Object? createdAt = null, + Object? createdBy = null, + Object? custom = freezed, + Object? deletedAt = freezed, + Object? description = null, + Object? feed = null, + Object? filterTags = freezed, + Object? followerCount = null, + Object? followingCount = null, + Object? groupId = null, + Object? id = null, + Object? memberCount = null, + Object? name = null, + Object? ownCapabilities = freezed, + Object? ownFollows = freezed, + Object? ownMembership = freezed, + Object? pinCount = null, + Object? reason = freezed, + Object? recommendationScore = freezed, + Object? updatedAt = null, + Object? visibility = freezed, + }) { + return _then(FeedSuggestionResponse( + algorithmScores: freezed == algorithmScores + ? _self.algorithmScores + : algorithmScores // ignore: cast_nullable_to_non_nullable + as Map?, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + createdBy: null == createdBy + ? _self.createdBy + : createdBy // ignore: cast_nullable_to_non_nullable + as UserResponse, + custom: freezed == custom + ? _self.custom + : custom // ignore: cast_nullable_to_non_nullable + as Map?, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + feed: null == feed + ? _self.feed + : feed // ignore: cast_nullable_to_non_nullable + as String, + filterTags: freezed == filterTags + ? _self.filterTags + : filterTags // ignore: cast_nullable_to_non_nullable + as List?, + followerCount: null == followerCount + ? _self.followerCount + : followerCount // ignore: cast_nullable_to_non_nullable + as int, + followingCount: null == followingCount + ? _self.followingCount + : followingCount // ignore: cast_nullable_to_non_nullable + as int, + groupId: null == groupId + ? _self.groupId + : groupId // ignore: cast_nullable_to_non_nullable + as String, + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + memberCount: null == memberCount + ? _self.memberCount + : memberCount // ignore: cast_nullable_to_non_nullable + as int, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + ownCapabilities: freezed == ownCapabilities + ? _self.ownCapabilities + : ownCapabilities // ignore: cast_nullable_to_non_nullable + as List?, + ownFollows: freezed == ownFollows + ? _self.ownFollows + : ownFollows // ignore: cast_nullable_to_non_nullable + as List?, + ownMembership: freezed == ownMembership + ? _self.ownMembership + : ownMembership // ignore: cast_nullable_to_non_nullable + as FeedMemberResponse?, + pinCount: null == pinCount + ? _self.pinCount + : pinCount // ignore: cast_nullable_to_non_nullable + as int, + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + recommendationScore: freezed == recommendationScore + ? _self.recommendationScore + : recommendationScore // ignore: cast_nullable_to_non_nullable + as double?, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + visibility: freezed == visibility + ? _self.visibility + : visibility // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.g.dart new file mode 100644 index 00000000..6d61c1f8 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.g.dart @@ -0,0 +1,125 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'feed_suggestion_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +FeedSuggestionResponse _$FeedSuggestionResponseFromJson( + Map json) => + FeedSuggestionResponse( + algorithmScores: (json['algorithm_scores'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num).toDouble()), + ), + createdAt: const EpochDateTimeConverter() + .fromJson((json['created_at'] as num).toInt()), + createdBy: + UserResponse.fromJson(json['created_by'] as Map), + custom: json['custom'] as Map?, + deletedAt: _$JsonConverterFromJson( + json['deleted_at'], const EpochDateTimeConverter().fromJson), + description: json['description'] as String, + feed: json['feed'] as String, + filterTags: (json['filter_tags'] as List?) + ?.map((e) => e as String) + .toList(), + followerCount: (json['follower_count'] as num).toInt(), + followingCount: (json['following_count'] as num).toInt(), + groupId: json['group_id'] as String, + id: json['id'] as String, + memberCount: (json['member_count'] as num).toInt(), + name: json['name'] as String, + ownCapabilities: (json['own_capabilities'] as List?) + ?.map((e) => $enumDecode(_$FeedOwnCapabilityEnumMap, e, + unknownValue: FeedOwnCapability.unknown)) + .toList(), + ownFollows: (json['own_follows'] as List?) + ?.map((e) => FollowResponse.fromJson(e as Map)) + .toList(), + ownMembership: json['own_membership'] == null + ? null + : FeedMemberResponse.fromJson( + json['own_membership'] as Map), + pinCount: (json['pin_count'] as num).toInt(), + reason: json['reason'] as String?, + recommendationScore: (json['recommendation_score'] as num?)?.toDouble(), + updatedAt: const EpochDateTimeConverter() + .fromJson((json['updated_at'] as num).toInt()), + visibility: json['visibility'] as String?, + ); + +Map _$FeedSuggestionResponseToJson( + FeedSuggestionResponse instance) => + { + 'algorithm_scores': instance.algorithmScores, + 'created_at': const EpochDateTimeConverter().toJson(instance.createdAt), + 'created_by': instance.createdBy.toJson(), + 'custom': instance.custom, + 'deleted_at': _$JsonConverterToJson( + instance.deletedAt, const EpochDateTimeConverter().toJson), + 'description': instance.description, + 'feed': instance.feed, + 'filter_tags': instance.filterTags, + 'follower_count': instance.followerCount, + 'following_count': instance.followingCount, + 'group_id': instance.groupId, + 'id': instance.id, + 'member_count': instance.memberCount, + 'name': instance.name, + 'own_capabilities': instance.ownCapabilities + ?.map((e) => _$FeedOwnCapabilityEnumMap[e]!) + .toList(), + 'own_follows': instance.ownFollows?.map((e) => e.toJson()).toList(), + 'own_membership': instance.ownMembership?.toJson(), + 'pin_count': instance.pinCount, + 'reason': instance.reason, + 'recommendation_score': instance.recommendationScore, + 'updated_at': const EpochDateTimeConverter().toJson(instance.updatedAt), + 'visibility': instance.visibility, + }; + +Value? _$JsonConverterFromJson( + Object? json, + Value? Function(Json json) fromJson, +) => + json == null ? null : fromJson(json as Json); + +const _$FeedOwnCapabilityEnumMap = { + FeedOwnCapability.addActivity: 'add-activity', + FeedOwnCapability.addActivityBookmark: 'add-activity-bookmark', + FeedOwnCapability.addActivityReaction: 'add-activity-reaction', + FeedOwnCapability.addComment: 'add-comment', + FeedOwnCapability.addCommentReaction: 'add-comment-reaction', + FeedOwnCapability.createFeed: 'create-feed', + FeedOwnCapability.deleteAnyActivity: 'delete-any-activity', + FeedOwnCapability.deleteAnyComment: 'delete-any-comment', + FeedOwnCapability.deleteFeed: 'delete-feed', + FeedOwnCapability.deleteOwnActivity: 'delete-own-activity', + FeedOwnCapability.deleteOwnActivityBookmark: 'delete-own-activity-bookmark', + FeedOwnCapability.deleteOwnActivityReaction: 'delete-own-activity-reaction', + FeedOwnCapability.deleteOwnComment: 'delete-own-comment', + FeedOwnCapability.deleteOwnCommentReaction: 'delete-own-comment-reaction', + FeedOwnCapability.follow: 'follow', + FeedOwnCapability.pinActivity: 'pin-activity', + FeedOwnCapability.queryFeedMembers: 'query-feed-members', + FeedOwnCapability.queryFollows: 'query-follows', + FeedOwnCapability.readActivities: 'read-activities', + FeedOwnCapability.readFeed: 'read-feed', + FeedOwnCapability.unfollow: 'unfollow', + FeedOwnCapability.updateAnyActivity: 'update-any-activity', + FeedOwnCapability.updateAnyComment: 'update-any-comment', + FeedOwnCapability.updateFeed: 'update-feed', + FeedOwnCapability.updateFeedFollowers: 'update-feed-followers', + FeedOwnCapability.updateFeedMembers: 'update-feed-members', + FeedOwnCapability.updateOwnActivity: 'update-own-activity', + FeedOwnCapability.updateOwnActivityBookmark: 'update-own-activity-bookmark', + FeedOwnCapability.updateOwnComment: 'update-own-comment', + FeedOwnCapability.unknown: '_unknown', +}; + +Json? _$JsonConverterToJson( + Value? value, + Json? Function(Value value) toJson, +) => + value == null ? null : toJson(value); diff --git a/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences.dart b/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences.dart index 166bed07..0662ace3 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences.dart @@ -33,6 +33,16 @@ enum FeedsPreferencesCommentReaction { unknown; } +@JsonEnum(alwaysCreate: true) +enum FeedsPreferencesCommentReply { + @JsonValue('all') + all, + @JsonValue('none') + none, + @JsonValue('_unknown') + unknown; +} + @JsonEnum(alwaysCreate: true) enum FeedsPreferencesFollow { @JsonValue('all') @@ -70,6 +80,7 @@ class FeedsPreferences with _$FeedsPreferences { const FeedsPreferences({ this.comment, this.commentReaction, + this.commentReply, this.customActivityTypes, this.follow, this.mention, @@ -84,6 +95,10 @@ class FeedsPreferences with _$FeedsPreferences { @JsonKey(unknownEnumValue: FeedsPreferencesCommentReaction.unknown) final FeedsPreferencesCommentReaction? commentReaction; + @override + @JsonKey(unknownEnumValue: FeedsPreferencesCommentReply.unknown) + final FeedsPreferencesCommentReply? commentReply; + @override final Map? customActivityTypes; diff --git a/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences.freezed.dart index 8e69de8e..14d3b60e 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences.freezed.dart @@ -17,6 +17,7 @@ T _$identity(T value) => value; mixin _$FeedsPreferences { FeedsPreferencesComment? get comment; FeedsPreferencesCommentReaction? get commentReaction; + FeedsPreferencesCommentReply? get commentReply; Map? get customActivityTypes; FeedsPreferencesFollow? get follow; FeedsPreferencesMention? get mention; @@ -38,6 +39,8 @@ mixin _$FeedsPreferences { (identical(other.comment, comment) || other.comment == comment) && (identical(other.commentReaction, commentReaction) || other.commentReaction == commentReaction) && + (identical(other.commentReply, commentReply) || + other.commentReply == commentReply) && const DeepCollectionEquality() .equals(other.customActivityTypes, customActivityTypes) && (identical(other.follow, follow) || other.follow == follow) && @@ -51,6 +54,7 @@ mixin _$FeedsPreferences { runtimeType, comment, commentReaction, + commentReply, const DeepCollectionEquality().hash(customActivityTypes), follow, mention, @@ -58,7 +62,7 @@ mixin _$FeedsPreferences { @override String toString() { - return 'FeedsPreferences(comment: $comment, commentReaction: $commentReaction, customActivityTypes: $customActivityTypes, follow: $follow, mention: $mention, reaction: $reaction)'; + return 'FeedsPreferences(comment: $comment, commentReaction: $commentReaction, commentReply: $commentReply, customActivityTypes: $customActivityTypes, follow: $follow, mention: $mention, reaction: $reaction)'; } } @@ -71,6 +75,7 @@ abstract mixin class $FeedsPreferencesCopyWith<$Res> { $Res call( {FeedsPreferencesComment? comment, FeedsPreferencesCommentReaction? commentReaction, + FeedsPreferencesCommentReply? commentReply, Map? customActivityTypes, FeedsPreferencesFollow? follow, FeedsPreferencesMention? mention, @@ -92,6 +97,7 @@ class _$FeedsPreferencesCopyWithImpl<$Res> $Res call({ Object? comment = freezed, Object? commentReaction = freezed, + Object? commentReply = freezed, Object? customActivityTypes = freezed, Object? follow = freezed, Object? mention = freezed, @@ -106,6 +112,10 @@ class _$FeedsPreferencesCopyWithImpl<$Res> ? _self.commentReaction : commentReaction // ignore: cast_nullable_to_non_nullable as FeedsPreferencesCommentReaction?, + commentReply: freezed == commentReply + ? _self.commentReply + : commentReply // ignore: cast_nullable_to_non_nullable + as FeedsPreferencesCommentReply?, customActivityTypes: freezed == customActivityTypes ? _self.customActivityTypes : customActivityTypes // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences.g.dart b/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences.g.dart index 7658b6eb..c3daca55 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences.g.dart @@ -14,6 +14,9 @@ FeedsPreferences _$FeedsPreferencesFromJson(Map json) => commentReaction: $enumDecodeNullable( _$FeedsPreferencesCommentReactionEnumMap, json['comment_reaction'], unknownValue: FeedsPreferencesCommentReaction.unknown), + commentReply: $enumDecodeNullable( + _$FeedsPreferencesCommentReplyEnumMap, json['comment_reply'], + unknownValue: FeedsPreferencesCommentReply.unknown), customActivityTypes: (json['custom_activity_types'] as Map?)?.map( (k, e) => MapEntry(k, e as String), @@ -34,6 +37,8 @@ Map _$FeedsPreferencesToJson(FeedsPreferences instance) => 'comment': _$FeedsPreferencesCommentEnumMap[instance.comment], 'comment_reaction': _$FeedsPreferencesCommentReactionEnumMap[instance.commentReaction], + 'comment_reply': + _$FeedsPreferencesCommentReplyEnumMap[instance.commentReply], 'custom_activity_types': instance.customActivityTypes, 'follow': _$FeedsPreferencesFollowEnumMap[instance.follow], 'mention': _$FeedsPreferencesMentionEnumMap[instance.mention], @@ -52,6 +57,12 @@ const _$FeedsPreferencesCommentReactionEnumMap = { FeedsPreferencesCommentReaction.unknown: '_unknown', }; +const _$FeedsPreferencesCommentReplyEnumMap = { + FeedsPreferencesCommentReply.all: 'all', + FeedsPreferencesCommentReply.none: 'none', + FeedsPreferencesCommentReply.unknown: '_unknown', +}; + const _$FeedsPreferencesFollowEnumMap = { FeedsPreferencesFollow.all: 'all', FeedsPreferencesFollow.none: 'none', diff --git a/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences_response.dart b/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences_response.dart new file mode 100644 index 00000000..cb1be5b8 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences_response.dart @@ -0,0 +1,51 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'feeds_preferences_response.g.dart'; +part 'feeds_preferences_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class FeedsPreferencesResponse with _$FeedsPreferencesResponse { + const FeedsPreferencesResponse({ + this.comment, + this.commentReaction, + this.customActivityTypes, + this.follow, + this.mention, + this.reaction, + }); + + @override + final String? comment; + + @override + final String? commentReaction; + + @override + final Map? customActivityTypes; + + @override + final String? follow; + + @override + final String? mention; + + @override + final String? reaction; + + Map toJson() => _$FeedsPreferencesResponseToJson(this); + + static FeedsPreferencesResponse fromJson(Map json) => + _$FeedsPreferencesResponseFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences_response.freezed.dart new file mode 100644 index 00000000..0df9ee4e --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences_response.freezed.dart @@ -0,0 +1,129 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'feeds_preferences_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$FeedsPreferencesResponse { + String? get comment; + String? get commentReaction; + Map? get customActivityTypes; + String? get follow; + String? get mention; + String? get reaction; + + /// Create a copy of FeedsPreferencesResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $FeedsPreferencesResponseCopyWith get copyWith => + _$FeedsPreferencesResponseCopyWithImpl( + this as FeedsPreferencesResponse, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is FeedsPreferencesResponse && + (identical(other.comment, comment) || other.comment == comment) && + (identical(other.commentReaction, commentReaction) || + other.commentReaction == commentReaction) && + const DeepCollectionEquality() + .equals(other.customActivityTypes, customActivityTypes) && + (identical(other.follow, follow) || other.follow == follow) && + (identical(other.mention, mention) || other.mention == mention) && + (identical(other.reaction, reaction) || + other.reaction == reaction)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + comment, + commentReaction, + const DeepCollectionEquality().hash(customActivityTypes), + follow, + mention, + reaction); + + @override + String toString() { + return 'FeedsPreferencesResponse(comment: $comment, commentReaction: $commentReaction, customActivityTypes: $customActivityTypes, follow: $follow, mention: $mention, reaction: $reaction)'; + } +} + +/// @nodoc +abstract mixin class $FeedsPreferencesResponseCopyWith<$Res> { + factory $FeedsPreferencesResponseCopyWith(FeedsPreferencesResponse value, + $Res Function(FeedsPreferencesResponse) _then) = + _$FeedsPreferencesResponseCopyWithImpl; + @useResult + $Res call( + {String? comment, + String? commentReaction, + Map? customActivityTypes, + String? follow, + String? mention, + String? reaction}); +} + +/// @nodoc +class _$FeedsPreferencesResponseCopyWithImpl<$Res> + implements $FeedsPreferencesResponseCopyWith<$Res> { + _$FeedsPreferencesResponseCopyWithImpl(this._self, this._then); + + final FeedsPreferencesResponse _self; + final $Res Function(FeedsPreferencesResponse) _then; + + /// Create a copy of FeedsPreferencesResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? comment = freezed, + Object? commentReaction = freezed, + Object? customActivityTypes = freezed, + Object? follow = freezed, + Object? mention = freezed, + Object? reaction = freezed, + }) { + return _then(FeedsPreferencesResponse( + comment: freezed == comment + ? _self.comment + : comment // ignore: cast_nullable_to_non_nullable + as String?, + commentReaction: freezed == commentReaction + ? _self.commentReaction + : commentReaction // ignore: cast_nullable_to_non_nullable + as String?, + customActivityTypes: freezed == customActivityTypes + ? _self.customActivityTypes + : customActivityTypes // ignore: cast_nullable_to_non_nullable + as Map?, + follow: freezed == follow + ? _self.follow + : follow // ignore: cast_nullable_to_non_nullable + as String?, + mention: freezed == mention + ? _self.mention + : mention // ignore: cast_nullable_to_non_nullable + as String?, + reaction: freezed == reaction + ? _self.reaction + : reaction // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences_response.g.dart new file mode 100644 index 00000000..cbdabff8 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/feeds_preferences_response.g.dart @@ -0,0 +1,32 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'feeds_preferences_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +FeedsPreferencesResponse _$FeedsPreferencesResponseFromJson( + Map json) => + FeedsPreferencesResponse( + comment: json['comment'] as String?, + commentReaction: json['comment_reaction'] as String?, + customActivityTypes: + (json['custom_activity_types'] as Map?)?.map( + (k, e) => MapEntry(k, e as String), + ), + follow: json['follow'] as String?, + mention: json['mention'] as String?, + reaction: json['reaction'] as String?, + ); + +Map _$FeedsPreferencesResponseToJson( + FeedsPreferencesResponse instance) => + { + 'comment': instance.comment, + 'comment_reaction': instance.commentReaction, + 'custom_activity_types': instance.customActivityTypes, + 'follow': instance.follow, + 'mention': instance.mention, + 'reaction': instance.reaction, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/filter_config_response.dart b/packages/stream_feeds/lib/src/generated/api/model/filter_config_response.dart new file mode 100644 index 00000000..028fa499 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/filter_config_response.dart @@ -0,0 +1,35 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'filter_config_response.g.dart'; +part 'filter_config_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class FilterConfigResponse with _$FilterConfigResponse { + const FilterConfigResponse({ + this.aiTextLabels, + required this.llmLabels, + }); + + @override + final List? aiTextLabels; + + @override + final List llmLabels; + + Map toJson() => _$FilterConfigResponseToJson(this); + + static FilterConfigResponse fromJson(Map json) => + _$FilterConfigResponseFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/filter_config_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/filter_config_response.freezed.dart new file mode 100644 index 00000000..9dc1e756 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/filter_config_response.freezed.dart @@ -0,0 +1,89 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'filter_config_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$FilterConfigResponse { + List? get aiTextLabels; + List get llmLabels; + + /// Create a copy of FilterConfigResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $FilterConfigResponseCopyWith get copyWith => + _$FilterConfigResponseCopyWithImpl( + this as FilterConfigResponse, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is FilterConfigResponse && + const DeepCollectionEquality() + .equals(other.aiTextLabels, aiTextLabels) && + const DeepCollectionEquality().equals(other.llmLabels, llmLabels)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(aiTextLabels), + const DeepCollectionEquality().hash(llmLabels)); + + @override + String toString() { + return 'FilterConfigResponse(aiTextLabels: $aiTextLabels, llmLabels: $llmLabels)'; + } +} + +/// @nodoc +abstract mixin class $FilterConfigResponseCopyWith<$Res> { + factory $FilterConfigResponseCopyWith(FilterConfigResponse value, + $Res Function(FilterConfigResponse) _then) = + _$FilterConfigResponseCopyWithImpl; + @useResult + $Res call({List? aiTextLabels, List llmLabels}); +} + +/// @nodoc +class _$FilterConfigResponseCopyWithImpl<$Res> + implements $FilterConfigResponseCopyWith<$Res> { + _$FilterConfigResponseCopyWithImpl(this._self, this._then); + + final FilterConfigResponse _self; + final $Res Function(FilterConfigResponse) _then; + + /// Create a copy of FilterConfigResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? aiTextLabels = freezed, + Object? llmLabels = null, + }) { + return _then(FilterConfigResponse( + aiTextLabels: freezed == aiTextLabels + ? _self.aiTextLabels + : aiTextLabels // ignore: cast_nullable_to_non_nullable + as List?, + llmLabels: null == llmLabels + ? _self.llmLabels + : llmLabels // ignore: cast_nullable_to_non_nullable + as List, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/filter_config_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/filter_config_response.g.dart new file mode 100644 index 00000000..2c6b57cb --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/filter_config_response.g.dart @@ -0,0 +1,25 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'filter_config_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +FilterConfigResponse _$FilterConfigResponseFromJson( + Map json) => + FilterConfigResponse( + aiTextLabels: (json['ai_text_labels'] as List?) + ?.map((e) => e as String) + .toList(), + llmLabels: (json['llm_labels'] as List) + .map((e) => e as String) + .toList(), + ); + +Map _$FilterConfigResponseToJson( + FilterConfigResponse instance) => + { + 'ai_text_labels': instance.aiTextLabels, + 'llm_labels': instance.llmLabels, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/flag_count_rule_parameters.dart b/packages/stream_feeds/lib/src/generated/api/model/flag_count_rule_parameters.dart new file mode 100644 index 00000000..9e09a12c --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/flag_count_rule_parameters.dart @@ -0,0 +1,31 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'flag_count_rule_parameters.g.dart'; +part 'flag_count_rule_parameters.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class FlagCountRuleParameters with _$FlagCountRuleParameters { + const FlagCountRuleParameters({ + this.threshold, + }); + + @override + final int? threshold; + + Map toJson() => _$FlagCountRuleParametersToJson(this); + + static FlagCountRuleParameters fromJson(Map json) => + _$FlagCountRuleParametersFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/flag_count_rule_parameters.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/flag_count_rule_parameters.freezed.dart new file mode 100644 index 00000000..4766bf5e --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/flag_count_rule_parameters.freezed.dart @@ -0,0 +1,79 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'flag_count_rule_parameters.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$FlagCountRuleParameters { + int? get threshold; + + /// Create a copy of FlagCountRuleParameters + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $FlagCountRuleParametersCopyWith get copyWith => + _$FlagCountRuleParametersCopyWithImpl( + this as FlagCountRuleParameters, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is FlagCountRuleParameters && + (identical(other.threshold, threshold) || + other.threshold == threshold)); + } + + @override + int get hashCode => Object.hash(runtimeType, threshold); + + @override + String toString() { + return 'FlagCountRuleParameters(threshold: $threshold)'; + } +} + +/// @nodoc +abstract mixin class $FlagCountRuleParametersCopyWith<$Res> { + factory $FlagCountRuleParametersCopyWith(FlagCountRuleParameters value, + $Res Function(FlagCountRuleParameters) _then) = + _$FlagCountRuleParametersCopyWithImpl; + @useResult + $Res call({int? threshold}); +} + +/// @nodoc +class _$FlagCountRuleParametersCopyWithImpl<$Res> + implements $FlagCountRuleParametersCopyWith<$Res> { + _$FlagCountRuleParametersCopyWithImpl(this._self, this._then); + + final FlagCountRuleParameters _self; + final $Res Function(FlagCountRuleParameters) _then; + + /// Create a copy of FlagCountRuleParameters + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? threshold = freezed, + }) { + return _then(FlagCountRuleParameters( + threshold: freezed == threshold + ? _self.threshold + : threshold // ignore: cast_nullable_to_non_nullable + as int?, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/flag_count_rule_parameters.g.dart b/packages/stream_feeds/lib/src/generated/api/model/flag_count_rule_parameters.g.dart new file mode 100644 index 00000000..e4e7c93d --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/flag_count_rule_parameters.g.dart @@ -0,0 +1,19 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'flag_count_rule_parameters.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +FlagCountRuleParameters _$FlagCountRuleParametersFromJson( + Map json) => + FlagCountRuleParameters( + threshold: (json['threshold'] as num?)?.toInt(), + ); + +Map _$FlagCountRuleParametersToJson( + FlagCountRuleParameters instance) => + { + 'threshold': instance.threshold, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/get_follow_suggestions_response.dart b/packages/stream_feeds/lib/src/generated/api/model/get_follow_suggestions_response.dart index 0003bebd..57334992 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/get_follow_suggestions_response.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/get_follow_suggestions_response.dart @@ -18,15 +18,19 @@ part 'get_follow_suggestions_response.freezed.dart'; @JsonSerializable() class GetFollowSuggestionsResponse with _$GetFollowSuggestionsResponse { const GetFollowSuggestionsResponse({ + this.algorithmUsed, required this.duration, required this.suggestions, }); + @override + final String? algorithmUsed; + @override final String duration; @override - final List suggestions; + final List suggestions; Map toJson() => _$GetFollowSuggestionsResponseToJson(this); diff --git a/packages/stream_feeds/lib/src/generated/api/model/get_follow_suggestions_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/get_follow_suggestions_response.freezed.dart index 094c7400..b21bd3d2 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/get_follow_suggestions_response.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/get_follow_suggestions_response.freezed.dart @@ -15,8 +15,9 @@ T _$identity(T value) => value; /// @nodoc mixin _$GetFollowSuggestionsResponse { + String? get algorithmUsed; String get duration; - List get suggestions; + List get suggestions; /// Create a copy of GetFollowSuggestionsResponse /// with the given fields replaced by the non-null parameter values. @@ -32,6 +33,8 @@ mixin _$GetFollowSuggestionsResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is GetFollowSuggestionsResponse && + (identical(other.algorithmUsed, algorithmUsed) || + other.algorithmUsed == algorithmUsed) && (identical(other.duration, duration) || other.duration == duration) && const DeepCollectionEquality() @@ -39,12 +42,12 @@ mixin _$GetFollowSuggestionsResponse { } @override - int get hashCode => Object.hash( - runtimeType, duration, const DeepCollectionEquality().hash(suggestions)); + int get hashCode => Object.hash(runtimeType, algorithmUsed, duration, + const DeepCollectionEquality().hash(suggestions)); @override String toString() { - return 'GetFollowSuggestionsResponse(duration: $duration, suggestions: $suggestions)'; + return 'GetFollowSuggestionsResponse(algorithmUsed: $algorithmUsed, duration: $duration, suggestions: $suggestions)'; } } @@ -55,7 +58,10 @@ abstract mixin class $GetFollowSuggestionsResponseCopyWith<$Res> { $Res Function(GetFollowSuggestionsResponse) _then) = _$GetFollowSuggestionsResponseCopyWithImpl; @useResult - $Res call({String duration, List suggestions}); + $Res call( + {String? algorithmUsed, + String duration, + List suggestions}); } /// @nodoc @@ -71,10 +77,15 @@ class _$GetFollowSuggestionsResponseCopyWithImpl<$Res> @pragma('vm:prefer-inline') @override $Res call({ + Object? algorithmUsed = freezed, Object? duration = null, Object? suggestions = null, }) { return _then(GetFollowSuggestionsResponse( + algorithmUsed: freezed == algorithmUsed + ? _self.algorithmUsed + : algorithmUsed // ignore: cast_nullable_to_non_nullable + as String?, duration: null == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable @@ -82,7 +93,7 @@ class _$GetFollowSuggestionsResponseCopyWithImpl<$Res> suggestions: null == suggestions ? _self.suggestions : suggestions // ignore: cast_nullable_to_non_nullable - as List, + as List, )); } } diff --git a/packages/stream_feeds/lib/src/generated/api/model/get_follow_suggestions_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/get_follow_suggestions_response.g.dart index a2403c9c..b6aa8c90 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/get_follow_suggestions_response.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/get_follow_suggestions_response.g.dart @@ -9,15 +9,18 @@ part of 'get_follow_suggestions_response.dart'; GetFollowSuggestionsResponse _$GetFollowSuggestionsResponseFromJson( Map json) => GetFollowSuggestionsResponse( + algorithmUsed: json['algorithm_used'] as String?, duration: json['duration'] as String, suggestions: (json['suggestions'] as List) - .map((e) => FeedResponse.fromJson(e as Map)) + .map( + (e) => FeedSuggestionResponse.fromJson(e as Map)) .toList(), ); Map _$GetFollowSuggestionsResponseToJson( GetFollowSuggestionsResponse instance) => { + 'algorithm_used': instance.algorithmUsed, 'duration': instance.duration, 'suggestions': instance.suggestions.map((e) => e.toJson()).toList(), }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.dart b/packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.dart index 271e1181..82ecec1b 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.dart @@ -18,7 +18,6 @@ part 'get_or_create_feed_request.freezed.dart'; @JsonSerializable() class GetOrCreateFeedRequest with _$GetOrCreateFeedRequest { const GetOrCreateFeedRequest({ - this.activitySelectorOptions, this.data, this.externalRanking, this.filter, @@ -33,9 +32,6 @@ class GetOrCreateFeedRequest with _$GetOrCreateFeedRequest { this.watch, }); - @override - final Map? activitySelectorOptions; - @override final FeedInput? data; diff --git a/packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.freezed.dart index 480ff73f..d5d457f9 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.freezed.dart @@ -15,7 +15,6 @@ T _$identity(T value) => value; /// @nodoc mixin _$GetOrCreateFeedRequest { - Map? get activitySelectorOptions; FeedInput? get data; Map? get externalRanking; Map? get filter; @@ -42,8 +41,6 @@ mixin _$GetOrCreateFeedRequest { return identical(this, other) || (other.runtimeType == runtimeType && other is GetOrCreateFeedRequest && - const DeepCollectionEquality().equals( - other.activitySelectorOptions, activitySelectorOptions) && (identical(other.data, data) || other.data == data) && const DeepCollectionEquality() .equals(other.externalRanking, externalRanking) && @@ -66,7 +63,6 @@ mixin _$GetOrCreateFeedRequest { @override int get hashCode => Object.hash( runtimeType, - const DeepCollectionEquality().hash(activitySelectorOptions), data, const DeepCollectionEquality().hash(externalRanking), const DeepCollectionEquality().hash(filter), @@ -82,7 +78,7 @@ mixin _$GetOrCreateFeedRequest { @override String toString() { - return 'GetOrCreateFeedRequest(activitySelectorOptions: $activitySelectorOptions, data: $data, externalRanking: $externalRanking, filter: $filter, followersPagination: $followersPagination, followingPagination: $followingPagination, interestWeights: $interestWeights, limit: $limit, memberPagination: $memberPagination, next: $next, prev: $prev, view: $view, watch: $watch)'; + return 'GetOrCreateFeedRequest(data: $data, externalRanking: $externalRanking, filter: $filter, followersPagination: $followersPagination, followingPagination: $followingPagination, interestWeights: $interestWeights, limit: $limit, memberPagination: $memberPagination, next: $next, prev: $prev, view: $view, watch: $watch)'; } } @@ -93,8 +89,7 @@ abstract mixin class $GetOrCreateFeedRequestCopyWith<$Res> { _$GetOrCreateFeedRequestCopyWithImpl; @useResult $Res call( - {Map? activitySelectorOptions, - FeedInput? data, + {FeedInput? data, Map? externalRanking, Map? filter, PagerRequest? followersPagination, @@ -121,7 +116,6 @@ class _$GetOrCreateFeedRequestCopyWithImpl<$Res> @pragma('vm:prefer-inline') @override $Res call({ - Object? activitySelectorOptions = freezed, Object? data = freezed, Object? externalRanking = freezed, Object? filter = freezed, @@ -136,10 +130,6 @@ class _$GetOrCreateFeedRequestCopyWithImpl<$Res> Object? watch = freezed, }) { return _then(GetOrCreateFeedRequest( - activitySelectorOptions: freezed == activitySelectorOptions - ? _self.activitySelectorOptions - : activitySelectorOptions // ignore: cast_nullable_to_non_nullable - as Map?, data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.g.dart index 2fa8b246..19d4755f 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.g.dart @@ -9,8 +9,6 @@ part of 'get_or_create_feed_request.dart'; GetOrCreateFeedRequest _$GetOrCreateFeedRequestFromJson( Map json) => GetOrCreateFeedRequest( - activitySelectorOptions: - json['activity_selector_options'] as Map?, data: json['data'] == null ? null : FeedInput.fromJson(json['data'] as Map), @@ -41,7 +39,6 @@ GetOrCreateFeedRequest _$GetOrCreateFeedRequestFromJson( Map _$GetOrCreateFeedRequestToJson( GetOrCreateFeedRequest instance) => { - 'activity_selector_options': instance.activitySelectorOptions, 'data': instance.data?.toJson(), 'external_ranking': instance.externalRanking, 'filter': instance.filter, diff --git a/packages/stream_feeds/lib/src/generated/api/model/notification_comment.dart b/packages/stream_feeds/lib/src/generated/api/model/notification_comment.dart new file mode 100644 index 00000000..f4a642f4 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/notification_comment.dart @@ -0,0 +1,43 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'notification_comment.g.dart'; +part 'notification_comment.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class NotificationComment with _$NotificationComment { + const NotificationComment({ + this.attachments, + required this.comment, + required this.id, + required this.userId, + }); + + @override + final List? attachments; + + @override + final String comment; + + @override + final String id; + + @override + final String userId; + + Map toJson() => _$NotificationCommentToJson(this); + + static NotificationComment fromJson(Map json) => + _$NotificationCommentFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/notification_comment.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/notification_comment.freezed.dart new file mode 100644 index 00000000..95312568 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/notification_comment.freezed.dart @@ -0,0 +1,105 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'notification_comment.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$NotificationComment { + List? get attachments; + String get comment; + String get id; + String get userId; + + /// Create a copy of NotificationComment + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $NotificationCommentCopyWith get copyWith => + _$NotificationCommentCopyWithImpl( + this as NotificationComment, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NotificationComment && + const DeepCollectionEquality() + .equals(other.attachments, attachments) && + (identical(other.comment, comment) || other.comment == comment) && + (identical(other.id, id) || other.id == id) && + (identical(other.userId, userId) || other.userId == userId)); + } + + @override + int get hashCode => Object.hash(runtimeType, + const DeepCollectionEquality().hash(attachments), comment, id, userId); + + @override + String toString() { + return 'NotificationComment(attachments: $attachments, comment: $comment, id: $id, userId: $userId)'; + } +} + +/// @nodoc +abstract mixin class $NotificationCommentCopyWith<$Res> { + factory $NotificationCommentCopyWith( + NotificationComment value, $Res Function(NotificationComment) _then) = + _$NotificationCommentCopyWithImpl; + @useResult + $Res call( + {List? attachments, + String comment, + String id, + String userId}); +} + +/// @nodoc +class _$NotificationCommentCopyWithImpl<$Res> + implements $NotificationCommentCopyWith<$Res> { + _$NotificationCommentCopyWithImpl(this._self, this._then); + + final NotificationComment _self; + final $Res Function(NotificationComment) _then; + + /// Create a copy of NotificationComment + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? attachments = freezed, + Object? comment = null, + Object? id = null, + Object? userId = null, + }) { + return _then(NotificationComment( + attachments: freezed == attachments + ? _self.attachments + : attachments // ignore: cast_nullable_to_non_nullable + as List?, + comment: null == comment + ? _self.comment + : comment // ignore: cast_nullable_to_non_nullable + as String, + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + userId: null == userId + ? _self.userId + : userId // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/notification_comment.g.dart b/packages/stream_feeds/lib/src/generated/api/model/notification_comment.g.dart new file mode 100644 index 00000000..c8ea8cb3 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/notification_comment.g.dart @@ -0,0 +1,26 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'notification_comment.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +NotificationComment _$NotificationCommentFromJson(Map json) => + NotificationComment( + attachments: (json['attachments'] as List?) + ?.map((e) => Attachment.fromJson(e as Map)) + .toList(), + comment: json['comment'] as String, + id: json['id'] as String, + userId: json['user_id'] as String, + ); + +Map _$NotificationCommentToJson( + NotificationComment instance) => + { + 'attachments': instance.attachments?.map((e) => e.toJson()).toList(), + 'comment': instance.comment, + 'id': instance.id, + 'user_id': instance.userId, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/notification_config.dart b/packages/stream_feeds/lib/src/generated/api/model/notification_config.dart index d2293a77..2d9333cb 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/notification_config.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/notification_config.dart @@ -18,10 +18,14 @@ part 'notification_config.freezed.dart'; @JsonSerializable() class NotificationConfig with _$NotificationConfig { const NotificationConfig({ + this.deduplicationWindow, this.trackRead, this.trackSeen, }); + @override + final String? deduplicationWindow; + @override final bool? trackRead; diff --git a/packages/stream_feeds/lib/src/generated/api/model/notification_config.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/notification_config.freezed.dart index f8c6cccb..f5c4dfa4 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/notification_config.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/notification_config.freezed.dart @@ -15,6 +15,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$NotificationConfig { + String? get deduplicationWindow; bool? get trackRead; bool? get trackSeen; @@ -31,6 +32,8 @@ mixin _$NotificationConfig { return identical(this, other) || (other.runtimeType == runtimeType && other is NotificationConfig && + (identical(other.deduplicationWindow, deduplicationWindow) || + other.deduplicationWindow == deduplicationWindow) && (identical(other.trackRead, trackRead) || other.trackRead == trackRead) && (identical(other.trackSeen, trackSeen) || @@ -38,11 +41,12 @@ mixin _$NotificationConfig { } @override - int get hashCode => Object.hash(runtimeType, trackRead, trackSeen); + int get hashCode => + Object.hash(runtimeType, deduplicationWindow, trackRead, trackSeen); @override String toString() { - return 'NotificationConfig(trackRead: $trackRead, trackSeen: $trackSeen)'; + return 'NotificationConfig(deduplicationWindow: $deduplicationWindow, trackRead: $trackRead, trackSeen: $trackSeen)'; } } @@ -52,7 +56,7 @@ abstract mixin class $NotificationConfigCopyWith<$Res> { NotificationConfig value, $Res Function(NotificationConfig) _then) = _$NotificationConfigCopyWithImpl; @useResult - $Res call({bool? trackRead, bool? trackSeen}); + $Res call({String? deduplicationWindow, bool? trackRead, bool? trackSeen}); } /// @nodoc @@ -68,10 +72,15 @@ class _$NotificationConfigCopyWithImpl<$Res> @pragma('vm:prefer-inline') @override $Res call({ + Object? deduplicationWindow = freezed, Object? trackRead = freezed, Object? trackSeen = freezed, }) { return _then(NotificationConfig( + deduplicationWindow: freezed == deduplicationWindow + ? _self.deduplicationWindow + : deduplicationWindow // ignore: cast_nullable_to_non_nullable + as String?, trackRead: freezed == trackRead ? _self.trackRead : trackRead // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/notification_config.g.dart b/packages/stream_feeds/lib/src/generated/api/model/notification_config.g.dart index 37ae0390..67d55bff 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/notification_config.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/notification_config.g.dart @@ -8,12 +8,14 @@ part of 'notification_config.dart'; NotificationConfig _$NotificationConfigFromJson(Map json) => NotificationConfig( + deduplicationWindow: json['deduplication_window'] as String?, trackRead: json['track_read'] as bool?, trackSeen: json['track_seen'] as bool?, ); Map _$NotificationConfigToJson(NotificationConfig instance) => { + 'deduplication_window': instance.deduplicationWindow, 'track_read': instance.trackRead, 'track_seen': instance.trackSeen, }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/notification_target.dart b/packages/stream_feeds/lib/src/generated/api/model/notification_target.dart index e06f73ef..bf1b1c38 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/notification_target.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/notification_target.dart @@ -19,6 +19,7 @@ part 'notification_target.freezed.dart'; class NotificationTarget with _$NotificationTarget { const NotificationTarget({ this.attachments, + this.comment, required this.id, this.name, this.text, @@ -29,6 +30,9 @@ class NotificationTarget with _$NotificationTarget { @override final List? attachments; + @override + final NotificationComment? comment; + @override final String id; diff --git a/packages/stream_feeds/lib/src/generated/api/model/notification_target.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/notification_target.freezed.dart index f10b929d..edf7a0e7 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/notification_target.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/notification_target.freezed.dart @@ -16,6 +16,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$NotificationTarget { List? get attachments; + NotificationComment? get comment; String get id; String? get name; String? get text; @@ -37,6 +38,7 @@ mixin _$NotificationTarget { other is NotificationTarget && const DeepCollectionEquality() .equals(other.attachments, attachments) && + (identical(other.comment, comment) || other.comment == comment) && (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && (identical(other.text, text) || other.text == text) && @@ -48,6 +50,7 @@ mixin _$NotificationTarget { int get hashCode => Object.hash( runtimeType, const DeepCollectionEquality().hash(attachments), + comment, id, name, text, @@ -56,7 +59,7 @@ mixin _$NotificationTarget { @override String toString() { - return 'NotificationTarget(attachments: $attachments, id: $id, name: $name, text: $text, type: $type, userId: $userId)'; + return 'NotificationTarget(attachments: $attachments, comment: $comment, id: $id, name: $name, text: $text, type: $type, userId: $userId)'; } } @@ -68,6 +71,7 @@ abstract mixin class $NotificationTargetCopyWith<$Res> { @useResult $Res call( {List? attachments, + NotificationComment? comment, String id, String? name, String? text, @@ -89,6 +93,7 @@ class _$NotificationTargetCopyWithImpl<$Res> @override $Res call({ Object? attachments = freezed, + Object? comment = freezed, Object? id = null, Object? name = freezed, Object? text = freezed, @@ -100,6 +105,10 @@ class _$NotificationTargetCopyWithImpl<$Res> ? _self.attachments : attachments // ignore: cast_nullable_to_non_nullable as List?, + comment: freezed == comment + ? _self.comment + : comment // ignore: cast_nullable_to_non_nullable + as NotificationComment?, id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/notification_target.g.dart b/packages/stream_feeds/lib/src/generated/api/model/notification_target.g.dart index 39340a7e..69060d0f 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/notification_target.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/notification_target.g.dart @@ -11,6 +11,10 @@ NotificationTarget _$NotificationTargetFromJson(Map json) => attachments: (json['attachments'] as List?) ?.map((e) => Attachment.fromJson(e as Map)) .toList(), + comment: json['comment'] == null + ? null + : NotificationComment.fromJson( + json['comment'] as Map), id: json['id'] as String, name: json['name'] as String?, text: json['text'] as String?, @@ -21,6 +25,7 @@ NotificationTarget _$NotificationTargetFromJson(Map json) => Map _$NotificationTargetToJson(NotificationTarget instance) => { 'attachments': instance.attachments?.map((e) => e.toJson()).toList(), + 'comment': instance.comment?.toJson(), 'id': instance.id, 'name': instance.name, 'text': instance.text, diff --git a/packages/stream_feeds/lib/src/generated/api/model/own_user_response.dart b/packages/stream_feeds/lib/src/generated/api/model/own_user_response.dart index 9a188b51..5f77eaa6 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/own_user_response.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/own_user_response.dart @@ -112,7 +112,7 @@ class OwnUserResponse with _$OwnUserResponse { final PrivacySettingsResponse? privacySettings; @override - final PushPreferences? pushPreferences; + final PushPreferencesResponse? pushPreferences; @override @EpochDateTimeConverter() diff --git a/packages/stream_feeds/lib/src/generated/api/model/own_user_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/own_user_response.freezed.dart index 13db01ac..95044cb3 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/own_user_response.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/own_user_response.freezed.dart @@ -34,7 +34,7 @@ mixin _$OwnUserResponse { String? get name; bool get online; PrivacySettingsResponse? get privacySettings; - PushPreferences? get pushPreferences; + PushPreferencesResponse? get pushPreferences; DateTime? get revokeTokensIssuedBefore; String get role; List get teams; @@ -178,7 +178,7 @@ abstract mixin class $OwnUserResponseCopyWith<$Res> { String? name, bool online, PrivacySettingsResponse? privacySettings, - PushPreferences? pushPreferences, + PushPreferencesResponse? pushPreferences, DateTime? revokeTokensIssuedBefore, String role, List teams, @@ -315,7 +315,7 @@ class _$OwnUserResponseCopyWithImpl<$Res> pushPreferences: freezed == pushPreferences ? _self.pushPreferences : pushPreferences // ignore: cast_nullable_to_non_nullable - as PushPreferences?, + as PushPreferencesResponse?, revokeTokensIssuedBefore: freezed == revokeTokensIssuedBefore ? _self.revokeTokensIssuedBefore : revokeTokensIssuedBefore // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/own_user_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/own_user_response.g.dart index e92ded1a..791c5520 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/own_user_response.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/own_user_response.g.dart @@ -46,7 +46,7 @@ OwnUserResponse _$OwnUserResponseFromJson(Map json) => json['privacy_settings'] as Map), pushPreferences: json['push_preferences'] == null ? null - : PushPreferences.fromJson( + : PushPreferencesResponse.fromJson( json['push_preferences'] as Map), revokeTokensIssuedBefore: _$JsonConverterFromJson( json['revoke_tokens_issued_before'], diff --git a/packages/stream_feeds/lib/src/generated/api/model/push_preferences_response.dart b/packages/stream_feeds/lib/src/generated/api/model/push_preferences_response.dart new file mode 100644 index 00000000..993f2ff1 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/push_preferences_response.dart @@ -0,0 +1,48 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'push_preferences_response.g.dart'; +part 'push_preferences_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class PushPreferencesResponse with _$PushPreferencesResponse { + const PushPreferencesResponse({ + this.callLevel, + this.chatLevel, + this.disabledUntil, + this.feedsLevel, + this.feedsPreferences, + }); + + @override + final String? callLevel; + + @override + final String? chatLevel; + + @override + @EpochDateTimeConverter() + final DateTime? disabledUntil; + + @override + final String? feedsLevel; + + @override + final FeedsPreferencesResponse? feedsPreferences; + + Map toJson() => _$PushPreferencesResponseToJson(this); + + static PushPreferencesResponse fromJson(Map json) => + _$PushPreferencesResponseFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/push_preferences_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/push_preferences_response.freezed.dart new file mode 100644 index 00000000..7d12861e --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/push_preferences_response.freezed.dart @@ -0,0 +1,117 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'push_preferences_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$PushPreferencesResponse { + String? get callLevel; + String? get chatLevel; + DateTime? get disabledUntil; + String? get feedsLevel; + FeedsPreferencesResponse? get feedsPreferences; + + /// Create a copy of PushPreferencesResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $PushPreferencesResponseCopyWith get copyWith => + _$PushPreferencesResponseCopyWithImpl( + this as PushPreferencesResponse, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is PushPreferencesResponse && + (identical(other.callLevel, callLevel) || + other.callLevel == callLevel) && + (identical(other.chatLevel, chatLevel) || + other.chatLevel == chatLevel) && + (identical(other.disabledUntil, disabledUntil) || + other.disabledUntil == disabledUntil) && + (identical(other.feedsLevel, feedsLevel) || + other.feedsLevel == feedsLevel) && + (identical(other.feedsPreferences, feedsPreferences) || + other.feedsPreferences == feedsPreferences)); + } + + @override + int get hashCode => Object.hash(runtimeType, callLevel, chatLevel, + disabledUntil, feedsLevel, feedsPreferences); + + @override + String toString() { + return 'PushPreferencesResponse(callLevel: $callLevel, chatLevel: $chatLevel, disabledUntil: $disabledUntil, feedsLevel: $feedsLevel, feedsPreferences: $feedsPreferences)'; + } +} + +/// @nodoc +abstract mixin class $PushPreferencesResponseCopyWith<$Res> { + factory $PushPreferencesResponseCopyWith(PushPreferencesResponse value, + $Res Function(PushPreferencesResponse) _then) = + _$PushPreferencesResponseCopyWithImpl; + @useResult + $Res call( + {String? callLevel, + String? chatLevel, + DateTime? disabledUntil, + String? feedsLevel, + FeedsPreferencesResponse? feedsPreferences}); +} + +/// @nodoc +class _$PushPreferencesResponseCopyWithImpl<$Res> + implements $PushPreferencesResponseCopyWith<$Res> { + _$PushPreferencesResponseCopyWithImpl(this._self, this._then); + + final PushPreferencesResponse _self; + final $Res Function(PushPreferencesResponse) _then; + + /// Create a copy of PushPreferencesResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? callLevel = freezed, + Object? chatLevel = freezed, + Object? disabledUntil = freezed, + Object? feedsLevel = freezed, + Object? feedsPreferences = freezed, + }) { + return _then(PushPreferencesResponse( + callLevel: freezed == callLevel + ? _self.callLevel + : callLevel // ignore: cast_nullable_to_non_nullable + as String?, + chatLevel: freezed == chatLevel + ? _self.chatLevel + : chatLevel // ignore: cast_nullable_to_non_nullable + as String?, + disabledUntil: freezed == disabledUntil + ? _self.disabledUntil + : disabledUntil // ignore: cast_nullable_to_non_nullable + as DateTime?, + feedsLevel: freezed == feedsLevel + ? _self.feedsLevel + : feedsLevel // ignore: cast_nullable_to_non_nullable + as String?, + feedsPreferences: freezed == feedsPreferences + ? _self.feedsPreferences + : feedsPreferences // ignore: cast_nullable_to_non_nullable + as FeedsPreferencesResponse?, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/push_preferences_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/push_preferences_response.g.dart new file mode 100644 index 00000000..4c2d0087 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/push_preferences_response.g.dart @@ -0,0 +1,44 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'push_preferences_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PushPreferencesResponse _$PushPreferencesResponseFromJson( + Map json) => + PushPreferencesResponse( + callLevel: json['call_level'] as String?, + chatLevel: json['chat_level'] as String?, + disabledUntil: _$JsonConverterFromJson( + json['disabled_until'], const EpochDateTimeConverter().fromJson), + feedsLevel: json['feeds_level'] as String?, + feedsPreferences: json['feeds_preferences'] == null + ? null + : FeedsPreferencesResponse.fromJson( + json['feeds_preferences'] as Map), + ); + +Map _$PushPreferencesResponseToJson( + PushPreferencesResponse instance) => + { + 'call_level': instance.callLevel, + 'chat_level': instance.chatLevel, + 'disabled_until': _$JsonConverterToJson( + instance.disabledUntil, const EpochDateTimeConverter().toJson), + 'feeds_level': instance.feedsLevel, + 'feeds_preferences': instance.feedsPreferences?.toJson(), + }; + +Value? _$JsonConverterFromJson( + Object? json, + Value? Function(Json json) fromJson, +) => + json == null ? null : fromJson(json as Json); + +Json? _$JsonConverterToJson( + Value? value, + Json? Function(Value value) toJson, +) => + value == null ? null : toJson(value); diff --git a/packages/stream_feeds/lib/src/generated/api/model/query_review_queue_response.dart b/packages/stream_feeds/lib/src/generated/api/model/query_review_queue_response.dart index 11c4bd82..9815d2cd 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/query_review_queue_response.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/query_review_queue_response.dart @@ -20,6 +20,7 @@ class QueryReviewQueueResponse with _$QueryReviewQueueResponse { const QueryReviewQueueResponse({ required this.actionConfig, required this.duration, + this.filterConfig, required this.items, this.next, this.prev, @@ -32,6 +33,9 @@ class QueryReviewQueueResponse with _$QueryReviewQueueResponse { @override final String duration; + @override + final FilterConfigResponse? filterConfig; + @override final List items; diff --git a/packages/stream_feeds/lib/src/generated/api/model/query_review_queue_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/query_review_queue_response.freezed.dart index 8a032e47..38129932 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/query_review_queue_response.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/query_review_queue_response.freezed.dart @@ -17,6 +17,7 @@ T _$identity(T value) => value; mixin _$QueryReviewQueueResponse { Map> get actionConfig; String get duration; + FilterConfigResponse? get filterConfig; List get items; String? get next; String? get prev; @@ -39,6 +40,8 @@ mixin _$QueryReviewQueueResponse { .equals(other.actionConfig, actionConfig) && (identical(other.duration, duration) || other.duration == duration) && + (identical(other.filterConfig, filterConfig) || + other.filterConfig == filterConfig) && const DeepCollectionEquality().equals(other.items, items) && (identical(other.next, next) || other.next == next) && (identical(other.prev, prev) || other.prev == prev) && @@ -50,6 +53,7 @@ mixin _$QueryReviewQueueResponse { runtimeType, const DeepCollectionEquality().hash(actionConfig), duration, + filterConfig, const DeepCollectionEquality().hash(items), next, prev, @@ -57,7 +61,7 @@ mixin _$QueryReviewQueueResponse { @override String toString() { - return 'QueryReviewQueueResponse(actionConfig: $actionConfig, duration: $duration, items: $items, next: $next, prev: $prev, stats: $stats)'; + return 'QueryReviewQueueResponse(actionConfig: $actionConfig, duration: $duration, filterConfig: $filterConfig, items: $items, next: $next, prev: $prev, stats: $stats)'; } } @@ -70,6 +74,7 @@ abstract mixin class $QueryReviewQueueResponseCopyWith<$Res> { $Res call( {Map> actionConfig, String duration, + FilterConfigResponse? filterConfig, List items, String? next, String? prev, @@ -91,6 +96,7 @@ class _$QueryReviewQueueResponseCopyWithImpl<$Res> $Res call({ Object? actionConfig = null, Object? duration = null, + Object? filterConfig = freezed, Object? items = null, Object? next = freezed, Object? prev = freezed, @@ -105,6 +111,10 @@ class _$QueryReviewQueueResponseCopyWithImpl<$Res> ? _self.duration : duration // ignore: cast_nullable_to_non_nullable as String, + filterConfig: freezed == filterConfig + ? _self.filterConfig + : filterConfig // ignore: cast_nullable_to_non_nullable + as FilterConfigResponse?, items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/query_review_queue_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/query_review_queue_response.g.dart index bc967041..74b39f1c 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/query_review_queue_response.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/query_review_queue_response.g.dart @@ -18,6 +18,10 @@ QueryReviewQueueResponse _$QueryReviewQueueResponseFromJson( .toList()), ), duration: json['duration'] as String, + filterConfig: json['filter_config'] == null + ? null + : FilterConfigResponse.fromJson( + json['filter_config'] as Map), items: (json['items'] as List) .map((e) => ReviewQueueItemResponse.fromJson(e as Map)) @@ -33,6 +37,7 @@ Map _$QueryReviewQueueResponseToJson( 'action_config': instance.actionConfig .map((k, e) => MapEntry(k, e.map((e) => e.toJson()).toList())), 'duration': instance.duration, + 'filter_config': instance.filterConfig?.toJson(), 'items': instance.items.map((e) => e.toJson()).toList(), 'next': instance.next, 'prev': instance.prev, diff --git a/packages/stream_feeds/lib/src/generated/api/model/reaction.dart b/packages/stream_feeds/lib/src/generated/api/model/reaction.dart index b80f1e91..1155901b 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/reaction.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/reaction.dart @@ -18,31 +18,68 @@ part 'reaction.freezed.dart'; @JsonSerializable() class Reaction with _$Reaction { const Reaction({ + required this.activityId, + this.childrenCounts, required this.createdAt, - required this.custom, - required this.messageId, - required this.score, - required this.type, + this.data, + this.deletedAt, + this.id, + required this.kind, + this.latestChildren, + this.moderation, + this.ownChildren, + this.parent, + this.score, + this.targetFeeds, + this.targetFeedsExtraData, required this.updatedAt, this.user, - this.userId, + required this.userId, }); + @override + final String activityId; + + @override + final Map? childrenCounts; + @override @EpochDateTimeConverter() final DateTime createdAt; @override - final Map custom; + final Map? data; + + @override + @EpochDateTimeConverter() + final DateTime? deletedAt; + + @override + final String? id; + + @override + final String kind; + + @override + final Map>? latestChildren; + + @override + final Map? moderation; + + @override + final Map>? ownChildren; + + @override + final String? parent; @override - final String messageId; + final double? score; @override - final int score; + final List? targetFeeds; @override - final String type; + final Map? targetFeedsExtraData; @override @EpochDateTimeConverter() @@ -52,7 +89,7 @@ class Reaction with _$Reaction { final User? user; @override - final String? userId; + final String userId; Map toJson() => _$ReactionToJson(this); diff --git a/packages/stream_feeds/lib/src/generated/api/model/reaction.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/reaction.freezed.dart index a23dbc22..85d13419 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/reaction.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/reaction.freezed.dart @@ -15,14 +15,23 @@ T _$identity(T value) => value; /// @nodoc mixin _$Reaction { + String get activityId; + Map? get childrenCounts; DateTime get createdAt; - Map get custom; - String get messageId; - int get score; - String get type; + Map? get data; + DateTime? get deletedAt; + String? get id; + String get kind; + Map>? get latestChildren; + Map? get moderation; + Map>? get ownChildren; + String? get parent; + double? get score; + List? get targetFeeds; + Map? get targetFeedsExtraData; DateTime get updatedAt; User? get user; - String? get userId; + String get userId; /// Create a copy of Reaction /// with the given fields replaced by the non-null parameter values. @@ -36,13 +45,29 @@ mixin _$Reaction { return identical(this, other) || (other.runtimeType == runtimeType && other is Reaction && + (identical(other.activityId, activityId) || + other.activityId == activityId) && + const DeepCollectionEquality() + .equals(other.childrenCounts, childrenCounts) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && - const DeepCollectionEquality().equals(other.custom, custom) && - (identical(other.messageId, messageId) || - other.messageId == messageId) && + const DeepCollectionEquality().equals(other.data, data) && + (identical(other.deletedAt, deletedAt) || + other.deletedAt == deletedAt) && + (identical(other.id, id) || other.id == id) && + (identical(other.kind, kind) || other.kind == kind) && + const DeepCollectionEquality() + .equals(other.latestChildren, latestChildren) && + const DeepCollectionEquality() + .equals(other.moderation, moderation) && + const DeepCollectionEquality() + .equals(other.ownChildren, ownChildren) && + (identical(other.parent, parent) || other.parent == parent) && (identical(other.score, score) || other.score == score) && - (identical(other.type, type) || other.type == type) && + const DeepCollectionEquality() + .equals(other.targetFeeds, targetFeeds) && + const DeepCollectionEquality() + .equals(other.targetFeedsExtraData, targetFeedsExtraData) && (identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) && (identical(other.user, user) || other.user == user) && @@ -52,18 +77,27 @@ mixin _$Reaction { @override int get hashCode => Object.hash( runtimeType, + activityId, + const DeepCollectionEquality().hash(childrenCounts), createdAt, - const DeepCollectionEquality().hash(custom), - messageId, + const DeepCollectionEquality().hash(data), + deletedAt, + id, + kind, + const DeepCollectionEquality().hash(latestChildren), + const DeepCollectionEquality().hash(moderation), + const DeepCollectionEquality().hash(ownChildren), + parent, score, - type, + const DeepCollectionEquality().hash(targetFeeds), + const DeepCollectionEquality().hash(targetFeedsExtraData), updatedAt, user, userId); @override String toString() { - return 'Reaction(createdAt: $createdAt, custom: $custom, messageId: $messageId, score: $score, type: $type, updatedAt: $updatedAt, user: $user, userId: $userId)'; + return 'Reaction(activityId: $activityId, childrenCounts: $childrenCounts, createdAt: $createdAt, data: $data, deletedAt: $deletedAt, id: $id, kind: $kind, latestChildren: $latestChildren, moderation: $moderation, ownChildren: $ownChildren, parent: $parent, score: $score, targetFeeds: $targetFeeds, targetFeedsExtraData: $targetFeedsExtraData, updatedAt: $updatedAt, user: $user, userId: $userId)'; } } @@ -73,14 +107,23 @@ abstract mixin class $ReactionCopyWith<$Res> { _$ReactionCopyWithImpl; @useResult $Res call( - {DateTime createdAt, - Map custom, - String messageId, - int score, - String type, + {String activityId, + Map? childrenCounts, + DateTime createdAt, + Map? data, + DateTime? deletedAt, + String? id, + String kind, + Map>? latestChildren, + Map? moderation, + Map>? ownChildren, + String? parent, + double? score, + List? targetFeeds, + Map? targetFeedsExtraData, DateTime updatedAt, User? user, - String? userId}); + String userId}); } /// @nodoc @@ -95,36 +138,81 @@ class _$ReactionCopyWithImpl<$Res> implements $ReactionCopyWith<$Res> { @pragma('vm:prefer-inline') @override $Res call({ + Object? activityId = null, + Object? childrenCounts = freezed, Object? createdAt = null, - Object? custom = null, - Object? messageId = null, - Object? score = null, - Object? type = null, + Object? data = freezed, + Object? deletedAt = freezed, + Object? id = freezed, + Object? kind = null, + Object? latestChildren = freezed, + Object? moderation = freezed, + Object? ownChildren = freezed, + Object? parent = freezed, + Object? score = freezed, + Object? targetFeeds = freezed, + Object? targetFeedsExtraData = freezed, Object? updatedAt = null, Object? user = freezed, - Object? userId = freezed, + Object? userId = null, }) { return _then(Reaction( + activityId: null == activityId + ? _self.activityId + : activityId // ignore: cast_nullable_to_non_nullable + as String, + childrenCounts: freezed == childrenCounts + ? _self.childrenCounts + : childrenCounts // ignore: cast_nullable_to_non_nullable + as Map?, createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime, - custom: null == custom - ? _self.custom - : custom // ignore: cast_nullable_to_non_nullable - as Map, - messageId: null == messageId - ? _self.messageId - : messageId // ignore: cast_nullable_to_non_nullable + data: freezed == data + ? _self.data + : data // ignore: cast_nullable_to_non_nullable + as Map?, + deletedAt: freezed == deletedAt + ? _self.deletedAt + : deletedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + id: freezed == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String?, + kind: null == kind + ? _self.kind + : kind // ignore: cast_nullable_to_non_nullable as String, - score: null == score + latestChildren: freezed == latestChildren + ? _self.latestChildren + : latestChildren // ignore: cast_nullable_to_non_nullable + as Map>?, + moderation: freezed == moderation + ? _self.moderation + : moderation // ignore: cast_nullable_to_non_nullable + as Map?, + ownChildren: freezed == ownChildren + ? _self.ownChildren + : ownChildren // ignore: cast_nullable_to_non_nullable + as Map>?, + parent: freezed == parent + ? _self.parent + : parent // ignore: cast_nullable_to_non_nullable + as String?, + score: freezed == score ? _self.score : score // ignore: cast_nullable_to_non_nullable - as int, - type: null == type - ? _self.type - : type // ignore: cast_nullable_to_non_nullable - as String, + as double?, + targetFeeds: freezed == targetFeeds + ? _self.targetFeeds + : targetFeeds // ignore: cast_nullable_to_non_nullable + as List?, + targetFeedsExtraData: freezed == targetFeedsExtraData + ? _self.targetFeedsExtraData + : targetFeedsExtraData // ignore: cast_nullable_to_non_nullable + as Map?, updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable @@ -133,10 +221,10 @@ class _$ReactionCopyWithImpl<$Res> implements $ReactionCopyWith<$Res> { ? _self.user : user // ignore: cast_nullable_to_non_nullable as User?, - userId: freezed == userId + userId: null == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable - as String?, + as String, )); } } diff --git a/packages/stream_feeds/lib/src/generated/api/model/reaction.g.dart b/packages/stream_feeds/lib/src/generated/api/model/reaction.g.dart index f384b162..ccadc46f 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/reaction.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/reaction.g.dart @@ -7,27 +7,76 @@ part of 'reaction.dart'; // ************************************************************************** Reaction _$ReactionFromJson(Map json) => Reaction( + activityId: json['activity_id'] as String, + childrenCounts: json['children_counts'] as Map?, createdAt: const EpochDateTimeConverter() .fromJson((json['created_at'] as num).toInt()), - custom: json['custom'] as Map, - messageId: json['message_id'] as String, - score: (json['score'] as num).toInt(), - type: json['type'] as String, + data: json['data'] as Map?, + deletedAt: _$JsonConverterFromJson( + json['deleted_at'], const EpochDateTimeConverter().fromJson), + id: json['id'] as String?, + kind: json['kind'] as String, + latestChildren: (json['latest_children'] as Map?)?.map( + (k, e) => MapEntry( + k, + (e as List) + .map((e) => Reaction.fromJson(e as Map)) + .toList()), + ), + moderation: json['moderation'] as Map?, + ownChildren: (json['own_children'] as Map?)?.map( + (k, e) => MapEntry( + k, + (e as List) + .map((e) => Reaction.fromJson(e as Map)) + .toList()), + ), + parent: json['parent'] as String?, + score: (json['score'] as num?)?.toDouble(), + targetFeeds: (json['target_feeds'] as List?) + ?.map((e) => e as String) + .toList(), + targetFeedsExtraData: + json['target_feeds_extra_data'] as Map?, updatedAt: const EpochDateTimeConverter() .fromJson((json['updated_at'] as num).toInt()), user: json['user'] == null ? null : User.fromJson(json['user'] as Map), - userId: json['user_id'] as String?, + userId: json['user_id'] as String, ); Map _$ReactionToJson(Reaction instance) => { + 'activity_id': instance.activityId, + 'children_counts': instance.childrenCounts, 'created_at': const EpochDateTimeConverter().toJson(instance.createdAt), - 'custom': instance.custom, - 'message_id': instance.messageId, + 'data': instance.data, + 'deleted_at': _$JsonConverterToJson( + instance.deletedAt, const EpochDateTimeConverter().toJson), + 'id': instance.id, + 'kind': instance.kind, + 'latest_children': instance.latestChildren + ?.map((k, e) => MapEntry(k, e.map((e) => e.toJson()).toList())), + 'moderation': instance.moderation, + 'own_children': instance.ownChildren + ?.map((k, e) => MapEntry(k, e.map((e) => e.toJson()).toList())), + 'parent': instance.parent, 'score': instance.score, - 'type': instance.type, + 'target_feeds': instance.targetFeeds, + 'target_feeds_extra_data': instance.targetFeedsExtraData, 'updated_at': const EpochDateTimeConverter().toJson(instance.updatedAt), 'user': instance.user?.toJson(), 'user_id': instance.userId, }; + +Value? _$JsonConverterFromJson( + Object? json, + Value? Function(Json json) fromJson, +) => + json == null ? null : fromJson(json as Json); + +Json? _$JsonConverterToJson( + Value? value, + Json? Function(Value value) toJson, +) => + value == null ? null : toJson(value); diff --git a/packages/stream_feeds/lib/src/generated/api/model/read_collections_response.dart b/packages/stream_feeds/lib/src/generated/api/model/read_collections_response.dart new file mode 100644 index 00000000..43e40ac0 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/read_collections_response.dart @@ -0,0 +1,35 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'read_collections_response.g.dart'; +part 'read_collections_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ReadCollectionsResponse with _$ReadCollectionsResponse { + const ReadCollectionsResponse({ + required this.collections, + required this.duration, + }); + + @override + final List collections; + + @override + final String duration; + + Map toJson() => _$ReadCollectionsResponseToJson(this); + + static ReadCollectionsResponse fromJson(Map json) => + _$ReadCollectionsResponseFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/read_collections_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/read_collections_response.freezed.dart new file mode 100644 index 00000000..199c4806 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/read_collections_response.freezed.dart @@ -0,0 +1,88 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'read_collections_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$ReadCollectionsResponse { + List get collections; + String get duration; + + /// Create a copy of ReadCollectionsResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ReadCollectionsResponseCopyWith get copyWith => + _$ReadCollectionsResponseCopyWithImpl( + this as ReadCollectionsResponse, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ReadCollectionsResponse && + const DeepCollectionEquality() + .equals(other.collections, collections) && + (identical(other.duration, duration) || + other.duration == duration)); + } + + @override + int get hashCode => Object.hash( + runtimeType, const DeepCollectionEquality().hash(collections), duration); + + @override + String toString() { + return 'ReadCollectionsResponse(collections: $collections, duration: $duration)'; + } +} + +/// @nodoc +abstract mixin class $ReadCollectionsResponseCopyWith<$Res> { + factory $ReadCollectionsResponseCopyWith(ReadCollectionsResponse value, + $Res Function(ReadCollectionsResponse) _then) = + _$ReadCollectionsResponseCopyWithImpl; + @useResult + $Res call({List collections, String duration}); +} + +/// @nodoc +class _$ReadCollectionsResponseCopyWithImpl<$Res> + implements $ReadCollectionsResponseCopyWith<$Res> { + _$ReadCollectionsResponseCopyWithImpl(this._self, this._then); + + final ReadCollectionsResponse _self; + final $Res Function(ReadCollectionsResponse) _then; + + /// Create a copy of ReadCollectionsResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? collections = null, + Object? duration = null, + }) { + return _then(ReadCollectionsResponse( + collections: null == collections + ? _self.collections + : collections // ignore: cast_nullable_to_non_nullable + as List, + duration: null == duration + ? _self.duration + : duration // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/read_collections_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/read_collections_response.g.dart new file mode 100644 index 00000000..b18135a5 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/read_collections_response.g.dart @@ -0,0 +1,23 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'read_collections_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ReadCollectionsResponse _$ReadCollectionsResponseFromJson( + Map json) => + ReadCollectionsResponse( + collections: (json['collections'] as List) + .map((e) => CollectionResponse.fromJson(e as Map)) + .toList(), + duration: json['duration'] as String, + ); + +Map _$ReadCollectionsResponseToJson( + ReadCollectionsResponse instance) => + { + 'collections': instance.collections.map((e) => e.toJson()).toList(), + 'duration': instance.duration, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/reminder_response_data.dart b/packages/stream_feeds/lib/src/generated/api/model/reminder_response_data.dart index 82f83518..651423ab 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/reminder_response_data.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/reminder_response_data.dart @@ -40,7 +40,7 @@ class ReminderResponseData with _$ReminderResponseData { final DateTime createdAt; @override - final Message? message; + final MessageResponse? message; @override final String messageId; @@ -54,7 +54,7 @@ class ReminderResponseData with _$ReminderResponseData { final DateTime updatedAt; @override - final User? user; + final UserResponse? user; @override final String userId; diff --git a/packages/stream_feeds/lib/src/generated/api/model/reminder_response_data.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/reminder_response_data.freezed.dart index cdc13341..5698227a 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/reminder_response_data.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/reminder_response_data.freezed.dart @@ -18,11 +18,11 @@ mixin _$ReminderResponseData { ChannelResponse? get channel; String get channelCid; DateTime get createdAt; - Message? get message; + MessageResponse? get message; String get messageId; DateTime? get remindAt; DateTime get updatedAt; - User? get user; + UserResponse? get user; String get userId; /// Create a copy of ReminderResponseData @@ -74,11 +74,11 @@ abstract mixin class $ReminderResponseDataCopyWith<$Res> { {ChannelResponse? channel, String channelCid, DateTime createdAt, - Message? message, + MessageResponse? message, String messageId, DateTime? remindAt, DateTime updatedAt, - User? user, + UserResponse? user, String userId}); } @@ -121,7 +121,7 @@ class _$ReminderResponseDataCopyWithImpl<$Res> message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable - as Message?, + as MessageResponse?, messageId: null == messageId ? _self.messageId : messageId // ignore: cast_nullable_to_non_nullable @@ -137,7 +137,7 @@ class _$ReminderResponseDataCopyWithImpl<$Res> user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable - as User?, + as UserResponse?, userId: null == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/reminder_response_data.g.dart b/packages/stream_feeds/lib/src/generated/api/model/reminder_response_data.g.dart index ba91e8d1..9ad29aa6 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/reminder_response_data.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/reminder_response_data.g.dart @@ -17,7 +17,7 @@ ReminderResponseData _$ReminderResponseDataFromJson( .fromJson((json['created_at'] as num).toInt()), message: json['message'] == null ? null - : Message.fromJson(json['message'] as Map), + : MessageResponse.fromJson(json['message'] as Map), messageId: json['message_id'] as String, remindAt: _$JsonConverterFromJson( json['remind_at'], const EpochDateTimeConverter().fromJson), @@ -25,7 +25,7 @@ ReminderResponseData _$ReminderResponseDataFromJson( .fromJson((json['updated_at'] as num).toInt()), user: json['user'] == null ? null - : User.fromJson(json['user'] as Map), + : UserResponse.fromJson(json['user'] as Map), userId: json['user_id'] as String, ); diff --git a/packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.dart b/packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.dart index 51029de0..6e33bddd 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.dart @@ -33,10 +33,13 @@ class ReviewQueueItemResponse with _$ReviewQueueItemResponse { required this.entityType, this.feedsV2Activity, this.feedsV2Reaction, + this.feedsV3Activity, + this.feedsV3Comment, required this.flags, required this.flagsCount, required this.id, required this.languages, + required this.latestModeratorAction, this.message, this.moderationPayload, this.reaction, @@ -96,6 +99,12 @@ class ReviewQueueItemResponse with _$ReviewQueueItemResponse { @override final Reaction? feedsV2Reaction; + @override + final ActivityResponse? feedsV3Activity; + + @override + final CommentResponse? feedsV3Comment; + @override final List flags; @@ -108,6 +117,9 @@ class ReviewQueueItemResponse with _$ReviewQueueItemResponse { @override final List languages; + @override + final String latestModeratorAction; + @override final MessageResponse? message; diff --git a/packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.freezed.dart index 5fdc518e..252adce5 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.freezed.dart @@ -30,10 +30,13 @@ mixin _$ReviewQueueItemResponse { String get entityType; EnrichedActivity? get feedsV2Activity; Reaction? get feedsV2Reaction; + ActivityResponse? get feedsV3Activity; + CommentResponse? get feedsV3Comment; List get flags; int get flagsCount; String get id; List get languages; + String get latestModeratorAction; MessageResponse? get message; ModerationPayload? get moderationPayload; Reaction? get reaction; @@ -85,11 +88,17 @@ mixin _$ReviewQueueItemResponse { other.feedsV2Activity == feedsV2Activity) && (identical(other.feedsV2Reaction, feedsV2Reaction) || other.feedsV2Reaction == feedsV2Reaction) && + (identical(other.feedsV3Activity, feedsV3Activity) || + other.feedsV3Activity == feedsV3Activity) && + (identical(other.feedsV3Comment, feedsV3Comment) || + other.feedsV3Comment == feedsV3Comment) && const DeepCollectionEquality().equals(other.flags, flags) && (identical(other.flagsCount, flagsCount) || other.flagsCount == flagsCount) && (identical(other.id, id) || other.id == id) && const DeepCollectionEquality().equals(other.languages, languages) && + (identical(other.latestModeratorAction, latestModeratorAction) || + other.latestModeratorAction == latestModeratorAction) && (identical(other.message, message) || other.message == message) && (identical(other.moderationPayload, moderationPayload) || other.moderationPayload == moderationPayload) && @@ -127,10 +136,13 @@ mixin _$ReviewQueueItemResponse { entityType, feedsV2Activity, feedsV2Reaction, + feedsV3Activity, + feedsV3Comment, const DeepCollectionEquality().hash(flags), flagsCount, id, const DeepCollectionEquality().hash(languages), + latestModeratorAction, message, moderationPayload, reaction, @@ -145,7 +157,7 @@ mixin _$ReviewQueueItemResponse { @override String toString() { - return 'ReviewQueueItemResponse(actions: $actions, activity: $activity, aiTextSeverity: $aiTextSeverity, assignedTo: $assignedTo, bans: $bans, call: $call, completedAt: $completedAt, configKey: $configKey, createdAt: $createdAt, entityCreator: $entityCreator, entityCreatorId: $entityCreatorId, entityId: $entityId, entityType: $entityType, feedsV2Activity: $feedsV2Activity, feedsV2Reaction: $feedsV2Reaction, flags: $flags, flagsCount: $flagsCount, id: $id, languages: $languages, message: $message, moderationPayload: $moderationPayload, reaction: $reaction, recommendedAction: $recommendedAction, reviewedAt: $reviewedAt, reviewedBy: $reviewedBy, severity: $severity, status: $status, teams: $teams, updatedAt: $updatedAt)'; + return 'ReviewQueueItemResponse(actions: $actions, activity: $activity, aiTextSeverity: $aiTextSeverity, assignedTo: $assignedTo, bans: $bans, call: $call, completedAt: $completedAt, configKey: $configKey, createdAt: $createdAt, entityCreator: $entityCreator, entityCreatorId: $entityCreatorId, entityId: $entityId, entityType: $entityType, feedsV2Activity: $feedsV2Activity, feedsV2Reaction: $feedsV2Reaction, feedsV3Activity: $feedsV3Activity, feedsV3Comment: $feedsV3Comment, flags: $flags, flagsCount: $flagsCount, id: $id, languages: $languages, latestModeratorAction: $latestModeratorAction, message: $message, moderationPayload: $moderationPayload, reaction: $reaction, recommendedAction: $recommendedAction, reviewedAt: $reviewedAt, reviewedBy: $reviewedBy, severity: $severity, status: $status, teams: $teams, updatedAt: $updatedAt)'; } } @@ -171,10 +183,13 @@ abstract mixin class $ReviewQueueItemResponseCopyWith<$Res> { String entityType, EnrichedActivity? feedsV2Activity, Reaction? feedsV2Reaction, + ActivityResponse? feedsV3Activity, + CommentResponse? feedsV3Comment, List flags, int flagsCount, String id, List languages, + String latestModeratorAction, MessageResponse? message, ModerationPayload? moderationPayload, Reaction? reaction, @@ -215,10 +230,13 @@ class _$ReviewQueueItemResponseCopyWithImpl<$Res> Object? entityType = null, Object? feedsV2Activity = freezed, Object? feedsV2Reaction = freezed, + Object? feedsV3Activity = freezed, + Object? feedsV3Comment = freezed, Object? flags = null, Object? flagsCount = null, Object? id = null, Object? languages = null, + Object? latestModeratorAction = null, Object? message = freezed, Object? moderationPayload = freezed, Object? reaction = freezed, @@ -291,6 +309,14 @@ class _$ReviewQueueItemResponseCopyWithImpl<$Res> ? _self.feedsV2Reaction : feedsV2Reaction // ignore: cast_nullable_to_non_nullable as Reaction?, + feedsV3Activity: freezed == feedsV3Activity + ? _self.feedsV3Activity + : feedsV3Activity // ignore: cast_nullable_to_non_nullable + as ActivityResponse?, + feedsV3Comment: freezed == feedsV3Comment + ? _self.feedsV3Comment + : feedsV3Comment // ignore: cast_nullable_to_non_nullable + as CommentResponse?, flags: null == flags ? _self.flags : flags // ignore: cast_nullable_to_non_nullable @@ -307,6 +333,10 @@ class _$ReviewQueueItemResponseCopyWithImpl<$Res> ? _self.languages : languages // ignore: cast_nullable_to_non_nullable as List, + latestModeratorAction: null == latestModeratorAction + ? _self.latestModeratorAction + : latestModeratorAction // ignore: cast_nullable_to_non_nullable + as String, message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.g.dart index 4b08e5e7..3ac71271 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.g.dart @@ -45,6 +45,14 @@ ReviewQueueItemResponse _$ReviewQueueItemResponseFromJson( ? null : Reaction.fromJson( json['feeds_v2_reaction'] as Map), + feedsV3Activity: json['feeds_v3_activity'] == null + ? null + : ActivityResponse.fromJson( + json['feeds_v3_activity'] as Map), + feedsV3Comment: json['feeds_v3_comment'] == null + ? null + : CommentResponse.fromJson( + json['feeds_v3_comment'] as Map), flags: (json['flags'] as List) .map( (e) => ModerationFlagResponse.fromJson(e as Map)) @@ -53,6 +61,7 @@ ReviewQueueItemResponse _$ReviewQueueItemResponseFromJson( id: json['id'] as String, languages: (json['languages'] as List).map((e) => e as String).toList(), + latestModeratorAction: json['latest_moderator_action'] as String, message: json['message'] == null ? null : MessageResponse.fromJson(json['message'] as Map), @@ -94,10 +103,13 @@ Map _$ReviewQueueItemResponseToJson( 'entity_type': instance.entityType, 'feeds_v2_activity': instance.feedsV2Activity?.toJson(), 'feeds_v2_reaction': instance.feedsV2Reaction?.toJson(), + 'feeds_v3_activity': instance.feedsV3Activity?.toJson(), + 'feeds_v3_comment': instance.feedsV3Comment?.toJson(), 'flags': instance.flags.map((e) => e.toJson()).toList(), 'flags_count': instance.flagsCount, 'id': instance.id, 'languages': instance.languages, + 'latest_moderator_action': instance.latestModeratorAction, 'message': instance.message?.toJson(), 'moderation_payload': instance.moderationPayload?.toJson(), 'reaction': instance.reaction?.toJson(), diff --git a/packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.dart b/packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.dart index 26402aba..80914198 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.dart @@ -20,6 +20,7 @@ class RuleBuilderCondition with _$RuleBuilderCondition { const RuleBuilderCondition({ this.confidence, this.contentCountRuleParams, + this.contentFlagCountRuleParams, this.imageContentParams, this.imageRuleParams, this.textContentParams, @@ -27,6 +28,7 @@ class RuleBuilderCondition with _$RuleBuilderCondition { this.type, this.userCreatedWithinParams, this.userCustomPropertyParams, + this.userFlagCountRuleParams, this.userRuleParams, this.videoContentParams, this.videoRuleParams, @@ -38,6 +40,9 @@ class RuleBuilderCondition with _$RuleBuilderCondition { @override final ContentCountRuleParameters? contentCountRuleParams; + @override + final FlagCountRuleParameters? contentFlagCountRuleParams; + @override final ImageContentParameters? imageContentParams; @@ -59,6 +64,9 @@ class RuleBuilderCondition with _$RuleBuilderCondition { @override final UserCustomPropertyParameters? userCustomPropertyParams; + @override + final FlagCountRuleParameters? userFlagCountRuleParams; + @override final UserRuleParameters? userRuleParams; diff --git a/packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.freezed.dart index b4e46a0e..a91af300 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.freezed.dart @@ -17,6 +17,7 @@ T _$identity(T value) => value; mixin _$RuleBuilderCondition { double? get confidence; ContentCountRuleParameters? get contentCountRuleParams; + FlagCountRuleParameters? get contentFlagCountRuleParams; ImageContentParameters? get imageContentParams; ImageRuleParameters? get imageRuleParams; TextContentParameters? get textContentParams; @@ -24,6 +25,7 @@ mixin _$RuleBuilderCondition { String? get type; UserCreatedWithinParameters? get userCreatedWithinParams; UserCustomPropertyParameters? get userCustomPropertyParams; + FlagCountRuleParameters? get userFlagCountRuleParams; UserRuleParameters? get userRuleParams; VideoContentParameters? get videoContentParams; VideoRuleParameters? get videoRuleParams; @@ -45,6 +47,10 @@ mixin _$RuleBuilderCondition { other.confidence == confidence) && (identical(other.contentCountRuleParams, contentCountRuleParams) || other.contentCountRuleParams == contentCountRuleParams) && + (identical(other.contentFlagCountRuleParams, + contentFlagCountRuleParams) || + other.contentFlagCountRuleParams == + contentFlagCountRuleParams) && (identical(other.imageContentParams, imageContentParams) || other.imageContentParams == imageContentParams) && (identical(other.imageRuleParams, imageRuleParams) || @@ -60,6 +66,9 @@ mixin _$RuleBuilderCondition { (identical( other.userCustomPropertyParams, userCustomPropertyParams) || other.userCustomPropertyParams == userCustomPropertyParams) && + (identical( + other.userFlagCountRuleParams, userFlagCountRuleParams) || + other.userFlagCountRuleParams == userFlagCountRuleParams) && (identical(other.userRuleParams, userRuleParams) || other.userRuleParams == userRuleParams) && (identical(other.videoContentParams, videoContentParams) || @@ -73,6 +82,7 @@ mixin _$RuleBuilderCondition { runtimeType, confidence, contentCountRuleParams, + contentFlagCountRuleParams, imageContentParams, imageRuleParams, textContentParams, @@ -80,13 +90,14 @@ mixin _$RuleBuilderCondition { type, userCreatedWithinParams, userCustomPropertyParams, + userFlagCountRuleParams, userRuleParams, videoContentParams, videoRuleParams); @override String toString() { - return 'RuleBuilderCondition(confidence: $confidence, contentCountRuleParams: $contentCountRuleParams, imageContentParams: $imageContentParams, imageRuleParams: $imageRuleParams, textContentParams: $textContentParams, textRuleParams: $textRuleParams, type: $type, userCreatedWithinParams: $userCreatedWithinParams, userCustomPropertyParams: $userCustomPropertyParams, userRuleParams: $userRuleParams, videoContentParams: $videoContentParams, videoRuleParams: $videoRuleParams)'; + return 'RuleBuilderCondition(confidence: $confidence, contentCountRuleParams: $contentCountRuleParams, contentFlagCountRuleParams: $contentFlagCountRuleParams, imageContentParams: $imageContentParams, imageRuleParams: $imageRuleParams, textContentParams: $textContentParams, textRuleParams: $textRuleParams, type: $type, userCreatedWithinParams: $userCreatedWithinParams, userCustomPropertyParams: $userCustomPropertyParams, userFlagCountRuleParams: $userFlagCountRuleParams, userRuleParams: $userRuleParams, videoContentParams: $videoContentParams, videoRuleParams: $videoRuleParams)'; } } @@ -99,6 +110,7 @@ abstract mixin class $RuleBuilderConditionCopyWith<$Res> { $Res call( {double? confidence, ContentCountRuleParameters? contentCountRuleParams, + FlagCountRuleParameters? contentFlagCountRuleParams, ImageContentParameters? imageContentParams, ImageRuleParameters? imageRuleParams, TextContentParameters? textContentParams, @@ -106,6 +118,7 @@ abstract mixin class $RuleBuilderConditionCopyWith<$Res> { String? type, UserCreatedWithinParameters? userCreatedWithinParams, UserCustomPropertyParameters? userCustomPropertyParams, + FlagCountRuleParameters? userFlagCountRuleParams, UserRuleParameters? userRuleParams, VideoContentParameters? videoContentParams, VideoRuleParameters? videoRuleParams}); @@ -126,6 +139,7 @@ class _$RuleBuilderConditionCopyWithImpl<$Res> $Res call({ Object? confidence = freezed, Object? contentCountRuleParams = freezed, + Object? contentFlagCountRuleParams = freezed, Object? imageContentParams = freezed, Object? imageRuleParams = freezed, Object? textContentParams = freezed, @@ -133,6 +147,7 @@ class _$RuleBuilderConditionCopyWithImpl<$Res> Object? type = freezed, Object? userCreatedWithinParams = freezed, Object? userCustomPropertyParams = freezed, + Object? userFlagCountRuleParams = freezed, Object? userRuleParams = freezed, Object? videoContentParams = freezed, Object? videoRuleParams = freezed, @@ -146,6 +161,10 @@ class _$RuleBuilderConditionCopyWithImpl<$Res> ? _self.contentCountRuleParams : contentCountRuleParams // ignore: cast_nullable_to_non_nullable as ContentCountRuleParameters?, + contentFlagCountRuleParams: freezed == contentFlagCountRuleParams + ? _self.contentFlagCountRuleParams + : contentFlagCountRuleParams // ignore: cast_nullable_to_non_nullable + as FlagCountRuleParameters?, imageContentParams: freezed == imageContentParams ? _self.imageContentParams : imageContentParams // ignore: cast_nullable_to_non_nullable @@ -174,6 +193,10 @@ class _$RuleBuilderConditionCopyWithImpl<$Res> ? _self.userCustomPropertyParams : userCustomPropertyParams // ignore: cast_nullable_to_non_nullable as UserCustomPropertyParameters?, + userFlagCountRuleParams: freezed == userFlagCountRuleParams + ? _self.userFlagCountRuleParams + : userFlagCountRuleParams // ignore: cast_nullable_to_non_nullable + as FlagCountRuleParameters?, userRuleParams: freezed == userRuleParams ? _self.userRuleParams : userRuleParams // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.g.dart b/packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.g.dart index 0391bbd7..52a241b7 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.g.dart @@ -14,6 +14,10 @@ RuleBuilderCondition _$RuleBuilderConditionFromJson( ? null : ContentCountRuleParameters.fromJson( json['content_count_rule_params'] as Map), + contentFlagCountRuleParams: json['content_flag_count_rule_params'] == null + ? null + : FlagCountRuleParameters.fromJson( + json['content_flag_count_rule_params'] as Map), imageContentParams: json['image_content_params'] == null ? null : ImageContentParameters.fromJson( @@ -39,6 +43,10 @@ RuleBuilderCondition _$RuleBuilderConditionFromJson( ? null : UserCustomPropertyParameters.fromJson( json['user_custom_property_params'] as Map), + userFlagCountRuleParams: json['user_flag_count_rule_params'] == null + ? null + : FlagCountRuleParameters.fromJson( + json['user_flag_count_rule_params'] as Map), userRuleParams: json['user_rule_params'] == null ? null : UserRuleParameters.fromJson( @@ -58,6 +66,8 @@ Map _$RuleBuilderConditionToJson( { 'confidence': instance.confidence, 'content_count_rule_params': instance.contentCountRuleParams?.toJson(), + 'content_flag_count_rule_params': + instance.contentFlagCountRuleParams?.toJson(), 'image_content_params': instance.imageContentParams?.toJson(), 'image_rule_params': instance.imageRuleParams?.toJson(), 'text_content_params': instance.textContentParams?.toJson(), @@ -66,6 +76,7 @@ Map _$RuleBuilderConditionToJson( 'user_created_within_params': instance.userCreatedWithinParams?.toJson(), 'user_custom_property_params': instance.userCustomPropertyParams?.toJson(), + 'user_flag_count_rule_params': instance.userFlagCountRuleParams?.toJson(), 'user_rule_params': instance.userRuleParams?.toJson(), 'video_content_params': instance.videoContentParams?.toJson(), 'video_rule_params': instance.videoRuleParams?.toJson(), diff --git a/packages/stream_feeds/lib/src/generated/api/model/shadow_block_action_request.dart b/packages/stream_feeds/lib/src/generated/api/model/shadow_block_action_request.dart new file mode 100644 index 00000000..35ba6bd7 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/shadow_block_action_request.dart @@ -0,0 +1,31 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'shadow_block_action_request.g.dart'; +part 'shadow_block_action_request.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ShadowBlockActionRequest with _$ShadowBlockActionRequest { + const ShadowBlockActionRequest({ + this.reason, + }); + + @override + final String? reason; + + Map toJson() => _$ShadowBlockActionRequestToJson(this); + + static ShadowBlockActionRequest fromJson(Map json) => + _$ShadowBlockActionRequestFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/shadow_block_action_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/shadow_block_action_request.freezed.dart new file mode 100644 index 00000000..e18aec79 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/shadow_block_action_request.freezed.dart @@ -0,0 +1,78 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'shadow_block_action_request.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$ShadowBlockActionRequest { + String? get reason; + + /// Create a copy of ShadowBlockActionRequest + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ShadowBlockActionRequestCopyWith get copyWith => + _$ShadowBlockActionRequestCopyWithImpl( + this as ShadowBlockActionRequest, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ShadowBlockActionRequest && + (identical(other.reason, reason) || other.reason == reason)); + } + + @override + int get hashCode => Object.hash(runtimeType, reason); + + @override + String toString() { + return 'ShadowBlockActionRequest(reason: $reason)'; + } +} + +/// @nodoc +abstract mixin class $ShadowBlockActionRequestCopyWith<$Res> { + factory $ShadowBlockActionRequestCopyWith(ShadowBlockActionRequest value, + $Res Function(ShadowBlockActionRequest) _then) = + _$ShadowBlockActionRequestCopyWithImpl; + @useResult + $Res call({String? reason}); +} + +/// @nodoc +class _$ShadowBlockActionRequestCopyWithImpl<$Res> + implements $ShadowBlockActionRequestCopyWith<$Res> { + _$ShadowBlockActionRequestCopyWithImpl(this._self, this._then); + + final ShadowBlockActionRequest _self; + final $Res Function(ShadowBlockActionRequest) _then; + + /// Create a copy of ShadowBlockActionRequest + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? reason = freezed, + }) { + return _then(ShadowBlockActionRequest( + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/shadow_block_action_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/shadow_block_action_request.g.dart new file mode 100644 index 00000000..0cde8f9f --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/shadow_block_action_request.g.dart @@ -0,0 +1,19 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'shadow_block_action_request.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ShadowBlockActionRequest _$ShadowBlockActionRequestFromJson( + Map json) => + ShadowBlockActionRequest( + reason: json['reason'] as String?, + ); + +Map _$ShadowBlockActionRequestToJson( + ShadowBlockActionRequest instance) => + { + 'reason': instance.reason, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.dart b/packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.dart index 550a6a3a..01df1c31 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.dart @@ -19,6 +19,7 @@ part 'stories_feed_updated_event.freezed.dart'; class StoriesFeedUpdatedEvent extends core.WsEvent with _$StoriesFeedUpdatedEvent { const StoriesFeedUpdatedEvent({ + this.activities, this.aggregatedActivities, required this.createdAt, required this.custom, @@ -29,6 +30,9 @@ class StoriesFeedUpdatedEvent extends core.WsEvent this.user, }); + @override + final List? activities; + @override final List? aggregatedActivities; diff --git a/packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.freezed.dart index 8b5d5282..e3508b78 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.freezed.dart @@ -15,6 +15,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$StoriesFeedUpdatedEvent { + List? get activities; List? get aggregatedActivities; DateTime get createdAt; Map get custom; @@ -38,6 +39,8 @@ mixin _$StoriesFeedUpdatedEvent { (other.runtimeType == runtimeType && other is StoriesFeedUpdatedEvent && super == other && + const DeepCollectionEquality() + .equals(other.activities, activities) && const DeepCollectionEquality() .equals(other.aggregatedActivities, aggregatedActivities) && (identical(other.createdAt, createdAt) || @@ -56,6 +59,7 @@ mixin _$StoriesFeedUpdatedEvent { int get hashCode => Object.hash( runtimeType, super.hashCode, + const DeepCollectionEquality().hash(activities), const DeepCollectionEquality().hash(aggregatedActivities), createdAt, const DeepCollectionEquality().hash(custom), @@ -67,7 +71,7 @@ mixin _$StoriesFeedUpdatedEvent { @override String toString() { - return 'StoriesFeedUpdatedEvent(aggregatedActivities: $aggregatedActivities, createdAt: $createdAt, custom: $custom, feedVisibility: $feedVisibility, fid: $fid, receivedAt: $receivedAt, type: $type, user: $user)'; + return 'StoriesFeedUpdatedEvent(activities: $activities, aggregatedActivities: $aggregatedActivities, createdAt: $createdAt, custom: $custom, feedVisibility: $feedVisibility, fid: $fid, receivedAt: $receivedAt, type: $type, user: $user)'; } } @@ -78,7 +82,8 @@ abstract mixin class $StoriesFeedUpdatedEventCopyWith<$Res> { _$StoriesFeedUpdatedEventCopyWithImpl; @useResult $Res call( - {List? aggregatedActivities, + {List? activities, + List? aggregatedActivities, DateTime createdAt, Map custom, String? feedVisibility, @@ -101,6 +106,7 @@ class _$StoriesFeedUpdatedEventCopyWithImpl<$Res> @pragma('vm:prefer-inline') @override $Res call({ + Object? activities = freezed, Object? aggregatedActivities = freezed, Object? createdAt = null, Object? custom = null, @@ -111,6 +117,10 @@ class _$StoriesFeedUpdatedEventCopyWithImpl<$Res> Object? user = freezed, }) { return _then(StoriesFeedUpdatedEvent( + activities: freezed == activities + ? _self.activities + : activities // ignore: cast_nullable_to_non_nullable + as List?, aggregatedActivities: freezed == aggregatedActivities ? _self.aggregatedActivities : aggregatedActivities // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.g.dart b/packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.g.dart index 7389983d..a9e8ac4e 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.g.dart @@ -9,6 +9,9 @@ part of 'stories_feed_updated_event.dart'; StoriesFeedUpdatedEvent _$StoriesFeedUpdatedEventFromJson( Map json) => StoriesFeedUpdatedEvent( + activities: (json['activities'] as List?) + ?.map((e) => ActivityResponse.fromJson(e as Map)) + .toList(), aggregatedActivities: (json['aggregated_activities'] as List?) ?.map((e) => AggregatedActivityResponse.fromJson(e as Map)) @@ -30,6 +33,7 @@ StoriesFeedUpdatedEvent _$StoriesFeedUpdatedEventFromJson( Map _$StoriesFeedUpdatedEventToJson( StoriesFeedUpdatedEvent instance) => { + 'activities': instance.activities?.map((e) => e.toJson()).toList(), 'aggregated_activities': instance.aggregatedActivities?.map((e) => e.toJson()).toList(), 'created_at': const EpochDateTimeConverter().toJson(instance.createdAt), diff --git a/packages/stream_feeds/lib/src/generated/api/model/submit_action_request.dart b/packages/stream_feeds/lib/src/generated/api/model/submit_action_request.dart index 928ad475..1806cb7e 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/submit_action_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/submit_action_request.dart @@ -17,10 +17,14 @@ part 'submit_action_request.freezed.dart'; enum SubmitActionRequestActionType { @JsonValue('ban') ban, + @JsonValue('block') + block, @JsonValue('custom') custom, @JsonValue('delete_activity') deleteActivity, + @JsonValue('delete_comment') + deleteComment, @JsonValue('delete_message') deleteMessage, @JsonValue('delete_reaction') @@ -54,13 +58,16 @@ class SubmitActionRequest with _$SubmitActionRequest { const SubmitActionRequest({ required this.actionType, this.ban, + this.block, this.custom, this.deleteActivity, + this.deleteComment, this.deleteMessage, this.deleteReaction, this.deleteUser, required this.itemId, this.markReviewed, + this.shadowBlock, }); @override @@ -70,12 +77,18 @@ class SubmitActionRequest with _$SubmitActionRequest { @override final BanActionRequest? ban; + @override + final BlockActionRequest? block; + @override final CustomActionRequest? custom; @override final DeleteActivityRequest? deleteActivity; + @override + final DeleteCommentRequest? deleteComment; + @override final DeleteMessageRequest? deleteMessage; @@ -91,6 +104,9 @@ class SubmitActionRequest with _$SubmitActionRequest { @override final MarkReviewedRequest? markReviewed; + @override + final ShadowBlockActionRequest? shadowBlock; + Map toJson() => _$SubmitActionRequestToJson(this); static SubmitActionRequest fromJson(Map json) => diff --git a/packages/stream_feeds/lib/src/generated/api/model/submit_action_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/submit_action_request.freezed.dart index c06b14f7..d63a6853 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/submit_action_request.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/submit_action_request.freezed.dart @@ -17,13 +17,16 @@ T _$identity(T value) => value; mixin _$SubmitActionRequest { SubmitActionRequestActionType get actionType; BanActionRequest? get ban; + BlockActionRequest? get block; CustomActionRequest? get custom; DeleteActivityRequest? get deleteActivity; + DeleteCommentRequest? get deleteComment; DeleteMessageRequest? get deleteMessage; DeleteReactionRequest? get deleteReaction; DeleteUserRequest? get deleteUser; String get itemId; MarkReviewedRequest? get markReviewed; + ShadowBlockActionRequest? get shadowBlock; /// Create a copy of SubmitActionRequest /// with the given fields replaced by the non-null parameter values. @@ -41,9 +44,12 @@ mixin _$SubmitActionRequest { (identical(other.actionType, actionType) || other.actionType == actionType) && (identical(other.ban, ban) || other.ban == ban) && + (identical(other.block, block) || other.block == block) && (identical(other.custom, custom) || other.custom == custom) && (identical(other.deleteActivity, deleteActivity) || other.deleteActivity == deleteActivity) && + (identical(other.deleteComment, deleteComment) || + other.deleteComment == deleteComment) && (identical(other.deleteMessage, deleteMessage) || other.deleteMessage == deleteMessage) && (identical(other.deleteReaction, deleteReaction) || @@ -52,7 +58,9 @@ mixin _$SubmitActionRequest { other.deleteUser == deleteUser) && (identical(other.itemId, itemId) || other.itemId == itemId) && (identical(other.markReviewed, markReviewed) || - other.markReviewed == markReviewed)); + other.markReviewed == markReviewed) && + (identical(other.shadowBlock, shadowBlock) || + other.shadowBlock == shadowBlock)); } @override @@ -60,17 +68,20 @@ mixin _$SubmitActionRequest { runtimeType, actionType, ban, + block, custom, deleteActivity, + deleteComment, deleteMessage, deleteReaction, deleteUser, itemId, - markReviewed); + markReviewed, + shadowBlock); @override String toString() { - return 'SubmitActionRequest(actionType: $actionType, ban: $ban, custom: $custom, deleteActivity: $deleteActivity, deleteMessage: $deleteMessage, deleteReaction: $deleteReaction, deleteUser: $deleteUser, itemId: $itemId, markReviewed: $markReviewed)'; + return 'SubmitActionRequest(actionType: $actionType, ban: $ban, block: $block, custom: $custom, deleteActivity: $deleteActivity, deleteComment: $deleteComment, deleteMessage: $deleteMessage, deleteReaction: $deleteReaction, deleteUser: $deleteUser, itemId: $itemId, markReviewed: $markReviewed, shadowBlock: $shadowBlock)'; } } @@ -83,13 +94,16 @@ abstract mixin class $SubmitActionRequestCopyWith<$Res> { $Res call( {SubmitActionRequestActionType actionType, BanActionRequest? ban, + BlockActionRequest? block, CustomActionRequest? custom, DeleteActivityRequest? deleteActivity, + DeleteCommentRequest? deleteComment, DeleteMessageRequest? deleteMessage, DeleteReactionRequest? deleteReaction, DeleteUserRequest? deleteUser, String itemId, - MarkReviewedRequest? markReviewed}); + MarkReviewedRequest? markReviewed, + ShadowBlockActionRequest? shadowBlock}); } /// @nodoc @@ -107,13 +121,16 @@ class _$SubmitActionRequestCopyWithImpl<$Res> $Res call({ Object? actionType = null, Object? ban = freezed, + Object? block = freezed, Object? custom = freezed, Object? deleteActivity = freezed, + Object? deleteComment = freezed, Object? deleteMessage = freezed, Object? deleteReaction = freezed, Object? deleteUser = freezed, Object? itemId = null, Object? markReviewed = freezed, + Object? shadowBlock = freezed, }) { return _then(SubmitActionRequest( actionType: null == actionType @@ -124,6 +141,10 @@ class _$SubmitActionRequestCopyWithImpl<$Res> ? _self.ban : ban // ignore: cast_nullable_to_non_nullable as BanActionRequest?, + block: freezed == block + ? _self.block + : block // ignore: cast_nullable_to_non_nullable + as BlockActionRequest?, custom: freezed == custom ? _self.custom : custom // ignore: cast_nullable_to_non_nullable @@ -132,6 +153,10 @@ class _$SubmitActionRequestCopyWithImpl<$Res> ? _self.deleteActivity : deleteActivity // ignore: cast_nullable_to_non_nullable as DeleteActivityRequest?, + deleteComment: freezed == deleteComment + ? _self.deleteComment + : deleteComment // ignore: cast_nullable_to_non_nullable + as DeleteCommentRequest?, deleteMessage: freezed == deleteMessage ? _self.deleteMessage : deleteMessage // ignore: cast_nullable_to_non_nullable @@ -152,6 +177,10 @@ class _$SubmitActionRequestCopyWithImpl<$Res> ? _self.markReviewed : markReviewed // ignore: cast_nullable_to_non_nullable as MarkReviewedRequest?, + shadowBlock: freezed == shadowBlock + ? _self.shadowBlock + : shadowBlock // ignore: cast_nullable_to_non_nullable + as ShadowBlockActionRequest?, )); } } diff --git a/packages/stream_feeds/lib/src/generated/api/model/submit_action_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/submit_action_request.g.dart index 8a712751..6712067a 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/submit_action_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/submit_action_request.g.dart @@ -14,6 +14,9 @@ SubmitActionRequest _$SubmitActionRequestFromJson(Map json) => ban: json['ban'] == null ? null : BanActionRequest.fromJson(json['ban'] as Map), + block: json['block'] == null + ? null + : BlockActionRequest.fromJson(json['block'] as Map), custom: json['custom'] == null ? null : CustomActionRequest.fromJson( @@ -22,6 +25,10 @@ SubmitActionRequest _$SubmitActionRequestFromJson(Map json) => ? null : DeleteActivityRequest.fromJson( json['delete_activity'] as Map), + deleteComment: json['delete_comment'] == null + ? null + : DeleteCommentRequest.fromJson( + json['delete_comment'] as Map), deleteMessage: json['delete_message'] == null ? null : DeleteMessageRequest.fromJson( @@ -39,6 +46,10 @@ SubmitActionRequest _$SubmitActionRequestFromJson(Map json) => ? null : MarkReviewedRequest.fromJson( json['mark_reviewed'] as Map), + shadowBlock: json['shadow_block'] == null + ? null + : ShadowBlockActionRequest.fromJson( + json['shadow_block'] as Map), ); Map _$SubmitActionRequestToJson( @@ -47,19 +58,24 @@ Map _$SubmitActionRequestToJson( 'action_type': _$SubmitActionRequestActionTypeEnumMap[instance.actionType]!, 'ban': instance.ban?.toJson(), + 'block': instance.block?.toJson(), 'custom': instance.custom?.toJson(), 'delete_activity': instance.deleteActivity?.toJson(), + 'delete_comment': instance.deleteComment?.toJson(), 'delete_message': instance.deleteMessage?.toJson(), 'delete_reaction': instance.deleteReaction?.toJson(), 'delete_user': instance.deleteUser?.toJson(), 'item_id': instance.itemId, 'mark_reviewed': instance.markReviewed?.toJson(), + 'shadow_block': instance.shadowBlock?.toJson(), }; const _$SubmitActionRequestActionTypeEnumMap = { SubmitActionRequestActionType.ban: 'ban', + SubmitActionRequestActionType.block: 'block', SubmitActionRequestActionType.custom: 'custom', SubmitActionRequestActionType.deleteActivity: 'delete_activity', + SubmitActionRequestActionType.deleteComment: 'delete_comment', SubmitActionRequestActionType.deleteMessage: 'delete_message', SubmitActionRequestActionType.deleteReaction: 'delete_reaction', SubmitActionRequestActionType.deleteUser: 'delete_user', diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_activity_request.dart b/packages/stream_feeds/lib/src/generated/api/model/update_activity_request.dart index f136cdef..f2e88518 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/update_activity_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/update_activity_request.dart @@ -13,12 +13,25 @@ import '../models.dart'; part 'update_activity_request.g.dart'; part 'update_activity_request.freezed.dart'; +@JsonEnum(alwaysCreate: true) +enum UpdateActivityRequestRestrictReplies { + @JsonValue('everyone') + everyone, + @JsonValue('nobody') + nobody, + @JsonValue('people_i_follow') + peopleIFollow, + @JsonValue('_unknown') + unknown; +} + @freezed @immutable @JsonSerializable() class UpdateActivityRequest with _$UpdateActivityRequest { const UpdateActivityRequest({ this.attachments, + this.collectionRefs, this.custom, this.expiresAt, this.feeds, @@ -26,6 +39,8 @@ class UpdateActivityRequest with _$UpdateActivityRequest { this.interestTags, this.location, this.pollId, + this.restrictReplies, + this.skipEnrichUrl, this.text, this.visibility, }); @@ -33,6 +48,9 @@ class UpdateActivityRequest with _$UpdateActivityRequest { @override final List? attachments; + @override + final List? collectionRefs; + @override final Map? custom; @@ -55,6 +73,13 @@ class UpdateActivityRequest with _$UpdateActivityRequest { @override final String? pollId; + @override + @JsonKey(unknownEnumValue: UpdateActivityRequestRestrictReplies.unknown) + final UpdateActivityRequestRestrictReplies? restrictReplies; + + @override + final bool? skipEnrichUrl; + @override final String? text; diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_activity_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/update_activity_request.freezed.dart index 733f3a7d..7d78acd1 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/update_activity_request.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/update_activity_request.freezed.dart @@ -16,6 +16,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$UpdateActivityRequest { List? get attachments; + List? get collectionRefs; Map? get custom; DateTime? get expiresAt; List? get feeds; @@ -23,6 +24,8 @@ mixin _$UpdateActivityRequest { List? get interestTags; ActivityLocation? get location; String? get pollId; + UpdateActivityRequestRestrictReplies? get restrictReplies; + bool? get skipEnrichUrl; String? get text; String? get visibility; @@ -41,6 +44,8 @@ mixin _$UpdateActivityRequest { other is UpdateActivityRequest && const DeepCollectionEquality() .equals(other.attachments, attachments) && + const DeepCollectionEquality() + .equals(other.collectionRefs, collectionRefs) && const DeepCollectionEquality().equals(other.custom, custom) && (identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt) && @@ -52,6 +57,10 @@ mixin _$UpdateActivityRequest { (identical(other.location, location) || other.location == location) && (identical(other.pollId, pollId) || other.pollId == pollId) && + (identical(other.restrictReplies, restrictReplies) || + other.restrictReplies == restrictReplies) && + (identical(other.skipEnrichUrl, skipEnrichUrl) || + other.skipEnrichUrl == skipEnrichUrl) && (identical(other.text, text) || other.text == text) && (identical(other.visibility, visibility) || other.visibility == visibility)); @@ -61,6 +70,7 @@ mixin _$UpdateActivityRequest { int get hashCode => Object.hash( runtimeType, const DeepCollectionEquality().hash(attachments), + const DeepCollectionEquality().hash(collectionRefs), const DeepCollectionEquality().hash(custom), expiresAt, const DeepCollectionEquality().hash(feeds), @@ -68,12 +78,14 @@ mixin _$UpdateActivityRequest { const DeepCollectionEquality().hash(interestTags), location, pollId, + restrictReplies, + skipEnrichUrl, text, visibility); @override String toString() { - return 'UpdateActivityRequest(attachments: $attachments, custom: $custom, expiresAt: $expiresAt, feeds: $feeds, filterTags: $filterTags, interestTags: $interestTags, location: $location, pollId: $pollId, text: $text, visibility: $visibility)'; + return 'UpdateActivityRequest(attachments: $attachments, collectionRefs: $collectionRefs, custom: $custom, expiresAt: $expiresAt, feeds: $feeds, filterTags: $filterTags, interestTags: $interestTags, location: $location, pollId: $pollId, restrictReplies: $restrictReplies, skipEnrichUrl: $skipEnrichUrl, text: $text, visibility: $visibility)'; } } @@ -85,6 +97,7 @@ abstract mixin class $UpdateActivityRequestCopyWith<$Res> { @useResult $Res call( {List? attachments, + List? collectionRefs, Map? custom, DateTime? expiresAt, List? feeds, @@ -92,6 +105,8 @@ abstract mixin class $UpdateActivityRequestCopyWith<$Res> { List? interestTags, ActivityLocation? location, String? pollId, + UpdateActivityRequestRestrictReplies? restrictReplies, + bool? skipEnrichUrl, String? text, String? visibility}); } @@ -110,6 +125,7 @@ class _$UpdateActivityRequestCopyWithImpl<$Res> @override $Res call({ Object? attachments = freezed, + Object? collectionRefs = freezed, Object? custom = freezed, Object? expiresAt = freezed, Object? feeds = freezed, @@ -117,6 +133,8 @@ class _$UpdateActivityRequestCopyWithImpl<$Res> Object? interestTags = freezed, Object? location = freezed, Object? pollId = freezed, + Object? restrictReplies = freezed, + Object? skipEnrichUrl = freezed, Object? text = freezed, Object? visibility = freezed, }) { @@ -125,6 +143,10 @@ class _$UpdateActivityRequestCopyWithImpl<$Res> ? _self.attachments : attachments // ignore: cast_nullable_to_non_nullable as List?, + collectionRefs: freezed == collectionRefs + ? _self.collectionRefs + : collectionRefs // ignore: cast_nullable_to_non_nullable + as List?, custom: freezed == custom ? _self.custom : custom // ignore: cast_nullable_to_non_nullable @@ -153,6 +175,14 @@ class _$UpdateActivityRequestCopyWithImpl<$Res> ? _self.pollId : pollId // ignore: cast_nullable_to_non_nullable as String?, + restrictReplies: freezed == restrictReplies + ? _self.restrictReplies + : restrictReplies // ignore: cast_nullable_to_non_nullable + as UpdateActivityRequestRestrictReplies?, + skipEnrichUrl: freezed == skipEnrichUrl + ? _self.skipEnrichUrl + : skipEnrichUrl // ignore: cast_nullable_to_non_nullable + as bool?, text: freezed == text ? _self.text : text // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_activity_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/update_activity_request.g.dart index af9e75da..ba4b821d 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/update_activity_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/update_activity_request.g.dart @@ -12,6 +12,9 @@ UpdateActivityRequest _$UpdateActivityRequestFromJson( attachments: (json['attachments'] as List?) ?.map((e) => Attachment.fromJson(e as Map)) .toList(), + collectionRefs: (json['collection_refs'] as List?) + ?.map((e) => e as String) + .toList(), custom: json['custom'] as Map?, expiresAt: _$JsonConverterFromJson( json['expires_at'], const EpochDateTimeConverter().fromJson), @@ -27,6 +30,11 @@ UpdateActivityRequest _$UpdateActivityRequestFromJson( ? null : ActivityLocation.fromJson(json['location'] as Map), pollId: json['poll_id'] as String?, + restrictReplies: $enumDecodeNullable( + _$UpdateActivityRequestRestrictRepliesEnumMap, + json['restrict_replies'], + unknownValue: UpdateActivityRequestRestrictReplies.unknown), + skipEnrichUrl: json['skip_enrich_url'] as bool?, text: json['text'] as String?, visibility: json['visibility'] as String?, ); @@ -35,6 +43,7 @@ Map _$UpdateActivityRequestToJson( UpdateActivityRequest instance) => { 'attachments': instance.attachments?.map((e) => e.toJson()).toList(), + 'collection_refs': instance.collectionRefs, 'custom': instance.custom, 'expires_at': _$JsonConverterToJson( instance.expiresAt, const EpochDateTimeConverter().toJson), @@ -43,6 +52,9 @@ Map _$UpdateActivityRequestToJson( 'interest_tags': instance.interestTags, 'location': instance.location?.toJson(), 'poll_id': instance.pollId, + 'restrict_replies': _$UpdateActivityRequestRestrictRepliesEnumMap[ + instance.restrictReplies], + 'skip_enrich_url': instance.skipEnrichUrl, 'text': instance.text, 'visibility': instance.visibility, }; @@ -53,6 +65,13 @@ Value? _$JsonConverterFromJson( ) => json == null ? null : fromJson(json as Json); +const _$UpdateActivityRequestRestrictRepliesEnumMap = { + UpdateActivityRequestRestrictReplies.everyone: 'everyone', + UpdateActivityRequestRestrictReplies.nobody: 'nobody', + UpdateActivityRequestRestrictReplies.peopleIFollow: 'people_i_follow', + UpdateActivityRequestRestrictReplies.unknown: '_unknown', +}; + Json? _$JsonConverterToJson( Value? value, Json? Function(Value value) toJson, diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_collection_request.dart b/packages/stream_feeds/lib/src/generated/api/model/update_collection_request.dart new file mode 100644 index 00000000..f9ccc7e1 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/update_collection_request.dart @@ -0,0 +1,39 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'update_collection_request.g.dart'; +part 'update_collection_request.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class UpdateCollectionRequest with _$UpdateCollectionRequest { + const UpdateCollectionRequest({ + required this.custom, + required this.id, + required this.name, + }); + + @override + final Map custom; + + @override + final String id; + + @override + final String name; + + Map toJson() => _$UpdateCollectionRequestToJson(this); + + static UpdateCollectionRequest fromJson(Map json) => + _$UpdateCollectionRequestFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_collection_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/update_collection_request.freezed.dart new file mode 100644 index 00000000..3e405b22 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/update_collection_request.freezed.dart @@ -0,0 +1,93 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'update_collection_request.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$UpdateCollectionRequest { + Map get custom; + String get id; + String get name; + + /// Create a copy of UpdateCollectionRequest + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $UpdateCollectionRequestCopyWith get copyWith => + _$UpdateCollectionRequestCopyWithImpl( + this as UpdateCollectionRequest, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is UpdateCollectionRequest && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.id, id) || other.id == id) && + (identical(other.name, name) || other.name == name)); + } + + @override + int get hashCode => Object.hash( + runtimeType, const DeepCollectionEquality().hash(custom), id, name); + + @override + String toString() { + return 'UpdateCollectionRequest(custom: $custom, id: $id, name: $name)'; + } +} + +/// @nodoc +abstract mixin class $UpdateCollectionRequestCopyWith<$Res> { + factory $UpdateCollectionRequestCopyWith(UpdateCollectionRequest value, + $Res Function(UpdateCollectionRequest) _then) = + _$UpdateCollectionRequestCopyWithImpl; + @useResult + $Res call({Map custom, String id, String name}); +} + +/// @nodoc +class _$UpdateCollectionRequestCopyWithImpl<$Res> + implements $UpdateCollectionRequestCopyWith<$Res> { + _$UpdateCollectionRequestCopyWithImpl(this._self, this._then); + + final UpdateCollectionRequest _self; + final $Res Function(UpdateCollectionRequest) _then; + + /// Create a copy of UpdateCollectionRequest + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? custom = null, + Object? id = null, + Object? name = null, + }) { + return _then(UpdateCollectionRequest( + custom: null == custom + ? _self.custom + : custom // ignore: cast_nullable_to_non_nullable + as Map, + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_collection_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/update_collection_request.g.dart new file mode 100644 index 00000000..ac78534b --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/update_collection_request.g.dart @@ -0,0 +1,23 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'update_collection_request.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UpdateCollectionRequest _$UpdateCollectionRequestFromJson( + Map json) => + UpdateCollectionRequest( + custom: json['custom'] as Map, + id: json['id'] as String, + name: json['name'] as String, + ); + +Map _$UpdateCollectionRequestToJson( + UpdateCollectionRequest instance) => + { + 'custom': instance.custom, + 'id': instance.id, + 'name': instance.name, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_collections_request.dart b/packages/stream_feeds/lib/src/generated/api/model/update_collections_request.dart new file mode 100644 index 00000000..b807b00e --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/update_collections_request.dart @@ -0,0 +1,31 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'update_collections_request.g.dart'; +part 'update_collections_request.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class UpdateCollectionsRequest with _$UpdateCollectionsRequest { + const UpdateCollectionsRequest({ + required this.collections, + }); + + @override + final List collections; + + Map toJson() => _$UpdateCollectionsRequestToJson(this); + + static UpdateCollectionsRequest fromJson(Map json) => + _$UpdateCollectionsRequestFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_collections_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/update_collections_request.freezed.dart new file mode 100644 index 00000000..1755496a --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/update_collections_request.freezed.dart @@ -0,0 +1,80 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'update_collections_request.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$UpdateCollectionsRequest { + List get collections; + + /// Create a copy of UpdateCollectionsRequest + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $UpdateCollectionsRequestCopyWith get copyWith => + _$UpdateCollectionsRequestCopyWithImpl( + this as UpdateCollectionsRequest, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is UpdateCollectionsRequest && + const DeepCollectionEquality() + .equals(other.collections, collections)); + } + + @override + int get hashCode => Object.hash( + runtimeType, const DeepCollectionEquality().hash(collections)); + + @override + String toString() { + return 'UpdateCollectionsRequest(collections: $collections)'; + } +} + +/// @nodoc +abstract mixin class $UpdateCollectionsRequestCopyWith<$Res> { + factory $UpdateCollectionsRequestCopyWith(UpdateCollectionsRequest value, + $Res Function(UpdateCollectionsRequest) _then) = + _$UpdateCollectionsRequestCopyWithImpl; + @useResult + $Res call({List collections}); +} + +/// @nodoc +class _$UpdateCollectionsRequestCopyWithImpl<$Res> + implements $UpdateCollectionsRequestCopyWith<$Res> { + _$UpdateCollectionsRequestCopyWithImpl(this._self, this._then); + + final UpdateCollectionsRequest _self; + final $Res Function(UpdateCollectionsRequest) _then; + + /// Create a copy of UpdateCollectionsRequest + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? collections = null, + }) { + return _then(UpdateCollectionsRequest( + collections: null == collections + ? _self.collections + : collections // ignore: cast_nullable_to_non_nullable + as List, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_collections_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/update_collections_request.g.dart new file mode 100644 index 00000000..e68f1706 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/update_collections_request.g.dart @@ -0,0 +1,22 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'update_collections_request.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UpdateCollectionsRequest _$UpdateCollectionsRequestFromJson( + Map json) => + UpdateCollectionsRequest( + collections: (json['collections'] as List) + .map((e) => + UpdateCollectionRequest.fromJson(e as Map)) + .toList(), + ); + +Map _$UpdateCollectionsRequestToJson( + UpdateCollectionsRequest instance) => + { + 'collections': instance.collections.map((e) => e.toJson()).toList(), + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_collections_response.dart b/packages/stream_feeds/lib/src/generated/api/model/update_collections_response.dart new file mode 100644 index 00000000..ddf6662b --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/update_collections_response.dart @@ -0,0 +1,35 @@ +// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +// coverage:ignore-file +// ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs + +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:meta/meta.dart'; +import 'package:stream_core/stream_core.dart' as core; + +import '../models.dart'; + +part 'update_collections_response.g.dart'; +part 'update_collections_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class UpdateCollectionsResponse with _$UpdateCollectionsResponse { + const UpdateCollectionsResponse({ + required this.collections, + required this.duration, + }); + + @override + final List collections; + + @override + final String duration; + + Map toJson() => _$UpdateCollectionsResponseToJson(this); + + static UpdateCollectionsResponse fromJson(Map json) => + _$UpdateCollectionsResponseFromJson(json); +} diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_collections_response.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/update_collections_response.freezed.dart new file mode 100644 index 00000000..3661b9a6 --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/update_collections_response.freezed.dart @@ -0,0 +1,88 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'update_collections_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$UpdateCollectionsResponse { + List get collections; + String get duration; + + /// Create a copy of UpdateCollectionsResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $UpdateCollectionsResponseCopyWith get copyWith => + _$UpdateCollectionsResponseCopyWithImpl( + this as UpdateCollectionsResponse, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is UpdateCollectionsResponse && + const DeepCollectionEquality() + .equals(other.collections, collections) && + (identical(other.duration, duration) || + other.duration == duration)); + } + + @override + int get hashCode => Object.hash( + runtimeType, const DeepCollectionEquality().hash(collections), duration); + + @override + String toString() { + return 'UpdateCollectionsResponse(collections: $collections, duration: $duration)'; + } +} + +/// @nodoc +abstract mixin class $UpdateCollectionsResponseCopyWith<$Res> { + factory $UpdateCollectionsResponseCopyWith(UpdateCollectionsResponse value, + $Res Function(UpdateCollectionsResponse) _then) = + _$UpdateCollectionsResponseCopyWithImpl; + @useResult + $Res call({List collections, String duration}); +} + +/// @nodoc +class _$UpdateCollectionsResponseCopyWithImpl<$Res> + implements $UpdateCollectionsResponseCopyWith<$Res> { + _$UpdateCollectionsResponseCopyWithImpl(this._self, this._then); + + final UpdateCollectionsResponse _self; + final $Res Function(UpdateCollectionsResponse) _then; + + /// Create a copy of UpdateCollectionsResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? collections = null, + Object? duration = null, + }) { + return _then(UpdateCollectionsResponse( + collections: null == collections + ? _self.collections + : collections // ignore: cast_nullable_to_non_nullable + as List, + duration: null == duration + ? _self.duration + : duration // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_collections_response.g.dart b/packages/stream_feeds/lib/src/generated/api/model/update_collections_response.g.dart new file mode 100644 index 00000000..6fecadef --- /dev/null +++ b/packages/stream_feeds/lib/src/generated/api/model/update_collections_response.g.dart @@ -0,0 +1,23 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'update_collections_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UpdateCollectionsResponse _$UpdateCollectionsResponseFromJson( + Map json) => + UpdateCollectionsResponse( + collections: (json['collections'] as List) + .map((e) => CollectionResponse.fromJson(e as Map)) + .toList(), + duration: json['duration'] as String, + ); + +Map _$UpdateCollectionsResponseToJson( + UpdateCollectionsResponse instance) => + { + 'collections': instance.collections.map((e) => e.toJson()).toList(), + 'duration': instance.duration, + }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_comment_request.dart b/packages/stream_feeds/lib/src/generated/api/model/update_comment_request.dart index be2cd741..c204b5db 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/update_comment_request.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/update_comment_request.dart @@ -20,6 +20,7 @@ class UpdateCommentRequest with _$UpdateCommentRequest { const UpdateCommentRequest({ this.comment, this.custom, + this.skipEnrichUrl, this.skipPush, }); @@ -29,6 +30,9 @@ class UpdateCommentRequest with _$UpdateCommentRequest { @override final Map? custom; + @override + final bool? skipEnrichUrl; + @override final bool? skipPush; diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_comment_request.freezed.dart b/packages/stream_feeds/lib/src/generated/api/model/update_comment_request.freezed.dart index 601d6aa8..b8d1d8af 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/update_comment_request.freezed.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/update_comment_request.freezed.dart @@ -17,6 +17,7 @@ T _$identity(T value) => value; mixin _$UpdateCommentRequest { String? get comment; Map? get custom; + bool? get skipEnrichUrl; bool? get skipPush; /// Create a copy of UpdateCommentRequest @@ -34,17 +35,19 @@ mixin _$UpdateCommentRequest { other is UpdateCommentRequest && (identical(other.comment, comment) || other.comment == comment) && const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.skipEnrichUrl, skipEnrichUrl) || + other.skipEnrichUrl == skipEnrichUrl) && (identical(other.skipPush, skipPush) || other.skipPush == skipPush)); } @override int get hashCode => Object.hash(runtimeType, comment, - const DeepCollectionEquality().hash(custom), skipPush); + const DeepCollectionEquality().hash(custom), skipEnrichUrl, skipPush); @override String toString() { - return 'UpdateCommentRequest(comment: $comment, custom: $custom, skipPush: $skipPush)'; + return 'UpdateCommentRequest(comment: $comment, custom: $custom, skipEnrichUrl: $skipEnrichUrl, skipPush: $skipPush)'; } } @@ -54,7 +57,11 @@ abstract mixin class $UpdateCommentRequestCopyWith<$Res> { $Res Function(UpdateCommentRequest) _then) = _$UpdateCommentRequestCopyWithImpl; @useResult - $Res call({String? comment, Map? custom, bool? skipPush}); + $Res call( + {String? comment, + Map? custom, + bool? skipEnrichUrl, + bool? skipPush}); } /// @nodoc @@ -72,6 +79,7 @@ class _$UpdateCommentRequestCopyWithImpl<$Res> $Res call({ Object? comment = freezed, Object? custom = freezed, + Object? skipEnrichUrl = freezed, Object? skipPush = freezed, }) { return _then(UpdateCommentRequest( @@ -83,6 +91,10 @@ class _$UpdateCommentRequestCopyWithImpl<$Res> ? _self.custom : custom // ignore: cast_nullable_to_non_nullable as Map?, + skipEnrichUrl: freezed == skipEnrichUrl + ? _self.skipEnrichUrl + : skipEnrichUrl // ignore: cast_nullable_to_non_nullable + as bool?, skipPush: freezed == skipPush ? _self.skipPush : skipPush // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/generated/api/model/update_comment_request.g.dart b/packages/stream_feeds/lib/src/generated/api/model/update_comment_request.g.dart index b6c195af..2b63378a 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/update_comment_request.g.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/update_comment_request.g.dart @@ -11,6 +11,7 @@ UpdateCommentRequest _$UpdateCommentRequestFromJson( UpdateCommentRequest( comment: json['comment'] as String?, custom: json['custom'] as Map?, + skipEnrichUrl: json['skip_enrich_url'] as bool?, skipPush: json['skip_push'] as bool?, ); @@ -19,5 +20,6 @@ Map _$UpdateCommentRequestToJson( { 'comment': instance.comment, 'custom': instance.custom, + 'skip_enrich_url': instance.skipEnrichUrl, 'skip_push': instance.skipPush, }; diff --git a/packages/stream_feeds/lib/src/generated/api/model/ws_client_event.dart b/packages/stream_feeds/lib/src/generated/api/model/ws_client_event.dart index a66a550c..aca7e2d8 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/ws_client_event.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/ws_client_event.dart @@ -26,6 +26,8 @@ abstract class WSClientEvent { _ActivityAddedEvent(ActivityAddedEvent.fromJson(json)), "feeds.activity.deleted" => _ActivityDeletedEvent(ActivityDeletedEvent.fromJson(json)), + "feeds.activity.feedback" => + _ActivityFeedbackEvent(ActivityFeedbackEvent.fromJson(json)), "feeds.activity.marked" => _ActivityMarkEvent(ActivityMarkEvent.fromJson(json)), "feeds.activity.pinned" => @@ -133,6 +135,13 @@ class _ActivityDeletedEvent extends WSClientEvent { String get type => wrapped.type; } +class _ActivityFeedbackEvent extends WSClientEvent { + const _ActivityFeedbackEvent(super.wrapped); + + @override + String get type => wrapped.type; +} + class _ActivityMarkEvent extends WSClientEvent { const _ActivityMarkEvent(super.wrapped); diff --git a/packages/stream_feeds/lib/src/generated/api/model/ws_event.dart b/packages/stream_feeds/lib/src/generated/api/model/ws_event.dart index 649dfd04..bb1aaf7c 100644 --- a/packages/stream_feeds/lib/src/generated/api/model/ws_event.dart +++ b/packages/stream_feeds/lib/src/generated/api/model/ws_event.dart @@ -26,6 +26,8 @@ abstract class WSEvent { _ActivityAddedEvent(ActivityAddedEvent.fromJson(json)), "feeds.activity.deleted" => _ActivityDeletedEvent(ActivityDeletedEvent.fromJson(json)), + "feeds.activity.feedback" => + _ActivityFeedbackEvent(ActivityFeedbackEvent.fromJson(json)), "feeds.activity.marked" => _ActivityMarkEvent(ActivityMarkEvent.fromJson(json)), "feeds.activity.pinned" => @@ -141,6 +143,13 @@ class _ActivityDeletedEvent extends WSEvent { String get type => wrapped.type; } +class _ActivityFeedbackEvent extends WSEvent { + const _ActivityFeedbackEvent(super.wrapped); + + @override + String get type => wrapped.type; +} + class _ActivityMarkEvent extends WSEvent { const _ActivityMarkEvent(super.wrapped); diff --git a/packages/stream_feeds/lib/src/generated/api/models.dart b/packages/stream_feeds/lib/src/generated/api/models.dart index e707dc21..7c39961d 100644 --- a/packages/stream_feeds/lib/src/generated/api/models.dart +++ b/packages/stream_feeds/lib/src/generated/api/models.dart @@ -16,6 +16,8 @@ export 'model/action_log_response.dart'; export 'model/action_sequence.dart'; export 'model/activity_added_event.dart'; export 'model/activity_deleted_event.dart'; +export 'model/activity_feedback_event.dart'; +export 'model/activity_feedback_event_payload.dart'; export 'model/activity_feedback_request.dart'; export 'model/activity_feedback_response.dart'; export 'model/activity_location.dart'; @@ -63,6 +65,7 @@ export 'model/ban_action_request.dart'; export 'model/ban_options.dart'; export 'model/ban_request.dart'; export 'model/ban_response.dart'; +export 'model/block_action_request.dart'; export 'model/block_list_config.dart'; export 'model/block_list_options.dart'; export 'model/block_list_response.dart'; @@ -96,6 +99,8 @@ export 'model/channel_mute.dart'; export 'model/channel_own_capability.dart'; export 'model/channel_push_preferences.dart'; export 'model/channel_response.dart'; +export 'model/collection_request.dart'; +export 'model/collection_response.dart'; export 'model/command.dart'; export 'model/comment_added_event.dart'; export 'model/comment_deleted_event.dart'; @@ -109,6 +114,8 @@ export 'model/config_response.dart'; export 'model/content_count_rule_parameters.dart'; export 'model/create_block_list_request.dart'; export 'model/create_block_list_response.dart'; +export 'model/create_collections_request.dart'; +export 'model/create_collections_response.dart'; export 'model/create_device_request.dart'; export 'model/create_feeds_batch_request.dart'; export 'model/create_feeds_batch_response.dart'; @@ -126,7 +133,9 @@ export 'model/delete_activity_request.dart'; export 'model/delete_activity_response.dart'; export 'model/delete_bookmark_folder_response.dart'; export 'model/delete_bookmark_response.dart'; +export 'model/delete_collections_response.dart'; export 'model/delete_comment_reaction_response.dart'; +export 'model/delete_comment_request.dart'; export 'model/delete_comment_response.dart'; export 'model/delete_feed_response.dart'; export 'model/delete_message_request.dart'; @@ -135,6 +144,7 @@ export 'model/delete_reaction_request.dart'; export 'model/delete_user_request.dart'; export 'model/delivery_receipts.dart'; export 'model/delivery_receipts_response.dart'; +export 'model/denormalized_channel_fields.dart'; export 'model/device.dart'; export 'model/device_response.dart'; export 'model/draft_payload_response.dart'; @@ -144,6 +154,7 @@ export 'model/egress_hls_response.dart'; export 'model/egress_rtmp_response.dart'; export 'model/egress_response.dart'; export 'model/enriched_activity.dart'; +export 'model/enriched_collection_response.dart'; export 'model/enriched_reaction.dart'; export 'model/entity_creator_response.dart'; export 'model/feed_created_event.dart'; @@ -160,13 +171,17 @@ export 'model/feed_member_updated_event.dart'; export 'model/feed_own_capability.dart'; export 'model/feed_request.dart'; export 'model/feed_response.dart'; +export 'model/feed_suggestion_response.dart'; export 'model/feed_updated_event.dart'; export 'model/feeds_preferences.dart'; +export 'model/feeds_preferences_response.dart'; export 'model/feeds_reaction_response.dart'; export 'model/field.dart'; export 'model/file_upload_config.dart'; export 'model/file_upload_request.dart'; export 'model/file_upload_response.dart'; +export 'model/filter_config_response.dart'; +export 'model/flag_count_rule_parameters.dart'; export 'model/flag_request.dart'; export 'model/flag_response.dart'; export 'model/flag_user_options.dart'; @@ -229,6 +244,7 @@ export 'model/moderation_v2_response.dart'; export 'model/mute_request.dart'; export 'model/mute_response.dart'; export 'model/noise_cancellation_settings.dart'; +export 'model/notification_comment.dart'; export 'model/notification_config.dart'; export 'model/notification_context.dart'; export 'model/notification_feed_updated_event.dart'; @@ -267,6 +283,7 @@ export 'model/privacy_settings_response.dart'; export 'model/push_notification_config.dart'; export 'model/push_preference_input.dart'; export 'model/push_preferences.dart'; +export 'model/push_preferences_response.dart'; export 'model/query_activities_request.dart'; export 'model/query_activities_response.dart'; export 'model/query_activity_reactions_request.dart'; @@ -300,6 +317,7 @@ export 'model/ranking_config.dart'; export 'model/reaction.dart'; export 'model/reaction_group_response.dart'; export 'model/reaction_response.dart'; +export 'model/read_collections_response.dart'; export 'model/read_receipts.dart'; export 'model/read_receipts_response.dart'; export 'model/record_settings_response.dart'; @@ -318,6 +336,7 @@ export 'model/rule_builder_rule.dart'; export 'model/srt_ingress.dart'; export 'model/screensharing_settings_response.dart'; export 'model/session_settings_response.dart'; +export 'model/shadow_block_action_request.dart'; export 'model/shared_location.dart'; export 'model/shared_location_response.dart'; export 'model/shared_location_response_data.dart'; @@ -355,6 +374,9 @@ export 'model/update_bookmark_folder_request.dart'; export 'model/update_bookmark_folder_response.dart'; export 'model/update_bookmark_request.dart'; export 'model/update_bookmark_response.dart'; +export 'model/update_collection_request.dart'; +export 'model/update_collections_request.dart'; +export 'model/update_collections_response.dart'; export 'model/update_comment_request.dart'; export 'model/update_comment_response.dart'; export 'model/update_feed_members_request.dart'; diff --git a/packages/stream_feeds/lib/src/models.dart b/packages/stream_feeds/lib/src/models.dart index c55014d4..45eed7ff 100644 --- a/packages/stream_feeds/lib/src/models.dart +++ b/packages/stream_feeds/lib/src/models.dart @@ -5,6 +5,7 @@ export 'models/feed_id.dart'; export 'models/feed_input_data.dart'; export 'models/feed_member_data.dart'; export 'models/feed_member_request_data.dart'; +export 'models/feed_suggestion_data.dart'; export 'models/feeds_config.dart'; export 'models/follow_data.dart'; export 'models/poll_data.dart'; diff --git a/packages/stream_feeds/lib/src/models/activity_data.dart b/packages/stream_feeds/lib/src/models/activity_data.dart index 271570c4..e58bd844 100644 --- a/packages/stream_feeds/lib/src/models/activity_data.dart +++ b/packages/stream_feeds/lib/src/models/activity_data.dart @@ -49,6 +49,8 @@ class ActivityData with _$ActivityData { this.parent, this.poll, this.popularity = 0, + this.hidden = false, + this.preview = false, this.reactionCount = 0, this.reactionGroups = const {}, this.score = 0.0, @@ -159,6 +161,20 @@ class ActivityData with _$ActivityData { @override final int popularity; + /// Whether the activity has been hidden by the current user. + /// + /// Hidden activities may be filtered from feed views depending on + /// application logic. + @override + final bool hidden; + + /// Whether this activity is obfuscated for the current user. + /// + /// Used for premium content where you want to show a preview without + /// revealing full details. + @override + final bool preview; + /// The total number of reactions on the activity across all reaction types. @override final int reactionCount; @@ -270,6 +286,8 @@ extension ActivityResponseMapper on ActivityResponse { parent: parent?.toModel(), poll: poll?.toModel(), popularity: popularity, + hidden: hidden, + preview: preview, reactionCount: reactionCount, reactionGroups: { for (final entry in reactionGroups.entries) diff --git a/packages/stream_feeds/lib/src/models/activity_data.freezed.dart b/packages/stream_feeds/lib/src/models/activity_data.freezed.dart index f3a2b050..05c6bdaa 100644 --- a/packages/stream_feeds/lib/src/models/activity_data.freezed.dart +++ b/packages/stream_feeds/lib/src/models/activity_data.freezed.dart @@ -39,6 +39,8 @@ mixin _$ActivityData { ActivityData? get parent; PollData? get poll; int get popularity; + bool get hidden; + bool get preview; int get reactionCount; Map get reactionGroups; double get score; @@ -108,6 +110,8 @@ mixin _$ActivityData { (identical(other.poll, poll) || other.poll == poll) && (identical(other.popularity, popularity) || other.popularity == popularity) && + (identical(other.hidden, hidden) || other.hidden == hidden) && + (identical(other.preview, preview) || other.preview == preview) && (identical(other.reactionCount, reactionCount) || other.reactionCount == reactionCount) && const DeepCollectionEquality() @@ -156,6 +160,8 @@ mixin _$ActivityData { parent, poll, popularity, + hidden, + preview, reactionCount, const DeepCollectionEquality().hash(reactionGroups), score, @@ -172,7 +178,7 @@ mixin _$ActivityData { @override String toString() { - return 'ActivityData(attachments: $attachments, bookmarkCount: $bookmarkCount, commentCount: $commentCount, comments: $comments, createdAt: $createdAt, currentFeed: $currentFeed, deletedAt: $deletedAt, editedAt: $editedAt, expiresAt: $expiresAt, feeds: $feeds, filterTags: $filterTags, id: $id, interestTags: $interestTags, isWatched: $isWatched, latestReactions: $latestReactions, location: $location, mentionedUsers: $mentionedUsers, moderation: $moderation, notificationContext: $notificationContext, ownBookmarks: $ownBookmarks, ownReactions: $ownReactions, parent: $parent, poll: $poll, popularity: $popularity, reactionCount: $reactionCount, reactionGroups: $reactionGroups, score: $score, searchData: $searchData, shareCount: $shareCount, text: $text, type: $type, updatedAt: $updatedAt, user: $user, visibility: $visibility, visibilityTag: $visibilityTag, custom: $custom)'; + return 'ActivityData(attachments: $attachments, bookmarkCount: $bookmarkCount, commentCount: $commentCount, comments: $comments, createdAt: $createdAt, currentFeed: $currentFeed, deletedAt: $deletedAt, editedAt: $editedAt, expiresAt: $expiresAt, feeds: $feeds, filterTags: $filterTags, id: $id, interestTags: $interestTags, isWatched: $isWatched, latestReactions: $latestReactions, location: $location, mentionedUsers: $mentionedUsers, moderation: $moderation, notificationContext: $notificationContext, ownBookmarks: $ownBookmarks, ownReactions: $ownReactions, parent: $parent, poll: $poll, popularity: $popularity, hidden: $hidden, preview: $preview, reactionCount: $reactionCount, reactionGroups: $reactionGroups, score: $score, searchData: $searchData, shareCount: $shareCount, text: $text, type: $type, updatedAt: $updatedAt, user: $user, visibility: $visibility, visibilityTag: $visibilityTag, custom: $custom)'; } } @@ -207,6 +213,8 @@ abstract mixin class $ActivityDataCopyWith<$Res> { ActivityData? parent, PollData? poll, int popularity, + bool hidden, + bool preview, int reactionCount, Map reactionGroups, double score, @@ -257,6 +265,8 @@ class _$ActivityDataCopyWithImpl<$Res> implements $ActivityDataCopyWith<$Res> { Object? parent = freezed, Object? poll = freezed, Object? popularity = null, + Object? hidden = null, + Object? preview = null, Object? reactionCount = null, Object? reactionGroups = null, Object? score = null, @@ -367,6 +377,14 @@ class _$ActivityDataCopyWithImpl<$Res> implements $ActivityDataCopyWith<$Res> { ? _self.popularity : popularity // ignore: cast_nullable_to_non_nullable as int, + hidden: null == hidden + ? _self.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool, + preview: null == preview + ? _self.preview + : preview // ignore: cast_nullable_to_non_nullable + as bool, reactionCount: null == reactionCount ? _self.reactionCount : reactionCount // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/models/bookmark_folder_data.dart b/packages/stream_feeds/lib/src/models/bookmark_folder_data.dart index 129a1230..5276f036 100644 --- a/packages/stream_feeds/lib/src/models/bookmark_folder_data.dart +++ b/packages/stream_feeds/lib/src/models/bookmark_folder_data.dart @@ -1,6 +1,7 @@ import 'package:freezed_annotation/freezed_annotation.dart'; import '../generated/api/models.dart'; +import 'user_data.dart'; part 'bookmark_folder_data.freezed.dart'; @@ -15,6 +16,7 @@ class BookmarkFolderData with _$BookmarkFolderData { required this.createdAt, required this.id, required this.name, + required this.user, required this.updatedAt, this.custom, }); @@ -31,6 +33,10 @@ class BookmarkFolderData with _$BookmarkFolderData { @override final String name; + /// The user who created the folder. + @override + final UserData user; + /// The date the folder was last updated. @override final DateTime updatedAt; @@ -51,6 +57,7 @@ extension BookmarkFolderResponseMapper on BookmarkFolderResponse { createdAt: createdAt, id: id, name: name, + user: user.toModel(), updatedAt: updatedAt, custom: custom, ); diff --git a/packages/stream_feeds/lib/src/models/bookmark_folder_data.freezed.dart b/packages/stream_feeds/lib/src/models/bookmark_folder_data.freezed.dart index d50aef55..306a9fed 100644 --- a/packages/stream_feeds/lib/src/models/bookmark_folder_data.freezed.dart +++ b/packages/stream_feeds/lib/src/models/bookmark_folder_data.freezed.dart @@ -18,6 +18,7 @@ mixin _$BookmarkFolderData { DateTime get createdAt; String get id; String get name; + UserData get user; DateTime get updatedAt; Map? get custom; @@ -38,18 +39,19 @@ mixin _$BookmarkFolderData { other.createdAt == createdAt) && (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && + (identical(other.user, user) || other.user == user) && (identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) && const DeepCollectionEquality().equals(other.custom, custom)); } @override - int get hashCode => Object.hash(runtimeType, createdAt, id, name, updatedAt, - const DeepCollectionEquality().hash(custom)); + int get hashCode => Object.hash(runtimeType, createdAt, id, name, user, + updatedAt, const DeepCollectionEquality().hash(custom)); @override String toString() { - return 'BookmarkFolderData(createdAt: $createdAt, id: $id, name: $name, updatedAt: $updatedAt, custom: $custom)'; + return 'BookmarkFolderData(createdAt: $createdAt, id: $id, name: $name, user: $user, updatedAt: $updatedAt, custom: $custom)'; } } @@ -63,6 +65,7 @@ abstract mixin class $BookmarkFolderDataCopyWith<$Res> { {DateTime createdAt, String id, String name, + UserData user, DateTime updatedAt, Map? custom}); } @@ -83,6 +86,7 @@ class _$BookmarkFolderDataCopyWithImpl<$Res> Object? createdAt = null, Object? id = null, Object? name = null, + Object? user = null, Object? updatedAt = null, Object? custom = freezed, }) { @@ -99,6 +103,10 @@ class _$BookmarkFolderDataCopyWithImpl<$Res> ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, + user: null == user + ? _self.user + : user // ignore: cast_nullable_to_non_nullable + as UserData, updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/models/feed_data.dart b/packages/stream_feeds/lib/src/models/feed_data.dart index a02d6bf9..3b847e45 100644 --- a/packages/stream_feeds/lib/src/models/feed_data.dart +++ b/packages/stream_feeds/lib/src/models/feed_data.dart @@ -2,6 +2,7 @@ import 'package:freezed_annotation/freezed_annotation.dart'; import '../generated/api/models.dart'; import 'feed_id.dart'; +import 'feed_member_data.dart'; import 'user_data.dart'; part 'feed_data.freezed.dart'; @@ -28,6 +29,7 @@ class FeedData with _$FeedData { required this.memberCount, required this.name, required this.ownCapabilities, + this.ownMembership, required this.pinCount, required this.updatedAt, this.visibility, @@ -86,6 +88,10 @@ class FeedData with _$FeedData { @override final List ownCapabilities; + /// The membership information of the current user in the feed. + @override + final FeedMemberData? ownMembership; + /// The number of pinned items in the feed. @override final int pinCount; @@ -124,6 +130,7 @@ extension FeedResponseMapper on FeedResponse { memberCount: memberCount, name: name, ownCapabilities: ownCapabilities ?? const [], + ownMembership: ownMembership?.toModel(), pinCount: pinCount, updatedAt: updatedAt, visibility: visibility, diff --git a/packages/stream_feeds/lib/src/models/feed_data.freezed.dart b/packages/stream_feeds/lib/src/models/feed_data.freezed.dart index 28069579..9fd7f663 100644 --- a/packages/stream_feeds/lib/src/models/feed_data.freezed.dart +++ b/packages/stream_feeds/lib/src/models/feed_data.freezed.dart @@ -28,6 +28,7 @@ mixin _$FeedData { int get memberCount; String get name; List get ownCapabilities; + FeedMemberData? get ownMembership; int get pinCount; DateTime get updatedAt; String? get visibility; @@ -67,6 +68,8 @@ mixin _$FeedData { (identical(other.name, name) || other.name == name) && const DeepCollectionEquality() .equals(other.ownCapabilities, ownCapabilities) && + (identical(other.ownMembership, ownMembership) || + other.ownMembership == ownMembership) && (identical(other.pinCount, pinCount) || other.pinCount == pinCount) && (identical(other.updatedAt, updatedAt) || @@ -92,6 +95,7 @@ mixin _$FeedData { memberCount, name, const DeepCollectionEquality().hash(ownCapabilities), + ownMembership, pinCount, updatedAt, visibility, @@ -99,7 +103,7 @@ mixin _$FeedData { @override String toString() { - return 'FeedData(createdAt: $createdAt, createdBy: $createdBy, deletedAt: $deletedAt, description: $description, fid: $fid, filterTags: $filterTags, followerCount: $followerCount, followingCount: $followingCount, groupId: $groupId, id: $id, memberCount: $memberCount, name: $name, ownCapabilities: $ownCapabilities, pinCount: $pinCount, updatedAt: $updatedAt, visibility: $visibility, custom: $custom)'; + return 'FeedData(createdAt: $createdAt, createdBy: $createdBy, deletedAt: $deletedAt, description: $description, fid: $fid, filterTags: $filterTags, followerCount: $followerCount, followingCount: $followingCount, groupId: $groupId, id: $id, memberCount: $memberCount, name: $name, ownCapabilities: $ownCapabilities, ownMembership: $ownMembership, pinCount: $pinCount, updatedAt: $updatedAt, visibility: $visibility, custom: $custom)'; } } @@ -122,6 +126,7 @@ abstract mixin class $FeedDataCopyWith<$Res> { int memberCount, String name, List ownCapabilities, + FeedMemberData? ownMembership, int pinCount, DateTime updatedAt, String? visibility, @@ -153,6 +158,7 @@ class _$FeedDataCopyWithImpl<$Res> implements $FeedDataCopyWith<$Res> { Object? memberCount = null, Object? name = null, Object? ownCapabilities = null, + Object? ownMembership = freezed, Object? pinCount = null, Object? updatedAt = null, Object? visibility = freezed, @@ -211,6 +217,10 @@ class _$FeedDataCopyWithImpl<$Res> implements $FeedDataCopyWith<$Res> { ? _self.ownCapabilities : ownCapabilities // ignore: cast_nullable_to_non_nullable as List, + ownMembership: freezed == ownMembership + ? _self.ownMembership + : ownMembership // ignore: cast_nullable_to_non_nullable + as FeedMemberData?, pinCount: null == pinCount ? _self.pinCount : pinCount // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/models/feed_suggestion_data.dart b/packages/stream_feeds/lib/src/models/feed_suggestion_data.dart new file mode 100644 index 00000000..05427c32 --- /dev/null +++ b/packages/stream_feeds/lib/src/models/feed_suggestion_data.dart @@ -0,0 +1,81 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; + +import '../generated/api/models.dart'; +import 'feed_data.dart'; +import 'feed_id.dart'; +import 'feed_member_data.dart'; +import 'user_data.dart'; + +part 'feed_suggestion_data.freezed.dart'; + +/// A feed suggestion in the Stream Feeds system. +/// +/// Represents a recommended feed with scoring and reasoning information for +/// feed discovery features. Feed suggestions include algorithmic scores, +/// recommendation confidence, and human-readable explanations. +@freezed +class FeedSuggestionData with _$FeedSuggestionData { + const FeedSuggestionData({ + required this.feed, + this.algorithmScores, + this.reason, + this.recommendationScore, + }); + + /// The suggested feed. + @override + final FeedData feed; + + /// The algorithm scores for this suggestion. + /// + /// Maps algorithm names to their scores for ranking and relevance determination. + @override + final Map? algorithmScores; + + /// The reason for suggesting this feed. + /// + /// A human-readable explanation such as "Based on your interests" or "Popular in your network". + @override + final String? reason; + + /// The overall recommendation score for this feed. + /// + /// A normalized value representing recommendation confidence. Higher values indicate stronger recommendations. + @override + final double? recommendationScore; +} + +/// Extension function to convert a [FeedSuggestionResponse] to a [FeedSuggestionData] model. +extension FeedSuggestionResponseMapper on FeedSuggestionResponse { + /// Converts this API feed response common fields to a domain [FeedSuggestionData] instance. + /// + /// Returns a [FeedSuggestionData] instance containing the feed information + /// from the API response with proper field mapping and type conversions. + FeedSuggestionData toModel() { + return FeedSuggestionData( + feed: FeedData( + createdAt: createdAt, + createdBy: createdBy.toModel(), + deletedAt: deletedAt, + description: description, + fid: FeedId.fromRawValue(feed), + filterTags: [...?filterTags], + followerCount: followerCount, + followingCount: followingCount, + groupId: groupId, + id: id, + memberCount: memberCount, + name: name, + ownCapabilities: ownCapabilities ?? const [], + ownMembership: ownMembership?.toModel(), + pinCount: pinCount, + updatedAt: updatedAt, + visibility: visibility, + custom: custom, + ), + algorithmScores: algorithmScores, + reason: reason, + recommendationScore: recommendationScore, + ); + } +} diff --git a/packages/stream_feeds/lib/src/models/feed_suggestion_data.freezed.dart b/packages/stream_feeds/lib/src/models/feed_suggestion_data.freezed.dart new file mode 100644 index 00000000..972ca995 --- /dev/null +++ b/packages/stream_feeds/lib/src/models/feed_suggestion_data.freezed.dart @@ -0,0 +1,110 @@ +// dart format width=80 +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'feed_suggestion_data.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$FeedSuggestionData { + FeedData get feed; + Map? get algorithmScores; + String? get reason; + double? get recommendationScore; + + /// Create a copy of FeedSuggestionData + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $FeedSuggestionDataCopyWith get copyWith => + _$FeedSuggestionDataCopyWithImpl( + this as FeedSuggestionData, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is FeedSuggestionData && + (identical(other.feed, feed) || other.feed == feed) && + const DeepCollectionEquality() + .equals(other.algorithmScores, algorithmScores) && + (identical(other.reason, reason) || other.reason == reason) && + (identical(other.recommendationScore, recommendationScore) || + other.recommendationScore == recommendationScore)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + feed, + const DeepCollectionEquality().hash(algorithmScores), + reason, + recommendationScore); + + @override + String toString() { + return 'FeedSuggestionData(feed: $feed, algorithmScores: $algorithmScores, reason: $reason, recommendationScore: $recommendationScore)'; + } +} + +/// @nodoc +abstract mixin class $FeedSuggestionDataCopyWith<$Res> { + factory $FeedSuggestionDataCopyWith( + FeedSuggestionData value, $Res Function(FeedSuggestionData) _then) = + _$FeedSuggestionDataCopyWithImpl; + @useResult + $Res call( + {FeedData feed, + Map? algorithmScores, + String? reason, + double? recommendationScore}); +} + +/// @nodoc +class _$FeedSuggestionDataCopyWithImpl<$Res> + implements $FeedSuggestionDataCopyWith<$Res> { + _$FeedSuggestionDataCopyWithImpl(this._self, this._then); + + final FeedSuggestionData _self; + final $Res Function(FeedSuggestionData) _then; + + /// Create a copy of FeedSuggestionData + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? feed = null, + Object? algorithmScores = freezed, + Object? reason = freezed, + Object? recommendationScore = freezed, + }) { + return _then(FeedSuggestionData( + feed: null == feed + ? _self.feed + : feed // ignore: cast_nullable_to_non_nullable + as FeedData, + algorithmScores: freezed == algorithmScores + ? _self.algorithmScores + : algorithmScores // ignore: cast_nullable_to_non_nullable + as Map?, + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + recommendationScore: freezed == recommendationScore + ? _self.recommendationScore + : recommendationScore // ignore: cast_nullable_to_non_nullable + as double?, + )); + } +} + +// dart format on diff --git a/packages/stream_feeds/lib/src/models/feeds_reaction_data.dart b/packages/stream_feeds/lib/src/models/feeds_reaction_data.dart index 3e477447..fef89675 100644 --- a/packages/stream_feeds/lib/src/models/feeds_reaction_data.dart +++ b/packages/stream_feeds/lib/src/models/feeds_reaction_data.dart @@ -26,6 +26,8 @@ class FeedsReactionData with _$FeedsReactionData { @override final String activityId; + /// The ID of the comment this reaction is associated with. + @override final String? commentId; /// The date and time when the reaction was created. @@ -49,8 +51,10 @@ class FeedsReactionData with _$FeedsReactionData { final Map? custom; /// Unique identifier for the reaction, generated from the activity ID and user ID. - String get id => - '${user.id}-$type${commentId == null ? '' : '-$commentId'}-$activityId'; + String get id { + if (commentId case final id?) return '${user.id}-$type-$id-$activityId'; + return '${user.id}-$type-$activityId'; + } } /// Extension function to convert a [FeedsReactionResponse] to a [FeedsReactionData] model. diff --git a/packages/stream_feeds/lib/src/models/feeds_reaction_data.freezed.dart b/packages/stream_feeds/lib/src/models/feeds_reaction_data.freezed.dart index db51d0d1..3c53c1b3 100644 --- a/packages/stream_feeds/lib/src/models/feeds_reaction_data.freezed.dart +++ b/packages/stream_feeds/lib/src/models/feeds_reaction_data.freezed.dart @@ -16,6 +16,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$FeedsReactionData { String get activityId; + String? get commentId; DateTime get createdAt; String get type; DateTime get updatedAt; @@ -37,6 +38,8 @@ mixin _$FeedsReactionData { other is FeedsReactionData && (identical(other.activityId, activityId) || other.activityId == activityId) && + (identical(other.commentId, commentId) || + other.commentId == commentId) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && (identical(other.type, type) || other.type == type) && @@ -47,12 +50,12 @@ mixin _$FeedsReactionData { } @override - int get hashCode => Object.hash(runtimeType, activityId, createdAt, type, - updatedAt, user, const DeepCollectionEquality().hash(custom)); + int get hashCode => Object.hash(runtimeType, activityId, commentId, createdAt, + type, updatedAt, user, const DeepCollectionEquality().hash(custom)); @override String toString() { - return 'FeedsReactionData(activityId: $activityId, createdAt: $createdAt, type: $type, updatedAt: $updatedAt, user: $user, custom: $custom)'; + return 'FeedsReactionData(activityId: $activityId, commentId: $commentId, createdAt: $createdAt, type: $type, updatedAt: $updatedAt, user: $user, custom: $custom)'; } } @@ -64,6 +67,7 @@ abstract mixin class $FeedsReactionDataCopyWith<$Res> { @useResult $Res call( {String activityId, + String? commentId, DateTime createdAt, String type, DateTime updatedAt, @@ -85,6 +89,7 @@ class _$FeedsReactionDataCopyWithImpl<$Res> @override $Res call({ Object? activityId = null, + Object? commentId = freezed, Object? createdAt = null, Object? type = null, Object? updatedAt = null, @@ -96,6 +101,10 @@ class _$FeedsReactionDataCopyWithImpl<$Res> ? _self.activityId : activityId // ignore: cast_nullable_to_non_nullable as String, + commentId: freezed == commentId + ? _self.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as String?, createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/lib/src/repository/feeds_repository.dart b/packages/stream_feeds/lib/src/repository/feeds_repository.dart index b3da7ef7..81b590dd 100644 --- a/packages/stream_feeds/lib/src/repository/feeds_repository.dart +++ b/packages/stream_feeds/lib/src/repository/feeds_repository.dart @@ -8,6 +8,7 @@ import '../models/aggregated_activity_data.dart'; import '../models/feed_data.dart'; import '../models/feed_id.dart'; import '../models/feed_member_data.dart'; +import '../models/feed_suggestion_data.dart'; import '../models/follow_data.dart'; import '../models/get_or_create_feed_data.dart'; import '../models/model_updates.dart'; @@ -173,8 +174,8 @@ class FeedsRepository { /// /// Retrieves suggested feeds to follow based on the specified [feedGroupId]. /// - /// Returns a [Result] containing a list of suggested [FeedData] or an error. - Future>> queryFollowSuggestions({ + /// Returns a [Result] containing a list of [FeedSuggestionData] or an error. + Future>> queryFollowSuggestions({ required String feedGroupId, int? limit, }) async { diff --git a/packages/stream_feeds/lib/src/state/feed.dart b/packages/stream_feeds/lib/src/state/feed.dart index b806dcb4..5fec37e6 100644 --- a/packages/stream_feeds/lib/src/state/feed.dart +++ b/packages/stream_feeds/lib/src/state/feed.dart @@ -12,6 +12,7 @@ import '../models/comment_data.dart'; import '../models/feed_data.dart'; import '../models/feed_id.dart'; import '../models/feed_member_data.dart'; +import '../models/feed_suggestion_data.dart'; import '../models/feeds_reaction_data.dart'; import '../models/follow_data.dart'; import '../models/model_updates.dart'; @@ -471,9 +472,11 @@ class Feed with Disposable { /// /// [limit] Optional limit for the number of suggestions to return. If `null`, uses the /// default limit. - /// Returns a [Result] containing a list of [FeedData] representing the suggested feeds if - /// successful, or an error if the operation fails. - Future>> queryFollowSuggestions({int? limit}) { + /// Returns a [Result] containing a list of [FeedSuggestionData] representing + /// the suggested feeds if successful, or an error if the operation fails. + Future>> queryFollowSuggestions({ + int? limit, + }) { return feedsRepository.queryFollowSuggestions( feedGroupId: query.fid.group, limit: limit, diff --git a/packages/stream_feeds/lib/src/state/query/feed_query.dart b/packages/stream_feeds/lib/src/state/query/feed_query.dart index f6eaf41b..bb27b281 100644 --- a/packages/stream_feeds/lib/src/state/query/feed_query.dart +++ b/packages/stream_feeds/lib/src/state/query/feed_query.dart @@ -32,7 +32,6 @@ class FeedQuery with _$FeedQuery { this.activityLimit, this.activityNext, this.activityPrevious, - this.activitySelectorOptions, this.data, this.externalRanking, this.followerLimit, @@ -65,10 +64,6 @@ class FeedQuery with _$FeedQuery { @override final String? activityPrevious; - /// Custom options for activity selection and processing. - @override - final Map? activitySelectorOptions; - /// Additional data to associate with the feed. @override final FeedInputData? data; @@ -111,7 +106,6 @@ extension FeedQueryRequest on FeedQuery { prev: activityPrevious, view: view, watch: watch, - activitySelectorOptions: activitySelectorOptions, data: data?.toRequest(), externalRanking: externalRanking, filter: activityFilter?.toRequest(), diff --git a/packages/stream_feeds/lib/src/state/query/feed_query.freezed.dart b/packages/stream_feeds/lib/src/state/query/feed_query.freezed.dart index a569c815..d0d9a1c7 100644 --- a/packages/stream_feeds/lib/src/state/query/feed_query.freezed.dart +++ b/packages/stream_feeds/lib/src/state/query/feed_query.freezed.dart @@ -20,7 +20,6 @@ mixin _$FeedQuery { int? get activityLimit; String? get activityNext; String? get activityPrevious; - Map? get activitySelectorOptions; FeedInputData? get data; Map? get externalRanking; int? get followerLimit; @@ -51,8 +50,6 @@ mixin _$FeedQuery { other.activityNext == activityNext) && (identical(other.activityPrevious, activityPrevious) || other.activityPrevious == activityPrevious) && - const DeepCollectionEquality().equals( - other.activitySelectorOptions, activitySelectorOptions) && (identical(other.data, data) || other.data == data) && const DeepCollectionEquality() .equals(other.externalRanking, externalRanking) && @@ -76,7 +73,6 @@ mixin _$FeedQuery { activityLimit, activityNext, activityPrevious, - const DeepCollectionEquality().hash(activitySelectorOptions), data, const DeepCollectionEquality().hash(externalRanking), followerLimit, @@ -88,7 +84,7 @@ mixin _$FeedQuery { @override String toString() { - return 'FeedQuery(fid: $fid, activityFilter: $activityFilter, activityLimit: $activityLimit, activityNext: $activityNext, activityPrevious: $activityPrevious, activitySelectorOptions: $activitySelectorOptions, data: $data, externalRanking: $externalRanking, followerLimit: $followerLimit, followingLimit: $followingLimit, interestWeights: $interestWeights, memberLimit: $memberLimit, view: $view, watch: $watch)'; + return 'FeedQuery(fid: $fid, activityFilter: $activityFilter, activityLimit: $activityLimit, activityNext: $activityNext, activityPrevious: $activityPrevious, data: $data, externalRanking: $externalRanking, followerLimit: $followerLimit, followingLimit: $followingLimit, interestWeights: $interestWeights, memberLimit: $memberLimit, view: $view, watch: $watch)'; } } @@ -103,7 +99,6 @@ abstract mixin class $FeedQueryCopyWith<$Res> { int? activityLimit, String? activityNext, String? activityPrevious, - Map? activitySelectorOptions, FeedInputData? data, Map? externalRanking, int? followerLimit, @@ -131,7 +126,6 @@ class _$FeedQueryCopyWithImpl<$Res> implements $FeedQueryCopyWith<$Res> { Object? activityLimit = freezed, Object? activityNext = freezed, Object? activityPrevious = freezed, - Object? activitySelectorOptions = freezed, Object? data = freezed, Object? externalRanking = freezed, Object? followerLimit = freezed, @@ -162,10 +156,6 @@ class _$FeedQueryCopyWithImpl<$Res> implements $FeedQueryCopyWith<$Res> { ? _self.activityPrevious : activityPrevious // ignore: cast_nullable_to_non_nullable as String?, - activitySelectorOptions: freezed == activitySelectorOptions - ? _self.activitySelectorOptions - : activitySelectorOptions // ignore: cast_nullable_to_non_nullable - as Map?, data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_feeds/test/state/feed_test.dart b/packages/stream_feeds/test/state/feed_test.dart index 34741695..61e44096 100644 --- a/packages/stream_feeds/test/state/feed_test.dart +++ b/packages/stream_feeds/test/state/feed_test.dart @@ -57,6 +57,57 @@ void main() { }); }); + group('Query follow suggestions', () { + test('should return list of FeedSuggestionData', () async { + const feedId = FeedId(group: 'user', id: 'john'); + when( + () => feedsApi.getFollowSuggestions( + feedGroupId: feedId.group, + limit: any(named: 'limit'), + ), + ).thenAnswer( + (_) async => Result.success( + createDefaultGetFollowSuggestionsResponse( + suggestions: [ + createDefaultFeedSuggestionResponse( + id: 'suggestion-1', + reason: 'Based on your interests', + recommendationScore: 0.95, + algorithmScores: {'relevance': 0.9, 'popularity': 0.85}, + ), + createDefaultFeedSuggestionResponse( + id: 'suggestion-2', + reason: 'Popular in your network', + recommendationScore: 0.88, + ), + ], + ), + ), + ); + + final feed = client.feed(group: feedId.group, id: feedId.id); + final result = await feed.queryFollowSuggestions(limit: 10); + + expect(result, isA>>()); + + final suggestions = result.getOrThrow(); + expect(suggestions.length, 2); + + final firstSuggestion = suggestions[0]; + expect(firstSuggestion.feed.id, 'suggestion-1'); + expect(firstSuggestion.reason, 'Based on your interests'); + expect(firstSuggestion.recommendationScore, 0.95); + expect(firstSuggestion.algorithmScores, isNotNull); + expect(firstSuggestion.algorithmScores!['relevance'], 0.9); + expect(firstSuggestion.algorithmScores!['popularity'], 0.85); + + final secondSuggestion = suggestions[1]; + expect(secondSuggestion.feed.id, 'suggestion-2'); + expect(secondSuggestion.reason, 'Popular in your network'); + expect(secondSuggestion.recommendationScore, 0.88); + }); + }); + group('Follow events', () { late StreamController wsStreamController; late MockWebSocketSink webSocketSink; diff --git a/packages/stream_feeds/test/test_utils/fakes.dart b/packages/stream_feeds/test/test_utils/fakes.dart index 041922b0..79ddb5a7 100644 --- a/packages/stream_feeds/test/test_utils/fakes.dart +++ b/packages/stream_feeds/test/test_utils/fakes.dart @@ -2,13 +2,14 @@ import 'package:stream_feeds/stream_feeds.dart'; -GetCommentsResponse createDefaultCommentsResponse() => - const GetCommentsResponse( - comments: [], - next: null, - prev: null, - duration: 'duration', - ); +GetCommentsResponse createDefaultCommentsResponse() { + return const GetCommentsResponse( + comments: [], + next: null, + prev: null, + duration: 'duration', + ); +} UserResponse createDefaultUserResponse({ String id = 'id', @@ -41,12 +42,14 @@ GetActivityResponse createDefaultActivityResponse({ id: id, attachments: const [], bookmarkCount: 0, + collections: const {}, commentCount: 0, comments: const [], createdAt: DateTime(2021, 1, 1), custom: const {}, feeds: feeds, filterTags: const [], + hidden: false, interestTags: const [], latestReactions: const [], mentionedUsers: const [], @@ -57,8 +60,10 @@ GetActivityResponse createDefaultActivityResponse({ parent: null, poll: poll, popularity: 0, + preview: false, reactionCount: 0, reactionGroups: const {}, + restrictReplies: 'everyone', score: 0, searchData: const {}, shareCount: 0, @@ -77,42 +82,43 @@ PollResponseData createDefaultPollResponseData({ String id = 'poll-id', List latestAnswers = const [], Map> latestVotesByOption = const {}, -}) => - PollResponseData( - id: id, - name: 'name', - allowAnswers: true, - allowUserSuggestedOptions: true, - answersCount: latestAnswers.length, - createdAt: DateTime.now(), - createdById: 'id', - custom: const {}, - description: 'description', - enforceUniqueVote: true, - latestAnswers: latestAnswers, - latestVotesByOption: latestVotesByOption, - ownVotes: const [], - updatedAt: DateTime.now(), - voteCount: latestVotesByOption.values - .map((e) => e.length) - .fold(0, (v, e) => v + e), - voteCountsByOption: latestVotesByOption.map( - (k, e) => MapEntry(k, e.length), +}) { + return PollResponseData( + id: id, + name: 'name', + allowAnswers: true, + allowUserSuggestedOptions: true, + answersCount: latestAnswers.length, + createdAt: DateTime.now(), + createdById: 'id', + custom: const {}, + description: 'description', + enforceUniqueVote: true, + latestAnswers: latestAnswers, + latestVotesByOption: latestVotesByOption, + ownVotes: const [], + updatedAt: DateTime.now(), + voteCount: latestVotesByOption.values + .map((e) => e.length) + .fold(0, (v, e) => v + e), + voteCountsByOption: latestVotesByOption.map( + (k, e) => MapEntry(k, e.length), + ), + votingVisibility: 'visibility', + options: const [ + PollOptionResponseData( + id: 'id1', + text: 'text1', + custom: {}, ), - votingVisibility: 'visibility', - options: const [ - PollOptionResponseData( - id: 'id1', - text: 'text1', - custom: {}, - ), - PollOptionResponseData( - id: 'id2', - text: 'text2', - custom: {}, - ), - ], - ); + PollOptionResponseData( + id: 'id2', + text: 'text2', + custom: {}, + ), + ], + ); +} GetOrCreateFeedResponse createDefaultGetOrCreateFeedResponse({ int followerCount = 0, @@ -121,45 +127,47 @@ GetOrCreateFeedResponse createDefaultGetOrCreateFeedResponse({ List activities = const [], String? prevPagination, String? nextPagination, -}) => - GetOrCreateFeedResponse( - feed: createDefaultFeedResponse( - followerCount: followerCount, - followingCount: followingCount, - ), - activities: activities, - aggregatedActivities: aggregatedActivities, - created: true, - duration: '', - followers: const [], - following: const [], - members: const [], - pinnedActivities: const [], - next: nextPagination, - prev: prevPagination, - ); +}) { + return GetOrCreateFeedResponse( + feed: createDefaultFeedResponse( + followerCount: followerCount, + followingCount: followingCount, + ), + activities: activities, + aggregatedActivities: aggregatedActivities, + created: true, + duration: '', + followers: const [], + following: const [], + members: const [], + pinnedActivities: const [], + next: nextPagination, + prev: prevPagination, + ); +} FeedResponse createDefaultFeedResponse({ String id = 'id', String groupId = 'group', int followerCount = 0, int followingCount = 0, -}) => - FeedResponse( - id: id, - groupId: groupId, - feed: FeedId(group: groupId, id: id).toString(), - name: 'name', - description: 'description', - visibility: FeedVisibility.public, - createdAt: DateTime(2021, 1, 1), - createdBy: createDefaultUserResponse(), - followerCount: followerCount, - followingCount: followingCount, - memberCount: 0, - pinCount: 0, - updatedAt: DateTime.now(), - ); +}) { + return FeedResponse( + id: id, + groupId: groupId, + feed: FeedId(group: groupId, id: id).toString(), + name: 'name', + description: 'description', + visibility: FeedVisibility.public, + createdAt: DateTime(2021, 1, 1), + createdBy: createDefaultUserResponse(), + followerCount: followerCount, + followingCount: followingCount, + memberCount: 0, + pinCount: 0, + updatedAt: DateTime.now(), + ); +} CommentResponse createDefaultCommentResponse({ String id = 'id', @@ -258,6 +266,7 @@ BookmarkFolderResponse createDefaultBookmarkFolderResponse({ id: id, name: 'My Folder', updatedAt: DateTime(2021, 2, 1), + user: createDefaultUserResponse(), ); } @@ -278,17 +287,53 @@ PollVoteResponseData createDefaultPollVoteResponse({ AggregatedActivityResponse createDefaultAggregatedActivityResponse({ List? activities, String group = 'group', -}) => - AggregatedActivityResponse( - activities: activities ?? - [ - createDefaultActivityResponse().activity, - ], - activityCount: activities?.length ?? 1, - createdAt: DateTime(2021, 2, 1), - group: group, - score: 0, - updatedAt: DateTime(2021, 2, 1), - userCount: 1, - userCountTruncated: false, - ); +}) { + activities ??= [createDefaultActivityResponse().activity]; + return AggregatedActivityResponse( + activities: activities, + activityCount: activities.length, + createdAt: DateTime(2021, 2, 1), + group: group, + score: 0, + updatedAt: DateTime(2021, 2, 1), + userCount: 1, + userCountTruncated: false, + ); +} + +FeedSuggestionResponse createDefaultFeedSuggestionResponse({ + String id = 'suggestion-id', + String groupId = 'user', + String feedId = 'john', + Map? algorithmScores, + String? reason, + double? recommendationScore, +}) { + return FeedSuggestionResponse( + id: id, + groupId: groupId, + feed: FeedId(group: groupId, id: feedId).toString(), + name: 'Suggested Feed', + description: 'A suggested feed for you', + visibility: FeedVisibility.public, + createdAt: DateTime(2021, 1, 1), + createdBy: createDefaultUserResponse(), + followerCount: 100, + followingCount: 50, + memberCount: 10, + pinCount: 0, + updatedAt: DateTime(2021, 2, 1), + algorithmScores: algorithmScores, + reason: reason, + recommendationScore: recommendationScore, + ); +} + +GetFollowSuggestionsResponse createDefaultGetFollowSuggestionsResponse({ + List? suggestions, +}) { + return GetFollowSuggestionsResponse( + duration: '10ms', + suggestions: suggestions ?? [createDefaultFeedSuggestionResponse()], + ); +} diff --git a/sample_app/lib/screens/user_feed/profile/user_profile.dart b/sample_app/lib/screens/user_feed/profile/user_profile.dart index f6c415e4..e9bbbd27 100644 --- a/sample_app/lib/screens/user_feed/profile/user_profile.dart +++ b/sample_app/lib/screens/user_feed/profile/user_profile.dart @@ -61,7 +61,8 @@ class _UserProfileState extends State { Future _queryFollowSuggestions() async { final result = await widget.userFeed.queryFollowSuggestions(); - if (mounted) _updateFollowSuggestions(result.getOrNull()); + final suggestions = result.getOrNull()?.map((e) => e.feed).toList(); + if (mounted) _updateFollowSuggestions(suggestions); } void _updateFollowSuggestions(List? suggestions) { From dc3793372b61007e15ba7d01f59757e26b3aa516 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 21 Nov 2025 23:37:26 +0100 Subject: [PATCH 2/3] chore: update CHANGELOG.md --- packages/stream_feeds/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/stream_feeds/CHANGELOG.md b/packages/stream_feeds/CHANGELOG.md index 3736a3b3..fde1769f 100644 --- a/packages/stream_feeds/CHANGELOG.md +++ b/packages/stream_feeds/CHANGELOG.md @@ -1,5 +1,6 @@ ## unreleased - [BREAKING] Change `queryFollowSuggestions` return type to `List`. +- [BREAKING] Remove `activitySelectorOptions` from `FeedQuery`. - Add `hidden` and `preview` fields to `ActivityData`. - Update follower and following counts on the feed state when receiving follow websocket events. - Fix FeedsReactionData id for updating reactions in the feed state. From 3879c9414b6ccaf57b9750cf3208da83ef3c2531 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Tue, 25 Nov 2025 01:47:40 +0100 Subject: [PATCH 3/3] chore(repo): limit retrofit version to <=4.9.0 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. --- melos.yaml | 3 ++- packages/stream_feeds/pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/melos.yaml b/melos.yaml index c58d04fc..21d27c2a 100644 --- a/melos.yaml +++ b/melos.yaml @@ -42,7 +42,8 @@ command: photo_view: ^0.15.0 json_annotation: ^4.9.0 meta: ^1.9.1 - retrofit: ^4.6.0 + # There's a breaking change in retrofit 4.10.0, so we limit the version to <=4.9.0 + retrofit: ">=4.6.0 <=4.9.0" rxdart: ^0.28.0 shared_preferences: ^2.5.3 state_notifier: ^1.0.0 diff --git a/packages/stream_feeds/pubspec.yaml b/packages/stream_feeds/pubspec.yaml index 057df246..c1df1eb1 100644 --- a/packages/stream_feeds/pubspec.yaml +++ b/packages/stream_feeds/pubspec.yaml @@ -27,7 +27,7 @@ dependencies: intl: ">=0.18.1 <=0.21.0" json_annotation: ^4.9.0 meta: ^1.9.1 - retrofit: ^4.6.0 + retrofit: ">=4.6.0 <=4.9.0" rxdart: ^0.28.0 state_notifier: ^1.0.0 stream_core: ^0.3.0