getstream-ruby 8.0.2 → 9.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.
- checksums.yaml +4 -4
- data/lib/getstream_ruby/generated/chat_client.rb +29 -0
- data/lib/getstream_ruby/generated/feed.rb +16 -4
- data/lib/getstream_ruby/generated/feeds_client.rb +160 -10
- data/lib/getstream_ruby/generated/models/activity_response.rb +10 -0
- data/lib/getstream_ruby/generated/models/add_comment_reaction_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/add_comment_reaction_response.rb +18 -2
- data/lib/getstream_ruby/generated/models/add_reaction_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/add_reaction_response.rb +18 -2
- data/lib/getstream_ruby/generated/models/ai_audio_config_request.rb +36 -0
- data/lib/getstream_ruby/generated/models/ai_audio_config_response.rb +41 -0
- data/lib/getstream_ruby/generated/models/async_export_error_event.rb +1 -1
- data/lib/getstream_ruby/generated/models/async_export_review_queue_event.rb +66 -0
- data/lib/getstream_ruby/generated/models/batch_query_activity_reactions_request.rb +66 -0
- data/lib/getstream_ruby/generated/models/batch_query_activity_reactions_response.rb +46 -0
- data/lib/getstream_ruby/generated/models/batch_query_comment_reactions_request.rb +66 -0
- data/lib/getstream_ruby/generated/models/batch_query_comment_reactions_response.rb +46 -0
- data/lib/getstream_ruby/generated/models/check_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/closed_caption_rule_parameters.rb +5 -0
- data/lib/getstream_ruby/generated/models/comment_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/config_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/create_queue_request.rb +61 -0
- data/lib/getstream_ruby/generated/models/delete_queue_request.rb +36 -0
- data/lib/getstream_ruby/generated/models/feeds_share_response.rb +41 -0
- data/lib/getstream_ruby/generated/models/feeds_v3_activity_response.rb +10 -0
- data/lib/getstream_ruby/generated/models/feeds_v3_comment_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/filter_config_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/list_queues_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/moderation_call_response.rb +126 -0
- data/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb +10 -10
- data/lib/getstream_ruby/generated/models/moderation_payload.rb +26 -1
- data/lib/getstream_ruby/generated/models/moderation_payload_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/moderation_payload_response.rb +26 -1
- data/lib/getstream_ruby/generated/models/moderation_queue_response.rb +76 -0
- data/lib/getstream_ruby/generated/models/ocr_content_parameters.rb +41 -0
- data/lib/getstream_ruby/generated/models/permission.rb +5 -0
- data/lib/getstream_ruby/generated/models/query_activity_shares_response.rb +46 -0
- data/lib/getstream_ruby/generated/models/query_moderation_rules_response.rb +1 -1
- data/lib/getstream_ruby/generated/models/queue_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/review_queue_item_response.rb +1 -1
- data/lib/getstream_ruby/generated/models/rule_builder_condition.rb +5 -0
- data/lib/getstream_ruby/generated/models/share_response.rb +41 -0
- data/lib/getstream_ruby/generated/models/threaded_comment_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/translate_activity_request.rb +31 -0
- data/lib/getstream_ruby/generated/models/translate_activity_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/translate_comment_request.rb +31 -0
- data/lib/getstream_ruby/generated/models/translate_comment_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/triggered_rule_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/update_app_request.rb +10 -0
- data/lib/getstream_ruby/generated/models/update_queue_request.rb +56 -0
- data/lib/getstream_ruby/generated/models/upsert_config_request.rb +5 -0
- data/lib/getstream_ruby/generated/moderation_client.rb +91 -0
- data/lib/getstream_ruby/generated/webhook.rb +7 -0
- data/lib/getstream_ruby/version.rb +1 -1
- metadata +25 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 95df1de0290331e3d4c2040f9afbadb7f0ee6fa5cc931cbef126c2f244672632
|
|
4
|
+
data.tar.gz: 484cd5ddc8b072644bbc8f0808c87f4f3e933b936fb114fb49b23c3e32327329
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c577cceb9a470b2835b48eb1bb5554e3f955227d63b595786c1516f7e6ea0f56e1bc5d452486e3ff4e0b1b7bda34d49b6d5e7c5f14e746b8d972f899034a55c3
|
|
7
|
+
data.tar.gz: 0c616c6ad3ac9ebd6701f049e2d0432b0cb3309363fbd2dd5da8bfc75e787f0f0e44628363f1f9a40a97a97b07861af4e05c366d50f09f6783d06397d8695c54
|
|
@@ -297,6 +297,35 @@ module GetStream
|
|
|
297
297
|
)
|
|
298
298
|
end
|
|
299
299
|
|
|
300
|
+
# Returns a channel by its CID without creating it. Responds with 404 when the channel does not exist, so it doubles as an existence check. Pass state=true to also load messages, read state and watchers.
|
|
301
|
+
#
|
|
302
|
+
# @param _type [String]
|
|
303
|
+
# @param _id [String]
|
|
304
|
+
# @param state [Boolean]
|
|
305
|
+
# @param messages_limit [Integer]
|
|
306
|
+
# @param members_limit [Integer]
|
|
307
|
+
# @param watchers_limit [Integer]
|
|
308
|
+
# @return [Models::ChannelStateResponse]
|
|
309
|
+
def get_channel(_type, _id, state = nil, messages_limit = nil, members_limit = nil, watchers_limit = nil)
|
|
310
|
+
path = '/api/v2/chat/channels/{type}/{id}'
|
|
311
|
+
# Replace path parameters
|
|
312
|
+
path = path.gsub('{type}', _type.to_s)
|
|
313
|
+
path = path.gsub('{id}', _id.to_s)
|
|
314
|
+
# Build query parameters
|
|
315
|
+
query_params = {}
|
|
316
|
+
query_params['state'] = state unless state.nil?
|
|
317
|
+
query_params['messages_limit'] = messages_limit unless messages_limit.nil?
|
|
318
|
+
query_params['members_limit'] = members_limit unless members_limit.nil?
|
|
319
|
+
query_params['watchers_limit'] = watchers_limit unless watchers_limit.nil?
|
|
320
|
+
|
|
321
|
+
# Make the API request
|
|
322
|
+
@client.make_request(
|
|
323
|
+
:get,
|
|
324
|
+
path,
|
|
325
|
+
query_params: query_params
|
|
326
|
+
)
|
|
327
|
+
end
|
|
328
|
+
|
|
300
329
|
# Updates certain fields of the channelSends events:- channel.updated
|
|
301
330
|
#
|
|
302
331
|
# @param _type [String]
|
|
@@ -32,11 +32,17 @@ module GetStream
|
|
|
32
32
|
# Create a single feed for a given feed group
|
|
33
33
|
#
|
|
34
34
|
# @param get_or_create_feed_request [GetOrCreateFeedRequest]
|
|
35
|
+
# @param language [String]
|
|
36
|
+
# @param translate_text [Boolean]
|
|
35
37
|
# @return [Models::GetOrCreateFeedResponse]
|
|
36
|
-
def get_or_create_feed(get_or_create_feed_request)
|
|
38
|
+
def get_or_create_feed(get_or_create_feed_request, language = nil, translate_text = nil)
|
|
39
|
+
# Build query parameters
|
|
40
|
+
query_params = {}
|
|
41
|
+
query_params['language'] = language unless language.nil?
|
|
42
|
+
query_params['translate_text'] = translate_text unless translate_text.nil?
|
|
37
43
|
|
|
38
44
|
# Delegate to the FeedsClient
|
|
39
|
-
@client.feeds.get_or_create_feed(@feed_group_id, @feed_id, get_or_create_feed_request)
|
|
45
|
+
@client.feeds.get_or_create_feed(@feed_group_id, @feed_id, get_or_create_feed_request, query_params)
|
|
40
46
|
end
|
|
41
47
|
|
|
42
48
|
# Update an existing feed
|
|
@@ -139,11 +145,17 @@ module GetStream
|
|
|
139
145
|
# Query pinned activities for a feed with filter query
|
|
140
146
|
#
|
|
141
147
|
# @param query_pinned_activities_request [QueryPinnedActivitiesRequest]
|
|
148
|
+
# @param language [String]
|
|
149
|
+
# @param translate_text [Boolean]
|
|
142
150
|
# @return [Models::QueryPinnedActivitiesResponse]
|
|
143
|
-
def query_pinned_activities(query_pinned_activities_request)
|
|
151
|
+
def query_pinned_activities(query_pinned_activities_request, language = nil, translate_text = nil)
|
|
152
|
+
# Build query parameters
|
|
153
|
+
query_params = {}
|
|
154
|
+
query_params['language'] = language unless language.nil?
|
|
155
|
+
query_params['translate_text'] = translate_text unless translate_text.nil?
|
|
144
156
|
|
|
145
157
|
# Delegate to the FeedsClient
|
|
146
|
-
@client.feeds.query_pinned_activities(@feed_group_id, @feed_id, query_pinned_activities_request)
|
|
158
|
+
@client.feeds.query_pinned_activities(@feed_group_id, @feed_id, query_pinned_activities_request, query_params)
|
|
147
159
|
end
|
|
148
160
|
|
|
149
161
|
end
|
|
@@ -46,7 +46,7 @@ module GetStream
|
|
|
46
46
|
)
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
# Updates certain fields of multiple activities in a batch. Use 'set' to update specific fields and 'unset' to remove fields. Activities that fail due to not found, permission denied, or no changes detected are silently skipped and not included in the response. However, validation errors (e.g., updating reserved fields, invalid field values) will fail the entire batch request.Sends events:- feeds.activity.updated
|
|
49
|
+
# Updates certain fields of multiple activities in a batch. Use 'set' to update specific fields and 'unset' to remove fields. Activities that fail due to not found, permission denied, or no changes detected are silently skipped and not included in the response. However, validation errors (e.g., updating reserved fields, invalid field values, exceeding size limits) will fail the entire batch request.Sends events:- feeds.activity.updated
|
|
50
50
|
#
|
|
51
51
|
# @param update_activities_partial_batch_request [UpdateActivitiesPartialBatchRequest]
|
|
52
52
|
# @return [Models::UpdateActivitiesPartialBatchResponse]
|
|
@@ -100,12 +100,36 @@ module GetStream
|
|
|
100
100
|
# Query activities based on filters with pagination and sorting options
|
|
101
101
|
#
|
|
102
102
|
# @param query_activities_request [QueryActivitiesRequest]
|
|
103
|
+
# @param language [String]
|
|
104
|
+
# @param translate_text [Boolean]
|
|
103
105
|
# @return [Models::QueryActivitiesResponse]
|
|
104
|
-
def query_activities(query_activities_request)
|
|
106
|
+
def query_activities(query_activities_request, language = nil, translate_text = nil)
|
|
105
107
|
path = '/api/v2/feeds/activities/query'
|
|
108
|
+
# Build query parameters
|
|
109
|
+
query_params = {}
|
|
110
|
+
query_params['language'] = language unless language.nil?
|
|
111
|
+
query_params['translate_text'] = translate_text unless translate_text.nil?
|
|
106
112
|
# Build request body
|
|
107
113
|
body = query_activities_request
|
|
108
114
|
|
|
115
|
+
# Make the API request
|
|
116
|
+
@client.make_request(
|
|
117
|
+
:post,
|
|
118
|
+
path,
|
|
119
|
+
query_params: query_params,
|
|
120
|
+
body: body
|
|
121
|
+
)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Returns a single user's reactions across a set of activity IDs, without activity payloads
|
|
125
|
+
#
|
|
126
|
+
# @param batch_query_activity_reactions_request [BatchQueryActivityReactionsRequest]
|
|
127
|
+
# @return [Models::BatchQueryActivityReactionsResponse]
|
|
128
|
+
def batch_query_activity_reactions(batch_query_activity_reactions_request)
|
|
129
|
+
path = '/api/v2/feeds/activities/reactions/query'
|
|
130
|
+
# Build request body
|
|
131
|
+
body = batch_query_activity_reactions_request
|
|
132
|
+
|
|
109
133
|
# Make the API request
|
|
110
134
|
@client.make_request(
|
|
111
135
|
:post,
|
|
@@ -309,6 +333,31 @@ module GetStream
|
|
|
309
333
|
)
|
|
310
334
|
end
|
|
311
335
|
|
|
336
|
+
# List the shares recorded for an activity, newest-first
|
|
337
|
+
#
|
|
338
|
+
# @param activity_id [String]
|
|
339
|
+
# @param limit [Integer]
|
|
340
|
+
# @param prev [String]
|
|
341
|
+
# @param _next [String]
|
|
342
|
+
# @return [Models::QueryActivitySharesResponse]
|
|
343
|
+
def query_activity_shares(activity_id, limit = nil, prev = nil, _next = nil)
|
|
344
|
+
path = '/api/v2/feeds/activities/{activity_id}/shares'
|
|
345
|
+
# Replace path parameters
|
|
346
|
+
path = path.gsub('{activity_id}', activity_id.to_s)
|
|
347
|
+
# Build query parameters
|
|
348
|
+
query_params = {}
|
|
349
|
+
query_params['limit'] = limit unless limit.nil?
|
|
350
|
+
query_params['prev'] = prev unless prev.nil?
|
|
351
|
+
query_params['next'] = _next unless _next.nil?
|
|
352
|
+
|
|
353
|
+
# Make the API request
|
|
354
|
+
@client.make_request(
|
|
355
|
+
:get,
|
|
356
|
+
path,
|
|
357
|
+
query_params: query_params
|
|
358
|
+
)
|
|
359
|
+
end
|
|
360
|
+
|
|
312
361
|
# Delete a single activity by its ID
|
|
313
362
|
#
|
|
314
363
|
# @param _id [String]
|
|
@@ -335,16 +384,20 @@ module GetStream
|
|
|
335
384
|
# Returns activity by ID
|
|
336
385
|
#
|
|
337
386
|
# @param _id [String]
|
|
387
|
+
# @param language [String]
|
|
388
|
+
# @param translate_text [Boolean]
|
|
338
389
|
# @param comment_sort [String]
|
|
339
390
|
# @param comment_limit [Integer]
|
|
340
391
|
# @param user_id [String]
|
|
341
392
|
# @return [Models::GetActivityResponse]
|
|
342
|
-
def get_activity(_id, comment_sort = nil, comment_limit = nil, user_id = nil)
|
|
393
|
+
def get_activity(_id, language = nil, translate_text = nil, comment_sort = nil, comment_limit = nil, user_id = nil)
|
|
343
394
|
path = '/api/v2/feeds/activities/{id}'
|
|
344
395
|
# Replace path parameters
|
|
345
396
|
path = path.gsub('{id}', _id.to_s)
|
|
346
397
|
# Build query parameters
|
|
347
398
|
query_params = {}
|
|
399
|
+
query_params['language'] = language unless language.nil?
|
|
400
|
+
query_params['translate_text'] = translate_text unless translate_text.nil?
|
|
348
401
|
query_params['comment_sort'] = comment_sort unless comment_sort.nil?
|
|
349
402
|
query_params['comment_limit'] = comment_limit unless comment_limit.nil?
|
|
350
403
|
query_params['user_id'] = user_id unless user_id.nil?
|
|
@@ -422,6 +475,26 @@ module GetStream
|
|
|
422
475
|
)
|
|
423
476
|
end
|
|
424
477
|
|
|
478
|
+
# Translates an activity's text to a given language using automated translationSends events:- feeds.activity.updated
|
|
479
|
+
#
|
|
480
|
+
# @param _id [String]
|
|
481
|
+
# @param translate_activity_request [TranslateActivityRequest]
|
|
482
|
+
# @return [Models::TranslateActivityResponse]
|
|
483
|
+
def translate_activity(_id, translate_activity_request)
|
|
484
|
+
path = '/api/v2/feeds/activities/{id}/translate'
|
|
485
|
+
# Replace path parameters
|
|
486
|
+
path = path.gsub('{id}', _id.to_s)
|
|
487
|
+
# Build request body
|
|
488
|
+
body = translate_activity_request
|
|
489
|
+
|
|
490
|
+
# Make the API request
|
|
491
|
+
@client.make_request(
|
|
492
|
+
:post,
|
|
493
|
+
path,
|
|
494
|
+
body: body
|
|
495
|
+
)
|
|
496
|
+
end
|
|
497
|
+
|
|
425
498
|
# Query bookmark folders with filter query
|
|
426
499
|
#
|
|
427
500
|
# @param query_bookmark_folders_request [QueryBookmarkFoldersRequest]
|
|
@@ -478,9 +551,15 @@ module GetStream
|
|
|
478
551
|
# Query bookmarks with filter query
|
|
479
552
|
#
|
|
480
553
|
# @param query_bookmarks_request [QueryBookmarksRequest]
|
|
554
|
+
# @param language [String]
|
|
555
|
+
# @param translate_text [Boolean]
|
|
481
556
|
# @return [Models::QueryBookmarksResponse]
|
|
482
|
-
def query_bookmarks(query_bookmarks_request)
|
|
557
|
+
def query_bookmarks(query_bookmarks_request, language = nil, translate_text = nil)
|
|
483
558
|
path = '/api/v2/feeds/bookmarks/query'
|
|
559
|
+
# Build query parameters
|
|
560
|
+
query_params = {}
|
|
561
|
+
query_params['language'] = language unless language.nil?
|
|
562
|
+
query_params['translate_text'] = translate_text unless translate_text.nil?
|
|
484
563
|
# Build request body
|
|
485
564
|
body = query_bookmarks_request
|
|
486
565
|
|
|
@@ -488,6 +567,7 @@ module GetStream
|
|
|
488
567
|
@client.make_request(
|
|
489
568
|
:post,
|
|
490
569
|
path,
|
|
570
|
+
query_params: query_params,
|
|
491
571
|
body: body
|
|
492
572
|
)
|
|
493
573
|
end
|
|
@@ -606,12 +686,14 @@ module GetStream
|
|
|
606
686
|
# @param sort [String]
|
|
607
687
|
# @param replies_limit [Integer]
|
|
608
688
|
# @param id_around [String]
|
|
689
|
+
# @param language [String]
|
|
690
|
+
# @param translate_text [Boolean]
|
|
609
691
|
# @param user_id [String]
|
|
610
692
|
# @param limit [Integer]
|
|
611
693
|
# @param prev [String]
|
|
612
694
|
# @param _next [String]
|
|
613
695
|
# @return [Models::GetCommentsResponse]
|
|
614
|
-
def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, id_around = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
|
|
696
|
+
def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, id_around = nil, language = nil, translate_text = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
|
|
615
697
|
path = '/api/v2/feeds/comments'
|
|
616
698
|
# Build query parameters
|
|
617
699
|
query_params = {}
|
|
@@ -621,6 +703,8 @@ module GetStream
|
|
|
621
703
|
query_params['sort'] = sort unless sort.nil?
|
|
622
704
|
query_params['replies_limit'] = replies_limit unless replies_limit.nil?
|
|
623
705
|
query_params['id_around'] = id_around unless id_around.nil?
|
|
706
|
+
query_params['language'] = language unless language.nil?
|
|
707
|
+
query_params['translate_text'] = translate_text unless translate_text.nil?
|
|
624
708
|
query_params['user_id'] = user_id unless user_id.nil?
|
|
625
709
|
query_params['limit'] = limit unless limit.nil?
|
|
626
710
|
query_params['prev'] = prev unless prev.nil?
|
|
@@ -671,12 +755,36 @@ module GetStream
|
|
|
671
755
|
# Query comments using MongoDB-style filters with pagination and sorting options
|
|
672
756
|
#
|
|
673
757
|
# @param query_comments_request [QueryCommentsRequest]
|
|
758
|
+
# @param language [String]
|
|
759
|
+
# @param translate_text [Boolean]
|
|
674
760
|
# @return [Models::QueryCommentsResponse]
|
|
675
|
-
def query_comments(query_comments_request)
|
|
761
|
+
def query_comments(query_comments_request, language = nil, translate_text = nil)
|
|
676
762
|
path = '/api/v2/feeds/comments/query'
|
|
763
|
+
# Build query parameters
|
|
764
|
+
query_params = {}
|
|
765
|
+
query_params['language'] = language unless language.nil?
|
|
766
|
+
query_params['translate_text'] = translate_text unless translate_text.nil?
|
|
677
767
|
# Build request body
|
|
678
768
|
body = query_comments_request
|
|
679
769
|
|
|
770
|
+
# Make the API request
|
|
771
|
+
@client.make_request(
|
|
772
|
+
:post,
|
|
773
|
+
path,
|
|
774
|
+
query_params: query_params,
|
|
775
|
+
body: body
|
|
776
|
+
)
|
|
777
|
+
end
|
|
778
|
+
|
|
779
|
+
# Returns a single user's reactions across a set of comment IDs, without comment payloads
|
|
780
|
+
#
|
|
781
|
+
# @param batch_query_comment_reactions_request [BatchQueryCommentReactionsRequest]
|
|
782
|
+
# @return [Models::BatchQueryCommentReactionsResponse]
|
|
783
|
+
def batch_query_comment_reactions(batch_query_comment_reactions_request)
|
|
784
|
+
path = '/api/v2/feeds/comments/reactions/query'
|
|
785
|
+
# Build request body
|
|
786
|
+
body = batch_query_comment_reactions_request
|
|
787
|
+
|
|
680
788
|
# Make the API request
|
|
681
789
|
@client.make_request(
|
|
682
790
|
:post,
|
|
@@ -774,14 +882,18 @@ module GetStream
|
|
|
774
882
|
# Get a comment by ID
|
|
775
883
|
#
|
|
776
884
|
# @param _id [String]
|
|
885
|
+
# @param language [String]
|
|
886
|
+
# @param translate_text [Boolean]
|
|
777
887
|
# @param user_id [String]
|
|
778
888
|
# @return [Models::GetCommentResponse]
|
|
779
|
-
def get_comment(_id, user_id = nil)
|
|
889
|
+
def get_comment(_id, language = nil, translate_text = nil, user_id = nil)
|
|
780
890
|
path = '/api/v2/feeds/comments/{id}'
|
|
781
891
|
# Replace path parameters
|
|
782
892
|
path = path.gsub('{id}', _id.to_s)
|
|
783
893
|
# Build query parameters
|
|
784
894
|
query_params = {}
|
|
895
|
+
query_params['language'] = language unless language.nil?
|
|
896
|
+
query_params['translate_text'] = translate_text unless translate_text.nil?
|
|
785
897
|
query_params['user_id'] = user_id unless user_id.nil?
|
|
786
898
|
|
|
787
899
|
# Make the API request
|
|
@@ -904,12 +1016,14 @@ module GetStream
|
|
|
904
1016
|
# @param sort [String]
|
|
905
1017
|
# @param replies_limit [Integer]
|
|
906
1018
|
# @param id_around [String]
|
|
1019
|
+
# @param language [String]
|
|
1020
|
+
# @param translate_text [Boolean]
|
|
907
1021
|
# @param user_id [String]
|
|
908
1022
|
# @param limit [Integer]
|
|
909
1023
|
# @param prev [String]
|
|
910
1024
|
# @param _next [String]
|
|
911
1025
|
# @return [Models::GetCommentRepliesResponse]
|
|
912
|
-
def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, id_around = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
|
|
1026
|
+
def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, id_around = nil, language = nil, translate_text = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
|
|
913
1027
|
path = '/api/v2/feeds/comments/{id}/replies'
|
|
914
1028
|
# Replace path parameters
|
|
915
1029
|
path = path.gsub('{id}', _id.to_s)
|
|
@@ -919,6 +1033,8 @@ module GetStream
|
|
|
919
1033
|
query_params['sort'] = sort unless sort.nil?
|
|
920
1034
|
query_params['replies_limit'] = replies_limit unless replies_limit.nil?
|
|
921
1035
|
query_params['id_around'] = id_around unless id_around.nil?
|
|
1036
|
+
query_params['language'] = language unless language.nil?
|
|
1037
|
+
query_params['translate_text'] = translate_text unless translate_text.nil?
|
|
922
1038
|
query_params['user_id'] = user_id unless user_id.nil?
|
|
923
1039
|
query_params['limit'] = limit unless limit.nil?
|
|
924
1040
|
query_params['prev'] = prev unless prev.nil?
|
|
@@ -952,6 +1068,26 @@ module GetStream
|
|
|
952
1068
|
)
|
|
953
1069
|
end
|
|
954
1070
|
|
|
1071
|
+
# Translates a comment's text to a given language using automated translationSends events:- feeds.comment.updated
|
|
1072
|
+
#
|
|
1073
|
+
# @param _id [String]
|
|
1074
|
+
# @param translate_comment_request [TranslateCommentRequest]
|
|
1075
|
+
# @return [Models::TranslateCommentResponse]
|
|
1076
|
+
def translate_comment(_id, translate_comment_request)
|
|
1077
|
+
path = '/api/v2/feeds/comments/{id}/translate'
|
|
1078
|
+
# Replace path parameters
|
|
1079
|
+
path = path.gsub('{id}', _id.to_s)
|
|
1080
|
+
# Build request body
|
|
1081
|
+
body = translate_comment_request
|
|
1082
|
+
|
|
1083
|
+
# Make the API request
|
|
1084
|
+
@client.make_request(
|
|
1085
|
+
:post,
|
|
1086
|
+
path,
|
|
1087
|
+
body: body
|
|
1088
|
+
)
|
|
1089
|
+
end
|
|
1090
|
+
|
|
955
1091
|
# List all feed groups for the application
|
|
956
1092
|
#
|
|
957
1093
|
# @param include_soft_deleted [Boolean]
|
|
@@ -1017,12 +1153,18 @@ module GetStream
|
|
|
1017
1153
|
# @param feed_group_id [String]
|
|
1018
1154
|
# @param feed_id [String]
|
|
1019
1155
|
# @param get_or_create_feed_request [GetOrCreateFeedRequest]
|
|
1156
|
+
# @param language [String]
|
|
1157
|
+
# @param translate_text [Boolean]
|
|
1020
1158
|
# @return [Models::GetOrCreateFeedResponse]
|
|
1021
|
-
def get_or_create_feed(feed_group_id, feed_id, get_or_create_feed_request)
|
|
1159
|
+
def get_or_create_feed(feed_group_id, feed_id, get_or_create_feed_request, language = nil, translate_text = nil)
|
|
1022
1160
|
path = '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}'
|
|
1023
1161
|
# Replace path parameters
|
|
1024
1162
|
path = path.gsub('{feed_group_id}', feed_group_id.to_s)
|
|
1025
1163
|
path = path.gsub('{feed_id}', feed_id.to_s)
|
|
1164
|
+
# Build query parameters
|
|
1165
|
+
query_params = {}
|
|
1166
|
+
query_params['language'] = language unless language.nil?
|
|
1167
|
+
query_params['translate_text'] = translate_text unless translate_text.nil?
|
|
1026
1168
|
# Build request body
|
|
1027
1169
|
body = get_or_create_feed_request
|
|
1028
1170
|
|
|
@@ -1030,6 +1172,7 @@ module GetStream
|
|
|
1030
1172
|
@client.make_request(
|
|
1031
1173
|
:post,
|
|
1032
1174
|
path,
|
|
1175
|
+
query_params: query_params,
|
|
1033
1176
|
body: body
|
|
1034
1177
|
)
|
|
1035
1178
|
end
|
|
@@ -1244,12 +1387,18 @@ module GetStream
|
|
|
1244
1387
|
# @param feed_group_id [String]
|
|
1245
1388
|
# @param feed_id [String]
|
|
1246
1389
|
# @param query_pinned_activities_request [QueryPinnedActivitiesRequest]
|
|
1390
|
+
# @param language [String]
|
|
1391
|
+
# @param translate_text [Boolean]
|
|
1247
1392
|
# @return [Models::QueryPinnedActivitiesResponse]
|
|
1248
|
-
def query_pinned_activities(feed_group_id, feed_id, query_pinned_activities_request)
|
|
1393
|
+
def query_pinned_activities(feed_group_id, feed_id, query_pinned_activities_request, language = nil, translate_text = nil)
|
|
1249
1394
|
path = '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/pinned_activities/query'
|
|
1250
1395
|
# Replace path parameters
|
|
1251
1396
|
path = path.gsub('{feed_group_id}', feed_group_id.to_s)
|
|
1252
1397
|
path = path.gsub('{feed_id}', feed_id.to_s)
|
|
1398
|
+
# Build query parameters
|
|
1399
|
+
query_params = {}
|
|
1400
|
+
query_params['language'] = language unless language.nil?
|
|
1401
|
+
query_params['translate_text'] = translate_text unless translate_text.nil?
|
|
1253
1402
|
# Build request body
|
|
1254
1403
|
body = query_pinned_activities_request
|
|
1255
1404
|
|
|
@@ -1257,6 +1406,7 @@ module GetStream
|
|
|
1257
1406
|
@client.make_request(
|
|
1258
1407
|
:post,
|
|
1259
1408
|
path,
|
|
1409
|
+
query_params: query_params,
|
|
1260
1410
|
body: body
|
|
1261
1411
|
)
|
|
1262
1412
|
end
|
|
@@ -129,9 +129,15 @@ module GetStream
|
|
|
129
129
|
# @!attribute friend_reactions
|
|
130
130
|
# @return [Array<FeedsReactionResponse>] Reactions from users the current user follows or has mutual follows with
|
|
131
131
|
attr_accessor :friend_reactions
|
|
132
|
+
# @!attribute latest_shares
|
|
133
|
+
# @return [Array<ShareResponse>] Recent shares of the activity, one entry per share (org-gated)
|
|
134
|
+
attr_accessor :latest_shares
|
|
132
135
|
# @!attribute current_feed
|
|
133
136
|
# @return [FeedResponse]
|
|
134
137
|
attr_accessor :current_feed
|
|
138
|
+
# @!attribute i18n
|
|
139
|
+
# @return [Hash<String, String>]
|
|
140
|
+
attr_accessor :i18n
|
|
135
141
|
# @!attribute location
|
|
136
142
|
# @return [Location]
|
|
137
143
|
attr_accessor :location
|
|
@@ -197,7 +203,9 @@ module GetStream
|
|
|
197
203
|
@text = attributes[:text] || attributes['text'] || nil
|
|
198
204
|
@visibility_tag = attributes[:visibility_tag] || attributes['visibility_tag'] || nil
|
|
199
205
|
@friend_reactions = attributes[:friend_reactions] || attributes['friend_reactions'] || nil
|
|
206
|
+
@latest_shares = attributes[:latest_shares] || attributes['latest_shares'] || nil
|
|
200
207
|
@current_feed = attributes[:current_feed] || attributes['current_feed'] || nil
|
|
208
|
+
@i18n = attributes[:i18n] || attributes['i18n'] || nil
|
|
201
209
|
@location = attributes[:location] || attributes['location'] || nil
|
|
202
210
|
@metrics = attributes[:metrics] || attributes['metrics'] || nil
|
|
203
211
|
@moderation = attributes[:moderation] || attributes['moderation'] || nil
|
|
@@ -250,7 +258,9 @@ module GetStream
|
|
|
250
258
|
text: 'text',
|
|
251
259
|
visibility_tag: 'visibility_tag',
|
|
252
260
|
friend_reactions: 'friend_reactions',
|
|
261
|
+
latest_shares: 'latest_shares',
|
|
253
262
|
current_feed: 'current_feed',
|
|
263
|
+
i18n: 'i18n',
|
|
254
264
|
location: 'location',
|
|
255
265
|
metrics: 'metrics',
|
|
256
266
|
moderation: 'moderation',
|
|
@@ -28,6 +28,9 @@ module GetStream
|
|
|
28
28
|
# @!attribute user_id
|
|
29
29
|
# @return [String]
|
|
30
30
|
attr_accessor :user_id
|
|
31
|
+
# @!attribute target_feeds
|
|
32
|
+
# @return [Array<String>] Optional list of feeds to create a reference (share) activity of the commented-on activity in. The reference activity's type mirrors the reaction type.
|
|
33
|
+
attr_accessor :target_feeds
|
|
31
34
|
# @!attribute custom
|
|
32
35
|
# @return [Object] Optional custom data to add to the reaction
|
|
33
36
|
attr_accessor :custom
|
|
@@ -44,6 +47,7 @@ module GetStream
|
|
|
44
47
|
@enforce_unique = attributes[:enforce_unique] || attributes['enforce_unique'] || nil
|
|
45
48
|
@skip_push = attributes[:skip_push] || attributes['skip_push'] || nil
|
|
46
49
|
@user_id = attributes[:user_id] || attributes['user_id'] || nil
|
|
50
|
+
@target_feeds = attributes[:target_feeds] || attributes['target_feeds'] || nil
|
|
47
51
|
@custom = attributes[:custom] || attributes['custom'] || nil
|
|
48
52
|
@user = attributes[:user] || attributes['user'] || nil
|
|
49
53
|
end
|
|
@@ -57,6 +61,7 @@ module GetStream
|
|
|
57
61
|
enforce_unique: 'enforce_unique',
|
|
58
62
|
skip_push: 'skip_push',
|
|
59
63
|
user_id: 'user_id',
|
|
64
|
+
target_feeds: 'target_feeds',
|
|
60
65
|
custom: 'custom',
|
|
61
66
|
user: 'user'
|
|
62
67
|
}
|
|
@@ -18,9 +18,19 @@ module GetStream
|
|
|
18
18
|
# @!attribute reaction
|
|
19
19
|
# @return [FeedsReactionResponse]
|
|
20
20
|
attr_accessor :reaction
|
|
21
|
+
# @!attribute notification_accepted
|
|
22
|
+
# @return [Boolean] Whether notification creation was accepted for asynchronous processing
|
|
23
|
+
attr_accessor :notification_accepted
|
|
21
24
|
# @!attribute notification_created
|
|
22
|
-
#
|
|
25
|
+
# @deprecated This field is deprecated.
|
|
26
|
+
# @return [Boolean] Deprecated. Mirrors notification_accepted; use notification_accepted for async enqueue status Deprecated: use notification_accepted
|
|
23
27
|
attr_accessor :notification_created
|
|
28
|
+
# @!attribute notification_task_id
|
|
29
|
+
# @return [String] ID of the async notification-creation task; poll GET /tasks/{id} for its status
|
|
30
|
+
attr_accessor :notification_task_id
|
|
31
|
+
# @!attribute reference_activity
|
|
32
|
+
# @return [ActivityResponse]
|
|
33
|
+
attr_accessor :reference_activity
|
|
24
34
|
|
|
25
35
|
# Initialize with attributes
|
|
26
36
|
def initialize(attributes = {})
|
|
@@ -28,7 +38,10 @@ module GetStream
|
|
|
28
38
|
@duration = attributes[:duration] || attributes['duration']
|
|
29
39
|
@comment = attributes[:comment] || attributes['comment']
|
|
30
40
|
@reaction = attributes[:reaction] || attributes['reaction']
|
|
41
|
+
@notification_accepted = attributes[:notification_accepted] || attributes['notification_accepted'] || nil
|
|
31
42
|
@notification_created = attributes[:notification_created] || attributes['notification_created'] || nil
|
|
43
|
+
@notification_task_id = attributes[:notification_task_id] || attributes['notification_task_id'] || nil
|
|
44
|
+
@reference_activity = attributes[:reference_activity] || attributes['reference_activity'] || nil
|
|
32
45
|
end
|
|
33
46
|
|
|
34
47
|
# Override field mappings for JSON serialization
|
|
@@ -37,7 +50,10 @@ module GetStream
|
|
|
37
50
|
duration: 'duration',
|
|
38
51
|
comment: 'comment',
|
|
39
52
|
reaction: 'reaction',
|
|
40
|
-
|
|
53
|
+
notification_accepted: 'notification_accepted',
|
|
54
|
+
notification_created: 'notification_created',
|
|
55
|
+
notification_task_id: 'notification_task_id',
|
|
56
|
+
reference_activity: 'reference_activity'
|
|
41
57
|
}
|
|
42
58
|
end
|
|
43
59
|
end
|
|
@@ -31,6 +31,9 @@ module GetStream
|
|
|
31
31
|
# @!attribute user_id
|
|
32
32
|
# @return [String]
|
|
33
33
|
attr_accessor :user_id
|
|
34
|
+
# @!attribute target_feeds
|
|
35
|
+
# @return [Array<String>] Optional list of feeds to create a reference (share) activity of the original activity in. The reference activity's type mirrors the reaction type.
|
|
36
|
+
attr_accessor :target_feeds
|
|
34
37
|
# @!attribute custom
|
|
35
38
|
# @return [Object] Custom data for the reaction
|
|
36
39
|
attr_accessor :custom
|
|
@@ -48,6 +51,7 @@ module GetStream
|
|
|
48
51
|
@enforce_unique = attributes[:enforce_unique] || attributes['enforce_unique'] || nil
|
|
49
52
|
@skip_push = attributes[:skip_push] || attributes['skip_push'] || nil
|
|
50
53
|
@user_id = attributes[:user_id] || attributes['user_id'] || nil
|
|
54
|
+
@target_feeds = attributes[:target_feeds] || attributes['target_feeds'] || nil
|
|
51
55
|
@custom = attributes[:custom] || attributes['custom'] || nil
|
|
52
56
|
@user = attributes[:user] || attributes['user'] || nil
|
|
53
57
|
end
|
|
@@ -62,6 +66,7 @@ module GetStream
|
|
|
62
66
|
enforce_unique: 'enforce_unique',
|
|
63
67
|
skip_push: 'skip_push',
|
|
64
68
|
user_id: 'user_id',
|
|
69
|
+
target_feeds: 'target_feeds',
|
|
65
70
|
custom: 'custom',
|
|
66
71
|
user: 'user'
|
|
67
72
|
}
|
|
@@ -18,9 +18,19 @@ module GetStream
|
|
|
18
18
|
# @!attribute reaction
|
|
19
19
|
# @return [FeedsReactionResponse]
|
|
20
20
|
attr_accessor :reaction
|
|
21
|
+
# @!attribute notification_accepted
|
|
22
|
+
# @return [Boolean] Whether notification creation was accepted for asynchronous processing
|
|
23
|
+
attr_accessor :notification_accepted
|
|
21
24
|
# @!attribute notification_created
|
|
22
|
-
#
|
|
25
|
+
# @deprecated This field is deprecated.
|
|
26
|
+
# @return [Boolean] Deprecated. Mirrors notification_accepted; use notification_accepted for async enqueue status Deprecated: use notification_accepted
|
|
23
27
|
attr_accessor :notification_created
|
|
28
|
+
# @!attribute notification_task_id
|
|
29
|
+
# @return [String] ID of the async notification-creation task; poll GET /tasks/{id} for its status
|
|
30
|
+
attr_accessor :notification_task_id
|
|
31
|
+
# @!attribute reference_activity
|
|
32
|
+
# @return [ActivityResponse]
|
|
33
|
+
attr_accessor :reference_activity
|
|
24
34
|
|
|
25
35
|
# Initialize with attributes
|
|
26
36
|
def initialize(attributes = {})
|
|
@@ -28,7 +38,10 @@ module GetStream
|
|
|
28
38
|
@duration = attributes[:duration] || attributes['duration']
|
|
29
39
|
@activity = attributes[:activity] || attributes['activity']
|
|
30
40
|
@reaction = attributes[:reaction] || attributes['reaction']
|
|
41
|
+
@notification_accepted = attributes[:notification_accepted] || attributes['notification_accepted'] || nil
|
|
31
42
|
@notification_created = attributes[:notification_created] || attributes['notification_created'] || nil
|
|
43
|
+
@notification_task_id = attributes[:notification_task_id] || attributes['notification_task_id'] || nil
|
|
44
|
+
@reference_activity = attributes[:reference_activity] || attributes['reference_activity'] || nil
|
|
32
45
|
end
|
|
33
46
|
|
|
34
47
|
# Override field mappings for JSON serialization
|
|
@@ -37,7 +50,10 @@ module GetStream
|
|
|
37
50
|
duration: 'duration',
|
|
38
51
|
activity: 'activity',
|
|
39
52
|
reaction: 'reaction',
|
|
40
|
-
|
|
53
|
+
notification_accepted: 'notification_accepted',
|
|
54
|
+
notification_created: 'notification_created',
|
|
55
|
+
notification_task_id: 'notification_task_id',
|
|
56
|
+
reference_activity: 'reference_activity'
|
|
41
57
|
}
|
|
42
58
|
end
|
|
43
59
|
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 AIAudioConfigRequest < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute profile
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :profile
|
|
15
|
+
# @!attribute rules
|
|
16
|
+
# @return [Array<BodyguardRule>]
|
|
17
|
+
attr_accessor :rules
|
|
18
|
+
|
|
19
|
+
# Initialize with attributes
|
|
20
|
+
def initialize(attributes = {})
|
|
21
|
+
super(attributes)
|
|
22
|
+
@profile = attributes[:profile] || attributes['profile'] || nil
|
|
23
|
+
@rules = attributes[:rules] || attributes['rules'] || nil
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Override field mappings for JSON serialization
|
|
27
|
+
def self.json_field_mappings
|
|
28
|
+
{
|
|
29
|
+
profile: 'profile',
|
|
30
|
+
rules: 'rules'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|