getstream-ruby 13.2.1 → 13.3.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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/lib/getstream_ruby/client.rb +14 -14
  3. data/lib/getstream_ruby/configuration.rb +4 -1
  4. data/lib/getstream_ruby/generated/chat_client.rb +16 -0
  5. data/lib/getstream_ruby/generated/common_client.rb +9 -5
  6. data/lib/getstream_ruby/generated/feeds_client.rb +18 -1
  7. data/lib/getstream_ruby/generated/models/activity_feedback_request.rb +5 -0
  8. data/lib/getstream_ruby/generated/models/add_activity_request.rb +5 -0
  9. data/lib/getstream_ruby/generated/models/ai_video_config_request.rb +6 -1
  10. data/lib/getstream_ruby/generated/models/ai_video_config_response.rb +6 -1
  11. data/lib/getstream_ruby/generated/models/app_response_fields.rb +5 -0
  12. data/lib/getstream_ruby/generated/models/ban_request.rb +5 -0
  13. data/lib/getstream_ruby/generated/models/budget_status_response.rb +56 -0
  14. data/lib/getstream_ruby/generated/models/budgets_response.rb +66 -0
  15. data/lib/getstream_ruby/generated/models/chat_message_response.rb +5 -0
  16. data/lib/getstream_ruby/generated/models/engagement_rates.rb +51 -0
  17. data/lib/getstream_ruby/generated/models/engagement_stats_result.rb +51 -0
  18. data/lib/getstream_ruby/generated/models/export_users_request.rb +16 -1
  19. data/lib/getstream_ruby/generated/models/feeds_policy_config.rb +6 -1
  20. data/lib/getstream_ruby/generated/models/for_you_config.rb +10 -0
  21. data/lib/getstream_ruby/generated/models/for_you_experiment_config.rb +36 -0
  22. data/lib/getstream_ruby/generated/models/for_you_experiment_variant.rb +36 -0
  23. data/lib/getstream_ruby/generated/models/get_blocked_users_response.rb +7 -2
  24. data/lib/getstream_ruby/generated/models/get_or_create_feed_response.rb +1 -1
  25. data/lib/getstream_ruby/generated/models/get_rate_limits_response.rb +5 -0
  26. data/lib/getstream_ruby/generated/models/mark_channels_read_request.rb +5 -0
  27. data/lib/getstream_ruby/generated/models/message_response.rb +5 -0
  28. data/lib/getstream_ruby/generated/models/message_schema_settings.rb +46 -0
  29. data/lib/getstream_ruby/generated/models/message_validation.rb +36 -0
  30. data/lib/getstream_ruby/generated/models/message_with_channel_response.rb +5 -0
  31. data/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb +5 -0
  32. data/lib/getstream_ruby/generated/models/query_appeals_request.rb +5 -0
  33. data/lib/getstream_ruby/generated/models/query_appeals_response.rb +11 -1
  34. data/lib/getstream_ruby/generated/models/query_feeds_engagement_stats_request.rb +56 -0
  35. data/lib/getstream_ruby/generated/models/query_feeds_engagement_stats_response.rb +36 -0
  36. data/lib/getstream_ruby/generated/models/query_label_results_request.rb +1 -1
  37. data/lib/getstream_ruby/generated/models/reaction_validation.rb +31 -0
  38. data/lib/getstream_ruby/generated/models/search_result_message.rb +5 -0
  39. data/lib/getstream_ruby/generated/models/set_feeds_retention_policy_request.rb +6 -1
  40. data/lib/getstream_ruby/generated/models/submit_action_response.rb +5 -0
  41. data/lib/getstream_ruby/generated/models/track_activity_metrics_event.rb +1 -1
  42. data/lib/getstream_ruby/generated/models/transcribe_message_response.rb +31 -0
  43. data/lib/getstream_ruby/generated/models/update_app_request.rb +5 -0
  44. data/lib/getstream_ruby/generated/models/upsert_activities_request.rb +5 -0
  45. data/lib/getstream_ruby/generated/models/user_interest_request.rb +1 -1
  46. data/lib/getstream_ruby/generated/moderation_client.rb +3 -1
  47. data/lib/getstream_ruby/log_redaction.rb +17 -0
  48. data/lib/getstream_ruby/request_logging.rb +17 -7
  49. data/lib/getstream_ruby/version.rb +1 -1
  50. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b051023a5efd3242f97748fe838cebac58b8b69da38c7de00fd018f274f16113
4
- data.tar.gz: 9fc8981f69110a556c5e644b54c8dc31f0fb98d9acf9d09d0d9a536b24d8da1e
3
+ metadata.gz: 7e4d5d67f93a4b7eaeb4f823ddfe41b68a891dcde28b1ab848cb1465cad91600
4
+ data.tar.gz: cd1427a1d99412943358659807cba93f759159f15b51504ce9e15ad131819b20
5
5
  SHA512:
6
- metadata.gz: 63a1240b7fe20d82815222c6003179279922b0d4901a251ba502810bb7901cfcc2e513e74aca4284333fe7ec67d396dd34fb18cfb80d14bb8003191f5c9030a6
7
- data.tar.gz: a7a9ed011677519484692d5534840b2b60a70a182c65cf35ce42b37bef9eafd1571877ce88fdbc20bfc331d24cf20f37fe125ec5742472344de50a726f3662a1
6
+ metadata.gz: 689150585949c8475f0c5dd45016a54383fd621d421fd5ca3ad5d9807df52824b74537487a6b316c8a7d867f037e6be8f2e34b88a0e3fbaf8e4d46ab6b9f2e8e
7
+ data.tar.gz: 1c2708170713d29c6956d5e5952e1e9bce1944eb421351123dd4b7085fbc30d0d060f00b313ab40740e99da49f5584be344dc0700d4f0efabe77b8c309bdd90f
@@ -198,29 +198,29 @@ module GetStreamRuby
198
198
  end
199
199
 
200
200
  def make_request(method, path, query_params: nil, body: nil, request_timeout: nil)
201
- # Handle query parameters
202
- if query_params && !query_params.empty?
203
- query_string = query_params.map { |k, v| "#{k}=#{query_value(v)}" }.join('&')
204
- path = "#{path}?#{query_string}"
205
- end
206
-
207
- # Make the request
208
- request(method, path, body, request_timeout: request_timeout)
201
+ # Query params stay a Hash all the way to Faraday (which URL-encodes
202
+ # them) instead of being baked into `path`, so request logging sees
203
+ # them as params and can redact them.
204
+ params = (query_params || {}).to_h { |k, v| [k.to_s, query_value(v)] }
205
+ request(method, path, body, request_timeout: request_timeout, query_params: params)
209
206
  end
210
207
 
211
208
  private
212
209
 
210
+ # Serializes one query value to its wire string, unencoded (Faraday
211
+ # URL-encodes it): times as RFC 3339, scalar lists comma-separated,
212
+ # anything structured as JSON.
213
213
  def query_value(value)
214
- return URI.encode_www_form_component(value.iso8601(9)) if value.is_a?(Time) || value.is_a?(DateTime)
215
- return URI.encode_www_form_component(value) unless [Array, Hash, GetStream::BaseModel].any? { |k| value.is_a?(k) }
214
+ return value.iso8601(9) if value.is_a?(Time) || value.is_a?(DateTime)
215
+ return value.to_s unless [Array, Hash, GetStream::BaseModel].any? { |k| value.is_a?(k) }
216
216
 
217
217
  scalars = value.is_a?(Array) && value.all? { |e| e.is_a?(String) || e.is_a?(Numeric) || e == true || e == false }
218
- URI.encode_www_form_component(scalars ? value.join(',') : value.to_json)
218
+ scalars ? value.join(',') : value.to_json
219
219
  end
220
220
 
221
- def request(method, path, data = {}, request_timeout: nil)
222
- # Add API key to query parameters
223
- query_params = { api_key: @configuration.api_key }
221
+ def request(method, path, data = {}, request_timeout: nil, query_params: {})
222
+ # The SDK's own api_key always wins over a caller-supplied one.
223
+ query_params = query_params.merge('api_key' => @configuration.api_key)
224
224
 
225
225
  # Check if this is a file upload request that needs multipart
226
226
  return make_multipart_request(method, path, query_params, data) if multipart_request?(data)
@@ -83,7 +83,10 @@ module GetStreamRuby
83
83
  def warn_pool_fallback(fallback_adapter, error)
84
84
  warn_logger = @logger || Logger.new($stdout).tap { |l| l.level = Logger::WARN }
85
85
  warn_logger.warn(
86
- "Falling back to #{fallback_adapter}: could not configure net_http_persistent (#{error.message})",
86
+ LogRedaction.sanitize(
87
+ "Falling back to #{fallback_adapter}: could not configure net_http_persistent " \
88
+ "(#{LogRedaction.redact_message(error.message)})",
89
+ ),
87
90
  )
88
91
  end
89
92
 
@@ -1476,6 +1476,22 @@ module GetStream
1476
1476
  )
1477
1477
  end
1478
1478
 
1479
+ # Transcribes the voice recordings of a message that have no transcript yet. Transcription runs in the background: the transcript arrives in the attachment's voice_transcript field with message.updated. A recording that already has a transcript, or is already being transcribed, is not transcribed againSends events:- message.updated
1480
+ #
1481
+ # @param _id [String]
1482
+ # @return [Models::TranscribeMessageResponse]
1483
+ def transcribe_message(_id)
1484
+ path = '/api/v2/chat/messages/{id}/transcribe'
1485
+ # Replace path parameters
1486
+ path = path.gsub('{id}', _id.to_s)
1487
+
1488
+ # Make the API request
1489
+ @client.make_request(
1490
+ :post,
1491
+ path
1492
+ )
1493
+ end
1494
+
1479
1495
  # Translates message to a given language using automated translation softwareSends events:- message.updated
1480
1496
  #
1481
1497
  # @param _id [String]
@@ -1062,7 +1062,7 @@ module GetStream
1062
1062
  )
1063
1063
  end
1064
1064
 
1065
- # Get rate limits usage and quotas
1065
+ # Get rate limits usage and quotas, and the query budget status of budgeted endpoints
1066
1066
  #
1067
1067
  # @param server_side [Boolean]
1068
1068
  # @param android [Boolean]
@@ -1182,7 +1182,7 @@ module GetStream
1182
1182
  )
1183
1183
  end
1184
1184
 
1185
- # Deletes previously uploaded file
1185
+ # Deletes previously uploaded file. A client can delete its own uploads; deleting another user's upload needs DeleteAttachmentGlobal for uploads of other users (by default, moderators and admins; in a multi-tenant app, within the uploader's team).
1186
1186
  #
1187
1187
  # @param url [String]
1188
1188
  # @return [Models::Response]
@@ -1217,7 +1217,7 @@ module GetStream
1217
1217
  )
1218
1218
  end
1219
1219
 
1220
- # Deletes previously uploaded image
1220
+ # Deletes previously uploaded image. A client can delete its own uploads; deleting another user's upload needs DeleteAttachmentGlobal for uploads of other users (by default, moderators and admins; in a multi-tenant app, within the uploader's team).
1221
1221
  #
1222
1222
  # @param url [String]
1223
1223
  # @return [Models::Response]
@@ -1473,15 +1473,19 @@ module GetStream
1473
1473
  )
1474
1474
  end
1475
1475
 
1476
- # Get list of blocked Users
1476
+ # Returns users blocked by one user, oldest block first. Page with limit (default 500, max 500) and next.
1477
1477
  #
1478
1478
  # @param user_id [String]
1479
+ # @param limit [Integer]
1480
+ # @param _next [String]
1479
1481
  # @return [Models::GetBlockedUsersResponse]
1480
- def get_blocked_users(user_id = nil)
1482
+ def get_blocked_users(user_id = nil, limit = nil, _next = nil)
1481
1483
  path = '/api/v2/users/block'
1482
1484
  # Build query parameters
1483
1485
  query_params = {}
1484
1486
  query_params['user_id'] = user_id unless user_id.nil?
1487
+ query_params['limit'] = limit unless limit.nil?
1488
+ query_params['next'] = _next unless _next.nil?
1485
1489
 
1486
1490
  # Make the API request
1487
1491
  @client.make_request(
@@ -2223,7 +2223,7 @@ module GetStream
2223
2223
  )
2224
2224
  end
2225
2225
 
2226
- # Creates or updates a feeds retention policy for the app (an app may have multiple, each scoped to feed groups). Server-side only.
2226
+ # Creates or updates a feeds retention policy for the app (an app may have multiple, each scoped to feed groups and, except old-activities, optionally narrowed by filter_conditions). Server-side only.
2227
2227
  #
2228
2228
  # @param set_feeds_retention_policy_request [SetFeedsRetentionPolicyRequest]
2229
2229
  # @return [Models::SetFeedsRetentionPolicyResponse]
@@ -2393,6 +2393,23 @@ module GetStream
2393
2393
  )
2394
2394
  end
2395
2395
 
2396
+ # Retrieve For You engagement statistics (reads, users, impressions, clicks, dwell, hides) per view and experiment, aggregated by day.users.total counts user-days.Requires a paid Feeds plan (403 otherwise).limit is the maximum number of series (one per group, view and experiment), not rows; it never cuts a series. A metric's days with no events are omitted from its daily values.This endpoint is not paginated: it is a bounded report over one group's views and experiments for at most 396 days, and limit x days must not exceed 10,000 (the default limit always fits).This endpoint is server-side only.
2397
+ #
2398
+ # @param query_feeds_engagement_stats_request [QueryFeedsEngagementStatsRequest]
2399
+ # @return [Models::QueryFeedsEngagementStatsResponse]
2400
+ def query_feeds_engagement_stats(query_feeds_engagement_stats_request)
2401
+ path = '/api/v2/feeds/stats/engagement'
2402
+ # Build request body
2403
+ body = query_feeds_engagement_stats_request
2404
+
2405
+ # Make the API request
2406
+ @client.make_request(
2407
+ :post,
2408
+ path,
2409
+ body: body
2410
+ )
2411
+ end
2412
+
2396
2413
  # Retrieve usage statistics for feeds including activity count, follow count, and API request count.Returns data aggregated by day with pagination support via from/to date parameters.This endpoint is server-side only.
2397
2414
  #
2398
2415
  # @param query_feeds_usage_stats_request [QueryFeedsUsageStatsRequest]
@@ -12,6 +12,9 @@ module GetStream
12
12
  # @!attribute hide
13
13
  # @return [Boolean] Whether to hide this activity
14
14
  attr_accessor :hide
15
+ # @!attribute request_id
16
+ # @return [String] From the feed response; attributes the hide to the feed's view
17
+ attr_accessor :request_id
15
18
  # @!attribute show_less
16
19
  # @return [Boolean] Whether to show less content like this
17
20
  attr_accessor :show_less
@@ -29,6 +32,7 @@ module GetStream
29
32
  def initialize(attributes = {})
30
33
  super(attributes)
31
34
  @hide = attributes.fetch(:hide) { attributes.fetch('hide', nil) }
35
+ @request_id = attributes.fetch(:request_id) { attributes.fetch('request_id', nil) }
32
36
  @show_less = attributes.fetch(:show_less) { attributes.fetch('show_less', nil) }
33
37
  @show_more = attributes.fetch(:show_more) { attributes.fetch('show_more', nil) }
34
38
  @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
@@ -39,6 +43,7 @@ module GetStream
39
43
  def self.json_field_mappings
40
44
  {
41
45
  hide: 'hide',
46
+ request_id: 'request_id',
42
47
  show_less: 'show_less',
43
48
  show_more: 'show_more',
44
49
  user_id: 'user_id',
@@ -22,6 +22,9 @@ module GetStream
22
22
  # @!attribute create_notification_activity
23
23
  # @return [Boolean] Whether to create notification activities for mentioned users
24
24
  attr_accessor :create_notification_activity
25
+ # @!attribute create_system_feeds
26
+ # @return [Boolean]
27
+ attr_accessor :create_system_feeds
25
28
  # @!attribute create_users
26
29
  # @return [Boolean]
27
30
  attr_accessor :create_users
@@ -102,6 +105,7 @@ module GetStream
102
105
  @feeds = attributes.fetch(:feeds) { attributes.fetch('feeds', nil) }
103
106
  @copy_custom_to_notification = attributes.fetch(:copy_custom_to_notification) { attributes.fetch('copy_custom_to_notification', nil) }
104
107
  @create_notification_activity = attributes.fetch(:create_notification_activity) { attributes.fetch('create_notification_activity', nil) }
108
+ @create_system_feeds = attributes.fetch(:create_system_feeds) { attributes.fetch('create_system_feeds', nil) }
105
109
  @create_users = attributes.fetch(:create_users) { attributes.fetch('create_users', nil) }
106
110
  @enrich_own_fields = attributes.fetch(:enrich_own_fields) { attributes.fetch('enrich_own_fields', nil) }
107
111
  @expires_at = attributes.fetch(:expires_at) { attributes.fetch('expires_at', nil) }
@@ -135,6 +139,7 @@ module GetStream
135
139
  feeds: 'feeds',
136
140
  copy_custom_to_notification: 'copy_custom_to_notification',
137
141
  create_notification_activity: 'create_notification_activity',
142
+ create_system_feeds: 'create_system_feeds',
138
143
  create_users: 'create_users',
139
144
  enrich_own_fields: 'enrich_own_fields',
140
145
  expires_at: 'expires_at',
@@ -24,6 +24,9 @@ module GetStream
24
24
  # @!attribute rules
25
25
  # @return [Array<AWSRekognitionRule>]
26
26
  attr_accessor :rules
27
+ # @!attribute audio_config
28
+ # @return [AIAudioConfigRequest]
29
+ attr_accessor :audio_config
27
30
 
28
31
  # Initialize with attributes
29
32
  def initialize(attributes = {})
@@ -33,6 +36,7 @@ module GetStream
33
36
  @ocr_rules = attributes.fetch(:ocr_rules) { attributes.fetch('ocr_rules', nil) }
34
37
  @ocr_severity_rules = attributes.fetch(:ocr_severity_rules) { attributes.fetch('ocr_severity_rules', nil) }
35
38
  @rules = attributes.fetch(:rules) { attributes.fetch('rules', nil) }
39
+ @audio_config = attributes.fetch(:audio_config) { attributes.fetch('audio_config', nil) }
36
40
  end
37
41
 
38
42
  # Override field mappings for JSON serialization
@@ -42,7 +46,8 @@ module GetStream
42
46
  enabled: 'enabled',
43
47
  ocr_rules: 'ocr_rules',
44
48
  ocr_severity_rules: 'ocr_severity_rules',
45
- rules: 'rules'
49
+ rules: 'rules',
50
+ audio_config: 'audio_config'
46
51
  }
47
52
  end
48
53
  end
@@ -24,6 +24,9 @@ module GetStream
24
24
  # @!attribute ocr_severity_rules
25
25
  # @return [Array<BodyguardRule>]
26
26
  attr_accessor :ocr_severity_rules
27
+ # @!attribute audio_config
28
+ # @return [AIAudioConfigResponse]
29
+ attr_accessor :audio_config
27
30
 
28
31
  # Initialize with attributes
29
32
  def initialize(attributes = {})
@@ -33,6 +36,7 @@ module GetStream
33
36
  @async = attributes.fetch(:async) { attributes.fetch('async', nil) }
34
37
  @ocr_rules = attributes.fetch(:ocr_rules) { attributes.fetch('ocr_rules', nil) }
35
38
  @ocr_severity_rules = attributes.fetch(:ocr_severity_rules) { attributes.fetch('ocr_severity_rules', nil) }
39
+ @audio_config = attributes.fetch(:audio_config) { attributes.fetch('audio_config', nil) }
36
40
  end
37
41
 
38
42
  # Override field mappings for JSON serialization
@@ -42,7 +46,8 @@ module GetStream
42
46
  rules: 'rules',
43
47
  async: 'async',
44
48
  ocr_rules: 'ocr_rules',
45
- ocr_severity_rules: 'ocr_severity_rules'
49
+ ocr_severity_rules: 'ocr_severity_rules',
50
+ audio_config: 'audio_config'
46
51
  }
47
52
  end
48
53
  end
@@ -216,6 +216,9 @@ module GetStream
216
216
  # @!attribute message_marks
217
217
  # @return [MessageMarksConfig] The app's message marks policy: the mark types it defines or overrides, and the privacy switch. The channel type's mark_types says which of them are on in its channels.
218
218
  attr_accessor :message_marks
219
+ # @!attribute message_schema
220
+ # @return [MessageSchemaSettings] The app's message schema settings: how strictly messages and reactions are checked, and the JSON Schemas they are checked against.
221
+ attr_accessor :message_schema
219
222
  # @!attribute moderation_dashboard_preferences
220
223
  # @return [ModerationDashboardPreferences]
221
224
  attr_accessor :moderation_dashboard_preferences
@@ -292,6 +295,7 @@ module GetStream
292
295
  @datadog_info = attributes.fetch(:datadog_info) { attributes.fetch('datadog_info', nil) }
293
296
  @effective_agent_review = attributes.fetch(:effective_agent_review) { attributes.fetch('effective_agent_review', nil) }
294
297
  @message_marks = attributes.fetch(:message_marks) { attributes.fetch('message_marks', nil) }
298
+ @message_schema = attributes.fetch(:message_schema) { attributes.fetch('message_schema', nil) }
295
299
  @moderation_dashboard_preferences = attributes.fetch(:moderation_dashboard_preferences) { attributes.fetch('moderation_dashboard_preferences', nil) }
296
300
  end
297
301
 
@@ -367,6 +371,7 @@ module GetStream
367
371
  datadog_info: 'datadog_info',
368
372
  effective_agent_review: 'effective_agent_review',
369
373
  message_marks: 'message_marks',
374
+ message_schema: 'message_schema',
370
375
  moderation_dashboard_preferences: 'moderation_dashboard_preferences'
371
376
  }
372
377
  end
@@ -21,6 +21,9 @@ module GetStream
21
21
  # @!attribute channel_cid
22
22
  # @return [String] Channel where the ban applies
23
23
  attr_accessor :channel_cid
24
+ # @!attribute channel_type
25
+ # @return [String] Ban the user from every channel of this type, including channels they join later. Cannot be combined with channel_cid, ip_ban, ban_from_future_channels, delete_messages or delete_reactions
26
+ attr_accessor :channel_type
24
27
  # @!attribute delete_messages
25
28
  # @return [DeleteMessages] How a ban or user deletion treats the user's messages.
26
29
  attr_accessor :delete_messages
@@ -50,6 +53,7 @@ module GetStream
50
53
  @ban_from_future_channels = attributes.fetch(:ban_from_future_channels) { attributes.fetch('ban_from_future_channels', nil) }
51
54
  @banned_by_id = attributes.fetch(:banned_by_id) { attributes.fetch('banned_by_id', nil) }
52
55
  @channel_cid = attributes.fetch(:channel_cid) { attributes.fetch('channel_cid', nil) }
56
+ @channel_type = attributes.fetch(:channel_type) { attributes.fetch('channel_type', nil) }
53
57
  @delete_messages = attributes.fetch(:delete_messages) { attributes.fetch('delete_messages', nil) }
54
58
  @delete_reactions = attributes.fetch(:delete_reactions) { attributes.fetch('delete_reactions', nil) }
55
59
  @ip_ban = attributes.fetch(:ip_ban) { attributes.fetch('ip_ban', nil) }
@@ -66,6 +70,7 @@ module GetStream
66
70
  ban_from_future_channels: 'ban_from_future_channels',
67
71
  banned_by_id: 'banned_by_id',
68
72
  channel_cid: 'channel_cid',
73
+ channel_type: 'channel_type',
69
74
  delete_messages: 'delete_messages',
70
75
  delete_reactions: 'delete_reactions',
71
76
  ip_ban: 'ip_ban',
@@ -0,0 +1,56 @@
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 BudgetStatusResponse < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute enforced
13
+ # @return [Boolean] Whether exhausting the budget rejects requests with HTTP 429. False when the budget is only measured, or while enforcement is temporarily suspended
14
+ attr_accessor :enforced
15
+ # @!attribute limit_ms
16
+ # @return [Integer] Database time in milliseconds the endpoint may use per sliding window
17
+ attr_accessor :limit_ms
18
+ # @!attribute remaining_ms
19
+ # @return [Integer] Database time in milliseconds left in the current sliding window, never negative
20
+ attr_accessor :remaining_ms
21
+ # @!attribute reset
22
+ # @return [Integer] The Unix timestamp at which all usage currently in the window will have expired, if no new usage is added. The current time when no usage is recorded in the window. Can be in the future while used_ms is 0, when earlier usage was refunded
23
+ attr_accessor :reset
24
+ # @!attribute used_ms
25
+ # @return [Integer] Database time in milliseconds used in the current sliding window, including requests still in flight
26
+ attr_accessor :used_ms
27
+ # @!attribute window_seconds
28
+ # @return [Integer] Length of the sliding window in seconds
29
+ attr_accessor :window_seconds
30
+
31
+ # Initialize with attributes
32
+ def initialize(attributes = {})
33
+ super(attributes)
34
+ @enforced = attributes.fetch(:enforced) { attributes.fetch('enforced', nil) }
35
+ @limit_ms = attributes.fetch(:limit_ms) { attributes.fetch('limit_ms', nil) }
36
+ @remaining_ms = attributes.fetch(:remaining_ms) { attributes.fetch('remaining_ms', nil) }
37
+ @reset = attributes.fetch(:reset) { attributes.fetch('reset', nil) }
38
+ @used_ms = attributes.fetch(:used_ms) { attributes.fetch('used_ms', nil) }
39
+ @window_seconds = attributes.fetch(:window_seconds) { attributes.fetch('window_seconds', nil) }
40
+ end
41
+
42
+ # Override field mappings for JSON serialization
43
+ def self.json_field_mappings
44
+ {
45
+ enforced: 'enforced',
46
+ limit_ms: 'limit_ms',
47
+ remaining_ms: 'remaining_ms',
48
+ reset: 'reset',
49
+ used_ms: 'used_ms',
50
+ window_seconds: 'window_seconds'
51
+ }
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,66 @@
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 BudgetsResponse < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute all
13
+ # @return [Hash<String, BudgetStatusResponse>] Map of endpoint budgets shared by all platforms. Set when budgets are not tracked per platform
14
+ attr_accessor :all
15
+ # @!attribute android
16
+ # @return [Hash<String, BudgetStatusResponse>] Map of endpoint budgets for the Android platform
17
+ attr_accessor :android
18
+ # @!attribute ios
19
+ # @return [Hash<String, BudgetStatusResponse>] Map of endpoint budgets for the iOS platform
20
+ attr_accessor :ios
21
+ # @!attribute server_side
22
+ # @return [Hash<String, BudgetStatusResponse>] Map of endpoint budgets for the server-side platform
23
+ attr_accessor :server_side
24
+ # @!attribute unity
25
+ # @return [Hash<String, BudgetStatusResponse>] Map of endpoint budgets for the Unity platform
26
+ attr_accessor :unity
27
+ # @!attribute unity_console
28
+ # @return [Hash<String, BudgetStatusResponse>] Map of endpoint budgets for the Unity console platform
29
+ attr_accessor :unity_console
30
+ # @!attribute unity_desktop
31
+ # @return [Hash<String, BudgetStatusResponse>] Map of endpoint budgets for the Unity desktop platform
32
+ attr_accessor :unity_desktop
33
+ # @!attribute web
34
+ # @return [Hash<String, BudgetStatusResponse>] Map of endpoint budgets for the web platform
35
+ attr_accessor :web
36
+
37
+ # Initialize with attributes
38
+ def initialize(attributes = {})
39
+ super(attributes)
40
+ @all = attributes.fetch(:all) { attributes.fetch('all', nil) }
41
+ @android = attributes.fetch(:android) { attributes.fetch('android', nil) }
42
+ @ios = attributes.fetch(:ios) { attributes.fetch('ios', nil) }
43
+ @server_side = attributes.fetch(:server_side) { attributes.fetch('server_side', nil) }
44
+ @unity = attributes.fetch(:unity) { attributes.fetch('unity', nil) }
45
+ @unity_console = attributes.fetch(:unity_console) { attributes.fetch('unity_console', nil) }
46
+ @unity_desktop = attributes.fetch(:unity_desktop) { attributes.fetch('unity_desktop', nil) }
47
+ @web = attributes.fetch(:web) { attributes.fetch('web', nil) }
48
+ end
49
+
50
+ # Override field mappings for JSON serialization
51
+ def self.json_field_mappings
52
+ {
53
+ all: 'all',
54
+ android: 'android',
55
+ ios: 'ios',
56
+ server_side: 'server_side',
57
+ unity: 'unity',
58
+ unity_console: 'unity_console',
59
+ unity_desktop: 'unity_desktop',
60
+ web: 'web'
61
+ }
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -126,6 +126,9 @@ module GetStream
126
126
  # @!attribute thread_participants
127
127
  # @return [Array<UserResponse>]
128
128
  attr_accessor :thread_participants
129
+ # @!attribute deleted_by
130
+ # @return [UserResponse] User response object
131
+ attr_accessor :deleted_by
129
132
  # @!attribute draft
130
133
  # @return [ChatDraftResponse]
131
134
  attr_accessor :draft
@@ -205,6 +208,7 @@ module GetStream
205
208
  @mentioned_roles = attributes.fetch(:mentioned_roles) { attributes.fetch('mentioned_roles', nil) }
206
209
  @own_marks = attributes.fetch(:own_marks) { attributes.fetch('own_marks', nil) }
207
210
  @thread_participants = attributes.fetch(:thread_participants) { attributes.fetch('thread_participants', nil) }
211
+ @deleted_by = attributes.fetch(:deleted_by) { attributes.fetch('deleted_by', nil) }
208
212
  @draft = attributes.fetch(:draft) { attributes.fetch('draft', nil) }
209
213
  @i18n = attributes.fetch(:i18n) { attributes.fetch('i18n', nil) }
210
214
  @image_labels = attributes.fetch(:image_labels) { attributes.fetch('image_labels', nil) }
@@ -261,6 +265,7 @@ module GetStream
261
265
  mentioned_roles: 'mentioned_roles',
262
266
  own_marks: 'own_marks',
263
267
  thread_participants: 'thread_participants',
268
+ deleted_by: 'deleted_by',
264
269
  draft: 'draft',
265
270
  i18n: 'i18n',
266
271
  image_labels: 'image_labels',
@@ -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 EngagementRates < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute avg_dwell_ms
13
+ # @return [Float] dwell_ms / dwell_count, in milliseconds
14
+ attr_accessor :avg_dwell_ms
15
+ # @!attribute clicks_per_user
16
+ # @return [Float] clicks / users (user-days)
17
+ attr_accessor :clicks_per_user
18
+ # @!attribute ctr
19
+ # @return [Float] clicks / impressions
20
+ attr_accessor :ctr
21
+ # @!attribute hide_rate
22
+ # @return [Float] hides / impressions
23
+ attr_accessor :hide_rate
24
+ # @!attribute impressions_per_user
25
+ # @return [Float] impressions / users (user-days)
26
+ attr_accessor :impressions_per_user
27
+
28
+ # Initialize with attributes
29
+ def initialize(attributes = {})
30
+ super(attributes)
31
+ @avg_dwell_ms = attributes.fetch(:avg_dwell_ms) { attributes.fetch('avg_dwell_ms', nil) }
32
+ @clicks_per_user = attributes.fetch(:clicks_per_user) { attributes.fetch('clicks_per_user', nil) }
33
+ @ctr = attributes.fetch(:ctr) { attributes.fetch('ctr', nil) }
34
+ @hide_rate = attributes.fetch(:hide_rate) { attributes.fetch('hide_rate', nil) }
35
+ @impressions_per_user = attributes.fetch(:impressions_per_user) { attributes.fetch('impressions_per_user', nil) }
36
+ end
37
+
38
+ # Override field mappings for JSON serialization
39
+ def self.json_field_mappings
40
+ {
41
+ avg_dwell_ms: 'avg_dwell_ms',
42
+ clicks_per_user: 'clicks_per_user',
43
+ ctr: 'ctr',
44
+ hide_rate: 'hide_rate',
45
+ impressions_per_user: 'impressions_per_user'
46
+ }
47
+ end
48
+ end
49
+ end
50
+ end
51
+ 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 EngagementStatsResult < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute experiment_id
13
+ # @return [String] Empty outside an experiment
14
+ attr_accessor :experiment_id
15
+ # @!attribute group_id
16
+ # @return [String]
17
+ attr_accessor :group_id
18
+ # @!attribute view_id
19
+ # @return [String]
20
+ attr_accessor :view_id
21
+ # @!attribute metrics
22
+ # @return [Hash<String, DailyMetricStatsResponse>] Daily values and total per metric: reads, users, impressions, clicks, dwell_ms, dwell_count, hides. users.total counts user-days
23
+ attr_accessor :metrics
24
+ # @!attribute rates
25
+ # @return [EngagementRates]
26
+ attr_accessor :rates
27
+
28
+ # Initialize with attributes
29
+ def initialize(attributes = {})
30
+ super(attributes)
31
+ @experiment_id = attributes.fetch(:experiment_id) { attributes.fetch('experiment_id', nil) }
32
+ @group_id = attributes.fetch(:group_id) { attributes.fetch('group_id', nil) }
33
+ @view_id = attributes.fetch(:view_id) { attributes.fetch('view_id', nil) }
34
+ @metrics = attributes.fetch(:metrics) { attributes.fetch('metrics', nil) }
35
+ @rates = attributes.fetch(:rates) { attributes.fetch('rates', nil) }
36
+ end
37
+
38
+ # Override field mappings for JSON serialization
39
+ def self.json_field_mappings
40
+ {
41
+ experiment_id: 'experiment_id',
42
+ group_id: 'group_id',
43
+ view_id: 'view_id',
44
+ metrics: 'metrics',
45
+ rates: 'rates'
46
+ }
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -12,17 +12,32 @@ module GetStream
12
12
  # @!attribute user_ids
13
13
  # @return [Array<String>]
14
14
  attr_accessor :user_ids
15
+ # @!attribute messages_from
16
+ # @return [DateTime] Start of the message window, inclusive: messages with created_at >= messages_from are exported. Unlike export_channels' messages_since, which is exclusive. Reactions are selected by the time they were added, in the same window.
17
+ attr_accessor :messages_from
18
+ # @!attribute messages_to
19
+ # @return [DateTime] End of the message window, exclusive: messages with created_at < messages_to are exported. Unlike export_channels' messages_until, which is inclusive. Must be after messages_from. When any of channel_cids, messages_from or messages_to is set, calls are omitted from the export.
20
+ attr_accessor :messages_to
21
+ # @!attribute channel_cids
22
+ # @return [Array<String>] Limit the export to these channels, in type:id form (at most 100, not empty). Without it every channel of the users is exported.
23
+ attr_accessor :channel_cids
15
24
 
16
25
  # Initialize with attributes
17
26
  def initialize(attributes = {})
18
27
  super(attributes)
19
28
  @user_ids = attributes.fetch(:user_ids) { attributes.fetch('user_ids', nil) }
29
+ @messages_from = attributes.fetch(:messages_from) { attributes.fetch('messages_from', nil) }
30
+ @messages_to = attributes.fetch(:messages_to) { attributes.fetch('messages_to', nil) }
31
+ @channel_cids = attributes.fetch(:channel_cids) { attributes.fetch('channel_cids', nil) }
20
32
  end
21
33
 
22
34
  # Override field mappings for JSON serialization
23
35
  def self.json_field_mappings
24
36
  {
25
- user_ids: 'user_ids'
37
+ user_ids: 'user_ids',
38
+ messages_from: 'messages_from',
39
+ messages_to: 'messages_to',
40
+ channel_cids: 'channel_cids'
26
41
  }
27
42
  end
28
43
  end
@@ -15,19 +15,24 @@ module GetStream
15
15
  # @!attribute feed_groups
16
16
  # @return [Array<String>]
17
17
  attr_accessor :feed_groups
18
+ # @!attribute filter_conditions
19
+ # @return [Object] Activities must match every condition to be deleted.
20
+ attr_accessor :filter_conditions
18
21
 
19
22
  # Initialize with attributes
20
23
  def initialize(attributes = {})
21
24
  super(attributes)
22
25
  @max_age_hours = attributes.fetch(:max_age_hours) { attributes.fetch('max_age_hours', nil) }
23
26
  @feed_groups = attributes.fetch(:feed_groups) { attributes.fetch('feed_groups', nil) }
27
+ @filter_conditions = attributes.fetch(:filter_conditions) { attributes.fetch('filter_conditions', nil) }
24
28
  end
25
29
 
26
30
  # Override field mappings for JSON serialization
27
31
  def self.json_field_mappings
28
32
  {
29
33
  max_age_hours: 'max_age_hours',
30
- feed_groups: 'feed_groups'
34
+ feed_groups: 'feed_groups',
35
+ filter_conditions: 'filter_conditions'
31
36
  }
32
37
  end
33
38
  end