getstream-ruby 7.1.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/lib/getstream_ruby/generated/chat_client.rb +57 -0
  3. data/lib/getstream_ruby/generated/common_client.rb +16 -0
  4. data/lib/getstream_ruby/generated/feeds_client.rb +55 -0
  5. data/lib/getstream_ruby/generated/models/add_segment_targets_request.rb +31 -0
  6. data/lib/getstream_ruby/generated/models/analyze_image_field.rb +56 -0
  7. data/lib/getstream_ruby/generated/models/analyze_request.rb +81 -0
  8. data/lib/getstream_ruby/generated/models/analyze_response.rb +46 -0
  9. data/lib/getstream_ruby/generated/models/analyze_text_field.rb +56 -0
  10. data/lib/getstream_ruby/generated/models/app_response_fields.rb +15 -0
  11. data/lib/getstream_ruby/generated/models/appeal_item_response.rb +60 -0
  12. data/lib/getstream_ruby/generated/models/appeal_request.rb +5 -0
  13. data/lib/getstream_ruby/generated/models/block_list_response.rb +10 -0
  14. data/lib/getstream_ruby/generated/models/bulk_action_appeals_request.rb +71 -0
  15. data/lib/getstream_ruby/generated/models/bulk_action_appeals_response.rb +41 -0
  16. data/lib/getstream_ruby/generated/models/bulk_appeal_error.rb +36 -0
  17. data/lib/getstream_ruby/generated/models/bulk_appeal_result.rb +36 -0
  18. data/lib/getstream_ruby/generated/models/call_stats_participant_counts.rb +10 -0
  19. data/lib/getstream_ruby/generated/models/cancel_import_v2_task_request.rb +14 -0
  20. data/lib/getstream_ruby/generated/models/cancel_import_v2_task_response.rb +31 -0
  21. data/lib/getstream_ruby/generated/models/channel_config_overrides.rb +106 -0
  22. data/lib/getstream_ruby/generated/models/channel_data_update.rb +1 -1
  23. data/lib/getstream_ruby/generated/models/channel_input.rb +1 -1
  24. data/lib/getstream_ruby/generated/models/chat_message_response.rb +5 -0
  25. data/lib/getstream_ruby/generated/models/classification.rb +46 -0
  26. data/lib/getstream_ruby/generated/models/client_event.rb +156 -0
  27. data/lib/getstream_ruby/generated/models/closed_caption_rule_parameters.rb +5 -0
  28. data/lib/getstream_ruby/generated/models/config_response.rb +5 -0
  29. data/lib/getstream_ruby/generated/models/content_custom_property_count_parameters.rb +46 -0
  30. data/lib/getstream_ruby/generated/models/content_custom_property_parameters.rb +36 -0
  31. data/lib/getstream_ruby/generated/models/create_block_list_request.rb +10 -0
  32. data/lib/getstream_ruby/generated/models/create_device_request.rb +5 -0
  33. data/lib/getstream_ruby/generated/models/create_segment_request.rb +61 -0
  34. data/lib/getstream_ruby/generated/models/create_segment_response.rb +36 -0
  35. data/lib/getstream_ruby/generated/models/delivery_receipts_response.rb +1 -1
  36. data/lib/getstream_ruby/generated/models/device_response.rb +5 -0
  37. data/lib/getstream_ruby/generated/models/filter_config_response.rb +9 -4
  38. data/lib/getstream_ruby/generated/models/flag_details.rb +36 -0
  39. data/lib/getstream_ruby/generated/models/flag_item_response.rb +36 -0
  40. data/lib/getstream_ruby/generated/models/flag_response.rb +69 -9
  41. data/lib/getstream_ruby/generated/models/flood_config.rb +36 -0
  42. data/lib/getstream_ruby/generated/models/flood_identical_config.rb +46 -0
  43. data/lib/getstream_ruby/generated/models/flood_similar_config.rb +51 -0
  44. data/lib/getstream_ruby/generated/models/follow_request.rb +1 -1
  45. data/lib/getstream_ruby/generated/models/get_or_create_feed_request.rb +5 -0
  46. data/lib/getstream_ruby/generated/models/get_or_create_follow_response.rb +46 -0
  47. data/lib/getstream_ruby/generated/models/get_or_create_unfollow_request.rb +51 -0
  48. data/lib/getstream_ruby/generated/models/get_or_create_unfollow_response.rb +41 -0
  49. data/lib/getstream_ruby/generated/models/get_setup_session_response.rb +36 -0
  50. data/lib/getstream_ruby/generated/models/get_user_interests_response.rb +36 -0
  51. data/lib/getstream_ruby/generated/models/grouped_channels_bucket.rb +10 -0
  52. data/lib/getstream_ruby/generated/models/grouped_channels_group_request.rb +41 -0
  53. data/lib/getstream_ruby/generated/models/grouped_query_channels_request.rb +6 -1
  54. data/lib/getstream_ruby/generated/models/import_v2_task_settings.rb +5 -0
  55. data/lib/getstream_ruby/generated/models/interest_tag_response.rb +36 -0
  56. data/lib/getstream_ruby/generated/models/keyframe_ocr_rule_parameters.rb +41 -0
  57. data/lib/getstream_ruby/generated/models/keyframe_rule_parameters.rb +5 -0
  58. data/lib/getstream_ruby/generated/models/label_result_response.rb +5 -0
  59. data/lib/getstream_ruby/generated/models/labels_request.rb +1 -1
  60. data/lib/getstream_ruby/generated/models/labels_response.rb +5 -0
  61. data/lib/getstream_ruby/generated/models/llm_rule.rb +5 -5
  62. data/lib/getstream_ruby/generated/models/matched_content.rb +61 -0
  63. data/lib/getstream_ruby/generated/models/message_response.rb +5 -0
  64. data/lib/getstream_ruby/generated/models/message_with_channel_response.rb +5 -0
  65. data/lib/getstream_ruby/generated/models/moderation_ban_response.rb +31 -0
  66. data/lib/getstream_ruby/generated/models/moderation_config.rb +5 -0
  67. data/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb +15 -0
  68. data/lib/getstream_ruby/generated/models/moderation_image_analysis_complete_event.rb +81 -0
  69. data/lib/getstream_ruby/generated/models/moderation_rules_triggered_event.rb +6 -1
  70. data/lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb +76 -0
  71. data/lib/getstream_ruby/generated/models/query_moderation_rules_response.rb +10 -0
  72. data/lib/getstream_ruby/generated/models/query_review_queue_request.rb +1 -1
  73. data/lib/getstream_ruby/generated/models/read_receipts_response.rb +1 -1
  74. data/lib/getstream_ruby/generated/models/report_client_event_request.rb +31 -0
  75. data/lib/getstream_ruby/generated/models/report_client_event_response.rb +31 -0
  76. data/lib/getstream_ruby/generated/models/rule_builder_action.rb +5 -0
  77. data/lib/getstream_ruby/generated/models/rule_builder_condition.rb +15 -0
  78. data/lib/getstream_ruby/generated/models/search_result_message.rb +5 -0
  79. data/lib/getstream_ruby/generated/models/setup_session.rb +56 -0
  80. data/lib/getstream_ruby/generated/models/submit_action_response.rb +5 -0
  81. data/lib/getstream_ruby/generated/models/target_resolution.rb +6 -6
  82. data/lib/getstream_ruby/generated/models/text_content_parameters.rb +10 -0
  83. data/lib/getstream_ruby/generated/models/translation_settings.rb +2 -2
  84. data/lib/getstream_ruby/generated/models/typing_indicators_response.rb +1 -1
  85. data/lib/getstream_ruby/generated/models/update_app_request.rb +15 -0
  86. data/lib/getstream_ruby/generated/models/update_block_list_request.rb +10 -0
  87. data/lib/getstream_ruby/generated/models/update_follow_request.rb +1 -1
  88. data/lib/getstream_ruby/generated/models/update_segment_request.rb +41 -0
  89. data/lib/getstream_ruby/generated/models/update_segment_response.rb +36 -0
  90. data/lib/getstream_ruby/generated/models/upsert_config_request.rb +5 -0
  91. data/lib/getstream_ruby/generated/models/upsert_setup_session_request.rb +41 -0
  92. data/lib/getstream_ruby/generated/models/upsert_setup_session_response.rb +36 -0
  93. data/lib/getstream_ruby/generated/models/user_banned_event.rb +5 -0
  94. data/lib/getstream_ruby/generated/moderation_client.rb +66 -2
  95. data/lib/getstream_ruby/generated/video_client.rb +17 -0
  96. data/lib/getstream_ruby/generated/webhook.rb +8 -0
  97. data/lib/getstream_ruby/version.rb +1 -1
  98. metadata +44 -2
@@ -18,6 +18,9 @@ module GetStream
18
18
  # @!attribute next
19
19
  # @return [String]
20
20
  attr_accessor :next
21
+ # @!attribute overwrite_interest_weights
22
+ # @return [Boolean]
23
+ attr_accessor :overwrite_interest_weights
21
24
  # @!attribute prev
22
25
  # @return [String]
23
26
  attr_accessor :prev
@@ -67,6 +70,7 @@ module GetStream
67
70
  @id_around = attributes[:id_around] || attributes['id_around'] || nil
68
71
  @limit = attributes[:limit] || attributes['limit'] || nil
69
72
  @next = attributes[:next] || attributes['next'] || nil
73
+ @overwrite_interest_weights = attributes[:overwrite_interest_weights] || attributes['overwrite_interest_weights'] || nil
70
74
  @prev = attributes[:prev] || attributes['prev'] || nil
71
75
  @user_id = attributes[:user_id] || attributes['user_id'] || nil
72
76
  @view = attributes[:view] || attributes['view'] || nil
@@ -89,6 +93,7 @@ module GetStream
89
93
  id_around: 'id_around',
90
94
  limit: 'limit',
91
95
  next: 'next',
96
+ overwrite_interest_weights: 'overwrite_interest_weights',
92
97
  prev: 'prev',
93
98
  user_id: 'user_id',
94
99
  view: 'view',
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4
+
5
+ module GetStream
6
+ module Generated
7
+ module Models
8
+ #
9
+ class GetOrCreateFollowResponse < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute created
13
+ # @return [Boolean] True if the follow was newly created by this request; false if it already existed
14
+ attr_accessor :created
15
+ # @!attribute duration
16
+ # @return [String]
17
+ attr_accessor :duration
18
+ # @!attribute follow
19
+ # @return [FollowResponse]
20
+ attr_accessor :follow
21
+ # @!attribute notification_created
22
+ # @return [Boolean] Whether a notification activity was successfully created (only set when the follow was newly created)
23
+ attr_accessor :notification_created
24
+
25
+ # Initialize with attributes
26
+ def initialize(attributes = {})
27
+ super(attributes)
28
+ @created = attributes[:created] || attributes['created']
29
+ @duration = attributes[:duration] || attributes['duration']
30
+ @follow = attributes[:follow] || attributes['follow']
31
+ @notification_created = attributes[:notification_created] || attributes['notification_created'] || nil
32
+ end
33
+
34
+ # Override field mappings for JSON serialization
35
+ def self.json_field_mappings
36
+ {
37
+ created: 'created',
38
+ duration: 'duration',
39
+ follow: 'follow',
40
+ notification_created: 'notification_created'
41
+ }
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4
+
5
+ module GetStream
6
+ module Generated
7
+ module Models
8
+ #
9
+ class GetOrCreateUnfollowRequest < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute source
13
+ # @return [String] Fully qualified ID of the source feed
14
+ attr_accessor :source
15
+ # @!attribute target
16
+ # @return [String] Fully qualified ID of the target feed
17
+ attr_accessor :target
18
+ # @!attribute delete_notification_activity
19
+ # @return [Boolean] Whether to delete the corresponding notification activity (default: false)
20
+ attr_accessor :delete_notification_activity
21
+ # @!attribute enrich_own_fields
22
+ # @return [Boolean] If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
23
+ attr_accessor :enrich_own_fields
24
+ # @!attribute keep_history
25
+ # @return [Boolean] When true, activities from the unfollowed feed will remain in the source feed's timeline (default: false)
26
+ attr_accessor :keep_history
27
+
28
+ # Initialize with attributes
29
+ def initialize(attributes = {})
30
+ super(attributes)
31
+ @source = attributes[:source] || attributes['source']
32
+ @target = attributes[:target] || attributes['target']
33
+ @delete_notification_activity = attributes[:delete_notification_activity] || attributes['delete_notification_activity'] || nil
34
+ @enrich_own_fields = attributes[:enrich_own_fields] || attributes['enrich_own_fields'] || nil
35
+ @keep_history = attributes[:keep_history] || attributes['keep_history'] || nil
36
+ end
37
+
38
+ # Override field mappings for JSON serialization
39
+ def self.json_field_mappings
40
+ {
41
+ source: 'source',
42
+ target: 'target',
43
+ delete_notification_activity: 'delete_notification_activity',
44
+ enrich_own_fields: 'enrich_own_fields',
45
+ keep_history: 'keep_history'
46
+ }
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4
+
5
+ module GetStream
6
+ module Generated
7
+ module Models
8
+ #
9
+ class GetOrCreateUnfollowResponse < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute deleted
13
+ # @return [Boolean] True if a follow was found and removed by this request; false if no follow existed
14
+ attr_accessor :deleted
15
+ # @!attribute duration
16
+ # @return [String]
17
+ attr_accessor :duration
18
+ # @!attribute follow
19
+ # @return [FollowResponse]
20
+ attr_accessor :follow
21
+
22
+ # Initialize with attributes
23
+ def initialize(attributes = {})
24
+ super(attributes)
25
+ @deleted = attributes[:deleted] || attributes['deleted']
26
+ @duration = attributes[:duration] || attributes['duration']
27
+ @follow = attributes[:follow] || attributes['follow'] || nil
28
+ end
29
+
30
+ # Override field mappings for JSON serialization
31
+ def self.json_field_mappings
32
+ {
33
+ deleted: 'deleted',
34
+ duration: 'duration',
35
+ follow: 'follow'
36
+ }
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4
+
5
+ module GetStream
6
+ module Generated
7
+ module Models
8
+ #
9
+ class GetSetupSessionResponse < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute duration
13
+ # @return [String]
14
+ attr_accessor :duration
15
+ # @!attribute setup_session
16
+ # @return [SetupSession]
17
+ attr_accessor :setup_session
18
+
19
+ # Initialize with attributes
20
+ def initialize(attributes = {})
21
+ super(attributes)
22
+ @duration = attributes[:duration] || attributes['duration']
23
+ @setup_session = attributes[:setup_session] || attributes['setup_session'] || nil
24
+ end
25
+
26
+ # Override field mappings for JSON serialization
27
+ def self.json_field_mappings
28
+ {
29
+ duration: 'duration',
30
+ setup_session: 'setup_session'
31
+ }
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4
+
5
+ module GetStream
6
+ module Generated
7
+ module Models
8
+ # User's computed interest tags ordered by descending count, then ascending tag name
9
+ class GetUserInterestsResponse < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute duration
13
+ # @return [String]
14
+ attr_accessor :duration
15
+ # @!attribute interests
16
+ # @return [Array<InterestTagResponse>] Top-N interest tags sorted by descending count, then alphabetically by tag
17
+ attr_accessor :interests
18
+
19
+ # Initialize with attributes
20
+ def initialize(attributes = {})
21
+ super(attributes)
22
+ @duration = attributes[:duration] || attributes['duration']
23
+ @interests = attributes[:interests] || attributes['interests']
24
+ end
25
+
26
+ # Override field mappings for JSON serialization
27
+ def self.json_field_mappings
28
+ {
29
+ duration: 'duration',
30
+ interests: 'interests'
31
+ }
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -12,6 +12,12 @@ module GetStream
12
12
  # @!attribute channels
13
13
  # @return [Array<ChannelStateResponseFields>] Channels returned for this bucket
14
14
  attr_accessor :channels
15
+ # @!attribute next
16
+ # @return [String] Cursor for the next page of this group
17
+ attr_accessor :next
18
+ # @!attribute prev
19
+ # @return [String] Cursor for the previous page of this group
20
+ attr_accessor :prev
15
21
  # @!attribute unread_channels
16
22
  # @return [Integer] Unread channels currently classified into this bucket
17
23
  attr_accessor :unread_channels
@@ -20,6 +26,8 @@ module GetStream
20
26
  def initialize(attributes = {})
21
27
  super(attributes)
22
28
  @channels = attributes[:channels] || attributes['channels']
29
+ @next = attributes[:next] || attributes['next'] || nil
30
+ @prev = attributes[:prev] || attributes['prev'] || nil
23
31
  @unread_channels = attributes[:unread_channels] || attributes['unread_channels'] || nil
24
32
  end
25
33
 
@@ -27,6 +35,8 @@ module GetStream
27
35
  def self.json_field_mappings
28
36
  {
29
37
  channels: 'channels',
38
+ next: 'next',
39
+ prev: 'prev',
30
40
  unread_channels: 'unread_channels'
31
41
  }
32
42
  end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4
+
5
+ module GetStream
6
+ module Generated
7
+ module Models
8
+ #
9
+ class GroupedChannelsGroupRequest < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute limit
13
+ # @return [Integer]
14
+ attr_accessor :limit
15
+ # @!attribute next
16
+ # @return [String]
17
+ attr_accessor :next
18
+ # @!attribute prev
19
+ # @return [String]
20
+ attr_accessor :prev
21
+
22
+ # Initialize with attributes
23
+ def initialize(attributes = {})
24
+ super(attributes)
25
+ @limit = attributes[:limit] || attributes['limit'] || nil
26
+ @next = attributes[:next] || attributes['next'] || nil
27
+ @prev = attributes[:prev] || attributes['prev'] || nil
28
+ end
29
+
30
+ # Override field mappings for JSON serialization
31
+ def self.json_field_mappings
32
+ {
33
+ limit: 'limit',
34
+ next: 'next',
35
+ prev: 'prev'
36
+ }
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -10,11 +10,14 @@ module GetStream
10
10
 
11
11
  # Model attributes
12
12
  # @!attribute limit
13
- # @return [Integer] Max channels per bucket (default 10)
13
+ # @return [Integer] Default max channels per group (default 10)
14
14
  attr_accessor :limit
15
15
  # @!attribute user_id
16
16
  # @return [String]
17
17
  attr_accessor :user_id
18
+ # @!attribute groups
19
+ # @return [Hash<String, GroupedChannelsGroupRequest>] Groups to return, keyed by group name. Each group can define limit, next, or prev. 'next' and 'prev' cursors are only allowed when the request contains exactly one group; multi-group pagination is rejected.
20
+ attr_accessor :groups
18
21
  # @!attribute user
19
22
  # @return [UserRequest]
20
23
  attr_accessor :user
@@ -24,6 +27,7 @@ module GetStream
24
27
  super(attributes)
25
28
  @limit = attributes[:limit] || attributes['limit'] || nil
26
29
  @user_id = attributes[:user_id] || attributes['user_id'] || nil
30
+ @groups = attributes[:groups] || attributes['groups'] || nil
27
31
  @user = attributes[:user] || attributes['user'] || nil
28
32
  end
29
33
 
@@ -32,6 +36,7 @@ module GetStream
32
36
  {
33
37
  limit: 'limit',
34
38
  user_id: 'user_id',
39
+ groups: 'groups',
35
40
  user: 'user'
36
41
  }
37
42
  end
@@ -24,6 +24,9 @@ module GetStream
24
24
  # @!attribute source
25
25
  # @return [String]
26
26
  attr_accessor :source
27
+ # @!attribute use_import_time_as_op_time
28
+ # @return [Boolean]
29
+ attr_accessor :use_import_time_as_op_time
27
30
  # @!attribute s3
28
31
  # @return [ImportV2TaskSettingsS3]
29
32
  attr_accessor :s3
@@ -36,6 +39,7 @@ module GetStream
36
39
  @path = attributes[:path] || attributes['path'] || nil
37
40
  @skip_references_check = attributes[:skip_references_check] || attributes['skip_references_check'] || nil
38
41
  @source = attributes[:source] || attributes['source'] || nil
42
+ @use_import_time_as_op_time = attributes[:use_import_time_as_op_time] || attributes['use_import_time_as_op_time'] || nil
39
43
  @s3 = attributes[:s3] || attributes['s3'] || nil
40
44
  end
41
45
 
@@ -47,6 +51,7 @@ module GetStream
47
51
  path: 'path',
48
52
  skip_references_check: 'skip_references_check',
49
53
  source: 'source',
54
+ use_import_time_as_op_time: 'use_import_time_as_op_time',
50
55
  s3: 's3'
51
56
  }
52
57
  end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4
+
5
+ module GetStream
6
+ module Generated
7
+ module Models
8
+ # An interest tag with the number of distinct activities the user reacted to that carried it
9
+ class InterestTagResponse < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute count
13
+ # @return [Integer] Number of distinct reacted-to activities tagged with this value
14
+ attr_accessor :count
15
+ # @!attribute tag
16
+ # @return [String] The interest tag value
17
+ attr_accessor :tag
18
+
19
+ # Initialize with attributes
20
+ def initialize(attributes = {})
21
+ super(attributes)
22
+ @count = attributes[:count] || attributes['count']
23
+ @tag = attributes[:tag] || attributes['tag']
24
+ end
25
+
26
+ # Override field mappings for JSON serialization
27
+ def self.json_field_mappings
28
+ {
29
+ count: 'count',
30
+ tag: 'tag'
31
+ }
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4
+
5
+ module GetStream
6
+ module Generated
7
+ module Models
8
+ #
9
+ class KeyframeOCRRuleParameters < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute threshold
13
+ # @return [Integer]
14
+ attr_accessor :threshold
15
+ # @!attribute time_window
16
+ # @return [String]
17
+ attr_accessor :time_window
18
+ # @!attribute harm_labels
19
+ # @return [Array<String>]
20
+ attr_accessor :harm_labels
21
+
22
+ # Initialize with attributes
23
+ def initialize(attributes = {})
24
+ super(attributes)
25
+ @threshold = attributes[:threshold] || attributes['threshold'] || nil
26
+ @time_window = attributes[:time_window] || attributes['time_window'] || nil
27
+ @harm_labels = attributes[:harm_labels] || attributes['harm_labels'] || nil
28
+ end
29
+
30
+ # Override field mappings for JSON serialization
31
+ def self.json_field_mappings
32
+ {
33
+ threshold: 'threshold',
34
+ time_window: 'time_window',
35
+ harm_labels: 'harm_labels'
36
+ }
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -15,6 +15,9 @@ module GetStream
15
15
  # @!attribute threshold
16
16
  # @return [Integer]
17
17
  attr_accessor :threshold
18
+ # @!attribute time_window
19
+ # @return [String]
20
+ attr_accessor :time_window
18
21
  # @!attribute harm_labels
19
22
  # @return [Array<String>]
20
23
  attr_accessor :harm_labels
@@ -24,6 +27,7 @@ module GetStream
24
27
  super(attributes)
25
28
  @min_confidence = attributes[:min_confidence] || attributes['min_confidence'] || nil
26
29
  @threshold = attributes[:threshold] || attributes['threshold'] || nil
30
+ @time_window = attributes[:time_window] || attributes['time_window'] || nil
27
31
  @harm_labels = attributes[:harm_labels] || attributes['harm_labels'] || nil
28
32
  end
29
33
 
@@ -32,6 +36,7 @@ module GetStream
32
36
  {
33
37
  min_confidence: 'min_confidence',
34
38
  threshold: 'threshold',
39
+ time_window: 'time_window',
35
40
  harm_labels: 'harm_labels'
36
41
  }
37
42
  end
@@ -45,6 +45,9 @@ module GetStream
45
45
  # @!attribute directed_at
46
46
  # @return [String] Who the content is directed at (USER, GROUP, EVERYONE, NONE, etc.)
47
47
  attr_accessor :directed_at
48
+ # @!attribute fully_masked_content
49
+ # @return [String] The stored content with every non-whitespace character masked. Present only when recommended_action is not 'keep'. Derived at runtime and never stored.
50
+ attr_accessor :fully_masked_content
48
51
  # @!attribute masked_content
49
52
  # @return [String] Content with blocklisted tokens masked (when a blocklist rule with action=mask rewrote the original)
50
53
  attr_accessor :masked_content
@@ -70,6 +73,7 @@ module GetStream
70
73
  @labels = attributes[:labels] || attributes['labels']
71
74
  @content_id = attributes[:content_id] || attributes['content_id'] || nil
72
75
  @directed_at = attributes[:directed_at] || attributes['directed_at'] || nil
76
+ @fully_masked_content = attributes[:fully_masked_content] || attributes['fully_masked_content'] || nil
73
77
  @masked_content = attributes[:masked_content] || attributes['masked_content'] || nil
74
78
  @policy = attributes[:policy] || attributes['policy'] || nil
75
79
  @user_id = attributes[:user_id] || attributes['user_id'] || nil
@@ -90,6 +94,7 @@ module GetStream
90
94
  labels: 'labels',
91
95
  content_id: 'content_id',
92
96
  directed_at: 'directed_at',
97
+ fully_masked_content: 'fully_masked_content',
93
98
  masked_content: 'masked_content',
94
99
  policy: 'policy',
95
100
  user_id: 'user_id'
@@ -25,7 +25,7 @@ module GetStream
25
25
  # @return [Boolean] When true, run moderation and return labels without persisting the result. Useful for one-off checks (e.g. UI testers) that should not be recorded in the stored history.
26
26
  attr_accessor :dry_run
27
27
  # @!attribute policy
28
- # @return [String] Optional moderation policy key (max 128 chars)
28
+ # @return [String] Optional moderation policy key (max 128 chars). For username moderation, set this to a policy whose key starts with 'username:' (e.g. 'username:default') to opt into the low-latency fast-path: blocklists (customer + Stream-managed defaults) short-circuit the LLM, and the LLM fallback uses gpt-4.1-nano with a 24h Valkey verdict cache. Without a 'username:' prefix the request falls through to the standard Bodyguard Analyze v1 username path.
29
29
  attr_accessor :policy
30
30
  # @!attribute user_id
31
31
  # @return [String] Optional customer-supplied user identifier for the content author (max 256 chars). Enables filtering stored results by user_id.
@@ -21,6 +21,9 @@ module GetStream
21
21
  # @!attribute directed_at
22
22
  # @return [String] Who the content is directed at (USER, GROUP, EVERYONE, NONE, etc.), when the provider exposes it
23
23
  attr_accessor :directed_at
24
+ # @!attribute fully_masked_content
25
+ # @return [String] The original content with every non-whitespace character masked. Present only when recommended_action is not 'keep'. Derived at runtime and never stored.
26
+ attr_accessor :fully_masked_content
24
27
  # @!attribute harm_type
25
28
  # @return [String] High-level harm category
26
29
  attr_accessor :harm_type
@@ -44,6 +47,7 @@ module GetStream
44
47
  @recommended_action = attributes[:recommended_action] || attributes['recommended_action']
45
48
  @content_id = attributes[:content_id] || attributes['content_id'] || nil
46
49
  @directed_at = attributes[:directed_at] || attributes['directed_at'] || nil
50
+ @fully_masked_content = attributes[:fully_masked_content] || attributes['fully_masked_content'] || nil
47
51
  @harm_type = attributes[:harm_type] || attributes['harm_type'] || nil
48
52
  @language = attributes[:language] || attributes['language'] || nil
49
53
  @masked_content = attributes[:masked_content] || attributes['masked_content'] || nil
@@ -58,6 +62,7 @@ module GetStream
58
62
  recommended_action: 'recommended_action',
59
63
  content_id: 'content_id',
60
64
  directed_at: 'directed_at',
65
+ fully_masked_content: 'fully_masked_content',
61
66
  harm_type: 'harm_type',
62
67
  language: 'language',
63
68
  masked_content: 'masked_content',
@@ -9,15 +9,15 @@ module GetStream
9
9
  class LLMRule < GetStream::BaseModel
10
10
 
11
11
  # Model attributes
12
- # @!attribute description
13
- # @return [String]
14
- attr_accessor :description
15
12
  # @!attribute label
16
13
  # @return [String]
17
14
  attr_accessor :label
18
15
  # @!attribute action
19
16
  # @return [String]
20
17
  attr_accessor :action
18
+ # @!attribute description
19
+ # @return [String]
20
+ attr_accessor :description
21
21
  # @!attribute severity_rules
22
22
  # @return [Array<BodyguardSeverityRule>]
23
23
  attr_accessor :severity_rules
@@ -25,18 +25,18 @@ module GetStream
25
25
  # Initialize with attributes
26
26
  def initialize(attributes = {})
27
27
  super(attributes)
28
- @description = attributes[:description] || attributes['description']
29
28
  @label = attributes[:label] || attributes['label']
30
29
  @action = attributes[:action] || attributes['action'] || nil
30
+ @description = attributes[:description] || attributes['description'] || nil
31
31
  @severity_rules = attributes[:severity_rules] || attributes['severity_rules'] || nil
32
32
  end
33
33
 
34
34
  # Override field mappings for JSON serialization
35
35
  def self.json_field_mappings
36
36
  {
37
- description: 'description',
38
37
  label: 'label',
39
38
  action: 'action',
39
+ description: 'description',
40
40
  severity_rules: 'severity_rules'
41
41
  }
42
42
  end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4
+
5
+ module GetStream
6
+ module Generated
7
+ module Models
8
+ #
9
+ class MatchedContent < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute id
13
+ # @return [String] The `content_ids[label]` value supplied on the `/analyze` request that contributed this entry.
14
+ attr_accessor :id
15
+ # @!attribute published_at
16
+ # @return [DateTime] `content_published_at` from the contributing `/analyze` request, or server receive time when that field was omitted.
17
+ attr_accessor :published_at
18
+ # @!attribute type
19
+ # @return [String] Content type that contributed this entry: `image` or `text`.
20
+ attr_accessor :type
21
+ # @!attribute confidence
22
+ # @return [Float] Image-classification entries only. Aggregate (max) confidence score across the entry's classifications + sub-classifications. Absent on text and OCR entries.
23
+ attr_accessor :confidence
24
+ # @!attribute severity
25
+ # @return [String] Text and OCR entries. Aggregate (max) Bodyguard severity level (`LOW` / `MEDIUM` / `HIGH` / `CRITICAL`). Absent on image-classification entries.
26
+ attr_accessor :severity
27
+ # @!attribute classifications
28
+ # @return [Array<Classification>] Image-classification entries (keyframe rule, Type=image) carry nested L1 → L2 classifications. Text entries (closed_caption rule, Type=text) carry flat label + severity. Resolved against the app's effective taxonomy on the image side.
29
+ attr_accessor :classifications
30
+ # @!attribute ocr_classifications
31
+ # @return [Array<Classification>] OCR entries only (keyframe_ocr rule, Type=image). Bodyguard labels that fired against the keyframe's OCR-extracted text (e.g. `INSULT`, `HATE_SPEECH`). Distinct from `classifications` so consumers can route OCR matches separately from image-classification matches.
32
+ attr_accessor :ocr_classifications
33
+
34
+ # Initialize with attributes
35
+ def initialize(attributes = {})
36
+ super(attributes)
37
+ @id = attributes[:id] || attributes['id']
38
+ @published_at = attributes[:published_at] || attributes['published_at']
39
+ @type = attributes[:type] || attributes['type']
40
+ @confidence = attributes[:confidence] || attributes['confidence'] || nil
41
+ @severity = attributes[:severity] || attributes['severity'] || nil
42
+ @classifications = attributes[:classifications] || attributes['classifications'] || nil
43
+ @ocr_classifications = attributes[:ocr_classifications] || attributes['ocr_classifications'] || nil
44
+ end
45
+
46
+ # Override field mappings for JSON serialization
47
+ def self.json_field_mappings
48
+ {
49
+ id: 'id',
50
+ published_at: 'published_at',
51
+ type: 'type',
52
+ confidence: 'confidence',
53
+ severity: 'severity',
54
+ classifications: 'classifications',
55
+ ocr_classifications: 'ocr_classifications'
56
+ }
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -114,6 +114,9 @@ module GetStream
114
114
  # @!attribute mentioned_group_ids
115
115
  # @return [Array<String>] List of user group IDs mentioned in the message. Group members who are also channel members will receive push notifications based on their push preferences. Max 10 groups
116
116
  attr_accessor :mentioned_group_ids
117
+ # @!attribute mentioned_groups
118
+ # @return [Array<UserGroupResponse>] List of mentioned user group objects.
119
+ attr_accessor :mentioned_groups
117
120
  # @!attribute mentioned_roles
118
121
  # @return [Array<String>] List of roles mentioned in the message (e.g. admin, channel_moderator, custom roles). Members with matching roles will receive push notifications based on their push preferences. Max 10 roles
119
122
  attr_accessor :mentioned_roles
@@ -192,6 +195,7 @@ module GetStream
192
195
  @quoted_message_id = attributes[:quoted_message_id] || attributes['quoted_message_id'] || nil
193
196
  @show_in_channel = attributes[:show_in_channel] || attributes['show_in_channel'] || nil
194
197
  @mentioned_group_ids = attributes[:mentioned_group_ids] || attributes['mentioned_group_ids'] || nil
198
+ @mentioned_groups = attributes[:mentioned_groups] || attributes['mentioned_groups'] || nil
195
199
  @mentioned_roles = attributes[:mentioned_roles] || attributes['mentioned_roles'] || nil
196
200
  @thread_participants = attributes[:thread_participants] || attributes['thread_participants'] || nil
197
201
  @draft = attributes[:draft] || attributes['draft'] || nil
@@ -245,6 +249,7 @@ module GetStream
245
249
  quoted_message_id: 'quoted_message_id',
246
250
  show_in_channel: 'show_in_channel',
247
251
  mentioned_group_ids: 'mentioned_group_ids',
252
+ mentioned_groups: 'mentioned_groups',
248
253
  mentioned_roles: 'mentioned_roles',
249
254
  thread_participants: 'thread_participants',
250
255
  draft: 'draft',