Skip to content
Open
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
6 changes: 3 additions & 3 deletions lib/getstream_ruby/generated/chat_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def query_channels(query_channels_request)
)
end

# Update channels in batchSends events:- channel.frozen- channel.hidden- channel.unfrozen- channel.updated- channel.visible- member.added- member.removed- member.updated
# Update channels in batch. By default returns task_id for an asynchronous task. With synchronous: true, updateData accepts at most 100 explicit CIDs and returns a positive success_channels_count of channels selected for update after the database write completes, without task_id. Always poll a returned task_id, including when an older node ignores synchronous.Sends events:- channel.frozen- channel.hidden- channel.unfrozen- channel.updated- channel.visible- member.added- member.removed- member.updated
#
# @param channel_batch_update_request [ChannelBatchUpdateRequest]
# @return [Models::ChannelBatchUpdateResponse]
Expand Down Expand Up @@ -1376,7 +1376,7 @@ def delete_reminder(message_id, user_id = nil)
)
end

# Updates an existing reminderSends events:- reminder.updated
# Updates an existing reminder. remind_at and expires_at are both replaced on every call: omitting either one clears itSends events:- reminder.updated
#
# @param message_id [String]
# @param update_reminder_request [UpdateReminderRequest]
Expand All @@ -1396,7 +1396,7 @@ def update_reminder(message_id, update_reminder_request)
)
end

# Creates a new reminderSends events:- reminder.created
# Creates a new reminder. An optional expires_at hides the reminder from every read once it passes and stops it counting against the per-user reminder capSends events:- reminder.created
#
# @param message_id [String]
# @param create_reminder_request [CreateReminderRequest]
Expand Down
26 changes: 24 additions & 2 deletions lib/getstream_ruby/generated/common_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,23 @@ def update_block_list(name, update_block_list_request)
)
end

# Validates that Stream can publish to a customer-owned GCP Pub/Sub topic
#
# @param check_gcp_pub_sub_request [CheckGCPPubSubRequest]
# @return [Models::CheckGCPPubSubResponse]
def check_gcp_pub_sub(check_gcp_pub_sub_request)
path = '/api/v2/check_gcp_pubsub'
# Build request body
body = check_gcp_pub_sub_request

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

# Sends a test message via push, this is a test endpoint to verify your push settings
#
# @param check_push_request [CheckPushRequest]
Expand Down Expand Up @@ -874,17 +891,22 @@ def delete_poll_option(poll_id, option_id, user_id = nil)
#
# @param poll_id [String]
# @param option_id [String]
# @param user_id [String]
# @return [Models::PollOptionResponse]
def get_poll_option(poll_id, option_id)
def get_poll_option(poll_id, option_id, user_id = nil)
path = '/api/v2/polls/{poll_id}/options/{option_id}'
# Replace path parameters
path = path.gsub('{poll_id}', poll_id.to_s)
path = path.gsub('{option_id}', option_id.to_s)
# Build query parameters
query_params = {}
query_params['user_id'] = user_id unless user_id.nil?

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

Expand Down
149 changes: 143 additions & 6 deletions lib/getstream_ruby/generated/feeds_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -386,21 +386,29 @@ def delete_activity(_id, hard_delete = nil, delete_notification_activity = nil)
# @param _id [String]
# @param comment_sort [String]
# @param comment_limit [Integer]
# @param skip_own_followings [Boolean]
# @param user_id [String]
# @param language [String]
# @param translate_text [Boolean]
# @param include_top_level_comment_count [Boolean]
# @param include_soft_deleted_activities [Boolean]
# @param include_moderated_activities [Boolean]
# @return [Models::GetActivityResponse]
def get_activity(_id, comment_sort = nil, comment_limit = nil, user_id = nil, language = nil, translate_text = nil)
def get_activity(_id, comment_sort = nil, comment_limit = nil, skip_own_followings = nil, user_id = nil, language = nil, translate_text = nil, include_top_level_comment_count = nil, include_soft_deleted_activities = nil, include_moderated_activities = nil)
path = '/api/v2/feeds/activities/{id}'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
# Build query parameters
query_params = {}
query_params['comment_sort'] = comment_sort unless comment_sort.nil?
query_params['comment_limit'] = comment_limit unless comment_limit.nil?
query_params['skip_own_followings'] = skip_own_followings unless skip_own_followings.nil?
query_params['user_id'] = user_id unless user_id.nil?
query_params['language'] = language unless language.nil?
query_params['translate_text'] = translate_text unless translate_text.nil?
query_params['include_top_level_comment_count'] = include_top_level_comment_count unless include_top_level_comment_count.nil?
query_params['include_soft_deleted_activities'] = include_soft_deleted_activities unless include_soft_deleted_activities.nil?
query_params['include_moderated_activities'] = include_moderated_activities unless include_moderated_activities.nil?

# Make the API request
@client.make_request(
Expand All @@ -410,7 +418,7 @@ def get_activity(_id, comment_sort = nil, comment_limit = nil, user_id = nil, la
)
end

# Updates certain fields of the activity. Use 'set' to update specific fields and 'unset' to remove fields. This allows you to update only the fields you need without replacing the entire activity. Useful for updating reply restrictions ('restrict_replies'), mentioned users, or custom data.Sends events:- feeds.activity.updated
# Updates certain fields of the activity. Use 'set' to update specific fields and 'unset' to remove fields. This allows you to update only the fields you need without replacing the entire activity. Useful for updating reply restrictions ('restrict_replies'), mentioned users, or custom data. Changing `feeds` is a placement change (add/delete on those feeds), not an activity content update.Sends events:- feeds.activity.updated
#
# @param _id [String]
# @param update_activity_partial_request [UpdateActivityPartialRequest]
Expand All @@ -430,7 +438,7 @@ def update_activity_partial(_id, update_activity_partial_request)
)
end

# Replaces an activity with the provided data. Use this to update text, attachments, reply restrictions ('restrict_replies'), mentioned users, and other activity fields. Note: This is a full update - any fields not provided will be cleared.Sends events:- feeds.activity.updated
# Replaces an activity with the provided data. Use this to update text, attachments, reply restrictions ('restrict_replies'), mentioned users, and other activity fields. Note: This is a full update - any fields not provided will be cleared. Changing `feeds` is a placement change (add/delete on those feeds), not an activity content update.Sends events:- feeds.activity.updated
#
# @param _id [String]
# @param update_activity_request [UpdateActivityRequest]
Expand Down Expand Up @@ -575,12 +583,14 @@ def query_bookmarks(query_bookmarks_request, language = nil, translate_text = ni
# Delete collections in a batch operation. Users can only delete their own collections.
#
# @param collection_refs [Array<String>]
# @param hard_delete [Boolean]
# @return [Models::DeleteCollectionsResponse]
def delete_collections(collection_refs)
def delete_collections(collection_refs, hard_delete = nil)
path = '/api/v2/feeds/collections'
# Build query parameters
query_params = {}
query_params['collection_refs'] = collection_refs unless collection_refs.nil?
query_params['hard_delete'] = hard_delete unless hard_delete.nil?

# Make the API request
@client.make_request(
Expand Down Expand Up @@ -692,8 +702,9 @@ def query_collections(query_collections_request)
# @param limit [Integer]
# @param prev [String]
# @param _next [String]
# @param include_top_level_comment_count [Boolean]
# @return [Models::GetCommentsResponse]
def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, id_around = nil, language = nil, translate_text = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, id_around = nil, language = nil, translate_text = nil, user_id = nil, limit = nil, prev = nil, _next = nil, include_top_level_comment_count = nil)
path = '/api/v2/feeds/comments'
# Build query parameters
query_params = {}
Expand All @@ -709,6 +720,7 @@ def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit
query_params['limit'] = limit unless limit.nil?
query_params['prev'] = prev unless prev.nil?
query_params['next'] = _next unless _next.nil?
query_params['include_top_level_comment_count'] = include_top_level_comment_count unless include_top_level_comment_count.nil?

# Make the API request
@client.make_request(
Expand Down Expand Up @@ -924,6 +936,26 @@ def update_comment(_id, update_comment_request)
)
end

# Hide or unhide a comment for the current user
#
# @param _id [String]
# @param comment_feedback_request [CommentFeedbackRequest]
# @return [Models::CommentFeedbackResponse]
def comment_feedback(_id, comment_feedback_request)
path = '/api/v2/feeds/comments/{id}/feedback'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
# Build request body
body = comment_feedback_request

# Make the API request
@client.make_request(
:post,
path,
body: body
)
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]
Expand Down Expand Up @@ -2034,6 +2066,70 @@ def update_membership_level(_id, update_membership_level_request)
)
end

# Returns the feeds retention policies configured for the app. Server-side only.
#
# @return [Models::GetFeedsRetentionPolicyResponse]
def feeds_get_retention_policy()
path = '/api/v2/feeds/retention_policy'

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

# Creates or updates a feeds retention policy for the app (an app may have multiple, each scoped to feed groups). Server-side only.
#
# @param set_feeds_retention_policy_request [SetFeedsRetentionPolicyRequest]
# @return [Models::SetFeedsRetentionPolicyResponse]
def feeds_set_retention_policy(set_feeds_retention_policy_request)
path = '/api/v2/feeds/retention_policy'
# Build request body
body = set_feeds_retention_policy_request

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

# Removes the named feeds retention policy for the app (an app may hold several). Server-side only.
#
# @param delete_feeds_retention_policy_request [DeleteFeedsRetentionPolicyRequest]
# @return [Models::DeleteFeedsRetentionPolicyResponse]
def feeds_delete_retention_policy(delete_feeds_retention_policy_request)
path = '/api/v2/feeds/retention_policy/delete'
# Build request body
body = delete_feeds_retention_policy_request

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

# Returns filtered and sorted feeds retention cleanup run history for the app. Supports filter_conditions on 'policy' and 'date' fields. Server-side only.
#
# @param get_feeds_retention_policy_runs_request [GetFeedsRetentionPolicyRunsRequest]
# @return [Models::GetFeedsRetentionPolicyRunsResponse]
def feeds_get_retention_policy_runs(get_feeds_retention_policy_runs_request)
path = '/api/v2/feeds/retention_policy/runs'
# Build request body
body = get_feeds_retention_policy_runs_request

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

# Queries revision history for activities and comments
#
# @param query_revision_history_request [QueryRevisionHistoryRequest]
Expand Down Expand Up @@ -2155,7 +2251,28 @@ def export_feed_user_data(user_id)
)
end

# Returns the user's most common interest tags ranked by the number of distinct activities they reacted to that carried each tag. Client-side callers may only read their own interests; server-side callers may fetch any user. Results are sorted by descending count, then alphabetically by tag.
# Removes the given interest tags from a user, whether they were set manually or computed from reactions. A removed computed tag returns on the next recomputation if the user's reactions still support it; to keep a tag out of ranking for good, set it with a weight of 0 or below instead. Client-side callers may only manage their own interests; server-side callers may manage any user. Returns the user's remaining interests.
#
# @param user_id [String]
# @param tags [Array<String>]
# @return [Models::DeleteUserInterestsResponse]
def delete_user_interests(user_id, tags)
path = '/api/v2/feeds/users/{user_id}/interests'
# Replace path parameters
path = path.gsub('{user_id}', user_id.to_s)
# Build query parameters
query_params = {}
query_params['tags'] = tags unless tags.nil?

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

# Returns the user's interest tags with their ranking weights: tags computed from the activities the user reacted to and tags set manually through the API. Client-side callers may only read their own interests; server-side callers may fetch any user. Results are sorted by descending weight, then manually set tags before computed ones, then descending count, then alphabetically by tag.
#
# @param user_id [String]
# @param limit [Integer]
Expand All @@ -2176,6 +2293,26 @@ def get_user_interests(user_id, limit = nil)
)
end

# Adds or updates interest tags on a user with explicit ranking weights. Tags set this way rank above the tags computed from the user's reactions at equal weight and are never overwritten by them. Client-side callers may only manage their own interests; server-side callers may manage any user. Returns the user's full interest list after the write.
#
# @param user_id [String]
# @param upsert_user_interests_request [UpsertUserInterestsRequest]
# @return [Models::UpsertUserInterestsResponse]
def upsert_user_interests(user_id, upsert_user_interests_request)
path = '/api/v2/feeds/users/{user_id}/interests'
# Replace path parameters
path = path.gsub('{user_id}', user_id.to_s)
# Build request body
body = upsert_user_interests_request

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

end
end
end
5 changes: 5 additions & 0 deletions lib/getstream_ruby/generated/models/activity_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ class ActivityResponse < GetStream::BaseModel
# @!attribute text
# @return [String] Text content of the activity
attr_accessor :text
# @!attribute top_level_comment_count
# @return [Integer] Number of top-level comments (comments directly on the activity, excluding replies). Only returned by GetActivity when include_top_level_comment_count=true; never set on feed reads or events. Same status/deletion rules as comment_count; not adjusted per viewer.
attr_accessor :top_level_comment_count
# @!attribute visibility_tag
# @return [String] If visibility is 'tag', this is the tag name
attr_accessor :visibility_tag
Expand Down Expand Up @@ -201,6 +204,7 @@ def initialize(attributes = {})
@moderation_action = attributes[:moderation_action] || attributes['moderation_action'] || nil
@selector_source = attributes[:selector_source] || attributes['selector_source'] || nil
@text = attributes[:text] || attributes['text'] || nil
@top_level_comment_count = attributes[:top_level_comment_count] || attributes['top_level_comment_count'] || nil
@visibility_tag = attributes[:visibility_tag] || attributes['visibility_tag'] || nil
@friend_reactions = attributes[:friend_reactions] || attributes['friend_reactions'] || nil
@latest_shares = attributes[:latest_shares] || attributes['latest_shares'] || nil
Expand Down Expand Up @@ -256,6 +260,7 @@ def self.json_field_mappings
moderation_action: 'moderation_action',
selector_source: 'selector_source',
text: 'text',
top_level_comment_count: 'top_level_comment_count',
visibility_tag: 'visibility_tag',
friend_reactions: 'friend_reactions',
latest_shares: 'latest_shares',
Expand Down
10 changes: 10 additions & 0 deletions lib/getstream_ruby/generated/models/activity_selector_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ class ActivitySelectorConfig < GetStream::BaseModel
# @!attribute min_popularity
# @return [Integer] Minimum popularity threshold. For the 'popular' selector, omit to use the default (5); values below 1 are rejected
attr_accessor :min_popularity
# @!attribute ranking_candidate_limit
# @return [Integer] Maximum number of candidate activities this selector contributes to a ranked feed (1-1000). Omit to use the default ranking buffer. Only supported on the popular, proximity, interest and query selectors, and ignored on feeds without ranking
attr_accessor :ranking_candidate_limit
# @!attribute time_budget_ms
# @return [Integer] Maximum time in milliseconds this selector may take (25-5000). A selector that runs over its budget is dropped from that read instead of failing it, and stays out for the rest of that pagination session. The budget can only tighten the default, never extend it. Omit to use the default. Only supported on the popular, proximity, interest, query and follow_suggestion selectors
attr_accessor :time_budget_ms
# @!attribute sort
# @return [Array<SortParamRequest>] Sort parameters for activity selection
attr_accessor :sort
Expand All @@ -41,6 +47,8 @@ def initialize(attributes = {})
@cutoff_time = attributes[:cutoff_time] || attributes['cutoff_time'] || nil
@cutoff_window = attributes[:cutoff_window] || attributes['cutoff_window'] || nil
@min_popularity = attributes[:min_popularity] || attributes['min_popularity'] || nil
@ranking_candidate_limit = attributes[:ranking_candidate_limit] || attributes['ranking_candidate_limit'] || nil
@time_budget_ms = attributes[:time_budget_ms] || attributes['time_budget_ms'] || nil
@sort = attributes[:sort] || attributes['sort'] || nil
@feed_groups = attributes[:feed_groups] || attributes['feed_groups'] || nil
@filter = attributes[:filter] || attributes['filter'] || nil
Expand All @@ -54,6 +62,8 @@ def self.json_field_mappings
cutoff_time: 'cutoff_time',
cutoff_window: 'cutoff_window',
min_popularity: 'min_popularity',
ranking_candidate_limit: 'ranking_candidate_limit',
time_budget_ms: 'time_budget_ms',
sort: 'sort',
feed_groups: 'feed_groups',
filter: 'filter',
Expand Down
Loading
Loading