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
142 changes: 141 additions & 1 deletion lib/getstream_ruby/generated/chat_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,57 @@ def get_many_messages(_type, _id, ids, member_custom_include = nil)
)
end

# Returns pinned messages for the channel
#
# @param _type [String]
# @param _id [String]
# @param limit [Integer]
# @param offset [Integer]
# @param id_gte [String]
# @param id_gt [String]
# @param id_lte [String]
# @param id_lt [String]
# @param pinned_at_after_or_equal [DateTime]
# @param pinned_at_after [DateTime]
# @param pinned_at_before_or_equal [DateTime]
# @param pinned_at_before [DateTime]
# @param id_around [String]
# @param pinned_at_around [DateTime]
# @param user_id [String]
# @param sort [Array<SortParamRequest>]
# @param member_custom_include [Array<String>]
# @return [Models::GetPinnedMessagesResponse]
def get_pinned_messages(_type, _id, limit = nil, offset = nil, id_gte = nil, id_gt = nil, id_lte = nil, id_lt = nil, pinned_at_after_or_equal = nil, pinned_at_after = nil, pinned_at_before_or_equal = nil, pinned_at_before = nil, id_around = nil, pinned_at_around = nil, user_id = nil, sort = nil, member_custom_include = nil)
path = '/api/v2/chat/channels/{type}/{id}/pinned_messages'
# Replace path parameters
path = path.gsub('{type}', _type.to_s)
path = path.gsub('{id}', _id.to_s)
# Build query parameters
query_params = {}
query_params['limit'] = limit unless limit.nil?
query_params['offset'] = offset unless offset.nil?
query_params['id_gte'] = id_gte unless id_gte.nil?
query_params['id_gt'] = id_gt unless id_gt.nil?
query_params['id_lte'] = id_lte unless id_lte.nil?
query_params['id_lt'] = id_lt unless id_lt.nil?
query_params['pinned_at_after_or_equal'] = pinned_at_after_or_equal unless pinned_at_after_or_equal.nil?
query_params['pinned_at_after'] = pinned_at_after unless pinned_at_after.nil?
query_params['pinned_at_before_or_equal'] = pinned_at_before_or_equal unless pinned_at_before_or_equal.nil?
query_params['pinned_at_before'] = pinned_at_before unless pinned_at_before.nil?
query_params['id_around'] = id_around unless id_around.nil?
query_params['pinned_at_around'] = pinned_at_around unless pinned_at_around.nil?
query_params['user_id'] = user_id unless user_id.nil?
query_params['sort'] = sort unless sort.nil?
query_params['member_custom_include'] = member_custom_include unless member_custom_include.nil?

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

# This Method creates a channel or returns an existing one with matching attributesSends events:- channel.created- member.added- member.removed- member.updated- user.watching.start
#
# @param _type [String]
Expand Down Expand Up @@ -1450,6 +1501,95 @@ def unmute_channel(unmute_channel_request)
)
end

# Get all predefined filters with optional sorting by created_at, updated_at, name, or operation
#
# @param include_stats [Boolean]
# @param sort [Array<SortParamRequest>]
# @return [Models::QueryPredefinedFiltersResponse]
def get_predefined_filters(include_stats = nil, sort = nil)
path = '/api/v2/chat/predefined_filters'
# Build query parameters
query_params = {}
query_params['include_stats'] = include_stats unless include_stats.nil?
query_params['sort'] = sort unless sort.nil?

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

# Create a predefined filter that can be used in Query endpoints
#
# @param create_predefined_filter_request [CreatePredefinedFilterRequest]
# @return [Models::CreatePredefinedFilterResponse]
def create_predefined_filter(create_predefined_filter_request)
path = '/api/v2/chat/predefined_filters'
# Build request body
body = create_predefined_filter_request

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

# Delete a predefined filter by name
#
# @param name [String]
# @return [Models::Response]
def delete_predefined_filter(name)
path = '/api/v2/chat/predefined_filters/{name}'
# Replace path parameters
path = path.gsub('{name}', name.to_s)

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

# Get a predefined filter by name
#
# @param name [String]
# @return [Models::GetPredefinedFilterResponse]
def get_predefined_filter(name)
path = '/api/v2/chat/predefined_filters/{name}'
# Replace path parameters
path = path.gsub('{name}', name.to_s)

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

# Update a predefined filter by name
#
# @param name [String]
# @param update_predefined_filter_request [UpdatePredefinedFilterRequest]
# @return [Models::UpdatePredefinedFilterResponse]
def update_predefined_filter(name, update_predefined_filter_request)
path = '/api/v2/chat/predefined_filters/{name}'
# Replace path parameters
path = path.gsub('{name}', name.to_s)
# Build request body
body = update_predefined_filter_request

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

# Find and filter channel scoped or global user bans
#
# @param payload [QueryBannedUsersPayload]
Expand Down Expand Up @@ -1749,7 +1889,7 @@ def query_segment_targets(_id, query_segment_targets_request)
)
end

# Retrieve team-level usage statistics from the warehouse database.Returns all 16 metrics grouped by team with cursor-based pagination.**Date Range Options (mutually exclusive):**- Use 'month' parameter (YYYY-MM format) for monthly aggregated values- Use 'start_date'/'end_date' parameters (YYYY-MM-DD format) for daily breakdown- If neither provided, defaults to current month (monthly mode)This endpoint is server-side only.
# Retrieve team-level usage statistics from the warehouse database.Returns all 16 metrics grouped by team with cursor-based pagination.**Date Range Options (mutually exclusive):**- Use 'month' parameter (YYYY-MM format) for monthly aggregated values- Use 'start_date'/'end_date' parameters (YYYY-MM-DD format) for daily breakdown- If neither provided, defaults to current month (monthly mode)**Team Filter:**- Use 'team' to return a single team's stats (empty string selects users not assigned to any team)- Mutually exclusive with the 'next' pagination cursorThis endpoint is server-side only.
#
# @param query_team_usage_stats_request [QueryTeamUsageStatsRequest]
# @return [Models::QueryTeamUsageStatsResponse]
Expand Down
53 changes: 53 additions & 0 deletions lib/getstream_ruby/generated/common_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,39 @@ def list_permissions()
)
end

# Creates permission
#
# @param create_permission_request [CreatePermissionRequest]
# @return [Models::Response]
def create_permission(create_permission_request)
path = '/api/v2/permissions'
# Build request body
body = create_permission_request

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

# Deletes custom permission
#
# @param _id [String]
# @return [Models::Response]
def delete_permission(_id)
path = '/api/v2/permissions/{id}'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)

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

# Gets custom permission
#
# @param _id [String]
Expand All @@ -636,6 +669,26 @@ def get_permission(_id)
)
end

# Updates custom permission
#
# @param _id [String]
# @param permission_request [PermissionRequest]
# @return [Models::Response]
def update_permission(_id, permission_request)
path = '/api/v2/permissions/{id}'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
# Build request body
body = permission_request

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

# Creates a new poll
#
# @param create_poll_request [CreatePollRequest]
Expand Down
9 changes: 9 additions & 0 deletions lib/getstream_ruby/generated/feed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ def change_feed_visibility(change_feed_visibility_request)
@client.feeds.change_feed_visibility(@feed_group_id, @feed_id, change_feed_visibility_request)
end

# Returns the number of activities in a feed, the total number of comments on those activities (including nested replies), and the sum of both. The comment total is cached for a few seconds on large feeds.
#
# @return [Models::GetFeedCountsResponse]
def get_feed_counts()

# Delegate to the FeedsClient
@client.feeds.get_feed_counts(@feed_group_id, @feed_id)
end

# Add, remove, or set members for a feed
#
# @param update_feed_members_request [UpdateFeedMembersRequest]
Expand Down
18 changes: 18 additions & 0 deletions lib/getstream_ruby/generated/feeds_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,24 @@ def change_feed_visibility(feed_group_id, feed_id, change_feed_visibility_reques
)
end

# Returns the number of activities in a feed, the total number of comments on those activities (including nested replies), and the sum of both. The comment total is cached for a few seconds on large feeds.
#
# @param feed_group_id [String]
# @param feed_id [String]
# @return [Models::GetFeedCountsResponse]
def get_feed_counts(feed_group_id, feed_id)
path = '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/counts'
# Replace path parameters
path = path.gsub('{feed_group_id}', feed_group_id.to_s)
path = path.gsub('{feed_id}', feed_id.to_s)

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

# Add, remove, or set members for a feed
#
# @param feed_group_id [String]
Expand Down
12 changes: 11 additions & 1 deletion lib/getstream_ruby/generated/models/activity_processor_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,27 @@ class ActivityProcessorConfig < GetStream::BaseModel
# @!attribute type
# @return [String] Type of activity processor (required)
attr_accessor :type
# @!attribute min_text_length
# @return [Integer] Minimum number of characters the activity text must have before this processor runs. 0 (the default) disables the check. Only applies to text_interest_tags.
attr_accessor :min_text_length
# @!attribute min_word_count
# @return [Integer] Minimum number of words the activity text must have before this processor runs. 0 (the default) disables the check. Only applies to text_interest_tags. Words are whitespace-separated, so scripts written without word spacing (Chinese, Japanese, Thai) always count as 1 word regardless of length — use min_text_length for those.
attr_accessor :min_word_count

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

# Override field mappings for JSON serialization
def self.json_field_mappings
{
type: 'type'
type: 'type',
min_text_length: 'min_text_length',
min_word_count: 'min_word_count'
}
end
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.review_queue.error"
@type = attributes[:type] || attributes['type'] || "export.users.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 @@ -25,13 +25,13 @@ class BulkActionAppealsRequest < GetStream::BaseModel
# @return [RejectAppealRequestPayload] Configuration for rejecting an appeal
attr_accessor :reject_appeal
# @!attribute restore
# @return [RestoreActionRequestPayload] Configuration for restore action
# @return [RestoreActionRequestPayload] Configuration for restore action. State-aware: reverses whichever of a delete, a block, or a shadow block currently applies to the content (including both a delete and a block/shadow block at once).
attr_accessor :restore
# @!attribute unban
# @return [UnbanActionRequestPayload] Configuration for unban moderation action
attr_accessor :unban
# @!attribute unblock
# @return [UnblockActionRequestPayload] Configuration for unblock action
# @return [UnblockActionRequestPayload] Deprecated: use restore instead — it now also reverses a block or shadow block. Configuration for unblock action.
attr_accessor :unblock
# @!attribute user
# @return [UserRequest] User request object
Expand Down
5 changes: 5 additions & 0 deletions lib/getstream_ruby/generated/models/channel_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class ChannelConfig < GetStream::BaseModel
# @!attribute max_message_length
# @return [Integer]
attr_accessor :max_message_length
# @!attribute message_retention
# @return [String]
attr_accessor :message_retention
# @!attribute mutes
# @return [Boolean]
attr_accessor :mutes
Expand Down Expand Up @@ -130,6 +133,7 @@ def initialize(attributes = {})
@delivery_events = attributes[:delivery_events] || attributes['delivery_events']
@mark_messages_pending = attributes[:mark_messages_pending] || attributes['mark_messages_pending']
@max_message_length = attributes[:max_message_length] || attributes['max_message_length']
@message_retention = attributes[:message_retention] || attributes['message_retention']
@mutes = attributes[:mutes] || attributes['mutes']
@name = attributes[:name] || attributes['name']
@polls = attributes[:polls] || attributes['polls']
Expand Down Expand Up @@ -171,6 +175,7 @@ def self.json_field_mappings
delivery_events: 'delivery_events',
mark_messages_pending: 'mark_messages_pending',
max_message_length: 'max_message_length',
message_retention: 'message_retention',
mutes: 'mutes',
name: 'name',
polls: 'polls',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class ChannelConfigWithInfo < GetStream::BaseModel
# @!attribute max_message_length
# @return [Integer]
attr_accessor :max_message_length
# @!attribute message_retention
# @return [String]
attr_accessor :message_retention
# @!attribute mutes
# @return [Boolean]
attr_accessor :mutes
Expand Down Expand Up @@ -133,6 +136,7 @@ def initialize(attributes = {})
@delivery_events = attributes[:delivery_events] || attributes['delivery_events']
@mark_messages_pending = attributes[:mark_messages_pending] || attributes['mark_messages_pending']
@max_message_length = attributes[:max_message_length] || attributes['max_message_length']
@message_retention = attributes[:message_retention] || attributes['message_retention']
@mutes = attributes[:mutes] || attributes['mutes']
@name = attributes[:name] || attributes['name']
@polls = attributes[:polls] || attributes['polls']
Expand Down Expand Up @@ -175,6 +179,7 @@ def self.json_field_mappings
delivery_events: 'delivery_events',
mark_messages_pending: 'mark_messages_pending',
max_message_length: 'max_message_length',
message_retention: 'message_retention',
mutes: 'mutes',
name: 'name',
polls: 'polls',
Expand Down
Loading
Loading