Skip to content

Commit eb147d9

Browse files
authored
Merge pull request #38 from GetStream/FEEDS-1138
[FEEDS-1287]update sdk
2 parents 9afa68c + db61013 commit eb147d9

11 files changed

Lines changed: 158 additions & 14 deletions

‎lib/getstream_ruby/generated/feeds_client.rb‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def delete_collections(collection_refs)
501501
)
502502
end
503503

504-
# Read collections with optional filtering by user ID and collection name. By default, users can only read their own collections.
504+
# Read collections by their references. By default, users can only read their own collections.
505505
#
506506
# @param user_id [String]
507507
# @param collection_refs [Array<String>]
@@ -572,6 +572,23 @@ def upsert_collections(upsert_collections_request)
572572
)
573573
end
574574

575+
# Query collections with filter query
576+
#
577+
# @param query_collections_request [QueryCollectionsRequest]
578+
# @return [Models::QueryCollectionsResponse]
579+
def query_collections(query_collections_request)
580+
path = '/api/v2/feeds/collections/query'
581+
# Build request body
582+
body = query_collections_request
583+
584+
# Make the API request
585+
@client.make_request(
586+
:post,
587+
path,
588+
body: body
589+
)
590+
end
591+
575592
# Retrieve a threaded list of comments for a specific object (e.g., activity), with configurable depth, sorting, and pagination
576593
#
577594
# @param object_id [String]

‎lib/getstream_ruby/generated/models/async_export_error_event.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def initialize(attributes = {})
4343
@started_at = attributes[:started_at] || attributes['started_at']
4444
@task_id = attributes[:task_id] || attributes['task_id']
4545
@custom = attributes[:custom] || attributes['custom']
46-
@type = attributes[:type] || attributes['type'] || "export.moderation_logs.error"
46+
@type = attributes[:type] || attributes['type'] || "export.bulk_image_moderation.error"
4747
@received_at = attributes[:received_at] || attributes['received_at'] || nil
4848
end
4949

‎lib/getstream_ruby/generated/models/ban_action_request_payload.rb‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ class BanActionRequestPayload < GetStream::BaseModel
1212
# @!attribute channel_ban_only
1313
# @return [Boolean] Ban only from specific channel
1414
attr_accessor :channel_ban_only
15+
# @!attribute channel_cid
16+
# @return [String]
17+
attr_accessor :channel_cid
1518
# @!attribute delete_messages
1619
# @return [String] Message deletion mode: soft, pruning, or hard
1720
attr_accessor :delete_messages
@@ -35,6 +38,7 @@ class BanActionRequestPayload < GetStream::BaseModel
3538
def initialize(attributes = {})
3639
super(attributes)
3740
@channel_ban_only = attributes[:channel_ban_only] || attributes['channel_ban_only'] || nil
41+
@channel_cid = attributes[:channel_cid] || attributes['channel_cid'] || nil
3842
@delete_messages = attributes[:delete_messages] || attributes['delete_messages'] || nil
3943
@ip_ban = attributes[:ip_ban] || attributes['ip_ban'] || nil
4044
@reason = attributes[:reason] || attributes['reason'] || nil
@@ -47,6 +51,7 @@ def initialize(attributes = {})
4751
def self.json_field_mappings
4852
{
4953
channel_ban_only: 'channel_ban_only',
54+
channel_cid: 'channel_cid',
5055
delete_messages: 'delete_messages',
5156
ip_ban: 'ip_ban',
5257
reason: 'reason',

‎lib/getstream_ruby/generated/models/message_request.rb‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ class MessageRequest < GetStream::BaseModel
6060
# @!attribute attachments
6161
# @return [Array<Attachment>] Array of message attachments
6262
attr_accessor :attachments
63+
# @!attribute mentioned_group_ids
64+
# @return [Array<String>] List of user group IDs to mention. Group members who are also channel members will receive push notifications. Max 10 groups
65+
attr_accessor :mentioned_group_ids
6366
# @!attribute mentioned_roles
6467
# @return [Array<String>]
6568
attr_accessor :mentioned_roles
@@ -99,6 +102,7 @@ def initialize(attributes = {})
99102
@type = attributes[:type] || attributes['type'] || nil
100103
@user_id = attributes[:user_id] || attributes['user_id'] || nil
101104
@attachments = attributes[:attachments] || attributes['attachments'] || nil
105+
@mentioned_group_ids = attributes[:mentioned_group_ids] || attributes['mentioned_group_ids'] || nil
102106
@mentioned_roles = attributes[:mentioned_roles] || attributes['mentioned_roles'] || nil
103107
@mentioned_users = attributes[:mentioned_users] || attributes['mentioned_users'] || nil
104108
@restricted_visibility = attributes[:restricted_visibility] || attributes['restricted_visibility'] || nil
@@ -127,6 +131,7 @@ def self.json_field_mappings
127131
type: 'type',
128132
user_id: 'user_id',
129133
attachments: 'attachments',
134+
mentioned_group_ids: 'mentioned_group_ids',
130135
mentioned_roles: 'mentioned_roles',
131136
mentioned_users: 'mentioned_users',
132137
restricted_visibility: 'restricted_visibility',

‎lib/getstream_ruby/generated/models/message_response.rb‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ class MessageResponse < GetStream::BaseModel
111111
# @!attribute show_in_channel
112112
# @return [Boolean] Whether thread reply should be shown in the channel as well
113113
attr_accessor :show_in_channel
114+
# @!attribute mentioned_group_ids
115+
# @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
116+
attr_accessor :mentioned_group_ids
114117
# @!attribute mentioned_roles
115118
# @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
116119
attr_accessor :mentioned_roles
@@ -188,6 +191,7 @@ def initialize(attributes = {})
188191
@poll_id = attributes[:poll_id] || attributes['poll_id'] || nil
189192
@quoted_message_id = attributes[:quoted_message_id] || attributes['quoted_message_id'] || nil
190193
@show_in_channel = attributes[:show_in_channel] || attributes['show_in_channel'] || nil
194+
@mentioned_group_ids = attributes[:mentioned_group_ids] || attributes['mentioned_group_ids'] || nil
191195
@mentioned_roles = attributes[:mentioned_roles] || attributes['mentioned_roles'] || nil
192196
@thread_participants = attributes[:thread_participants] || attributes['thread_participants'] || nil
193197
@draft = attributes[:draft] || attributes['draft'] || nil
@@ -240,6 +244,7 @@ def self.json_field_mappings
240244
poll_id: 'poll_id',
241245
quoted_message_id: 'quoted_message_id',
242246
show_in_channel: 'show_in_channel',
247+
mentioned_group_ids: 'mentioned_group_ids',
243248
mentioned_roles: 'mentioned_roles',
244249
thread_participants: 'thread_participants',
245250
draft: 'draft',

‎lib/getstream_ruby/generated/models/message_with_channel_response.rb‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ class MessageWithChannelResponse < GetStream::BaseModel
114114
# @!attribute show_in_channel
115115
# @return [Boolean] Whether thread reply should be shown in the channel as well
116116
attr_accessor :show_in_channel
117+
# @!attribute mentioned_group_ids
118+
# @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
119+
attr_accessor :mentioned_group_ids
117120
# @!attribute mentioned_roles
118121
# @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
119122
attr_accessor :mentioned_roles
@@ -192,6 +195,7 @@ def initialize(attributes = {})
192195
@poll_id = attributes[:poll_id] || attributes['poll_id'] || nil
193196
@quoted_message_id = attributes[:quoted_message_id] || attributes['quoted_message_id'] || nil
194197
@show_in_channel = attributes[:show_in_channel] || attributes['show_in_channel'] || nil
198+
@mentioned_group_ids = attributes[:mentioned_group_ids] || attributes['mentioned_group_ids'] || nil
195199
@mentioned_roles = attributes[:mentioned_roles] || attributes['mentioned_roles'] || nil
196200
@thread_participants = attributes[:thread_participants] || attributes['thread_participants'] || nil
197201
@draft = attributes[:draft] || attributes['draft'] || nil
@@ -245,6 +249,7 @@ def self.json_field_mappings
245249
poll_id: 'poll_id',
246250
quoted_message_id: 'quoted_message_id',
247251
show_in_channel: 'show_in_channel',
252+
mentioned_group_ids: 'mentioned_group_ids',
248253
mentioned_roles: 'mentioned_roles',
249254
thread_participants: 'thread_participants',
250255
draft: 'draft',

‎lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class ModerationDashboardPreferences < GetStream::BaseModel
2727
# @!attribute allowed_moderation_action_reasons
2828
# @return [Array<String>]
2929
attr_accessor :allowed_moderation_action_reasons
30+
# @!attribute keyframe_classifications_map
31+
# @return [Hash<String, Hash<String, Boolean>>]
32+
attr_accessor :keyframe_classifications_map
3033
# @!attribute overview_dashboard
3134
# @return [OverviewDashboardConfig]
3235
attr_accessor :overview_dashboard
@@ -40,6 +43,7 @@ def initialize(attributes = {})
4043
@flag_user_on_flagged_content = attributes[:flag_user_on_flagged_content] || attributes['flag_user_on_flagged_content'] || nil
4144
@media_queue_blur_enabled = attributes[:media_queue_blur_enabled] || attributes['media_queue_blur_enabled'] || nil
4245
@allowed_moderation_action_reasons = attributes[:allowed_moderation_action_reasons] || attributes['allowed_moderation_action_reasons'] || nil
46+
@keyframe_classifications_map = attributes[:keyframe_classifications_map] || attributes['keyframe_classifications_map'] || nil
4347
@overview_dashboard = attributes[:overview_dashboard] || attributes['overview_dashboard'] || nil
4448
end
4549

@@ -52,6 +56,7 @@ def self.json_field_mappings
5256
flag_user_on_flagged_content: 'flag_user_on_flagged_content',
5357
media_queue_blur_enabled: 'media_queue_blur_enabled',
5458
allowed_moderation_action_reasons: 'allowed_moderation_action_reasons',
59+
keyframe_classifications_map: 'keyframe_classifications_map',
5560
overview_dashboard: 'overview_dashboard'
5661
}
5762
end
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# frozen_string_literal: true
2+
3+
# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4+
5+
module GetStream
6+
module Generated
7+
module Models
8+
#
9+
class QueryCollectionsRequest < GetStream::BaseModel
10+
11+
# Model attributes
12+
# @!attribute limit
13+
# @return [Integer]
14+
attr_accessor :limit
15+
# @!attribute next
16+
# @return [String]
17+
attr_accessor :next
18+
# @!attribute prev
19+
# @return [String]
20+
attr_accessor :prev
21+
# @!attribute user_id
22+
# @return [String]
23+
attr_accessor :user_id
24+
# @!attribute sort
25+
# @return [Array<SortParamRequest>] Sorting parameters for the query
26+
attr_accessor :sort
27+
# @!attribute filter
28+
# @return [Object] Filters to apply to the query
29+
attr_accessor :filter
30+
# @!attribute user
31+
# @return [UserRequest]
32+
attr_accessor :user
33+
34+
# Initialize with attributes
35+
def initialize(attributes = {})
36+
super(attributes)
37+
@limit = attributes[:limit] || attributes['limit'] || nil
38+
@next = attributes[:next] || attributes['next'] || nil
39+
@prev = attributes[:prev] || attributes['prev'] || nil
40+
@user_id = attributes[:user_id] || attributes['user_id'] || nil
41+
@sort = attributes[:sort] || attributes['sort'] || nil
42+
@filter = attributes[:filter] || attributes['filter'] || nil
43+
@user = attributes[:user] || attributes['user'] || nil
44+
end
45+
46+
# Override field mappings for JSON serialization
47+
def self.json_field_mappings
48+
{
49+
limit: 'limit',
50+
next: 'next',
51+
prev: 'prev',
52+
user_id: 'user_id',
53+
sort: 'sort',
54+
filter: 'filter',
55+
user: 'user'
56+
}
57+
end
58+
end
59+
end
60+
end
61+
end
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# frozen_string_literal: true
2+
3+
# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4+
5+
module GetStream
6+
module Generated
7+
module Models
8+
#
9+
class QueryCollectionsResponse < GetStream::BaseModel
10+
11+
# Model attributes
12+
# @!attribute duration
13+
# @return [String]
14+
attr_accessor :duration
15+
# @!attribute collections
16+
# @return [Array<CollectionResponse>] List of collections matching the query
17+
attr_accessor :collections
18+
# @!attribute next
19+
# @return [String] Cursor for next page
20+
attr_accessor :next
21+
# @!attribute prev
22+
# @return [String] Cursor for previous page
23+
attr_accessor :prev
24+
25+
# Initialize with attributes
26+
def initialize(attributes = {})
27+
super(attributes)
28+
@duration = attributes[:duration] || attributes['duration']
29+
@collections = attributes[:collections] || attributes['collections']
30+
@next = attributes[:next] || attributes['next'] || nil
31+
@prev = attributes[:prev] || attributes['prev'] || nil
32+
end
33+
34+
# Override field mappings for JSON serialization
35+
def self.json_field_mappings
36+
{
37+
duration: 'duration',
38+
collections: 'collections',
39+
next: 'next',
40+
prev: 'prev'
41+
}
42+
end
43+
end
44+
end
45+
end
46+
end

‎lib/getstream_ruby/generated/models/read_collections_response.rb‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,21 @@ class ReadCollectionsResponse < GetStream::BaseModel
1313
# @return [String]
1414
attr_accessor :duration
1515
# @!attribute collections
16-
# @return [Array<CollectionResponse>] List of collections matching the query
16+
# @return [Array<CollectionResponse>] List of collections matching the references
1717
attr_accessor :collections
18-
# @!attribute next
19-
# @return [String] Cursor for next page (when listing without collection_refs)
20-
attr_accessor :next
21-
# @!attribute prev
22-
# @return [String] Cursor for previous page (when listing without collection_refs)
23-
attr_accessor :prev
2418

2519
# Initialize with attributes
2620
def initialize(attributes = {})
2721
super(attributes)
2822
@duration = attributes[:duration] || attributes['duration']
2923
@collections = attributes[:collections] || attributes['collections']
30-
@next = attributes[:next] || attributes['next'] || nil
31-
@prev = attributes[:prev] || attributes['prev'] || nil
3224
end
3325

3426
# Override field mappings for JSON serialization
3527
def self.json_field_mappings
3628
{
3729
duration: 'duration',
38-
collections: 'collections',
39-
next: 'next',
40-
prev: 'prev'
30+
collections: 'collections'
4131
}
4232
end
4333
end

0 commit comments

Comments
 (0)