getstream-ruby 1.0.0 → 1.1.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.
- checksums.yaml +4 -4
- data/lib/getstream_ruby/client.rb +81 -0
- data/lib/getstream_ruby/generated/common_client.rb +67 -0
- data/lib/getstream_ruby/generated/feeds_client.rb +6 -2
- data/lib/getstream_ruby/generated/models/activity_request.rb +11 -1
- data/lib/getstream_ruby/generated/models/activity_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/add_activity_request.rb +11 -1
- data/lib/getstream_ruby/generated/models/add_activity_response.rb +6 -1
- data/lib/getstream_ruby/generated/models/add_comment_reaction_response.rb +6 -1
- data/lib/getstream_ruby/generated/models/add_comment_response.rb +11 -1
- data/lib/getstream_ruby/generated/models/add_reaction_response.rb +6 -1
- data/lib/getstream_ruby/generated/models/appeal_accepted_event.rb +51 -0
- data/lib/getstream_ruby/generated/models/appeal_created_event.rb +51 -0
- data/lib/getstream_ruby/generated/models/appeal_item_response.rb +81 -0
- data/lib/getstream_ruby/generated/models/appeal_rejected_event.rb +51 -0
- data/lib/getstream_ruby/generated/models/appeal_request.rb +56 -0
- data/lib/getstream_ruby/generated/models/appeal_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/call_recording_failed_event.rb +5 -0
- data/lib/getstream_ruby/generated/models/call_recording_ready_event.rb +5 -0
- data/lib/getstream_ruby/generated/models/call_recording_started_event.rb +5 -0
- data/lib/getstream_ruby/generated/models/call_recording_stopped_event.rb +5 -0
- data/lib/getstream_ruby/generated/models/call_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/call_settings.rb +10 -0
- data/lib/getstream_ruby/generated/models/call_settings_request.rb +10 -0
- data/lib/getstream_ruby/generated/models/call_settings_response.rb +10 -0
- data/lib/getstream_ruby/generated/models/call_stats_participant_counts.rb +6 -1
- data/lib/getstream_ruby/generated/models/channel_batch_completed_event.rb +81 -0
- data/lib/getstream_ruby/generated/models/channel_batch_started_event.rb +81 -0
- data/lib/getstream_ruby/generated/models/comment_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/composite_recording_response.rb +31 -0
- data/lib/getstream_ruby/generated/models/create_import_v2_task_request.rb +46 -0
- data/lib/getstream_ruby/generated/models/create_import_v2_task_response.rb +66 -0
- data/lib/getstream_ruby/generated/models/delete_import_v2_task_response.rb +31 -0
- data/lib/getstream_ruby/generated/models/egress_response.rb +16 -1
- data/lib/getstream_ruby/generated/models/enrichment_options.rb +23 -18
- data/lib/getstream_ruby/generated/models/event_hook.rb +5 -0
- data/lib/getstream_ruby/generated/models/feed_own_data.rb +5 -0
- data/lib/getstream_ruby/generated/models/feed_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/feed_suggestion_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/future_channel_ban_response.rb +56 -0
- data/lib/getstream_ruby/generated/models/get_appeal_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/get_import_v2_task_response.rb +66 -0
- data/lib/getstream_ruby/generated/models/go_live_request.rb +15 -0
- data/lib/getstream_ruby/generated/models/import_v2_task_item.rb +61 -0
- data/lib/getstream_ruby/generated/models/import_v2_task_settings.rb +36 -0
- data/lib/getstream_ruby/generated/models/import_v2_task_settings_s3.rb +41 -0
- data/lib/getstream_ruby/generated/models/individual_record_settings.rb +31 -0
- data/lib/getstream_ruby/generated/models/individual_recording_response.rb +31 -0
- data/lib/getstream_ruby/generated/models/individual_recording_settings_request.rb +31 -0
- data/lib/getstream_ruby/generated/models/individual_recording_settings_response.rb +31 -0
- data/lib/getstream_ruby/generated/models/ingress_error_event.rb +61 -0
- data/lib/getstream_ruby/generated/models/ingress_started_event.rb +71 -0
- data/lib/getstream_ruby/generated/models/ingress_stopped_event.rb +51 -0
- data/lib/getstream_ruby/generated/models/list_import_v2_tasks_response.rb +46 -0
- data/lib/getstream_ruby/generated/models/mark_reviewed_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/message_new_event.rb +1 -1
- data/lib/getstream_ruby/generated/models/own_batch_request.rb +2 -2
- data/lib/getstream_ruby/generated/models/participant_session_details.rb +61 -0
- data/lib/getstream_ruby/generated/models/poll_vote_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/query_appeals_request.rb +61 -0
- data/lib/getstream_ruby/generated/models/query_appeals_response.rb +46 -0
- data/lib/getstream_ruby/generated/models/query_call_participant_sessions_response.rb +76 -0
- data/lib/getstream_ruby/generated/models/query_channels_request.rb +15 -0
- data/lib/getstream_ruby/generated/models/query_future_channel_bans_payload.rb +56 -0
- data/lib/getstream_ruby/generated/models/query_future_channel_bans_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/ranking_config.rb +1 -1
- data/lib/getstream_ruby/generated/models/raw_record_settings.rb +31 -0
- data/lib/getstream_ruby/generated/models/raw_recording_response.rb +31 -0
- data/lib/getstream_ruby/generated/models/raw_recording_settings_request.rb +31 -0
- data/lib/getstream_ruby/generated/models/raw_recording_settings_response.rb +31 -0
- data/lib/getstream_ruby/generated/models/reject_appeal_request.rb +31 -0
- data/lib/getstream_ruby/generated/models/resolve_sip_inbound_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/restore_action_request.rb +18 -1
- data/lib/getstream_ruby/generated/models/review_queue_item_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/rule_builder_condition.rb +10 -0
- data/lib/getstream_ruby/generated/models/search_payload.rb +5 -0
- data/lib/getstream_ruby/generated/models/single_follow_response.rb +6 -1
- data/lib/getstream_ruby/generated/models/stop_live_request.rb +15 -0
- data/lib/getstream_ruby/generated/models/submit_action_request.rb +21 -1
- data/lib/getstream_ruby/generated/models/submit_action_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/text_rule_parameters.rb +10 -0
- data/lib/getstream_ruby/generated/models/threaded_comment_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/unban_action_request.rb +18 -1
- data/lib/getstream_ruby/generated/models/unblock_action_request.rb +18 -1
- data/lib/getstream_ruby/generated/models/update_activity_partial_request.rb +2 -2
- data/lib/getstream_ruby/generated/models/update_activity_request.rb +10 -0
- data/lib/getstream_ruby/generated/models/update_comment_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/update_feed_request.rb +15 -0
- data/lib/getstream_ruby/generated/models/upsert_activities_response.rb +6 -1
- data/lib/getstream_ruby/generated/models/user_identical_content_count_parameters.rb +36 -0
- data/lib/getstream_ruby/generated/models/user_role_parameters.rb +36 -0
- data/lib/getstream_ruby/generated/moderation_client.rb +50 -0
- data/lib/getstream_ruby/version.rb +1 -1
- metadata +55 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 19d92117172f83ba9e06859f333de67ac8e0dc5d2ba7f6f02f65fa46499a4ed9
|
|
4
|
+
data.tar.gz: 418a47df2d04dcc710bd4a727e7efd3f9b823309eacb8e54ac33cf85ad934ba5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 153932e55a584aecdbb038690ef772f7451b086387b886ef17f1f5a7579fd1b88368c2d0ecd52c670710a5790fdc4059ebb0b2a1b6eeb45567954e2e68fabc97
|
|
7
|
+
data.tar.gz: 17a34cf466f0beea370a2c210f2955a51880d61f24df3fb91849f8a54e5ebad73aa90fe1031efe452b23d4ae428a29132c07ede3aad88abad15b5f506222e764
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require 'faraday'
|
|
4
4
|
require 'faraday/retry'
|
|
5
|
+
require 'faraday/multipart'
|
|
5
6
|
require 'json'
|
|
6
7
|
require 'jwt'
|
|
7
8
|
require_relative 'generated/base_model'
|
|
@@ -86,6 +87,10 @@ module GetStreamRuby
|
|
|
86
87
|
def request(method, path, data = {})
|
|
87
88
|
# Add API key to query parameters
|
|
88
89
|
query_params = { api_key: @configuration.api_key }
|
|
90
|
+
|
|
91
|
+
# Check if this is a file upload request that needs multipart
|
|
92
|
+
return make_multipart_request(method, path, query_params, data) if multipart_request?(data)
|
|
93
|
+
|
|
89
94
|
response = @connection.send(method) do |req|
|
|
90
95
|
|
|
91
96
|
req.url path, query_params
|
|
@@ -105,6 +110,7 @@ module GetStreamRuby
|
|
|
105
110
|
def build_connection
|
|
106
111
|
Faraday.new(url: @configuration.base_url) do |conn|
|
|
107
112
|
|
|
113
|
+
conn.request :multipart
|
|
108
114
|
conn.request :retry, {
|
|
109
115
|
max: 3,
|
|
110
116
|
interval: 0.05,
|
|
@@ -159,6 +165,81 @@ module GetStreamRuby
|
|
|
159
165
|
end
|
|
160
166
|
end
|
|
161
167
|
|
|
168
|
+
def multipart_request?(data)
|
|
169
|
+
return false if data.nil? || data == {}
|
|
170
|
+
|
|
171
|
+
# Check if data is a FileUploadRequest or ImageUploadRequest
|
|
172
|
+
data.is_a?(GetStream::Generated::Models::FileUploadRequest) ||
|
|
173
|
+
data.is_a?(GetStream::Generated::Models::ImageUploadRequest)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
def make_multipart_request(method, path, query_params, data)
|
|
177
|
+
# Build multipart form data
|
|
178
|
+
payload = {}
|
|
179
|
+
|
|
180
|
+
# Handle file field
|
|
181
|
+
raise APIError, 'file name must be provided' if data.file.nil? || data.file.empty?
|
|
182
|
+
|
|
183
|
+
file_path = data.file
|
|
184
|
+
raise APIError, "file not found: #{file_path}" unless File.exist?(file_path)
|
|
185
|
+
|
|
186
|
+
# Determine content type
|
|
187
|
+
content_type = detect_content_type(file_path)
|
|
188
|
+
|
|
189
|
+
# Add file as multipart (FilePart handles file opening/closing)
|
|
190
|
+
payload[:file] = Faraday::Multipart::FilePart.new(
|
|
191
|
+
file_path,
|
|
192
|
+
content_type,
|
|
193
|
+
File.basename(file_path),
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
# Add user field if present (as JSON string)
|
|
197
|
+
if data.user
|
|
198
|
+
user_json = data.user.to_json
|
|
199
|
+
payload[:user] = user_json
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Add upload_sizes field for ImageUploadRequest (as JSON string)
|
|
203
|
+
if data.is_a?(GetStream::Generated::Models::ImageUploadRequest) && data.upload_sizes
|
|
204
|
+
upload_sizes_json = data.upload_sizes.to_json
|
|
205
|
+
payload[:upload_sizes] = upload_sizes_json
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
response = @connection.send(method) do |req|
|
|
209
|
+
|
|
210
|
+
req.url path, query_params
|
|
211
|
+
req.headers['Authorization'] = generate_auth_header
|
|
212
|
+
req.headers['stream-auth-type'] = 'jwt'
|
|
213
|
+
req.headers['X-Stream-Client'] = user_agent
|
|
214
|
+
req.body = payload
|
|
215
|
+
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
handle_response(response)
|
|
219
|
+
rescue Faraday::Error => e
|
|
220
|
+
raise APIError, "Request failed: #{e.message}"
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
def detect_content_type(file_path)
|
|
224
|
+
ext = File.extname(file_path).downcase
|
|
225
|
+
case ext
|
|
226
|
+
when '.png'
|
|
227
|
+
'image/png'
|
|
228
|
+
when '.jpg', '.jpeg'
|
|
229
|
+
'image/jpeg'
|
|
230
|
+
when '.gif'
|
|
231
|
+
'image/gif'
|
|
232
|
+
when '.pdf'
|
|
233
|
+
'application/pdf'
|
|
234
|
+
when '.txt'
|
|
235
|
+
'text/plain'
|
|
236
|
+
when '.json'
|
|
237
|
+
'application/json'
|
|
238
|
+
else
|
|
239
|
+
'application/octet-stream'
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
162
243
|
end
|
|
163
244
|
|
|
164
245
|
end
|
|
@@ -408,6 +408,73 @@ module GetStream
|
|
|
408
408
|
)
|
|
409
409
|
end
|
|
410
410
|
|
|
411
|
+
# Lists all import v2 tasks for the app
|
|
412
|
+
#
|
|
413
|
+
# @param state [Integer]
|
|
414
|
+
# @return [Models::ListImportV2TasksResponse]
|
|
415
|
+
def list_import_v2_tasks(state = nil)
|
|
416
|
+
path = '/api/v2/imports/v2'
|
|
417
|
+
# Build query parameters
|
|
418
|
+
query_params = {}
|
|
419
|
+
query_params['state'] = state unless state.nil?
|
|
420
|
+
|
|
421
|
+
# Make the API request
|
|
422
|
+
@client.make_request(
|
|
423
|
+
:get,
|
|
424
|
+
path,
|
|
425
|
+
query_params: query_params
|
|
426
|
+
)
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
# Creates a new import v2 task
|
|
430
|
+
#
|
|
431
|
+
# @param create_import_v2_task_request [CreateImportV2TaskRequest]
|
|
432
|
+
# @return [Models::CreateImportV2TaskResponse]
|
|
433
|
+
def create_import_v2_task(create_import_v2_task_request)
|
|
434
|
+
path = '/api/v2/imports/v2'
|
|
435
|
+
# Build request body
|
|
436
|
+
body = create_import_v2_task_request
|
|
437
|
+
|
|
438
|
+
# Make the API request
|
|
439
|
+
@client.make_request(
|
|
440
|
+
:post,
|
|
441
|
+
path,
|
|
442
|
+
body: body
|
|
443
|
+
)
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
# Deletes an import v2 task. Can only delete tasks in queued state.
|
|
447
|
+
#
|
|
448
|
+
# @param _id [String]
|
|
449
|
+
# @return [Models::DeleteImportV2TaskResponse]
|
|
450
|
+
def delete_import_v2_task(_id)
|
|
451
|
+
path = '/api/v2/imports/v2/{id}'
|
|
452
|
+
# Replace path parameters
|
|
453
|
+
path = path.gsub('{id}', _id.to_s)
|
|
454
|
+
|
|
455
|
+
# Make the API request
|
|
456
|
+
@client.make_request(
|
|
457
|
+
:delete,
|
|
458
|
+
path
|
|
459
|
+
)
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
# Gets a single import v2 task by ID
|
|
463
|
+
#
|
|
464
|
+
# @param _id [String]
|
|
465
|
+
# @return [Models::GetImportV2TaskResponse]
|
|
466
|
+
def get_import_v2_task(_id)
|
|
467
|
+
path = '/api/v2/imports/v2/{id}'
|
|
468
|
+
# Replace path parameters
|
|
469
|
+
path = path.gsub('{id}', _id.to_s)
|
|
470
|
+
|
|
471
|
+
# Make the API request
|
|
472
|
+
@client.make_request(
|
|
473
|
+
:get,
|
|
474
|
+
path
|
|
475
|
+
)
|
|
476
|
+
end
|
|
477
|
+
|
|
411
478
|
# Gets an import
|
|
412
479
|
#
|
|
413
480
|
# @param _id [String]
|
|
@@ -516,11 +516,12 @@ module GetStream
|
|
|
516
516
|
# @param depth [Integer]
|
|
517
517
|
# @param sort [String]
|
|
518
518
|
# @param replies_limit [Integer]
|
|
519
|
+
# @param user_id [String]
|
|
519
520
|
# @param limit [Integer]
|
|
520
521
|
# @param prev [String]
|
|
521
522
|
# @param _next [String]
|
|
522
523
|
# @return [Models::GetCommentsResponse]
|
|
523
|
-
def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, limit = nil, prev = nil, _next = nil)
|
|
524
|
+
def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
|
|
524
525
|
path = '/api/v2/feeds/comments'
|
|
525
526
|
# Build query parameters
|
|
526
527
|
query_params = {}
|
|
@@ -529,6 +530,7 @@ module GetStream
|
|
|
529
530
|
query_params['depth'] = depth unless depth.nil?
|
|
530
531
|
query_params['sort'] = sort unless sort.nil?
|
|
531
532
|
query_params['replies_limit'] = replies_limit unless replies_limit.nil?
|
|
533
|
+
query_params['user_id'] = user_id unless user_id.nil?
|
|
532
534
|
query_params['limit'] = limit unless limit.nil?
|
|
533
535
|
query_params['prev'] = prev unless prev.nil?
|
|
534
536
|
query_params['next'] = _next unless _next.nil?
|
|
@@ -718,11 +720,12 @@ module GetStream
|
|
|
718
720
|
# @param depth [Integer]
|
|
719
721
|
# @param sort [String]
|
|
720
722
|
# @param replies_limit [Integer]
|
|
723
|
+
# @param user_id [String]
|
|
721
724
|
# @param limit [Integer]
|
|
722
725
|
# @param prev [String]
|
|
723
726
|
# @param _next [String]
|
|
724
727
|
# @return [Models::GetCommentRepliesResponse]
|
|
725
|
-
def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, limit = nil, prev = nil, _next = nil)
|
|
728
|
+
def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
|
|
726
729
|
path = '/api/v2/feeds/comments/{id}/replies'
|
|
727
730
|
# Replace path parameters
|
|
728
731
|
path = path.gsub('{id}', _id.to_s)
|
|
@@ -731,6 +734,7 @@ module GetStream
|
|
|
731
734
|
query_params['depth'] = depth unless depth.nil?
|
|
732
735
|
query_params['sort'] = sort unless sort.nil?
|
|
733
736
|
query_params['replies_limit'] = replies_limit unless replies_limit.nil?
|
|
737
|
+
query_params['user_id'] = user_id unless user_id.nil?
|
|
734
738
|
query_params['limit'] = limit unless limit.nil?
|
|
735
739
|
query_params['prev'] = prev unless prev.nil?
|
|
736
740
|
query_params['next'] = _next unless _next.nil?
|
|
@@ -13,8 +13,11 @@ module GetStream
|
|
|
13
13
|
# @return [String] Type of activity
|
|
14
14
|
attr_accessor :type
|
|
15
15
|
# @!attribute feeds
|
|
16
|
-
# @return [Array<String>] List of
|
|
16
|
+
# @return [Array<String>] List of feeds to add the activity to with a default max limit of 25 feeds
|
|
17
17
|
attr_accessor :feeds
|
|
18
|
+
# @!attribute create_notification_activity
|
|
19
|
+
# @return [Boolean] Whether to create notification activities for mentioned users
|
|
20
|
+
attr_accessor :create_notification_activity
|
|
18
21
|
# @!attribute expires_at
|
|
19
22
|
# @return [String] Expiration time for the activity
|
|
20
23
|
attr_accessor :expires_at
|
|
@@ -33,6 +36,9 @@ module GetStream
|
|
|
33
36
|
# @!attribute skip_enrich_url
|
|
34
37
|
# @return [Boolean] Whether to skip URL enrichment for the activity
|
|
35
38
|
attr_accessor :skip_enrich_url
|
|
39
|
+
# @!attribute skip_push
|
|
40
|
+
# @return [Boolean] Whether to skip push notifications
|
|
41
|
+
attr_accessor :skip_push
|
|
36
42
|
# @!attribute text
|
|
37
43
|
# @return [String] Text content of the activity
|
|
38
44
|
attr_accessor :text
|
|
@@ -75,12 +81,14 @@ module GetStream
|
|
|
75
81
|
super(attributes)
|
|
76
82
|
@type = attributes[:type] || attributes['type']
|
|
77
83
|
@feeds = attributes[:feeds] || attributes['feeds']
|
|
84
|
+
@create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil
|
|
78
85
|
@expires_at = attributes[:expires_at] || attributes['expires_at'] || nil
|
|
79
86
|
@id = attributes[:id] || attributes['id'] || nil
|
|
80
87
|
@parent_id = attributes[:parent_id] || attributes['parent_id'] || nil
|
|
81
88
|
@poll_id = attributes[:poll_id] || attributes['poll_id'] || nil
|
|
82
89
|
@restrict_replies = attributes[:restrict_replies] || attributes['restrict_replies'] || nil
|
|
83
90
|
@skip_enrich_url = attributes[:skip_enrich_url] || attributes['skip_enrich_url'] || nil
|
|
91
|
+
@skip_push = attributes[:skip_push] || attributes['skip_push'] || nil
|
|
84
92
|
@text = attributes[:text] || attributes['text'] || nil
|
|
85
93
|
@user_id = attributes[:user_id] || attributes['user_id'] || nil
|
|
86
94
|
@visibility = attributes[:visibility] || attributes['visibility'] || nil
|
|
@@ -100,12 +108,14 @@ module GetStream
|
|
|
100
108
|
{
|
|
101
109
|
type: 'type',
|
|
102
110
|
feeds: 'feeds',
|
|
111
|
+
create_notification_activity: 'create_notification_activity',
|
|
103
112
|
expires_at: 'expires_at',
|
|
104
113
|
id: 'id',
|
|
105
114
|
parent_id: 'parent_id',
|
|
106
115
|
poll_id: 'poll_id',
|
|
107
116
|
restrict_replies: 'restrict_replies',
|
|
108
117
|
skip_enrich_url: 'skip_enrich_url',
|
|
118
|
+
skip_push: 'skip_push',
|
|
109
119
|
text: 'text',
|
|
110
120
|
user_id: 'user_id',
|
|
111
121
|
visibility: 'visibility',
|
|
@@ -108,6 +108,9 @@ module GetStream
|
|
|
108
108
|
# @!attribute moderation_action
|
|
109
109
|
# @return [String]
|
|
110
110
|
attr_accessor :moderation_action
|
|
111
|
+
# @!attribute selector_source
|
|
112
|
+
# @return [String] Which activity selector provided this activity (e.g., 'following', 'popular', 'interest'). Only set when using multiple activity selectors with ranking.
|
|
113
|
+
attr_accessor :selector_source
|
|
111
114
|
# @!attribute text
|
|
112
115
|
# @return [String] Text content of the activity
|
|
113
116
|
attr_accessor :text
|
|
@@ -169,6 +172,7 @@ module GetStream
|
|
|
169
172
|
@expires_at = attributes[:expires_at] || attributes['expires_at'] || nil
|
|
170
173
|
@is_watched = attributes[:is_watched] || attributes['is_watched'] || nil
|
|
171
174
|
@moderation_action = attributes[:moderation_action] || attributes['moderation_action'] || nil
|
|
175
|
+
@selector_source = attributes[:selector_source] || attributes['selector_source'] || nil
|
|
172
176
|
@text = attributes[:text] || attributes['text'] || nil
|
|
173
177
|
@visibility_tag = attributes[:visibility_tag] || attributes['visibility_tag'] || nil
|
|
174
178
|
@current_feed = attributes[:current_feed] || attributes['current_feed'] || nil
|
|
@@ -215,6 +219,7 @@ module GetStream
|
|
|
215
219
|
expires_at: 'expires_at',
|
|
216
220
|
is_watched: 'is_watched',
|
|
217
221
|
moderation_action: 'moderation_action',
|
|
222
|
+
selector_source: 'selector_source',
|
|
218
223
|
text: 'text',
|
|
219
224
|
visibility_tag: 'visibility_tag',
|
|
220
225
|
current_feed: 'current_feed',
|
|
@@ -13,8 +13,11 @@ module GetStream
|
|
|
13
13
|
# @return [String] Type of activity
|
|
14
14
|
attr_accessor :type
|
|
15
15
|
# @!attribute feeds
|
|
16
|
-
# @return [Array<String>] List of
|
|
16
|
+
# @return [Array<String>] List of feeds to add the activity to with a default max limit of 25 feeds
|
|
17
17
|
attr_accessor :feeds
|
|
18
|
+
# @!attribute create_notification_activity
|
|
19
|
+
# @return [Boolean] Whether to create notification activities for mentioned users
|
|
20
|
+
attr_accessor :create_notification_activity
|
|
18
21
|
# @!attribute expires_at
|
|
19
22
|
# @return [String] Expiration time for the activity
|
|
20
23
|
attr_accessor :expires_at
|
|
@@ -33,6 +36,9 @@ module GetStream
|
|
|
33
36
|
# @!attribute skip_enrich_url
|
|
34
37
|
# @return [Boolean] Whether to skip URL enrichment for the activity
|
|
35
38
|
attr_accessor :skip_enrich_url
|
|
39
|
+
# @!attribute skip_push
|
|
40
|
+
# @return [Boolean] Whether to skip push notifications
|
|
41
|
+
attr_accessor :skip_push
|
|
36
42
|
# @!attribute text
|
|
37
43
|
# @return [String] Text content of the activity
|
|
38
44
|
attr_accessor :text
|
|
@@ -75,12 +81,14 @@ module GetStream
|
|
|
75
81
|
super(attributes)
|
|
76
82
|
@type = attributes[:type] || attributes['type']
|
|
77
83
|
@feeds = attributes[:feeds] || attributes['feeds']
|
|
84
|
+
@create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil
|
|
78
85
|
@expires_at = attributes[:expires_at] || attributes['expires_at'] || nil
|
|
79
86
|
@id = attributes[:id] || attributes['id'] || nil
|
|
80
87
|
@parent_id = attributes[:parent_id] || attributes['parent_id'] || nil
|
|
81
88
|
@poll_id = attributes[:poll_id] || attributes['poll_id'] || nil
|
|
82
89
|
@restrict_replies = attributes[:restrict_replies] || attributes['restrict_replies'] || nil
|
|
83
90
|
@skip_enrich_url = attributes[:skip_enrich_url] || attributes['skip_enrich_url'] || nil
|
|
91
|
+
@skip_push = attributes[:skip_push] || attributes['skip_push'] || nil
|
|
84
92
|
@text = attributes[:text] || attributes['text'] || nil
|
|
85
93
|
@user_id = attributes[:user_id] || attributes['user_id'] || nil
|
|
86
94
|
@visibility = attributes[:visibility] || attributes['visibility'] || nil
|
|
@@ -100,12 +108,14 @@ module GetStream
|
|
|
100
108
|
{
|
|
101
109
|
type: 'type',
|
|
102
110
|
feeds: 'feeds',
|
|
111
|
+
create_notification_activity: 'create_notification_activity',
|
|
103
112
|
expires_at: 'expires_at',
|
|
104
113
|
id: 'id',
|
|
105
114
|
parent_id: 'parent_id',
|
|
106
115
|
poll_id: 'poll_id',
|
|
107
116
|
restrict_replies: 'restrict_replies',
|
|
108
117
|
skip_enrich_url: 'skip_enrich_url',
|
|
118
|
+
skip_push: 'skip_push',
|
|
109
119
|
text: 'text',
|
|
110
120
|
user_id: 'user_id',
|
|
111
121
|
visibility: 'visibility',
|
|
@@ -15,19 +15,24 @@ module GetStream
|
|
|
15
15
|
# @!attribute activity
|
|
16
16
|
# @return [ActivityResponse]
|
|
17
17
|
attr_accessor :activity
|
|
18
|
+
# @!attribute mention_notifications_created
|
|
19
|
+
# @return [Integer] Number of mention notification activities created for mentioned users
|
|
20
|
+
attr_accessor :mention_notifications_created
|
|
18
21
|
|
|
19
22
|
# Initialize with attributes
|
|
20
23
|
def initialize(attributes = {})
|
|
21
24
|
super(attributes)
|
|
22
25
|
@duration = attributes[:duration] || attributes['duration']
|
|
23
26
|
@activity = attributes[:activity] || attributes['activity']
|
|
27
|
+
@mention_notifications_created = attributes[:mention_notifications_created] || attributes['mention_notifications_created'] || 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
|
duration: 'duration',
|
|
30
|
-
activity: 'activity'
|
|
34
|
+
activity: 'activity',
|
|
35
|
+
mention_notifications_created: 'mention_notifications_created'
|
|
31
36
|
}
|
|
32
37
|
end
|
|
33
38
|
end
|
|
@@ -18,6 +18,9 @@ module GetStream
|
|
|
18
18
|
# @!attribute reaction
|
|
19
19
|
# @return [FeedsReactionResponse]
|
|
20
20
|
attr_accessor :reaction
|
|
21
|
+
# @!attribute notification_created
|
|
22
|
+
# @return [Boolean] Whether a notification activity was successfully created
|
|
23
|
+
attr_accessor :notification_created
|
|
21
24
|
|
|
22
25
|
# Initialize with attributes
|
|
23
26
|
def initialize(attributes = {})
|
|
@@ -25,6 +28,7 @@ module GetStream
|
|
|
25
28
|
@duration = attributes[:duration] || attributes['duration']
|
|
26
29
|
@comment = attributes[:comment] || attributes['comment']
|
|
27
30
|
@reaction = attributes[:reaction] || attributes['reaction']
|
|
31
|
+
@notification_created = attributes[:notification_created] || attributes['notification_created'] || nil
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
# Override field mappings for JSON serialization
|
|
@@ -32,7 +36,8 @@ module GetStream
|
|
|
32
36
|
{
|
|
33
37
|
duration: 'duration',
|
|
34
38
|
comment: 'comment',
|
|
35
|
-
reaction: 'reaction'
|
|
39
|
+
reaction: 'reaction',
|
|
40
|
+
notification_created: 'notification_created'
|
|
36
41
|
}
|
|
37
42
|
end
|
|
38
43
|
end
|
|
@@ -15,19 +15,29 @@ module GetStream
|
|
|
15
15
|
# @!attribute comment
|
|
16
16
|
# @return [CommentResponse]
|
|
17
17
|
attr_accessor :comment
|
|
18
|
+
# @!attribute mention_notifications_created
|
|
19
|
+
# @return [Integer] Number of mention notification activities created for mentioned users
|
|
20
|
+
attr_accessor :mention_notifications_created
|
|
21
|
+
# @!attribute notification_created
|
|
22
|
+
# @return [Boolean] Whether a notification activity was successfully created
|
|
23
|
+
attr_accessor :notification_created
|
|
18
24
|
|
|
19
25
|
# Initialize with attributes
|
|
20
26
|
def initialize(attributes = {})
|
|
21
27
|
super(attributes)
|
|
22
28
|
@duration = attributes[:duration] || attributes['duration']
|
|
23
29
|
@comment = attributes[:comment] || attributes['comment']
|
|
30
|
+
@mention_notifications_created = attributes[:mention_notifications_created] || attributes['mention_notifications_created'] || nil
|
|
31
|
+
@notification_created = attributes[:notification_created] || attributes['notification_created'] || nil
|
|
24
32
|
end
|
|
25
33
|
|
|
26
34
|
# Override field mappings for JSON serialization
|
|
27
35
|
def self.json_field_mappings
|
|
28
36
|
{
|
|
29
37
|
duration: 'duration',
|
|
30
|
-
comment: 'comment'
|
|
38
|
+
comment: 'comment',
|
|
39
|
+
mention_notifications_created: 'mention_notifications_created',
|
|
40
|
+
notification_created: 'notification_created'
|
|
31
41
|
}
|
|
32
42
|
end
|
|
33
43
|
end
|
|
@@ -18,6 +18,9 @@ module GetStream
|
|
|
18
18
|
# @!attribute reaction
|
|
19
19
|
# @return [FeedsReactionResponse]
|
|
20
20
|
attr_accessor :reaction
|
|
21
|
+
# @!attribute notification_created
|
|
22
|
+
# @return [Boolean] Whether a notification activity was successfully created
|
|
23
|
+
attr_accessor :notification_created
|
|
21
24
|
|
|
22
25
|
# Initialize with attributes
|
|
23
26
|
def initialize(attributes = {})
|
|
@@ -25,6 +28,7 @@ module GetStream
|
|
|
25
28
|
@duration = attributes[:duration] || attributes['duration']
|
|
26
29
|
@activity = attributes[:activity] || attributes['activity']
|
|
27
30
|
@reaction = attributes[:reaction] || attributes['reaction']
|
|
31
|
+
@notification_created = attributes[:notification_created] || attributes['notification_created'] || nil
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
# Override field mappings for JSON serialization
|
|
@@ -32,7 +36,8 @@ module GetStream
|
|
|
32
36
|
{
|
|
33
37
|
duration: 'duration',
|
|
34
38
|
activity: 'activity',
|
|
35
|
-
reaction: 'reaction'
|
|
39
|
+
reaction: 'reaction',
|
|
40
|
+
notification_created: 'notification_created'
|
|
36
41
|
}
|
|
37
42
|
end
|
|
38
43
|
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
|
+
# This event is sent when an appeal is accepted
|
|
9
|
+
class AppealAcceptedEvent < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute created_at
|
|
13
|
+
# @return [DateTime]
|
|
14
|
+
attr_accessor :created_at
|
|
15
|
+
# @!attribute custom
|
|
16
|
+
# @return [Object]
|
|
17
|
+
attr_accessor :custom
|
|
18
|
+
# @!attribute type
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :type
|
|
21
|
+
# @!attribute received_at
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :received_at
|
|
24
|
+
# @!attribute appeal
|
|
25
|
+
# @return [AppealItemResponse]
|
|
26
|
+
attr_accessor :appeal
|
|
27
|
+
|
|
28
|
+
# Initialize with attributes
|
|
29
|
+
def initialize(attributes = {})
|
|
30
|
+
super(attributes)
|
|
31
|
+
@created_at = attributes[:created_at] || attributes['created_at']
|
|
32
|
+
@custom = attributes[:custom] || attributes['custom']
|
|
33
|
+
@type = attributes[:type] || attributes['type'] || "appeal.accepted"
|
|
34
|
+
@received_at = attributes[:received_at] || attributes['received_at'] || nil
|
|
35
|
+
@appeal = attributes[:appeal] || attributes['appeal'] || nil
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Override field mappings for JSON serialization
|
|
39
|
+
def self.json_field_mappings
|
|
40
|
+
{
|
|
41
|
+
created_at: 'created_at',
|
|
42
|
+
custom: 'custom',
|
|
43
|
+
type: 'type',
|
|
44
|
+
received_at: 'received_at',
|
|
45
|
+
appeal: 'appeal'
|
|
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
|
+
# This event is sent when an appeal is created
|
|
9
|
+
class AppealCreatedEvent < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute created_at
|
|
13
|
+
# @return [DateTime]
|
|
14
|
+
attr_accessor :created_at
|
|
15
|
+
# @!attribute custom
|
|
16
|
+
# @return [Object]
|
|
17
|
+
attr_accessor :custom
|
|
18
|
+
# @!attribute type
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :type
|
|
21
|
+
# @!attribute received_at
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :received_at
|
|
24
|
+
# @!attribute appeal
|
|
25
|
+
# @return [AppealItemResponse]
|
|
26
|
+
attr_accessor :appeal
|
|
27
|
+
|
|
28
|
+
# Initialize with attributes
|
|
29
|
+
def initialize(attributes = {})
|
|
30
|
+
super(attributes)
|
|
31
|
+
@created_at = attributes[:created_at] || attributes['created_at']
|
|
32
|
+
@custom = attributes[:custom] || attributes['custom']
|
|
33
|
+
@type = attributes[:type] || attributes['type'] || "appeal.created"
|
|
34
|
+
@received_at = attributes[:received_at] || attributes['received_at'] || nil
|
|
35
|
+
@appeal = attributes[:appeal] || attributes['appeal'] || nil
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Override field mappings for JSON serialization
|
|
39
|
+
def self.json_field_mappings
|
|
40
|
+
{
|
|
41
|
+
created_at: 'created_at',
|
|
42
|
+
custom: 'custom',
|
|
43
|
+
type: 'type',
|
|
44
|
+
received_at: 'received_at',
|
|
45
|
+
appeal: 'appeal'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
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 AppealItemResponse < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute appeal_reason
|
|
13
|
+
# @return [String] Reason Text of the Appeal Item
|
|
14
|
+
attr_accessor :appeal_reason
|
|
15
|
+
# @!attribute created_at
|
|
16
|
+
# @return [DateTime] When the flag was created
|
|
17
|
+
attr_accessor :created_at
|
|
18
|
+
# @!attribute entity_id
|
|
19
|
+
# @return [String] ID of the entity
|
|
20
|
+
attr_accessor :entity_id
|
|
21
|
+
# @!attribute entity_type
|
|
22
|
+
# @return [String] Type of entity
|
|
23
|
+
attr_accessor :entity_type
|
|
24
|
+
# @!attribute id
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :id
|
|
27
|
+
# @!attribute status
|
|
28
|
+
# @return [String] Status of the Appeal Item
|
|
29
|
+
attr_accessor :status
|
|
30
|
+
# @!attribute updated_at
|
|
31
|
+
# @return [DateTime] When the flag was last updated
|
|
32
|
+
attr_accessor :updated_at
|
|
33
|
+
# @!attribute decision_reason
|
|
34
|
+
# @return [String] Decision Reason of the Appeal Item
|
|
35
|
+
attr_accessor :decision_reason
|
|
36
|
+
# @!attribute attachments
|
|
37
|
+
# @return [Array<String>] Attachments(e.g. Images) of the Appeal Item
|
|
38
|
+
attr_accessor :attachments
|
|
39
|
+
# @!attribute entity_content
|
|
40
|
+
# @return [ModerationPayload]
|
|
41
|
+
attr_accessor :entity_content
|
|
42
|
+
# @!attribute user
|
|
43
|
+
# @return [UserResponse]
|
|
44
|
+
attr_accessor :user
|
|
45
|
+
|
|
46
|
+
# Initialize with attributes
|
|
47
|
+
def initialize(attributes = {})
|
|
48
|
+
super(attributes)
|
|
49
|
+
@appeal_reason = attributes[:appeal_reason] || attributes['appeal_reason']
|
|
50
|
+
@created_at = attributes[:created_at] || attributes['created_at']
|
|
51
|
+
@entity_id = attributes[:entity_id] || attributes['entity_id']
|
|
52
|
+
@entity_type = attributes[:entity_type] || attributes['entity_type']
|
|
53
|
+
@id = attributes[:id] || attributes['id']
|
|
54
|
+
@status = attributes[:status] || attributes['status']
|
|
55
|
+
@updated_at = attributes[:updated_at] || attributes['updated_at']
|
|
56
|
+
@decision_reason = attributes[:decision_reason] || attributes['decision_reason'] || nil
|
|
57
|
+
@attachments = attributes[:attachments] || attributes['attachments'] || nil
|
|
58
|
+
@entity_content = attributes[:entity_content] || attributes['entity_content'] || nil
|
|
59
|
+
@user = attributes[:user] || attributes['user'] || nil
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Override field mappings for JSON serialization
|
|
63
|
+
def self.json_field_mappings
|
|
64
|
+
{
|
|
65
|
+
appeal_reason: 'appeal_reason',
|
|
66
|
+
created_at: 'created_at',
|
|
67
|
+
entity_id: 'entity_id',
|
|
68
|
+
entity_type: 'entity_type',
|
|
69
|
+
id: 'id',
|
|
70
|
+
status: 'status',
|
|
71
|
+
updated_at: 'updated_at',
|
|
72
|
+
decision_reason: 'decision_reason',
|
|
73
|
+
attachments: 'attachments',
|
|
74
|
+
entity_content: 'entity_content',
|
|
75
|
+
user: 'user'
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|