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
67 changes: 67 additions & 0 deletions lib/getstream_ruby/generated/chat_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,73 @@ def query_reminders(query_reminders_request)
)
end

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

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

# Creates or updates a retention policy for the app. Server-side only.
#
# @param set_retention_policy_request [SetRetentionPolicyRequest]
# @return [Models::SetRetentionPolicyResponse]
def set_retention_policy(set_retention_policy_request)
path = '/api/v2/chat/retention_policy'
# Build request body
body = set_retention_policy_request

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

# Removes a retention policy for the app. Server-side only.
#
# @param delete_retention_policy_request [DeleteRetentionPolicyRequest]
# @return [Models::DeleteRetentionPolicyResponse]
def delete_retention_policy(delete_retention_policy_request)
path = '/api/v2/chat/retention_policy/delete'
# Build request body
body = delete_retention_policy_request

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

# Returns paginated retention cleanup run history for the app. Server-side only.
#
# @param limit [Integer]
# @param offset [Integer]
# @return [Models::GetRetentionPolicyRunsResponse]
def get_retention_policy_runs(limit = nil, offset = nil)
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?

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

# Search messages across channels
#
# @param payload [SearchPayload]
Expand Down
46 changes: 46 additions & 0 deletions lib/getstream_ruby/generated/models/ai_image_label_definition.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 AIImageLabelDefinition < GetStream::BaseModel

# Model attributes
# @!attribute description
# @return [String]
attr_accessor :description
# @!attribute group
# @return [String]
attr_accessor :group
# @!attribute key
# @return [String]
attr_accessor :key
# @!attribute label
# @return [String]
attr_accessor :label

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@description = attributes[:description] || attributes['description']
@group = attributes[:group] || attributes['group']
@key = attributes[:key] || attributes['key']
@label = attributes[:label] || attributes['label']
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
description: 'description',
group: 'group',
key: 'key',
label: 'label'
}
end
end
end
end
end
5 changes: 5 additions & 0 deletions lib/getstream_ruby/generated/models/app_response_fields.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ class AppResponseFields < GetStream::BaseModel
# @!attribute image_moderation_labels
# @return [Array<String>]
attr_accessor :image_moderation_labels
# @!attribute activity_metrics_config
# @return [Hash<String, Integer>]
attr_accessor :activity_metrics_config
# @!attribute datadog_info
# @return [DataDogInfo]
attr_accessor :datadog_info
Expand Down Expand Up @@ -227,6 +230,7 @@ def initialize(attributes = {})
@allowed_flag_reasons = attributes[:allowed_flag_reasons] || attributes['allowed_flag_reasons'] || nil
@geofences = attributes[:geofences] || attributes['geofences'] || nil
@image_moderation_labels = attributes[:image_moderation_labels] || attributes['image_moderation_labels'] || nil
@activity_metrics_config = attributes[:activity_metrics_config] || attributes['activity_metrics_config'] || nil
@datadog_info = attributes[:datadog_info] || attributes['datadog_info'] || nil
@moderation_dashboard_preferences = attributes[:moderation_dashboard_preferences] || attributes['moderation_dashboard_preferences'] || nil
end
Expand Down Expand Up @@ -286,6 +290,7 @@ def self.json_field_mappings
allowed_flag_reasons: 'allowed_flag_reasons',
geofences: 'geofences',
image_moderation_labels: 'image_moderation_labels',
activity_metrics_config: 'activity_metrics_config',
datadog_info: 'datadog_info',
moderation_dashboard_preferences: 'moderation_dashboard_preferences'
}
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.channels.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 @@ -19,7 +19,7 @@ class AWSRekognitionRule < GetStream::BaseModel
# @return [Float]
attr_accessor :min_confidence
# @!attribute subclassifications
# @return [Hash<String, Boolean>]
# @return [Object]
attr_accessor :subclassifications

# Initialize with attributes
Expand Down
5 changes: 5 additions & 0 deletions lib/getstream_ruby/generated/models/call_ended_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class CallEndedEvent < GetStream::BaseModel
# @!attribute reason
# @return [String] The reason why the call ended, if available
attr_accessor :reason
# @!attribute members
# @return [Array<MemberResponse>] The list of members in the call
attr_accessor :members
# @!attribute user
# @return [UserResponse]
attr_accessor :user
Expand All @@ -36,6 +39,7 @@ def initialize(attributes = {})
@call = attributes[:call] || attributes['call']
@type = attributes[:type] || attributes['type'] || "call.ended"
@reason = attributes[:reason] || attributes['reason'] || nil
@members = attributes[:members] || attributes['members'] || nil
@user = attributes[:user] || attributes['user'] || nil
end

Expand All @@ -47,6 +51,7 @@ def self.json_field_mappings
call: 'call',
type: 'type',
reason: 'reason',
members: 'members',
user: 'user'
}
end
Expand Down
7 changes: 6 additions & 1 deletion lib/getstream_ruby/generated/models/channel_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ class ChannelConfig < GetStream::BaseModel
# @!attribute automod_thresholds
# @return [Thresholds]
attr_accessor :automod_thresholds
# @!attribute chat_preferences
# @return [ChatPreferences]
attr_accessor :chat_preferences

# Initialize with attributes
def initialize(attributes = {})
Expand Down Expand Up @@ -153,6 +156,7 @@ def initialize(attributes = {})
@allowed_flag_reasons = attributes[:allowed_flag_reasons] || attributes['allowed_flag_reasons'] || nil
@blocklists = attributes[:blocklists] || attributes['blocklists'] || nil
@automod_thresholds = attributes[:automod_thresholds] || attributes['automod_thresholds'] || nil
@chat_preferences = attributes[:chat_preferences] || attributes['chat_preferences'] || nil
end

# Override field mappings for JSON serialization
Expand Down Expand Up @@ -192,7 +196,8 @@ def self.json_field_mappings
push_level: 'push_level',
allowed_flag_reasons: 'allowed_flag_reasons',
blocklists: 'blocklists',
automod_thresholds: 'automod_thresholds'
automod_thresholds: 'automod_thresholds',
chat_preferences: 'chat_preferences'
}
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ class ChannelConfigWithInfo < GetStream::BaseModel
# @!attribute automod_thresholds
# @return [Thresholds]
attr_accessor :automod_thresholds
# @!attribute chat_preferences
# @return [ChatPreferences]
attr_accessor :chat_preferences
# @!attribute grants
# @return [Hash<String, Array<String>>]
attr_accessor :grants
Expand Down Expand Up @@ -156,6 +159,7 @@ def initialize(attributes = {})
@allowed_flag_reasons = attributes[:allowed_flag_reasons] || attributes['allowed_flag_reasons'] || nil
@blocklists = attributes[:blocklists] || attributes['blocklists'] || nil
@automod_thresholds = attributes[:automod_thresholds] || attributes['automod_thresholds'] || nil
@chat_preferences = attributes[:chat_preferences] || attributes['chat_preferences'] || nil
@grants = attributes[:grants] || attributes['grants'] || nil
end

Expand Down Expand Up @@ -197,6 +201,7 @@ def self.json_field_mappings
allowed_flag_reasons: 'allowed_flag_reasons',
blocklists: 'blocklists',
automod_thresholds: 'automod_thresholds',
chat_preferences: 'chat_preferences',
grants: 'grants'
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,24 @@ class ChannelPushPreferencesResponse < GetStream::BaseModel
# @!attribute disabled_until
# @return [DateTime]
attr_accessor :disabled_until
# @!attribute chat_preferences
# @return [ChatPreferencesResponse]
attr_accessor :chat_preferences

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

# Override field mappings for JSON serialization
def self.json_field_mappings
{
chat_level: 'chat_level',
disabled_until: 'disabled_until'
disabled_until: 'disabled_until',
chat_preferences: 'chat_preferences'
}
end
end
Expand Down
7 changes: 6 additions & 1 deletion lib/getstream_ruby/generated/models/channel_type_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ class ChannelTypeConfig < GetStream::BaseModel
# @!attribute automod_thresholds
# @return [Thresholds]
attr_accessor :automod_thresholds
# @!attribute chat_preferences
# @return [ChatPreferences]
attr_accessor :chat_preferences

# Initialize with attributes
def initialize(attributes = {})
Expand Down Expand Up @@ -161,6 +164,7 @@ def initialize(attributes = {})
@allowed_flag_reasons = attributes[:allowed_flag_reasons] || attributes['allowed_flag_reasons'] || nil
@blocklists = attributes[:blocklists] || attributes['blocklists'] || nil
@automod_thresholds = attributes[:automod_thresholds] || attributes['automod_thresholds'] || nil
@chat_preferences = attributes[:chat_preferences] || attributes['chat_preferences'] || nil
end

# Override field mappings for JSON serialization
Expand Down Expand Up @@ -202,7 +206,8 @@ def self.json_field_mappings
push_level: 'push_level',
allowed_flag_reasons: 'allowed_flag_reasons',
blocklists: 'blocklists',
automod_thresholds: 'automod_thresholds'
automod_thresholds: 'automod_thresholds',
chat_preferences: 'chat_preferences'
}
end
end
Expand Down
66 changes: 66 additions & 0 deletions lib/getstream_ruby/generated/models/chat_preferences.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# frozen_string_literal: true

# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.

module GetStream
module Generated
module Models
#
class ChatPreferences < GetStream::BaseModel

# Model attributes
# @!attribute channel_mentions
# @return [String]
attr_accessor :channel_mentions
# @!attribute default_preference
# @return [String]
attr_accessor :default_preference
# @!attribute direct_mentions
# @return [String]
attr_accessor :direct_mentions
# @!attribute distinct_channel_messages
# @return [String]
attr_accessor :distinct_channel_messages
# @!attribute group_mentions
# @return [String]
attr_accessor :group_mentions
# @!attribute here_mentions
# @return [String]
attr_accessor :here_mentions
# @!attribute role_mentions
# @return [String]
attr_accessor :role_mentions
# @!attribute thread_replies
# @return [String]
attr_accessor :thread_replies

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@channel_mentions = attributes[:channel_mentions] || attributes['channel_mentions'] || nil
@default_preference = attributes[:default_preference] || attributes['default_preference'] || nil
@direct_mentions = attributes[:direct_mentions] || attributes['direct_mentions'] || nil
@distinct_channel_messages = attributes[:distinct_channel_messages] || attributes['distinct_channel_messages'] || nil
@group_mentions = attributes[:group_mentions] || attributes['group_mentions'] || nil
@here_mentions = attributes[:here_mentions] || attributes['here_mentions'] || nil
@role_mentions = attributes[:role_mentions] || attributes['role_mentions'] || nil
@thread_replies = attributes[:thread_replies] || attributes['thread_replies'] || nil
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
channel_mentions: 'channel_mentions',
default_preference: 'default_preference',
direct_mentions: 'direct_mentions',
distinct_channel_messages: 'distinct_channel_messages',
group_mentions: 'group_mentions',
here_mentions: 'here_mentions',
role_mentions: 'role_mentions',
thread_replies: 'thread_replies'
}
end
end
end
end
end
Loading
Loading