diff --git a/lib/getstream_ruby/generated/chat_client.rb b/lib/getstream_ruby/generated/chat_client.rb index ce91ab9..5562f49 100644 --- a/lib/getstream_ruby/generated/chat_client.rb +++ b/lib/getstream_ruby/generated/chat_client.rb @@ -1435,23 +1435,20 @@ def delete_retention_policy(delete_retention_policy_request) ) end - # Returns paginated retention cleanup run history for the app. Server-side only. + # Returns filtered and sorted retention cleanup run history for the app. Supports filter_conditions on 'policy' (possible values: 'old-messages', 'inactive-channels') and 'date' fields. Server-side only. # - # @param limit [Integer] - # @param offset [Integer] + # @param get_retention_policy_runs_request [GetRetentionPolicyRunsRequest] # @return [Models::GetRetentionPolicyRunsResponse] - def get_retention_policy_runs(limit = nil, offset = nil) + def get_retention_policy_runs(get_retention_policy_runs_request) path = '/api/v2/chat/retention_policy/runs' - # Build query parameters - query_params = {} - query_params['limit'] = limit unless limit.nil? - query_params['offset'] = offset unless offset.nil? + # Build request body + body = get_retention_policy_runs_request # Make the API request @client.make_request( - :get, + :post, path, - query_params: query_params + body: body ) end diff --git a/lib/getstream_ruby/generated/common_client.rb b/lib/getstream_ruby/generated/common_client.rb index ef4fffb..4edfeaa 100644 --- a/lib/getstream_ruby/generated/common_client.rb +++ b/lib/getstream_ruby/generated/common_client.rb @@ -443,6 +443,62 @@ def create_import_v2_task(create_import_v2_task_request) ) end + # Removes the external storage configuration for the app. Idempotent: succeeds even if no configuration exists. + # + # @return [Models::DeleteExternalStorageResponse] + def delete_importer_external_storage() + path = '/api/v2/imports/v2/external-storage' + + # Make the API request + @client.make_request( + :delete, + path + ) + end + + # Returns the current external storage configuration for the app. Returns 404 if no configuration exists. + # + # @return [Models::GetExternalStorageResponse] + def get_importer_external_storage() + path = '/api/v2/imports/v2/external-storage' + + # Make the API request + @client.make_request( + :get, + path + ) + end + + # Creates or updates the external storage configuration for the app. Currently only AWS S3 (via cross-account IAM role assumption) is supported. + # + # @param upsert_external_storage_request [UpsertExternalStorageRequest] + # @return [Models::UpsertExternalStorageResponse] + def upsert_importer_external_storage(upsert_external_storage_request) + path = '/api/v2/imports/v2/external-storage' + # Build request body + body = upsert_external_storage_request + + # Make the API request + @client.make_request( + :put, + path, + body: body + ) + end + + # Validates the configured external S3 storage by performing a live STS AssumeRole and S3 ListObjectsV2 check. + # + # @return [Models::ValidateExternalStorageResponse] + def validate_importer_external_storage() + path = '/api/v2/imports/v2/external-storage/validate' + + # Make the API request + @client.make_request( + :post, + path + ) + end + # Deletes an import v2 task. Can only delete tasks in queued state. # # @param _id [String] diff --git a/lib/getstream_ruby/generated/feeds_client.rb b/lib/getstream_ruby/generated/feeds_client.rb index db2e589..002a7c7 100644 --- a/lib/getstream_ruby/generated/feeds_client.rb +++ b/lib/getstream_ruby/generated/feeds_client.rb @@ -596,12 +596,13 @@ def query_collections(query_collections_request) # @param depth [Integer] # @param sort [String] # @param replies_limit [Integer] + # @param id_around [String] # @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, 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, user_id = nil, limit = nil, prev = nil, _next = nil) path = '/api/v2/feeds/comments' # Build query parameters query_params = {} @@ -610,6 +611,7 @@ def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit query_params['depth'] = depth unless depth.nil? 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['user_id'] = user_id unless user_id.nil? query_params['limit'] = limit unless limit.nil? query_params['prev'] = prev unless prev.nil? @@ -733,6 +735,26 @@ def update_comment(_id, update_comment_request) ) end + # Updates certain fields of the comment. Use 'set' to update specific fields and 'unset' to remove fields.Sends events:- feeds.activity.updated- feeds.comment.updated + # + # @param _id [String] + # @param update_comment_partial_request [UpdateCommentPartialRequest] + # @return [Models::UpdateCommentPartialResponse] + def update_comment_partial(_id, update_comment_partial_request) + path = '/api/v2/feeds/comments/{id}/partial' + # Replace path parameters + path = path.gsub('{id}', _id.to_s) + # Build request body + body = update_comment_partial_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # Adds a reaction to a comment # # @param _id [String] @@ -804,12 +826,13 @@ def delete_comment_reaction(_id, _type, delete_notification_activity = nil, user # @param depth [Integer] # @param sort [String] # @param replies_limit [Integer] + # @param id_around [String] # @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, user_id = nil, limit = nil, prev = nil, _next = nil) + def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, id_around = 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) @@ -818,6 +841,7 @@ def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, user_ query_params['depth'] = depth unless depth.nil? 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['user_id'] = user_id unless user_id.nil? query_params['limit'] = limit unless limit.nil? query_params['prev'] = prev unless prev.nil? @@ -831,6 +855,26 @@ def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, user_ ) end + # Restores a soft-deleted comment by its ID. The comment and all its descendants are restored. Requires moderator permissions. + # + # @param _id [String] + # @param restore_comment_request [RestoreCommentRequest] + # @return [Models::RestoreCommentResponse] + def restore_comment(_id, restore_comment_request) + path = '/api/v2/feeds/comments/{id}/restore' + # Replace path parameters + path = path.gsub('{id}', _id.to_s) + # Build request body + body = restore_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] @@ -1606,9 +1650,10 @@ def reject_follow(reject_follow_request) # @param source [String] # @param target [String] # @param delete_notification_activity [Boolean] + # @param keep_history [Boolean] # @param enrich_own_fields [Boolean] # @return [Models::UnfollowResponse] - def unfollow(source, target, delete_notification_activity = nil, enrich_own_fields = nil) + def unfollow(source, target, delete_notification_activity = nil, keep_history = nil, enrich_own_fields = nil) path = '/api/v2/feeds/follows/{source}/{target}' # Replace path parameters path = path.gsub('{source}', source.to_s) @@ -1616,6 +1661,7 @@ def unfollow(source, target, delete_notification_activity = nil, enrich_own_fiel # Build query parameters query_params = {} query_params['delete_notification_activity'] = delete_notification_activity unless delete_notification_activity.nil? + query_params['keep_history'] = keep_history unless keep_history.nil? query_params['enrich_own_fields'] = enrich_own_fields unless enrich_own_fields.nil? # Make the API request diff --git a/lib/getstream_ruby/generated/models/activity_request.rb b/lib/getstream_ruby/generated/models/activity_request.rb index fc880ec..a3dafca 100644 --- a/lib/getstream_ruby/generated/models/activity_request.rb +++ b/lib/getstream_ruby/generated/models/activity_request.rb @@ -16,7 +16,8 @@ class ActivityRequest < GetStream::BaseModel # @return [Array] List of feeds to add the activity to with a default max limit of 25 feeds attr_accessor :feeds # @!attribute copy_custom_to_notification - # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) + # @deprecated This field is deprecated. + # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead attr_accessor :copy_custom_to_notification # @!attribute create_notification_activity # @return [Boolean] Whether to create notification activities for mentioned users diff --git a/lib/getstream_ruby/generated/models/activity_response.rb b/lib/getstream_ruby/generated/models/activity_response.rb index a41c872..bd736c1 100644 --- a/lib/getstream_ruby/generated/models/activity_response.rb +++ b/lib/getstream_ruby/generated/models/activity_response.rb @@ -150,6 +150,9 @@ class ActivityResponse < GetStream::BaseModel # @!attribute poll # @return [PollResponseData] attr_accessor :poll + # @!attribute score_vars + # @return [Object] Variable values used at ranking time. Only included when include_score_vars is enabled in enrichment options. + attr_accessor :score_vars # Initialize with attributes def initialize(attributes = {}) @@ -201,6 +204,7 @@ def initialize(attributes = {}) @notification_context = attributes[:notification_context] || attributes['notification_context'] || nil @parent = attributes[:parent] || attributes['parent'] || nil @poll = attributes[:poll] || attributes['poll'] || nil + @score_vars = attributes[:score_vars] || attributes['score_vars'] || nil end # Override field mappings for JSON serialization @@ -252,7 +256,8 @@ def self.json_field_mappings moderation: 'moderation', notification_context: 'notification_context', parent: 'parent', - poll: 'poll' + poll: 'poll', + score_vars: 'score_vars' } end end diff --git a/lib/getstream_ruby/generated/models/add_activity_request.rb b/lib/getstream_ruby/generated/models/add_activity_request.rb index 348b404..880edc4 100644 --- a/lib/getstream_ruby/generated/models/add_activity_request.rb +++ b/lib/getstream_ruby/generated/models/add_activity_request.rb @@ -16,7 +16,8 @@ class AddActivityRequest < GetStream::BaseModel # @return [Array] List of feeds to add the activity to with a default max limit of 25 feeds attr_accessor :feeds # @!attribute copy_custom_to_notification - # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) + # @deprecated This field is deprecated. + # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead attr_accessor :copy_custom_to_notification # @!attribute create_notification_activity # @return [Boolean] Whether to create notification activities for mentioned users 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 3884b5c..e3f22d9 100644 --- a/lib/getstream_ruby/generated/models/add_comment_reaction_request.rb +++ b/lib/getstream_ruby/generated/models/add_comment_reaction_request.rb @@ -13,7 +13,8 @@ class AddCommentReactionRequest < GetStream::BaseModel # @return [String] The type of reaction, eg upvote, like, ... attr_accessor :type # @!attribute copy_custom_to_notification - # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) + # @deprecated This field is deprecated. + # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead attr_accessor :copy_custom_to_notification # @!attribute create_notification_activity # @return [Boolean] Whether to create a notification activity for this reaction diff --git a/lib/getstream_ruby/generated/models/add_comment_request.rb b/lib/getstream_ruby/generated/models/add_comment_request.rb index 2939071..5e104b0 100644 --- a/lib/getstream_ruby/generated/models/add_comment_request.rb +++ b/lib/getstream_ruby/generated/models/add_comment_request.rb @@ -16,7 +16,8 @@ class AddCommentRequest < GetStream::BaseModel # @return [String] Text content of the comment attr_accessor :comment # @!attribute copy_custom_to_notification - # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) + # @deprecated This field is deprecated. + # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead attr_accessor :copy_custom_to_notification # @!attribute create_notification_activity # @return [Boolean] Whether to create a notification activity for this comment diff --git a/lib/getstream_ruby/generated/models/add_reaction_request.rb b/lib/getstream_ruby/generated/models/add_reaction_request.rb index 72245cf..0ae809c 100644 --- a/lib/getstream_ruby/generated/models/add_reaction_request.rb +++ b/lib/getstream_ruby/generated/models/add_reaction_request.rb @@ -13,7 +13,8 @@ class AddReactionRequest < GetStream::BaseModel # @return [String] Type of reaction attr_accessor :type # @!attribute copy_custom_to_notification - # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) + # @deprecated This field is deprecated. + # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead attr_accessor :copy_custom_to_notification # @!attribute create_notification_activity # @return [Boolean] Whether to create a notification activity for this reaction diff --git a/lib/getstream_ruby/generated/models/add_user_group_members_request.rb b/lib/getstream_ruby/generated/models/add_user_group_members_request.rb index 544fc5a..d3d767a 100644 --- a/lib/getstream_ruby/generated/models/add_user_group_members_request.rb +++ b/lib/getstream_ruby/generated/models/add_user_group_members_request.rb @@ -12,6 +12,9 @@ class AddUserGroupMembersRequest < GetStream::BaseModel # @!attribute member_ids # @return [Array] List of user IDs to add as members attr_accessor :member_ids + # @!attribute as_admin + # @return [Boolean] Whether to add the members as group admins. Defaults to false + attr_accessor :as_admin # @!attribute team_id # @return [String] attr_accessor :team_id @@ -20,6 +23,7 @@ class AddUserGroupMembersRequest < GetStream::BaseModel def initialize(attributes = {}) super(attributes) @member_ids = attributes[:member_ids] || attributes['member_ids'] + @as_admin = attributes[:as_admin] || attributes['as_admin'] || nil @team_id = attributes[:team_id] || attributes['team_id'] || nil end @@ -27,6 +31,7 @@ def initialize(attributes = {}) def self.json_field_mappings { member_ids: 'member_ids', + as_admin: 'as_admin', team_id: 'team_id' } end diff --git a/lib/getstream_ruby/generated/models/aggregation_config.rb b/lib/getstream_ruby/generated/models/aggregation_config.rb index e9b73dd..aaad343 100644 --- a/lib/getstream_ruby/generated/models/aggregation_config.rb +++ b/lib/getstream_ruby/generated/models/aggregation_config.rb @@ -12,17 +12,22 @@ class AggregationConfig < GetStream::BaseModel # @!attribute format # @return [String] Format for activity aggregation attr_accessor :format + # @!attribute score_strategy + # @return [String] Strategy for computing aggregated group scores from member activity scores when ranking is enabled. Valid values: sum, max, avg + attr_accessor :score_strategy # Initialize with attributes def initialize(attributes = {}) super(attributes) @format = attributes[:format] || attributes['format'] || nil + @score_strategy = attributes[:score_strategy] || attributes['score_strategy'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { - format: 'format' + format: 'format', + score_strategy: 'score_strategy' } end end diff --git a/lib/getstream_ruby/generated/models/async_export_error_event.rb b/lib/getstream_ruby/generated/models/async_export_error_event.rb index 1e922a8..85cf709 100644 --- a/lib/getstream_ruby/generated/models/async_export_error_event.rb +++ b/lib/getstream_ruby/generated/models/async_export_error_event.rb @@ -43,7 +43,7 @@ def initialize(attributes = {}) @started_at = attributes[:started_at] || attributes['started_at'] @task_id = attributes[:task_id] || attributes['task_id'] @custom = attributes[:custom] || attributes['custom'] - @type = attributes[:type] || attributes['type'] || "export.users.error" + @type = attributes[:type] || attributes['type'] || "export.moderation_logs.error" @received_at = attributes[:received_at] || attributes['received_at'] || nil end diff --git a/lib/getstream_ruby/generated/models/call_level_event_payload.rb b/lib/getstream_ruby/generated/models/call_level_event_payload.rb new file mode 100644 index 0000000..0dbe5ba --- /dev/null +++ b/lib/getstream_ruby/generated/models/call_level_event_payload.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class CallLevelEventPayload < GetStream::BaseModel + + # Model attributes + # @!attribute event_type + # @return [String] + attr_accessor :event_type + # @!attribute timestamp + # @return [Integer] + attr_accessor :timestamp + # @!attribute user_id + # @return [String] + attr_accessor :user_id + # @!attribute payload + # @return [Object] + attr_accessor :payload + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @event_type = attributes[:event_type] || attributes['event_type'] + @timestamp = attributes[:timestamp] || attributes['timestamp'] + @user_id = attributes[:user_id] || attributes['user_id'] + @payload = attributes[:payload] || attributes['payload'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + event_type: 'event_type', + timestamp: 'timestamp', + user_id: 'user_id', + payload: 'payload' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/call_stats_participant_counts.rb b/lib/getstream_ruby/generated/models/call_stats_participant_counts.rb index e476be7..fa885dc 100644 --- a/lib/getstream_ruby/generated/models/call_stats_participant_counts.rb +++ b/lib/getstream_ruby/generated/models/call_stats_participant_counts.rb @@ -27,6 +27,12 @@ class CallStatsParticipantCounts < GetStream::BaseModel # @!attribute sessions # @return [Integer] attr_accessor :sessions + # @!attribute call_event_count + # @return [Integer] + attr_accessor :call_event_count + # @!attribute cq_score + # @return [Integer] + attr_accessor :cq_score # @!attribute total_participant_duration # @return [Integer] attr_accessor :total_participant_duration @@ -40,6 +46,8 @@ def initialize(attributes = {}) @peak_concurrent_users = attributes[:peak_concurrent_users] || attributes['peak_concurrent_users'] @publishers = attributes[:publishers] || attributes['publishers'] @sessions = attributes[:sessions] || attributes['sessions'] + @call_event_count = attributes[:call_event_count] || attributes['call_event_count'] || nil + @cq_score = attributes[:cq_score] || attributes['cq_score'] || nil @total_participant_duration = attributes[:total_participant_duration] || attributes['total_participant_duration'] || nil end @@ -52,6 +60,8 @@ def self.json_field_mappings peak_concurrent_users: 'peak_concurrent_users', publishers: 'publishers', sessions: 'sessions', + call_event_count: 'call_event_count', + cq_score: 'cq_score', total_participant_duration: 'total_participant_duration' } end diff --git a/lib/getstream_ruby/generated/models/check_request.rb b/lib/getstream_ruby/generated/models/check_request.rb index 8485749..b698dbd 100644 --- a/lib/getstream_ruby/generated/models/check_request.rb +++ b/lib/getstream_ruby/generated/models/check_request.rb @@ -24,6 +24,9 @@ class CheckRequest < GetStream::BaseModel # @!attribute config_team # @return [String] Team associated with the configuration attr_accessor :config_team + # @!attribute content_published_at + # @return [DateTime] Original timestamp when the content was produced (for correlating flagged content with source video timeline) + attr_accessor :content_published_at # @!attribute test_mode # @return [Boolean] Whether to run moderation in test mode attr_accessor :test_mode @@ -51,6 +54,7 @@ def initialize(attributes = {}) @entity_type = attributes[:entity_type] || attributes['entity_type'] @config_key = attributes[:config_key] || attributes['config_key'] || nil @config_team = attributes[:config_team] || attributes['config_team'] || nil + @content_published_at = attributes[:content_published_at] || attributes['content_published_at'] || nil @test_mode = attributes[:test_mode] || attributes['test_mode'] || nil @user_id = attributes[:user_id] || attributes['user_id'] || nil @config = attributes[:config] || attributes['config'] || nil @@ -67,6 +71,7 @@ def self.json_field_mappings entity_type: 'entity_type', config_key: 'config_key', config_team: 'config_team', + content_published_at: 'content_published_at', test_mode: 'test_mode', user_id: 'user_id', config: 'config', diff --git a/lib/getstream_ruby/generated/models/comment_restored_event.rb b/lib/getstream_ruby/generated/models/comment_restored_event.rb new file mode 100644 index 0000000..88d9cf3 --- /dev/null +++ b/lib/getstream_ruby/generated/models/comment_restored_event.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Emitted when a soft-deleted comment is restored. + class CommentRestoredEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute fid + # @return [String] + attr_accessor :fid + # @!attribute comment + # @return [CommentResponse] + attr_accessor :comment + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute type + # @return [String] The type of event: "feeds.comment.restored" in this case + attr_accessor :type + # @!attribute feed_visibility + # @return [String] + attr_accessor :feed_visibility + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + # @!attribute user + # @return [UserResponseCommonFields] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @fid = attributes[:fid] || attributes['fid'] + @comment = attributes[:comment] || attributes['comment'] + @custom = attributes[:custom] || attributes['custom'] + @type = attributes[:type] || attributes['type'] || "feeds.comment.restored" + @feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || nil + @received_at = attributes[:received_at] || attributes['received_at'] || nil + @user = attributes[:user] || attributes['user'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + fid: 'fid', + comment: 'comment', + custom: 'custom', + type: 'type', + feed_visibility: 'feed_visibility', + received_at: 'received_at', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/delete_retention_policy_request.rb b/lib/getstream_ruby/generated/models/delete_retention_policy_request.rb index 89fe17e..3aab934 100644 --- a/lib/getstream_ruby/generated/models/delete_retention_policy_request.rb +++ b/lib/getstream_ruby/generated/models/delete_retention_policy_request.rb @@ -16,7 +16,7 @@ class DeleteRetentionPolicyRequest < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) - @policy = attributes[:policy] || attributes['policy'] || nil + @policy = attributes[:policy] || attributes['policy'] end # Override field mappings for JSON serialization diff --git a/lib/getstream_ruby/generated/models/enriched_collection.rb b/lib/getstream_ruby/generated/models/enriched_collection.rb new file mode 100644 index 0000000..ae3e617 --- /dev/null +++ b/lib/getstream_ruby/generated/models/enriched_collection.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 EnrichedCollection < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] + attr_accessor :created_at + # @!attribute id + # @return [String] + attr_accessor :id + # @!attribute name + # @return [String] + attr_accessor :name + # @!attribute status + # @return [String] + attr_accessor :status + # @!attribute updated_at + # @return [DateTime] + attr_accessor :updated_at + # @!attribute user_id + # @return [String] + attr_accessor :user_id + # @!attribute custom + # @return [Object] + attr_accessor :custom + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @id = attributes[:id] || attributes['id'] + @name = attributes[:name] || attributes['name'] + @status = attributes[:status] || attributes['status'] + @updated_at = attributes[:updated_at] || attributes['updated_at'] + @user_id = attributes[:user_id] || attributes['user_id'] + @custom = attributes[:custom] || attributes['custom'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + id: 'id', + name: 'name', + status: 'status', + updated_at: 'updated_at', + user_id: 'user_id', + custom: 'custom' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/enrichment_options.rb b/lib/getstream_ruby/generated/models/enrichment_options.rb index 4751901..22a793f 100644 --- a/lib/getstream_ruby/generated/models/enrichment_options.rb +++ b/lib/getstream_ruby/generated/models/enrichment_options.rb @@ -12,6 +12,9 @@ class EnrichmentOptions < GetStream::BaseModel # @!attribute enrich_own_followings # @return [Boolean] Default: false. When true, includes fetching and enriching own_followings (follows where activity author's feeds follow current user's feeds). attr_accessor :enrich_own_followings + # @!attribute include_score_vars + # @return [Boolean] Default: false. When true, includes score_vars in activity responses containing variable values used at ranking time. + attr_accessor :include_score_vars # @!attribute skip_activity # @return [Boolean] Default: false. When true, skips all activity enrichments. attr_accessor :skip_activity @@ -68,6 +71,7 @@ class EnrichmentOptions < GetStream::BaseModel def initialize(attributes = {}) super(attributes) @enrich_own_followings = attributes[:enrich_own_followings] || attributes['enrich_own_followings'] || nil + @include_score_vars = attributes[:include_score_vars] || attributes['include_score_vars'] || nil @skip_activity = attributes[:skip_activity] || attributes['skip_activity'] || nil @skip_activity_collections = attributes[:skip_activity_collections] || attributes['skip_activity_collections'] || nil @skip_activity_comments = attributes[:skip_activity_comments] || attributes['skip_activity_comments'] || nil @@ -91,6 +95,7 @@ def initialize(attributes = {}) def self.json_field_mappings { enrich_own_followings: 'enrich_own_followings', + include_score_vars: 'include_score_vars', skip_activity: 'skip_activity', skip_activity_collections: 'skip_activity_collections', skip_activity_comments: 'skip_activity_comments', diff --git a/lib/getstream_ruby/generated/models/escalate_payload.rb b/lib/getstream_ruby/generated/models/escalate_payload.rb new file mode 100644 index 0000000..f17fec8 --- /dev/null +++ b/lib/getstream_ruby/generated/models/escalate_payload.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 + # Configuration for escalation action + class EscalatePayload < GetStream::BaseModel + + # Model attributes + # @!attribute notes + # @return [String] Additional context for the reviewer + attr_accessor :notes + # @!attribute priority + # @return [String] Priority of the escalation (low, medium, high) + attr_accessor :priority + # @!attribute reason + # @return [String] Reason for the escalation (from configured escalation_reasons) + attr_accessor :reason + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @notes = attributes[:notes] || attributes['notes'] || nil + @priority = attributes[:priority] || attributes['priority'] || nil + @reason = attributes[:reason] || attributes['reason'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + notes: 'notes', + priority: 'priority', + reason: 'reason' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/escalation_metadata.rb b/lib/getstream_ruby/generated/models/escalation_metadata.rb new file mode 100644 index 0000000..b221875 --- /dev/null +++ b/lib/getstream_ruby/generated/models/escalation_metadata.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 EscalationMetadata < GetStream::BaseModel + + # Model attributes + # @!attribute notes + # @return [String] + attr_accessor :notes + # @!attribute priority + # @return [String] + attr_accessor :priority + # @!attribute reason + # @return [String] + attr_accessor :reason + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @notes = attributes[:notes] || attributes['notes'] || nil + @priority = attributes[:priority] || attributes['priority'] || nil + @reason = attributes[:reason] || attributes['reason'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + notes: 'notes', + priority: 'priority', + reason: 'reason' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/feeds_preferences.rb b/lib/getstream_ruby/generated/models/feeds_preferences.rb index 76fa141..3b2e19b 100644 --- a/lib/getstream_ruby/generated/models/feeds_preferences.rb +++ b/lib/getstream_ruby/generated/models/feeds_preferences.rb @@ -12,6 +12,9 @@ class FeedsPreferences < GetStream::BaseModel # @!attribute comment # @return [String] Push notification preference for comments on user's activities. One of: all, none attr_accessor :comment + # @!attribute comment_mention + # @return [String] Push notification preference for mentions in comments. One of: all, none + attr_accessor :comment_mention # @!attribute comment_reaction # @return [String] Push notification preference for reactions on comments. One of: all, none attr_accessor :comment_reaction @@ -22,7 +25,7 @@ class FeedsPreferences < GetStream::BaseModel # @return [String] Push notification preference for new followers. One of: all, none attr_accessor :follow # @!attribute mention - # @return [String] Push notification preference for mentions in activities or comments. One of: all, none + # @return [String] Push notification preference for mentions in activities. One of: all, none attr_accessor :mention # @!attribute reaction # @return [String] Push notification preference for reactions on user's activities or comments. One of: all, none @@ -35,6 +38,7 @@ class FeedsPreferences < GetStream::BaseModel def initialize(attributes = {}) super(attributes) @comment = attributes[:comment] || attributes['comment'] || nil + @comment_mention = attributes[:comment_mention] || attributes['comment_mention'] || nil @comment_reaction = attributes[:comment_reaction] || attributes['comment_reaction'] || nil @comment_reply = attributes[:comment_reply] || attributes['comment_reply'] || nil @follow = attributes[:follow] || attributes['follow'] || nil @@ -47,6 +51,7 @@ def initialize(attributes = {}) def self.json_field_mappings { comment: 'comment', + comment_mention: 'comment_mention', comment_reaction: 'comment_reaction', comment_reply: 'comment_reply', follow: 'follow', diff --git a/lib/getstream_ruby/generated/models/feeds_preferences_response.rb b/lib/getstream_ruby/generated/models/feeds_preferences_response.rb index 6ca5402..ab7dcf9 100644 --- a/lib/getstream_ruby/generated/models/feeds_preferences_response.rb +++ b/lib/getstream_ruby/generated/models/feeds_preferences_response.rb @@ -12,6 +12,9 @@ class FeedsPreferencesResponse < GetStream::BaseModel # @!attribute comment # @return [String] attr_accessor :comment + # @!attribute comment_mention + # @return [String] + attr_accessor :comment_mention # @!attribute comment_reaction # @return [String] attr_accessor :comment_reaction @@ -35,6 +38,7 @@ class FeedsPreferencesResponse < GetStream::BaseModel def initialize(attributes = {}) super(attributes) @comment = attributes[:comment] || attributes['comment'] || nil + @comment_mention = attributes[:comment_mention] || attributes['comment_mention'] || nil @comment_reaction = attributes[:comment_reaction] || attributes['comment_reaction'] || nil @comment_reply = attributes[:comment_reply] || attributes['comment_reply'] || nil @follow = attributes[:follow] || attributes['follow'] || nil @@ -47,6 +51,7 @@ def initialize(attributes = {}) def self.json_field_mappings { comment: 'comment', + comment_mention: 'comment_mention', comment_reaction: 'comment_reaction', comment_reply: 'comment_reply', follow: 'follow', diff --git a/lib/getstream_ruby/generated/models/feeds_reaction_group.rb b/lib/getstream_ruby/generated/models/feeds_reaction_group.rb new file mode 100644 index 0000000..7b8cc62 --- /dev/null +++ b/lib/getstream_ruby/generated/models/feeds_reaction_group.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 FeedsReactionGroup < GetStream::BaseModel + + # Model attributes + # @!attribute count + # @return [Integer] + attr_accessor :count + # @!attribute first_reaction_at + # @return [DateTime] + attr_accessor :first_reaction_at + # @!attribute last_reaction_at + # @return [DateTime] + attr_accessor :last_reaction_at + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @count = attributes[:count] || attributes['count'] + @first_reaction_at = attributes[:first_reaction_at] || attributes['first_reaction_at'] + @last_reaction_at = attributes[:last_reaction_at] || attributes['last_reaction_at'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + count: 'count', + first_reaction_at: 'first_reaction_at', + last_reaction_at: 'last_reaction_at' + } + 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 new file mode 100644 index 0000000..3fccc79 --- /dev/null +++ b/lib/getstream_ruby/generated/models/feeds_v3_activity_response.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class FeedsV3ActivityResponse < GetStream::BaseModel + + # Model attributes + # @!attribute bookmark_count + # @return [Integer] + attr_accessor :bookmark_count + # @!attribute comment_count + # @return [Integer] + attr_accessor :comment_count + # @!attribute created_at + # @return [DateTime] + attr_accessor :created_at + # @!attribute hidden + # @return [Boolean] + attr_accessor :hidden + # @!attribute id + # @return [String] + attr_accessor :id + # @!attribute popularity + # @return [Integer] + attr_accessor :popularity + # @!attribute preview + # @return [Boolean] + attr_accessor :preview + # @!attribute reaction_count + # @return [Integer] + attr_accessor :reaction_count + # @!attribute restrict_replies + # @return [String] + attr_accessor :restrict_replies + # @!attribute score + # @return [Float] + attr_accessor :score + # @!attribute share_count + # @return [Integer] + attr_accessor :share_count + # @!attribute type + # @return [String] + attr_accessor :type + # @!attribute updated_at + # @return [DateTime] + attr_accessor :updated_at + # @!attribute visibility + # @return [String] + attr_accessor :visibility + # @!attribute attachments + # @return [Array] + attr_accessor :attachments + # @!attribute comments + # @return [Array] + attr_accessor :comments + # @!attribute feeds + # @return [Array] + attr_accessor :feeds + # @!attribute filter_tags + # @return [Array] + attr_accessor :filter_tags + # @!attribute interest_tags + # @return [Array] + attr_accessor :interest_tags + # @!attribute latest_reactions + # @return [Array] + attr_accessor :latest_reactions + # @!attribute mentioned_users + # @return [Array] + attr_accessor :mentioned_users + # @!attribute own_bookmarks + # @return [Array] + attr_accessor :own_bookmarks + # @!attribute own_reactions + # @return [Array] + attr_accessor :own_reactions + # @!attribute collections + # @return [Hash] + attr_accessor :collections + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute reaction_groups + # @return [Hash] + attr_accessor :reaction_groups + # @!attribute search_data + # @return [Object] + attr_accessor :search_data + # @!attribute user + # @return [UserResponse] + attr_accessor :user + # @!attribute deleted_at + # @return [DateTime] + attr_accessor :deleted_at + # @!attribute edited_at + # @return [DateTime] + attr_accessor :edited_at + # @!attribute expires_at + # @return [DateTime] + attr_accessor :expires_at + # @!attribute moderation_action + # @return [String] + attr_accessor :moderation_action + # @!attribute text + # @return [String] + attr_accessor :text + # @!attribute visibility_tag + # @return [String] + attr_accessor :visibility_tag + # @!attribute metrics + # @return [Hash] + attr_accessor :metrics + # @!attribute moderation + # @return [ModerationV2Response] + attr_accessor :moderation + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @bookmark_count = attributes[:bookmark_count] || attributes['bookmark_count'] + @comment_count = attributes[:comment_count] || attributes['comment_count'] + @created_at = attributes[:created_at] || attributes['created_at'] + @hidden = attributes[:hidden] || attributes['hidden'] + @id = attributes[:id] || attributes['id'] + @popularity = attributes[:popularity] || attributes['popularity'] + @preview = attributes[:preview] || attributes['preview'] + @reaction_count = attributes[:reaction_count] || attributes['reaction_count'] + @restrict_replies = attributes[:restrict_replies] || attributes['restrict_replies'] + @score = attributes[:score] || attributes['score'] + @share_count = attributes[:share_count] || attributes['share_count'] + @type = attributes[:type] || attributes['type'] + @updated_at = attributes[:updated_at] || attributes['updated_at'] + @visibility = attributes[:visibility] || attributes['visibility'] + @attachments = attributes[:attachments] || attributes['attachments'] + @comments = attributes[:comments] || attributes['comments'] + @feeds = attributes[:feeds] || attributes['feeds'] + @filter_tags = attributes[:filter_tags] || attributes['filter_tags'] + @interest_tags = attributes[:interest_tags] || attributes['interest_tags'] + @latest_reactions = attributes[:latest_reactions] || attributes['latest_reactions'] + @mentioned_users = attributes[:mentioned_users] || attributes['mentioned_users'] + @own_bookmarks = attributes[:own_bookmarks] || attributes['own_bookmarks'] + @own_reactions = attributes[:own_reactions] || attributes['own_reactions'] + @collections = attributes[:collections] || attributes['collections'] + @custom = attributes[:custom] || attributes['custom'] + @reaction_groups = attributes[:reaction_groups] || attributes['reaction_groups'] + @search_data = attributes[:search_data] || attributes['search_data'] + @user = attributes[:user] || attributes['user'] + @deleted_at = attributes[:deleted_at] || attributes['deleted_at'] || nil + @edited_at = attributes[:edited_at] || attributes['edited_at'] || nil + @expires_at = attributes[:expires_at] || attributes['expires_at'] || nil + @moderation_action = attributes[:moderation_action] || attributes['moderation_action'] || nil + @text = attributes[:text] || attributes['text'] || nil + @visibility_tag = attributes[:visibility_tag] || attributes['visibility_tag'] || nil + @metrics = attributes[:metrics] || attributes['metrics'] || nil + @moderation = attributes[:moderation] || attributes['moderation'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + bookmark_count: 'bookmark_count', + comment_count: 'comment_count', + created_at: 'created_at', + hidden: 'hidden', + id: 'id', + popularity: 'popularity', + preview: 'preview', + reaction_count: 'reaction_count', + restrict_replies: 'restrict_replies', + score: 'score', + share_count: 'share_count', + type: 'type', + updated_at: 'updated_at', + visibility: 'visibility', + attachments: 'attachments', + comments: 'comments', + feeds: 'feeds', + filter_tags: 'filter_tags', + interest_tags: 'interest_tags', + latest_reactions: 'latest_reactions', + mentioned_users: 'mentioned_users', + own_bookmarks: 'own_bookmarks', + own_reactions: 'own_reactions', + collections: 'collections', + custom: 'custom', + reaction_groups: 'reaction_groups', + search_data: 'search_data', + user: 'user', + deleted_at: 'deleted_at', + edited_at: 'edited_at', + expires_at: 'expires_at', + moderation_action: 'moderation_action', + text: 'text', + visibility_tag: 'visibility_tag', + metrics: 'metrics', + moderation: 'moderation' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/feeds_v3_comment_response.rb b/lib/getstream_ruby/generated/models/feeds_v3_comment_response.rb new file mode 100644 index 0000000..30d0937 --- /dev/null +++ b/lib/getstream_ruby/generated/models/feeds_v3_comment_response.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class FeedsV3CommentResponse < GetStream::BaseModel + + # Model attributes + # @!attribute _object_id + # @return [String] + attr_accessor :_object_id + # @!attribute confidence_score + # @return [Float] + attr_accessor :confidence_score + # @!attribute created_at + # @return [DateTime] + attr_accessor :created_at + # @!attribute downvote_count + # @return [Integer] + attr_accessor :downvote_count + # @!attribute id + # @return [String] + attr_accessor :id + # @!attribute object_type + # @return [String] + attr_accessor :object_type + # @!attribute reaction_count + # @return [Integer] + attr_accessor :reaction_count + # @!attribute reply_count + # @return [Integer] + attr_accessor :reply_count + # @!attribute score + # @return [Integer] + attr_accessor :score + # @!attribute status + # @return [String] + attr_accessor :status + # @!attribute updated_at + # @return [DateTime] + attr_accessor :updated_at + # @!attribute upvote_count + # @return [Integer] + attr_accessor :upvote_count + # @!attribute mentioned_users + # @return [Array] + attr_accessor :mentioned_users + # @!attribute own_reactions + # @return [Array] + attr_accessor :own_reactions + # @!attribute user + # @return [UserResponse] + attr_accessor :user + # @!attribute controversy_score + # @return [Float] + attr_accessor :controversy_score + # @!attribute deleted_at + # @return [DateTime] + attr_accessor :deleted_at + # @!attribute edited_at + # @return [DateTime] + attr_accessor :edited_at + # @!attribute parent_id + # @return [String] + attr_accessor :parent_id + # @!attribute text + # @return [String] + attr_accessor :text + # @!attribute attachments + # @return [Array] + attr_accessor :attachments + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute moderation + # @return [ModerationV2Response] + attr_accessor :moderation + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @_object_id = attributes[:_object_id] || attributes['object_id'] + @confidence_score = attributes[:confidence_score] || attributes['confidence_score'] + @created_at = attributes[:created_at] || attributes['created_at'] + @downvote_count = attributes[:downvote_count] || attributes['downvote_count'] + @id = attributes[:id] || attributes['id'] + @object_type = attributes[:object_type] || attributes['object_type'] + @reaction_count = attributes[:reaction_count] || attributes['reaction_count'] + @reply_count = attributes[:reply_count] || attributes['reply_count'] + @score = attributes[:score] || attributes['score'] + @status = attributes[:status] || attributes['status'] + @updated_at = attributes[:updated_at] || attributes['updated_at'] + @upvote_count = attributes[:upvote_count] || attributes['upvote_count'] + @mentioned_users = attributes[:mentioned_users] || attributes['mentioned_users'] + @own_reactions = attributes[:own_reactions] || attributes['own_reactions'] + @user = attributes[:user] || attributes['user'] + @controversy_score = attributes[:controversy_score] || attributes['controversy_score'] || nil + @deleted_at = attributes[:deleted_at] || attributes['deleted_at'] || nil + @edited_at = attributes[:edited_at] || attributes['edited_at'] || nil + @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil + @text = attributes[:text] || attributes['text'] || nil + @attachments = attributes[:attachments] || attributes['attachments'] || nil + @custom = attributes[:custom] || attributes['custom'] || nil + @moderation = attributes[:moderation] || attributes['moderation'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + _object_id: 'object_id', + confidence_score: 'confidence_score', + created_at: 'created_at', + downvote_count: 'downvote_count', + id: 'id', + object_type: 'object_type', + reaction_count: 'reaction_count', + reply_count: 'reply_count', + score: 'score', + status: 'status', + updated_at: 'updated_at', + upvote_count: 'upvote_count', + mentioned_users: 'mentioned_users', + own_reactions: 'own_reactions', + user: 'user', + controversy_score: 'controversy_score', + deleted_at: 'deleted_at', + edited_at: 'edited_at', + parent_id: 'parent_id', + text: 'text', + attachments: 'attachments', + custom: 'custom', + moderation: 'moderation' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/follow_request.rb b/lib/getstream_ruby/generated/models/follow_request.rb index 68ef004..b88076f 100644 --- a/lib/getstream_ruby/generated/models/follow_request.rb +++ b/lib/getstream_ruby/generated/models/follow_request.rb @@ -16,7 +16,8 @@ class FollowRequest < GetStream::BaseModel # @return [String] Fully qualified ID of the target feed attr_accessor :target # @!attribute copy_custom_to_notification - # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) + # @deprecated This field is deprecated. + # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead attr_accessor :copy_custom_to_notification # @!attribute create_notification_activity # @return [Boolean] Whether to create a notification activity for this follow diff --git a/lib/getstream_ruby/generated/models/get_external_storage_awss3_response.rb b/lib/getstream_ruby/generated/models/get_external_storage_awss3_response.rb new file mode 100644 index 0000000..95abbb4 --- /dev/null +++ b/lib/getstream_ruby/generated/models/get_external_storage_awss3_response.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class GetExternalStorageAWSS3Response < GetStream::BaseModel + + # Model attributes + # @!attribute bucket + # @return [String] + attr_accessor :bucket + # @!attribute region + # @return [String] + attr_accessor :region + # @!attribute role_arn + # @return [String] + attr_accessor :role_arn + # @!attribute path_prefix + # @return [String] + attr_accessor :path_prefix + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @bucket = attributes[:bucket] || attributes['bucket'] + @region = attributes[:region] || attributes['region'] + @role_arn = attributes[:role_arn] || attributes['role_arn'] + @path_prefix = attributes[:path_prefix] || attributes['path_prefix'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + bucket: 'bucket', + region: 'region', + role_arn: 'role_arn', + path_prefix: 'path_prefix' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/get_external_storage_response.rb b/lib/getstream_ruby/generated/models/get_external_storage_response.rb new file mode 100644 index 0000000..2189bf1 --- /dev/null +++ b/lib/getstream_ruby/generated/models/get_external_storage_response.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Basic response information + class GetExternalStorageResponse < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] + attr_accessor :created_at + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + # @!attribute type + # @return [String] + attr_accessor :type + # @!attribute updated_at + # @return [DateTime] + attr_accessor :updated_at + # @!attribute aws_s3 + # @return [GetExternalStorageAWSS3Response] + attr_accessor :aws_s3 + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @duration = attributes[:duration] || attributes['duration'] + @type = attributes[:type] || attributes['type'] + @updated_at = attributes[:updated_at] || attributes['updated_at'] + @aws_s3 = attributes[:aws_s3] || attributes['aws_s3'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + duration: 'duration', + type: 'type', + updated_at: 'updated_at', + aws_s3: 'aws_s3' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/get_flag_count_request.rb b/lib/getstream_ruby/generated/models/get_flag_count_request.rb new file mode 100644 index 0000000..867674b --- /dev/null +++ b/lib/getstream_ruby/generated/models/get_flag_count_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 GetFlagCountRequest < GetStream::BaseModel + + # Model attributes + # @!attribute entity_creator_id + # @return [String] ID of the user whose content was flagged + attr_accessor :entity_creator_id + # @!attribute entity_type + # @return [String] Optional entity type filter (e.g., stream:chat:v1:message, stream:user) + attr_accessor :entity_type + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @entity_creator_id = attributes[:entity_creator_id] || attributes['entity_creator_id'] + @entity_type = attributes[:entity_type] || attributes['entity_type'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + entity_creator_id: 'entity_creator_id', + entity_type: 'entity_type' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/get_flag_count_response.rb b/lib/getstream_ruby/generated/models/get_flag_count_response.rb new file mode 100644 index 0000000..eeb2df9 --- /dev/null +++ b/lib/getstream_ruby/generated/models/get_flag_count_response.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class GetFlagCountResponse < GetStream::BaseModel + + # Model attributes + # @!attribute count + # @return [Integer] Total number of flags against the specified user's content + attr_accessor :count + # @!attribute duration + # @return [String] + attr_accessor :duration + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @count = attributes[:count] || attributes['count'] + @duration = attributes[:duration] || attributes['duration'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + count: 'count', + duration: 'duration' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/get_retention_policy_runs_request.rb b/lib/getstream_ruby/generated/models/get_retention_policy_runs_request.rb new file mode 100644 index 0000000..1619764 --- /dev/null +++ b/lib/getstream_ruby/generated/models/get_retention_policy_runs_request.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class GetRetentionPolicyRunsRequest < GetStream::BaseModel + + # Model attributes + # @!attribute limit + # @return [Integer] + attr_accessor :limit + # @!attribute next + # @return [String] + attr_accessor :next + # @!attribute prev + # @return [String] + attr_accessor :prev + # @!attribute sort + # @return [Array] Array of sort parameters + attr_accessor :sort + # @!attribute filter_conditions + # @return [Object] Filter conditions to apply to the query + attr_accessor :filter_conditions + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @limit = attributes[:limit] || attributes['limit'] || nil + @next = attributes[:next] || attributes['next'] || nil + @prev = attributes[:prev] || attributes['prev'] || nil + @sort = attributes[:sort] || attributes['sort'] || nil + @filter_conditions = attributes[:filter_conditions] || attributes['filter_conditions'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + limit: 'limit', + next: 'next', + prev: 'prev', + sort: 'sort', + filter_conditions: 'filter_conditions' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/get_retention_policy_runs_response.rb b/lib/getstream_ruby/generated/models/get_retention_policy_runs_response.rb index 162d00b..2dac844 100644 --- a/lib/getstream_ruby/generated/models/get_retention_policy_runs_response.rb +++ b/lib/getstream_ruby/generated/models/get_retention_policy_runs_response.rb @@ -13,21 +13,31 @@ class GetRetentionPolicyRunsResponse < GetStream::BaseModel # @return [String] Duration of the request in milliseconds attr_accessor :duration # @!attribute runs - # @return [Array] + # @return [Array] attr_accessor :runs + # @!attribute next + # @return [String] + attr_accessor :next + # @!attribute prev + # @return [String] + attr_accessor :prev # Initialize with attributes def initialize(attributes = {}) super(attributes) @duration = attributes[:duration] || attributes['duration'] @runs = attributes[:runs] || attributes['runs'] + @next = attributes[:next] || attributes['next'] || nil + @prev = attributes[:prev] || attributes['prev'] || nil end # Override field mappings for JSON serialization def self.json_field_mappings { duration: 'duration', - runs: 'runs' + runs: 'runs', + next: 'next', + prev: 'prev' } end end diff --git a/lib/getstream_ruby/generated/models/image_content_parameters.rb b/lib/getstream_ruby/generated/models/image_content_parameters.rb index 505e96b..6b24547 100644 --- a/lib/getstream_ruby/generated/models/image_content_parameters.rb +++ b/lib/getstream_ruby/generated/models/image_content_parameters.rb @@ -9,6 +9,9 @@ module Models class ImageContentParameters < GetStream::BaseModel # Model attributes + # @!attribute label_operator + # @return [String] + attr_accessor :label_operator # @!attribute min_confidence # @return [Float] attr_accessor :min_confidence @@ -19,6 +22,7 @@ class ImageContentParameters < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @label_operator = attributes[:label_operator] || attributes['label_operator'] || nil @min_confidence = attributes[:min_confidence] || attributes['min_confidence'] || nil @harm_labels = attributes[:harm_labels] || attributes['harm_labels'] || nil end @@ -26,6 +30,7 @@ def initialize(attributes = {}) # Override field mappings for JSON serialization def self.json_field_mappings { + label_operator: 'label_operator', min_confidence: 'min_confidence', harm_labels: 'harm_labels' } diff --git a/lib/getstream_ruby/generated/models/insert_action_log_request.rb b/lib/getstream_ruby/generated/models/insert_action_log_request.rb new file mode 100644 index 0000000..8b26b60 --- /dev/null +++ b/lib/getstream_ruby/generated/models/insert_action_log_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 + # Request to insert a moderation action log entry + class InsertActionLogRequest < GetStream::BaseModel + + # Model attributes + # @!attribute action_type + # @return [String] Type of moderation action taken + attr_accessor :action_type + # @!attribute entity_creator_id + # @return [String] ID of the user who created the entity + attr_accessor :entity_creator_id + # @!attribute entity_id + # @return [String] ID of the entity the action was taken on + attr_accessor :entity_id + # @!attribute entity_type + # @return [String] Type of entity the action was taken on + attr_accessor :entity_type + # @!attribute reason + # @return [String] Reason for the action + attr_accessor :reason + # @!attribute custom + # @return [Object] Custom metadata for the action log + attr_accessor :custom + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @action_type = attributes[:action_type] || attributes['action_type'] + @entity_creator_id = attributes[:entity_creator_id] || attributes['entity_creator_id'] + @entity_id = attributes[:entity_id] || attributes['entity_id'] + @entity_type = attributes[:entity_type] || attributes['entity_type'] + @reason = attributes[:reason] || attributes['reason'] || nil + @custom = attributes[:custom] || attributes['custom'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + action_type: 'action_type', + entity_creator_id: 'entity_creator_id', + entity_id: 'entity_id', + entity_type: 'entity_type', + reason: 'reason', + custom: 'custom' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/insert_action_log_response.rb b/lib/getstream_ruby/generated/models/insert_action_log_response.rb new file mode 100644 index 0000000..05a31a3 --- /dev/null +++ b/lib/getstream_ruby/generated/models/insert_action_log_response.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Response after inserting a moderation action log + class InsertActionLogResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] + attr_accessor :duration + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/moderation_action_config_response.rb b/lib/getstream_ruby/generated/models/moderation_action_config_response.rb index 355b897..d801e9f 100644 --- a/lib/getstream_ruby/generated/models/moderation_action_config_response.rb +++ b/lib/getstream_ruby/generated/models/moderation_action_config_response.rb @@ -24,6 +24,9 @@ class ModerationActionConfigResponse < GetStream::BaseModel # @!attribute order # @return [Integer] Display order (lower numbers shown first) attr_accessor :order + # @!attribute queue_type + # @return [String] Queue type this action config belongs to + attr_accessor :queue_type # @!attribute custom # @return [Object] Custom data for the action attr_accessor :custom @@ -36,6 +39,7 @@ def initialize(attributes = {}) @entity_type = attributes[:entity_type] || attributes['entity_type'] @icon = attributes[:icon] || attributes['icon'] @order = attributes[:order] || attributes['order'] + @queue_type = attributes[:queue_type] || attributes['queue_type'] || nil @custom = attributes[:custom] || attributes['custom'] || nil end @@ -47,6 +51,7 @@ def self.json_field_mappings entity_type: 'entity_type', icon: 'icon', order: 'order', + queue_type: 'queue_type', custom: 'custom' } end diff --git a/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb b/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb index 170f221..3c7d60f 100644 --- a/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb +++ b/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb @@ -18,6 +18,9 @@ class ModerationDashboardPreferences < GetStream::BaseModel # @!attribute disable_flagging_reviewed_entity # @return [Boolean] attr_accessor :disable_flagging_reviewed_entity + # @!attribute escalation_queue_enabled + # @return [Boolean] + attr_accessor :escalation_queue_enabled # @!attribute flag_user_on_flagged_content # @return [Boolean] attr_accessor :flag_user_on_flagged_content @@ -27,6 +30,9 @@ class ModerationDashboardPreferences < GetStream::BaseModel # @!attribute allowed_moderation_action_reasons # @return [Array] attr_accessor :allowed_moderation_action_reasons + # @!attribute escalation_reasons + # @return [Array] + attr_accessor :escalation_reasons # @!attribute keyframe_classifications_map # @return [Hash>] attr_accessor :keyframe_classifications_map @@ -40,9 +46,11 @@ def initialize(attributes = {}) @async_review_queue_upsert = attributes[:async_review_queue_upsert] || attributes['async_review_queue_upsert'] || 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 @media_queue_blur_enabled = attributes[:media_queue_blur_enabled] || attributes['media_queue_blur_enabled'] || nil @allowed_moderation_action_reasons = attributes[:allowed_moderation_action_reasons] || attributes['allowed_moderation_action_reasons'] || nil + @escalation_reasons = attributes[:escalation_reasons] || attributes['escalation_reasons'] || nil @keyframe_classifications_map = attributes[:keyframe_classifications_map] || attributes['keyframe_classifications_map'] || nil @overview_dashboard = attributes[:overview_dashboard] || attributes['overview_dashboard'] || nil end @@ -53,9 +61,11 @@ def self.json_field_mappings async_review_queue_upsert: 'async_review_queue_upsert', 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', media_queue_blur_enabled: 'media_queue_blur_enabled', allowed_moderation_action_reasons: 'allowed_moderation_action_reasons', + escalation_reasons: 'escalation_reasons', keyframe_classifications_map: 'keyframe_classifications_map', overview_dashboard: 'overview_dashboard' } diff --git a/lib/getstream_ruby/generated/models/notification_target.rb b/lib/getstream_ruby/generated/models/notification_target.rb index 2a449c6..9cb4283 100644 --- a/lib/getstream_ruby/generated/models/notification_target.rb +++ b/lib/getstream_ruby/generated/models/notification_target.rb @@ -30,6 +30,9 @@ class NotificationTarget < GetStream::BaseModel # @!attribute comment # @return [NotificationComment] attr_accessor :comment + # @!attribute custom + # @return [Object] Custom data from the target activity + attr_accessor :custom # @!attribute parent_activity # @return [NotificationParentActivity] attr_accessor :parent_activity @@ -44,6 +47,7 @@ def initialize(attributes = {}) @user_id = attributes[:user_id] || attributes['user_id'] || nil @attachments = attributes[:attachments] || attributes['attachments'] || nil @comment = attributes[:comment] || attributes['comment'] || nil + @custom = attributes[:custom] || attributes['custom'] || nil @parent_activity = attributes[:parent_activity] || attributes['parent_activity'] || nil end @@ -57,6 +61,7 @@ def self.json_field_mappings user_id: 'user_id', attachments: 'attachments', comment: 'comment', + custom: 'custom', parent_activity: 'parent_activity' } end diff --git a/lib/getstream_ruby/generated/models/notification_trigger.rb b/lib/getstream_ruby/generated/models/notification_trigger.rb index 8414bb7..aec3b32 100644 --- a/lib/getstream_ruby/generated/models/notification_trigger.rb +++ b/lib/getstream_ruby/generated/models/notification_trigger.rb @@ -18,6 +18,9 @@ class NotificationTrigger < GetStream::BaseModel # @!attribute comment # @return [NotificationComment] attr_accessor :comment + # @!attribute custom + # @return [Object] Custom data from the trigger object (comment, reaction, etc.) + attr_accessor :custom # Initialize with attributes def initialize(attributes = {}) @@ -25,6 +28,7 @@ def initialize(attributes = {}) @text = attributes[:text] || attributes['text'] @type = attributes[:type] || attributes['type'] @comment = attributes[:comment] || attributes['comment'] || nil + @custom = attributes[:custom] || attributes['custom'] || nil end # Override field mappings for JSON serialization @@ -32,7 +36,8 @@ def self.json_field_mappings { text: 'text', type: 'type', - comment: 'comment' + comment: 'comment', + custom: 'custom' } end end diff --git a/lib/getstream_ruby/generated/models/query_banned_users_payload.rb b/lib/getstream_ruby/generated/models/query_banned_users_payload.rb index c46c642..2b78832 100644 --- a/lib/getstream_ruby/generated/models/query_banned_users_payload.rb +++ b/lib/getstream_ruby/generated/models/query_banned_users_payload.rb @@ -10,7 +10,7 @@ class QueryBannedUsersPayload < GetStream::BaseModel # Model attributes # @!attribute filter_conditions - # @return [Object] + # @return [Object] Filter conditions to apply to the query attr_accessor :filter_conditions # @!attribute exclude_expired_bans # @return [Boolean] Whether to exclude expired bans or not diff --git a/lib/getstream_ruby/generated/models/query_call_members_request.rb b/lib/getstream_ruby/generated/models/query_call_members_request.rb index b5ebc50..4eacae2 100644 --- a/lib/getstream_ruby/generated/models/query_call_members_request.rb +++ b/lib/getstream_ruby/generated/models/query_call_members_request.rb @@ -25,10 +25,10 @@ class QueryCallMembersRequest < GetStream::BaseModel # @return [String] attr_accessor :prev # @!attribute sort - # @return [Array] + # @return [Array] Array of sort parameters attr_accessor :sort # @!attribute filter_conditions - # @return [Object] + # @return [Object] Filter conditions to apply to the query attr_accessor :filter_conditions # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/query_call_participants_request.rb b/lib/getstream_ruby/generated/models/query_call_participants_request.rb index bcbe6be..ca195e8 100644 --- a/lib/getstream_ruby/generated/models/query_call_participants_request.rb +++ b/lib/getstream_ruby/generated/models/query_call_participants_request.rb @@ -10,7 +10,7 @@ class QueryCallParticipantsRequest < GetStream::BaseModel # Model attributes # @!attribute filter_conditions - # @return [Object] + # @return [Object] Filter conditions to apply to the query attr_accessor :filter_conditions # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/query_call_session_participant_stats_response.rb b/lib/getstream_ruby/generated/models/query_call_session_participant_stats_response.rb index a5a7876..5212e86 100644 --- a/lib/getstream_ruby/generated/models/query_call_session_participant_stats_response.rb +++ b/lib/getstream_ruby/generated/models/query_call_session_participant_stats_response.rb @@ -42,6 +42,9 @@ class QueryCallSessionParticipantStatsResponse < GetStream::BaseModel # @!attribute tmp_data_source # @return [String] attr_accessor :tmp_data_source + # @!attribute call_events + # @return [Array] + attr_accessor :call_events # Initialize with attributes def initialize(attributes = {}) @@ -57,6 +60,7 @@ def initialize(attributes = {}) @next = attributes[:next] || attributes['next'] || nil @prev = attributes[:prev] || attributes['prev'] || nil @tmp_data_source = attributes[:tmp_data_source] || attributes['tmp_data_source'] || nil + @call_events = attributes[:call_events] || attributes['call_events'] || nil end # Override field mappings for JSON serialization @@ -72,7 +76,8 @@ def self.json_field_mappings call_started_at: 'call_started_at', next: 'next', prev: 'prev', - tmp_data_source: 'tmp_data_source' + tmp_data_source: 'tmp_data_source', + call_events: 'call_events' } end end diff --git a/lib/getstream_ruby/generated/models/query_call_stats_request.rb b/lib/getstream_ruby/generated/models/query_call_stats_request.rb index 6c061a5..0cd8b95 100644 --- a/lib/getstream_ruby/generated/models/query_call_stats_request.rb +++ b/lib/getstream_ruby/generated/models/query_call_stats_request.rb @@ -19,10 +19,10 @@ class QueryCallStatsRequest < GetStream::BaseModel # @return [String] attr_accessor :prev # @!attribute sort - # @return [Array] + # @return [Array] Array of sort parameters attr_accessor :sort # @!attribute filter_conditions - # @return [Object] + # @return [Object] Filter conditions to apply to the query attr_accessor :filter_conditions # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/query_calls_request.rb b/lib/getstream_ruby/generated/models/query_calls_request.rb index 760adf6..9e016bc 100644 --- a/lib/getstream_ruby/generated/models/query_calls_request.rb +++ b/lib/getstream_ruby/generated/models/query_calls_request.rb @@ -22,7 +22,7 @@ class QueryCallsRequest < GetStream::BaseModel # @return [Array] Array of sort parameters attr_accessor :sort # @!attribute filter_conditions - # @return [Object] + # @return [Object] Filter conditions to apply to the query attr_accessor :filter_conditions # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/query_channels_request.rb b/lib/getstream_ruby/generated/models/query_channels_request.rb index 5cd0b86..26531eb 100644 --- a/lib/getstream_ruby/generated/models/query_channels_request.rb +++ b/lib/getstream_ruby/generated/models/query_channels_request.rb @@ -34,7 +34,7 @@ class QueryChannelsRequest < GetStream::BaseModel # @return [Array] List of sort parameters attr_accessor :sort # @!attribute filter_conditions - # @return [Object] + # @return [Object] Filter conditions to apply to the query attr_accessor :filter_conditions # @!attribute filter_values # @return [Object] Values to interpolate into the predefined filter template diff --git a/lib/getstream_ruby/generated/models/query_members_payload.rb b/lib/getstream_ruby/generated/models/query_members_payload.rb index 07e5d2b..8abb63d 100644 --- a/lib/getstream_ruby/generated/models/query_members_payload.rb +++ b/lib/getstream_ruby/generated/models/query_members_payload.rb @@ -5,7 +5,7 @@ module GetStream module Generated module Models - # Client request + # class QueryMembersPayload < GetStream::BaseModel # Model attributes @@ -13,7 +13,7 @@ class QueryMembersPayload < GetStream::BaseModel # @return [String] attr_accessor :type # @!attribute filter_conditions - # @return [Object] + # @return [Object] Filter conditions to apply to the query attr_accessor :filter_conditions # @!attribute id # @return [String] @@ -31,7 +31,7 @@ class QueryMembersPayload < GetStream::BaseModel # @return [Array] attr_accessor :members # @!attribute sort - # @return [Array] + # @return [Array] Array of sort parameters attr_accessor :sort # @!attribute user # @return [UserRequest] diff --git a/lib/getstream_ruby/generated/models/query_message_flags_payload.rb b/lib/getstream_ruby/generated/models/query_message_flags_payload.rb index fce9af4..e40f587 100644 --- a/lib/getstream_ruby/generated/models/query_message_flags_payload.rb +++ b/lib/getstream_ruby/generated/models/query_message_flags_payload.rb @@ -22,10 +22,10 @@ class QueryMessageFlagsPayload < GetStream::BaseModel # @return [String] attr_accessor :user_id # @!attribute sort - # @return [Array] + # @return [Array] Array of sort parameters attr_accessor :sort # @!attribute filter_conditions - # @return [Object] + # @return [Object] Filter conditions to apply to the query attr_accessor :filter_conditions # @!attribute user # @return [UserRequest] diff --git a/lib/getstream_ruby/generated/models/query_user_feedback_request.rb b/lib/getstream_ruby/generated/models/query_user_feedback_request.rb index 2e1cfbb..a1278ba 100644 --- a/lib/getstream_ruby/generated/models/query_user_feedback_request.rb +++ b/lib/getstream_ruby/generated/models/query_user_feedback_request.rb @@ -19,10 +19,10 @@ class QueryUserFeedbackRequest < GetStream::BaseModel # @return [String] attr_accessor :prev # @!attribute sort - # @return [Array] + # @return [Array] Array of sort parameters attr_accessor :sort # @!attribute filter_conditions - # @return [Object] + # @return [Object] Filter conditions to apply to the query attr_accessor :filter_conditions # Initialize with attributes diff --git a/lib/getstream_ruby/generated/models/query_users_payload.rb b/lib/getstream_ruby/generated/models/query_users_payload.rb index 79dda8a..df25737 100644 --- a/lib/getstream_ruby/generated/models/query_users_payload.rb +++ b/lib/getstream_ruby/generated/models/query_users_payload.rb @@ -5,12 +5,12 @@ module GetStream module Generated module Models - # Client request + # class QueryUsersPayload < GetStream::BaseModel # Model attributes # @!attribute filter_conditions - # @return [Object] + # @return [Object] Filter conditions to apply to the query attr_accessor :filter_conditions # @!attribute include_deactivated_users # @return [Boolean] @@ -28,7 +28,7 @@ class QueryUsersPayload < GetStream::BaseModel # @return [String] attr_accessor :user_id # @!attribute sort - # @return [Array] + # @return [Array] Array of sort parameters attr_accessor :sort # @!attribute user # @return [UserRequest] diff --git a/lib/getstream_ruby/generated/models/reaction_group_response.rb b/lib/getstream_ruby/generated/models/reaction_group_response.rb index 78c3dfd..b3ab66f 100644 --- a/lib/getstream_ruby/generated/models/reaction_group_response.rb +++ b/lib/getstream_ruby/generated/models/reaction_group_response.rb @@ -21,6 +21,9 @@ class ReactionGroupResponse < GetStream::BaseModel # @!attribute sum_scores # @return [Integer] SumScores is the sum of all scores of reactions of this type. Medium allows you to clap articles more than once and shows the sum of all claps from all users. For example, you can send `clap` x5 using `score: 5`. attr_accessor :sum_scores + # @!attribute latest_reactions_by + # @return [Array] The most recent users who reacted with this type, ordered by most recent first. + attr_accessor :latest_reactions_by # Initialize with attributes def initialize(attributes = {}) @@ -29,6 +32,7 @@ def initialize(attributes = {}) @first_reaction_at = attributes[:first_reaction_at] || attributes['first_reaction_at'] @last_reaction_at = attributes[:last_reaction_at] || attributes['last_reaction_at'] @sum_scores = attributes[:sum_scores] || attributes['sum_scores'] + @latest_reactions_by = attributes[:latest_reactions_by] || attributes['latest_reactions_by'] end # Override field mappings for JSON serialization @@ -37,7 +41,8 @@ def self.json_field_mappings count: 'count', first_reaction_at: 'first_reaction_at', last_reaction_at: 'last_reaction_at', - sum_scores: 'sum_scores' + sum_scores: 'sum_scores', + latest_reactions_by: 'latest_reactions_by' } end end diff --git a/lib/getstream_ruby/generated/models/reaction_group_user_response.rb b/lib/getstream_ruby/generated/models/reaction_group_user_response.rb new file mode 100644 index 0000000..8db06a3 --- /dev/null +++ b/lib/getstream_ruby/generated/models/reaction_group_user_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 + # Contains information about a user who reacted with this reaction type. + class ReactionGroupUserResponse < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] The time when the user reacted. + attr_accessor :created_at + # @!attribute user_id + # @return [String] The ID of the user who reacted. + attr_accessor :user_id + # @!attribute user + # @return [UserResponse] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes[:created_at] || attributes['created_at'] + @user_id = attributes[:user_id] || attributes['user_id'] + @user = attributes[:user] || attributes['user'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + user_id: 'user_id', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/restore_comment_request.rb b/lib/getstream_ruby/generated/models/restore_comment_request.rb new file mode 100644 index 0000000..48a37ef --- /dev/null +++ b/lib/getstream_ruby/generated/models/restore_comment_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 RestoreCommentRequest < 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/restore_comment_response.rb b/lib/getstream_ruby/generated/models/restore_comment_response.rb new file mode 100644 index 0000000..3f86437 --- /dev/null +++ b/lib/getstream_ruby/generated/models/restore_comment_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 RestoreCommentResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] + attr_accessor :duration + # @!attribute activity + # @return [ActivityResponse] + attr_accessor :activity + # @!attribute comment + # @return [CommentResponse] + attr_accessor :comment + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + @activity = attributes[:activity] || attributes['activity'] + @comment = attributes[:comment] || attributes['comment'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration', + activity: 'activity', + comment: 'comment' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/retention_run_response.rb b/lib/getstream_ruby/generated/models/retention_run_response.rb new file mode 100644 index 0000000..b353d9a --- /dev/null +++ b/lib/getstream_ruby/generated/models/retention_run_response.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class RetentionRunResponse < GetStream::BaseModel + + # Model attributes + # @!attribute app_pk + # @return [Integer] + attr_accessor :app_pk + # @!attribute date + # @return [String] + attr_accessor :date + # @!attribute policy + # @return [String] + attr_accessor :policy + # @!attribute stats + # @return [RunStats] + attr_accessor :stats + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @app_pk = attributes[:app_pk] || attributes['app_pk'] + @date = attributes[:date] || attributes['date'] + @policy = attributes[:policy] || attributes['policy'] + @stats = attributes[:stats] || attributes['stats'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + app_pk: 'app_pk', + date: 'date', + policy: 'policy', + stats: 'stats' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/review_queue_item_response.rb b/lib/getstream_ruby/generated/models/review_queue_item_response.rb index e208b60..0f690ee 100644 --- a/lib/getstream_ruby/generated/models/review_queue_item_response.rb +++ b/lib/getstream_ruby/generated/models/review_queue_item_response.rb @@ -21,6 +21,9 @@ class ReviewQueueItemResponse < GetStream::BaseModel # @!attribute entity_type # @return [String] Type of entity being reviewed attr_accessor :entity_type + # @!attribute escalated + # @return [Boolean] Whether the item has been escalated + attr_accessor :escalated # @!attribute flags_count # @return [Integer] attr_accessor :flags_count @@ -66,6 +69,12 @@ class ReviewQueueItemResponse < GetStream::BaseModel # @!attribute entity_creator_id # @return [String] ID of who created the entity attr_accessor :entity_creator_id + # @!attribute escalated_at + # @return [DateTime] When the item was escalated + attr_accessor :escalated_at + # @!attribute escalated_by + # @return [String] ID of the moderator who escalated the item + attr_accessor :escalated_by # @!attribute reviewed_at # @return [DateTime] When the item was reviewed attr_accessor :reviewed_at @@ -87,6 +96,9 @@ class ReviewQueueItemResponse < GetStream::BaseModel # @!attribute entity_creator # @return [EntityCreatorResponse] attr_accessor :entity_creator + # @!attribute escalation_metadata + # @return [EscalationMetadata] + attr_accessor :escalation_metadata # @!attribute feeds_v2_activity # @return [EnrichedActivity] attr_accessor :feeds_v2_activity @@ -94,10 +106,10 @@ class ReviewQueueItemResponse < GetStream::BaseModel # @return [Reaction] attr_accessor :feeds_v2_reaction # @!attribute feeds_v3_activity - # @return [ActivityResponse] + # @return [FeedsV3ActivityResponse] attr_accessor :feeds_v3_activity # @!attribute feeds_v3_comment - # @return [CommentResponse] + # @return [FeedsV3CommentResponse] attr_accessor :feeds_v3_comment # @!attribute message # @return [MessageResponse] @@ -116,6 +128,7 @@ def initialize(attributes = {}) @created_at = attributes[:created_at] || attributes['created_at'] @entity_id = attributes[:entity_id] || attributes['entity_id'] @entity_type = attributes[:entity_type] || attributes['entity_type'] + @escalated = attributes[:escalated] || attributes['escalated'] @flags_count = attributes[:flags_count] || attributes['flags_count'] @id = attributes[:id] || attributes['id'] @latest_moderator_action = attributes[:latest_moderator_action] || attributes['latest_moderator_action'] @@ -131,6 +144,8 @@ def initialize(attributes = {}) @completed_at = attributes[:completed_at] || attributes['completed_at'] || nil @config_key = attributes[:config_key] || attributes['config_key'] || nil @entity_creator_id = attributes[:entity_creator_id] || attributes['entity_creator_id'] || nil + @escalated_at = attributes[:escalated_at] || attributes['escalated_at'] || nil + @escalated_by = attributes[:escalated_by] || attributes['escalated_by'] || nil @reviewed_at = attributes[:reviewed_at] || attributes['reviewed_at'] || nil @teams = attributes[:teams] || attributes['teams'] || nil @activity = attributes[:activity] || attributes['activity'] || nil @@ -138,6 +153,7 @@ def initialize(attributes = {}) @assigned_to = attributes[:assigned_to] || attributes['assigned_to'] || nil @call = attributes[:call] || attributes['call'] || nil @entity_creator = attributes[:entity_creator] || attributes['entity_creator'] || nil + @escalation_metadata = attributes[:escalation_metadata] || attributes['escalation_metadata'] || nil @feeds_v2_activity = attributes[:feeds_v2_activity] || attributes['feeds_v2_activity'] || nil @feeds_v2_reaction = attributes[:feeds_v2_reaction] || attributes['feeds_v2_reaction'] || nil @feeds_v3_activity = attributes[:feeds_v3_activity] || attributes['feeds_v3_activity'] || nil @@ -154,6 +170,7 @@ def self.json_field_mappings created_at: 'created_at', entity_id: 'entity_id', entity_type: 'entity_type', + escalated: 'escalated', flags_count: 'flags_count', id: 'id', latest_moderator_action: 'latest_moderator_action', @@ -169,6 +186,8 @@ def self.json_field_mappings completed_at: 'completed_at', config_key: 'config_key', entity_creator_id: 'entity_creator_id', + escalated_at: 'escalated_at', + escalated_by: 'escalated_by', reviewed_at: 'reviewed_at', teams: 'teams', activity: 'activity', @@ -176,6 +195,7 @@ def self.json_field_mappings assigned_to: 'assigned_to', call: 'call', entity_creator: 'entity_creator', + escalation_metadata: 'escalation_metadata', feeds_v2_activity: 'feeds_v2_activity', feeds_v2_reaction: 'feeds_v2_reaction', feeds_v3_activity: 'feeds_v3_activity', diff --git a/lib/getstream_ruby/generated/models/set_retention_policy_request.rb b/lib/getstream_ruby/generated/models/set_retention_policy_request.rb index c6abcc3..baa6240 100644 --- a/lib/getstream_ruby/generated/models/set_retention_policy_request.rb +++ b/lib/getstream_ruby/generated/models/set_retention_policy_request.rb @@ -19,8 +19,8 @@ class SetRetentionPolicyRequest < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) - @max_age_hours = attributes[:max_age_hours] || attributes['max_age_hours'] || nil - @policy = attributes[:policy] || attributes['policy'] || nil + @max_age_hours = attributes[:max_age_hours] || attributes['max_age_hours'] + @policy = attributes[:policy] || attributes['policy'] end # Override field mappings for JSON serialization diff --git a/lib/getstream_ruby/generated/models/submit_action_request.rb b/lib/getstream_ruby/generated/models/submit_action_request.rb index 7a804af..c96ff83 100644 --- a/lib/getstream_ruby/generated/models/submit_action_request.rb +++ b/lib/getstream_ruby/generated/models/submit_action_request.rb @@ -10,7 +10,7 @@ class SubmitActionRequest < GetStream::BaseModel # Model attributes # @!attribute action_type - # @return [String] Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, ban, custom, unban, restore, delete_user, unblock, block, shadow_block, unmask, kick_user, end_call + # @return [String] Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, ban, custom, unban, restore, delete_user, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate attr_accessor :action_type # @!attribute appeal_id # @return [String] UUID of the appeal to act on (required for reject_appeal, optional for other actions) @@ -45,6 +45,9 @@ class SubmitActionRequest < GetStream::BaseModel # @!attribute delete_user # @return [DeleteUserRequestPayload] attr_accessor :delete_user + # @!attribute escalate + # @return [EscalatePayload] + attr_accessor :escalate # @!attribute flag # @return [FlagRequest] attr_accessor :flag @@ -85,6 +88,7 @@ def initialize(attributes = {}) @delete_message = attributes[:delete_message] || attributes['delete_message'] || nil @delete_reaction = attributes[:delete_reaction] || attributes['delete_reaction'] || nil @delete_user = attributes[:delete_user] || attributes['delete_user'] || nil + @escalate = attributes[:escalate] || attributes['escalate'] || nil @flag = attributes[:flag] || attributes['flag'] || nil @mark_reviewed = attributes[:mark_reviewed] || attributes['mark_reviewed'] || nil @reject_appeal = attributes[:reject_appeal] || attributes['reject_appeal'] || nil @@ -110,6 +114,7 @@ def self.json_field_mappings delete_message: 'delete_message', delete_reaction: 'delete_reaction', delete_user: 'delete_user', + escalate: 'escalate', flag: 'flag', mark_reviewed: 'mark_reviewed', reject_appeal: 'reject_appeal', diff --git a/lib/getstream_ruby/generated/models/text_content_parameters.rb b/lib/getstream_ruby/generated/models/text_content_parameters.rb index 392eefb..f46fb5a 100644 --- a/lib/getstream_ruby/generated/models/text_content_parameters.rb +++ b/lib/getstream_ruby/generated/models/text_content_parameters.rb @@ -12,6 +12,9 @@ class TextContentParameters < GetStream::BaseModel # @!attribute contains_url # @return [Boolean] attr_accessor :contains_url + # @!attribute label_operator + # @return [String] + attr_accessor :label_operator # @!attribute severity # @return [String] attr_accessor :severity @@ -29,6 +32,7 @@ class TextContentParameters < GetStream::BaseModel def initialize(attributes = {}) super(attributes) @contains_url = attributes[:contains_url] || attributes['contains_url'] || nil + @label_operator = attributes[:label_operator] || attributes['label_operator'] || nil @severity = attributes[:severity] || attributes['severity'] || nil @blocklist_match = attributes[:blocklist_match] || attributes['blocklist_match'] || nil @harm_labels = attributes[:harm_labels] || attributes['harm_labels'] || nil @@ -39,6 +43,7 @@ def initialize(attributes = {}) def self.json_field_mappings { contains_url: 'contains_url', + label_operator: 'label_operator', severity: 'severity', blocklist_match: 'blocklist_match', harm_labels: 'harm_labels', diff --git a/lib/getstream_ruby/generated/models/triggered_rule_response.rb b/lib/getstream_ruby/generated/models/triggered_rule_response.rb index 5c79552..1b08ce0 100644 --- a/lib/getstream_ruby/generated/models/triggered_rule_response.rb +++ b/lib/getstream_ruby/generated/models/triggered_rule_response.rb @@ -13,13 +13,13 @@ class TriggeredRuleResponse < GetStream::BaseModel # @return [String] ID of the moderation rule that triggered attr_accessor :rule_id # @!attribute actions - # @return [Array] Array of action types resolved from the rule's action sequence (e.g. mute_video, kick_user, end_call, warning, blur) + # @return [Array] Action types resolved from the rule's action sequence attr_accessor :actions # @!attribute rule_name # @return [String] Name of the moderation rule that triggered attr_accessor :rule_name # @!attribute violation_number - # @return [Integer] The violation count for action sequence rules (1-based) + # @return [Integer] Violation count for action sequence rules (1-based) attr_accessor :violation_number # @!attribute call_options # @return [CallActionOptions] diff --git a/lib/getstream_ruby/generated/models/unfollow_batch_request.rb b/lib/getstream_ruby/generated/models/unfollow_batch_request.rb index be57444..8c936a2 100644 --- a/lib/getstream_ruby/generated/models/unfollow_batch_request.rb +++ b/lib/getstream_ruby/generated/models/unfollow_batch_request.rb @@ -10,7 +10,7 @@ class UnfollowBatchRequest < GetStream::BaseModel # Model attributes # @!attribute follows - # @return [Array] List of follow relationships to remove + # @return [Array] List of follow relationships to remove, each with optional keep_history attr_accessor :follows # @!attribute delete_notification_activity # @return [Boolean] Whether to delete the corresponding notification activity (default: false) diff --git a/lib/getstream_ruby/generated/models/unfollow_pair.rb b/lib/getstream_ruby/generated/models/unfollow_pair.rb new file mode 100644 index 0000000..a54caf1 --- /dev/null +++ b/lib/getstream_ruby/generated/models/unfollow_pair.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 UnfollowPair < GetStream::BaseModel + + # Model attributes + # @!attribute source + # @return [String] Fully qualified ID of the source feed + attr_accessor :source + # @!attribute target + # @return [String] Fully qualified ID of the target feed + attr_accessor :target + # @!attribute keep_history + # @return [Boolean] When true, activities from the unfollowed feed will remain in the source feed's timeline (default: false) + attr_accessor :keep_history + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @source = attributes[:source] || attributes['source'] + @target = attributes[:target] || attributes['target'] + @keep_history = attributes[:keep_history] || attributes['keep_history'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + source: 'source', + target: 'target', + keep_history: 'keep_history' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/update_activity_partial_change_request.rb b/lib/getstream_ruby/generated/models/update_activity_partial_change_request.rb index 4874ddd..04a88be 100644 --- a/lib/getstream_ruby/generated/models/update_activity_partial_change_request.rb +++ b/lib/getstream_ruby/generated/models/update_activity_partial_change_request.rb @@ -13,7 +13,8 @@ class UpdateActivityPartialChangeRequest < GetStream::BaseModel # @return [String] ID of the activity to update attr_accessor :activity_id # @!attribute copy_custom_to_notification - # @return [Boolean] Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) + # @deprecated This field is deprecated. + # @return [Boolean] Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead attr_accessor :copy_custom_to_notification # @!attribute handle_mention_notifications # @return [Boolean] When true and 'mentioned_user_ids' is updated, automatically creates or deletes mention notifications for added/removed users. Only applicable for client-side requests (ignored for server-side requests) diff --git a/lib/getstream_ruby/generated/models/update_activity_partial_request.rb b/lib/getstream_ruby/generated/models/update_activity_partial_request.rb index 05590f7..cb76d8d 100644 --- a/lib/getstream_ruby/generated/models/update_activity_partial_request.rb +++ b/lib/getstream_ruby/generated/models/update_activity_partial_request.rb @@ -10,7 +10,8 @@ class UpdateActivityPartialRequest < GetStream::BaseModel # Model attributes # @!attribute copy_custom_to_notification - # @return [Boolean] Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) + # @deprecated This field is deprecated. + # @return [Boolean] Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead attr_accessor :copy_custom_to_notification # @!attribute enrich_own_fields # @return [Boolean] If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. diff --git a/lib/getstream_ruby/generated/models/update_activity_request.rb b/lib/getstream_ruby/generated/models/update_activity_request.rb index 483f923..d389263 100644 --- a/lib/getstream_ruby/generated/models/update_activity_request.rb +++ b/lib/getstream_ruby/generated/models/update_activity_request.rb @@ -10,7 +10,8 @@ class UpdateActivityRequest < GetStream::BaseModel # Model attributes # @!attribute copy_custom_to_notification - # @return [Boolean] Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) + # @deprecated This field is deprecated. + # @return [Boolean] Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead attr_accessor :copy_custom_to_notification # @!attribute enrich_own_fields # @return [Boolean] If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. diff --git a/lib/getstream_ruby/generated/models/update_comment_partial_request.rb b/lib/getstream_ruby/generated/models/update_comment_partial_request.rb new file mode 100644 index 0000000..b83cb4a --- /dev/null +++ b/lib/getstream_ruby/generated/models/update_comment_partial_request.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class UpdateCommentPartialRequest < GetStream::BaseModel + + # Model attributes + # @!attribute copy_custom_to_notification + # @deprecated This field is deprecated. + # @return [Boolean] Whether to copy custom data to notification activities Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead + attr_accessor :copy_custom_to_notification + # @!attribute handle_mention_notifications + # @return [Boolean] Whether to handle mention notification changes + attr_accessor :handle_mention_notifications + # @!attribute skip_enrich_url + # @return [Boolean] Whether to skip URL enrichment + attr_accessor :skip_enrich_url + # @!attribute skip_push + # @return [Boolean] Whether to skip push notifications + attr_accessor :skip_push + # @!attribute user_id + # @return [String] + attr_accessor :user_id + # @!attribute unset + # @return [Array] List of field names to remove. Supported fields: 'custom', 'attachments', 'mentioned_user_ids', 'status'. Use dot-notation for nested custom fields (e.g., 'custom.field_name') + attr_accessor :unset + # @!attribute set + # @return [Object] Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'mentioned_user_ids', 'status'. Use dot-notation for nested custom fields (e.g., 'custom.field_name') + attr_accessor :set + # @!attribute user + # @return [UserRequest] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @copy_custom_to_notification = attributes[:copy_custom_to_notification] || attributes['copy_custom_to_notification'] || nil + @handle_mention_notifications = attributes[:handle_mention_notifications] || attributes['handle_mention_notifications'] || nil + @skip_enrich_url = attributes[:skip_enrich_url] || attributes['skip_enrich_url'] || nil + @skip_push = attributes[:skip_push] || attributes['skip_push'] || nil + @user_id = attributes[:user_id] || attributes['user_id'] || nil + @unset = attributes[:unset] || attributes['unset'] || nil + @set = attributes[:set] || attributes['set'] || nil + @user = attributes[:user] || attributes['user'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + copy_custom_to_notification: 'copy_custom_to_notification', + handle_mention_notifications: 'handle_mention_notifications', + skip_enrich_url: 'skip_enrich_url', + skip_push: 'skip_push', + user_id: 'user_id', + unset: 'unset', + set: 'set', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/update_comment_partial_response.rb b/lib/getstream_ruby/generated/models/update_comment_partial_response.rb new file mode 100644 index 0000000..6d181b6 --- /dev/null +++ b/lib/getstream_ruby/generated/models/update_comment_partial_response.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class UpdateCommentPartialResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] + 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/update_comment_request.rb b/lib/getstream_ruby/generated/models/update_comment_request.rb index 4f77892..4774cc4 100644 --- a/lib/getstream_ruby/generated/models/update_comment_request.rb +++ b/lib/getstream_ruby/generated/models/update_comment_request.rb @@ -13,7 +13,8 @@ class UpdateCommentRequest < GetStream::BaseModel # @return [String] Updated text content of the comment attr_accessor :comment # @!attribute copy_custom_to_notification - # @return [Boolean] Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) + # @deprecated This field is deprecated. + # @return [Boolean] Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead attr_accessor :copy_custom_to_notification # @!attribute handle_mention_notifications # @return [Boolean] If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned diff --git a/lib/getstream_ruby/generated/models/update_follow_request.rb b/lib/getstream_ruby/generated/models/update_follow_request.rb index 1615e1e..4f7bc2c 100644 --- a/lib/getstream_ruby/generated/models/update_follow_request.rb +++ b/lib/getstream_ruby/generated/models/update_follow_request.rb @@ -16,7 +16,8 @@ class UpdateFollowRequest < GetStream::BaseModel # @return [String] Fully qualified ID of the target feed attr_accessor :target # @!attribute copy_custom_to_notification - # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) + # @deprecated This field is deprecated. + # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead attr_accessor :copy_custom_to_notification # @!attribute create_notification_activity # @return [Boolean] Whether to create a notification activity for this follow diff --git a/lib/getstream_ruby/generated/models/upsert_external_storage_awss3_request.rb b/lib/getstream_ruby/generated/models/upsert_external_storage_awss3_request.rb new file mode 100644 index 0000000..fa09aaa --- /dev/null +++ b/lib/getstream_ruby/generated/models/upsert_external_storage_awss3_request.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class UpsertExternalStorageAWSS3Request < GetStream::BaseModel + + # Model attributes + # @!attribute bucket + # @return [String] + attr_accessor :bucket + # @!attribute region + # @return [String] + attr_accessor :region + # @!attribute role_arn + # @return [String] + attr_accessor :role_arn + # @!attribute path_prefix + # @return [String] + attr_accessor :path_prefix + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @bucket = attributes[:bucket] || attributes['bucket'] + @region = attributes[:region] || attributes['region'] + @role_arn = attributes[:role_arn] || attributes['role_arn'] + @path_prefix = attributes[:path_prefix] || attributes['path_prefix'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + bucket: 'bucket', + region: 'region', + role_arn: 'role_arn', + path_prefix: 'path_prefix' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/upsert_external_storage_request.rb b/lib/getstream_ruby/generated/models/upsert_external_storage_request.rb new file mode 100644 index 0000000..b2f7818 --- /dev/null +++ b/lib/getstream_ruby/generated/models/upsert_external_storage_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 UpsertExternalStorageRequest < GetStream::BaseModel + + # Model attributes + # @!attribute type + # @return [String] + attr_accessor :type + # @!attribute aws_s3 + # @return [UpsertExternalStorageAWSS3Request] + attr_accessor :aws_s3 + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @type = attributes[:type] || attributes['type'] + @aws_s3 = attributes[:aws_s3] || attributes['aws_s3'] || nil + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + type: 'type', + aws_s3: 'aws_s3' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/upsert_external_storage_response.rb b/lib/getstream_ruby/generated/models/upsert_external_storage_response.rb new file mode 100644 index 0000000..9a8bfc8 --- /dev/null +++ b/lib/getstream_ruby/generated/models/upsert_external_storage_response.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Basic response information + class UpsertExternalStorageResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/validate_external_storage_response.rb b/lib/getstream_ruby/generated/models/validate_external_storage_response.rb new file mode 100644 index 0000000..49d66ac --- /dev/null +++ b/lib/getstream_ruby/generated/models/validate_external_storage_response.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Basic response information + class ValidateExternalStorageResponse < GetStream::BaseModel + + # Model attributes + # @!attribute duration + # @return [String] Duration of the request in milliseconds + attr_accessor :duration + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @duration = attributes[:duration] || attributes['duration'] + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + duration: 'duration' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/video_content_parameters.rb b/lib/getstream_ruby/generated/models/video_content_parameters.rb index d1f64fd..d8a34b4 100644 --- a/lib/getstream_ruby/generated/models/video_content_parameters.rb +++ b/lib/getstream_ruby/generated/models/video_content_parameters.rb @@ -9,6 +9,9 @@ module Models class VideoContentParameters < GetStream::BaseModel # Model attributes + # @!attribute label_operator + # @return [String] + attr_accessor :label_operator # @!attribute harm_labels # @return [Array] attr_accessor :harm_labels @@ -16,12 +19,14 @@ class VideoContentParameters < GetStream::BaseModel # Initialize with attributes def initialize(attributes = {}) super(attributes) + @label_operator = attributes[:label_operator] || attributes['label_operator'] || 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', harm_labels: 'harm_labels' } end diff --git a/lib/getstream_ruby/generated/moderation_client.rb b/lib/getstream_ruby/generated/moderation_client.rb index 80d7fd9..a6cc02c 100644 --- a/lib/getstream_ruby/generated/moderation_client.rb +++ b/lib/getstream_ruby/generated/moderation_client.rb @@ -12,6 +12,23 @@ class ModerationClient def initialize(client) @client = client end + # Insert a moderation action log entry. Server-side only. Used by product services to log moderation-related actions. + # + # @param insert_action_log_request [InsertActionLogRequest] + # @return [Models::InsertActionLogResponse] + def insert_action_log(insert_action_log_request) + path = '/api/v2/moderation/action_logs' + # Build request body + body = insert_action_log_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # Appeal against the moderation decision # # @param appeal_request [AppealRequest] @@ -283,6 +300,23 @@ def flag(flag_request) ) end + # Returns the number of moderation flags created against a specific user's content. Optionally filter by entity type. + # + # @param get_flag_count_request [GetFlagCountRequest] + # @return [Models::GetFlagCountResponse] + def get_flag_count(get_flag_count_request) + path = '/api/v2/moderation/flag_count' + # Build request body + body = get_flag_count_request + + # Make the API request + @client.make_request( + :post, + path, + body: body + ) + end + # Query flags associated with moderation items. This is used for building a moderation dashboard. # # @param query_moderation_flags_request [QueryModerationFlagsRequest] diff --git a/lib/getstream_ruby/generated/webhook.rb b/lib/getstream_ruby/generated/webhook.rb index 266f1f4..9d51101 100644 --- a/lib/getstream_ruby/generated/webhook.rb +++ b/lib/getstream_ruby/generated/webhook.rb @@ -95,6 +95,7 @@ require_relative 'models/comment_reaction_added_event' require_relative 'models/comment_reaction_deleted_event' require_relative 'models/comment_reaction_updated_event' +require_relative 'models/comment_restored_event' require_relative 'models/comment_updated_event' require_relative 'models/custom_event' require_relative 'models/custom_video_event' @@ -272,6 +273,7 @@ module Webhook EVENT_TYPE_FEEDS_COMMENT_REACTION_ADDED = 'feeds.comment.reaction.added' EVENT_TYPE_FEEDS_COMMENT_REACTION_DELETED = 'feeds.comment.reaction.deleted' EVENT_TYPE_FEEDS_COMMENT_REACTION_UPDATED = 'feeds.comment.reaction.updated' + EVENT_TYPE_FEEDS_COMMENT_RESTORED = 'feeds.comment.restored' EVENT_TYPE_FEEDS_COMMENT_UPDATED = 'feeds.comment.updated' EVENT_TYPE_FEEDS_FEED_CREATED = 'feeds.feed.created' EVENT_TYPE_FEEDS_FEED_DELETED = 'feeds.feed.deleted' @@ -586,6 +588,8 @@ def self.parse_webhook_event(raw_event) StreamChat::CommentReactionDeletedEvent when 'feeds.comment.reaction.updated' StreamChat::CommentReactionUpdatedEvent + when 'feeds.comment.restored' + StreamChat::CommentRestoredEvent when 'feeds.comment.updated' StreamChat::CommentUpdatedEvent when 'feeds.feed.created' diff --git a/spec/integration/chat_misc_integration_spec.rb b/spec/integration/chat_misc_integration_spec.rb index 99eea9d..51524a7 100644 --- a/spec/integration/chat_misc_integration_spec.rb +++ b/spec/integration/chat_misc_integration_spec.rb @@ -772,4 +772,34 @@ end + # --------------------------------------------------------------------------- + # Retention Policy Runs + # --------------------------------------------------------------------------- + + describe 'RetentionPolicyRuns' do + + it 'gets retention policy runs' do + + runs_resp = @client.chat.get_retention_policy_runs( + GetStream::Generated::Models::GetRetentionPolicyRunsRequest.new( + limit: 10, + ), + ) + expect(runs_resp).not_to be_nil + runs = runs_resp.runs || [] + expect(runs).to be_an(Array) + rescue GetStreamRuby::APIError => e + if e.message.include?('not enabled') || + e.message.include?('not available') || + e.message.include?('retention') || + e.message.include?('Not Found') || + e.message.include?('not found') + skip('Retention policy not available for this app') + end + raise + + end + + end + end diff --git a/spec/integration/feed_integration_spec.rb b/spec/integration/feed_integration_spec.rb index 846b878..3831dc6 100644 --- a/spec/integration/feed_integration_spec.rb +++ b/spec/integration/feed_integration_spec.rb @@ -372,11 +372,11 @@ begin # Create users first users_hash = {} - user_ids.each_with_index do |user_id, i| + user_ids.each_with_index do |user_id, _i| users_hash[user_id] = { 'id' => user_id, - 'name' => "Delete Test User #{i + 1}", + 'name' => "Delete Test User #{user_id}", 'role' => 'user', } diff --git a/test/webhook_test.rb b/test/webhook_test.rb index b0424fc..ddd851b 100644 --- a/test/webhook_test.rb +++ b/test/webhook_test.rb @@ -566,6 +566,11 @@ def test_parse_feeds_comment_reaction_updated assert_equal 'StreamChat::CommentReactionUpdatedEvent', event.class.name end + def test_parse_feeds_comment_restored + event = StreamChat::Webhook.parse_webhook_event('{"type":"feeds.comment.restored"}') + assert_equal 'StreamChat::CommentRestoredEvent', event.class.name + end + def test_parse_feeds_comment_updated event = StreamChat::Webhook.parse_webhook_event('{"type":"feeds.comment.updated"}') assert_equal 'StreamChat::CommentUpdatedEvent', event.class.name