diff --git a/lib/getstream_ruby/generated/feeds_client.rb b/lib/getstream_ruby/generated/feeds_client.rb index f7a38511..db2e589f 100644 --- a/lib/getstream_ruby/generated/feeds_client.rb +++ b/lib/getstream_ruby/generated/feeds_client.rb @@ -501,7 +501,7 @@ def delete_collections(collection_refs) ) end - # Read collections with optional filtering by user ID and collection name. By default, users can only read their own collections. + # Read collections by their references. By default, users can only read their own collections. # # @param user_id [String] # @param collection_refs [Array] @@ -572,6 +572,23 @@ def upsert_collections(upsert_collections_request) ) end + # Query collections with filter query + # + # @param query_collections_request [QueryCollectionsRequest] + # @return [Models::QueryCollectionsResponse] + def query_collections(query_collections_request) + path = '/api/v2/feeds/collections/query' + # Build request body + body = query_collections_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # Retrieve a threaded list of comments for a specific object (e.g., activity), with configurable depth, sorting, and pagination # # @param object_id [String] 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 85cf709f..f785b8ce 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.moderation_logs.error" + @type = attributes[:type] || attributes['type'] || "export.bulk_image_moderation.error" @received_at = attributes[:received_at] || attributes['received_at'] || nil end diff --git a/lib/getstream_ruby/generated/models/ban_action_request_payload.rb b/lib/getstream_ruby/generated/models/ban_action_request_payload.rb index d36f35b5..08702123 100644 --- a/lib/getstream_ruby/generated/models/ban_action_request_payload.rb +++ b/lib/getstream_ruby/generated/models/ban_action_request_payload.rb @@ -12,6 +12,9 @@ class BanActionRequestPayload < GetStream::BaseModel # @!attribute channel_ban_only # @return [Boolean] Ban only from specific channel attr_accessor :channel_ban_only + # @!attribute channel_cid + # @return [String] + attr_accessor :channel_cid # @!attribute delete_messages # @return [String] Message deletion mode: soft, pruning, or hard attr_accessor :delete_messages @@ -35,6 +38,7 @@ class BanActionRequestPayload < GetStream::BaseModel def initialize(attributes = {}) super(attributes) @channel_ban_only = attributes[:channel_ban_only] || attributes['channel_ban_only'] || nil + @channel_cid = attributes[:channel_cid] || attributes['channel_cid'] || nil @delete_messages = attributes[:delete_messages] || attributes['delete_messages'] || nil @ip_ban = attributes[:ip_ban] || attributes['ip_ban'] || nil @reason = attributes[:reason] || attributes['reason'] || nil @@ -47,6 +51,7 @@ def initialize(attributes = {}) def self.json_field_mappings { channel_ban_only: 'channel_ban_only', + channel_cid: 'channel_cid', delete_messages: 'delete_messages', ip_ban: 'ip_ban', reason: 'reason', diff --git a/lib/getstream_ruby/generated/models/message_request.rb b/lib/getstream_ruby/generated/models/message_request.rb index a17fb05b..cf57c938 100644 --- a/lib/getstream_ruby/generated/models/message_request.rb +++ b/lib/getstream_ruby/generated/models/message_request.rb @@ -60,6 +60,9 @@ class MessageRequest < GetStream::BaseModel # @!attribute attachments # @return [Array] Array of message attachments attr_accessor :attachments + # @!attribute mentioned_group_ids + # @return [Array] List of user group IDs to mention. Group members who are also channel members will receive push notifications. Max 10 groups + attr_accessor :mentioned_group_ids # @!attribute mentioned_roles # @return [Array] attr_accessor :mentioned_roles @@ -99,6 +102,7 @@ def initialize(attributes = {}) @type = attributes[:type] || attributes['type'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || 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 @@ -127,6 +131,7 @@ def self.json_field_mappings type: 'type', user_id: 'user_id', attachments: 'attachments', + mentioned_group_ids: 'mentioned_group_ids', mentioned_roles: 'mentioned_roles', mentioned_users: 'mentioned_users', restricted_visibility: 'restricted_visibility', diff --git a/lib/getstream_ruby/generated/models/message_response.rb b/lib/getstream_ruby/generated/models/message_response.rb index fd34cb47..cc623721 100644 --- a/lib/getstream_ruby/generated/models/message_response.rb +++ b/lib/getstream_ruby/generated/models/message_response.rb @@ -111,6 +111,9 @@ class MessageResponse < GetStream::BaseModel # @!attribute show_in_channel # @return [Boolean] Whether thread reply should be shown in the channel as well attr_accessor :show_in_channel + # @!attribute mentioned_group_ids + # @return [Array] List of user group IDs mentioned in the message. Group members who are also channel members will receive push notifications based on their push preferences. Max 10 groups + attr_accessor :mentioned_group_ids # @!attribute mentioned_roles # @return [Array] List of roles mentioned in the message (e.g. admin, channel_moderator, custom roles). Members with matching roles will receive push notifications based on their push preferences. Max 10 roles attr_accessor :mentioned_roles @@ -188,6 +191,7 @@ def initialize(attributes = {}) @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 + @mentioned_group_ids = attributes[:mentioned_group_ids] || attributes['mentioned_group_ids'] || nil @mentioned_roles = attributes[:mentioned_roles] || attributes['mentioned_roles'] || nil @thread_participants = attributes[:thread_participants] || attributes['thread_participants'] || nil @draft = attributes[:draft] || attributes['draft'] || nil @@ -240,6 +244,7 @@ def self.json_field_mappings poll_id: 'poll_id', quoted_message_id: 'quoted_message_id', show_in_channel: 'show_in_channel', + mentioned_group_ids: 'mentioned_group_ids', mentioned_roles: 'mentioned_roles', thread_participants: 'thread_participants', draft: 'draft', diff --git a/lib/getstream_ruby/generated/models/message_with_channel_response.rb b/lib/getstream_ruby/generated/models/message_with_channel_response.rb index 5400b702..82cd6499 100644 --- a/lib/getstream_ruby/generated/models/message_with_channel_response.rb +++ b/lib/getstream_ruby/generated/models/message_with_channel_response.rb @@ -114,6 +114,9 @@ class MessageWithChannelResponse < GetStream::BaseModel # @!attribute show_in_channel # @return [Boolean] Whether thread reply should be shown in the channel as well attr_accessor :show_in_channel + # @!attribute mentioned_group_ids + # @return [Array] List of user group IDs mentioned in the message. Group members who are also channel members will receive push notifications based on their push preferences. Max 10 groups + attr_accessor :mentioned_group_ids # @!attribute mentioned_roles # @return [Array] List of roles mentioned in the message (e.g. admin, channel_moderator, custom roles). Members with matching roles will receive push notifications based on their push preferences. Max 10 roles attr_accessor :mentioned_roles @@ -192,6 +195,7 @@ def initialize(attributes = {}) @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 + @mentioned_group_ids = attributes[:mentioned_group_ids] || attributes['mentioned_group_ids'] || nil @mentioned_roles = attributes[:mentioned_roles] || attributes['mentioned_roles'] || nil @thread_participants = attributes[:thread_participants] || attributes['thread_participants'] || nil @draft = attributes[:draft] || attributes['draft'] || nil @@ -245,6 +249,7 @@ def self.json_field_mappings poll_id: 'poll_id', quoted_message_id: 'quoted_message_id', show_in_channel: 'show_in_channel', + mentioned_group_ids: 'mentioned_group_ids', mentioned_roles: 'mentioned_roles', thread_participants: 'thread_participants', draft: 'draft', diff --git a/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb b/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb index e5e6305c..170f2213 100644 --- a/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb +++ b/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb @@ -27,6 +27,9 @@ class ModerationDashboardPreferences < GetStream::BaseModel # @!attribute allowed_moderation_action_reasons # @return [Array] attr_accessor :allowed_moderation_action_reasons + # @!attribute keyframe_classifications_map + # @return [Hash>] + attr_accessor :keyframe_classifications_map # @!attribute overview_dashboard # @return [OverviewDashboardConfig] attr_accessor :overview_dashboard @@ -40,6 +43,7 @@ def initialize(attributes = {}) @flag_user_on_flagged_content = attributes[:flag_user_on_flagged_content] || attributes['flag_user_on_flagged_content'] || nil @media_queue_blur_enabled = attributes[:media_queue_blur_enabled] || attributes['media_queue_blur_enabled'] || nil @allowed_moderation_action_reasons = attributes[:allowed_moderation_action_reasons] || attributes['allowed_moderation_action_reasons'] || nil + @keyframe_classifications_map = attributes[:keyframe_classifications_map] || attributes['keyframe_classifications_map'] || nil @overview_dashboard = attributes[:overview_dashboard] || attributes['overview_dashboard'] || nil end @@ -52,6 +56,7 @@ def self.json_field_mappings flag_user_on_flagged_content: 'flag_user_on_flagged_content', media_queue_blur_enabled: 'media_queue_blur_enabled', allowed_moderation_action_reasons: 'allowed_moderation_action_reasons', + keyframe_classifications_map: 'keyframe_classifications_map', overview_dashboard: 'overview_dashboard' } end diff --git a/lib/getstream_ruby/generated/models/query_collections_request.rb b/lib/getstream_ruby/generated/models/query_collections_request.rb new file mode 100644 index 00000000..bae76196 --- /dev/null +++ b/lib/getstream_ruby/generated/models/query_collections_request.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 + # + class QueryCollectionsRequest < 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 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] + attr_accessor :user + + # 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 + @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', + prev: 'prev', + user_id: 'user_id', + sort: 'sort', + filter: 'filter', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/query_collections_response.rb b/lib/getstream_ruby/generated/models/query_collections_response.rb new file mode 100644 index 00000000..57cb59fc --- /dev/null +++ b/lib/getstream_ruby/generated/models/query_collections_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 QueryCollectionsResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] + attr_accessor :duration + # @!attribute collections + # @return [Array] List of collections matching the query + attr_accessor :collections + # @!attribute next + # @return [String] Cursor for next page + attr_accessor :next + # @!attribute prev + # @return [String] Cursor for previous page + attr_accessor :prev + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @collections = attributes[:collections] || attributes['collections'] + @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', + collections: 'collections', + next: 'next', + prev: 'prev' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/read_collections_response.rb b/lib/getstream_ruby/generated/models/read_collections_response.rb index 89f1b129..30ea6132 100644 --- a/lib/getstream_ruby/generated/models/read_collections_response.rb +++ b/lib/getstream_ruby/generated/models/read_collections_response.rb @@ -13,31 +13,21 @@ class ReadCollectionsResponse < GetStream::BaseModel # @return [String] attr_accessor :duration # @!attribute collections - # @return [Array] List of collections matching the query + # @return [Array] List of collections matching the references attr_accessor :collections - # @!attribute next - # @return [String] Cursor for next page (when listing without collection_refs) - attr_accessor :next - # @!attribute prev - # @return [String] Cursor for previous page (when listing without collection_refs) - attr_accessor :prev # Initialize with attributes def initialize(attributes = {}) super(attributes) @duration = attributes[:duration] || attributes['duration'] @collections = attributes[:collections] || attributes['collections'] - @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', - collections: 'collections', - next: 'next', - prev: 'prev' + collections: 'collections' } end end diff --git a/lib/getstream_ruby/generated/models/search_result_message.rb b/lib/getstream_ruby/generated/models/search_result_message.rb index c54004ca..f3e1317e 100644 --- a/lib/getstream_ruby/generated/models/search_result_message.rb +++ b/lib/getstream_ruby/generated/models/search_result_message.rb @@ -111,6 +111,9 @@ class SearchResultMessage < GetStream::BaseModel # @!attribute show_in_channel # @return [Boolean] attr_accessor :show_in_channel + # @!attribute mentioned_group_ids + # @return [Array] + attr_accessor :mentioned_group_ids # @!attribute mentioned_roles # @return [Array] attr_accessor :mentioned_roles @@ -191,6 +194,7 @@ def initialize(attributes = {}) @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 + @mentioned_group_ids = attributes[:mentioned_group_ids] || attributes['mentioned_group_ids'] || nil @mentioned_roles = attributes[:mentioned_roles] || attributes['mentioned_roles'] || nil @thread_participants = attributes[:thread_participants] || attributes['thread_participants'] || nil @channel = attributes[:channel] || attributes['channel'] || nil @@ -244,6 +248,7 @@ def self.json_field_mappings poll_id: 'poll_id', quoted_message_id: 'quoted_message_id', show_in_channel: 'show_in_channel', + mentioned_group_ids: 'mentioned_group_ids', mentioned_roles: 'mentioned_roles', thread_participants: 'thread_participants', channel: 'channel',