From 4d3196b7c718f813aa98337fc9c3c43800ecc525 Mon Sep 17 00:00:00 2001 From: "getstream-sdk-bot[bot]" <352448594+getstream-sdk-bot[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2026 20:58:00 +0000 Subject: [PATCH] feat: regenerate client from openapi-v241.28.5 --- .spec-version | 4 +- .../generated/models/audience.rb | 7 +- .../models/auto_translation_config.rb | 31 ++++++++ .../generated/models/channel_config.rb | 5 ++ .../models/channel_config_overrides.rb | 5 ++ .../models/channel_config_with_info.rb | 5 ++ .../generated/models/channel_type_config.rb | 5 ++ .../generated/models/concurrency_buckets.rb | 41 ++++++++++ .../models/config_overrides_request.rb | 5 ++ .../models/create_channel_type_request.rb | 5 ++ .../models/create_channel_type_response.rb | 5 ++ .../models/detect_member_languages_config.rb | 36 +++++++++ .../models/get_channel_type_response.rb | 5 ++ .../models/message_schema_violation_event.rb | 76 +++++++++++++++++++ .../models/reaction_schema_violation_event.rb | 71 +++++++++++++++++ .../generated/models/schema_violation.rb | 41 ++++++++++ .../models/update_channel_type_request.rb | 5 ++ .../models/update_channel_type_response.rb | 5 ++ lib/getstream_ruby/generated/video_client.rb | 8 +- lib/getstream_ruby/generated/webhook.rb | 8 ++ spec/webhook_spec.rb | 14 ++++ 21 files changed, 382 insertions(+), 5 deletions(-) create mode 100644 lib/getstream_ruby/generated/models/auto_translation_config.rb create mode 100644 lib/getstream_ruby/generated/models/concurrency_buckets.rb create mode 100644 lib/getstream_ruby/generated/models/detect_member_languages_config.rb create mode 100644 lib/getstream_ruby/generated/models/message_schema_violation_event.rb create mode 100644 lib/getstream_ruby/generated/models/reaction_schema_violation_event.rb create mode 100644 lib/getstream_ruby/generated/models/schema_violation.rb diff --git a/.spec-version b/.spec-version index de8d3b00..af560f3e 100644 --- a/.spec-version +++ b/.spec-version @@ -1,2 +1,2 @@ -spec: openapi-v241.28.4 -generator: chat v241.28.4 +spec: openapi-v241.28.5 +generator: chat v241.28.5 diff --git a/lib/getstream_ruby/generated/models/audience.rb b/lib/getstream_ruby/generated/models/audience.rb index 2102cbde..2de4c4f9 100644 --- a/lib/getstream_ruby/generated/models/audience.rb +++ b/lib/getstream_ruby/generated/models/audience.rb @@ -42,6 +42,9 @@ class Audience < GetStream::BaseModel # @!attribute shape # @return [String] attr_accessor :shape + # @!attribute concurrency_max_by_5min + # @return [ConcurrencyBuckets] + attr_accessor :concurrency_max_by_5min # Initialize with attributes def initialize(attributes = {}) @@ -57,6 +60,7 @@ def initialize(attributes = {}) @retention_at_90pct_mark = attributes.fetch(:retention_at_90pct_mark) { attributes.fetch('retention_at_90pct_mark', nil) } @retention_at_midpoint = attributes.fetch(:retention_at_midpoint) { attributes.fetch('retention_at_midpoint', nil) } @shape = attributes.fetch(:shape) { attributes.fetch('shape', nil) } + @concurrency_max_by_5min = attributes.fetch(:concurrency_max_by_5min) { attributes.fetch('concurrency_max_by_5min', nil) } end # Override field mappings for JSON serialization @@ -72,7 +76,8 @@ def self.json_field_mappings ramp_up_min_to_90pct_peak: 'ramp_up_min_to_90pct_peak', retention_at_90pct_mark: 'retention_at_90pct_mark', retention_at_midpoint: 'retention_at_midpoint', - shape: 'shape' + shape: 'shape', + concurrency_max_by_5min: 'concurrency_max_by_5min' } end end diff --git a/lib/getstream_ruby/generated/models/auto_translation_config.rb b/lib/getstream_ruby/generated/models/auto_translation_config.rb new file mode 100644 index 00000000..e10f9aa7 --- /dev/null +++ b/lib/getstream_ruby/generated/models/auto_translation_config.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Auto translation settings. Unset fields take the default on a channel type and keep the channel type's value in config overrides. + class AutoTranslationConfig < GetStream::BaseModel + + # Model attributes + # @!attribute detect_member_languages + # @return [DetectMemberLanguagesConfig] How auto translation picks target languages from the languages of the channel's members + attr_accessor :detect_member_languages + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @detect_member_languages = attributes.fetch(:detect_member_languages) { attributes.fetch('detect_member_languages', nil) } + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + detect_member_languages: 'detect_member_languages' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/channel_config.rb b/lib/getstream_ruby/generated/models/channel_config.rb index aa5e03bb..d4ec96b8 100644 --- a/lib/getstream_ruby/generated/models/channel_config.rb +++ b/lib/getstream_ruby/generated/models/channel_config.rb @@ -120,6 +120,9 @@ class ChannelConfig < GetStream::BaseModel # @!attribute mark_types # @return [Array] attr_accessor :mark_types + # @!attribute auto_translation + # @return [AutoTranslationConfig] Auto translation settings. Unset fields take the default on a channel type and keep the channel type's value in config overrides. + attr_accessor :auto_translation # @!attribute automod_thresholds # @return [Thresholds] Sets thresholds for AI moderation attr_accessor :automod_thresholds @@ -167,6 +170,7 @@ def initialize(attributes = {}) @allowed_flag_reasons = attributes.fetch(:allowed_flag_reasons) { attributes.fetch('allowed_flag_reasons', nil) } @blocklists = attributes.fetch(:blocklists) { attributes.fetch('blocklists', nil) } @mark_types = attributes.fetch(:mark_types) { attributes.fetch('mark_types', nil) } + @auto_translation = attributes.fetch(:auto_translation) { attributes.fetch('auto_translation', nil) } @automod_thresholds = attributes.fetch(:automod_thresholds) { attributes.fetch('automod_thresholds', nil) } @chat_preferences = attributes.fetch(:chat_preferences) { attributes.fetch('chat_preferences', nil) } end @@ -211,6 +215,7 @@ def self.json_field_mappings allowed_flag_reasons: 'allowed_flag_reasons', blocklists: 'blocklists', mark_types: 'mark_types', + auto_translation: 'auto_translation', automod_thresholds: 'automod_thresholds', chat_preferences: 'chat_preferences' } diff --git a/lib/getstream_ruby/generated/models/channel_config_overrides.rb b/lib/getstream_ruby/generated/models/channel_config_overrides.rb index 8e92dffa..0f491bd3 100644 --- a/lib/getstream_ruby/generated/models/channel_config_overrides.rb +++ b/lib/getstream_ruby/generated/models/channel_config_overrides.rb @@ -54,6 +54,9 @@ class ChannelConfigOverrides < GetStream::BaseModel # @!attribute commands # @return [Array] List of commands that channel supports attr_accessor :commands + # @!attribute auto_translation + # @return [AutoTranslationConfig] Auto translation settings. Unset fields take the default on a channel type and keep the channel type's value in config overrides. + attr_accessor :auto_translation # @!attribute chat_preferences # @return [ChatPreferences] attr_accessor :chat_preferences @@ -79,6 +82,7 @@ def initialize(attributes = {}) @user_message_reminders = attributes.fetch(:user_message_reminders) { attributes.fetch('user_message_reminders', nil) } @voice_transcription = attributes.fetch(:voice_transcription) { attributes.fetch('voice_transcription', nil) } @commands = attributes.fetch(:commands) { attributes.fetch('commands', nil) } + @auto_translation = attributes.fetch(:auto_translation) { attributes.fetch('auto_translation', nil) } @chat_preferences = attributes.fetch(:chat_preferences) { attributes.fetch('chat_preferences', nil) } @grants = attributes.fetch(:grants) { attributes.fetch('grants', nil) } end @@ -101,6 +105,7 @@ def self.json_field_mappings user_message_reminders: 'user_message_reminders', voice_transcription: 'voice_transcription', commands: 'commands', + auto_translation: 'auto_translation', chat_preferences: 'chat_preferences', grants: 'grants' } diff --git a/lib/getstream_ruby/generated/models/channel_config_with_info.rb b/lib/getstream_ruby/generated/models/channel_config_with_info.rb index aabf031d..bff500bf 100644 --- a/lib/getstream_ruby/generated/models/channel_config_with_info.rb +++ b/lib/getstream_ruby/generated/models/channel_config_with_info.rb @@ -132,6 +132,9 @@ class ChannelConfigWithInfo < GetStream::BaseModel # @!attribute mark_types # @return [Array] attr_accessor :mark_types + # @!attribute auto_translation + # @return [AutoTranslationConfig] Auto translation settings. Unset fields take the default on a channel type and keep the channel type's value in config overrides. + attr_accessor :auto_translation # @!attribute automod_thresholds # @return [Thresholds] Sets thresholds for AI moderation attr_accessor :automod_thresholds @@ -186,6 +189,7 @@ def initialize(attributes = {}) @allowed_flag_reasons = attributes.fetch(:allowed_flag_reasons) { attributes.fetch('allowed_flag_reasons', nil) } @blocklists = attributes.fetch(:blocklists) { attributes.fetch('blocklists', nil) } @mark_types = attributes.fetch(:mark_types) { attributes.fetch('mark_types', nil) } + @auto_translation = attributes.fetch(:auto_translation) { attributes.fetch('auto_translation', nil) } @automod_thresholds = attributes.fetch(:automod_thresholds) { attributes.fetch('automod_thresholds', nil) } @chat_preferences = attributes.fetch(:chat_preferences) { attributes.fetch('chat_preferences', nil) } @grants = attributes.fetch(:grants) { attributes.fetch('grants', nil) } @@ -235,6 +239,7 @@ def self.json_field_mappings allowed_flag_reasons: 'allowed_flag_reasons', blocklists: 'blocklists', mark_types: 'mark_types', + auto_translation: 'auto_translation', automod_thresholds: 'automod_thresholds', chat_preferences: 'chat_preferences', grants: 'grants' diff --git a/lib/getstream_ruby/generated/models/channel_type_config.rb b/lib/getstream_ruby/generated/models/channel_type_config.rb index 2926990f..3335b0f4 100644 --- a/lib/getstream_ruby/generated/models/channel_type_config.rb +++ b/lib/getstream_ruby/generated/models/channel_type_config.rb @@ -126,6 +126,9 @@ class ChannelTypeConfig < GetStream::BaseModel # @!attribute mark_types # @return [Array] attr_accessor :mark_types + # @!attribute auto_translation + # @return [AutoTranslationConfig] Auto translation settings. Unset fields take the default on a channel type and keep the channel type's value in config overrides. + attr_accessor :auto_translation # @!attribute automod_thresholds # @return [Thresholds] Sets thresholds for AI moderation attr_accessor :automod_thresholds @@ -175,6 +178,7 @@ def initialize(attributes = {}) @allowed_flag_reasons = attributes.fetch(:allowed_flag_reasons) { attributes.fetch('allowed_flag_reasons', nil) } @blocklists = attributes.fetch(:blocklists) { attributes.fetch('blocklists', nil) } @mark_types = attributes.fetch(:mark_types) { attributes.fetch('mark_types', nil) } + @auto_translation = attributes.fetch(:auto_translation) { attributes.fetch('auto_translation', nil) } @automod_thresholds = attributes.fetch(:automod_thresholds) { attributes.fetch('automod_thresholds', nil) } @chat_preferences = attributes.fetch(:chat_preferences) { attributes.fetch('chat_preferences', nil) } end @@ -221,6 +225,7 @@ def self.json_field_mappings allowed_flag_reasons: 'allowed_flag_reasons', blocklists: 'blocklists', mark_types: 'mark_types', + auto_translation: 'auto_translation', automod_thresholds: 'automod_thresholds', chat_preferences: 'chat_preferences' } diff --git a/lib/getstream_ruby/generated/models/concurrency_buckets.rb b/lib/getstream_ruby/generated/models/concurrency_buckets.rb new file mode 100644 index 00000000..a60076e9 --- /dev/null +++ b/lib/getstream_ruby/generated/models/concurrency_buckets.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # + class ConcurrencyBuckets < GetStream::BaseModel + + # Model attributes + # @!attribute bucket_minutes + # @return [Integer] + attr_accessor :bucket_minutes + # @!attribute start + # @return [String] + attr_accessor :start + # @!attribute max + # @return [Array] + attr_accessor :max + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @bucket_minutes = attributes.fetch(:bucket_minutes) { attributes.fetch('bucket_minutes', nil) } + @start = attributes.fetch(:start) { attributes.fetch('start', nil) } + @max = attributes.fetch(:max) { attributes.fetch('max', nil) } + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + bucket_minutes: 'bucket_minutes', + start: 'start', + max: 'max' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/config_overrides_request.rb b/lib/getstream_ruby/generated/models/config_overrides_request.rb index fcff1f16..cf0b18b2 100644 --- a/lib/getstream_ruby/generated/models/config_overrides_request.rb +++ b/lib/getstream_ruby/generated/models/config_overrides_request.rb @@ -54,6 +54,9 @@ class ConfigOverridesRequest < GetStream::BaseModel # @!attribute commands # @return [Array] List of available commands attr_accessor :commands + # @!attribute auto_translation + # @return [AutoTranslationConfig] Auto translation settings. Unset fields take the default on a channel type and keep the channel type's value in config overrides. + attr_accessor :auto_translation # @!attribute chat_preferences # @return [ChatPreferences] attr_accessor :chat_preferences @@ -79,6 +82,7 @@ def initialize(attributes = {}) @user_message_reminders = attributes.fetch(:user_message_reminders) { attributes.fetch('user_message_reminders', nil) } @voice_transcription = attributes.fetch(:voice_transcription) { attributes.fetch('voice_transcription', nil) } @commands = attributes.fetch(:commands) { attributes.fetch('commands', nil) } + @auto_translation = attributes.fetch(:auto_translation) { attributes.fetch('auto_translation', nil) } @chat_preferences = attributes.fetch(:chat_preferences) { attributes.fetch('chat_preferences', nil) } @grants = attributes.fetch(:grants) { attributes.fetch('grants', nil) } end @@ -101,6 +105,7 @@ def self.json_field_mappings user_message_reminders: 'user_message_reminders', voice_transcription: 'voice_transcription', commands: 'commands', + auto_translation: 'auto_translation', chat_preferences: 'chat_preferences', grants: 'grants' } diff --git a/lib/getstream_ruby/generated/models/create_channel_type_request.rb b/lib/getstream_ruby/generated/models/create_channel_type_request.rb index 79f3ffdd..2737b8bd 100644 --- a/lib/getstream_ruby/generated/models/create_channel_type_request.rb +++ b/lib/getstream_ruby/generated/models/create_channel_type_request.rb @@ -114,6 +114,9 @@ class CreateChannelTypeRequest < GetStream::BaseModel # @!attribute permissions # @return [Array] List of permissions for the channel type attr_accessor :permissions + # @!attribute auto_translation + # @return [AutoTranslationConfig] Auto translation settings. Unset fields take the default on a channel type and keep the channel type's value in config overrides. + attr_accessor :auto_translation # @!attribute automod_thresholds # @return [Thresholds] Sets thresholds for AI moderation attr_accessor :automod_thresholds @@ -162,6 +165,7 @@ def initialize(attributes = {}) @commands = attributes.fetch(:commands) { attributes.fetch('commands', nil) } @mark_types = attributes.fetch(:mark_types) { attributes.fetch('mark_types', nil) } @permissions = attributes.fetch(:permissions) { attributes.fetch('permissions', nil) } + @auto_translation = attributes.fetch(:auto_translation) { attributes.fetch('auto_translation', nil) } @automod_thresholds = attributes.fetch(:automod_thresholds) { attributes.fetch('automod_thresholds', nil) } @chat_preferences = attributes.fetch(:chat_preferences) { attributes.fetch('chat_preferences', nil) } @grants = attributes.fetch(:grants) { attributes.fetch('grants', nil) } @@ -205,6 +209,7 @@ def self.json_field_mappings commands: 'commands', mark_types: 'mark_types', permissions: 'permissions', + auto_translation: 'auto_translation', automod_thresholds: 'automod_thresholds', chat_preferences: 'chat_preferences', grants: 'grants' diff --git a/lib/getstream_ruby/generated/models/create_channel_type_response.rb b/lib/getstream_ruby/generated/models/create_channel_type_response.rb index d29f0dcd..0ec2bd05 100644 --- a/lib/getstream_ruby/generated/models/create_channel_type_response.rb +++ b/lib/getstream_ruby/generated/models/create_channel_type_response.rb @@ -129,6 +129,9 @@ class CreateChannelTypeResponse < GetStream::BaseModel # @!attribute mark_types # @return [Array] attr_accessor :mark_types + # @!attribute auto_translation + # @return [AutoTranslationConfig] Auto translation settings. Unset fields take the default on a channel type and keep the channel type's value in config overrides. + attr_accessor :auto_translation # @!attribute automod_thresholds # @return [Thresholds] Sets thresholds for AI moderation attr_accessor :automod_thresholds @@ -179,6 +182,7 @@ def initialize(attributes = {}) @allowed_flag_reasons = attributes.fetch(:allowed_flag_reasons) { attributes.fetch('allowed_flag_reasons', nil) } @blocklists = attributes.fetch(:blocklists) { attributes.fetch('blocklists', nil) } @mark_types = attributes.fetch(:mark_types) { attributes.fetch('mark_types', nil) } + @auto_translation = attributes.fetch(:auto_translation) { attributes.fetch('auto_translation', nil) } @automod_thresholds = attributes.fetch(:automod_thresholds) { attributes.fetch('automod_thresholds', nil) } @chat_preferences = attributes.fetch(:chat_preferences) { attributes.fetch('chat_preferences', nil) } end @@ -226,6 +230,7 @@ def self.json_field_mappings allowed_flag_reasons: 'allowed_flag_reasons', blocklists: 'blocklists', mark_types: 'mark_types', + auto_translation: 'auto_translation', automod_thresholds: 'automod_thresholds', chat_preferences: 'chat_preferences' } diff --git a/lib/getstream_ruby/generated/models/detect_member_languages_config.rb b/lib/getstream_ruby/generated/models/detect_member_languages_config.rb new file mode 100644 index 00000000..26112f6f --- /dev/null +++ b/lib/getstream_ruby/generated/models/detect_member_languages_config.rb @@ -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 + # How auto translation picks target languages from the languages of the channel's members + class DetectMemberLanguagesConfig < GetStream::BaseModel + + # Model attributes + # @!attribute max_languages + # @return [Integer] Number of most common member languages to translate into, next to the channel's auto_translation_language. The author's language is skipped without picking another. Between 1 and 5, defaults to 2 + attr_accessor :max_languages + # @!attribute min_member_share + # @return [Integer] Percentage of all channel members that must have that language set for it to be picked. Between 0 and 100, defaults to 0 + attr_accessor :min_member_share + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @max_languages = attributes.fetch(:max_languages) { attributes.fetch('max_languages', nil) } + @min_member_share = attributes.fetch(:min_member_share) { attributes.fetch('min_member_share', nil) } + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + max_languages: 'max_languages', + min_member_share: 'min_member_share' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/get_channel_type_response.rb b/lib/getstream_ruby/generated/models/get_channel_type_response.rb index 42fbded3..c0ff809f 100644 --- a/lib/getstream_ruby/generated/models/get_channel_type_response.rb +++ b/lib/getstream_ruby/generated/models/get_channel_type_response.rb @@ -129,6 +129,9 @@ class GetChannelTypeResponse < GetStream::BaseModel # @!attribute mark_types # @return [Array] attr_accessor :mark_types + # @!attribute auto_translation + # @return [AutoTranslationConfig] Auto translation settings. Unset fields take the default on a channel type and keep the channel type's value in config overrides. + attr_accessor :auto_translation # @!attribute automod_thresholds # @return [Thresholds] Sets thresholds for AI moderation attr_accessor :automod_thresholds @@ -179,6 +182,7 @@ def initialize(attributes = {}) @allowed_flag_reasons = attributes.fetch(:allowed_flag_reasons) { attributes.fetch('allowed_flag_reasons', nil) } @blocklists = attributes.fetch(:blocklists) { attributes.fetch('blocklists', nil) } @mark_types = attributes.fetch(:mark_types) { attributes.fetch('mark_types', nil) } + @auto_translation = attributes.fetch(:auto_translation) { attributes.fetch('auto_translation', nil) } @automod_thresholds = attributes.fetch(:automod_thresholds) { attributes.fetch('automod_thresholds', nil) } @chat_preferences = attributes.fetch(:chat_preferences) { attributes.fetch('chat_preferences', nil) } end @@ -226,6 +230,7 @@ def self.json_field_mappings allowed_flag_reasons: 'allowed_flag_reasons', blocklists: 'blocklists', mark_types: 'mark_types', + auto_translation: 'auto_translation', automod_thresholds: 'automod_thresholds', chat_preferences: 'chat_preferences' } diff --git a/lib/getstream_ruby/generated/models/message_schema_violation_event.rb b/lib/getstream_ruby/generated/models/message_schema_violation_event.rb new file mode 100644 index 00000000..78270390 --- /dev/null +++ b/lib/getstream_ruby/generated/models/message_schema_violation_event.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Emitted when a message write violates the app message schema while the schema is in report mode. + class MessageSchemaViolationEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute message_id + # @return [String] The ID of the message that violated the schema. The event is sent when the write is checked, so the message may never be stored: the write can fail later, and a channel update whose change is a no-op sends no system message + attr_accessor :message_id + # @!attribute operation + # @return [String] The write that was checked: send, update, partial_update, schedule, update_scheduled, live_location or system_message + attr_accessor :operation + # @!attribute violations + # @return [Array] The schema violations found + attr_accessor :violations + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute type + # @return [String] The type of event: "message.schema_violation" in this case + attr_accessor :type + # @!attribute cid + # @return [String] The CID of the channel the message was written to + attr_accessor :cid + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + # @!attribute scheduled_message_id + # @return [String] The ID of the scheduled message, set for scheduled message writes + attr_accessor :scheduled_message_id + # @!attribute user + # @return [UserResponseCommonFields] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes.fetch(:created_at) { attributes.fetch('created_at', nil) } + @message_id = attributes.fetch(:message_id) { attributes.fetch('message_id', nil) } + @operation = attributes.fetch(:operation) { attributes.fetch('operation', nil) } + @violations = attributes.fetch(:violations) { attributes.fetch('violations', nil) } + @custom = attributes.fetch(:custom) { attributes.fetch('custom', nil) } + @type = attributes.fetch(:type) { attributes.fetch('type', "message.schema_violation") } + @cid = attributes.fetch(:cid) { attributes.fetch('cid', nil) } + @received_at = attributes.fetch(:received_at) { attributes.fetch('received_at', nil) } + @scheduled_message_id = attributes.fetch(:scheduled_message_id) { attributes.fetch('scheduled_message_id', nil) } + @user = attributes.fetch(:user) { attributes.fetch('user', nil) } + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + message_id: 'message_id', + operation: 'operation', + violations: 'violations', + custom: 'custom', + type: 'type', + cid: 'cid', + received_at: 'received_at', + scheduled_message_id: 'scheduled_message_id', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/reaction_schema_violation_event.rb b/lib/getstream_ruby/generated/models/reaction_schema_violation_event.rb new file mode 100644 index 00000000..5f85f1a6 --- /dev/null +++ b/lib/getstream_ruby/generated/models/reaction_schema_violation_event.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # Emitted when a reaction write violates the app message schema while the schema is in report mode. + class ReactionSchemaViolationEvent < GetStream::BaseModel + + # Model attributes + # @!attribute created_at + # @return [DateTime] Date/time of creation + attr_accessor :created_at + # @!attribute message_id + # @return [String] The ID of the message the reaction belongs to + attr_accessor :message_id + # @!attribute operation + # @return [String] The write that was checked, always reaction + attr_accessor :operation + # @!attribute violations + # @return [Array] The schema violations found + attr_accessor :violations + # @!attribute custom + # @return [Object] + attr_accessor :custom + # @!attribute type + # @return [String] The type of event: "reaction.schema_violation" in this case + attr_accessor :type + # @!attribute cid + # @return [String] The CID of the channel the reaction was written to + attr_accessor :cid + # @!attribute received_at + # @return [DateTime] + attr_accessor :received_at + # @!attribute user + # @return [UserResponseCommonFields] + attr_accessor :user + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @created_at = attributes.fetch(:created_at) { attributes.fetch('created_at', nil) } + @message_id = attributes.fetch(:message_id) { attributes.fetch('message_id', nil) } + @operation = attributes.fetch(:operation) { attributes.fetch('operation', nil) } + @violations = attributes.fetch(:violations) { attributes.fetch('violations', nil) } + @custom = attributes.fetch(:custom) { attributes.fetch('custom', nil) } + @type = attributes.fetch(:type) { attributes.fetch('type', "reaction.schema_violation") } + @cid = attributes.fetch(:cid) { attributes.fetch('cid', nil) } + @received_at = attributes.fetch(:received_at) { attributes.fetch('received_at', nil) } + @user = attributes.fetch(:user) { attributes.fetch('user', nil) } + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + created_at: 'created_at', + message_id: 'message_id', + operation: 'operation', + violations: 'violations', + custom: 'custom', + type: 'type', + cid: 'cid', + received_at: 'received_at', + user: 'user' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/schema_violation.rb b/lib/getstream_ruby/generated/models/schema_violation.rb new file mode 100644 index 00000000..d005b03f --- /dev/null +++ b/lib/getstream_ruby/generated/models/schema_violation.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT. + +module GetStream + module Generated + module Models + # One way a message or reaction breaks its schema or a frozen field + class SchemaViolation < GetStream::BaseModel + + # Model attributes + # @!attribute message + # @return [String] Human-readable explanation of the violation + attr_accessor :message + # @!attribute path + # @return [String] JSON Pointer to the offending location in the validated document + attr_accessor :path + # @!attribute rule + # @return [String] The schema keyword that failed + attr_accessor :rule + + # Initialize with attributes + def initialize(attributes = {}) + super(attributes) + @message = attributes.fetch(:message) { attributes.fetch('message', nil) } + @path = attributes.fetch(:path) { attributes.fetch('path', nil) } + @rule = attributes.fetch(:rule) { attributes.fetch('rule', nil) } + end + + # Override field mappings for JSON serialization + def self.json_field_mappings + { + message: 'message', + path: 'path', + rule: 'rule' + } + end + end + end + end +end diff --git a/lib/getstream_ruby/generated/models/update_channel_type_request.rb b/lib/getstream_ruby/generated/models/update_channel_type_request.rb index 407ccb77..454f11c2 100644 --- a/lib/getstream_ruby/generated/models/update_channel_type_request.rb +++ b/lib/getstream_ruby/generated/models/update_channel_type_request.rb @@ -114,6 +114,9 @@ class UpdateChannelTypeRequest < GetStream::BaseModel # @!attribute permissions # @return [Array] attr_accessor :permissions + # @!attribute auto_translation + # @return [AutoTranslationConfig] Auto translation settings. Unset fields take the default on a channel type and keep the channel type's value in config overrides. + attr_accessor :auto_translation # @!attribute automod_thresholds # @return [Thresholds] Sets thresholds for AI moderation attr_accessor :automod_thresholds @@ -162,6 +165,7 @@ def initialize(attributes = {}) @commands = attributes.fetch(:commands) { attributes.fetch('commands', nil) } @mark_types = attributes.fetch(:mark_types) { attributes.fetch('mark_types', nil) } @permissions = attributes.fetch(:permissions) { attributes.fetch('permissions', nil) } + @auto_translation = attributes.fetch(:auto_translation) { attributes.fetch('auto_translation', nil) } @automod_thresholds = attributes.fetch(:automod_thresholds) { attributes.fetch('automod_thresholds', nil) } @chat_preferences = attributes.fetch(:chat_preferences) { attributes.fetch('chat_preferences', nil) } @grants = attributes.fetch(:grants) { attributes.fetch('grants', nil) } @@ -205,6 +209,7 @@ def self.json_field_mappings commands: 'commands', mark_types: 'mark_types', permissions: 'permissions', + auto_translation: 'auto_translation', automod_thresholds: 'automod_thresholds', chat_preferences: 'chat_preferences', grants: 'grants' diff --git a/lib/getstream_ruby/generated/models/update_channel_type_response.rb b/lib/getstream_ruby/generated/models/update_channel_type_response.rb index 1c93ba6f..58e5f6ca 100644 --- a/lib/getstream_ruby/generated/models/update_channel_type_response.rb +++ b/lib/getstream_ruby/generated/models/update_channel_type_response.rb @@ -129,6 +129,9 @@ class UpdateChannelTypeResponse < GetStream::BaseModel # @!attribute mark_types # @return [Array] attr_accessor :mark_types + # @!attribute auto_translation + # @return [AutoTranslationConfig] Auto translation settings. Unset fields take the default on a channel type and keep the channel type's value in config overrides. + attr_accessor :auto_translation # @!attribute automod_thresholds # @return [Thresholds] Sets thresholds for AI moderation attr_accessor :automod_thresholds @@ -179,6 +182,7 @@ def initialize(attributes = {}) @allowed_flag_reasons = attributes.fetch(:allowed_flag_reasons) { attributes.fetch('allowed_flag_reasons', nil) } @blocklists = attributes.fetch(:blocklists) { attributes.fetch('blocklists', nil) } @mark_types = attributes.fetch(:mark_types) { attributes.fetch('mark_types', nil) } + @auto_translation = attributes.fetch(:auto_translation) { attributes.fetch('auto_translation', nil) } @automod_thresholds = attributes.fetch(:automod_thresholds) { attributes.fetch('automod_thresholds', nil) } @chat_preferences = attributes.fetch(:chat_preferences) { attributes.fetch('chat_preferences', nil) } end @@ -226,6 +230,7 @@ def self.json_field_mappings allowed_flag_reasons: 'allowed_flag_reasons', blocklists: 'blocklists', mark_types: 'mark_types', + auto_translation: 'auto_translation', automod_thresholds: 'automod_thresholds', chat_preferences: 'chat_preferences' } diff --git a/lib/getstream_ruby/generated/video_client.rb b/lib/getstream_ruby/generated/video_client.rb index cff0fc69..11ddf060 100644 --- a/lib/getstream_ruby/generated/video_client.rb +++ b/lib/getstream_ruby/generated/video_client.rb @@ -1448,17 +1448,21 @@ def query_aggregate_call_stats(query_aggregate_call_stats_request = nil) ) end - # Returns the app's per-broadcast daily digest bundle for one UTC day, with an explicit readiness status (ready, pending, failed, future_date, expired). Payload keys are only present when status is ready. + # Returns the app's per-broadcast daily digest bundle for one UTC day, with an explicit readiness status (ready, pending, failed, future_date, expired, not_enabled). Payload keys are only present when status is ready. view=summary drops the per-minute audience series (a 5-minute curve replaces it), view=rollup returns the day-level rollup only, and call_session_id limits the response to one broadcast. # # @param date [String] # @param target_app_id [String] + # @param view [String] + # @param call_session_id [String] # @return [Models::GetDailyDigestResponse] - def get_daily_digest(date = nil, target_app_id = nil) + def get_daily_digest(date = nil, target_app_id = nil, view = nil, call_session_id = nil) path = '/api/v2/video/stats/daily_digest' # Build query parameters query_params = {} query_params['date'] = date unless date.nil? query_params['target_app_id'] = target_app_id unless target_app_id.nil? + query_params['view'] = view unless view.nil? + query_params['call_session_id'] = call_session_id unless call_session_id.nil? # Make the API request @client.make_request( diff --git a/lib/getstream_ruby/generated/webhook.rb b/lib/getstream_ruby/generated/webhook.rb index 0b255c60..012de822 100644 --- a/lib/getstream_ruby/generated/webhook.rb +++ b/lib/getstream_ruby/generated/webhook.rb @@ -137,6 +137,7 @@ require_relative 'models/message_flagged_event' require_relative 'models/message_new_event' require_relative 'models/message_read_event' +require_relative 'models/message_schema_violation_event' require_relative 'models/message_unblocked_event' require_relative 'models/message_undeleted_event' require_relative 'models/message_updated_event' @@ -161,6 +162,7 @@ require_relative 'models/poll_vote_removed_event' require_relative 'models/reaction_deleted_event' require_relative 'models/reaction_new_event' +require_relative 'models/reaction_schema_violation_event' require_relative 'models/reaction_updated_event' require_relative 'models/reminder_created_event' require_relative 'models/reminder_deleted_event' @@ -391,6 +393,7 @@ class << self EVENT_TYPE_MESSAGE_NEW = 'message.new' EVENT_TYPE_MESSAGE_PENDING = 'message.pending' EVENT_TYPE_MESSAGE_READ = 'message.read' + EVENT_TYPE_MESSAGE_SCHEMA_VIOLATION = 'message.schema_violation' EVENT_TYPE_MESSAGE_UNBLOCKED = 'message.unblocked' EVENT_TYPE_MESSAGE_UNDELETED = 'message.undeleted' EVENT_TYPE_MESSAGE_UPDATED = 'message.updated' @@ -413,6 +416,7 @@ class << self EVENT_TYPE_POLL_VOTE_REMOVED = 'poll.vote_removed' EVENT_TYPE_REACTION_DELETED = 'reaction.deleted' EVENT_TYPE_REACTION_NEW = 'reaction.new' + EVENT_TYPE_REACTION_SCHEMA_VIOLATION = 'reaction.schema_violation' EVENT_TYPE_REACTION_UPDATED = 'reaction.updated' EVENT_TYPE_REMINDER_CREATED = 'reminder.created' EVENT_TYPE_REMINDER_DELETED = 'reminder.deleted' @@ -777,6 +781,8 @@ def self.parse_webhook_event(raw_event) GetStream::Generated::Models::PendingMessageEvent when 'message.read' GetStream::Generated::Models::MessageReadEvent + when 'message.schema_violation' + GetStream::Generated::Models::MessageSchemaViolationEvent when 'message.unblocked' GetStream::Generated::Models::MessageUnblockedEvent when 'message.undeleted' @@ -821,6 +827,8 @@ def self.parse_webhook_event(raw_event) GetStream::Generated::Models::ReactionDeletedEvent when 'reaction.new' GetStream::Generated::Models::ReactionNewEvent + when 'reaction.schema_violation' + GetStream::Generated::Models::ReactionSchemaViolationEvent when 'reaction.updated' GetStream::Generated::Models::ReactionUpdatedEvent when 'reminder.created' diff --git a/spec/webhook_spec.rb b/spec/webhook_spec.rb index c2a3d2b9..71151681 100644 --- a/spec/webhook_spec.rb +++ b/spec/webhook_spec.rb @@ -1108,6 +1108,13 @@ def compute_signature(body, secret) end + it 'parses message.schema_violation' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"message.schema_violation"}') + expect(event.class.name).to eq('GetStream::Generated::Models::MessageSchemaViolationEvent') + + end + it 'parses message.unblocked' do event = StreamChat::Webhook.parse_webhook_event('{"type":"message.unblocked"}') @@ -1262,6 +1269,13 @@ def compute_signature(body, secret) end + it 'parses reaction.schema_violation' do + + event = StreamChat::Webhook.parse_webhook_event('{"type":"reaction.schema_violation"}') + expect(event.class.name).to eq('GetStream::Generated::Models::ReactionSchemaViolationEvent') + + end + it 'parses reaction.updated' do event = StreamChat::Webhook.parse_webhook_event('{"type":"reaction.updated"}')