getstream-ruby 6.1.0 → 6.1.1
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/README.md +14 -0
- data/lib/getstream_ruby/client.rb +16 -5
- data/lib/getstream_ruby/configuration.rb +32 -5
- data/lib/getstream_ruby/generated/models/add_activity_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/add_reaction_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/async_export_error_event.rb +1 -1
- data/lib/getstream_ruby/generated/models/bodyguard_profile_summary.rb +6 -1
- data/lib/getstream_ruby/generated/models/chat_draft_payload_response.rb +91 -0
- data/lib/getstream_ruby/generated/models/chat_draft_response.rb +56 -0
- data/lib/getstream_ruby/generated/models/chat_message_response.rb +59 -4
- data/lib/getstream_ruby/generated/models/chat_moderation_v2_response.rb +66 -0
- data/lib/getstream_ruby/generated/models/chat_reaction_group_response.rb +51 -0
- data/lib/getstream_ruby/generated/models/chat_reaction_group_user_response.rb +41 -0
- data/lib/getstream_ruby/generated/models/chat_reaction_response.rb +66 -0
- data/lib/getstream_ruby/generated/models/chat_reminder_response_data.rb +66 -0
- data/lib/getstream_ruby/generated/models/chat_shared_location_response_data.rb +76 -0
- data/lib/getstream_ruby/generated/models/feeds_activity_location.rb +36 -0
- data/lib/getstream_ruby/generated/models/feeds_bookmark_response.rb +61 -0
- data/lib/getstream_ruby/generated/models/feeds_enriched_collection_response.rb +61 -0
- data/lib/getstream_ruby/generated/models/feeds_feed_response.rb +116 -0
- data/lib/getstream_ruby/generated/models/feeds_notification_comment.rb +46 -0
- data/lib/getstream_ruby/generated/models/feeds_notification_context.rb +36 -0
- data/lib/getstream_ruby/generated/models/feeds_notification_parent_activity.rb +51 -0
- data/lib/getstream_ruby/generated/models/feeds_notification_target.rb +71 -0
- data/lib/getstream_ruby/generated/models/feeds_notification_trigger.rb +46 -0
- data/lib/getstream_ruby/generated/models/feeds_reaction_group_response.rb +3 -3
- data/lib/getstream_ruby/generated/models/feeds_reaction_response.rb +6 -6
- data/lib/getstream_ruby/generated/models/feeds_v3_activity_response.rb +66 -6
- data/lib/getstream_ruby/generated/models/feeds_v3_comment_response.rb +17 -2
- data/lib/getstream_ruby/generated/models/submit_moderation_feedback_request.rb +71 -0
- data/lib/getstream_ruby/generated/models/submit_moderation_feedback_response.rb +31 -0
- data/lib/getstream_ruby/generated/models/update_app_request.rb +5 -0
- data/lib/getstream_ruby/generated/models/upsert_activities_request.rb +5 -0
- data/lib/getstream_ruby/generated/moderation_client.rb +17 -0
- data/lib/getstream_ruby/version.rb +1 -1
- data/lib/getstream_ruby.rb +2 -3
- metadata +21 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5f8a1dd8b4379c6af81682b352877f55c651f081265e87cc5ec08a477b19c91d
|
|
4
|
+
data.tar.gz: 7b46eb14dac0d23a0f76223244125ec4ff54ee2130f5b554fae68e363ac7ac00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b88721605b6c6cc61769dee8c0940ad9b351676a7ed77c0ac9799f898dc3c297534dff333710617ebd4de527387b3273b66a31c7b49808d18f08f908b91d172
|
|
7
|
+
data.tar.gz: 58ccb9e4f16e22cce7dfff31c915f9c2c4c9be2a3f5a3e14ad6c31182f1ebb4da3cdecf63321ca19920abe15be0ce1a669e248ceaa80aab99c4a3413150669ea
|
data/README.md
CHANGED
|
@@ -36,9 +36,23 @@ require 'getstream_ruby'
|
|
|
36
36
|
client = GetStreamRuby.manual(
|
|
37
37
|
api_key: "your_api_key",
|
|
38
38
|
api_secret: "your_api_secret",
|
|
39
|
+
# Optional HTTP tuning for keep-alive / connection reuse
|
|
40
|
+
connection_keep_alive: true,
|
|
41
|
+
# Optional: bring your own Faraday adapter (default is Faraday.default_adapter)
|
|
42
|
+
faraday_adapter: :net_http,
|
|
43
|
+
faraday_adapter_options: {
|
|
44
|
+
# adapter-specific options
|
|
45
|
+
}
|
|
39
46
|
)
|
|
40
47
|
```
|
|
41
48
|
|
|
49
|
+
You can also set these via environment variables:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
STREAM_CONNECTION_KEEP_ALIVE=true
|
|
53
|
+
STREAM_FARADAY_ADAPTER=net_http
|
|
54
|
+
```
|
|
55
|
+
|
|
42
56
|
### Method 2: .env File
|
|
43
57
|
|
|
44
58
|
Create a `.env` file in your project root:
|
|
@@ -21,16 +21,15 @@ module GetStreamRuby
|
|
|
21
21
|
|
|
22
22
|
attr_reader :configuration
|
|
23
23
|
|
|
24
|
-
def initialize(config = nil, api_key: nil, api_secret: nil,
|
|
24
|
+
def initialize(config = nil, api_key: nil, api_secret: nil, **options)
|
|
25
25
|
@configuration = config || GetStreamRuby.configuration
|
|
26
26
|
|
|
27
27
|
# Create new configuration with overrides if any parameters provided
|
|
28
|
-
if api_key || api_secret ||
|
|
28
|
+
if api_key || api_secret || !options.empty?
|
|
29
29
|
@configuration = Configuration.with_overrides(
|
|
30
30
|
api_key: api_key,
|
|
31
31
|
api_secret: api_secret,
|
|
32
|
-
|
|
33
|
-
timeout: timeout,
|
|
32
|
+
**options,
|
|
34
33
|
)
|
|
35
34
|
end
|
|
36
35
|
|
|
@@ -131,12 +130,24 @@ module GetStreamRuby
|
|
|
131
130
|
backoff_factor: 2,
|
|
132
131
|
}
|
|
133
132
|
conn.response :json, content_type: /\bjson$/
|
|
134
|
-
conn.
|
|
133
|
+
conn.headers['Connection'] = 'keep-alive' if @configuration.connection_keep_alive
|
|
134
|
+
configure_adapter(conn)
|
|
135
135
|
conn.options.timeout = @configuration.timeout
|
|
136
136
|
|
|
137
137
|
end
|
|
138
138
|
end
|
|
139
139
|
|
|
140
|
+
def configure_adapter(connection)
|
|
141
|
+
adapter = @configuration.faraday_adapter || Faraday.default_adapter
|
|
142
|
+
adapter_options = @configuration.faraday_adapter_options || {}
|
|
143
|
+
connection.adapter(adapter, **adapter_options)
|
|
144
|
+
rescue Faraday::Error, ArgumentError => e
|
|
145
|
+
@configuration.logger&.warn(
|
|
146
|
+
"Falling back to #{Faraday.default_adapter}: could not use adapter #{adapter} (#{e.message})",
|
|
147
|
+
)
|
|
148
|
+
connection.adapter Faraday.default_adapter
|
|
149
|
+
end
|
|
150
|
+
|
|
140
151
|
def generate_auth_header
|
|
141
152
|
JWT.encode(
|
|
142
153
|
{
|
|
@@ -4,9 +4,21 @@ module GetStreamRuby
|
|
|
4
4
|
|
|
5
5
|
class Configuration
|
|
6
6
|
|
|
7
|
-
attr_accessor :api_key, :api_secret, :base_url, :timeout, :logger
|
|
7
|
+
attr_accessor :api_key, :api_secret, :base_url, :timeout, :logger, :faraday_adapter, :faraday_adapter_options,
|
|
8
|
+
:connection_keep_alive
|
|
9
|
+
|
|
10
|
+
def initialize(api_key: nil, api_secret: nil, use_env: true, **options)
|
|
11
|
+
base_url = options[:base_url]
|
|
12
|
+
timeout = options[:timeout]
|
|
13
|
+
http_options = options[:http_options] || {}
|
|
14
|
+
faraday_adapter = options[:faraday_adapter] || http_options[:faraday_adapter]
|
|
15
|
+
faraday_adapter_options = options[:faraday_adapter_options] || http_options[:faraday_adapter_options]
|
|
16
|
+
connection_keep_alive = if options.key?(:connection_keep_alive)
|
|
17
|
+
options[:connection_keep_alive]
|
|
18
|
+
else
|
|
19
|
+
http_options[:connection_keep_alive]
|
|
20
|
+
end
|
|
8
21
|
|
|
9
|
-
def initialize(api_key: nil, api_secret: nil, base_url: nil, timeout: nil, use_env: true)
|
|
10
22
|
if use_env
|
|
11
23
|
@api_key = api_key || ENV.fetch('STREAM_API_KEY', nil)
|
|
12
24
|
@api_secret = api_secret || ENV.fetch('STREAM_API_SECRET', nil)
|
|
@@ -20,6 +32,13 @@ module GetStreamRuby
|
|
|
20
32
|
@timeout = timeout || 30
|
|
21
33
|
end
|
|
22
34
|
|
|
35
|
+
@faraday_adapter = (faraday_adapter || ENV.fetch('STREAM_FARADAY_ADAPTER', nil))&.to_sym
|
|
36
|
+
@faraday_adapter_options = faraday_adapter_options || default_adapter_options
|
|
37
|
+
@connection_keep_alive = if connection_keep_alive.nil?
|
|
38
|
+
ENV.fetch('STREAM_CONNECTION_KEEP_ALIVE', 'true') == 'true'
|
|
39
|
+
else
|
|
40
|
+
connection_keep_alive
|
|
41
|
+
end
|
|
23
42
|
@logger = nil
|
|
24
43
|
end
|
|
25
44
|
|
|
@@ -38,6 +57,9 @@ module GetStreamRuby
|
|
|
38
57
|
api_secret: @api_secret,
|
|
39
58
|
base_url: @base_url,
|
|
40
59
|
timeout: @timeout,
|
|
60
|
+
faraday_adapter: @faraday_adapter,
|
|
61
|
+
faraday_adapter_options: @faraday_adapter_options.dup,
|
|
62
|
+
connection_keep_alive: @connection_keep_alive,
|
|
41
63
|
)
|
|
42
64
|
end
|
|
43
65
|
|
|
@@ -47,9 +69,8 @@ module GetStreamRuby
|
|
|
47
69
|
end
|
|
48
70
|
|
|
49
71
|
# Method 1: Manual configuration (no environment variables)
|
|
50
|
-
def self.manual(api_key:, api_secret:,
|
|
51
|
-
new(api_key: api_key, api_secret: api_secret,
|
|
52
|
-
base_url: base_url, timeout: timeout, use_env: false)
|
|
72
|
+
def self.manual(api_key:, api_secret:, **options)
|
|
73
|
+
new(api_key: api_key, api_secret: api_secret, use_env: false, **options)
|
|
53
74
|
end
|
|
54
75
|
|
|
55
76
|
# Method 2: .env file (loads .env file via dotenv gem, falls back to env vars)
|
|
@@ -63,6 +84,12 @@ module GetStreamRuby
|
|
|
63
84
|
new(use_env: true)
|
|
64
85
|
end
|
|
65
86
|
|
|
87
|
+
private
|
|
88
|
+
|
|
89
|
+
def default_adapter_options
|
|
90
|
+
{}
|
|
91
|
+
end
|
|
92
|
+
|
|
66
93
|
end
|
|
67
94
|
|
|
68
95
|
end
|
|
@@ -22,6 +22,9 @@ module GetStream
|
|
|
22
22
|
# @!attribute create_notification_activity
|
|
23
23
|
# @return [Boolean] Whether to create notification activities for mentioned users
|
|
24
24
|
attr_accessor :create_notification_activity
|
|
25
|
+
# @!attribute create_users
|
|
26
|
+
# @return [Boolean]
|
|
27
|
+
attr_accessor :create_users
|
|
25
28
|
# @!attribute enrich_own_fields
|
|
26
29
|
# @return [Boolean]
|
|
27
30
|
attr_accessor :enrich_own_fields
|
|
@@ -93,6 +96,7 @@ module GetStream
|
|
|
93
96
|
@feeds = attributes[:feeds] || attributes['feeds']
|
|
94
97
|
@copy_custom_to_notification = attributes[:copy_custom_to_notification] || attributes['copy_custom_to_notification'] || nil
|
|
95
98
|
@create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil
|
|
99
|
+
@create_users = attributes[:create_users] || attributes['create_users'] || nil
|
|
96
100
|
@enrich_own_fields = attributes[:enrich_own_fields] || attributes['enrich_own_fields'] || nil
|
|
97
101
|
@expires_at = attributes[:expires_at] || attributes['expires_at'] || nil
|
|
98
102
|
@force_moderation = attributes[:force_moderation] || attributes['force_moderation'] || nil
|
|
@@ -123,6 +127,7 @@ module GetStream
|
|
|
123
127
|
feeds: 'feeds',
|
|
124
128
|
copy_custom_to_notification: 'copy_custom_to_notification',
|
|
125
129
|
create_notification_activity: 'create_notification_activity',
|
|
130
|
+
create_users: 'create_users',
|
|
126
131
|
enrich_own_fields: 'enrich_own_fields',
|
|
127
132
|
expires_at: 'expires_at',
|
|
128
133
|
force_moderation: 'force_moderation',
|
|
@@ -19,6 +19,9 @@ module GetStream
|
|
|
19
19
|
# @!attribute create_notification_activity
|
|
20
20
|
# @return [Boolean] Whether to create a notification activity for this reaction
|
|
21
21
|
attr_accessor :create_notification_activity
|
|
22
|
+
# @!attribute create_users
|
|
23
|
+
# @return [Boolean] Server-side only. If true, auto-creates the reacting user identified by user_id when they don't already exist. Default: false.
|
|
24
|
+
attr_accessor :create_users
|
|
22
25
|
# @!attribute enforce_unique
|
|
23
26
|
# @return [Boolean] Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one)
|
|
24
27
|
attr_accessor :enforce_unique
|
|
@@ -41,6 +44,7 @@ module GetStream
|
|
|
41
44
|
@type = attributes[:type] || attributes['type']
|
|
42
45
|
@copy_custom_to_notification = attributes[:copy_custom_to_notification] || attributes['copy_custom_to_notification'] || nil
|
|
43
46
|
@create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil
|
|
47
|
+
@create_users = attributes[:create_users] || attributes['create_users'] || nil
|
|
44
48
|
@enforce_unique = attributes[:enforce_unique] || attributes['enforce_unique'] || nil
|
|
45
49
|
@skip_push = attributes[:skip_push] || attributes['skip_push'] || nil
|
|
46
50
|
@user_id = attributes[:user_id] || attributes['user_id'] || nil
|
|
@@ -54,6 +58,7 @@ module GetStream
|
|
|
54
58
|
type: 'type',
|
|
55
59
|
copy_custom_to_notification: 'copy_custom_to_notification',
|
|
56
60
|
create_notification_activity: 'create_notification_activity',
|
|
61
|
+
create_users: 'create_users',
|
|
57
62
|
enforce_unique: 'enforce_unique',
|
|
58
63
|
skip_push: 'skip_push',
|
|
59
64
|
user_id: 'user_id',
|
|
@@ -43,7 +43,7 @@ module GetStream
|
|
|
43
43
|
@started_at = attributes[:started_at] || attributes['started_at']
|
|
44
44
|
@task_id = attributes[:task_id] || attributes['task_id']
|
|
45
45
|
@custom = attributes[:custom] || attributes['custom']
|
|
46
|
-
@type = attributes[:type] || attributes['type'] || "export.
|
|
46
|
+
@type = attributes[:type] || attributes['type'] || "export.users.error"
|
|
47
47
|
@received_at = attributes[:received_at] || attributes['received_at'] || nil
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -15,19 +15,24 @@ module GetStream
|
|
|
15
15
|
# @!attribute display_name
|
|
16
16
|
# @return [String]
|
|
17
17
|
attr_accessor :display_name
|
|
18
|
+
# @!attribute text_type
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :text_type
|
|
18
21
|
|
|
19
22
|
# Initialize with attributes
|
|
20
23
|
def initialize(attributes = {})
|
|
21
24
|
super(attributes)
|
|
22
25
|
@name = attributes[:name] || attributes['name']
|
|
23
26
|
@display_name = attributes[:display_name] || attributes['display_name'] || nil
|
|
27
|
+
@text_type = attributes[:text_type] || attributes['text_type'] || 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
|
name: 'name',
|
|
30
|
-
display_name: 'display_name'
|
|
34
|
+
display_name: 'display_name',
|
|
35
|
+
text_type: 'text_type'
|
|
31
36
|
}
|
|
32
37
|
end
|
|
33
38
|
end
|
|
@@ -0,0 +1,91 @@
|
|
|
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 ChatDraftPayloadResponse < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute id
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
# @!attribute text
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :text
|
|
18
|
+
# @!attribute custom
|
|
19
|
+
# @return [Object]
|
|
20
|
+
attr_accessor :custom
|
|
21
|
+
# @!attribute html
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :html
|
|
24
|
+
# @!attribute mml
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :mml
|
|
27
|
+
# @!attribute parent_id
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :parent_id
|
|
30
|
+
# @!attribute poll_id
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :poll_id
|
|
33
|
+
# @!attribute quoted_message_id
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :quoted_message_id
|
|
36
|
+
# @!attribute show_in_channel
|
|
37
|
+
# @return [Boolean]
|
|
38
|
+
attr_accessor :show_in_channel
|
|
39
|
+
# @!attribute silent
|
|
40
|
+
# @return [Boolean]
|
|
41
|
+
attr_accessor :silent
|
|
42
|
+
# @!attribute type
|
|
43
|
+
# @return [String]
|
|
44
|
+
attr_accessor :type
|
|
45
|
+
# @!attribute attachments
|
|
46
|
+
# @return [Array<Attachment>]
|
|
47
|
+
attr_accessor :attachments
|
|
48
|
+
# @!attribute mentioned_users
|
|
49
|
+
# @return [Array<UserResponse>]
|
|
50
|
+
attr_accessor :mentioned_users
|
|
51
|
+
|
|
52
|
+
# Initialize with attributes
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
super(attributes)
|
|
55
|
+
@id = attributes[:id] || attributes['id']
|
|
56
|
+
@text = attributes[:text] || attributes['text']
|
|
57
|
+
@custom = attributes[:custom] || attributes['custom']
|
|
58
|
+
@html = attributes[:html] || attributes['html'] || nil
|
|
59
|
+
@mml = attributes[:mml] || attributes['mml'] || nil
|
|
60
|
+
@parent_id = attributes[:parent_id] || attributes['parent_id'] || nil
|
|
61
|
+
@poll_id = attributes[:poll_id] || attributes['poll_id'] || nil
|
|
62
|
+
@quoted_message_id = attributes[:quoted_message_id] || attributes['quoted_message_id'] || nil
|
|
63
|
+
@show_in_channel = attributes[:show_in_channel] || attributes['show_in_channel'] || nil
|
|
64
|
+
@silent = attributes[:silent] || attributes['silent'] || nil
|
|
65
|
+
@type = attributes[:type] || attributes['type'] || nil
|
|
66
|
+
@attachments = attributes[:attachments] || attributes['attachments'] || nil
|
|
67
|
+
@mentioned_users = attributes[:mentioned_users] || attributes['mentioned_users'] || nil
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Override field mappings for JSON serialization
|
|
71
|
+
def self.json_field_mappings
|
|
72
|
+
{
|
|
73
|
+
id: 'id',
|
|
74
|
+
text: 'text',
|
|
75
|
+
custom: 'custom',
|
|
76
|
+
html: 'html',
|
|
77
|
+
mml: 'mml',
|
|
78
|
+
parent_id: 'parent_id',
|
|
79
|
+
poll_id: 'poll_id',
|
|
80
|
+
quoted_message_id: 'quoted_message_id',
|
|
81
|
+
show_in_channel: 'show_in_channel',
|
|
82
|
+
silent: 'silent',
|
|
83
|
+
type: 'type',
|
|
84
|
+
attachments: 'attachments',
|
|
85
|
+
mentioned_users: 'mentioned_users'
|
|
86
|
+
}
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
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 ChatDraftResponse < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute channel_cid
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :channel_cid
|
|
15
|
+
# @!attribute created_at
|
|
16
|
+
# @return [DateTime]
|
|
17
|
+
attr_accessor :created_at
|
|
18
|
+
# @!attribute message
|
|
19
|
+
# @return [ChatDraftPayloadResponse]
|
|
20
|
+
attr_accessor :message
|
|
21
|
+
# @!attribute parent_id
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :parent_id
|
|
24
|
+
# @!attribute parent_message
|
|
25
|
+
# @return [ChatMessageResponse]
|
|
26
|
+
attr_accessor :parent_message
|
|
27
|
+
# @!attribute quoted_message
|
|
28
|
+
# @return [ChatMessageResponse]
|
|
29
|
+
attr_accessor :quoted_message
|
|
30
|
+
|
|
31
|
+
# Initialize with attributes
|
|
32
|
+
def initialize(attributes = {})
|
|
33
|
+
super(attributes)
|
|
34
|
+
@channel_cid = attributes[:channel_cid] || attributes['channel_cid']
|
|
35
|
+
@created_at = attributes[:created_at] || attributes['created_at']
|
|
36
|
+
@message = attributes[:message] || attributes['message']
|
|
37
|
+
@parent_id = attributes[:parent_id] || attributes['parent_id'] || nil
|
|
38
|
+
@parent_message = attributes[:parent_message] || attributes['parent_message'] || nil
|
|
39
|
+
@quoted_message = attributes[:quoted_message] || attributes['quoted_message'] || nil
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Override field mappings for JSON serialization
|
|
43
|
+
def self.json_field_mappings
|
|
44
|
+
{
|
|
45
|
+
channel_cid: 'channel_cid',
|
|
46
|
+
created_at: 'created_at',
|
|
47
|
+
message: 'message',
|
|
48
|
+
parent_id: 'parent_id',
|
|
49
|
+
parent_message: 'parent_message',
|
|
50
|
+
quoted_message: 'quoted_message'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -52,16 +52,16 @@ module GetStream
|
|
|
52
52
|
# @return [DateTime]
|
|
53
53
|
attr_accessor :updated_at
|
|
54
54
|
# @!attribute attachments
|
|
55
|
-
# @return [Array]
|
|
55
|
+
# @return [Array<Attachment>]
|
|
56
56
|
attr_accessor :attachments
|
|
57
57
|
# @!attribute latest_reactions
|
|
58
|
-
# @return [Array]
|
|
58
|
+
# @return [Array<ChatReactionResponse>]
|
|
59
59
|
attr_accessor :latest_reactions
|
|
60
60
|
# @!attribute mentioned_users
|
|
61
61
|
# @return [Array<UserResponse>]
|
|
62
62
|
attr_accessor :mentioned_users
|
|
63
63
|
# @!attribute own_reactions
|
|
64
|
-
# @return [Array]
|
|
64
|
+
# @return [Array<ChatReactionResponse>]
|
|
65
65
|
attr_accessor :own_reactions
|
|
66
66
|
# @!attribute restricted_visibility
|
|
67
67
|
# @return [Array<String>]
|
|
@@ -84,6 +84,9 @@ module GetStream
|
|
|
84
84
|
# @!attribute deleted_at
|
|
85
85
|
# @return [DateTime]
|
|
86
86
|
attr_accessor :deleted_at
|
|
87
|
+
# @!attribute deleted_for_me
|
|
88
|
+
# @return [Boolean]
|
|
89
|
+
attr_accessor :deleted_for_me
|
|
87
90
|
# @!attribute message_text_updated_at
|
|
88
91
|
# @return [DateTime]
|
|
89
92
|
attr_accessor :message_text_updated_at
|
|
@@ -108,18 +111,48 @@ module GetStream
|
|
|
108
111
|
# @!attribute show_in_channel
|
|
109
112
|
# @return [Boolean]
|
|
110
113
|
attr_accessor :show_in_channel
|
|
114
|
+
# @!attribute mentioned_group_ids
|
|
115
|
+
# @return [Array<String>]
|
|
116
|
+
attr_accessor :mentioned_group_ids
|
|
117
|
+
# @!attribute mentioned_roles
|
|
118
|
+
# @return [Array<String>]
|
|
119
|
+
attr_accessor :mentioned_roles
|
|
120
|
+
# @!attribute thread_participants
|
|
121
|
+
# @return [Array<UserResponse>]
|
|
122
|
+
attr_accessor :thread_participants
|
|
123
|
+
# @!attribute draft
|
|
124
|
+
# @return [ChatDraftResponse]
|
|
125
|
+
attr_accessor :draft
|
|
111
126
|
# @!attribute i18n
|
|
112
127
|
# @return [Hash<String, String>]
|
|
113
128
|
attr_accessor :i18n
|
|
114
129
|
# @!attribute image_labels
|
|
115
130
|
# @return [Hash<String, Array<String>>]
|
|
116
131
|
attr_accessor :image_labels
|
|
132
|
+
# @!attribute member
|
|
133
|
+
# @return [ChannelMemberResponse]
|
|
134
|
+
attr_accessor :member
|
|
135
|
+
# @!attribute moderation
|
|
136
|
+
# @return [ChatModerationV2Response]
|
|
137
|
+
attr_accessor :moderation
|
|
117
138
|
# @!attribute pinned_by
|
|
118
139
|
# @return [UserResponse]
|
|
119
140
|
attr_accessor :pinned_by
|
|
141
|
+
# @!attribute poll
|
|
142
|
+
# @return [PollResponseData]
|
|
143
|
+
attr_accessor :poll
|
|
120
144
|
# @!attribute quoted_message
|
|
121
145
|
# @return [ChatMessageResponse]
|
|
122
146
|
attr_accessor :quoted_message
|
|
147
|
+
# @!attribute reaction_groups
|
|
148
|
+
# @return [Hash<String, ChatReactionGroupResponse>]
|
|
149
|
+
attr_accessor :reaction_groups
|
|
150
|
+
# @!attribute reminder
|
|
151
|
+
# @return [ChatReminderResponseData]
|
|
152
|
+
attr_accessor :reminder
|
|
153
|
+
# @!attribute shared_location
|
|
154
|
+
# @return [ChatSharedLocationResponseData]
|
|
155
|
+
attr_accessor :shared_location
|
|
123
156
|
|
|
124
157
|
# Initialize with attributes
|
|
125
158
|
def initialize(attributes = {})
|
|
@@ -149,6 +182,7 @@ module GetStream
|
|
|
149
182
|
@user = attributes[:user] || attributes['user']
|
|
150
183
|
@command = attributes[:command] || attributes['command'] || nil
|
|
151
184
|
@deleted_at = attributes[:deleted_at] || attributes['deleted_at'] || nil
|
|
185
|
+
@deleted_for_me = attributes[:deleted_for_me] || attributes['deleted_for_me'] || nil
|
|
152
186
|
@message_text_updated_at = attributes[:message_text_updated_at] || attributes['message_text_updated_at'] || nil
|
|
153
187
|
@mml = attributes[:mml] || attributes['mml'] || nil
|
|
154
188
|
@parent_id = attributes[:parent_id] || attributes['parent_id'] || nil
|
|
@@ -157,10 +191,20 @@ module GetStream
|
|
|
157
191
|
@poll_id = attributes[:poll_id] || attributes['poll_id'] || nil
|
|
158
192
|
@quoted_message_id = attributes[:quoted_message_id] || attributes['quoted_message_id'] || nil
|
|
159
193
|
@show_in_channel = attributes[:show_in_channel] || attributes['show_in_channel'] || nil
|
|
194
|
+
@mentioned_group_ids = attributes[:mentioned_group_ids] || attributes['mentioned_group_ids'] || nil
|
|
195
|
+
@mentioned_roles = attributes[:mentioned_roles] || attributes['mentioned_roles'] || nil
|
|
196
|
+
@thread_participants = attributes[:thread_participants] || attributes['thread_participants'] || nil
|
|
197
|
+
@draft = attributes[:draft] || attributes['draft'] || nil
|
|
160
198
|
@i18n = attributes[:i18n] || attributes['i18n'] || nil
|
|
161
199
|
@image_labels = attributes[:image_labels] || attributes['image_labels'] || nil
|
|
200
|
+
@member = attributes[:member] || attributes['member'] || nil
|
|
201
|
+
@moderation = attributes[:moderation] || attributes['moderation'] || nil
|
|
162
202
|
@pinned_by = attributes[:pinned_by] || attributes['pinned_by'] || nil
|
|
203
|
+
@poll = attributes[:poll] || attributes['poll'] || nil
|
|
163
204
|
@quoted_message = attributes[:quoted_message] || attributes['quoted_message'] || nil
|
|
205
|
+
@reaction_groups = attributes[:reaction_groups] || attributes['reaction_groups'] || nil
|
|
206
|
+
@reminder = attributes[:reminder] || attributes['reminder'] || nil
|
|
207
|
+
@shared_location = attributes[:shared_location] || attributes['shared_location'] || nil
|
|
164
208
|
end
|
|
165
209
|
|
|
166
210
|
# Override field mappings for JSON serialization
|
|
@@ -191,6 +235,7 @@ module GetStream
|
|
|
191
235
|
user: 'user',
|
|
192
236
|
command: 'command',
|
|
193
237
|
deleted_at: 'deleted_at',
|
|
238
|
+
deleted_for_me: 'deleted_for_me',
|
|
194
239
|
message_text_updated_at: 'message_text_updated_at',
|
|
195
240
|
mml: 'mml',
|
|
196
241
|
parent_id: 'parent_id',
|
|
@@ -199,10 +244,20 @@ module GetStream
|
|
|
199
244
|
poll_id: 'poll_id',
|
|
200
245
|
quoted_message_id: 'quoted_message_id',
|
|
201
246
|
show_in_channel: 'show_in_channel',
|
|
247
|
+
mentioned_group_ids: 'mentioned_group_ids',
|
|
248
|
+
mentioned_roles: 'mentioned_roles',
|
|
249
|
+
thread_participants: 'thread_participants',
|
|
250
|
+
draft: 'draft',
|
|
202
251
|
i18n: 'i18n',
|
|
203
252
|
image_labels: 'image_labels',
|
|
253
|
+
member: 'member',
|
|
254
|
+
moderation: 'moderation',
|
|
204
255
|
pinned_by: 'pinned_by',
|
|
205
|
-
|
|
256
|
+
poll: 'poll',
|
|
257
|
+
quoted_message: 'quoted_message',
|
|
258
|
+
reaction_groups: 'reaction_groups',
|
|
259
|
+
reminder: 'reminder',
|
|
260
|
+
shared_location: 'shared_location'
|
|
206
261
|
}
|
|
207
262
|
end
|
|
208
263
|
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
|
|
4
|
+
|
|
5
|
+
module GetStream
|
|
6
|
+
module Generated
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
class ChatModerationV2Response < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute action
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :action
|
|
15
|
+
# @!attribute original_text
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :original_text
|
|
18
|
+
# @!attribute blocklist_matched
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :blocklist_matched
|
|
21
|
+
# @!attribute platform_circumvented
|
|
22
|
+
# @return [Boolean]
|
|
23
|
+
attr_accessor :platform_circumvented
|
|
24
|
+
# @!attribute semantic_filter_matched
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :semantic_filter_matched
|
|
27
|
+
# @!attribute blocklists_matched
|
|
28
|
+
# @return [Array<String>]
|
|
29
|
+
attr_accessor :blocklists_matched
|
|
30
|
+
# @!attribute image_harms
|
|
31
|
+
# @return [Array<String>]
|
|
32
|
+
attr_accessor :image_harms
|
|
33
|
+
# @!attribute text_harms
|
|
34
|
+
# @return [Array<String>]
|
|
35
|
+
attr_accessor :text_harms
|
|
36
|
+
|
|
37
|
+
# Initialize with attributes
|
|
38
|
+
def initialize(attributes = {})
|
|
39
|
+
super(attributes)
|
|
40
|
+
@action = attributes[:action] || attributes['action']
|
|
41
|
+
@original_text = attributes[:original_text] || attributes['original_text']
|
|
42
|
+
@blocklist_matched = attributes[:blocklist_matched] || attributes['blocklist_matched'] || nil
|
|
43
|
+
@platform_circumvented = attributes[:platform_circumvented] || attributes['platform_circumvented'] || nil
|
|
44
|
+
@semantic_filter_matched = attributes[:semantic_filter_matched] || attributes['semantic_filter_matched'] || nil
|
|
45
|
+
@blocklists_matched = attributes[:blocklists_matched] || attributes['blocklists_matched'] || nil
|
|
46
|
+
@image_harms = attributes[:image_harms] || attributes['image_harms'] || nil
|
|
47
|
+
@text_harms = attributes[:text_harms] || attributes['text_harms'] || nil
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Override field mappings for JSON serialization
|
|
51
|
+
def self.json_field_mappings
|
|
52
|
+
{
|
|
53
|
+
action: 'action',
|
|
54
|
+
original_text: 'original_text',
|
|
55
|
+
blocklist_matched: 'blocklist_matched',
|
|
56
|
+
platform_circumvented: 'platform_circumvented',
|
|
57
|
+
semantic_filter_matched: 'semantic_filter_matched',
|
|
58
|
+
blocklists_matched: 'blocklists_matched',
|
|
59
|
+
image_harms: 'image_harms',
|
|
60
|
+
text_harms: 'text_harms'
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
|
|
4
|
+
|
|
5
|
+
module GetStream
|
|
6
|
+
module Generated
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
class ChatReactionGroupResponse < GetStream::BaseModel
|
|
10
|
+
|
|
11
|
+
# Model attributes
|
|
12
|
+
# @!attribute count
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :count
|
|
15
|
+
# @!attribute first_reaction_at
|
|
16
|
+
# @return [DateTime]
|
|
17
|
+
attr_accessor :first_reaction_at
|
|
18
|
+
# @!attribute last_reaction_at
|
|
19
|
+
# @return [DateTime]
|
|
20
|
+
attr_accessor :last_reaction_at
|
|
21
|
+
# @!attribute sum_scores
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
attr_accessor :sum_scores
|
|
24
|
+
# @!attribute latest_reactions_by
|
|
25
|
+
# @return [Array<ChatReactionGroupUserResponse>]
|
|
26
|
+
attr_accessor :latest_reactions_by
|
|
27
|
+
|
|
28
|
+
# Initialize with attributes
|
|
29
|
+
def initialize(attributes = {})
|
|
30
|
+
super(attributes)
|
|
31
|
+
@count = attributes[:count] || attributes['count']
|
|
32
|
+
@first_reaction_at = attributes[:first_reaction_at] || attributes['first_reaction_at']
|
|
33
|
+
@last_reaction_at = attributes[:last_reaction_at] || attributes['last_reaction_at']
|
|
34
|
+
@sum_scores = attributes[:sum_scores] || attributes['sum_scores']
|
|
35
|
+
@latest_reactions_by = attributes[:latest_reactions_by] || attributes['latest_reactions_by']
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Override field mappings for JSON serialization
|
|
39
|
+
def self.json_field_mappings
|
|
40
|
+
{
|
|
41
|
+
count: 'count',
|
|
42
|
+
first_reaction_at: 'first_reaction_at',
|
|
43
|
+
last_reaction_at: 'last_reaction_at',
|
|
44
|
+
sum_scores: 'sum_scores',
|
|
45
|
+
latest_reactions_by: 'latest_reactions_by'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|