Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion lib/getstream_ruby/generated/feeds_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>]
Expand Down Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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',
Expand Down
5 changes: 5 additions & 0 deletions lib/getstream_ruby/generated/models/message_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ class MessageRequest < GetStream::BaseModel
# @!attribute attachments
# @return [Array<Attachment>] Array of message attachments
attr_accessor :attachments
# @!attribute mentioned_group_ids
# @return [Array<String>] 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<String>]
attr_accessor :mentioned_roles
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down
5 changes: 5 additions & 0 deletions lib/getstream_ruby/generated/models/message_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>] 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<String>] 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>] 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<String>] 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class ModerationDashboardPreferences < GetStream::BaseModel
# @!attribute allowed_moderation_action_reasons
# @return [Array<String>]
attr_accessor :allowed_moderation_action_reasons
# @!attribute keyframe_classifications_map
# @return [Hash<String, Hash<String, Boolean>>]
attr_accessor :keyframe_classifications_map
# @!attribute overview_dashboard
# @return [OverviewDashboardConfig]
attr_accessor :overview_dashboard
Expand All @@ -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

Expand All @@ -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
Expand Down
61 changes: 61 additions & 0 deletions lib/getstream_ruby/generated/models/query_collections_request.rb
Original file line number Diff line number Diff line change
@@ -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<SortParamRequest>] 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
46 changes: 46 additions & 0 deletions lib/getstream_ruby/generated/models/query_collections_response.rb
Original file line number Diff line number Diff line change
@@ -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<CollectionResponse>] 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
14 changes: 2 additions & 12 deletions lib/getstream_ruby/generated/models/read_collections_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,21 @@ class ReadCollectionsResponse < GetStream::BaseModel
# @return [String]
attr_accessor :duration
# @!attribute collections
# @return [Array<CollectionResponse>] List of collections matching the query
# @return [Array<CollectionResponse>] 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
Expand Down
5 changes: 5 additions & 0 deletions lib/getstream_ruby/generated/models/search_result_message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>]
attr_accessor :mentioned_group_ids
# @!attribute mentioned_roles
# @return [Array<String>]
attr_accessor :mentioned_roles
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down
Loading