From 1ba0b2a9b021089d5f7e781adf758e60f00d23c2 Mon Sep 17 00:00:00 2001 From: VelikovPetar Date: Wed, 14 Oct 2026 15:29:30 +0200 Subject: [PATCH 1/2] fix(llc): regenerate the OpenAPI client at protocol v239.70.0 Co-Authored-By: Claude Opus 5.5 --- openapi-migration/11-channels-and-members.md | 3 +- openapi-migration/tool/generate_plan.py | 17 +- packages/stream_chat/CHANGELOG.md | 2 + packages/stream_chat/lib/open_api/api.dart | 8 +- .../lib/open_api/api/default_api.dart | 313 ++++++++++++++++-- .../lib/open_api/api/default_api.g.dart | 137 +++++--- .../model/ai_audio_config_request.dart | 10 + .../ai_audio_config_request.freezed.dart | 30 +- .../model/ai_audio_config_request.g.dart | 6 + .../model/ai_audio_config_response.dart | 10 + .../ai_audio_config_response.freezed.dart | 26 +- .../model/ai_audio_config_response.g.dart | 6 + .../model/ai_indicator_clear_event.dart | 5 + .../ai_indicator_clear_event.freezed.dart | 13 +- .../model/ai_indicator_clear_event.g.dart | 2 + .../model/ai_indicator_stop_event.dart | 5 + .../ai_indicator_stop_event.freezed.dart | 13 +- .../model/ai_indicator_stop_event.g.dart | 2 + .../model/ai_indicator_update_event.dart | 5 + .../ai_indicator_update_event.freezed.dart | 13 +- .../model/ai_indicator_update_event.g.dart | 2 + .../lib/open_api/model/app_defaults.dart | 36 ++ .../open_api/model/app_defaults.freezed.dart | 83 +++++ .../lib/open_api/model/app_defaults.g.dart | 21 ++ .../open_api/model/app_response_fields.dart | 5 + .../model/app_response_fields.freezed.dart | 11 +- .../open_api/model/app_response_fields.g.dart | 2 + .../lib/open_api/model/ban_request.dart | 10 + .../open_api/model/ban_request.freezed.dart | 21 +- .../lib/open_api/model/ban_request.g.dart | 4 + .../open_api/model/channel_ban_response.dart | 52 +++ .../model/channel_ban_response.freezed.dart | 118 +++++++ .../model/channel_ban_response.g.dart | 33 ++ .../model/channel_ban_scope_response.dart | 53 +++ .../channel_ban_scope_response.freezed.dart | 112 +++++++ .../model/channel_ban_scope_response.g.dart | 45 +++ .../model/channel_bans_scope_totals.dart | 36 ++ .../channel_bans_scope_totals.freezed.dart | 82 +++++ .../model/channel_bans_scope_totals.g.dart | 21 ++ .../model/channel_member_response.dart | 4 +- .../channel_member_response.freezed.dart | 10 +- .../model/channel_member_response.g.dart | 2 +- .../model/channel_own_capability.dart | 1 + .../model/channel_state_response.dart | 5 + .../model/channel_state_response.freezed.dart | 12 +- .../model/channel_state_response.g.dart | 2 + .../model/channel_state_response_fields.dart | 5 + ...channel_state_response_fields.freezed.dart | 12 +- .../channel_state_response_fields.g.dart | 2 + .../content_country_code_parameters.dart | 37 +++ ...ntent_country_code_parameters.freezed.dart | 89 +++++ .../content_country_code_parameters.g.dart | 21 ++ .../delete_poll_answer_request_payload.dart | 32 ++ ...e_poll_answer_request_payload.freezed.dart | 76 +++++ .../delete_poll_answer_request_payload.g.dart | 15 + .../delete_poll_option_request_payload.dart | 37 +++ ...e_poll_option_request_payload.freezed.dart | 82 +++++ .../delete_poll_option_request_payload.g.dart | 21 ++ .../model/delete_poll_request_payload.dart | 31 ++ .../delete_poll_request_payload.freezed.dart | 76 +++++ .../model/delete_poll_request_payload.g.dart | 15 + .../model/entity_creator_response.dart | 6 - .../entity_creator_response.freezed.dart | 15 +- .../model/entity_creator_response.g.dart | 8 - .../model/feeds_notification_comment.dart | 5 + .../feeds_notification_comment.freezed.dart | 11 +- .../model/feeds_notification_comment.g.dart | 2 + .../model/feeds_v3_comment_response.dart | 5 + .../feeds_v3_comment_response.freezed.dart | 11 +- .../model/feeds_v3_comment_response.g.dart | 2 + .../open_api/model/full_user_response.dart | 6 - .../model/full_user_response.freezed.dart | 15 +- .../open_api/model/full_user_response.g.dart | 8 - .../model/get_or_create_channel_defaults.dart | 36 ++ ...et_or_create_channel_defaults.freezed.dart | 82 +++++ .../get_or_create_channel_defaults.g.dart | 21 ++ .../model/grouped_channels_group_request.dart | 5 + ...rouped_channels_group_request.freezed.dart | 27 +- .../grouped_channels_group_request.g.dart | 2 + .../model/grouped_query_channels_request.dart | 5 + ...rouped_query_channels_request.freezed.dart | 11 +- .../grouped_query_channels_request.g.dart | 2 + .../model/intent_rule_parameters.dart | 36 ++ .../model/intent_rule_parameters.freezed.dart | 82 +++++ .../model/intent_rule_parameters.g.dart | 21 ++ .../open_api/model/intent_topic_request.dart | 25 -- .../model/intent_topic_request.freezed.dart | 70 +--- .../model/intent_topic_request.g.dart | 10 - .../open_api/model/intent_topic_response.dart | 25 -- .../model/intent_topic_response.freezed.dart | 70 +--- .../model/intent_topic_response.g.dart | 10 - .../notification_added_to_channel_event.dart | 20 ++ ...cation_added_to_channel_event.freezed.dart | 43 ++- ...notification_added_to_channel_event.g.dart | 10 + .../lib/open_api/model/own_user_response.dart | 10 +- .../model/own_user_response.freezed.dart | 25 +- .../open_api/model/own_user_response.g.dart | 10 +- .../lib/open_api/model/pager_defaults.dart | 31 ++ .../model/pager_defaults.freezed.dart | 75 +++++ .../lib/open_api/model/pager_defaults.g.dart | 12 + .../model/query_channel_bans_request.dart | 56 ++++ .../query_channel_bans_request.freezed.dart | 132 ++++++++ .../model/query_channel_bans_request.g.dart | 29 ++ .../model/query_channel_bans_response.dart | 56 ++++ .../query_channel_bans_response.freezed.dart | 128 +++++++ .../model/query_channel_bans_response.g.dart | 33 ++ .../model/query_channels_defaults.dart | 46 +++ .../query_channels_defaults.freezed.dart | 99 ++++++ .../model/query_channels_defaults.g.dart | 25 ++ .../model/review_queue_item_response.dart | 10 + .../review_queue_item_response.freezed.dart | 20 +- .../model/review_queue_item_response.g.dart | 4 + .../model/rule_builder_condition.dart | 15 + .../model/rule_builder_condition.freezed.dart | 37 ++- .../model/rule_builder_condition.g.dart | 18 + .../scheduled_message_content_response.dart | 128 +++++++ ...uled_message_content_response.freezed.dart | 269 +++++++++++++++ .../scheduled_message_content_response.g.dart | 79 +++++ .../scheduled_message_created_event.dart | 64 ++++ ...heduled_message_created_event.freezed.dart | 137 ++++++++ .../scheduled_message_created_event.g.dart | 53 +++ .../scheduled_message_deleted_event.dart | 64 ++++ ...heduled_message_deleted_event.freezed.dart | 137 ++++++++ .../scheduled_message_deleted_event.g.dart | 53 +++ .../model/scheduled_message_failed_event.dart | 63 ++++ ...cheduled_message_failed_event.freezed.dart | 137 ++++++++ .../scheduled_message_failed_event.g.dart | 53 +++ .../model/scheduled_message_location.dart | 47 +++ .../scheduled_message_location.freezed.dart | 104 ++++++ .../model/scheduled_message_location.g.dart | 41 +++ .../model/scheduled_message_response.dart | 74 +++++ .../scheduled_message_response.freezed.dart | 155 +++++++++ .../model/scheduled_message_response.g.dart | 43 +++ .../model/scheduled_message_sent_event.dart | 68 ++++ .../scheduled_message_sent_event.freezed.dart | 146 ++++++++ .../model/scheduled_message_sent_event.g.dart | 55 +++ .../scheduled_message_updated_event.dart | 64 ++++ ...heduled_message_updated_event.freezed.dart | 137 ++++++++ .../scheduled_message_updated_event.g.dart | 53 +++ .../open_api/model/send_message_request.dart | 6 + .../model/send_message_request.freezed.dart | 11 +- .../model/send_message_request.g.dart | 18 + .../open_api/model/send_message_response.dart | 5 + .../model/send_message_response.freezed.dart | 13 +- .../model/send_message_response.g.dart | 6 + .../open_api/model/submit_action_request.dart | 18 + .../model/submit_action_request.freezed.dart | 29 +- .../model/submit_action_request.g.dart | 18 + ...ser_channel_ban_count_rule_parameters.dart | 42 +++ ...nel_ban_count_rule_parameters.freezed.dart | 93 ++++++ ...r_channel_ban_count_rule_parameters.g.dart | 23 ++ .../lib/open_api/model/user_response.dart | 6 - .../open_api/model/user_response.freezed.dart | 15 +- .../lib/open_api/model/user_response.g.dart | 8 - .../model/user_response_common_fields.dart | 6 - .../user_response_common_fields.freezed.dart | 15 +- .../model/user_response_common_fields.g.dart | 8 - .../model/user_response_privacy_fields.dart | 6 - .../user_response_privacy_fields.freezed.dart | 15 +- .../model/user_response_privacy_fields.g.dart | 8 - .../lib/open_api/model/ws_auth_message.dart | 5 + .../model/ws_auth_message.freezed.dart | 11 +- .../lib/open_api/model/ws_auth_message.g.dart | 2 + .../lib/open_api/model/ws_client_event.dart | 40 +++ .../lib/open_api/model/ws_event.dart | 40 +++ packages/stream_chat/lib/open_api/models.dart | 23 ++ .../api/default_api_json_query_test.dart | 150 +++++++++ .../client_connect_guest_user_test.dart | 1 - .../test/src/client/client_test.dart | 1 + packages/stream_chat/test/src/fakes.dart | 10 + 170 files changed, 5927 insertions(+), 487 deletions(-) create mode 100644 packages/stream_chat/lib/open_api/model/app_defaults.dart create mode 100644 packages/stream_chat/lib/open_api/model/app_defaults.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/app_defaults.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/channel_ban_response.dart create mode 100644 packages/stream_chat/lib/open_api/model/channel_ban_response.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/channel_ban_response.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/channel_ban_scope_response.dart create mode 100644 packages/stream_chat/lib/open_api/model/channel_ban_scope_response.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/channel_ban_scope_response.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/channel_bans_scope_totals.dart create mode 100644 packages/stream_chat/lib/open_api/model/channel_bans_scope_totals.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/channel_bans_scope_totals.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/content_country_code_parameters.dart create mode 100644 packages/stream_chat/lib/open_api/model/content_country_code_parameters.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/content_country_code_parameters.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/delete_poll_answer_request_payload.dart create mode 100644 packages/stream_chat/lib/open_api/model/delete_poll_answer_request_payload.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/delete_poll_answer_request_payload.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/delete_poll_option_request_payload.dart create mode 100644 packages/stream_chat/lib/open_api/model/delete_poll_option_request_payload.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/delete_poll_option_request_payload.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/delete_poll_request_payload.dart create mode 100644 packages/stream_chat/lib/open_api/model/delete_poll_request_payload.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/delete_poll_request_payload.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/get_or_create_channel_defaults.dart create mode 100644 packages/stream_chat/lib/open_api/model/get_or_create_channel_defaults.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/get_or_create_channel_defaults.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/intent_rule_parameters.dart create mode 100644 packages/stream_chat/lib/open_api/model/intent_rule_parameters.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/intent_rule_parameters.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/pager_defaults.dart create mode 100644 packages/stream_chat/lib/open_api/model/pager_defaults.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/pager_defaults.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/query_channel_bans_request.dart create mode 100644 packages/stream_chat/lib/open_api/model/query_channel_bans_request.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/query_channel_bans_request.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/query_channel_bans_response.dart create mode 100644 packages/stream_chat/lib/open_api/model/query_channel_bans_response.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/query_channel_bans_response.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/query_channels_defaults.dart create mode 100644 packages/stream_chat/lib/open_api/model/query_channels_defaults.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/query_channels_defaults.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_content_response.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_content_response.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_content_response.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_created_event.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_created_event.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_created_event.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_deleted_event.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_deleted_event.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_deleted_event.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_failed_event.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_failed_event.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_failed_event.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_location.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_location.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_location.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_response.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_response.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_response.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_sent_event.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_sent_event.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_sent_event.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_updated_event.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_updated_event.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/scheduled_message_updated_event.g.dart create mode 100644 packages/stream_chat/lib/open_api/model/user_channel_ban_count_rule_parameters.dart create mode 100644 packages/stream_chat/lib/open_api/model/user_channel_ban_count_rule_parameters.freezed.dart create mode 100644 packages/stream_chat/lib/open_api/model/user_channel_ban_count_rule_parameters.g.dart create mode 100644 packages/stream_chat/test/open_api/api/default_api_json_query_test.dart diff --git a/openapi-migration/11-channels-and-members.md b/openapi-migration/11-channels-and-members.md index ba18c48dd2..7b99abb189 100644 --- a/openapi-migration/11-channels-and-members.md +++ b/openapi-migration/11-channels-and-members.md @@ -2,7 +2,7 @@ **Goal:** The biggest group, and the one every controller above it reads through `ChannelState`. -**Size:** 27 hand-written method(s) across 2 file(s) → 24 generated operation(s). +**Size:** 27 hand-written method(s) across 2 file(s) → 25 generated operation(s). > This whole file is generated by `openapi-migration/tool/generate_plan.py`, prose included. > Edit its `GROUPS` entry and re-run the script — edits made here are lost on the next run. @@ -58,6 +58,7 @@ | `POST` | `/api/v2/chat/channels/delivered` | `markDelivered` | `MarkDeliveredResponse` | | `POST` | `/api/v2/chat/channels/{type}/{id}/read` | `markRead` | `MarkReadResponse` | | `POST` | `/api/v2/chat/channels/{type}/{id}/unread` | `markUnread` | `DurationResponse` | +| `POST` | `/api/v2/chat/channels/{type}/{id}/bans/query` | `queryChannelBans` | `QueryChannelBansResponse` | | `POST` | `/api/v2/chat/channels` | `queryChannels` | `QueryChannelsResponse` | | `GET` | `/api/v2/chat/members` | `queryMembers` | `MembersResponse` | | `POST` | `/api/v2/chat/channels/{type}/{id}/event` | `sendEvent` | `EventResponse` | diff --git a/openapi-migration/tool/generate_plan.py b/openapi-migration/tool/generate_plan.py index 151e2843f3..966f53ff92 100644 --- a/openapi-migration/tool/generate_plan.py +++ b/openapi-migration/tool/generate_plan.py @@ -56,11 +56,18 @@ def read_handwritten(): def read_generated(): - """[(verb, path, operation, responseType)] for the generated client.""" - return re.findall( - r"@(GET|POST|PATCH|PUT|DELETE)\('([^']+)'\)\s*\n\s*Future>\s+(\w+)\(", - GENERATED_API.read_text(), - ) + """[(verb, path, operation, responseType)] for the generated client. + + An operation that sends a query parameter as JSON is annotated on a private `_name` method, which the public + `name` forwards to; it is listed under the public name. + """ + return [ + (verb, path, response, operation.removeprefix('_')) + for verb, path, response, operation in re.findall( + r"@(GET|POST|PATCH|PUT|DELETE)\('([^']+)'\)\s*\n\s*Future>\s+(\w+)\(", + GENERATED_API.read_text(), + ) + ] def owns(*prefixes, unless=()): diff --git a/packages/stream_chat/CHANGELOG.md b/packages/stream_chat/CHANGELOG.md index 35bbfb5d5e..abad6c48b9 100644 --- a/packages/stream_chat/CHANGELOG.md +++ b/packages/stream_chat/CHANGELOG.md @@ -94,6 +94,8 @@ - `connectGuestUser` no longer leaves the signed-in user unauthenticated when it refuses to connect a guest over them. +- The OpenAPI-generated client's methods that take a `payload` or `sort` argument no longer fail with `invalid json data`. + 🔄 Changed - Failed messages now retry on server errors. The retry policy is now explicit: retry a request that never reached the server, a 5xx, a 429 and a 408; never another 4xx, a cancelled request, broken credentials, or anything the server marked unrecoverable. Previously only failures without a parseable error body retried, so a 500 or a 429 did not. diff --git a/packages/stream_chat/lib/open_api/api.dart b/packages/stream_chat/lib/open_api/api.dart index 573099edd8..accebc744c 100644 --- a/packages/stream_chat/lib/open_api/api.dart +++ b/packages/stream_chat/lib/open_api/api.dart @@ -1,9 +1,9 @@ // Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. // -// Spec: chat-clientside-api (API v239.44.1) -// Source: protocol @ openapi-v239.44.1 -// Checksum: 6219cc7928894656eb5710263eb971607a124203ff0e4c694f48a61c907e2aca -// Generator: GetStream/chat @ v239.44.1-22-g2a92b14e14 +// Spec: chat-clientside-api (API v239.70.0) +// Source: protocol @ openapi-v239.70.0 +// Checksum: 4472292a4951e16b2f439517fba42e2248e16e0413590b9b591479959625c1e4 +// Generator: GetStream/chat @ v239.67.0-238-g8d6e1fa600 // ignore_for_file: directives_ordering diff --git a/packages/stream_chat/lib/open_api/api/default_api.dart b/packages/stream_chat/lib/open_api/api/default_api.dart index 0fc7e7944c..6bc771b479 100644 --- a/packages/stream_chat/lib/open_api/api/default_api.dart +++ b/packages/stream_chat/lib/open_api/api/default_api.dart @@ -3,6 +3,8 @@ // coverage:ignore-file // ignore_for_file: unused_import, unnecessary_import, prefer_single_quotes, require_trailing_commas, unnecessary_raw_strings, public_member_api_docs +import 'dart:convert' show jsonEncode; + import 'package:retrofit/retrofit.dart'; import 'package:stream_core/stream_core.dart'; @@ -10,49 +12,66 @@ import '../models.dart'; part 'default_api.g.dart'; -@RestApi(callAdapter: _ResultCallAdapter) +// Call adapters are set per operation: retrofit_generator applies a +// class-level adapter to every method, concrete ones included, so its overrides +// would replace the typed methods declared here. +@RestApi() abstract interface class DefaultApi { factory DefaultApi( Dio dio, { String? baseUrl, - }) = _DefaultApi; + }) = _DefaultApi._; + + // A named non-factory constructor makes retrofit_generator extend this class + // instead of implementing it, so concrete methods declared here are + // inherited. The generated class mirrors it as `_DefaultApi._`, which is why + // the factory redirects there. + const DefaultApi._(); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/usergroups/{id}/members') Future> addUserGroupMembers({ @Path('id') required String id, @Body() required AddUserGroupMembersRequest addUserGroupMembersRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/appeal') Future> appeal({ @Body() required AppealRequest appealRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/ban') Future> ban({ @Body() required BanRequest banRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/users/block') Future> blockUsers({ @Body() required BlockUsersRequest blockUsersRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/appeals/bulk_action') Future> bulkActionAppeals({ @Body() required BulkActionAppealsRequest bulkActionAppealsRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/action_config/bulk_delete') Future> bulkDeleteActionConfig({ @Body() required BulkDeleteActionConfigRequest bulkDeleteActionConfigRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/action_config/bulk') Future> bulkUpsertActionConfig({ @Body() required BulkUpsertActionConfigRequest bulkUpsertActionConfigRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/messages/{message_id}/polls/{poll_id}/vote') Future> castPollVote({ @Path('message_id') required String messageId, @@ -60,16 +79,19 @@ abstract interface class DefaultApi { @Body() CastPollVoteRequest? castPollVoteRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/blocklists') Future> createBlockList({ @Body() required CreateBlockListRequest createBlockListRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/devices') Future> createDevice({ @Body() required CreateDeviceRequest createDeviceRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}/draft') Future> createDraft({ @Path('type') required String type, @@ -77,49 +99,58 @@ abstract interface class DefaultApi { @Body() required CreateDraftRequest createDraftRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/guest') Future> createGuest({ @Body() required CreateGuestRequest createGuestRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/polls') Future> createPoll({ @Body() required CreatePollRequest createPollRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/polls/{poll_id}/options') Future> createPollOption({ @Path('poll_id') required String pollId, @Body() required CreatePollOptionRequest createPollOptionRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/queues') Future> createQueue({ @Body() required CreateQueueRequest createQueueRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/messages/{message_id}/reminders') Future> createReminder({ @Path('message_id') required String messageId, @Body() CreateReminderRequest? createReminderRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/usergroups') Future> createUserGroup({ @Body() required CreateUserGroupRequest createUserGroupRequest, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/moderation/action_config/{id}') Future> deleteActionConfig({ @Path('id') required String id, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/blocklists/{name}') Future> deleteBlockList({ @Path('name') required String name, @Query('team') String? team, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/chat/channels/{type}/{id}') Future> deleteChannel({ @Path('type') required String type, @@ -127,6 +158,7 @@ abstract interface class DefaultApi { @Query('hard_delete') bool? hardDelete, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/chat/channels/{type}/{id}/file') Future> deleteChannelFile({ @Path('type') required String type, @@ -134,6 +166,7 @@ abstract interface class DefaultApi { @Query('url') String? url, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/chat/channels/{type}/{id}/image') Future> deleteChannelImage({ @Path('type') required String type, @@ -141,22 +174,26 @@ abstract interface class DefaultApi { @Query('url') String? url, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/delete') Future> deleteChannels({ @Body() required DeleteChannelsRequest deleteChannelsRequest, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/moderation/config/{key}') Future> deleteConfig({ @Path('key') required String key, @Query('team') String? team, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/devices') Future> deleteDevice({ @Query('id') required String id, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/chat/channels/{type}/{id}/draft') Future> deleteDraft({ @Path('type') required String type, @@ -164,16 +201,19 @@ abstract interface class DefaultApi { @Query('parent_id') String? parentId, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/uploads/file') Future> deleteFile({ @Query('url') String? url, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/uploads/image') Future> deleteImage({ @Query('url') String? url, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/chat/messages/{id}') Future> deleteMessage({ @Path('id') required String id, @@ -181,17 +221,20 @@ abstract interface class DefaultApi { @Query('delete_for_me') bool? deleteForMe, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/polls/{poll_id}') Future> deletePoll({ @Path('poll_id') required String pollId, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/polls/{poll_id}/options/{option_id}') Future> deletePollOption({ @Path('poll_id') required String pollId, @Path('option_id') required String optionId, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/chat/messages/{message_id}/polls/{poll_id}/vote/{vote_id}') Future> deletePollVote({ @Path('message_id') required String messageId, @@ -199,33 +242,39 @@ abstract interface class DefaultApi { @Path('vote_id') required String voteId, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/queues/{id}/delete') Future> deleteQueue({ @Path('id') required String id, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/chat/messages/{id}/reaction/{type}') Future> deleteReaction({ @Path('id') required String id, @Path('type') required String type, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/chat/messages/{message_id}/reminders') Future> deleteReminder({ @Path('message_id') required String messageId, }); + @UseCallAdapter(_ResultCallAdapter) @DELETE('/api/v2/usergroups/{id}') Future> deleteUserGroup({ @Path('id') required String id, @Query('team_id') String? teamId, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/flag') Future> flag({ @Body() required FlagRequest flagRequest, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/moderation/action_config') Future> getActionConfig({ @Query('queue_type') String? queueType, @@ -234,17 +283,21 @@ abstract interface class DefaultApi { @Query('only_defaults') bool? onlyDefaults, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/app') Future> getApp(); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/moderation/appeal/{id}') Future> getAppeal({ @Path('id') required String id, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/users/block') Future> getBlockedUsers(); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/chat/channels/{type}/{id}') Future> getChannel({ @Path('type') required String type, @@ -260,12 +313,14 @@ abstract interface class DefaultApi { @Query('messages_id_around') String? messagesIdAround, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/moderation/config/{key}') Future> getConfig({ @Path('key') required String key, @Query('team') String? team, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/chat/channels/{type}/{id}/draft') Future> getDraft({ @Path('type') required String type, @@ -273,6 +328,7 @@ abstract interface class DefaultApi { @Query('parent_id') String? parentId, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/chat/channels/{type}/{id}/messages') Future> getManyMessages({ @Path('type') required String type, @@ -281,16 +337,19 @@ abstract interface class DefaultApi { @Query('member_custom_include') List? memberCustomInclude, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/chat/messages/{id}') Future> getMessage({ @Path('id') required String id, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/og') Future> getOG({ @Query('url') required String url, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}/query') Future> getOrCreateChannel({ @Path('type') required String type, @@ -298,14 +357,52 @@ abstract interface class DefaultApi { @Body() ChannelGetOrCreateRequest? channelGetOrCreateRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/query') Future> getOrCreateDistinctChannel({ @Path('type') required String type, @Body() ChannelGetOrCreateRequest? channelGetOrCreateRequest, }); - @GET('/api/v2/chat/channels/{type}/{id}/pinned_messages') Future> getPinnedMessages({ + required String type, + required String id, + int? limit, + int? offset, + String? idGte, + String? idGt, + String? idLte, + String? idLt, + DateTime? pinnedAtAfterOrEqual, + DateTime? pinnedAtAfter, + DateTime? pinnedAtBeforeOrEqual, + DateTime? pinnedAtBefore, + String? idAround, + DateTime? pinnedAtAround, + List? sort, + List? memberCustomInclude, + }) => _getPinnedMessages( + type: type, + id: id, + limit: limit, + offset: offset, + idGte: idGte, + idGt: idGt, + idLte: idLte, + idLt: idLt, + pinnedAtAfterOrEqual: pinnedAtAfterOrEqual, + pinnedAtAfter: pinnedAtAfter, + pinnedAtBeforeOrEqual: pinnedAtBeforeOrEqual, + pinnedAtBefore: pinnedAtBefore, + idAround: idAround, + pinnedAtAround: pinnedAtAround, + sort: _JsonQuery.of(sort), + memberCustomInclude: memberCustomInclude, + ); + + @UseCallAdapter(_ResultCallAdapter) + @GET('/api/v2/chat/channels/{type}/{id}/pinned_messages') + Future> _getPinnedMessages({ @Path('type') required String type, @Path('id') required String id, @Query('limit') int? limit, @@ -320,26 +417,30 @@ abstract interface class DefaultApi { @Query('pinned_at_before') DateTime? pinnedAtBefore, @Query('id_around') String? idAround, @Query('pinned_at_around') DateTime? pinnedAtAround, - @Query('sort') List? sort, + @Query('sort') _JsonQuery? sort, @Query('member_custom_include') List? memberCustomInclude, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/polls/{poll_id}') Future> getPoll({ @Path('poll_id') required String pollId, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/polls/{poll_id}/options/{option_id}') Future> getPollOption({ @Path('poll_id') required String pollId, @Path('option_id') required String optionId, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/moderation/queues/{id}') Future> getQueue({ @Path('id') required String id, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/chat/messages/{id}/reactions') Future> getReactions({ @Path('id') required String id, @@ -347,8 +448,31 @@ abstract interface class DefaultApi { @Query('offset') int? offset, }); - @GET('/api/v2/chat/messages/{parent_id}/replies') Future> getReplies({ + required String parentId, + int? limit, + String? idGte, + String? idGt, + String? idLte, + String? idLt, + String? idAround, + List? sort, + List? memberCustomInclude, + }) => _getReplies( + parentId: parentId, + limit: limit, + idGte: idGte, + idGt: idGt, + idLte: idLte, + idLt: idLt, + idAround: idAround, + sort: _JsonQuery.of(sort), + memberCustomInclude: memberCustomInclude, + ); + + @UseCallAdapter(_ResultCallAdapter) + @GET('/api/v2/chat/messages/{parent_id}/replies') + Future> _getReplies({ @Path('parent_id') required String parentId, @Query('limit') int? limit, @Query('id_gte') String? idGte, @@ -356,10 +480,11 @@ abstract interface class DefaultApi { @Query('id_lte') String? idLte, @Query('id_lt') String? idLt, @Query('id_around') String? idAround, - @Query('sort') List? sort, + @Query('sort') _JsonQuery? sort, @Query('member_custom_include') List? memberCustomInclude, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/chat/threads/{message_id}') Future> getThread({ @Path('message_id') required String messageId, @@ -369,20 +494,24 @@ abstract interface class DefaultApi { @Query('member_limit') int? memberLimit, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/usergroups/{id}') Future> getUserGroup({ @Path('id') required String id, @Query('team_id') String? teamId, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/users/live_locations') Future> getUserLiveLocations(); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/grouped') Future> groupedQueryChannels({ @Body() GroupedQueryChannelsRequest? groupedQueryChannelsRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}/hide') Future> hideChannel({ @Path('type') required String type, @@ -390,12 +519,14 @@ abstract interface class DefaultApi { @Body() HideChannelRequest? hideChannelRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/blocklists/{id}/import') Future> importBlockList({ @Path('id') required String id, @Body() required ImportBlockListRequest importBlockListRequest, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/blocklists') Future> listBlockLists({ @Query('team') String? team, @@ -403,12 +534,15 @@ abstract interface class DefaultApi { @Query('limit') int? limit, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/devices') Future> listDevices(); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/moderation/queues') Future> listQueues(); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/usergroups') Future> listUserGroups({ @Query('limit') int? limit, @@ -417,21 +551,34 @@ abstract interface class DefaultApi { @Query('team_id') String? teamId, }); - @GET('/api/v2/longpoll') Future> longPoll({ - @Query('json') WSAuthMessage? json, + bool? close, + WSAuthMessage? json, + }) => _longPoll( + close: close, + json: _JsonQuery.of(json), + ); + + @UseCallAdapter(_ResultCallAdapter) + @GET('/api/v2/longpoll') + Future> _longPoll({ + @Query('close') bool? close, + @Query('json') _JsonQuery? json, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/read') Future> markChannelsRead({ @Body() MarkChannelsReadRequest? markChannelsReadRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/delivered') Future> markDelivered({ @Body() MarkDeliveredRequest? markDeliveredRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}/read') Future> markRead({ @Path('type') required String type, @@ -439,6 +586,7 @@ abstract interface class DefaultApi { @Body() MarkReadRequest? markReadRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}/unread') Future> markUnread({ @Path('type') required String type, @@ -446,110 +594,175 @@ abstract interface class DefaultApi { @Body() MarkUnreadRequest? markUnreadRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/mute') Future> mute({ @Body() required MuteRequest muteRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/moderation/mute/channel') Future> muteChannel({ @Body() MuteChannelRequest? muteChannelRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/appeals') Future> queryAppeals({ @Body() QueryAppealsRequest? queryAppealsRequest, }); - @GET('/api/v2/chat/query_banned_users') Future> queryBannedUsers({ - @Query('payload') QueryBannedUsersPayload? payload, + QueryBannedUsersPayload? payload, + }) => _queryBannedUsers( + payload: _JsonQuery.of(payload), + ); + + @UseCallAdapter(_ResultCallAdapter) + @GET('/api/v2/chat/query_banned_users') + Future> _queryBannedUsers({ + @Query('payload') _JsonQuery? payload, }); + @UseCallAdapter(_ResultCallAdapter) + @POST('/api/v2/chat/channels/{type}/{id}/bans/query') + Future> queryChannelBans({ + @Path('type') required String type, + @Path('id') required String id, + @Body() QueryChannelBansRequest? queryChannelBansRequest, + }); + + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels') Future> queryChannels({ @Body() QueryChannelsRequest? queryChannelsRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/drafts/query') Future> queryDrafts({ @Body() QueryDraftsRequest? queryDraftsRequest, }); - @GET('/api/v2/chat/query_future_channel_bans') Future> queryFutureChannelBans({ - @Query('payload') QueryFutureChannelBansPayload? payload, + QueryFutureChannelBansPayload? payload, + }) => _queryFutureChannelBans( + payload: _JsonQuery.of(payload), + ); + + @UseCallAdapter(_ResultCallAdapter) + @GET('/api/v2/chat/query_future_channel_bans') + Future> _queryFutureChannelBans({ + @Query('payload') _JsonQuery? payload, }); - @GET('/api/v2/chat/members') Future> queryMembers({ - @Query('payload') QueryMembersPayload? payload, + QueryMembersPayload? payload, + }) => _queryMembers( + payload: _JsonQuery.of(payload), + ); + + @UseCallAdapter(_ResultCallAdapter) + @GET('/api/v2/chat/members') + Future> _queryMembers({ + @Query('payload') _JsonQuery? payload, }); - @GET('/api/v2/chat/moderation/flags/message') Future> queryMessageFlags({ - @Query('payload') QueryMessageFlagsPayload? payload, + QueryMessageFlagsPayload? payload, + }) => _queryMessageFlags( + payload: _JsonQuery.of(payload), + ); + + @UseCallAdapter(_ResultCallAdapter) + @GET('/api/v2/chat/moderation/flags/message') + Future> _queryMessageFlags({ + @Query('payload') _JsonQuery? payload, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/configs') Future> queryModerationConfigs({ @Body() QueryModerationConfigsRequest? queryModerationConfigsRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/polls/{poll_id}/votes') Future> queryPollVotes({ @Path('poll_id') required String pollId, @Body() QueryPollVotesRequest? queryPollVotesRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/polls/query') Future> queryPolls({ @Body() QueryPollsRequest? queryPollsRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/messages/{id}/reactions') Future> queryReactions({ @Path('id') required String id, @Body() QueryReactionsRequest? queryReactionsRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/reminders/query') Future> queryReminders({ @Body() QueryRemindersRequest? queryRemindersRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/review_queue') Future> queryReviewQueue({ @Body() QueryReviewQueueRequest? queryReviewQueueRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/threads') Future> queryThreads({ @Body() QueryThreadsRequest? queryThreadsRequest, }); - @GET('/api/v2/users') Future> queryUsers({ - @Query('payload') QueryUsersPayload? payload, + QueryUsersPayload? payload, + }) => _queryUsers( + payload: _JsonQuery.of(payload), + ); + + @UseCallAdapter(_ResultCallAdapter) + @GET('/api/v2/users') + Future> _queryUsers({ + @Query('payload') _JsonQuery? payload, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/usergroups/{id}/members/delete') Future> removeUserGroupMembers({ @Path('id') required String id, @Body() required RemoveUserGroupMembersRequest removeUserGroupMembersRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/messages/{id}/action') Future> runMessageAction({ @Path('id') required String id, @Body() required MessageActionRequest messageActionRequest, }); - @GET('/api/v2/chat/search') Future> search({ - @Query('payload') SearchPayload? payload, + SearchPayload? payload, + }) => _search( + payload: _JsonQuery.of(payload), + ); + + @UseCallAdapter(_ResultCallAdapter) + @GET('/api/v2/chat/search') + Future> _search({ + @Query('payload') _JsonQuery? payload, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/roles/search') Future> searchRoles({ @Query('query') required String query, @@ -559,6 +772,7 @@ abstract interface class DefaultApi { @Query('include_global_roles') bool? includeGlobalRoles, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/usergroups/search') Future> searchUserGroups({ @Query('query') required String query, @@ -568,6 +782,7 @@ abstract interface class DefaultApi { @Query('team_id') String? teamId, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}/event') Future> sendEvent({ @Path('type') required String type, @@ -575,6 +790,7 @@ abstract interface class DefaultApi { @Body() required SendEventRequest sendEventRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}/message') Future> sendMessage({ @Path('type') required String type, @@ -582,29 +798,34 @@ abstract interface class DefaultApi { @Body() required SendMessageRequest sendMessageRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/messages/{id}/reaction') Future> sendReaction({ @Path('id') required String id, @Body() required SendReactionRequest sendReactionRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}/show') Future> showChannel({ @Path('type') required String type, @Path('id') required String id, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}/stop-watching') Future> stopWatchingChannel({ @Path('type') required String type, @Path('id') required String id, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/submit_action') Future> submitAction({ @Body() required SubmitActionRequest submitActionRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/sync') Future> sync({ @Query('with_inaccessible_cids') bool? withInaccessibleCids, @@ -612,12 +833,14 @@ abstract interface class DefaultApi { @Body() required SyncRequest syncRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/messages/{id}/translate') Future> translateMessage({ @Path('id') required String id, @Body() required TranslateMessageRequest translateMessageRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}/truncate') Future> truncateChannel({ @Path('type') required String type, @@ -625,36 +848,43 @@ abstract interface class DefaultApi { @Body() TruncateChannelRequest? truncateChannelRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/unban') Future> unban({ @Query('target_user_id') required String targetUserId, @Query('channel_cid') String? channelCid, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/users/unblock') Future> unblockUsers({ @Body() required UnblockUsersRequest unblockUsersRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/unmute') Future> unmute({ @Body() required UnmuteRequest unmuteRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/moderation/unmute/channel') Future> unmuteChannel({ @Body() UnmuteChannelRequest? unmuteChannelRequest, }); + @UseCallAdapter(_ResultCallAdapter) @GET('/api/v2/chat/unread') Future> unreadCounts(); + @UseCallAdapter(_ResultCallAdapter) @PUT('/api/v2/blocklists/{name}') Future> updateBlockList({ @Path('name') required String name, @Body() UpdateBlockListRequest? updateBlockListRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}') Future> updateChannel({ @Path('type') required String type, @@ -662,6 +892,7 @@ abstract interface class DefaultApi { @Body() UpdateChannelRequest? updateChannelRequest, }); + @UseCallAdapter(_ResultCallAdapter) @PATCH('/api/v2/chat/channels/{type}/{id}') Future> updateChannelPartial({ @Path('type') required String type, @@ -669,11 +900,13 @@ abstract interface class DefaultApi { @Body() UpdateChannelPartialRequest? updateChannelPartialRequest, }); + @UseCallAdapter(_ResultCallAdapter) @PUT('/api/v2/users/live_locations') Future> updateLiveLocation({ @Body() required UpdateLiveLocationRequest updateLiveLocationRequest, }); + @UseCallAdapter(_ResultCallAdapter) @PATCH('/api/v2/chat/channels/{type}/{id}/member') Future> updateMemberPartial({ @Path('type') required String type, @@ -681,74 +914,87 @@ abstract interface class DefaultApi { @Body() UpdateMemberPartialRequest? updateMemberPartialRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/messages/{id}') Future> updateMessage({ @Path('id') required String id, @Body() required UpdateMessageRequest updateMessageRequest, }); + @UseCallAdapter(_ResultCallAdapter) @PUT('/api/v2/chat/messages/{id}') Future> updateMessagePartial({ @Path('id') required String id, @Body() UpdateMessagePartialRequest? updateMessagePartialRequest, }); + @UseCallAdapter(_ResultCallAdapter) @PUT('/api/v2/polls') Future> updatePoll({ @Body() required UpdatePollRequest updatePollRequest, }); + @UseCallAdapter(_ResultCallAdapter) @PUT('/api/v2/polls/{poll_id}/options') Future> updatePollOption({ @Path('poll_id') required String pollId, @Body() required UpdatePollOptionRequest updatePollOptionRequest, }); + @UseCallAdapter(_ResultCallAdapter) @PATCH('/api/v2/polls/{poll_id}') Future> updatePollPartial({ @Path('poll_id') required String pollId, @Body() UpdatePollPartialRequest? updatePollPartialRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/push_preferences') Future> updatePushNotificationPreferences({ @Body() required UpsertPushPreferencesRequest upsertPushPreferencesRequest, }); + @UseCallAdapter(_ResultCallAdapter) @PATCH('/api/v2/moderation/queues/{id}') Future> updateQueue({ @Path('id') required String id, @Body() UpdateQueueRequest? updateQueueRequest, }); + @UseCallAdapter(_ResultCallAdapter) @PATCH('/api/v2/chat/messages/{message_id}/reminders') Future> updateReminder({ @Path('message_id') required String messageId, @Body() UpdateReminderRequest? updateReminderRequest, }); + @UseCallAdapter(_ResultCallAdapter) @PATCH('/api/v2/chat/threads/{message_id}') Future> updateThreadPartial({ @Path('message_id') required String messageId, @Body() UpdateThreadPartialRequest? updateThreadPartialRequest, }); + @UseCallAdapter(_ResultCallAdapter) @PUT('/api/v2/usergroups/{id}') Future> updateUserGroup({ @Path('id') required String id, @Body() UpdateUserGroupRequest? updateUserGroupRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/users') Future> updateUsers({ @Body() required UpdateUsersRequest updateUsersRequest, }); + @UseCallAdapter(_ResultCallAdapter) @PATCH('/api/v2/users') Future> updateUsersPartial({ @Body() required UpdateUsersPartialRequest updateUsersPartialRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}/file') Future> uploadChannelFile({ @Path('type') required String type, @@ -756,6 +1002,7 @@ abstract interface class DefaultApi { @Body() UploadChannelFileRequest? uploadChannelFileRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/chat/channels/{type}/{id}/image') Future> uploadChannelImage({ @Path('type') required String type, @@ -763,21 +1010,25 @@ abstract interface class DefaultApi { @Body() UploadChannelRequest? uploadChannelRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/uploads/file') Future> uploadFile({ @Body() FileUploadRequest? fileUploadRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/uploads/image') Future> uploadImage({ @Body() ImageUploadRequest? imageUploadRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/action_config') Future> upsertActionConfig({ @Body() required UpsertActionConfigRequest upsertActionConfigRequest, }); + @UseCallAdapter(_ResultCallAdapter) @POST('/api/v2/moderation/config') Future> upsertConfig({ @Body() required UpsertConfigRequest upsertConfigRequest, @@ -788,3 +1039,25 @@ class _ResultCallAdapter extends CallAdapter, Future>> { @override Future> adapt(Future Function() call) => runApiSafely(call); } + +// A query parameter sent as one JSON string, such as a query payload or a sort +// list. The generated retrofit code calls toJson() inside the call adapter, so a +// value that cannot be encoded fails the call instead of throwing. Dates are +// encoded as RFC3339 in UTC, like the models' date fields, and any other +// iterable, such as a Set, as a list. +final class _JsonQuery { + const _JsonQuery(this.value); + + static _JsonQuery? of(Object? value) => value == null ? null : _JsonQuery(value); + + final Object value; + + String toJson() => jsonEncode(value, toEncodable: _toEncodable); + + static Object? _toEncodable(Object? object) => switch (object) { + final DateTime date => date.toUtc().toIso8601String(), + final Iterable iterable => iterable.toList(), + // ignore: avoid_dynamic_calls + _ => (object as dynamic).toJson(), + }; +} diff --git a/packages/stream_chat/lib/open_api/api/default_api.g.dart b/packages/stream_chat/lib/open_api/api/default_api.g.dart index 5e3782312c..1244ef9a1e 100644 --- a/packages/stream_chat/lib/open_api/api/default_api.g.dart +++ b/packages/stream_chat/lib/open_api/api/default_api.g.dart @@ -8,10 +8,11 @@ part of 'default_api.dart'; // RetrofitGenerator // ************************************************************************** +// ignore_for_file: type=lint // ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element,unnecessary_string_interpolations,unused_element_parameter,avoid_unused_constructor_parameters,unreachable_from_main,avoid_redundant_argument_values -class _DefaultApi implements DefaultApi { - _DefaultApi(this._dio, {this.baseUrl, this.errorLogger}); +class _DefaultApi extends DefaultApi { + _DefaultApi._(this._dio, {this.baseUrl, this.errorLogger}) : super._(); final Dio _dio; @@ -1984,7 +1985,7 @@ class _DefaultApi implements DefaultApi { ); } - Future _getPinnedMessages({ + Future __getPinnedMessages({ required String type, required String id, int? limit, @@ -1999,7 +2000,7 @@ class _DefaultApi implements DefaultApi { DateTime? pinnedAtBefore, String? idAround, DateTime? pinnedAtAround, - List? sort, + _JsonQuery? sort, List? memberCustomInclude, }) async { final _extra = {}; @@ -2016,7 +2017,7 @@ class _DefaultApi implements DefaultApi { r'pinned_at_before': pinnedAtBefore?.toIso8601String(), r'id_around': idAround, r'pinned_at_around': pinnedAtAround?.toIso8601String(), - r'sort': sort, + r'sort': sort?.toJson(), r'member_custom_include': memberCustomInclude, }; queryParameters.removeWhere((k, v) => v == null); @@ -2044,7 +2045,7 @@ class _DefaultApi implements DefaultApi { } @override - Future> getPinnedMessages({ + Future> _getPinnedMessages({ required String type, required String id, int? limit, @@ -2059,11 +2060,11 @@ class _DefaultApi implements DefaultApi { DateTime? pinnedAtBefore, String? idAround, DateTime? pinnedAtAround, - List? sort, + _JsonQuery? sort, List? memberCustomInclude, }) { return _ResultCallAdapter().adapt( - () => _getPinnedMessages( + () => __getPinnedMessages( type: type, id: id, limit: limit, @@ -2232,7 +2233,7 @@ class _DefaultApi implements DefaultApi { ); } - Future _getReplies({ + Future __getReplies({ required String parentId, int? limit, String? idGte, @@ -2240,7 +2241,7 @@ class _DefaultApi implements DefaultApi { String? idLte, String? idLt, String? idAround, - List? sort, + _JsonQuery? sort, List? memberCustomInclude, }) async { final _extra = {}; @@ -2251,7 +2252,7 @@ class _DefaultApi implements DefaultApi { r'id_lte': idLte, r'id_lt': idLt, r'id_around': idAround, - r'sort': sort, + r'sort': sort?.toJson(), r'member_custom_include': memberCustomInclude, }; queryParameters.removeWhere((k, v) => v == null); @@ -2279,7 +2280,7 @@ class _DefaultApi implements DefaultApi { } @override - Future> getReplies({ + Future> _getReplies({ required String parentId, int? limit, String? idGte, @@ -2287,11 +2288,11 @@ class _DefaultApi implements DefaultApi { String? idLte, String? idLt, String? idAround, - List? sort, + _JsonQuery? sort, List? memberCustomInclude, }) { return _ResultCallAdapter().adapt( - () => _getReplies( + () => __getReplies( parentId: parentId, limit: limit, idGte: idGte, @@ -2730,9 +2731,12 @@ class _DefaultApi implements DefaultApi { ); } - Future _longPoll({WSAuthMessage? json}) async { + Future __longPoll({bool? close, _JsonQuery? json}) async { final _extra = {}; - final queryParameters = {r'json': json?.toJson()}; + final queryParameters = { + r'close': close, + r'json': json?.toJson(), + }; queryParameters.removeWhere((k, v) => v == null); final _headers = {}; const Map? _data = null; @@ -2750,8 +2754,10 @@ class _DefaultApi implements DefaultApi { } @override - Future> longPoll({WSAuthMessage? json}) { - return _ResultCallAdapter().adapt(() => _longPoll(json: json)); + Future> _longPoll({bool? close, _JsonQuery? json}) { + return _ResultCallAdapter().adapt( + () => __longPoll(close: close, json: json), + ); } Future _markChannelsRead({ @@ -3031,8 +3037,8 @@ class _DefaultApi implements DefaultApi { ); } - Future _queryBannedUsers({ - QueryBannedUsersPayload? payload, + Future __queryBannedUsers({ + _JsonQuery? payload, }) async { final _extra = {}; final queryParameters = {r'payload': payload?.toJson()}; @@ -3061,11 +3067,58 @@ class _DefaultApi implements DefaultApi { } @override - Future> queryBannedUsers({ - QueryBannedUsersPayload? payload, + Future> _queryBannedUsers({ + _JsonQuery? payload, }) { return _ResultCallAdapter().adapt( - () => _queryBannedUsers(payload: payload), + () => __queryBannedUsers(payload: payload), + ); + } + + Future _queryChannelBans({ + required String type, + required String id, + QueryChannelBansRequest? queryChannelBansRequest, + }) async { + final _extra = {}; + final queryParameters = {}; + queryParameters.removeWhere((k, v) => v == null); + final _headers = {}; + final _data = {}; + _data.addAll(queryChannelBansRequest?.toJson() ?? {}); + final _options = _setStreamType>( + Options(method: 'POST', headers: _headers, extra: _extra) + .compose( + _dio.options, + '/api/v2/chat/channels/${type}/${id}/bans/query', + queryParameters: queryParameters, + data: _data, + ) + .copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)), + ); + final _result = await _dio.fetch>(_options); + late QueryChannelBansResponse _value; + try { + _value = QueryChannelBansResponse.fromJson(_result.data!); + } on Object catch (e, s) { + errorLogger?.logError(e, s, _options, response: _result); + rethrow; + } + return _value; + } + + @override + Future> queryChannelBans({ + required String type, + required String id, + QueryChannelBansRequest? queryChannelBansRequest, + }) { + return _ResultCallAdapter().adapt( + () => _queryChannelBans( + type: type, + id: id, + queryChannelBansRequest: queryChannelBansRequest, + ), ); } @@ -3147,8 +3200,8 @@ class _DefaultApi implements DefaultApi { ); } - Future _queryFutureChannelBans({ - QueryFutureChannelBansPayload? payload, + Future __queryFutureChannelBans({ + _JsonQuery? payload, }) async { final _extra = {}; final queryParameters = {r'payload': payload?.toJson()}; @@ -3177,15 +3230,15 @@ class _DefaultApi implements DefaultApi { } @override - Future> queryFutureChannelBans({ - QueryFutureChannelBansPayload? payload, + Future> _queryFutureChannelBans({ + _JsonQuery? payload, }) { return _ResultCallAdapter().adapt( - () => _queryFutureChannelBans(payload: payload), + () => __queryFutureChannelBans(payload: payload), ); } - Future _queryMembers({QueryMembersPayload? payload}) async { + Future __queryMembers({_JsonQuery? payload}) async { final _extra = {}; final queryParameters = {r'payload': payload?.toJson()}; queryParameters.removeWhere((k, v) => v == null); @@ -3213,14 +3266,14 @@ class _DefaultApi implements DefaultApi { } @override - Future> queryMembers({QueryMembersPayload? payload}) { + Future> _queryMembers({_JsonQuery? payload}) { return _ResultCallAdapter().adapt( - () => _queryMembers(payload: payload), + () => __queryMembers(payload: payload), ); } - Future _queryMessageFlags({ - QueryMessageFlagsPayload? payload, + Future __queryMessageFlags({ + _JsonQuery? payload, }) async { final _extra = {}; final queryParameters = {r'payload': payload?.toJson()}; @@ -3249,11 +3302,11 @@ class _DefaultApi implements DefaultApi { } @override - Future> queryMessageFlags({ - QueryMessageFlagsPayload? payload, + Future> _queryMessageFlags({ + _JsonQuery? payload, }) { return _ResultCallAdapter().adapt( - () => _queryMessageFlags(payload: payload), + () => __queryMessageFlags(payload: payload), ); } @@ -3542,7 +3595,7 @@ class _DefaultApi implements DefaultApi { ); } - Future _queryUsers({QueryUsersPayload? payload}) async { + Future __queryUsers({_JsonQuery? payload}) async { final _extra = {}; final queryParameters = {r'payload': payload?.toJson()}; queryParameters.removeWhere((k, v) => v == null); @@ -3570,9 +3623,9 @@ class _DefaultApi implements DefaultApi { } @override - Future> queryUsers({QueryUsersPayload? payload}) { + Future> _queryUsers({_JsonQuery? payload}) { return _ResultCallAdapter().adapt( - () => _queryUsers(payload: payload), + () => __queryUsers(payload: payload), ); } @@ -3660,7 +3713,7 @@ class _DefaultApi implements DefaultApi { ); } - Future _search({SearchPayload? payload}) async { + Future __search({_JsonQuery? payload}) async { final _extra = {}; final queryParameters = {r'payload': payload?.toJson()}; queryParameters.removeWhere((k, v) => v == null); @@ -3688,9 +3741,9 @@ class _DefaultApi implements DefaultApi { } @override - Future> search({SearchPayload? payload}) { + Future> _search({_JsonQuery? payload}) { return _ResultCallAdapter().adapt( - () => _search(payload: payload), + () => __search(payload: payload), ); } diff --git a/packages/stream_chat/lib/open_api/model/ai_audio_config_request.dart b/packages/stream_chat/lib/open_api/model/ai_audio_config_request.dart index 978cb307fb..3ba137fac0 100644 --- a/packages/stream_chat/lib/open_api/model/ai_audio_config_request.dart +++ b/packages/stream_chat/lib/open_api/model/ai_audio_config_request.dart @@ -18,10 +18,20 @@ part 'ai_audio_config_request.freezed.dart'; @JsonSerializable() class AIAudioConfigRequest with _$AIAudioConfigRequest { const AIAudioConfigRequest({ + this.aiTextConfig, + this.llmConfig, this.profile, this.rules, }); + @override + @JsonKey(name: 'ai_text_config') + final AITextConfig? aiTextConfig; + + @override + @JsonKey(name: 'llm_config') + final LLMConfig? llmConfig; + @override @JsonKey(name: 'profile') final String? profile; diff --git a/packages/stream_chat/lib/open_api/model/ai_audio_config_request.freezed.dart b/packages/stream_chat/lib/open_api/model/ai_audio_config_request.freezed.dart index c97d840558..b4c7e98fbe 100644 --- a/packages/stream_chat/lib/open_api/model/ai_audio_config_request.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/ai_audio_config_request.freezed.dart @@ -13,6 +13,8 @@ T _$identity(T value) => value; /// @nodoc mixin _$AIAudioConfigRequest { + AITextConfig? get aiTextConfig; + LLMConfig? get llmConfig; String? get profile; List? get rules; @@ -31,6 +33,8 @@ mixin _$AIAudioConfigRequest { return identical(this, other) || (other.runtimeType == runtimeType && other is AIAudioConfigRequest && + (identical(other.aiTextConfig, aiTextConfig) || other.aiTextConfig == aiTextConfig) && + (identical(other.llmConfig, llmConfig) || other.llmConfig == llmConfig) && (identical(other.profile, profile) || other.profile == profile) && const DeepCollectionEquality().equals(other.rules, rules)); } @@ -38,13 +42,15 @@ mixin _$AIAudioConfigRequest { @override int get hashCode => Object.hash( runtimeType, + aiTextConfig, + llmConfig, profile, const DeepCollectionEquality().hash(rules), ); @override String toString() { - return 'AIAudioConfigRequest(profile: $profile, rules: $rules)'; + return 'AIAudioConfigRequest(aiTextConfig: $aiTextConfig, llmConfig: $llmConfig, profile: $profile, rules: $rules)'; } } @@ -55,7 +61,12 @@ abstract mixin class $AIAudioConfigRequestCopyWith<$Res> { $Res Function(AIAudioConfigRequest) _then, ) = _$AIAudioConfigRequestCopyWithImpl; @useResult - $Res call({String? profile, List? rules}); + $Res call({ + AITextConfig? aiTextConfig, + LLMConfig? llmConfig, + String? profile, + List? rules, + }); } /// @nodoc @@ -69,9 +80,22 @@ class _$AIAudioConfigRequestCopyWithImpl<$Res> implements $AIAudioConfigRequestC /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({Object? profile = freezed, Object? rules = freezed}) { + $Res call({ + Object? aiTextConfig = freezed, + Object? llmConfig = freezed, + Object? profile = freezed, + Object? rules = freezed, + }) { return _then( AIAudioConfigRequest( + aiTextConfig: freezed == aiTextConfig + ? _self.aiTextConfig + : aiTextConfig // ignore: cast_nullable_to_non_nullable + as AITextConfig?, + llmConfig: freezed == llmConfig + ? _self.llmConfig + : llmConfig // ignore: cast_nullable_to_non_nullable + as LLMConfig?, profile: freezed == profile ? _self.profile : profile // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/ai_audio_config_request.g.dart b/packages/stream_chat/lib/open_api/model/ai_audio_config_request.g.dart index 77e22ca033..e6e92412a1 100644 --- a/packages/stream_chat/lib/open_api/model/ai_audio_config_request.g.dart +++ b/packages/stream_chat/lib/open_api/model/ai_audio_config_request.g.dart @@ -9,6 +9,10 @@ part of 'ai_audio_config_request.dart'; AIAudioConfigRequest _$AIAudioConfigRequestFromJson( Map json, ) => AIAudioConfigRequest( + aiTextConfig: json['ai_text_config'] == null + ? null + : AITextConfig.fromJson(json['ai_text_config'] as Map), + llmConfig: json['llm_config'] == null ? null : LLMConfig.fromJson(json['llm_config'] as Map), profile: json['profile'] as String?, rules: (json['rules'] as List?)?.map((e) => BodyguardRule.fromJson(e as Map)).toList(), ); @@ -16,6 +20,8 @@ AIAudioConfigRequest _$AIAudioConfigRequestFromJson( Map _$AIAudioConfigRequestToJson( AIAudioConfigRequest instance, ) => { + 'ai_text_config': instance.aiTextConfig?.toJson(), + 'llm_config': instance.llmConfig?.toJson(), 'profile': instance.profile, 'rules': instance.rules?.map((e) => e.toJson()).toList(), }; diff --git a/packages/stream_chat/lib/open_api/model/ai_audio_config_response.dart b/packages/stream_chat/lib/open_api/model/ai_audio_config_response.dart index 7a9ba3b1d9..ece15b151f 100644 --- a/packages/stream_chat/lib/open_api/model/ai_audio_config_response.dart +++ b/packages/stream_chat/lib/open_api/model/ai_audio_config_response.dart @@ -18,15 +18,25 @@ part 'ai_audio_config_response.freezed.dart'; @JsonSerializable() class AIAudioConfigResponse with _$AIAudioConfigResponse { const AIAudioConfigResponse({ + this.aiTextConfig, required this.enabled, + this.llmConfig, required this.profile, required this.rules, }); + @override + @JsonKey(name: 'ai_text_config') + final AITextConfig? aiTextConfig; + @override @JsonKey(name: 'enabled') final bool enabled; + @override + @JsonKey(name: 'llm_config') + final LLMConfig? llmConfig; + @override @JsonKey(name: 'profile') final String profile; diff --git a/packages/stream_chat/lib/open_api/model/ai_audio_config_response.freezed.dart b/packages/stream_chat/lib/open_api/model/ai_audio_config_response.freezed.dart index d5833297c2..aa9bc170b6 100644 --- a/packages/stream_chat/lib/open_api/model/ai_audio_config_response.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/ai_audio_config_response.freezed.dart @@ -13,7 +13,9 @@ T _$identity(T value) => value; /// @nodoc mixin _$AIAudioConfigResponse { + AITextConfig? get aiTextConfig; bool get enabled; + LLMConfig? get llmConfig; String get profile; List get rules; @@ -32,7 +34,9 @@ mixin _$AIAudioConfigResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is AIAudioConfigResponse && + (identical(other.aiTextConfig, aiTextConfig) || other.aiTextConfig == aiTextConfig) && (identical(other.enabled, enabled) || other.enabled == enabled) && + (identical(other.llmConfig, llmConfig) || other.llmConfig == llmConfig) && (identical(other.profile, profile) || other.profile == profile) && const DeepCollectionEquality().equals(other.rules, rules)); } @@ -40,14 +44,16 @@ mixin _$AIAudioConfigResponse { @override int get hashCode => Object.hash( runtimeType, + aiTextConfig, enabled, + llmConfig, profile, const DeepCollectionEquality().hash(rules), ); @override String toString() { - return 'AIAudioConfigResponse(enabled: $enabled, profile: $profile, rules: $rules)'; + return 'AIAudioConfigResponse(aiTextConfig: $aiTextConfig, enabled: $enabled, llmConfig: $llmConfig, profile: $profile, rules: $rules)'; } } @@ -58,7 +64,13 @@ abstract mixin class $AIAudioConfigResponseCopyWith<$Res> { $Res Function(AIAudioConfigResponse) _then, ) = _$AIAudioConfigResponseCopyWithImpl; @useResult - $Res call({bool enabled, String profile, List rules}); + $Res call({ + AITextConfig? aiTextConfig, + bool enabled, + LLMConfig? llmConfig, + String profile, + List rules, + }); } /// @nodoc @@ -73,16 +85,26 @@ class _$AIAudioConfigResponseCopyWithImpl<$Res> implements $AIAudioConfigRespons @pragma('vm:prefer-inline') @override $Res call({ + Object? aiTextConfig = freezed, Object? enabled = null, + Object? llmConfig = freezed, Object? profile = null, Object? rules = null, }) { return _then( AIAudioConfigResponse( + aiTextConfig: freezed == aiTextConfig + ? _self.aiTextConfig + : aiTextConfig // ignore: cast_nullable_to_non_nullable + as AITextConfig?, enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable as bool, + llmConfig: freezed == llmConfig + ? _self.llmConfig + : llmConfig // ignore: cast_nullable_to_non_nullable + as LLMConfig?, profile: null == profile ? _self.profile : profile // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/ai_audio_config_response.g.dart b/packages/stream_chat/lib/open_api/model/ai_audio_config_response.g.dart index 1f89d17ac5..010ee41897 100644 --- a/packages/stream_chat/lib/open_api/model/ai_audio_config_response.g.dart +++ b/packages/stream_chat/lib/open_api/model/ai_audio_config_response.g.dart @@ -9,7 +9,11 @@ part of 'ai_audio_config_response.dart'; AIAudioConfigResponse _$AIAudioConfigResponseFromJson( Map json, ) => AIAudioConfigResponse( + aiTextConfig: json['ai_text_config'] == null + ? null + : AITextConfig.fromJson(json['ai_text_config'] as Map), enabled: json['enabled'] as bool, + llmConfig: json['llm_config'] == null ? null : LLMConfig.fromJson(json['llm_config'] as Map), profile: json['profile'] as String, rules: (json['rules'] as List).map((e) => BodyguardRule.fromJson(e as Map)).toList(), ); @@ -17,7 +21,9 @@ AIAudioConfigResponse _$AIAudioConfigResponseFromJson( Map _$AIAudioConfigResponseToJson( AIAudioConfigResponse instance, ) => { + 'ai_text_config': instance.aiTextConfig?.toJson(), 'enabled': instance.enabled, + 'llm_config': instance.llmConfig?.toJson(), 'profile': instance.profile, 'rules': instance.rules.map((e) => e.toJson()).toList(), }; diff --git a/packages/stream_chat/lib/open_api/model/ai_indicator_clear_event.dart b/packages/stream_chat/lib/open_api/model/ai_indicator_clear_event.dart index e1a0261b58..32ff2983e9 100644 --- a/packages/stream_chat/lib/open_api/model/ai_indicator_clear_event.dart +++ b/packages/stream_chat/lib/open_api/model/ai_indicator_clear_event.dart @@ -25,6 +25,7 @@ class AIIndicatorClearEvent extends core.WsEvent with _$AIIndicatorClearEvent { required this.custom, this.receivedAt, required this.type, + this.user, }); @override @@ -57,6 +58,10 @@ class AIIndicatorClearEvent extends core.WsEvent with _$AIIndicatorClearEvent { @JsonKey(name: 'type') final String type; + @override + @JsonKey(name: 'user') + final UserResponseCommonFields? user; + Map toJson() => _$AIIndicatorClearEventToJson(this); static AIIndicatorClearEvent fromJson(Map json) => _$AIIndicatorClearEventFromJson(json); diff --git a/packages/stream_chat/lib/open_api/model/ai_indicator_clear_event.freezed.dart b/packages/stream_chat/lib/open_api/model/ai_indicator_clear_event.freezed.dart index 7c365b08b7..cc05ac8878 100644 --- a/packages/stream_chat/lib/open_api/model/ai_indicator_clear_event.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/ai_indicator_clear_event.freezed.dart @@ -20,6 +20,7 @@ mixin _$AIIndicatorClearEvent { Map get custom; DateTime? get receivedAt; String get type; + UserResponseCommonFields? get user; /// Create a copy of AIIndicatorClearEvent /// with the given fields replaced by the non-null parameter values. @@ -42,7 +43,8 @@ mixin _$AIIndicatorClearEvent { (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.type, type) || other.type == type) && + (identical(other.user, user) || other.user == user)); } @override @@ -55,11 +57,12 @@ mixin _$AIIndicatorClearEvent { const DeepCollectionEquality().hash(custom), receivedAt, type, + user, ); @override String toString() { - return 'AIIndicatorClearEvent(channelId: $channelId, channelType: $channelType, cid: $cid, createdAt: $createdAt, custom: $custom, receivedAt: $receivedAt, type: $type)'; + return 'AIIndicatorClearEvent(channelId: $channelId, channelType: $channelType, cid: $cid, createdAt: $createdAt, custom: $custom, receivedAt: $receivedAt, type: $type, user: $user)'; } } @@ -78,6 +81,7 @@ abstract mixin class $AIIndicatorClearEventCopyWith<$Res> { Map custom, DateTime? receivedAt, String type, + UserResponseCommonFields? user, }); } @@ -100,6 +104,7 @@ class _$AIIndicatorClearEventCopyWithImpl<$Res> implements $AIIndicatorClearEven Object? custom = null, Object? receivedAt = freezed, Object? type = null, + Object? user = freezed, }) { return _then( AIIndicatorClearEvent( @@ -131,6 +136,10 @@ class _$AIIndicatorClearEventCopyWithImpl<$Res> implements $AIIndicatorClearEven ? _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?, ), ); } diff --git a/packages/stream_chat/lib/open_api/model/ai_indicator_clear_event.g.dart b/packages/stream_chat/lib/open_api/model/ai_indicator_clear_event.g.dart index a7253f5cb8..d765dc096f 100644 --- a/packages/stream_chat/lib/open_api/model/ai_indicator_clear_event.g.dart +++ b/packages/stream_chat/lib/open_api/model/ai_indicator_clear_event.g.dart @@ -21,6 +21,7 @@ AIIndicatorClearEvent _$AIIndicatorClearEventFromJson( const StreamDateTimeConverter().fromJson, ), type: json['type'] as String, + user: json['user'] == null ? null : UserResponseCommonFields.fromJson(json['user'] as Map), ); Map _$AIIndicatorClearEventToJson( @@ -36,6 +37,7 @@ Map _$AIIndicatorClearEventToJson( const StreamDateTimeConverter().toJson, ), 'type': instance.type, + 'user': instance.user?.toJson(), }; Value? _$JsonConverterFromJson( diff --git a/packages/stream_chat/lib/open_api/model/ai_indicator_stop_event.dart b/packages/stream_chat/lib/open_api/model/ai_indicator_stop_event.dart index ef5aafe0fc..3ea4309042 100644 --- a/packages/stream_chat/lib/open_api/model/ai_indicator_stop_event.dart +++ b/packages/stream_chat/lib/open_api/model/ai_indicator_stop_event.dart @@ -25,6 +25,7 @@ class AIIndicatorStopEvent extends core.WsEvent with _$AIIndicatorStopEvent { required this.custom, this.receivedAt, required this.type, + this.user, }); @override @@ -57,6 +58,10 @@ class AIIndicatorStopEvent extends core.WsEvent with _$AIIndicatorStopEvent { @JsonKey(name: 'type') final String type; + @override + @JsonKey(name: 'user') + final UserResponseCommonFields? user; + Map toJson() => _$AIIndicatorStopEventToJson(this); static AIIndicatorStopEvent fromJson(Map json) => _$AIIndicatorStopEventFromJson(json); diff --git a/packages/stream_chat/lib/open_api/model/ai_indicator_stop_event.freezed.dart b/packages/stream_chat/lib/open_api/model/ai_indicator_stop_event.freezed.dart index ccc7674f51..c5988f5140 100644 --- a/packages/stream_chat/lib/open_api/model/ai_indicator_stop_event.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/ai_indicator_stop_event.freezed.dart @@ -20,6 +20,7 @@ mixin _$AIIndicatorStopEvent { Map get custom; DateTime? get receivedAt; String get type; + UserResponseCommonFields? get user; /// Create a copy of AIIndicatorStopEvent /// with the given fields replaced by the non-null parameter values. @@ -42,7 +43,8 @@ mixin _$AIIndicatorStopEvent { (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.type, type) || other.type == type) && + (identical(other.user, user) || other.user == user)); } @override @@ -55,11 +57,12 @@ mixin _$AIIndicatorStopEvent { const DeepCollectionEquality().hash(custom), receivedAt, type, + user, ); @override String toString() { - return 'AIIndicatorStopEvent(channelId: $channelId, channelType: $channelType, cid: $cid, createdAt: $createdAt, custom: $custom, receivedAt: $receivedAt, type: $type)'; + return 'AIIndicatorStopEvent(channelId: $channelId, channelType: $channelType, cid: $cid, createdAt: $createdAt, custom: $custom, receivedAt: $receivedAt, type: $type, user: $user)'; } } @@ -78,6 +81,7 @@ abstract mixin class $AIIndicatorStopEventCopyWith<$Res> { Map custom, DateTime? receivedAt, String type, + UserResponseCommonFields? user, }); } @@ -100,6 +104,7 @@ class _$AIIndicatorStopEventCopyWithImpl<$Res> implements $AIIndicatorStopEventC Object? custom = null, Object? receivedAt = freezed, Object? type = null, + Object? user = freezed, }) { return _then( AIIndicatorStopEvent( @@ -131,6 +136,10 @@ class _$AIIndicatorStopEventCopyWithImpl<$Res> implements $AIIndicatorStopEventC ? _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?, ), ); } diff --git a/packages/stream_chat/lib/open_api/model/ai_indicator_stop_event.g.dart b/packages/stream_chat/lib/open_api/model/ai_indicator_stop_event.g.dart index eaf2936c23..fa4c273c72 100644 --- a/packages/stream_chat/lib/open_api/model/ai_indicator_stop_event.g.dart +++ b/packages/stream_chat/lib/open_api/model/ai_indicator_stop_event.g.dart @@ -21,6 +21,7 @@ AIIndicatorStopEvent _$AIIndicatorStopEventFromJson( const StreamDateTimeConverter().fromJson, ), type: json['type'] as String, + user: json['user'] == null ? null : UserResponseCommonFields.fromJson(json['user'] as Map), ); Map _$AIIndicatorStopEventToJson( @@ -36,6 +37,7 @@ Map _$AIIndicatorStopEventToJson( const StreamDateTimeConverter().toJson, ), 'type': instance.type, + 'user': instance.user?.toJson(), }; Value? _$JsonConverterFromJson( diff --git a/packages/stream_chat/lib/open_api/model/ai_indicator_update_event.dart b/packages/stream_chat/lib/open_api/model/ai_indicator_update_event.dart index 5304d5bef0..ac6ad3926b 100644 --- a/packages/stream_chat/lib/open_api/model/ai_indicator_update_event.dart +++ b/packages/stream_chat/lib/open_api/model/ai_indicator_update_event.dart @@ -28,6 +28,7 @@ class AIIndicatorUpdateEvent extends core.WsEvent with _$AIIndicatorUpdateEvent required this.messageId, this.receivedAt, required this.type, + this.user, }); @override @@ -72,6 +73,10 @@ class AIIndicatorUpdateEvent extends core.WsEvent with _$AIIndicatorUpdateEvent @JsonKey(name: 'type') final String type; + @override + @JsonKey(name: 'user') + final UserResponseCommonFields? user; + Map toJson() => _$AIIndicatorUpdateEventToJson(this); static AIIndicatorUpdateEvent fromJson(Map json) => _$AIIndicatorUpdateEventFromJson(json); diff --git a/packages/stream_chat/lib/open_api/model/ai_indicator_update_event.freezed.dart b/packages/stream_chat/lib/open_api/model/ai_indicator_update_event.freezed.dart index 9e6eac306f..2bbda6a076 100644 --- a/packages/stream_chat/lib/open_api/model/ai_indicator_update_event.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/ai_indicator_update_event.freezed.dart @@ -23,6 +23,7 @@ mixin _$AIIndicatorUpdateEvent { String get messageId; DateTime? get receivedAt; String get type; + UserResponseCommonFields? get user; /// Create a copy of AIIndicatorUpdateEvent /// with the given fields replaced by the non-null parameter values. @@ -48,7 +49,8 @@ mixin _$AIIndicatorUpdateEvent { const DeepCollectionEquality().equals(other.custom, custom) && (identical(other.messageId, messageId) || other.messageId == messageId) && (identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt) && - (identical(other.type, type) || other.type == type)); + (identical(other.type, type) || other.type == type) && + (identical(other.user, user) || other.user == user)); } @override @@ -64,11 +66,12 @@ mixin _$AIIndicatorUpdateEvent { messageId, receivedAt, type, + user, ); @override String toString() { - return 'AIIndicatorUpdateEvent(aiMessage: $aiMessage, aiState: $aiState, channelId: $channelId, channelType: $channelType, cid: $cid, createdAt: $createdAt, custom: $custom, messageId: $messageId, receivedAt: $receivedAt, type: $type)'; + return 'AIIndicatorUpdateEvent(aiMessage: $aiMessage, aiState: $aiState, channelId: $channelId, channelType: $channelType, cid: $cid, createdAt: $createdAt, custom: $custom, messageId: $messageId, receivedAt: $receivedAt, type: $type, user: $user)'; } } @@ -90,6 +93,7 @@ abstract mixin class $AIIndicatorUpdateEventCopyWith<$Res> { String messageId, DateTime? receivedAt, String type, + UserResponseCommonFields? user, }); } @@ -115,6 +119,7 @@ class _$AIIndicatorUpdateEventCopyWithImpl<$Res> implements $AIIndicatorUpdateEv Object? messageId = null, Object? receivedAt = freezed, Object? type = null, + Object? user = freezed, }) { return _then( AIIndicatorUpdateEvent( @@ -158,6 +163,10 @@ class _$AIIndicatorUpdateEventCopyWithImpl<$Res> implements $AIIndicatorUpdateEv ? _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?, ), ); } diff --git a/packages/stream_chat/lib/open_api/model/ai_indicator_update_event.g.dart b/packages/stream_chat/lib/open_api/model/ai_indicator_update_event.g.dart index 010a25d95f..65a3b19a13 100644 --- a/packages/stream_chat/lib/open_api/model/ai_indicator_update_event.g.dart +++ b/packages/stream_chat/lib/open_api/model/ai_indicator_update_event.g.dart @@ -24,6 +24,7 @@ AIIndicatorUpdateEvent _$AIIndicatorUpdateEventFromJson( const StreamDateTimeConverter().fromJson, ), type: json['type'] as String, + user: json['user'] == null ? null : UserResponseCommonFields.fromJson(json['user'] as Map), ); Map _$AIIndicatorUpdateEventToJson( @@ -42,6 +43,7 @@ Map _$AIIndicatorUpdateEventToJson( const StreamDateTimeConverter().toJson, ), 'type': instance.type, + 'user': instance.user?.toJson(), }; Value? _$JsonConverterFromJson( diff --git a/packages/stream_chat/lib/open_api/model/app_defaults.dart b/packages/stream_chat/lib/open_api/model/app_defaults.dart new file mode 100644 index 0000000000..64df1efaf4 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/app_defaults.dart @@ -0,0 +1,36 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'app_defaults.g.dart'; +part 'app_defaults.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class AppDefaults with _$AppDefaults { + const AppDefaults({ + required this.getOrCreateChannel, + required this.queryChannels, + }); + + @override + @JsonKey(name: 'get_or_create_channel') + final GetOrCreateChannelDefaults getOrCreateChannel; + + @override + @JsonKey(name: 'query_channels') + final QueryChannelsDefaults queryChannels; + + Map toJson() => _$AppDefaultsToJson(this); + + static AppDefaults fromJson(Map json) => _$AppDefaultsFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/app_defaults.freezed.dart b/packages/stream_chat/lib/open_api/model/app_defaults.freezed.dart new file mode 100644 index 0000000000..4620ec7d8d --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/app_defaults.freezed.dart @@ -0,0 +1,83 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'app_defaults.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$AppDefaults { + GetOrCreateChannelDefaults get getOrCreateChannel; + QueryChannelsDefaults get queryChannels; + + /// Create a copy of AppDefaults + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $AppDefaultsCopyWith get copyWith => + _$AppDefaultsCopyWithImpl(this as AppDefaults, _$identity); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is AppDefaults && + (identical(other.getOrCreateChannel, getOrCreateChannel) || + other.getOrCreateChannel == getOrCreateChannel) && + (identical(other.queryChannels, queryChannels) || other.queryChannels == queryChannels)); + } + + @override + int get hashCode => Object.hash(runtimeType, getOrCreateChannel, queryChannels); + + @override + String toString() { + return 'AppDefaults(getOrCreateChannel: $getOrCreateChannel, queryChannels: $queryChannels)'; + } +} + +/// @nodoc +abstract mixin class $AppDefaultsCopyWith<$Res> { + factory $AppDefaultsCopyWith( + AppDefaults value, + $Res Function(AppDefaults) _then, + ) = _$AppDefaultsCopyWithImpl; + @useResult + $Res call({ + GetOrCreateChannelDefaults getOrCreateChannel, + QueryChannelsDefaults queryChannels, + }); +} + +/// @nodoc +class _$AppDefaultsCopyWithImpl<$Res> implements $AppDefaultsCopyWith<$Res> { + _$AppDefaultsCopyWithImpl(this._self, this._then); + + final AppDefaults _self; + final $Res Function(AppDefaults) _then; + + /// Create a copy of AppDefaults + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({Object? getOrCreateChannel = null, Object? queryChannels = null}) { + return _then( + AppDefaults( + getOrCreateChannel: null == getOrCreateChannel + ? _self.getOrCreateChannel + : getOrCreateChannel // ignore: cast_nullable_to_non_nullable + as GetOrCreateChannelDefaults, + queryChannels: null == queryChannels + ? _self.queryChannels + : queryChannels // ignore: cast_nullable_to_non_nullable + as QueryChannelsDefaults, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/app_defaults.g.dart b/packages/stream_chat/lib/open_api/model/app_defaults.g.dart new file mode 100644 index 0000000000..5aed1ccc68 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/app_defaults.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'app_defaults.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +AppDefaults _$AppDefaultsFromJson(Map json) => AppDefaults( + getOrCreateChannel: GetOrCreateChannelDefaults.fromJson( + json['get_or_create_channel'] as Map, + ), + queryChannels: QueryChannelsDefaults.fromJson( + json['query_channels'] as Map, + ), +); + +Map _$AppDefaultsToJson(AppDefaults instance) => { + 'get_or_create_channel': instance.getOrCreateChannel.toJson(), + 'query_channels': instance.queryChannels.toJson(), +}; diff --git a/packages/stream_chat/lib/open_api/model/app_response_fields.dart b/packages/stream_chat/lib/open_api/model/app_response_fields.dart index 9818e16279..d125a11f99 100644 --- a/packages/stream_chat/lib/open_api/model/app_response_fields.dart +++ b/packages/stream_chat/lib/open_api/model/app_response_fields.dart @@ -20,6 +20,7 @@ class AppResponseFields with _$AppResponseFields { const AppResponseFields({ required this.asyncUrlEnrichEnabled, required this.autoTranslationEnabled, + required this.defaults, required this.fileUploadConfig, required this.id, required this.imageUploadConfig, @@ -35,6 +36,10 @@ class AppResponseFields with _$AppResponseFields { @JsonKey(name: 'auto_translation_enabled') final bool autoTranslationEnabled; + @override + @JsonKey(name: 'defaults') + final AppDefaults defaults; + @override @JsonKey(name: 'file_upload_config') final FileUploadConfig fileUploadConfig; diff --git a/packages/stream_chat/lib/open_api/model/app_response_fields.freezed.dart b/packages/stream_chat/lib/open_api/model/app_response_fields.freezed.dart index 70e67a1579..297a9c55ee 100644 --- a/packages/stream_chat/lib/open_api/model/app_response_fields.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/app_response_fields.freezed.dart @@ -15,6 +15,7 @@ T _$identity(T value) => value; mixin _$AppResponseFields { bool get asyncUrlEnrichEnabled; bool get autoTranslationEnabled; + AppDefaults get defaults; FileUploadConfig get fileUploadConfig; int get id; FileUploadConfig get imageUploadConfig; @@ -39,6 +40,7 @@ mixin _$AppResponseFields { other.asyncUrlEnrichEnabled == asyncUrlEnrichEnabled) && (identical(other.autoTranslationEnabled, autoTranslationEnabled) || other.autoTranslationEnabled == autoTranslationEnabled) && + (identical(other.defaults, defaults) || other.defaults == defaults) && (identical(other.fileUploadConfig, fileUploadConfig) || other.fileUploadConfig == fileUploadConfig) && (identical(other.id, id) || other.id == id) && (identical(other.imageUploadConfig, imageUploadConfig) || other.imageUploadConfig == imageUploadConfig) && @@ -51,6 +53,7 @@ mixin _$AppResponseFields { runtimeType, asyncUrlEnrichEnabled, autoTranslationEnabled, + defaults, fileUploadConfig, id, imageUploadConfig, @@ -60,7 +63,7 @@ mixin _$AppResponseFields { @override String toString() { - return 'AppResponseFields(asyncUrlEnrichEnabled: $asyncUrlEnrichEnabled, autoTranslationEnabled: $autoTranslationEnabled, fileUploadConfig: $fileUploadConfig, id: $id, imageUploadConfig: $imageUploadConfig, name: $name, placement: $placement)'; + return 'AppResponseFields(asyncUrlEnrichEnabled: $asyncUrlEnrichEnabled, autoTranslationEnabled: $autoTranslationEnabled, defaults: $defaults, fileUploadConfig: $fileUploadConfig, id: $id, imageUploadConfig: $imageUploadConfig, name: $name, placement: $placement)'; } } @@ -74,6 +77,7 @@ abstract mixin class $AppResponseFieldsCopyWith<$Res> { $Res call({ bool asyncUrlEnrichEnabled, bool autoTranslationEnabled, + AppDefaults defaults, FileUploadConfig fileUploadConfig, int id, FileUploadConfig imageUploadConfig, @@ -96,6 +100,7 @@ class _$AppResponseFieldsCopyWithImpl<$Res> implements $AppResponseFieldsCopyWit $Res call({ Object? asyncUrlEnrichEnabled = null, Object? autoTranslationEnabled = null, + Object? defaults = null, Object? fileUploadConfig = null, Object? id = null, Object? imageUploadConfig = null, @@ -112,6 +117,10 @@ class _$AppResponseFieldsCopyWithImpl<$Res> implements $AppResponseFieldsCopyWit ? _self.autoTranslationEnabled : autoTranslationEnabled // ignore: cast_nullable_to_non_nullable as bool, + defaults: null == defaults + ? _self.defaults + : defaults // ignore: cast_nullable_to_non_nullable + as AppDefaults, fileUploadConfig: null == fileUploadConfig ? _self.fileUploadConfig : fileUploadConfig // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/app_response_fields.g.dart b/packages/stream_chat/lib/open_api/model/app_response_fields.g.dart index 3235ad1967..26facf1fa6 100644 --- a/packages/stream_chat/lib/open_api/model/app_response_fields.g.dart +++ b/packages/stream_chat/lib/open_api/model/app_response_fields.g.dart @@ -9,6 +9,7 @@ part of 'app_response_fields.dart'; AppResponseFields _$AppResponseFieldsFromJson(Map json) => AppResponseFields( asyncUrlEnrichEnabled: json['async_url_enrich_enabled'] as bool, autoTranslationEnabled: json['auto_translation_enabled'] as bool, + defaults: AppDefaults.fromJson(json['defaults'] as Map), fileUploadConfig: FileUploadConfig.fromJson( json['file_upload_config'] as Map, ), @@ -23,6 +24,7 @@ AppResponseFields _$AppResponseFieldsFromJson(Map json) => AppR Map _$AppResponseFieldsToJson(AppResponseFields instance) => { 'async_url_enrich_enabled': instance.asyncUrlEnrichEnabled, 'auto_translation_enabled': instance.autoTranslationEnabled, + 'defaults': instance.defaults.toJson(), 'file_upload_config': instance.fileUploadConfig.toJson(), 'id': instance.id, 'image_upload_config': instance.imageUploadConfig.toJson(), diff --git a/packages/stream_chat/lib/open_api/model/ban_request.dart b/packages/stream_chat/lib/open_api/model/ban_request.dart index ecfe278880..dd44fc4f64 100644 --- a/packages/stream_chat/lib/open_api/model/ban_request.dart +++ b/packages/stream_chat/lib/open_api/model/ban_request.dart @@ -28,8 +28,10 @@ extension type const BanRequestDeleteMessages._(String _) implements String { @JsonSerializable() class BanRequest with _$BanRequest { const BanRequest({ + this.banFromFutureChannels, this.channelCid, this.deleteMessages, + this.deleteReactions, this.ipBan, this.reason, this.shadow, @@ -37,6 +39,10 @@ class BanRequest with _$BanRequest { this.timeout, }); + @override + @JsonKey(name: 'ban_from_future_channels') + final bool? banFromFutureChannels; + @override @JsonKey(name: 'channel_cid') final String? channelCid; @@ -45,6 +51,10 @@ class BanRequest with _$BanRequest { @JsonKey(name: 'delete_messages') final BanRequestDeleteMessages? deleteMessages; + @override + @JsonKey(name: 'delete_reactions') + final bool? deleteReactions; + @override @JsonKey(name: 'ip_ban') final bool? ipBan; diff --git a/packages/stream_chat/lib/open_api/model/ban_request.freezed.dart b/packages/stream_chat/lib/open_api/model/ban_request.freezed.dart index df9abd77e3..17a73091e6 100644 --- a/packages/stream_chat/lib/open_api/model/ban_request.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/ban_request.freezed.dart @@ -13,8 +13,10 @@ T _$identity(T value) => value; /// @nodoc mixin _$BanRequest { + bool? get banFromFutureChannels; String? get channelCid; BanRequestDeleteMessages? get deleteMessages; + bool? get deleteReactions; bool? get ipBan; String? get reason; bool? get shadow; @@ -32,8 +34,11 @@ mixin _$BanRequest { return identical(this, other) || (other.runtimeType == runtimeType && other is BanRequest && + (identical(other.banFromFutureChannels, banFromFutureChannels) || + other.banFromFutureChannels == banFromFutureChannels) && (identical(other.channelCid, channelCid) || other.channelCid == channelCid) && (identical(other.deleteMessages, deleteMessages) || other.deleteMessages == deleteMessages) && + (identical(other.deleteReactions, deleteReactions) || other.deleteReactions == deleteReactions) && (identical(other.ipBan, ipBan) || other.ipBan == ipBan) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.shadow, shadow) || other.shadow == shadow) && @@ -44,8 +49,10 @@ mixin _$BanRequest { @override int get hashCode => Object.hash( runtimeType, + banFromFutureChannels, channelCid, deleteMessages, + deleteReactions, ipBan, reason, shadow, @@ -55,7 +62,7 @@ mixin _$BanRequest { @override String toString() { - return 'BanRequest(channelCid: $channelCid, deleteMessages: $deleteMessages, ipBan: $ipBan, reason: $reason, shadow: $shadow, targetUserId: $targetUserId, timeout: $timeout)'; + return 'BanRequest(banFromFutureChannels: $banFromFutureChannels, channelCid: $channelCid, deleteMessages: $deleteMessages, deleteReactions: $deleteReactions, ipBan: $ipBan, reason: $reason, shadow: $shadow, targetUserId: $targetUserId, timeout: $timeout)'; } } @@ -67,8 +74,10 @@ abstract mixin class $BanRequestCopyWith<$Res> { ) = _$BanRequestCopyWithImpl; @useResult $Res call({ + bool? banFromFutureChannels, String? channelCid, BanRequestDeleteMessages? deleteMessages, + bool? deleteReactions, bool? ipBan, String? reason, bool? shadow, @@ -89,8 +98,10 @@ class _$BanRequestCopyWithImpl<$Res> implements $BanRequestCopyWith<$Res> { @pragma('vm:prefer-inline') @override $Res call({ + Object? banFromFutureChannels = freezed, Object? channelCid = freezed, Object? deleteMessages = freezed, + Object? deleteReactions = freezed, Object? ipBan = freezed, Object? reason = freezed, Object? shadow = freezed, @@ -99,6 +110,10 @@ class _$BanRequestCopyWithImpl<$Res> implements $BanRequestCopyWith<$Res> { }) { return _then( BanRequest( + banFromFutureChannels: freezed == banFromFutureChannels + ? _self.banFromFutureChannels + : banFromFutureChannels // ignore: cast_nullable_to_non_nullable + as bool?, channelCid: freezed == channelCid ? _self.channelCid : channelCid // ignore: cast_nullable_to_non_nullable @@ -107,6 +122,10 @@ class _$BanRequestCopyWithImpl<$Res> implements $BanRequestCopyWith<$Res> { ? _self.deleteMessages : deleteMessages // ignore: cast_nullable_to_non_nullable as BanRequestDeleteMessages?, + deleteReactions: freezed == deleteReactions + ? _self.deleteReactions + : deleteReactions // ignore: cast_nullable_to_non_nullable + as bool?, ipBan: freezed == ipBan ? _self.ipBan : ipBan // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/ban_request.g.dart b/packages/stream_chat/lib/open_api/model/ban_request.g.dart index 43e691892b..7bdb734272 100644 --- a/packages/stream_chat/lib/open_api/model/ban_request.g.dart +++ b/packages/stream_chat/lib/open_api/model/ban_request.g.dart @@ -7,10 +7,12 @@ part of 'ban_request.dart'; // ************************************************************************** BanRequest _$BanRequestFromJson(Map json) => BanRequest( + banFromFutureChannels: json['ban_from_future_channels'] as bool?, channelCid: json['channel_cid'] as String?, deleteMessages: json['delete_messages'] == null ? null : BanRequestDeleteMessages.fromJson(json['delete_messages'] as String), + deleteReactions: json['delete_reactions'] as bool?, ipBan: json['ip_ban'] as bool?, reason: json['reason'] as String?, shadow: json['shadow'] as bool?, @@ -19,8 +21,10 @@ BanRequest _$BanRequestFromJson(Map json) => BanRequest( ); Map _$BanRequestToJson(BanRequest instance) => { + 'ban_from_future_channels': instance.banFromFutureChannels, 'channel_cid': instance.channelCid, 'delete_messages': instance.deleteMessages?.toJson(), + 'delete_reactions': instance.deleteReactions, 'ip_ban': instance.ipBan, 'reason': instance.reason, 'shadow': instance.shadow, diff --git a/packages/stream_chat/lib/open_api/model/channel_ban_response.dart b/packages/stream_chat/lib/open_api/model/channel_ban_response.dart new file mode 100644 index 0000000000..1ec5820b60 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/channel_ban_response.dart @@ -0,0 +1,52 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'channel_ban_response.g.dart'; +part 'channel_ban_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ChannelBanResponse with _$ChannelBanResponse { + const ChannelBanResponse({ + this.channelBan, + required this.createdAt, + this.futureChannelBan, + required this.scopes, + this.user, + }); + + @override + @JsonKey(name: 'channel_ban') + final ChannelBanScopeResponse? channelBan; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'created_at') + final DateTime createdAt; + + @override + @JsonKey(name: 'future_channel_ban') + final ChannelBanScopeResponse? futureChannelBan; + + @override + @JsonKey(name: 'scopes') + final List scopes; + + @override + @JsonKey(name: 'user') + final UserResponse? user; + + Map toJson() => _$ChannelBanResponseToJson(this); + + static ChannelBanResponse fromJson(Map json) => _$ChannelBanResponseFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/channel_ban_response.freezed.dart b/packages/stream_chat/lib/open_api/model/channel_ban_response.freezed.dart new file mode 100644 index 0000000000..c93c50a3bf --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/channel_ban_response.freezed.dart @@ -0,0 +1,118 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'channel_ban_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$ChannelBanResponse { + ChannelBanScopeResponse? get channelBan; + DateTime get createdAt; + ChannelBanScopeResponse? get futureChannelBan; + List get scopes; + UserResponse? get user; + + /// Create a copy of ChannelBanResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ChannelBanResponseCopyWith get copyWith => _$ChannelBanResponseCopyWithImpl( + this as ChannelBanResponse, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ChannelBanResponse && + (identical(other.channelBan, channelBan) || other.channelBan == channelBan) && + (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && + (identical(other.futureChannelBan, futureChannelBan) || other.futureChannelBan == futureChannelBan) && + const DeepCollectionEquality().equals(other.scopes, scopes) && + (identical(other.user, user) || other.user == user)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + channelBan, + createdAt, + futureChannelBan, + const DeepCollectionEquality().hash(scopes), + user, + ); + + @override + String toString() { + return 'ChannelBanResponse(channelBan: $channelBan, createdAt: $createdAt, futureChannelBan: $futureChannelBan, scopes: $scopes, user: $user)'; + } +} + +/// @nodoc +abstract mixin class $ChannelBanResponseCopyWith<$Res> { + factory $ChannelBanResponseCopyWith( + ChannelBanResponse value, + $Res Function(ChannelBanResponse) _then, + ) = _$ChannelBanResponseCopyWithImpl; + @useResult + $Res call({ + ChannelBanScopeResponse? channelBan, + DateTime createdAt, + ChannelBanScopeResponse? futureChannelBan, + List scopes, + UserResponse? user, + }); +} + +/// @nodoc +class _$ChannelBanResponseCopyWithImpl<$Res> implements $ChannelBanResponseCopyWith<$Res> { + _$ChannelBanResponseCopyWithImpl(this._self, this._then); + + final ChannelBanResponse _self; + final $Res Function(ChannelBanResponse) _then; + + /// Create a copy of ChannelBanResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? channelBan = freezed, + Object? createdAt = null, + Object? futureChannelBan = freezed, + Object? scopes = null, + Object? user = freezed, + }) { + return _then( + ChannelBanResponse( + channelBan: freezed == channelBan + ? _self.channelBan + : channelBan // ignore: cast_nullable_to_non_nullable + as ChannelBanScopeResponse?, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + futureChannelBan: freezed == futureChannelBan + ? _self.futureChannelBan + : futureChannelBan // ignore: cast_nullable_to_non_nullable + as ChannelBanScopeResponse?, + scopes: null == scopes + ? _self.scopes + : scopes // ignore: cast_nullable_to_non_nullable + as List, + user: freezed == user + ? _self.user + : user // ignore: cast_nullable_to_non_nullable + as UserResponse?, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/channel_ban_response.g.dart b/packages/stream_chat/lib/open_api/model/channel_ban_response.g.dart new file mode 100644 index 0000000000..f2a4df59ee --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/channel_ban_response.g.dart @@ -0,0 +1,33 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'channel_ban_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ChannelBanResponse _$ChannelBanResponseFromJson(Map json) => ChannelBanResponse( + channelBan: json['channel_ban'] == null + ? null + : ChannelBanScopeResponse.fromJson( + json['channel_ban'] as Map, + ), + createdAt: const StreamDateTimeConverter().fromJson( + json['created_at'] as Object, + ), + futureChannelBan: json['future_channel_ban'] == null + ? null + : ChannelBanScopeResponse.fromJson( + json['future_channel_ban'] as Map, + ), + scopes: (json['scopes'] as List).map((e) => e as String).toList(), + user: json['user'] == null ? null : UserResponse.fromJson(json['user'] as Map), +); + +Map _$ChannelBanResponseToJson(ChannelBanResponse instance) => { + 'channel_ban': instance.channelBan?.toJson(), + 'created_at': const StreamDateTimeConverter().toJson(instance.createdAt), + 'future_channel_ban': instance.futureChannelBan?.toJson(), + 'scopes': instance.scopes, + 'user': instance.user?.toJson(), +}; diff --git a/packages/stream_chat/lib/open_api/model/channel_ban_scope_response.dart b/packages/stream_chat/lib/open_api/model/channel_ban_scope_response.dart new file mode 100644 index 0000000000..44e2c1fb79 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/channel_ban_scope_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, sort_constructors_first, provide_deprecation_message + +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 'channel_ban_scope_response.g.dart'; +part 'channel_ban_scope_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ChannelBanScopeResponse with _$ChannelBanScopeResponse { + const ChannelBanScopeResponse({ + this.bannedBy, + required this.createdAt, + this.expires, + this.reason, + required this.shadow, + }); + + @override + @JsonKey(name: 'banned_by') + final UserResponse? bannedBy; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'created_at') + final DateTime createdAt; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'expires') + final DateTime? expires; + + @override + @JsonKey(name: 'reason') + final String? reason; + + @override + @JsonKey(name: 'shadow') + final bool shadow; + + Map toJson() => _$ChannelBanScopeResponseToJson(this); + + static ChannelBanScopeResponse fromJson(Map json) => _$ChannelBanScopeResponseFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/channel_ban_scope_response.freezed.dart b/packages/stream_chat/lib/open_api/model/channel_ban_scope_response.freezed.dart new file mode 100644 index 0000000000..e906efe9df --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/channel_ban_scope_response.freezed.dart @@ -0,0 +1,112 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'channel_ban_scope_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$ChannelBanScopeResponse { + UserResponse? get bannedBy; + DateTime get createdAt; + DateTime? get expires; + String? get reason; + bool get shadow; + + /// Create a copy of ChannelBanScopeResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ChannelBanScopeResponseCopyWith get copyWith => + _$ChannelBanScopeResponseCopyWithImpl( + this as ChannelBanScopeResponse, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ChannelBanScopeResponse && + (identical(other.bannedBy, bannedBy) || other.bannedBy == bannedBy) && + (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && + (identical(other.expires, expires) || other.expires == expires) && + (identical(other.reason, reason) || other.reason == reason) && + (identical(other.shadow, shadow) || other.shadow == shadow)); + } + + @override + int get hashCode => Object.hash(runtimeType, bannedBy, createdAt, expires, reason, shadow); + + @override + String toString() { + return 'ChannelBanScopeResponse(bannedBy: $bannedBy, createdAt: $createdAt, expires: $expires, reason: $reason, shadow: $shadow)'; + } +} + +/// @nodoc +abstract mixin class $ChannelBanScopeResponseCopyWith<$Res> { + factory $ChannelBanScopeResponseCopyWith( + ChannelBanScopeResponse value, + $Res Function(ChannelBanScopeResponse) _then, + ) = _$ChannelBanScopeResponseCopyWithImpl; + @useResult + $Res call({ + UserResponse? bannedBy, + DateTime createdAt, + DateTime? expires, + String? reason, + bool shadow, + }); +} + +/// @nodoc +class _$ChannelBanScopeResponseCopyWithImpl<$Res> implements $ChannelBanScopeResponseCopyWith<$Res> { + _$ChannelBanScopeResponseCopyWithImpl(this._self, this._then); + + final ChannelBanScopeResponse _self; + final $Res Function(ChannelBanScopeResponse) _then; + + /// Create a copy of ChannelBanScopeResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? bannedBy = freezed, + Object? createdAt = null, + Object? expires = freezed, + Object? reason = freezed, + Object? shadow = null, + }) { + return _then( + ChannelBanScopeResponse( + bannedBy: freezed == bannedBy + ? _self.bannedBy + : bannedBy // ignore: cast_nullable_to_non_nullable + as UserResponse?, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + expires: freezed == expires + ? _self.expires + : expires // ignore: cast_nullable_to_non_nullable + as DateTime?, + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + shadow: null == shadow + ? _self.shadow + : shadow // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/channel_ban_scope_response.g.dart b/packages/stream_chat/lib/open_api/model/channel_ban_scope_response.g.dart new file mode 100644 index 0000000000..876f6f9b3d --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/channel_ban_scope_response.g.dart @@ -0,0 +1,45 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'channel_ban_scope_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ChannelBanScopeResponse _$ChannelBanScopeResponseFromJson( + Map json, +) => ChannelBanScopeResponse( + bannedBy: json['banned_by'] == null ? null : UserResponse.fromJson(json['banned_by'] as Map), + createdAt: const StreamDateTimeConverter().fromJson( + json['created_at'] as Object, + ), + expires: _$JsonConverterFromJson( + json['expires'], + const StreamDateTimeConverter().fromJson, + ), + reason: json['reason'] as String?, + shadow: json['shadow'] as bool, +); + +Map _$ChannelBanScopeResponseToJson( + ChannelBanScopeResponse instance, +) => { + 'banned_by': instance.bannedBy?.toJson(), + 'created_at': const StreamDateTimeConverter().toJson(instance.createdAt), + 'expires': _$JsonConverterToJson( + instance.expires, + const StreamDateTimeConverter().toJson, + ), + 'reason': instance.reason, + 'shadow': instance.shadow, +}; + +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_chat/lib/open_api/model/channel_bans_scope_totals.dart b/packages/stream_chat/lib/open_api/model/channel_bans_scope_totals.dart new file mode 100644 index 0000000000..228a45be59 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/channel_bans_scope_totals.dart @@ -0,0 +1,36 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'channel_bans_scope_totals.g.dart'; +part 'channel_bans_scope_totals.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ChannelBansScopeTotals with _$ChannelBansScopeTotals { + const ChannelBansScopeTotals({ + required this.channel, + required this.futureChannel, + }); + + @override + @JsonKey(name: 'channel') + final int channel; + + @override + @JsonKey(name: 'future_channel') + final int futureChannel; + + Map toJson() => _$ChannelBansScopeTotalsToJson(this); + + static ChannelBansScopeTotals fromJson(Map json) => _$ChannelBansScopeTotalsFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/channel_bans_scope_totals.freezed.dart b/packages/stream_chat/lib/open_api/model/channel_bans_scope_totals.freezed.dart new file mode 100644 index 0000000000..ff535e004b --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/channel_bans_scope_totals.freezed.dart @@ -0,0 +1,82 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'channel_bans_scope_totals.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$ChannelBansScopeTotals { + int get channel; + int get futureChannel; + + /// Create a copy of ChannelBansScopeTotals + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ChannelBansScopeTotalsCopyWith get copyWith => + _$ChannelBansScopeTotalsCopyWithImpl( + this as ChannelBansScopeTotals, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ChannelBansScopeTotals && + (identical(other.channel, channel) || other.channel == channel) && + (identical(other.futureChannel, futureChannel) || other.futureChannel == futureChannel)); + } + + @override + int get hashCode => Object.hash(runtimeType, channel, futureChannel); + + @override + String toString() { + return 'ChannelBansScopeTotals(channel: $channel, futureChannel: $futureChannel)'; + } +} + +/// @nodoc +abstract mixin class $ChannelBansScopeTotalsCopyWith<$Res> { + factory $ChannelBansScopeTotalsCopyWith( + ChannelBansScopeTotals value, + $Res Function(ChannelBansScopeTotals) _then, + ) = _$ChannelBansScopeTotalsCopyWithImpl; + @useResult + $Res call({int channel, int futureChannel}); +} + +/// @nodoc +class _$ChannelBansScopeTotalsCopyWithImpl<$Res> implements $ChannelBansScopeTotalsCopyWith<$Res> { + _$ChannelBansScopeTotalsCopyWithImpl(this._self, this._then); + + final ChannelBansScopeTotals _self; + final $Res Function(ChannelBansScopeTotals) _then; + + /// Create a copy of ChannelBansScopeTotals + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({Object? channel = null, Object? futureChannel = null}) { + return _then( + ChannelBansScopeTotals( + channel: null == channel + ? _self.channel + : channel // ignore: cast_nullable_to_non_nullable + as int, + futureChannel: null == futureChannel + ? _self.futureChannel + : futureChannel // ignore: cast_nullable_to_non_nullable + as int, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/channel_bans_scope_totals.g.dart b/packages/stream_chat/lib/open_api/model/channel_bans_scope_totals.g.dart new file mode 100644 index 0000000000..19ae6a96a3 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/channel_bans_scope_totals.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'channel_bans_scope_totals.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ChannelBansScopeTotals _$ChannelBansScopeTotalsFromJson( + Map json, +) => ChannelBansScopeTotals( + channel: (json['channel'] as num).toInt(), + futureChannel: (json['future_channel'] as num).toInt(), +); + +Map _$ChannelBansScopeTotalsToJson( + ChannelBansScopeTotals instance, +) => { + 'channel': instance.channel, + 'future_channel': instance.futureChannel, +}; diff --git a/packages/stream_chat/lib/open_api/model/channel_member_response.dart b/packages/stream_chat/lib/open_api/model/channel_member_response.dart index a67368d83c..1d16df94c9 100644 --- a/packages/stream_chat/lib/open_api/model/channel_member_response.dart +++ b/packages/stream_chat/lib/open_api/model/channel_member_response.dart @@ -39,7 +39,7 @@ class ChannelMemberResponse with _$ChannelMemberResponse { this.status, required this.updatedAt, this.user, - this.userId, + required this.userId, }); @override @@ -137,7 +137,7 @@ class ChannelMemberResponse with _$ChannelMemberResponse { @override @JsonKey(name: 'user_id') - final String? userId; + final String userId; Map toJson() => _$ChannelMemberResponseToJson(this); diff --git a/packages/stream_chat/lib/open_api/model/channel_member_response.freezed.dart b/packages/stream_chat/lib/open_api/model/channel_member_response.freezed.dart index 3a4e0fae89..deaf9c4182 100644 --- a/packages/stream_chat/lib/open_api/model/channel_member_response.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/channel_member_response.freezed.dart @@ -34,7 +34,7 @@ mixin _$ChannelMemberResponse { String? get status; DateTime get updatedAt; UserResponse? get user; - String? get userId; + String get userId; /// Create a copy of ChannelMemberResponse /// with the given fields replaced by the non-null parameter values. @@ -146,7 +146,7 @@ abstract mixin class $ChannelMemberResponseCopyWith<$Res> { String? status, DateTime updatedAt, UserResponse? user, - String? userId, + String userId, }); } @@ -183,7 +183,7 @@ class _$ChannelMemberResponseCopyWithImpl<$Res> implements $ChannelMemberRespons Object? status = freezed, Object? updatedAt = null, Object? user = freezed, - Object? userId = freezed, + Object? userId = null, }) { return _then( ChannelMemberResponse( @@ -271,10 +271,10 @@ class _$ChannelMemberResponseCopyWithImpl<$Res> implements $ChannelMemberRespons ? _self.user : user // ignore: cast_nullable_to_non_nullable as UserResponse?, - userId: freezed == userId + userId: null == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable - as String?, + as String, ), ); } diff --git a/packages/stream_chat/lib/open_api/model/channel_member_response.g.dart b/packages/stream_chat/lib/open_api/model/channel_member_response.g.dart index afae5f7bc6..4e014886f7 100644 --- a/packages/stream_chat/lib/open_api/model/channel_member_response.g.dart +++ b/packages/stream_chat/lib/open_api/model/channel_member_response.g.dart @@ -55,7 +55,7 @@ ChannelMemberResponse _$ChannelMemberResponseFromJson( json['updated_at'] as Object, ), user: json['user'] == null ? null : UserResponse.fromJson(json['user'] as Map), - userId: json['user_id'] as String?, + userId: json['user_id'] as String, ); Map _$ChannelMemberResponseToJson( diff --git a/packages/stream_chat/lib/open_api/model/channel_own_capability.dart b/packages/stream_chat/lib/open_api/model/channel_own_capability.dart index e167dfb45c..df8f2f2e2d 100644 --- a/packages/stream_chat/lib/open_api/model/channel_own_capability.dart +++ b/packages/stream_chat/lib/open_api/model/channel_own_capability.dart @@ -28,6 +28,7 @@ extension type const ChannelOwnCapability._(String _) implements String { static const queryPollVotes = ChannelOwnCapability._('query-poll-votes'); static const quoteMessage = ChannelOwnCapability._('quote-message'); static const readEvents = ChannelOwnCapability._('read-events'); + static const scheduleMessage = ChannelOwnCapability._('schedule-message'); static const searchMessages = ChannelOwnCapability._('search-messages'); static const sendCustomEvents = ChannelOwnCapability._('send-custom-events'); static const sendLinks = ChannelOwnCapability._('send-links'); diff --git a/packages/stream_chat/lib/open_api/model/channel_state_response.dart b/packages/stream_chat/lib/open_api/model/channel_state_response.dart index 960fe39926..e8b7ea15e6 100644 --- a/packages/stream_chat/lib/open_api/model/channel_state_response.dart +++ b/packages/stream_chat/lib/open_api/model/channel_state_response.dart @@ -20,6 +20,7 @@ class ChannelStateResponse with _$ChannelStateResponse { const ChannelStateResponse({ this.activeLiveLocations, this.channel, + this.cooldownRemainingMs, this.draft, required this.duration, this.hidden, @@ -44,6 +45,10 @@ class ChannelStateResponse with _$ChannelStateResponse { @JsonKey(name: 'channel') final ChannelResponse? channel; + @override + @JsonKey(name: 'cooldown_remaining_ms') + final int? cooldownRemainingMs; + @override @JsonKey(name: 'draft') final DraftResponse? draft; diff --git a/packages/stream_chat/lib/open_api/model/channel_state_response.freezed.dart b/packages/stream_chat/lib/open_api/model/channel_state_response.freezed.dart index 7db14a630b..5706029286 100644 --- a/packages/stream_chat/lib/open_api/model/channel_state_response.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/channel_state_response.freezed.dart @@ -15,6 +15,7 @@ T _$identity(T value) => value; mixin _$ChannelStateResponse { List? get activeLiveLocations; ChannelResponse? get channel; + int? get cooldownRemainingMs; DraftResponse? get draft; String get duration; bool? get hidden; @@ -50,6 +51,8 @@ mixin _$ChannelStateResponse { activeLiveLocations, ) && (identical(other.channel, channel) || other.channel == channel) && + (identical(other.cooldownRemainingMs, cooldownRemainingMs) || + other.cooldownRemainingMs == cooldownRemainingMs) && (identical(other.draft, draft) || other.draft == draft) && (identical(other.duration, duration) || other.duration == duration) && (identical(other.hidden, hidden) || other.hidden == hidden) && @@ -78,6 +81,7 @@ mixin _$ChannelStateResponse { runtimeType, const DeepCollectionEquality().hash(activeLiveLocations), channel, + cooldownRemainingMs, draft, duration, hidden, @@ -96,7 +100,7 @@ mixin _$ChannelStateResponse { @override String toString() { - return 'ChannelStateResponse(activeLiveLocations: $activeLiveLocations, channel: $channel, draft: $draft, duration: $duration, hidden: $hidden, hideMessagesBefore: $hideMessagesBefore, members: $members, membership: $membership, messages: $messages, pendingMessages: $pendingMessages, pinnedMessages: $pinnedMessages, pushPreferences: $pushPreferences, read: $read, threads: $threads, watcherCount: $watcherCount, watchers: $watchers)'; + return 'ChannelStateResponse(activeLiveLocations: $activeLiveLocations, channel: $channel, cooldownRemainingMs: $cooldownRemainingMs, draft: $draft, duration: $duration, hidden: $hidden, hideMessagesBefore: $hideMessagesBefore, members: $members, membership: $membership, messages: $messages, pendingMessages: $pendingMessages, pinnedMessages: $pinnedMessages, pushPreferences: $pushPreferences, read: $read, threads: $threads, watcherCount: $watcherCount, watchers: $watchers)'; } } @@ -110,6 +114,7 @@ abstract mixin class $ChannelStateResponseCopyWith<$Res> { $Res call({ List? activeLiveLocations, ChannelResponse? channel, + int? cooldownRemainingMs, DraftResponse? draft, String duration, bool? hidden, @@ -141,6 +146,7 @@ class _$ChannelStateResponseCopyWithImpl<$Res> implements $ChannelStateResponseC $Res call({ Object? activeLiveLocations = freezed, Object? channel = freezed, + Object? cooldownRemainingMs = freezed, Object? draft = freezed, Object? duration = null, Object? hidden = freezed, @@ -166,6 +172,10 @@ class _$ChannelStateResponseCopyWithImpl<$Res> implements $ChannelStateResponseC ? _self.channel : channel // ignore: cast_nullable_to_non_nullable as ChannelResponse?, + cooldownRemainingMs: freezed == cooldownRemainingMs + ? _self.cooldownRemainingMs + : cooldownRemainingMs // ignore: cast_nullable_to_non_nullable + as int?, draft: freezed == draft ? _self.draft : draft // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/channel_state_response.g.dart b/packages/stream_chat/lib/open_api/model/channel_state_response.g.dart index db105f7eba..65ea0ab573 100644 --- a/packages/stream_chat/lib/open_api/model/channel_state_response.g.dart +++ b/packages/stream_chat/lib/open_api/model/channel_state_response.g.dart @@ -15,6 +15,7 @@ ChannelStateResponse _$ChannelStateResponseFromJson( ) .toList(), channel: json['channel'] == null ? null : ChannelResponse.fromJson(json['channel'] as Map), + cooldownRemainingMs: (json['cooldown_remaining_ms'] as num?)?.toInt(), draft: json['draft'] == null ? null : DraftResponse.fromJson(json['draft'] as Map), duration: json['duration'] as String, hidden: json['hidden'] as bool?, @@ -57,6 +58,7 @@ Map _$ChannelStateResponseToJson( ) => { 'active_live_locations': instance.activeLiveLocations?.map((e) => e.toJson()).toList(), 'channel': instance.channel?.toJson(), + 'cooldown_remaining_ms': instance.cooldownRemainingMs, 'draft': instance.draft?.toJson(), 'duration': instance.duration, 'hidden': instance.hidden, diff --git a/packages/stream_chat/lib/open_api/model/channel_state_response_fields.dart b/packages/stream_chat/lib/open_api/model/channel_state_response_fields.dart index f407a95f27..21f61c99d6 100644 --- a/packages/stream_chat/lib/open_api/model/channel_state_response_fields.dart +++ b/packages/stream_chat/lib/open_api/model/channel_state_response_fields.dart @@ -20,6 +20,7 @@ class ChannelStateResponseFields with _$ChannelStateResponseFields { const ChannelStateResponseFields({ this.activeLiveLocations, this.channel, + this.cooldownRemainingMs, this.draft, this.hidden, this.hideMessagesBefore, @@ -43,6 +44,10 @@ class ChannelStateResponseFields with _$ChannelStateResponseFields { @JsonKey(name: 'channel') final ChannelResponse? channel; + @override + @JsonKey(name: 'cooldown_remaining_ms') + final int? cooldownRemainingMs; + @override @JsonKey(name: 'draft') final DraftResponse? draft; diff --git a/packages/stream_chat/lib/open_api/model/channel_state_response_fields.freezed.dart b/packages/stream_chat/lib/open_api/model/channel_state_response_fields.freezed.dart index dd952764cb..df21938a5a 100644 --- a/packages/stream_chat/lib/open_api/model/channel_state_response_fields.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/channel_state_response_fields.freezed.dart @@ -15,6 +15,7 @@ T _$identity(T value) => value; mixin _$ChannelStateResponseFields { List? get activeLiveLocations; ChannelResponse? get channel; + int? get cooldownRemainingMs; DraftResponse? get draft; bool? get hidden; DateTime? get hideMessagesBefore; @@ -49,6 +50,8 @@ mixin _$ChannelStateResponseFields { activeLiveLocations, ) && (identical(other.channel, channel) || other.channel == channel) && + (identical(other.cooldownRemainingMs, cooldownRemainingMs) || + other.cooldownRemainingMs == cooldownRemainingMs) && (identical(other.draft, draft) || other.draft == draft) && (identical(other.hidden, hidden) || other.hidden == hidden) && (identical(other.hideMessagesBefore, hideMessagesBefore) || @@ -76,6 +79,7 @@ mixin _$ChannelStateResponseFields { runtimeType, const DeepCollectionEquality().hash(activeLiveLocations), channel, + cooldownRemainingMs, draft, hidden, hideMessagesBefore, @@ -93,7 +97,7 @@ mixin _$ChannelStateResponseFields { @override String toString() { - return 'ChannelStateResponseFields(activeLiveLocations: $activeLiveLocations, channel: $channel, draft: $draft, hidden: $hidden, hideMessagesBefore: $hideMessagesBefore, members: $members, membership: $membership, messages: $messages, pendingMessages: $pendingMessages, pinnedMessages: $pinnedMessages, pushPreferences: $pushPreferences, read: $read, threads: $threads, watcherCount: $watcherCount, watchers: $watchers)'; + return 'ChannelStateResponseFields(activeLiveLocations: $activeLiveLocations, channel: $channel, cooldownRemainingMs: $cooldownRemainingMs, draft: $draft, hidden: $hidden, hideMessagesBefore: $hideMessagesBefore, members: $members, membership: $membership, messages: $messages, pendingMessages: $pendingMessages, pinnedMessages: $pinnedMessages, pushPreferences: $pushPreferences, read: $read, threads: $threads, watcherCount: $watcherCount, watchers: $watchers)'; } } @@ -107,6 +111,7 @@ abstract mixin class $ChannelStateResponseFieldsCopyWith<$Res> { $Res call({ List? activeLiveLocations, ChannelResponse? channel, + int? cooldownRemainingMs, DraftResponse? draft, bool? hidden, DateTime? hideMessagesBefore, @@ -137,6 +142,7 @@ class _$ChannelStateResponseFieldsCopyWithImpl<$Res> implements $ChannelStateRes $Res call({ Object? activeLiveLocations = freezed, Object? channel = freezed, + Object? cooldownRemainingMs = freezed, Object? draft = freezed, Object? hidden = freezed, Object? hideMessagesBefore = freezed, @@ -161,6 +167,10 @@ class _$ChannelStateResponseFieldsCopyWithImpl<$Res> implements $ChannelStateRes ? _self.channel : channel // ignore: cast_nullable_to_non_nullable as ChannelResponse?, + cooldownRemainingMs: freezed == cooldownRemainingMs + ? _self.cooldownRemainingMs + : cooldownRemainingMs // ignore: cast_nullable_to_non_nullable + as int?, draft: freezed == draft ? _self.draft : draft // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/channel_state_response_fields.g.dart b/packages/stream_chat/lib/open_api/model/channel_state_response_fields.g.dart index 79f96d4f69..c63a4e04d2 100644 --- a/packages/stream_chat/lib/open_api/model/channel_state_response_fields.g.dart +++ b/packages/stream_chat/lib/open_api/model/channel_state_response_fields.g.dart @@ -15,6 +15,7 @@ ChannelStateResponseFields _$ChannelStateResponseFieldsFromJson( ) .toList(), channel: json['channel'] == null ? null : ChannelResponse.fromJson(json['channel'] as Map), + cooldownRemainingMs: (json['cooldown_remaining_ms'] as num?)?.toInt(), draft: json['draft'] == null ? null : DraftResponse.fromJson(json['draft'] as Map), hidden: json['hidden'] as bool?, hideMessagesBefore: _$JsonConverterFromJson( @@ -56,6 +57,7 @@ Map _$ChannelStateResponseFieldsToJson( ) => { 'active_live_locations': instance.activeLiveLocations?.map((e) => e.toJson()).toList(), 'channel': instance.channel?.toJson(), + 'cooldown_remaining_ms': instance.cooldownRemainingMs, 'draft': instance.draft?.toJson(), 'hidden': instance.hidden, 'hide_messages_before': _$JsonConverterToJson( diff --git a/packages/stream_chat/lib/open_api/model/content_country_code_parameters.dart b/packages/stream_chat/lib/open_api/model/content_country_code_parameters.dart new file mode 100644 index 0000000000..0179308966 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/content_country_code_parameters.dart @@ -0,0 +1,37 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'content_country_code_parameters.g.dart'; +part 'content_country_code_parameters.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ContentCountryCodeParameters with _$ContentCountryCodeParameters { + const ContentCountryCodeParameters({ + this.countryCodes, + this.operator, + }); + + @override + @JsonKey(name: 'country_codes') + final List? countryCodes; + + @override + @JsonKey(name: 'operator') + final String? operator; + + Map toJson() => _$ContentCountryCodeParametersToJson(this); + + static ContentCountryCodeParameters fromJson(Map json) => + _$ContentCountryCodeParametersFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/content_country_code_parameters.freezed.dart b/packages/stream_chat/lib/open_api/model/content_country_code_parameters.freezed.dart new file mode 100644 index 0000000000..760d28648a --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/content_country_code_parameters.freezed.dart @@ -0,0 +1,89 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'content_country_code_parameters.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$ContentCountryCodeParameters { + List? get countryCodes; + String? get operator; + + /// Create a copy of ContentCountryCodeParameters + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ContentCountryCodeParametersCopyWith get copyWith => + _$ContentCountryCodeParametersCopyWithImpl( + this as ContentCountryCodeParameters, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ContentCountryCodeParameters && + const DeepCollectionEquality().equals( + other.countryCodes, + countryCodes, + ) && + (identical(other.operator, operator) || other.operator == operator)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(countryCodes), + operator, + ); + + @override + String toString() { + return 'ContentCountryCodeParameters(countryCodes: $countryCodes, operator: $operator)'; + } +} + +/// @nodoc +abstract mixin class $ContentCountryCodeParametersCopyWith<$Res> { + factory $ContentCountryCodeParametersCopyWith( + ContentCountryCodeParameters value, + $Res Function(ContentCountryCodeParameters) _then, + ) = _$ContentCountryCodeParametersCopyWithImpl; + @useResult + $Res call({List? countryCodes, String? operator}); +} + +/// @nodoc +class _$ContentCountryCodeParametersCopyWithImpl<$Res> implements $ContentCountryCodeParametersCopyWith<$Res> { + _$ContentCountryCodeParametersCopyWithImpl(this._self, this._then); + + final ContentCountryCodeParameters _self; + final $Res Function(ContentCountryCodeParameters) _then; + + /// Create a copy of ContentCountryCodeParameters + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({Object? countryCodes = freezed, Object? operator = freezed}) { + return _then( + ContentCountryCodeParameters( + countryCodes: freezed == countryCodes + ? _self.countryCodes + : countryCodes // ignore: cast_nullable_to_non_nullable + as List?, + operator: freezed == operator + ? _self.operator + : operator // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/content_country_code_parameters.g.dart b/packages/stream_chat/lib/open_api/model/content_country_code_parameters.g.dart new file mode 100644 index 0000000000..eda680bef4 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/content_country_code_parameters.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'content_country_code_parameters.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ContentCountryCodeParameters _$ContentCountryCodeParametersFromJson( + Map json, +) => ContentCountryCodeParameters( + countryCodes: (json['country_codes'] as List?)?.map((e) => e as String).toList(), + operator: json['operator'] as String?, +); + +Map _$ContentCountryCodeParametersToJson( + ContentCountryCodeParameters instance, +) => { + 'country_codes': instance.countryCodes, + 'operator': instance.operator, +}; diff --git a/packages/stream_chat/lib/open_api/model/delete_poll_answer_request_payload.dart b/packages/stream_chat/lib/open_api/model/delete_poll_answer_request_payload.dart new file mode 100644 index 0000000000..3fbff5d48d --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/delete_poll_answer_request_payload.dart @@ -0,0 +1,32 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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_poll_answer_request_payload.g.dart'; +part 'delete_poll_answer_request_payload.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class DeletePollAnswerRequestPayload with _$DeletePollAnswerRequestPayload { + const DeletePollAnswerRequestPayload({ + this.reason, + }); + + @override + @JsonKey(name: 'reason') + final String? reason; + + Map toJson() => _$DeletePollAnswerRequestPayloadToJson(this); + + static DeletePollAnswerRequestPayload fromJson(Map json) => + _$DeletePollAnswerRequestPayloadFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/delete_poll_answer_request_payload.freezed.dart b/packages/stream_chat/lib/open_api/model/delete_poll_answer_request_payload.freezed.dart new file mode 100644 index 0000000000..09b053c975 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/delete_poll_answer_request_payload.freezed.dart @@ -0,0 +1,76 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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_poll_answer_request_payload.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$DeletePollAnswerRequestPayload { + String? get reason; + + /// Create a copy of DeletePollAnswerRequestPayload + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $DeletePollAnswerRequestPayloadCopyWith get copyWith => + _$DeletePollAnswerRequestPayloadCopyWithImpl( + this as DeletePollAnswerRequestPayload, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is DeletePollAnswerRequestPayload && + (identical(other.reason, reason) || other.reason == reason)); + } + + @override + int get hashCode => Object.hash(runtimeType, reason); + + @override + String toString() { + return 'DeletePollAnswerRequestPayload(reason: $reason)'; + } +} + +/// @nodoc +abstract mixin class $DeletePollAnswerRequestPayloadCopyWith<$Res> { + factory $DeletePollAnswerRequestPayloadCopyWith( + DeletePollAnswerRequestPayload value, + $Res Function(DeletePollAnswerRequestPayload) _then, + ) = _$DeletePollAnswerRequestPayloadCopyWithImpl; + @useResult + $Res call({String? reason}); +} + +/// @nodoc +class _$DeletePollAnswerRequestPayloadCopyWithImpl<$Res> implements $DeletePollAnswerRequestPayloadCopyWith<$Res> { + _$DeletePollAnswerRequestPayloadCopyWithImpl(this._self, this._then); + + final DeletePollAnswerRequestPayload _self; + final $Res Function(DeletePollAnswerRequestPayload) _then; + + /// Create a copy of DeletePollAnswerRequestPayload + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({Object? reason = freezed}) { + return _then( + DeletePollAnswerRequestPayload( + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/delete_poll_answer_request_payload.g.dart b/packages/stream_chat/lib/open_api/model/delete_poll_answer_request_payload.g.dart new file mode 100644 index 0000000000..3ea1c779e3 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/delete_poll_answer_request_payload.g.dart @@ -0,0 +1,15 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'delete_poll_answer_request_payload.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DeletePollAnswerRequestPayload _$DeletePollAnswerRequestPayloadFromJson( + Map json, +) => DeletePollAnswerRequestPayload(reason: json['reason'] as String?); + +Map _$DeletePollAnswerRequestPayloadToJson( + DeletePollAnswerRequestPayload instance, +) => {'reason': instance.reason}; diff --git a/packages/stream_chat/lib/open_api/model/delete_poll_option_request_payload.dart b/packages/stream_chat/lib/open_api/model/delete_poll_option_request_payload.dart new file mode 100644 index 0000000000..5dbeb31a86 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/delete_poll_option_request_payload.dart @@ -0,0 +1,37 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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_poll_option_request_payload.g.dart'; +part 'delete_poll_option_request_payload.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class DeletePollOptionRequestPayload with _$DeletePollOptionRequestPayload { + const DeletePollOptionRequestPayload({ + this.optionId, + this.reason, + }); + + @override + @JsonKey(name: 'option_id') + final String? optionId; + + @override + @JsonKey(name: 'reason') + final String? reason; + + Map toJson() => _$DeletePollOptionRequestPayloadToJson(this); + + static DeletePollOptionRequestPayload fromJson(Map json) => + _$DeletePollOptionRequestPayloadFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/delete_poll_option_request_payload.freezed.dart b/packages/stream_chat/lib/open_api/model/delete_poll_option_request_payload.freezed.dart new file mode 100644 index 0000000000..c367bab094 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/delete_poll_option_request_payload.freezed.dart @@ -0,0 +1,82 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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_poll_option_request_payload.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$DeletePollOptionRequestPayload { + String? get optionId; + String? get reason; + + /// Create a copy of DeletePollOptionRequestPayload + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $DeletePollOptionRequestPayloadCopyWith get copyWith => + _$DeletePollOptionRequestPayloadCopyWithImpl( + this as DeletePollOptionRequestPayload, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is DeletePollOptionRequestPayload && + (identical(other.optionId, optionId) || other.optionId == optionId) && + (identical(other.reason, reason) || other.reason == reason)); + } + + @override + int get hashCode => Object.hash(runtimeType, optionId, reason); + + @override + String toString() { + return 'DeletePollOptionRequestPayload(optionId: $optionId, reason: $reason)'; + } +} + +/// @nodoc +abstract mixin class $DeletePollOptionRequestPayloadCopyWith<$Res> { + factory $DeletePollOptionRequestPayloadCopyWith( + DeletePollOptionRequestPayload value, + $Res Function(DeletePollOptionRequestPayload) _then, + ) = _$DeletePollOptionRequestPayloadCopyWithImpl; + @useResult + $Res call({String? optionId, String? reason}); +} + +/// @nodoc +class _$DeletePollOptionRequestPayloadCopyWithImpl<$Res> implements $DeletePollOptionRequestPayloadCopyWith<$Res> { + _$DeletePollOptionRequestPayloadCopyWithImpl(this._self, this._then); + + final DeletePollOptionRequestPayload _self; + final $Res Function(DeletePollOptionRequestPayload) _then; + + /// Create a copy of DeletePollOptionRequestPayload + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({Object? optionId = freezed, Object? reason = freezed}) { + return _then( + DeletePollOptionRequestPayload( + optionId: freezed == optionId + ? _self.optionId + : optionId // ignore: cast_nullable_to_non_nullable + as String?, + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/delete_poll_option_request_payload.g.dart b/packages/stream_chat/lib/open_api/model/delete_poll_option_request_payload.g.dart new file mode 100644 index 0000000000..1819e8ddae --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/delete_poll_option_request_payload.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'delete_poll_option_request_payload.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DeletePollOptionRequestPayload _$DeletePollOptionRequestPayloadFromJson( + Map json, +) => DeletePollOptionRequestPayload( + optionId: json['option_id'] as String?, + reason: json['reason'] as String?, +); + +Map _$DeletePollOptionRequestPayloadToJson( + DeletePollOptionRequestPayload instance, +) => { + 'option_id': instance.optionId, + 'reason': instance.reason, +}; diff --git a/packages/stream_chat/lib/open_api/model/delete_poll_request_payload.dart b/packages/stream_chat/lib/open_api/model/delete_poll_request_payload.dart new file mode 100644 index 0000000000..248bbf2ea8 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/delete_poll_request_payload.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, sort_constructors_first, provide_deprecation_message + +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_poll_request_payload.g.dart'; +part 'delete_poll_request_payload.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class DeletePollRequestPayload with _$DeletePollRequestPayload { + const DeletePollRequestPayload({ + this.reason, + }); + + @override + @JsonKey(name: 'reason') + final String? reason; + + Map toJson() => _$DeletePollRequestPayloadToJson(this); + + static DeletePollRequestPayload fromJson(Map json) => _$DeletePollRequestPayloadFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/delete_poll_request_payload.freezed.dart b/packages/stream_chat/lib/open_api/model/delete_poll_request_payload.freezed.dart new file mode 100644 index 0000000000..382924f636 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/delete_poll_request_payload.freezed.dart @@ -0,0 +1,76 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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_poll_request_payload.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$DeletePollRequestPayload { + String? get reason; + + /// Create a copy of DeletePollRequestPayload + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $DeletePollRequestPayloadCopyWith get copyWith => + _$DeletePollRequestPayloadCopyWithImpl( + this as DeletePollRequestPayload, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is DeletePollRequestPayload && + (identical(other.reason, reason) || other.reason == reason)); + } + + @override + int get hashCode => Object.hash(runtimeType, reason); + + @override + String toString() { + return 'DeletePollRequestPayload(reason: $reason)'; + } +} + +/// @nodoc +abstract mixin class $DeletePollRequestPayloadCopyWith<$Res> { + factory $DeletePollRequestPayloadCopyWith( + DeletePollRequestPayload value, + $Res Function(DeletePollRequestPayload) _then, + ) = _$DeletePollRequestPayloadCopyWithImpl; + @useResult + $Res call({String? reason}); +} + +/// @nodoc +class _$DeletePollRequestPayloadCopyWithImpl<$Res> implements $DeletePollRequestPayloadCopyWith<$Res> { + _$DeletePollRequestPayloadCopyWithImpl(this._self, this._then); + + final DeletePollRequestPayload _self; + final $Res Function(DeletePollRequestPayload) _then; + + /// Create a copy of DeletePollRequestPayload + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({Object? reason = freezed}) { + return _then( + DeletePollRequestPayload( + reason: freezed == reason + ? _self.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/delete_poll_request_payload.g.dart b/packages/stream_chat/lib/open_api/model/delete_poll_request_payload.g.dart new file mode 100644 index 0000000000..a87f08588f --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/delete_poll_request_payload.g.dart @@ -0,0 +1,15 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'delete_poll_request_payload.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DeletePollRequestPayload _$DeletePollRequestPayloadFromJson( + Map json, +) => DeletePollRequestPayload(reason: json['reason'] as String?); + +Map _$DeletePollRequestPayloadToJson( + DeletePollRequestPayload instance, +) => {'reason': instance.reason}; diff --git a/packages/stream_chat/lib/open_api/model/entity_creator_response.dart b/packages/stream_chat/lib/open_api/model/entity_creator_response.dart index 50ddf7a9c9..2b81f4ddc9 100644 --- a/packages/stream_chat/lib/open_api/model/entity_creator_response.dart +++ b/packages/stream_chat/lib/open_api/model/entity_creator_response.dart @@ -34,7 +34,6 @@ class EntityCreatorResponse with _$EntityCreatorResponse { this.lastActive, this.name, required this.online, - this.revokeTokensIssuedBefore, required this.role, required this.teams, this.teamsRole, @@ -109,11 +108,6 @@ class EntityCreatorResponse with _$EntityCreatorResponse { @JsonKey(name: 'online') final bool online; - @override - @StreamDateTimeConverter() - @JsonKey(name: 'revoke_tokens_issued_before') - final DateTime? revokeTokensIssuedBefore; - @override @JsonKey(name: 'role') final String role; diff --git a/packages/stream_chat/lib/open_api/model/entity_creator_response.freezed.dart b/packages/stream_chat/lib/open_api/model/entity_creator_response.freezed.dart index c4f9050750..4227fccfa8 100644 --- a/packages/stream_chat/lib/open_api/model/entity_creator_response.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/entity_creator_response.freezed.dart @@ -29,7 +29,6 @@ mixin _$EntityCreatorResponse { DateTime? get lastActive; String? get name; bool get online; - DateTime? get revokeTokensIssuedBefore; String get role; List get teams; Map? get teamsRole; @@ -70,11 +69,6 @@ mixin _$EntityCreatorResponse { (identical(other.lastActive, lastActive) || other.lastActive == lastActive) && (identical(other.name, name) || other.name == name) && (identical(other.online, online) || other.online == online) && - (identical( - other.revokeTokensIssuedBefore, - revokeTokensIssuedBefore, - ) || - other.revokeTokensIssuedBefore == revokeTokensIssuedBefore) && (identical(other.role, role) || other.role == role) && const DeepCollectionEquality().equals(other.teams, teams) && const DeepCollectionEquality().equals(other.teamsRole, teamsRole) && @@ -100,7 +94,6 @@ mixin _$EntityCreatorResponse { lastActive, name, online, - revokeTokensIssuedBefore, role, const DeepCollectionEquality().hash(teams), const DeepCollectionEquality().hash(teamsRole), @@ -109,7 +102,7 @@ mixin _$EntityCreatorResponse { @override String toString() { - return 'EntityCreatorResponse(avgResponseTime: $avgResponseTime, banCount: $banCount, banned: $banned, blockedUserIds: $blockedUserIds, createdAt: $createdAt, custom: $custom, deactivatedAt: $deactivatedAt, deletedAt: $deletedAt, deletedContentCount: $deletedContentCount, flaggedCount: $flaggedCount, id: $id, image: $image, language: $language, lastActive: $lastActive, name: $name, online: $online, revokeTokensIssuedBefore: $revokeTokensIssuedBefore, role: $role, teams: $teams, teamsRole: $teamsRole, updatedAt: $updatedAt)'; + return 'EntityCreatorResponse(avgResponseTime: $avgResponseTime, banCount: $banCount, banned: $banned, blockedUserIds: $blockedUserIds, createdAt: $createdAt, custom: $custom, deactivatedAt: $deactivatedAt, deletedAt: $deletedAt, deletedContentCount: $deletedContentCount, flaggedCount: $flaggedCount, id: $id, image: $image, language: $language, lastActive: $lastActive, name: $name, online: $online, role: $role, teams: $teams, teamsRole: $teamsRole, updatedAt: $updatedAt)'; } } @@ -137,7 +130,6 @@ abstract mixin class $EntityCreatorResponseCopyWith<$Res> { DateTime? lastActive, String? name, bool online, - DateTime? revokeTokensIssuedBefore, String role, List teams, Map? teamsRole, @@ -173,7 +165,6 @@ class _$EntityCreatorResponseCopyWithImpl<$Res> implements $EntityCreatorRespons Object? lastActive = freezed, Object? name = freezed, Object? online = null, - Object? revokeTokensIssuedBefore = freezed, Object? role = null, Object? teams = null, Object? teamsRole = freezed, @@ -245,10 +236,6 @@ class _$EntityCreatorResponseCopyWithImpl<$Res> implements $EntityCreatorRespons ? _self.online : online // ignore: cast_nullable_to_non_nullable as bool, - revokeTokensIssuedBefore: freezed == revokeTokensIssuedBefore - ? _self.revokeTokensIssuedBefore - : revokeTokensIssuedBefore // ignore: cast_nullable_to_non_nullable - as DateTime?, role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/entity_creator_response.g.dart b/packages/stream_chat/lib/open_api/model/entity_creator_response.g.dart index 951a1ea533..021c486f07 100644 --- a/packages/stream_chat/lib/open_api/model/entity_creator_response.g.dart +++ b/packages/stream_chat/lib/open_api/model/entity_creator_response.g.dart @@ -36,10 +36,6 @@ EntityCreatorResponse _$EntityCreatorResponseFromJson( ), name: json['name'] as String?, online: json['online'] as bool, - revokeTokensIssuedBefore: _$JsonConverterFromJson( - json['revoke_tokens_issued_before'], - const StreamDateTimeConverter().fromJson, - ), role: json['role'] as String, teams: (json['teams'] as List).map((e) => e as String).toList(), teamsRole: (json['teams_role'] as Map?)?.map( @@ -78,10 +74,6 @@ Map _$EntityCreatorResponseToJson( ), 'name': instance.name, 'online': instance.online, - 'revoke_tokens_issued_before': _$JsonConverterToJson( - instance.revokeTokensIssuedBefore, - const StreamDateTimeConverter().toJson, - ), 'role': instance.role, 'teams': instance.teams, 'teams_role': instance.teamsRole, diff --git a/packages/stream_chat/lib/open_api/model/feeds_notification_comment.dart b/packages/stream_chat/lib/open_api/model/feeds_notification_comment.dart index 168d22ac28..6699a1f938 100644 --- a/packages/stream_chat/lib/open_api/model/feeds_notification_comment.dart +++ b/packages/stream_chat/lib/open_api/model/feeds_notification_comment.dart @@ -21,6 +21,7 @@ class FeedsNotificationComment with _$FeedsNotificationComment { this.attachments, required this.comment, required this.id, + this.parentId, required this.userId, }); @@ -36,6 +37,10 @@ class FeedsNotificationComment with _$FeedsNotificationComment { @JsonKey(name: 'id') final String id; + @override + @JsonKey(name: 'parent_id') + final String? parentId; + @override @JsonKey(name: 'user_id') final String userId; diff --git a/packages/stream_chat/lib/open_api/model/feeds_notification_comment.freezed.dart b/packages/stream_chat/lib/open_api/model/feeds_notification_comment.freezed.dart index 4201f03ca6..d0ddabc761 100644 --- a/packages/stream_chat/lib/open_api/model/feeds_notification_comment.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/feeds_notification_comment.freezed.dart @@ -16,6 +16,7 @@ mixin _$FeedsNotificationComment { List? get attachments; String get comment; String get id; + String? get parentId; String get userId; /// Create a copy of FeedsNotificationComment @@ -39,6 +40,7 @@ mixin _$FeedsNotificationComment { ) && (identical(other.comment, comment) || other.comment == comment) && (identical(other.id, id) || other.id == id) && + (identical(other.parentId, parentId) || other.parentId == parentId) && (identical(other.userId, userId) || other.userId == userId)); } @@ -48,12 +50,13 @@ mixin _$FeedsNotificationComment { const DeepCollectionEquality().hash(attachments), comment, id, + parentId, userId, ); @override String toString() { - return 'FeedsNotificationComment(attachments: $attachments, comment: $comment, id: $id, userId: $userId)'; + return 'FeedsNotificationComment(attachments: $attachments, comment: $comment, id: $id, parentId: $parentId, userId: $userId)'; } } @@ -68,6 +71,7 @@ abstract mixin class $FeedsNotificationCommentCopyWith<$Res> { List? attachments, String comment, String id, + String? parentId, String userId, }); } @@ -87,6 +91,7 @@ class _$FeedsNotificationCommentCopyWithImpl<$Res> implements $FeedsNotification Object? attachments = freezed, Object? comment = null, Object? id = null, + Object? parentId = freezed, Object? userId = null, }) { return _then( @@ -103,6 +108,10 @@ class _$FeedsNotificationCommentCopyWithImpl<$Res> implements $FeedsNotification ? _self.id : id // ignore: cast_nullable_to_non_nullable as String, + parentId: freezed == parentId + ? _self.parentId + : parentId // ignore: cast_nullable_to_non_nullable + as String?, userId: null == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/feeds_notification_comment.g.dart b/packages/stream_chat/lib/open_api/model/feeds_notification_comment.g.dart index 720c493e96..a75d945fff 100644 --- a/packages/stream_chat/lib/open_api/model/feeds_notification_comment.g.dart +++ b/packages/stream_chat/lib/open_api/model/feeds_notification_comment.g.dart @@ -14,6 +14,7 @@ FeedsNotificationComment _$FeedsNotificationCommentFromJson( .toList(), comment: json['comment'] as String, id: json['id'] as String, + parentId: json['parent_id'] as String?, userId: json['user_id'] as String, ); @@ -23,5 +24,6 @@ Map _$FeedsNotificationCommentToJson( 'attachments': instance.attachments?.map((e) => e.toJson()).toList(), 'comment': instance.comment, 'id': instance.id, + 'parent_id': instance.parentId, 'user_id': instance.userId, }; diff --git a/packages/stream_chat/lib/open_api/model/feeds_v3_comment_response.dart b/packages/stream_chat/lib/open_api/model/feeds_v3_comment_response.dart index 5b71b8e0d5..330f029b78 100644 --- a/packages/stream_chat/lib/open_api/model/feeds_v3_comment_response.dart +++ b/packages/stream_chat/lib/open_api/model/feeds_v3_comment_response.dart @@ -27,6 +27,7 @@ class FeedsV3CommentResponse with _$FeedsV3CommentResponse { this.deletedAt, required this.downvoteCount, this.editedAt, + required this.hidden, this.i18n, required this.id, this.latestReactions, @@ -86,6 +87,10 @@ class FeedsV3CommentResponse with _$FeedsV3CommentResponse { @JsonKey(name: 'edited_at') final DateTime? editedAt; + @override + @JsonKey(name: 'hidden') + final bool hidden; + @override @JsonKey(name: 'i18n') final Map? i18n; diff --git a/packages/stream_chat/lib/open_api/model/feeds_v3_comment_response.freezed.dart b/packages/stream_chat/lib/open_api/model/feeds_v3_comment_response.freezed.dart index 7edd07cf5b..e9b6c9a793 100644 --- a/packages/stream_chat/lib/open_api/model/feeds_v3_comment_response.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/feeds_v3_comment_response.freezed.dart @@ -22,6 +22,7 @@ mixin _$FeedsV3CommentResponse { DateTime? get deletedAt; int get downvoteCount; DateTime? get editedAt; + bool get hidden; Map? get i18n; String get id; List? get latestReactions; @@ -68,6 +69,7 @@ mixin _$FeedsV3CommentResponse { (identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt) && (identical(other.downvoteCount, downvoteCount) || other.downvoteCount == downvoteCount) && (identical(other.editedAt, editedAt) || other.editedAt == editedAt) && + (identical(other.hidden, hidden) || other.hidden == hidden) && const DeepCollectionEquality().equals(other.i18n, i18n) && (identical(other.id, id) || other.id == id) && const DeepCollectionEquality().equals( @@ -112,6 +114,7 @@ mixin _$FeedsV3CommentResponse { deletedAt, downvoteCount, editedAt, + hidden, const DeepCollectionEquality().hash(i18n), id, const DeepCollectionEquality().hash(latestReactions), @@ -134,7 +137,7 @@ mixin _$FeedsV3CommentResponse { @override String toString() { - return 'FeedsV3CommentResponse(attachments: $attachments, bookmarkCount: $bookmarkCount, confidenceScore: $confidenceScore, controversyScore: $controversyScore, createdAt: $createdAt, custom: $custom, deletedAt: $deletedAt, downvoteCount: $downvoteCount, editedAt: $editedAt, i18n: $i18n, id: $id, latestReactions: $latestReactions, mentionedUsers: $mentionedUsers, moderation: $moderation, objectId: $objectId, objectType: $objectType, ownReactions: $ownReactions, parentId: $parentId, reactionCount: $reactionCount, reactionGroups: $reactionGroups, replyCount: $replyCount, score: $score, status: $status, text: $text, updatedAt: $updatedAt, upvoteCount: $upvoteCount, user: $user)'; + return 'FeedsV3CommentResponse(attachments: $attachments, bookmarkCount: $bookmarkCount, confidenceScore: $confidenceScore, controversyScore: $controversyScore, createdAt: $createdAt, custom: $custom, deletedAt: $deletedAt, downvoteCount: $downvoteCount, editedAt: $editedAt, hidden: $hidden, i18n: $i18n, id: $id, latestReactions: $latestReactions, mentionedUsers: $mentionedUsers, moderation: $moderation, objectId: $objectId, objectType: $objectType, ownReactions: $ownReactions, parentId: $parentId, reactionCount: $reactionCount, reactionGroups: $reactionGroups, replyCount: $replyCount, score: $score, status: $status, text: $text, updatedAt: $updatedAt, upvoteCount: $upvoteCount, user: $user)'; } } @@ -155,6 +158,7 @@ abstract mixin class $FeedsV3CommentResponseCopyWith<$Res> { DateTime? deletedAt, int downvoteCount, DateTime? editedAt, + bool hidden, Map? i18n, String id, List? latestReactions, @@ -197,6 +201,7 @@ class _$FeedsV3CommentResponseCopyWithImpl<$Res> implements $FeedsV3CommentRespo Object? deletedAt = freezed, Object? downvoteCount = null, Object? editedAt = freezed, + Object? hidden = null, Object? i18n = freezed, Object? id = null, Object? latestReactions = freezed, @@ -254,6 +259,10 @@ class _$FeedsV3CommentResponseCopyWithImpl<$Res> implements $FeedsV3CommentRespo ? _self.editedAt : editedAt // ignore: cast_nullable_to_non_nullable as DateTime?, + hidden: null == hidden + ? _self.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool, i18n: freezed == i18n ? _self.i18n : i18n // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/feeds_v3_comment_response.g.dart b/packages/stream_chat/lib/open_api/model/feeds_v3_comment_response.g.dart index 7c6e751436..fcfa0034fe 100644 --- a/packages/stream_chat/lib/open_api/model/feeds_v3_comment_response.g.dart +++ b/packages/stream_chat/lib/open_api/model/feeds_v3_comment_response.g.dart @@ -28,6 +28,7 @@ FeedsV3CommentResponse _$FeedsV3CommentResponseFromJson( json['edited_at'], const StreamDateTimeConverter().fromJson, ), + hidden: json['hidden'] as bool, i18n: (json['i18n'] as Map?)?.map( (k, e) => MapEntry(k, e as String), ), @@ -85,6 +86,7 @@ Map _$FeedsV3CommentResponseToJson( instance.editedAt, const StreamDateTimeConverter().toJson, ), + 'hidden': instance.hidden, 'i18n': instance.i18n, 'id': instance.id, 'latest_reactions': instance.latestReactions?.map((e) => e.toJson()).toList(), diff --git a/packages/stream_chat/lib/open_api/model/full_user_response.dart b/packages/stream_chat/lib/open_api/model/full_user_response.dart index d6b844f1f3..982a6ef0a4 100644 --- a/packages/stream_chat/lib/open_api/model/full_user_response.dart +++ b/packages/stream_chat/lib/open_api/model/full_user_response.dart @@ -38,7 +38,6 @@ class FullUserResponse with _$FullUserResponse { this.name, required this.online, this.privacySettings, - this.revokeTokensIssuedBefore, required this.role, required this.shadowBanned, required this.teams, @@ -135,11 +134,6 @@ class FullUserResponse with _$FullUserResponse { @JsonKey(name: 'privacy_settings') final PrivacySettingsResponse? privacySettings; - @override - @StreamDateTimeConverter() - @JsonKey(name: 'revoke_tokens_issued_before') - final DateTime? revokeTokensIssuedBefore; - @override @JsonKey(name: 'role') final String role; diff --git a/packages/stream_chat/lib/open_api/model/full_user_response.freezed.dart b/packages/stream_chat/lib/open_api/model/full_user_response.freezed.dart index 4b2358865c..d87b695db5 100644 --- a/packages/stream_chat/lib/open_api/model/full_user_response.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/full_user_response.freezed.dart @@ -33,7 +33,6 @@ mixin _$FullUserResponse { String? get name; bool get online; PrivacySettingsResponse? get privacySettings; - DateTime? get revokeTokensIssuedBefore; String get role; bool get shadowBanned; List get teams; @@ -87,11 +86,6 @@ mixin _$FullUserResponse { (identical(other.name, name) || other.name == name) && (identical(other.online, online) || other.online == online) && (identical(other.privacySettings, privacySettings) || other.privacySettings == privacySettings) && - (identical( - other.revokeTokensIssuedBefore, - revokeTokensIssuedBefore, - ) || - other.revokeTokensIssuedBefore == revokeTokensIssuedBefore) && (identical(other.role, role) || other.role == role) && (identical(other.shadowBanned, shadowBanned) || other.shadowBanned == shadowBanned) && const DeepCollectionEquality().equals(other.teams, teams) && @@ -126,7 +120,6 @@ mixin _$FullUserResponse { name, online, privacySettings, - revokeTokensIssuedBefore, role, shadowBanned, const DeepCollectionEquality().hash(teams), @@ -140,7 +133,7 @@ mixin _$FullUserResponse { @override String toString() { - return 'FullUserResponse(avgResponseTime: $avgResponseTime, banExpires: $banExpires, banned: $banned, blockedUserIds: $blockedUserIds, channelMutes: $channelMutes, createdAt: $createdAt, custom: $custom, deactivatedAt: $deactivatedAt, deletedAt: $deletedAt, devices: $devices, id: $id, image: $image, invisible: $invisible, language: $language, lastActive: $lastActive, latestHiddenChannels: $latestHiddenChannels, mutes: $mutes, name: $name, online: $online, privacySettings: $privacySettings, revokeTokensIssuedBefore: $revokeTokensIssuedBefore, role: $role, shadowBanned: $shadowBanned, teams: $teams, teamsRole: $teamsRole, totalUnreadCount: $totalUnreadCount, unreadChannels: $unreadChannels, unreadCount: $unreadCount, unreadThreads: $unreadThreads, updatedAt: $updatedAt)'; + return 'FullUserResponse(avgResponseTime: $avgResponseTime, banExpires: $banExpires, banned: $banned, blockedUserIds: $blockedUserIds, channelMutes: $channelMutes, createdAt: $createdAt, custom: $custom, deactivatedAt: $deactivatedAt, deletedAt: $deletedAt, devices: $devices, id: $id, image: $image, invisible: $invisible, language: $language, lastActive: $lastActive, latestHiddenChannels: $latestHiddenChannels, mutes: $mutes, name: $name, online: $online, privacySettings: $privacySettings, role: $role, shadowBanned: $shadowBanned, teams: $teams, teamsRole: $teamsRole, totalUnreadCount: $totalUnreadCount, unreadChannels: $unreadChannels, unreadCount: $unreadCount, unreadThreads: $unreadThreads, updatedAt: $updatedAt)'; } } @@ -172,7 +165,6 @@ abstract mixin class $FullUserResponseCopyWith<$Res> { String? name, bool online, PrivacySettingsResponse? privacySettings, - DateTime? revokeTokensIssuedBefore, String role, bool shadowBanned, List teams, @@ -217,7 +209,6 @@ class _$FullUserResponseCopyWithImpl<$Res> implements $FullUserResponseCopyWith< Object? name = freezed, Object? online = null, Object? privacySettings = freezed, - Object? revokeTokensIssuedBefore = freezed, Object? role = null, Object? shadowBanned = null, Object? teams = null, @@ -310,10 +301,6 @@ class _$FullUserResponseCopyWithImpl<$Res> implements $FullUserResponseCopyWith< ? _self.privacySettings : privacySettings // ignore: cast_nullable_to_non_nullable as PrivacySettingsResponse?, - revokeTokensIssuedBefore: freezed == revokeTokensIssuedBefore - ? _self.revokeTokensIssuedBefore - : revokeTokensIssuedBefore // ignore: cast_nullable_to_non_nullable - as DateTime?, role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/full_user_response.g.dart b/packages/stream_chat/lib/open_api/model/full_user_response.g.dart index f413948221..4d15aeef1f 100644 --- a/packages/stream_chat/lib/open_api/model/full_user_response.g.dart +++ b/packages/stream_chat/lib/open_api/model/full_user_response.g.dart @@ -47,10 +47,6 @@ FullUserResponse _$FullUserResponseFromJson(Map json) => FullUs : PrivacySettingsResponse.fromJson( json['privacy_settings'] as Map, ), - revokeTokensIssuedBefore: _$JsonConverterFromJson( - json['revoke_tokens_issued_before'], - const StreamDateTimeConverter().fromJson, - ), role: json['role'] as String, shadowBanned: json['shadow_banned'] as bool, teams: (json['teams'] as List).map((e) => e as String).toList(), @@ -99,10 +95,6 @@ Map _$FullUserResponseToJson(FullUserResponse instance) => ( - instance.revokeTokensIssuedBefore, - const StreamDateTimeConverter().toJson, - ), 'role': instance.role, 'shadow_banned': instance.shadowBanned, 'teams': instance.teams, diff --git a/packages/stream_chat/lib/open_api/model/get_or_create_channel_defaults.dart b/packages/stream_chat/lib/open_api/model/get_or_create_channel_defaults.dart new file mode 100644 index 0000000000..068c498805 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/get_or_create_channel_defaults.dart @@ -0,0 +1,36 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'get_or_create_channel_defaults.g.dart'; +part 'get_or_create_channel_defaults.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class GetOrCreateChannelDefaults with _$GetOrCreateChannelDefaults { + const GetOrCreateChannelDefaults({ + required this.members, + required this.messages, + }); + + @override + @JsonKey(name: 'members') + final PagerDefaults members; + + @override + @JsonKey(name: 'messages') + final PagerDefaults messages; + + Map toJson() => _$GetOrCreateChannelDefaultsToJson(this); + + static GetOrCreateChannelDefaults fromJson(Map json) => _$GetOrCreateChannelDefaultsFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/get_or_create_channel_defaults.freezed.dart b/packages/stream_chat/lib/open_api/model/get_or_create_channel_defaults.freezed.dart new file mode 100644 index 0000000000..24cd352376 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/get_or_create_channel_defaults.freezed.dart @@ -0,0 +1,82 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'get_or_create_channel_defaults.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$GetOrCreateChannelDefaults { + PagerDefaults get members; + PagerDefaults get messages; + + /// Create a copy of GetOrCreateChannelDefaults + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $GetOrCreateChannelDefaultsCopyWith get copyWith => + _$GetOrCreateChannelDefaultsCopyWithImpl( + this as GetOrCreateChannelDefaults, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is GetOrCreateChannelDefaults && + (identical(other.members, members) || other.members == members) && + (identical(other.messages, messages) || other.messages == messages)); + } + + @override + int get hashCode => Object.hash(runtimeType, members, messages); + + @override + String toString() { + return 'GetOrCreateChannelDefaults(members: $members, messages: $messages)'; + } +} + +/// @nodoc +abstract mixin class $GetOrCreateChannelDefaultsCopyWith<$Res> { + factory $GetOrCreateChannelDefaultsCopyWith( + GetOrCreateChannelDefaults value, + $Res Function(GetOrCreateChannelDefaults) _then, + ) = _$GetOrCreateChannelDefaultsCopyWithImpl; + @useResult + $Res call({PagerDefaults members, PagerDefaults messages}); +} + +/// @nodoc +class _$GetOrCreateChannelDefaultsCopyWithImpl<$Res> implements $GetOrCreateChannelDefaultsCopyWith<$Res> { + _$GetOrCreateChannelDefaultsCopyWithImpl(this._self, this._then); + + final GetOrCreateChannelDefaults _self; + final $Res Function(GetOrCreateChannelDefaults) _then; + + /// Create a copy of GetOrCreateChannelDefaults + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({Object? members = null, Object? messages = null}) { + return _then( + GetOrCreateChannelDefaults( + members: null == members + ? _self.members + : members // ignore: cast_nullable_to_non_nullable + as PagerDefaults, + messages: null == messages + ? _self.messages + : messages // ignore: cast_nullable_to_non_nullable + as PagerDefaults, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/get_or_create_channel_defaults.g.dart b/packages/stream_chat/lib/open_api/model/get_or_create_channel_defaults.g.dart new file mode 100644 index 0000000000..8f0d4d6dae --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/get_or_create_channel_defaults.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'get_or_create_channel_defaults.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +GetOrCreateChannelDefaults _$GetOrCreateChannelDefaultsFromJson( + Map json, +) => GetOrCreateChannelDefaults( + members: PagerDefaults.fromJson(json['members'] as Map), + messages: PagerDefaults.fromJson(json['messages'] as Map), +); + +Map _$GetOrCreateChannelDefaultsToJson( + GetOrCreateChannelDefaults instance, +) => { + 'members': instance.members.toJson(), + 'messages': instance.messages.toJson(), +}; diff --git a/packages/stream_chat/lib/open_api/model/grouped_channels_group_request.dart b/packages/stream_chat/lib/open_api/model/grouped_channels_group_request.dart index a0f64424f4..1e3552d6e4 100644 --- a/packages/stream_chat/lib/open_api/model/grouped_channels_group_request.dart +++ b/packages/stream_chat/lib/open_api/model/grouped_channels_group_request.dart @@ -18,11 +18,16 @@ part 'grouped_channels_group_request.freezed.dart'; @JsonSerializable() class GroupedChannelsGroupRequest with _$GroupedChannelsGroupRequest { const GroupedChannelsGroupRequest({ + this.filterConditions, this.limit, this.next, this.prev, }); + @override + @JsonKey(name: 'filter_conditions') + final Map? filterConditions; + @override @JsonKey(name: 'limit') final int? limit; diff --git a/packages/stream_chat/lib/open_api/model/grouped_channels_group_request.freezed.dart b/packages/stream_chat/lib/open_api/model/grouped_channels_group_request.freezed.dart index 1700e70c63..34406d6e54 100644 --- a/packages/stream_chat/lib/open_api/model/grouped_channels_group_request.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/grouped_channels_group_request.freezed.dart @@ -13,6 +13,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$GroupedChannelsGroupRequest { + Map? get filterConditions; int? get limit; String? get next; String? get prev; @@ -32,17 +33,27 @@ mixin _$GroupedChannelsGroupRequest { return identical(this, other) || (other.runtimeType == runtimeType && other is GroupedChannelsGroupRequest && + const DeepCollectionEquality().equals( + other.filterConditions, + filterConditions, + ) && (identical(other.limit, limit) || other.limit == limit) && (identical(other.next, next) || other.next == next) && (identical(other.prev, prev) || other.prev == prev)); } @override - int get hashCode => Object.hash(runtimeType, limit, next, prev); + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(filterConditions), + limit, + next, + prev, + ); @override String toString() { - return 'GroupedChannelsGroupRequest(limit: $limit, next: $next, prev: $prev)'; + return 'GroupedChannelsGroupRequest(filterConditions: $filterConditions, limit: $limit, next: $next, prev: $prev)'; } } @@ -53,7 +64,12 @@ abstract mixin class $GroupedChannelsGroupRequestCopyWith<$Res> { $Res Function(GroupedChannelsGroupRequest) _then, ) = _$GroupedChannelsGroupRequestCopyWithImpl; @useResult - $Res call({int? limit, String? next, String? prev}); + $Res call({ + Map? filterConditions, + int? limit, + String? next, + String? prev, + }); } /// @nodoc @@ -68,12 +84,17 @@ class _$GroupedChannelsGroupRequestCopyWithImpl<$Res> implements $GroupedChannel @pragma('vm:prefer-inline') @override $Res call({ + Object? filterConditions = freezed, Object? limit = freezed, Object? next = freezed, Object? prev = freezed, }) { return _then( GroupedChannelsGroupRequest( + filterConditions: freezed == filterConditions + ? _self.filterConditions + : filterConditions // ignore: cast_nullable_to_non_nullable + as Map?, limit: freezed == limit ? _self.limit : limit // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/grouped_channels_group_request.g.dart b/packages/stream_chat/lib/open_api/model/grouped_channels_group_request.g.dart index 7d4c1c44d4..9139775eb1 100644 --- a/packages/stream_chat/lib/open_api/model/grouped_channels_group_request.g.dart +++ b/packages/stream_chat/lib/open_api/model/grouped_channels_group_request.g.dart @@ -9,6 +9,7 @@ part of 'grouped_channels_group_request.dart'; GroupedChannelsGroupRequest _$GroupedChannelsGroupRequestFromJson( Map json, ) => GroupedChannelsGroupRequest( + filterConditions: json['filter_conditions'] as Map?, limit: (json['limit'] as num?)?.toInt(), next: json['next'] as String?, prev: json['prev'] as String?, @@ -17,6 +18,7 @@ GroupedChannelsGroupRequest _$GroupedChannelsGroupRequestFromJson( Map _$GroupedChannelsGroupRequestToJson( GroupedChannelsGroupRequest instance, ) => { + 'filter_conditions': instance.filterConditions, 'limit': instance.limit, 'next': instance.next, 'prev': instance.prev, diff --git a/packages/stream_chat/lib/open_api/model/grouped_query_channels_request.dart b/packages/stream_chat/lib/open_api/model/grouped_query_channels_request.dart index 1767e9ceb9..d4707c11e9 100644 --- a/packages/stream_chat/lib/open_api/model/grouped_query_channels_request.dart +++ b/packages/stream_chat/lib/open_api/model/grouped_query_channels_request.dart @@ -21,6 +21,7 @@ class GroupedQueryChannelsRequest with _$GroupedQueryChannelsRequest { this.groups, this.limit, this.presence, + this.sort, this.watch, }); @@ -36,6 +37,10 @@ class GroupedQueryChannelsRequest with _$GroupedQueryChannelsRequest { @JsonKey(name: 'presence') final bool? presence; + @override + @JsonKey(name: 'sort') + final List? sort; + @override @JsonKey(name: 'watch') final bool? watch; diff --git a/packages/stream_chat/lib/open_api/model/grouped_query_channels_request.freezed.dart b/packages/stream_chat/lib/open_api/model/grouped_query_channels_request.freezed.dart index d37fa47cd7..06030922d0 100644 --- a/packages/stream_chat/lib/open_api/model/grouped_query_channels_request.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/grouped_query_channels_request.freezed.dart @@ -16,6 +16,7 @@ mixin _$GroupedQueryChannelsRequest { Map? get groups; int? get limit; bool? get presence; + List? get sort; bool? get watch; /// Create a copy of GroupedQueryChannelsRequest @@ -36,6 +37,7 @@ mixin _$GroupedQueryChannelsRequest { const DeepCollectionEquality().equals(other.groups, groups) && (identical(other.limit, limit) || other.limit == limit) && (identical(other.presence, presence) || other.presence == presence) && + const DeepCollectionEquality().equals(other.sort, sort) && (identical(other.watch, watch) || other.watch == watch)); } @@ -45,12 +47,13 @@ mixin _$GroupedQueryChannelsRequest { const DeepCollectionEquality().hash(groups), limit, presence, + const DeepCollectionEquality().hash(sort), watch, ); @override String toString() { - return 'GroupedQueryChannelsRequest(groups: $groups, limit: $limit, presence: $presence, watch: $watch)'; + return 'GroupedQueryChannelsRequest(groups: $groups, limit: $limit, presence: $presence, sort: $sort, watch: $watch)'; } } @@ -65,6 +68,7 @@ abstract mixin class $GroupedQueryChannelsRequestCopyWith<$Res> { Map? groups, int? limit, bool? presence, + List? sort, bool? watch, }); } @@ -84,6 +88,7 @@ class _$GroupedQueryChannelsRequestCopyWithImpl<$Res> implements $GroupedQueryCh Object? groups = freezed, Object? limit = freezed, Object? presence = freezed, + Object? sort = freezed, Object? watch = freezed, }) { return _then( @@ -100,6 +105,10 @@ class _$GroupedQueryChannelsRequestCopyWithImpl<$Res> implements $GroupedQueryCh ? _self.presence : presence // ignore: cast_nullable_to_non_nullable as bool?, + sort: freezed == sort + ? _self.sort + : sort // ignore: cast_nullable_to_non_nullable + as List?, watch: freezed == watch ? _self.watch : watch // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/grouped_query_channels_request.g.dart b/packages/stream_chat/lib/open_api/model/grouped_query_channels_request.g.dart index 55b235f7dc..8fd1436580 100644 --- a/packages/stream_chat/lib/open_api/model/grouped_query_channels_request.g.dart +++ b/packages/stream_chat/lib/open_api/model/grouped_query_channels_request.g.dart @@ -17,6 +17,7 @@ GroupedQueryChannelsRequest _$GroupedQueryChannelsRequestFromJson( ), limit: (json['limit'] as num?)?.toInt(), presence: json['presence'] as bool?, + sort: (json['sort'] as List?)?.map((e) => SortParamRequest.fromJson(e as Map)).toList(), watch: json['watch'] as bool?, ); @@ -26,5 +27,6 @@ Map _$GroupedQueryChannelsRequestToJson( 'groups': instance.groups?.map((k, e) => MapEntry(k, e.toJson())), 'limit': instance.limit, 'presence': instance.presence, + 'sort': instance.sort?.map((e) => e.toJson()).toList(), 'watch': instance.watch, }; diff --git a/packages/stream_chat/lib/open_api/model/intent_rule_parameters.dart b/packages/stream_chat/lib/open_api/model/intent_rule_parameters.dart new file mode 100644 index 0000000000..a80ed56bfc --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/intent_rule_parameters.dart @@ -0,0 +1,36 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'intent_rule_parameters.g.dart'; +part 'intent_rule_parameters.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class IntentRuleParameters with _$IntentRuleParameters { + const IntentRuleParameters({ + this.threshold, + required this.topic, + }); + + @override + @JsonKey(name: 'threshold') + final int? threshold; + + @override + @JsonKey(name: 'topic') + final String topic; + + Map toJson() => _$IntentRuleParametersToJson(this); + + static IntentRuleParameters fromJson(Map json) => _$IntentRuleParametersFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/intent_rule_parameters.freezed.dart b/packages/stream_chat/lib/open_api/model/intent_rule_parameters.freezed.dart new file mode 100644 index 0000000000..184541b514 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/intent_rule_parameters.freezed.dart @@ -0,0 +1,82 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'intent_rule_parameters.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$IntentRuleParameters { + int? get threshold; + String get topic; + + /// Create a copy of IntentRuleParameters + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $IntentRuleParametersCopyWith get copyWith => + _$IntentRuleParametersCopyWithImpl( + this as IntentRuleParameters, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is IntentRuleParameters && + (identical(other.threshold, threshold) || other.threshold == threshold) && + (identical(other.topic, topic) || other.topic == topic)); + } + + @override + int get hashCode => Object.hash(runtimeType, threshold, topic); + + @override + String toString() { + return 'IntentRuleParameters(threshold: $threshold, topic: $topic)'; + } +} + +/// @nodoc +abstract mixin class $IntentRuleParametersCopyWith<$Res> { + factory $IntentRuleParametersCopyWith( + IntentRuleParameters value, + $Res Function(IntentRuleParameters) _then, + ) = _$IntentRuleParametersCopyWithImpl; + @useResult + $Res call({int? threshold, String topic}); +} + +/// @nodoc +class _$IntentRuleParametersCopyWithImpl<$Res> implements $IntentRuleParametersCopyWith<$Res> { + _$IntentRuleParametersCopyWithImpl(this._self, this._then); + + final IntentRuleParameters _self; + final $Res Function(IntentRuleParameters) _then; + + /// Create a copy of IntentRuleParameters + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({Object? threshold = freezed, Object? topic = null}) { + return _then( + IntentRuleParameters( + threshold: freezed == threshold + ? _self.threshold + : threshold // ignore: cast_nullable_to_non_nullable + as int?, + topic: null == topic + ? _self.topic + : topic // ignore: cast_nullable_to_non_nullable + as String, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/intent_rule_parameters.g.dart b/packages/stream_chat/lib/open_api/model/intent_rule_parameters.g.dart new file mode 100644 index 0000000000..10a3e7fb39 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/intent_rule_parameters.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'intent_rule_parameters.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +IntentRuleParameters _$IntentRuleParametersFromJson( + Map json, +) => IntentRuleParameters( + threshold: (json['threshold'] as num?)?.toInt(), + topic: json['topic'] as String, +); + +Map _$IntentRuleParametersToJson( + IntentRuleParameters instance, +) => { + 'threshold': instance.threshold, + 'topic': instance.topic, +}; diff --git a/packages/stream_chat/lib/open_api/model/intent_topic_request.dart b/packages/stream_chat/lib/open_api/model/intent_topic_request.dart index e4297287ce..bfdd130a8e 100644 --- a/packages/stream_chat/lib/open_api/model/intent_topic_request.dart +++ b/packages/stream_chat/lib/open_api/model/intent_topic_request.dart @@ -18,43 +18,18 @@ part 'intent_topic_request.freezed.dart'; @JsonSerializable() class IntentTopicRequest with _$IntentTopicRequest { const IntentTopicRequest({ - this.analysisCooldownSeconds, this.description, - this.enabled, required this.label, - this.maxCapturedItems, - this.refireCooldownSeconds, - this.scoreThreshold, }); - @override - @JsonKey(name: 'analysis_cooldown_seconds') - final int? analysisCooldownSeconds; - @override @JsonKey(name: 'description') final String? description; - @override - @JsonKey(name: 'enabled') - final bool? enabled; - @override @JsonKey(name: 'label') final String label; - @override - @JsonKey(name: 'max_captured_items') - final int? maxCapturedItems; - - @override - @JsonKey(name: 'refire_cooldown_seconds') - final int? refireCooldownSeconds; - - @override - @JsonKey(name: 'score_threshold') - final double? scoreThreshold; - Map toJson() => _$IntentTopicRequestToJson(this); static IntentTopicRequest fromJson(Map json) => _$IntentTopicRequestFromJson(json); diff --git a/packages/stream_chat/lib/open_api/model/intent_topic_request.freezed.dart b/packages/stream_chat/lib/open_api/model/intent_topic_request.freezed.dart index 11e3c35d5b..64d1708d9a 100644 --- a/packages/stream_chat/lib/open_api/model/intent_topic_request.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/intent_topic_request.freezed.dart @@ -13,13 +13,8 @@ T _$identity(T value) => value; /// @nodoc mixin _$IntentTopicRequest { - int? get analysisCooldownSeconds; String? get description; - bool? get enabled; String get label; - int? get maxCapturedItems; - int? get refireCooldownSeconds; - double? get scoreThreshold; /// Create a copy of IntentTopicRequest /// with the given fields replaced by the non-null parameter values. @@ -35,35 +30,16 @@ mixin _$IntentTopicRequest { return identical(this, other) || (other.runtimeType == runtimeType && other is IntentTopicRequest && - (identical( - other.analysisCooldownSeconds, - analysisCooldownSeconds, - ) || - other.analysisCooldownSeconds == analysisCooldownSeconds) && (identical(other.description, description) || other.description == description) && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.label, label) || other.label == label) && - (identical(other.maxCapturedItems, maxCapturedItems) || other.maxCapturedItems == maxCapturedItems) && - (identical(other.refireCooldownSeconds, refireCooldownSeconds) || - other.refireCooldownSeconds == refireCooldownSeconds) && - (identical(other.scoreThreshold, scoreThreshold) || other.scoreThreshold == scoreThreshold)); + (identical(other.label, label) || other.label == label)); } @override - int get hashCode => Object.hash( - runtimeType, - analysisCooldownSeconds, - description, - enabled, - label, - maxCapturedItems, - refireCooldownSeconds, - scoreThreshold, - ); + int get hashCode => Object.hash(runtimeType, description, label); @override String toString() { - return 'IntentTopicRequest(analysisCooldownSeconds: $analysisCooldownSeconds, description: $description, enabled: $enabled, label: $label, maxCapturedItems: $maxCapturedItems, refireCooldownSeconds: $refireCooldownSeconds, scoreThreshold: $scoreThreshold)'; + return 'IntentTopicRequest(description: $description, label: $label)'; } } @@ -74,15 +50,7 @@ abstract mixin class $IntentTopicRequestCopyWith<$Res> { $Res Function(IntentTopicRequest) _then, ) = _$IntentTopicRequestCopyWithImpl; @useResult - $Res call({ - int? analysisCooldownSeconds, - String? description, - bool? enabled, - String label, - int? maxCapturedItems, - int? refireCooldownSeconds, - double? scoreThreshold, - }); + $Res call({String? description, String label}); } /// @nodoc @@ -96,45 +64,17 @@ class _$IntentTopicRequestCopyWithImpl<$Res> implements $IntentTopicRequestCopyW /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? analysisCooldownSeconds = freezed, - Object? description = freezed, - Object? enabled = freezed, - Object? label = null, - Object? maxCapturedItems = freezed, - Object? refireCooldownSeconds = freezed, - Object? scoreThreshold = freezed, - }) { + $Res call({Object? description = freezed, Object? label = null}) { return _then( IntentTopicRequest( - analysisCooldownSeconds: freezed == analysisCooldownSeconds - ? _self.analysisCooldownSeconds - : analysisCooldownSeconds // ignore: cast_nullable_to_non_nullable - as int?, description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String?, - enabled: freezed == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool?, label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable as String, - maxCapturedItems: freezed == maxCapturedItems - ? _self.maxCapturedItems - : maxCapturedItems // ignore: cast_nullable_to_non_nullable - as int?, - refireCooldownSeconds: freezed == refireCooldownSeconds - ? _self.refireCooldownSeconds - : refireCooldownSeconds // ignore: cast_nullable_to_non_nullable - as int?, - scoreThreshold: freezed == scoreThreshold - ? _self.scoreThreshold - : scoreThreshold // ignore: cast_nullable_to_non_nullable - as double?, ), ); } diff --git a/packages/stream_chat/lib/open_api/model/intent_topic_request.g.dart b/packages/stream_chat/lib/open_api/model/intent_topic_request.g.dart index 57605181f5..b3e992916d 100644 --- a/packages/stream_chat/lib/open_api/model/intent_topic_request.g.dart +++ b/packages/stream_chat/lib/open_api/model/intent_topic_request.g.dart @@ -7,21 +7,11 @@ part of 'intent_topic_request.dart'; // ************************************************************************** IntentTopicRequest _$IntentTopicRequestFromJson(Map json) => IntentTopicRequest( - analysisCooldownSeconds: (json['analysis_cooldown_seconds'] as num?)?.toInt(), description: json['description'] as String?, - enabled: json['enabled'] as bool?, label: json['label'] as String, - maxCapturedItems: (json['max_captured_items'] as num?)?.toInt(), - refireCooldownSeconds: (json['refire_cooldown_seconds'] as num?)?.toInt(), - scoreThreshold: (json['score_threshold'] as num?)?.toDouble(), ); Map _$IntentTopicRequestToJson(IntentTopicRequest instance) => { - 'analysis_cooldown_seconds': instance.analysisCooldownSeconds, 'description': instance.description, - 'enabled': instance.enabled, 'label': instance.label, - 'max_captured_items': instance.maxCapturedItems, - 'refire_cooldown_seconds': instance.refireCooldownSeconds, - 'score_threshold': instance.scoreThreshold, }; diff --git a/packages/stream_chat/lib/open_api/model/intent_topic_response.dart b/packages/stream_chat/lib/open_api/model/intent_topic_response.dart index 953c35fa26..f48f289476 100644 --- a/packages/stream_chat/lib/open_api/model/intent_topic_response.dart +++ b/packages/stream_chat/lib/open_api/model/intent_topic_response.dart @@ -18,43 +18,18 @@ part 'intent_topic_response.freezed.dart'; @JsonSerializable() class IntentTopicResponse with _$IntentTopicResponse { const IntentTopicResponse({ - required this.analysisCooldownSeconds, this.description, - required this.enabled, required this.label, - required this.maxCapturedItems, - this.refireCooldownSeconds, - required this.scoreThreshold, }); - @override - @JsonKey(name: 'analysis_cooldown_seconds') - final int analysisCooldownSeconds; - @override @JsonKey(name: 'description') final String? description; - @override - @JsonKey(name: 'enabled') - final bool enabled; - @override @JsonKey(name: 'label') final String label; - @override - @JsonKey(name: 'max_captured_items') - final int maxCapturedItems; - - @override - @JsonKey(name: 'refire_cooldown_seconds') - final int? refireCooldownSeconds; - - @override - @JsonKey(name: 'score_threshold') - final double scoreThreshold; - Map toJson() => _$IntentTopicResponseToJson(this); static IntentTopicResponse fromJson(Map json) => _$IntentTopicResponseFromJson(json); diff --git a/packages/stream_chat/lib/open_api/model/intent_topic_response.freezed.dart b/packages/stream_chat/lib/open_api/model/intent_topic_response.freezed.dart index d14f8f13e4..ac01220f8c 100644 --- a/packages/stream_chat/lib/open_api/model/intent_topic_response.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/intent_topic_response.freezed.dart @@ -13,13 +13,8 @@ T _$identity(T value) => value; /// @nodoc mixin _$IntentTopicResponse { - int get analysisCooldownSeconds; String? get description; - bool get enabled; String get label; - int get maxCapturedItems; - int? get refireCooldownSeconds; - double get scoreThreshold; /// Create a copy of IntentTopicResponse /// with the given fields replaced by the non-null parameter values. @@ -36,35 +31,16 @@ mixin _$IntentTopicResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is IntentTopicResponse && - (identical( - other.analysisCooldownSeconds, - analysisCooldownSeconds, - ) || - other.analysisCooldownSeconds == analysisCooldownSeconds) && (identical(other.description, description) || other.description == description) && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.label, label) || other.label == label) && - (identical(other.maxCapturedItems, maxCapturedItems) || other.maxCapturedItems == maxCapturedItems) && - (identical(other.refireCooldownSeconds, refireCooldownSeconds) || - other.refireCooldownSeconds == refireCooldownSeconds) && - (identical(other.scoreThreshold, scoreThreshold) || other.scoreThreshold == scoreThreshold)); + (identical(other.label, label) || other.label == label)); } @override - int get hashCode => Object.hash( - runtimeType, - analysisCooldownSeconds, - description, - enabled, - label, - maxCapturedItems, - refireCooldownSeconds, - scoreThreshold, - ); + int get hashCode => Object.hash(runtimeType, description, label); @override String toString() { - return 'IntentTopicResponse(analysisCooldownSeconds: $analysisCooldownSeconds, description: $description, enabled: $enabled, label: $label, maxCapturedItems: $maxCapturedItems, refireCooldownSeconds: $refireCooldownSeconds, scoreThreshold: $scoreThreshold)'; + return 'IntentTopicResponse(description: $description, label: $label)'; } } @@ -75,15 +51,7 @@ abstract mixin class $IntentTopicResponseCopyWith<$Res> { $Res Function(IntentTopicResponse) _then, ) = _$IntentTopicResponseCopyWithImpl; @useResult - $Res call({ - int analysisCooldownSeconds, - String? description, - bool enabled, - String label, - int maxCapturedItems, - int? refireCooldownSeconds, - double scoreThreshold, - }); + $Res call({String? description, String label}); } /// @nodoc @@ -97,45 +65,17 @@ class _$IntentTopicResponseCopyWithImpl<$Res> implements $IntentTopicResponseCop /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? analysisCooldownSeconds = null, - Object? description = freezed, - Object? enabled = null, - Object? label = null, - Object? maxCapturedItems = null, - Object? refireCooldownSeconds = freezed, - Object? scoreThreshold = null, - }) { + $Res call({Object? description = freezed, Object? label = null}) { return _then( IntentTopicResponse( - analysisCooldownSeconds: null == analysisCooldownSeconds - ? _self.analysisCooldownSeconds - : analysisCooldownSeconds // ignore: cast_nullable_to_non_nullable - as int, description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String?, - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable as String, - maxCapturedItems: null == maxCapturedItems - ? _self.maxCapturedItems - : maxCapturedItems // ignore: cast_nullable_to_non_nullable - as int, - refireCooldownSeconds: freezed == refireCooldownSeconds - ? _self.refireCooldownSeconds - : refireCooldownSeconds // ignore: cast_nullable_to_non_nullable - as int?, - scoreThreshold: null == scoreThreshold - ? _self.scoreThreshold - : scoreThreshold // ignore: cast_nullable_to_non_nullable - as double, ), ); } diff --git a/packages/stream_chat/lib/open_api/model/intent_topic_response.g.dart b/packages/stream_chat/lib/open_api/model/intent_topic_response.g.dart index 7538b3dd67..31387d6af2 100644 --- a/packages/stream_chat/lib/open_api/model/intent_topic_response.g.dart +++ b/packages/stream_chat/lib/open_api/model/intent_topic_response.g.dart @@ -7,23 +7,13 @@ part of 'intent_topic_response.dart'; // ************************************************************************** IntentTopicResponse _$IntentTopicResponseFromJson(Map json) => IntentTopicResponse( - analysisCooldownSeconds: (json['analysis_cooldown_seconds'] as num).toInt(), description: json['description'] as String?, - enabled: json['enabled'] as bool, label: json['label'] as String, - maxCapturedItems: (json['max_captured_items'] as num).toInt(), - refireCooldownSeconds: (json['refire_cooldown_seconds'] as num?)?.toInt(), - scoreThreshold: (json['score_threshold'] as num).toDouble(), ); Map _$IntentTopicResponseToJson( IntentTopicResponse instance, ) => { - 'analysis_cooldown_seconds': instance.analysisCooldownSeconds, 'description': instance.description, - 'enabled': instance.enabled, 'label': instance.label, - 'max_captured_items': instance.maxCapturedItems, - 'refire_cooldown_seconds': instance.refireCooldownSeconds, - 'score_threshold': instance.scoreThreshold, }; diff --git a/packages/stream_chat/lib/open_api/model/notification_added_to_channel_event.dart b/packages/stream_chat/lib/open_api/model/notification_added_to_channel_event.dart index 4eed2455f5..32b54c2f35 100644 --- a/packages/stream_chat/lib/open_api/model/notification_added_to_channel_event.dart +++ b/packages/stream_chat/lib/open_api/model/notification_added_to_channel_event.dart @@ -27,10 +27,14 @@ class NotificationAddedToChannelEvent extends core.WsEvent with _$NotificationAd this.cid, required this.createdAt, required this.custom, + this.groupedUnreadChannels, required this.member, this.receivedAt, this.team, + this.totalUnreadCount, required this.type, + this.unreadChannels, + this.unreadCount, }); @override @@ -70,6 +74,10 @@ class NotificationAddedToChannelEvent extends core.WsEvent with _$NotificationAd @JsonKey(name: 'custom') final Map custom; + @override + @JsonKey(name: 'grouped_unread_channels') + final Map? groupedUnreadChannels; + @override @JsonKey(name: 'member') final ChannelMemberResponse member; @@ -83,10 +91,22 @@ class NotificationAddedToChannelEvent extends core.WsEvent with _$NotificationAd @JsonKey(name: 'team') final String? team; + @override + @JsonKey(name: 'total_unread_count') + final int? totalUnreadCount; + @override @JsonKey(name: 'type') final String type; + @override + @JsonKey(name: 'unread_channels') + final int? unreadChannels; + + @override + @JsonKey(name: 'unread_count') + final int? unreadCount; + Map toJson() => _$NotificationAddedToChannelEventToJson(this); static NotificationAddedToChannelEvent fromJson(Map json) => diff --git a/packages/stream_chat/lib/open_api/model/notification_added_to_channel_event.freezed.dart b/packages/stream_chat/lib/open_api/model/notification_added_to_channel_event.freezed.dart index c07b83decc..32efccbd93 100644 --- a/packages/stream_chat/lib/open_api/model/notification_added_to_channel_event.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/notification_added_to_channel_event.freezed.dart @@ -22,10 +22,14 @@ mixin _$NotificationAddedToChannelEvent { String? get cid; DateTime get createdAt; Map get custom; + Map? get groupedUnreadChannels; ChannelMemberResponse get member; DateTime? get receivedAt; String? get team; + int? get totalUnreadCount; String get type; + int? get unreadChannels; + int? get unreadCount; /// Create a copy of NotificationAddedToChannelEvent /// with the given fields replaced by the non-null parameter values. @@ -56,10 +60,17 @@ mixin _$NotificationAddedToChannelEvent { (identical(other.cid, cid) || other.cid == cid) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && const DeepCollectionEquality().equals(other.custom, custom) && + const DeepCollectionEquality().equals( + other.groupedUnreadChannels, + groupedUnreadChannels, + ) && (identical(other.member, member) || other.member == member) && (identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt) && (identical(other.team, team) || other.team == team) && - (identical(other.type, type) || other.type == type)); + (identical(other.totalUnreadCount, totalUnreadCount) || other.totalUnreadCount == totalUnreadCount) && + (identical(other.type, type) || other.type == type) && + (identical(other.unreadChannels, unreadChannels) || other.unreadChannels == unreadChannels) && + (identical(other.unreadCount, unreadCount) || other.unreadCount == unreadCount)); } @override @@ -74,15 +85,19 @@ mixin _$NotificationAddedToChannelEvent { cid, createdAt, const DeepCollectionEquality().hash(custom), + const DeepCollectionEquality().hash(groupedUnreadChannels), member, receivedAt, team, + totalUnreadCount, type, + unreadChannels, + unreadCount, ); @override String toString() { - return 'NotificationAddedToChannelEvent(channel: $channel, channelCustom: $channelCustom, channelId: $channelId, channelMemberCount: $channelMemberCount, channelMessageCount: $channelMessageCount, channelType: $channelType, cid: $cid, createdAt: $createdAt, custom: $custom, member: $member, receivedAt: $receivedAt, team: $team, type: $type)'; + return 'NotificationAddedToChannelEvent(channel: $channel, channelCustom: $channelCustom, channelId: $channelId, channelMemberCount: $channelMemberCount, channelMessageCount: $channelMessageCount, channelType: $channelType, cid: $cid, createdAt: $createdAt, custom: $custom, groupedUnreadChannels: $groupedUnreadChannels, member: $member, receivedAt: $receivedAt, team: $team, totalUnreadCount: $totalUnreadCount, type: $type, unreadChannels: $unreadChannels, unreadCount: $unreadCount)'; } } @@ -103,10 +118,14 @@ abstract mixin class $NotificationAddedToChannelEventCopyWith<$Res> { String? cid, DateTime createdAt, Map custom, + Map? groupedUnreadChannels, ChannelMemberResponse member, DateTime? receivedAt, String? team, + int? totalUnreadCount, String type, + int? unreadChannels, + int? unreadCount, }); } @@ -131,10 +150,14 @@ class _$NotificationAddedToChannelEventCopyWithImpl<$Res> implements $Notificati Object? cid = freezed, Object? createdAt = null, Object? custom = null, + Object? groupedUnreadChannels = freezed, Object? member = null, Object? receivedAt = freezed, Object? team = freezed, + Object? totalUnreadCount = freezed, Object? type = null, + Object? unreadChannels = freezed, + Object? unreadCount = freezed, }) { return _then( NotificationAddedToChannelEvent( @@ -174,6 +197,10 @@ class _$NotificationAddedToChannelEventCopyWithImpl<$Res> implements $Notificati ? _self.custom : custom // ignore: cast_nullable_to_non_nullable as Map, + groupedUnreadChannels: freezed == groupedUnreadChannels + ? _self.groupedUnreadChannels + : groupedUnreadChannels // ignore: cast_nullable_to_non_nullable + as Map?, member: null == member ? _self.member : member // ignore: cast_nullable_to_non_nullable @@ -186,10 +213,22 @@ class _$NotificationAddedToChannelEventCopyWithImpl<$Res> implements $Notificati ? _self.team : team // ignore: cast_nullable_to_non_nullable as String?, + totalUnreadCount: freezed == totalUnreadCount + ? _self.totalUnreadCount + : totalUnreadCount // ignore: cast_nullable_to_non_nullable + as int?, type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as String, + unreadChannels: freezed == unreadChannels + ? _self.unreadChannels + : unreadChannels // ignore: cast_nullable_to_non_nullable + as int?, + unreadCount: freezed == unreadCount + ? _self.unreadCount + : unreadCount // ignore: cast_nullable_to_non_nullable + as int?, ), ); } diff --git a/packages/stream_chat/lib/open_api/model/notification_added_to_channel_event.g.dart b/packages/stream_chat/lib/open_api/model/notification_added_to_channel_event.g.dart index 1c9a55aca2..151d5de9af 100644 --- a/packages/stream_chat/lib/open_api/model/notification_added_to_channel_event.g.dart +++ b/packages/stream_chat/lib/open_api/model/notification_added_to_channel_event.g.dart @@ -20,6 +20,9 @@ NotificationAddedToChannelEvent _$NotificationAddedToChannelEventFromJson( json['created_at'] as Object, ), custom: json['custom'] as Map, + groupedUnreadChannels: (json['grouped_unread_channels'] as Map?)?.map( + (k, e) => MapEntry(k, (e as num).toInt()), + ), member: ChannelMemberResponse.fromJson( json['member'] as Map, ), @@ -28,7 +31,10 @@ NotificationAddedToChannelEvent _$NotificationAddedToChannelEventFromJson( const StreamDateTimeConverter().fromJson, ), team: json['team'] as String?, + totalUnreadCount: (json['total_unread_count'] as num?)?.toInt(), type: json['type'] as String, + unreadChannels: (json['unread_channels'] as num?)?.toInt(), + unreadCount: (json['unread_count'] as num?)?.toInt(), ); Map _$NotificationAddedToChannelEventToJson( @@ -43,13 +49,17 @@ Map _$NotificationAddedToChannelEventToJson( 'cid': instance.cid, 'created_at': const StreamDateTimeConverter().toJson(instance.createdAt), 'custom': instance.custom, + 'grouped_unread_channels': instance.groupedUnreadChannels, 'member': instance.member.toJson(), 'received_at': _$JsonConverterToJson( instance.receivedAt, const StreamDateTimeConverter().toJson, ), 'team': instance.team, + 'total_unread_count': instance.totalUnreadCount, 'type': instance.type, + 'unread_channels': instance.unreadChannels, + 'unread_count': instance.unreadCount, }; Value? _$JsonConverterFromJson( diff --git a/packages/stream_chat/lib/open_api/model/own_user_response.dart b/packages/stream_chat/lib/open_api/model/own_user_response.dart index 7469256304..b62b8d63b9 100644 --- a/packages/stream_chat/lib/open_api/model/own_user_response.dart +++ b/packages/stream_chat/lib/open_api/model/own_user_response.dart @@ -20,7 +20,7 @@ class OwnUserResponse with _$OwnUserResponse { const OwnUserResponse({ this.avgResponseTime, required this.banned, - this.blockedUserIds, + required this.blockedUserIds, required this.channelMutes, required this.createdAt, required this.custom, @@ -38,7 +38,6 @@ class OwnUserResponse with _$OwnUserResponse { required this.online, this.privacySettings, this.pushPreferences, - this.revokeTokensIssuedBefore, required this.role, required this.teams, this.teamsRole, @@ -60,7 +59,7 @@ class OwnUserResponse with _$OwnUserResponse { @override @JsonKey(name: 'blocked_user_ids') - final List? blockedUserIds; + final List blockedUserIds; @override @JsonKey(name: 'channel_mutes') @@ -134,11 +133,6 @@ class OwnUserResponse with _$OwnUserResponse { @JsonKey(name: 'push_preferences') final PushPreferencesResponse? pushPreferences; - @override - @StreamDateTimeConverter() - @JsonKey(name: 'revoke_tokens_issued_before') - final DateTime? revokeTokensIssuedBefore; - @override @JsonKey(name: 'role') final String role; diff --git a/packages/stream_chat/lib/open_api/model/own_user_response.freezed.dart b/packages/stream_chat/lib/open_api/model/own_user_response.freezed.dart index ab0a5a761a..6c45c7d199 100644 --- a/packages/stream_chat/lib/open_api/model/own_user_response.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/own_user_response.freezed.dart @@ -15,7 +15,7 @@ T _$identity(T value) => value; mixin _$OwnUserResponse { int? get avgResponseTime; bool get banned; - List? get blockedUserIds; + List get blockedUserIds; List get channelMutes; DateTime get createdAt; Map get custom; @@ -33,7 +33,6 @@ mixin _$OwnUserResponse { bool get online; PrivacySettingsResponse? get privacySettings; PushPreferencesResponse? get pushPreferences; - DateTime? get revokeTokensIssuedBefore; String get role; List get teams; Map? get teamsRole; @@ -87,11 +86,6 @@ mixin _$OwnUserResponse { (identical(other.online, online) || other.online == online) && (identical(other.privacySettings, privacySettings) || other.privacySettings == privacySettings) && (identical(other.pushPreferences, pushPreferences) || other.pushPreferences == pushPreferences) && - (identical( - other.revokeTokensIssuedBefore, - revokeTokensIssuedBefore, - ) || - other.revokeTokensIssuedBefore == revokeTokensIssuedBefore) && (identical(other.role, role) || other.role == role) && const DeepCollectionEquality().equals(other.teams, teams) && const DeepCollectionEquality().equals(other.teamsRole, teamsRole) && @@ -129,7 +123,6 @@ mixin _$OwnUserResponse { online, privacySettings, pushPreferences, - revokeTokensIssuedBefore, role, const DeepCollectionEquality().hash(teams), const DeepCollectionEquality().hash(teamsRole), @@ -143,7 +136,7 @@ mixin _$OwnUserResponse { @override String toString() { - return 'OwnUserResponse(avgResponseTime: $avgResponseTime, banned: $banned, blockedUserIds: $blockedUserIds, channelMutes: $channelMutes, createdAt: $createdAt, custom: $custom, deactivatedAt: $deactivatedAt, deletedAt: $deletedAt, devices: $devices, id: $id, image: $image, invisible: $invisible, language: $language, lastActive: $lastActive, latestHiddenChannels: $latestHiddenChannels, mutes: $mutes, name: $name, online: $online, privacySettings: $privacySettings, pushPreferences: $pushPreferences, revokeTokensIssuedBefore: $revokeTokensIssuedBefore, role: $role, teams: $teams, teamsRole: $teamsRole, totalUnreadCount: $totalUnreadCount, totalUnreadCountByTeam: $totalUnreadCountByTeam, unreadChannels: $unreadChannels, unreadCount: $unreadCount, unreadThreads: $unreadThreads, updatedAt: $updatedAt)'; + return 'OwnUserResponse(avgResponseTime: $avgResponseTime, banned: $banned, blockedUserIds: $blockedUserIds, channelMutes: $channelMutes, createdAt: $createdAt, custom: $custom, deactivatedAt: $deactivatedAt, deletedAt: $deletedAt, devices: $devices, id: $id, image: $image, invisible: $invisible, language: $language, lastActive: $lastActive, latestHiddenChannels: $latestHiddenChannels, mutes: $mutes, name: $name, online: $online, privacySettings: $privacySettings, pushPreferences: $pushPreferences, role: $role, teams: $teams, teamsRole: $teamsRole, totalUnreadCount: $totalUnreadCount, totalUnreadCountByTeam: $totalUnreadCountByTeam, unreadChannels: $unreadChannels, unreadCount: $unreadCount, unreadThreads: $unreadThreads, updatedAt: $updatedAt)'; } } @@ -157,7 +150,7 @@ abstract mixin class $OwnUserResponseCopyWith<$Res> { $Res call({ int? avgResponseTime, bool banned, - List? blockedUserIds, + List blockedUserIds, List channelMutes, DateTime createdAt, Map custom, @@ -175,7 +168,6 @@ abstract mixin class $OwnUserResponseCopyWith<$Res> { bool online, PrivacySettingsResponse? privacySettings, PushPreferencesResponse? pushPreferences, - DateTime? revokeTokensIssuedBefore, String role, List teams, Map? teamsRole, @@ -202,7 +194,7 @@ class _$OwnUserResponseCopyWithImpl<$Res> implements $OwnUserResponseCopyWith<$R $Res call({ Object? avgResponseTime = freezed, Object? banned = null, - Object? blockedUserIds = freezed, + Object? blockedUserIds = null, Object? channelMutes = null, Object? createdAt = null, Object? custom = null, @@ -220,7 +212,6 @@ class _$OwnUserResponseCopyWithImpl<$Res> implements $OwnUserResponseCopyWith<$R Object? online = null, Object? privacySettings = freezed, Object? pushPreferences = freezed, - Object? revokeTokensIssuedBefore = freezed, Object? role = null, Object? teams = null, Object? teamsRole = freezed, @@ -241,10 +232,10 @@ class _$OwnUserResponseCopyWithImpl<$Res> implements $OwnUserResponseCopyWith<$R ? _self.banned : banned // ignore: cast_nullable_to_non_nullable as bool, - blockedUserIds: freezed == blockedUserIds + blockedUserIds: null == blockedUserIds ? _self.blockedUserIds : blockedUserIds // ignore: cast_nullable_to_non_nullable - as List?, + as List, channelMutes: null == channelMutes ? _self.channelMutes : channelMutes // ignore: cast_nullable_to_non_nullable @@ -313,10 +304,6 @@ class _$OwnUserResponseCopyWithImpl<$Res> implements $OwnUserResponseCopyWith<$R ? _self.pushPreferences : pushPreferences // ignore: cast_nullable_to_non_nullable as PushPreferencesResponse?, - revokeTokensIssuedBefore: freezed == revokeTokensIssuedBefore - ? _self.revokeTokensIssuedBefore - : revokeTokensIssuedBefore // ignore: cast_nullable_to_non_nullable - as DateTime?, role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/own_user_response.g.dart b/packages/stream_chat/lib/open_api/model/own_user_response.g.dart index 4f00112a60..044edc5add 100644 --- a/packages/stream_chat/lib/open_api/model/own_user_response.g.dart +++ b/packages/stream_chat/lib/open_api/model/own_user_response.g.dart @@ -9,7 +9,7 @@ part of 'own_user_response.dart'; OwnUserResponse _$OwnUserResponseFromJson(Map json) => OwnUserResponse( avgResponseTime: (json['avg_response_time'] as num?)?.toInt(), banned: json['banned'] as bool, - blockedUserIds: (json['blocked_user_ids'] as List?)?.map((e) => e as String).toList(), + blockedUserIds: (json['blocked_user_ids'] as List).map((e) => e as String).toList(), channelMutes: (json['channel_mutes'] as List) .map((e) => ChannelMute.fromJson(e as Map)) .toList(), @@ -48,10 +48,6 @@ OwnUserResponse _$OwnUserResponseFromJson(Map json) => OwnUserR : PushPreferencesResponse.fromJson( json['push_preferences'] as Map, ), - revokeTokensIssuedBefore: _$JsonConverterFromJson( - json['revoke_tokens_issued_before'], - const StreamDateTimeConverter().fromJson, - ), role: json['role'] as String, teams: (json['teams'] as List).map((e) => e as String).toList(), teamsRole: (json['teams_role'] as Map?)?.map( @@ -99,10 +95,6 @@ Map _$OwnUserResponseToJson(OwnUserResponse instance) => ( - instance.revokeTokensIssuedBefore, - const StreamDateTimeConverter().toJson, - ), 'role': instance.role, 'teams': instance.teams, 'teams_role': instance.teamsRole, diff --git a/packages/stream_chat/lib/open_api/model/pager_defaults.dart b/packages/stream_chat/lib/open_api/model/pager_defaults.dart new file mode 100644 index 0000000000..9a8b4cdd39 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/pager_defaults.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, sort_constructors_first, provide_deprecation_message + +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 'pager_defaults.g.dart'; +part 'pager_defaults.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class PagerDefaults with _$PagerDefaults { + const PagerDefaults({ + required this.limit, + }); + + @override + @JsonKey(name: 'limit') + final int limit; + + Map toJson() => _$PagerDefaultsToJson(this); + + static PagerDefaults fromJson(Map json) => _$PagerDefaultsFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/pager_defaults.freezed.dart b/packages/stream_chat/lib/open_api/model/pager_defaults.freezed.dart new file mode 100644 index 0000000000..2eb1551d3e --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/pager_defaults.freezed.dart @@ -0,0 +1,75 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'pager_defaults.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$PagerDefaults { + int get limit; + + /// Create a copy of PagerDefaults + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $PagerDefaultsCopyWith get copyWith => _$PagerDefaultsCopyWithImpl( + this as PagerDefaults, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is PagerDefaults && + (identical(other.limit, limit) || other.limit == limit)); + } + + @override + int get hashCode => Object.hash(runtimeType, limit); + + @override + String toString() { + return 'PagerDefaults(limit: $limit)'; + } +} + +/// @nodoc +abstract mixin class $PagerDefaultsCopyWith<$Res> { + factory $PagerDefaultsCopyWith( + PagerDefaults value, + $Res Function(PagerDefaults) _then, + ) = _$PagerDefaultsCopyWithImpl; + @useResult + $Res call({int limit}); +} + +/// @nodoc +class _$PagerDefaultsCopyWithImpl<$Res> implements $PagerDefaultsCopyWith<$Res> { + _$PagerDefaultsCopyWithImpl(this._self, this._then); + + final PagerDefaults _self; + final $Res Function(PagerDefaults) _then; + + /// Create a copy of PagerDefaults + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({Object? limit = null}) { + return _then( + PagerDefaults( + limit: null == limit + ? _self.limit + : limit // ignore: cast_nullable_to_non_nullable + as int, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/pager_defaults.g.dart b/packages/stream_chat/lib/open_api/model/pager_defaults.g.dart new file mode 100644 index 0000000000..095e9eae62 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/pager_defaults.g.dart @@ -0,0 +1,12 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'pager_defaults.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PagerDefaults _$PagerDefaultsFromJson(Map json) => + PagerDefaults(limit: (json['limit'] as num).toInt()); + +Map _$PagerDefaultsToJson(PagerDefaults instance) => {'limit': instance.limit}; diff --git a/packages/stream_chat/lib/open_api/model/query_channel_bans_request.dart b/packages/stream_chat/lib/open_api/model/query_channel_bans_request.dart new file mode 100644 index 0000000000..498fbb263e --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/query_channel_bans_request.dart @@ -0,0 +1,56 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'query_channel_bans_request.g.dart'; +part 'query_channel_bans_request.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class QueryChannelBansRequest with _$QueryChannelBansRequest { + const QueryChannelBansRequest({ + this.excludeExpiredBans, + this.filterConditions, + this.includeTotal, + this.limit, + this.next, + this.prev, + }); + + @override + @JsonKey(name: 'exclude_expired_bans') + final bool? excludeExpiredBans; + + @override + @JsonKey(name: 'filter_conditions') + final Map? filterConditions; + + @override + @JsonKey(name: 'include_total') + final bool? includeTotal; + + @override + @JsonKey(name: 'limit') + final int? limit; + + @override + @JsonKey(name: 'next') + final String? next; + + @override + @JsonKey(name: 'prev') + final String? prev; + + Map toJson() => _$QueryChannelBansRequestToJson(this); + + static QueryChannelBansRequest fromJson(Map json) => _$QueryChannelBansRequestFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/query_channel_bans_request.freezed.dart b/packages/stream_chat/lib/open_api/model/query_channel_bans_request.freezed.dart new file mode 100644 index 0000000000..2afa73616c --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/query_channel_bans_request.freezed.dart @@ -0,0 +1,132 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'query_channel_bans_request.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$QueryChannelBansRequest { + bool? get excludeExpiredBans; + Map? get filterConditions; + bool? get includeTotal; + int? get limit; + String? get next; + String? get prev; + + /// Create a copy of QueryChannelBansRequest + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $QueryChannelBansRequestCopyWith get copyWith => + _$QueryChannelBansRequestCopyWithImpl( + this as QueryChannelBansRequest, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is QueryChannelBansRequest && + (identical(other.excludeExpiredBans, excludeExpiredBans) || + other.excludeExpiredBans == excludeExpiredBans) && + const DeepCollectionEquality().equals( + other.filterConditions, + filterConditions, + ) && + (identical(other.includeTotal, includeTotal) || other.includeTotal == includeTotal) && + (identical(other.limit, limit) || other.limit == limit) && + (identical(other.next, next) || other.next == next) && + (identical(other.prev, prev) || other.prev == prev)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + excludeExpiredBans, + const DeepCollectionEquality().hash(filterConditions), + includeTotal, + limit, + next, + prev, + ); + + @override + String toString() { + return 'QueryChannelBansRequest(excludeExpiredBans: $excludeExpiredBans, filterConditions: $filterConditions, includeTotal: $includeTotal, limit: $limit, next: $next, prev: $prev)'; + } +} + +/// @nodoc +abstract mixin class $QueryChannelBansRequestCopyWith<$Res> { + factory $QueryChannelBansRequestCopyWith( + QueryChannelBansRequest value, + $Res Function(QueryChannelBansRequest) _then, + ) = _$QueryChannelBansRequestCopyWithImpl; + @useResult + $Res call({ + bool? excludeExpiredBans, + Map? filterConditions, + bool? includeTotal, + int? limit, + String? next, + String? prev, + }); +} + +/// @nodoc +class _$QueryChannelBansRequestCopyWithImpl<$Res> implements $QueryChannelBansRequestCopyWith<$Res> { + _$QueryChannelBansRequestCopyWithImpl(this._self, this._then); + + final QueryChannelBansRequest _self; + final $Res Function(QueryChannelBansRequest) _then; + + /// Create a copy of QueryChannelBansRequest + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? excludeExpiredBans = freezed, + Object? filterConditions = freezed, + Object? includeTotal = freezed, + Object? limit = freezed, + Object? next = freezed, + Object? prev = freezed, + }) { + return _then( + QueryChannelBansRequest( + excludeExpiredBans: freezed == excludeExpiredBans + ? _self.excludeExpiredBans + : excludeExpiredBans // ignore: cast_nullable_to_non_nullable + as bool?, + filterConditions: freezed == filterConditions + ? _self.filterConditions + : filterConditions // ignore: cast_nullable_to_non_nullable + as Map?, + includeTotal: freezed == includeTotal + ? _self.includeTotal + : includeTotal // ignore: cast_nullable_to_non_nullable + as bool?, + limit: freezed == limit + ? _self.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + next: freezed == next + ? _self.next + : next // ignore: cast_nullable_to_non_nullable + as String?, + prev: freezed == prev + ? _self.prev + : prev // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/query_channel_bans_request.g.dart b/packages/stream_chat/lib/open_api/model/query_channel_bans_request.g.dart new file mode 100644 index 0000000000..db914cc004 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/query_channel_bans_request.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'query_channel_bans_request.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +QueryChannelBansRequest _$QueryChannelBansRequestFromJson( + Map json, +) => QueryChannelBansRequest( + excludeExpiredBans: json['exclude_expired_bans'] as bool?, + filterConditions: json['filter_conditions'] as Map?, + includeTotal: json['include_total'] as bool?, + limit: (json['limit'] as num?)?.toInt(), + next: json['next'] as String?, + prev: json['prev'] as String?, +); + +Map _$QueryChannelBansRequestToJson( + QueryChannelBansRequest instance, +) => { + 'exclude_expired_bans': instance.excludeExpiredBans, + 'filter_conditions': instance.filterConditions, + 'include_total': instance.includeTotal, + 'limit': instance.limit, + 'next': instance.next, + 'prev': instance.prev, +}; diff --git a/packages/stream_chat/lib/open_api/model/query_channel_bans_response.dart b/packages/stream_chat/lib/open_api/model/query_channel_bans_response.dart new file mode 100644 index 0000000000..fcd85df4f6 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/query_channel_bans_response.dart @@ -0,0 +1,56 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'query_channel_bans_response.g.dart'; +part 'query_channel_bans_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class QueryChannelBansResponse with _$QueryChannelBansResponse { + const QueryChannelBansResponse({ + required this.bans, + required this.duration, + this.next, + this.prev, + this.total, + this.totalByScope, + }); + + @override + @JsonKey(name: 'bans') + final List bans; + + @override + @JsonKey(name: 'duration') + final String duration; + + @override + @JsonKey(name: 'next') + final String? next; + + @override + @JsonKey(name: 'prev') + final String? prev; + + @override + @JsonKey(name: 'total') + final int? total; + + @override + @JsonKey(name: 'total_by_scope') + final ChannelBansScopeTotals? totalByScope; + + Map toJson() => _$QueryChannelBansResponseToJson(this); + + static QueryChannelBansResponse fromJson(Map json) => _$QueryChannelBansResponseFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/query_channel_bans_response.freezed.dart b/packages/stream_chat/lib/open_api/model/query_channel_bans_response.freezed.dart new file mode 100644 index 0000000000..c99dc2747e --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/query_channel_bans_response.freezed.dart @@ -0,0 +1,128 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'query_channel_bans_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$QueryChannelBansResponse { + List get bans; + String get duration; + String? get next; + String? get prev; + int? get total; + ChannelBansScopeTotals? get totalByScope; + + /// Create a copy of QueryChannelBansResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $QueryChannelBansResponseCopyWith get copyWith => + _$QueryChannelBansResponseCopyWithImpl( + this as QueryChannelBansResponse, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is QueryChannelBansResponse && + const DeepCollectionEquality().equals(other.bans, bans) && + (identical(other.duration, duration) || other.duration == duration) && + (identical(other.next, next) || other.next == next) && + (identical(other.prev, prev) || other.prev == prev) && + (identical(other.total, total) || other.total == total) && + (identical(other.totalByScope, totalByScope) || other.totalByScope == totalByScope)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(bans), + duration, + next, + prev, + total, + totalByScope, + ); + + @override + String toString() { + return 'QueryChannelBansResponse(bans: $bans, duration: $duration, next: $next, prev: $prev, total: $total, totalByScope: $totalByScope)'; + } +} + +/// @nodoc +abstract mixin class $QueryChannelBansResponseCopyWith<$Res> { + factory $QueryChannelBansResponseCopyWith( + QueryChannelBansResponse value, + $Res Function(QueryChannelBansResponse) _then, + ) = _$QueryChannelBansResponseCopyWithImpl; + @useResult + $Res call({ + List bans, + String duration, + String? next, + String? prev, + int? total, + ChannelBansScopeTotals? totalByScope, + }); +} + +/// @nodoc +class _$QueryChannelBansResponseCopyWithImpl<$Res> implements $QueryChannelBansResponseCopyWith<$Res> { + _$QueryChannelBansResponseCopyWithImpl(this._self, this._then); + + final QueryChannelBansResponse _self; + final $Res Function(QueryChannelBansResponse) _then; + + /// Create a copy of QueryChannelBansResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? bans = null, + Object? duration = null, + Object? next = freezed, + Object? prev = freezed, + Object? total = freezed, + Object? totalByScope = freezed, + }) { + return _then( + QueryChannelBansResponse( + bans: null == bans + ? _self.bans + : bans // ignore: cast_nullable_to_non_nullable + as List, + duration: null == duration + ? _self.duration + : duration // ignore: cast_nullable_to_non_nullable + as String, + next: freezed == next + ? _self.next + : next // ignore: cast_nullable_to_non_nullable + as String?, + prev: freezed == prev + ? _self.prev + : prev // ignore: cast_nullable_to_non_nullable + as String?, + total: freezed == total + ? _self.total + : total // ignore: cast_nullable_to_non_nullable + as int?, + totalByScope: freezed == totalByScope + ? _self.totalByScope + : totalByScope // ignore: cast_nullable_to_non_nullable + as ChannelBansScopeTotals?, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/query_channel_bans_response.g.dart b/packages/stream_chat/lib/open_api/model/query_channel_bans_response.g.dart new file mode 100644 index 0000000000..489b86f0af --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/query_channel_bans_response.g.dart @@ -0,0 +1,33 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'query_channel_bans_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +QueryChannelBansResponse _$QueryChannelBansResponseFromJson( + Map json, +) => QueryChannelBansResponse( + bans: (json['bans'] as List).map((e) => ChannelBanResponse.fromJson(e as Map)).toList(), + duration: json['duration'] as String, + next: json['next'] as String?, + prev: json['prev'] as String?, + total: (json['total'] as num?)?.toInt(), + totalByScope: json['total_by_scope'] == null + ? null + : ChannelBansScopeTotals.fromJson( + json['total_by_scope'] as Map, + ), +); + +Map _$QueryChannelBansResponseToJson( + QueryChannelBansResponse instance, +) => { + 'bans': instance.bans.map((e) => e.toJson()).toList(), + 'duration': instance.duration, + 'next': instance.next, + 'prev': instance.prev, + 'total': instance.total, + 'total_by_scope': instance.totalByScope?.toJson(), +}; diff --git a/packages/stream_chat/lib/open_api/model/query_channels_defaults.dart b/packages/stream_chat/lib/open_api/model/query_channels_defaults.dart new file mode 100644 index 0000000000..1df499cbe9 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/query_channels_defaults.dart @@ -0,0 +1,46 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'query_channels_defaults.g.dart'; +part 'query_channels_defaults.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class QueryChannelsDefaults with _$QueryChannelsDefaults { + const QueryChannelsDefaults({ + required this.limit, + required this.maxLimit, + required this.memberLimit, + required this.messageLimit, + }); + + @override + @JsonKey(name: 'limit') + final int limit; + + @override + @JsonKey(name: 'max_limit') + final int maxLimit; + + @override + @JsonKey(name: 'member_limit') + final int memberLimit; + + @override + @JsonKey(name: 'message_limit') + final int messageLimit; + + Map toJson() => _$QueryChannelsDefaultsToJson(this); + + static QueryChannelsDefaults fromJson(Map json) => _$QueryChannelsDefaultsFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/query_channels_defaults.freezed.dart b/packages/stream_chat/lib/open_api/model/query_channels_defaults.freezed.dart new file mode 100644 index 0000000000..cb1f8a1d7e --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/query_channels_defaults.freezed.dart @@ -0,0 +1,99 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'query_channels_defaults.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$QueryChannelsDefaults { + int get limit; + int get maxLimit; + int get memberLimit; + int get messageLimit; + + /// Create a copy of QueryChannelsDefaults + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $QueryChannelsDefaultsCopyWith get copyWith => + _$QueryChannelsDefaultsCopyWithImpl( + this as QueryChannelsDefaults, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is QueryChannelsDefaults && + (identical(other.limit, limit) || other.limit == limit) && + (identical(other.maxLimit, maxLimit) || other.maxLimit == maxLimit) && + (identical(other.memberLimit, memberLimit) || other.memberLimit == memberLimit) && + (identical(other.messageLimit, messageLimit) || other.messageLimit == messageLimit)); + } + + @override + int get hashCode => Object.hash(runtimeType, limit, maxLimit, memberLimit, messageLimit); + + @override + String toString() { + return 'QueryChannelsDefaults(limit: $limit, maxLimit: $maxLimit, memberLimit: $memberLimit, messageLimit: $messageLimit)'; + } +} + +/// @nodoc +abstract mixin class $QueryChannelsDefaultsCopyWith<$Res> { + factory $QueryChannelsDefaultsCopyWith( + QueryChannelsDefaults value, + $Res Function(QueryChannelsDefaults) _then, + ) = _$QueryChannelsDefaultsCopyWithImpl; + @useResult + $Res call({int limit, int maxLimit, int memberLimit, int messageLimit}); +} + +/// @nodoc +class _$QueryChannelsDefaultsCopyWithImpl<$Res> implements $QueryChannelsDefaultsCopyWith<$Res> { + _$QueryChannelsDefaultsCopyWithImpl(this._self, this._then); + + final QueryChannelsDefaults _self; + final $Res Function(QueryChannelsDefaults) _then; + + /// Create a copy of QueryChannelsDefaults + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? limit = null, + Object? maxLimit = null, + Object? memberLimit = null, + Object? messageLimit = null, + }) { + return _then( + QueryChannelsDefaults( + limit: null == limit + ? _self.limit + : limit // ignore: cast_nullable_to_non_nullable + as int, + maxLimit: null == maxLimit + ? _self.maxLimit + : maxLimit // ignore: cast_nullable_to_non_nullable + as int, + memberLimit: null == memberLimit + ? _self.memberLimit + : memberLimit // ignore: cast_nullable_to_non_nullable + as int, + messageLimit: null == messageLimit + ? _self.messageLimit + : messageLimit // ignore: cast_nullable_to_non_nullable + as int, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/query_channels_defaults.g.dart b/packages/stream_chat/lib/open_api/model/query_channels_defaults.g.dart new file mode 100644 index 0000000000..4284861d3d --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/query_channels_defaults.g.dart @@ -0,0 +1,25 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'query_channels_defaults.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +QueryChannelsDefaults _$QueryChannelsDefaultsFromJson( + Map json, +) => QueryChannelsDefaults( + limit: (json['limit'] as num).toInt(), + maxLimit: (json['max_limit'] as num).toInt(), + memberLimit: (json['member_limit'] as num).toInt(), + messageLimit: (json['message_limit'] as num).toInt(), +); + +Map _$QueryChannelsDefaultsToJson( + QueryChannelsDefaults instance, +) => { + 'limit': instance.limit, + 'max_limit': instance.maxLimit, + 'member_limit': instance.memberLimit, + 'message_limit': instance.messageLimit, +}; diff --git a/packages/stream_chat/lib/open_api/model/review_queue_item_response.dart b/packages/stream_chat/lib/open_api/model/review_queue_item_response.dart index 79544a0dc4..d77ec33b59 100644 --- a/packages/stream_chat/lib/open_api/model/review_queue_item_response.dart +++ b/packages/stream_chat/lib/open_api/model/review_queue_item_response.dart @@ -28,6 +28,7 @@ class ReviewQueueItemResponse with _$ReviewQueueItemResponse { this.completedAt, this.confidenceScore, this.configKey, + this.countryCode, required this.createdAt, this.entityCreator, this.entityCreatorId, @@ -48,6 +49,7 @@ class ReviewQueueItemResponse with _$ReviewQueueItemResponse { required this.latestModeratorAction, this.message, this.moderationPayload, + this.poll, this.reaction, required this.recommendedAction, this.reviewedAt, @@ -99,6 +101,10 @@ class ReviewQueueItemResponse with _$ReviewQueueItemResponse { @JsonKey(name: 'config_key') final String? configKey; + @override + @JsonKey(name: 'country_code') + final String? countryCode; + @override @StreamDateTimeConverter() @JsonKey(name: 'created_at') @@ -181,6 +187,10 @@ class ReviewQueueItemResponse with _$ReviewQueueItemResponse { @JsonKey(name: 'moderation_payload') final ModerationPayloadResponse? moderationPayload; + @override + @JsonKey(name: 'poll') + final PollResponseData? poll; + @override @JsonKey(name: 'reaction') final Reaction? reaction; diff --git a/packages/stream_chat/lib/open_api/model/review_queue_item_response.freezed.dart b/packages/stream_chat/lib/open_api/model/review_queue_item_response.freezed.dart index 397f1d5c8d..c3d57bea46 100644 --- a/packages/stream_chat/lib/open_api/model/review_queue_item_response.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/review_queue_item_response.freezed.dart @@ -23,6 +23,7 @@ mixin _$ReviewQueueItemResponse { DateTime? get completedAt; double? get confidenceScore; String? get configKey; + String? get countryCode; DateTime get createdAt; EntityCreatorResponse? get entityCreator; String? get entityCreatorId; @@ -43,6 +44,7 @@ mixin _$ReviewQueueItemResponse { String get latestModeratorAction; ChatMessageResponse? get message; ModerationPayloadResponse? get moderationPayload; + PollResponseData? get poll; Reaction? get reaction; String get recommendedAction; DateTime? get reviewedAt; @@ -77,6 +79,7 @@ mixin _$ReviewQueueItemResponse { (identical(other.completedAt, completedAt) || other.completedAt == completedAt) && (identical(other.confidenceScore, confidenceScore) || other.confidenceScore == confidenceScore) && (identical(other.configKey, configKey) || other.configKey == configKey) && + (identical(other.countryCode, countryCode) || other.countryCode == countryCode) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && (identical(other.entityCreator, entityCreator) || other.entityCreator == entityCreator) && (identical(other.entityCreatorId, entityCreatorId) || other.entityCreatorId == entityCreatorId) && @@ -99,6 +102,7 @@ mixin _$ReviewQueueItemResponse { other.latestModeratorAction == latestModeratorAction) && (identical(other.message, message) || other.message == message) && (identical(other.moderationPayload, moderationPayload) || other.moderationPayload == moderationPayload) && + (identical(other.poll, poll) || other.poll == poll) && (identical(other.reaction, reaction) || other.reaction == reaction) && (identical(other.recommendedAction, recommendedAction) || other.recommendedAction == recommendedAction) && (identical(other.reviewedAt, reviewedAt) || other.reviewedAt == reviewedAt) && @@ -122,6 +126,7 @@ mixin _$ReviewQueueItemResponse { completedAt, confidenceScore, configKey, + countryCode, createdAt, entityCreator, entityCreatorId, @@ -142,6 +147,7 @@ mixin _$ReviewQueueItemResponse { latestModeratorAction, message, moderationPayload, + poll, reaction, recommendedAction, reviewedAt, @@ -154,7 +160,7 @@ mixin _$ReviewQueueItemResponse { @override String toString() { - return 'ReviewQueueItemResponse(actions: $actions, activity: $activity, aiTextSeverity: $aiTextSeverity, appeal: $appeal, assignedTo: $assignedTo, bans: $bans, call: $call, completedAt: $completedAt, confidenceScore: $confidenceScore, configKey: $configKey, createdAt: $createdAt, entityCreator: $entityCreator, entityCreatorId: $entityCreatorId, entityId: $entityId, entityType: $entityType, escalated: $escalated, escalatedAt: $escalatedAt, escalatedBy: $escalatedBy, escalationMetadata: $escalationMetadata, 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)'; + return 'ReviewQueueItemResponse(actions: $actions, activity: $activity, aiTextSeverity: $aiTextSeverity, appeal: $appeal, assignedTo: $assignedTo, bans: $bans, call: $call, completedAt: $completedAt, confidenceScore: $confidenceScore, configKey: $configKey, countryCode: $countryCode, createdAt: $createdAt, entityCreator: $entityCreator, entityCreatorId: $entityCreatorId, entityId: $entityId, entityType: $entityType, escalated: $escalated, escalatedAt: $escalatedAt, escalatedBy: $escalatedBy, escalationMetadata: $escalationMetadata, feedsV2Activity: $feedsV2Activity, feedsV2Reaction: $feedsV2Reaction, feedsV3Activity: $feedsV3Activity, feedsV3Comment: $feedsV3Comment, flags: $flags, flagsCount: $flagsCount, id: $id, languages: $languages, latestModeratorAction: $latestModeratorAction, message: $message, moderationPayload: $moderationPayload, poll: $poll, reaction: $reaction, recommendedAction: $recommendedAction, reviewedAt: $reviewedAt, reviewedBy: $reviewedBy, severity: $severity, status: $status, teams: $teams, updatedAt: $updatedAt)'; } } @@ -176,6 +182,7 @@ abstract mixin class $ReviewQueueItemResponseCopyWith<$Res> { DateTime? completedAt, double? confidenceScore, String? configKey, + String? countryCode, DateTime createdAt, EntityCreatorResponse? entityCreator, String? entityCreatorId, @@ -196,6 +203,7 @@ abstract mixin class $ReviewQueueItemResponseCopyWith<$Res> { String latestModeratorAction, ChatMessageResponse? message, ModerationPayloadResponse? moderationPayload, + PollResponseData? poll, Reaction? reaction, String recommendedAction, DateTime? reviewedAt, @@ -229,6 +237,7 @@ class _$ReviewQueueItemResponseCopyWithImpl<$Res> implements $ReviewQueueItemRes Object? completedAt = freezed, Object? confidenceScore = freezed, Object? configKey = freezed, + Object? countryCode = freezed, Object? createdAt = null, Object? entityCreator = freezed, Object? entityCreatorId = freezed, @@ -249,6 +258,7 @@ class _$ReviewQueueItemResponseCopyWithImpl<$Res> implements $ReviewQueueItemRes Object? latestModeratorAction = null, Object? message = freezed, Object? moderationPayload = freezed, + Object? poll = freezed, Object? reaction = freezed, Object? recommendedAction = null, Object? reviewedAt = freezed, @@ -300,6 +310,10 @@ class _$ReviewQueueItemResponseCopyWithImpl<$Res> implements $ReviewQueueItemRes ? _self.configKey : configKey // ignore: cast_nullable_to_non_nullable as String?, + countryCode: freezed == countryCode + ? _self.countryCode + : countryCode // ignore: cast_nullable_to_non_nullable + as String?, createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable @@ -380,6 +394,10 @@ class _$ReviewQueueItemResponseCopyWithImpl<$Res> implements $ReviewQueueItemRes ? _self.moderationPayload : moderationPayload // ignore: cast_nullable_to_non_nullable as ModerationPayloadResponse?, + poll: freezed == poll + ? _self.poll + : poll // ignore: cast_nullable_to_non_nullable + as PollResponseData?, reaction: freezed == reaction ? _self.reaction : reaction // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/review_queue_item_response.g.dart b/packages/stream_chat/lib/open_api/model/review_queue_item_response.g.dart index e041dce1ad..4a28d1f58e 100644 --- a/packages/stream_chat/lib/open_api/model/review_queue_item_response.g.dart +++ b/packages/stream_chat/lib/open_api/model/review_queue_item_response.g.dart @@ -24,6 +24,7 @@ ReviewQueueItemResponse _$ReviewQueueItemResponseFromJson( ), confidenceScore: (json['confidence_score'] as num?)?.toDouble(), configKey: json['config_key'] as String?, + countryCode: json['country_code'] as String?, createdAt: const StreamDateTimeConverter().fromJson( json['created_at'] as Object, ), @@ -77,6 +78,7 @@ ReviewQueueItemResponse _$ReviewQueueItemResponseFromJson( : ModerationPayloadResponse.fromJson( json['moderation_payload'] as Map, ), + poll: json['poll'] == null ? null : PollResponseData.fromJson(json['poll'] as Map), reaction: json['reaction'] == null ? null : Reaction.fromJson(json['reaction'] as Map), recommendedAction: json['recommended_action'] as String, reviewedAt: _$JsonConverterFromJson( @@ -108,6 +110,7 @@ Map _$ReviewQueueItemResponseToJson( ), 'confidence_score': instance.confidenceScore, 'config_key': instance.configKey, + 'country_code': instance.countryCode, 'created_at': const StreamDateTimeConverter().toJson(instance.createdAt), 'entity_creator': instance.entityCreator?.toJson(), 'entity_creator_id': instance.entityCreatorId, @@ -131,6 +134,7 @@ Map _$ReviewQueueItemResponseToJson( 'latest_moderator_action': instance.latestModeratorAction, 'message': instance.message?.toJson(), 'moderation_payload': instance.moderationPayload?.toJson(), + 'poll': instance.poll?.toJson(), 'reaction': instance.reaction?.toJson(), 'recommended_action': instance.recommendedAction, 'reviewed_at': _$JsonConverterToJson( diff --git a/packages/stream_chat/lib/open_api/model/rule_builder_condition.dart b/packages/stream_chat/lib/open_api/model/rule_builder_condition.dart index d78a72b7e2..3ed86da1dd 100644 --- a/packages/stream_chat/lib/open_api/model/rule_builder_condition.dart +++ b/packages/stream_chat/lib/open_api/model/rule_builder_condition.dart @@ -25,6 +25,7 @@ class RuleBuilderCondition with _$RuleBuilderCondition { this.closedCaptionRuleParams, this.confidence, this.contentCountRuleParams, + this.contentCountryCodeParams, this.contentCustomPropertyCountParams, this.contentCustomPropertyParams, this.contentFlagCountRuleParams, @@ -32,6 +33,7 @@ class RuleBuilderCondition with _$RuleBuilderCondition { this.floodSimilarParams, this.imageContentParams, this.imageRuleParams, + this.intentRuleParams, this.ipContentCountRuleParams, this.ipFlagCountRuleParams, this.keyframeOcrRuleParams, @@ -40,6 +42,7 @@ class RuleBuilderCondition with _$RuleBuilderCondition { this.textContentParams, this.textRuleParams, this.type, + this.userChannelBanCountParams, this.userChannelCountParams, this.userCreatedWithinParams, this.userCustomPropertyParams, @@ -81,6 +84,10 @@ class RuleBuilderCondition with _$RuleBuilderCondition { @JsonKey(name: 'content_count_rule_params') final ContentCountRuleParameters? contentCountRuleParams; + @override + @JsonKey(name: 'content_country_code_params') + final ContentCountryCodeParameters? contentCountryCodeParams; + @override @JsonKey(name: 'content_custom_property_count_params') final ContentCustomPropertyCountParameters? contentCustomPropertyCountParams; @@ -109,6 +116,10 @@ class RuleBuilderCondition with _$RuleBuilderCondition { @JsonKey(name: 'image_rule_params') final ImageRuleParameters? imageRuleParams; + @override + @JsonKey(name: 'intent_rule_params') + final IntentRuleParameters? intentRuleParams; + @override @JsonKey(name: 'ip_content_count_rule_params') final IPContentCountRuleParameters? ipContentCountRuleParams; @@ -141,6 +152,10 @@ class RuleBuilderCondition with _$RuleBuilderCondition { @JsonKey(name: 'type') final String? type; + @override + @JsonKey(name: 'user_channel_ban_count_params') + final UserChannelBanCountRuleParameters? userChannelBanCountParams; + @override @JsonKey(name: 'user_channel_count_params') final UserChannelCountRuleParameters? userChannelCountParams; diff --git a/packages/stream_chat/lib/open_api/model/rule_builder_condition.freezed.dart b/packages/stream_chat/lib/open_api/model/rule_builder_condition.freezed.dart index 76d55e46e5..66c99076ad 100644 --- a/packages/stream_chat/lib/open_api/model/rule_builder_condition.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/rule_builder_condition.freezed.dart @@ -20,6 +20,7 @@ mixin _$RuleBuilderCondition { ClosedCaptionRuleParameters? get closedCaptionRuleParams; double? get confidence; ContentCountRuleParameters? get contentCountRuleParams; + ContentCountryCodeParameters? get contentCountryCodeParams; ContentCustomPropertyCountParameters? get contentCustomPropertyCountParams; ContentCustomPropertyParameters? get contentCustomPropertyParams; FlagCountRuleParameters? get contentFlagCountRuleParams; @@ -27,6 +28,7 @@ mixin _$RuleBuilderCondition { FloodSimilarRuleParameters? get floodSimilarParams; ImageContentParameters? get imageContentParams; ImageRuleParameters? get imageRuleParams; + IntentRuleParameters? get intentRuleParams; IPContentCountRuleParameters? get ipContentCountRuleParams; IPFlagCountRuleParameters? get ipFlagCountRuleParams; KeyframeOCRRuleParameters? get keyframeOcrRuleParams; @@ -35,6 +37,7 @@ mixin _$RuleBuilderCondition { TextContentParameters? get textContentParams; TextRuleParameters? get textRuleParams; String? get type; + UserChannelBanCountRuleParameters? get userChannelBanCountParams; UserChannelCountRuleParameters? get userChannelCountParams; UserCreatedWithinParameters? get userCreatedWithinParams; UserCustomPropertyParameters? get userCustomPropertyParams; @@ -87,6 +90,11 @@ mixin _$RuleBuilderCondition { (identical(other.confidence, confidence) || other.confidence == confidence) && (identical(other.contentCountRuleParams, contentCountRuleParams) || other.contentCountRuleParams == contentCountRuleParams) && + (identical( + other.contentCountryCodeParams, + contentCountryCodeParams, + ) || + other.contentCountryCodeParams == contentCountryCodeParams) && (identical( other.contentCustomPropertyCountParams, contentCustomPropertyCountParams, @@ -109,6 +117,7 @@ mixin _$RuleBuilderCondition { (identical(other.imageContentParams, imageContentParams) || other.imageContentParams == imageContentParams) && (identical(other.imageRuleParams, imageRuleParams) || other.imageRuleParams == imageRuleParams) && + (identical(other.intentRuleParams, intentRuleParams) || other.intentRuleParams == intentRuleParams) && (identical( other.ipContentCountRuleParams, ipContentCountRuleParams, @@ -124,6 +133,11 @@ mixin _$RuleBuilderCondition { (identical(other.textContentParams, textContentParams) || other.textContentParams == textContentParams) && (identical(other.textRuleParams, textRuleParams) || other.textRuleParams == textRuleParams) && (identical(other.type, type) || other.type == type) && + (identical( + other.userChannelBanCountParams, + userChannelBanCountParams, + ) || + other.userChannelBanCountParams == userChannelBanCountParams) && (identical(other.userChannelCountParams, userChannelCountParams) || other.userChannelCountParams == userChannelCountParams) && (identical( @@ -173,6 +187,7 @@ mixin _$RuleBuilderCondition { closedCaptionRuleParams, confidence, contentCountRuleParams, + contentCountryCodeParams, contentCustomPropertyCountParams, contentCustomPropertyParams, contentFlagCountRuleParams, @@ -180,6 +195,7 @@ mixin _$RuleBuilderCondition { floodSimilarParams, imageContentParams, imageRuleParams, + intentRuleParams, ipContentCountRuleParams, ipFlagCountRuleParams, keyframeOcrRuleParams, @@ -188,6 +204,7 @@ mixin _$RuleBuilderCondition { textContentParams, textRuleParams, type, + userChannelBanCountParams, userChannelCountParams, userCreatedWithinParams, userCustomPropertyParams, @@ -203,7 +220,7 @@ mixin _$RuleBuilderCondition { @override String toString() { - return 'RuleBuilderCondition(callCustomPropertyParams: $callCustomPropertyParams, callTypeRuleParams: $callTypeRuleParams, callViolationCountParams: $callViolationCountParams, channelMessageCountRuleParams: $channelMessageCountRuleParams, closedCaptionRuleParams: $closedCaptionRuleParams, confidence: $confidence, contentCountRuleParams: $contentCountRuleParams, contentCustomPropertyCountParams: $contentCustomPropertyCountParams, contentCustomPropertyParams: $contentCustomPropertyParams, contentFlagCountRuleParams: $contentFlagCountRuleParams, floodIdenticalParams: $floodIdenticalParams, floodSimilarParams: $floodSimilarParams, imageContentParams: $imageContentParams, imageRuleParams: $imageRuleParams, ipContentCountRuleParams: $ipContentCountRuleParams, ipFlagCountRuleParams: $ipFlagCountRuleParams, keyframeOcrRuleParams: $keyframeOcrRuleParams, keyframeRuleParams: $keyframeRuleParams, ocrContentParams: $ocrContentParams, textContentParams: $textContentParams, textRuleParams: $textRuleParams, type: $type, userChannelCountParams: $userChannelCountParams, userCreatedWithinParams: $userCreatedWithinParams, userCustomPropertyParams: $userCustomPropertyParams, userFlagCountRuleParams: $userFlagCountRuleParams, userIdenticalContentCountParams: $userIdenticalContentCountParams, userIdenticalImageCountParams: $userIdenticalImageCountParams, userReactionCountParams: $userReactionCountParams, userRoleParams: $userRoleParams, userRuleParams: $userRuleParams, videoContentParams: $videoContentParams, videoRuleParams: $videoRuleParams)'; + return 'RuleBuilderCondition(callCustomPropertyParams: $callCustomPropertyParams, callTypeRuleParams: $callTypeRuleParams, callViolationCountParams: $callViolationCountParams, channelMessageCountRuleParams: $channelMessageCountRuleParams, closedCaptionRuleParams: $closedCaptionRuleParams, confidence: $confidence, contentCountRuleParams: $contentCountRuleParams, contentCountryCodeParams: $contentCountryCodeParams, contentCustomPropertyCountParams: $contentCustomPropertyCountParams, contentCustomPropertyParams: $contentCustomPropertyParams, contentFlagCountRuleParams: $contentFlagCountRuleParams, floodIdenticalParams: $floodIdenticalParams, floodSimilarParams: $floodSimilarParams, imageContentParams: $imageContentParams, imageRuleParams: $imageRuleParams, intentRuleParams: $intentRuleParams, ipContentCountRuleParams: $ipContentCountRuleParams, ipFlagCountRuleParams: $ipFlagCountRuleParams, keyframeOcrRuleParams: $keyframeOcrRuleParams, keyframeRuleParams: $keyframeRuleParams, ocrContentParams: $ocrContentParams, textContentParams: $textContentParams, textRuleParams: $textRuleParams, type: $type, userChannelBanCountParams: $userChannelBanCountParams, userChannelCountParams: $userChannelCountParams, userCreatedWithinParams: $userCreatedWithinParams, userCustomPropertyParams: $userCustomPropertyParams, userFlagCountRuleParams: $userFlagCountRuleParams, userIdenticalContentCountParams: $userIdenticalContentCountParams, userIdenticalImageCountParams: $userIdenticalImageCountParams, userReactionCountParams: $userReactionCountParams, userRoleParams: $userRoleParams, userRuleParams: $userRuleParams, videoContentParams: $videoContentParams, videoRuleParams: $videoRuleParams)'; } } @@ -222,6 +239,7 @@ abstract mixin class $RuleBuilderConditionCopyWith<$Res> { ClosedCaptionRuleParameters? closedCaptionRuleParams, double? confidence, ContentCountRuleParameters? contentCountRuleParams, + ContentCountryCodeParameters? contentCountryCodeParams, ContentCustomPropertyCountParameters? contentCustomPropertyCountParams, ContentCustomPropertyParameters? contentCustomPropertyParams, FlagCountRuleParameters? contentFlagCountRuleParams, @@ -229,6 +247,7 @@ abstract mixin class $RuleBuilderConditionCopyWith<$Res> { FloodSimilarRuleParameters? floodSimilarParams, ImageContentParameters? imageContentParams, ImageRuleParameters? imageRuleParams, + IntentRuleParameters? intentRuleParams, IPContentCountRuleParameters? ipContentCountRuleParams, IPFlagCountRuleParameters? ipFlagCountRuleParams, KeyframeOCRRuleParameters? keyframeOcrRuleParams, @@ -237,6 +256,7 @@ abstract mixin class $RuleBuilderConditionCopyWith<$Res> { TextContentParameters? textContentParams, TextRuleParameters? textRuleParams, String? type, + UserChannelBanCountRuleParameters? userChannelBanCountParams, UserChannelCountRuleParameters? userChannelCountParams, UserCreatedWithinParameters? userCreatedWithinParams, UserCustomPropertyParameters? userCustomPropertyParams, @@ -270,6 +290,7 @@ class _$RuleBuilderConditionCopyWithImpl<$Res> implements $RuleBuilderConditionC Object? closedCaptionRuleParams = freezed, Object? confidence = freezed, Object? contentCountRuleParams = freezed, + Object? contentCountryCodeParams = freezed, Object? contentCustomPropertyCountParams = freezed, Object? contentCustomPropertyParams = freezed, Object? contentFlagCountRuleParams = freezed, @@ -277,6 +298,7 @@ class _$RuleBuilderConditionCopyWithImpl<$Res> implements $RuleBuilderConditionC Object? floodSimilarParams = freezed, Object? imageContentParams = freezed, Object? imageRuleParams = freezed, + Object? intentRuleParams = freezed, Object? ipContentCountRuleParams = freezed, Object? ipFlagCountRuleParams = freezed, Object? keyframeOcrRuleParams = freezed, @@ -285,6 +307,7 @@ class _$RuleBuilderConditionCopyWithImpl<$Res> implements $RuleBuilderConditionC Object? textContentParams = freezed, Object? textRuleParams = freezed, Object? type = freezed, + Object? userChannelBanCountParams = freezed, Object? userChannelCountParams = freezed, Object? userCreatedWithinParams = freezed, Object? userCustomPropertyParams = freezed, @@ -327,6 +350,10 @@ class _$RuleBuilderConditionCopyWithImpl<$Res> implements $RuleBuilderConditionC ? _self.contentCountRuleParams : contentCountRuleParams // ignore: cast_nullable_to_non_nullable as ContentCountRuleParameters?, + contentCountryCodeParams: freezed == contentCountryCodeParams + ? _self.contentCountryCodeParams + : contentCountryCodeParams // ignore: cast_nullable_to_non_nullable + as ContentCountryCodeParameters?, contentCustomPropertyCountParams: freezed == contentCustomPropertyCountParams ? _self.contentCustomPropertyCountParams : contentCustomPropertyCountParams // ignore: cast_nullable_to_non_nullable @@ -355,6 +382,10 @@ class _$RuleBuilderConditionCopyWithImpl<$Res> implements $RuleBuilderConditionC ? _self.imageRuleParams : imageRuleParams // ignore: cast_nullable_to_non_nullable as ImageRuleParameters?, + intentRuleParams: freezed == intentRuleParams + ? _self.intentRuleParams + : intentRuleParams // ignore: cast_nullable_to_non_nullable + as IntentRuleParameters?, ipContentCountRuleParams: freezed == ipContentCountRuleParams ? _self.ipContentCountRuleParams : ipContentCountRuleParams // ignore: cast_nullable_to_non_nullable @@ -387,6 +418,10 @@ class _$RuleBuilderConditionCopyWithImpl<$Res> implements $RuleBuilderConditionC ? _self.type : type // ignore: cast_nullable_to_non_nullable as String?, + userChannelBanCountParams: freezed == userChannelBanCountParams + ? _self.userChannelBanCountParams + : userChannelBanCountParams // ignore: cast_nullable_to_non_nullable + as UserChannelBanCountRuleParameters?, userChannelCountParams: freezed == userChannelCountParams ? _self.userChannelCountParams : userChannelCountParams // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/rule_builder_condition.g.dart b/packages/stream_chat/lib/open_api/model/rule_builder_condition.g.dart index 805c8fdf47..131c6517e2 100644 --- a/packages/stream_chat/lib/open_api/model/rule_builder_condition.g.dart +++ b/packages/stream_chat/lib/open_api/model/rule_builder_condition.g.dart @@ -40,6 +40,11 @@ RuleBuilderCondition _$RuleBuilderConditionFromJson( : ContentCountRuleParameters.fromJson( json['content_count_rule_params'] as Map, ), + contentCountryCodeParams: json['content_country_code_params'] == null + ? null + : ContentCountryCodeParameters.fromJson( + json['content_country_code_params'] as Map, + ), contentCustomPropertyCountParams: json['content_custom_property_count_params'] == null ? null : ContentCustomPropertyCountParameters.fromJson( @@ -75,6 +80,11 @@ RuleBuilderCondition _$RuleBuilderConditionFromJson( : ImageRuleParameters.fromJson( json['image_rule_params'] as Map, ), + intentRuleParams: json['intent_rule_params'] == null + ? null + : IntentRuleParameters.fromJson( + json['intent_rule_params'] as Map, + ), ipContentCountRuleParams: json['ip_content_count_rule_params'] == null ? null : IPContentCountRuleParameters.fromJson( @@ -111,6 +121,11 @@ RuleBuilderCondition _$RuleBuilderConditionFromJson( json['text_rule_params'] as Map, ), type: json['type'] as String?, + userChannelBanCountParams: json['user_channel_ban_count_params'] == null + ? null + : UserChannelBanCountRuleParameters.fromJson( + json['user_channel_ban_count_params'] as Map, + ), userChannelCountParams: json['user_channel_count_params'] == null ? null : UserChannelCountRuleParameters.fromJson( @@ -178,6 +193,7 @@ Map _$RuleBuilderConditionToJson( 'closed_caption_rule_params': instance.closedCaptionRuleParams?.toJson(), 'confidence': instance.confidence, 'content_count_rule_params': instance.contentCountRuleParams?.toJson(), + 'content_country_code_params': instance.contentCountryCodeParams?.toJson(), 'content_custom_property_count_params': instance.contentCustomPropertyCountParams?.toJson(), 'content_custom_property_params': instance.contentCustomPropertyParams?.toJson(), 'content_flag_count_rule_params': instance.contentFlagCountRuleParams?.toJson(), @@ -185,6 +201,7 @@ Map _$RuleBuilderConditionToJson( 'flood_similar_params': instance.floodSimilarParams?.toJson(), 'image_content_params': instance.imageContentParams?.toJson(), 'image_rule_params': instance.imageRuleParams?.toJson(), + 'intent_rule_params': instance.intentRuleParams?.toJson(), 'ip_content_count_rule_params': instance.ipContentCountRuleParams?.toJson(), 'ip_flag_count_rule_params': instance.ipFlagCountRuleParams?.toJson(), 'keyframe_ocr_rule_params': instance.keyframeOcrRuleParams?.toJson(), @@ -193,6 +210,7 @@ Map _$RuleBuilderConditionToJson( 'text_content_params': instance.textContentParams?.toJson(), 'text_rule_params': instance.textRuleParams?.toJson(), 'type': instance.type, + 'user_channel_ban_count_params': instance.userChannelBanCountParams?.toJson(), 'user_channel_count_params': instance.userChannelCountParams?.toJson(), 'user_created_within_params': instance.userCreatedWithinParams?.toJson(), 'user_custom_property_params': instance.userCustomPropertyParams?.toJson(), diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_content_response.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_content_response.dart new file mode 100644 index 0000000000..02ac9d0d84 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_content_response.dart @@ -0,0 +1,128 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'scheduled_message_content_response.g.dart'; +part 'scheduled_message_content_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ScheduledMessageContentResponse with _$ScheduledMessageContentResponse { + const ScheduledMessageContentResponse({ + this.attachments, + required this.custom, + this.html, + this.mentionedChannel, + this.mentionedGroupIds, + this.mentionedHere, + this.mentionedRoles, + this.mentionedUsers, + this.mml, + this.parentId, + this.pinExpires, + this.pinned, + this.pollId, + this.quotedMessageId, + this.restrictedVisibility, + this.sharedLocation, + this.showInChannel, + this.silent, + required this.text, + this.type, + }); + + @override + @JsonKey(name: 'attachments') + final List? attachments; + + @override + @JsonKey(name: 'custom') + final Map custom; + + @override + @JsonKey(name: 'html') + final String? html; + + @override + @JsonKey(name: 'mentioned_channel') + final bool? mentionedChannel; + + @override + @JsonKey(name: 'mentioned_group_ids') + final List? mentionedGroupIds; + + @override + @JsonKey(name: 'mentioned_here') + final bool? mentionedHere; + + @override + @JsonKey(name: 'mentioned_roles') + final List? mentionedRoles; + + @override + @JsonKey(name: 'mentioned_users') + final List? mentionedUsers; + + @override + @JsonKey(name: 'mml') + final String? mml; + + @override + @JsonKey(name: 'parent_id') + final String? parentId; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'pin_expires') + final DateTime? pinExpires; + + @override + @JsonKey(name: 'pinned') + final bool? pinned; + + @override + @JsonKey(name: 'poll_id') + final String? pollId; + + @override + @JsonKey(name: 'quoted_message_id') + final String? quotedMessageId; + + @override + @JsonKey(name: 'restricted_visibility') + final List? restrictedVisibility; + + @override + @JsonKey(name: 'shared_location') + final ScheduledMessageLocation? sharedLocation; + + @override + @JsonKey(name: 'show_in_channel') + final bool? showInChannel; + + @override + @JsonKey(name: 'silent') + final bool? silent; + + @override + @JsonKey(name: 'text') + final String text; + + @override + @JsonKey(name: 'type') + final String? type; + + Map toJson() => _$ScheduledMessageContentResponseToJson(this); + + static ScheduledMessageContentResponse fromJson(Map json) => + _$ScheduledMessageContentResponseFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_content_response.freezed.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_content_response.freezed.dart new file mode 100644 index 0000000000..ba5affb06e --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_content_response.freezed.dart @@ -0,0 +1,269 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'scheduled_message_content_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$ScheduledMessageContentResponse { + List? get attachments; + Map get custom; + String? get html; + bool? get mentionedChannel; + List? get mentionedGroupIds; + bool? get mentionedHere; + List? get mentionedRoles; + List? get mentionedUsers; + String? get mml; + String? get parentId; + DateTime? get pinExpires; + bool? get pinned; + String? get pollId; + String? get quotedMessageId; + List? get restrictedVisibility; + ScheduledMessageLocation? get sharedLocation; + bool? get showInChannel; + bool? get silent; + String get text; + String? get type; + + /// Create a copy of ScheduledMessageContentResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ScheduledMessageContentResponseCopyWith get copyWith => + _$ScheduledMessageContentResponseCopyWithImpl( + this as ScheduledMessageContentResponse, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ScheduledMessageContentResponse && + const DeepCollectionEquality().equals( + other.attachments, + attachments, + ) && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.html, html) || other.html == html) && + (identical(other.mentionedChannel, mentionedChannel) || other.mentionedChannel == mentionedChannel) && + const DeepCollectionEquality().equals( + other.mentionedGroupIds, + mentionedGroupIds, + ) && + (identical(other.mentionedHere, mentionedHere) || other.mentionedHere == mentionedHere) && + const DeepCollectionEquality().equals( + other.mentionedRoles, + mentionedRoles, + ) && + const DeepCollectionEquality().equals( + other.mentionedUsers, + mentionedUsers, + ) && + (identical(other.mml, mml) || other.mml == mml) && + (identical(other.parentId, parentId) || other.parentId == parentId) && + (identical(other.pinExpires, pinExpires) || other.pinExpires == pinExpires) && + (identical(other.pinned, pinned) || other.pinned == pinned) && + (identical(other.pollId, pollId) || other.pollId == pollId) && + (identical(other.quotedMessageId, quotedMessageId) || other.quotedMessageId == quotedMessageId) && + const DeepCollectionEquality().equals( + other.restrictedVisibility, + restrictedVisibility, + ) && + (identical(other.sharedLocation, sharedLocation) || other.sharedLocation == sharedLocation) && + (identical(other.showInChannel, showInChannel) || other.showInChannel == showInChannel) && + (identical(other.silent, silent) || other.silent == silent) && + (identical(other.text, text) || other.text == text) && + (identical(other.type, type) || other.type == type)); + } + + @override + int get hashCode => Object.hashAll([ + runtimeType, + const DeepCollectionEquality().hash(attachments), + const DeepCollectionEquality().hash(custom), + html, + mentionedChannel, + const DeepCollectionEquality().hash(mentionedGroupIds), + mentionedHere, + const DeepCollectionEquality().hash(mentionedRoles), + const DeepCollectionEquality().hash(mentionedUsers), + mml, + parentId, + pinExpires, + pinned, + pollId, + quotedMessageId, + const DeepCollectionEquality().hash(restrictedVisibility), + sharedLocation, + showInChannel, + silent, + text, + type, + ]); + + @override + String toString() { + return 'ScheduledMessageContentResponse(attachments: $attachments, custom: $custom, html: $html, mentionedChannel: $mentionedChannel, mentionedGroupIds: $mentionedGroupIds, mentionedHere: $mentionedHere, mentionedRoles: $mentionedRoles, mentionedUsers: $mentionedUsers, mml: $mml, parentId: $parentId, pinExpires: $pinExpires, pinned: $pinned, pollId: $pollId, quotedMessageId: $quotedMessageId, restrictedVisibility: $restrictedVisibility, sharedLocation: $sharedLocation, showInChannel: $showInChannel, silent: $silent, text: $text, type: $type)'; + } +} + +/// @nodoc +abstract mixin class $ScheduledMessageContentResponseCopyWith<$Res> { + factory $ScheduledMessageContentResponseCopyWith( + ScheduledMessageContentResponse value, + $Res Function(ScheduledMessageContentResponse) _then, + ) = _$ScheduledMessageContentResponseCopyWithImpl; + @useResult + $Res call({ + List? attachments, + Map custom, + String? html, + bool? mentionedChannel, + List? mentionedGroupIds, + bool? mentionedHere, + List? mentionedRoles, + List? mentionedUsers, + String? mml, + String? parentId, + DateTime? pinExpires, + bool? pinned, + String? pollId, + String? quotedMessageId, + List? restrictedVisibility, + ScheduledMessageLocation? sharedLocation, + bool? showInChannel, + bool? silent, + String text, + String? type, + }); +} + +/// @nodoc +class _$ScheduledMessageContentResponseCopyWithImpl<$Res> implements $ScheduledMessageContentResponseCopyWith<$Res> { + _$ScheduledMessageContentResponseCopyWithImpl(this._self, this._then); + + final ScheduledMessageContentResponse _self; + final $Res Function(ScheduledMessageContentResponse) _then; + + /// Create a copy of ScheduledMessageContentResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? attachments = freezed, + Object? custom = null, + Object? html = freezed, + Object? mentionedChannel = freezed, + Object? mentionedGroupIds = freezed, + Object? mentionedHere = freezed, + Object? mentionedRoles = freezed, + Object? mentionedUsers = freezed, + Object? mml = freezed, + Object? parentId = freezed, + Object? pinExpires = freezed, + Object? pinned = freezed, + Object? pollId = freezed, + Object? quotedMessageId = freezed, + Object? restrictedVisibility = freezed, + Object? sharedLocation = freezed, + Object? showInChannel = freezed, + Object? silent = freezed, + Object? text = null, + Object? type = freezed, + }) { + return _then( + ScheduledMessageContentResponse( + attachments: freezed == attachments + ? _self.attachments + : attachments // ignore: cast_nullable_to_non_nullable + as List?, + custom: null == custom + ? _self.custom + : custom // ignore: cast_nullable_to_non_nullable + as Map, + html: freezed == html + ? _self.html + : html // ignore: cast_nullable_to_non_nullable + as String?, + mentionedChannel: freezed == mentionedChannel + ? _self.mentionedChannel + : mentionedChannel // ignore: cast_nullable_to_non_nullable + as bool?, + mentionedGroupIds: freezed == mentionedGroupIds + ? _self.mentionedGroupIds + : mentionedGroupIds // ignore: cast_nullable_to_non_nullable + as List?, + mentionedHere: freezed == mentionedHere + ? _self.mentionedHere + : mentionedHere // ignore: cast_nullable_to_non_nullable + as bool?, + mentionedRoles: freezed == mentionedRoles + ? _self.mentionedRoles + : mentionedRoles // ignore: cast_nullable_to_non_nullable + as List?, + mentionedUsers: freezed == mentionedUsers + ? _self.mentionedUsers + : mentionedUsers // ignore: cast_nullable_to_non_nullable + as List?, + mml: freezed == mml + ? _self.mml + : mml // ignore: cast_nullable_to_non_nullable + as String?, + parentId: freezed == parentId + ? _self.parentId + : parentId // ignore: cast_nullable_to_non_nullable + as String?, + pinExpires: freezed == pinExpires + ? _self.pinExpires + : pinExpires // ignore: cast_nullable_to_non_nullable + as DateTime?, + pinned: freezed == pinned + ? _self.pinned + : pinned // ignore: cast_nullable_to_non_nullable + as bool?, + pollId: freezed == pollId + ? _self.pollId + : pollId // ignore: cast_nullable_to_non_nullable + as String?, + quotedMessageId: freezed == quotedMessageId + ? _self.quotedMessageId + : quotedMessageId // ignore: cast_nullable_to_non_nullable + as String?, + restrictedVisibility: freezed == restrictedVisibility + ? _self.restrictedVisibility + : restrictedVisibility // ignore: cast_nullable_to_non_nullable + as List?, + sharedLocation: freezed == sharedLocation + ? _self.sharedLocation + : sharedLocation // ignore: cast_nullable_to_non_nullable + as ScheduledMessageLocation?, + showInChannel: freezed == showInChannel + ? _self.showInChannel + : showInChannel // ignore: cast_nullable_to_non_nullable + as bool?, + silent: freezed == silent + ? _self.silent + : silent // ignore: cast_nullable_to_non_nullable + as bool?, + text: null == text + ? _self.text + : text // ignore: cast_nullable_to_non_nullable + as String, + type: freezed == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_content_response.g.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_content_response.g.dart new file mode 100644 index 0000000000..4f497e6c9e --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_content_response.g.dart @@ -0,0 +1,79 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'scheduled_message_content_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ScheduledMessageContentResponse _$ScheduledMessageContentResponseFromJson( + Map json, +) => ScheduledMessageContentResponse( + attachments: (json['attachments'] as List?) + ?.map((e) => Attachment.fromJson(e as Map)) + .toList(), + custom: json['custom'] as Map, + html: json['html'] as String?, + mentionedChannel: json['mentioned_channel'] as bool?, + mentionedGroupIds: (json['mentioned_group_ids'] as List?)?.map((e) => e as String).toList(), + mentionedHere: json['mentioned_here'] as bool?, + mentionedRoles: (json['mentioned_roles'] as List?)?.map((e) => e as String).toList(), + mentionedUsers: (json['mentioned_users'] as List?)?.map((e) => e as String).toList(), + mml: json['mml'] as String?, + parentId: json['parent_id'] as String?, + pinExpires: _$JsonConverterFromJson( + json['pin_expires'], + const StreamDateTimeConverter().fromJson, + ), + pinned: json['pinned'] as bool?, + pollId: json['poll_id'] as String?, + quotedMessageId: json['quoted_message_id'] as String?, + restrictedVisibility: (json['restricted_visibility'] as List?)?.map((e) => e as String).toList(), + sharedLocation: json['shared_location'] == null + ? null + : ScheduledMessageLocation.fromJson( + json['shared_location'] as Map, + ), + showInChannel: json['show_in_channel'] as bool?, + silent: json['silent'] as bool?, + text: json['text'] as String, + type: json['type'] as String?, +); + +Map _$ScheduledMessageContentResponseToJson( + ScheduledMessageContentResponse instance, +) => { + 'attachments': instance.attachments?.map((e) => e.toJson()).toList(), + 'custom': instance.custom, + 'html': instance.html, + 'mentioned_channel': instance.mentionedChannel, + 'mentioned_group_ids': instance.mentionedGroupIds, + 'mentioned_here': instance.mentionedHere, + 'mentioned_roles': instance.mentionedRoles, + 'mentioned_users': instance.mentionedUsers, + 'mml': instance.mml, + 'parent_id': instance.parentId, + 'pin_expires': _$JsonConverterToJson( + instance.pinExpires, + const StreamDateTimeConverter().toJson, + ), + 'pinned': instance.pinned, + 'poll_id': instance.pollId, + 'quoted_message_id': instance.quotedMessageId, + 'restricted_visibility': instance.restrictedVisibility, + 'shared_location': instance.sharedLocation?.toJson(), + 'show_in_channel': instance.showInChannel, + 'silent': instance.silent, + 'text': instance.text, + 'type': instance.type, +}; + +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_chat/lib/open_api/model/scheduled_message_created_event.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_created_event.dart new file mode 100644 index 0000000000..45071d0eea --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_created_event.dart @@ -0,0 +1,64 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'scheduled_message_created_event.g.dart'; +part 'scheduled_message_created_event.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ScheduledMessageCreatedEvent extends core.WsEvent with _$ScheduledMessageCreatedEvent { + const ScheduledMessageCreatedEvent({ + this.cid, + required this.createdAt, + required this.custom, + this.receivedAt, + this.scheduledMessage, + required this.type, + required this.user, + }); + + @override + @JsonKey(name: 'cid') + final String? cid; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'created_at') + final DateTime createdAt; + + @override + @JsonKey(name: 'custom') + final Map custom; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'received_at') + final DateTime? receivedAt; + + @override + @JsonKey(name: 'scheduled_message') + final ScheduledMessageResponse? scheduledMessage; + + @override + @JsonKey(name: 'type') + final String type; + + @override + @JsonKey(name: 'user') + final UserResponseCommonFields user; + + Map toJson() => _$ScheduledMessageCreatedEventToJson(this); + + static ScheduledMessageCreatedEvent fromJson(Map json) => + _$ScheduledMessageCreatedEventFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_created_event.freezed.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_created_event.freezed.dart new file mode 100644 index 0000000000..d8e9b83aca --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_created_event.freezed.dart @@ -0,0 +1,137 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'scheduled_message_created_event.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$ScheduledMessageCreatedEvent { + String? get cid; + DateTime get createdAt; + Map get custom; + DateTime? get receivedAt; + ScheduledMessageResponse? get scheduledMessage; + String get type; + UserResponseCommonFields get user; + + /// Create a copy of ScheduledMessageCreatedEvent + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ScheduledMessageCreatedEventCopyWith get copyWith => + _$ScheduledMessageCreatedEventCopyWithImpl( + this as ScheduledMessageCreatedEvent, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ScheduledMessageCreatedEvent && + (identical(other.cid, cid) || other.cid == cid) && + (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt) && + (identical(other.scheduledMessage, scheduledMessage) || other.scheduledMessage == scheduledMessage) && + (identical(other.type, type) || other.type == type) && + (identical(other.user, user) || other.user == user)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + cid, + createdAt, + const DeepCollectionEquality().hash(custom), + receivedAt, + scheduledMessage, + type, + user, + ); + + @override + String toString() { + return 'ScheduledMessageCreatedEvent(cid: $cid, createdAt: $createdAt, custom: $custom, receivedAt: $receivedAt, scheduledMessage: $scheduledMessage, type: $type, user: $user)'; + } +} + +/// @nodoc +abstract mixin class $ScheduledMessageCreatedEventCopyWith<$Res> { + factory $ScheduledMessageCreatedEventCopyWith( + ScheduledMessageCreatedEvent value, + $Res Function(ScheduledMessageCreatedEvent) _then, + ) = _$ScheduledMessageCreatedEventCopyWithImpl; + @useResult + $Res call({ + String? cid, + DateTime createdAt, + Map custom, + DateTime? receivedAt, + ScheduledMessageResponse? scheduledMessage, + String type, + UserResponseCommonFields user, + }); +} + +/// @nodoc +class _$ScheduledMessageCreatedEventCopyWithImpl<$Res> implements $ScheduledMessageCreatedEventCopyWith<$Res> { + _$ScheduledMessageCreatedEventCopyWithImpl(this._self, this._then); + + final ScheduledMessageCreatedEvent _self; + final $Res Function(ScheduledMessageCreatedEvent) _then; + + /// Create a copy of ScheduledMessageCreatedEvent + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? cid = freezed, + Object? createdAt = null, + Object? custom = null, + Object? receivedAt = freezed, + Object? scheduledMessage = freezed, + Object? type = null, + Object? user = null, + }) { + return _then( + ScheduledMessageCreatedEvent( + cid: freezed == cid + ? _self.cid + : cid // 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, + receivedAt: freezed == receivedAt + ? _self.receivedAt + : receivedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + scheduledMessage: freezed == scheduledMessage + ? _self.scheduledMessage + : scheduledMessage // ignore: cast_nullable_to_non_nullable + as ScheduledMessageResponse?, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String, + user: null == user + ? _self.user + : user // ignore: cast_nullable_to_non_nullable + as UserResponseCommonFields, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_created_event.g.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_created_event.g.dart new file mode 100644 index 0000000000..4fdb667408 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_created_event.g.dart @@ -0,0 +1,53 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'scheduled_message_created_event.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ScheduledMessageCreatedEvent _$ScheduledMessageCreatedEventFromJson( + Map json, +) => ScheduledMessageCreatedEvent( + cid: json['cid'] as String?, + createdAt: const StreamDateTimeConverter().fromJson( + json['created_at'] as Object, + ), + custom: json['custom'] as Map, + receivedAt: _$JsonConverterFromJson( + json['received_at'], + const StreamDateTimeConverter().fromJson, + ), + scheduledMessage: json['scheduled_message'] == null + ? null + : ScheduledMessageResponse.fromJson( + json['scheduled_message'] as Map, + ), + type: json['type'] as String, + user: UserResponseCommonFields.fromJson(json['user'] as Map), +); + +Map _$ScheduledMessageCreatedEventToJson( + ScheduledMessageCreatedEvent instance, +) => { + 'cid': instance.cid, + 'created_at': const StreamDateTimeConverter().toJson(instance.createdAt), + 'custom': instance.custom, + 'received_at': _$JsonConverterToJson( + instance.receivedAt, + const StreamDateTimeConverter().toJson, + ), + 'scheduled_message': instance.scheduledMessage?.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_chat/lib/open_api/model/scheduled_message_deleted_event.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_deleted_event.dart new file mode 100644 index 0000000000..9a78533783 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_deleted_event.dart @@ -0,0 +1,64 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'scheduled_message_deleted_event.g.dart'; +part 'scheduled_message_deleted_event.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ScheduledMessageDeletedEvent extends core.WsEvent with _$ScheduledMessageDeletedEvent { + const ScheduledMessageDeletedEvent({ + this.cid, + required this.createdAt, + required this.custom, + this.receivedAt, + this.scheduledMessage, + required this.type, + required this.user, + }); + + @override + @JsonKey(name: 'cid') + final String? cid; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'created_at') + final DateTime createdAt; + + @override + @JsonKey(name: 'custom') + final Map custom; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'received_at') + final DateTime? receivedAt; + + @override + @JsonKey(name: 'scheduled_message') + final ScheduledMessageResponse? scheduledMessage; + + @override + @JsonKey(name: 'type') + final String type; + + @override + @JsonKey(name: 'user') + final UserResponseCommonFields user; + + Map toJson() => _$ScheduledMessageDeletedEventToJson(this); + + static ScheduledMessageDeletedEvent fromJson(Map json) => + _$ScheduledMessageDeletedEventFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_deleted_event.freezed.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_deleted_event.freezed.dart new file mode 100644 index 0000000000..191e5a7985 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_deleted_event.freezed.dart @@ -0,0 +1,137 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'scheduled_message_deleted_event.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$ScheduledMessageDeletedEvent { + String? get cid; + DateTime get createdAt; + Map get custom; + DateTime? get receivedAt; + ScheduledMessageResponse? get scheduledMessage; + String get type; + UserResponseCommonFields get user; + + /// Create a copy of ScheduledMessageDeletedEvent + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ScheduledMessageDeletedEventCopyWith get copyWith => + _$ScheduledMessageDeletedEventCopyWithImpl( + this as ScheduledMessageDeletedEvent, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ScheduledMessageDeletedEvent && + (identical(other.cid, cid) || other.cid == cid) && + (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt) && + (identical(other.scheduledMessage, scheduledMessage) || other.scheduledMessage == scheduledMessage) && + (identical(other.type, type) || other.type == type) && + (identical(other.user, user) || other.user == user)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + cid, + createdAt, + const DeepCollectionEquality().hash(custom), + receivedAt, + scheduledMessage, + type, + user, + ); + + @override + String toString() { + return 'ScheduledMessageDeletedEvent(cid: $cid, createdAt: $createdAt, custom: $custom, receivedAt: $receivedAt, scheduledMessage: $scheduledMessage, type: $type, user: $user)'; + } +} + +/// @nodoc +abstract mixin class $ScheduledMessageDeletedEventCopyWith<$Res> { + factory $ScheduledMessageDeletedEventCopyWith( + ScheduledMessageDeletedEvent value, + $Res Function(ScheduledMessageDeletedEvent) _then, + ) = _$ScheduledMessageDeletedEventCopyWithImpl; + @useResult + $Res call({ + String? cid, + DateTime createdAt, + Map custom, + DateTime? receivedAt, + ScheduledMessageResponse? scheduledMessage, + String type, + UserResponseCommonFields user, + }); +} + +/// @nodoc +class _$ScheduledMessageDeletedEventCopyWithImpl<$Res> implements $ScheduledMessageDeletedEventCopyWith<$Res> { + _$ScheduledMessageDeletedEventCopyWithImpl(this._self, this._then); + + final ScheduledMessageDeletedEvent _self; + final $Res Function(ScheduledMessageDeletedEvent) _then; + + /// Create a copy of ScheduledMessageDeletedEvent + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? cid = freezed, + Object? createdAt = null, + Object? custom = null, + Object? receivedAt = freezed, + Object? scheduledMessage = freezed, + Object? type = null, + Object? user = null, + }) { + return _then( + ScheduledMessageDeletedEvent( + cid: freezed == cid + ? _self.cid + : cid // 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, + receivedAt: freezed == receivedAt + ? _self.receivedAt + : receivedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + scheduledMessage: freezed == scheduledMessage + ? _self.scheduledMessage + : scheduledMessage // ignore: cast_nullable_to_non_nullable + as ScheduledMessageResponse?, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String, + user: null == user + ? _self.user + : user // ignore: cast_nullable_to_non_nullable + as UserResponseCommonFields, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_deleted_event.g.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_deleted_event.g.dart new file mode 100644 index 0000000000..674540f9f9 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_deleted_event.g.dart @@ -0,0 +1,53 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'scheduled_message_deleted_event.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ScheduledMessageDeletedEvent _$ScheduledMessageDeletedEventFromJson( + Map json, +) => ScheduledMessageDeletedEvent( + cid: json['cid'] as String?, + createdAt: const StreamDateTimeConverter().fromJson( + json['created_at'] as Object, + ), + custom: json['custom'] as Map, + receivedAt: _$JsonConverterFromJson( + json['received_at'], + const StreamDateTimeConverter().fromJson, + ), + scheduledMessage: json['scheduled_message'] == null + ? null + : ScheduledMessageResponse.fromJson( + json['scheduled_message'] as Map, + ), + type: json['type'] as String, + user: UserResponseCommonFields.fromJson(json['user'] as Map), +); + +Map _$ScheduledMessageDeletedEventToJson( + ScheduledMessageDeletedEvent instance, +) => { + 'cid': instance.cid, + 'created_at': const StreamDateTimeConverter().toJson(instance.createdAt), + 'custom': instance.custom, + 'received_at': _$JsonConverterToJson( + instance.receivedAt, + const StreamDateTimeConverter().toJson, + ), + 'scheduled_message': instance.scheduledMessage?.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_chat/lib/open_api/model/scheduled_message_failed_event.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_failed_event.dart new file mode 100644 index 0000000000..55ff94b098 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_failed_event.dart @@ -0,0 +1,63 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'scheduled_message_failed_event.g.dart'; +part 'scheduled_message_failed_event.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ScheduledMessageFailedEvent extends core.WsEvent with _$ScheduledMessageFailedEvent { + const ScheduledMessageFailedEvent({ + this.cid, + required this.createdAt, + required this.custom, + this.receivedAt, + this.scheduledMessage, + required this.type, + required this.user, + }); + + @override + @JsonKey(name: 'cid') + final String? cid; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'created_at') + final DateTime createdAt; + + @override + @JsonKey(name: 'custom') + final Map custom; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'received_at') + final DateTime? receivedAt; + + @override + @JsonKey(name: 'scheduled_message') + final ScheduledMessageResponse? scheduledMessage; + + @override + @JsonKey(name: 'type') + final String type; + + @override + @JsonKey(name: 'user') + final UserResponseCommonFields user; + + Map toJson() => _$ScheduledMessageFailedEventToJson(this); + + static ScheduledMessageFailedEvent fromJson(Map json) => _$ScheduledMessageFailedEventFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_failed_event.freezed.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_failed_event.freezed.dart new file mode 100644 index 0000000000..25561c2d10 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_failed_event.freezed.dart @@ -0,0 +1,137 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'scheduled_message_failed_event.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$ScheduledMessageFailedEvent { + String? get cid; + DateTime get createdAt; + Map get custom; + DateTime? get receivedAt; + ScheduledMessageResponse? get scheduledMessage; + String get type; + UserResponseCommonFields get user; + + /// Create a copy of ScheduledMessageFailedEvent + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ScheduledMessageFailedEventCopyWith get copyWith => + _$ScheduledMessageFailedEventCopyWithImpl( + this as ScheduledMessageFailedEvent, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ScheduledMessageFailedEvent && + (identical(other.cid, cid) || other.cid == cid) && + (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt) && + (identical(other.scheduledMessage, scheduledMessage) || other.scheduledMessage == scheduledMessage) && + (identical(other.type, type) || other.type == type) && + (identical(other.user, user) || other.user == user)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + cid, + createdAt, + const DeepCollectionEquality().hash(custom), + receivedAt, + scheduledMessage, + type, + user, + ); + + @override + String toString() { + return 'ScheduledMessageFailedEvent(cid: $cid, createdAt: $createdAt, custom: $custom, receivedAt: $receivedAt, scheduledMessage: $scheduledMessage, type: $type, user: $user)'; + } +} + +/// @nodoc +abstract mixin class $ScheduledMessageFailedEventCopyWith<$Res> { + factory $ScheduledMessageFailedEventCopyWith( + ScheduledMessageFailedEvent value, + $Res Function(ScheduledMessageFailedEvent) _then, + ) = _$ScheduledMessageFailedEventCopyWithImpl; + @useResult + $Res call({ + String? cid, + DateTime createdAt, + Map custom, + DateTime? receivedAt, + ScheduledMessageResponse? scheduledMessage, + String type, + UserResponseCommonFields user, + }); +} + +/// @nodoc +class _$ScheduledMessageFailedEventCopyWithImpl<$Res> implements $ScheduledMessageFailedEventCopyWith<$Res> { + _$ScheduledMessageFailedEventCopyWithImpl(this._self, this._then); + + final ScheduledMessageFailedEvent _self; + final $Res Function(ScheduledMessageFailedEvent) _then; + + /// Create a copy of ScheduledMessageFailedEvent + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? cid = freezed, + Object? createdAt = null, + Object? custom = null, + Object? receivedAt = freezed, + Object? scheduledMessage = freezed, + Object? type = null, + Object? user = null, + }) { + return _then( + ScheduledMessageFailedEvent( + cid: freezed == cid + ? _self.cid + : cid // 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, + receivedAt: freezed == receivedAt + ? _self.receivedAt + : receivedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + scheduledMessage: freezed == scheduledMessage + ? _self.scheduledMessage + : scheduledMessage // ignore: cast_nullable_to_non_nullable + as ScheduledMessageResponse?, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String, + user: null == user + ? _self.user + : user // ignore: cast_nullable_to_non_nullable + as UserResponseCommonFields, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_failed_event.g.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_failed_event.g.dart new file mode 100644 index 0000000000..b8566bac4e --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_failed_event.g.dart @@ -0,0 +1,53 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'scheduled_message_failed_event.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ScheduledMessageFailedEvent _$ScheduledMessageFailedEventFromJson( + Map json, +) => ScheduledMessageFailedEvent( + cid: json['cid'] as String?, + createdAt: const StreamDateTimeConverter().fromJson( + json['created_at'] as Object, + ), + custom: json['custom'] as Map, + receivedAt: _$JsonConverterFromJson( + json['received_at'], + const StreamDateTimeConverter().fromJson, + ), + scheduledMessage: json['scheduled_message'] == null + ? null + : ScheduledMessageResponse.fromJson( + json['scheduled_message'] as Map, + ), + type: json['type'] as String, + user: UserResponseCommonFields.fromJson(json['user'] as Map), +); + +Map _$ScheduledMessageFailedEventToJson( + ScheduledMessageFailedEvent instance, +) => { + 'cid': instance.cid, + 'created_at': const StreamDateTimeConverter().toJson(instance.createdAt), + 'custom': instance.custom, + 'received_at': _$JsonConverterToJson( + instance.receivedAt, + const StreamDateTimeConverter().toJson, + ), + 'scheduled_message': instance.scheduledMessage?.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_chat/lib/open_api/model/scheduled_message_location.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_location.dart new file mode 100644 index 0000000000..2d8ffb2475 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_location.dart @@ -0,0 +1,47 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'scheduled_message_location.g.dart'; +part 'scheduled_message_location.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ScheduledMessageLocation with _$ScheduledMessageLocation { + const ScheduledMessageLocation({ + required this.createdByDeviceId, + this.endAt, + this.latitude, + this.longitude, + }); + + @override + @JsonKey(name: 'created_by_device_id') + final String createdByDeviceId; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'end_at') + final DateTime? endAt; + + @override + @JsonKey(name: 'latitude') + final double? latitude; + + @override + @JsonKey(name: 'longitude') + final double? longitude; + + Map toJson() => _$ScheduledMessageLocationToJson(this); + + static ScheduledMessageLocation fromJson(Map json) => _$ScheduledMessageLocationFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_location.freezed.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_location.freezed.dart new file mode 100644 index 0000000000..752b4c4daf --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_location.freezed.dart @@ -0,0 +1,104 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'scheduled_message_location.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$ScheduledMessageLocation { + String get createdByDeviceId; + DateTime? get endAt; + double? get latitude; + double? get longitude; + + /// Create a copy of ScheduledMessageLocation + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ScheduledMessageLocationCopyWith get copyWith => + _$ScheduledMessageLocationCopyWithImpl( + this as ScheduledMessageLocation, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ScheduledMessageLocation && + (identical(other.createdByDeviceId, createdByDeviceId) || other.createdByDeviceId == createdByDeviceId) && + (identical(other.endAt, endAt) || other.endAt == endAt) && + (identical(other.latitude, latitude) || other.latitude == latitude) && + (identical(other.longitude, longitude) || other.longitude == longitude)); + } + + @override + int get hashCode => Object.hash(runtimeType, createdByDeviceId, endAt, latitude, longitude); + + @override + String toString() { + return 'ScheduledMessageLocation(createdByDeviceId: $createdByDeviceId, endAt: $endAt, latitude: $latitude, longitude: $longitude)'; + } +} + +/// @nodoc +abstract mixin class $ScheduledMessageLocationCopyWith<$Res> { + factory $ScheduledMessageLocationCopyWith( + ScheduledMessageLocation value, + $Res Function(ScheduledMessageLocation) _then, + ) = _$ScheduledMessageLocationCopyWithImpl; + @useResult + $Res call({ + String createdByDeviceId, + DateTime? endAt, + double? latitude, + double? longitude, + }); +} + +/// @nodoc +class _$ScheduledMessageLocationCopyWithImpl<$Res> implements $ScheduledMessageLocationCopyWith<$Res> { + _$ScheduledMessageLocationCopyWithImpl(this._self, this._then); + + final ScheduledMessageLocation _self; + final $Res Function(ScheduledMessageLocation) _then; + + /// Create a copy of ScheduledMessageLocation + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? createdByDeviceId = null, + Object? endAt = freezed, + Object? latitude = freezed, + Object? longitude = freezed, + }) { + return _then( + ScheduledMessageLocation( + createdByDeviceId: null == createdByDeviceId + ? _self.createdByDeviceId + : createdByDeviceId // ignore: cast_nullable_to_non_nullable + as String, + endAt: freezed == endAt + ? _self.endAt + : endAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + latitude: freezed == latitude + ? _self.latitude + : latitude // ignore: cast_nullable_to_non_nullable + as double?, + longitude: freezed == longitude + ? _self.longitude + : longitude // ignore: cast_nullable_to_non_nullable + as double?, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_location.g.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_location.g.dart new file mode 100644 index 0000000000..8568c34309 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_location.g.dart @@ -0,0 +1,41 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'scheduled_message_location.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ScheduledMessageLocation _$ScheduledMessageLocationFromJson( + Map json, +) => ScheduledMessageLocation( + createdByDeviceId: json['created_by_device_id'] as String, + endAt: _$JsonConverterFromJson( + json['end_at'], + const StreamDateTimeConverter().fromJson, + ), + latitude: (json['latitude'] as num?)?.toDouble(), + longitude: (json['longitude'] as num?)?.toDouble(), +); + +Map _$ScheduledMessageLocationToJson( + ScheduledMessageLocation instance, +) => { + 'created_by_device_id': instance.createdByDeviceId, + 'end_at': _$JsonConverterToJson( + instance.endAt, + const StreamDateTimeConverter().toJson, + ), + 'latitude': instance.latitude, + 'longitude': instance.longitude, +}; + +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_chat/lib/open_api/model/scheduled_message_response.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_response.dart new file mode 100644 index 0000000000..1fa658aef4 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_response.dart @@ -0,0 +1,74 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'scheduled_message_response.g.dart'; +part 'scheduled_message_response.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ScheduledMessageResponse with _$ScheduledMessageResponse { + const ScheduledMessageResponse({ + required this.cid, + required this.createdAt, + this.failureReason, + required this.id, + required this.message, + required this.scheduledAt, + required this.status, + required this.updatedAt, + required this.user, + }); + + @override + @JsonKey(name: 'cid') + final String cid; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'created_at') + final DateTime createdAt; + + @override + @JsonKey(name: 'failure_reason') + final String? failureReason; + + @override + @JsonKey(name: 'id') + final String id; + + @override + @JsonKey(name: 'message') + final ScheduledMessageContentResponse message; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'scheduled_at') + final DateTime scheduledAt; + + @override + @JsonKey(name: 'status') + final String status; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'updated_at') + final DateTime updatedAt; + + @override + @JsonKey(name: 'user') + final UserResponse user; + + Map toJson() => _$ScheduledMessageResponseToJson(this); + + static ScheduledMessageResponse fromJson(Map json) => _$ScheduledMessageResponseFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_response.freezed.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_response.freezed.dart new file mode 100644 index 0000000000..38e814a22b --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_response.freezed.dart @@ -0,0 +1,155 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'scheduled_message_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$ScheduledMessageResponse { + String get cid; + DateTime get createdAt; + String? get failureReason; + String get id; + ScheduledMessageContentResponse get message; + DateTime get scheduledAt; + String get status; + DateTime get updatedAt; + UserResponse get user; + + /// Create a copy of ScheduledMessageResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ScheduledMessageResponseCopyWith get copyWith => + _$ScheduledMessageResponseCopyWithImpl( + this as ScheduledMessageResponse, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ScheduledMessageResponse && + (identical(other.cid, cid) || other.cid == cid) && + (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && + (identical(other.failureReason, failureReason) || other.failureReason == failureReason) && + (identical(other.id, id) || other.id == id) && + (identical(other.message, message) || other.message == message) && + (identical(other.scheduledAt, scheduledAt) || other.scheduledAt == scheduledAt) && + (identical(other.status, status) || other.status == status) && + (identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) && + (identical(other.user, user) || other.user == user)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + cid, + createdAt, + failureReason, + id, + message, + scheduledAt, + status, + updatedAt, + user, + ); + + @override + String toString() { + return 'ScheduledMessageResponse(cid: $cid, createdAt: $createdAt, failureReason: $failureReason, id: $id, message: $message, scheduledAt: $scheduledAt, status: $status, updatedAt: $updatedAt, user: $user)'; + } +} + +/// @nodoc +abstract mixin class $ScheduledMessageResponseCopyWith<$Res> { + factory $ScheduledMessageResponseCopyWith( + ScheduledMessageResponse value, + $Res Function(ScheduledMessageResponse) _then, + ) = _$ScheduledMessageResponseCopyWithImpl; + @useResult + $Res call({ + String cid, + DateTime createdAt, + String? failureReason, + String id, + ScheduledMessageContentResponse message, + DateTime scheduledAt, + String status, + DateTime updatedAt, + UserResponse user, + }); +} + +/// @nodoc +class _$ScheduledMessageResponseCopyWithImpl<$Res> implements $ScheduledMessageResponseCopyWith<$Res> { + _$ScheduledMessageResponseCopyWithImpl(this._self, this._then); + + final ScheduledMessageResponse _self; + final $Res Function(ScheduledMessageResponse) _then; + + /// Create a copy of ScheduledMessageResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? cid = null, + Object? createdAt = null, + Object? failureReason = freezed, + Object? id = null, + Object? message = null, + Object? scheduledAt = null, + Object? status = null, + Object? updatedAt = null, + Object? user = null, + }) { + return _then( + ScheduledMessageResponse( + cid: null == cid + ? _self.cid + : cid // ignore: cast_nullable_to_non_nullable + as String, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + failureReason: freezed == failureReason + ? _self.failureReason + : failureReason // ignore: cast_nullable_to_non_nullable + as String?, + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + message: null == message + ? _self.message + : message // ignore: cast_nullable_to_non_nullable + as ScheduledMessageContentResponse, + scheduledAt: null == scheduledAt + ? _self.scheduledAt + : scheduledAt // ignore: cast_nullable_to_non_nullable + as DateTime, + status: null == 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: null == user + ? _self.user + : user // ignore: cast_nullable_to_non_nullable + as UserResponse, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_response.g.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_response.g.dart new file mode 100644 index 0000000000..8f1b27284c --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_response.g.dart @@ -0,0 +1,43 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'scheduled_message_response.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ScheduledMessageResponse _$ScheduledMessageResponseFromJson( + Map json, +) => ScheduledMessageResponse( + cid: json['cid'] as String, + createdAt: const StreamDateTimeConverter().fromJson( + json['created_at'] as Object, + ), + failureReason: json['failure_reason'] as String?, + id: json['id'] as String, + message: ScheduledMessageContentResponse.fromJson( + json['message'] as Map, + ), + scheduledAt: const StreamDateTimeConverter().fromJson( + json['scheduled_at'] as Object, + ), + status: json['status'] as String, + updatedAt: const StreamDateTimeConverter().fromJson( + json['updated_at'] as Object, + ), + user: UserResponse.fromJson(json['user'] as Map), +); + +Map _$ScheduledMessageResponseToJson( + ScheduledMessageResponse instance, +) => { + 'cid': instance.cid, + 'created_at': const StreamDateTimeConverter().toJson(instance.createdAt), + 'failure_reason': instance.failureReason, + 'id': instance.id, + 'message': instance.message.toJson(), + 'scheduled_at': const StreamDateTimeConverter().toJson(instance.scheduledAt), + 'status': instance.status, + 'updated_at': const StreamDateTimeConverter().toJson(instance.updatedAt), + 'user': instance.user.toJson(), +}; diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_sent_event.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_sent_event.dart new file mode 100644 index 0000000000..7ea4592aeb --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_sent_event.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, sort_constructors_first, provide_deprecation_message + +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 'scheduled_message_sent_event.g.dart'; +part 'scheduled_message_sent_event.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ScheduledMessageSentEvent extends core.WsEvent with _$ScheduledMessageSentEvent { + const ScheduledMessageSentEvent({ + this.cid, + required this.createdAt, + required this.custom, + required this.messageId, + this.receivedAt, + this.scheduledMessage, + required this.type, + required this.user, + }); + + @override + @JsonKey(name: 'cid') + final String? cid; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'created_at') + final DateTime createdAt; + + @override + @JsonKey(name: 'custom') + final Map custom; + + @override + @JsonKey(name: 'message_id') + final String messageId; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'received_at') + final DateTime? receivedAt; + + @override + @JsonKey(name: 'scheduled_message') + final ScheduledMessageResponse? scheduledMessage; + + @override + @JsonKey(name: 'type') + final String type; + + @override + @JsonKey(name: 'user') + final UserResponseCommonFields user; + + Map toJson() => _$ScheduledMessageSentEventToJson(this); + + static ScheduledMessageSentEvent fromJson(Map json) => _$ScheduledMessageSentEventFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_sent_event.freezed.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_sent_event.freezed.dart new file mode 100644 index 0000000000..fe0c637d66 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_sent_event.freezed.dart @@ -0,0 +1,146 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'scheduled_message_sent_event.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$ScheduledMessageSentEvent { + String? get cid; + DateTime get createdAt; + Map get custom; + String get messageId; + DateTime? get receivedAt; + ScheduledMessageResponse? get scheduledMessage; + String get type; + UserResponseCommonFields get user; + + /// Create a copy of ScheduledMessageSentEvent + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ScheduledMessageSentEventCopyWith get copyWith => + _$ScheduledMessageSentEventCopyWithImpl( + this as ScheduledMessageSentEvent, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ScheduledMessageSentEvent && + (identical(other.cid, cid) || other.cid == cid) && + (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.messageId, messageId) || other.messageId == messageId) && + (identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt) && + (identical(other.scheduledMessage, scheduledMessage) || other.scheduledMessage == scheduledMessage) && + (identical(other.type, type) || other.type == type) && + (identical(other.user, user) || other.user == user)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + cid, + createdAt, + const DeepCollectionEquality().hash(custom), + messageId, + receivedAt, + scheduledMessage, + type, + user, + ); + + @override + String toString() { + return 'ScheduledMessageSentEvent(cid: $cid, createdAt: $createdAt, custom: $custom, messageId: $messageId, receivedAt: $receivedAt, scheduledMessage: $scheduledMessage, type: $type, user: $user)'; + } +} + +/// @nodoc +abstract mixin class $ScheduledMessageSentEventCopyWith<$Res> { + factory $ScheduledMessageSentEventCopyWith( + ScheduledMessageSentEvent value, + $Res Function(ScheduledMessageSentEvent) _then, + ) = _$ScheduledMessageSentEventCopyWithImpl; + @useResult + $Res call({ + String? cid, + DateTime createdAt, + Map custom, + String messageId, + DateTime? receivedAt, + ScheduledMessageResponse? scheduledMessage, + String type, + UserResponseCommonFields user, + }); +} + +/// @nodoc +class _$ScheduledMessageSentEventCopyWithImpl<$Res> implements $ScheduledMessageSentEventCopyWith<$Res> { + _$ScheduledMessageSentEventCopyWithImpl(this._self, this._then); + + final ScheduledMessageSentEvent _self; + final $Res Function(ScheduledMessageSentEvent) _then; + + /// Create a copy of ScheduledMessageSentEvent + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? cid = freezed, + Object? createdAt = null, + Object? custom = null, + Object? messageId = null, + Object? receivedAt = freezed, + Object? scheduledMessage = freezed, + Object? type = null, + Object? user = null, + }) { + return _then( + ScheduledMessageSentEvent( + cid: freezed == cid + ? _self.cid + : cid // 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, + messageId: null == messageId + ? _self.messageId + : messageId // ignore: cast_nullable_to_non_nullable + as String, + receivedAt: freezed == receivedAt + ? _self.receivedAt + : receivedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + scheduledMessage: freezed == scheduledMessage + ? _self.scheduledMessage + : scheduledMessage // ignore: cast_nullable_to_non_nullable + as ScheduledMessageResponse?, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String, + user: null == user + ? _self.user + : user // ignore: cast_nullable_to_non_nullable + as UserResponseCommonFields, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_sent_event.g.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_sent_event.g.dart new file mode 100644 index 0000000000..c521872d2b --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_sent_event.g.dart @@ -0,0 +1,55 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'scheduled_message_sent_event.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ScheduledMessageSentEvent _$ScheduledMessageSentEventFromJson( + Map json, +) => ScheduledMessageSentEvent( + cid: json['cid'] as String?, + createdAt: const StreamDateTimeConverter().fromJson( + json['created_at'] as Object, + ), + custom: json['custom'] as Map, + messageId: json['message_id'] as String, + receivedAt: _$JsonConverterFromJson( + json['received_at'], + const StreamDateTimeConverter().fromJson, + ), + scheduledMessage: json['scheduled_message'] == null + ? null + : ScheduledMessageResponse.fromJson( + json['scheduled_message'] as Map, + ), + type: json['type'] as String, + user: UserResponseCommonFields.fromJson(json['user'] as Map), +); + +Map _$ScheduledMessageSentEventToJson( + ScheduledMessageSentEvent instance, +) => { + 'cid': instance.cid, + 'created_at': const StreamDateTimeConverter().toJson(instance.createdAt), + 'custom': instance.custom, + 'message_id': instance.messageId, + 'received_at': _$JsonConverterToJson( + instance.receivedAt, + const StreamDateTimeConverter().toJson, + ), + 'scheduled_message': instance.scheduledMessage?.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_chat/lib/open_api/model/scheduled_message_updated_event.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_updated_event.dart new file mode 100644 index 0000000000..c941ff6ed8 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_updated_event.dart @@ -0,0 +1,64 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'scheduled_message_updated_event.g.dart'; +part 'scheduled_message_updated_event.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class ScheduledMessageUpdatedEvent extends core.WsEvent with _$ScheduledMessageUpdatedEvent { + const ScheduledMessageUpdatedEvent({ + this.cid, + required this.createdAt, + required this.custom, + this.receivedAt, + this.scheduledMessage, + required this.type, + required this.user, + }); + + @override + @JsonKey(name: 'cid') + final String? cid; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'created_at') + final DateTime createdAt; + + @override + @JsonKey(name: 'custom') + final Map custom; + + @override + @StreamDateTimeConverter() + @JsonKey(name: 'received_at') + final DateTime? receivedAt; + + @override + @JsonKey(name: 'scheduled_message') + final ScheduledMessageResponse? scheduledMessage; + + @override + @JsonKey(name: 'type') + final String type; + + @override + @JsonKey(name: 'user') + final UserResponseCommonFields user; + + Map toJson() => _$ScheduledMessageUpdatedEventToJson(this); + + static ScheduledMessageUpdatedEvent fromJson(Map json) => + _$ScheduledMessageUpdatedEventFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_updated_event.freezed.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_updated_event.freezed.dart new file mode 100644 index 0000000000..5a938f2484 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_updated_event.freezed.dart @@ -0,0 +1,137 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'scheduled_message_updated_event.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$ScheduledMessageUpdatedEvent { + String? get cid; + DateTime get createdAt; + Map get custom; + DateTime? get receivedAt; + ScheduledMessageResponse? get scheduledMessage; + String get type; + UserResponseCommonFields get user; + + /// Create a copy of ScheduledMessageUpdatedEvent + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $ScheduledMessageUpdatedEventCopyWith get copyWith => + _$ScheduledMessageUpdatedEventCopyWithImpl( + this as ScheduledMessageUpdatedEvent, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is ScheduledMessageUpdatedEvent && + (identical(other.cid, cid) || other.cid == cid) && + (identical(other.createdAt, createdAt) || other.createdAt == createdAt) && + const DeepCollectionEquality().equals(other.custom, custom) && + (identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt) && + (identical(other.scheduledMessage, scheduledMessage) || other.scheduledMessage == scheduledMessage) && + (identical(other.type, type) || other.type == type) && + (identical(other.user, user) || other.user == user)); + } + + @override + int get hashCode => Object.hash( + runtimeType, + cid, + createdAt, + const DeepCollectionEquality().hash(custom), + receivedAt, + scheduledMessage, + type, + user, + ); + + @override + String toString() { + return 'ScheduledMessageUpdatedEvent(cid: $cid, createdAt: $createdAt, custom: $custom, receivedAt: $receivedAt, scheduledMessage: $scheduledMessage, type: $type, user: $user)'; + } +} + +/// @nodoc +abstract mixin class $ScheduledMessageUpdatedEventCopyWith<$Res> { + factory $ScheduledMessageUpdatedEventCopyWith( + ScheduledMessageUpdatedEvent value, + $Res Function(ScheduledMessageUpdatedEvent) _then, + ) = _$ScheduledMessageUpdatedEventCopyWithImpl; + @useResult + $Res call({ + String? cid, + DateTime createdAt, + Map custom, + DateTime? receivedAt, + ScheduledMessageResponse? scheduledMessage, + String type, + UserResponseCommonFields user, + }); +} + +/// @nodoc +class _$ScheduledMessageUpdatedEventCopyWithImpl<$Res> implements $ScheduledMessageUpdatedEventCopyWith<$Res> { + _$ScheduledMessageUpdatedEventCopyWithImpl(this._self, this._then); + + final ScheduledMessageUpdatedEvent _self; + final $Res Function(ScheduledMessageUpdatedEvent) _then; + + /// Create a copy of ScheduledMessageUpdatedEvent + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? cid = freezed, + Object? createdAt = null, + Object? custom = null, + Object? receivedAt = freezed, + Object? scheduledMessage = freezed, + Object? type = null, + Object? user = null, + }) { + return _then( + ScheduledMessageUpdatedEvent( + cid: freezed == cid + ? _self.cid + : cid // 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, + receivedAt: freezed == receivedAt + ? _self.receivedAt + : receivedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + scheduledMessage: freezed == scheduledMessage + ? _self.scheduledMessage + : scheduledMessage // ignore: cast_nullable_to_non_nullable + as ScheduledMessageResponse?, + type: null == type + ? _self.type + : type // ignore: cast_nullable_to_non_nullable + as String, + user: null == user + ? _self.user + : user // ignore: cast_nullable_to_non_nullable + as UserResponseCommonFields, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/scheduled_message_updated_event.g.dart b/packages/stream_chat/lib/open_api/model/scheduled_message_updated_event.g.dart new file mode 100644 index 0000000000..a08350e1b5 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/scheduled_message_updated_event.g.dart @@ -0,0 +1,53 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'scheduled_message_updated_event.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ScheduledMessageUpdatedEvent _$ScheduledMessageUpdatedEventFromJson( + Map json, +) => ScheduledMessageUpdatedEvent( + cid: json['cid'] as String?, + createdAt: const StreamDateTimeConverter().fromJson( + json['created_at'] as Object, + ), + custom: json['custom'] as Map, + receivedAt: _$JsonConverterFromJson( + json['received_at'], + const StreamDateTimeConverter().fromJson, + ), + scheduledMessage: json['scheduled_message'] == null + ? null + : ScheduledMessageResponse.fromJson( + json['scheduled_message'] as Map, + ), + type: json['type'] as String, + user: UserResponseCommonFields.fromJson(json['user'] as Map), +); + +Map _$ScheduledMessageUpdatedEventToJson( + ScheduledMessageUpdatedEvent instance, +) => { + 'cid': instance.cid, + 'created_at': const StreamDateTimeConverter().toJson(instance.createdAt), + 'custom': instance.custom, + 'received_at': _$JsonConverterToJson( + instance.receivedAt, + const StreamDateTimeConverter().toJson, + ), + 'scheduled_message': instance.scheduledMessage?.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_chat/lib/open_api/model/send_message_request.dart b/packages/stream_chat/lib/open_api/model/send_message_request.dart index 23966cc747..d55db574dd 100644 --- a/packages/stream_chat/lib/open_api/model/send_message_request.dart +++ b/packages/stream_chat/lib/open_api/model/send_message_request.dart @@ -22,6 +22,7 @@ class SendMessageRequest with _$SendMessageRequest { this.includeMentionedMembers, this.keepChannelHidden, required this.message, + this.scheduledAt, this.skipEnrichUrl, this.skipPush, }); @@ -42,6 +43,11 @@ class SendMessageRequest with _$SendMessageRequest { @JsonKey(name: 'message') final MessageRequest message; + @override + @StreamDateTimeConverter() + @JsonKey(name: 'scheduled_at') + final DateTime? scheduledAt; + @override @JsonKey(name: 'skip_enrich_url') final bool? skipEnrichUrl; diff --git a/packages/stream_chat/lib/open_api/model/send_message_request.freezed.dart b/packages/stream_chat/lib/open_api/model/send_message_request.freezed.dart index a2ca5d59aa..66aa6a83a4 100644 --- a/packages/stream_chat/lib/open_api/model/send_message_request.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/send_message_request.freezed.dart @@ -17,6 +17,7 @@ mixin _$SendMessageRequest { bool? get includeMentionedMembers; bool? get keepChannelHidden; MessageRequest get message; + DateTime? get scheduledAt; bool? get skipEnrichUrl; bool? get skipPush; @@ -43,6 +44,7 @@ mixin _$SendMessageRequest { other.includeMentionedMembers == includeMentionedMembers) && (identical(other.keepChannelHidden, keepChannelHidden) || other.keepChannelHidden == keepChannelHidden) && (identical(other.message, message) || other.message == message) && + (identical(other.scheduledAt, scheduledAt) || other.scheduledAt == scheduledAt) && (identical(other.skipEnrichUrl, skipEnrichUrl) || other.skipEnrichUrl == skipEnrichUrl) && (identical(other.skipPush, skipPush) || other.skipPush == skipPush)); } @@ -54,13 +56,14 @@ mixin _$SendMessageRequest { includeMentionedMembers, keepChannelHidden, message, + scheduledAt, skipEnrichUrl, skipPush, ); @override String toString() { - return 'SendMessageRequest(includeChannelContext: $includeChannelContext, includeMentionedMembers: $includeMentionedMembers, keepChannelHidden: $keepChannelHidden, message: $message, skipEnrichUrl: $skipEnrichUrl, skipPush: $skipPush)'; + return 'SendMessageRequest(includeChannelContext: $includeChannelContext, includeMentionedMembers: $includeMentionedMembers, keepChannelHidden: $keepChannelHidden, message: $message, scheduledAt: $scheduledAt, skipEnrichUrl: $skipEnrichUrl, skipPush: $skipPush)'; } } @@ -76,6 +79,7 @@ abstract mixin class $SendMessageRequestCopyWith<$Res> { bool? includeMentionedMembers, bool? keepChannelHidden, MessageRequest message, + DateTime? scheduledAt, bool? skipEnrichUrl, bool? skipPush, }); @@ -97,6 +101,7 @@ class _$SendMessageRequestCopyWithImpl<$Res> implements $SendMessageRequestCopyW Object? includeMentionedMembers = freezed, Object? keepChannelHidden = freezed, Object? message = null, + Object? scheduledAt = freezed, Object? skipEnrichUrl = freezed, Object? skipPush = freezed, }) { @@ -118,6 +123,10 @@ class _$SendMessageRequestCopyWithImpl<$Res> implements $SendMessageRequestCopyW ? _self.message : message // ignore: cast_nullable_to_non_nullable as MessageRequest, + scheduledAt: freezed == scheduledAt + ? _self.scheduledAt + : scheduledAt // ignore: cast_nullable_to_non_nullable + as DateTime?, skipEnrichUrl: freezed == skipEnrichUrl ? _self.skipEnrichUrl : skipEnrichUrl // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/send_message_request.g.dart b/packages/stream_chat/lib/open_api/model/send_message_request.g.dart index 11848d30b6..6051fa1644 100644 --- a/packages/stream_chat/lib/open_api/model/send_message_request.g.dart +++ b/packages/stream_chat/lib/open_api/model/send_message_request.g.dart @@ -11,6 +11,10 @@ SendMessageRequest _$SendMessageRequestFromJson(Map json) => Se includeMentionedMembers: json['include_mentioned_members'] as bool?, keepChannelHidden: json['keep_channel_hidden'] as bool?, message: MessageRequest.fromJson(json['message'] as Map), + scheduledAt: _$JsonConverterFromJson( + json['scheduled_at'], + const StreamDateTimeConverter().fromJson, + ), skipEnrichUrl: json['skip_enrich_url'] as bool?, skipPush: json['skip_push'] as bool?, ); @@ -20,6 +24,20 @@ Map _$SendMessageRequestToJson(SendMessageRequest instance) => 'include_mentioned_members': instance.includeMentionedMembers, 'keep_channel_hidden': instance.keepChannelHidden, 'message': instance.message.toJson(), + 'scheduled_at': _$JsonConverterToJson( + instance.scheduledAt, + const StreamDateTimeConverter().toJson, + ), 'skip_enrich_url': instance.skipEnrichUrl, 'skip_push': instance.skipPush, }; + +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_chat/lib/open_api/model/send_message_response.dart b/packages/stream_chat/lib/open_api/model/send_message_response.dart index 1d9725446d..888d8222d8 100644 --- a/packages/stream_chat/lib/open_api/model/send_message_response.dart +++ b/packages/stream_chat/lib/open_api/model/send_message_response.dart @@ -22,6 +22,7 @@ class SendMessageResponse with _$SendMessageResponse { required this.duration, this.mentionedMembers, required this.message, + this.scheduledMessage, }); @override @@ -40,6 +41,10 @@ class SendMessageResponse with _$SendMessageResponse { @JsonKey(name: 'message') final MessageResponse message; + @override + @JsonKey(name: 'scheduled_message') + final ScheduledMessageResponse? scheduledMessage; + Map toJson() => _$SendMessageResponseToJson(this); static SendMessageResponse fromJson(Map json) => _$SendMessageResponseFromJson(json); diff --git a/packages/stream_chat/lib/open_api/model/send_message_response.freezed.dart b/packages/stream_chat/lib/open_api/model/send_message_response.freezed.dart index 687f59dff5..dfef3c9e5e 100644 --- a/packages/stream_chat/lib/open_api/model/send_message_response.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/send_message_response.freezed.dart @@ -17,6 +17,7 @@ mixin _$SendMessageResponse { String get duration; Map? get mentionedMembers; MessageResponse get message; + ScheduledMessageResponse? get scheduledMessage; /// Create a copy of SendMessageResponse /// with the given fields replaced by the non-null parameter values. @@ -39,7 +40,8 @@ mixin _$SendMessageResponse { other.mentionedMembers, mentionedMembers, ) && - (identical(other.message, message) || other.message == message)); + (identical(other.message, message) || other.message == message) && + (identical(other.scheduledMessage, scheduledMessage) || other.scheduledMessage == scheduledMessage)); } @override @@ -49,11 +51,12 @@ mixin _$SendMessageResponse { duration, const DeepCollectionEquality().hash(mentionedMembers), message, + scheduledMessage, ); @override String toString() { - return 'SendMessageResponse(channelContext: $channelContext, duration: $duration, mentionedMembers: $mentionedMembers, message: $message)'; + return 'SendMessageResponse(channelContext: $channelContext, duration: $duration, mentionedMembers: $mentionedMembers, message: $message, scheduledMessage: $scheduledMessage)'; } } @@ -69,6 +72,7 @@ abstract mixin class $SendMessageResponseCopyWith<$Res> { String duration, Map? mentionedMembers, MessageResponse message, + ScheduledMessageResponse? scheduledMessage, }); } @@ -88,6 +92,7 @@ class _$SendMessageResponseCopyWithImpl<$Res> implements $SendMessageResponseCop Object? duration = null, Object? mentionedMembers = freezed, Object? message = null, + Object? scheduledMessage = freezed, }) { return _then( SendMessageResponse( @@ -107,6 +112,10 @@ class _$SendMessageResponseCopyWithImpl<$Res> implements $SendMessageResponseCop ? _self.message : message // ignore: cast_nullable_to_non_nullable as MessageResponse, + scheduledMessage: freezed == scheduledMessage + ? _self.scheduledMessage + : scheduledMessage // ignore: cast_nullable_to_non_nullable + as ScheduledMessageResponse?, ), ); } diff --git a/packages/stream_chat/lib/open_api/model/send_message_response.g.dart b/packages/stream_chat/lib/open_api/model/send_message_response.g.dart index 87ee861ea6..f0abc80bfc 100644 --- a/packages/stream_chat/lib/open_api/model/send_message_response.g.dart +++ b/packages/stream_chat/lib/open_api/model/send_message_response.g.dart @@ -17,6 +17,11 @@ SendMessageResponse _$SendMessageResponseFromJson(Map json) => message: MessageResponse.fromJson( json['message'] as Map, ), + scheduledMessage: json['scheduled_message'] == null + ? null + : ScheduledMessageResponse.fromJson( + json['scheduled_message'] as Map, + ), ); Map _$SendMessageResponseToJson( @@ -26,4 +31,5 @@ Map _$SendMessageResponseToJson( 'duration': instance.duration, 'mentioned_members': instance.mentionedMembers, 'message': instance.message.toJson(), + 'scheduled_message': instance.scheduledMessage?.toJson(), }; diff --git a/packages/stream_chat/lib/open_api/model/submit_action_request.dart b/packages/stream_chat/lib/open_api/model/submit_action_request.dart index 89a9ac9e05..60b271765e 100644 --- a/packages/stream_chat/lib/open_api/model/submit_action_request.dart +++ b/packages/stream_chat/lib/open_api/model/submit_action_request.dart @@ -22,6 +22,9 @@ extension type const SubmitActionRequestActionType._(String _) implements String static const deleteActivity = SubmitActionRequestActionType._('delete_activity'); static const deleteComment = SubmitActionRequestActionType._('delete_comment'); static const deleteMessage = SubmitActionRequestActionType._('delete_message'); + static const deletePoll = SubmitActionRequestActionType._('delete_poll'); + static const deletePollAnswer = SubmitActionRequestActionType._('delete_poll_answer'); + static const deletePollOption = SubmitActionRequestActionType._('delete_poll_option'); static const deleteReaction = SubmitActionRequestActionType._('delete_reaction'); static const deleteUser = SubmitActionRequestActionType._('delete_user'); static const deleteUserMessages = SubmitActionRequestActionType._('delete_user_messages'); @@ -56,6 +59,9 @@ class SubmitActionRequest with _$SubmitActionRequest { this.deleteActivity, this.deleteComment, this.deleteMessage, + this.deletePoll, + this.deletePollAnswer, + this.deletePollOption, this.deleteReaction, this.deleteUser, this.deleteUserMessages, @@ -106,6 +112,18 @@ class SubmitActionRequest with _$SubmitActionRequest { @JsonKey(name: 'delete_message') final DeleteMessageRequestPayload? deleteMessage; + @override + @JsonKey(name: 'delete_poll') + final DeletePollRequestPayload? deletePoll; + + @override + @JsonKey(name: 'delete_poll_answer') + final DeletePollAnswerRequestPayload? deletePollAnswer; + + @override + @JsonKey(name: 'delete_poll_option') + final DeletePollOptionRequestPayload? deletePollOption; + @override @JsonKey(name: 'delete_reaction') final DeleteReactionRequestPayload? deleteReaction; diff --git a/packages/stream_chat/lib/open_api/model/submit_action_request.freezed.dart b/packages/stream_chat/lib/open_api/model/submit_action_request.freezed.dart index 05a9446ed0..2a8e645605 100644 --- a/packages/stream_chat/lib/open_api/model/submit_action_request.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/submit_action_request.freezed.dart @@ -22,6 +22,9 @@ mixin _$SubmitActionRequest { DeleteActivityRequestPayload? get deleteActivity; DeleteCommentRequestPayload? get deleteComment; DeleteMessageRequestPayload? get deleteMessage; + DeletePollRequestPayload? get deletePoll; + DeletePollAnswerRequestPayload? get deletePollAnswer; + DeletePollOptionRequestPayload? get deletePollOption; DeleteReactionRequestPayload? get deleteReaction; DeleteUserRequestPayload? get deleteUser; DeleteUserMessagesRequestPayload? get deleteUserMessages; @@ -59,6 +62,9 @@ mixin _$SubmitActionRequest { (identical(other.deleteActivity, deleteActivity) || other.deleteActivity == deleteActivity) && (identical(other.deleteComment, deleteComment) || other.deleteComment == deleteComment) && (identical(other.deleteMessage, deleteMessage) || other.deleteMessage == deleteMessage) && + (identical(other.deletePoll, deletePoll) || other.deletePoll == deletePoll) && + (identical(other.deletePollAnswer, deletePollAnswer) || other.deletePollAnswer == deletePollAnswer) && + (identical(other.deletePollOption, deletePollOption) || other.deletePollOption == deletePollOption) && (identical(other.deleteReaction, deleteReaction) || other.deleteReaction == deleteReaction) && (identical(other.deleteUser, deleteUser) || other.deleteUser == deleteUser) && (identical(other.deleteUserMessages, deleteUserMessages) || @@ -86,6 +92,9 @@ mixin _$SubmitActionRequest { deleteActivity, deleteComment, deleteMessage, + deletePoll, + deletePollAnswer, + deletePollOption, deleteReaction, deleteUser, deleteUserMessages, @@ -102,7 +111,7 @@ mixin _$SubmitActionRequest { @override String toString() { - return 'SubmitActionRequest(actionType: $actionType, appealId: $appealId, ban: $ban, block: $block, bypass: $bypass, custom: $custom, deleteActivity: $deleteActivity, deleteComment: $deleteComment, deleteMessage: $deleteMessage, deleteReaction: $deleteReaction, deleteUser: $deleteUser, deleteUserMessages: $deleteUserMessages, escalate: $escalate, flag: $flag, itemId: $itemId, markReviewed: $markReviewed, rejectAppeal: $rejectAppeal, restore: $restore, shadowBlock: $shadowBlock, unban: $unban, unblock: $unblock)'; + return 'SubmitActionRequest(actionType: $actionType, appealId: $appealId, ban: $ban, block: $block, bypass: $bypass, custom: $custom, deleteActivity: $deleteActivity, deleteComment: $deleteComment, deleteMessage: $deleteMessage, deletePoll: $deletePoll, deletePollAnswer: $deletePollAnswer, deletePollOption: $deletePollOption, deleteReaction: $deleteReaction, deleteUser: $deleteUser, deleteUserMessages: $deleteUserMessages, escalate: $escalate, flag: $flag, itemId: $itemId, markReviewed: $markReviewed, rejectAppeal: $rejectAppeal, restore: $restore, shadowBlock: $shadowBlock, unban: $unban, unblock: $unblock)'; } } @@ -123,6 +132,9 @@ abstract mixin class $SubmitActionRequestCopyWith<$Res> { DeleteActivityRequestPayload? deleteActivity, DeleteCommentRequestPayload? deleteComment, DeleteMessageRequestPayload? deleteMessage, + DeletePollRequestPayload? deletePoll, + DeletePollAnswerRequestPayload? deletePollAnswer, + DeletePollOptionRequestPayload? deletePollOption, DeleteReactionRequestPayload? deleteReaction, DeleteUserRequestPayload? deleteUser, DeleteUserMessagesRequestPayload? deleteUserMessages, @@ -159,6 +171,9 @@ class _$SubmitActionRequestCopyWithImpl<$Res> implements $SubmitActionRequestCop Object? deleteActivity = freezed, Object? deleteComment = freezed, Object? deleteMessage = freezed, + Object? deletePoll = freezed, + Object? deletePollAnswer = freezed, + Object? deletePollOption = freezed, Object? deleteReaction = freezed, Object? deleteUser = freezed, Object? deleteUserMessages = freezed, @@ -210,6 +225,18 @@ class _$SubmitActionRequestCopyWithImpl<$Res> implements $SubmitActionRequestCop ? _self.deleteMessage : deleteMessage // ignore: cast_nullable_to_non_nullable as DeleteMessageRequestPayload?, + deletePoll: freezed == deletePoll + ? _self.deletePoll + : deletePoll // ignore: cast_nullable_to_non_nullable + as DeletePollRequestPayload?, + deletePollAnswer: freezed == deletePollAnswer + ? _self.deletePollAnswer + : deletePollAnswer // ignore: cast_nullable_to_non_nullable + as DeletePollAnswerRequestPayload?, + deletePollOption: freezed == deletePollOption + ? _self.deletePollOption + : deletePollOption // ignore: cast_nullable_to_non_nullable + as DeletePollOptionRequestPayload?, deleteReaction: freezed == deleteReaction ? _self.deleteReaction : deleteReaction // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/submit_action_request.g.dart b/packages/stream_chat/lib/open_api/model/submit_action_request.g.dart index 14e1ed51cb..7dde74173e 100644 --- a/packages/stream_chat/lib/open_api/model/submit_action_request.g.dart +++ b/packages/stream_chat/lib/open_api/model/submit_action_request.g.dart @@ -40,6 +40,21 @@ SubmitActionRequest _$SubmitActionRequestFromJson( : DeleteMessageRequestPayload.fromJson( json['delete_message'] as Map, ), + deletePoll: json['delete_poll'] == null + ? null + : DeletePollRequestPayload.fromJson( + json['delete_poll'] as Map, + ), + deletePollAnswer: json['delete_poll_answer'] == null + ? null + : DeletePollAnswerRequestPayload.fromJson( + json['delete_poll_answer'] as Map, + ), + deletePollOption: json['delete_poll_option'] == null + ? null + : DeletePollOptionRequestPayload.fromJson( + json['delete_poll_option'] as Map, + ), deleteReaction: json['delete_reaction'] == null ? null : DeleteReactionRequestPayload.fromJson( @@ -102,6 +117,9 @@ Map _$SubmitActionRequestToJson( 'delete_activity': instance.deleteActivity?.toJson(), 'delete_comment': instance.deleteComment?.toJson(), 'delete_message': instance.deleteMessage?.toJson(), + 'delete_poll': instance.deletePoll?.toJson(), + 'delete_poll_answer': instance.deletePollAnswer?.toJson(), + 'delete_poll_option': instance.deletePollOption?.toJson(), 'delete_reaction': instance.deleteReaction?.toJson(), 'delete_user': instance.deleteUser?.toJson(), 'delete_user_messages': instance.deleteUserMessages?.toJson(), diff --git a/packages/stream_chat/lib/open_api/model/user_channel_ban_count_rule_parameters.dart b/packages/stream_chat/lib/open_api/model/user_channel_ban_count_rule_parameters.dart new file mode 100644 index 0000000000..b9794a68a3 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/user_channel_ban_count_rule_parameters.dart @@ -0,0 +1,42 @@ +// 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, sort_constructors_first, provide_deprecation_message + +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 'user_channel_ban_count_rule_parameters.g.dart'; +part 'user_channel_ban_count_rule_parameters.freezed.dart'; + +@freezed +@immutable +@JsonSerializable() +class UserChannelBanCountRuleParameters with _$UserChannelBanCountRuleParameters { + const UserChannelBanCountRuleParameters({ + this.bannedBy, + this.threshold, + this.timeWindow, + }); + + @override + @JsonKey(name: 'banned_by') + final String? bannedBy; + + @override + @JsonKey(name: 'threshold') + final int? threshold; + + @override + @JsonKey(name: 'time_window') + final String? timeWindow; + + Map toJson() => _$UserChannelBanCountRuleParametersToJson(this); + + static UserChannelBanCountRuleParameters fromJson(Map json) => + _$UserChannelBanCountRuleParametersFromJson(json); +} diff --git a/packages/stream_chat/lib/open_api/model/user_channel_ban_count_rule_parameters.freezed.dart b/packages/stream_chat/lib/open_api/model/user_channel_ban_count_rule_parameters.freezed.dart new file mode 100644 index 0000000000..1b8b1e4240 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/user_channel_ban_count_rule_parameters.freezed.dart @@ -0,0 +1,93 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// 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 'user_channel_ban_count_rule_parameters.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +/// @nodoc +mixin _$UserChannelBanCountRuleParameters { + String? get bannedBy; + int? get threshold; + String? get timeWindow; + + /// Create a copy of UserChannelBanCountRuleParameters + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + $UserChannelBanCountRuleParametersCopyWith get copyWith => + _$UserChannelBanCountRuleParametersCopyWithImpl( + this as UserChannelBanCountRuleParameters, + _$identity, + ); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is UserChannelBanCountRuleParameters && + (identical(other.bannedBy, bannedBy) || other.bannedBy == bannedBy) && + (identical(other.threshold, threshold) || other.threshold == threshold) && + (identical(other.timeWindow, timeWindow) || other.timeWindow == timeWindow)); + } + + @override + int get hashCode => Object.hash(runtimeType, bannedBy, threshold, timeWindow); + + @override + String toString() { + return 'UserChannelBanCountRuleParameters(bannedBy: $bannedBy, threshold: $threshold, timeWindow: $timeWindow)'; + } +} + +/// @nodoc +abstract mixin class $UserChannelBanCountRuleParametersCopyWith<$Res> { + factory $UserChannelBanCountRuleParametersCopyWith( + UserChannelBanCountRuleParameters value, + $Res Function(UserChannelBanCountRuleParameters) _then, + ) = _$UserChannelBanCountRuleParametersCopyWithImpl; + @useResult + $Res call({String? bannedBy, int? threshold, String? timeWindow}); +} + +/// @nodoc +class _$UserChannelBanCountRuleParametersCopyWithImpl<$Res> + implements $UserChannelBanCountRuleParametersCopyWith<$Res> { + _$UserChannelBanCountRuleParametersCopyWithImpl(this._self, this._then); + + final UserChannelBanCountRuleParameters _self; + final $Res Function(UserChannelBanCountRuleParameters) _then; + + /// Create a copy of UserChannelBanCountRuleParameters + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? bannedBy = freezed, + Object? threshold = freezed, + Object? timeWindow = freezed, + }) { + return _then( + UserChannelBanCountRuleParameters( + bannedBy: freezed == bannedBy + ? _self.bannedBy + : bannedBy // ignore: cast_nullable_to_non_nullable + as String?, + threshold: freezed == threshold + ? _self.threshold + : threshold // ignore: cast_nullable_to_non_nullable + as int?, + timeWindow: freezed == timeWindow + ? _self.timeWindow + : timeWindow // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); + } +} diff --git a/packages/stream_chat/lib/open_api/model/user_channel_ban_count_rule_parameters.g.dart b/packages/stream_chat/lib/open_api/model/user_channel_ban_count_rule_parameters.g.dart new file mode 100644 index 0000000000..fab06d6518 --- /dev/null +++ b/packages/stream_chat/lib/open_api/model/user_channel_ban_count_rule_parameters.g.dart @@ -0,0 +1,23 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_channel_ban_count_rule_parameters.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserChannelBanCountRuleParameters _$UserChannelBanCountRuleParametersFromJson( + Map json, +) => UserChannelBanCountRuleParameters( + bannedBy: json['banned_by'] as String?, + threshold: (json['threshold'] as num?)?.toInt(), + timeWindow: json['time_window'] as String?, +); + +Map _$UserChannelBanCountRuleParametersToJson( + UserChannelBanCountRuleParameters instance, +) => { + 'banned_by': instance.bannedBy, + 'threshold': instance.threshold, + 'time_window': instance.timeWindow, +}; diff --git a/packages/stream_chat/lib/open_api/model/user_response.dart b/packages/stream_chat/lib/open_api/model/user_response.dart index cc273cefe4..dad5043eb4 100644 --- a/packages/stream_chat/lib/open_api/model/user_response.dart +++ b/packages/stream_chat/lib/open_api/model/user_response.dart @@ -31,7 +31,6 @@ class UserResponse with _$UserResponse { this.lastActive, this.name, required this.online, - this.revokeTokensIssuedBefore, required this.role, required this.teams, this.teamsRole, @@ -94,11 +93,6 @@ class UserResponse with _$UserResponse { @JsonKey(name: 'online') final bool online; - @override - @StreamDateTimeConverter() - @JsonKey(name: 'revoke_tokens_issued_before') - final DateTime? revokeTokensIssuedBefore; - @override @JsonKey(name: 'role') final String role; diff --git a/packages/stream_chat/lib/open_api/model/user_response.freezed.dart b/packages/stream_chat/lib/open_api/model/user_response.freezed.dart index da09a7d534..73acd6e99d 100644 --- a/packages/stream_chat/lib/open_api/model/user_response.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/user_response.freezed.dart @@ -26,7 +26,6 @@ mixin _$UserResponse { DateTime? get lastActive; String? get name; bool get online; - DateTime? get revokeTokensIssuedBefore; String get role; List get teams; Map? get teamsRole; @@ -62,11 +61,6 @@ mixin _$UserResponse { (identical(other.lastActive, lastActive) || other.lastActive == lastActive) && (identical(other.name, name) || other.name == name) && (identical(other.online, online) || other.online == online) && - (identical( - other.revokeTokensIssuedBefore, - revokeTokensIssuedBefore, - ) || - other.revokeTokensIssuedBefore == revokeTokensIssuedBefore) && (identical(other.role, role) || other.role == role) && const DeepCollectionEquality().equals(other.teams, teams) && const DeepCollectionEquality().equals(other.teamsRole, teamsRole) && @@ -89,7 +83,6 @@ mixin _$UserResponse { lastActive, name, online, - revokeTokensIssuedBefore, role, const DeepCollectionEquality().hash(teams), const DeepCollectionEquality().hash(teamsRole), @@ -98,7 +91,7 @@ mixin _$UserResponse { @override String toString() { - return 'UserResponse(avgResponseTime: $avgResponseTime, banned: $banned, blockedUserIds: $blockedUserIds, createdAt: $createdAt, custom: $custom, deactivatedAt: $deactivatedAt, deletedAt: $deletedAt, id: $id, image: $image, language: $language, lastActive: $lastActive, name: $name, online: $online, revokeTokensIssuedBefore: $revokeTokensIssuedBefore, role: $role, teams: $teams, teamsRole: $teamsRole, updatedAt: $updatedAt)'; + return 'UserResponse(avgResponseTime: $avgResponseTime, banned: $banned, blockedUserIds: $blockedUserIds, createdAt: $createdAt, custom: $custom, deactivatedAt: $deactivatedAt, deletedAt: $deletedAt, id: $id, image: $image, language: $language, lastActive: $lastActive, name: $name, online: $online, role: $role, teams: $teams, teamsRole: $teamsRole, updatedAt: $updatedAt)'; } } @@ -123,7 +116,6 @@ abstract mixin class $UserResponseCopyWith<$Res> { DateTime? lastActive, String? name, bool online, - DateTime? revokeTokensIssuedBefore, String role, List teams, Map? teamsRole, @@ -156,7 +148,6 @@ class _$UserResponseCopyWithImpl<$Res> implements $UserResponseCopyWith<$Res> { Object? lastActive = freezed, Object? name = freezed, Object? online = null, - Object? revokeTokensIssuedBefore = freezed, Object? role = null, Object? teams = null, Object? teamsRole = freezed, @@ -216,10 +207,6 @@ class _$UserResponseCopyWithImpl<$Res> implements $UserResponseCopyWith<$Res> { ? _self.online : online // ignore: cast_nullable_to_non_nullable as bool, - revokeTokensIssuedBefore: freezed == revokeTokensIssuedBefore - ? _self.revokeTokensIssuedBefore - : revokeTokensIssuedBefore // ignore: cast_nullable_to_non_nullable - as DateTime?, role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/user_response.g.dart b/packages/stream_chat/lib/open_api/model/user_response.g.dart index 55c0695ba6..b2bf26c21c 100644 --- a/packages/stream_chat/lib/open_api/model/user_response.g.dart +++ b/packages/stream_chat/lib/open_api/model/user_response.g.dart @@ -31,10 +31,6 @@ UserResponse _$UserResponseFromJson(Map json) => UserResponse( ), name: json['name'] as String?, online: json['online'] as bool, - revokeTokensIssuedBefore: _$JsonConverterFromJson( - json['revoke_tokens_issued_before'], - const StreamDateTimeConverter().fromJson, - ), role: json['role'] as String, teams: (json['teams'] as List).map((e) => e as String).toList(), teamsRole: (json['teams_role'] as Map?)?.map( @@ -68,10 +64,6 @@ Map _$UserResponseToJson(UserResponse instance) => ( - instance.revokeTokensIssuedBefore, - const StreamDateTimeConverter().toJson, - ), 'role': instance.role, 'teams': instance.teams, 'teams_role': instance.teamsRole, diff --git a/packages/stream_chat/lib/open_api/model/user_response_common_fields.dart b/packages/stream_chat/lib/open_api/model/user_response_common_fields.dart index 5da12dfeaf..2eb220a8fd 100644 --- a/packages/stream_chat/lib/open_api/model/user_response_common_fields.dart +++ b/packages/stream_chat/lib/open_api/model/user_response_common_fields.dart @@ -31,7 +31,6 @@ class UserResponseCommonFields with _$UserResponseCommonFields { this.lastActive, this.name, required this.online, - this.revokeTokensIssuedBefore, required this.role, required this.teams, this.teamsRole, @@ -94,11 +93,6 @@ class UserResponseCommonFields with _$UserResponseCommonFields { @JsonKey(name: 'online') final bool online; - @override - @StreamDateTimeConverter() - @JsonKey(name: 'revoke_tokens_issued_before') - final DateTime? revokeTokensIssuedBefore; - @override @JsonKey(name: 'role') final String role; diff --git a/packages/stream_chat/lib/open_api/model/user_response_common_fields.freezed.dart b/packages/stream_chat/lib/open_api/model/user_response_common_fields.freezed.dart index c1ff34cef1..39c0219a1e 100644 --- a/packages/stream_chat/lib/open_api/model/user_response_common_fields.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/user_response_common_fields.freezed.dart @@ -26,7 +26,6 @@ mixin _$UserResponseCommonFields { DateTime? get lastActive; String? get name; bool get online; - DateTime? get revokeTokensIssuedBefore; String get role; List get teams; Map? get teamsRole; @@ -63,11 +62,6 @@ mixin _$UserResponseCommonFields { (identical(other.lastActive, lastActive) || other.lastActive == lastActive) && (identical(other.name, name) || other.name == name) && (identical(other.online, online) || other.online == online) && - (identical( - other.revokeTokensIssuedBefore, - revokeTokensIssuedBefore, - ) || - other.revokeTokensIssuedBefore == revokeTokensIssuedBefore) && (identical(other.role, role) || other.role == role) && const DeepCollectionEquality().equals(other.teams, teams) && const DeepCollectionEquality().equals(other.teamsRole, teamsRole) && @@ -90,7 +84,6 @@ mixin _$UserResponseCommonFields { lastActive, name, online, - revokeTokensIssuedBefore, role, const DeepCollectionEquality().hash(teams), const DeepCollectionEquality().hash(teamsRole), @@ -99,7 +92,7 @@ mixin _$UserResponseCommonFields { @override String toString() { - return 'UserResponseCommonFields(avgResponseTime: $avgResponseTime, banned: $banned, blockedUserIds: $blockedUserIds, createdAt: $createdAt, custom: $custom, deactivatedAt: $deactivatedAt, deletedAt: $deletedAt, id: $id, image: $image, language: $language, lastActive: $lastActive, name: $name, online: $online, revokeTokensIssuedBefore: $revokeTokensIssuedBefore, role: $role, teams: $teams, teamsRole: $teamsRole, updatedAt: $updatedAt)'; + return 'UserResponseCommonFields(avgResponseTime: $avgResponseTime, banned: $banned, blockedUserIds: $blockedUserIds, createdAt: $createdAt, custom: $custom, deactivatedAt: $deactivatedAt, deletedAt: $deletedAt, id: $id, image: $image, language: $language, lastActive: $lastActive, name: $name, online: $online, role: $role, teams: $teams, teamsRole: $teamsRole, updatedAt: $updatedAt)'; } } @@ -124,7 +117,6 @@ abstract mixin class $UserResponseCommonFieldsCopyWith<$Res> { DateTime? lastActive, String? name, bool online, - DateTime? revokeTokensIssuedBefore, String role, List teams, Map? teamsRole, @@ -157,7 +149,6 @@ class _$UserResponseCommonFieldsCopyWithImpl<$Res> implements $UserResponseCommo Object? lastActive = freezed, Object? name = freezed, Object? online = null, - Object? revokeTokensIssuedBefore = freezed, Object? role = null, Object? teams = null, Object? teamsRole = freezed, @@ -217,10 +208,6 @@ class _$UserResponseCommonFieldsCopyWithImpl<$Res> implements $UserResponseCommo ? _self.online : online // ignore: cast_nullable_to_non_nullable as bool, - revokeTokensIssuedBefore: freezed == revokeTokensIssuedBefore - ? _self.revokeTokensIssuedBefore - : revokeTokensIssuedBefore // ignore: cast_nullable_to_non_nullable - as DateTime?, role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/user_response_common_fields.g.dart b/packages/stream_chat/lib/open_api/model/user_response_common_fields.g.dart index 4fdc7cd44f..409f8128a7 100644 --- a/packages/stream_chat/lib/open_api/model/user_response_common_fields.g.dart +++ b/packages/stream_chat/lib/open_api/model/user_response_common_fields.g.dart @@ -33,10 +33,6 @@ UserResponseCommonFields _$UserResponseCommonFieldsFromJson( ), name: json['name'] as String?, online: json['online'] as bool, - revokeTokensIssuedBefore: _$JsonConverterFromJson( - json['revoke_tokens_issued_before'], - const StreamDateTimeConverter().fromJson, - ), role: json['role'] as String, teams: (json['teams'] as List).map((e) => e as String).toList(), teamsRole: (json['teams_role'] as Map?)?.map( @@ -72,10 +68,6 @@ Map _$UserResponseCommonFieldsToJson( ), 'name': instance.name, 'online': instance.online, - 'revoke_tokens_issued_before': _$JsonConverterToJson( - instance.revokeTokensIssuedBefore, - const StreamDateTimeConverter().toJson, - ), 'role': instance.role, 'teams': instance.teams, 'teams_role': instance.teamsRole, diff --git a/packages/stream_chat/lib/open_api/model/user_response_privacy_fields.dart b/packages/stream_chat/lib/open_api/model/user_response_privacy_fields.dart index c13084e3bf..11937928c2 100644 --- a/packages/stream_chat/lib/open_api/model/user_response_privacy_fields.dart +++ b/packages/stream_chat/lib/open_api/model/user_response_privacy_fields.dart @@ -33,7 +33,6 @@ class UserResponsePrivacyFields with _$UserResponsePrivacyFields { this.name, required this.online, this.privacySettings, - this.revokeTokensIssuedBefore, required this.role, required this.teams, this.teamsRole, @@ -104,11 +103,6 @@ class UserResponsePrivacyFields with _$UserResponsePrivacyFields { @JsonKey(name: 'privacy_settings') final PrivacySettingsResponse? privacySettings; - @override - @StreamDateTimeConverter() - @JsonKey(name: 'revoke_tokens_issued_before') - final DateTime? revokeTokensIssuedBefore; - @override @JsonKey(name: 'role') final String role; diff --git a/packages/stream_chat/lib/open_api/model/user_response_privacy_fields.freezed.dart b/packages/stream_chat/lib/open_api/model/user_response_privacy_fields.freezed.dart index e8ff94efc8..946fc625d4 100644 --- a/packages/stream_chat/lib/open_api/model/user_response_privacy_fields.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/user_response_privacy_fields.freezed.dart @@ -28,7 +28,6 @@ mixin _$UserResponsePrivacyFields { String? get name; bool get online; PrivacySettingsResponse? get privacySettings; - DateTime? get revokeTokensIssuedBefore; String get role; List get teams; Map? get teamsRole; @@ -67,11 +66,6 @@ mixin _$UserResponsePrivacyFields { (identical(other.name, name) || other.name == name) && (identical(other.online, online) || other.online == online) && (identical(other.privacySettings, privacySettings) || other.privacySettings == privacySettings) && - (identical( - other.revokeTokensIssuedBefore, - revokeTokensIssuedBefore, - ) || - other.revokeTokensIssuedBefore == revokeTokensIssuedBefore) && (identical(other.role, role) || other.role == role) && const DeepCollectionEquality().equals(other.teams, teams) && const DeepCollectionEquality().equals(other.teamsRole, teamsRole) && @@ -96,7 +90,6 @@ mixin _$UserResponsePrivacyFields { name, online, privacySettings, - revokeTokensIssuedBefore, role, const DeepCollectionEquality().hash(teams), const DeepCollectionEquality().hash(teamsRole), @@ -105,7 +98,7 @@ mixin _$UserResponsePrivacyFields { @override String toString() { - return 'UserResponsePrivacyFields(avgResponseTime: $avgResponseTime, banned: $banned, blockedUserIds: $blockedUserIds, createdAt: $createdAt, custom: $custom, deactivatedAt: $deactivatedAt, deletedAt: $deletedAt, id: $id, image: $image, invisible: $invisible, language: $language, lastActive: $lastActive, name: $name, online: $online, privacySettings: $privacySettings, revokeTokensIssuedBefore: $revokeTokensIssuedBefore, role: $role, teams: $teams, teamsRole: $teamsRole, updatedAt: $updatedAt)'; + return 'UserResponsePrivacyFields(avgResponseTime: $avgResponseTime, banned: $banned, blockedUserIds: $blockedUserIds, createdAt: $createdAt, custom: $custom, deactivatedAt: $deactivatedAt, deletedAt: $deletedAt, id: $id, image: $image, invisible: $invisible, language: $language, lastActive: $lastActive, name: $name, online: $online, privacySettings: $privacySettings, role: $role, teams: $teams, teamsRole: $teamsRole, updatedAt: $updatedAt)'; } } @@ -132,7 +125,6 @@ abstract mixin class $UserResponsePrivacyFieldsCopyWith<$Res> { String? name, bool online, PrivacySettingsResponse? privacySettings, - DateTime? revokeTokensIssuedBefore, String role, List teams, Map? teamsRole, @@ -167,7 +159,6 @@ class _$UserResponsePrivacyFieldsCopyWithImpl<$Res> implements $UserResponsePriv Object? name = freezed, Object? online = null, Object? privacySettings = freezed, - Object? revokeTokensIssuedBefore = freezed, Object? role = null, Object? teams = null, Object? teamsRole = freezed, @@ -235,10 +226,6 @@ class _$UserResponsePrivacyFieldsCopyWithImpl<$Res> implements $UserResponsePriv ? _self.privacySettings : privacySettings // ignore: cast_nullable_to_non_nullable as PrivacySettingsResponse?, - revokeTokensIssuedBefore: freezed == revokeTokensIssuedBefore - ? _self.revokeTokensIssuedBefore - : revokeTokensIssuedBefore // ignore: cast_nullable_to_non_nullable - as DateTime?, role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/user_response_privacy_fields.g.dart b/packages/stream_chat/lib/open_api/model/user_response_privacy_fields.g.dart index cb03486484..2f296dcb2d 100644 --- a/packages/stream_chat/lib/open_api/model/user_response_privacy_fields.g.dart +++ b/packages/stream_chat/lib/open_api/model/user_response_privacy_fields.g.dart @@ -39,10 +39,6 @@ UserResponsePrivacyFields _$UserResponsePrivacyFieldsFromJson( : PrivacySettingsResponse.fromJson( json['privacy_settings'] as Map, ), - revokeTokensIssuedBefore: _$JsonConverterFromJson( - json['revoke_tokens_issued_before'], - const StreamDateTimeConverter().fromJson, - ), role: json['role'] as String, teams: (json['teams'] as List).map((e) => e as String).toList(), teamsRole: (json['teams_role'] as Map?)?.map( @@ -80,10 +76,6 @@ Map _$UserResponsePrivacyFieldsToJson( 'name': instance.name, 'online': instance.online, 'privacy_settings': instance.privacySettings?.toJson(), - 'revoke_tokens_issued_before': _$JsonConverterToJson( - instance.revokeTokensIssuedBefore, - const StreamDateTimeConverter().toJson, - ), 'role': instance.role, 'teams': instance.teams, 'teams_role': instance.teamsRole, diff --git a/packages/stream_chat/lib/open_api/model/ws_auth_message.dart b/packages/stream_chat/lib/open_api/model/ws_auth_message.dart index a1ab001eae..d71715114e 100644 --- a/packages/stream_chat/lib/open_api/model/ws_auth_message.dart +++ b/packages/stream_chat/lib/open_api/model/ws_auth_message.dart @@ -28,11 +28,16 @@ extension type const WSAuthMessageProducts._(String _) implements String { @JsonSerializable() class WSAuthMessage with _$WSAuthMessage { const WSAuthMessage({ + this.eventProtocol, this.memberCustomInclude, this.products, required this.token, }); + @override + @JsonKey(name: 'event_protocol') + final int? eventProtocol; + @override @JsonKey(name: 'member_custom_include') final List? memberCustomInclude; diff --git a/packages/stream_chat/lib/open_api/model/ws_auth_message.freezed.dart b/packages/stream_chat/lib/open_api/model/ws_auth_message.freezed.dart index 248bf0f950..dc7dd12307 100644 --- a/packages/stream_chat/lib/open_api/model/ws_auth_message.freezed.dart +++ b/packages/stream_chat/lib/open_api/model/ws_auth_message.freezed.dart @@ -13,6 +13,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$WSAuthMessage { + int? get eventProtocol; List? get memberCustomInclude; List? get products; String get token; @@ -31,6 +32,7 @@ mixin _$WSAuthMessage { return identical(this, other) || (other.runtimeType == runtimeType && other is WSAuthMessage && + (identical(other.eventProtocol, eventProtocol) || other.eventProtocol == eventProtocol) && const DeepCollectionEquality().equals( other.memberCustomInclude, memberCustomInclude, @@ -42,6 +44,7 @@ mixin _$WSAuthMessage { @override int get hashCode => Object.hash( runtimeType, + eventProtocol, const DeepCollectionEquality().hash(memberCustomInclude), const DeepCollectionEquality().hash(products), token, @@ -49,7 +52,7 @@ mixin _$WSAuthMessage { @override String toString() { - return 'WSAuthMessage(memberCustomInclude: $memberCustomInclude, products: $products, token: $token)'; + return 'WSAuthMessage(eventProtocol: $eventProtocol, memberCustomInclude: $memberCustomInclude, products: $products, token: $token)'; } } @@ -61,6 +64,7 @@ abstract mixin class $WSAuthMessageCopyWith<$Res> { ) = _$WSAuthMessageCopyWithImpl; @useResult $Res call({ + int? eventProtocol, List? memberCustomInclude, List? products, String token, @@ -79,12 +83,17 @@ class _$WSAuthMessageCopyWithImpl<$Res> implements $WSAuthMessageCopyWith<$Res> @pragma('vm:prefer-inline') @override $Res call({ + Object? eventProtocol = freezed, Object? memberCustomInclude = freezed, Object? products = freezed, Object? token = null, }) { return _then( WSAuthMessage( + eventProtocol: freezed == eventProtocol + ? _self.eventProtocol + : eventProtocol // ignore: cast_nullable_to_non_nullable + as int?, memberCustomInclude: freezed == memberCustomInclude ? _self.memberCustomInclude : memberCustomInclude // ignore: cast_nullable_to_non_nullable diff --git a/packages/stream_chat/lib/open_api/model/ws_auth_message.g.dart b/packages/stream_chat/lib/open_api/model/ws_auth_message.g.dart index e75af69cd1..b80ac7d3c2 100644 --- a/packages/stream_chat/lib/open_api/model/ws_auth_message.g.dart +++ b/packages/stream_chat/lib/open_api/model/ws_auth_message.g.dart @@ -7,12 +7,14 @@ part of 'ws_auth_message.dart'; // ************************************************************************** WSAuthMessage _$WSAuthMessageFromJson(Map json) => WSAuthMessage( + eventProtocol: (json['event_protocol'] as num?)?.toInt(), memberCustomInclude: (json['member_custom_include'] as List?)?.map((e) => e as String).toList(), products: (json['products'] as List?)?.map((e) => WSAuthMessageProducts.fromJson(e as String)).toList(), token: json['token'] as String, ); Map _$WSAuthMessageToJson(WSAuthMessage instance) => { + 'event_protocol': instance.eventProtocol, 'member_custom_include': instance.memberCustomInclude, 'products': instance.products?.map((e) => e.toJson()).toList(), 'token': instance.token, diff --git a/packages/stream_chat/lib/open_api/model/ws_client_event.dart b/packages/stream_chat/lib/open_api/model/ws_client_event.dart index 28cae40eb5..c1f64a141c 100644 --- a/packages/stream_chat/lib/open_api/model/ws_client_event.dart +++ b/packages/stream_chat/lib/open_api/model/ws_client_event.dart @@ -93,6 +93,11 @@ abstract class WSClientEvent { "reminder.created" => _ReminderCreatedEvent(ReminderCreatedEvent.fromJson(json)), "reminder.deleted" => _ReminderDeletedEvent(ReminderDeletedEvent.fromJson(json)), "reminder.updated" => _ReminderUpdatedEvent(ReminderUpdatedEvent.fromJson(json)), + "scheduled_message.created" => _ScheduledMessageCreatedEvent(ScheduledMessageCreatedEvent.fromJson(json)), + "scheduled_message.deleted" => _ScheduledMessageDeletedEvent(ScheduledMessageDeletedEvent.fromJson(json)), + "scheduled_message.failed" => _ScheduledMessageFailedEvent(ScheduledMessageFailedEvent.fromJson(json)), + "scheduled_message.sent" => _ScheduledMessageSentEvent(ScheduledMessageSentEvent.fromJson(json)), + "scheduled_message.updated" => _ScheduledMessageUpdatedEvent(ScheduledMessageUpdatedEvent.fromJson(json)), "thread.updated" => _ThreadUpdatedEvent(ThreadUpdatedEvent.fromJson(json)), "typing.start" => _TypingStartEvent(TypingStartEvent.fromJson(json)), "typing.stop" => _TypingStopEvent(TypingStopEvent.fromJson(json)), @@ -509,6 +514,41 @@ class _ReminderUpdatedEvent extends WSClientEvent { String get type => wrapped.type; } +class _ScheduledMessageCreatedEvent extends WSClientEvent { + const _ScheduledMessageCreatedEvent(super.wrapped); + + @override + String get type => wrapped.type; +} + +class _ScheduledMessageDeletedEvent extends WSClientEvent { + const _ScheduledMessageDeletedEvent(super.wrapped); + + @override + String get type => wrapped.type; +} + +class _ScheduledMessageFailedEvent extends WSClientEvent { + const _ScheduledMessageFailedEvent(super.wrapped); + + @override + String get type => wrapped.type; +} + +class _ScheduledMessageSentEvent extends WSClientEvent { + const _ScheduledMessageSentEvent(super.wrapped); + + @override + String get type => wrapped.type; +} + +class _ScheduledMessageUpdatedEvent extends WSClientEvent { + const _ScheduledMessageUpdatedEvent(super.wrapped); + + @override + String get type => wrapped.type; +} + class _ThreadUpdatedEvent extends WSClientEvent { const _ThreadUpdatedEvent(super.wrapped); diff --git a/packages/stream_chat/lib/open_api/model/ws_event.dart b/packages/stream_chat/lib/open_api/model/ws_event.dart index 9840ded7a4..f66522bab7 100644 --- a/packages/stream_chat/lib/open_api/model/ws_event.dart +++ b/packages/stream_chat/lib/open_api/model/ws_event.dart @@ -93,6 +93,11 @@ abstract class WSEvent { "reminder.created" => _ReminderCreatedEvent(ReminderCreatedEvent.fromJson(json)), "reminder.deleted" => _ReminderDeletedEvent(ReminderDeletedEvent.fromJson(json)), "reminder.updated" => _ReminderUpdatedEvent(ReminderUpdatedEvent.fromJson(json)), + "scheduled_message.created" => _ScheduledMessageCreatedEvent(ScheduledMessageCreatedEvent.fromJson(json)), + "scheduled_message.deleted" => _ScheduledMessageDeletedEvent(ScheduledMessageDeletedEvent.fromJson(json)), + "scheduled_message.failed" => _ScheduledMessageFailedEvent(ScheduledMessageFailedEvent.fromJson(json)), + "scheduled_message.sent" => _ScheduledMessageSentEvent(ScheduledMessageSentEvent.fromJson(json)), + "scheduled_message.updated" => _ScheduledMessageUpdatedEvent(ScheduledMessageUpdatedEvent.fromJson(json)), "thread.updated" => _ThreadUpdatedEvent(ThreadUpdatedEvent.fromJson(json)), "typing.start" => _TypingStartEvent(TypingStartEvent.fromJson(json)), "typing.stop" => _TypingStopEvent(TypingStopEvent.fromJson(json)), @@ -509,6 +514,41 @@ class _ReminderUpdatedEvent extends WSEvent { String get type => wrapped.type; } +class _ScheduledMessageCreatedEvent extends WSEvent { + const _ScheduledMessageCreatedEvent(super.wrapped); + + @override + String get type => wrapped.type; +} + +class _ScheduledMessageDeletedEvent extends WSEvent { + const _ScheduledMessageDeletedEvent(super.wrapped); + + @override + String get type => wrapped.type; +} + +class _ScheduledMessageFailedEvent extends WSEvent { + const _ScheduledMessageFailedEvent(super.wrapped); + + @override + String get type => wrapped.type; +} + +class _ScheduledMessageSentEvent extends WSEvent { + const _ScheduledMessageSentEvent(super.wrapped); + + @override + String get type => wrapped.type; +} + +class _ScheduledMessageUpdatedEvent extends WSEvent { + const _ScheduledMessageUpdatedEvent(super.wrapped); + + @override + String get type => wrapped.type; +} + class _ThreadUpdatedEvent extends WSEvent { const _ThreadUpdatedEvent(super.wrapped); diff --git a/packages/stream_chat/lib/open_api/models.dart b/packages/stream_chat/lib/open_api/models.dart index 2322b9653e..35b31f92ae 100644 --- a/packages/stream_chat/lib/open_api/models.dart +++ b/packages/stream_chat/lib/open_api/models.dart @@ -18,6 +18,7 @@ export 'model/action_log_response.dart'; export 'model/action_sequence.dart'; export 'model/add_user_group_members_request.dart'; export 'model/add_user_group_members_response.dart'; +export 'model/app_defaults.dart'; export 'model/app_event_response.dart'; export 'model/app_response_fields.dart'; export 'model/app_updated_event.dart'; @@ -62,6 +63,9 @@ export 'model/call_rule_action_sequence.dart'; export 'model/call_type_rule_parameters.dart'; export 'model/call_violation_count_parameters.dart'; export 'model/cast_poll_vote_request.dart'; +export 'model/channel_ban_response.dart'; +export 'model/channel_ban_scope_response.dart'; +export 'model/channel_bans_scope_totals.dart'; export 'model/channel_config_overrides.dart'; export 'model/channel_config_with_info.dart'; export 'model/channel_context_response.dart'; @@ -105,6 +109,7 @@ export 'model/command.dart'; export 'model/config_overrides_request.dart'; export 'model/config_response.dart'; export 'model/content_count_rule_parameters.dart'; +export 'model/content_country_code_parameters.dart'; export 'model/content_custom_property_count_parameters.dart'; export 'model/content_custom_property_parameters.dart'; export 'model/create_block_list_request.dart'; @@ -134,6 +139,9 @@ export 'model/delete_comment_request_payload.dart'; export 'model/delete_message_request_payload.dart'; export 'model/delete_message_response.dart'; export 'model/delete_moderation_config_response.dart'; +export 'model/delete_poll_answer_request_payload.dart'; +export 'model/delete_poll_option_request_payload.dart'; +export 'model/delete_poll_request_payload.dart'; export 'model/delete_reaction_request_payload.dart'; export 'model/delete_reaction_response.dart'; export 'model/delete_reminder_response.dart'; @@ -198,6 +206,7 @@ export 'model/get_draft_response.dart'; export 'model/get_many_messages_response.dart'; export 'model/get_message_response.dart'; export 'model/get_og_response.dart'; +export 'model/get_or_create_channel_defaults.dart'; export 'model/get_pinned_messages_response.dart'; export 'model/get_reactions_response.dart'; export 'model/get_replies_response.dart'; @@ -224,6 +233,7 @@ export 'model/import_block_list_request.dart'; export 'model/import_block_list_response.dart'; export 'model/intent_config_request.dart'; export 'model/intent_config_response.dart'; +export 'model/intent_rule_parameters.dart'; export 'model/intent_topic_request.dart'; export 'model/intent_topic_response.dart'; export 'model/keyframe_ocr_rule_parameters.dart'; @@ -300,6 +310,7 @@ export 'model/ocr_content_parameters.dart'; export 'model/ocr_rule.dart'; export 'model/only_user_id.dart'; export 'model/own_user_response.dart'; +export 'model/pager_defaults.dart'; export 'model/pagination_params.dart'; export 'model/parsed_predefined_filter_response.dart'; export 'model/pending_message_event.dart'; @@ -326,6 +337,9 @@ export 'model/query_appeals_request.dart'; export 'model/query_appeals_response.dart'; export 'model/query_banned_users_payload.dart'; export 'model/query_banned_users_response.dart'; +export 'model/query_channel_bans_request.dart'; +export 'model/query_channel_bans_response.dart'; +export 'model/query_channels_defaults.dart'; export 'model/query_channels_request.dart'; export 'model/query_channels_response.dart'; export 'model/query_drafts_request.dart'; @@ -377,6 +391,14 @@ export 'model/rule_builder_condition.dart'; export 'model/rule_builder_condition_group.dart'; export 'model/rule_builder_config.dart'; export 'model/rule_builder_rule.dart'; +export 'model/scheduled_message_content_response.dart'; +export 'model/scheduled_message_created_event.dart'; +export 'model/scheduled_message_deleted_event.dart'; +export 'model/scheduled_message_failed_event.dart'; +export 'model/scheduled_message_location.dart'; +export 'model/scheduled_message_response.dart'; +export 'model/scheduled_message_sent_event.dart'; +export 'model/scheduled_message_updated_event.dart'; export 'model/search_payload.dart'; export 'model/search_response.dart'; export 'model/search_result.dart'; @@ -465,6 +487,7 @@ export 'model/upsert_push_preferences_request.dart'; export 'model/upsert_push_preferences_response.dart'; export 'model/user.dart'; export 'model/user_banned_event.dart'; +export 'model/user_channel_ban_count_rule_parameters.dart'; export 'model/user_channel_count_rule_parameters.dart'; export 'model/user_created_within_parameters.dart'; export 'model/user_custom_property_parameters.dart'; diff --git a/packages/stream_chat/test/open_api/api/default_api_json_query_test.dart b/packages/stream_chat/test/open_api/api/default_api_json_query_test.dart new file mode 100644 index 0000000000..2870805412 --- /dev/null +++ b/packages/stream_chat/test/open_api/api/default_api_json_query_test.dart @@ -0,0 +1,150 @@ +import 'dart:convert'; + +import 'package:dio/dio.dart'; +import 'package:mocktail/mocktail.dart'; +import 'package:stream_chat/open_api/api.dart' as api; +import 'package:test/test.dart'; + +void main() { + setUpAll(() => registerFallbackValue(RequestOptions())); + + test('DefaultApi.queryUsers sends the payload as one JSON query value', () async { + final adapter = _adapterAnswering('{"duration":"1ms","users":[]}'); + final defaultApi = _defaultApi(adapter); + + await defaultApi.queryUsers( + payload: const api.QueryUsersPayload( + filterConditions: {'id': 'user-1'}, + sort: [api.SortParamRequest(field: 'name', direction: 1)], + ), + ); + + final query = _lastRequest(adapter).uri.queryParametersAll; + expect(query.keys, ['payload']); + expect(query['payload'], hasLength(1)); + final payload = jsonDecode(query['payload']!.single) as Map; + expect(payload['filter_conditions'], {'id': 'user-1'}); + expect(payload['sort'], [allOf(containsPair('field', 'name'), containsPair('direction', 1))]); + }); + + test('DefaultApi.getReplies sends the sort as one JSON query value', () async { + final adapter = _adapterAnswering('{"duration":"1ms","messages":[]}'); + final defaultApi = _defaultApi(adapter); + + await defaultApi.getReplies( + parentId: 'parent-1', + sort: const [api.SortParamRequest(field: 'created_at', direction: -1)], + ); + + final query = _lastRequest(adapter).uri.queryParametersAll; + expect(query.keys, ['sort']); + expect(jsonDecode(query['sort']!.single), [ + allOf(containsPair('field', 'created_at'), containsPair('direction', -1)), + ]); + }); + + test('DefaultApi.getReplies sends plain query params as they are', () async { + final adapter = _adapterAnswering('{"duration":"1ms","messages":[]}'); + final defaultApi = _defaultApi(adapter); + + await defaultApi.getReplies(parentId: 'parent-1', limit: 30, idLt: 'message-1'); + + expect(_lastRequest(adapter).uri.queryParameters, {'limit': '30', 'id_lt': 'message-1'}); + }); + + test('DefaultApi.queryUsers sends a local DateTime in the filter in UTC', () async { + final adapter = _adapterAnswering('{"duration":"1ms","users":[]}'); + final defaultApi = _defaultApi(adapter); + final createdAt = DateTime.utc(2026, 10, 14, 12, 30).toLocal(); + + await defaultApi.queryUsers( + payload: api.QueryUsersPayload( + filterConditions: { + 'created_at': {r'$gt': createdAt}, + }, + ), + ); + + expect(_sentPayload(adapter)['filter_conditions'], { + 'created_at': {r'$gt': '2026-10-14T12:30:00.000Z'}, + }); + }); + + test('DefaultApi.queryUsers sends a Set in the filter as a JSON list', () async { + final adapter = _adapterAnswering('{"duration":"1ms","users":[]}'); + final defaultApi = _defaultApi(adapter); + + await defaultApi.queryUsers( + payload: const api.QueryUsersPayload( + filterConditions: { + 'id': { + r'$in': {'user-1', 'user-2'}, + }, + }, + ), + ); + + expect(_sentPayload(adapter)['filter_conditions'], { + 'id': { + r'$in': ['user-1', 'user-2'], + }, + }); + }); + + test('DefaultApi.queryUsers fails without sending a request for an enum it cannot encode', () async { + final adapter = _adapterAnswering('{"duration":"1ms","users":[]}'); + final defaultApi = _defaultApi(adapter); + + final result = await defaultApi.queryUsers( + payload: const api.QueryUsersPayload(filterConditions: {'role': _Role.admin}), + ); + + expect(result.isFailure, isTrue); + verifyNever(() => adapter.fetch(any(), any(), any())); + }); + + test('DefaultApi.queryUsers fails without sending a request for a Duration in the filter', () async { + final adapter = _adapterAnswering('{"duration":"1ms","users":[]}'); + final defaultApi = _defaultApi(adapter); + + final result = await defaultApi.queryUsers( + payload: const api.QueryUsersPayload(filterConditions: {'timeout': Duration(minutes: 1)}), + ); + + expect(result.isFailure, isTrue); + verifyNever(() => adapter.fetch(any(), any(), any())); + }); +} + +// A hand-written enum, which has no `toJson()`. +enum _Role { admin } + +api.DefaultApi _defaultApi(HttpClientAdapter adapter) { + final dio = Dio(BaseOptions(baseUrl: 'https://chat.example.com'))..httpClientAdapter = adapter; + return api.DefaultApi(dio); +} + +_MockHttpClientAdapter _adapterAnswering(String body) { + final adapter = _MockHttpClientAdapter(); + when(() => adapter.fetch(any(), any(), any())).thenAnswer( + (_) async => ResponseBody.fromString(body, 200, headers: _jsonHeaders), + ); + return adapter; +} + +RequestOptions _lastRequest(_MockHttpClientAdapter adapter) { + final calls = verify(() => adapter.fetch(captureAny(), any(), any())).captured; + return calls.last as RequestOptions; +} + +// The JSON-decoded `payload` query value of the last request. +Map _sentPayload(_MockHttpClientAdapter adapter) { + final payload = _lastRequest(adapter).uri.queryParameters['payload']!; + return jsonDecode(payload) as Map; +} + +const _jsonHeaders = { + Headers.contentTypeHeader: [Headers.jsonContentType], +}; + +class _MockHttpClientAdapter extends Mock implements HttpClientAdapter {} diff --git a/packages/stream_chat/test/src/client/client_connect_guest_user_test.dart b/packages/stream_chat/test/src/client/client_connect_guest_user_test.dart index c5d5ef6ccd..b60e4b45aa 100644 --- a/packages/stream_chat/test/src/client/client_connect_guest_user_test.dart +++ b/packages/stream_chat/test/src/client/client_connect_guest_user_test.dart @@ -267,7 +267,6 @@ api.CreateGuestResponse _createGuestResponse({ lastActive: DateTime.utc(2026, 9, 3), deactivatedAt: DateTime.utc(2026, 9, 4), deletedAt: DateTime.utc(2026, 9, 5), - revokeTokensIssuedBefore: DateTime.utc(2026, 9, 6), ), ); diff --git a/packages/stream_chat/test/src/client/client_test.dart b/packages/stream_chat/test/src/client/client_test.dart index c4a0a6ce7e..5501cbbf77 100644 --- a/packages/stream_chat/test/src/client/client_test.dart +++ b/packages/stream_chat/test/src/client/client_test.dart @@ -2439,6 +2439,7 @@ void main() { placement: 'us-east', autoTranslationEnabled: true, asyncUrlEnrichEnabled: false, + defaults: fakeAppDefaults, fileUploadConfig: api.FileUploadConfig( sizeLimit: 10485760, allowedFileExtensions: ['.csv'], diff --git a/packages/stream_chat/test/src/fakes.dart b/packages/stream_chat/test/src/fakes.dart index 9021e9a1df..ab74a36c04 100644 --- a/packages/stream_chat/test/src/fakes.dart +++ b/packages/stream_chat/test/src/fakes.dart @@ -166,6 +166,15 @@ class FakeDefaultApi extends Fake implements api.DefaultApi { Future> getApp() async => Result.success(fakeGetApplicationResponse()); } +/// The query-limit defaults a generated application response carries. +const fakeAppDefaults = api.AppDefaults( + getOrCreateChannel: api.GetOrCreateChannelDefaults( + members: api.PagerDefaults(limit: 100), + messages: api.PagerDefaults(limit: 25), + ), + queryChannels: api.QueryChannelsDefaults(limit: 10, maxLimit: 30, memberLimit: 100, messageLimit: 25), +); + /// A generated application response, for tests that need `getApp` to answer. api.GetApplicationResponse fakeGetApplicationResponse({String name = 'test-app'}) { const unrestricted = api.FileUploadConfig( @@ -184,6 +193,7 @@ api.GetApplicationResponse fakeGetApplicationResponse({String name = 'test-app'} placement: 'us-east', asyncUrlEnrichEnabled: false, autoTranslationEnabled: false, + defaults: fakeAppDefaults, fileUploadConfig: unrestricted, imageUploadConfig: unrestricted, ), From cfe38c729bf969c040bee988eb7c6726865b2770 Mon Sep 17 00:00:00 2001 From: VelikovPetar Date: Thu, 15 Oct 2026 14:39:36 +0200 Subject: [PATCH 2/2] fix(llc): drop revokeTokensIssuedBefore, which the regenerated client no longer has Co-Authored-By: Claude Opus 5.5 --- openapi-migration/04-roles-guest-and-app.md | 6 +++--- openapi-migration/09-users.md | 4 ++-- openapi-migration/tool/generate_plan.py | 14 +++++++------- .../lib/src/repository/mapper/user_mapper.dart | 1 - .../src/client/client_connect_guest_user_test.dart | 1 - .../stream_chat/test/src/client/poll_fixtures.dart | 1 - 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/openapi-migration/04-roles-guest-and-app.md b/openapi-migration/04-roles-guest-and-app.md index db99df5cf1..b25e18225b 100644 --- a/openapi-migration/04-roles-guest-and-app.md +++ b/openapi-migration/04-roles-guest-and-app.md @@ -91,11 +91,11 @@ in the raw `me`. None was ever applied. Verified live against the demo app and in the backend source; recorded as a 🐞 Fixed entry. - **`UserResponse.toModel()` leaves custom keys named like `OwnUser` fields (`OwnUser.topLevelFields`), - plus `deleted_at`, `deactivated_at` and `revoke_tokens_issued_before`, out of `extraData`.** v1's flat + plus `deleted_at` and `deactivated_at`, out of `extraData`.** v1's flat user JSON shadowed them; v2 nests custom data, and without the guard a custom `online` string crashed `OwnUser.fromUser`. `User.toRequest()` leaves the same keys out of the custom data it sends. -- **The three extra names are guarded because the socket connect refuses them.** A custom - `deleted_at`, `deactivated_at` or `revoke_tokens_issued_before` left in `extraData` is re-sent in the +- **The two extra names are guarded because the socket connect refuses them.** A custom + `deleted_at` or `deactivated_at` left in `extraData` is re-sent in the connect's user details, and the backend answers 400 ("reserved field", or "expected date" for a non-date value). v10's flat response shadowed them, so the same guest connected; confirmed live. - **Not a regression: a custom `ban_expires` that isn't a date** fails the connect in v10 and now alike, diff --git a/openapi-migration/09-users.md b/openapi-migration/09-users.md index 1c6d0bf219..4b1e2d3ae5 100644 --- a/openapi-migration/09-users.md +++ b/openapi-migration/09-users.md @@ -41,7 +41,7 @@ - `User` and `OwnUser` are public, persisted, and embedded in nearly every other response. This group restructures them, last: the mappers in `user_mapper.dart` already map the generated types onto the current class for every group before it, and stay. See [01-foundation](01-foundation.md). - `PrivacySettings` and the push-preference sub-shapes — decide per type. -- **`User.name` and `image` become fields** (README rule 9): `UserResponse` types them, and the constructor stops writing them into `extraData`; decide whether `name` keeps its fallback to `id`. `deleted_at`, `deactivated_at`, `revoke_tokens_issued_before` and `blocked_user_ids`, which `UserResponse` types and v1 kept in a plain user's `extraData`, become fields or are dropped, never `extraData`. `UserResponse.toModel()` then copies `custom` verbatim into the field, renamed `custom`, and `UserRequestMapper` stops reading `extraData['name']` and `['image']`. +- **`User.name` and `image` become fields** (README rule 9): `UserResponse` types them, and the constructor stops writing them into `extraData`; decide whether `name` keeps its fallback to `id`. `deleted_at`, `deactivated_at` and `blocked_user_ids`, which `UserResponse` types and v1 kept in a plain user's `extraData`, become fields or are dropped, never `extraData`. `UserResponse.toModel()` then copies `custom` verbatim into the field, renamed `custom`, and `UserRequestMapper` stops reading `extraData['name']` and `['image']`. - `UserFilterField.shadowBanned` and `.bypassModeration` read `extraData`, which the generated `UserResponse` has no field to fill. - `updateUsers` reuses `User.toRequest()`. It is a full upsert, and v10's flattened body filed the user's client state (`online`, `banned`, `created_at` and similar) into the stored custom data on every call, as it did for guests in [04](04-roles-guest-and-app.md). Decide the same way here, for real users rather than fresh guests, and record it in the CHANGELOG. - The generated `UserRequest` sends explicit `null` for an unset `language` or `invisible`, where v10 left the key out. For a guest create that made no difference; for an upsert of an existing user, confirm live that a `null` does not reset a stored value differently from an omitted key. @@ -51,7 +51,7 @@ - Every other group depends on the `User` decision. - User data arrives over the WebSocket on nearly every event. - Landing `UserResponse` -> `User` unblocks the two fields [08](08-moderation-and-blocklists.md) had to drop from `MuteUsersResponse`: the `mutes` the call created and the `ownUser` it left behind. Adding them is additive for anyone reading the response, so revisit them here rather than leaving them dropped for good. -- Until then, a user mapped from `UserResponse` and the same user decoded from v1 JSON carry different `extraData`: the v1 path keeps `blocked_user_ids`, `deleted_at`, `deactivated_at` and `revoke_tokens_issued_before`, the mapper drops them. Equality includes `extraData`, so a `Poll` from a REST call (its `createdBy`, its votes' `user`) and the same poll from an event compare unequal. +- Until then, a user mapped from `UserResponse` and the same user decoded from v1 JSON carry different `extraData`: the v1 path keeps `blocked_user_ids`, `deleted_at` and `deactivated_at`, the mapper drops them. Equality includes `extraData`, so a `Poll` from a REST call (its `createdBy`, its votes' `user`) and the same poll from an event compare unequal. ## Definition of done diff --git a/openapi-migration/tool/generate_plan.py b/openapi-migration/tool/generate_plan.py index 99f5c83c9c..a712dce60b 100644 --- a/openapi-migration/tool/generate_plan.py +++ b/openapi-migration/tool/generate_plan.py @@ -296,11 +296,11 @@ def match(path): in the raw `me`. None was ever applied. Verified live against the demo app and in the backend source; recorded as a 🐞 Fixed entry. - **`UserResponse.toModel()` leaves custom keys named like `OwnUser` fields (`OwnUser.topLevelFields`), - plus `deleted_at`, `deactivated_at` and `revoke_tokens_issued_before`, out of `extraData`.** v1's flat + plus `deleted_at` and `deactivated_at`, out of `extraData`.** v1's flat user JSON shadowed them; v2 nests custom data, and without the guard a custom `online` string crashed `OwnUser.fromUser`. `User.toRequest()` leaves the same keys out of the custom data it sends. - - **The three extra names are guarded because the socket connect refuses them.** A custom - `deleted_at`, `deactivated_at` or `revoke_tokens_issued_before` left in `extraData` is re-sent in the + - **The two extra names are guarded because the socket connect refuses them.** A custom + `deleted_at` or `deactivated_at` left in `extraData` is re-sent in the connect's user details, and the backend answers 400 ("reserved field", or "expected date" for a non-date value). v10's flat response shadowed them, so the same guest connected; confirmed live. - **Not a regression: a custom `ban_expires` that isn't a date** fails the connect in v10 and now alike, @@ -581,8 +581,8 @@ def match(path): '`PrivacySettings` and the push-preference sub-shapes — decide per type.', '**`User.name` and `image` become fields** (README rule 9): `UserResponse` types them, and the constructor ' 'stops writing them into `extraData`; decide whether `name` keeps its fallback to `id`. `deleted_at`, ' - '`deactivated_at`, `revoke_tokens_issued_before` and `blocked_user_ids`, which `UserResponse` types and v1 ' - 'kept in a plain user\'s `extraData`, become fields or are dropped, never `extraData`. ' + '`deactivated_at` and `blocked_user_ids`, which `UserResponse` types and v1 kept in a plain user\'s ' + '`extraData`, become fields or are dropped, never `extraData`. ' '`UserResponse.toModel()` then copies `custom` verbatim into the field, renamed `custom`, and ' '`UserRequestMapper` stops reading `extraData[\'name\']` and `[\'image\']`.', '`UserFilterField.shadowBanned` and `.bypassModeration` read `extraData`, which the generated ' @@ -603,8 +603,8 @@ def match(path): 'behind. Adding them is additive for anyone reading the response, so revisit them here rather ' 'than leaving them dropped for good.', 'Until then, a user mapped from `UserResponse` and the same user decoded from v1 JSON carry different ' - '`extraData`: the v1 path keeps `blocked_user_ids`, `deleted_at`, `deactivated_at` and ' - '`revoke_tokens_issued_before`, the mapper drops them. Equality includes `extraData`, so a `Poll` from a ' + '`extraData`: the v1 path keeps `blocked_user_ids`, `deleted_at` and `deactivated_at`, ' + 'the mapper drops them. Equality includes `extraData`, so a `Poll` from a ' 'REST call (its `createdBy`, its votes\' `user`) and the same poll from an event compare unequal.', ], done=DONE + ( diff --git a/packages/stream_chat/lib/src/repository/mapper/user_mapper.dart b/packages/stream_chat/lib/src/repository/mapper/user_mapper.dart index 5a480ebb34..e8671dd878 100644 --- a/packages/stream_chat/lib/src/repository/mapper/user_mapper.dart +++ b/packages/stream_chat/lib/src/repository/mapper/user_mapper.dart @@ -14,7 +14,6 @@ extension UserResponseMapper on api.UserResponse { ...OwnUser.topLevelFields, 'deleted_at', 'deactivated_at', - 'revoke_tokens_issued_before', }; /// Converts this response into a [User]. diff --git a/packages/stream_chat/test/src/client/client_connect_guest_user_test.dart b/packages/stream_chat/test/src/client/client_connect_guest_user_test.dart index b60e4b45aa..cffb9d64b5 100644 --- a/packages/stream_chat/test/src/client/client_connect_guest_user_test.dart +++ b/packages/stream_chat/test/src/client/client_connect_guest_user_test.dart @@ -102,7 +102,6 @@ void main() { 'privacy_settings': 'custom-privacy-settings', 'deleted_at': 'custom-deleted-at', 'deactivated_at': 'custom-deactivated-at', - 'revoke_tokens_issued_before': 'custom-revoke-tokens-issued-before', }, ); final client = _client(_defaultApiAnswering(Result.success(response))); diff --git a/packages/stream_chat/test/src/client/poll_fixtures.dart b/packages/stream_chat/test/src/client/poll_fixtures.dart index 41ff94addf..aa9ca30da1 100644 --- a/packages/stream_chat/test/src/client/poll_fixtures.dart +++ b/packages/stream_chat/test/src/client/poll_fixtures.dart @@ -21,7 +21,6 @@ final generatedVoter = api.UserResponse( lastActive: DateTime.utc(2024, 1, 3), name: 'Luke', online: true, - revokeTokensIssuedBefore: DateTime.utc(2024, 1, 6), role: 'user', teams: const ['jedi'], teamsRole: const {'jedi': 'admin'},