From 6fc32f0e9cfad532de074ef4499dc22396981034 Mon Sep 17 00:00:00 2001 From: nijeeshjoshy Date: Thu, 15 Oct 2026 01:17:19 +0200 Subject: [PATCH 1/2] feat!: [CHA-5933] add scheduled messages Regenerate from chat master 39c07c8b1ce1a145a754e883721796c66467f313 and cover the scheduled message endpoints with an integration test. Add the GetStream::MultipartRequest marker the generator now includes in upload request models (chat CHA-5084). Co-Authored-By: Claude Opus 5.5 --- lib/getstream_ruby/client.rb | 1 + lib/getstream_ruby/generated/chat_client.rb | 103 +++++++++++- lib/getstream_ruby/generated/common_client.rb | 26 ++- lib/getstream_ruby/generated/feeds_client.rb | 151 +++++++++++++++++- .../generated/models/activity_response.rb | 5 + .../models/activity_selector_config.rb | 10 ++ .../activity_selector_config_response.rb | 10 ++ .../generated/models/add_activity_request.rb | 5 + .../generated/models/add_activity_response.rb | 7 +- .../models/add_comment_reaction_response.rb | 15 ++ .../generated/models/add_reaction_response.rb | 15 ++ .../generated/models/aggregation_config.rb | 5 + .../models/ai_audio_config_request.rb | 16 +- .../models/ai_audio_config_response.rb | 18 ++- .../generated/models/ai_video_config.rb | 5 - .../generated/models/analyze_request.rb | 5 + .../generated/models/analyze_response.rb | 10 ++ .../generated/models/api_error.rb | 5 + .../generated/models/app_defaults.rb | 36 +++++ .../generated/models/app_response_fields.rb | 18 ++- .../generated/models/appeal_item_response.rb | 12 +- .../generated/models/appeal_request.rb | 5 + .../models/async_export_error_event.rb | 2 +- .../async_export_label_results_event.rb | 66 ++++++++ .../models/async_import_error_event.rb | 76 +++++++++ .../models/async_import_success_event.rb | 71 ++++++++ .../generated/models/ban_request.rb | 10 ++ .../generated/models/block_list_response.rb | 2 +- .../models/bulk_action_appeals_request.rb | 3 +- .../generated/models/call_ring_event.rb | 7 +- .../models/call_ring_settled_event.rb | 86 ++++++++++ .../generated/models/call_settings_request.rb | 5 + .../models/call_settings_response.rb | 5 + .../models/cast_poll_vote_request.rb | 10 ++ .../generated/models/channel_ban_response.rb | 51 ++++++ .../models/channel_ban_scope_response.rb | 51 ++++++ .../models/channel_bans_scope_totals.rb | 36 +++++ .../models/channel_batch_update_request.rb | 5 + .../models/channel_batch_update_response.rb | 11 +- .../generated/models/channel_config.rb | 2 +- .../models/channel_config_with_info.rb | 2 +- .../models/channel_member_response.rb | 10 +- .../models/channel_own_capability.rb | 2 +- .../channel_push_preferences_response.rb | 6 +- .../models/channel_state_response.rb | 32 ++-- .../models/channel_state_response_fields.rb | 7 +- .../generated/models/channel_type_config.rb | 2 +- .../models/check_gcp_pub_sub_request.rb | 41 +++++ .../models/check_gcp_pub_sub_response.rb | 46 ++++++ .../generated/models/check_push_request.rb | 2 +- .../generated/models/check_request.rb | 5 + .../generated/models/check_response.rb | 16 ++ .../generated/models/client_event.rb | 15 ++ .../models/comment_feedback_event.rb | 56 +++++++ .../models/comment_feedback_event_payload.rb | 51 ++++++ .../models/comment_feedback_request.rb | 41 +++++ .../models/comment_feedback_response.rb | 41 +++++ .../generated/models/comment_response.rb | 5 + .../models/config_overrides_request.rb | 2 +- .../generated/models/config_response.rb | 5 + .../models/content_country_code_parameters.rb | 36 +++++ .../models/create_block_list_request.rb | 2 +- .../models/create_channel_type_response.rb | 6 +- .../models/create_poll_option_request.rb | 10 ++ .../generated/models/create_poll_request.rb | 17 +- .../models/create_reminder_request.rb | 5 + .../delete_feeds_retention_policy_request.rb | 31 ++++ .../delete_feeds_retention_policy_response.rb | 31 ++++ .../delete_poll_answer_request_payload.rb | 31 ++++ .../delete_poll_option_request_payload.rb | 36 +++++ .../models/delete_poll_request_payload.rb | 31 ++++ .../delete_scheduled_message_response.rb | 36 +++++ .../models/delete_user_interests_response.rb | 36 +++++ .../models/delivery_receipts_response.rb | 2 +- .../generated/models/device_response.rb | 6 +- .../generated/models/enrichment_options.rb | 5 + .../models/entity_creator_response.rb | 2 +- .../generated/models/event_hook.rb | 25 +++ .../models/feeds_notification_comment.rb | 5 + .../generated/models/feeds_policy_config.rb | 36 +++++ .../models/feeds_retention_policy.rb | 46 ++++++ .../models/feeds_retention_run_response.rb | 46 ++++++ .../models/feeds_v3_comment_response.rb | 5 + .../generated/models/file_upload_request.rb | 1 + .../models/filter_config_response.rb | 10 ++ .../models/flood_identical_rule_parameters.rb | 10 ++ .../models/flood_similar_rule_parameters.rb | 5 + .../generated/models/follow_batch_request.rb | 5 + .../generated/models/follow_batch_response.rb | 7 +- .../generated/models/full_user_response.rb | 5 +- .../models/get_application_response.rb | 2 +- .../models/get_channel_type_response.rb | 2 +- .../generated/models/get_comments_response.rb | 12 +- .../get_feeds_retention_policy_response.rb | 41 +++++ ...get_feeds_retention_policy_runs_request.rb | 51 ++++++ ...et_feeds_retention_policy_runs_response.rb | 46 ++++++ .../models/get_or_create_channel_defaults.rb | 36 +++++ .../models/get_or_create_feed_request.rb | 7 +- .../models/get_or_create_feed_response.rb | 14 +- .../models/get_user_interests_response.rb | 4 +- .../models/grouped_channels_bucket.rb | 2 +- .../models/grouped_channels_group_request.rb | 13 +- .../models/grouped_query_channels_request.rb | 7 +- .../models/grouped_query_channels_response.rb | 2 +- .../generated/models/image_upload_request.rb | 1 + .../generated/models/intent_condition_info.rb | 46 ++++++ .../generated/models/intent_config_request.rb | 31 ++++ .../models/intent_config_response.rb | 31 ++++ .../models/intent_evaluation_info.rb | 51 ++++++ .../models/intent_rule_parameters.rb | 36 +++++ .../generated/models/intent_score_response.rb | 36 +++++ .../generated/models/intent_topic_request.rb | 36 +++++ .../generated/models/intent_topic_response.rb | 36 +++++ .../generated/models/interest_tag_response.rb | 16 +- .../generated/models/labels_request.rb | 2 +- .../models/lifecycle_settings_request.rb | 31 ++++ .../models/lifecycle_settings_response.rb | 31 ++++ .../generated/models/member_user_request.rb | 2 +- .../models/message_moderation_result.rb | 2 +- .../moderation_dashboard_preferences.rb | 5 + .../generated/models/moderation_payload.rb | 5 + .../generated/models/moderation_response.rb | 10 +- .../moderation_rules_triggered_event.rb | 7 +- .../generated/models/notification_comment.rb | 13 +- .../generated/models/own_user_response.rb | 17 +- .../generated/models/pager_defaults.rb | 31 ++++ .../generated/models/poll_closed_event.rb | 66 ++++++++ .../generated/models/poll_deleted_event.rb | 66 ++++++++ .../models/poll_option_response_data.rb | 7 +- .../generated/models/poll_response_data.rb | 12 +- .../generated/models/poll_updated_event.rb | 66 ++++++++ .../models/poll_vote_casted_event.rb | 71 ++++++++ .../models/poll_vote_changed_event.rb | 71 ++++++++ .../models/poll_vote_removed_event.rb | 71 ++++++++ .../models/poll_vote_response_data.rb | 5 + .../models/privacy_settings_response.rb | 8 +- .../models/push_preferences_response.rb | 6 +- .../models/query_activities_request.rb | 7 +- .../query_call_ring_attempts_request.rb | 41 +++++ .../query_call_ring_attempts_response.rb | 56 +++++++ .../models/query_channel_bans_request.rb | 66 ++++++++ .../models/query_channel_bans_response.rb | 56 +++++++ .../models/query_channels_defaults.rb | 46 ++++++ .../models/query_comments_request.rb | 5 + .../generated/models/query_follows_request.rb | 5 + .../models/query_follows_response.rb | 7 +- .../models/query_pinned_activities_request.rb | 27 +++- .../models/query_review_queue_request.rb | 2 +- .../query_scheduled_messages_request.rb | 56 +++++++ .../query_scheduled_messages_response.rb | 41 +++++ .../generated/models/ranking_config.rb | 5 + .../models/read_receipts_response.rb | 2 +- .../models/reminder_response_data.rb | 5 + .../models/review_queue_item_response.rb | 10 ++ .../generated/models/ring_attempt_response.rb | 101 ++++++++++++ .../generated/models/ring_call_request.rb | 7 +- .../generated/models/ring_call_response.rb | 7 +- .../models/ring_delivery_response.rb | 61 +++++++ .../generated/models/ring_settled_target.rb | 41 +++++ .../generated/models/ring_target_response.rb | 46 ++++++ .../models/rule_builder_condition.rb | 25 +++ .../scheduled_message_channel_response.rb | 51 ++++++ .../scheduled_message_content_response.rb | 126 +++++++++++++++ .../models/scheduled_message_failed_event.rb | 61 +++++++ .../models/scheduled_message_location.rb | 46 ++++++ .../models/scheduled_message_response.rb | 76 +++++++++ .../models/scheduled_message_sent_event.rb | 66 ++++++++ .../models/scheduled_messages_filter.rb | 36 +++++ .../generated/models/send_message_request.rb | 5 + .../generated/models/send_message_response.rb | 7 +- .../send_scheduled_message_now_request.rb | 14 ++ .../send_scheduled_message_now_response.rb | 36 +++++ .../set_feeds_retention_policy_request.rb | 46 ++++++ .../set_feeds_retention_policy_response.rb | 41 +++++ .../models/shared_location_response_data.rb | 18 +-- .../generated/models/submit_action_request.rb | 20 ++- .../models/threaded_comment_response.rb | 5 + .../models/typing_indicators_response.rb | 2 +- .../generated/models/unban_request.rb | 1 + .../models/unblock_action_request_payload.rb | 2 +- .../models/unfollow_batch_request.rb | 5 + .../models/unfollow_batch_response.rb | 7 +- .../generated/models/unread_counts_channel.rb | 8 +- .../models/unread_counts_channel_type.rb | 8 +- .../generated/models/unread_counts_thread.rb | 10 +- .../models/update_channel_type_request.rb | 2 +- .../models/update_channel_type_response.rb | 6 +- .../models/update_poll_option_request.rb | 10 ++ .../models/update_poll_partial_request.rb | 10 ++ .../generated/models/update_poll_request.rb | 10 ++ .../models/update_reminder_request.rb | 5 + .../update_scheduled_message_request.rb | 36 +++++ .../update_scheduled_message_response.rb | 36 +++++ .../generated/models/update_users_response.rb | 2 +- .../models/upload_channel_file_request.rb | 1 + .../models/upload_channel_request.rb | 1 + .../models/upsert_activities_request.rb | 7 +- .../models/upsert_activities_response.rb | 7 +- .../generated/models/upsert_config_request.rb | 5 + .../models/upsert_user_interests_request.rb | 31 ++++ .../models/upsert_user_interests_response.rb | 36 +++++ .../user_channel_ban_count_rule_parameters.rb | 41 +++++ .../user_channel_count_rule_parameters.rb | 36 +++++ .../user_identical_image_count_parameters.rb | 46 ++++++ .../generated/models/user_interest_request.rb | 36 +++++ .../user_reaction_count_rule_parameters.rb | 5 + .../generated/models/user_request.rb | 2 +- .../generated/models/user_response.rb | 2 +- .../models/user_response_privacy_fields.rb | 2 +- .../models/wrapped_unread_counts_response.rb | 14 +- .../generated/models/ws_event.rb | 2 +- lib/getstream_ruby/generated/video_client.rb | 17 ++ lib/getstream_ruby/generated/webhook.rb | 55 +++++++ lib/getstream_ruby/multipart_request.rb | 11 ++ ...chat_scheduled_message_integration_spec.rb | 107 +++++++++++++ spec/webhook_spec.rb | 98 ++++++++++++ 216 files changed, 4985 insertions(+), 178 deletions(-) create mode 100644 lib/getstream_ruby/generated/models/app_defaults.rb create mode 100644 lib/getstream_ruby/generated/models/async_export_label_results_event.rb create mode 100644 lib/getstream_ruby/generated/models/async_import_error_event.rb create mode 100644 lib/getstream_ruby/generated/models/async_import_success_event.rb create mode 100644 lib/getstream_ruby/generated/models/call_ring_settled_event.rb create mode 100644 lib/getstream_ruby/generated/models/channel_ban_response.rb create mode 100644 lib/getstream_ruby/generated/models/channel_ban_scope_response.rb create mode 100644 lib/getstream_ruby/generated/models/channel_bans_scope_totals.rb create mode 100644 lib/getstream_ruby/generated/models/check_gcp_pub_sub_request.rb create mode 100644 lib/getstream_ruby/generated/models/check_gcp_pub_sub_response.rb create mode 100644 lib/getstream_ruby/generated/models/comment_feedback_event.rb create mode 100644 lib/getstream_ruby/generated/models/comment_feedback_event_payload.rb create mode 100644 lib/getstream_ruby/generated/models/comment_feedback_request.rb create mode 100644 lib/getstream_ruby/generated/models/comment_feedback_response.rb create mode 100644 lib/getstream_ruby/generated/models/content_country_code_parameters.rb create mode 100644 lib/getstream_ruby/generated/models/delete_feeds_retention_policy_request.rb create mode 100644 lib/getstream_ruby/generated/models/delete_feeds_retention_policy_response.rb create mode 100644 lib/getstream_ruby/generated/models/delete_poll_answer_request_payload.rb create mode 100644 lib/getstream_ruby/generated/models/delete_poll_option_request_payload.rb create mode 100644 lib/getstream_ruby/generated/models/delete_poll_request_payload.rb create mode 100644 lib/getstream_ruby/generated/models/delete_scheduled_message_response.rb create mode 100644 lib/getstream_ruby/generated/models/delete_user_interests_response.rb create mode 100644 lib/getstream_ruby/generated/models/feeds_policy_config.rb create mode 100644 lib/getstream_ruby/generated/models/feeds_retention_policy.rb create mode 100644 lib/getstream_ruby/generated/models/feeds_retention_run_response.rb create mode 100644 lib/getstream_ruby/generated/models/get_feeds_retention_policy_response.rb create mode 100644 lib/getstream_ruby/generated/models/get_feeds_retention_policy_runs_request.rb create mode 100644 lib/getstream_ruby/generated/models/get_feeds_retention_policy_runs_response.rb create mode 100644 lib/getstream_ruby/generated/models/get_or_create_channel_defaults.rb create mode 100644 lib/getstream_ruby/generated/models/intent_condition_info.rb create mode 100644 lib/getstream_ruby/generated/models/intent_config_request.rb create mode 100644 lib/getstream_ruby/generated/models/intent_config_response.rb create mode 100644 lib/getstream_ruby/generated/models/intent_evaluation_info.rb create mode 100644 lib/getstream_ruby/generated/models/intent_rule_parameters.rb create mode 100644 lib/getstream_ruby/generated/models/intent_score_response.rb create mode 100644 lib/getstream_ruby/generated/models/intent_topic_request.rb create mode 100644 lib/getstream_ruby/generated/models/intent_topic_response.rb create mode 100644 lib/getstream_ruby/generated/models/lifecycle_settings_request.rb create mode 100644 lib/getstream_ruby/generated/models/lifecycle_settings_response.rb create mode 100644 lib/getstream_ruby/generated/models/pager_defaults.rb create mode 100644 lib/getstream_ruby/generated/models/poll_closed_event.rb create mode 100644 lib/getstream_ruby/generated/models/poll_deleted_event.rb create mode 100644 lib/getstream_ruby/generated/models/poll_updated_event.rb create mode 100644 lib/getstream_ruby/generated/models/poll_vote_casted_event.rb create mode 100644 lib/getstream_ruby/generated/models/poll_vote_changed_event.rb create mode 100644 lib/getstream_ruby/generated/models/poll_vote_removed_event.rb create mode 100644 lib/getstream_ruby/generated/models/query_call_ring_attempts_request.rb create mode 100644 lib/getstream_ruby/generated/models/query_call_ring_attempts_response.rb create mode 100644 lib/getstream_ruby/generated/models/query_channel_bans_request.rb create mode 100644 lib/getstream_ruby/generated/models/query_channel_bans_response.rb create mode 100644 lib/getstream_ruby/generated/models/query_channels_defaults.rb create mode 100644 lib/getstream_ruby/generated/models/query_scheduled_messages_request.rb create mode 100644 lib/getstream_ruby/generated/models/query_scheduled_messages_response.rb create mode 100644 lib/getstream_ruby/generated/models/ring_attempt_response.rb create mode 100644 lib/getstream_ruby/generated/models/ring_delivery_response.rb create mode 100644 lib/getstream_ruby/generated/models/ring_settled_target.rb create mode 100644 lib/getstream_ruby/generated/models/ring_target_response.rb create mode 100644 lib/getstream_ruby/generated/models/scheduled_message_channel_response.rb create mode 100644 lib/getstream_ruby/generated/models/scheduled_message_content_response.rb create mode 100644 lib/getstream_ruby/generated/models/scheduled_message_failed_event.rb create mode 100644 lib/getstream_ruby/generated/models/scheduled_message_location.rb create mode 100644 lib/getstream_ruby/generated/models/scheduled_message_response.rb create mode 100644 lib/getstream_ruby/generated/models/scheduled_message_sent_event.rb create mode 100644 lib/getstream_ruby/generated/models/scheduled_messages_filter.rb create mode 100644 lib/getstream_ruby/generated/models/send_scheduled_message_now_request.rb create mode 100644 lib/getstream_ruby/generated/models/send_scheduled_message_now_response.rb create mode 100644 lib/getstream_ruby/generated/models/set_feeds_retention_policy_request.rb create mode 100644 lib/getstream_ruby/generated/models/set_feeds_retention_policy_response.rb create mode 100644 lib/getstream_ruby/generated/models/update_scheduled_message_request.rb create mode 100644 lib/getstream_ruby/generated/models/update_scheduled_message_response.rb create mode 100644 lib/getstream_ruby/generated/models/upsert_user_interests_request.rb create mode 100644 lib/getstream_ruby/generated/models/upsert_user_interests_response.rb create mode 100644 lib/getstream_ruby/generated/models/user_channel_ban_count_rule_parameters.rb create mode 100644 lib/getstream_ruby/generated/models/user_channel_count_rule_parameters.rb create mode 100644 lib/getstream_ruby/generated/models/user_identical_image_count_parameters.rb create mode 100644 lib/getstream_ruby/generated/models/user_interest_request.rb create mode 100644 lib/getstream_ruby/multipart_request.rb create mode 100644 spec/integration/chat_scheduled_message_integration_spec.rb diff --git a/lib/getstream_ruby/client.rb b/lib/getstream_ruby/client.rb index d262c543..a0c56062 100644 --- a/lib/getstream_ruby/client.rb +++ b/lib/getstream_ruby/client.rb @@ -7,6 +7,7 @@ require 'logger' require 'json' require 'jwt' +require_relative 'multipart_request' require_relative 'generated/base_model' require_relative 'generated/common_client' require_relative 'generated/feeds_client' diff --git a/lib/getstream_ruby/generated/chat_client.rb b/lib/getstream_ruby/generated/chat_client.rb index 6b991a38..c29db47d 100644 --- a/lib/getstream_ruby/generated/chat_client.rb +++ b/lib/getstream_ruby/generated/chat_client.rb @@ -164,7 +164,7 @@ def query_channels(query_channels_request) ) end - # Update channels in batchSends events:- channel.frozen- channel.hidden- channel.unfrozen- channel.updated- channel.visible- member.added- member.removed- member.updated + # Update channels in batch. By default returns task_id for an asynchronous task. With synchronous: true, updateData accepts at most 100 explicit CIDs and returns a positive success_channels_count of channels selected for update after the database write completes, without task_id. Always poll a returned task_id, including when an older node ignores synchronous.Sends events:- channel.frozen- channel.hidden- channel.unfrozen- channel.updated- channel.visible- member.added- member.removed- member.updated # # @param channel_batch_update_request [ChannelBatchUpdateRequest] # @return [Models::ChannelBatchUpdateResponse] @@ -384,6 +384,28 @@ def update_channel(_type, _id, update_channel_request) ) end + # Lists the users banned from a channel, by a ban on the channel or by a future channel ban issued by the channel's creator, with one entry per user + # + # @param _type [String] + # @param _id [String] + # @param query_channel_bans_request [QueryChannelBansRequest] + # @return [Models::QueryChannelBansResponse] + def query_channel_bans(_type, _id, query_channel_bans_request) + path = '/api/v2/chat/channels/{type}/{id}/bans/query' + # Replace path parameters + path = path.gsub('{type}', _type.to_s) + path = path.gsub('{id}', _id.to_s) + # Build request body + body = query_channel_bans_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # Deletes a draftSends events:- draft.deleted # # @param _type [String] @@ -595,7 +617,7 @@ def update_member_partial(_type, _id, update_member_partial_request, user_id = n ) end - # Sends new message to the specified channelSends events:- channel.visible- message.new- message.updated + # Sends new message to the specified channelSends events:- channel.visible- message.new- message.updated- scheduled_message.created # # @param _type [String] # @param _id [String] @@ -1376,7 +1398,7 @@ def delete_reminder(message_id, user_id = nil) ) end - # Updates an existing reminderSends events:- reminder.updated + # Updates an existing reminder. remind_at and expires_at are both replaced on every call: omitting either one clears itSends events:- reminder.updated # # @param message_id [String] # @param update_reminder_request [UpdateReminderRequest] @@ -1396,7 +1418,7 @@ def update_reminder(message_id, update_reminder_request) ) end - # Creates a new reminderSends events:- reminder.created + # Creates a new reminder. An optional expires_at hides the reminder from every read once it passes and stops it counting against the per-user reminder capSends events:- reminder.created # # @param message_id [String] # @param create_reminder_request [CreateReminderRequest] @@ -1709,6 +1731,79 @@ def get_retention_policy_runs(get_retention_policy_runs_request) ) end + # Lists the scheduled messages of one user across channels: pending ones first, then failed ones, each by scheduled_at. Client-side requests return the caller's own; server-side requests require user_id + # + # @param query_scheduled_messages_request [QueryScheduledMessagesRequest] + # @return [Models::QueryScheduledMessagesResponse] + def query_scheduled_messages(query_scheduled_messages_request) + path = '/api/v2/chat/scheduled_messages/query' + # Build request body + body = query_scheduled_messages_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + + # Cancels a scheduled message so it is never sent, or removes a failed one. Returns 409 while the message is being sentSends events:- scheduled_message.deleted + # + # @param _id [String] + # @return [Models::DeleteScheduledMessageResponse] + def delete_scheduled_message(_id) + path = '/api/v2/chat/scheduled_messages/{id}' + # Replace path parameters + path = path.gsub('{id}', _id.to_s) + + # Make the API request + @client.make_request( + :delete, + path + ) + end + + # Replaces the message and/or the send time of a scheduled message. The scheduling checks run again, and the message is then sent, under the caller's auth mode. A request that changes only scheduled_at keeps the auth mode the message was scheduled with. Returns 409 while the message is being sentSends events:- scheduled_message.updated + # + # @param _id [String] + # @param update_scheduled_message_request [UpdateScheduledMessageRequest] + # @return [Models::UpdateScheduledMessageResponse] + def update_scheduled_message(_id, update_scheduled_message_request) + path = '/api/v2/chat/scheduled_messages/{id}' + # Replace path parameters + path = path.gsub('{id}', _id.to_s) + # Build request body + body = update_scheduled_message_request + + # Make the API request + @client.make_request( + :patch, + path, + body: body + ) + end + + # Moves the send time of a scheduled message to now and queues the send. Every send check runs when it is sent. Returns 409 while the message is being sentSends events:- scheduled_message.updated + # + # @param _id [String] + # @param send_scheduled_message_now_request [SendScheduledMessageNowRequest] + # @return [Models::SendScheduledMessageNowResponse] + def send_scheduled_message_now(_id, send_scheduled_message_now_request) + path = '/api/v2/chat/scheduled_messages/{id}/send_now' + # Replace path parameters + path = path.gsub('{id}', _id.to_s) + # Build request body + body = send_scheduled_message_now_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # Search messages across channels # # @param payload [SearchPayload] diff --git a/lib/getstream_ruby/generated/common_client.rb b/lib/getstream_ruby/generated/common_client.rb index 09464b6a..40a3b8ae 100644 --- a/lib/getstream_ruby/generated/common_client.rb +++ b/lib/getstream_ruby/generated/common_client.rb @@ -165,6 +165,23 @@ def update_block_list(name, update_block_list_request) ) end + # Validates that Stream can publish to a customer-owned GCP Pub/Sub topic + # + # @param check_gcp_pub_sub_request [CheckGCPPubSubRequest] + # @return [Models::CheckGCPPubSubResponse] + def check_gcp_pub_sub(check_gcp_pub_sub_request) + path = '/api/v2/check_gcp_pubsub' + # Build request body + body = check_gcp_pub_sub_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # Sends a test message via push, this is a test endpoint to verify your push settings # # @param check_push_request [CheckPushRequest] @@ -874,17 +891,22 @@ def delete_poll_option(poll_id, option_id, user_id = nil) # # @param poll_id [String] # @param option_id [String] + # @param user_id [String] # @return [Models::PollOptionResponse] - def get_poll_option(poll_id, option_id) + def get_poll_option(poll_id, option_id, user_id = nil) path = '/api/v2/polls/{poll_id}/options/{option_id}' # Replace path parameters path = path.gsub('{poll_id}', poll_id.to_s) path = path.gsub('{option_id}', option_id.to_s) + # Build query parameters + query_params = {} + query_params['user_id'] = user_id unless user_id.nil? # Make the API request @client.make_request( :get, - path + path, + query_params: query_params ) end diff --git a/lib/getstream_ruby/generated/feeds_client.rb b/lib/getstream_ruby/generated/feeds_client.rb index 94e2e11e..0328b70d 100644 --- a/lib/getstream_ruby/generated/feeds_client.rb +++ b/lib/getstream_ruby/generated/feeds_client.rb @@ -386,11 +386,15 @@ def delete_activity(_id, hard_delete = nil, delete_notification_activity = nil) # @param _id [String] # @param comment_sort [String] # @param comment_limit [Integer] + # @param skip_own_followings [Boolean] # @param user_id [String] # @param language [String] # @param translate_text [Boolean] + # @param include_top_level_comment_count [Boolean] + # @param include_soft_deleted_activities [Boolean] + # @param include_moderated_activities [Boolean] # @return [Models::GetActivityResponse] - def get_activity(_id, comment_sort = nil, comment_limit = nil, user_id = nil, language = nil, translate_text = nil) + def get_activity(_id, comment_sort = nil, comment_limit = nil, skip_own_followings = nil, user_id = nil, language = nil, translate_text = nil, include_top_level_comment_count = nil, include_soft_deleted_activities = nil, include_moderated_activities = nil) path = '/api/v2/feeds/activities/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) @@ -398,9 +402,13 @@ def get_activity(_id, comment_sort = nil, comment_limit = nil, user_id = nil, la query_params = {} query_params['comment_sort'] = comment_sort unless comment_sort.nil? query_params['comment_limit'] = comment_limit unless comment_limit.nil? + query_params['skip_own_followings'] = skip_own_followings unless skip_own_followings.nil? query_params['user_id'] = user_id unless user_id.nil? query_params['language'] = language unless language.nil? query_params['translate_text'] = translate_text unless translate_text.nil? + query_params['include_top_level_comment_count'] = include_top_level_comment_count unless include_top_level_comment_count.nil? + query_params['include_soft_deleted_activities'] = include_soft_deleted_activities unless include_soft_deleted_activities.nil? + query_params['include_moderated_activities'] = include_moderated_activities unless include_moderated_activities.nil? # Make the API request @client.make_request( @@ -410,7 +418,7 @@ def get_activity(_id, comment_sort = nil, comment_limit = nil, user_id = nil, la ) end - # Updates certain fields of the activity. Use 'set' to update specific fields and 'unset' to remove fields. This allows you to update only the fields you need without replacing the entire activity. Useful for updating reply restrictions ('restrict_replies'), mentioned users, or custom data.Sends events:- feeds.activity.updated + # Updates certain fields of the activity. Use 'set' to update specific fields and 'unset' to remove fields. This allows you to update only the fields you need without replacing the entire activity. Useful for updating reply restrictions ('restrict_replies'), mentioned users, or custom data. Changing `feeds` is a placement change (add/delete on those feeds), not an activity content update.Sends events:- feeds.activity.updated # # @param _id [String] # @param update_activity_partial_request [UpdateActivityPartialRequest] @@ -430,7 +438,7 @@ def update_activity_partial(_id, update_activity_partial_request) ) end - # Replaces an activity with the provided data. Use this to update text, attachments, reply restrictions ('restrict_replies'), mentioned users, and other activity fields. Note: This is a full update - any fields not provided will be cleared.Sends events:- feeds.activity.updated + # Replaces an activity with the provided data. Use this to update text, attachments, reply restrictions ('restrict_replies'), mentioned users, and other activity fields. Note: This is a full update - any fields not provided will be cleared. Changing `feeds` is a placement change (add/delete on those feeds), not an activity content update.Sends events:- feeds.activity.updated # # @param _id [String] # @param update_activity_request [UpdateActivityRequest] @@ -575,12 +583,14 @@ def query_bookmarks(query_bookmarks_request, language = nil, translate_text = ni # Delete collections in a batch operation. Users can only delete their own collections. # # @param collection_refs [Array] + # @param hard_delete [Boolean] # @return [Models::DeleteCollectionsResponse] - def delete_collections(collection_refs) + def delete_collections(collection_refs, hard_delete = nil) path = '/api/v2/feeds/collections' # Build query parameters query_params = {} query_params['collection_refs'] = collection_refs unless collection_refs.nil? + query_params['hard_delete'] = hard_delete unless hard_delete.nil? # Make the API request @client.make_request( @@ -692,8 +702,9 @@ def query_collections(query_collections_request) # @param limit [Integer] # @param prev [String] # @param _next [String] + # @param include_top_level_comment_count [Boolean] # @return [Models::GetCommentsResponse] - def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, id_around = nil, language = nil, translate_text = nil, user_id = nil, limit = nil, prev = nil, _next = nil) + def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, id_around = nil, language = nil, translate_text = nil, user_id = nil, limit = nil, prev = nil, _next = nil, include_top_level_comment_count = nil) path = '/api/v2/feeds/comments' # Build query parameters query_params = {} @@ -709,6 +720,7 @@ def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit query_params['limit'] = limit unless limit.nil? query_params['prev'] = prev unless prev.nil? query_params['next'] = _next unless _next.nil? + query_params['include_top_level_comment_count'] = include_top_level_comment_count unless include_top_level_comment_count.nil? # Make the API request @client.make_request( @@ -924,6 +936,26 @@ def update_comment(_id, update_comment_request) ) end + # Hide or unhide a comment for the current user + # + # @param _id [String] + # @param comment_feedback_request [CommentFeedbackRequest] + # @return [Models::CommentFeedbackResponse] + def comment_feedback(_id, comment_feedback_request) + path = '/api/v2/feeds/comments/{id}/feedback' + # Replace path parameters + path = path.gsub('{id}', _id.to_s) + # Build request body + body = comment_feedback_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # Updates certain fields of the comment. Use 'set' to update specific fields and 'unset' to remove fields.Sends events:- feeds.activity.updated- feeds.comment.updated # # @param _id [String] @@ -1886,7 +1918,7 @@ def get_or_create_follows(follow_batch_request) ) end - # Query follows based on filters with pagination and sorting options + # Query follows based on filters with pagination and sorting options. Server-side callers may set include_group_counts to also receive accepted following counts keyed by followed feed group. Requires exactly one source_feed / source_fid string equality. HTTP 400 if target_feed appears, if two source FIDs are given, or if $in / $or / $nor mentions those keys. # # @param query_follows_request [QueryFollowsRequest] # @return [Models::QueryFollowsResponse] @@ -2034,6 +2066,70 @@ def update_membership_level(_id, update_membership_level_request) ) end + # Returns the feeds retention policies configured for the app. Server-side only. + # + # @return [Models::GetFeedsRetentionPolicyResponse] + def feeds_get_retention_policy() + path = '/api/v2/feeds/retention_policy' + + # Make the API request + @client.make_request( + :get, + path + ) + end + + # Creates or updates a feeds retention policy for the app (an app may have multiple, each scoped to feed groups). Server-side only. + # + # @param set_feeds_retention_policy_request [SetFeedsRetentionPolicyRequest] + # @return [Models::SetFeedsRetentionPolicyResponse] + def feeds_set_retention_policy(set_feeds_retention_policy_request) + path = '/api/v2/feeds/retention_policy' + # Build request body + body = set_feeds_retention_policy_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + + # Removes the named feeds retention policy for the app (an app may hold several). Server-side only. + # + # @param delete_feeds_retention_policy_request [DeleteFeedsRetentionPolicyRequest] + # @return [Models::DeleteFeedsRetentionPolicyResponse] + def feeds_delete_retention_policy(delete_feeds_retention_policy_request) + path = '/api/v2/feeds/retention_policy/delete' + # Build request body + body = delete_feeds_retention_policy_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + + # Returns filtered and sorted feeds retention cleanup run history for the app. Supports filter_conditions on 'policy' and 'date' fields. Server-side only. + # + # @param get_feeds_retention_policy_runs_request [GetFeedsRetentionPolicyRunsRequest] + # @return [Models::GetFeedsRetentionPolicyRunsResponse] + def feeds_get_retention_policy_runs(get_feeds_retention_policy_runs_request) + path = '/api/v2/feeds/retention_policy/runs' + # Build request body + body = get_feeds_retention_policy_runs_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # Queries revision history for activities and comments # # @param query_revision_history_request [QueryRevisionHistoryRequest] @@ -2155,7 +2251,28 @@ def export_feed_user_data(user_id) ) end - # Returns the user's most common interest tags ranked by the number of distinct activities they reacted to that carried each tag. Client-side callers may only read their own interests; server-side callers may fetch any user. Results are sorted by descending count, then alphabetically by tag. + # Removes the given interest tags from a user, whether they were set manually or computed from reactions. A removed computed tag returns on the next recomputation if the user's reactions still support it; to keep a tag out of ranking for good, set it with a weight of 0 or below instead. Client-side callers may only manage their own interests; server-side callers may manage any user. Returns the user's remaining interests. + # + # @param user_id [String] + # @param tags [Array] + # @return [Models::DeleteUserInterestsResponse] + def delete_user_interests(user_id, tags) + path = '/api/v2/feeds/users/{user_id}/interests' + # Replace path parameters + path = path.gsub('{user_id}', user_id.to_s) + # Build query parameters + query_params = {} + query_params['tags'] = tags unless tags.nil? + + # Make the API request + @client.make_request( + :delete, + path, + query_params: query_params + ) + end + + # Returns the user's interest tags with their ranking weights: tags computed from the activities the user reacted to and tags set manually through the API. Client-side callers may only read their own interests; server-side callers may fetch any user. Results are sorted by descending weight, then manually set tags before computed ones, then descending count, then alphabetically by tag. # # @param user_id [String] # @param limit [Integer] @@ -2176,6 +2293,26 @@ def get_user_interests(user_id, limit = nil) ) end + # Adds or updates interest tags on a user with explicit ranking weights. Tags set this way rank above the tags computed from the user's reactions at equal weight and are never overwritten by them. Client-side callers may only manage their own interests; server-side callers may manage any user. Returns the user's full interest list after the write. + # + # @param user_id [String] + # @param upsert_user_interests_request [UpsertUserInterestsRequest] + # @return [Models::UpsertUserInterestsResponse] + def upsert_user_interests(user_id, upsert_user_interests_request) + path = '/api/v2/feeds/users/{user_id}/interests' + # Replace path parameters + path = path.gsub('{user_id}', user_id.to_s) + # Build request body + body = upsert_user_interests_request + + # Make the API request + @client.make_request( + :put, + path, + body: body + ) + end + end end end \ No newline at end of file diff --git a/lib/getstream_ruby/generated/models/activity_response.rb b/lib/getstream_ruby/generated/models/activity_response.rb index bebb8d29..8f4be08c 100644 --- a/lib/getstream_ruby/generated/models/activity_response.rb +++ b/lib/getstream_ruby/generated/models/activity_response.rb @@ -123,6 +123,9 @@ class ActivityResponse < GetStream::BaseModel # @!attribute text # @return [String] Text content of the activity attr_accessor :text + # @!attribute top_level_comment_count + # @return [Integer] Number of top-level comments (comments directly on the activity, excluding replies). Only returned by GetActivity when include_top_level_comment_count=true; never set on feed reads or events. Same status/deletion rules as comment_count; not adjusted per viewer. + attr_accessor :top_level_comment_count # @!attribute visibility_tag # @return [String] If visibility is 'tag', this is the tag name attr_accessor :visibility_tag @@ -201,6 +204,7 @@ def initialize(attributes = {}) @moderation_action = attributes[:moderation_action] || attributes['moderation_action'] || nil @selector_source = attributes[:selector_source] || attributes['selector_source'] || nil @text = attributes[:text] || attributes['text'] || nil + @top_level_comment_count = attributes[:top_level_comment_count] || attributes['top_level_comment_count'] || nil @visibility_tag = attributes[:visibility_tag] || attributes['visibility_tag'] || nil @friend_reactions = attributes[:friend_reactions] || attributes['friend_reactions'] || nil @latest_shares = attributes[:latest_shares] || attributes['latest_shares'] || nil @@ -256,6 +260,7 @@ def self.json_field_mappings moderation_action: 'moderation_action', selector_source: 'selector_source', text: 'text', + top_level_comment_count: 'top_level_comment_count', visibility_tag: 'visibility_tag', friend_reactions: 'friend_reactions', latest_shares: 'latest_shares', diff --git a/lib/getstream_ruby/generated/models/activity_selector_config.rb b/lib/getstream_ruby/generated/models/activity_selector_config.rb index d60f3e09..9a1b298a 100644 --- a/lib/getstream_ruby/generated/models/activity_selector_config.rb +++ b/lib/getstream_ruby/generated/models/activity_selector_config.rb @@ -21,6 +21,12 @@ class ActivitySelectorConfig < GetStream::BaseModel # @!attribute min_popularity # @return [Integer] Minimum popularity threshold. For the 'popular' selector, omit to use the default (5); values below 1 are rejected attr_accessor :min_popularity + # @!attribute ranking_candidate_limit + # @return [Integer] Maximum number of candidate activities this selector contributes to a ranked feed (1-1000). Omit to use the default ranking buffer. Only supported on the popular, proximity, interest and query selectors, and ignored on feeds without ranking + attr_accessor :ranking_candidate_limit + # @!attribute time_budget_ms + # @return [Integer] Maximum time in milliseconds this selector may take (25-5000). A selector that runs over its budget is dropped from that read instead of failing it, and stays out for the rest of that pagination session. The budget can only tighten the default, never extend it. Omit to use the default. Only supported on the popular, proximity, interest, query and follow_suggestion selectors + attr_accessor :time_budget_ms # @!attribute sort # @return [Array] Sort parameters for activity selection attr_accessor :sort @@ -41,6 +47,8 @@ def initialize(attributes = {}) @cutoff_time = attributes[:cutoff_time] || attributes['cutoff_time'] || nil @cutoff_window = attributes[:cutoff_window] || attributes['cutoff_window'] || nil @min_popularity = attributes[:min_popularity] || attributes['min_popularity'] || nil + @ranking_candidate_limit = attributes[:ranking_candidate_limit] || attributes['ranking_candidate_limit'] || nil + @time_budget_ms = attributes[:time_budget_ms] || attributes['time_budget_ms'] || nil @sort = attributes[:sort] || attributes['sort'] || nil @feed_groups = attributes[:feed_groups] || attributes['feed_groups'] || nil @filter = attributes[:filter] || attributes['filter'] || nil @@ -54,6 +62,8 @@ def self.json_field_mappings cutoff_time: 'cutoff_time', cutoff_window: 'cutoff_window', min_popularity: 'min_popularity', + ranking_candidate_limit: 'ranking_candidate_limit', + time_budget_ms: 'time_budget_ms', sort: 'sort', feed_groups: 'feed_groups', filter: 'filter', diff --git a/lib/getstream_ruby/generated/models/activity_selector_config_response.rb b/lib/getstream_ruby/generated/models/activity_selector_config_response.rb index d270b411..a71540c0 100644 --- a/lib/getstream_ruby/generated/models/activity_selector_config_response.rb +++ b/lib/getstream_ruby/generated/models/activity_selector_config_response.rb @@ -21,6 +21,12 @@ class ActivitySelectorConfigResponse < GetStream::BaseModel # @!attribute min_popularity # @return [Integer] Minimum popularity threshold. For the 'popular' selector, values below 1 are normalized to the default (5) at read time. attr_accessor :min_popularity + # @!attribute ranking_candidate_limit + # @return [Integer] Maximum number of candidate activities this selector contributes to a ranked feed + attr_accessor :ranking_candidate_limit + # @!attribute time_budget_ms + # @return [Integer] Maximum time in milliseconds this selector may take before it is dropped from the read + attr_accessor :time_budget_ms # @!attribute sort # @return [Array] Sort parameters for activity selection attr_accessor :sort @@ -41,6 +47,8 @@ def initialize(attributes = {}) @cutoff_time = attributes[:cutoff_time] || attributes['cutoff_time'] || nil @cutoff_window = attributes[:cutoff_window] || attributes['cutoff_window'] || nil @min_popularity = attributes[:min_popularity] || attributes['min_popularity'] || nil + @ranking_candidate_limit = attributes[:ranking_candidate_limit] || attributes['ranking_candidate_limit'] || nil + @time_budget_ms = attributes[:time_budget_ms] || attributes['time_budget_ms'] || nil @sort = attributes[:sort] || attributes['sort'] || nil @feed_groups = attributes[:feed_groups] || attributes['feed_groups'] || nil @filter = attributes[:filter] || attributes['filter'] || nil @@ -54,6 +62,8 @@ def self.json_field_mappings cutoff_time: 'cutoff_time', cutoff_window: 'cutoff_window', min_popularity: 'min_popularity', + ranking_candidate_limit: 'ranking_candidate_limit', + time_budget_ms: 'time_budget_ms', sort: 'sort', feed_groups: 'feed_groups', filter: 'filter', diff --git a/lib/getstream_ruby/generated/models/add_activity_request.rb b/lib/getstream_ruby/generated/models/add_activity_request.rb index 0a1de9b0..fc0a96a9 100644 --- a/lib/getstream_ruby/generated/models/add_activity_request.rb +++ b/lib/getstream_ruby/generated/models/add_activity_request.rb @@ -49,6 +49,9 @@ class AddActivityRequest < GetStream::BaseModel # @!attribute skip_enrich_url # @return [Boolean] Whether to skip URL enrichment for the activity attr_accessor :skip_enrich_url + # @!attribute skip_existing + # @return [Boolean] + attr_accessor :skip_existing # @!attribute skip_push # @return [Boolean] Whether to skip push notifications attr_accessor :skip_push @@ -108,6 +111,7 @@ def initialize(attributes = {}) @poll_id = attributes[:poll_id] || attributes['poll_id'] || nil @restrict_replies = attributes[:restrict_replies] || attributes['restrict_replies'] || nil @skip_enrich_url = attributes[:skip_enrich_url] || attributes['skip_enrich_url'] || nil + @skip_existing = attributes[:skip_existing] || attributes['skip_existing'] || nil @skip_push = attributes[:skip_push] || attributes['skip_push'] || nil @text = attributes[:text] || attributes['text'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @@ -140,6 +144,7 @@ def self.json_field_mappings poll_id: 'poll_id', restrict_replies: 'restrict_replies', skip_enrich_url: 'skip_enrich_url', + skip_existing: 'skip_existing', skip_push: 'skip_push', text: 'text', user_id: 'user_id', diff --git a/lib/getstream_ruby/generated/models/add_activity_response.rb b/lib/getstream_ruby/generated/models/add_activity_response.rb index 4c9b6335..8e2a313c 100644 --- a/lib/getstream_ruby/generated/models/add_activity_response.rb +++ b/lib/getstream_ruby/generated/models/add_activity_response.rb @@ -18,6 +18,9 @@ class AddActivityResponse < GetStream::BaseModel # @!attribute mention_notifications_created # @return [Integer] Number of mention notification activities created for mentioned users attr_accessor :mention_notifications_created + # @!attribute skipped_existing + # @return [Array] Contains the activity ID when skip_existing is true and the activity already existed, so it was left unchanged. + attr_accessor :skipped_existing # Initialize with attributes def initialize(attributes = {}) @@ -25,6 +28,7 @@ def initialize(attributes = {}) @duration = attributes[:duration] || attributes['duration'] @activity = attributes[:activity] || attributes['activity'] @mention_notifications_created = attributes[:mention_notifications_created] || attributes['mention_notifications_created'] || nil + @skipped_existing = attributes[:skipped_existing] || attributes['skipped_existing'] || nil end # Override field mappings for JSON serialization @@ -32,7 +36,8 @@ def self.json_field_mappings { duration: 'duration', activity: 'activity', - mention_notifications_created: 'mention_notifications_created' + mention_notifications_created: 'mention_notifications_created', + skipped_existing: 'skipped_existing' } end end diff --git a/lib/getstream_ruby/generated/models/add_comment_reaction_response.rb b/lib/getstream_ruby/generated/models/add_comment_reaction_response.rb index 35fd05f0..12567cca 100644 --- a/lib/getstream_ruby/generated/models/add_comment_reaction_response.rb +++ b/lib/getstream_ruby/generated/models/add_comment_reaction_response.rb @@ -9,9 +9,15 @@ module Models class AddCommentReactionResponse < GetStream::BaseModel # Model attributes + # @!attribute counter_delta + # @return [Integer] The change this write made to the number of reactions the user holds on this target: 1 when outcome is 'created', 0 when it is 'replaced' or 'unchanged'. These endpoints never return -1; a successful delete-reaction call is what decrements the count. With enforce_unique this is the delta of the user's reaction on the target; without it, the delta of reactions of this type. + attr_accessor :counter_delta # @!attribute duration # @return [String] Duration of the request attr_accessor :duration + # @!attribute outcome + # @return [String] What this write did to the user's reaction on this target. One of: created, replaced, unchanged. 'created' means a new reaction was written and nothing was replaced; 'replaced' means enforce_unique removed one or more of the user's other reaction types; 'unchanged' means the user already held this reaction type (its custom data may still have been updated). Without enforce_unique a user can hold several reaction types on one target, so 'created' then means 'this reaction type was newly added', not 'the user's first reaction on this target'. + attr_accessor :outcome # @!attribute comment # @return [CommentResponse] attr_accessor :comment @@ -28,6 +34,9 @@ class AddCommentReactionResponse < GetStream::BaseModel # @!attribute notification_task_id # @return [String] ID of the async notification-creation task; poll GET /tasks/{id} for its status attr_accessor :notification_task_id + # @!attribute previous_reaction_type + # @return [String] The reaction type this write replaced, or null when nothing was replaced. Non-null exactly when outcome is 'replaced'. If enforce_unique removed several reactions — possible only for data created before enforce_unique was adopted — this is the most recently created one. + attr_accessor :previous_reaction_type # @!attribute reference_activity # @return [ActivityResponse] attr_accessor :reference_activity @@ -35,24 +44,30 @@ class AddCommentReactionResponse < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @counter_delta = attributes[:counter_delta] || attributes['counter_delta'] @duration = attributes[:duration] || attributes['duration'] + @outcome = attributes[:outcome] || attributes['outcome'] @comment = attributes[:comment] || attributes['comment'] @reaction = attributes[:reaction] || attributes['reaction'] @notification_accepted = attributes[:notification_accepted] || attributes['notification_accepted'] || nil @notification_created = attributes[:notification_created] || attributes['notification_created'] || nil @notification_task_id = attributes[:notification_task_id] || attributes['notification_task_id'] || nil + @previous_reaction_type = attributes[:previous_reaction_type] || attributes['previous_reaction_type'] || nil @reference_activity = attributes[:reference_activity] || attributes['reference_activity'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { + counter_delta: 'counter_delta', duration: 'duration', + outcome: 'outcome', comment: 'comment', reaction: 'reaction', notification_accepted: 'notification_accepted', notification_created: 'notification_created', notification_task_id: 'notification_task_id', + previous_reaction_type: 'previous_reaction_type', reference_activity: 'reference_activity' } end diff --git a/lib/getstream_ruby/generated/models/add_reaction_response.rb b/lib/getstream_ruby/generated/models/add_reaction_response.rb index 4756b8d1..0f7598f2 100644 --- a/lib/getstream_ruby/generated/models/add_reaction_response.rb +++ b/lib/getstream_ruby/generated/models/add_reaction_response.rb @@ -9,9 +9,15 @@ module Models class AddReactionResponse < GetStream::BaseModel # Model attributes + # @!attribute counter_delta + # @return [Integer] The change this write made to the number of reactions the user holds on this target: 1 when outcome is 'created', 0 when it is 'replaced' or 'unchanged'. These endpoints never return -1; a successful delete-reaction call is what decrements the count. With enforce_unique this is the delta of the user's reaction on the target; without it, the delta of reactions of this type. + attr_accessor :counter_delta # @!attribute duration # @return [String] attr_accessor :duration + # @!attribute outcome + # @return [String] What this write did to the user's reaction on this target. One of: created, replaced, unchanged. 'created' means a new reaction was written and nothing was replaced; 'replaced' means enforce_unique removed one or more of the user's other reaction types; 'unchanged' means the user already held this reaction type (its custom data may still have been updated). Without enforce_unique a user can hold several reaction types on one target, so 'created' then means 'this reaction type was newly added', not 'the user's first reaction on this target'. + attr_accessor :outcome # @!attribute activity # @return [ActivityResponse] attr_accessor :activity @@ -28,6 +34,9 @@ class AddReactionResponse < GetStream::BaseModel # @!attribute notification_task_id # @return [String] ID of the async notification-creation task; poll GET /tasks/{id} for its status attr_accessor :notification_task_id + # @!attribute previous_reaction_type + # @return [String] The reaction type this write replaced, or null when nothing was replaced. Non-null exactly when outcome is 'replaced'. If enforce_unique removed several reactions — possible only for data created before enforce_unique was adopted — this is the most recently created one. + attr_accessor :previous_reaction_type # @!attribute reference_activity # @return [ActivityResponse] attr_accessor :reference_activity @@ -35,24 +44,30 @@ class AddReactionResponse < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @counter_delta = attributes[:counter_delta] || attributes['counter_delta'] @duration = attributes[:duration] || attributes['duration'] + @outcome = attributes[:outcome] || attributes['outcome'] @activity = attributes[:activity] || attributes['activity'] @reaction = attributes[:reaction] || attributes['reaction'] @notification_accepted = attributes[:notification_accepted] || attributes['notification_accepted'] || nil @notification_created = attributes[:notification_created] || attributes['notification_created'] || nil @notification_task_id = attributes[:notification_task_id] || attributes['notification_task_id'] || nil + @previous_reaction_type = attributes[:previous_reaction_type] || attributes['previous_reaction_type'] || nil @reference_activity = attributes[:reference_activity] || attributes['reference_activity'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { + counter_delta: 'counter_delta', duration: 'duration', + outcome: 'outcome', activity: 'activity', reaction: 'reaction', notification_accepted: 'notification_accepted', notification_created: 'notification_created', notification_task_id: 'notification_task_id', + previous_reaction_type: 'previous_reaction_type', reference_activity: 'reference_activity' } end diff --git a/lib/getstream_ruby/generated/models/aggregation_config.rb b/lib/getstream_ruby/generated/models/aggregation_config.rb index 590c7b36..7948ba8e 100644 --- a/lib/getstream_ruby/generated/models/aggregation_config.rb +++ b/lib/getstream_ruby/generated/models/aggregation_config.rb @@ -15,6 +15,9 @@ class AggregationConfig < GetStream::BaseModel # @!attribute format # @return [String] Format for activity aggregation attr_accessor :format + # @!attribute group_size + # @return [Integer] Maximum number of activities kept in each aggregated group. Omit to use the default: 15 for apps migrated from Feeds v2 or created on or after 2026-10-11, 100 otherwise. Must be between 1 and 100 when set. + attr_accessor :group_size # @!attribute score_strategy # @return [String] Strategy for computing aggregated group scores from member activity scores when ranking is enabled. Valid values: sum, max, avg attr_accessor :score_strategy @@ -24,6 +27,7 @@ def initialize(attributes = {}) super(attributes) @activities_sort = attributes[:activities_sort] || attributes['activities_sort'] || nil @format = attributes[:format] || attributes['format'] || nil + @group_size = attributes[:group_size] || attributes['group_size'] || nil @score_strategy = attributes[:score_strategy] || attributes['score_strategy'] || nil end @@ -32,6 +36,7 @@ def self.json_field_mappings { activities_sort: 'activities_sort', format: 'format', + group_size: 'group_size', score_strategy: 'score_strategy' } end diff --git a/lib/getstream_ruby/generated/models/ai_audio_config_request.rb b/lib/getstream_ruby/generated/models/ai_audio_config_request.rb index 2ccda441..9ad015c5 100644 --- a/lib/getstream_ruby/generated/models/ai_audio_config_request.rb +++ b/lib/getstream_ruby/generated/models/ai_audio_config_request.rb @@ -10,24 +10,34 @@ class AIAudioConfigRequest < GetStream::BaseModel # Model attributes # @!attribute profile - # @return [String] + # @return [String] Bodyguard credentials profile to classify transcripts with. Applies to the NLP engine only; ignored when LLM configurability is enabled. Empty falls back to the app-pinned profile, then the organization's top-level credentials attr_accessor :profile # @!attribute rules - # @return [Array] + # @return [Array] Deprecated pre-split rule list. Still the live config while no engine config exists; once one does it is kept as a fallback for whichever engine has none of its own attr_accessor :rules + # @!attribute ai_text_config + # @return [AITextConfig] + attr_accessor :ai_text_config + # @!attribute llm_config + # @return [LLMConfig] + attr_accessor :llm_config # Initialize with attributes def initialize(attributes = {}) super(attributes) @profile = attributes[:profile] || attributes['profile'] || nil @rules = attributes[:rules] || attributes['rules'] || nil + @ai_text_config = attributes[:ai_text_config] || attributes['ai_text_config'] || nil + @llm_config = attributes[:llm_config] || attributes['llm_config'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { profile: 'profile', - rules: 'rules' + rules: 'rules', + ai_text_config: 'ai_text_config', + llm_config: 'llm_config' } end end diff --git a/lib/getstream_ruby/generated/models/ai_audio_config_response.rb b/lib/getstream_ruby/generated/models/ai_audio_config_response.rb index 39f1bb38..5b3f1127 100644 --- a/lib/getstream_ruby/generated/models/ai_audio_config_response.rb +++ b/lib/getstream_ruby/generated/models/ai_audio_config_response.rb @@ -10,14 +10,20 @@ class AIAudioConfigResponse < GetStream::BaseModel # Model attributes # @!attribute enabled - # @return [Boolean] + # @return [Boolean] Whether the engine selected by the application's LLM configurability flag has a rule that does something. Derived, not stored attr_accessor :enabled # @!attribute profile - # @return [String] + # @return [String] Bodyguard credentials profile transcripts are classified with. Applies to the NLP engine only attr_accessor :profile # @!attribute rules - # @return [Array] + # @return [Array] The active engine's rules, flattened into the pre-split shape for clients that predate the per-engine configs. This is the whole config for a policy that has no per-engine config stored attr_accessor :rules + # @!attribute ai_text_config + # @return [AITextConfig] + attr_accessor :ai_text_config + # @!attribute llm_config + # @return [LLMConfig] + attr_accessor :llm_config # Initialize with attributes def initialize(attributes = {}) @@ -25,6 +31,8 @@ def initialize(attributes = {}) @enabled = attributes[:enabled] || attributes['enabled'] @profile = attributes[:profile] || attributes['profile'] @rules = attributes[:rules] || attributes['rules'] + @ai_text_config = attributes[:ai_text_config] || attributes['ai_text_config'] || nil + @llm_config = attributes[:llm_config] || attributes['llm_config'] || nil end # Override field mappings for JSON serialization @@ -32,7 +40,9 @@ def self.json_field_mappings { enabled: 'enabled', profile: 'profile', - rules: 'rules' + rules: 'rules', + ai_text_config: 'ai_text_config', + llm_config: 'llm_config' } end end diff --git a/lib/getstream_ruby/generated/models/ai_video_config.rb b/lib/getstream_ruby/generated/models/ai_video_config.rb index 91b31558..3f73779f 100644 --- a/lib/getstream_ruby/generated/models/ai_video_config.rb +++ b/lib/getstream_ruby/generated/models/ai_video_config.rb @@ -15,9 +15,6 @@ class AIVideoConfig < GetStream::BaseModel # @!attribute enabled # @return [Boolean] attr_accessor :enabled - # @!attribute provider - # @return [String] - attr_accessor :provider # @!attribute rules # @return [Array] attr_accessor :rules @@ -27,7 +24,6 @@ def initialize(attributes = {}) super(attributes) @async = attributes[:async] || attributes['async'] || nil @enabled = attributes[:enabled] || attributes['enabled'] || nil - @provider = attributes[:provider] || attributes['provider'] || nil @rules = attributes[:rules] || attributes['rules'] || nil end @@ -36,7 +32,6 @@ def self.json_field_mappings { async: 'async', enabled: 'enabled', - provider: 'provider', rules: 'rules' } end diff --git a/lib/getstream_ruby/generated/models/analyze_request.rb b/lib/getstream_ruby/generated/models/analyze_request.rb index cce0cce4..8071803e 100644 --- a/lib/getstream_ruby/generated/models/analyze_request.rb +++ b/lib/getstream_ruby/generated/models/analyze_request.rb @@ -18,6 +18,9 @@ class AnalyzeRequest < GetStream::BaseModel # @!attribute content_published_at # @return [DateTime] Original timestamp when the content was produced. Used as the `published_at` timestamp on per-content log entries that surface in `matched_contents` on aggregation-rule webhooks. attr_accessor :content_published_at + # @!attribute country_code + # @return [String] ISO 3166-1 alpha-2 country the content is aimed at (e.g. US, DE). Forwarded to the AI text provider as country context so it can resolve words whose meaning changes between countries. + attr_accessor :country_code # @!attribute entity_creator_id # @return [String] ID of the user who created the content. Required with entity_type + entity_id; omit all three for stateless mode. attr_accessor :entity_creator_id @@ -49,6 +52,7 @@ def initialize(attributes = {}) @async_response = attributes[:async_response] || attributes['async_response'] || nil @config_key = attributes[:config_key] || attributes['config_key'] || nil @content_published_at = attributes[:content_published_at] || attributes['content_published_at'] || nil + @country_code = attributes[:country_code] || attributes['country_code'] || nil @entity_creator_id = attributes[:entity_creator_id] || attributes['entity_creator_id'] || nil @entity_id = attributes[:entity_id] || attributes['entity_id'] || nil @entity_type = attributes[:entity_type] || attributes['entity_type'] || nil @@ -65,6 +69,7 @@ def self.json_field_mappings async_response: 'async_response', config_key: 'config_key', content_published_at: 'content_published_at', + country_code: 'country_code', entity_creator_id: 'entity_creator_id', entity_id: 'entity_id', entity_type: 'entity_type', diff --git a/lib/getstream_ruby/generated/models/analyze_response.rb b/lib/getstream_ruby/generated/models/analyze_response.rb index 981902b9..8474019e 100644 --- a/lib/getstream_ruby/generated/models/analyze_response.rb +++ b/lib/getstream_ruby/generated/models/analyze_response.rb @@ -15,6 +15,12 @@ class AnalyzeResponse < GetStream::BaseModel # @!attribute status # @return [String] `complete` (all fields screened), `partial` (mix of verdicts and per-field errors), or `pending` (async). attr_accessor :status + # @!attribute llm_model + # @return [String] ID of the LLM model that scored the content (e.g. gpt-4o-mini). Omitted when no LLM verdict was used (e.g. Bodyguard-only, or `pending`). + attr_accessor :llm_model + # @!attribute llm_reasoning_effort + # @return [String] reasoning_effort sent with the LLM request. Omitted when the request did not send one. + attr_accessor :llm_reasoning_effort # @!attribute images # @return [Hash] Per-image moderation verdicts keyed by caller label. attr_accessor :images @@ -27,6 +33,8 @@ def initialize(attributes = {}) super(attributes) @duration = attributes[:duration] || attributes['duration'] @status = attributes[:status] || attributes['status'] + @llm_model = attributes[:llm_model] || attributes['llm_model'] || nil + @llm_reasoning_effort = attributes[:llm_reasoning_effort] || attributes['llm_reasoning_effort'] || nil @images = attributes[:images] || attributes['images'] || nil @texts = attributes[:texts] || attributes['texts'] || nil end @@ -36,6 +44,8 @@ def self.json_field_mappings { duration: 'duration', status: 'status', + llm_model: 'llm_model', + llm_reasoning_effort: 'llm_reasoning_effort', images: 'images', texts: 'texts' } diff --git a/lib/getstream_ruby/generated/models/api_error.rb b/lib/getstream_ruby/generated/models/api_error.rb index 77d83fce..5d9a13b9 100644 --- a/lib/getstream_ruby/generated/models/api_error.rb +++ b/lib/getstream_ruby/generated/models/api_error.rb @@ -27,6 +27,9 @@ class APIError < GetStream::BaseModel # @!attribute details # @return [Array] Additional error-specific information attr_accessor :details + # @!attribute cooldown_remaining_ms + # @return [Integer] Milliseconds until the user's slow mode cool down period ends. Only set on code 60 (cool down) errors + attr_accessor :cooldown_remaining_ms # @!attribute unrecoverable # @return [Boolean] Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it attr_accessor :unrecoverable @@ -43,6 +46,7 @@ def initialize(attributes = {}) @more_info = attributes[:more_info] || attributes['more_info'] @status_code = attributes[:status_code] || attributes['StatusCode'] @details = attributes[:details] || attributes['details'] + @cooldown_remaining_ms = attributes[:cooldown_remaining_ms] || attributes['cooldown_remaining_ms'] || nil @unrecoverable = attributes[:unrecoverable] || attributes['unrecoverable'] || nil @exception_fields = attributes[:exception_fields] || attributes['exception_fields'] || nil end @@ -56,6 +60,7 @@ def self.json_field_mappings more_info: 'more_info', status_code: 'StatusCode', details: 'details', + cooldown_remaining_ms: 'cooldown_remaining_ms', unrecoverable: 'unrecoverable', exception_fields: 'exception_fields' } diff --git a/lib/getstream_ruby/generated/models/app_defaults.rb b/lib/getstream_ruby/generated/models/app_defaults.rb new file mode 100644 index 00000000..40d950e5 --- /dev/null +++ b/lib/getstream_ruby/generated/models/app_defaults.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Request limit defaults applied by the server when the corresponding field is omitted. + class AppDefaults < GetStream::BaseModel + + # Model attributes + # @!attribute get_or_create_channel + # @return [GetOrCreateChannelDefaults] Defaults applied by the get-or-create channel endpoint. + attr_accessor :get_or_create_channel + # @!attribute query_channels + # @return [QueryChannelsDefaults] Defaults applied by the query channels endpoint. + attr_accessor :query_channels + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @get_or_create_channel = attributes[:get_or_create_channel] || attributes['get_or_create_channel'] + @query_channels = attributes[:query_channels] || attributes['query_channels'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + get_or_create_channel: 'get_or_create_channel', + query_channels: 'query_channels' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/app_response_fields.rb b/lib/getstream_ruby/generated/models/app_response_fields.rb index b84f14bc..1ef76076 100644 --- a/lib/getstream_ruby/generated/models/app_response_fields.rb +++ b/lib/getstream_ruby/generated/models/app_response_fields.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # + # A type representing the app settings. class AppResponseFields < GetStream::BaseModel # Model attributes @@ -13,11 +13,14 @@ class AppResponseFields < GetStream::BaseModel # @return [Boolean] attr_accessor :allow_multi_user_devices # @!attribute async_url_enrich_enabled - # @return [Boolean] + # @return [Boolean] A boolean value determining if async url enrichment is enabled. attr_accessor :async_url_enrich_enabled # @!attribute auto_translation_enabled - # @return [Boolean] + # @return [Boolean] A boolean value determining if auto translation is enabled. attr_accessor :auto_translation_enabled + # @!attribute before_message_send_hook_system_messages + # @return [Boolean] + attr_accessor :before_message_send_hook_system_messages # @!attribute campaign_enabled # @return [Boolean] attr_accessor :campaign_enabled @@ -85,7 +88,7 @@ class AppResponseFields < GetStream::BaseModel # @return [Boolean] attr_accessor :multi_tenant_enabled # @!attribute name - # @return [String] + # @return [String] The name of the app. attr_accessor :name # @!attribute organization # @return [String] @@ -147,6 +150,9 @@ class AppResponseFields < GetStream::BaseModel # @!attribute channel_configs # @return [Hash] attr_accessor :channel_configs + # @!attribute defaults + # @return [AppDefaults] Request limit defaults applied by the server when the corresponding field is omitted. + attr_accessor :defaults # @!attribute file_upload_config # @return [FileUploadConfig] attr_accessor :file_upload_config @@ -208,6 +214,7 @@ def initialize(attributes = {}) @allow_multi_user_devices = attributes[:allow_multi_user_devices] || attributes['allow_multi_user_devices'] @async_url_enrich_enabled = attributes[:async_url_enrich_enabled] || attributes['async_url_enrich_enabled'] @auto_translation_enabled = attributes[:auto_translation_enabled] || attributes['auto_translation_enabled'] + @before_message_send_hook_system_messages = attributes[:before_message_send_hook_system_messages] || attributes['before_message_send_hook_system_messages'] @campaign_enabled = attributes[:campaign_enabled] || attributes['campaign_enabled'] @cdn_expiration_seconds = attributes[:cdn_expiration_seconds] || attributes['cdn_expiration_seconds'] @custom_action_handler_url = attributes[:custom_action_handler_url] || attributes['custom_action_handler_url'] @@ -251,6 +258,7 @@ def initialize(attributes = {}) @webhook_events = attributes[:webhook_events] || attributes['webhook_events'] @call_types = attributes[:call_types] || attributes['call_types'] @channel_configs = attributes[:channel_configs] || attributes['channel_configs'] + @defaults = attributes[:defaults] || attributes['defaults'] @file_upload_config = attributes[:file_upload_config] || attributes['file_upload_config'] @grants = attributes[:grants] || attributes['grants'] @image_upload_config = attributes[:image_upload_config] || attributes['image_upload_config'] @@ -277,6 +285,7 @@ def self.json_field_mappings allow_multi_user_devices: 'allow_multi_user_devices', async_url_enrich_enabled: 'async_url_enrich_enabled', auto_translation_enabled: 'auto_translation_enabled', + before_message_send_hook_system_messages: 'before_message_send_hook_system_messages', campaign_enabled: 'campaign_enabled', cdn_expiration_seconds: 'cdn_expiration_seconds', custom_action_handler_url: 'custom_action_handler_url', @@ -320,6 +329,7 @@ def self.json_field_mappings webhook_events: 'webhook_events', call_types: 'call_types', channel_configs: 'channel_configs', + defaults: 'defaults', file_upload_config: 'file_upload_config', grants: 'grants', image_upload_config: 'image_upload_config', diff --git a/lib/getstream_ruby/generated/models/appeal_item_response.rb b/lib/getstream_ruby/generated/models/appeal_item_response.rb index f1ca1d1e..27870f3b 100644 --- a/lib/getstream_ruby/generated/models/appeal_item_response.rb +++ b/lib/getstream_ruby/generated/models/appeal_item_response.rb @@ -33,8 +33,11 @@ class AppealItemResponse < GetStream::BaseModel # @!attribute ai_text_severity # @return [String] Text severity level assigned by the AI provider attr_accessor :ai_text_severity + # @!attribute appeal_reason_language + # @return [String] Detected language of the appeal_reason text itself + attr_accessor :appeal_reason_language # @!attribute channel_cid - # @return [String] CID of the channel the entity belongs to, if applicable + # @return [String] CID of the channel the entity belongs to (content appeals), or of the channel ban being appealed (stream:user appeals). Empty for a global ban appeal. attr_accessor :channel_cid # @!attribute config_key # @return [String] Moderation policy key that was applied @@ -66,6 +69,9 @@ class AppealItemResponse < GetStream::BaseModel # @!attribute flags # @return [Array] Per-provider flag records explaining why the action was taken attr_accessor :flags + # @!attribute languages + # @return [Array] Detected languages in the content + attr_accessor :languages # @!attribute entity_content # @return [ModerationPayload] attr_accessor :entity_content @@ -90,6 +96,7 @@ def initialize(attributes = {}) @status = attributes[:status] || attributes['status'] @updated_at = attributes[:updated_at] || attributes['updated_at'] @ai_text_severity = attributes[:ai_text_severity] || attributes['ai_text_severity'] || nil + @appeal_reason_language = attributes[:appeal_reason_language] || attributes['appeal_reason_language'] || nil @channel_cid = attributes[:channel_cid] || attributes['channel_cid'] || nil @config_key = attributes[:config_key] || attributes['config_key'] || nil @decision_reason = attributes[:decision_reason] || attributes['decision_reason'] || nil @@ -101,6 +108,7 @@ def initialize(attributes = {}) @flag_labels = attributes[:flag_labels] || attributes['flag_labels'] || nil @flag_types = attributes[:flag_types] || attributes['flag_types'] || nil @flags = attributes[:flags] || attributes['flags'] || nil + @languages = attributes[:languages] || attributes['languages'] || nil @entity_content = attributes[:entity_content] || attributes['entity_content'] || nil @moderation_action = attributes[:moderation_action] || attributes['moderation_action'] || nil @original_moderation_action = attributes[:original_moderation_action] || attributes['original_moderation_action'] || nil @@ -118,6 +126,7 @@ def self.json_field_mappings status: 'status', updated_at: 'updated_at', ai_text_severity: 'ai_text_severity', + appeal_reason_language: 'appeal_reason_language', channel_cid: 'channel_cid', config_key: 'config_key', decision_reason: 'decision_reason', @@ -129,6 +138,7 @@ def self.json_field_mappings flag_labels: 'flag_labels', flag_types: 'flag_types', flags: 'flags', + languages: 'languages', entity_content: 'entity_content', moderation_action: 'moderation_action', original_moderation_action: 'original_moderation_action', diff --git a/lib/getstream_ruby/generated/models/appeal_request.rb b/lib/getstream_ruby/generated/models/appeal_request.rb index 825e2c74..ba9217a1 100644 --- a/lib/getstream_ruby/generated/models/appeal_request.rb +++ b/lib/getstream_ruby/generated/models/appeal_request.rb @@ -18,6 +18,9 @@ class AppealRequest < GetStream::BaseModel # @!attribute entity_type # @return [String] Type of entity being appealed (e.g., message, user) attr_accessor :entity_type + # @!attribute channel_cid + # @return [String] CID of the channel ban being appealed. Only used when entity_type is stream:user; omit to appeal the global ban. + attr_accessor :channel_cid # @!attribute review_queue_item_id # @return [String] ID of the review queue item (flagged message) that triggered the ban. Applicable only for user ban appeals. attr_accessor :review_queue_item_id @@ -37,6 +40,7 @@ def initialize(attributes = {}) @appeal_reason = attributes[:appeal_reason] || attributes['appeal_reason'] @entity_id = attributes[:entity_id] || attributes['entity_id'] @entity_type = attributes[:entity_type] || attributes['entity_type'] + @channel_cid = attributes[:channel_cid] || attributes['channel_cid'] || nil @review_queue_item_id = attributes[:review_queue_item_id] || attributes['review_queue_item_id'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @attachments = attributes[:attachments] || attributes['attachments'] || nil @@ -49,6 +53,7 @@ def self.json_field_mappings appeal_reason: 'appeal_reason', entity_id: 'entity_id', entity_type: 'entity_type', + channel_cid: 'channel_cid', review_queue_item_id: 'review_queue_item_id', user_id: 'user_id', attachments: 'attachments', diff --git a/lib/getstream_ruby/generated/models/async_export_error_event.rb b/lib/getstream_ruby/generated/models/async_export_error_event.rb index e297b0e4..1e922a82 100644 --- a/lib/getstream_ruby/generated/models/async_export_error_event.rb +++ b/lib/getstream_ruby/generated/models/async_export_error_event.rb @@ -43,7 +43,7 @@ def initialize(attributes = {}) @started_at = attributes[:started_at] || attributes['started_at'] @task_id = attributes[:task_id] || attributes['task_id'] @custom = attributes[:custom] || attributes['custom'] - @type = attributes[:type] || attributes['type'] || "export.channels.error" + @type = attributes[:type] || attributes['type'] || "export.users.error" @received_at = attributes[:received_at] || attributes['received_at'] || nil end diff --git a/lib/getstream_ruby/generated/models/async_export_label_results_event.rb b/lib/getstream_ruby/generated/models/async_export_label_results_event.rb new file mode 100644 index 00000000..a8545bdb --- /dev/null +++ b/lib/getstream_ruby/generated/models/async_export_label_results_event.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class AsyncExportLabelResultsEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] + attr_accessor :created_at + # @!attribute finished_at + # @return [DateTime] + attr_accessor :finished_at + # @!attribute started_at + # @return [DateTime] + attr_accessor :started_at + # @!attribute task_id + # @return [String] + attr_accessor :task_id + # @!attribute url + # @return [String] + attr_accessor :url + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute type + # @return [String] + attr_accessor :type + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @finished_at = attributes[:finished_at] || attributes['finished_at'] + @started_at = attributes[:started_at] || attributes['started_at'] + @task_id = attributes[:task_id] || attributes['task_id'] + @url = attributes[:url] || attributes['url'] + @custom = attributes[:custom] || attributes['custom'] + @type = attributes[:type] || attributes['type'] || "export.label_results.success" + @received_at = attributes[:received_at] || attributes['received_at'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + finished_at: 'finished_at', + started_at: 'started_at', + task_id: 'task_id', + url: 'url', + custom: 'custom', + type: 'type', + received_at: 'received_at' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/async_import_error_event.rb b/lib/getstream_ruby/generated/models/async_import_error_event.rb new file mode 100644 index 00000000..7a1b871a --- /dev/null +++ b/lib/getstream_ruby/generated/models/async_import_error_event.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class AsyncImportErrorEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] + attr_accessor :created_at + # @!attribute error + # @return [String] + attr_accessor :error + # @!attribute finished_at + # @return [DateTime] + attr_accessor :finished_at + # @!attribute product + # @return [String] + attr_accessor :product + # @!attribute state + # @return [String] + attr_accessor :state + # @!attribute task_id + # @return [String] + attr_accessor :task_id + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute type + # @return [String] + attr_accessor :type + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + # @!attribute started_at + # @return [DateTime] + attr_accessor :started_at + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @error = attributes[:error] || attributes['error'] + @finished_at = attributes[:finished_at] || attributes['finished_at'] + @product = attributes[:product] || attributes['product'] + @state = attributes[:state] || attributes['state'] + @task_id = attributes[:task_id] || attributes['task_id'] + @custom = attributes[:custom] || attributes['custom'] + @type = attributes[:type] || attributes['type'] || "import.error" + @received_at = attributes[:received_at] || attributes['received_at'] || nil + @started_at = attributes[:started_at] || attributes['started_at'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + error: 'error', + finished_at: 'finished_at', + product: 'product', + state: 'state', + task_id: 'task_id', + custom: 'custom', + type: 'type', + received_at: 'received_at', + started_at: 'started_at' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/async_import_success_event.rb b/lib/getstream_ruby/generated/models/async_import_success_event.rb new file mode 100644 index 00000000..c626861a --- /dev/null +++ b/lib/getstream_ruby/generated/models/async_import_success_event.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class AsyncImportSuccessEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] + attr_accessor :created_at + # @!attribute finished_at + # @return [DateTime] + attr_accessor :finished_at + # @!attribute product + # @return [String] + attr_accessor :product + # @!attribute state + # @return [String] + attr_accessor :state + # @!attribute task_id + # @return [String] + attr_accessor :task_id + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute type + # @return [String] + attr_accessor :type + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + # @!attribute started_at + # @return [DateTime] + attr_accessor :started_at + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @finished_at = attributes[:finished_at] || attributes['finished_at'] + @product = attributes[:product] || attributes['product'] + @state = attributes[:state] || attributes['state'] + @task_id = attributes[:task_id] || attributes['task_id'] + @custom = attributes[:custom] || attributes['custom'] + @type = attributes[:type] || attributes['type'] || "import.success" + @received_at = attributes[:received_at] || attributes['received_at'] || nil + @started_at = attributes[:started_at] || attributes['started_at'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + finished_at: 'finished_at', + product: 'product', + state: 'state', + task_id: 'task_id', + custom: 'custom', + type: 'type', + received_at: 'received_at', + started_at: 'started_at' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/ban_request.rb b/lib/getstream_ruby/generated/models/ban_request.rb index aa8cd495..5f00426f 100644 --- a/lib/getstream_ruby/generated/models/ban_request.rb +++ b/lib/getstream_ruby/generated/models/ban_request.rb @@ -12,6 +12,9 @@ class BanRequest < GetStream::BaseModel # @!attribute target_user_id # @return [String] ID of the user to ban attr_accessor :target_user_id + # @!attribute ban_from_future_channels + # @return [Boolean] Whether to also ban the user from future channels created by the banner + attr_accessor :ban_from_future_channels # @!attribute banned_by_id # @return [String] ID of the user performing the ban attr_accessor :banned_by_id @@ -21,6 +24,9 @@ class BanRequest < GetStream::BaseModel # @!attribute delete_messages # @return [String] attr_accessor :delete_messages + # @!attribute delete_reactions + # @return [Boolean] Whether to delete reactions by the banned user on other users' messages + attr_accessor :delete_reactions # @!attribute ip_ban # @return [Boolean] Whether to ban the user's IP address attr_accessor :ip_ban @@ -41,9 +47,11 @@ class BanRequest < GetStream::BaseModel def initialize(attributes = {}) super(attributes) @target_user_id = attributes[:target_user_id] || attributes['target_user_id'] + @ban_from_future_channels = attributes[:ban_from_future_channels] || attributes['ban_from_future_channels'] || nil @banned_by_id = attributes[:banned_by_id] || attributes['banned_by_id'] || nil @channel_cid = attributes[:channel_cid] || attributes['channel_cid'] || nil @delete_messages = attributes[:delete_messages] || attributes['delete_messages'] || nil + @delete_reactions = attributes[:delete_reactions] || attributes['delete_reactions'] || nil @ip_ban = attributes[:ip_ban] || attributes['ip_ban'] || nil @reason = attributes[:reason] || attributes['reason'] || nil @shadow = attributes[:shadow] || attributes['shadow'] || nil @@ -55,9 +63,11 @@ def initialize(attributes = {}) def self.json_field_mappings { target_user_id: 'target_user_id', + ban_from_future_channels: 'ban_from_future_channels', banned_by_id: 'banned_by_id', channel_cid: 'channel_cid', delete_messages: 'delete_messages', + delete_reactions: 'delete_reactions', ip_ban: 'ip_ban', reason: 'reason', shadow: 'shadow', diff --git a/lib/getstream_ruby/generated/models/block_list_response.rb b/lib/getstream_ruby/generated/models/block_list_response.rb index 52dd0fab..eb3fc869 100644 --- a/lib/getstream_ruby/generated/models/block_list_response.rb +++ b/lib/getstream_ruby/generated/models/block_list_response.rb @@ -25,7 +25,7 @@ class BlockListResponse < GetStream::BaseModel # @return [String] Block list name attr_accessor :name # @!attribute type - # @return [String] Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word + # @return [String] Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word, word_allowlist attr_accessor :type # @!attribute words # @return [Array] List of words to block diff --git a/lib/getstream_ruby/generated/models/bulk_action_appeals_request.rb b/lib/getstream_ruby/generated/models/bulk_action_appeals_request.rb index 53cc0262..532a0f2a 100644 --- a/lib/getstream_ruby/generated/models/bulk_action_appeals_request.rb +++ b/lib/getstream_ruby/generated/models/bulk_action_appeals_request.rb @@ -31,7 +31,8 @@ class BulkActionAppealsRequest < GetStream::BaseModel # @return [UnbanActionRequestPayload] Configuration for unban moderation action attr_accessor :unban # @!attribute unblock - # @return [UnblockActionRequestPayload] Deprecated: use restore instead — it now also reverses a block or shadow block. Configuration for unblock action. + # @deprecated This field is deprecated. + # @return [UnblockActionRequestPayload] Deprecated: Use restore instead, which now also reverses a block or shadow block. Configuration for unblock action. attr_accessor :unblock # @!attribute user # @return [UserRequest] User request object diff --git a/lib/getstream_ruby/generated/models/call_ring_event.rb b/lib/getstream_ruby/generated/models/call_ring_event.rb index a27dc8cb..c6adf5c8 100644 --- a/lib/getstream_ruby/generated/models/call_ring_event.rb +++ b/lib/getstream_ruby/generated/models/call_ring_event.rb @@ -33,6 +33,9 @@ class CallRingEvent < GetStream::BaseModel # @!attribute type # @return [String] The type of event: "call.notification" in this case attr_accessor :type + # @!attribute ring_id + # @return [String] Identifies this ring of the call session + attr_accessor :ring_id # Initialize with attributes def initialize(attributes = {}) @@ -45,6 +48,7 @@ def initialize(attributes = {}) @call = attributes[:call] || attributes['call'] @user = attributes[:user] || attributes['user'] @type = attributes[:type] || attributes['type'] || "call.ring" + @ring_id = attributes[:ring_id] || attributes['ring_id'] || nil end # Override field mappings for JSON serialization @@ -57,7 +61,8 @@ def self.json_field_mappings members: 'members', call: 'call', user: 'user', - type: 'type' + type: 'type', + ring_id: 'ring_id' } end end diff --git a/lib/getstream_ruby/generated/models/call_ring_settled_event.rb b/lib/getstream_ruby/generated/models/call_ring_settled_event.rb new file mode 100644 index 00000000..7744ab29 --- /dev/null +++ b/lib/getstream_ruby/generated/models/call_ring_settled_event.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # This event is sent to the backend once per ring attempt, when the attempt reaches its final outcome: a callee's accept or reject closed it, the caller cancelled it, the ring timed out, or the call ended. It is delivered exactly once per ring_id and carries the final state of every rung user. + class CallRingSettledEvent < GetStream::BaseModel + + # Model attributes + # @!attribute call_cid + # @return [String] + attr_accessor :call_cid + # @!attribute created_at + # @return [DateTime] + attr_accessor :created_at + # @!attribute initiated_by + # @return [String] ID of the user who rang + attr_accessor :initiated_by + # @!attribute outcome + # @return [String] Final outcome of the ring: answered_all, answered_some, rejected_all, missed_all, cancelled or mixed + attr_accessor :outcome + # @!attribute rang_at + # @return [DateTime] When the ring was sent + attr_accessor :rang_at + # @!attribute ring_id + # @return [String] Identifies this ring of the call session, as carried on call.ring + attr_accessor :ring_id + # @!attribute session_id + # @return [String] Call session ID + attr_accessor :session_id + # @!attribute settle_reason + # @return [String] Why the ring closed: answered, rejected, cancel, timeout, ended or auto_end + attr_accessor :settle_reason + # @!attribute settled_at + # @return [DateTime] When the outcome left ringing + attr_accessor :settled_at + # @!attribute settled_by + # @return [String] ID of the user whose action closed the ring, or 'server' for the missed-call deadline and automatic ends + attr_accessor :settled_by + # @!attribute targets + # @return [Hash] Final state of every rung user, keyed by user ID + attr_accessor :targets + # @!attribute type + # @return [String] The type of event: "call.ring_settled" in this case + attr_accessor :type + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @call_cid = attributes[:call_cid] || attributes['call_cid'] + @created_at = attributes[:created_at] || attributes['created_at'] + @initiated_by = attributes[:initiated_by] || attributes['initiated_by'] + @outcome = attributes[:outcome] || attributes['outcome'] + @rang_at = attributes[:rang_at] || attributes['rang_at'] + @ring_id = attributes[:ring_id] || attributes['ring_id'] + @session_id = attributes[:session_id] || attributes['session_id'] + @settle_reason = attributes[:settle_reason] || attributes['settle_reason'] + @settled_at = attributes[:settled_at] || attributes['settled_at'] + @settled_by = attributes[:settled_by] || attributes['settled_by'] + @targets = attributes[:targets] || attributes['targets'] + @type = attributes[:type] || attributes['type'] || "call.ring_settled" + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + call_cid: 'call_cid', + created_at: 'created_at', + initiated_by: 'initiated_by', + outcome: 'outcome', + rang_at: 'rang_at', + ring_id: 'ring_id', + session_id: 'session_id', + settle_reason: 'settle_reason', + settled_at: 'settled_at', + settled_by: 'settled_by', + targets: 'targets', + type: 'type' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/call_settings_request.rb b/lib/getstream_ruby/generated/models/call_settings_request.rb index 358ed6b4..fa9ea92e 100644 --- a/lib/getstream_ruby/generated/models/call_settings_request.rb +++ b/lib/getstream_ruby/generated/models/call_settings_request.rb @@ -33,6 +33,9 @@ class CallSettingsRequest < GetStream::BaseModel # @!attribute ingress # @return [IngressSettingsRequest] attr_accessor :ingress + # @!attribute lifecycle + # @return [LifecycleSettingsRequest] + attr_accessor :lifecycle # @!attribute limits # @return [LimitsSettingsRequest] attr_accessor :limits @@ -72,6 +75,7 @@ def initialize(attributes = {}) @geofencing = attributes[:geofencing] || attributes['geofencing'] || nil @individual_recording = attributes[:individual_recording] || attributes['individual_recording'] || nil @ingress = attributes[:ingress] || attributes['ingress'] || nil + @lifecycle = attributes[:lifecycle] || attributes['lifecycle'] || nil @limits = attributes[:limits] || attributes['limits'] || nil @raw_recording = attributes[:raw_recording] || attributes['raw_recording'] || nil @recording = attributes[:recording] || attributes['recording'] || nil @@ -94,6 +98,7 @@ def self.json_field_mappings geofencing: 'geofencing', individual_recording: 'individual_recording', ingress: 'ingress', + lifecycle: 'lifecycle', limits: 'limits', raw_recording: 'raw_recording', recording: 'recording', diff --git a/lib/getstream_ruby/generated/models/call_settings_response.rb b/lib/getstream_ruby/generated/models/call_settings_response.rb index 0bed05cc..c16dc346 100644 --- a/lib/getstream_ruby/generated/models/call_settings_response.rb +++ b/lib/getstream_ruby/generated/models/call_settings_response.rb @@ -30,6 +30,9 @@ class CallSettingsResponse < GetStream::BaseModel # @!attribute individual_recording # @return [IndividualRecordingSettingsResponse] attr_accessor :individual_recording + # @!attribute lifecycle + # @return [LifecycleSettingsResponse] LifecycleSettings is the payload for call lifecycle settings + attr_accessor :lifecycle # @!attribute limits # @return [LimitsSettingsResponse] attr_accessor :limits @@ -71,6 +74,7 @@ def initialize(attributes = {}) @frame_recording = attributes[:frame_recording] || attributes['frame_recording'] @geofencing = attributes[:geofencing] || attributes['geofencing'] @individual_recording = attributes[:individual_recording] || attributes['individual_recording'] + @lifecycle = attributes[:lifecycle] || attributes['lifecycle'] @limits = attributes[:limits] || attributes['limits'] @raw_recording = attributes[:raw_recording] || attributes['raw_recording'] @recording = attributes[:recording] || attributes['recording'] @@ -93,6 +97,7 @@ def self.json_field_mappings frame_recording: 'frame_recording', geofencing: 'geofencing', individual_recording: 'individual_recording', + lifecycle: 'lifecycle', limits: 'limits', raw_recording: 'raw_recording', recording: 'recording', diff --git a/lib/getstream_ruby/generated/models/cast_poll_vote_request.rb b/lib/getstream_ruby/generated/models/cast_poll_vote_request.rb index 991a8b53..ce4174be 100644 --- a/lib/getstream_ruby/generated/models/cast_poll_vote_request.rb +++ b/lib/getstream_ruby/generated/models/cast_poll_vote_request.rb @@ -9,6 +9,12 @@ module Models class CastPollVoteRequest < GetStream::BaseModel # Model attributes + # @!attribute config_key + # @return [String] Key of the moderation configuration to use. Server-side only. + attr_accessor :config_key + # @!attribute config_team + # @return [String] Team associated with the configuration. Server-side only. + attr_accessor :config_team # @!attribute user_id # @return [String] attr_accessor :user_id @@ -22,6 +28,8 @@ class CastPollVoteRequest < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @config_key = attributes[:config_key] || attributes['config_key'] || nil + @config_team = attributes[:config_team] || attributes['config_team'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @user = attributes[:user] || attributes['user'] || nil @vote = attributes[:vote] || attributes['vote'] || nil @@ -30,6 +38,8 @@ def initialize(attributes = {}) # Override field mappings for JSON serialization def self.json_field_mappings { + config_key: 'config_key', + config_team: 'config_team', user_id: 'user_id', user: 'user', vote: 'vote' diff --git a/lib/getstream_ruby/generated/models/channel_ban_response.rb b/lib/getstream_ruby/generated/models/channel_ban_response.rb new file mode 100644 index 00000000..5f34812a --- /dev/null +++ b/lib/getstream_ruby/generated/models/channel_ban_response.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class ChannelBanResponse < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] + attr_accessor :created_at + # @!attribute scopes + # @return [Array] + attr_accessor :scopes + # @!attribute channel_ban + # @return [ChannelBanScopeResponse] + attr_accessor :channel_ban + # @!attribute future_channel_ban + # @return [ChannelBanScopeResponse] + attr_accessor :future_channel_ban + # @!attribute user + # @return [UserResponse] User response object + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @scopes = attributes[:scopes] || attributes['scopes'] + @channel_ban = attributes[:channel_ban] || attributes['channel_ban'] || nil + @future_channel_ban = attributes[:future_channel_ban] || attributes['future_channel_ban'] || nil + @user = attributes[:user] || attributes['user'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + scopes: 'scopes', + channel_ban: 'channel_ban', + future_channel_ban: 'future_channel_ban', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/channel_ban_scope_response.rb b/lib/getstream_ruby/generated/models/channel_ban_scope_response.rb new file mode 100644 index 00000000..59dae950 --- /dev/null +++ b/lib/getstream_ruby/generated/models/channel_ban_scope_response.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class ChannelBanScopeResponse < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] + attr_accessor :created_at + # @!attribute shadow + # @return [Boolean] + attr_accessor :shadow + # @!attribute expires + # @return [DateTime] + attr_accessor :expires + # @!attribute reason + # @return [String] + attr_accessor :reason + # @!attribute banned_by + # @return [UserResponse] User response object + attr_accessor :banned_by + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @shadow = attributes[:shadow] || attributes['shadow'] + @expires = attributes[:expires] || attributes['expires'] || nil + @reason = attributes[:reason] || attributes['reason'] || nil + @banned_by = attributes[:banned_by] || attributes['banned_by'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + shadow: 'shadow', + expires: 'expires', + reason: 'reason', + banned_by: 'banned_by' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/channel_bans_scope_totals.rb b/lib/getstream_ruby/generated/models/channel_bans_scope_totals.rb new file mode 100644 index 00000000..203d7ee3 --- /dev/null +++ b/lib/getstream_ruby/generated/models/channel_bans_scope_totals.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class ChannelBansScopeTotals < GetStream::BaseModel + + # Model attributes + # @!attribute channel + # @return [Integer] + attr_accessor :channel + # @!attribute future_channel + # @return [Integer] + attr_accessor :future_channel + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @channel = attributes[:channel] || attributes['channel'] + @future_channel = attributes[:future_channel] || attributes['future_channel'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + channel: 'channel', + future_channel: 'future_channel' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/channel_batch_update_request.rb b/lib/getstream_ruby/generated/models/channel_batch_update_request.rb index 9983caa7..bfc932af 100644 --- a/lib/getstream_ruby/generated/models/channel_batch_update_request.rb +++ b/lib/getstream_ruby/generated/models/channel_batch_update_request.rb @@ -18,6 +18,9 @@ class ChannelBatchUpdateRequest < GetStream::BaseModel # @!attribute hide_history_before # @return [DateTime] Required with the `addMembersHideHistory` operation, and rejected with every other operation including `addMembers`. Hides each matched channel's history before this time from the members the operation adds. Members that already belong to a matched channel are never affected. Must be in RFC3339 format (e.g., "2024-01-01T10:00:00Z") and in the past. attr_accessor :hide_history_before + # @!attribute synchronous + # @return [Boolean] For updateData only. Requires a root cids $eq or $in filter with at most 100 CIDs and no root $or/$and. Split larger selections into requests of at most 100 CIDs. A success_channels_count response means the database update completed; a task_id response means it was queued and must be polled, including on older API nodes. + attr_accessor :synchronous # @!attribute custom_unset # @return [Array] `updateData` only. Deletes these keys from each channel's existing custom object, leaving every other custom key untouched. Keys are dot-paths; deleting a key that does not exist is a no-op. Cannot be combined with `data.custom` attr_accessor :custom_unset @@ -37,6 +40,7 @@ def initialize(attributes = {}) @operation = attributes[:operation] || attributes['operation'] @filter = attributes[:filter] || attributes['filter'] @hide_history_before = attributes[:hide_history_before] || attributes['hide_history_before'] || nil + @synchronous = attributes[:synchronous] || attributes['synchronous'] || nil @custom_unset = attributes[:custom_unset] || attributes['custom_unset'] || nil @members = attributes[:members] || attributes['members'] || nil @custom_set = attributes[:custom_set] || attributes['custom_set'] || nil @@ -49,6 +53,7 @@ def self.json_field_mappings operation: 'operation', filter: 'filter', hide_history_before: 'hide_history_before', + synchronous: 'synchronous', custom_unset: 'custom_unset', members: 'members', custom_set: 'custom_set', diff --git a/lib/getstream_ruby/generated/models/channel_batch_update_response.rb b/lib/getstream_ruby/generated/models/channel_batch_update_response.rb index 049574b6..71d8ed1f 100644 --- a/lib/getstream_ruby/generated/models/channel_batch_update_response.rb +++ b/lib/getstream_ruby/generated/models/channel_batch_update_response.rb @@ -5,21 +5,25 @@ module GetStream module Generated module Models - # Basic response information + # class ChannelBatchUpdateResponse < GetStream::BaseModel # Model attributes # @!attribute duration - # @return [String] Duration of the request in milliseconds + # @return [String] attr_accessor :duration + # @!attribute success_channels_count + # @return [Integer] Positive count of channels selected for a completed synchronous database update, not an affected-row count. Concurrent deletion may reduce the rows written. task_id is absent. + attr_accessor :success_channels_count # @!attribute task_id - # @return [String] + # @return [String] Present for asynchronous updates. Poll this task even if synchronous was requested: an older API node may have queued the update. attr_accessor :task_id # Initialize with attributes def initialize(attributes = {}) super(attributes) @duration = attributes[:duration] || attributes['duration'] + @success_channels_count = attributes[:success_channels_count] || attributes['success_channels_count'] || nil @task_id = attributes[:task_id] || attributes['task_id'] || nil end @@ -27,6 +31,7 @@ def initialize(attributes = {}) def self.json_field_mappings { duration: 'duration', + success_channels_count: 'success_channels_count', task_id: 'task_id' } end diff --git a/lib/getstream_ruby/generated/models/channel_config.rb b/lib/getstream_ruby/generated/models/channel_config.rb index b0c969a4..44354251 100644 --- a/lib/getstream_ruby/generated/models/channel_config.rb +++ b/lib/getstream_ruby/generated/models/channel_config.rb @@ -106,7 +106,7 @@ class ChannelConfig < GetStream::BaseModel # @return [String] attr_accessor :partition_ttl # @!attribute push_level - # @return [String] + # @return [String] Sets the push notification level for a channel type attr_accessor :push_level # @!attribute allowed_flag_reasons # @return [Array] diff --git a/lib/getstream_ruby/generated/models/channel_config_with_info.rb b/lib/getstream_ruby/generated/models/channel_config_with_info.rb index 67fabc48..15fbea31 100644 --- a/lib/getstream_ruby/generated/models/channel_config_with_info.rb +++ b/lib/getstream_ruby/generated/models/channel_config_with_info.rb @@ -106,7 +106,7 @@ class ChannelConfigWithInfo < GetStream::BaseModel # @return [String] attr_accessor :partition_ttl # @!attribute push_level - # @return [String] + # @return [String] Sets the push notification level for a channel type attr_accessor :push_level # @!attribute allowed_flag_reasons # @return [Array] diff --git a/lib/getstream_ruby/generated/models/channel_member_response.rb b/lib/getstream_ruby/generated/models/channel_member_response.rb index 726cb6f3..27a365ab 100644 --- a/lib/getstream_ruby/generated/models/channel_member_response.rb +++ b/lib/getstream_ruby/generated/models/channel_member_response.rb @@ -27,6 +27,9 @@ class ChannelMemberResponse < GetStream::BaseModel # @!attribute updated_at # @return [DateTime] Date/time of the last update attr_accessor :updated_at + # @!attribute user_id + # @return [String] + attr_accessor :user_id # @!attribute custom # @return [Object] attr_accessor :custom @@ -66,9 +69,6 @@ class ChannelMemberResponse < GetStream::BaseModel # @!attribute status # @return [String] attr_accessor :status - # @!attribute user_id - # @return [String] - attr_accessor :user_id # @!attribute deleted_messages # @return [Array] attr_accessor :deleted_messages @@ -85,6 +85,7 @@ def initialize(attributes = {}) @notifications_muted = attributes[:notifications_muted] || attributes['notifications_muted'] @shadow_banned = attributes[:shadow_banned] || attributes['shadow_banned'] @updated_at = attributes[:updated_at] || attributes['updated_at'] + @user_id = attributes[:user_id] || attributes['user_id'] @custom = attributes[:custom] || attributes['custom'] @archived_at = attributes[:archived_at] || attributes['archived_at'] || nil @ban_expires = attributes[:ban_expires] || attributes['ban_expires'] || nil @@ -98,7 +99,6 @@ def initialize(attributes = {}) @pinned_at = attributes[:pinned_at] || attributes['pinned_at'] || nil @role = attributes[:role] || attributes['role'] || nil @status = attributes[:status] || attributes['status'] || nil - @user_id = attributes[:user_id] || attributes['user_id'] || nil @deleted_messages = attributes[:deleted_messages] || attributes['deleted_messages'] || nil @user = attributes[:user] || attributes['user'] || nil end @@ -112,6 +112,7 @@ def self.json_field_mappings notifications_muted: 'notifications_muted', shadow_banned: 'shadow_banned', updated_at: 'updated_at', + user_id: 'user_id', custom: 'custom', archived_at: 'archived_at', ban_expires: 'ban_expires', @@ -125,7 +126,6 @@ def self.json_field_mappings pinned_at: 'pinned_at', role: 'role', status: 'status', - user_id: 'user_id', deleted_messages: 'deleted_messages', user: 'user' } diff --git a/lib/getstream_ruby/generated/models/channel_own_capability.rb b/lib/getstream_ruby/generated/models/channel_own_capability.rb index 86a69fb6..9e2d33a5 100644 --- a/lib/getstream_ruby/generated/models/channel_own_capability.rb +++ b/lib/getstream_ruby/generated/models/channel_own_capability.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # All possibility of string to use + # An action that can be performed in a channel. class ChannelOwnCapability < GetStream::BaseModel # Empty model - inherits all functionality from BaseModel end diff --git a/lib/getstream_ruby/generated/models/channel_push_preferences_response.rb b/lib/getstream_ruby/generated/models/channel_push_preferences_response.rb index ac0f1ab4..343eeb5e 100644 --- a/lib/getstream_ruby/generated/models/channel_push_preferences_response.rb +++ b/lib/getstream_ruby/generated/models/channel_push_preferences_response.rb @@ -5,15 +5,15 @@ module GetStream module Generated module Models - # + # The push preference details. class ChannelPushPreferencesResponse < GetStream::BaseModel # Model attributes # @!attribute chat_level - # @return [String] + # @return [String] The scope level of the push notifications. attr_accessor :chat_level # @!attribute disabled_until - # @return [DateTime] + # @return [DateTime] If provided the notifications will be disabled until the set date. attr_accessor :disabled_until # @!attribute chat_preferences # @return [ChatPreferencesResponse] diff --git a/lib/getstream_ruby/generated/models/channel_state_response.rb b/lib/getstream_ruby/generated/models/channel_state_response.rb index b625f600..a479b6cf 100644 --- a/lib/getstream_ruby/generated/models/channel_state_response.rb +++ b/lib/getstream_ruby/generated/models/channel_state_response.rb @@ -13,37 +13,43 @@ class ChannelStateResponse < GetStream::BaseModel # @return [String] attr_accessor :duration # @!attribute members - # @return [Array] + # @return [Array] List of channel members attr_accessor :members # @!attribute messages - # @return [Array] + # @return [Array] List of channel messages attr_accessor :messages # @!attribute pinned_messages - # @return [Array] + # @return [Array] List of pinned messages in the channel attr_accessor :pinned_messages # @!attribute threads # @return [Array] attr_accessor :threads + # @!attribute cooldown_remaining_ms + # @return [Integer] Milliseconds until the current user's slow mode cool down period ends. Only set on client-side get or create channel and get channel requests while the user is under cool down + attr_accessor :cooldown_remaining_ms # @!attribute hidden - # @return [Boolean] + # @return [Boolean] Whether this channel is hidden or not attr_accessor :hidden # @!attribute hide_messages_before - # @return [DateTime] + # @return [DateTime] Messages before this date are hidden from the user attr_accessor :hide_messages_before # @!attribute watcher_count - # @return [Integer] + # @return [Integer] Number of channel watchers attr_accessor :watcher_count # @!attribute active_live_locations - # @return [Array] + # @return [Array] Active live locations in the channel attr_accessor :active_live_locations # @!attribute pending_messages - # @return [Array] + # @return [Array] Pending messages that this user has sent attr_accessor :pending_messages # @!attribute read - # @return [Array] + # @return [Array] List of read states attr_accessor :read + # @!attribute scheduled_messages + # @return [Array] The caller's own scheduled, sending and failed messages in this channel. Set only by a client-side GetOrCreateChannel with include_scheduled_messages; absent when not requested or not known, in which case use the scheduled messages query + attr_accessor :scheduled_messages # @!attribute watchers - # @return [Array] + # @return [Array] List of user who is watching the channel attr_accessor :watchers # @!attribute channel # @return [ChannelResponse] Represents channel in chat @@ -55,7 +61,7 @@ class ChannelStateResponse < GetStream::BaseModel # @return [ChannelMemberResponse] attr_accessor :membership # @!attribute push_preferences - # @return [ChannelPushPreferencesResponse] + # @return [ChannelPushPreferencesResponse] The push preference details. attr_accessor :push_preferences # Initialize with attributes @@ -66,12 +72,14 @@ def initialize(attributes = {}) @messages = attributes[:messages] || attributes['messages'] @pinned_messages = attributes[:pinned_messages] || attributes['pinned_messages'] @threads = attributes[:threads] || attributes['threads'] + @cooldown_remaining_ms = attributes[:cooldown_remaining_ms] || attributes['cooldown_remaining_ms'] || nil @hidden = attributes[:hidden] || attributes['hidden'] || nil @hide_messages_before = attributes[:hide_messages_before] || attributes['hide_messages_before'] || nil @watcher_count = attributes[:watcher_count] || attributes['watcher_count'] || nil @active_live_locations = attributes[:active_live_locations] || attributes['active_live_locations'] || nil @pending_messages = attributes[:pending_messages] || attributes['pending_messages'] || nil @read = attributes[:read] || attributes['read'] || nil + @scheduled_messages = attributes[:scheduled_messages] || attributes['scheduled_messages'] || nil @watchers = attributes[:watchers] || attributes['watchers'] || nil @channel = attributes[:channel] || attributes['channel'] || nil @draft = attributes[:draft] || attributes['draft'] || nil @@ -87,12 +95,14 @@ def self.json_field_mappings messages: 'messages', pinned_messages: 'pinned_messages', threads: 'threads', + cooldown_remaining_ms: 'cooldown_remaining_ms', hidden: 'hidden', hide_messages_before: 'hide_messages_before', watcher_count: 'watcher_count', active_live_locations: 'active_live_locations', pending_messages: 'pending_messages', read: 'read', + scheduled_messages: 'scheduled_messages', watchers: 'watchers', channel: 'channel', draft: 'draft', diff --git a/lib/getstream_ruby/generated/models/channel_state_response_fields.rb b/lib/getstream_ruby/generated/models/channel_state_response_fields.rb index 9cc47c77..3989649a 100644 --- a/lib/getstream_ruby/generated/models/channel_state_response_fields.rb +++ b/lib/getstream_ruby/generated/models/channel_state_response_fields.rb @@ -21,6 +21,9 @@ class ChannelStateResponseFields < GetStream::BaseModel # @!attribute threads # @return [Array] attr_accessor :threads + # @!attribute cooldown_remaining_ms + # @return [Integer] Milliseconds until the current user's slow mode cool down period ends. Only set on client-side get or create channel and get channel requests while the user is under cool down + attr_accessor :cooldown_remaining_ms # @!attribute hidden # @return [Boolean] Whether this channel is hidden or not attr_accessor :hidden @@ -52,7 +55,7 @@ class ChannelStateResponseFields < GetStream::BaseModel # @return [ChannelMemberResponse] attr_accessor :membership # @!attribute push_preferences - # @return [ChannelPushPreferencesResponse] + # @return [ChannelPushPreferencesResponse] The push preference details. attr_accessor :push_preferences # Initialize with attributes @@ -62,6 +65,7 @@ def initialize(attributes = {}) @messages = attributes[:messages] || attributes['messages'] @pinned_messages = attributes[:pinned_messages] || attributes['pinned_messages'] @threads = attributes[:threads] || attributes['threads'] + @cooldown_remaining_ms = attributes[:cooldown_remaining_ms] || attributes['cooldown_remaining_ms'] || nil @hidden = attributes[:hidden] || attributes['hidden'] || nil @hide_messages_before = attributes[:hide_messages_before] || attributes['hide_messages_before'] || nil @watcher_count = attributes[:watcher_count] || attributes['watcher_count'] || nil @@ -82,6 +86,7 @@ def self.json_field_mappings messages: 'messages', pinned_messages: 'pinned_messages', threads: 'threads', + cooldown_remaining_ms: 'cooldown_remaining_ms', hidden: 'hidden', hide_messages_before: 'hide_messages_before', watcher_count: 'watcher_count', diff --git a/lib/getstream_ruby/generated/models/channel_type_config.rb b/lib/getstream_ruby/generated/models/channel_type_config.rb index 47cce041..4ada0a48 100644 --- a/lib/getstream_ruby/generated/models/channel_type_config.rb +++ b/lib/getstream_ruby/generated/models/channel_type_config.rb @@ -112,7 +112,7 @@ class ChannelTypeConfig < GetStream::BaseModel # @return [String] attr_accessor :partition_ttl # @!attribute push_level - # @return [String] + # @return [String] Sets the push notification level for a channel type attr_accessor :push_level # @!attribute allowed_flag_reasons # @return [Array] diff --git a/lib/getstream_ruby/generated/models/check_gcp_pub_sub_request.rb b/lib/getstream_ruby/generated/models/check_gcp_pub_sub_request.rb new file mode 100644 index 00000000..034b9981 --- /dev/null +++ b/lib/getstream_ruby/generated/models/check_gcp_pub_sub_request.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class CheckGCPPubSubRequest < GetStream::BaseModel + + # Model attributes + # @!attribute gcp_pubsub_event_based_ordering_key_enabled + # @return [Boolean] Publish the test message with an ordering key through the regional endpoint, as a hook with ordering enabled would; requires gcp_pubsub_region + attr_accessor :gcp_pubsub_event_based_ordering_key_enabled + # @!attribute gcp_pubsub_region + # @return [String] GCP region used for the regional Pub/Sub endpoint when ordering is enabled + attr_accessor :gcp_pubsub_region + # @!attribute gcp_pubsub_topic + # @return [String] Fully qualified GCP Pub/Sub topic name (projects/{project}/topics/{topic}) + attr_accessor :gcp_pubsub_topic + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @gcp_pubsub_event_based_ordering_key_enabled = attributes[:gcp_pubsub_event_based_ordering_key_enabled] || attributes['gcp_pubsub_event_based_ordering_key_enabled'] || nil + @gcp_pubsub_region = attributes[:gcp_pubsub_region] || attributes['gcp_pubsub_region'] || nil + @gcp_pubsub_topic = attributes[:gcp_pubsub_topic] || attributes['gcp_pubsub_topic'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + gcp_pubsub_event_based_ordering_key_enabled: 'gcp_pubsub_event_based_ordering_key_enabled', + gcp_pubsub_region: 'gcp_pubsub_region', + gcp_pubsub_topic: 'gcp_pubsub_topic' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/check_gcp_pub_sub_response.rb b/lib/getstream_ruby/generated/models/check_gcp_pub_sub_response.rb new file mode 100644 index 00000000..f39f5df0 --- /dev/null +++ b/lib/getstream_ruby/generated/models/check_gcp_pub_sub_response.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class CheckGCPPubSubResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] + attr_accessor :duration + # @!attribute status + # @return [String] Validation result. One of: ok, error + attr_accessor :status + # @!attribute error + # @return [String] Error text + attr_accessor :error + # @!attribute data + # @return [Object] Error data + attr_accessor :data + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @status = attributes[:status] || attributes['status'] + @error = attributes[:error] || attributes['error'] || nil + @data = attributes[:data] || attributes['data'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + status: 'status', + error: 'error', + data: 'data' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/check_push_request.rb b/lib/getstream_ruby/generated/models/check_push_request.rb index b28eb32b..73a7a6d6 100644 --- a/lib/getstream_ruby/generated/models/check_push_request.rb +++ b/lib/getstream_ruby/generated/models/check_push_request.rb @@ -13,7 +13,7 @@ class CheckPushRequest < GetStream::BaseModel # @return [String] Push message template for APN attr_accessor :apn_template # @!attribute event_type - # @return [String] Type of event for push templates (default: message.new). One of: message.new, message.updated, reaction.new, reaction.updated, notification.reminder_due + # @return [String] Type of event for push templates (default: message.new). One of: message.new, message.updated, reaction.new, reaction.updated, notification.reminder_due, feeds.activity.added, feeds.comment.added, feeds.activity.reaction.added, feeds.comment.reaction.added, feeds.follow.created, feeds.notification_feed.updated attr_accessor :event_type # @!attribute firebase_data_template # @return [String] Push message data template for Firebase diff --git a/lib/getstream_ruby/generated/models/check_request.rb b/lib/getstream_ruby/generated/models/check_request.rb index d86098ef..1aa91fc2 100644 --- a/lib/getstream_ruby/generated/models/check_request.rb +++ b/lib/getstream_ruby/generated/models/check_request.rb @@ -27,6 +27,9 @@ class CheckRequest < GetStream::BaseModel # @!attribute content_published_at # @return [DateTime] Original timestamp when the content was produced (for correlating flagged content with source video timeline) attr_accessor :content_published_at + # @!attribute country_code + # @return [String] ISO 3166-1 alpha-2 country the content is aimed at (e.g. US, DE), used as country context by AI text providers + attr_accessor :country_code # @!attribute test_mode # @return [Boolean] Whether to run moderation in test mode attr_accessor :test_mode @@ -55,6 +58,7 @@ def initialize(attributes = {}) @config_key = attributes[:config_key] || attributes['config_key'] || nil @config_team = attributes[:config_team] || attributes['config_team'] || nil @content_published_at = attributes[:content_published_at] || attributes['content_published_at'] || nil + @country_code = attributes[:country_code] || attributes['country_code'] || nil @test_mode = attributes[:test_mode] || attributes['test_mode'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @config = attributes[:config] || attributes['config'] || nil @@ -72,6 +76,7 @@ def self.json_field_mappings config_key: 'config_key', config_team: 'config_team', content_published_at: 'content_published_at', + country_code: 'country_code', test_mode: 'test_mode', user_id: 'user_id', config: 'config', diff --git a/lib/getstream_ruby/generated/models/check_response.rb b/lib/getstream_ruby/generated/models/check_response.rb index 7007f462..98f54923 100644 --- a/lib/getstream_ruby/generated/models/check_response.rb +++ b/lib/getstream_ruby/generated/models/check_response.rb @@ -18,9 +18,18 @@ class CheckResponse < GetStream::BaseModel # @!attribute status # @return [String] Status of the moderation check (completed or pending) attr_accessor :status + # @!attribute llm_model + # @return [String] ID of the LLM model that produced the verdict (e.g. gpt-4o-mini). Omitted when no LLM ran synchronously (e.g. Bodyguard-only checks or async moderation) + attr_accessor :llm_model + # @!attribute llm_reasoning_effort + # @return [String] reasoning_effort sent with the LLM request that produced the verdict. Omitted when the request did not send one + attr_accessor :llm_reasoning_effort # @!attribute task_id # @return [String] ID of the running moderation task attr_accessor :task_id + # @!attribute intent_scores + # @return [Array] Score (0-100) of each policy intent topic against this request's text, in policy order (test mode only; omitted when the policy has no topics or scoring failed) + attr_accessor :intent_scores # @!attribute triggered_rules # @return [Array] All moderation rules triggered by this check (content, user, and call rules), with their resolved actions attr_accessor :triggered_rules @@ -28,6 +37,7 @@ class CheckResponse < GetStream::BaseModel # @return [ReviewQueueItemResponse] attr_accessor :item # @!attribute triggered_rule + # @deprecated This field is deprecated. # @return [TriggeredRuleResponse] attr_accessor :triggered_rule @@ -37,7 +47,10 @@ def initialize(attributes = {}) @duration = attributes[:duration] || attributes['duration'] @recommended_action = attributes[:recommended_action] || attributes['recommended_action'] @status = attributes[:status] || attributes['status'] + @llm_model = attributes[:llm_model] || attributes['llm_model'] || nil + @llm_reasoning_effort = attributes[:llm_reasoning_effort] || attributes['llm_reasoning_effort'] || nil @task_id = attributes[:task_id] || attributes['task_id'] || nil + @intent_scores = attributes[:intent_scores] || attributes['intent_scores'] || nil @triggered_rules = attributes[:triggered_rules] || attributes['triggered_rules'] || nil @item = attributes[:item] || attributes['item'] || nil @triggered_rule = attributes[:triggered_rule] || attributes['triggered_rule'] || nil @@ -49,7 +62,10 @@ def self.json_field_mappings duration: 'duration', recommended_action: 'recommended_action', status: 'status', + llm_model: 'llm_model', + llm_reasoning_effort: 'llm_reasoning_effort', task_id: 'task_id', + intent_scores: 'intent_scores', triggered_rules: 'triggered_rules', item: 'item', triggered_rule: 'triggered_rule' diff --git a/lib/getstream_ruby/generated/models/client_event.rb b/lib/getstream_ruby/generated/models/client_event.rb index 5b5011a8..83e5f8db 100644 --- a/lib/getstream_ruby/generated/models/client_event.rb +++ b/lib/getstream_ruby/generated/models/client_event.rb @@ -36,6 +36,12 @@ class ClientEvent < GetStream::BaseModel # @!attribute join_reason # @return [String] Reason the client initiated the join. Optional on CoordinatorJoin events; empty when not provided. attr_accessor :join_reason + # @!attribute leave_initiator + # @return [String] Source of the leave that aborted a join: user, app, callkit, remote_event, sdk_error, or unknown. Not validated against this set, so SDKs may report new values. Optional; sent on failure events. Maximum 32 characters. + attr_accessor :leave_initiator + # @!attribute leave_reason + # @return [String] Internal reason or triggering event for the leave that aborted a join. Optional; sent on failure events. Maximum 200 characters. + attr_accessor :leave_reason # @!attribute microphone_permission_status # @return [String] Microphone permission status: INITIATED, FAILED, GRANTED, or NOT_INITIATED. Required on every MediaDevicePermission event. attr_accessor :microphone_permission_status @@ -66,6 +72,9 @@ class ClientEvent < GetStream::BaseModel # @!attribute sfu_id # @return [String] Identifier of the SFU the client was attempting to connect to. Required on WSJoin and PeerConnectionConnect failure, and on FirstAudioFrame and FirstVideoFrame. attr_accessor :sfu_id + # @!attribute source + # @return [String] Source of the coordinator join. Optional on CoordinatorJoin events; omitted when not provided. + attr_accessor :source # @!attribute stage # @return [String] Discriminator identifying the event kind. JoinInitiated marks the start of a join attempt; join-lifecycle events use CoordinatorJoin, CoordinatorWS, WSJoin, or PeerConnectionConnect; media-readiness events use FirstAudioFrame or FirstVideoFrame; MediaDevicePermission reports device permission results; other values denote generic client events. attr_accessor :stage @@ -103,6 +112,8 @@ def initialize(attributes = {}) @id = attributes[:id] || attributes['id'] || nil @join_attempt_id = attributes[:join_attempt_id] || attributes['join_attempt_id'] || nil @join_reason = attributes[:join_reason] || attributes['join_reason'] || nil + @leave_initiator = attributes[:leave_initiator] || attributes['leave_initiator'] || nil + @leave_reason = attributes[:leave_reason] || attributes['leave_reason'] || nil @microphone_permission_status = attributes[:microphone_permission_status] || attributes['microphone_permission_status'] || nil @outcome = attributes[:outcome] || attributes['outcome'] || nil @peer_connection = attributes[:peer_connection] || attributes['peer_connection'] || nil @@ -113,6 +124,7 @@ def initialize(attributes = {}) @screen_share_status = attributes[:screen_share_status] || attributes['screen_share_status'] || nil @sdk_version = attributes[:sdk_version] || attributes['sdk_version'] || nil @sfu_id = attributes[:sfu_id] || attributes['sfu_id'] || nil + @source = attributes[:source] || attributes['source'] || nil @stage = attributes[:stage] || attributes['stage'] || nil @stage_id = attributes[:stage_id] || attributes['stage_id'] || nil @timestamp = attributes[:timestamp] || attributes['timestamp'] || nil @@ -135,6 +147,8 @@ def self.json_field_mappings id: 'id', join_attempt_id: 'join_attempt_id', join_reason: 'join_reason', + leave_initiator: 'leave_initiator', + leave_reason: 'leave_reason', microphone_permission_status: 'microphone_permission_status', outcome: 'outcome', peer_connection: 'peer_connection', @@ -145,6 +159,7 @@ def self.json_field_mappings screen_share_status: 'screen_share_status', sdk_version: 'sdk_version', sfu_id: 'sfu_id', + source: 'source', stage: 'stage', stage_id: 'stage_id', timestamp: 'timestamp', diff --git a/lib/getstream_ruby/generated/models/comment_feedback_event.rb b/lib/getstream_ruby/generated/models/comment_feedback_event.rb new file mode 100644 index 00000000..9a1d7717 --- /dev/null +++ b/lib/getstream_ruby/generated/models/comment_feedback_event.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Emitted when comment feedback is provided. + class CommentFeedbackEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute comment_feedback + # @return [CommentFeedbackEventPayload] + attr_accessor :comment_feedback + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute type + # @return [String] The type of event: "feeds.comment.feedback" in this case + attr_accessor :type + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + # @!attribute user + # @return [UserResponseCommonFields] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @comment_feedback = attributes[:comment_feedback] || attributes['comment_feedback'] + @custom = attributes[:custom] || attributes['custom'] + @type = attributes[:type] || attributes['type'] || "feeds.comment.feedback" + @received_at = attributes[:received_at] || attributes['received_at'] || nil + @user = attributes[:user] || attributes['user'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + comment_feedback: 'comment_feedback', + custom: 'custom', + type: 'type', + received_at: 'received_at', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/comment_feedback_event_payload.rb b/lib/getstream_ruby/generated/models/comment_feedback_event_payload.rb new file mode 100644 index 00000000..4a4b4a5e --- /dev/null +++ b/lib/getstream_ruby/generated/models/comment_feedback_event_payload.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class CommentFeedbackEventPayload < GetStream::BaseModel + + # Model attributes + # @!attribute comment_id + # @return [String] The comment that received feedback + attr_accessor :comment_id + # @!attribute created_at + # @return [DateTime] When the feedback was created + attr_accessor :created_at + # @!attribute hide + # @return [Boolean] Whether the comment is hidden for the user + attr_accessor :hide + # @!attribute updated_at + # @return [DateTime] When the feedback was last updated + attr_accessor :updated_at + # @!attribute user + # @return [UserResponse] User response object + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @comment_id = attributes[:comment_id] || attributes['comment_id'] + @created_at = attributes[:created_at] || attributes['created_at'] + @hide = attributes[:hide] || attributes['hide'] + @updated_at = attributes[:updated_at] || attributes['updated_at'] + @user = attributes[:user] || attributes['user'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + comment_id: 'comment_id', + created_at: 'created_at', + hide: 'hide', + updated_at: 'updated_at', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/comment_feedback_request.rb b/lib/getstream_ruby/generated/models/comment_feedback_request.rb new file mode 100644 index 00000000..f77bd402 --- /dev/null +++ b/lib/getstream_ruby/generated/models/comment_feedback_request.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Request to provide feedback on a comment + class CommentFeedbackRequest < GetStream::BaseModel + + # Model attributes + # @!attribute hide + # @return [Boolean] Whether to hide this comment for the user + attr_accessor :hide + # @!attribute user_id + # @return [String] + attr_accessor :user_id + # @!attribute user + # @return [UserRequest] User request object + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @hide = attributes[:hide] || attributes['hide'] || nil + @user_id = attributes[:user_id] || attributes['user_id'] || nil + @user = attributes[:user] || attributes['user'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + hide: 'hide', + user_id: 'user_id', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/comment_feedback_response.rb b/lib/getstream_ruby/generated/models/comment_feedback_response.rb new file mode 100644 index 00000000..a6c424fc --- /dev/null +++ b/lib/getstream_ruby/generated/models/comment_feedback_response.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Response for comment feedback submission + class CommentFeedbackResponse < GetStream::BaseModel + + # Model attributes + # @!attribute comment_id + # @return [String] The ID of the comment that received feedback + attr_accessor :comment_id + # @!attribute duration + # @return [String] + attr_accessor :duration + # @!attribute hide + # @return [Boolean] Whether the comment is hidden for the user + attr_accessor :hide + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @comment_id = attributes[:comment_id] || attributes['comment_id'] + @duration = attributes[:duration] || attributes['duration'] + @hide = attributes[:hide] || attributes['hide'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + comment_id: 'comment_id', + duration: 'duration', + hide: 'hide' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/comment_response.rb b/lib/getstream_ruby/generated/models/comment_response.rb index 9780903d..40b0a309 100644 --- a/lib/getstream_ruby/generated/models/comment_response.rb +++ b/lib/getstream_ruby/generated/models/comment_response.rb @@ -24,6 +24,9 @@ class CommentResponse < GetStream::BaseModel # @!attribute downvote_count # @return [Integer] Number of downvotes for this comment attr_accessor :downvote_count + # @!attribute hidden + # @return [Boolean] Only true in QueryComments results filtered with hidden: true + attr_accessor :hidden # @!attribute id # @return [String] Unique identifier for the comment attr_accessor :id @@ -99,6 +102,7 @@ def initialize(attributes = {}) @confidence_score = attributes[:confidence_score] || attributes['confidence_score'] @created_at = attributes[:created_at] || attributes['created_at'] @downvote_count = attributes[:downvote_count] || attributes['downvote_count'] + @hidden = attributes[:hidden] || attributes['hidden'] @id = attributes[:id] || attributes['id'] @object_type = attributes[:object_type] || attributes['object_type'] @reaction_count = attributes[:reaction_count] || attributes['reaction_count'] @@ -131,6 +135,7 @@ def self.json_field_mappings confidence_score: 'confidence_score', created_at: 'created_at', downvote_count: 'downvote_count', + hidden: 'hidden', id: 'id', object_type: 'object_type', reaction_count: 'reaction_count', diff --git a/lib/getstream_ruby/generated/models/config_overrides_request.rb b/lib/getstream_ruby/generated/models/config_overrides_request.rb index 24cb5603..be2d2350 100644 --- a/lib/getstream_ruby/generated/models/config_overrides_request.rb +++ b/lib/getstream_ruby/generated/models/config_overrides_request.rb @@ -22,7 +22,7 @@ class ConfigOverridesRequest < GetStream::BaseModel # @return [Integer] Maximum message length attr_accessor :max_message_length # @!attribute push_level - # @return [String] + # @return [String] Overrides the push notification level for this channel attr_accessor :push_level # @!attribute quotes # @return [Boolean] Enable/disable quotes diff --git a/lib/getstream_ruby/generated/models/config_response.rb b/lib/getstream_ruby/generated/models/config_response.rb index 95a70c21..b85fa5a4 100644 --- a/lib/getstream_ruby/generated/models/config_response.rb +++ b/lib/getstream_ruby/generated/models/config_response.rb @@ -63,6 +63,9 @@ class ConfigResponse < GetStream::BaseModel # @!attribute flood_config # @return [FloodConfig] attr_accessor :flood_config + # @!attribute intent_config + # @return [IntentConfigResponse] + attr_accessor :intent_config # @!attribute llm_config # @return [LLMConfig] attr_accessor :llm_config @@ -94,6 +97,7 @@ def initialize(attributes = {}) @automod_toxicity_config = attributes[:automod_toxicity_config] || attributes['automod_toxicity_config'] || nil @block_list_config = attributes[:block_list_config] || attributes['block_list_config'] || nil @flood_config = attributes[:flood_config] || attributes['flood_config'] || nil + @intent_config = attributes[:intent_config] || attributes['intent_config'] || nil @llm_config = attributes[:llm_config] || attributes['llm_config'] || nil @velocity_filter_config = attributes[:velocity_filter_config] || attributes['velocity_filter_config'] || nil @video_call_rule_config = attributes[:video_call_rule_config] || attributes['video_call_rule_config'] || nil @@ -120,6 +124,7 @@ def self.json_field_mappings automod_toxicity_config: 'automod_toxicity_config', block_list_config: 'block_list_config', flood_config: 'flood_config', + intent_config: 'intent_config', llm_config: 'llm_config', velocity_filter_config: 'velocity_filter_config', video_call_rule_config: 'video_call_rule_config' diff --git a/lib/getstream_ruby/generated/models/content_country_code_parameters.rb b/lib/getstream_ruby/generated/models/content_country_code_parameters.rb new file mode 100644 index 00000000..a8f87d18 --- /dev/null +++ b/lib/getstream_ruby/generated/models/content_country_code_parameters.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class ContentCountryCodeParameters < GetStream::BaseModel + + # Model attributes + # @!attribute operator + # @return [String] + attr_accessor :operator + # @!attribute country_codes + # @return [Array] + attr_accessor :country_codes + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @operator = attributes[:operator] || attributes['operator'] || nil + @country_codes = attributes[:country_codes] || attributes['country_codes'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + operator: 'operator', + country_codes: 'country_codes' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/create_block_list_request.rb b/lib/getstream_ruby/generated/models/create_block_list_request.rb index 586c0482..85223812 100644 --- a/lib/getstream_ruby/generated/models/create_block_list_request.rb +++ b/lib/getstream_ruby/generated/models/create_block_list_request.rb @@ -31,7 +31,7 @@ class CreateBlockListRequest < GetStream::BaseModel # @return [String] attr_accessor :team # @!attribute type - # @return [String] Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word + # @return [String] Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word, word_allowlist attr_accessor :type # @!attribute user_id # @return [String] diff --git a/lib/getstream_ruby/generated/models/create_channel_type_response.rb b/lib/getstream_ruby/generated/models/create_channel_type_response.rb index 3e27698a..00f26bff 100644 --- a/lib/getstream_ruby/generated/models/create_channel_type_response.rb +++ b/lib/getstream_ruby/generated/models/create_channel_type_response.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # + # Basic response information class CreateChannelTypeResponse < GetStream::BaseModel # Model attributes @@ -31,7 +31,7 @@ class CreateChannelTypeResponse < GetStream::BaseModel # @return [Boolean] attr_accessor :delivery_events # @!attribute duration - # @return [String] + # @return [String] Duration of the request in milliseconds attr_accessor :duration # @!attribute mark_messages_pending # @return [Boolean] @@ -115,7 +115,7 @@ class CreateChannelTypeResponse < GetStream::BaseModel # @return [String] attr_accessor :partition_ttl # @!attribute push_level - # @return [String] + # @return [String] Sets the push notification level for a channel type attr_accessor :push_level # @!attribute allowed_flag_reasons # @return [Array] diff --git a/lib/getstream_ruby/generated/models/create_poll_option_request.rb b/lib/getstream_ruby/generated/models/create_poll_option_request.rb index 1770cb19..b8051294 100644 --- a/lib/getstream_ruby/generated/models/create_poll_option_request.rb +++ b/lib/getstream_ruby/generated/models/create_poll_option_request.rb @@ -12,6 +12,12 @@ class CreatePollOptionRequest < GetStream::BaseModel # @!attribute text # @return [String] Option text attr_accessor :text + # @!attribute config_key + # @return [String] Key of the moderation configuration to use. Server-side only. + attr_accessor :config_key + # @!attribute config_team + # @return [String] Team associated with the configuration. Server-side only. + attr_accessor :config_team # @!attribute user_id # @return [String] attr_accessor :user_id @@ -26,6 +32,8 @@ class CreatePollOptionRequest < GetStream::BaseModel def initialize(attributes = {}) super(attributes) @text = attributes[:text] || attributes['text'] + @config_key = attributes[:config_key] || attributes['config_key'] || nil + @config_team = attributes[:config_team] || attributes['config_team'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @custom = attributes[:custom] || attributes['custom'] || nil @user = attributes[:user] || attributes['user'] || nil @@ -35,6 +43,8 @@ def initialize(attributes = {}) def self.json_field_mappings { text: 'text', + config_key: 'config_key', + config_team: 'config_team', user_id: 'user_id', custom: 'custom', user: 'user' diff --git a/lib/getstream_ruby/generated/models/create_poll_request.rb b/lib/getstream_ruby/generated/models/create_poll_request.rb index a52bb608..28a21949 100644 --- a/lib/getstream_ruby/generated/models/create_poll_request.rb +++ b/lib/getstream_ruby/generated/models/create_poll_request.rb @@ -18,6 +18,12 @@ class CreatePollRequest < GetStream::BaseModel # @!attribute allow_user_suggested_options # @return [Boolean] attr_accessor :allow_user_suggested_options + # @!attribute config_key + # @return [String] Key of the moderation configuration to use. Server-side only. + attr_accessor :config_key + # @!attribute config_team + # @return [String] Team associated with the configuration. Server-side only. + attr_accessor :config_team # @!attribute description # @return [String] A description of the poll attr_accessor :description @@ -33,11 +39,14 @@ class CreatePollRequest < GetStream::BaseModel # @!attribute max_votes_allowed # @return [Integer] Indicates the maximum amount of votes a user can cast attr_accessor :max_votes_allowed + # @!attribute team + # @return [String] + attr_accessor :team # @!attribute user_id # @return [String] attr_accessor :user_id # @!attribute voting_visibility - # @return [String] + # @return [String] Represents the visibility of votes in a poll. attr_accessor :voting_visibility # @!attribute options # @return [Array] @@ -55,11 +64,14 @@ def initialize(attributes = {}) @name = attributes[:name] || attributes['name'] @allow_answers = attributes[:allow_answers] || attributes['allow_answers'] || nil @allow_user_suggested_options = attributes[:allow_user_suggested_options] || attributes['allow_user_suggested_options'] || nil + @config_key = attributes[:config_key] || attributes['config_key'] || nil + @config_team = attributes[:config_team] || attributes['config_team'] || nil @description = attributes[:description] || attributes['description'] || nil @enforce_unique_vote = attributes[:enforce_unique_vote] || attributes['enforce_unique_vote'] || nil @id = attributes[:id] || attributes['id'] || nil @is_closed = attributes[:is_closed] || attributes['is_closed'] || nil @max_votes_allowed = attributes[:max_votes_allowed] || attributes['max_votes_allowed'] || nil + @team = attributes[:team] || attributes['team'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @voting_visibility = attributes[:voting_visibility] || attributes['voting_visibility'] || nil @options = attributes[:options] || attributes['options'] || nil @@ -73,11 +85,14 @@ def self.json_field_mappings name: 'name', allow_answers: 'allow_answers', allow_user_suggested_options: 'allow_user_suggested_options', + config_key: 'config_key', + config_team: 'config_team', description: 'description', enforce_unique_vote: 'enforce_unique_vote', id: 'id', is_closed: 'is_closed', max_votes_allowed: 'max_votes_allowed', + team: 'team', user_id: 'user_id', voting_visibility: 'voting_visibility', options: 'options', diff --git a/lib/getstream_ruby/generated/models/create_reminder_request.rb b/lib/getstream_ruby/generated/models/create_reminder_request.rb index f8e6173c..e94ad0c3 100644 --- a/lib/getstream_ruby/generated/models/create_reminder_request.rb +++ b/lib/getstream_ruby/generated/models/create_reminder_request.rb @@ -9,6 +9,9 @@ module Models class CreateReminderRequest < GetStream::BaseModel # Model attributes + # @!attribute expires_at + # @return [DateTime] + attr_accessor :expires_at # @!attribute remind_at # @return [DateTime] attr_accessor :remind_at @@ -22,6 +25,7 @@ class CreateReminderRequest < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @expires_at = attributes[:expires_at] || attributes['expires_at'] || nil @remind_at = attributes[:remind_at] || attributes['remind_at'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @user = attributes[:user] || attributes['user'] || nil @@ -30,6 +34,7 @@ def initialize(attributes = {}) # Override field mappings for JSON serialization def self.json_field_mappings { + expires_at: 'expires_at', remind_at: 'remind_at', user_id: 'user_id', user: 'user' diff --git a/lib/getstream_ruby/generated/models/delete_feeds_retention_policy_request.rb b/lib/getstream_ruby/generated/models/delete_feeds_retention_policy_request.rb new file mode 100644 index 00000000..19d5ebfd --- /dev/null +++ b/lib/getstream_ruby/generated/models/delete_feeds_retention_policy_request.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class DeleteFeedsRetentionPolicyRequest < GetStream::BaseModel + + # Model attributes + # @!attribute policy + # @return [String] + attr_accessor :policy + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @policy = attributes[:policy] || attributes['policy'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + policy: 'policy' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/delete_feeds_retention_policy_response.rb b/lib/getstream_ruby/generated/models/delete_feeds_retention_policy_response.rb new file mode 100644 index 00000000..e28459dd --- /dev/null +++ b/lib/getstream_ruby/generated/models/delete_feeds_retention_policy_response.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Basic response information + class DeleteFeedsRetentionPolicyResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/delete_poll_answer_request_payload.rb b/lib/getstream_ruby/generated/models/delete_poll_answer_request_payload.rb new file mode 100644 index 00000000..689c7c5f --- /dev/null +++ b/lib/getstream_ruby/generated/models/delete_poll_answer_request_payload.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Configuration for deleting the free-text poll answer a review item was raised for. Chat polls only. Deletion is permanent; the poll and other votes are kept. + class DeletePollAnswerRequestPayload < GetStream::BaseModel + + # Model attributes + # @!attribute reason + # @return [String] Reason for deletion + attr_accessor :reason + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @reason = attributes[:reason] || attributes['reason'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + reason: 'reason' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/delete_poll_option_request_payload.rb b/lib/getstream_ruby/generated/models/delete_poll_option_request_payload.rb new file mode 100644 index 00000000..699e91c5 --- /dev/null +++ b/lib/getstream_ruby/generated/models/delete_poll_option_request_payload.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Configuration for deleting the single poll option a review item was raised for. Deletion is permanent; the rest of the poll is kept. + class DeletePollOptionRequestPayload < GetStream::BaseModel + + # Model attributes + # @!attribute option_id + # @return [String] Option to delete. Required on an item for a whole poll (create or edit); defaults to the option an add_option / update_option item was raised for + attr_accessor :option_id + # @!attribute reason + # @return [String] Reason for deletion + attr_accessor :reason + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @option_id = attributes[:option_id] || attributes['option_id'] || nil + @reason = attributes[:reason] || attributes['reason'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + option_id: 'option_id', + reason: 'reason' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/delete_poll_request_payload.rb b/lib/getstream_ruby/generated/models/delete_poll_request_payload.rb new file mode 100644 index 00000000..15727db0 --- /dev/null +++ b/lib/getstream_ruby/generated/models/delete_poll_request_payload.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Configuration for poll deletion action. Poll deletion is always permanent. + class DeletePollRequestPayload < GetStream::BaseModel + + # Model attributes + # @!attribute reason + # @return [String] Reason for deletion + attr_accessor :reason + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @reason = attributes[:reason] || attributes['reason'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + reason: 'reason' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/delete_scheduled_message_response.rb b/lib/getstream_ruby/generated/models/delete_scheduled_message_response.rb new file mode 100644 index 00000000..a03b7260 --- /dev/null +++ b/lib/getstream_ruby/generated/models/delete_scheduled_message_response.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class DeleteScheduledMessageResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute scheduled_message + # @return [ScheduledMessageResponse] A message scheduled to be sent later + attr_accessor :scheduled_message + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @scheduled_message = attributes[:scheduled_message] || attributes['scheduled_message'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + scheduled_message: 'scheduled_message' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/delete_user_interests_response.rb b/lib/getstream_ruby/generated/models/delete_user_interests_response.rb new file mode 100644 index 00000000..2d00dc4d --- /dev/null +++ b/lib/getstream_ruby/generated/models/delete_user_interests_response.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # The user's remaining interest tags, ordered by descending weight, then manually set tags before computed ones, then descending count, then ascending tag name + class DeleteUserInterestsResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] + attr_accessor :duration + # @!attribute interests + # @return [Array] Interest tags still set on the user + attr_accessor :interests + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @interests = attributes[:interests] || attributes['interests'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + interests: 'interests' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/delivery_receipts_response.rb b/lib/getstream_ruby/generated/models/delivery_receipts_response.rb index 8707bfca..ad2d963c 100644 --- a/lib/getstream_ruby/generated/models/delivery_receipts_response.rb +++ b/lib/getstream_ruby/generated/models/delivery_receipts_response.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # + # The settings for the delivery receipt events. class DeliveryReceiptsResponse < GetStream::BaseModel # Model attributes diff --git a/lib/getstream_ruby/generated/models/device_response.rb b/lib/getstream_ruby/generated/models/device_response.rb index d24c2359..914d53b5 100644 --- a/lib/getstream_ruby/generated/models/device_response.rb +++ b/lib/getstream_ruby/generated/models/device_response.rb @@ -5,15 +5,15 @@ module GetStream module Generated module Models - # Response for Device + # An object representing a device which can receive push notifications. class DeviceResponse < GetStream::BaseModel # Model attributes # @!attribute created_at - # @return [DateTime] Date/time of creation + # @return [DateTime] The date when the device was created. attr_accessor :created_at # @!attribute id - # @return [String] Device ID + # @return [String] The device identifier. attr_accessor :id # @!attribute push_provider # @return [String] Push provider diff --git a/lib/getstream_ruby/generated/models/enrichment_options.rb b/lib/getstream_ruby/generated/models/enrichment_options.rb index d6437ade..21ddb59d 100644 --- a/lib/getstream_ruby/generated/models/enrichment_options.rb +++ b/lib/getstream_ruby/generated/models/enrichment_options.rb @@ -15,6 +15,9 @@ class EnrichmentOptions < GetStream::BaseModel # @!attribute include_flat_activities # @return [Boolean] Controls the top-level flat 'activities' array for aggregated feeds. For new apps, defaults to false (excluded); set to true to include. For older apps, defaults to true (included) for backward compatibility; set to false to exclude. attr_accessor :include_flat_activities + # @!attribute include_ranking_config + # @return [Boolean] Default: false. Server-side only. When true, the response includes ranking_config: the ranking configuration (from the feed view, or the feed group as fallback) used to rank this read. + attr_accessor :include_ranking_config # @!attribute include_score_vars # @return [Boolean] Default: false. When true, includes score_vars in activity responses containing variable values used at ranking time. attr_accessor :include_score_vars @@ -75,6 +78,7 @@ def initialize(attributes = {}) super(attributes) @enrich_own_followings = attributes[:enrich_own_followings] || attributes['enrich_own_followings'] || nil @include_flat_activities = attributes[:include_flat_activities] || attributes['include_flat_activities'] || nil + @include_ranking_config = attributes[:include_ranking_config] || attributes['include_ranking_config'] || nil @include_score_vars = attributes[:include_score_vars] || attributes['include_score_vars'] || nil @skip_activity = attributes[:skip_activity] || attributes['skip_activity'] || nil @skip_activity_collections = attributes[:skip_activity_collections] || attributes['skip_activity_collections'] || nil @@ -100,6 +104,7 @@ def self.json_field_mappings { enrich_own_followings: 'enrich_own_followings', include_flat_activities: 'include_flat_activities', + include_ranking_config: 'include_ranking_config', include_score_vars: 'include_score_vars', skip_activity: 'skip_activity', skip_activity_collections: 'skip_activity_collections', diff --git a/lib/getstream_ruby/generated/models/entity_creator_response.rb b/lib/getstream_ruby/generated/models/entity_creator_response.rb index 66d2d4d3..6ceacf6c 100644 --- a/lib/getstream_ruby/generated/models/entity_creator_response.rb +++ b/lib/getstream_ruby/generated/models/entity_creator_response.rb @@ -85,7 +85,7 @@ class EntityCreatorResponse < GetStream::BaseModel # @return [Array] attr_accessor :devices # @!attribute privacy_settings - # @return [PrivacySettingsResponse] + # @return [PrivacySettingsResponse] The privacy settings of the user. attr_accessor :privacy_settings # @!attribute push_notifications # @return [PushNotificationSettingsResponse] diff --git a/lib/getstream_ruby/generated/models/event_hook.rb b/lib/getstream_ruby/generated/models/event_hook.rb index f79b25cc..aa71b928 100644 --- a/lib/getstream_ruby/generated/models/event_hook.rb +++ b/lib/getstream_ruby/generated/models/event_hook.rb @@ -15,6 +15,18 @@ class EventHook < GetStream::BaseModel # @!attribute enabled # @return [Boolean] attr_accessor :enabled + # @!attribute gcp_pubsub_auth_type + # @return [String] + attr_accessor :gcp_pubsub_auth_type + # @!attribute gcp_pubsub_event_based_ordering_key_enabled + # @return [Boolean] + attr_accessor :gcp_pubsub_event_based_ordering_key_enabled + # @!attribute gcp_pubsub_region + # @return [String] + attr_accessor :gcp_pubsub_region + # @!attribute gcp_pubsub_topic + # @return [String] + attr_accessor :gcp_pubsub_topic # @!attribute hook_type # @return [String] attr_accessor :hook_type @@ -51,6 +63,9 @@ class EventHook < GetStream::BaseModel # @!attribute sqs_auth_type # @return [String] attr_accessor :sqs_auth_type + # @!attribute sqs_event_based_message_group_id_enabled + # @return [Boolean] + attr_accessor :sqs_event_based_message_group_id_enabled # @!attribute sqs_key # @return [String] attr_accessor :sqs_key @@ -90,6 +105,10 @@ def initialize(attributes = {}) super(attributes) @created_at = attributes[:created_at] || attributes['created_at'] || nil @enabled = attributes[:enabled] || attributes['enabled'] || nil + @gcp_pubsub_auth_type = attributes[:gcp_pubsub_auth_type] || attributes['gcp_pubsub_auth_type'] || nil + @gcp_pubsub_event_based_ordering_key_enabled = attributes[:gcp_pubsub_event_based_ordering_key_enabled] || attributes['gcp_pubsub_event_based_ordering_key_enabled'] || nil + @gcp_pubsub_region = attributes[:gcp_pubsub_region] || attributes['gcp_pubsub_region'] || nil + @gcp_pubsub_topic = attributes[:gcp_pubsub_topic] || attributes['gcp_pubsub_topic'] || nil @hook_type = attributes[:hook_type] || attributes['hook_type'] || nil @id = attributes[:id] || attributes['id'] || nil @product = attributes[:product] || attributes['product'] || nil @@ -102,6 +121,7 @@ def initialize(attributes = {}) @sns_secret = attributes[:sns_secret] || attributes['sns_secret'] || nil @sns_topic_arn = attributes[:sns_topic_arn] || attributes['sns_topic_arn'] || nil @sqs_auth_type = attributes[:sqs_auth_type] || attributes['sqs_auth_type'] || nil + @sqs_event_based_message_group_id_enabled = attributes[:sqs_event_based_message_group_id_enabled] || attributes['sqs_event_based_message_group_id_enabled'] || nil @sqs_key = attributes[:sqs_key] || attributes['sqs_key'] || nil @sqs_queue_url = attributes[:sqs_queue_url] || attributes['sqs_queue_url'] || nil @sqs_region = attributes[:sqs_region] || attributes['sqs_region'] || nil @@ -120,6 +140,10 @@ def self.json_field_mappings { created_at: 'created_at', enabled: 'enabled', + gcp_pubsub_auth_type: 'gcp_pubsub_auth_type', + gcp_pubsub_event_based_ordering_key_enabled: 'gcp_pubsub_event_based_ordering_key_enabled', + gcp_pubsub_region: 'gcp_pubsub_region', + gcp_pubsub_topic: 'gcp_pubsub_topic', hook_type: 'hook_type', id: 'id', product: 'product', @@ -132,6 +156,7 @@ def self.json_field_mappings sns_secret: 'sns_secret', sns_topic_arn: 'sns_topic_arn', sqs_auth_type: 'sqs_auth_type', + sqs_event_based_message_group_id_enabled: 'sqs_event_based_message_group_id_enabled', sqs_key: 'sqs_key', sqs_queue_url: 'sqs_queue_url', sqs_region: 'sqs_region', diff --git a/lib/getstream_ruby/generated/models/feeds_notification_comment.rb b/lib/getstream_ruby/generated/models/feeds_notification_comment.rb index 1fba76b8..f20f1bfb 100644 --- a/lib/getstream_ruby/generated/models/feeds_notification_comment.rb +++ b/lib/getstream_ruby/generated/models/feeds_notification_comment.rb @@ -18,6 +18,9 @@ class FeedsNotificationComment < GetStream::BaseModel # @!attribute user_id # @return [String] attr_accessor :user_id + # @!attribute parent_id + # @return [String] + attr_accessor :parent_id # @!attribute attachments # @return [Array] attr_accessor :attachments @@ -28,6 +31,7 @@ def initialize(attributes = {}) @comment = attributes[:comment] || attributes['comment'] @id = attributes[:id] || attributes['id'] @user_id = attributes[:user_id] || attributes['user_id'] + @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil @attachments = attributes[:attachments] || attributes['attachments'] || nil end @@ -37,6 +41,7 @@ def self.json_field_mappings comment: 'comment', id: 'id', user_id: 'user_id', + parent_id: 'parent_id', attachments: 'attachments' } end diff --git a/lib/getstream_ruby/generated/models/feeds_policy_config.rb b/lib/getstream_ruby/generated/models/feeds_policy_config.rb new file mode 100644 index 00000000..504b3f4e --- /dev/null +++ b/lib/getstream_ruby/generated/models/feeds_policy_config.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class FeedsPolicyConfig < GetStream::BaseModel + + # Model attributes + # @!attribute max_age_hours + # @return [Integer] + attr_accessor :max_age_hours + # @!attribute feed_groups + # @return [Array] + attr_accessor :feed_groups + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @max_age_hours = attributes[:max_age_hours] || attributes['max_age_hours'] + @feed_groups = attributes[:feed_groups] || attributes['feed_groups'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + max_age_hours: 'max_age_hours', + feed_groups: 'feed_groups' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/feeds_retention_policy.rb b/lib/getstream_ruby/generated/models/feeds_retention_policy.rb new file mode 100644 index 00000000..b02ca728 --- /dev/null +++ b/lib/getstream_ruby/generated/models/feeds_retention_policy.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class FeedsRetentionPolicy < GetStream::BaseModel + + # Model attributes + # @!attribute app_pk + # @return [Integer] + attr_accessor :app_pk + # @!attribute enabled_at + # @return [DateTime] + attr_accessor :enabled_at + # @!attribute policy + # @return [String] + attr_accessor :policy + # @!attribute config + # @return [FeedsPolicyConfig] + attr_accessor :config + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @app_pk = attributes[:app_pk] || attributes['app_pk'] + @enabled_at = attributes[:enabled_at] || attributes['enabled_at'] + @policy = attributes[:policy] || attributes['policy'] + @config = attributes[:config] || attributes['config'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + app_pk: 'app_pk', + enabled_at: 'enabled_at', + policy: 'policy', + config: 'config' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/feeds_retention_run_response.rb b/lib/getstream_ruby/generated/models/feeds_retention_run_response.rb new file mode 100644 index 00000000..19d5cac2 --- /dev/null +++ b/lib/getstream_ruby/generated/models/feeds_retention_run_response.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class FeedsRetentionRunResponse < GetStream::BaseModel + + # Model attributes + # @!attribute app_pk + # @return [Integer] + attr_accessor :app_pk + # @!attribute date + # @return [String] + attr_accessor :date + # @!attribute policy + # @return [String] + attr_accessor :policy + # @!attribute stats + # @return [RunStats] + attr_accessor :stats + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @app_pk = attributes[:app_pk] || attributes['app_pk'] + @date = attributes[:date] || attributes['date'] + @policy = attributes[:policy] || attributes['policy'] + @stats = attributes[:stats] || attributes['stats'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + app_pk: 'app_pk', + date: 'date', + policy: 'policy', + stats: 'stats' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/feeds_v3_comment_response.rb b/lib/getstream_ruby/generated/models/feeds_v3_comment_response.rb index 3ba94c52..9da08039 100644 --- a/lib/getstream_ruby/generated/models/feeds_v3_comment_response.rb +++ b/lib/getstream_ruby/generated/models/feeds_v3_comment_response.rb @@ -24,6 +24,9 @@ class FeedsV3CommentResponse < GetStream::BaseModel # @!attribute downvote_count # @return [Integer] attr_accessor :downvote_count + # @!attribute hidden + # @return [Boolean] + attr_accessor :hidden # @!attribute id # @return [String] attr_accessor :id @@ -99,6 +102,7 @@ def initialize(attributes = {}) @confidence_score = attributes[:confidence_score] || attributes['confidence_score'] @created_at = attributes[:created_at] || attributes['created_at'] @downvote_count = attributes[:downvote_count] || attributes['downvote_count'] + @hidden = attributes[:hidden] || attributes['hidden'] @id = attributes[:id] || attributes['id'] @object_type = attributes[:object_type] || attributes['object_type'] @reaction_count = attributes[:reaction_count] || attributes['reaction_count'] @@ -131,6 +135,7 @@ def self.json_field_mappings confidence_score: 'confidence_score', created_at: 'created_at', downvote_count: 'downvote_count', + hidden: 'hidden', id: 'id', object_type: 'object_type', reaction_count: 'reaction_count', diff --git a/lib/getstream_ruby/generated/models/file_upload_request.rb b/lib/getstream_ruby/generated/models/file_upload_request.rb index 93cc424d..ecdb465d 100644 --- a/lib/getstream_ruby/generated/models/file_upload_request.rb +++ b/lib/getstream_ruby/generated/models/file_upload_request.rb @@ -7,6 +7,7 @@ module Generated module Models # class FileUploadRequest < GetStream::BaseModel + include GetStream::MultipartRequest # Model attributes # @!attribute file diff --git a/lib/getstream_ruby/generated/models/filter_config_response.rb b/lib/getstream_ruby/generated/models/filter_config_response.rb index 152df2b5..39e8c52e 100644 --- a/lib/getstream_ruby/generated/models/filter_config_response.rb +++ b/lib/getstream_ruby/generated/models/filter_config_response.rb @@ -15,6 +15,9 @@ class FilterConfigResponse < GetStream::BaseModel # @!attribute ai_image_labels # @return [Array] AI image moderation labels available as filter values. Reflects the app's effective image taxonomy: custom Bodyguard taxonomy when enabled, otherwise the standard L1 label set. attr_accessor :ai_image_labels + # @!attribute ai_image_ocr_labels + # @return [Array] Labels the image OCR pipeline can flag, available as filter values on the `label` field under the ai_image category. The app's LLM labels when LLM configurability is enabled, otherwise the AI text labels. OCR and image-classification labels share the `label` field, so a name present in both matches either. + attr_accessor :ai_image_ocr_labels # @!attribute ai_text_labels # @return [Array] AI text moderation labels available as filter values attr_accessor :ai_text_labels @@ -24,6 +27,9 @@ class FilterConfigResponse < GetStream::BaseModel # @!attribute filterable_custom_keys # @return [Array] The moderation_payload.custom keys the app has configured as review-queue filter chips (via moderation_dashboard_preferences.filterable_custom_keys). Discovery hint for the dashboard only — the filter accepts any custom key regardless of this list. attr_accessor :filterable_custom_keys + # @!attribute rule_names + # @return [Array] Names of the app's moderation rules, available as filter values on the `label` field when filtering rule-flagged content. Includes disabled rules, since items flagged before a rule was turned off still carry its name; excludes deleted ones. Scoped to the caller's teams on a multi-tenant app. Capped at 30 names, ordered by name, so an app above that cap is listed partially. + attr_accessor :rule_names # @!attribute ai_image_taxonomy # @return [Hash>] AI image moderation labels available as filter values, as a map of L1 label to its L2 sub-labels. Reflects the app's effective image taxonomy: custom Bodyguard taxonomy when enabled, otherwise the standard catalogue of the org's enabled image providers. attr_accessor :ai_image_taxonomy @@ -33,9 +39,11 @@ def initialize(attributes = {}) super(attributes) @llm_labels = attributes[:llm_labels] || attributes['llm_labels'] @ai_image_labels = attributes[:ai_image_labels] || attributes['ai_image_labels'] || nil + @ai_image_ocr_labels = attributes[:ai_image_ocr_labels] || attributes['ai_image_ocr_labels'] || nil @ai_text_labels = attributes[:ai_text_labels] || attributes['ai_text_labels'] || nil @config_keys = attributes[:config_keys] || attributes['config_keys'] || nil @filterable_custom_keys = attributes[:filterable_custom_keys] || attributes['filterable_custom_keys'] || nil + @rule_names = attributes[:rule_names] || attributes['rule_names'] || nil @ai_image_taxonomy = attributes[:ai_image_taxonomy] || attributes['ai_image_taxonomy'] || nil end @@ -44,9 +52,11 @@ def self.json_field_mappings { llm_labels: 'llm_labels', ai_image_labels: 'ai_image_labels', + ai_image_ocr_labels: 'ai_image_ocr_labels', ai_text_labels: 'ai_text_labels', config_keys: 'config_keys', filterable_custom_keys: 'filterable_custom_keys', + rule_names: 'rule_names', ai_image_taxonomy: 'ai_image_taxonomy' } end diff --git a/lib/getstream_ruby/generated/models/flood_identical_rule_parameters.rb b/lib/getstream_ruby/generated/models/flood_identical_rule_parameters.rb index 64bf09c0..015fc84a 100644 --- a/lib/getstream_ruby/generated/models/flood_identical_rule_parameters.rb +++ b/lib/getstream_ruby/generated/models/flood_identical_rule_parameters.rb @@ -9,12 +9,18 @@ module Models class FloodIdenticalRuleParameters < GetStream::BaseModel # Model attributes + # @!attribute min_text_length + # @return [Integer] + attr_accessor :min_text_length # @!attribute threshold # @return [Integer] attr_accessor :threshold # @!attribute time_window # @return [String] attr_accessor :time_window + # @!attribute track_across_users + # @return [Boolean] + attr_accessor :track_across_users # @!attribute allowlist # @return [Array] attr_accessor :allowlist @@ -22,16 +28,20 @@ class FloodIdenticalRuleParameters < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @min_text_length = attributes[:min_text_length] || attributes['min_text_length'] || nil @threshold = attributes[:threshold] || attributes['threshold'] || nil @time_window = attributes[:time_window] || attributes['time_window'] || nil + @track_across_users = attributes[:track_across_users] || attributes['track_across_users'] || nil @allowlist = attributes[:allowlist] || attributes['allowlist'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { + min_text_length: 'min_text_length', threshold: 'threshold', time_window: 'time_window', + track_across_users: 'track_across_users', allowlist: 'allowlist' } end diff --git a/lib/getstream_ruby/generated/models/flood_similar_rule_parameters.rb b/lib/getstream_ruby/generated/models/flood_similar_rule_parameters.rb index 1c9b5820..68512b20 100644 --- a/lib/getstream_ruby/generated/models/flood_similar_rule_parameters.rb +++ b/lib/getstream_ruby/generated/models/flood_similar_rule_parameters.rb @@ -9,6 +9,9 @@ module Models class FloodSimilarRuleParameters < GetStream::BaseModel # Model attributes + # @!attribute min_text_length + # @return [Integer] + attr_accessor :min_text_length # @!attribute similarity_distance # @return [Integer] attr_accessor :similarity_distance @@ -25,6 +28,7 @@ class FloodSimilarRuleParameters < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @min_text_length = attributes[:min_text_length] || attributes['min_text_length'] || nil @similarity_distance = attributes[:similarity_distance] || attributes['similarity_distance'] || nil @threshold = attributes[:threshold] || attributes['threshold'] || nil @time_window = attributes[:time_window] || attributes['time_window'] || nil @@ -34,6 +38,7 @@ def initialize(attributes = {}) # Override field mappings for JSON serialization def self.json_field_mappings { + min_text_length: 'min_text_length', similarity_distance: 'similarity_distance', threshold: 'threshold', time_window: 'time_window', diff --git a/lib/getstream_ruby/generated/models/follow_batch_request.rb b/lib/getstream_ruby/generated/models/follow_batch_request.rb index 26c120f5..94973b7d 100644 --- a/lib/getstream_ruby/generated/models/follow_batch_request.rb +++ b/lib/getstream_ruby/generated/models/follow_batch_request.rb @@ -12,6 +12,9 @@ class FollowBatchRequest < GetStream::BaseModel # @!attribute follows # @return [Array] List of follow relationships to create attr_accessor :follows + # @!attribute async + # @return [Boolean] If true, the batch is queued as a background task, paced per app, and the response has empty follows and a task_id. Server-side only. Supported by the get-or-create endpoint (GetOrCreateFollows); FollowBatch rejects it. Async batches can apply out of order with other follow writes. Defaults to false. + attr_accessor :async # @!attribute create_users # @return [Boolean] If true, auto-creates users referenced by source/target FIDs in the batch when they don't already exist. Server-side only. Defaults to false. This top-level field is the only supported batch/upsert create_users control. attr_accessor :create_users @@ -23,6 +26,7 @@ class FollowBatchRequest < GetStream::BaseModel def initialize(attributes = {}) super(attributes) @follows = attributes[:follows] || attributes['follows'] + @async = attributes[:async] || attributes['async'] || nil @create_users = attributes[:create_users] || attributes['create_users'] || nil @enrich_own_fields = attributes[:enrich_own_fields] || attributes['enrich_own_fields'] || nil end @@ -31,6 +35,7 @@ def initialize(attributes = {}) def self.json_field_mappings { follows: 'follows', + async: 'async', create_users: 'create_users', enrich_own_fields: 'enrich_own_fields' } diff --git a/lib/getstream_ruby/generated/models/follow_batch_response.rb b/lib/getstream_ruby/generated/models/follow_batch_response.rb index e9486f31..a464f34f 100644 --- a/lib/getstream_ruby/generated/models/follow_batch_response.rb +++ b/lib/getstream_ruby/generated/models/follow_batch_response.rb @@ -18,6 +18,9 @@ class FollowBatchResponse < GetStream::BaseModel # @!attribute follows # @return [Array] List of current follow relationships attr_accessor :follows + # @!attribute task_id + # @return [String] ID of the background task when the request was sent with async: true + attr_accessor :task_id # Initialize with attributes def initialize(attributes = {}) @@ -25,6 +28,7 @@ def initialize(attributes = {}) @duration = attributes[:duration] || attributes['duration'] @created = attributes[:created] || attributes['created'] @follows = attributes[:follows] || attributes['follows'] + @task_id = attributes[:task_id] || attributes['task_id'] || nil end # Override field mappings for JSON serialization @@ -32,7 +36,8 @@ def self.json_field_mappings { duration: 'duration', created: 'created', - follows: 'follows' + follows: 'follows', + task_id: 'task_id' } end end diff --git a/lib/getstream_ruby/generated/models/full_user_response.rb b/lib/getstream_ruby/generated/models/full_user_response.rb index da9580e3..ee385e7e 100644 --- a/lib/getstream_ruby/generated/models/full_user_response.rb +++ b/lib/getstream_ruby/generated/models/full_user_response.rb @@ -40,7 +40,8 @@ class FullUserResponse < GetStream::BaseModel # @return [Integer] attr_accessor :unread_channels # @!attribute unread_count - # @return [Integer] + # @deprecated This field is deprecated. + # @return [Integer] Deprecated: Use total_unread_count instead. attr_accessor :unread_count # @!attribute unread_threads # @return [Integer] @@ -97,7 +98,7 @@ class FullUserResponse < GetStream::BaseModel # @return [Array] attr_accessor :latest_hidden_channels # @!attribute privacy_settings - # @return [PrivacySettingsResponse] + # @return [PrivacySettingsResponse] The privacy settings of the user. attr_accessor :privacy_settings # @!attribute teams_role # @return [Hash] diff --git a/lib/getstream_ruby/generated/models/get_application_response.rb b/lib/getstream_ruby/generated/models/get_application_response.rb index 848e336c..185667c0 100644 --- a/lib/getstream_ruby/generated/models/get_application_response.rb +++ b/lib/getstream_ruby/generated/models/get_application_response.rb @@ -13,7 +13,7 @@ class GetApplicationResponse < GetStream::BaseModel # @return [String] Duration of the request in milliseconds attr_accessor :duration # @!attribute app - # @return [AppResponseFields] + # @return [AppResponseFields] A type representing the app settings. attr_accessor :app # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/get_channel_type_response.rb b/lib/getstream_ruby/generated/models/get_channel_type_response.rb index 026e4559..418ede9a 100644 --- a/lib/getstream_ruby/generated/models/get_channel_type_response.rb +++ b/lib/getstream_ruby/generated/models/get_channel_type_response.rb @@ -115,7 +115,7 @@ class GetChannelTypeResponse < GetStream::BaseModel # @return [String] attr_accessor :partition_ttl # @!attribute push_level - # @return [String] + # @return [String] Sets the push notification level for a channel type attr_accessor :push_level # @!attribute allowed_flag_reasons # @return [Array] diff --git a/lib/getstream_ruby/generated/models/get_comments_response.rb b/lib/getstream_ruby/generated/models/get_comments_response.rb index 1f3cae8b..21029a2a 100644 --- a/lib/getstream_ruby/generated/models/get_comments_response.rb +++ b/lib/getstream_ruby/generated/models/get_comments_response.rb @@ -9,6 +9,9 @@ module Models class GetCommentsResponse < GetStream::BaseModel # Model attributes + # @!attribute comment_count + # @return [Integer] Total number of comments on the object, including replies at every depth + attr_accessor :comment_count # @!attribute duration # @return [String] attr_accessor :duration @@ -24,25 +27,32 @@ class GetCommentsResponse < GetStream::BaseModel # @!attribute prev # @return [String] attr_accessor :prev + # @!attribute top_level_comment_count + # @return [Integer] Number of comments directly on the object, excluding replies. Independent of depth, replies_limit and id_around, and not adjusted per viewer. Only present when include_top_level_comment_count is set + attr_accessor :top_level_comment_count # Initialize with attributes def initialize(attributes = {}) super(attributes) + @comment_count = attributes[:comment_count] || attributes['comment_count'] @duration = attributes[:duration] || attributes['duration'] @sort = attributes[:sort] || attributes['sort'] @comments = attributes[:comments] || attributes['comments'] @next = attributes[:next] || attributes['next'] || nil @prev = attributes[:prev] || attributes['prev'] || nil + @top_level_comment_count = attributes[:top_level_comment_count] || attributes['top_level_comment_count'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { + comment_count: 'comment_count', duration: 'duration', sort: 'sort', comments: 'comments', next: 'next', - prev: 'prev' + prev: 'prev', + top_level_comment_count: 'top_level_comment_count' } end end diff --git a/lib/getstream_ruby/generated/models/get_feeds_retention_policy_response.rb b/lib/getstream_ruby/generated/models/get_feeds_retention_policy_response.rb new file mode 100644 index 00000000..745d9ef5 --- /dev/null +++ b/lib/getstream_ruby/generated/models/get_feeds_retention_policy_response.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Basic response information + class GetFeedsRetentionPolicyResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute enabled + # @return [Boolean] + attr_accessor :enabled + # @!attribute policies + # @return [Array] + attr_accessor :policies + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @enabled = attributes[:enabled] || attributes['enabled'] + @policies = attributes[:policies] || attributes['policies'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + enabled: 'enabled', + policies: 'policies' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/get_feeds_retention_policy_runs_request.rb b/lib/getstream_ruby/generated/models/get_feeds_retention_policy_runs_request.rb new file mode 100644 index 00000000..57f352d8 --- /dev/null +++ b/lib/getstream_ruby/generated/models/get_feeds_retention_policy_runs_request.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class GetFeedsRetentionPolicyRunsRequest < GetStream::BaseModel + + # Model attributes + # @!attribute limit + # @return [Integer] + attr_accessor :limit + # @!attribute next + # @return [String] + attr_accessor :next + # @!attribute prev + # @return [String] + attr_accessor :prev + # @!attribute sort + # @return [Array] Array of sort parameters + attr_accessor :sort + # @!attribute filter_conditions + # @return [Object] Filter conditions to apply to the query + attr_accessor :filter_conditions + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @limit = attributes[:limit] || attributes['limit'] || nil + @next = attributes[:next] || attributes['next'] || nil + @prev = attributes[:prev] || attributes['prev'] || nil + @sort = attributes[:sort] || attributes['sort'] || nil + @filter_conditions = attributes[:filter_conditions] || attributes['filter_conditions'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + limit: 'limit', + next: 'next', + prev: 'prev', + sort: 'sort', + filter_conditions: 'filter_conditions' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/get_feeds_retention_policy_runs_response.rb b/lib/getstream_ruby/generated/models/get_feeds_retention_policy_runs_response.rb new file mode 100644 index 00000000..3c018970 --- /dev/null +++ b/lib/getstream_ruby/generated/models/get_feeds_retention_policy_runs_response.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Basic response information + class GetFeedsRetentionPolicyRunsResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute runs + # @return [Array] + attr_accessor :runs + # @!attribute next + # @return [String] + attr_accessor :next + # @!attribute prev + # @return [String] + attr_accessor :prev + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @runs = attributes[:runs] || attributes['runs'] + @next = attributes[:next] || attributes['next'] || nil + @prev = attributes[:prev] || attributes['prev'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + runs: 'runs', + next: 'next', + prev: 'prev' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/get_or_create_channel_defaults.rb b/lib/getstream_ruby/generated/models/get_or_create_channel_defaults.rb new file mode 100644 index 00000000..ade145f6 --- /dev/null +++ b/lib/getstream_ruby/generated/models/get_or_create_channel_defaults.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Defaults applied by the get-or-create channel endpoint. + class GetOrCreateChannelDefaults < GetStream::BaseModel + + # Model attributes + # @!attribute members + # @return [PagerDefaults] Resolved defaults for a nested pagination object. + attr_accessor :members + # @!attribute messages + # @return [PagerDefaults] Resolved defaults for a nested pagination object. + attr_accessor :messages + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @members = attributes[:members] || attributes['members'] + @messages = attributes[:messages] || attributes['messages'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + members: 'members', + messages: 'messages' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/get_or_create_feed_request.rb b/lib/getstream_ruby/generated/models/get_or_create_feed_request.rb index bec10b67..22ba2d45 100644 --- a/lib/getstream_ruby/generated/models/get_or_create_feed_request.rb +++ b/lib/getstream_ruby/generated/models/get_or_create_feed_request.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # Client request + # class GetOrCreateFeedRequest < GetStream::BaseModel # Model attributes @@ -33,6 +33,9 @@ class GetOrCreateFeedRequest < GetStream::BaseModel # @!attribute watch # @return [Boolean] attr_accessor :watch + # @!attribute discard_actors + # @return [Array] Feature-gated; not available for all apps. Request-scoped list of actor/user IDs whose activities are filtered from this GetOrCreateFeed response only. Merged (union) into the viewing user's in-memory blocked authors for this request; never persisted to blocked_users. Max: 1000. + attr_accessor :discard_actors # @!attribute data # @return [FeedInput] attr_accessor :data @@ -75,6 +78,7 @@ def initialize(attributes = {}) @user_id = attributes[:user_id] || attributes['user_id'] || nil @view = attributes[:view] || attributes['view'] || nil @watch = attributes[:watch] || attributes['watch'] || nil + @discard_actors = attributes[:discard_actors] || attributes['discard_actors'] || nil @data = attributes[:data] || attributes['data'] || nil @enrichment_options = attributes[:enrichment_options] || attributes['enrichment_options'] || nil @external_ranking = attributes[:external_ranking] || attributes['external_ranking'] || nil @@ -98,6 +102,7 @@ def self.json_field_mappings user_id: 'user_id', view: 'view', watch: 'watch', + discard_actors: 'discard_actors', data: 'data', enrichment_options: 'enrichment_options', external_ranking: 'external_ranking', diff --git a/lib/getstream_ruby/generated/models/get_or_create_feed_response.rb b/lib/getstream_ruby/generated/models/get_or_create_feed_response.rb index 8537f431..8e2d1717 100644 --- a/lib/getstream_ruby/generated/models/get_or_create_feed_response.rb +++ b/lib/getstream_ruby/generated/models/get_or_create_feed_response.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # Basic response information + # class GetOrCreateFeedResponse < GetStream::BaseModel # Model attributes @@ -42,6 +42,9 @@ class GetOrCreateFeedResponse < GetStream::BaseModel # @!attribute prev # @return [String] attr_accessor :prev + # @!attribute degraded_selectors + # @return [Array] Activity selectors dropped from this read because they exceeded their time budget (see the time_budget_ms selector setting). Their activities are missing from this page, and they stay out for the rest of this pagination session. Omitted when every selector completed + attr_accessor :degraded_selectors # @!attribute followers_pagination # @return [PagerResponse] attr_accessor :followers_pagination @@ -54,6 +57,9 @@ class GetOrCreateFeedResponse < GetStream::BaseModel # @!attribute notification_status # @return [NotificationStatusResponse] attr_accessor :notification_status + # @!attribute ranking_config + # @return [RankingConfig] + attr_accessor :ranking_config # Initialize with attributes def initialize(attributes = {}) @@ -69,10 +75,12 @@ def initialize(attributes = {}) @feed = attributes[:feed] || attributes['feed'] @next = attributes[:next] || attributes['next'] || nil @prev = attributes[:prev] || attributes['prev'] || nil + @degraded_selectors = attributes[:degraded_selectors] || attributes['degraded_selectors'] || nil @followers_pagination = attributes[:followers_pagination] || attributes['followers_pagination'] || nil @following_pagination = attributes[:following_pagination] || attributes['following_pagination'] || nil @member_pagination = attributes[:member_pagination] || attributes['member_pagination'] || nil @notification_status = attributes[:notification_status] || attributes['notification_status'] || nil + @ranking_config = attributes[:ranking_config] || attributes['ranking_config'] || nil end # Override field mappings for JSON serialization @@ -89,10 +97,12 @@ def self.json_field_mappings feed: 'feed', next: 'next', prev: 'prev', + degraded_selectors: 'degraded_selectors', followers_pagination: 'followers_pagination', following_pagination: 'following_pagination', member_pagination: 'member_pagination', - notification_status: 'notification_status' + notification_status: 'notification_status', + ranking_config: 'ranking_config' } end end diff --git a/lib/getstream_ruby/generated/models/get_user_interests_response.rb b/lib/getstream_ruby/generated/models/get_user_interests_response.rb index 8d9882d8..fc6076bf 100644 --- a/lib/getstream_ruby/generated/models/get_user_interests_response.rb +++ b/lib/getstream_ruby/generated/models/get_user_interests_response.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # User's computed interest tags ordered by descending count, then ascending tag name + # User's interest tags ordered by descending weight, then manually set tags before computed ones, then descending count, then ascending tag name class GetUserInterestsResponse < GetStream::BaseModel # Model attributes @@ -13,7 +13,7 @@ class GetUserInterestsResponse < GetStream::BaseModel # @return [String] attr_accessor :duration # @!attribute interests - # @return [Array] Top-N interest tags sorted by descending count, then alphabetically by tag + # @return [Array] Interest tags sorted by descending weight, then manually set tags before computed ones, then descending count, then alphabetically by tag attr_accessor :interests # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/grouped_channels_bucket.rb b/lib/getstream_ruby/generated/models/grouped_channels_bucket.rb index b43ae8c8..e9838509 100644 --- a/lib/getstream_ruby/generated/models/grouped_channels_bucket.rb +++ b/lib/getstream_ruby/generated/models/grouped_channels_bucket.rb @@ -19,7 +19,7 @@ class GroupedChannelsBucket < GetStream::BaseModel # @return [String] Cursor for the previous page of this group attr_accessor :prev # @!attribute unread_channels - # @return [Integer] Unread channels currently classified into this bucket + # @return [Integer] Total unread channels matching this bucket and its filters, independent of page size attr_accessor :unread_channels # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/grouped_channels_group_request.rb b/lib/getstream_ruby/generated/models/grouped_channels_group_request.rb index 737e19e5..753b2db3 100644 --- a/lib/getstream_ruby/generated/models/grouped_channels_group_request.rb +++ b/lib/getstream_ruby/generated/models/grouped_channels_group_request.rb @@ -10,14 +10,17 @@ class GroupedChannelsGroupRequest < GetStream::BaseModel # Model attributes # @!attribute limit - # @return [Integer] + # @return [Integer] Max channels for this group; omitted or zero uses the request limit attr_accessor :limit # @!attribute next - # @return [String] + # @return [String] Cursor for the next page; only allowed when requesting one group attr_accessor :next # @!attribute prev - # @return [String] + # @return [String] Cursor for the previous page; only allowed when requesting one group attr_accessor :prev + # @!attribute filter_conditions + # @return [Object] Optional query_timestamp $gte bound for a stored group, requiring query_timestamp sort; do not repeat its group name. For all, combine group equality/$in and date bounds with $or, or use one standalone group $ne exclusion. An empty object matches a stored group; omitted or null preserves legacy grouping. + attr_accessor :filter_conditions # Initialize with attributes def initialize(attributes = {}) @@ -25,6 +28,7 @@ def initialize(attributes = {}) @limit = attributes[:limit] || attributes['limit'] || nil @next = attributes[:next] || attributes['next'] || nil @prev = attributes[:prev] || attributes['prev'] || nil + @filter_conditions = attributes[:filter_conditions] || attributes['filter_conditions'] || nil end # Override field mappings for JSON serialization @@ -32,7 +36,8 @@ def self.json_field_mappings { limit: 'limit', next: 'next', - prev: 'prev' + prev: 'prev', + filter_conditions: 'filter_conditions' } end end diff --git a/lib/getstream_ruby/generated/models/grouped_query_channels_request.rb b/lib/getstream_ruby/generated/models/grouped_query_channels_request.rb index 4f8ccfff..4ad9b0dc 100644 --- a/lib/getstream_ruby/generated/models/grouped_query_channels_request.rb +++ b/lib/getstream_ruby/generated/models/grouped_query_channels_request.rb @@ -15,8 +15,11 @@ class GroupedQueryChannelsRequest < GetStream::BaseModel # @!attribute user_id # @return [String] attr_accessor :user_id + # @!attribute sort + # @return [Array] Optional query_timestamp descending with NULLS LAST when enabled. Omitted sort preserves existing last_updated ordering and cursor formats + attr_accessor :sort # @!attribute groups - # @return [Hash] Groups to return, keyed by group name. Each group can define limit, next, or prev. 'next' and 'prev' cursors are only allowed when the request contains exactly one group; multi-group pagination is rejected. + # @return [Hash] Groups to return, keyed by stored group name. Each entry can define limit, next, prev, and optional filter_conditions: date bounds for stored groups; all supports combined group/date branches or one group $ne exclusion. Cursors are only allowed when requesting exactly one group. Omitted or null filters preserve legacy grouping, including all. attr_accessor :groups # @!attribute user # @return [UserRequest] User request object @@ -27,6 +30,7 @@ def initialize(attributes = {}) super(attributes) @limit = attributes[:limit] || attributes['limit'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil + @sort = attributes[:sort] || attributes['sort'] || nil @groups = attributes[:groups] || attributes['groups'] || nil @user = attributes[:user] || attributes['user'] || nil end @@ -36,6 +40,7 @@ def self.json_field_mappings { limit: 'limit', user_id: 'user_id', + sort: 'sort', groups: 'groups', user: 'user' } diff --git a/lib/getstream_ruby/generated/models/grouped_query_channels_response.rb b/lib/getstream_ruby/generated/models/grouped_query_channels_response.rb index ea83efc8..01cde204 100644 --- a/lib/getstream_ruby/generated/models/grouped_query_channels_response.rb +++ b/lib/getstream_ruby/generated/models/grouped_query_channels_response.rb @@ -13,7 +13,7 @@ class GroupedQueryChannelsResponse < GetStream::BaseModel # @return [String] Duration of the request in milliseconds attr_accessor :duration # @!attribute groups - # @return [Hash] Predefined channel groups keyed by group name + # @return [Hash] Groups keyed by the requested stored group name attr_accessor :groups # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/image_upload_request.rb b/lib/getstream_ruby/generated/models/image_upload_request.rb index b66e54d9..f560e66f 100644 --- a/lib/getstream_ruby/generated/models/image_upload_request.rb +++ b/lib/getstream_ruby/generated/models/image_upload_request.rb @@ -7,6 +7,7 @@ module Generated module Models # class ImageUploadRequest < GetStream::BaseModel + include GetStream::MultipartRequest # Model attributes # @!attribute file diff --git a/lib/getstream_ruby/generated/models/intent_condition_info.rb b/lib/getstream_ruby/generated/models/intent_condition_info.rb new file mode 100644 index 00000000..2e888b40 --- /dev/null +++ b/lib/getstream_ruby/generated/models/intent_condition_info.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class IntentConditionInfo < GetStream::BaseModel + + # Model attributes + # @!attribute passed + # @return [Boolean] Whether the score reached the threshold. + attr_accessor :passed + # @!attribute score + # @return [Integer] Final (damped) score of the topic in this analysis; 0 when the topic is not defined in the policy. + attr_accessor :score + # @!attribute threshold + # @return [Integer] Minimum score (1-100) the condition requires. + attr_accessor :threshold + # @!attribute topic + # @return [String] Policy intent topic label the condition references. + attr_accessor :topic + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @passed = attributes[:passed] || attributes['passed'] + @score = attributes[:score] || attributes['score'] + @threshold = attributes[:threshold] || attributes['threshold'] + @topic = attributes[:topic] || attributes['topic'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + passed: 'passed', + score: 'score', + threshold: 'threshold', + topic: 'topic' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/intent_config_request.rb b/lib/getstream_ruby/generated/models/intent_config_request.rb new file mode 100644 index 00000000..7da3abc1 --- /dev/null +++ b/lib/getstream_ruby/generated/models/intent_config_request.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class IntentConfigRequest < GetStream::BaseModel + + # Model attributes + # @!attribute topics + # @return [Array] Topics to classify conversation text against (max 20, labels must be unique) + attr_accessor :topics + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @topics = attributes[:topics] || attributes['topics'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + topics: 'topics' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/intent_config_response.rb b/lib/getstream_ruby/generated/models/intent_config_response.rb new file mode 100644 index 00000000..a5064419 --- /dev/null +++ b/lib/getstream_ruby/generated/models/intent_config_response.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class IntentConfigResponse < GetStream::BaseModel + + # Model attributes + # @!attribute topics + # @return [Array] Topics conversation text is classified against + attr_accessor :topics + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @topics = attributes[:topics] || attributes['topics'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + topics: 'topics' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/intent_evaluation_info.rb b/lib/getstream_ruby/generated/models/intent_evaluation_info.rb new file mode 100644 index 00000000..6d8a7201 --- /dev/null +++ b/lib/getstream_ruby/generated/models/intent_evaluation_info.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class IntentEvaluationInfo < GetStream::BaseModel + + # Model attributes + # @!attribute conversation_id + # @return [String] The analyzed conversation: the channel CID for chat, the object ID for feeds. + attr_accessor :conversation_id + # @!attribute message_count + # @return [Integer] Number of conversation messages sent to the model. + attr_accessor :message_count + # @!attribute conditions + # @return [Array] One entry per `intent_rule` condition of the rule, flat conditions first, then group conditions. + attr_accessor :conditions + # @!attribute raw_scores + # @return [Hash] Score (0-100) the model gave every topic in the analysis call, keyed by topic label, before message-count damping. + attr_accessor :raw_scores + # @!attribute scores + # @return [Hash] Final score (0-100) of every topic after message-count damping, keyed by topic label. Conditions compare against these. + attr_accessor :scores + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @conversation_id = attributes[:conversation_id] || attributes['conversation_id'] + @message_count = attributes[:message_count] || attributes['message_count'] + @conditions = attributes[:conditions] || attributes['conditions'] + @raw_scores = attributes[:raw_scores] || attributes['raw_scores'] + @scores = attributes[:scores] || attributes['scores'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + conversation_id: 'conversation_id', + message_count: 'message_count', + conditions: 'conditions', + raw_scores: 'raw_scores', + scores: 'scores' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/intent_rule_parameters.rb b/lib/getstream_ruby/generated/models/intent_rule_parameters.rb new file mode 100644 index 00000000..de4a77a5 --- /dev/null +++ b/lib/getstream_ruby/generated/models/intent_rule_parameters.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # intent_rule params: policy intent topic label and the minimum final score (1-100) that fires the condition + class IntentRuleParameters < GetStream::BaseModel + + # Model attributes + # @!attribute topic + # @return [String] + attr_accessor :topic + # @!attribute threshold + # @return [Integer] + attr_accessor :threshold + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @topic = attributes[:topic] || attributes['topic'] + @threshold = attributes[:threshold] || attributes['threshold'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + topic: 'topic', + threshold: 'threshold' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/intent_score_response.rb b/lib/getstream_ruby/generated/models/intent_score_response.rb new file mode 100644 index 00000000..56c1a0e7 --- /dev/null +++ b/lib/getstream_ruby/generated/models/intent_score_response.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class IntentScoreResponse < GetStream::BaseModel + + # Model attributes + # @!attribute score + # @return [Integer] + attr_accessor :score + # @!attribute topic + # @return [String] + attr_accessor :topic + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @score = attributes[:score] || attributes['score'] + @topic = attributes[:topic] || attributes['topic'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + score: 'score', + topic: 'topic' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/intent_topic_request.rb b/lib/getstream_ruby/generated/models/intent_topic_request.rb new file mode 100644 index 00000000..8c6794f7 --- /dev/null +++ b/lib/getstream_ruby/generated/models/intent_topic_request.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class IntentTopicRequest < GetStream::BaseModel + + # Model attributes + # @!attribute label + # @return [String] Unique topic label (e.g. purchase_intent) + attr_accessor :label + # @!attribute description + # @return [String] Optional description used in the classification prompt; the label alone is used when empty + attr_accessor :description + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @label = attributes[:label] || attributes['label'] + @description = attributes[:description] || attributes['description'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + label: 'label', + description: 'description' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/intent_topic_response.rb b/lib/getstream_ruby/generated/models/intent_topic_response.rb new file mode 100644 index 00000000..85b96c93 --- /dev/null +++ b/lib/getstream_ruby/generated/models/intent_topic_response.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class IntentTopicResponse < GetStream::BaseModel + + # Model attributes + # @!attribute label + # @return [String] Unique topic label (e.g. purchase_intent) + attr_accessor :label + # @!attribute description + # @return [String] Optional description used in the classification prompt; the label alone is used when empty + attr_accessor :description + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @label = attributes[:label] || attributes['label'] + @description = attributes[:description] || attributes['description'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + label: 'label', + description: 'description' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/interest_tag_response.rb b/lib/getstream_ruby/generated/models/interest_tag_response.rb index 30adc8ed..5a02ea06 100644 --- a/lib/getstream_ruby/generated/models/interest_tag_response.rb +++ b/lib/getstream_ruby/generated/models/interest_tag_response.rb @@ -5,29 +5,39 @@ module GetStream module Generated module Models - # An interest tag with the number of distinct activities the user reacted to that carried it + # An interest tag of a user with its ranking weight and, for computed tags, how many distinct reacted-to activities carried it class InterestTagResponse < GetStream::BaseModel # Model attributes # @!attribute count - # @return [Integer] Number of distinct reacted-to activities tagged with this value + # @return [Integer] Lifetime number of distinct reacted-to activities tagged with this value, without decay; 0 for manually set tags attr_accessor :count + # @!attribute source + # @return [String] How the tag was set: computed (from the user's reactions) or manual (through the API) + attr_accessor :source # @!attribute tag # @return [String] The interest tag value attr_accessor :tag + # @!attribute weight + # @return [Float] Ranking weight between -1.0 and 1.0. Computed tags carry a recency-decayed weight in (0, 1.0]: the user's strongest tag is 1.0 and every other a proportional share + attr_accessor :weight # Initialize with attributes def initialize(attributes = {}) super(attributes) @count = attributes[:count] || attributes['count'] + @source = attributes[:source] || attributes['source'] @tag = attributes[:tag] || attributes['tag'] + @weight = attributes[:weight] || attributes['weight'] end # Override field mappings for JSON serialization def self.json_field_mappings { count: 'count', - tag: 'tag' + source: 'source', + tag: 'tag', + weight: 'weight' } end end diff --git a/lib/getstream_ruby/generated/models/labels_request.rb b/lib/getstream_ruby/generated/models/labels_request.rb index 64fa6ea0..5b25ea18 100644 --- a/lib/getstream_ruby/generated/models/labels_request.rb +++ b/lib/getstream_ruby/generated/models/labels_request.rb @@ -25,7 +25,7 @@ class LabelsRequest < GetStream::BaseModel # @return [Boolean] When true, run moderation and return labels without persisting the result. Useful for one-off checks (e.g. UI testers) that should not be recorded in the stored history. attr_accessor :dry_run # @!attribute policy - # @return [String] Optional moderation policy key (max 128 chars). For username moderation, set this to a policy whose key starts with 'username:' (e.g. 'username:default') to opt into the low-latency fast-path: blocklists (customer + Stream-managed defaults) short-circuit the LLM, and the LLM fallback uses gpt-4.1-nano with a 24h Valkey verdict cache. Without a 'username:' prefix the request falls through to the standard Bodyguard Analyze v1 username path. + # @return [String] Optional moderation policy key (max 128 chars). For username moderation, set this to a policy whose key starts with 'username:' (e.g. 'username:default') to opt into the low-latency fast-path: blocklists (customer + Stream-managed defaults) short-circuit the LLM, and the LLM fallback uses gpt-4o-mini (overridable via moderation_settings.llm_username_model) with a 24h Valkey verdict cache. Without a 'username:' prefix the request falls through to the standard Bodyguard Analyze v1 username path. attr_accessor :policy # @!attribute user_id # @return [String] Optional customer-supplied user identifier for the content author (max 256 chars). Enables filtering stored results by user_id. diff --git a/lib/getstream_ruby/generated/models/lifecycle_settings_request.rb b/lib/getstream_ruby/generated/models/lifecycle_settings_request.rb new file mode 100644 index 00000000..f42f9812 --- /dev/null +++ b/lib/getstream_ruby/generated/models/lifecycle_settings_request.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class LifecycleSettingsRequest < GetStream::BaseModel + + # Model attributes + # @!attribute mode + # @return [String] Call lifecycle mode. One of: reusable, single_use. A single_use call cannot be reused once it has ended; the server ends it when its ring settles without an answer (currently: when the caller cancels the ring). Fixed at call creation + attr_accessor :mode + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @mode = attributes[:mode] || attributes['mode'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + mode: 'mode' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/lifecycle_settings_response.rb b/lib/getstream_ruby/generated/models/lifecycle_settings_response.rb new file mode 100644 index 00000000..8abeb44f --- /dev/null +++ b/lib/getstream_ruby/generated/models/lifecycle_settings_response.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # LifecycleSettings is the payload for call lifecycle settings + class LifecycleSettingsResponse < GetStream::BaseModel + + # Model attributes + # @!attribute mode + # @return [String] Call lifecycle mode. One of: reusable, single_use. A single_use call cannot be reused once it has ended; the server ends it when its ring settles without an answer (currently: when the caller cancels the ring). Fixed at call creation + attr_accessor :mode + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @mode = attributes[:mode] || attributes['mode'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + mode: 'mode' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/member_user_request.rb b/lib/getstream_ruby/generated/models/member_user_request.rb index b29ce8e5..06b8810a 100644 --- a/lib/getstream_ruby/generated/models/member_user_request.rb +++ b/lib/getstream_ruby/generated/models/member_user_request.rb @@ -34,7 +34,7 @@ class MemberUserRequest < GetStream::BaseModel # @return [Object] attr_accessor :custom # @!attribute privacy_settings - # @return [PrivacySettingsResponse] + # @return [PrivacySettingsResponse] The privacy settings of the user. attr_accessor :privacy_settings # @!attribute teams_role # @return [Hash] diff --git a/lib/getstream_ruby/generated/models/message_moderation_result.rb b/lib/getstream_ruby/generated/models/message_moderation_result.rb index d3c36856..4defed6b 100644 --- a/lib/getstream_ruby/generated/models/message_moderation_result.rb +++ b/lib/getstream_ruby/generated/models/message_moderation_result.rb @@ -37,7 +37,7 @@ class MessageModerationResult < GetStream::BaseModel # @return [String] User who moderated the message attr_accessor :moderated_by # @!attribute ai_moderation_response - # @return [ModerationResponse] + # @return [ModerationResponse] Response from AI moderation attr_accessor :ai_moderation_response # @!attribute moderation_thresholds # @return [Thresholds] Sets thresholds for AI moderation diff --git a/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb b/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb index 6bdf1215..06359766 100644 --- a/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb +++ b/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb @@ -18,6 +18,9 @@ class ModerationDashboardPreferences < GetStream::BaseModel # @!attribute custom_views_enabled # @return [Boolean] attr_accessor :custom_views_enabled + # @!attribute disable_action_logs + # @return [Boolean] + attr_accessor :disable_action_logs # @!attribute disable_audit_logs # @return [Boolean] attr_accessor :disable_audit_logs @@ -61,6 +64,7 @@ def initialize(attributes = {}) @async_review_queue_upsert = attributes[:async_review_queue_upsert] || attributes['async_review_queue_upsert'] || nil @block_foreign_cdn_attachments = attributes[:block_foreign_cdn_attachments] || attributes['block_foreign_cdn_attachments'] || nil @custom_views_enabled = attributes[:custom_views_enabled] || attributes['custom_views_enabled'] || nil + @disable_action_logs = attributes[:disable_action_logs] || attributes['disable_action_logs'] || nil @disable_audit_logs = attributes[:disable_audit_logs] || attributes['disable_audit_logs'] || nil @disable_flagging_reviewed_entity = attributes[:disable_flagging_reviewed_entity] || attributes['disable_flagging_reviewed_entity'] || nil @enforce_shadow_server_side = attributes[:enforce_shadow_server_side] || attributes['enforce_shadow_server_side'] || nil @@ -81,6 +85,7 @@ def self.json_field_mappings async_review_queue_upsert: 'async_review_queue_upsert', block_foreign_cdn_attachments: 'block_foreign_cdn_attachments', custom_views_enabled: 'custom_views_enabled', + disable_action_logs: 'disable_action_logs', disable_audit_logs: 'disable_audit_logs', disable_flagging_reviewed_entity: 'disable_flagging_reviewed_entity', enforce_shadow_server_side: 'enforce_shadow_server_side', diff --git a/lib/getstream_ruby/generated/models/moderation_payload.rb b/lib/getstream_ruby/generated/models/moderation_payload.rb index 936f7b12..5458eee6 100644 --- a/lib/getstream_ruby/generated/models/moderation_payload.rb +++ b/lib/getstream_ruby/generated/models/moderation_payload.rb @@ -9,6 +9,9 @@ module Models class ModerationPayload < GetStream::BaseModel # Model attributes + # @!attribute country_code + # @return [String] + attr_accessor :country_code # @!attribute audios # @return [Array] attr_accessor :audios @@ -43,6 +46,7 @@ class ModerationPayload < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @country_code = attributes[:country_code] || attributes['country_code'] || nil @audios = attributes[:audios] || attributes['audios'] || nil @image_ordered_keys = attributes[:image_ordered_keys] || attributes['image_ordered_keys'] || nil @images = attributes[:images] || attributes['images'] || nil @@ -58,6 +62,7 @@ def initialize(attributes = {}) # Override field mappings for JSON serialization def self.json_field_mappings { + country_code: 'country_code', audios: 'audios', image_ordered_keys: 'image_ordered_keys', images: 'images', diff --git a/lib/getstream_ruby/generated/models/moderation_response.rb b/lib/getstream_ruby/generated/models/moderation_response.rb index 974f7233..2dee03cb 100644 --- a/lib/getstream_ruby/generated/models/moderation_response.rb +++ b/lib/getstream_ruby/generated/models/moderation_response.rb @@ -5,21 +5,21 @@ module GetStream module Generated module Models - # + # Response from AI moderation class ModerationResponse < GetStream::BaseModel # Model attributes # @!attribute action - # @return [String] + # @return [String] Action taken by automod attr_accessor :action # @!attribute explicit - # @return [Float] + # @return [Float] Explicit score attr_accessor :explicit # @!attribute spam - # @return [Float] + # @return [Float] Spam score attr_accessor :spam # @!attribute toxic - # @return [Float] + # @return [Float] Toxicity score attr_accessor :toxic # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/moderation_rules_triggered_event.rb b/lib/getstream_ruby/generated/models/moderation_rules_triggered_event.rb index 57eed561..c61d5fdd 100644 --- a/lib/getstream_ruby/generated/models/moderation_rules_triggered_event.rb +++ b/lib/getstream_ruby/generated/models/moderation_rules_triggered_event.rb @@ -45,6 +45,9 @@ class ModerationRulesTriggeredEvent < GetStream::BaseModel # @!attribute matched_contents # @return [Array] Ordered list of contents whose verdicts contributed to an aggregation rule's threshold. Populated only for aggregation rules when callers supplied `content_ids`. attr_accessor :matched_contents + # @!attribute intent + # @return [IntentEvaluationInfo] + attr_accessor :intent # Initialize with attributes def initialize(attributes = {}) @@ -61,6 +64,7 @@ def initialize(attributes = {}) @review_queue_item_id = attributes[:review_queue_item_id] || attributes['review_queue_item_id'] || nil @violation_number = attributes[:violation_number] || attributes['violation_number'] || nil @matched_contents = attributes[:matched_contents] || attributes['matched_contents'] || nil + @intent = attributes[:intent] || attributes['intent'] || nil end # Override field mappings for JSON serialization @@ -77,7 +81,8 @@ def self.json_field_mappings received_at: 'received_at', review_queue_item_id: 'review_queue_item_id', violation_number: 'violation_number', - matched_contents: 'matched_contents' + matched_contents: 'matched_contents', + intent: 'intent' } end end diff --git a/lib/getstream_ruby/generated/models/notification_comment.rb b/lib/getstream_ruby/generated/models/notification_comment.rb index a9fb56ee..c342943b 100644 --- a/lib/getstream_ruby/generated/models/notification_comment.rb +++ b/lib/getstream_ruby/generated/models/notification_comment.rb @@ -10,16 +10,19 @@ class NotificationComment < GetStream::BaseModel # Model attributes # @!attribute comment - # @return [String] + # @return [String] The text of the comment attr_accessor :comment # @!attribute id - # @return [String] + # @return [String] The ID of the comment attr_accessor :id # @!attribute user_id - # @return [String] + # @return [String] The ID of the user who wrote the comment attr_accessor :user_id + # @!attribute parent_id + # @return [String] The ID of the parent comment when this comment is a reply; omitted for top-level comments + attr_accessor :parent_id # @!attribute attachments - # @return [Array] + # @return [Array] Attachments on the comment attr_accessor :attachments # Initialize with attributes @@ -28,6 +31,7 @@ def initialize(attributes = {}) @comment = attributes[:comment] || attributes['comment'] @id = attributes[:id] || attributes['id'] @user_id = attributes[:user_id] || attributes['user_id'] + @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil @attachments = attributes[:attachments] || attributes['attachments'] || nil end @@ -37,6 +41,7 @@ def self.json_field_mappings comment: 'comment', id: 'id', user_id: 'user_id', + parent_id: 'parent_id', attachments: 'attachments' } end diff --git a/lib/getstream_ruby/generated/models/own_user_response.rb b/lib/getstream_ruby/generated/models/own_user_response.rb index 5bc33740..97bf0215 100644 --- a/lib/getstream_ruby/generated/models/own_user_response.rb +++ b/lib/getstream_ruby/generated/models/own_user_response.rb @@ -37,7 +37,8 @@ class OwnUserResponse < GetStream::BaseModel # @return [Integer] attr_accessor :unread_channels # @!attribute unread_count - # @return [Integer] + # @deprecated This field is deprecated. + # @return [Integer] Deprecated: Use total_unread_count instead. attr_accessor :unread_count # @!attribute unread_threads # @return [Integer] @@ -45,6 +46,9 @@ class OwnUserResponse < GetStream::BaseModel # @!attribute updated_at # @return [DateTime] attr_accessor :updated_at + # @!attribute blocked_user_ids + # @return [Array] + attr_accessor :blocked_user_ids # @!attribute channel_mutes # @return [Array] attr_accessor :channel_mutes @@ -81,17 +85,14 @@ class OwnUserResponse < GetStream::BaseModel # @!attribute revoke_tokens_issued_before # @return [DateTime] attr_accessor :revoke_tokens_issued_before - # @!attribute blocked_user_ids - # @return [Array] - attr_accessor :blocked_user_ids # @!attribute latest_hidden_channels # @return [Array] attr_accessor :latest_hidden_channels # @!attribute privacy_settings - # @return [PrivacySettingsResponse] + # @return [PrivacySettingsResponse] The privacy settings of the user. attr_accessor :privacy_settings # @!attribute push_preferences - # @return [PushPreferencesResponse] + # @return [PushPreferencesResponse] The push preference details. attr_accessor :push_preferences # @!attribute teams_role # @return [Hash] @@ -115,6 +116,7 @@ def initialize(attributes = {}) @unread_count = attributes[:unread_count] || attributes['unread_count'] @unread_threads = attributes[:unread_threads] || attributes['unread_threads'] @updated_at = attributes[:updated_at] || attributes['updated_at'] + @blocked_user_ids = attributes[:blocked_user_ids] || attributes['blocked_user_ids'] @channel_mutes = attributes[:channel_mutes] || attributes['channel_mutes'] @devices = attributes[:devices] || attributes['devices'] @mutes = attributes[:mutes] || attributes['mutes'] @@ -127,7 +129,6 @@ def initialize(attributes = {}) @last_active = attributes[:last_active] || attributes['last_active'] || nil @name = attributes[:name] || attributes['name'] || nil @revoke_tokens_issued_before = attributes[:revoke_tokens_issued_before] || attributes['revoke_tokens_issued_before'] || nil - @blocked_user_ids = attributes[:blocked_user_ids] || attributes['blocked_user_ids'] || nil @latest_hidden_channels = attributes[:latest_hidden_channels] || attributes['latest_hidden_channels'] || nil @privacy_settings = attributes[:privacy_settings] || attributes['privacy_settings'] || nil @push_preferences = attributes[:push_preferences] || attributes['push_preferences'] || nil @@ -150,6 +151,7 @@ def self.json_field_mappings unread_count: 'unread_count', unread_threads: 'unread_threads', updated_at: 'updated_at', + blocked_user_ids: 'blocked_user_ids', channel_mutes: 'channel_mutes', devices: 'devices', mutes: 'mutes', @@ -162,7 +164,6 @@ def self.json_field_mappings last_active: 'last_active', name: 'name', revoke_tokens_issued_before: 'revoke_tokens_issued_before', - blocked_user_ids: 'blocked_user_ids', latest_hidden_channels: 'latest_hidden_channels', privacy_settings: 'privacy_settings', push_preferences: 'push_preferences', diff --git a/lib/getstream_ruby/generated/models/pager_defaults.rb b/lib/getstream_ruby/generated/models/pager_defaults.rb new file mode 100644 index 00000000..6f1cdc78 --- /dev/null +++ b/lib/getstream_ruby/generated/models/pager_defaults.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Resolved defaults for a nested pagination object. + class PagerDefaults < GetStream::BaseModel + + # Model attributes + # @!attribute limit + # @return [Integer] Number of records returned when `limit` is omitted. + attr_accessor :limit + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @limit = attributes[:limit] || attributes['limit'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + limit: 'limit' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/poll_closed_event.rb b/lib/getstream_ruby/generated/models/poll_closed_event.rb new file mode 100644 index 00000000..143acc60 --- /dev/null +++ b/lib/getstream_ruby/generated/models/poll_closed_event.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Emitted when a poll is closed. + class PollClosedEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute poll + # @return [PollResponseData] + attr_accessor :poll + # @!attribute type + # @return [String] The type of event: "poll.closed" in this case + attr_accessor :type + # @!attribute activity_id + # @return [String] + attr_accessor :activity_id + # @!attribute cid + # @return [String] The CID of the channel containing the poll + attr_accessor :cid + # @!attribute message_id + # @return [String] The ID of the message containing the poll + attr_accessor :message_id + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @custom = attributes[:custom] || attributes['custom'] + @poll = attributes[:poll] || attributes['poll'] + @type = attributes[:type] || attributes['type'] || "poll.closed" + @activity_id = attributes[:activity_id] || attributes['activity_id'] || nil + @cid = attributes[:cid] || attributes['cid'] || nil + @message_id = attributes[:message_id] || attributes['message_id'] || nil + @received_at = attributes[:received_at] || attributes['received_at'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + custom: 'custom', + poll: 'poll', + type: 'type', + activity_id: 'activity_id', + cid: 'cid', + message_id: 'message_id', + received_at: 'received_at' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/poll_deleted_event.rb b/lib/getstream_ruby/generated/models/poll_deleted_event.rb new file mode 100644 index 00000000..c2f514ea --- /dev/null +++ b/lib/getstream_ruby/generated/models/poll_deleted_event.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Emitted when a poll is deleted. + class PollDeletedEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute poll + # @return [PollResponseData] + attr_accessor :poll + # @!attribute type + # @return [String] The type of event: "poll.deleted" in this case + attr_accessor :type + # @!attribute activity_id + # @return [String] + attr_accessor :activity_id + # @!attribute cid + # @return [String] The CID of the channel containing the poll + attr_accessor :cid + # @!attribute message_id + # @return [String] The ID of the message containing the poll + attr_accessor :message_id + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @custom = attributes[:custom] || attributes['custom'] + @poll = attributes[:poll] || attributes['poll'] + @type = attributes[:type] || attributes['type'] || "poll.deleted" + @activity_id = attributes[:activity_id] || attributes['activity_id'] || nil + @cid = attributes[:cid] || attributes['cid'] || nil + @message_id = attributes[:message_id] || attributes['message_id'] || nil + @received_at = attributes[:received_at] || attributes['received_at'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + custom: 'custom', + poll: 'poll', + type: 'type', + activity_id: 'activity_id', + cid: 'cid', + message_id: 'message_id', + received_at: 'received_at' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/poll_option_response_data.rb b/lib/getstream_ruby/generated/models/poll_option_response_data.rb index 69cfc17e..4c1ccf58 100644 --- a/lib/getstream_ruby/generated/models/poll_option_response_data.rb +++ b/lib/getstream_ruby/generated/models/poll_option_response_data.rb @@ -18,6 +18,9 @@ class PollOptionResponseData < GetStream::BaseModel # @!attribute custom # @return [Object] attr_accessor :custom + # @!attribute text_i18n + # @return [Hash] + attr_accessor :text_i18n # Initialize with attributes def initialize(attributes = {}) @@ -25,6 +28,7 @@ def initialize(attributes = {}) @id = attributes[:id] || attributes['id'] @text = attributes[:text] || attributes['text'] @custom = attributes[:custom] || attributes['custom'] + @text_i18n = attributes[:text_i18n] || attributes['text_i18n'] || nil end # Override field mappings for JSON serialization @@ -32,7 +36,8 @@ def self.json_field_mappings { id: 'id', text: 'text', - custom: 'custom' + custom: 'custom', + text_i18n: 'text_i18n' } end end diff --git a/lib/getstream_ruby/generated/models/poll_response_data.rb b/lib/getstream_ruby/generated/models/poll_response_data.rb index ee98f40d..37a28a14 100644 --- a/lib/getstream_ruby/generated/models/poll_response_data.rb +++ b/lib/getstream_ruby/generated/models/poll_response_data.rb @@ -72,6 +72,12 @@ class PollResponseData < GetStream::BaseModel # @!attribute created_by # @return [UserResponse] User response object attr_accessor :created_by + # @!attribute description_i18n + # @return [Hash] + attr_accessor :description_i18n + # @!attribute name_i18n + # @return [Hash] + attr_accessor :name_i18n # Initialize with attributes def initialize(attributes = {}) @@ -97,6 +103,8 @@ def initialize(attributes = {}) @is_closed = attributes[:is_closed] || attributes['is_closed'] || nil @max_votes_allowed = attributes[:max_votes_allowed] || attributes['max_votes_allowed'] || nil @created_by = attributes[:created_by] || attributes['created_by'] || nil + @description_i18n = attributes[:description_i18n] || attributes['description_i18n'] || nil + @name_i18n = attributes[:name_i18n] || attributes['name_i18n'] || nil end # Override field mappings for JSON serialization @@ -122,7 +130,9 @@ def self.json_field_mappings vote_counts_by_option: 'vote_counts_by_option', is_closed: 'is_closed', max_votes_allowed: 'max_votes_allowed', - created_by: 'created_by' + created_by: 'created_by', + description_i18n: 'description_i18n', + name_i18n: 'name_i18n' } end end diff --git a/lib/getstream_ruby/generated/models/poll_updated_event.rb b/lib/getstream_ruby/generated/models/poll_updated_event.rb new file mode 100644 index 00000000..4b087052 --- /dev/null +++ b/lib/getstream_ruby/generated/models/poll_updated_event.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Emitted when a poll is updated. + class PollUpdatedEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute poll + # @return [PollResponseData] + attr_accessor :poll + # @!attribute type + # @return [String] The type of event: "poll.updated" in this case + attr_accessor :type + # @!attribute activity_id + # @return [String] + attr_accessor :activity_id + # @!attribute cid + # @return [String] The CID of the channel containing the poll + attr_accessor :cid + # @!attribute message_id + # @return [String] The ID of the message containing the poll + attr_accessor :message_id + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @custom = attributes[:custom] || attributes['custom'] + @poll = attributes[:poll] || attributes['poll'] + @type = attributes[:type] || attributes['type'] || "poll.updated" + @activity_id = attributes[:activity_id] || attributes['activity_id'] || nil + @cid = attributes[:cid] || attributes['cid'] || nil + @message_id = attributes[:message_id] || attributes['message_id'] || nil + @received_at = attributes[:received_at] || attributes['received_at'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + custom: 'custom', + poll: 'poll', + type: 'type', + activity_id: 'activity_id', + cid: 'cid', + message_id: 'message_id', + received_at: 'received_at' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/poll_vote_casted_event.rb b/lib/getstream_ruby/generated/models/poll_vote_casted_event.rb new file mode 100644 index 00000000..066a4202 --- /dev/null +++ b/lib/getstream_ruby/generated/models/poll_vote_casted_event.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Emitted when a vote is cast on a poll. + class PollVoteCastedEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute poll + # @return [PollResponseData] + attr_accessor :poll + # @!attribute poll_vote + # @return [PollVoteResponseData] + attr_accessor :poll_vote + # @!attribute type + # @return [String] The type of event: "poll.vote_casted" in this case + attr_accessor :type + # @!attribute activity_id + # @return [String] + attr_accessor :activity_id + # @!attribute cid + # @return [String] The CID of the channel containing the poll + attr_accessor :cid + # @!attribute message_id + # @return [String] The ID of the message containing the poll + attr_accessor :message_id + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @custom = attributes[:custom] || attributes['custom'] + @poll = attributes[:poll] || attributes['poll'] + @poll_vote = attributes[:poll_vote] || attributes['poll_vote'] + @type = attributes[:type] || attributes['type'] || "poll.vote_casted" + @activity_id = attributes[:activity_id] || attributes['activity_id'] || nil + @cid = attributes[:cid] || attributes['cid'] || nil + @message_id = attributes[:message_id] || attributes['message_id'] || nil + @received_at = attributes[:received_at] || attributes['received_at'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + custom: 'custom', + poll: 'poll', + poll_vote: 'poll_vote', + type: 'type', + activity_id: 'activity_id', + cid: 'cid', + message_id: 'message_id', + received_at: 'received_at' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/poll_vote_changed_event.rb b/lib/getstream_ruby/generated/models/poll_vote_changed_event.rb new file mode 100644 index 00000000..75fba64a --- /dev/null +++ b/lib/getstream_ruby/generated/models/poll_vote_changed_event.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Emitted when a vote on a poll is changed. + class PollVoteChangedEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute poll + # @return [PollResponseData] + attr_accessor :poll + # @!attribute poll_vote + # @return [PollVoteResponseData] + attr_accessor :poll_vote + # @!attribute type + # @return [String] The type of event: "poll.vote_changed" in this case + attr_accessor :type + # @!attribute activity_id + # @return [String] + attr_accessor :activity_id + # @!attribute cid + # @return [String] The CID of the channel containing the poll + attr_accessor :cid + # @!attribute message_id + # @return [String] The ID of the message containing the poll + attr_accessor :message_id + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @custom = attributes[:custom] || attributes['custom'] + @poll = attributes[:poll] || attributes['poll'] + @poll_vote = attributes[:poll_vote] || attributes['poll_vote'] + @type = attributes[:type] || attributes['type'] || "poll.vote_changed" + @activity_id = attributes[:activity_id] || attributes['activity_id'] || nil + @cid = attributes[:cid] || attributes['cid'] || nil + @message_id = attributes[:message_id] || attributes['message_id'] || nil + @received_at = attributes[:received_at] || attributes['received_at'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + custom: 'custom', + poll: 'poll', + poll_vote: 'poll_vote', + type: 'type', + activity_id: 'activity_id', + cid: 'cid', + message_id: 'message_id', + received_at: 'received_at' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/poll_vote_removed_event.rb b/lib/getstream_ruby/generated/models/poll_vote_removed_event.rb new file mode 100644 index 00000000..cfe22636 --- /dev/null +++ b/lib/getstream_ruby/generated/models/poll_vote_removed_event.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Emitted when a vote is removed from a poll. + class PollVoteRemovedEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute poll + # @return [PollResponseData] + attr_accessor :poll + # @!attribute poll_vote + # @return [PollVoteResponseData] + attr_accessor :poll_vote + # @!attribute type + # @return [String] The type of event: "poll.vote_removed" in this case + attr_accessor :type + # @!attribute activity_id + # @return [String] + attr_accessor :activity_id + # @!attribute cid + # @return [String] The CID of the channel containing the poll + attr_accessor :cid + # @!attribute message_id + # @return [String] The ID of the message containing the poll + attr_accessor :message_id + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @custom = attributes[:custom] || attributes['custom'] + @poll = attributes[:poll] || attributes['poll'] + @poll_vote = attributes[:poll_vote] || attributes['poll_vote'] + @type = attributes[:type] || attributes['type'] || "poll.vote_removed" + @activity_id = attributes[:activity_id] || attributes['activity_id'] || nil + @cid = attributes[:cid] || attributes['cid'] || nil + @message_id = attributes[:message_id] || attributes['message_id'] || nil + @received_at = attributes[:received_at] || attributes['received_at'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + custom: 'custom', + poll: 'poll', + poll_vote: 'poll_vote', + type: 'type', + activity_id: 'activity_id', + cid: 'cid', + message_id: 'message_id', + received_at: 'received_at' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/poll_vote_response_data.rb b/lib/getstream_ruby/generated/models/poll_vote_response_data.rb index c8ac1814..4d9d315c 100644 --- a/lib/getstream_ruby/generated/models/poll_vote_response_data.rb +++ b/lib/getstream_ruby/generated/models/poll_vote_response_data.rb @@ -33,6 +33,9 @@ class PollVoteResponseData < GetStream::BaseModel # @!attribute user_id # @return [String] attr_accessor :user_id + # @!attribute answer_text_i18n + # @return [Hash] + attr_accessor :answer_text_i18n # @!attribute user # @return [UserResponse] User response object attr_accessor :user @@ -48,6 +51,7 @@ def initialize(attributes = {}) @answer_text = attributes[:answer_text] || attributes['answer_text'] || nil @is_answer = attributes[:is_answer] || attributes['is_answer'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil + @answer_text_i18n = attributes[:answer_text_i18n] || attributes['answer_text_i18n'] || nil @user = attributes[:user] || attributes['user'] || nil end @@ -62,6 +66,7 @@ def self.json_field_mappings answer_text: 'answer_text', is_answer: 'is_answer', user_id: 'user_id', + answer_text_i18n: 'answer_text_i18n', user: 'user' } end diff --git a/lib/getstream_ruby/generated/models/privacy_settings_response.rb b/lib/getstream_ruby/generated/models/privacy_settings_response.rb index b61dd33a..6207c1e1 100644 --- a/lib/getstream_ruby/generated/models/privacy_settings_response.rb +++ b/lib/getstream_ruby/generated/models/privacy_settings_response.rb @@ -5,18 +5,18 @@ module GetStream module Generated module Models - # + # The privacy settings of the user. class PrivacySettingsResponse < GetStream::BaseModel # Model attributes # @!attribute delivery_receipts - # @return [DeliveryReceiptsResponse] + # @return [DeliveryReceiptsResponse] The settings for the delivery receipt events. attr_accessor :delivery_receipts # @!attribute read_receipts - # @return [ReadReceiptsResponse] + # @return [ReadReceiptsResponse] The settings for the read receipt events. attr_accessor :read_receipts # @!attribute typing_indicators - # @return [TypingIndicatorsResponse] + # @return [TypingIndicatorsResponse] The settings for typing indicator events. attr_accessor :typing_indicators # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/push_preferences_response.rb b/lib/getstream_ruby/generated/models/push_preferences_response.rb index 8170e459..d31ec79b 100644 --- a/lib/getstream_ruby/generated/models/push_preferences_response.rb +++ b/lib/getstream_ruby/generated/models/push_preferences_response.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # + # The push preference details. class PushPreferencesResponse < GetStream::BaseModel # Model attributes @@ -13,10 +13,10 @@ class PushPreferencesResponse < GetStream::BaseModel # @return [String] attr_accessor :call_level # @!attribute chat_level - # @return [String] + # @return [String] The scope level of the push notifications. attr_accessor :chat_level # @!attribute disabled_until - # @return [DateTime] + # @return [DateTime] If provided the notifications will be disabled until the set date. attr_accessor :disabled_until # @!attribute feeds_level # @return [String] diff --git a/lib/getstream_ruby/generated/models/query_activities_request.rb b/lib/getstream_ruby/generated/models/query_activities_request.rb index 0427e432..b62088e1 100644 --- a/lib/getstream_ruby/generated/models/query_activities_request.rb +++ b/lib/getstream_ruby/generated/models/query_activities_request.rb @@ -15,11 +15,14 @@ class QueryActivitiesRequest < GetStream::BaseModel # @!attribute include_expired_activities # @return [Boolean] When true, include both expired and non-expired activities in the result. attr_accessor :include_expired_activities + # @!attribute include_moderated_activities + # @return [Boolean] When true, include activities hidden by moderation (shadowed or removed). Server-side only; not allowed when a user is set. + attr_accessor :include_moderated_activities # @!attribute include_private_activities # @return [Boolean] attr_accessor :include_private_activities # @!attribute include_soft_deleted_activities - # @return [Boolean] When true, include soft-deleted activities in the result. + # @return [Boolean] When true, include soft-deleted activities in the result. Server-side only; not allowed when a user is set. attr_accessor :include_soft_deleted_activities # @!attribute limit # @return [Integer] @@ -48,6 +51,7 @@ def initialize(attributes = {}) super(attributes) @enrich_own_fields = attributes[:enrich_own_fields] || attributes['enrich_own_fields'] || nil @include_expired_activities = attributes[:include_expired_activities] || attributes['include_expired_activities'] || nil + @include_moderated_activities = attributes[:include_moderated_activities] || attributes['include_moderated_activities'] || nil @include_private_activities = attributes[:include_private_activities] || attributes['include_private_activities'] || nil @include_soft_deleted_activities = attributes[:include_soft_deleted_activities] || attributes['include_soft_deleted_activities'] || nil @limit = attributes[:limit] || attributes['limit'] || nil @@ -64,6 +68,7 @@ def self.json_field_mappings { enrich_own_fields: 'enrich_own_fields', include_expired_activities: 'include_expired_activities', + include_moderated_activities: 'include_moderated_activities', include_private_activities: 'include_private_activities', include_soft_deleted_activities: 'include_soft_deleted_activities', limit: 'limit', diff --git a/lib/getstream_ruby/generated/models/query_call_ring_attempts_request.rb b/lib/getstream_ruby/generated/models/query_call_ring_attempts_request.rb new file mode 100644 index 00000000..06b5b3c3 --- /dev/null +++ b/lib/getstream_ruby/generated/models/query_call_ring_attempts_request.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class QueryCallRingAttemptsRequest < GetStream::BaseModel + + # Model attributes + # @!attribute id + # @return [String] Call ID + attr_accessor :id + # @!attribute type + # @return [String] The type of call + attr_accessor :type + # @!attribute call_session_id + # @return [String] Limit the attempts to one call session; omit to read every session of the call + attr_accessor :call_session_id + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @id = attributes[:id] || attributes['id'] + @type = attributes[:type] || attributes['type'] + @call_session_id = attributes[:call_session_id] || attributes['call_session_id'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + id: 'id', + type: 'type', + call_session_id: 'call_session_id' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/query_call_ring_attempts_response.rb b/lib/getstream_ruby/generated/models/query_call_ring_attempts_response.rb new file mode 100644 index 00000000..7de57779 --- /dev/null +++ b/lib/getstream_ruby/generated/models/query_call_ring_attempts_response.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # The ring attempts of a call, newest first. + class QueryCallRingAttemptsResponse < GetStream::BaseModel + + # Model attributes + # @!attribute call_id + # @return [String] The ID of the call the attempts belong to + attr_accessor :call_id + # @!attribute call_type + # @return [String] The type of the call the attempts belong to + attr_accessor :call_type + # @!attribute count + # @return [Integer] The number of attempts returned + attr_accessor :count + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute ring_attempts + # @return [Array] The attempts, newest first + attr_accessor :ring_attempts + # @!attribute call_session_id + # @return [String] The call session the attempts were limited to, null when every session was read + attr_accessor :call_session_id + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @call_id = attributes[:call_id] || attributes['call_id'] + @call_type = attributes[:call_type] || attributes['call_type'] + @count = attributes[:count] || attributes['count'] + @duration = attributes[:duration] || attributes['duration'] + @ring_attempts = attributes[:ring_attempts] || attributes['ring_attempts'] + @call_session_id = attributes[:call_session_id] || attributes['call_session_id'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + call_id: 'call_id', + call_type: 'call_type', + count: 'count', + duration: 'duration', + ring_attempts: 'ring_attempts', + call_session_id: 'call_session_id' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/query_channel_bans_request.rb b/lib/getstream_ruby/generated/models/query_channel_bans_request.rb new file mode 100644 index 00000000..87e1abb2 --- /dev/null +++ b/lib/getstream_ruby/generated/models/query_channel_bans_request.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class QueryChannelBansRequest < GetStream::BaseModel + + # Model attributes + # @!attribute exclude_expired_bans + # @return [Boolean] Whether to exclude expired bans or not + attr_accessor :exclude_expired_bans + # @!attribute include_total + # @return [Boolean] When true, the response includes total and total_by_scope: the number of banned users overall and per scope, independent of paging + attr_accessor :include_total + # @!attribute limit + # @return [Integer] + attr_accessor :limit + # @!attribute next + # @return [String] + attr_accessor :next + # @!attribute prev + # @return [String] + attr_accessor :prev + # @!attribute user_id + # @return [String] + attr_accessor :user_id + # @!attribute filter_conditions + # @return [Object] Filter conditions to apply to the query + attr_accessor :filter_conditions + # @!attribute user + # @return [UserRequest] User request object + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @exclude_expired_bans = attributes[:exclude_expired_bans] || attributes['exclude_expired_bans'] || nil + @include_total = attributes[:include_total] || attributes['include_total'] || nil + @limit = attributes[:limit] || attributes['limit'] || nil + @next = attributes[:next] || attributes['next'] || nil + @prev = attributes[:prev] || attributes['prev'] || nil + @user_id = attributes[:user_id] || attributes['user_id'] || nil + @filter_conditions = attributes[:filter_conditions] || attributes['filter_conditions'] || nil + @user = attributes[:user] || attributes['user'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + exclude_expired_bans: 'exclude_expired_bans', + include_total: 'include_total', + limit: 'limit', + next: 'next', + prev: 'prev', + user_id: 'user_id', + filter_conditions: 'filter_conditions', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/query_channel_bans_response.rb b/lib/getstream_ruby/generated/models/query_channel_bans_response.rb new file mode 100644 index 00000000..d6637bdf --- /dev/null +++ b/lib/getstream_ruby/generated/models/query_channel_bans_response.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class QueryChannelBansResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute bans + # @return [Array] Users banned from the channel, one entry per user, newest ban first + attr_accessor :bans + # @!attribute next + # @return [String] + attr_accessor :next + # @!attribute prev + # @return [String] + attr_accessor :prev + # @!attribute total + # @return [Integer] Number of banned users, each counted once, ignoring paging. Counted per scope with a cap of 100000 each, so it can reach 200000. Only present when include_total is set on the request; omitted when counting timed out + attr_accessor :total + # @!attribute total_by_scope + # @return [ChannelBansScopeTotals] + attr_accessor :total_by_scope + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @bans = attributes[:bans] || attributes['bans'] + @next = attributes[:next] || attributes['next'] || nil + @prev = attributes[:prev] || attributes['prev'] || nil + @total = attributes[:total] || attributes['total'] || nil + @total_by_scope = attributes[:total_by_scope] || attributes['total_by_scope'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + bans: 'bans', + next: 'next', + prev: 'prev', + total: 'total', + total_by_scope: 'total_by_scope' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/query_channels_defaults.rb b/lib/getstream_ruby/generated/models/query_channels_defaults.rb new file mode 100644 index 00000000..f03ad43a --- /dev/null +++ b/lib/getstream_ruby/generated/models/query_channels_defaults.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Defaults applied by the query channels endpoint. + class QueryChannelsDefaults < GetStream::BaseModel + + # Model attributes + # @!attribute limit + # @return [Integer] Number of channels returned when `limit` is omitted. + attr_accessor :limit + # @!attribute max_limit + # @return [Integer] Largest number of channels returned for one request. A bigger `limit` is silently clamped to this value rather than rejected. An app with no per-app override gets a higher ceiling for the narrow case of a request asking for at most one message and one member per channel. + attr_accessor :max_limit + # @!attribute member_limit + # @return [Integer] Number of members returned per channel when `member_limit` is omitted. + attr_accessor :member_limit + # @!attribute message_limit + # @return [Integer] Number of messages returned per channel when `message_limit` is omitted. + attr_accessor :message_limit + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @limit = attributes[:limit] || attributes['limit'] + @max_limit = attributes[:max_limit] || attributes['max_limit'] + @member_limit = attributes[:member_limit] || attributes['member_limit'] + @message_limit = attributes[:message_limit] || attributes['message_limit'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + limit: 'limit', + max_limit: 'max_limit', + member_limit: 'member_limit', + message_limit: 'message_limit' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/query_comments_request.rb b/lib/getstream_ruby/generated/models/query_comments_request.rb index f172e9ae..e7bbb22b 100644 --- a/lib/getstream_ruby/generated/models/query_comments_request.rb +++ b/lib/getstream_ruby/generated/models/query_comments_request.rb @@ -15,6 +15,9 @@ class QueryCommentsRequest < GetStream::BaseModel # @!attribute id_around # @return [String] Returns the comment with the specified ID along with surrounding comments for context attr_accessor :id_around + # @!attribute include_soft_deleted_comments + # @return [Boolean] When true, include soft-deleted comments in the result. Server-side only, and requires an object_id filter. Covers comments removed via deleteComment and via soft user-data deletion. Moderation-actioned comments (removed, hidden, shadow_blocked) remain excluded, as are comments whose parent activity is itself deleted. + attr_accessor :include_soft_deleted_comments # @!attribute limit # @return [Integer] Maximum number of comments to return attr_accessor :limit @@ -39,6 +42,7 @@ def initialize(attributes = {}) super(attributes) @filter = attributes[:filter] || attributes['filter'] @id_around = attributes[:id_around] || attributes['id_around'] || nil + @include_soft_deleted_comments = attributes[:include_soft_deleted_comments] || attributes['include_soft_deleted_comments'] || nil @limit = attributes[:limit] || attributes['limit'] || nil @next = attributes[:next] || attributes['next'] || nil @prev = attributes[:prev] || attributes['prev'] || nil @@ -52,6 +56,7 @@ def self.json_field_mappings { filter: 'filter', id_around: 'id_around', + include_soft_deleted_comments: 'include_soft_deleted_comments', limit: 'limit', next: 'next', prev: 'prev', diff --git a/lib/getstream_ruby/generated/models/query_follows_request.rb b/lib/getstream_ruby/generated/models/query_follows_request.rb index 4e445af1..87e41655 100644 --- a/lib/getstream_ruby/generated/models/query_follows_request.rb +++ b/lib/getstream_ruby/generated/models/query_follows_request.rb @@ -9,6 +9,9 @@ module Models class QueryFollowsRequest < GetStream::BaseModel # Model attributes + # @!attribute include_group_counts + # @return [Boolean] When true (server-side only), the response includes group_counts: accepted following counts keyed by the followed feed's group. Requires exactly one source_feed / source_fid string equality. HTTP 400 if target_feed appears, if two source FIDs are given, or if $in / $or / $nor mentions those keys. Independent of paging and of other filters, including status. + attr_accessor :include_group_counts # @!attribute limit # @return [Integer] attr_accessor :limit @@ -28,6 +31,7 @@ class QueryFollowsRequest < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @include_group_counts = attributes[:include_group_counts] || attributes['include_group_counts'] || nil @limit = attributes[:limit] || attributes['limit'] || nil @next = attributes[:next] || attributes['next'] || nil @prev = attributes[:prev] || attributes['prev'] || nil @@ -38,6 +42,7 @@ def initialize(attributes = {}) # Override field mappings for JSON serialization def self.json_field_mappings { + include_group_counts: 'include_group_counts', limit: 'limit', next: 'next', prev: 'prev', diff --git a/lib/getstream_ruby/generated/models/query_follows_response.rb b/lib/getstream_ruby/generated/models/query_follows_response.rb index dd14064f..b5f8ffae 100644 --- a/lib/getstream_ruby/generated/models/query_follows_response.rb +++ b/lib/getstream_ruby/generated/models/query_follows_response.rb @@ -21,6 +21,9 @@ class QueryFollowsResponse < GetStream::BaseModel # @!attribute prev # @return [String] Cursor for previous page attr_accessor :prev + # @!attribute group_counts + # @return [Hash] Accepted following counts keyed by followed feed group. Present only when include_group_counts is set with a source_feed equality. + attr_accessor :group_counts # Initialize with attributes def initialize(attributes = {}) @@ -29,6 +32,7 @@ def initialize(attributes = {}) @follows = attributes[:follows] || attributes['follows'] @next = attributes[:next] || attributes['next'] || nil @prev = attributes[:prev] || attributes['prev'] || nil + @group_counts = attributes[:group_counts] || attributes['group_counts'] || nil end # Override field mappings for JSON serialization @@ -37,7 +41,8 @@ def self.json_field_mappings duration: 'duration', follows: 'follows', next: 'next', - prev: 'prev' + prev: 'prev', + group_counts: 'group_counts' } end end diff --git a/lib/getstream_ruby/generated/models/query_pinned_activities_request.rb b/lib/getstream_ruby/generated/models/query_pinned_activities_request.rb index e933d65e..f8b483c5 100644 --- a/lib/getstream_ruby/generated/models/query_pinned_activities_request.rb +++ b/lib/getstream_ruby/generated/models/query_pinned_activities_request.rb @@ -12,6 +12,15 @@ class QueryPinnedActivitiesRequest < GetStream::BaseModel # @!attribute enrich_own_fields # @return [Boolean] attr_accessor :enrich_own_fields + # @!attribute include_expired_activities + # @return [Boolean] When true, return pinned activities even if they have expired. Server-side only; not allowed when a user is set. + attr_accessor :include_expired_activities + # @!attribute include_moderated_activities + # @return [Boolean] When true, return pinned activities even if moderation hides them (shadowed or removed). Server-side only; not allowed when a user is set. + attr_accessor :include_moderated_activities + # @!attribute include_soft_deleted_activities + # @return [Boolean] When true, return pinned activities even if they are soft-deleted. Server-side only; not allowed when a user is set. + attr_accessor :include_soft_deleted_activities # @!attribute limit # @return [Integer] attr_accessor :limit @@ -21,33 +30,49 @@ class QueryPinnedActivitiesRequest < GetStream::BaseModel # @!attribute prev # @return [String] attr_accessor :prev + # @!attribute user_id + # @return [String] + attr_accessor :user_id # @!attribute sort # @return [Array] Sorting parameters for the query attr_accessor :sort # @!attribute filter # @return [Object] Filters to apply to the query attr_accessor :filter + # @!attribute user + # @return [UserRequest] User request object + attr_accessor :user # Initialize with attributes def initialize(attributes = {}) super(attributes) @enrich_own_fields = attributes[:enrich_own_fields] || attributes['enrich_own_fields'] || nil + @include_expired_activities = attributes[:include_expired_activities] || attributes['include_expired_activities'] || nil + @include_moderated_activities = attributes[:include_moderated_activities] || attributes['include_moderated_activities'] || nil + @include_soft_deleted_activities = attributes[:include_soft_deleted_activities] || attributes['include_soft_deleted_activities'] || nil @limit = attributes[:limit] || attributes['limit'] || nil @next = attributes[:next] || attributes['next'] || nil @prev = attributes[:prev] || attributes['prev'] || nil + @user_id = attributes[:user_id] || attributes['user_id'] || nil @sort = attributes[:sort] || attributes['sort'] || nil @filter = attributes[:filter] || attributes['filter'] || nil + @user = attributes[:user] || attributes['user'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { enrich_own_fields: 'enrich_own_fields', + include_expired_activities: 'include_expired_activities', + include_moderated_activities: 'include_moderated_activities', + include_soft_deleted_activities: 'include_soft_deleted_activities', limit: 'limit', next: 'next', prev: 'prev', + user_id: 'user_id', sort: 'sort', - filter: 'filter' + filter: 'filter', + user: 'user' } end end diff --git a/lib/getstream_ruby/generated/models/query_review_queue_request.rb b/lib/getstream_ruby/generated/models/query_review_queue_request.rb index f5723d0f..70453520 100644 --- a/lib/getstream_ruby/generated/models/query_review_queue_request.rb +++ b/lib/getstream_ruby/generated/models/query_review_queue_request.rb @@ -40,7 +40,7 @@ class QueryReviewQueueRequest < GetStream::BaseModel # @return [Array] Sorting parameters for the results attr_accessor :sort # @!attribute filter - # @return [Object] Filter conditions for review queue items. Accepts built-in fields (e.g. status, channel_cid, severity, recommended_action) and customer-supplied moderation_payload.custom keys: any key that is not a built-in field is matched against the item's custom moderation data (e.g. {"location_id": "loc-42"}). Use filter_config.filterable_custom_keys to discover which custom keys the app exposes as chips. + # @return [Object] Filter conditions for review queue items. Accepts built-in fields (e.g. status, channel_cid, severity, recommended_action) and customer-supplied moderation_payload.custom keys: any key that is not a built-in field is matched against the item's custom moderation data (e.g. {"location_id": "loc-42"}). Use filter_config.filterable_custom_keys to discover which custom keys the app exposes as chips. content_text searches the moderated text: "$q" is a keyword search (terms ANDed, no adjacency) over the indexed tsvector, while "$eq" (or "$in" for several wordings) matches the text exactly. The exact form is unindexed, so scope it with date_range rather than running it across the whole queue. attr_accessor :filter # @!attribute user # @return [UserRequest] User request object diff --git a/lib/getstream_ruby/generated/models/query_scheduled_messages_request.rb b/lib/getstream_ruby/generated/models/query_scheduled_messages_request.rb new file mode 100644 index 00000000..34940e16 --- /dev/null +++ b/lib/getstream_ruby/generated/models/query_scheduled_messages_request.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class QueryScheduledMessagesRequest < GetStream::BaseModel + + # Model attributes + # @!attribute limit + # @return [Integer] Page size, 1 to 100. Defaults to 20 + attr_accessor :limit + # @!attribute next + # @return [String] Cursor from the previous page + attr_accessor :next + # @!attribute user_id + # @return [String] + attr_accessor :user_id + # @!attribute sort + # @return [Array] Only scheduled_at ascending is supported. Pending messages come before failed ones + attr_accessor :sort + # @!attribute filter + # @return [ScheduledMessagesFilter] Filter for querying scheduled messages + attr_accessor :filter + # @!attribute user + # @return [UserRequest] User request object + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @limit = attributes[:limit] || attributes['limit'] || nil + @next = attributes[:next] || attributes['next'] || nil + @user_id = attributes[:user_id] || attributes['user_id'] || nil + @sort = attributes[:sort] || attributes['sort'] || nil + @filter = attributes[:filter] || attributes['filter'] || nil + @user = attributes[:user] || attributes['user'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + limit: 'limit', + next: 'next', + user_id: 'user_id', + sort: 'sort', + filter: 'filter', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/query_scheduled_messages_response.rb b/lib/getstream_ruby/generated/models/query_scheduled_messages_response.rb new file mode 100644 index 00000000..219aa413 --- /dev/null +++ b/lib/getstream_ruby/generated/models/query_scheduled_messages_response.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class QueryScheduledMessagesResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute scheduled_messages + # @return [Array] Pending messages first, then failed ones, each by scheduled_at + attr_accessor :scheduled_messages + # @!attribute next + # @return [String] Cursor for the next page; empty on the last page + attr_accessor :next + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @scheduled_messages = attributes[:scheduled_messages] || attributes['scheduled_messages'] + @next = attributes[:next] || attributes['next'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + scheduled_messages: 'scheduled_messages', + next: 'next' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/ranking_config.rb b/lib/getstream_ruby/generated/models/ranking_config.rb index ed0016d8..6d3aa1a7 100644 --- a/lib/getstream_ruby/generated/models/ranking_config.rb +++ b/lib/getstream_ruby/generated/models/ranking_config.rb @@ -12,6 +12,9 @@ class RankingConfig < GetStream::BaseModel # @!attribute type # @return [String] Type of ranking algorithm. Required. One of: expression, interest attr_accessor :type + # @!attribute exclude_below + # @return [Float] Activities scoring strictly below this value are dropped from the ranked feed. Not supported on aggregated feeds + attr_accessor :exclude_below # @!attribute score # @return [String] Scoring formula. Required when type is 'expression' or 'interest' attr_accessor :score @@ -26,6 +29,7 @@ class RankingConfig < GetStream::BaseModel def initialize(attributes = {}) super(attributes) @type = attributes[:type] || attributes['type'] + @exclude_below = attributes[:exclude_below] || attributes['exclude_below'] || nil @score = attributes[:score] || attributes['score'] || nil @defaults = attributes[:defaults] || attributes['defaults'] || nil @functions = attributes[:functions] || attributes['functions'] || nil @@ -35,6 +39,7 @@ def initialize(attributes = {}) def self.json_field_mappings { type: 'type', + exclude_below: 'exclude_below', score: 'score', defaults: 'defaults', functions: 'functions' diff --git a/lib/getstream_ruby/generated/models/read_receipts_response.rb b/lib/getstream_ruby/generated/models/read_receipts_response.rb index d56a6f9e..9f116137 100644 --- a/lib/getstream_ruby/generated/models/read_receipts_response.rb +++ b/lib/getstream_ruby/generated/models/read_receipts_response.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # + # The settings for the read receipt events. class ReadReceiptsResponse < GetStream::BaseModel # Model attributes diff --git a/lib/getstream_ruby/generated/models/reminder_response_data.rb b/lib/getstream_ruby/generated/models/reminder_response_data.rb index 7893fa7c..25c0201b 100644 --- a/lib/getstream_ruby/generated/models/reminder_response_data.rb +++ b/lib/getstream_ruby/generated/models/reminder_response_data.rb @@ -24,6 +24,9 @@ class ReminderResponseData < GetStream::BaseModel # @!attribute user_id # @return [String] attr_accessor :user_id + # @!attribute expires_at + # @return [DateTime] + attr_accessor :expires_at # @!attribute remind_at # @return [DateTime] attr_accessor :remind_at @@ -45,6 +48,7 @@ def initialize(attributes = {}) @message_id = attributes[:message_id] || attributes['message_id'] @updated_at = attributes[:updated_at] || attributes['updated_at'] @user_id = attributes[:user_id] || attributes['user_id'] + @expires_at = attributes[:expires_at] || attributes['expires_at'] || nil @remind_at = attributes[:remind_at] || attributes['remind_at'] || nil @channel = attributes[:channel] || attributes['channel'] || nil @message = attributes[:message] || attributes['message'] || nil @@ -59,6 +63,7 @@ def self.json_field_mappings message_id: 'message_id', updated_at: 'updated_at', user_id: 'user_id', + expires_at: 'expires_at', remind_at: 'remind_at', channel: 'channel', message: 'message', diff --git a/lib/getstream_ruby/generated/models/review_queue_item_response.rb b/lib/getstream_ruby/generated/models/review_queue_item_response.rb index 36711d88..7532500f 100644 --- a/lib/getstream_ruby/generated/models/review_queue_item_response.rb +++ b/lib/getstream_ruby/generated/models/review_queue_item_response.rb @@ -69,6 +69,9 @@ class ReviewQueueItemResponse < GetStream::BaseModel # @!attribute config_key # @return [String] attr_accessor :config_key + # @!attribute country_code + # @return [String] + attr_accessor :country_code # @!attribute entity_creator_id # @return [String] ID of who created the entity attr_accessor :entity_creator_id @@ -120,6 +123,9 @@ class ReviewQueueItemResponse < GetStream::BaseModel # @!attribute moderation_payload # @return [ModerationPayloadResponse] Content payload for moderation attr_accessor :moderation_payload + # @!attribute poll + # @return [PollResponseData] + attr_accessor :poll # @!attribute reaction # @return [Reaction] attr_accessor :reaction @@ -147,6 +153,7 @@ def initialize(attributes = {}) @completed_at = attributes[:completed_at] || attributes['completed_at'] || nil @confidence_score = attributes[:confidence_score] || attributes['confidence_score'] || nil @config_key = attributes[:config_key] || attributes['config_key'] || nil + @country_code = attributes[:country_code] || attributes['country_code'] || nil @entity_creator_id = attributes[:entity_creator_id] || attributes['entity_creator_id'] || nil @escalated_at = attributes[:escalated_at] || attributes['escalated_at'] || nil @escalated_by = attributes[:escalated_by] || attributes['escalated_by'] || nil @@ -164,6 +171,7 @@ def initialize(attributes = {}) @feeds_v3_comment = attributes[:feeds_v3_comment] || attributes['feeds_v3_comment'] || nil @message = attributes[:message] || attributes['message'] || nil @moderation_payload = attributes[:moderation_payload] || attributes['moderation_payload'] || nil + @poll = attributes[:poll] || attributes['poll'] || nil @reaction = attributes[:reaction] || attributes['reaction'] || nil end @@ -190,6 +198,7 @@ def self.json_field_mappings completed_at: 'completed_at', confidence_score: 'confidence_score', config_key: 'config_key', + country_code: 'country_code', entity_creator_id: 'entity_creator_id', escalated_at: 'escalated_at', escalated_by: 'escalated_by', @@ -207,6 +216,7 @@ def self.json_field_mappings feeds_v3_comment: 'feeds_v3_comment', message: 'message', moderation_payload: 'moderation_payload', + poll: 'poll', reaction: 'reaction' } end diff --git a/lib/getstream_ruby/generated/models/ring_attempt_response.rb b/lib/getstream_ruby/generated/models/ring_attempt_response.rb new file mode 100644 index 00000000..4f9ee6b8 --- /dev/null +++ b/lib/getstream_ruby/generated/models/ring_attempt_response.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # One ring of a call session: who was rung, what each target did about it, and how the ring settled. + class RingAttemptResponse < GetStream::BaseModel + + # Model attributes + # @!attribute app_pk + # @return [Integer] The application this ring belongs to + attr_accessor :app_pk + # @!attribute call_id + # @return [String] The ID of the call that was rung + attr_accessor :call_id + # @!attribute call_type + # @return [String] The type of the call that was rung + attr_accessor :call_type + # @!attribute created_at + # @return [DateTime] When the ring went out + attr_accessor :created_at + # @!attribute expires_at + # @return [DateTime] When the ring expires, i.e. when the missed call deadline fires + attr_accessor :expires_at + # @!attribute initiated_by + # @return [String] The user that started the ring + attr_accessor :initiated_by + # @!attribute outcome + # @return [String] The derived outcome: ringing, answered_some, answered_all, rejected_all, missed_all, cancelled or mixed + attr_accessor :outcome + # @!attribute ring_id + # @return [String] The ring, as published in the ring_id of the call.ring event + attr_accessor :ring_id + # @!attribute session_id + # @return [String] The call session that was rung + attr_accessor :session_id + # @!attribute settle_reason + # @return [String] Why the ring settled: answered, rejected, cancel, timeout, ended or auto_end; empty while it is still ringing + attr_accessor :settle_reason + # @!attribute settled_by + # @return [String] The user that settled the ring, or 'server'; empty while it is still ringing + attr_accessor :settled_by + # @!attribute custom + # @return [Object] Opaque context stored on the ring by the caller + attr_accessor :custom + # @!attribute targets + # @return [Hash] The rung users, keyed by user ID + attr_accessor :targets + # @!attribute deleted_at + # @return [DateTime] When the ring was deleted + attr_accessor :deleted_at + # @!attribute settled_at + # @return [DateTime] When the outcome left ringing + attr_accessor :settled_at + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @app_pk = attributes[:app_pk] || attributes['app_pk'] + @call_id = attributes[:call_id] || attributes['call_id'] + @call_type = attributes[:call_type] || attributes['call_type'] + @created_at = attributes[:created_at] || attributes['created_at'] + @expires_at = attributes[:expires_at] || attributes['expires_at'] + @initiated_by = attributes[:initiated_by] || attributes['initiated_by'] + @outcome = attributes[:outcome] || attributes['outcome'] + @ring_id = attributes[:ring_id] || attributes['ring_id'] + @session_id = attributes[:session_id] || attributes['session_id'] + @settle_reason = attributes[:settle_reason] || attributes['settle_reason'] + @settled_by = attributes[:settled_by] || attributes['settled_by'] + @custom = attributes[:custom] || attributes['custom'] + @targets = attributes[:targets] || attributes['targets'] + @deleted_at = attributes[:deleted_at] || attributes['deleted_at'] || nil + @settled_at = attributes[:settled_at] || attributes['settled_at'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + app_pk: 'app_pk', + call_id: 'call_id', + call_type: 'call_type', + created_at: 'created_at', + expires_at: 'expires_at', + initiated_by: 'initiated_by', + outcome: 'outcome', + ring_id: 'ring_id', + session_id: 'session_id', + settle_reason: 'settle_reason', + settled_by: 'settled_by', + custom: 'custom', + targets: 'targets', + deleted_at: 'deleted_at', + settled_at: 'settled_at' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/ring_call_request.rb b/lib/getstream_ruby/generated/models/ring_call_request.rb index 38738a4e..6a2296f9 100644 --- a/lib/getstream_ruby/generated/models/ring_call_request.rb +++ b/lib/getstream_ruby/generated/models/ring_call_request.rb @@ -15,19 +15,24 @@ class RingCallRequest < GetStream::BaseModel # @!attribute members_ids # @return [Array] Members that should receive the ring. If no ids are provided, all call members who are not already in the call will receive ring notifications. attr_accessor :members_ids + # @!attribute custom + # @return [Object] Opaque context stored on the ring attempt; refs and IDs only + attr_accessor :custom # Initialize with attributes def initialize(attributes = {}) super(attributes) @video = attributes[:video] || attributes['video'] || nil @members_ids = attributes[:members_ids] || attributes['members_ids'] || nil + @custom = attributes[:custom] || attributes['custom'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { video: 'video', - members_ids: 'members_ids' + members_ids: 'members_ids', + custom: 'custom' } end end diff --git a/lib/getstream_ruby/generated/models/ring_call_response.rb b/lib/getstream_ruby/generated/models/ring_call_response.rb index 626626e7..2fa4c334 100644 --- a/lib/getstream_ruby/generated/models/ring_call_response.rb +++ b/lib/getstream_ruby/generated/models/ring_call_response.rb @@ -15,19 +15,24 @@ class RingCallResponse < GetStream::BaseModel # @!attribute members_ids # @return [Array] List of members ringing notification was sent to attr_accessor :members_ids + # @!attribute ring_id + # @return [String] The ring this call created, for correlating the accept, reject and missed outcomes that follow + attr_accessor :ring_id # Initialize with attributes def initialize(attributes = {}) super(attributes) @duration = attributes[:duration] || attributes['duration'] @members_ids = attributes[:members_ids] || attributes['members_ids'] + @ring_id = attributes[:ring_id] || attributes['ring_id'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { duration: 'duration', - members_ids: 'members_ids' + members_ids: 'members_ids', + ring_id: 'ring_id' } end end diff --git a/lib/getstream_ruby/generated/models/ring_delivery_response.rb b/lib/getstream_ruby/generated/models/ring_delivery_response.rb new file mode 100644 index 00000000..421db3b1 --- /dev/null +++ b/lib/getstream_ruby/generated/models/ring_delivery_response.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # One dispatch of a ring to one device over one channel. + class RingDeliveryResponse < GetStream::BaseModel + + # Model attributes + # @!attribute channel + # @return [String] The transport the ring was dispatched over: ws, apns_voip, apns or fcm + attr_accessor :channel + # @!attribute sent_at + # @return [DateTime] When the ring was dispatched + attr_accessor :sent_at + # @!attribute acked_at + # @return [DateTime] When the device acknowledged the ring; not populated yet + attr_accessor :acked_at + # @!attribute device_id + # @return [String] The device the ring was dispatched to, empty for websocket deliveries which fan out to every connection + attr_accessor :device_id + # @!attribute displayed_at + # @return [DateTime] When the device displayed the ring; not populated yet + attr_accessor :displayed_at + # @!attribute fetched_at + # @return [DateTime] When the device fetched the call; not populated yet + attr_accessor :fetched_at + # @!attribute provider_accepted_at + # @return [DateTime] When the push provider accepted the dispatch; not populated yet + attr_accessor :provider_accepted_at + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @channel = attributes[:channel] || attributes['channel'] + @sent_at = attributes[:sent_at] || attributes['sent_at'] + @acked_at = attributes[:acked_at] || attributes['acked_at'] || nil + @device_id = attributes[:device_id] || attributes['device_id'] || nil + @displayed_at = attributes[:displayed_at] || attributes['displayed_at'] || nil + @fetched_at = attributes[:fetched_at] || attributes['fetched_at'] || nil + @provider_accepted_at = attributes[:provider_accepted_at] || attributes['provider_accepted_at'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + channel: 'channel', + sent_at: 'sent_at', + acked_at: 'acked_at', + device_id: 'device_id', + displayed_at: 'displayed_at', + fetched_at: 'fetched_at', + provider_accepted_at: 'provider_accepted_at' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/ring_settled_target.rb b/lib/getstream_ruby/generated/models/ring_settled_target.rb new file mode 100644 index 00000000..106cb12d --- /dev/null +++ b/lib/getstream_ruby/generated/models/ring_settled_target.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class RingSettledTarget < GetStream::BaseModel + + # Model attributes + # @!attribute state + # @return [String] + attr_accessor :state + # @!attribute state_at + # @return [DateTime] + attr_accessor :state_at + # @!attribute reason + # @return [String] + attr_accessor :reason + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @state = attributes[:state] || attributes['state'] + @state_at = attributes[:state_at] || attributes['state_at'] + @reason = attributes[:reason] || attributes['reason'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + state: 'state', + state_at: 'state_at', + reason: 'reason' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/ring_target_response.rb b/lib/getstream_ruby/generated/models/ring_target_response.rb new file mode 100644 index 00000000..b1903919 --- /dev/null +++ b/lib/getstream_ruby/generated/models/ring_target_response.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # What one rung user did about one ring, and which devices the ring reached. + class RingTargetResponse < GetStream::BaseModel + + # Model attributes + # @!attribute reason + # @return [String] The reject or cancel reason, empty otherwise + attr_accessor :reason + # @!attribute state + # @return [String] The target's state for this ring: pending, accepted, rejected, missed or cancelled + attr_accessor :state + # @!attribute state_at + # @return [DateTime] When the target last changed state + attr_accessor :state_at + # @!attribute deliveries + # @return [Array] The dispatches of this ring to the target's devices + attr_accessor :deliveries + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @reason = attributes[:reason] || attributes['reason'] + @state = attributes[:state] || attributes['state'] + @state_at = attributes[:state_at] || attributes['state_at'] + @deliveries = attributes[:deliveries] || attributes['deliveries'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + reason: 'reason', + state: 'state', + state_at: 'state_at', + deliveries: 'deliveries' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/rule_builder_condition.rb b/lib/getstream_ruby/generated/models/rule_builder_condition.rb index 54ab4692..d3d39c8a 100644 --- a/lib/getstream_ruby/generated/models/rule_builder_condition.rb +++ b/lib/getstream_ruby/generated/models/rule_builder_condition.rb @@ -33,6 +33,9 @@ class RuleBuilderCondition < GetStream::BaseModel # @!attribute content_count_rule_params # @return [ContentCountRuleParameters] attr_accessor :content_count_rule_params + # @!attribute content_country_code_params + # @return [ContentCountryCodeParameters] + attr_accessor :content_country_code_params # @!attribute content_custom_property_count_params # @return [ContentCustomPropertyCountParameters] attr_accessor :content_custom_property_count_params @@ -54,6 +57,9 @@ class RuleBuilderCondition < GetStream::BaseModel # @!attribute image_rule_params # @return [ImageRuleParameters] attr_accessor :image_rule_params + # @!attribute intent_rule_params + # @return [IntentRuleParameters] intent_rule params: policy intent topic label and the minimum final score (1-100) that fires the condition + attr_accessor :intent_rule_params # @!attribute ip_content_count_rule_params # @return [IPContentCountRuleParameters] attr_accessor :ip_content_count_rule_params @@ -75,6 +81,12 @@ class RuleBuilderCondition < GetStream::BaseModel # @!attribute text_rule_params # @return [TextRuleParameters] attr_accessor :text_rule_params + # @!attribute user_channel_ban_count_params + # @return [UserChannelBanCountRuleParameters] + attr_accessor :user_channel_ban_count_params + # @!attribute user_channel_count_params + # @return [UserChannelCountRuleParameters] + attr_accessor :user_channel_count_params # @!attribute user_created_within_params # @return [UserCreatedWithinParameters] attr_accessor :user_created_within_params @@ -87,6 +99,9 @@ class RuleBuilderCondition < GetStream::BaseModel # @!attribute user_identical_content_count_params # @return [UserIdenticalContentCountParameters] attr_accessor :user_identical_content_count_params + # @!attribute user_identical_image_count_params + # @return [UserIdenticalImageCountParameters] + attr_accessor :user_identical_image_count_params # @!attribute user_reaction_count_params # @return [UserReactionCountRuleParameters] attr_accessor :user_reaction_count_params @@ -114,6 +129,7 @@ def initialize(attributes = {}) @channel_message_count_rule_params = attributes[:channel_message_count_rule_params] || attributes['channel_message_count_rule_params'] || nil @closed_caption_rule_params = attributes[:closed_caption_rule_params] || attributes['closed_caption_rule_params'] || nil @content_count_rule_params = attributes[:content_count_rule_params] || attributes['content_count_rule_params'] || nil + @content_country_code_params = attributes[:content_country_code_params] || attributes['content_country_code_params'] || nil @content_custom_property_count_params = attributes[:content_custom_property_count_params] || attributes['content_custom_property_count_params'] || nil @content_custom_property_params = attributes[:content_custom_property_params] || attributes['content_custom_property_params'] || nil @content_flag_count_rule_params = attributes[:content_flag_count_rule_params] || attributes['content_flag_count_rule_params'] || nil @@ -121,6 +137,7 @@ def initialize(attributes = {}) @flood_similar_params = attributes[:flood_similar_params] || attributes['flood_similar_params'] || nil @image_content_params = attributes[:image_content_params] || attributes['image_content_params'] || nil @image_rule_params = attributes[:image_rule_params] || attributes['image_rule_params'] || nil + @intent_rule_params = attributes[:intent_rule_params] || attributes['intent_rule_params'] || nil @ip_content_count_rule_params = attributes[:ip_content_count_rule_params] || attributes['ip_content_count_rule_params'] || nil @ip_flag_count_rule_params = attributes[:ip_flag_count_rule_params] || attributes['ip_flag_count_rule_params'] || nil @keyframe_ocr_rule_params = attributes[:keyframe_ocr_rule_params] || attributes['keyframe_ocr_rule_params'] || nil @@ -128,10 +145,13 @@ def initialize(attributes = {}) @ocr_content_params = attributes[:ocr_content_params] || attributes['ocr_content_params'] || nil @text_content_params = attributes[:text_content_params] || attributes['text_content_params'] || nil @text_rule_params = attributes[:text_rule_params] || attributes['text_rule_params'] || nil + @user_channel_ban_count_params = attributes[:user_channel_ban_count_params] || attributes['user_channel_ban_count_params'] || nil + @user_channel_count_params = attributes[:user_channel_count_params] || attributes['user_channel_count_params'] || nil @user_created_within_params = attributes[:user_created_within_params] || attributes['user_created_within_params'] || nil @user_custom_property_params = attributes[:user_custom_property_params] || attributes['user_custom_property_params'] || nil @user_flag_count_rule_params = attributes[:user_flag_count_rule_params] || attributes['user_flag_count_rule_params'] || nil @user_identical_content_count_params = attributes[:user_identical_content_count_params] || attributes['user_identical_content_count_params'] || nil + @user_identical_image_count_params = attributes[:user_identical_image_count_params] || attributes['user_identical_image_count_params'] || nil @user_reaction_count_params = attributes[:user_reaction_count_params] || attributes['user_reaction_count_params'] || nil @user_role_params = attributes[:user_role_params] || attributes['user_role_params'] || nil @user_rule_params = attributes[:user_rule_params] || attributes['user_rule_params'] || nil @@ -150,6 +170,7 @@ def self.json_field_mappings channel_message_count_rule_params: 'channel_message_count_rule_params', closed_caption_rule_params: 'closed_caption_rule_params', content_count_rule_params: 'content_count_rule_params', + content_country_code_params: 'content_country_code_params', content_custom_property_count_params: 'content_custom_property_count_params', content_custom_property_params: 'content_custom_property_params', content_flag_count_rule_params: 'content_flag_count_rule_params', @@ -157,6 +178,7 @@ def self.json_field_mappings flood_similar_params: 'flood_similar_params', image_content_params: 'image_content_params', image_rule_params: 'image_rule_params', + intent_rule_params: 'intent_rule_params', ip_content_count_rule_params: 'ip_content_count_rule_params', ip_flag_count_rule_params: 'ip_flag_count_rule_params', keyframe_ocr_rule_params: 'keyframe_ocr_rule_params', @@ -164,10 +186,13 @@ def self.json_field_mappings ocr_content_params: 'ocr_content_params', text_content_params: 'text_content_params', text_rule_params: 'text_rule_params', + user_channel_ban_count_params: 'user_channel_ban_count_params', + user_channel_count_params: 'user_channel_count_params', user_created_within_params: 'user_created_within_params', user_custom_property_params: 'user_custom_property_params', user_flag_count_rule_params: 'user_flag_count_rule_params', user_identical_content_count_params: 'user_identical_content_count_params', + user_identical_image_count_params: 'user_identical_image_count_params', user_reaction_count_params: 'user_reaction_count_params', user_role_params: 'user_role_params', user_rule_params: 'user_rule_params', diff --git a/lib/getstream_ruby/generated/models/scheduled_message_channel_response.rb b/lib/getstream_ruby/generated/models/scheduled_message_channel_response.rb new file mode 100644 index 00000000..209e90ba --- /dev/null +++ b/lib/getstream_ruby/generated/models/scheduled_message_channel_response.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # The channel of a scheduled message + class ScheduledMessageChannelResponse < GetStream::BaseModel + + # Model attributes + # @!attribute cid + # @return [String] Channel CID (:) + attr_accessor :cid + # @!attribute id + # @return [String] Channel ID + attr_accessor :id + # @!attribute type + # @return [String] Channel type + attr_accessor :type + # @!attribute image + # @return [String] Channel image, from its custom data + attr_accessor :image + # @!attribute name + # @return [String] Channel name, from its custom data + attr_accessor :name + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @cid = attributes[:cid] || attributes['cid'] + @id = attributes[:id] || attributes['id'] + @type = attributes[:type] || attributes['type'] + @image = attributes[:image] || attributes['image'] || nil + @name = attributes[:name] || attributes['name'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + cid: 'cid', + id: 'id', + type: 'type', + image: 'image', + name: 'name' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/scheduled_message_content_response.rb b/lib/getstream_ruby/generated/models/scheduled_message_content_response.rb new file mode 100644 index 00000000..36ca09c1 --- /dev/null +++ b/lib/getstream_ruby/generated/models/scheduled_message_content_response.rb @@ -0,0 +1,126 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # The message a scheduled message will send + class ScheduledMessageContentResponse < GetStream::BaseModel + + # Model attributes + # @!attribute text + # @return [String] Text of the message + attr_accessor :text + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute html + # @return [String] Contains HTML markup of the message + attr_accessor :html + # @!attribute mentioned_channel + # @return [Boolean] Whether the message mentions the whole channel + attr_accessor :mentioned_channel + # @!attribute mentioned_here + # @return [Boolean] Whether the message mentions the online channel members + attr_accessor :mentioned_here + # @!attribute mml + # @return [String] MML content of the message + attr_accessor :mml + # @!attribute parent_id + # @return [String] ID of parent message (thread) + attr_accessor :parent_id + # @!attribute pin_expires + # @return [DateTime] Date/time the pin expires + attr_accessor :pin_expires + # @!attribute pinned + # @return [Boolean] Whether the message will be pinned when sent + attr_accessor :pinned + # @!attribute poll_id + # @return [String] Identifier of the poll to include in the message + attr_accessor :poll_id + # @!attribute quoted_message_id + # @return [String] + attr_accessor :quoted_message_id + # @!attribute show_in_channel + # @return [Boolean] Whether thread reply should be shown in the channel as well + attr_accessor :show_in_channel + # @!attribute silent + # @return [Boolean] Whether message is silent or not + attr_accessor :silent + # @!attribute type + # @return [String] Contains type of the message. One of: regular, system + attr_accessor :type + # @!attribute attachments + # @return [Array] Array of message attachments + attr_accessor :attachments + # @!attribute mentioned_group_ids + # @return [Array] IDs of the user groups mentioned in the message + attr_accessor :mentioned_group_ids + # @!attribute mentioned_roles + # @return [Array] Roles mentioned in the message + attr_accessor :mentioned_roles + # @!attribute mentioned_users + # @return [Array] IDs of the users mentioned in the message + attr_accessor :mentioned_users + # @!attribute restricted_visibility + # @return [Array] IDs of the users the message will be visible to + attr_accessor :restricted_visibility + # @!attribute shared_location + # @return [ScheduledMessageLocation] The location a scheduled message will share + attr_accessor :shared_location + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @text = attributes[:text] || attributes['text'] + @custom = attributes[:custom] || attributes['custom'] + @html = attributes[:html] || attributes['html'] || nil + @mentioned_channel = attributes[:mentioned_channel] || attributes['mentioned_channel'] || nil + @mentioned_here = attributes[:mentioned_here] || attributes['mentioned_here'] || nil + @mml = attributes[:mml] || attributes['mml'] || nil + @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil + @pin_expires = attributes[:pin_expires] || attributes['pin_expires'] || nil + @pinned = attributes[:pinned] || attributes['pinned'] || nil + @poll_id = attributes[:poll_id] || attributes['poll_id'] || nil + @quoted_message_id = attributes[:quoted_message_id] || attributes['quoted_message_id'] || nil + @show_in_channel = attributes[:show_in_channel] || attributes['show_in_channel'] || nil + @silent = attributes[:silent] || attributes['silent'] || nil + @type = attributes[:type] || attributes['type'] || nil + @attachments = attributes[:attachments] || attributes['attachments'] || nil + @mentioned_group_ids = attributes[:mentioned_group_ids] || attributes['mentioned_group_ids'] || nil + @mentioned_roles = attributes[:mentioned_roles] || attributes['mentioned_roles'] || nil + @mentioned_users = attributes[:mentioned_users] || attributes['mentioned_users'] || nil + @restricted_visibility = attributes[:restricted_visibility] || attributes['restricted_visibility'] || nil + @shared_location = attributes[:shared_location] || attributes['shared_location'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + text: 'text', + custom: 'custom', + html: 'html', + mentioned_channel: 'mentioned_channel', + mentioned_here: 'mentioned_here', + mml: 'mml', + parent_id: 'parent_id', + pin_expires: 'pin_expires', + pinned: 'pinned', + poll_id: 'poll_id', + quoted_message_id: 'quoted_message_id', + show_in_channel: 'show_in_channel', + silent: 'silent', + type: 'type', + attachments: 'attachments', + mentioned_group_ids: 'mentioned_group_ids', + mentioned_roles: 'mentioned_roles', + mentioned_users: 'mentioned_users', + restricted_visibility: 'restricted_visibility', + shared_location: 'shared_location' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/scheduled_message_failed_event.rb b/lib/getstream_ruby/generated/models/scheduled_message_failed_event.rb new file mode 100644 index 00000000..6a8d4cb2 --- /dev/null +++ b/lib/getstream_ruby/generated/models/scheduled_message_failed_event.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Emitted when a scheduled message fails to send. scheduled_message.failure_reason says why. + class ScheduledMessageFailedEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute user + # @return [UserResponseCommonFields] + attr_accessor :user + # @!attribute type + # @return [String] The type of event: "scheduled_message.failed" in this case + attr_accessor :type + # @!attribute cid + # @return [String] The CID of the channel the message is scheduled in + attr_accessor :cid + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + # @!attribute scheduled_message + # @return [ScheduledMessageResponse] A message scheduled to be sent later + attr_accessor :scheduled_message + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @custom = attributes[:custom] || attributes['custom'] + @user = attributes[:user] || attributes['user'] + @type = attributes[:type] || attributes['type'] || "scheduled_message.failed" + @cid = attributes[:cid] || attributes['cid'] || nil + @received_at = attributes[:received_at] || attributes['received_at'] || nil + @scheduled_message = attributes[:scheduled_message] || attributes['scheduled_message'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + custom: 'custom', + user: 'user', + type: 'type', + cid: 'cid', + received_at: 'received_at', + scheduled_message: 'scheduled_message' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/scheduled_message_location.rb b/lib/getstream_ruby/generated/models/scheduled_message_location.rb new file mode 100644 index 00000000..a9649265 --- /dev/null +++ b/lib/getstream_ruby/generated/models/scheduled_message_location.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # The location a scheduled message will share + class ScheduledMessageLocation < GetStream::BaseModel + + # Model attributes + # @!attribute created_by_device_id + # @return [String] The ID of the device that created the location. + attr_accessor :created_by_device_id + # @!attribute end_at + # @return [DateTime] The date when the location sharing ends., If it's empty, it means the location sharing is static instead of live. + attr_accessor :end_at + # @!attribute latitude + # @return [Float] The latitude of the location. + attr_accessor :latitude + # @!attribute longitude + # @return [Float] The longitude of the location. + attr_accessor :longitude + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_by_device_id = attributes[:created_by_device_id] || attributes['created_by_device_id'] + @end_at = attributes[:end_at] || attributes['end_at'] || nil + @latitude = attributes[:latitude] || attributes['latitude'] || nil + @longitude = attributes[:longitude] || attributes['longitude'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_by_device_id: 'created_by_device_id', + end_at: 'end_at', + latitude: 'latitude', + longitude: 'longitude' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/scheduled_message_response.rb b/lib/getstream_ruby/generated/models/scheduled_message_response.rb new file mode 100644 index 00000000..bb15ddf5 --- /dev/null +++ b/lib/getstream_ruby/generated/models/scheduled_message_response.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # A message scheduled to be sent later + class ScheduledMessageResponse < GetStream::BaseModel + + # Model attributes + # @!attribute cid + # @return [String] The CID of the channel the message will be sent to + attr_accessor :cid + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute id + # @return [String] Unique identifier of the scheduled message + attr_accessor :id + # @!attribute scheduled_at + # @return [DateTime] Date/time the message is scheduled to be sent + attr_accessor :scheduled_at + # @!attribute status + # @return [String] Status of the scheduled message. One of: scheduled, sending, failed, canceled, sent + attr_accessor :status + # @!attribute updated_at + # @return [DateTime] Date/time of the last update + attr_accessor :updated_at + # @!attribute message + # @return [ScheduledMessageContentResponse] The message a scheduled message will send + attr_accessor :message + # @!attribute user + # @return [UserResponse] User response object + attr_accessor :user + # @!attribute failure_reason + # @return [String] Why sending the message failed. Only set when status is failed. One of: banned, no_permission, channel_frozen, channel_deleted, user_deleted, moderation_blocked, hook_rejected, expired, internal_error, invalid_message, pending_not_supported + attr_accessor :failure_reason + # @!attribute channel + # @return [ScheduledMessageChannelResponse] The channel of a scheduled message + attr_accessor :channel + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @cid = attributes[:cid] || attributes['cid'] + @created_at = attributes[:created_at] || attributes['created_at'] + @id = attributes[:id] || attributes['id'] + @scheduled_at = attributes[:scheduled_at] || attributes['scheduled_at'] + @status = attributes[:status] || attributes['status'] + @updated_at = attributes[:updated_at] || attributes['updated_at'] + @message = attributes[:message] || attributes['message'] + @user = attributes[:user] || attributes['user'] + @failure_reason = attributes[:failure_reason] || attributes['failure_reason'] || nil + @channel = attributes[:channel] || attributes['channel'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + cid: 'cid', + created_at: 'created_at', + id: 'id', + scheduled_at: 'scheduled_at', + status: 'status', + updated_at: 'updated_at', + message: 'message', + user: 'user', + failure_reason: 'failure_reason', + channel: 'channel' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/scheduled_message_sent_event.rb b/lib/getstream_ruby/generated/models/scheduled_message_sent_event.rb new file mode 100644 index 00000000..d9af73f9 --- /dev/null +++ b/lib/getstream_ruby/generated/models/scheduled_message_sent_event.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Emitted when a scheduled message is sent. + class ScheduledMessageSentEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute message_id + # @return [String] The ID of the message that was sent + attr_accessor :message_id + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute user + # @return [UserResponseCommonFields] + attr_accessor :user + # @!attribute type + # @return [String] The type of event: "scheduled_message.sent" in this case + attr_accessor :type + # @!attribute cid + # @return [String] The CID of the channel the message was sent to + attr_accessor :cid + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + # @!attribute scheduled_message + # @return [ScheduledMessageResponse] A message scheduled to be sent later + attr_accessor :scheduled_message + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @message_id = attributes[:message_id] || attributes['message_id'] + @custom = attributes[:custom] || attributes['custom'] + @user = attributes[:user] || attributes['user'] + @type = attributes[:type] || attributes['type'] || "scheduled_message.sent" + @cid = attributes[:cid] || attributes['cid'] || nil + @received_at = attributes[:received_at] || attributes['received_at'] || nil + @scheduled_message = attributes[:scheduled_message] || attributes['scheduled_message'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + message_id: 'message_id', + custom: 'custom', + user: 'user', + type: 'type', + cid: 'cid', + received_at: 'received_at', + scheduled_message: 'scheduled_message' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/scheduled_messages_filter.rb b/lib/getstream_ruby/generated/models/scheduled_messages_filter.rb new file mode 100644 index 00000000..357085c7 --- /dev/null +++ b/lib/getstream_ruby/generated/models/scheduled_messages_filter.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Filter for querying scheduled messages + class ScheduledMessagesFilter < GetStream::BaseModel + + # Model attributes + # @!attribute cid + # @return [String] Only scheduled messages of this channel + attr_accessor :cid + # @!attribute status + # @return [Array] Only these statuses. One or more of: scheduled, sending, failed + attr_accessor :status + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @cid = attributes[:cid] || attributes['cid'] || nil + @status = attributes[:status] || attributes['status'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + cid: 'cid', + status: 'status' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/send_message_request.rb b/lib/getstream_ruby/generated/models/send_message_request.rb index ac433795..741284bf 100644 --- a/lib/getstream_ruby/generated/models/send_message_request.rb +++ b/lib/getstream_ruby/generated/models/send_message_request.rb @@ -27,6 +27,9 @@ class SendMessageRequest < GetStream::BaseModel # @!attribute pending # @return [Boolean] attr_accessor :pending + # @!attribute scheduled_at + # @return [DateTime] When set, the message is not sent now: it is stored and sent at this time (UTC). The response then carries scheduled_message. Must be at least 1 minute and at most the app's maximum lead time (120 days by default) from now. Slash commands cannot be scheduled + attr_accessor :scheduled_at # @!attribute skip_enrich_url # @return [Boolean] attr_accessor :skip_enrich_url @@ -46,6 +49,7 @@ def initialize(attributes = {}) @include_mentioned_members = attributes[:include_mentioned_members] || attributes['include_mentioned_members'] || nil @keep_channel_hidden = attributes[:keep_channel_hidden] || attributes['keep_channel_hidden'] || nil @pending = attributes[:pending] || attributes['pending'] || nil + @scheduled_at = attributes[:scheduled_at] || attributes['scheduled_at'] || nil @skip_enrich_url = attributes[:skip_enrich_url] || attributes['skip_enrich_url'] || nil @skip_push = attributes[:skip_push] || attributes['skip_push'] || nil @pending_message_metadata = attributes[:pending_message_metadata] || attributes['pending_message_metadata'] || nil @@ -60,6 +64,7 @@ def self.json_field_mappings include_mentioned_members: 'include_mentioned_members', keep_channel_hidden: 'keep_channel_hidden', pending: 'pending', + scheduled_at: 'scheduled_at', skip_enrich_url: 'skip_enrich_url', skip_push: 'skip_push', pending_message_metadata: 'pending_message_metadata' diff --git a/lib/getstream_ruby/generated/models/send_message_response.rb b/lib/getstream_ruby/generated/models/send_message_response.rb index 067f247f..037708e7 100644 --- a/lib/getstream_ruby/generated/models/send_message_response.rb +++ b/lib/getstream_ruby/generated/models/send_message_response.rb @@ -24,6 +24,9 @@ class SendMessageResponse < GetStream::BaseModel # @!attribute pending_message_metadata # @return [Hash] Pending message metadata attr_accessor :pending_message_metadata + # @!attribute scheduled_message + # @return [ScheduledMessageResponse] A message scheduled to be sent later + attr_accessor :scheduled_message # Initialize with attributes def initialize(attributes = {}) @@ -33,6 +36,7 @@ def initialize(attributes = {}) @channel_context = attributes[:channel_context] || attributes['channel_context'] || nil @mentioned_members = attributes[:mentioned_members] || attributes['mentioned_members'] || nil @pending_message_metadata = attributes[:pending_message_metadata] || attributes['pending_message_metadata'] || nil + @scheduled_message = attributes[:scheduled_message] || attributes['scheduled_message'] || nil end # Override field mappings for JSON serialization @@ -42,7 +46,8 @@ def self.json_field_mappings message: 'message', channel_context: 'channel_context', mentioned_members: 'mentioned_members', - pending_message_metadata: 'pending_message_metadata' + pending_message_metadata: 'pending_message_metadata', + scheduled_message: 'scheduled_message' } end end diff --git a/lib/getstream_ruby/generated/models/send_scheduled_message_now_request.rb b/lib/getstream_ruby/generated/models/send_scheduled_message_now_request.rb new file mode 100644 index 00000000..1ce30bde --- /dev/null +++ b/lib/getstream_ruby/generated/models/send_scheduled_message_now_request.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class SendScheduledMessageNowRequest < GetStream::BaseModel + # Empty model - inherits all functionality from BaseModel + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/send_scheduled_message_now_response.rb b/lib/getstream_ruby/generated/models/send_scheduled_message_now_response.rb new file mode 100644 index 00000000..eca83f28 --- /dev/null +++ b/lib/getstream_ruby/generated/models/send_scheduled_message_now_response.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class SendScheduledMessageNowResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute scheduled_message + # @return [ScheduledMessageResponse] A message scheduled to be sent later + attr_accessor :scheduled_message + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @scheduled_message = attributes[:scheduled_message] || attributes['scheduled_message'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + scheduled_message: 'scheduled_message' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/set_feeds_retention_policy_request.rb b/lib/getstream_ruby/generated/models/set_feeds_retention_policy_request.rb new file mode 100644 index 00000000..b27923d4 --- /dev/null +++ b/lib/getstream_ruby/generated/models/set_feeds_retention_policy_request.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class SetFeedsRetentionPolicyRequest < GetStream::BaseModel + + # Model attributes + # @!attribute max_age_hours + # @return [Integer] + attr_accessor :max_age_hours + # @!attribute policy + # @return [String] + attr_accessor :policy + # @!attribute enabled + # @return [Boolean] + attr_accessor :enabled + # @!attribute feed_groups + # @return [Array] + attr_accessor :feed_groups + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @max_age_hours = attributes[:max_age_hours] || attributes['max_age_hours'] + @policy = attributes[:policy] || attributes['policy'] + @enabled = attributes[:enabled] || attributes['enabled'] || nil + @feed_groups = attributes[:feed_groups] || attributes['feed_groups'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + max_age_hours: 'max_age_hours', + policy: 'policy', + enabled: 'enabled', + feed_groups: 'feed_groups' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/set_feeds_retention_policy_response.rb b/lib/getstream_ruby/generated/models/set_feeds_retention_policy_response.rb new file mode 100644 index 00000000..886fd4cd --- /dev/null +++ b/lib/getstream_ruby/generated/models/set_feeds_retention_policy_response.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Basic response information + class SetFeedsRetentionPolicyResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute enabled + # @return [Boolean] + attr_accessor :enabled + # @!attribute policy + # @return [FeedsRetentionPolicy] + attr_accessor :policy + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @enabled = attributes[:enabled] || attributes['enabled'] + @policy = attributes[:policy] || attributes['policy'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + enabled: 'enabled', + policy: 'policy' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/shared_location_response_data.rb b/lib/getstream_ruby/generated/models/shared_location_response_data.rb index 0a5850e6..e16dfbbc 100644 --- a/lib/getstream_ruby/generated/models/shared_location_response_data.rb +++ b/lib/getstream_ruby/generated/models/shared_location_response_data.rb @@ -10,31 +10,31 @@ class SharedLocationResponseData < GetStream::BaseModel # Model attributes # @!attribute channel_cid - # @return [String] + # @return [String] The CID (type:id) of the channel that the location is attached to. attr_accessor :channel_cid # @!attribute created_at - # @return [DateTime] + # @return [DateTime] The date when the location was created. attr_accessor :created_at # @!attribute created_by_device_id - # @return [String] + # @return [String] The ID of the device that created the location. attr_accessor :created_by_device_id # @!attribute latitude - # @return [Float] + # @return [Float] The latitude of the location. attr_accessor :latitude # @!attribute longitude - # @return [Float] + # @return [Float] The longitude of the location. attr_accessor :longitude # @!attribute message_id - # @return [String] + # @return [String] The ID of the message that the location is attached to. attr_accessor :message_id # @!attribute updated_at - # @return [DateTime] + # @return [DateTime] The date when the location was updated. attr_accessor :updated_at # @!attribute user_id - # @return [String] + # @return [String] The ID of the user that created the location. attr_accessor :user_id # @!attribute end_at - # @return [DateTime] + # @return [DateTime] The date when the location sharing ends., If it's empty, it means the location sharing is static instead of live. attr_accessor :end_at # @!attribute channel # @return [ChannelResponse] Represents channel in chat diff --git a/lib/getstream_ruby/generated/models/submit_action_request.rb b/lib/getstream_ruby/generated/models/submit_action_request.rb index f0d27a1e..70edce9c 100644 --- a/lib/getstream_ruby/generated/models/submit_action_request.rb +++ b/lib/getstream_ruby/generated/models/submit_action_request.rb @@ -10,7 +10,7 @@ class SubmitActionRequest < GetStream::BaseModel # Model attributes # @!attribute action_type - # @return [String] Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, ban, custom, unban, restore, delete_user, delete_user_messages, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate + # @return [String] Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, delete_poll, delete_poll_option, delete_poll_answer, ban, custom, unban, restore, delete_user, delete_user_messages, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate attr_accessor :action_type # @!attribute appeal_id # @return [String] UUID of the appeal to act on (required for reject_appeal, optional for other actions) @@ -42,6 +42,15 @@ class SubmitActionRequest < GetStream::BaseModel # @!attribute delete_message # @return [DeleteMessageRequestPayload] Configuration for message deletion action attr_accessor :delete_message + # @!attribute delete_poll + # @return [DeletePollRequestPayload] Configuration for poll deletion action. Poll deletion is always permanent. + attr_accessor :delete_poll + # @!attribute delete_poll_answer + # @return [DeletePollAnswerRequestPayload] Configuration for deleting the free-text poll answer a review item was raised for. Chat polls only. Deletion is permanent; the poll and other votes are kept. + attr_accessor :delete_poll_answer + # @!attribute delete_poll_option + # @return [DeletePollOptionRequestPayload] Configuration for deleting the single poll option a review item was raised for. Deletion is permanent; the rest of the poll is kept. + attr_accessor :delete_poll_option # @!attribute delete_reaction # @return [DeleteReactionRequestPayload] Configuration for reaction deletion action attr_accessor :delete_reaction @@ -73,7 +82,8 @@ class SubmitActionRequest < GetStream::BaseModel # @return [UnbanActionRequestPayload] Configuration for unban moderation action attr_accessor :unban # @!attribute unblock - # @return [UnblockActionRequestPayload] Deprecated: use restore instead — it now also reverses a block or shadow block. Configuration for unblock action. + # @deprecated This field is deprecated. + # @return [UnblockActionRequestPayload] Deprecated: Use restore instead, which now also reverses a block or shadow block. Configuration for unblock action. attr_accessor :unblock # @!attribute user # @return [UserRequest] User request object @@ -93,6 +103,9 @@ def initialize(attributes = {}) @delete_activity = attributes[:delete_activity] || attributes['delete_activity'] || nil @delete_comment = attributes[:delete_comment] || attributes['delete_comment'] || nil @delete_message = attributes[:delete_message] || attributes['delete_message'] || nil + @delete_poll = attributes[:delete_poll] || attributes['delete_poll'] || nil + @delete_poll_answer = attributes[:delete_poll_answer] || attributes['delete_poll_answer'] || nil + @delete_poll_option = attributes[:delete_poll_option] || attributes['delete_poll_option'] || nil @delete_reaction = attributes[:delete_reaction] || attributes['delete_reaction'] || nil @delete_user = attributes[:delete_user] || attributes['delete_user'] || nil @delete_user_messages = attributes[:delete_user_messages] || attributes['delete_user_messages'] || nil @@ -121,6 +134,9 @@ def self.json_field_mappings delete_activity: 'delete_activity', delete_comment: 'delete_comment', delete_message: 'delete_message', + delete_poll: 'delete_poll', + delete_poll_answer: 'delete_poll_answer', + delete_poll_option: 'delete_poll_option', delete_reaction: 'delete_reaction', delete_user: 'delete_user', delete_user_messages: 'delete_user_messages', diff --git a/lib/getstream_ruby/generated/models/threaded_comment_response.rb b/lib/getstream_ruby/generated/models/threaded_comment_response.rb index 7d6ae061..cc86c7f8 100644 --- a/lib/getstream_ruby/generated/models/threaded_comment_response.rb +++ b/lib/getstream_ruby/generated/models/threaded_comment_response.rb @@ -24,6 +24,9 @@ class ThreadedCommentResponse < GetStream::BaseModel # @!attribute downvote_count # @return [Integer] attr_accessor :downvote_count + # @!attribute hidden + # @return [Boolean] + attr_accessor :hidden # @!attribute id # @return [String] attr_accessor :id @@ -105,6 +108,7 @@ def initialize(attributes = {}) @confidence_score = attributes[:confidence_score] || attributes['confidence_score'] @created_at = attributes[:created_at] || attributes['created_at'] @downvote_count = attributes[:downvote_count] || attributes['downvote_count'] + @hidden = attributes[:hidden] || attributes['hidden'] @id = attributes[:id] || attributes['id'] @object_type = attributes[:object_type] || attributes['object_type'] @reaction_count = attributes[:reaction_count] || attributes['reaction_count'] @@ -139,6 +143,7 @@ def self.json_field_mappings confidence_score: 'confidence_score', created_at: 'created_at', downvote_count: 'downvote_count', + hidden: 'hidden', id: 'id', object_type: 'object_type', reaction_count: 'reaction_count', diff --git a/lib/getstream_ruby/generated/models/typing_indicators_response.rb b/lib/getstream_ruby/generated/models/typing_indicators_response.rb index 84f92a39..f34233d2 100644 --- a/lib/getstream_ruby/generated/models/typing_indicators_response.rb +++ b/lib/getstream_ruby/generated/models/typing_indicators_response.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # + # The settings for typing indicator events. class TypingIndicatorsResponse < GetStream::BaseModel # Model attributes diff --git a/lib/getstream_ruby/generated/models/unban_request.rb b/lib/getstream_ruby/generated/models/unban_request.rb index c5bf7409..c83309d1 100644 --- a/lib/getstream_ruby/generated/models/unban_request.rb +++ b/lib/getstream_ruby/generated/models/unban_request.rb @@ -14,6 +14,7 @@ class UnbanRequest < GetStream::BaseModel # @return [String] ID of the user performing the unban Deprecated: not used by the unban flow attr_accessor :unbanned_by_id # @!attribute unbanned_by + # @deprecated This field is deprecated. # @return [UserRequest] User request object attr_accessor :unbanned_by diff --git a/lib/getstream_ruby/generated/models/unblock_action_request_payload.rb b/lib/getstream_ruby/generated/models/unblock_action_request_payload.rb index 7508b2a0..3db17ac8 100644 --- a/lib/getstream_ruby/generated/models/unblock_action_request_payload.rb +++ b/lib/getstream_ruby/generated/models/unblock_action_request_payload.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # Deprecated: use restore instead — it now also reverses a block or shadow block. Configuration for unblock action. + # Deprecated: Use restore instead, which now also reverses a block or shadow block. Configuration for unblock action. class UnblockActionRequestPayload < GetStream::BaseModel # Model attributes diff --git a/lib/getstream_ruby/generated/models/unfollow_batch_request.rb b/lib/getstream_ruby/generated/models/unfollow_batch_request.rb index 8c936a26..24713da1 100644 --- a/lib/getstream_ruby/generated/models/unfollow_batch_request.rb +++ b/lib/getstream_ruby/generated/models/unfollow_batch_request.rb @@ -12,6 +12,9 @@ class UnfollowBatchRequest < GetStream::BaseModel # @!attribute follows # @return [Array] List of follow relationships to remove, each with optional keep_history attr_accessor :follows + # @!attribute async + # @return [Boolean] If true, the batch is queued as a background task, paced per app, and the response has empty follows and a task_id. Server-side only. Supported by the get-or-create endpoint (GetOrCreateUnfollows); UnfollowBatch rejects it. Async batches can apply out of order with other follow writes. Defaults to false. + attr_accessor :async # @!attribute delete_notification_activity # @return [Boolean] Whether to delete the corresponding notification activity (default: false) attr_accessor :delete_notification_activity @@ -23,6 +26,7 @@ class UnfollowBatchRequest < GetStream::BaseModel def initialize(attributes = {}) super(attributes) @follows = attributes[:follows] || attributes['follows'] + @async = attributes[:async] || attributes['async'] || nil @delete_notification_activity = attributes[:delete_notification_activity] || attributes['delete_notification_activity'] || nil @enrich_own_fields = attributes[:enrich_own_fields] || attributes['enrich_own_fields'] || nil end @@ -31,6 +35,7 @@ def initialize(attributes = {}) def self.json_field_mappings { follows: 'follows', + async: 'async', delete_notification_activity: 'delete_notification_activity', enrich_own_fields: 'enrich_own_fields' } diff --git a/lib/getstream_ruby/generated/models/unfollow_batch_response.rb b/lib/getstream_ruby/generated/models/unfollow_batch_response.rb index e27f138d..20f2f9f1 100644 --- a/lib/getstream_ruby/generated/models/unfollow_batch_response.rb +++ b/lib/getstream_ruby/generated/models/unfollow_batch_response.rb @@ -15,19 +15,24 @@ class UnfollowBatchResponse < GetStream::BaseModel # @!attribute follows # @return [Array] List of follow relationships that were removed attr_accessor :follows + # @!attribute task_id + # @return [String] ID of the background task when the request was sent with async: true + attr_accessor :task_id # Initialize with attributes def initialize(attributes = {}) super(attributes) @duration = attributes[:duration] || attributes['duration'] @follows = attributes[:follows] || attributes['follows'] + @task_id = attributes[:task_id] || attributes['task_id'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { duration: 'duration', - follows: 'follows' + follows: 'follows', + task_id: 'task_id' } end end diff --git a/lib/getstream_ruby/generated/models/unread_counts_channel.rb b/lib/getstream_ruby/generated/models/unread_counts_channel.rb index b8fc111f..26d44992 100644 --- a/lib/getstream_ruby/generated/models/unread_counts_channel.rb +++ b/lib/getstream_ruby/generated/models/unread_counts_channel.rb @@ -5,18 +5,18 @@ module GetStream module Generated module Models - # + # The unread information of a channel. class UnreadCountsChannel < GetStream::BaseModel # Model attributes # @!attribute channel_id - # @return [String] + # @return [String] The channel CID (type:id). attr_accessor :channel_id # @!attribute last_read - # @return [DateTime] + # @return [DateTime] The date which the current user last read the channel. attr_accessor :last_read # @!attribute unread_count - # @return [Integer] + # @return [Integer] The number of unread messages inside the channel. attr_accessor :unread_count # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/unread_counts_channel_type.rb b/lib/getstream_ruby/generated/models/unread_counts_channel_type.rb index 78fde6ed..ff9f33bc 100644 --- a/lib/getstream_ruby/generated/models/unread_counts_channel_type.rb +++ b/lib/getstream_ruby/generated/models/unread_counts_channel_type.rb @@ -5,18 +5,18 @@ module GetStream module Generated module Models - # + # The unread information from channels with a specific type. class UnreadCountsChannelType < GetStream::BaseModel # Model attributes # @!attribute channel_count - # @return [Integer] + # @return [Integer] The number of unread channels of this channel type. attr_accessor :channel_count # @!attribute channel_type - # @return [String] + # @return [String] The channel type. attr_accessor :channel_type # @!attribute unread_count - # @return [Integer] + # @return [Integer] The number of unread messages of all the channels with this type. attr_accessor :unread_count # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/unread_counts_thread.rb b/lib/getstream_ruby/generated/models/unread_counts_thread.rb index eb3a2abd..9a177374 100644 --- a/lib/getstream_ruby/generated/models/unread_counts_thread.rb +++ b/lib/getstream_ruby/generated/models/unread_counts_thread.rb @@ -5,21 +5,21 @@ module GetStream module Generated module Models - # + # The unread information of a thread. class UnreadCountsThread < GetStream::BaseModel # Model attributes # @!attribute last_read - # @return [DateTime] + # @return [DateTime] The date which the current user last read the thread. attr_accessor :last_read # @!attribute last_read_message_id - # @return [String] + # @return [String] The id of the last reply which the current user read in the thread. attr_accessor :last_read_message_id # @!attribute parent_message_id - # @return [String] + # @return [String] The message id of the root of the thread. attr_accessor :parent_message_id # @!attribute unread_count - # @return [Integer] + # @return [Integer] The number of unread replies inside the thread. attr_accessor :unread_count # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/update_channel_type_request.rb b/lib/getstream_ruby/generated/models/update_channel_type_request.rb index d8c19503..2a7e5145 100644 --- a/lib/getstream_ruby/generated/models/update_channel_type_request.rb +++ b/lib/getstream_ruby/generated/models/update_channel_type_request.rb @@ -55,7 +55,7 @@ class UpdateChannelTypeRequest < GetStream::BaseModel # @return [Boolean] attr_accessor :polls # @!attribute push_level - # @return [String] + # @return [String] Sets the push notification level for a channel type attr_accessor :push_level # @!attribute push_notifications # @return [Boolean] diff --git a/lib/getstream_ruby/generated/models/update_channel_type_response.rb b/lib/getstream_ruby/generated/models/update_channel_type_response.rb index 7579e52f..e3f2ce65 100644 --- a/lib/getstream_ruby/generated/models/update_channel_type_response.rb +++ b/lib/getstream_ruby/generated/models/update_channel_type_response.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # + # Basic response information class UpdateChannelTypeResponse < GetStream::BaseModel # Model attributes @@ -31,7 +31,7 @@ class UpdateChannelTypeResponse < GetStream::BaseModel # @return [Boolean] attr_accessor :delivery_events # @!attribute duration - # @return [String] + # @return [String] Duration of the request in milliseconds attr_accessor :duration # @!attribute mark_messages_pending # @return [Boolean] @@ -115,7 +115,7 @@ class UpdateChannelTypeResponse < GetStream::BaseModel # @return [String] attr_accessor :partition_ttl # @!attribute push_level - # @return [String] + # @return [String] Sets the push notification level for a channel type attr_accessor :push_level # @!attribute allowed_flag_reasons # @return [Array] diff --git a/lib/getstream_ruby/generated/models/update_poll_option_request.rb b/lib/getstream_ruby/generated/models/update_poll_option_request.rb index d0eb2ceb..ef64153b 100644 --- a/lib/getstream_ruby/generated/models/update_poll_option_request.rb +++ b/lib/getstream_ruby/generated/models/update_poll_option_request.rb @@ -15,6 +15,12 @@ class UpdatePollOptionRequest < GetStream::BaseModel # @!attribute text # @return [String] Option text attr_accessor :text + # @!attribute config_key + # @return [String] Key of the moderation configuration to use. Server-side only. + attr_accessor :config_key + # @!attribute config_team + # @return [String] Team associated with the configuration. Server-side only. + attr_accessor :config_team # @!attribute user_id # @return [String] attr_accessor :user_id @@ -30,6 +36,8 @@ def initialize(attributes = {}) super(attributes) @id = attributes[:id] || attributes['id'] @text = attributes[:text] || attributes['text'] + @config_key = attributes[:config_key] || attributes['config_key'] || nil + @config_team = attributes[:config_team] || attributes['config_team'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @custom = attributes[:custom] || attributes['custom'] || nil @user = attributes[:user] || attributes['user'] || nil @@ -40,6 +48,8 @@ def self.json_field_mappings { id: 'id', text: 'text', + config_key: 'config_key', + config_team: 'config_team', user_id: 'user_id', custom: 'custom', user: 'user' diff --git a/lib/getstream_ruby/generated/models/update_poll_partial_request.rb b/lib/getstream_ruby/generated/models/update_poll_partial_request.rb index a5457d55..cecba525 100644 --- a/lib/getstream_ruby/generated/models/update_poll_partial_request.rb +++ b/lib/getstream_ruby/generated/models/update_poll_partial_request.rb @@ -9,6 +9,12 @@ module Models class UpdatePollPartialRequest < GetStream::BaseModel # Model attributes + # @!attribute config_key + # @return [String] Key of the moderation configuration to use. Server-side only. + attr_accessor :config_key + # @!attribute config_team + # @return [String] Team associated with the configuration. Server-side only. + attr_accessor :config_team # @!attribute user_id # @return [String] attr_accessor :user_id @@ -25,6 +31,8 @@ class UpdatePollPartialRequest < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @config_key = attributes[:config_key] || attributes['config_key'] || nil + @config_team = attributes[:config_team] || attributes['config_team'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @unset = attributes[:unset] || attributes['unset'] || nil @set = attributes[:set] || attributes['set'] || nil @@ -34,6 +42,8 @@ def initialize(attributes = {}) # Override field mappings for JSON serialization def self.json_field_mappings { + config_key: 'config_key', + config_team: 'config_team', user_id: 'user_id', unset: 'unset', set: 'set', diff --git a/lib/getstream_ruby/generated/models/update_poll_request.rb b/lib/getstream_ruby/generated/models/update_poll_request.rb index e47817c9..3f7972c2 100644 --- a/lib/getstream_ruby/generated/models/update_poll_request.rb +++ b/lib/getstream_ruby/generated/models/update_poll_request.rb @@ -21,6 +21,12 @@ class UpdatePollRequest < GetStream::BaseModel # @!attribute allow_user_suggested_options # @return [Boolean] Allow user suggested options attr_accessor :allow_user_suggested_options + # @!attribute config_key + # @return [String] Key of the moderation configuration to use. Server-side only. + attr_accessor :config_key + # @!attribute config_team + # @return [String] Team associated with the configuration. Server-side only. + attr_accessor :config_team # @!attribute description # @return [String] Poll description attr_accessor :description @@ -56,6 +62,8 @@ def initialize(attributes = {}) @name = attributes[:name] || attributes['name'] @allow_answers = attributes[:allow_answers] || attributes['allow_answers'] || nil @allow_user_suggested_options = attributes[:allow_user_suggested_options] || attributes['allow_user_suggested_options'] || nil + @config_key = attributes[:config_key] || attributes['config_key'] || nil + @config_team = attributes[:config_team] || attributes['config_team'] || nil @description = attributes[:description] || attributes['description'] || nil @enforce_unique_vote = attributes[:enforce_unique_vote] || attributes['enforce_unique_vote'] || nil @is_closed = attributes[:is_closed] || attributes['is_closed'] || nil @@ -74,6 +82,8 @@ def self.json_field_mappings name: 'name', allow_answers: 'allow_answers', allow_user_suggested_options: 'allow_user_suggested_options', + config_key: 'config_key', + config_team: 'config_team', description: 'description', enforce_unique_vote: 'enforce_unique_vote', is_closed: 'is_closed', diff --git a/lib/getstream_ruby/generated/models/update_reminder_request.rb b/lib/getstream_ruby/generated/models/update_reminder_request.rb index 78dfa029..5a4a1d94 100644 --- a/lib/getstream_ruby/generated/models/update_reminder_request.rb +++ b/lib/getstream_ruby/generated/models/update_reminder_request.rb @@ -9,6 +9,9 @@ module Models class UpdateReminderRequest < GetStream::BaseModel # Model attributes + # @!attribute expires_at + # @return [DateTime] + attr_accessor :expires_at # @!attribute remind_at # @return [DateTime] attr_accessor :remind_at @@ -22,6 +25,7 @@ class UpdateReminderRequest < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @expires_at = attributes[:expires_at] || attributes['expires_at'] || nil @remind_at = attributes[:remind_at] || attributes['remind_at'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @user = attributes[:user] || attributes['user'] || nil @@ -30,6 +34,7 @@ def initialize(attributes = {}) # Override field mappings for JSON serialization def self.json_field_mappings { + expires_at: 'expires_at', remind_at: 'remind_at', user_id: 'user_id', user: 'user' diff --git a/lib/getstream_ruby/generated/models/update_scheduled_message_request.rb b/lib/getstream_ruby/generated/models/update_scheduled_message_request.rb new file mode 100644 index 00000000..18821789 --- /dev/null +++ b/lib/getstream_ruby/generated/models/update_scheduled_message_request.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class UpdateScheduledMessageRequest < GetStream::BaseModel + + # Model attributes + # @!attribute scheduled_at + # @return [DateTime] New send time (UTC). Must be at least 1 minute and at most the app's maximum lead time from now + attr_accessor :scheduled_at + # @!attribute message + # @return [MessageRequest] Message data for creating or updating a message + attr_accessor :message + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @scheduled_at = attributes[:scheduled_at] || attributes['scheduled_at'] || nil + @message = attributes[:message] || attributes['message'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + scheduled_at: 'scheduled_at', + message: 'message' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/update_scheduled_message_response.rb b/lib/getstream_ruby/generated/models/update_scheduled_message_response.rb new file mode 100644 index 00000000..b35b4880 --- /dev/null +++ b/lib/getstream_ruby/generated/models/update_scheduled_message_response.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class UpdateScheduledMessageResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute scheduled_message + # @return [ScheduledMessageResponse] A message scheduled to be sent later + attr_accessor :scheduled_message + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @scheduled_message = attributes[:scheduled_message] || attributes['scheduled_message'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + scheduled_message: 'scheduled_message' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/update_users_response.rb b/lib/getstream_ruby/generated/models/update_users_response.rb index 83989fc5..8994740f 100644 --- a/lib/getstream_ruby/generated/models/update_users_response.rb +++ b/lib/getstream_ruby/generated/models/update_users_response.rb @@ -14,7 +14,7 @@ class UpdateUsersResponse < GetStream::BaseModel attr_accessor :duration # @!attribute membership_deletion_task_id # @deprecated This field is deprecated. - # @return [String] Deprecated: always empty. Removing a user from a team no longer deletes their memberships in that team's channels, so there is no task to poll + # @return [String] Deprecated: Always empty. Removing a user from a team no longer deletes their memberships in that team's channels, so there is no task to poll. attr_accessor :membership_deletion_task_id # @!attribute users # @return [Hash] Object containing users diff --git a/lib/getstream_ruby/generated/models/upload_channel_file_request.rb b/lib/getstream_ruby/generated/models/upload_channel_file_request.rb index ab47d2ef..dbca7360 100644 --- a/lib/getstream_ruby/generated/models/upload_channel_file_request.rb +++ b/lib/getstream_ruby/generated/models/upload_channel_file_request.rb @@ -7,6 +7,7 @@ module Generated module Models # class UploadChannelFileRequest < GetStream::BaseModel + include GetStream::MultipartRequest # Model attributes # @!attribute file diff --git a/lib/getstream_ruby/generated/models/upload_channel_request.rb b/lib/getstream_ruby/generated/models/upload_channel_request.rb index 5f1c11be..63906fcb 100644 --- a/lib/getstream_ruby/generated/models/upload_channel_request.rb +++ b/lib/getstream_ruby/generated/models/upload_channel_request.rb @@ -7,6 +7,7 @@ module Generated module Models # class UploadChannelRequest < GetStream::BaseModel + include GetStream::MultipartRequest # Model attributes # @!attribute file diff --git a/lib/getstream_ruby/generated/models/upsert_activities_request.rb b/lib/getstream_ruby/generated/models/upsert_activities_request.rb index bbe61688..5ad3dd73 100644 --- a/lib/getstream_ruby/generated/models/upsert_activities_request.rb +++ b/lib/getstream_ruby/generated/models/upsert_activities_request.rb @@ -21,6 +21,9 @@ class UpsertActivitiesRequest < GetStream::BaseModel # @!attribute force_moderation # @return [Boolean] If true, forces moderation to run for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field. attr_accessor :force_moderation + # @!attribute skip_existing + # @return [Boolean] Server-side only. If true, activities whose id already exists are left unchanged instead of updated: no write, events or notifications. They are listed in skipped_existing and returned as stored. Soft-deleted activities count as existing and are returned with deleted_at set. Default: false. + attr_accessor :skip_existing # Initialize with attributes def initialize(attributes = {}) @@ -29,6 +32,7 @@ def initialize(attributes = {}) @create_users = attributes[:create_users] || attributes['create_users'] || nil @enrich_own_fields = attributes[:enrich_own_fields] || attributes['enrich_own_fields'] || nil @force_moderation = attributes[:force_moderation] || attributes['force_moderation'] || nil + @skip_existing = attributes[:skip_existing] || attributes['skip_existing'] || nil end # Override field mappings for JSON serialization @@ -37,7 +41,8 @@ def self.json_field_mappings activities: 'activities', create_users: 'create_users', enrich_own_fields: 'enrich_own_fields', - force_moderation: 'force_moderation' + force_moderation: 'force_moderation', + skip_existing: 'skip_existing' } end end diff --git a/lib/getstream_ruby/generated/models/upsert_activities_response.rb b/lib/getstream_ruby/generated/models/upsert_activities_response.rb index 6de75a0c..4c662d5b 100644 --- a/lib/getstream_ruby/generated/models/upsert_activities_response.rb +++ b/lib/getstream_ruby/generated/models/upsert_activities_response.rb @@ -18,6 +18,9 @@ class UpsertActivitiesResponse < GetStream::BaseModel # @!attribute mention_notifications_created # @return [Integer] Total number of mention notification activities created for mentioned users across all activities attr_accessor :mention_notifications_created + # @!attribute skipped_existing + # @return [Array] IDs of activities left unchanged because they already existed. Only set when skip_existing is true. + attr_accessor :skipped_existing # Initialize with attributes def initialize(attributes = {}) @@ -25,6 +28,7 @@ def initialize(attributes = {}) @duration = attributes[:duration] || attributes['duration'] @activities = attributes[:activities] || attributes['activities'] @mention_notifications_created = attributes[:mention_notifications_created] || attributes['mention_notifications_created'] || nil + @skipped_existing = attributes[:skipped_existing] || attributes['skipped_existing'] || nil end # Override field mappings for JSON serialization @@ -32,7 +36,8 @@ def self.json_field_mappings { duration: 'duration', activities: 'activities', - mention_notifications_created: 'mention_notifications_created' + mention_notifications_created: 'mention_notifications_created', + skipped_existing: 'skipped_existing' } end end diff --git a/lib/getstream_ruby/generated/models/upsert_config_request.rb b/lib/getstream_ruby/generated/models/upsert_config_request.rb index 4d6535e5..d40aea21 100644 --- a/lib/getstream_ruby/generated/models/upsert_config_request.rb +++ b/lib/getstream_ruby/generated/models/upsert_config_request.rb @@ -57,6 +57,9 @@ class UpsertConfigRequest < GetStream::BaseModel # @!attribute google_vision_config # @return [GoogleVisionConfig] attr_accessor :google_vision_config + # @!attribute intent_config + # @return [IntentConfigRequest] + attr_accessor :intent_config # @!attribute llm_config # @return [LLMConfig] attr_accessor :llm_config @@ -92,6 +95,7 @@ def initialize(attributes = {}) @bodyguard_config = attributes[:bodyguard_config] || attributes['bodyguard_config'] || nil @flood_config = attributes[:flood_config] || attributes['flood_config'] || nil @google_vision_config = attributes[:google_vision_config] || attributes['google_vision_config'] || nil + @intent_config = attributes[:intent_config] || attributes['intent_config'] || nil @llm_config = attributes[:llm_config] || attributes['llm_config'] || nil @rule_builder_config = attributes[:rule_builder_config] || attributes['rule_builder_config'] || nil @user = attributes[:user] || attributes['user'] || nil @@ -118,6 +122,7 @@ def self.json_field_mappings bodyguard_config: 'bodyguard_config', flood_config: 'flood_config', google_vision_config: 'google_vision_config', + intent_config: 'intent_config', llm_config: 'llm_config', rule_builder_config: 'rule_builder_config', user: 'user', diff --git a/lib/getstream_ruby/generated/models/upsert_user_interests_request.rb b/lib/getstream_ruby/generated/models/upsert_user_interests_request.rb new file mode 100644 index 00000000..b30e13bb --- /dev/null +++ b/lib/getstream_ruby/generated/models/upsert_user_interests_request.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Adds or updates manually set interest tags on a user. Tags already present are updated with the supplied weight; other tags on the user are left untouched. Manually set tags are never overwritten by the reaction-based computation. A user holds at most 50 interest tags in total. + class UpsertUserInterestsRequest < GetStream::BaseModel + + # Model attributes + # @!attribute interests + # @return [Array] Interest tags to add or update (1-50) + attr_accessor :interests + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @interests = attributes[:interests] || attributes['interests'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + interests: 'interests' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/upsert_user_interests_response.rb b/lib/getstream_ruby/generated/models/upsert_user_interests_response.rb new file mode 100644 index 00000000..3bc28710 --- /dev/null +++ b/lib/getstream_ruby/generated/models/upsert_user_interests_response.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # The user's interest tags after the write, ordered by descending weight, then manually set tags before computed ones, then descending count, then ascending tag name + class UpsertUserInterestsResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] + attr_accessor :duration + # @!attribute interests + # @return [Array] All interest tags of the user after the write + attr_accessor :interests + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @interests = attributes[:interests] || attributes['interests'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + interests: 'interests' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/user_channel_ban_count_rule_parameters.rb b/lib/getstream_ruby/generated/models/user_channel_ban_count_rule_parameters.rb new file mode 100644 index 00000000..6c0326ed --- /dev/null +++ b/lib/getstream_ruby/generated/models/user_channel_ban_count_rule_parameters.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class UserChannelBanCountRuleParameters < GetStream::BaseModel + + # Model attributes + # @!attribute banned_by + # @return [String] + attr_accessor :banned_by + # @!attribute threshold + # @return [Integer] + attr_accessor :threshold + # @!attribute time_window + # @return [String] + attr_accessor :time_window + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @banned_by = attributes[:banned_by] || attributes['banned_by'] || nil + @threshold = attributes[:threshold] || attributes['threshold'] || nil + @time_window = attributes[:time_window] || attributes['time_window'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + banned_by: 'banned_by', + threshold: 'threshold', + time_window: 'time_window' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/user_channel_count_rule_parameters.rb b/lib/getstream_ruby/generated/models/user_channel_count_rule_parameters.rb new file mode 100644 index 00000000..04eab029 --- /dev/null +++ b/lib/getstream_ruby/generated/models/user_channel_count_rule_parameters.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class UserChannelCountRuleParameters < GetStream::BaseModel + + # Model attributes + # @!attribute threshold + # @return [Integer] + attr_accessor :threshold + # @!attribute time_window + # @return [String] + attr_accessor :time_window + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @threshold = attributes[:threshold] || attributes['threshold'] || nil + @time_window = attributes[:time_window] || attributes['time_window'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + threshold: 'threshold', + time_window: 'time_window' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/user_identical_image_count_parameters.rb b/lib/getstream_ruby/generated/models/user_identical_image_count_parameters.rb new file mode 100644 index 00000000..96be15e7 --- /dev/null +++ b/lib/getstream_ruby/generated/models/user_identical_image_count_parameters.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class UserIdenticalImageCountParameters < GetStream::BaseModel + + # Model attributes + # @!attribute match + # @return [String] + attr_accessor :match + # @!attribute similarity_distance + # @return [Integer] + attr_accessor :similarity_distance + # @!attribute threshold + # @return [Integer] + attr_accessor :threshold + # @!attribute time_window + # @return [String] + attr_accessor :time_window + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @match = attributes[:match] || attributes['match'] || nil + @similarity_distance = attributes[:similarity_distance] || attributes['similarity_distance'] || nil + @threshold = attributes[:threshold] || attributes['threshold'] || nil + @time_window = attributes[:time_window] || attributes['time_window'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + match: 'match', + similarity_distance: 'similarity_distance', + threshold: 'threshold', + time_window: 'time_window' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/user_interest_request.rb b/lib/getstream_ruby/generated/models/user_interest_request.rb new file mode 100644 index 00000000..be99ca93 --- /dev/null +++ b/lib/getstream_ruby/generated/models/user_interest_request.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # An interest tag to set on a user with its ranking weight + class UserInterestRequest < GetStream::BaseModel + + # Model attributes + # @!attribute tag + # @return [String] The interest tag; trimmed and lower-cased like activity interest_tags + attr_accessor :tag + # @!attribute weight + # @return [Float] Ranking weight between -1.0 (dislike) and 1.0 (like). Defaults to 1.0 + attr_accessor :weight + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @tag = attributes[:tag] || attributes['tag'] + @weight = attributes[:weight] || attributes['weight'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + tag: 'tag', + weight: 'weight' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/user_reaction_count_rule_parameters.rb b/lib/getstream_ruby/generated/models/user_reaction_count_rule_parameters.rb index 99789a25..7886f5de 100644 --- a/lib/getstream_ruby/generated/models/user_reaction_count_rule_parameters.rb +++ b/lib/getstream_ruby/generated/models/user_reaction_count_rule_parameters.rb @@ -9,6 +9,9 @@ module Models class UserReactionCountRuleParameters < GetStream::BaseModel # Model attributes + # @!attribute count + # @return [String] + attr_accessor :count # @!attribute threshold # @return [Integer] attr_accessor :threshold @@ -19,6 +22,7 @@ class UserReactionCountRuleParameters < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @count = attributes[:count] || attributes['count'] || nil @threshold = attributes[:threshold] || attributes['threshold'] || nil @time_window = attributes[:time_window] || attributes['time_window'] || nil end @@ -26,6 +30,7 @@ def initialize(attributes = {}) # Override field mappings for JSON serialization def self.json_field_mappings { + count: 'count', threshold: 'threshold', time_window: 'time_window' } diff --git a/lib/getstream_ruby/generated/models/user_request.rb b/lib/getstream_ruby/generated/models/user_request.rb index 957ac659..a0294833 100644 --- a/lib/getstream_ruby/generated/models/user_request.rb +++ b/lib/getstream_ruby/generated/models/user_request.rb @@ -34,7 +34,7 @@ class UserRequest < GetStream::BaseModel # @return [Object] Custom user data attr_accessor :custom # @!attribute privacy_settings - # @return [PrivacySettingsResponse] + # @return [PrivacySettingsResponse] The privacy settings of the user. attr_accessor :privacy_settings # @!attribute teams_role # @return [Hash] Map of team-specific roles for the user diff --git a/lib/getstream_ruby/generated/models/user_response.rb b/lib/getstream_ruby/generated/models/user_response.rb index ec2f99e8..a99e78df 100644 --- a/lib/getstream_ruby/generated/models/user_response.rb +++ b/lib/getstream_ruby/generated/models/user_response.rb @@ -76,7 +76,7 @@ class UserResponse < GetStream::BaseModel # @return [Array] List of devices user is using attr_accessor :devices # @!attribute privacy_settings - # @return [PrivacySettingsResponse] + # @return [PrivacySettingsResponse] The privacy settings of the user. attr_accessor :privacy_settings # @!attribute push_notifications # @return [PushNotificationSettingsResponse] diff --git a/lib/getstream_ruby/generated/models/user_response_privacy_fields.rb b/lib/getstream_ruby/generated/models/user_response_privacy_fields.rb index 0ec63cac..1e2033d2 100644 --- a/lib/getstream_ruby/generated/models/user_response_privacy_fields.rb +++ b/lib/getstream_ruby/generated/models/user_response_privacy_fields.rb @@ -64,7 +64,7 @@ class UserResponsePrivacyFields < GetStream::BaseModel # @return [DateTime] attr_accessor :revoke_tokens_issued_before # @!attribute privacy_settings - # @return [PrivacySettingsResponse] + # @return [PrivacySettingsResponse] The privacy settings of the user. attr_accessor :privacy_settings # @!attribute teams_role # @return [Hash] diff --git a/lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb b/lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb index 18825c2d..e563fdb1 100644 --- a/lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb +++ b/lib/getstream_ruby/generated/models/wrapped_unread_counts_response.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # Basic response information + # The total unread information from the current user. class WrappedUnreadCountsResponse < GetStream::BaseModel # Model attributes @@ -13,22 +13,22 @@ class WrappedUnreadCountsResponse < GetStream::BaseModel # @return [String] Duration of the request in milliseconds attr_accessor :duration # @!attribute total_unread_count - # @return [Integer] + # @return [Integer] The total number of unread messages. attr_accessor :total_unread_count # @!attribute total_unread_threads_count - # @return [Integer] + # @return [Integer] The total number of unread threads. attr_accessor :total_unread_threads_count # @!attribute channel_type - # @return [Array] + # @return [Array] The unread information per channel type. attr_accessor :channel_type # @!attribute channels - # @return [Array] + # @return [Array] The unread information per channel. attr_accessor :channels # @!attribute threads - # @return [Array] + # @return [Array] The unread information per thread. attr_accessor :threads # @!attribute total_unread_count_by_team - # @return [Hash] + # @return [Hash] The total number of unread messages grouped by team. attr_accessor :total_unread_count_by_team # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/ws_event.rb b/lib/getstream_ruby/generated/models/ws_event.rb index 90db6960..0f7c8ebf 100644 --- a/lib/getstream_ruby/generated/models/ws_event.rb +++ b/lib/getstream_ruby/generated/models/ws_event.rb @@ -55,7 +55,7 @@ class WSEvent < GetStream::BaseModel # @return [Integer] attr_accessor :watcher_count # @!attribute automoderation_scores - # @return [ModerationResponse] + # @return [ModerationResponse] Response from AI moderation attr_accessor :automoderation_scores # @!attribute channel # @return [ChannelResponse] Represents channel in chat diff --git a/lib/getstream_ruby/generated/video_client.rb b/lib/getstream_ruby/generated/video_client.rb index f30bcfa4..6caacb49 100644 --- a/lib/getstream_ruby/generated/video_client.rb +++ b/lib/getstream_ruby/generated/video_client.rb @@ -64,6 +64,23 @@ def query_call_members(query_call_members_request) ) end + # Returns a call's ring attempts, newest first. A session can be rung more than once, and the session-level accepted_by / rejected_by / missed_by maps flatten every ring together; an attempt says which ring a user acted on, which devices it reached, and who settled it and why. Pass call_session_id to limit the read to one session. + # + # @param query_call_ring_attempts_request [QueryCallRingAttemptsRequest] + # @return [Models::QueryCallRingAttemptsResponse] + def query_call_ring_attempts(query_call_ring_attempts_request) + path = '/api/v2/video/call/ring_attempts' + # Build request body + body = query_call_ring_attempts_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # # # @param query_call_stats_request [QueryCallStatsRequest] diff --git a/lib/getstream_ruby/generated/webhook.rb b/lib/getstream_ruby/generated/webhook.rb index 94927d49..ca0e23f5 100644 --- a/lib/getstream_ruby/generated/webhook.rb +++ b/lib/getstream_ruby/generated/webhook.rb @@ -23,9 +23,12 @@ require_relative 'models/async_bulk_image_moderation_event' require_relative 'models/async_export_channels_event' require_relative 'models/async_export_error_event' +require_relative 'models/async_export_label_results_event' require_relative 'models/async_export_moderation_logs_event' require_relative 'models/async_export_review_queue_event' require_relative 'models/async_export_users_event' +require_relative 'models/async_import_error_event' +require_relative 'models/async_import_success_event' require_relative 'models/blocked_user_event' require_relative 'models/bookmark_added_event' require_relative 'models/bookmark_deleted_event' @@ -63,6 +66,7 @@ require_relative 'models/call_recording_stopped_event' require_relative 'models/call_rejected_event' require_relative 'models/call_ring_event' +require_relative 'models/call_ring_settled_event' require_relative 'models/call_rtmp_broadcast_failed_event' require_relative 'models/call_rtmp_broadcast_started_event' require_relative 'models/call_rtmp_broadcast_stopped_event' @@ -96,6 +100,7 @@ require_relative 'models/closed_caption_event' require_relative 'models/comment_added_event' require_relative 'models/comment_deleted_event' +require_relative 'models/comment_feedback_event' require_relative 'models/comment_reaction_added_event' require_relative 'models/comment_reaction_deleted_event' require_relative 'models/comment_reaction_updated_event' @@ -144,6 +149,12 @@ require_relative 'models/notification_thread_message_new_event' require_relative 'models/pending_message_event' require_relative 'models/permission_request_event' +require_relative 'models/poll_closed_event' +require_relative 'models/poll_deleted_event' +require_relative 'models/poll_updated_event' +require_relative 'models/poll_vote_casted_event' +require_relative 'models/poll_vote_changed_event' +require_relative 'models/poll_vote_removed_event' require_relative 'models/reaction_deleted_event' require_relative 'models/reaction_new_event' require_relative 'models/reaction_updated_event' @@ -153,6 +164,8 @@ require_relative 'models/reminder_updated_event' require_relative 'models/review_queue_item_new_event' require_relative 'models/review_queue_item_updated_event' +require_relative 'models/scheduled_message_failed_event' +require_relative 'models/scheduled_message_sent_event' require_relative 'models/stories_feed_updated_event' require_relative 'models/thread_updated_event' require_relative 'models/unblocked_user_event' @@ -258,6 +271,7 @@ def initialize(type:, created_at: nil, raw: {}) EVENT_TYPE_CALL_RECORDING_STOPPED = 'call.recording_stopped' EVENT_TYPE_CALL_REJECTED = 'call.rejected' EVENT_TYPE_CALL_RING = 'call.ring' + EVENT_TYPE_CALL_RING_SETTLED = 'call.ring_settled' EVENT_TYPE_CALL_RTMP_BROADCAST_FAILED = 'call.rtmp_broadcast_failed' EVENT_TYPE_CALL_RTMP_BROADCAST_STARTED = 'call.rtmp_broadcast_started' EVENT_TYPE_CALL_RTMP_BROADCAST_STOPPED = 'call.rtmp_broadcast_stopped' @@ -295,6 +309,8 @@ def initialize(type:, created_at: nil, raw: {}) EVENT_TYPE_EXPORT_BULK_IMAGE_MODERATION_SUCCESS = 'export.bulk_image_moderation.success' EVENT_TYPE_EXPORT_CHANNELS_ERROR = 'export.channels.error' EVENT_TYPE_EXPORT_CHANNELS_SUCCESS = 'export.channels.success' + EVENT_TYPE_EXPORT_LABEL_RESULTS_ERROR = 'export.label_results.error' + EVENT_TYPE_EXPORT_LABEL_RESULTS_SUCCESS = 'export.label_results.success' EVENT_TYPE_EXPORT_MODERATION_LOGS_ERROR = 'export.moderation_logs.error' EVENT_TYPE_EXPORT_MODERATION_LOGS_SUCCESS = 'export.moderation_logs.success' EVENT_TYPE_EXPORT_REVIEW_QUEUE_ERROR = 'export.review_queue.error' @@ -320,6 +336,7 @@ def initialize(type:, created_at: nil, raw: {}) EVENT_TYPE_FEEDS_BOOKMARK_FOLDER_UPDATED = 'feeds.bookmark_folder.updated' EVENT_TYPE_FEEDS_COMMENT_ADDED = 'feeds.comment.added' EVENT_TYPE_FEEDS_COMMENT_DELETED = 'feeds.comment.deleted' + EVENT_TYPE_FEEDS_COMMENT_FEEDBACK = 'feeds.comment.feedback' EVENT_TYPE_FEEDS_COMMENT_REACTION_ADDED = 'feeds.comment.reaction.added' EVENT_TYPE_FEEDS_COMMENT_REACTION_DELETED = 'feeds.comment.reaction.deleted' EVENT_TYPE_FEEDS_COMMENT_REACTION_UPDATED = 'feeds.comment.reaction.updated' @@ -340,6 +357,8 @@ def initialize(type:, created_at: nil, raw: {}) EVENT_TYPE_FEEDS_NOTIFICATION_FEED_UPDATED = 'feeds.notification_feed.updated' EVENT_TYPE_FEEDS_STORIES_FEED_UPDATED = 'feeds.stories_feed.updated' EVENT_TYPE_FLAG_UPDATED = 'flag.updated' + EVENT_TYPE_IMPORT_ERROR = 'import.error' + EVENT_TYPE_IMPORT_SUCCESS = 'import.success' EVENT_TYPE_INGRESS_ERROR = 'ingress.error' EVENT_TYPE_INGRESS_STARTED = 'ingress.started' EVENT_TYPE_INGRESS_STOPPED = 'ingress.stopped' @@ -365,6 +384,12 @@ def initialize(type:, created_at: nil, raw: {}) EVENT_TYPE_NOTIFICATION_MARK_UNREAD = 'notification.mark_unread' EVENT_TYPE_NOTIFICATION_REMINDER_DUE = 'notification.reminder_due' EVENT_TYPE_NOTIFICATION_THREAD_MESSAGE_NEW = 'notification.thread_message_new' + EVENT_TYPE_POLL_CLOSED = 'poll.closed' + EVENT_TYPE_POLL_DELETED = 'poll.deleted' + EVENT_TYPE_POLL_UPDATED = 'poll.updated' + EVENT_TYPE_POLL_VOTE_CASTED = 'poll.vote_casted' + EVENT_TYPE_POLL_VOTE_CHANGED = 'poll.vote_changed' + EVENT_TYPE_POLL_VOTE_REMOVED = 'poll.vote_removed' EVENT_TYPE_REACTION_DELETED = 'reaction.deleted' EVENT_TYPE_REACTION_NEW = 'reaction.new' EVENT_TYPE_REACTION_UPDATED = 'reaction.updated' @@ -373,6 +398,8 @@ def initialize(type:, created_at: nil, raw: {}) EVENT_TYPE_REMINDER_UPDATED = 'reminder.updated' EVENT_TYPE_REVIEW_QUEUE_ITEM_NEW = 'review_queue_item.new' EVENT_TYPE_REVIEW_QUEUE_ITEM_UPDATED = 'review_queue_item.updated' + EVENT_TYPE_SCHEDULED_MESSAGE_FAILED = 'scheduled_message.failed' + EVENT_TYPE_SCHEDULED_MESSAGE_SENT = 'scheduled_message.sent' EVENT_TYPE_THREAD_UPDATED = 'thread.updated' EVENT_TYPE_USER_BANNED = 'user.banned' EVENT_TYPE_USER_DEACTIVATED = 'user.deactivated' @@ -518,6 +545,8 @@ def self.parse_webhook_event(raw_event) GetStream::Generated::Models::CallRejectedEvent when 'call.ring' GetStream::Generated::Models::CallRingEvent + when 'call.ring_settled' + GetStream::Generated::Models::CallRingSettledEvent when 'call.rtmp_broadcast_failed' GetStream::Generated::Models::CallRtmpBroadcastFailedEvent when 'call.rtmp_broadcast_started' @@ -592,6 +621,10 @@ def self.parse_webhook_event(raw_event) GetStream::Generated::Models::AsyncExportErrorEvent when 'export.channels.success' GetStream::Generated::Models::AsyncExportChannelsEvent + when 'export.label_results.error' + GetStream::Generated::Models::AsyncExportErrorEvent + when 'export.label_results.success' + GetStream::Generated::Models::AsyncExportLabelResultsEvent when 'export.moderation_logs.error' GetStream::Generated::Models::AsyncExportErrorEvent when 'export.moderation_logs.success' @@ -642,6 +675,8 @@ def self.parse_webhook_event(raw_event) GetStream::Generated::Models::CommentAddedEvent when 'feeds.comment.deleted' GetStream::Generated::Models::CommentDeletedEvent + when 'feeds.comment.feedback' + GetStream::Generated::Models::CommentFeedbackEvent when 'feeds.comment.reaction.added' GetStream::Generated::Models::CommentReactionAddedEvent when 'feeds.comment.reaction.deleted' @@ -682,6 +717,10 @@ def self.parse_webhook_event(raw_event) GetStream::Generated::Models::StoriesFeedUpdatedEvent when 'flag.updated' GetStream::Generated::Models::FlagUpdatedEvent + when 'import.error' + GetStream::Generated::Models::AsyncImportErrorEvent + when 'import.success' + GetStream::Generated::Models::AsyncImportSuccessEvent when 'ingress.error' GetStream::Generated::Models::IngressErrorEvent when 'ingress.started' @@ -732,6 +771,18 @@ def self.parse_webhook_event(raw_event) GetStream::Generated::Models::ReminderNotificationEvent when 'notification.thread_message_new' GetStream::Generated::Models::NotificationThreadMessageNewEvent + when 'poll.closed' + GetStream::Generated::Models::PollClosedEvent + when 'poll.deleted' + GetStream::Generated::Models::PollDeletedEvent + when 'poll.updated' + GetStream::Generated::Models::PollUpdatedEvent + when 'poll.vote_casted' + GetStream::Generated::Models::PollVoteCastedEvent + when 'poll.vote_changed' + GetStream::Generated::Models::PollVoteChangedEvent + when 'poll.vote_removed' + GetStream::Generated::Models::PollVoteRemovedEvent when 'reaction.deleted' GetStream::Generated::Models::ReactionDeletedEvent when 'reaction.new' @@ -748,6 +799,10 @@ def self.parse_webhook_event(raw_event) GetStream::Generated::Models::ReviewQueueItemNewEvent when 'review_queue_item.updated' GetStream::Generated::Models::ReviewQueueItemUpdatedEvent + when 'scheduled_message.failed' + GetStream::Generated::Models::ScheduledMessageFailedEvent + when 'scheduled_message.sent' + GetStream::Generated::Models::ScheduledMessageSentEvent when 'thread.updated' GetStream::Generated::Models::ThreadUpdatedEvent when 'user.banned' diff --git a/lib/getstream_ruby/multipart_request.rb b/lib/getstream_ruby/multipart_request.rb new file mode 100644 index 00000000..6a65ef1f --- /dev/null +++ b/lib/getstream_ruby/multipart_request.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module GetStream + + # Marker the generator includes in the request model of every + # multipart/form-data operation (chat CHA-5084). The transport still picks + # multipart from its own list in Client#multipart_request?; this module only + # has to exist for the generated models to load. + module MultipartRequest; end + +end diff --git a/spec/integration/chat_scheduled_message_integration_spec.rb b/spec/integration/chat_scheduled_message_integration_spec.rb new file mode 100644 index 00000000..1f2cf6b1 --- /dev/null +++ b/spec/integration/chat_scheduled_message_integration_spec.rb @@ -0,0 +1,107 @@ +# frozen_string_literal: true + +require 'rspec' +require 'securerandom' +require 'json' +require_relative 'chat_test_helpers' + +RSpec.describe 'Chat Scheduled Message Integration', type: :integration do + + include ChatTestHelpers + + before(:all) do + + init_chat_client + @shared_user_ids, _resp = create_test_users(1) + @user_id = @shared_user_ids[0] + @channel_type, @channel_id, _resp = create_test_channel_with_members(@user_id, [@user_id]) + @cid = "#{@channel_type}:#{@channel_id}" + + end + + after(:all) do + + cleanup_chat_resources + + end + + # Error code the API returns when scheduled messages are off for the app. + def scheduled_messages_disabled_code + 114 + end + + def in_one_hour + (Time.now + 3600).utc.strftime('%Y-%m-%dT%H:%M:%S.%3NZ') + end + + # Schedules a message, or skips the example when the app cannot: the feature + # is opt-in per app, and backends without it ignore scheduled_at and send the + # message right away. + def schedule_message(text) + resp = @client.chat.send_message( + @channel_type, @channel_id, + GetStream::Generated::Models::SendMessageRequest.new( + message: GetStream::Generated::Models::MessageRequest.new(text: text, user_id: @user_id), + scheduled_at: in_one_hour, + ) + ) + skip('Backend does not support scheduled messages') if resp.scheduled_message.nil? + resp.scheduled_message + rescue GetStreamRuby::ApiError => e + skip('Scheduled messages not enabled for this app') if e.code == scheduled_messages_disabled_code + raise + end + + def query_scheduled_messages + @client.chat.query_scheduled_messages( + GetStream::Generated::Models::QueryScheduledMessagesRequest.new( + user_id: @user_id, + filter: GetStream::Generated::Models::ScheduledMessagesFilter.new(cid: @cid), + ), + ).scheduled_messages + end + + describe 'ScheduledMessages' do + + it 'schedules, queries, updates and sends a message now' do + + scheduled = schedule_message('Scheduled from Ruby SDK') + expect(scheduled.status).to eq('scheduled') + expect(scheduled.cid).to eq(@cid) + + found = query_scheduled_messages.find { |m| m.id == scheduled.id } + expect(found).not_to be_nil + expect(found.message.text).to eq('Scheduled from Ruby SDK') + + update_resp = @client.chat.update_scheduled_message( + scheduled.id, + GetStream::Generated::Models::UpdateScheduledMessageRequest.new( + scheduled_at: in_one_hour, + message: GetStream::Generated::Models::MessageRequest.new(text: 'Rescheduled from Ruby SDK'), + ), + ) + expect(update_resp.scheduled_message.message.text).to eq('Rescheduled from Ruby SDK') + + send_now_resp = @client.chat.send_scheduled_message_now( + scheduled.id, + GetStream::Generated::Models::SendScheduledMessageNowRequest.new, + ) + expect(send_now_resp.scheduled_message.id).to eq(scheduled.id) + + end + + it 'deletes a scheduled message' do + + scheduled = schedule_message('Deleted before sending') + + delete_resp = @client.chat.delete_scheduled_message(scheduled.id) + expect(delete_resp.scheduled_message.id).to eq(scheduled.id) + expect(delete_resp.scheduled_message.status).to eq('canceled') + + expect(query_scheduled_messages.map(&:id)).not_to include(scheduled.id) + + end + + end + +end diff --git a/spec/webhook_spec.rb b/spec/webhook_spec.rb index 2271c9e9..97d8e44f 100644 --- a/spec/webhook_spec.rb +++ b/spec/webhook_spec.rb @@ -373,6 +373,13 @@ def compute_signature(body, secret) end + it 'parses call.ring_settled' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"call.ring_settled"}') + expect(event.class.name).to eq('GetStream::Generated::Models::CallRingSettledEvent') + + end + it 'parses call.rtmp_broadcast_failed' do event = StreamChat::Webhook.parse_webhook_event('{"type":"call.rtmp_broadcast_failed"}') @@ -632,6 +639,20 @@ def compute_signature(body, secret) end + it 'parses export.label_results.error' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"export.label_results.error"}') + expect(event.class.name).to eq('GetStream::Generated::Models::AsyncExportErrorEvent') + + end + + it 'parses export.label_results.success' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"export.label_results.success"}') + expect(event.class.name).to eq('GetStream::Generated::Models::AsyncExportLabelResultsEvent') + + end + it 'parses export.moderation_logs.error' do event = StreamChat::Webhook.parse_webhook_event('{"type":"export.moderation_logs.error"}') @@ -807,6 +828,13 @@ def compute_signature(body, secret) end + it 'parses feeds.comment.feedback' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"feeds.comment.feedback"}') + expect(event.class.name).to eq('GetStream::Generated::Models::CommentFeedbackEvent') + + end + it 'parses feeds.comment.reaction.added' do event = StreamChat::Webhook.parse_webhook_event('{"type":"feeds.comment.reaction.added"}') @@ -947,6 +975,20 @@ def compute_signature(body, secret) end + it 'parses import.error' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"import.error"}') + expect(event.class.name).to eq('GetStream::Generated::Models::AsyncImportErrorEvent') + + end + + it 'parses import.success' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"import.success"}') + expect(event.class.name).to eq('GetStream::Generated::Models::AsyncImportSuccessEvent') + + end + it 'parses ingress.error' do event = StreamChat::Webhook.parse_webhook_event('{"type":"ingress.error"}') @@ -1122,6 +1164,48 @@ def compute_signature(body, secret) end + it 'parses poll.closed' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"poll.closed"}') + expect(event.class.name).to eq('GetStream::Generated::Models::PollClosedEvent') + + end + + it 'parses poll.deleted' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"poll.deleted"}') + expect(event.class.name).to eq('GetStream::Generated::Models::PollDeletedEvent') + + end + + it 'parses poll.updated' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"poll.updated"}') + expect(event.class.name).to eq('GetStream::Generated::Models::PollUpdatedEvent') + + end + + it 'parses poll.vote_casted' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"poll.vote_casted"}') + expect(event.class.name).to eq('GetStream::Generated::Models::PollVoteCastedEvent') + + end + + it 'parses poll.vote_changed' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"poll.vote_changed"}') + expect(event.class.name).to eq('GetStream::Generated::Models::PollVoteChangedEvent') + + end + + it 'parses poll.vote_removed' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"poll.vote_removed"}') + expect(event.class.name).to eq('GetStream::Generated::Models::PollVoteRemovedEvent') + + end + it 'parses reaction.deleted' do event = StreamChat::Webhook.parse_webhook_event('{"type":"reaction.deleted"}') @@ -1178,6 +1262,20 @@ def compute_signature(body, secret) end + it 'parses scheduled_message.failed' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"scheduled_message.failed"}') + expect(event.class.name).to eq('GetStream::Generated::Models::ScheduledMessageFailedEvent') + + end + + it 'parses scheduled_message.sent' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"scheduled_message.sent"}') + expect(event.class.name).to eq('GetStream::Generated::Models::ScheduledMessageSentEvent') + + end + it 'parses thread.updated' do event = StreamChat::Webhook.parse_webhook_event('{"type":"thread.updated"}') From 4afa75da7019be9611a31816bccb96cce985c5c0 Mon Sep 17 00:00:00 2001 From: nijeeshjoshy Date: Thu, 15 Oct 2026 11:32:30 +0200 Subject: [PATCH 2/2] chore: regenerate from protocol openapi-v239.72.0 Co-Authored-By: Claude Opus 5.5 --- .../generated/models/scheduled_message_response.rb | 2 +- .../generated/models/scheduled_messages_filter.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/getstream_ruby/generated/models/scheduled_message_response.rb b/lib/getstream_ruby/generated/models/scheduled_message_response.rb index bb15ddf5..937ae77c 100644 --- a/lib/getstream_ruby/generated/models/scheduled_message_response.rb +++ b/lib/getstream_ruby/generated/models/scheduled_message_response.rb @@ -22,7 +22,7 @@ class ScheduledMessageResponse < GetStream::BaseModel # @return [DateTime] Date/time the message is scheduled to be sent attr_accessor :scheduled_at # @!attribute status - # @return [String] Status of the scheduled message. One of: scheduled, sending, failed, canceled, sent + # @return [String] Status of the scheduled message. One of: scheduled, sending, failed, canceled, sent. A message is sending from its first send attempt until it is sent or fails, including while it waits to retry a failed attempt; it cannot be edited, canceled or sent now while sending attr_accessor :status # @!attribute updated_at # @return [DateTime] Date/time of the last update diff --git a/lib/getstream_ruby/generated/models/scheduled_messages_filter.rb b/lib/getstream_ruby/generated/models/scheduled_messages_filter.rb index 357085c7..2d191b0e 100644 --- a/lib/getstream_ruby/generated/models/scheduled_messages_filter.rb +++ b/lib/getstream_ruby/generated/models/scheduled_messages_filter.rb @@ -13,7 +13,7 @@ class ScheduledMessagesFilter < GetStream::BaseModel # @return [String] Only scheduled messages of this channel attr_accessor :cid # @!attribute status - # @return [Array] Only these statuses. One or more of: scheduled, sending, failed + # @return [Array] Only these statuses, as reported in each scheduled message's status. One or more of: scheduled, sending, failed attr_accessor :status # Initialize with attributes