Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions lib/getstream_ruby/generated/feeds_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ def upsert_activities(upsert_activities_request)
)
end

# Updates certain fields of multiple activities in a batch. Use 'set' to update specific fields and 'unset' to remove fields. Activities that fail due to not found, permission denied, or no changes detected are silently skipped and not included in the response. However, validation errors (e.g., updating reserved fields, invalid field values) will fail the entire batch request.Sends events:- feeds.activity.updated
#
# @param update_activities_partial_batch_request [UpdateActivitiesPartialBatchRequest]
# @return [Models::UpdateActivitiesPartialBatchResponse]
def update_activities_partial_batch(update_activities_partial_batch_request)
path = '/api/v2/feeds/activities/batch/partial'
# Build request body
body = update_activities_partial_batch_request

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

# Delete one or more activities by their IDs
#
# @param delete_activities_request [DeleteActivitiesRequest]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AcceptFeedMemberInviteRequest < GetStream::BaseModel
# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@user_id = attributes[:user_id] || attributes['user_id'] || nil
@user_id = attributes[:user_id] || attributes['user_id'] || ""
@user = attributes[:user] || attributes['user'] || nil
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def initialize(attributes = {})
super(attributes)
@source = attributes[:source] || attributes['source']
@target = attributes[:target] || attributes['target']
@follower_role = attributes[:follower_role] || attributes['follower_role'] || nil
@follower_role = attributes[:follower_role] || attributes['follower_role'] || ""
end

# Override field mappings for JSON serialization
Expand Down
4 changes: 2 additions & 2 deletions lib/getstream_ruby/generated/models/action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def initialize(attributes = {})
@name = attributes[:name] || attributes['name']
@text = attributes[:text] || attributes['text']
@type = attributes[:type] || attributes['type']
@style = attributes[:style] || attributes['style'] || nil
@value = attributes[:value] || attributes['value'] || nil
@style = attributes[:style] || attributes['style'] || ""
@value = attributes[:value] || attributes['value'] || ""
end

# Override field mappings for JSON serialization
Expand Down
14 changes: 7 additions & 7 deletions lib/getstream_ruby/generated/models/action_sequence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ class ActionSequence < GetStream::BaseModel
# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@action = attributes[:action] || attributes['action'] || nil
@blur = attributes[:blur] || attributes['blur'] || nil
@cooldown_period = attributes[:cooldown_period] || attributes['cooldown_period'] || nil
@threshold = attributes[:threshold] || attributes['threshold'] || nil
@time_window = attributes[:time_window] || attributes['time_window'] || nil
@warning = attributes[:warning] || attributes['warning'] || nil
@warning_text = attributes[:warning_text] || attributes['warning_text'] || nil
@action = attributes[:action] || attributes['action'] || ""
@blur = attributes[:blur] || attributes['blur'] || false
@cooldown_period = attributes[:cooldown_period] || attributes['cooldown_period'] || 0
@threshold = attributes[:threshold] || attributes['threshold'] || 0
@time_window = attributes[:time_window] || attributes['time_window'] || 0
@warning = attributes[:warning] || attributes['warning'] || false
@warning_text = attributes[:warning_text] || attributes['warning_text'] || ""
end

# Override field mappings for JSON serialization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def initialize(attributes = {})
@activity = attributes[:activity] || attributes['activity']
@custom = attributes[:custom] || attributes['custom']
@type = attributes[:type] || attributes['type'] || "feeds.activity.added"
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || nil
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || ""
@received_at = attributes[:received_at] || attributes['received_at'] || nil
@user = attributes[:user] || attributes['user'] || nil
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def initialize(attributes = {})
@activity = attributes[:activity] || attributes['activity']
@custom = attributes[:custom] || attributes['custom']
@type = attributes[:type] || attributes['type'] || "feeds.activity.deleted"
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || nil
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || ""
@received_at = attributes[:received_at] || attributes['received_at'] || nil
@user = attributes[:user] || attributes['user'] || nil
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ActivityFeedbackEventPayload < GetStream::BaseModel

# Model attributes
# @!attribute action
# @return [String] The type of feedback action
# @return [String] The type of feedback action. One of: hide, show_more, show_less
attr_accessor :action
# @!attribute activity_id
# @return [String] The activity that received feedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class ActivityFeedbackRequest < GetStream::BaseModel
# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@hide = attributes[:hide] || attributes['hide'] || nil
@show_less = attributes[:show_less] || attributes['show_less'] || nil
@show_more = attributes[:show_more] || attributes['show_more'] || nil
@user_id = attributes[:user_id] || attributes['user_id'] || nil
@hide = attributes[:hide] || attributes['hide'] || false
@show_less = attributes[:show_less] || attributes['show_less'] || false
@show_more = attributes[:show_more] || attributes['show_more'] || false
@user_id = attributes[:user_id] || attributes['user_id'] || ""
@user = attributes[:user] || attributes['user'] || nil
end

Expand Down
6 changes: 3 additions & 3 deletions lib/getstream_ruby/generated/models/activity_mark_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def initialize(attributes = {})
@fid = attributes[:fid] || attributes['fid']
@custom = attributes[:custom] || attributes['custom']
@type = attributes[:type] || attributes['type'] || "feeds.activity.marked"
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || nil
@mark_all_read = attributes[:mark_all_read] || attributes['mark_all_read'] || nil
@mark_all_seen = attributes[:mark_all_seen] || attributes['mark_all_seen'] || nil
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || ""
@mark_all_read = attributes[:mark_all_read] || attributes['mark_all_read'] || false
@mark_all_seen = attributes[:mark_all_seen] || attributes['mark_all_seen'] || false
@received_at = attributes[:received_at] || attributes['received_at'] || nil
@mark_read = attributes[:mark_read] || attributes['mark_read'] || nil
@mark_seen = attributes[:mark_seen] || attributes['mark_seen'] || nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def initialize(attributes = {})
@custom = attributes[:custom] || attributes['custom']
@pinned_activity = attributes[:pinned_activity] || attributes['pinned_activity']
@type = attributes[:type] || attributes['type'] || "feeds.activity.pinned"
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || nil
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || ""
@received_at = attributes[:received_at] || attributes['received_at'] || nil
@user = attributes[:user] || attributes['user'] || nil
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def initialize(attributes = {})
@custom = attributes[:custom] || attributes['custom']
@reaction = attributes[:reaction] || attributes['reaction']
@type = attributes[:type] || attributes['type'] || "feeds.activity.reaction.added"
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || nil
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || ""
@received_at = attributes[:received_at] || attributes['received_at'] || nil
@user = attributes[:user] || attributes['user'] || nil
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def initialize(attributes = {})
@custom = attributes[:custom] || attributes['custom']
@reaction = attributes[:reaction] || attributes['reaction']
@type = attributes[:type] || attributes['type'] || "feeds.activity.reaction.deleted"
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || nil
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || ""
@received_at = attributes[:received_at] || attributes['received_at'] || nil
@user = attributes[:user] || attributes['user'] || nil
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def initialize(attributes = {})
@custom = attributes[:custom] || attributes['custom']
@reaction = attributes[:reaction] || attributes['reaction']
@type = attributes[:type] || attributes['type'] || "feeds.activity.reaction.updated"
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || nil
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || ""
@received_at = attributes[:received_at] || attributes['received_at'] || nil
@user = attributes[:user] || attributes['user'] || nil
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def initialize(attributes = {})
@activity = attributes[:activity] || attributes['activity']
@custom = attributes[:custom] || attributes['custom']
@type = attributes[:type] || attributes['type'] || "feeds.activity.removed_from_feed"
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || nil
@feed_visibility = attributes[:feed_visibility] || attributes['feed_visibility'] || ""
@received_at = attributes[:received_at] || attributes['received_at'] || nil
@user = attributes[:user] || attributes['user'] || nil
end
Expand Down
33 changes: 19 additions & 14 deletions lib/getstream_ruby/generated/models/activity_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ class ActivityRequest < GetStream::BaseModel
# @!attribute feeds
# @return [Array<String>] 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)
attr_accessor :copy_custom_to_notification
# @!attribute create_notification_activity
# @return [Boolean] Whether to create notification activities for mentioned users
attr_accessor :create_notification_activity
Expand All @@ -31,7 +34,7 @@ class ActivityRequest < GetStream::BaseModel
# @return [String] ID of a poll to attach to activity
attr_accessor :poll_id
# @!attribute restrict_replies
# @return [String] Controls who can add comments/replies to this activity. Options: 'everyone' (default - anyone can reply), 'people_i_follow' (only people the activity creator follows can reply), 'nobody' (no one can reply)
# @return [String] Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody
attr_accessor :restrict_replies
# @!attribute skip_enrich_url
# @return [Boolean] Whether to skip URL enrichment for the activity
Expand All @@ -46,7 +49,7 @@ class ActivityRequest < GetStream::BaseModel
# @return [String] ID of the user creating the activity
attr_accessor :user_id
# @!attribute visibility
# @return [String] Visibility setting for the activity
# @return [String] Visibility setting for the activity. One of: public, private, tag
attr_accessor :visibility
# @!attribute visibility_tag
# @return [String] If visibility is 'tag', this is the tag name and is required
Expand Down Expand Up @@ -81,18 +84,19 @@ def initialize(attributes = {})
super(attributes)
@type = attributes[:type] || attributes['type']
@feeds = attributes[:feeds] || attributes['feeds']
@create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil
@expires_at = attributes[:expires_at] || attributes['expires_at'] || nil
@id = attributes[:id] || attributes['id'] || nil
@parent_id = attributes[:parent_id] || attributes['parent_id'] || 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
@skip_push = attributes[:skip_push] || attributes['skip_push'] || nil
@text = attributes[:text] || attributes['text'] || nil
@user_id = attributes[:user_id] || attributes['user_id'] || nil
@visibility = attributes[:visibility] || attributes['visibility'] || nil
@visibility_tag = attributes[:visibility_tag] || attributes['visibility_tag'] || nil
@copy_custom_to_notification = attributes[:copy_custom_to_notification] || attributes['copy_custom_to_notification'] || false
@create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || false
@expires_at = attributes[:expires_at] || attributes['expires_at'] || ""
@id = attributes[:id] || attributes['id'] || ""
@parent_id = attributes[:parent_id] || attributes['parent_id'] || ""
@poll_id = attributes[:poll_id] || attributes['poll_id'] || ""
@restrict_replies = attributes[:restrict_replies] || attributes['restrict_replies'] || ""
@skip_enrich_url = attributes[:skip_enrich_url] || attributes['skip_enrich_url'] || false
@skip_push = attributes[:skip_push] || attributes['skip_push'] || false
@text = attributes[:text] || attributes['text'] || ""
@user_id = attributes[:user_id] || attributes['user_id'] || ""
@visibility = attributes[:visibility] || attributes['visibility'] || ""
@visibility_tag = attributes[:visibility_tag] || attributes['visibility_tag'] || ""
@attachments = attributes[:attachments] || attributes['attachments'] || nil
@collection_refs = attributes[:collection_refs] || attributes['collection_refs'] || nil
@filter_tags = attributes[:filter_tags] || attributes['filter_tags'] || nil
Expand All @@ -108,6 +112,7 @@ def self.json_field_mappings
{
type: 'type',
feeds: 'feeds',
copy_custom_to_notification: 'copy_custom_to_notification',
create_notification_activity: 'create_notification_activity',
expires_at: 'expires_at',
id: 'id',
Expand Down
Loading
Loading