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
17 changes: 7 additions & 10 deletions lib/getstream_ruby/generated/chat_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
56 changes: 56 additions & 0 deletions lib/getstream_ruby/generated/common_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
52 changes: 49 additions & 3 deletions lib/getstream_ruby/generated/feeds_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand All @@ -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?
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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)
Expand All @@ -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?
Expand All @@ -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]
Expand Down Expand Up @@ -1606,16 +1650,18 @@ 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)
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?
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
Expand Down
3 changes: 2 additions & 1 deletion lib/getstream_ruby/generated/models/activity_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class ActivityRequest < GetStream::BaseModel
# @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)
# @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
Expand Down
7 changes: 6 additions & 1 deletion lib/getstream_ruby/generated/models/activity_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {})
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/getstream_ruby/generated/models/add_activity_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class AddActivityRequest < GetStream::BaseModel
# @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)
# @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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/getstream_ruby/generated/models/add_comment_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/getstream_ruby/generated/models/add_reaction_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class AddUserGroupMembersRequest < GetStream::BaseModel
# @!attribute member_ids
# @return [Array<String>] 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
Expand All @@ -20,13 +23,15 @@ 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

# Override field mappings for JSON serialization
def self.json_field_mappings
{
member_ids: 'member_ids',
as_admin: 'as_admin',
team_id: 'team_id'
}
end
Expand Down
7 changes: 6 additions & 1 deletion lib/getstream_ruby/generated/models/aggregation_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.users.error"
@type = attributes[:type] || attributes['type'] || "export.moderation_logs.error"
@received_at = attributes[:received_at] || attributes['received_at'] || nil
end

Expand Down
46 changes: 46 additions & 0 deletions lib/getstream_ruby/generated/models/call_level_event_payload.rb
Original file line number Diff line number Diff line change
@@ -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
Loading
Loading