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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 22 additions & 6 deletions lib/getstream_ruby/generated/chat_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,22 @@ def delete_channel(_type, _id, hard_delete = nil)
)
end

# Returns a channel by its CID without creating it. Responds with 404 when the channel does not exist, so it doubles as an existence check. Pass state=true to also load messages, read state and watchers.
# Returns a channel by its CID without creating it. Responds with 404 when the channel does not exist, so it doubles as an existence check. Pass state=true to also load messages, read state and watchers, and the messages_id_* parameters to page those messages by message ID.
#
# @param _type [String]
# @param _id [String]
# @param state [Boolean]
# @param messages_limit [Integer]
# @param members_limit [Integer]
# @param watchers_limit [Integer]
# @param messages_id_lt [String]
# @param messages_id_lte [String]
# @param messages_id_gt [String]
# @param messages_id_gte [String]
# @param messages_id_around [String]
# @param user_id [String]
# @return [Models::ChannelStateResponse]
def get_channel(_type, _id, state = nil, messages_limit = nil, members_limit = nil, watchers_limit = nil)
def get_channel(_type, _id, state = nil, messages_limit = nil, members_limit = nil, watchers_limit = nil, messages_id_lt = nil, messages_id_lte = nil, messages_id_gt = nil, messages_id_gte = nil, messages_id_around = nil, user_id = nil)
path = '/api/v2/chat/channels/{type}/{id}'
# Replace path parameters
path = path.gsub('{type}', _type.to_s)
Expand All @@ -317,6 +323,12 @@ def get_channel(_type, _id, state = nil, messages_limit = nil, members_limit = n
query_params['messages_limit'] = messages_limit unless messages_limit.nil?
query_params['members_limit'] = members_limit unless members_limit.nil?
query_params['watchers_limit'] = watchers_limit unless watchers_limit.nil?
query_params['messages_id_lt'] = messages_id_lt unless messages_id_lt.nil?
query_params['messages_id_lte'] = messages_id_lte unless messages_id_lte.nil?
query_params['messages_id_gt'] = messages_id_gt unless messages_id_gt.nil?
query_params['messages_id_gte'] = messages_id_gte unless messages_id_gte.nil?
query_params['messages_id_around'] = messages_id_around unless messages_id_around.nil?
query_params['user_id'] = user_id unless user_id.nil?

# Make the API request
@client.make_request(
Expand Down Expand Up @@ -581,7 +593,7 @@ def update_member_partial(_type, _id, update_member_partial_request, user_id = n
)
end

# Sends new message to the specified channelSends events:- message.new- message.updated
# Sends new message to the specified channelSends events:- channel.visible- message.new- message.updated
#
# @param _type [String]
# @param _id [String]
Expand All @@ -608,15 +620,17 @@ def send_message(_type, _id, send_message_request)
# @param _type [String]
# @param _id [String]
# @param ids [Array<String>]
# @param member_custom_include [Array<String>]
# @return [Models::GetManyMessagesResponse]
def get_many_messages(_type, _id, ids)
def get_many_messages(_type, _id, ids, member_custom_include = nil)
path = '/api/v2/chat/channels/{type}/{id}/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['ids'] = ids unless ids.nil?
query_params['member_custom_include'] = member_custom_include unless member_custom_include.nil?

# Make the API request
@client.make_request(
Expand Down Expand Up @@ -917,7 +931,7 @@ def query_drafts(query_drafts_request)
)
end

# Exports channel data to JSON file
# Exports channel data to a JSON or CSV file (CSV requires version=v2)
#
# @param export_channels_request [ExportChannelsRequest]
# @return [Models::ExportChannelsResponse]
Expand Down Expand Up @@ -1359,8 +1373,9 @@ def create_reminder(message_id, create_reminder_request)
# @param id_lt [String]
# @param id_around [String]
# @param sort [Array<SortParamRequest>]
# @param member_custom_include [Array<String>]
# @return [Models::GetRepliesResponse]
def get_replies(parent_id, limit = nil, id_gte = nil, id_gt = nil, id_lte = nil, id_lt = nil, id_around = nil, sort = nil)
def get_replies(parent_id, limit = nil, id_gte = nil, id_gt = nil, id_lte = nil, id_lt = nil, id_around = nil, sort = nil, member_custom_include = nil)
path = '/api/v2/chat/messages/{parent_id}/replies'
# Replace path parameters
path = path.gsub('{parent_id}', parent_id.to_s)
Expand All @@ -1373,6 +1388,7 @@ def get_replies(parent_id, limit = nil, id_gte = nil, id_gt = nil, id_lte = nil,
query_params['id_lt'] = id_lt unless id_lt.nil?
query_params['id_around'] = id_around unless id_around.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(
Expand Down
47 changes: 35 additions & 12 deletions lib/getstream_ruby/generated/common_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,16 @@ def update_app(update_app_request)
# Returns all available block lists
#
# @param team [String]
# @param cursor [String]
# @param limit [Integer]
# @return [Models::ListBlockListResponse]
def list_block_lists(team = nil)
def list_block_lists(team = nil, cursor = nil, limit = nil)
path = '/api/v2/blocklists'
# Build query parameters
query_params = {}
query_params['team'] = team unless team.nil?
query_params['cursor'] = cursor unless cursor.nil?
query_params['limit'] = limit unless limit.nil?

# Make the API request
@client.make_request(
Expand All @@ -77,18 +81,40 @@ def create_block_list(create_block_list_request)
)
end

# Enqueues an asynchronous bulk import of items into an existing blocklist.Returns a task ID that can be polled via GET /tasks/{id} to observe progress.AddItems is idempotent: items already present are skipped without error.For lists exceeding the HTTP request-body cap, issue repeated import calls eachcarrying a bounded slice of items — the task result accumulates correctly.
#
# @param _id [String]
# @param import_block_list_request [ImportBlockListRequest]
# @return [Models::ImportBlockListResponse]
def import_block_list(_id, import_block_list_request)
path = '/api/v2/blocklists/{id}/import'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
# Build request body
body = import_block_list_request

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

# Deletes previously created application blocklist
#
# @param name [String]
# @param team [String]
# @param user_id [String]
# @return [Models::Response]
def delete_block_list(name, team = nil)
def delete_block_list(name, team = nil, user_id = nil)
path = '/api/v2/blocklists/{name}'
# Replace path parameters
path = path.gsub('{name}', name.to_s)
# Build query parameters
query_params = {}
query_params['team'] = team unless team.nil?
query_params['user_id'] = user_id unless user_id.nil?

# Make the API request
@client.make_request(
Expand Down Expand Up @@ -469,7 +495,7 @@ def get_importer_external_storage()
)
end

# Creates or updates the external storage configuration for the app. Currently only AWS S3 (via cross-account IAM role assumption) is supported.
# Creates or updates the external storage configuration for the app. Supports AWS S3 (via cross-account IAM role assumption) and GCS (via service-account JSON credentials).
#
# @param upsert_external_storage_request [UpsertExternalStorageRequest]
# @return [Models::UpsertExternalStorageResponse]
Expand All @@ -486,7 +512,7 @@ def upsert_importer_external_storage(upsert_external_storage_request)
)
end

# Validates the configured external S3 storage by performing a live STS AssumeRole and S3 ListObjectsV2 check.
# Validates the configured external storage. For AWS S3, performs a live STS AssumeRole and S3 ListObjectsV2 check. For GCS, performs a live bucket listing check using the configured service-account credentials.
#
# @return [Models::ValidateExternalStorageResponse]
def validate_importer_external_storage()
Expand Down Expand Up @@ -795,22 +821,17 @@ 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, user_id = nil)
def get_poll_option(poll_id, option_id)
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,
query_params: query_params
path
)
end

Expand Down Expand Up @@ -947,16 +968,18 @@ def upsert_push_template(upsert_push_template_request)
# @param android [Boolean]
# @param ios [Boolean]
# @param web [Boolean]
# @param unity [Boolean]
# @param endpoints [String]
# @return [Models::GetRateLimitsResponse]
def get_rate_limits(server_side = nil, android = nil, ios = nil, web = nil, endpoints = nil)
def get_rate_limits(server_side = nil, android = nil, ios = nil, web = nil, unity = nil, endpoints = nil)
path = '/api/v2/rate_limits'
# Build query parameters
query_params = {}
query_params['server_side'] = server_side unless server_side.nil?
query_params['android'] = android unless android.nil?
query_params['ios'] = ios unless ios.nil?
query_params['web'] = web unless web.nil?
query_params['unity'] = unity unless unity.nil?
query_params['endpoints'] = endpoints unless endpoints.nil?

# Make the API request
Expand Down
20 changes: 11 additions & 9 deletions lib/getstream_ruby/generated/feeds_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -384,23 +384,23 @@ def delete_activity(_id, hard_delete = nil, delete_notification_activity = nil)
# Returns activity by ID
#
# @param _id [String]
# @param language [String]
# @param translate_text [Boolean]
# @param comment_sort [String]
# @param comment_limit [Integer]
# @param user_id [String]
# @param language [String]
# @param translate_text [Boolean]
# @return [Models::GetActivityResponse]
def get_activity(_id, language = nil, translate_text = nil, comment_sort = nil, comment_limit = nil, user_id = nil)
def get_activity(_id, comment_sort = nil, comment_limit = nil, user_id = nil, language = nil, translate_text = nil)
path = '/api/v2/feeds/activities/{id}'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
# Build query parameters
query_params = {}
query_params['language'] = language unless language.nil?
query_params['translate_text'] = translate_text unless translate_text.nil?
query_params['comment_sort'] = comment_sort unless comment_sort.nil?
query_params['comment_limit'] = comment_limit unless comment_limit.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?

# Make the API request
@client.make_request(
Expand Down Expand Up @@ -882,19 +882,19 @@ def delete_comment(_id, hard_delete = nil, delete_notification_activity = nil)
# Get a comment by ID
#
# @param _id [String]
# @param user_id [String]
# @param language [String]
# @param translate_text [Boolean]
# @param user_id [String]
# @return [Models::GetCommentResponse]
def get_comment(_id, language = nil, translate_text = nil, user_id = nil)
def get_comment(_id, user_id = nil, language = nil, translate_text = nil)
path = '/api/v2/feeds/comments/{id}'
# Replace path parameters
path = path.gsub('{id}', _id.to_s)
# Build query parameters
query_params = {}
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['user_id'] = user_id unless user_id.nil?

# Make the API request
@client.make_request(
Expand Down Expand Up @@ -1757,16 +1757,18 @@ def query_feeds(query_feeds_request)
# @param android [Boolean]
# @param ios [Boolean]
# @param web [Boolean]
# @param unity [Boolean]
# @param server_side [Boolean]
# @return [Models::GetFeedsRateLimitsResponse]
def get_feeds_rate_limits(endpoints = nil, android = nil, ios = nil, web = nil, server_side = nil)
def get_feeds_rate_limits(endpoints = nil, android = nil, ios = nil, web = nil, unity = nil, server_side = nil)
path = '/api/v2/feeds/feeds/rate_limits'
# Build query parameters
query_params = {}
query_params['endpoints'] = endpoints unless endpoints.nil?
query_params['android'] = android unless android.nil?
query_params['ios'] = ios unless ios.nil?
query_params['web'] = web unless web.nil?
query_params['unity'] = unity unless unity.nil?
query_params['server_side'] = server_side unless server_side.nil?

# Make the API request
Expand Down
36 changes: 36 additions & 0 deletions lib/getstream_ruby/generated/models/absent_metric.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# frozen_string_literal: true

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

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

# Model attributes
# @!attribute metric
# @return [String]
attr_accessor :metric
# @!attribute reason
# @return [String]
attr_accessor :reason

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@metric = attributes[:metric] || attributes['metric']
@reason = attributes[:reason] || attributes['reason']
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
metric: 'metric',
reason: 'reason'
}
end
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AcceptFeedMemberInviteRequest < GetStream::BaseModel
# @return [String]
attr_accessor :user_id
# @!attribute user
# @return [UserRequest]
# @return [UserRequest] User request object
attr_accessor :user

# Initialize with attributes
Expand Down
4 changes: 2 additions & 2 deletions lib/getstream_ruby/generated/models/action_log_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ class ActionLogResponse < GetStream::BaseModel
# @return [ReviewQueueItemResponse]
attr_accessor :review_queue_item
# @!attribute target_user
# @return [UserResponse]
# @return [UserResponse] User response object
attr_accessor :target_user
# @!attribute user
# @return [UserResponse]
# @return [UserResponse] User response object
attr_accessor :user

# Initialize with attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ActivityFeedbackEventPayload < GetStream::BaseModel
# @return [String] The feedback value (true/false)
attr_accessor :value
# @!attribute user
# @return [UserResponse]
# @return [UserResponse] User response object
attr_accessor :user

# Initialize with attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ActivityFeedbackRequest < GetStream::BaseModel
# @return [String]
attr_accessor :user_id
# @!attribute user
# @return [UserRequest]
# @return [UserRequest] User request object
attr_accessor :user

# Initialize with attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ActivityPinResponse < GetStream::BaseModel
# @return [ActivityResponse]
attr_accessor :activity
# @!attribute user
# @return [UserResponse]
# @return [UserResponse] User response object
attr_accessor :user

# Initialize with attributes
Expand Down
Loading
Loading