diff --git a/lib/getstream_ruby/generated/chat_client.rb b/lib/getstream_ruby/generated/chat_client.rb index 9a52c4a..bc534c8 100644 --- a/lib/getstream_ruby/generated/chat_client.rb +++ b/lib/getstream_ruby/generated/chat_client.rb @@ -297,6 +297,35 @@ def delete_channel(_type, _id, hard_delete = nil) ) end + # Returns a channel by its CID without creating it. Responds with 404 when the channel does not exist, so it doubles as an existence check. Pass state=true to also load messages, read state and watchers. + # + # @param _type [String] + # @param _id [String] + # @param state [Boolean] + # @param messages_limit [Integer] + # @param members_limit [Integer] + # @param watchers_limit [Integer] + # @return [Models::ChannelStateResponse] + def get_channel(_type, _id, state = nil, messages_limit = nil, members_limit = nil, watchers_limit = nil) + path = '/api/v2/chat/channels/{type}/{id}' + # Replace path parameters + path = path.gsub('{type}', _type.to_s) + path = path.gsub('{id}', _id.to_s) + # Build query parameters + query_params = {} + query_params['state'] = state unless state.nil? + query_params['messages_limit'] = messages_limit unless messages_limit.nil? + query_params['members_limit'] = members_limit unless members_limit.nil? + query_params['watchers_limit'] = watchers_limit unless watchers_limit.nil? + + # Make the API request + @client.make_request( + :get, + path, + query_params: query_params + ) + end + # Updates certain fields of the channelSends events:- channel.updated # # @param _type [String] diff --git a/lib/getstream_ruby/generated/feed.rb b/lib/getstream_ruby/generated/feed.rb index dc39cb6..30abf95 100644 --- a/lib/getstream_ruby/generated/feed.rb +++ b/lib/getstream_ruby/generated/feed.rb @@ -32,11 +32,17 @@ def delete_feed(hard_delete = nil, purge_user_activities = nil) # Create a single feed for a given feed group # # @param get_or_create_feed_request [GetOrCreateFeedRequest] + # @param language [String] + # @param translate_text [Boolean] # @return [Models::GetOrCreateFeedResponse] - def get_or_create_feed(get_or_create_feed_request) + def get_or_create_feed(get_or_create_feed_request, language = nil, translate_text = nil) + # Build query parameters + query_params = {} + query_params['language'] = language unless language.nil? + query_params['translate_text'] = translate_text unless translate_text.nil? # Delegate to the FeedsClient - @client.feeds.get_or_create_feed(@feed_group_id, @feed_id, get_or_create_feed_request) + @client.feeds.get_or_create_feed(@feed_group_id, @feed_id, get_or_create_feed_request, query_params) end # Update an existing feed @@ -139,11 +145,17 @@ def reject_feed_member_invite(reject_feed_member_invite_request) # Query pinned activities for a feed with filter query # # @param query_pinned_activities_request [QueryPinnedActivitiesRequest] + # @param language [String] + # @param translate_text [Boolean] # @return [Models::QueryPinnedActivitiesResponse] - def query_pinned_activities(query_pinned_activities_request) + def query_pinned_activities(query_pinned_activities_request, language = nil, translate_text = nil) + # Build query parameters + query_params = {} + query_params['language'] = language unless language.nil? + query_params['translate_text'] = translate_text unless translate_text.nil? # Delegate to the FeedsClient - @client.feeds.query_pinned_activities(@feed_group_id, @feed_id, query_pinned_activities_request) + @client.feeds.query_pinned_activities(@feed_group_id, @feed_id, query_pinned_activities_request, query_params) end end diff --git a/lib/getstream_ruby/generated/feeds_client.rb b/lib/getstream_ruby/generated/feeds_client.rb index 39b0fdf..a6c257e 100644 --- a/lib/getstream_ruby/generated/feeds_client.rb +++ b/lib/getstream_ruby/generated/feeds_client.rb @@ -46,7 +46,7 @@ def upsert_activities(upsert_activities_request) ) end - # Updates certain fields of multiple activities in a batch. Use 'set' to update specific fields and 'unset' to remove fields. Activities that fail due to not found, permission denied, or no changes detected are silently skipped and not included in the response. However, validation errors (e.g., updating reserved fields, invalid field values) will fail the entire batch request.Sends events:- feeds.activity.updated + # Updates certain fields of multiple activities in a batch. Use 'set' to update specific fields and 'unset' to remove fields. Activities that fail due to not found, permission denied, or no changes detected are silently skipped and not included in the response. However, validation errors (e.g., updating reserved fields, invalid field values, exceeding size limits) will fail the entire batch request.Sends events:- feeds.activity.updated # # @param update_activities_partial_batch_request [UpdateActivitiesPartialBatchRequest] # @return [Models::UpdateActivitiesPartialBatchResponse] @@ -100,12 +100,36 @@ def track_activity_metrics(track_activity_metrics_request) # Query activities based on filters with pagination and sorting options # # @param query_activities_request [QueryActivitiesRequest] + # @param language [String] + # @param translate_text [Boolean] # @return [Models::QueryActivitiesResponse] - def query_activities(query_activities_request) + def query_activities(query_activities_request, language = nil, translate_text = nil) path = '/api/v2/feeds/activities/query' + # Build query parameters + query_params = {} + query_params['language'] = language unless language.nil? + query_params['translate_text'] = translate_text unless translate_text.nil? # Build request body body = query_activities_request + # Make the API request + @client.make_request( + :post, + path, + query_params: query_params, + body: body + ) + end + + # Returns a single user's reactions across a set of activity IDs, without activity payloads + # + # @param batch_query_activity_reactions_request [BatchQueryActivityReactionsRequest] + # @return [Models::BatchQueryActivityReactionsResponse] + def batch_query_activity_reactions(batch_query_activity_reactions_request) + path = '/api/v2/feeds/activities/reactions/query' + # Build request body + body = batch_query_activity_reactions_request + # Make the API request @client.make_request( :post, @@ -309,6 +333,31 @@ def delete_activity_reaction(activity_id, _type, delete_notification_activity = ) end + # List the shares recorded for an activity, newest-first + # + # @param activity_id [String] + # @param limit [Integer] + # @param prev [String] + # @param _next [String] + # @return [Models::QueryActivitySharesResponse] + def query_activity_shares(activity_id, limit = nil, prev = nil, _next = nil) + path = '/api/v2/feeds/activities/{activity_id}/shares' + # Replace path parameters + path = path.gsub('{activity_id}', activity_id.to_s) + # Build query parameters + query_params = {} + query_params['limit'] = limit unless limit.nil? + query_params['prev'] = prev unless prev.nil? + query_params['next'] = _next unless _next.nil? + + # Make the API request + @client.make_request( + :get, + path, + query_params: query_params + ) + end + # Delete a single activity by its ID # # @param _id [String] @@ -335,16 +384,20 @@ def delete_activity(_id, hard_delete = nil, delete_notification_activity = nil) # Returns activity by ID # # @param _id [String] + # @param language [String] + # @param translate_text [Boolean] # @param comment_sort [String] # @param comment_limit [Integer] # @param user_id [String] # @return [Models::GetActivityResponse] - def get_activity(_id, comment_sort = nil, comment_limit = nil, user_id = nil) + def get_activity(_id, language = nil, translate_text = nil, comment_sort = nil, comment_limit = nil, user_id = nil) path = '/api/v2/feeds/activities/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Build query parameters query_params = {} + query_params['language'] = language unless language.nil? + query_params['translate_text'] = translate_text unless translate_text.nil? query_params['comment_sort'] = comment_sort unless comment_sort.nil? query_params['comment_limit'] = comment_limit unless comment_limit.nil? query_params['user_id'] = user_id unless user_id.nil? @@ -422,6 +475,26 @@ def restore_activity(_id, restore_activity_request, enrich_own_fields = nil) ) end + # Translates an activity's text to a given language using automated translationSends events:- feeds.activity.updated + # + # @param _id [String] + # @param translate_activity_request [TranslateActivityRequest] + # @return [Models::TranslateActivityResponse] + def translate_activity(_id, translate_activity_request) + path = '/api/v2/feeds/activities/{id}/translate' + # Replace path parameters + path = path.gsub('{id}', _id.to_s) + # Build request body + body = translate_activity_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # Query bookmark folders with filter query # # @param query_bookmark_folders_request [QueryBookmarkFoldersRequest] @@ -478,9 +551,15 @@ def update_bookmark_folder(folder_id, update_bookmark_folder_request) # Query bookmarks with filter query # # @param query_bookmarks_request [QueryBookmarksRequest] + # @param language [String] + # @param translate_text [Boolean] # @return [Models::QueryBookmarksResponse] - def query_bookmarks(query_bookmarks_request) + def query_bookmarks(query_bookmarks_request, language = nil, translate_text = nil) path = '/api/v2/feeds/bookmarks/query' + # Build query parameters + query_params = {} + query_params['language'] = language unless language.nil? + query_params['translate_text'] = translate_text unless translate_text.nil? # Build request body body = query_bookmarks_request @@ -488,6 +567,7 @@ def query_bookmarks(query_bookmarks_request) @client.make_request( :post, path, + query_params: query_params, body: body ) end @@ -606,12 +686,14 @@ def query_collections(query_collections_request) # @param sort [String] # @param replies_limit [Integer] # @param id_around [String] + # @param language [String] + # @param translate_text [Boolean] # @param user_id [String] # @param limit [Integer] # @param prev [String] # @param _next [String] # @return [Models::GetCommentsResponse] - def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, id_around = 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) path = '/api/v2/feeds/comments' # Build query parameters query_params = {} @@ -621,6 +703,8 @@ def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit query_params['sort'] = sort unless sort.nil? query_params['replies_limit'] = replies_limit unless replies_limit.nil? query_params['id_around'] = id_around unless id_around.nil? + query_params['language'] = language unless language.nil? + query_params['translate_text'] = translate_text unless translate_text.nil? query_params['user_id'] = user_id unless user_id.nil? query_params['limit'] = limit unless limit.nil? query_params['prev'] = prev unless prev.nil? @@ -671,12 +755,36 @@ def add_comments_batch(add_comments_batch_request) # Query comments using MongoDB-style filters with pagination and sorting options # # @param query_comments_request [QueryCommentsRequest] + # @param language [String] + # @param translate_text [Boolean] # @return [Models::QueryCommentsResponse] - def query_comments(query_comments_request) + def query_comments(query_comments_request, language = nil, translate_text = nil) path = '/api/v2/feeds/comments/query' + # Build query parameters + query_params = {} + query_params['language'] = language unless language.nil? + query_params['translate_text'] = translate_text unless translate_text.nil? # Build request body body = query_comments_request + # Make the API request + @client.make_request( + :post, + path, + query_params: query_params, + body: body + ) + end + + # Returns a single user's reactions across a set of comment IDs, without comment payloads + # + # @param batch_query_comment_reactions_request [BatchQueryCommentReactionsRequest] + # @return [Models::BatchQueryCommentReactionsResponse] + def batch_query_comment_reactions(batch_query_comment_reactions_request) + path = '/api/v2/feeds/comments/reactions/query' + # Build request body + body = batch_query_comment_reactions_request + # Make the API request @client.make_request( :post, @@ -774,14 +882,18 @@ def delete_comment(_id, hard_delete = nil, delete_notification_activity = nil) # Get a comment by ID # # @param _id [String] + # @param language [String] + # @param translate_text [Boolean] # @param user_id [String] # @return [Models::GetCommentResponse] - def get_comment(_id, user_id = nil) + def get_comment(_id, language = nil, translate_text = nil, user_id = nil) path = '/api/v2/feeds/comments/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Build query parameters query_params = {} + query_params['language'] = language unless language.nil? + query_params['translate_text'] = translate_text unless translate_text.nil? query_params['user_id'] = user_id unless user_id.nil? # Make the API request @@ -904,12 +1016,14 @@ def delete_comment_reaction(_id, _type, delete_notification_activity = nil, user # @param sort [String] # @param replies_limit [Integer] # @param id_around [String] + # @param language [String] + # @param translate_text [Boolean] # @param user_id [String] # @param limit [Integer] # @param prev [String] # @param _next [String] # @return [Models::GetCommentRepliesResponse] - def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, id_around = nil, user_id = nil, limit = nil, prev = nil, _next = nil) + def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, id_around = nil, language = nil, translate_text = nil, user_id = nil, limit = nil, prev = nil, _next = nil) path = '/api/v2/feeds/comments/{id}/replies' # Replace path parameters path = path.gsub('{id}', _id.to_s) @@ -919,6 +1033,8 @@ def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, id_ar query_params['sort'] = sort unless sort.nil? query_params['replies_limit'] = replies_limit unless replies_limit.nil? query_params['id_around'] = id_around unless id_around.nil? + query_params['language'] = language unless language.nil? + query_params['translate_text'] = translate_text unless translate_text.nil? query_params['user_id'] = user_id unless user_id.nil? query_params['limit'] = limit unless limit.nil? query_params['prev'] = prev unless prev.nil? @@ -952,6 +1068,26 @@ def restore_comment(_id, restore_comment_request) ) end + # Translates a comment's text to a given language using automated translationSends events:- feeds.comment.updated + # + # @param _id [String] + # @param translate_comment_request [TranslateCommentRequest] + # @return [Models::TranslateCommentResponse] + def translate_comment(_id, translate_comment_request) + path = '/api/v2/feeds/comments/{id}/translate' + # Replace path parameters + path = path.gsub('{id}', _id.to_s) + # Build request body + body = translate_comment_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # List all feed groups for the application # # @param include_soft_deleted [Boolean] @@ -1017,12 +1153,18 @@ def delete_feed(feed_group_id, feed_id, hard_delete = nil, purge_user_activities # @param feed_group_id [String] # @param feed_id [String] # @param get_or_create_feed_request [GetOrCreateFeedRequest] + # @param language [String] + # @param translate_text [Boolean] # @return [Models::GetOrCreateFeedResponse] - def get_or_create_feed(feed_group_id, feed_id, get_or_create_feed_request) + def get_or_create_feed(feed_group_id, feed_id, get_or_create_feed_request, language = nil, translate_text = nil) path = '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}' # Replace path parameters path = path.gsub('{feed_group_id}', feed_group_id.to_s) path = path.gsub('{feed_id}', feed_id.to_s) + # Build query parameters + query_params = {} + query_params['language'] = language unless language.nil? + query_params['translate_text'] = translate_text unless translate_text.nil? # Build request body body = get_or_create_feed_request @@ -1030,6 +1172,7 @@ def get_or_create_feed(feed_group_id, feed_id, get_or_create_feed_request) @client.make_request( :post, path, + query_params: query_params, body: body ) end @@ -1244,12 +1387,18 @@ def reject_feed_member_invite(feed_group_id, feed_id, reject_feed_member_invite_ # @param feed_group_id [String] # @param feed_id [String] # @param query_pinned_activities_request [QueryPinnedActivitiesRequest] + # @param language [String] + # @param translate_text [Boolean] # @return [Models::QueryPinnedActivitiesResponse] - def query_pinned_activities(feed_group_id, feed_id, query_pinned_activities_request) + def query_pinned_activities(feed_group_id, feed_id, query_pinned_activities_request, language = nil, translate_text = nil) path = '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/pinned_activities/query' # Replace path parameters path = path.gsub('{feed_group_id}', feed_group_id.to_s) path = path.gsub('{feed_id}', feed_id.to_s) + # Build query parameters + query_params = {} + query_params['language'] = language unless language.nil? + query_params['translate_text'] = translate_text unless translate_text.nil? # Build request body body = query_pinned_activities_request @@ -1257,6 +1406,7 @@ def query_pinned_activities(feed_group_id, feed_id, query_pinned_activities_requ @client.make_request( :post, path, + query_params: query_params, body: body ) end diff --git a/lib/getstream_ruby/generated/models/activity_response.rb b/lib/getstream_ruby/generated/models/activity_response.rb index 1e2bb83..532ee12 100644 --- a/lib/getstream_ruby/generated/models/activity_response.rb +++ b/lib/getstream_ruby/generated/models/activity_response.rb @@ -129,9 +129,15 @@ class ActivityResponse < GetStream::BaseModel # @!attribute friend_reactions # @return [Array] Reactions from users the current user follows or has mutual follows with attr_accessor :friend_reactions + # @!attribute latest_shares + # @return [Array] Recent shares of the activity, one entry per share (org-gated) + attr_accessor :latest_shares # @!attribute current_feed # @return [FeedResponse] attr_accessor :current_feed + # @!attribute i18n + # @return [Hash] + attr_accessor :i18n # @!attribute location # @return [Location] attr_accessor :location @@ -197,7 +203,9 @@ def initialize(attributes = {}) @text = attributes[:text] || attributes['text'] || 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 @current_feed = attributes[:current_feed] || attributes['current_feed'] || nil + @i18n = attributes[:i18n] || attributes['i18n'] || nil @location = attributes[:location] || attributes['location'] || nil @metrics = attributes[:metrics] || attributes['metrics'] || nil @moderation = attributes[:moderation] || attributes['moderation'] || nil @@ -250,7 +258,9 @@ def self.json_field_mappings text: 'text', visibility_tag: 'visibility_tag', friend_reactions: 'friend_reactions', + latest_shares: 'latest_shares', current_feed: 'current_feed', + i18n: 'i18n', location: 'location', metrics: 'metrics', moderation: 'moderation', diff --git a/lib/getstream_ruby/generated/models/add_comment_reaction_request.rb b/lib/getstream_ruby/generated/models/add_comment_reaction_request.rb index e3f22d9..888aa8b 100644 --- a/lib/getstream_ruby/generated/models/add_comment_reaction_request.rb +++ b/lib/getstream_ruby/generated/models/add_comment_reaction_request.rb @@ -28,6 +28,9 @@ class AddCommentReactionRequest < GetStream::BaseModel # @!attribute user_id # @return [String] attr_accessor :user_id + # @!attribute target_feeds + # @return [Array] Optional list of feeds to create a reference (share) activity of the commented-on activity in. The reference activity's type mirrors the reaction type. + attr_accessor :target_feeds # @!attribute custom # @return [Object] Optional custom data to add to the reaction attr_accessor :custom @@ -44,6 +47,7 @@ def initialize(attributes = {}) @enforce_unique = attributes[:enforce_unique] || attributes['enforce_unique'] || nil @skip_push = attributes[:skip_push] || attributes['skip_push'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil + @target_feeds = attributes[:target_feeds] || attributes['target_feeds'] || nil @custom = attributes[:custom] || attributes['custom'] || nil @user = attributes[:user] || attributes['user'] || nil end @@ -57,6 +61,7 @@ def self.json_field_mappings enforce_unique: 'enforce_unique', skip_push: 'skip_push', user_id: 'user_id', + target_feeds: 'target_feeds', custom: 'custom', user: 'user' } 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 8534725..35fd05f 100644 --- a/lib/getstream_ruby/generated/models/add_comment_reaction_response.rb +++ b/lib/getstream_ruby/generated/models/add_comment_reaction_response.rb @@ -18,9 +18,19 @@ class AddCommentReactionResponse < GetStream::BaseModel # @!attribute reaction # @return [FeedsReactionResponse] attr_accessor :reaction + # @!attribute notification_accepted + # @return [Boolean] Whether notification creation was accepted for asynchronous processing + attr_accessor :notification_accepted # @!attribute notification_created - # @return [Boolean] Whether a notification activity was successfully created + # @deprecated This field is deprecated. + # @return [Boolean] Deprecated. Mirrors notification_accepted; use notification_accepted for async enqueue status Deprecated: use notification_accepted attr_accessor :notification_created + # @!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 reference_activity + # @return [ActivityResponse] + attr_accessor :reference_activity # Initialize with attributes def initialize(attributes = {}) @@ -28,7 +38,10 @@ def initialize(attributes = {}) @duration = attributes[:duration] || attributes['duration'] @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 + @reference_activity = attributes[:reference_activity] || attributes['reference_activity'] || nil end # Override field mappings for JSON serialization @@ -37,7 +50,10 @@ def self.json_field_mappings duration: 'duration', comment: 'comment', reaction: 'reaction', - notification_created: 'notification_created' + notification_accepted: 'notification_accepted', + notification_created: 'notification_created', + notification_task_id: 'notification_task_id', + reference_activity: 'reference_activity' } end end diff --git a/lib/getstream_ruby/generated/models/add_reaction_request.rb b/lib/getstream_ruby/generated/models/add_reaction_request.rb index ffbd8cb..c9c265b 100644 --- a/lib/getstream_ruby/generated/models/add_reaction_request.rb +++ b/lib/getstream_ruby/generated/models/add_reaction_request.rb @@ -31,6 +31,9 @@ class AddReactionRequest < GetStream::BaseModel # @!attribute user_id # @return [String] attr_accessor :user_id + # @!attribute target_feeds + # @return [Array] Optional list of feeds to create a reference (share) activity of the original activity in. The reference activity's type mirrors the reaction type. + attr_accessor :target_feeds # @!attribute custom # @return [Object] Custom data for the reaction attr_accessor :custom @@ -48,6 +51,7 @@ def initialize(attributes = {}) @enforce_unique = attributes[:enforce_unique] || attributes['enforce_unique'] || nil @skip_push = attributes[:skip_push] || attributes['skip_push'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil + @target_feeds = attributes[:target_feeds] || attributes['target_feeds'] || nil @custom = attributes[:custom] || attributes['custom'] || nil @user = attributes[:user] || attributes['user'] || nil end @@ -62,6 +66,7 @@ def self.json_field_mappings enforce_unique: 'enforce_unique', skip_push: 'skip_push', user_id: 'user_id', + target_feeds: 'target_feeds', custom: 'custom', user: 'user' } diff --git a/lib/getstream_ruby/generated/models/add_reaction_response.rb b/lib/getstream_ruby/generated/models/add_reaction_response.rb index 1aa15f7..4756b8d 100644 --- a/lib/getstream_ruby/generated/models/add_reaction_response.rb +++ b/lib/getstream_ruby/generated/models/add_reaction_response.rb @@ -18,9 +18,19 @@ class AddReactionResponse < GetStream::BaseModel # @!attribute reaction # @return [FeedsReactionResponse] attr_accessor :reaction + # @!attribute notification_accepted + # @return [Boolean] Whether notification creation was accepted for asynchronous processing + attr_accessor :notification_accepted # @!attribute notification_created - # @return [Boolean] Whether a notification activity was successfully created + # @deprecated This field is deprecated. + # @return [Boolean] Deprecated. Mirrors notification_accepted; use notification_accepted for async enqueue status Deprecated: use notification_accepted attr_accessor :notification_created + # @!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 reference_activity + # @return [ActivityResponse] + attr_accessor :reference_activity # Initialize with attributes def initialize(attributes = {}) @@ -28,7 +38,10 @@ def initialize(attributes = {}) @duration = attributes[:duration] || attributes['duration'] @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 + @reference_activity = attributes[:reference_activity] || attributes['reference_activity'] || nil end # Override field mappings for JSON serialization @@ -37,7 +50,10 @@ def self.json_field_mappings duration: 'duration', activity: 'activity', reaction: 'reaction', - notification_created: 'notification_created' + notification_accepted: 'notification_accepted', + notification_created: 'notification_created', + notification_task_id: 'notification_task_id', + reference_activity: 'reference_activity' } end 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 new file mode 100644 index 0000000..2ccda44 --- /dev/null +++ b/lib/getstream_ruby/generated/models/ai_audio_config_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 AIAudioConfigRequest < GetStream::BaseModel + + # Model attributes + # @!attribute profile + # @return [String] + attr_accessor :profile + # @!attribute rules + # @return [Array] + attr_accessor :rules + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @profile = attributes[:profile] || attributes['profile'] || nil + @rules = attributes[:rules] || attributes['rules'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + profile: 'profile', + rules: 'rules' + } + end + end + end + 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 new file mode 100644 index 0000000..39f1bb3 --- /dev/null +++ b/lib/getstream_ruby/generated/models/ai_audio_config_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 AIAudioConfigResponse < GetStream::BaseModel + + # Model attributes + # @!attribute enabled + # @return [Boolean] + attr_accessor :enabled + # @!attribute profile + # @return [String] + attr_accessor :profile + # @!attribute rules + # @return [Array] + attr_accessor :rules + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @enabled = attributes[:enabled] || attributes['enabled'] + @profile = attributes[:profile] || attributes['profile'] + @rules = attributes[:rules] || attributes['rules'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + enabled: 'enabled', + profile: 'profile', + rules: 'rules' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/async_export_review_queue_event.rb b/lib/getstream_ruby/generated/models/async_export_review_queue_event.rb new file mode 100644 index 0000000..a319c45 --- /dev/null +++ b/lib/getstream_ruby/generated/models/async_export_review_queue_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 AsyncExportReviewQueueEvent < 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.review_queue.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/batch_query_activity_reactions_request.rb b/lib/getstream_ruby/generated/models/batch_query_activity_reactions_request.rb new file mode 100644 index 0000000..2b084c6 --- /dev/null +++ b/lib/getstream_ruby/generated/models/batch_query_activity_reactions_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 BatchQueryActivityReactionsRequest < GetStream::BaseModel + + # Model attributes + # @!attribute activity_ids + # @return [Array] Activity IDs to fetch the user's reactions for (max 100) + attr_accessor :activity_ids + # @!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] Server-side only. The user whose reactions to fetch; defaults to the authenticated user for client-side requests + attr_accessor :user_id + # @!attribute sort + # @return [Array] + attr_accessor :sort + # @!attribute filter + # @return [Object] Optional filter on reaction_type or created_at + attr_accessor :filter + # @!attribute user + # @return [UserRequest] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @activity_ids = attributes[:activity_ids] || attributes['activity_ids'] + @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 + { + activity_ids: 'activity_ids', + 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/batch_query_activity_reactions_response.rb b/lib/getstream_ruby/generated/models/batch_query_activity_reactions_response.rb new file mode 100644 index 0000000..2c8a2d6 --- /dev/null +++ b/lib/getstream_ruby/generated/models/batch_query_activity_reactions_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 BatchQueryActivityReactionsResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute reactions + # @return [Array] + attr_accessor :reactions + # @!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'] + @reactions = attributes[:reactions] || attributes['reactions'] + @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', + reactions: 'reactions', + next: 'next', + prev: 'prev' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/batch_query_comment_reactions_request.rb b/lib/getstream_ruby/generated/models/batch_query_comment_reactions_request.rb new file mode 100644 index 0000000..c986f6c --- /dev/null +++ b/lib/getstream_ruby/generated/models/batch_query_comment_reactions_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 BatchQueryCommentReactionsRequest < GetStream::BaseModel + + # Model attributes + # @!attribute comment_ids + # @return [Array] Comment IDs to fetch the user's reactions for (max 100) + attr_accessor :comment_ids + # @!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] Server-side only. The user whose reactions to fetch; defaults to the authenticated user for client-side requests + attr_accessor :user_id + # @!attribute sort + # @return [Array] + attr_accessor :sort + # @!attribute filter + # @return [Object] Optional filter on reaction_type or created_at + attr_accessor :filter + # @!attribute user + # @return [UserRequest] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @comment_ids = attributes[:comment_ids] || attributes['comment_ids'] + @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 + { + comment_ids: 'comment_ids', + 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/batch_query_comment_reactions_response.rb b/lib/getstream_ruby/generated/models/batch_query_comment_reactions_response.rb new file mode 100644 index 0000000..729b692 --- /dev/null +++ b/lib/getstream_ruby/generated/models/batch_query_comment_reactions_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 BatchQueryCommentReactionsResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute reactions + # @return [Array] + attr_accessor :reactions + # @!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'] + @reactions = attributes[:reactions] || attributes['reactions'] + @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', + reactions: 'reactions', + next: 'next', + prev: 'prev' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/check_response.rb b/lib/getstream_ruby/generated/models/check_response.rb index ac58bce..7007f46 100644 --- a/lib/getstream_ruby/generated/models/check_response.rb +++ b/lib/getstream_ruby/generated/models/check_response.rb @@ -21,6 +21,9 @@ class CheckResponse < GetStream::BaseModel # @!attribute task_id # @return [String] ID of the running moderation task attr_accessor :task_id + # @!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 # @!attribute item # @return [ReviewQueueItemResponse] attr_accessor :item @@ -35,6 +38,7 @@ def initialize(attributes = {}) @recommended_action = attributes[:recommended_action] || attributes['recommended_action'] @status = attributes[:status] || attributes['status'] @task_id = attributes[:task_id] || attributes['task_id'] || 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 end @@ -46,6 +50,7 @@ def self.json_field_mappings recommended_action: 'recommended_action', status: 'status', task_id: 'task_id', + triggered_rules: 'triggered_rules', item: 'item', triggered_rule: 'triggered_rule' } diff --git a/lib/getstream_ruby/generated/models/closed_caption_rule_parameters.rb b/lib/getstream_ruby/generated/models/closed_caption_rule_parameters.rb index 1fc5fe8..6fcb05b 100644 --- a/lib/getstream_ruby/generated/models/closed_caption_rule_parameters.rb +++ b/lib/getstream_ruby/generated/models/closed_caption_rule_parameters.rb @@ -9,6 +9,9 @@ module Models class ClosedCaptionRuleParameters < GetStream::BaseModel # Model attributes + # @!attribute severity + # @return [String] + attr_accessor :severity # @!attribute threshold # @return [Integer] attr_accessor :threshold @@ -25,6 +28,7 @@ class ClosedCaptionRuleParameters < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @severity = attributes[:severity] || attributes['severity'] || nil @threshold = attributes[:threshold] || attributes['threshold'] || nil @time_window = attributes[:time_window] || attributes['time_window'] || nil @harm_labels = attributes[:harm_labels] || attributes['harm_labels'] || nil @@ -34,6 +38,7 @@ def initialize(attributes = {}) # Override field mappings for JSON serialization def self.json_field_mappings { + severity: 'severity', threshold: 'threshold', time_window: 'time_window', harm_labels: 'harm_labels', diff --git a/lib/getstream_ruby/generated/models/comment_response.rb b/lib/getstream_ruby/generated/models/comment_response.rb index ac79402..fe41434 100644 --- a/lib/getstream_ruby/generated/models/comment_response.rb +++ b/lib/getstream_ruby/generated/models/comment_response.rb @@ -81,6 +81,9 @@ class CommentResponse < GetStream::BaseModel # @!attribute custom # @return [Object] Custom data for the comment attr_accessor :custom + # @!attribute i18n + # @return [Hash] + attr_accessor :i18n # @!attribute moderation # @return [ModerationV2Response] attr_accessor :moderation @@ -115,6 +118,7 @@ def initialize(attributes = {}) @attachments = attributes[:attachments] || attributes['attachments'] || nil @latest_reactions = attributes[:latest_reactions] || attributes['latest_reactions'] || nil @custom = attributes[:custom] || attributes['custom'] || nil + @i18n = attributes[:i18n] || attributes['i18n'] || nil @moderation = attributes[:moderation] || attributes['moderation'] || nil @reaction_groups = attributes[:reaction_groups] || attributes['reaction_groups'] || nil end @@ -146,6 +150,7 @@ def self.json_field_mappings attachments: 'attachments', latest_reactions: 'latest_reactions', custom: 'custom', + i18n: 'i18n', moderation: 'moderation', reaction_groups: 'reaction_groups' } diff --git a/lib/getstream_ruby/generated/models/config_response.rb b/lib/getstream_ruby/generated/models/config_response.rb index 5b187b1..e794071 100644 --- a/lib/getstream_ruby/generated/models/config_response.rb +++ b/lib/getstream_ruby/generated/models/config_response.rb @@ -33,6 +33,9 @@ class ConfigResponse < GetStream::BaseModel # @!attribute available_bodyguard_profiles # @return [Array] Names of Bodyguard credential profiles registered on this app. The dashboard uses this list to render the profile picker on the AI Text section. attr_accessor :available_bodyguard_profiles + # @!attribute ai_audio_config + # @return [AIAudioConfigResponse] + attr_accessor :ai_audio_config # @!attribute ai_image_config # @return [AIImageConfig] attr_accessor :ai_image_config @@ -81,6 +84,7 @@ def initialize(attributes = {}) @supported_video_call_harm_types = attributes[:supported_video_call_harm_types] || attributes['supported_video_call_harm_types'] @ai_image_label_definitions = attributes[:ai_image_label_definitions] || attributes['ai_image_label_definitions'] || nil @available_bodyguard_profiles = attributes[:available_bodyguard_profiles] || attributes['available_bodyguard_profiles'] || nil + @ai_audio_config = attributes[:ai_audio_config] || attributes['ai_audio_config'] || nil @ai_image_config = attributes[:ai_image_config] || attributes['ai_image_config'] || nil @ai_image_subclassifications = attributes[:ai_image_subclassifications] || attributes['ai_image_subclassifications'] || nil @ai_text_config = attributes[:ai_text_config] || attributes['ai_text_config'] || nil @@ -106,6 +110,7 @@ def self.json_field_mappings supported_video_call_harm_types: 'supported_video_call_harm_types', ai_image_label_definitions: 'ai_image_label_definitions', available_bodyguard_profiles: 'available_bodyguard_profiles', + ai_audio_config: 'ai_audio_config', ai_image_config: 'ai_image_config', ai_image_subclassifications: 'ai_image_subclassifications', ai_text_config: 'ai_text_config', diff --git a/lib/getstream_ruby/generated/models/create_queue_request.rb b/lib/getstream_ruby/generated/models/create_queue_request.rb new file mode 100644 index 0000000..32340d6 --- /dev/null +++ b/lib/getstream_ruby/generated/models/create_queue_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 CreateQueueRequest < GetStream::BaseModel + + # Model attributes + # @!attribute name + # @return [String] + attr_accessor :name + # @!attribute type + # @return [String] + attr_accessor :type + # @!attribute description + # @return [String] + attr_accessor :description + # @!attribute user_id + # @return [String] + attr_accessor :user_id + # @!attribute sort + # @return [Array] + attr_accessor :sort + # @!attribute filters + # @return [Object] + attr_accessor :filters + # @!attribute user + # @return [UserRequest] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @name = attributes[:name] || attributes['name'] + @type = attributes[:type] || attributes['type'] + @description = attributes[:description] || attributes['description'] || nil + @user_id = attributes[:user_id] || attributes['user_id'] || nil + @sort = attributes[:sort] || attributes['sort'] || nil + @filters = attributes[:filters] || attributes['filters'] || nil + @user = attributes[:user] || attributes['user'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + name: 'name', + type: 'type', + description: 'description', + user_id: 'user_id', + sort: 'sort', + filters: 'filters', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/delete_queue_request.rb b/lib/getstream_ruby/generated/models/delete_queue_request.rb new file mode 100644 index 0000000..e2e9470 --- /dev/null +++ b/lib/getstream_ruby/generated/models/delete_queue_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 DeleteQueueRequest < GetStream::BaseModel + + # Model attributes + # @!attribute user_id + # @return [String] + attr_accessor :user_id + # @!attribute user + # @return [UserRequest] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @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 + { + user_id: 'user_id', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/feeds_share_response.rb b/lib/getstream_ruby/generated/models/feeds_share_response.rb new file mode 100644 index 0000000..6886610 --- /dev/null +++ b/lib/getstream_ruby/generated/models/feeds_share_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 FeedsShareResponse < GetStream::BaseModel + + # Model attributes + # @!attribute activity_id + # @return [String] + attr_accessor :activity_id + # @!attribute created_at + # @return [DateTime] + attr_accessor :created_at + # @!attribute user + # @return [UserResponse] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @activity_id = attributes[:activity_id] || attributes['activity_id'] + @created_at = attributes[:created_at] || attributes['created_at'] + @user = attributes[:user] || attributes['user'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + activity_id: 'activity_id', + created_at: 'created_at', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/feeds_v3_activity_response.rb b/lib/getstream_ruby/generated/models/feeds_v3_activity_response.rb index 948b1ca..c90b433 100644 --- a/lib/getstream_ruby/generated/models/feeds_v3_activity_response.rb +++ b/lib/getstream_ruby/generated/models/feeds_v3_activity_response.rb @@ -129,9 +129,15 @@ class FeedsV3ActivityResponse < GetStream::BaseModel # @!attribute friend_reactions # @return [Array] attr_accessor :friend_reactions + # @!attribute latest_shares + # @return [Array] + attr_accessor :latest_shares # @!attribute current_feed # @return [FeedsFeedResponse] attr_accessor :current_feed + # @!attribute i18n + # @return [Hash] + attr_accessor :i18n # @!attribute location # @return [FeedsActivityLocation] attr_accessor :location @@ -197,7 +203,9 @@ def initialize(attributes = {}) @text = attributes[:text] || attributes['text'] || 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 @current_feed = attributes[:current_feed] || attributes['current_feed'] || nil + @i18n = attributes[:i18n] || attributes['i18n'] || nil @location = attributes[:location] || attributes['location'] || nil @metrics = attributes[:metrics] || attributes['metrics'] || nil @moderation = attributes[:moderation] || attributes['moderation'] || nil @@ -250,7 +258,9 @@ def self.json_field_mappings text: 'text', visibility_tag: 'visibility_tag', friend_reactions: 'friend_reactions', + latest_shares: 'latest_shares', current_feed: 'current_feed', + i18n: 'i18n', location: 'location', metrics: 'metrics', moderation: 'moderation', 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 830d04e..a69abbc 100644 --- a/lib/getstream_ruby/generated/models/feeds_v3_comment_response.rb +++ b/lib/getstream_ruby/generated/models/feeds_v3_comment_response.rb @@ -81,6 +81,9 @@ class FeedsV3CommentResponse < GetStream::BaseModel # @!attribute custom # @return [Object] attr_accessor :custom + # @!attribute i18n + # @return [Hash] + attr_accessor :i18n # @!attribute moderation # @return [ModerationV2Response] attr_accessor :moderation @@ -115,6 +118,7 @@ def initialize(attributes = {}) @attachments = attributes[:attachments] || attributes['attachments'] || nil @latest_reactions = attributes[:latest_reactions] || attributes['latest_reactions'] || nil @custom = attributes[:custom] || attributes['custom'] || nil + @i18n = attributes[:i18n] || attributes['i18n'] || nil @moderation = attributes[:moderation] || attributes['moderation'] || nil @reaction_groups = attributes[:reaction_groups] || attributes['reaction_groups'] || nil end @@ -146,6 +150,7 @@ def self.json_field_mappings attachments: 'attachments', latest_reactions: 'latest_reactions', custom: 'custom', + i18n: 'i18n', moderation: 'moderation', reaction_groups: 'reaction_groups' } diff --git a/lib/getstream_ruby/generated/models/filter_config_response.rb b/lib/getstream_ruby/generated/models/filter_config_response.rb index 14d23e1..9e127d5 100644 --- a/lib/getstream_ruby/generated/models/filter_config_response.rb +++ b/lib/getstream_ruby/generated/models/filter_config_response.rb @@ -12,6 +12,9 @@ class FilterConfigResponse < GetStream::BaseModel # @!attribute llm_labels # @return [Array] LLM moderation labels available as filter values attr_accessor :llm_labels + # @!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_text_labels # @return [Array] AI text moderation labels available as filter values attr_accessor :ai_text_labels @@ -26,6 +29,7 @@ class FilterConfigResponse < GetStream::BaseModel 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_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 @@ -35,6 +39,7 @@ def initialize(attributes = {}) def self.json_field_mappings { llm_labels: 'llm_labels', + ai_image_labels: 'ai_image_labels', ai_text_labels: 'ai_text_labels', config_keys: 'config_keys', filterable_custom_keys: 'filterable_custom_keys' diff --git a/lib/getstream_ruby/generated/models/list_queues_response.rb b/lib/getstream_ruby/generated/models/list_queues_response.rb new file mode 100644 index 0000000..60be9af --- /dev/null +++ b/lib/getstream_ruby/generated/models/list_queues_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 + # Basic response information + class ListQueuesResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute queues + # @return [Array] + attr_accessor :queues + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @queues = attributes[:queues] || attributes['queues'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + queues: 'queues' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb b/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb index 29b3a8a..0ad7132 100644 --- a/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb +++ b/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb @@ -9,12 +9,15 @@ module Models class ModerationDashboardPreferences < GetStream::BaseModel # Model attributes - # @!attribute analyze_max_image_size_bytes - # @return [Integer] - attr_accessor :analyze_max_image_size_bytes # @!attribute async_review_queue_upsert # @return [Boolean] attr_accessor :async_review_queue_upsert + # @!attribute block_foreign_cdn_attachments + # @return [Boolean] + attr_accessor :block_foreign_cdn_attachments + # @!attribute custom_views_enabled + # @return [Boolean] + attr_accessor :custom_views_enabled # @!attribute disable_audit_logs # @return [Boolean] attr_accessor :disable_audit_logs @@ -33,9 +36,6 @@ class ModerationDashboardPreferences < GetStream::BaseModel # @!attribute media_queue_blur_enabled # @return [Boolean] attr_accessor :media_queue_blur_enabled - # @!attribute webhook_header_client_request_id_key - # @return [String] - attr_accessor :webhook_header_client_request_id_key # @!attribute allowed_moderation_action_reasons # @return [Array] attr_accessor :allowed_moderation_action_reasons @@ -55,15 +55,15 @@ class ModerationDashboardPreferences < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) - @analyze_max_image_size_bytes = attributes[:analyze_max_image_size_bytes] || attributes['analyze_max_image_size_bytes'] || nil @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_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 @escalation_queue_enabled = attributes[:escalation_queue_enabled] || attributes['escalation_queue_enabled'] || nil @flag_user_on_flagged_content = attributes[:flag_user_on_flagged_content] || attributes['flag_user_on_flagged_content'] || nil @include_attachment_payload = attributes[:include_attachment_payload] || attributes['include_attachment_payload'] || nil @media_queue_blur_enabled = attributes[:media_queue_blur_enabled] || attributes['media_queue_blur_enabled'] || nil - @webhook_header_client_request_id_key = attributes[:webhook_header_client_request_id_key] || attributes['webhook_header_client_request_id_key'] || nil @allowed_moderation_action_reasons = attributes[:allowed_moderation_action_reasons] || attributes['allowed_moderation_action_reasons'] || nil @escalation_reasons = attributes[:escalation_reasons] || attributes['escalation_reasons'] || nil @filterable_custom_keys = attributes[:filterable_custom_keys] || attributes['filterable_custom_keys'] || nil @@ -74,15 +74,15 @@ def initialize(attributes = {}) # Override field mappings for JSON serialization def self.json_field_mappings { - analyze_max_image_size_bytes: 'analyze_max_image_size_bytes', async_review_queue_upsert: 'async_review_queue_upsert', + block_foreign_cdn_attachments: 'block_foreign_cdn_attachments', + custom_views_enabled: 'custom_views_enabled', disable_audit_logs: 'disable_audit_logs', disable_flagging_reviewed_entity: 'disable_flagging_reviewed_entity', escalation_queue_enabled: 'escalation_queue_enabled', flag_user_on_flagged_content: 'flag_user_on_flagged_content', include_attachment_payload: 'include_attachment_payload', media_queue_blur_enabled: 'media_queue_blur_enabled', - webhook_header_client_request_id_key: 'webhook_header_client_request_id_key', allowed_moderation_action_reasons: 'allowed_moderation_action_reasons', escalation_reasons: 'escalation_reasons', filterable_custom_keys: 'filterable_custom_keys', diff --git a/lib/getstream_ruby/generated/models/moderation_payload.rb b/lib/getstream_ruby/generated/models/moderation_payload.rb index 50fbbe4..9ada0f5 100644 --- a/lib/getstream_ruby/generated/models/moderation_payload.rb +++ b/lib/getstream_ruby/generated/models/moderation_payload.rb @@ -9,9 +9,18 @@ module Models class ModerationPayload < GetStream::BaseModel # Model attributes + # @!attribute audios + # @return [Array] + attr_accessor :audios + # @!attribute image_ordered_keys + # @return [Array] + attr_accessor :image_ordered_keys # @!attribute images # @return [Array] attr_accessor :images + # @!attribute text_ordered_keys + # @return [Array] + attr_accessor :text_ordered_keys # @!attribute texts # @return [Array] attr_accessor :texts @@ -21,23 +30,39 @@ class ModerationPayload < GetStream::BaseModel # @!attribute custom # @return [Object] attr_accessor :custom + # @!attribute image_ids + # @return [Hash] + attr_accessor :image_ids + # @!attribute text_ids + # @return [Hash] + attr_accessor :text_ids # Initialize with attributes def initialize(attributes = {}) super(attributes) + @audios = attributes[:audios] || attributes['audios'] || nil + @image_ordered_keys = attributes[:image_ordered_keys] || attributes['image_ordered_keys'] || nil @images = attributes[:images] || attributes['images'] || nil + @text_ordered_keys = attributes[:text_ordered_keys] || attributes['text_ordered_keys'] || nil @texts = attributes[:texts] || attributes['texts'] || nil @videos = attributes[:videos] || attributes['videos'] || nil @custom = attributes[:custom] || attributes['custom'] || nil + @image_ids = attributes[:image_ids] || attributes['image_ids'] || nil + @text_ids = attributes[:text_ids] || attributes['text_ids'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { + audios: 'audios', + image_ordered_keys: 'image_ordered_keys', images: 'images', + text_ordered_keys: 'text_ordered_keys', texts: 'texts', videos: 'videos', - custom: 'custom' + custom: 'custom', + image_ids: 'image_ids', + text_ids: 'text_ids' } end end diff --git a/lib/getstream_ruby/generated/models/moderation_payload_request.rb b/lib/getstream_ruby/generated/models/moderation_payload_request.rb index e91e6ec..b4eb582 100644 --- a/lib/getstream_ruby/generated/models/moderation_payload_request.rb +++ b/lib/getstream_ruby/generated/models/moderation_payload_request.rb @@ -9,6 +9,9 @@ module Models class ModerationPayloadRequest < GetStream::BaseModel # Model attributes + # @!attribute audios + # @return [Array] Audio URLs to moderate + attr_accessor :audios # @!attribute images # @return [Array] Image URLs to moderate (max 30) attr_accessor :images @@ -25,6 +28,7 @@ class ModerationPayloadRequest < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @audios = attributes[:audios] || attributes['audios'] || nil @images = attributes[:images] || attributes['images'] || nil @texts = attributes[:texts] || attributes['texts'] || nil @videos = attributes[:videos] || attributes['videos'] || nil @@ -34,6 +38,7 @@ def initialize(attributes = {}) # Override field mappings for JSON serialization def self.json_field_mappings { + audios: 'audios', images: 'images', texts: 'texts', videos: 'videos', diff --git a/lib/getstream_ruby/generated/models/moderation_payload_response.rb b/lib/getstream_ruby/generated/models/moderation_payload_response.rb index 09402aa..c7b066c 100644 --- a/lib/getstream_ruby/generated/models/moderation_payload_response.rb +++ b/lib/getstream_ruby/generated/models/moderation_payload_response.rb @@ -9,9 +9,18 @@ module Models class ModerationPayloadResponse < GetStream::BaseModel # Model attributes + # @!attribute audios + # @return [Array] Audio URLs to moderate + attr_accessor :audios + # @!attribute image_ordered_keys + # @return [Array] Caller-supplied keys for images, index-aligned with images[] + attr_accessor :image_ordered_keys # @!attribute images # @return [Array] Image URLs to moderate attr_accessor :images + # @!attribute text_ordered_keys + # @return [Array] Caller-supplied keys for texts (e.g. "title", "description"), index-aligned with texts[] + attr_accessor :text_ordered_keys # @!attribute texts # @return [Array] Text content to moderate attr_accessor :texts @@ -21,23 +30,39 @@ class ModerationPayloadResponse < GetStream::BaseModel # @!attribute custom # @return [Object] Custom data for moderation attr_accessor :custom + # @!attribute image_ids + # @return [Hash] Caller-supplied content IDs per image key (from content_ids on /analyze) + attr_accessor :image_ids + # @!attribute text_ids + # @return [Hash] Caller-supplied content IDs per text key (from content_ids on /analyze) + attr_accessor :text_ids # Initialize with attributes def initialize(attributes = {}) super(attributes) + @audios = attributes[:audios] || attributes['audios'] || nil + @image_ordered_keys = attributes[:image_ordered_keys] || attributes['image_ordered_keys'] || nil @images = attributes[:images] || attributes['images'] || nil + @text_ordered_keys = attributes[:text_ordered_keys] || attributes['text_ordered_keys'] || nil @texts = attributes[:texts] || attributes['texts'] || nil @videos = attributes[:videos] || attributes['videos'] || nil @custom = attributes[:custom] || attributes['custom'] || nil + @image_ids = attributes[:image_ids] || attributes['image_ids'] || nil + @text_ids = attributes[:text_ids] || attributes['text_ids'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { + audios: 'audios', + image_ordered_keys: 'image_ordered_keys', images: 'images', + text_ordered_keys: 'text_ordered_keys', texts: 'texts', videos: 'videos', - custom: 'custom' + custom: 'custom', + image_ids: 'image_ids', + text_ids: 'text_ids' } end end diff --git a/lib/getstream_ruby/generated/models/moderation_queue_response.rb b/lib/getstream_ruby/generated/models/moderation_queue_response.rb new file mode 100644 index 0000000..9292551 --- /dev/null +++ b/lib/getstream_ruby/generated/models/moderation_queue_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 + # + class ModerationQueueResponse < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] + attr_accessor :created_at + # @!attribute created_by + # @return [String] + attr_accessor :created_by + # @!attribute description + # @return [String] + attr_accessor :description + # @!attribute id + # @return [String] + attr_accessor :id + # @!attribute item_count + # @return [Integer] + attr_accessor :item_count + # @!attribute name + # @return [String] + attr_accessor :name + # @!attribute type + # @return [String] + attr_accessor :type + # @!attribute updated_at + # @return [DateTime] + attr_accessor :updated_at + # @!attribute sort + # @return [Array] + attr_accessor :sort + # @!attribute filters + # @return [Object] + attr_accessor :filters + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @created_by = attributes[:created_by] || attributes['created_by'] + @description = attributes[:description] || attributes['description'] + @id = attributes[:id] || attributes['id'] + @item_count = attributes[:item_count] || attributes['item_count'] + @name = attributes[:name] || attributes['name'] + @type = attributes[:type] || attributes['type'] + @updated_at = attributes[:updated_at] || attributes['updated_at'] + @sort = attributes[:sort] || attributes['sort'] + @filters = attributes[:filters] || attributes['filters'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + created_by: 'created_by', + description: 'description', + id: 'id', + item_count: 'item_count', + name: 'name', + type: 'type', + updated_at: 'updated_at', + sort: 'sort', + filters: 'filters' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/ocr_content_parameters.rb b/lib/getstream_ruby/generated/models/ocr_content_parameters.rb new file mode 100644 index 0000000..8d2e6d9 --- /dev/null +++ b/lib/getstream_ruby/generated/models/ocr_content_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 OCRContentParameters < GetStream::BaseModel + + # Model attributes + # @!attribute label_operator + # @return [String] + attr_accessor :label_operator + # @!attribute severity + # @return [String] + attr_accessor :severity + # @!attribute harm_labels + # @return [Array] + attr_accessor :harm_labels + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @label_operator = attributes[:label_operator] || attributes['label_operator'] || nil + @severity = attributes[:severity] || attributes['severity'] || nil + @harm_labels = attributes[:harm_labels] || attributes['harm_labels'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + label_operator: 'label_operator', + severity: 'severity', + harm_labels: 'harm_labels' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/permission.rb b/lib/getstream_ruby/generated/models/permission.rb index 2a1f906..bc2087b 100644 --- a/lib/getstream_ruby/generated/models/permission.rb +++ b/lib/getstream_ruby/generated/models/permission.rb @@ -30,6 +30,9 @@ class Permission < GetStream::BaseModel # @!attribute owner # @return [Boolean] Whether this permission applies to resource owner or not attr_accessor :owner + # @!attribute owner_resource + # @return [String] Resource type that defines ownership for this permission's action (e.g. 'Channel' for CreateMessage, 'Message' for UpdateMessage). Identical across all variants of an action; primarily meaningful for owner grants. + attr_accessor :owner_resource # @!attribute same_team # @return [Boolean] Whether this permission applies to teammates (multi-tenancy mode only) attr_accessor :same_team @@ -50,6 +53,7 @@ def initialize(attributes = {}) @level = attributes[:level] || attributes['level'] @name = attributes[:name] || attributes['name'] @owner = attributes[:owner] || attributes['owner'] + @owner_resource = attributes[:owner_resource] || attributes['owner_resource'] @same_team = attributes[:same_team] || attributes['same_team'] @tags = attributes[:tags] || attributes['tags'] @condition = attributes[:condition] || attributes['condition'] || nil @@ -65,6 +69,7 @@ def self.json_field_mappings level: 'level', name: 'name', owner: 'owner', + owner_resource: 'owner_resource', same_team: 'same_team', tags: 'tags', condition: 'condition' diff --git a/lib/getstream_ruby/generated/models/query_activity_shares_response.rb b/lib/getstream_ruby/generated/models/query_activity_shares_response.rb new file mode 100644 index 0000000..dd704a4 --- /dev/null +++ b/lib/getstream_ruby/generated/models/query_activity_shares_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 QueryActivitySharesResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute shares + # @return [Array] + attr_accessor :shares + # @!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'] + @shares = attributes[:shares] || attributes['shares'] + @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', + shares: 'shares', + next: 'next', + prev: 'prev' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/query_moderation_rules_response.rb b/lib/getstream_ruby/generated/models/query_moderation_rules_response.rb index bf5fd2b..4f22335 100644 --- a/lib/getstream_ruby/generated/models/query_moderation_rules_response.rb +++ b/lib/getstream_ruby/generated/models/query_moderation_rules_response.rb @@ -22,7 +22,7 @@ class QueryModerationRulesResponse < GetStream::BaseModel # @return [Array] Deprecated: use keyframe_label_classifications instead. Available L1 harm labels for keyframe rules attr_accessor :keyframe_labels # @!attribute ocr_labels - # @return [Array] Available harm labels for keyframe OCR rules. Mirrors `closed_caption_labels` today but kept as a separate field so the two pickers can diverge later. + # @return [Array] Available harm labels for OCR-based rule conditions (keyframe_ocr_rule and ocr_content). Mirrors `closed_caption_labels` today but kept as a separate field so the pickers can diverge later. attr_accessor :ocr_labels # @!attribute rules # @return [Array] List of moderation rules diff --git a/lib/getstream_ruby/generated/models/queue_response.rb b/lib/getstream_ruby/generated/models/queue_response.rb new file mode 100644 index 0000000..dfb35f8 --- /dev/null +++ b/lib/getstream_ruby/generated/models/queue_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 + # Basic response information + class QueueResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute queue + # @return [ModerationQueueResponse] + attr_accessor :queue + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @queue = attributes[:queue] || attributes['queue'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + queue: 'queue' + } + 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 aa3c25f..81435de 100644 --- a/lib/getstream_ruby/generated/models/rule_builder_condition.rb +++ b/lib/getstream_ruby/generated/models/rule_builder_condition.rb @@ -54,6 +54,9 @@ class RuleBuilderCondition < GetStream::BaseModel # @!attribute keyframe_rule_params # @return [KeyframeRuleParameters] attr_accessor :keyframe_rule_params + # @!attribute ocr_content_params + # @return [OCRContentParameters] + attr_accessor :ocr_content_params # @!attribute text_content_params # @return [TextContentParameters] attr_accessor :text_content_params @@ -103,6 +106,7 @@ def initialize(attributes = {}) @image_rule_params = attributes[:image_rule_params] || attributes['image_rule_params'] || nil @keyframe_ocr_rule_params = attributes[:keyframe_ocr_rule_params] || attributes['keyframe_ocr_rule_params'] || nil @keyframe_rule_params = attributes[:keyframe_rule_params] || attributes['keyframe_rule_params'] || nil + @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_created_within_params = attributes[:user_created_within_params] || attributes['user_created_within_params'] || nil @@ -133,6 +137,7 @@ def self.json_field_mappings image_rule_params: 'image_rule_params', keyframe_ocr_rule_params: 'keyframe_ocr_rule_params', keyframe_rule_params: 'keyframe_rule_params', + ocr_content_params: 'ocr_content_params', text_content_params: 'text_content_params', text_rule_params: 'text_rule_params', user_created_within_params: 'user_created_within_params', diff --git a/lib/getstream_ruby/generated/models/share_response.rb b/lib/getstream_ruby/generated/models/share_response.rb new file mode 100644 index 0000000..eeaab31 --- /dev/null +++ b/lib/getstream_ruby/generated/models/share_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 ShareResponse < GetStream::BaseModel + + # Model attributes + # @!attribute activity_id + # @return [String] ID of the sharing (child) activity + attr_accessor :activity_id + # @!attribute created_at + # @return [DateTime] When the share occurred + attr_accessor :created_at + # @!attribute user + # @return [UserResponse] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @activity_id = attributes[:activity_id] || attributes['activity_id'] + @created_at = attributes[:created_at] || attributes['created_at'] + @user = attributes[:user] || attributes['user'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + activity_id: 'activity_id', + created_at: 'created_at', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/threaded_comment_response.rb b/lib/getstream_ruby/generated/models/threaded_comment_response.rb index 3fae656..64cf399 100644 --- a/lib/getstream_ruby/generated/models/threaded_comment_response.rb +++ b/lib/getstream_ruby/generated/models/threaded_comment_response.rb @@ -84,6 +84,9 @@ class ThreadedCommentResponse < GetStream::BaseModel # @!attribute custom # @return [Object] attr_accessor :custom + # @!attribute i18n + # @return [Hash] + attr_accessor :i18n # @!attribute meta # @return [RepliesMeta] attr_accessor :meta @@ -122,6 +125,7 @@ def initialize(attributes = {}) @latest_reactions = attributes[:latest_reactions] || attributes['latest_reactions'] || nil @replies = attributes[:replies] || attributes['replies'] || nil @custom = attributes[:custom] || attributes['custom'] || nil + @i18n = attributes[:i18n] || attributes['i18n'] || nil @meta = attributes[:meta] || attributes['meta'] || nil @moderation = attributes[:moderation] || attributes['moderation'] || nil @reaction_groups = attributes[:reaction_groups] || attributes['reaction_groups'] || nil @@ -155,6 +159,7 @@ def self.json_field_mappings latest_reactions: 'latest_reactions', replies: 'replies', custom: 'custom', + i18n: 'i18n', meta: 'meta', moderation: 'moderation', reaction_groups: 'reaction_groups' diff --git a/lib/getstream_ruby/generated/models/translate_activity_request.rb b/lib/getstream_ruby/generated/models/translate_activity_request.rb new file mode 100644 index 0000000..52a9c52 --- /dev/null +++ b/lib/getstream_ruby/generated/models/translate_activity_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 TranslateActivityRequest < GetStream::BaseModel + + # Model attributes + # @!attribute language + # @return [String] ISO 639-1 language code to translate to + attr_accessor :language + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @language = attributes[:language] || attributes['language'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + language: 'language' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/translate_activity_response.rb b/lib/getstream_ruby/generated/models/translate_activity_response.rb new file mode 100644 index 0000000..720ae68 --- /dev/null +++ b/lib/getstream_ruby/generated/models/translate_activity_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 + # Basic response information + class TranslateActivityResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute activity + # @return [ActivityResponse] + attr_accessor :activity + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @activity = attributes[:activity] || attributes['activity'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + activity: 'activity' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/translate_comment_request.rb b/lib/getstream_ruby/generated/models/translate_comment_request.rb new file mode 100644 index 0000000..615e46d --- /dev/null +++ b/lib/getstream_ruby/generated/models/translate_comment_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 TranslateCommentRequest < GetStream::BaseModel + + # Model attributes + # @!attribute language + # @return [String] ISO 639-1 language code to translate to + attr_accessor :language + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @language = attributes[:language] || attributes['language'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + language: 'language' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/translate_comment_response.rb b/lib/getstream_ruby/generated/models/translate_comment_response.rb new file mode 100644 index 0000000..733d10e --- /dev/null +++ b/lib/getstream_ruby/generated/models/translate_comment_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 + # Basic response information + class TranslateCommentResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute comment + # @return [CommentResponse] + attr_accessor :comment + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @comment = attributes[:comment] || attributes['comment'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + comment: 'comment' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/triggered_rule_response.rb b/lib/getstream_ruby/generated/models/triggered_rule_response.rb index 1b08ce0..d90cd3d 100644 --- a/lib/getstream_ruby/generated/models/triggered_rule_response.rb +++ b/lib/getstream_ruby/generated/models/triggered_rule_response.rb @@ -18,6 +18,9 @@ class TriggeredRuleResponse < GetStream::BaseModel # @!attribute rule_name # @return [String] Name of the moderation rule that triggered attr_accessor :rule_name + # @!attribute type + # @return [String] Type of the moderation rule that triggered (content, user, or call) + attr_accessor :type # @!attribute violation_number # @return [Integer] Violation count for action sequence rules (1-based) attr_accessor :violation_number @@ -31,6 +34,7 @@ def initialize(attributes = {}) @rule_id = attributes[:rule_id] || attributes['rule_id'] @actions = attributes[:actions] || attributes['actions'] @rule_name = attributes[:rule_name] || attributes['rule_name'] || nil + @type = attributes[:type] || attributes['type'] || nil @violation_number = attributes[:violation_number] || attributes['violation_number'] || nil @call_options = attributes[:call_options] || attributes['call_options'] || nil end @@ -41,6 +45,7 @@ def self.json_field_mappings rule_id: 'rule_id', actions: 'actions', rule_name: 'rule_name', + type: 'type', violation_number: 'violation_number', call_options: 'call_options' } diff --git a/lib/getstream_ruby/generated/models/update_app_request.rb b/lib/getstream_ruby/generated/models/update_app_request.rb index bbb8e6c..9e78178 100644 --- a/lib/getstream_ruby/generated/models/update_app_request.rb +++ b/lib/getstream_ruby/generated/models/update_app_request.rb @@ -42,6 +42,9 @@ class UpdateAppRequest < GetStream::BaseModel # @!attribute enforce_unique_usernames # @return [String] attr_accessor :enforce_unique_usernames + # @!attribute feed_audit_logs_enabled + # @return [Boolean] + attr_accessor :feed_audit_logs_enabled # @!attribute feeds_moderation_enabled # @return [Boolean] attr_accessor :feeds_moderation_enabled @@ -87,6 +90,9 @@ class UpdateAppRequest < GetStream::BaseModel # @!attribute reminders_max_members # @return [Integer] attr_accessor :reminders_max_members + # @!attribute reminders_max_per_user + # @return [Integer] + attr_accessor :reminders_max_per_user # @!attribute revoke_tokens_issued_before # @return [DateTime] attr_accessor :revoke_tokens_issued_before @@ -186,6 +192,7 @@ def initialize(attributes = {}) @disable_permissions_checks = attributes[:disable_permissions_checks] || attributes['disable_permissions_checks'] || nil @enable_hook_payload_compression = attributes[:enable_hook_payload_compression] || attributes['enable_hook_payload_compression'] || nil @enforce_unique_usernames = attributes[:enforce_unique_usernames] || attributes['enforce_unique_usernames'] || nil + @feed_audit_logs_enabled = attributes[:feed_audit_logs_enabled] || attributes['feed_audit_logs_enabled'] || nil @feeds_moderation_enabled = attributes[:feeds_moderation_enabled] || attributes['feeds_moderation_enabled'] || nil @feeds_v2_region = attributes[:feeds_v2_region] || attributes['feeds_v2_region'] || nil @guest_user_creation_disabled = attributes[:guest_user_creation_disabled] || attributes['guest_user_creation_disabled'] || nil @@ -201,6 +208,7 @@ def initialize(attributes = {}) @permission_version = attributes[:permission_version] || attributes['permission_version'] || nil @reminders_interval = attributes[:reminders_interval] || attributes['reminders_interval'] || nil @reminders_max_members = attributes[:reminders_max_members] || attributes['reminders_max_members'] || nil + @reminders_max_per_user = attributes[:reminders_max_per_user] || attributes['reminders_max_per_user'] || nil @revoke_tokens_issued_before = attributes[:revoke_tokens_issued_before] || attributes['revoke_tokens_issued_before'] || nil @sns_key = attributes[:sns_key] || attributes['sns_key'] || nil @sns_secret = attributes[:sns_secret] || attributes['sns_secret'] || nil @@ -245,6 +253,7 @@ def self.json_field_mappings disable_permissions_checks: 'disable_permissions_checks', enable_hook_payload_compression: 'enable_hook_payload_compression', enforce_unique_usernames: 'enforce_unique_usernames', + feed_audit_logs_enabled: 'feed_audit_logs_enabled', feeds_moderation_enabled: 'feeds_moderation_enabled', feeds_v2_region: 'feeds_v2_region', guest_user_creation_disabled: 'guest_user_creation_disabled', @@ -260,6 +269,7 @@ def self.json_field_mappings permission_version: 'permission_version', reminders_interval: 'reminders_interval', reminders_max_members: 'reminders_max_members', + reminders_max_per_user: 'reminders_max_per_user', revoke_tokens_issued_before: 'revoke_tokens_issued_before', sns_key: 'sns_key', sns_secret: 'sns_secret', diff --git a/lib/getstream_ruby/generated/models/update_queue_request.rb b/lib/getstream_ruby/generated/models/update_queue_request.rb new file mode 100644 index 0000000..40d034f --- /dev/null +++ b/lib/getstream_ruby/generated/models/update_queue_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 UpdateQueueRequest < GetStream::BaseModel + + # Model attributes + # @!attribute description + # @return [String] + attr_accessor :description + # @!attribute name + # @return [String] + attr_accessor :name + # @!attribute user_id + # @return [String] + attr_accessor :user_id + # @!attribute sort + # @return [Array] + attr_accessor :sort + # @!attribute filters + # @return [Object] + attr_accessor :filters + # @!attribute user + # @return [UserRequest] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @description = attributes[:description] || attributes['description'] || nil + @name = attributes[:name] || attributes['name'] || nil + @user_id = attributes[:user_id] || attributes['user_id'] || nil + @sort = attributes[:sort] || attributes['sort'] || nil + @filters = attributes[:filters] || attributes['filters'] || nil + @user = attributes[:user] || attributes['user'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + description: 'description', + name: 'name', + user_id: 'user_id', + sort: 'sort', + filters: 'filters', + user: 'user' + } + end + end + end + 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 3e54f24..1f98a14 100644 --- a/lib/getstream_ruby/generated/models/upsert_config_request.rb +++ b/lib/getstream_ruby/generated/models/upsert_config_request.rb @@ -21,6 +21,9 @@ class UpsertConfigRequest < GetStream::BaseModel # @!attribute user_id # @return [String] Optional user ID to associate with the audit log entry attr_accessor :user_id + # @!attribute ai_audio_config + # @return [AIAudioConfigRequest] + attr_accessor :ai_audio_config # @!attribute ai_image_config # @return [AIImageConfig] attr_accessor :ai_image_config @@ -77,6 +80,7 @@ def initialize(attributes = {}) @async = attributes[:async] || attributes['async'] || nil @team = attributes[:team] || attributes['team'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil + @ai_audio_config = attributes[:ai_audio_config] || attributes['ai_audio_config'] || nil @ai_image_config = attributes[:ai_image_config] || attributes['ai_image_config'] || nil @ai_text_config = attributes[:ai_text_config] || attributes['ai_text_config'] || nil @ai_video_config = attributes[:ai_video_config] || attributes['ai_video_config'] || nil @@ -102,6 +106,7 @@ def self.json_field_mappings async: 'async', team: 'team', user_id: 'user_id', + ai_audio_config: 'ai_audio_config', ai_image_config: 'ai_image_config', ai_text_config: 'ai_text_config', ai_video_config: 'ai_video_config', diff --git a/lib/getstream_ruby/generated/moderation_client.rb b/lib/getstream_ruby/generated/moderation_client.rb index 4f794c9..9e533b1 100644 --- a/lib/getstream_ruby/generated/moderation_client.rb +++ b/lib/getstream_ruby/generated/moderation_client.rb @@ -618,6 +618,97 @@ def mute(mute_request) ) end + # + # + # @return [Models::ListQueuesResponse] + def list_queues() + path = '/api/v2/moderation/queues' + + # Make the API request + @client.make_request( + :get, + path + ) + end + + # + # + # @param create_queue_request [CreateQueueRequest] + # @return [Models::QueueResponse] + def create_queue(create_queue_request) + path = '/api/v2/moderation/queues' + # Build request body + body = create_queue_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + + # + # + # @param _id [String] + # @param user_id [String] + # @return [Models::QueueResponse] + def get_queue(_id, user_id = nil) + path = '/api/v2/moderation/queues/{id}' + # Replace path parameters + path = path.gsub('{id}', _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, + query_params: query_params + ) + end + + # + # + # @param _id [String] + # @param update_queue_request [UpdateQueueRequest] + # @return [Models::QueueResponse] + def update_queue(_id, update_queue_request) + path = '/api/v2/moderation/queues/{id}' + # Replace path parameters + path = path.gsub('{id}', _id.to_s) + # Build request body + body = update_queue_request + + # Make the API request + @client.make_request( + :patch, + path, + body: body + ) + end + + # + # + # @param _id [String] + # @param delete_queue_request [DeleteQueueRequest] + # @return [Models::QueueResponse] + def delete_queue(_id, delete_queue_request) + path = '/api/v2/moderation/queues/{id}/delete' + # Replace path parameters + path = path.gsub('{id}', _id.to_s) + # Build request body + body = delete_queue_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # Query review queue items allows you to filter the review queue items. This is used for building a moderation dashboard. # # @param query_review_queue_request [QueryReviewQueueRequest] diff --git a/lib/getstream_ruby/generated/webhook.rb b/lib/getstream_ruby/generated/webhook.rb index cf9d74c..d8e6901 100644 --- a/lib/getstream_ruby/generated/webhook.rb +++ b/lib/getstream_ruby/generated/webhook.rb @@ -24,6 +24,7 @@ require_relative 'models/async_export_channels_event' require_relative 'models/async_export_error_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/blocked_user_event' require_relative 'models/bookmark_added_event' @@ -295,6 +296,8 @@ def initialize(type:, created_at: nil, raw: {}) EVENT_TYPE_EXPORT_CHANNELS_SUCCESS = 'export.channels.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' + EVENT_TYPE_EXPORT_REVIEW_QUEUE_SUCCESS = 'export.review_queue.success' EVENT_TYPE_EXPORT_USERS_ERROR = 'export.users.error' EVENT_TYPE_EXPORT_USERS_SUCCESS = 'export.users.success' EVENT_TYPE_FEEDS_ACTIVITY_ADDED = 'feeds.activity.added' @@ -591,6 +594,10 @@ def self.parse_webhook_event(raw_event) GetStream::Generated::Models::AsyncExportErrorEvent when 'export.moderation_logs.success' GetStream::Generated::Models::AsyncExportModerationLogsEvent + when 'export.review_queue.error' + GetStream::Generated::Models::AsyncExportErrorEvent + when 'export.review_queue.success' + GetStream::Generated::Models::AsyncExportReviewQueueEvent when 'export.users.error' GetStream::Generated::Models::AsyncExportErrorEvent when 'export.users.success' diff --git a/spec/webhook_spec.rb b/spec/webhook_spec.rb index 08c0ada..559ec5a 100644 --- a/spec/webhook_spec.rb +++ b/spec/webhook_spec.rb @@ -646,6 +646,20 @@ def compute_signature(body, secret) end + it 'parses export.review_queue.error' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"export.review_queue.error"}') + expect(event.class.name).to eq('GetStream::Generated::Models::AsyncExportErrorEvent') + + end + + it 'parses export.review_queue.success' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"export.review_queue.success"}') + expect(event.class.name).to eq('GetStream::Generated::Models::AsyncExportReviewQueueEvent') + + end + it 'parses export.users.error' do event = StreamChat::Webhook.parse_webhook_event('{"type":"export.users.error"}')