getstream-ruby 7.1.1 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/getstream_ruby/generated/chat_client.rb +57 -0
- data/lib/getstream_ruby/generated/common_client.rb +16 -0
- data/lib/getstream_ruby/generated/feeds_client.rb +55 -0
- data/lib/getstream_ruby/generated/models/add_segment_targets_request.rb +31 -0
- data/lib/getstream_ruby/generated/models/analyze_image_field.rb +56 -0
- data/lib/getstream_ruby/generated/models/analyze_request.rb +81 -0
- data/lib/getstream_ruby/generated/models/analyze_response.rb +46 -0
- data/lib/getstream_ruby/generated/models/analyze_text_field.rb +56 -0
- data/lib/getstream_ruby/generated/models/app_response_fields.rb +15 -0
- data/lib/getstream_ruby/generated/models/appeal_item_response.rb +60 -0
- data/lib/getstream_ruby/generated/models/appeal_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/block_list_response.rb +10 -0
- data/lib/getstream_ruby/generated/models/bulk_action_appeals_request.rb +71 -0
- data/lib/getstream_ruby/generated/models/bulk_action_appeals_response.rb +41 -0
- data/lib/getstream_ruby/generated/models/bulk_appeal_error.rb +36 -0
- data/lib/getstream_ruby/generated/models/bulk_appeal_result.rb +36 -0
- data/lib/getstream_ruby/generated/models/call_stats_participant_counts.rb +10 -0
- data/lib/getstream_ruby/generated/models/cancel_import_v2_task_request.rb +14 -0
- data/lib/getstream_ruby/generated/models/cancel_import_v2_task_response.rb +31 -0
- data/lib/getstream_ruby/generated/models/channel_config_overrides.rb +106 -0
- data/lib/getstream_ruby/generated/models/channel_data_update.rb +1 -1
- data/lib/getstream_ruby/generated/models/channel_input.rb +1 -1
- data/lib/getstream_ruby/generated/models/chat_message_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/classification.rb +46 -0
- data/lib/getstream_ruby/generated/models/client_event.rb +156 -0
- data/lib/getstream_ruby/generated/models/closed_caption_rule_parameters.rb +5 -0
- data/lib/getstream_ruby/generated/models/config_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/content_custom_property_count_parameters.rb +46 -0
- data/lib/getstream_ruby/generated/models/content_custom_property_parameters.rb +36 -0
- data/lib/getstream_ruby/generated/models/create_block_list_request.rb +10 -0
- data/lib/getstream_ruby/generated/models/create_device_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/create_segment_request.rb +61 -0
- data/lib/getstream_ruby/generated/models/create_segment_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/delivery_receipts_response.rb +1 -1
- data/lib/getstream_ruby/generated/models/device_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/filter_config_response.rb +9 -4
- data/lib/getstream_ruby/generated/models/flag_details.rb +36 -0
- data/lib/getstream_ruby/generated/models/flag_item_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/flag_response.rb +69 -9
- data/lib/getstream_ruby/generated/models/flood_config.rb +36 -0
- data/lib/getstream_ruby/generated/models/flood_identical_config.rb +46 -0
- data/lib/getstream_ruby/generated/models/flood_similar_config.rb +51 -0
- data/lib/getstream_ruby/generated/models/follow_request.rb +1 -1
- data/lib/getstream_ruby/generated/models/get_or_create_feed_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/get_or_create_follow_response.rb +46 -0
- data/lib/getstream_ruby/generated/models/get_or_create_unfollow_request.rb +51 -0
- data/lib/getstream_ruby/generated/models/get_or_create_unfollow_response.rb +41 -0
- data/lib/getstream_ruby/generated/models/get_setup_session_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/get_user_interests_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/grouped_channels_bucket.rb +10 -0
- data/lib/getstream_ruby/generated/models/grouped_channels_group_request.rb +41 -0
- data/lib/getstream_ruby/generated/models/grouped_query_channels_request.rb +6 -1
- data/lib/getstream_ruby/generated/models/import_v2_task_settings.rb +5 -0
- data/lib/getstream_ruby/generated/models/interest_tag_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/keyframe_ocr_rule_parameters.rb +41 -0
- data/lib/getstream_ruby/generated/models/keyframe_rule_parameters.rb +5 -0
- data/lib/getstream_ruby/generated/models/label_result_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/labels_request.rb +1 -1
- data/lib/getstream_ruby/generated/models/labels_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/llm_rule.rb +5 -5
- data/lib/getstream_ruby/generated/models/matched_content.rb +61 -0
- data/lib/getstream_ruby/generated/models/message_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/message_with_channel_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/moderation_ban_response.rb +31 -0
- data/lib/getstream_ruby/generated/models/moderation_config.rb +5 -0
- data/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb +15 -0
- data/lib/getstream_ruby/generated/models/moderation_image_analysis_complete_event.rb +81 -0
- data/lib/getstream_ruby/generated/models/moderation_rules_triggered_event.rb +6 -1
- data/lib/getstream_ruby/generated/models/moderation_text_analysis_complete_event.rb +76 -0
- data/lib/getstream_ruby/generated/models/query_moderation_rules_response.rb +10 -0
- data/lib/getstream_ruby/generated/models/query_review_queue_request.rb +1 -1
- data/lib/getstream_ruby/generated/models/read_receipts_response.rb +1 -1
- data/lib/getstream_ruby/generated/models/report_client_event_request.rb +31 -0
- data/lib/getstream_ruby/generated/models/report_client_event_response.rb +31 -0
- data/lib/getstream_ruby/generated/models/rule_builder_action.rb +5 -0
- data/lib/getstream_ruby/generated/models/rule_builder_condition.rb +15 -0
- data/lib/getstream_ruby/generated/models/search_result_message.rb +5 -0
- data/lib/getstream_ruby/generated/models/setup_session.rb +56 -0
- data/lib/getstream_ruby/generated/models/submit_action_response.rb +5 -0
- data/lib/getstream_ruby/generated/models/target_resolution.rb +6 -6
- data/lib/getstream_ruby/generated/models/text_content_parameters.rb +10 -0
- data/lib/getstream_ruby/generated/models/translation_settings.rb +2 -2
- data/lib/getstream_ruby/generated/models/typing_indicators_response.rb +1 -1
- data/lib/getstream_ruby/generated/models/update_app_request.rb +15 -0
- data/lib/getstream_ruby/generated/models/update_block_list_request.rb +10 -0
- data/lib/getstream_ruby/generated/models/update_follow_request.rb +1 -1
- data/lib/getstream_ruby/generated/models/update_segment_request.rb +41 -0
- data/lib/getstream_ruby/generated/models/update_segment_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/upsert_config_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/upsert_setup_session_request.rb +41 -0
- data/lib/getstream_ruby/generated/models/upsert_setup_session_response.rb +36 -0
- data/lib/getstream_ruby/generated/models/user_banned_event.rb +5 -0
- data/lib/getstream_ruby/generated/moderation_client.rb +66 -2
- data/lib/getstream_ruby/generated/video_client.rb +17 -0
- data/lib/getstream_ruby/generated/webhook.rb +8 -0
- data/lib/getstream_ruby/version.rb +1 -1
- metadata +44 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bdb471d62abb8f183faaf2bfb1fd26fe004528f671e4955ded925fda813f9156
|
|
4
|
+
data.tar.gz: 3e25f85140234c5b6c6ea050a4a8388df1ad565b5f8438c41a8b800704fb6770
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f5bd310d66784680450a687a9fd9f930cfaa4bc3bcc4b2b360a9e75957169b4e1beac3f7e81730358bb0b65b3834a9e2097209a87755baf5ce0668252e887ae3
|
|
7
|
+
data.tar.gz: 9f69c4416598837e9160a68e3c547efa1c8b92f230303df51f83c8405b2375eeb5d913d0845ba4afc38e842c54a20e3cb90274b1ab3c540776e24ae5363e1690
|
|
@@ -1540,6 +1540,23 @@ module GetStream
|
|
|
1540
1540
|
)
|
|
1541
1541
|
end
|
|
1542
1542
|
|
|
1543
|
+
# Create a segment
|
|
1544
|
+
#
|
|
1545
|
+
# @param create_segment_request [CreateSegmentRequest]
|
|
1546
|
+
# @return [Models::CreateSegmentResponse]
|
|
1547
|
+
def create_segment(create_segment_request)
|
|
1548
|
+
path = '/api/v2/chat/segments'
|
|
1549
|
+
# Build request body
|
|
1550
|
+
body = create_segment_request
|
|
1551
|
+
|
|
1552
|
+
# Make the API request
|
|
1553
|
+
@client.make_request(
|
|
1554
|
+
:post,
|
|
1555
|
+
path,
|
|
1556
|
+
body: body
|
|
1557
|
+
)
|
|
1558
|
+
end
|
|
1559
|
+
|
|
1543
1560
|
# Query segments
|
|
1544
1561
|
#
|
|
1545
1562
|
# @param query_segments_request [QuerySegmentsRequest]
|
|
@@ -1589,6 +1606,46 @@ module GetStream
|
|
|
1589
1606
|
)
|
|
1590
1607
|
end
|
|
1591
1608
|
|
|
1609
|
+
# Update an existing segment
|
|
1610
|
+
#
|
|
1611
|
+
# @param _id [String]
|
|
1612
|
+
# @param update_segment_request [UpdateSegmentRequest]
|
|
1613
|
+
# @return [Models::UpdateSegmentResponse]
|
|
1614
|
+
def update_segment(_id, update_segment_request)
|
|
1615
|
+
path = '/api/v2/chat/segments/{id}'
|
|
1616
|
+
# Replace path parameters
|
|
1617
|
+
path = path.gsub('{id}', _id.to_s)
|
|
1618
|
+
# Build request body
|
|
1619
|
+
body = update_segment_request
|
|
1620
|
+
|
|
1621
|
+
# Make the API request
|
|
1622
|
+
@client.make_request(
|
|
1623
|
+
:put,
|
|
1624
|
+
path,
|
|
1625
|
+
body: body
|
|
1626
|
+
)
|
|
1627
|
+
end
|
|
1628
|
+
|
|
1629
|
+
# Add targets to a segment
|
|
1630
|
+
#
|
|
1631
|
+
# @param _id [String]
|
|
1632
|
+
# @param add_segment_targets_request [AddSegmentTargetsRequest]
|
|
1633
|
+
# @return [Models::Response]
|
|
1634
|
+
def add_segment_targets(_id, add_segment_targets_request)
|
|
1635
|
+
path = '/api/v2/chat/segments/{id}/addtargets'
|
|
1636
|
+
# Replace path parameters
|
|
1637
|
+
path = path.gsub('{id}', _id.to_s)
|
|
1638
|
+
# Build request body
|
|
1639
|
+
body = add_segment_targets_request
|
|
1640
|
+
|
|
1641
|
+
# Make the API request
|
|
1642
|
+
@client.make_request(
|
|
1643
|
+
:post,
|
|
1644
|
+
path,
|
|
1645
|
+
body: body
|
|
1646
|
+
)
|
|
1647
|
+
end
|
|
1648
|
+
|
|
1592
1649
|
# Delete targets from a segment
|
|
1593
1650
|
#
|
|
1594
1651
|
# @param _id [String]
|
|
@@ -531,6 +531,22 @@ module GetStream
|
|
|
531
531
|
)
|
|
532
532
|
end
|
|
533
533
|
|
|
534
|
+
# Requests a controlled stop of an import v2 task. Allowed only for tasks in queued or processing state; a processing import stops cleanly on its next progress tick.
|
|
535
|
+
#
|
|
536
|
+
# @param _id [String]
|
|
537
|
+
# @return [Models::CancelImportV2TaskResponse]
|
|
538
|
+
def cancel_import_v2_task(_id)
|
|
539
|
+
path = '/api/v2/imports/v2/{id}/cancel'
|
|
540
|
+
# Replace path parameters
|
|
541
|
+
path = path.gsub('{id}', _id.to_s)
|
|
542
|
+
|
|
543
|
+
# Make the API request
|
|
544
|
+
@client.make_request(
|
|
545
|
+
:post,
|
|
546
|
+
path
|
|
547
|
+
)
|
|
548
|
+
end
|
|
549
|
+
|
|
534
550
|
# Gets an import
|
|
535
551
|
#
|
|
536
552
|
# @param _id [String]
|
|
@@ -1746,6 +1746,23 @@ module GetStream
|
|
|
1746
1746
|
)
|
|
1747
1747
|
end
|
|
1748
1748
|
|
|
1749
|
+
# Creates a follow if it does not exist, or returns the existing one. Broadcasts feeds.follow.created (FollowCreatedEvent) only when the follow is newly created.
|
|
1750
|
+
#
|
|
1751
|
+
# @param follow_request [FollowRequest]
|
|
1752
|
+
# @return [Models::GetOrCreateFollowResponse]
|
|
1753
|
+
def get_or_create_follow(follow_request)
|
|
1754
|
+
path = '/api/v2/feeds/follows/upsert'
|
|
1755
|
+
# Build request body
|
|
1756
|
+
body = follow_request
|
|
1757
|
+
|
|
1758
|
+
# Make the API request
|
|
1759
|
+
@client.make_request(
|
|
1760
|
+
:post,
|
|
1761
|
+
path,
|
|
1762
|
+
body: body
|
|
1763
|
+
)
|
|
1764
|
+
end
|
|
1765
|
+
|
|
1749
1766
|
# Removes a follow and broadcasts FollowRemovedEvent
|
|
1750
1767
|
#
|
|
1751
1768
|
# @param source [String]
|
|
@@ -1911,6 +1928,23 @@ module GetStream
|
|
|
1911
1928
|
)
|
|
1912
1929
|
end
|
|
1913
1930
|
|
|
1931
|
+
# Removes a follow and broadcasts feeds.follow.deleted (FollowDeletedEvent). Does not return an error if the follow does not exist.
|
|
1932
|
+
#
|
|
1933
|
+
# @param get_or_create_unfollow_request [GetOrCreateUnfollowRequest]
|
|
1934
|
+
# @return [Models::GetOrCreateUnfollowResponse]
|
|
1935
|
+
def get_or_create_unfollow(get_or_create_unfollow_request)
|
|
1936
|
+
path = '/api/v2/feeds/unfollow/upsert'
|
|
1937
|
+
# Build request body
|
|
1938
|
+
body = get_or_create_unfollow_request
|
|
1939
|
+
|
|
1940
|
+
# Make the API request
|
|
1941
|
+
@client.make_request(
|
|
1942
|
+
:post,
|
|
1943
|
+
path,
|
|
1944
|
+
body: body
|
|
1945
|
+
)
|
|
1946
|
+
end
|
|
1947
|
+
|
|
1914
1948
|
# Delete all feed data for a user including: feeds, activities, follows, comments, feed reactions, bookmark folders, bookmarks, and collections owned by the user
|
|
1915
1949
|
#
|
|
1916
1950
|
# @param user_id [String]
|
|
@@ -1947,6 +1981,27 @@ module GetStream
|
|
|
1947
1981
|
)
|
|
1948
1982
|
end
|
|
1949
1983
|
|
|
1984
|
+
# Returns the user's most common interest tags ranked by the number of distinct activities they reacted to that carried each tag. Client-side callers may only read their own interests; server-side callers may fetch any user. Results are sorted by descending count, then alphabetically by tag.
|
|
1985
|
+
#
|
|
1986
|
+
# @param user_id [String]
|
|
1987
|
+
# @param limit [Integer]
|
|
1988
|
+
# @return [Models::GetUserInterestsResponse]
|
|
1989
|
+
def get_user_interests(user_id, limit = nil)
|
|
1990
|
+
path = '/api/v2/feeds/users/{user_id}/interests'
|
|
1991
|
+
# Replace path parameters
|
|
1992
|
+
path = path.gsub('{user_id}', user_id.to_s)
|
|
1993
|
+
# Build query parameters
|
|
1994
|
+
query_params = {}
|
|
1995
|
+
query_params['limit'] = limit unless limit.nil?
|
|
1996
|
+
|
|
1997
|
+
# Make the API request
|
|
1998
|
+
@client.make_request(
|
|
1999
|
+
:get,
|
|
2000
|
+
path,
|
|
2001
|
+
query_params: query_params
|
|
2002
|
+
)
|
|
2003
|
+
end
|
|
2004
|
+
|
|
1950
2005
|
end
|
|
1951
2006
|
end
|
|
1952
2007
|
end
|
|
@@ -0,0 +1,31 @@
|
|
|
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 AddSegmentTargetsRequest < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute target_ids
|
|
13
|
+
# @return [Array<String>] Target IDs
|
|
14
|
+
attr_accessor :target_ids
|
|
15
|
+
|
|
16
|
+
# Initialize with attributes
|
|
17
|
+
def initialize(attributes = {})
|
|
18
|
+
super(attributes)
|
|
19
|
+
@target_ids = attributes[:target_ids] || attributes['target_ids']
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Override field mappings for JSON serialization
|
|
23
|
+
def self.json_field_mappings
|
|
24
|
+
{
|
|
25
|
+
target_ids: 'target_ids'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -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 AnalyzeImageField < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute action
|
|
13
|
+
# @return [String] Per-image action: keep | flag | remove.
|
|
14
|
+
attr_accessor :action
|
|
15
|
+
# @!attribute confidence
|
|
16
|
+
# @return [Float] Highest confidence (0–1) across detected classifications + sub-classifications. Convenience aggregate over the nested values in `classifications`.
|
|
17
|
+
attr_accessor :confidence
|
|
18
|
+
# @!attribute error
|
|
19
|
+
# @return [String] Set when moderation couldn't be determined for this image — action is absent.
|
|
20
|
+
attr_accessor :error
|
|
21
|
+
# @!attribute id
|
|
22
|
+
# @return [String] Echo of `content_ids[label]` when supplied on the request; omitted otherwise.
|
|
23
|
+
attr_accessor :id
|
|
24
|
+
# @!attribute classifications
|
|
25
|
+
# @return [Array<Classification>] Hierarchical list of L1 (parent) classifications. Each entry: `name`, `confidence` (0–1), and nested `subclassifications` (L2 leaves with their own confidence). Resolved against the app's effective taxonomy (custom taxonomy when configured, otherwise the standard Bodyguard catalogue).
|
|
26
|
+
attr_accessor :classifications
|
|
27
|
+
# @!attribute ocr_classifications
|
|
28
|
+
# @return [Array<Classification>] Flat list of Bodyguard OCR text-moderation labels on the image's extracted text (e.g. VULGARITY, PII). Each entry: `name` + `severity`. Populated when BG's OCR pipeline returned non-empty results for this image.
|
|
29
|
+
attr_accessor :ocr_classifications
|
|
30
|
+
|
|
31
|
+
# Initialize with attributes
|
|
32
|
+
def initialize(attributes = {})
|
|
33
|
+
super(attributes)
|
|
34
|
+
@action = attributes[:action] || attributes['action'] || nil
|
|
35
|
+
@confidence = attributes[:confidence] || attributes['confidence'] || nil
|
|
36
|
+
@error = attributes[:error] || attributes['error'] || nil
|
|
37
|
+
@id = attributes[:id] || attributes['id'] || nil
|
|
38
|
+
@classifications = attributes[:classifications] || attributes['classifications'] || nil
|
|
39
|
+
@ocr_classifications = attributes[:ocr_classifications] || attributes['ocr_classifications'] || nil
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Override field mappings for JSON serialization
|
|
43
|
+
def self.json_field_mappings
|
|
44
|
+
{
|
|
45
|
+
action: 'action',
|
|
46
|
+
confidence: 'confidence',
|
|
47
|
+
error: 'error',
|
|
48
|
+
id: 'id',
|
|
49
|
+
classifications: 'classifications',
|
|
50
|
+
ocr_classifications: 'ocr_classifications'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
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 AnalyzeRequest < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute async_response
|
|
13
|
+
# @return [Boolean] When true, the response carries no verdicts (status `pending`) and per-modality results arrive via `moderation.text_analysis.complete` and `moderation.image_analysis.complete` webhooks. Image moderation runs on a background worker; text moderation runs synchronously and is then delivered via webhook.
|
|
14
|
+
attr_accessor :async_response
|
|
15
|
+
# @!attribute config_key
|
|
16
|
+
# @return [String] Moderation policy key. Optional in stateful mode, required in stateless mode.
|
|
17
|
+
attr_accessor :config_key
|
|
18
|
+
# @!attribute content_published_at
|
|
19
|
+
# @return [DateTime] Original timestamp when the content was produced. Used as the `published_at` timestamp on per-content log entries that surface in `matched_contents` on aggregation-rule webhooks.
|
|
20
|
+
attr_accessor :content_published_at
|
|
21
|
+
# @!attribute entity_creator_id
|
|
22
|
+
# @return [String] ID of the user who created the content. Required with entity_type + entity_id; omit all three for stateless mode.
|
|
23
|
+
attr_accessor :entity_creator_id
|
|
24
|
+
# @!attribute entity_id
|
|
25
|
+
# @return [String] Caller-supplied content identifier. Required with entity_type + entity_creator_id; omit all three for stateless mode.
|
|
26
|
+
attr_accessor :entity_id
|
|
27
|
+
# @!attribute entity_type
|
|
28
|
+
# @return [String] Caller-defined entity type. Required with entity_id + entity_creator_id; omit all three for stateless mode.
|
|
29
|
+
attr_accessor :entity_type
|
|
30
|
+
# @!attribute user_id
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :user_id
|
|
33
|
+
# @!attribute content_ids
|
|
34
|
+
# @return [Hash<String, String>] Optional map from a content label (either a `texts` key or an `image:<key>` multipart label) to a caller-supplied per-instance identifier. Echoed on per-field verdicts and surfaced in `matched_contents` when an aggregation rule fires.
|
|
35
|
+
attr_accessor :content_ids
|
|
36
|
+
# @!attribute custom
|
|
37
|
+
# @return [Object] Arbitrary metadata surfaced in the dashboard.
|
|
38
|
+
attr_accessor :custom
|
|
39
|
+
# @!attribute texts
|
|
40
|
+
# @return [Hash<String, String>] Named text fields to moderate, keyed by caller label (e.g. title, description).
|
|
41
|
+
attr_accessor :texts
|
|
42
|
+
# @!attribute user
|
|
43
|
+
# @return [UserRequest]
|
|
44
|
+
attr_accessor :user
|
|
45
|
+
|
|
46
|
+
# Initialize with attributes
|
|
47
|
+
def initialize(attributes = {})
|
|
48
|
+
super(attributes)
|
|
49
|
+
@async_response = attributes[:async_response] || attributes['async_response'] || nil
|
|
50
|
+
@config_key = attributes[:config_key] || attributes['config_key'] || nil
|
|
51
|
+
@content_published_at = attributes[:content_published_at] || attributes['content_published_at'] || nil
|
|
52
|
+
@entity_creator_id = attributes[:entity_creator_id] || attributes['entity_creator_id'] || nil
|
|
53
|
+
@entity_id = attributes[:entity_id] || attributes['entity_id'] || nil
|
|
54
|
+
@entity_type = attributes[:entity_type] || attributes['entity_type'] || nil
|
|
55
|
+
@user_id = attributes[:user_id] || attributes['user_id'] || nil
|
|
56
|
+
@content_ids = attributes[:content_ids] || attributes['content_ids'] || nil
|
|
57
|
+
@custom = attributes[:custom] || attributes['custom'] || nil
|
|
58
|
+
@texts = attributes[:texts] || attributes['texts'] || 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
|
+
async_response: 'async_response',
|
|
66
|
+
config_key: 'config_key',
|
|
67
|
+
content_published_at: 'content_published_at',
|
|
68
|
+
entity_creator_id: 'entity_creator_id',
|
|
69
|
+
entity_id: 'entity_id',
|
|
70
|
+
entity_type: 'entity_type',
|
|
71
|
+
user_id: 'user_id',
|
|
72
|
+
content_ids: 'content_ids',
|
|
73
|
+
custom: 'custom',
|
|
74
|
+
texts: 'texts',
|
|
75
|
+
user: 'user'
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
|
|
4
|
+
|
|
5
|
+
module GetStream
|
|
6
|
+
module Generated
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
class AnalyzeResponse < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute duration
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :duration
|
|
15
|
+
# @!attribute status
|
|
16
|
+
# @return [String] Always `complete` — /analyze is sync-only and the full verdict is in the response.
|
|
17
|
+
attr_accessor :status
|
|
18
|
+
# @!attribute images
|
|
19
|
+
# @return [Hash<String, AnalyzeImageField>] Per-image moderation verdicts keyed by caller label.
|
|
20
|
+
attr_accessor :images
|
|
21
|
+
# @!attribute texts
|
|
22
|
+
# @return [Hash<String, AnalyzeTextField>] Per-text-field moderation verdicts keyed by caller label.
|
|
23
|
+
attr_accessor :texts
|
|
24
|
+
|
|
25
|
+
# Initialize with attributes
|
|
26
|
+
def initialize(attributes = {})
|
|
27
|
+
super(attributes)
|
|
28
|
+
@duration = attributes[:duration] || attributes['duration']
|
|
29
|
+
@status = attributes[:status] || attributes['status']
|
|
30
|
+
@images = attributes[:images] || attributes['images'] || nil
|
|
31
|
+
@texts = attributes[:texts] || attributes['texts'] || nil
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Override field mappings for JSON serialization
|
|
35
|
+
def self.json_field_mappings
|
|
36
|
+
{
|
|
37
|
+
duration: 'duration',
|
|
38
|
+
status: 'status',
|
|
39
|
+
images: 'images',
|
|
40
|
+
texts: 'texts'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -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 AnalyzeTextField < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute action
|
|
13
|
+
# @return [String] Per-field action: keep | flag | remove.
|
|
14
|
+
attr_accessor :action
|
|
15
|
+
# @!attribute error
|
|
16
|
+
# @return [String] Set when moderation couldn't be determined for this field — action is absent.
|
|
17
|
+
attr_accessor :error
|
|
18
|
+
# @!attribute id
|
|
19
|
+
# @return [String] Echo of `content_ids[label]` when supplied on the request; omitted otherwise.
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
# @!attribute language
|
|
22
|
+
# @return [String] Detected language code.
|
|
23
|
+
attr_accessor :language
|
|
24
|
+
# @!attribute severity
|
|
25
|
+
# @return [String] Aggregate severity across the field: LOW | MEDIUM | HIGH | CRITICAL.
|
|
26
|
+
attr_accessor :severity
|
|
27
|
+
# @!attribute classifications
|
|
28
|
+
# @return [Array<Classification>] Flat list of detected Bodyguard text labels (e.g. INSULT, VULGARITY). Each entry carries `name` and `severity`.
|
|
29
|
+
attr_accessor :classifications
|
|
30
|
+
|
|
31
|
+
# Initialize with attributes
|
|
32
|
+
def initialize(attributes = {})
|
|
33
|
+
super(attributes)
|
|
34
|
+
@action = attributes[:action] || attributes['action'] || nil
|
|
35
|
+
@error = attributes[:error] || attributes['error'] || nil
|
|
36
|
+
@id = attributes[:id] || attributes['id'] || nil
|
|
37
|
+
@language = attributes[:language] || attributes['language'] || nil
|
|
38
|
+
@severity = attributes[:severity] || attributes['severity'] || nil
|
|
39
|
+
@classifications = attributes[:classifications] || attributes['classifications'] || nil
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Override field mappings for JSON serialization
|
|
43
|
+
def self.json_field_mappings
|
|
44
|
+
{
|
|
45
|
+
action: 'action',
|
|
46
|
+
error: 'error',
|
|
47
|
+
id: 'id',
|
|
48
|
+
language: 'language',
|
|
49
|
+
severity: 'severity',
|
|
50
|
+
classifications: 'classifications'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -150,15 +150,24 @@ module GetStream
|
|
|
150
150
|
# @!attribute push_notifications
|
|
151
151
|
# @return [PushNotificationFields]
|
|
152
152
|
attr_accessor :push_notifications
|
|
153
|
+
# @!attribute before_message_send_hook_attempt_timeout_ms
|
|
154
|
+
# @return [Integer]
|
|
155
|
+
attr_accessor :before_message_send_hook_attempt_timeout_ms
|
|
153
156
|
# @!attribute before_message_send_hook_url
|
|
154
157
|
# @return [String]
|
|
155
158
|
attr_accessor :before_message_send_hook_url
|
|
159
|
+
# @!attribute moderation_onboarding_complete
|
|
160
|
+
# @return [Boolean]
|
|
161
|
+
attr_accessor :moderation_onboarding_complete
|
|
156
162
|
# @!attribute moderation_s3_image_access_role_arn
|
|
157
163
|
# @return [String]
|
|
158
164
|
attr_accessor :moderation_s3_image_access_role_arn
|
|
159
165
|
# @!attribute revoke_tokens_issued_before
|
|
160
166
|
# @return [DateTime]
|
|
161
167
|
attr_accessor :revoke_tokens_issued_before
|
|
168
|
+
# @!attribute video_primary_use_case
|
|
169
|
+
# @return [String]
|
|
170
|
+
attr_accessor :video_primary_use_case
|
|
162
171
|
# @!attribute allowed_flag_reasons
|
|
163
172
|
# @return [Array<String>]
|
|
164
173
|
attr_accessor :allowed_flag_reasons
|
|
@@ -228,9 +237,12 @@ module GetStream
|
|
|
228
237
|
@image_upload_config = attributes[:image_upload_config] || attributes['image_upload_config']
|
|
229
238
|
@policies = attributes[:policies] || attributes['policies']
|
|
230
239
|
@push_notifications = attributes[:push_notifications] || attributes['push_notifications']
|
|
240
|
+
@before_message_send_hook_attempt_timeout_ms = attributes[:before_message_send_hook_attempt_timeout_ms] || attributes['before_message_send_hook_attempt_timeout_ms'] || nil
|
|
231
241
|
@before_message_send_hook_url = attributes[:before_message_send_hook_url] || attributes['before_message_send_hook_url'] || nil
|
|
242
|
+
@moderation_onboarding_complete = attributes[:moderation_onboarding_complete] || attributes['moderation_onboarding_complete'] || nil
|
|
232
243
|
@moderation_s3_image_access_role_arn = attributes[:moderation_s3_image_access_role_arn] || attributes['moderation_s3_image_access_role_arn'] || nil
|
|
233
244
|
@revoke_tokens_issued_before = attributes[:revoke_tokens_issued_before] || attributes['revoke_tokens_issued_before'] || nil
|
|
245
|
+
@video_primary_use_case = attributes[:video_primary_use_case] || attributes['video_primary_use_case'] || nil
|
|
234
246
|
@allowed_flag_reasons = attributes[:allowed_flag_reasons] || attributes['allowed_flag_reasons'] || nil
|
|
235
247
|
@geofences = attributes[:geofences] || attributes['geofences'] || nil
|
|
236
248
|
@image_moderation_labels = attributes[:image_moderation_labels] || attributes['image_moderation_labels'] || nil
|
|
@@ -289,9 +301,12 @@ module GetStream
|
|
|
289
301
|
image_upload_config: 'image_upload_config',
|
|
290
302
|
policies: 'policies',
|
|
291
303
|
push_notifications: 'push_notifications',
|
|
304
|
+
before_message_send_hook_attempt_timeout_ms: 'before_message_send_hook_attempt_timeout_ms',
|
|
292
305
|
before_message_send_hook_url: 'before_message_send_hook_url',
|
|
306
|
+
moderation_onboarding_complete: 'moderation_onboarding_complete',
|
|
293
307
|
moderation_s3_image_access_role_arn: 'moderation_s3_image_access_role_arn',
|
|
294
308
|
revoke_tokens_issued_before: 'revoke_tokens_issued_before',
|
|
309
|
+
video_primary_use_case: 'video_primary_use_case',
|
|
295
310
|
allowed_flag_reasons: 'allowed_flag_reasons',
|
|
296
311
|
geofences: 'geofences',
|
|
297
312
|
image_moderation_labels: 'image_moderation_labels',
|
|
@@ -30,15 +30,51 @@ module GetStream
|
|
|
30
30
|
# @!attribute updated_at
|
|
31
31
|
# @return [DateTime] When the flag was last updated
|
|
32
32
|
attr_accessor :updated_at
|
|
33
|
+
# @!attribute ai_text_severity
|
|
34
|
+
# @return [String] Text severity level assigned by the AI provider
|
|
35
|
+
attr_accessor :ai_text_severity
|
|
36
|
+
# @!attribute channel_cid
|
|
37
|
+
# @return [String] CID of the channel the entity belongs to, if applicable
|
|
38
|
+
attr_accessor :channel_cid
|
|
39
|
+
# @!attribute config_key
|
|
40
|
+
# @return [String] Moderation policy key that was applied
|
|
41
|
+
attr_accessor :config_key
|
|
33
42
|
# @!attribute decision_reason
|
|
34
43
|
# @return [String] Decision Reason of the Appeal Item
|
|
35
44
|
attr_accessor :decision_reason
|
|
45
|
+
# @!attribute recommended_action
|
|
46
|
+
# @return [String] Action recommended by the automated moderation system (e.g. flag, remove, shadow)
|
|
47
|
+
attr_accessor :recommended_action
|
|
48
|
+
# @!attribute review_queue_item_id
|
|
49
|
+
# @return [String] ID of the review queue item linked to this appeal, if the appeal was submitted with one
|
|
50
|
+
attr_accessor :review_queue_item_id
|
|
51
|
+
# @!attribute severity
|
|
52
|
+
# @return [Integer] Overall content severity score (1–100)
|
|
53
|
+
attr_accessor :severity
|
|
54
|
+
# @!attribute actions
|
|
55
|
+
# @return [Array<ActionLogResponse>] Full chronological history of all moderation actions on the review queue item
|
|
56
|
+
attr_accessor :actions
|
|
36
57
|
# @!attribute attachments
|
|
37
58
|
# @return [Array<String>] Attachments(e.g. Images) of the Appeal Item
|
|
38
59
|
attr_accessor :attachments
|
|
60
|
+
# @!attribute flag_labels
|
|
61
|
+
# @return [Array<String>] Classification labels from automated and manual review
|
|
62
|
+
attr_accessor :flag_labels
|
|
63
|
+
# @!attribute flag_types
|
|
64
|
+
# @return [Array<String>] Types of flags applied to the entity (e.g. user_report, bodyguard)
|
|
65
|
+
attr_accessor :flag_types
|
|
66
|
+
# @!attribute flags
|
|
67
|
+
# @return [Array<ModerationFlagResponse>] Per-provider flag records explaining why the action was taken
|
|
68
|
+
attr_accessor :flags
|
|
39
69
|
# @!attribute entity_content
|
|
40
70
|
# @return [ModerationPayload]
|
|
41
71
|
attr_accessor :entity_content
|
|
72
|
+
# @!attribute moderation_action
|
|
73
|
+
# @return [ActionLogResponse]
|
|
74
|
+
attr_accessor :moderation_action
|
|
75
|
+
# @!attribute original_moderation_action
|
|
76
|
+
# @return [ActionLogResponse]
|
|
77
|
+
attr_accessor :original_moderation_action
|
|
42
78
|
# @!attribute user
|
|
43
79
|
# @return [UserResponse]
|
|
44
80
|
attr_accessor :user
|
|
@@ -53,9 +89,21 @@ module GetStream
|
|
|
53
89
|
@id = attributes[:id] || attributes['id']
|
|
54
90
|
@status = attributes[:status] || attributes['status']
|
|
55
91
|
@updated_at = attributes[:updated_at] || attributes['updated_at']
|
|
92
|
+
@ai_text_severity = attributes[:ai_text_severity] || attributes['ai_text_severity'] || nil
|
|
93
|
+
@channel_cid = attributes[:channel_cid] || attributes['channel_cid'] || nil
|
|
94
|
+
@config_key = attributes[:config_key] || attributes['config_key'] || nil
|
|
56
95
|
@decision_reason = attributes[:decision_reason] || attributes['decision_reason'] || nil
|
|
96
|
+
@recommended_action = attributes[:recommended_action] || attributes['recommended_action'] || nil
|
|
97
|
+
@review_queue_item_id = attributes[:review_queue_item_id] || attributes['review_queue_item_id'] || nil
|
|
98
|
+
@severity = attributes[:severity] || attributes['severity'] || nil
|
|
99
|
+
@actions = attributes[:actions] || attributes['actions'] || nil
|
|
57
100
|
@attachments = attributes[:attachments] || attributes['attachments'] || nil
|
|
101
|
+
@flag_labels = attributes[:flag_labels] || attributes['flag_labels'] || nil
|
|
102
|
+
@flag_types = attributes[:flag_types] || attributes['flag_types'] || nil
|
|
103
|
+
@flags = attributes[:flags] || attributes['flags'] || nil
|
|
58
104
|
@entity_content = attributes[:entity_content] || attributes['entity_content'] || nil
|
|
105
|
+
@moderation_action = attributes[:moderation_action] || attributes['moderation_action'] || nil
|
|
106
|
+
@original_moderation_action = attributes[:original_moderation_action] || attributes['original_moderation_action'] || nil
|
|
59
107
|
@user = attributes[:user] || attributes['user'] || nil
|
|
60
108
|
end
|
|
61
109
|
|
|
@@ -69,9 +117,21 @@ module GetStream
|
|
|
69
117
|
id: 'id',
|
|
70
118
|
status: 'status',
|
|
71
119
|
updated_at: 'updated_at',
|
|
120
|
+
ai_text_severity: 'ai_text_severity',
|
|
121
|
+
channel_cid: 'channel_cid',
|
|
122
|
+
config_key: 'config_key',
|
|
72
123
|
decision_reason: 'decision_reason',
|
|
124
|
+
recommended_action: 'recommended_action',
|
|
125
|
+
review_queue_item_id: 'review_queue_item_id',
|
|
126
|
+
severity: 'severity',
|
|
127
|
+
actions: 'actions',
|
|
73
128
|
attachments: 'attachments',
|
|
129
|
+
flag_labels: 'flag_labels',
|
|
130
|
+
flag_types: 'flag_types',
|
|
131
|
+
flags: 'flags',
|
|
74
132
|
entity_content: 'entity_content',
|
|
133
|
+
moderation_action: 'moderation_action',
|
|
134
|
+
original_moderation_action: 'original_moderation_action',
|
|
75
135
|
user: 'user'
|
|
76
136
|
}
|
|
77
137
|
end
|
|
@@ -18,6 +18,9 @@ module GetStream
|
|
|
18
18
|
# @!attribute entity_type
|
|
19
19
|
# @return [String] Type of entity being appealed (e.g., message, user)
|
|
20
20
|
attr_accessor :entity_type
|
|
21
|
+
# @!attribute review_queue_item_id
|
|
22
|
+
# @return [String] ID of the review queue item (flagged message) that triggered the ban. Applicable only for user ban appeals.
|
|
23
|
+
attr_accessor :review_queue_item_id
|
|
21
24
|
# @!attribute user_id
|
|
22
25
|
# @return [String]
|
|
23
26
|
attr_accessor :user_id
|
|
@@ -34,6 +37,7 @@ module GetStream
|
|
|
34
37
|
@appeal_reason = attributes[:appeal_reason] || attributes['appeal_reason']
|
|
35
38
|
@entity_id = attributes[:entity_id] || attributes['entity_id']
|
|
36
39
|
@entity_type = attributes[:entity_type] || attributes['entity_type']
|
|
40
|
+
@review_queue_item_id = attributes[:review_queue_item_id] || attributes['review_queue_item_id'] || nil
|
|
37
41
|
@user_id = attributes[:user_id] || attributes['user_id'] || nil
|
|
38
42
|
@attachments = attributes[:attachments] || attributes['attachments'] || nil
|
|
39
43
|
@user = attributes[:user] || attributes['user'] || nil
|
|
@@ -45,6 +49,7 @@ module GetStream
|
|
|
45
49
|
appeal_reason: 'appeal_reason',
|
|
46
50
|
entity_id: 'entity_id',
|
|
47
51
|
entity_type: 'entity_type',
|
|
52
|
+
review_queue_item_id: 'review_queue_item_id',
|
|
48
53
|
user_id: 'user_id',
|
|
49
54
|
attachments: 'attachments',
|
|
50
55
|
user: 'user'
|
|
@@ -9,12 +9,18 @@ module GetStream
|
|
|
9
9
|
class BlockListResponse < GetStream::BaseModel
|
|
10
10
|
|
|
11
11
|
# Model attributes
|
|
12
|
+
# @!attribute is_confusable_folding_enabled
|
|
13
|
+
# @return [Boolean]
|
|
14
|
+
attr_accessor :is_confusable_folding_enabled
|
|
12
15
|
# @!attribute is_leet_check_enabled
|
|
13
16
|
# @return [Boolean]
|
|
14
17
|
attr_accessor :is_leet_check_enabled
|
|
15
18
|
# @!attribute is_plural_check_enabled
|
|
16
19
|
# @return [Boolean]
|
|
17
20
|
attr_accessor :is_plural_check_enabled
|
|
21
|
+
# @!attribute is_substring_matching_enabled
|
|
22
|
+
# @return [Boolean]
|
|
23
|
+
attr_accessor :is_substring_matching_enabled
|
|
18
24
|
# @!attribute name
|
|
19
25
|
# @return [String] Block list name
|
|
20
26
|
attr_accessor :name
|
|
@@ -40,8 +46,10 @@ module GetStream
|
|
|
40
46
|
# Initialize with attributes
|
|
41
47
|
def initialize(attributes = {})
|
|
42
48
|
super(attributes)
|
|
49
|
+
@is_confusable_folding_enabled = attributes[:is_confusable_folding_enabled] || attributes['is_confusable_folding_enabled']
|
|
43
50
|
@is_leet_check_enabled = attributes[:is_leet_check_enabled] || attributes['is_leet_check_enabled']
|
|
44
51
|
@is_plural_check_enabled = attributes[:is_plural_check_enabled] || attributes['is_plural_check_enabled']
|
|
52
|
+
@is_substring_matching_enabled = attributes[:is_substring_matching_enabled] || attributes['is_substring_matching_enabled']
|
|
45
53
|
@name = attributes[:name] || attributes['name']
|
|
46
54
|
@type = attributes[:type] || attributes['type']
|
|
47
55
|
@words = attributes[:words] || attributes['words']
|
|
@@ -54,8 +62,10 @@ module GetStream
|
|
|
54
62
|
# Override field mappings for JSON serialization
|
|
55
63
|
def self.json_field_mappings
|
|
56
64
|
{
|
|
65
|
+
is_confusable_folding_enabled: 'is_confusable_folding_enabled',
|
|
57
66
|
is_leet_check_enabled: 'is_leet_check_enabled',
|
|
58
67
|
is_plural_check_enabled: 'is_plural_check_enabled',
|
|
68
|
+
is_substring_matching_enabled: 'is_substring_matching_enabled',
|
|
59
69
|
name: 'name',
|
|
60
70
|
type: 'type',
|
|
61
71
|
words: 'words',
|