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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.0
3.3.0
45 changes: 39 additions & 6 deletions lib/getstream_ruby/generated/feeds_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,17 @@ def query_activity_reactions(activity_id, query_activity_reactions_request)
#
# @param activity_id [String]
# @param _type [String]
# @param delete_notification_activity [Boolean]
# @param user_id [String]
# @return [Models::DeleteActivityReactionResponse]
def delete_activity_reaction(activity_id, _type, user_id = nil)
def delete_activity_reaction(activity_id, _type, delete_notification_activity = nil, user_id = nil)
path = '/api/v2/feeds/activities/{activity_id}/reactions/{type}'
# Replace path parameters
path = path.gsub('{activity_id}', activity_id.to_s)
path = path.gsub('{type}', _type.to_s)
# Build query parameters
query_params = {}
query_params['delete_notification_activity'] = delete_notification_activity unless delete_notification_activity.nil?
query_params['user_id'] = user_id unless user_id.nil?

# Make the API request
Expand All @@ -277,14 +279,16 @@ def delete_activity_reaction(activity_id, _type, user_id = nil)
#
# @param _id [String]
# @param hard_delete [Boolean]
# @param delete_notification_activity [Boolean]
# @return [Models::DeleteActivityResponse]
def delete_activity(_id, hard_delete = nil)
def delete_activity(_id, hard_delete = nil, delete_notification_activity = nil)
path = '/api/v2/feeds/activities/{id}'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
# Build query parameters
query_params = {}
query_params['hard_delete'] = hard_delete unless hard_delete.nil?
query_params['delete_notification_activity'] = delete_notification_activity unless delete_notification_activity.nil?

# Make the API request
@client.make_request(
Expand Down Expand Up @@ -350,6 +354,26 @@ def update_activity(_id, update_activity_request)
)
end

# Restores a soft-deleted activity by its ID. Only the activity owner can restore their own activities.
#
# @param _id [String]
# @param restore_activity_request [RestoreActivityRequest]
# @return [Models::RestoreActivityResponse]
def restore_activity(_id, restore_activity_request)
path = '/api/v2/feeds/activities/{id}/restore'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
# Build request body
body = restore_activity_request

# Make the API request
@client.make_request(
:post,
path,
body: body
)
end

# Query bookmark folders with filter query
#
# @param query_bookmark_folders_request [QueryBookmarkFoldersRequest]
Expand Down Expand Up @@ -598,14 +622,16 @@ def query_comments(query_comments_request)
#
# @param _id [String]
# @param hard_delete [Boolean]
# @param delete_notification_activity [Boolean]
# @return [Models::DeleteCommentResponse]
def delete_comment(_id, hard_delete = nil)
def delete_comment(_id, hard_delete = nil, delete_notification_activity = nil)
path = '/api/v2/feeds/comments/{id}'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
# Build query parameters
query_params = {}
query_params['hard_delete'] = hard_delete unless hard_delete.nil?
query_params['delete_notification_activity'] = delete_notification_activity unless delete_notification_activity.nil?

# Make the API request
@client.make_request(
Expand Down Expand Up @@ -695,15 +721,17 @@ def query_comment_reactions(_id, query_comment_reactions_request)
#
# @param _id [String]
# @param _type [String]
# @param delete_notification_activity [Boolean]
# @param user_id [String]
# @return [Models::DeleteCommentReactionResponse]
def delete_comment_reaction(_id, _type, user_id = nil)
def delete_comment_reaction(_id, _type, delete_notification_activity = nil, user_id = nil)
path = '/api/v2/feeds/comments/{id}/reactions/{type}'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
path = path.gsub('{type}', _type.to_s)
# Build query parameters
query_params = {}
query_params['delete_notification_activity'] = delete_notification_activity unless delete_notification_activity.nil?
query_params['user_id'] = user_id unless user_id.nil?

# Make the API request
Expand Down Expand Up @@ -1481,17 +1509,22 @@ def reject_follow(reject_follow_request)
#
# @param source [String]
# @param target [String]
# @param delete_notification_activity [Boolean]
# @return [Models::UnfollowResponse]
def unfollow(source, target)
def unfollow(source, target, delete_notification_activity = nil)
path = '/api/v2/feeds/follows/{source}/{target}'
# Replace path parameters
path = path.gsub('{source}', source.to_s)
path = path.gsub('{target}', target.to_s)
# Build query parameters
query_params = {}
query_params['delete_notification_activity'] = delete_notification_activity unless delete_notification_activity.nil?

# Make the API request
@client.make_request(
:delete,
path
path,
query_params: query_params
)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def initialize(attributes = {})
@started_at = attributes[:started_at] || attributes['started_at']
@task_id = attributes[:task_id] || attributes['task_id']
@custom = attributes[:custom] || attributes['custom']
@type = attributes[:type] || attributes['type'] || "export.bulk_image_moderation.error"
@type = attributes[:type] || attributes['type'] || "export.channels.error"
@received_at = attributes[:received_at] || attributes['received_at'] || nil
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class DeleteActivitiesRequest < GetStream::BaseModel
# @!attribute ids
# @return [Array<String>] List of activity IDs to delete
attr_accessor :ids
# @!attribute delete_notification_activity
# @return [Boolean] Whether to also delete any notification activities created from mentions in these activities
attr_accessor :delete_notification_activity
# @!attribute hard_delete
# @return [Boolean] Whether to permanently delete the activities
attr_accessor :hard_delete
Expand All @@ -26,6 +29,7 @@ class DeleteActivitiesRequest < GetStream::BaseModel
def initialize(attributes = {})
super(attributes)
@ids = attributes[:ids] || attributes['ids']
@delete_notification_activity = attributes[:delete_notification_activity] || attributes['delete_notification_activity'] || nil
@hard_delete = attributes[:hard_delete] || attributes['hard_delete'] || nil
@user_id = attributes[:user_id] || attributes['user_id'] || nil
@user = attributes[:user] || attributes['user'] || nil
Expand All @@ -35,6 +39,7 @@ def initialize(attributes = {})
def self.json_field_mappings
{
ids: 'ids',
delete_notification_activity: 'delete_notification_activity',
hard_delete: 'hard_delete',
user_id: 'user_id',
user: 'user'
Expand Down
7 changes: 6 additions & 1 deletion lib/getstream_ruby/generated/models/follow_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ class FollowRequest < GetStream::BaseModel
# @return [String] Push preference for the follow relationship
attr_accessor :push_preference
# @!attribute skip_push
# @return [Boolean]
# @return [Boolean] Whether to skip push for this follow
attr_accessor :skip_push
# @!attribute status
# @return [String] Status of the follow relationship
attr_accessor :status
# @!attribute custom
# @return [Object] Custom data for the follow relationship
attr_accessor :custom
Expand All @@ -36,6 +39,7 @@ def initialize(attributes = {})
@create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil
@push_preference = attributes[:push_preference] || attributes['push_preference'] || nil
@skip_push = attributes[:skip_push] || attributes['skip_push'] || nil
@status = attributes[:status] || attributes['status'] || nil
@custom = attributes[:custom] || attributes['custom'] || nil
end

Expand All @@ -47,6 +51,7 @@ def self.json_field_mappings
create_notification_activity: 'create_notification_activity',
push_preference: 'push_preference',
skip_push: 'skip_push',
status: 'status',
custom: 'custom'
}
end
Expand Down
10 changes: 10 additions & 0 deletions lib/getstream_ruby/generated/models/import_v2_task_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ module Models
class ImportV2TaskSettings < GetStream::BaseModel

# Model attributes
# @!attribute mode
# @return [String]
attr_accessor :mode
# @!attribute path
# @return [String]
attr_accessor :path
# @!attribute skip_references_check
# @return [Boolean]
attr_accessor :skip_references_check
Expand All @@ -19,13 +25,17 @@ class ImportV2TaskSettings < GetStream::BaseModel
# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@mode = attributes[:mode] || attributes['mode'] || nil
@path = attributes[:path] || attributes['path'] || nil
@skip_references_check = attributes[:skip_references_check] || attributes['skip_references_check'] || nil
@s3 = attributes[:s3] || attributes['s3'] || nil
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
mode: 'mode',
path: 'path',
skip_references_check: 'skip_references_check',
s3: 's3'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,24 @@ class QueryChannelsResponse < GetStream::BaseModel
# @!attribute channels
# @return [Array<ChannelStateResponseFields>] List of channels
attr_accessor :channels
# @!attribute predefined_filter
# @return [ParsedPredefinedFilterResponse]
attr_accessor :predefined_filter

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@duration = attributes[:duration] || attributes['duration']
@channels = attributes[:channels] || attributes['channels']
@predefined_filter = attributes[:predefined_filter] || attributes['predefined_filter'] || nil
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
duration: 'duration',
channels: 'channels'
channels: 'channels',
predefined_filter: 'predefined_filter'
}
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,22 @@ class UnfollowBatchRequest < GetStream::BaseModel
# @!attribute follows
# @return [Array<FollowPair>] List of follow relationships to remove
attr_accessor :follows
# @!attribute delete_notification_activity
# @return [Boolean] Whether to delete the corresponding notification activity (default: false)
attr_accessor :delete_notification_activity

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@follows = attributes[:follows] || attributes['follows']
@delete_notification_activity = attributes[:delete_notification_activity] || attributes['delete_notification_activity'] || nil
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
follows: 'follows'
follows: 'follows',
delete_notification_activity: 'delete_notification_activity'
}
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ module Models
class UpdateActivityPartialRequest < GetStream::BaseModel

# Model attributes
# @!attribute handle_mention_notifications
# @return [Boolean] If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned
attr_accessor :handle_mention_notifications
# @!attribute user_id
# @return [String]
attr_accessor :user_id
Expand All @@ -25,6 +28,7 @@ class UpdateActivityPartialRequest < GetStream::BaseModel
# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@handle_mention_notifications = attributes[:handle_mention_notifications] || attributes['handle_mention_notifications'] || nil
@user_id = attributes[:user_id] || attributes['user_id'] || nil
@unset = attributes[:unset] || attributes['unset'] || nil
@set = attributes[:set] || attributes['set'] || nil
Expand All @@ -34,6 +38,7 @@ def initialize(attributes = {})
# Override field mappings for JSON serialization
def self.json_field_mappings
{
handle_mention_notifications: 'handle_mention_notifications',
user_id: 'user_id',
unset: 'unset',
set: 'set',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class UpdateActivityRequest < GetStream::BaseModel
# @!attribute expires_at
# @return [DateTime] Time when the activity will expire
attr_accessor :expires_at
# @!attribute handle_mention_notifications
# @return [Boolean] If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned
attr_accessor :handle_mention_notifications
# @!attribute poll_id
# @return [String] Poll ID
attr_accessor :poll_id
Expand Down Expand Up @@ -65,6 +68,7 @@ class UpdateActivityRequest < GetStream::BaseModel
def initialize(attributes = {})
super(attributes)
@expires_at = attributes[:expires_at] || attributes['expires_at'] || nil
@handle_mention_notifications = attributes[:handle_mention_notifications] || attributes['handle_mention_notifications'] || nil
@poll_id = attributes[:poll_id] || attributes['poll_id'] || nil
@restrict_replies = attributes[:restrict_replies] || attributes['restrict_replies'] || nil
@skip_enrich_url = attributes[:skip_enrich_url] || attributes['skip_enrich_url'] || nil
Expand All @@ -87,6 +91,7 @@ def initialize(attributes = {})
def self.json_field_mappings
{
expires_at: 'expires_at',
handle_mention_notifications: 'handle_mention_notifications',
poll_id: 'poll_id',
restrict_replies: 'restrict_replies',
skip_enrich_url: 'skip_enrich_url',
Expand Down
10 changes: 10 additions & 0 deletions lib/getstream_ruby/generated/models/update_comment_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class UpdateCommentRequest < GetStream::BaseModel
# @!attribute comment
# @return [String] Updated text content of the comment
attr_accessor :comment
# @!attribute handle_mention_notifications
# @return [Boolean] If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned
attr_accessor :handle_mention_notifications
# @!attribute skip_enrich_url
# @return [Boolean] Whether to skip URL enrichment for this comment
attr_accessor :skip_enrich_url
Expand All @@ -24,6 +27,9 @@ class UpdateCommentRequest < GetStream::BaseModel
# @!attribute attachments
# @return [Array<Attachment>] Updated media attachments for the comment. Providing this field will replace all existing attachments.
attr_accessor :attachments
# @!attribute mentioned_user_ids
# @return [Array<String>] List of user IDs mentioned in the comment
attr_accessor :mentioned_user_ids
# @!attribute custom
# @return [Object] Updated custom data for the comment
attr_accessor :custom
Expand All @@ -35,10 +41,12 @@ class UpdateCommentRequest < GetStream::BaseModel
def initialize(attributes = {})
super(attributes)
@comment = attributes[:comment] || attributes['comment'] || 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
@attachments = attributes[:attachments] || attributes['attachments'] || nil
@mentioned_user_ids = attributes[:mentioned_user_ids] || attributes['mentioned_user_ids'] || nil
@custom = attributes[:custom] || attributes['custom'] || nil
@user = attributes[:user] || attributes['user'] || nil
end
Expand All @@ -47,10 +55,12 @@ def initialize(attributes = {})
def self.json_field_mappings
{
comment: 'comment',
handle_mention_notifications: 'handle_mention_notifications',
skip_enrich_url: 'skip_enrich_url',
skip_push: 'skip_push',
user_id: 'user_id',
attachments: 'attachments',
mentioned_user_ids: 'mentioned_user_ids',
custom: 'custom',
user: 'user'
}
Expand Down
Loading