moderation_api 2.14.0 → 2.16.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/CHANGELOG.md +17 -0
- data/README.md +1 -1
- data/lib/moderation_api/internal/type/union.rb +25 -0
- data/lib/moderation_api/models/action_create_params.rb +1 -45
- data/lib/moderation_api/models/action_list_response.rb +1 -57
- data/lib/moderation_api/models/action_retrieve_response.rb +1 -57
- data/lib/moderation_api/models/action_update_params.rb +1 -45
- data/lib/moderation_api/models/author_create_params.rb +9 -1
- data/lib/moderation_api/models/author_create_response.rb +9 -1
- data/lib/moderation_api/models/author_list_response.rb +9 -1
- data/lib/moderation_api/models/author_retrieve_response.rb +9 -1
- data/lib/moderation_api/models/author_update_params.rb +9 -1
- data/lib/moderation_api/models/author_update_response.rb +9 -1
- data/lib/moderation_api/models/content_submit_params.rb +12 -1
- data/lib/moderation_api/models/webhook_event.rb +6231 -0
- data/lib/moderation_api/models.rb +2 -0
- data/lib/moderation_api/resources/actions.rb +2 -6
- data/lib/moderation_api/resources/authors.rb +6 -2
- data/lib/moderation_api/version.rb +1 -1
- data/lib/moderation_api.rb +1 -0
- data/rbi/moderation_api/models/action_create_params.rbi +0 -80
- data/rbi/moderation_api/models/action_list_response.rbi +0 -85
- data/rbi/moderation_api/models/action_retrieve_response.rbi +0 -85
- data/rbi/moderation_api/models/action_update_params.rbi +0 -80
- data/rbi/moderation_api/models/author_create_params.rbi +8 -0
- data/rbi/moderation_api/models/author_create_response.rbi +8 -0
- data/rbi/moderation_api/models/author_list_response.rbi +8 -0
- data/rbi/moderation_api/models/author_retrieve_response.rbi +8 -0
- data/rbi/moderation_api/models/author_update_params.rbi +8 -0
- data/rbi/moderation_api/models/author_update_response.rbi +8 -0
- data/rbi/moderation_api/models/content_submit_params.rbi +13 -0
- data/rbi/moderation_api/models/webhook_event.rbi +11307 -0
- data/rbi/moderation_api/models.rbi +2 -0
- data/rbi/moderation_api/resources/actions.rbi +0 -8
- data/rbi/moderation_api/resources/authors.rbi +6 -0
- data/sig/moderation_api/models/action_create_params.rbs +1 -39
- data/sig/moderation_api/models/action_list_response.rbs +0 -42
- data/sig/moderation_api/models/action_retrieve_response.rbs +0 -42
- data/sig/moderation_api/models/action_update_params.rbs +1 -39
- data/sig/moderation_api/models/author_create_params.rbs +5 -0
- data/sig/moderation_api/models/author_create_response.rbs +5 -0
- data/sig/moderation_api/models/author_list_response.rbs +5 -0
- data/sig/moderation_api/models/author_retrieve_response.rbs +5 -0
- data/sig/moderation_api/models/author_update_params.rbs +5 -0
- data/sig/moderation_api/models/author_update_response.rbs +5 -0
- data/sig/moderation_api/models/content_submit_params.rbs +7 -0
- data/sig/moderation_api/models/webhook_event.rbs +4746 -0
- data/sig/moderation_api/models.rbs +2 -0
- data/sig/moderation_api/resources/actions.rbs +0 -2
- data/sig/moderation_api/resources/authors.rbs +2 -0
- metadata +5 -2
|
@@ -102,6 +102,10 @@ module ModerationAPI
|
|
|
102
102
|
end
|
|
103
103
|
attr_writer :trust_level
|
|
104
104
|
|
|
105
|
+
# The author's company or organization
|
|
106
|
+
sig { returns(T.nilable(String)) }
|
|
107
|
+
attr_accessor :company
|
|
108
|
+
|
|
105
109
|
# Author email address
|
|
106
110
|
sig { returns(T.nilable(String)) }
|
|
107
111
|
attr_accessor :email
|
|
@@ -147,6 +151,7 @@ module ModerationAPI
|
|
|
147
151
|
ModerationAPI::Models::AuthorRetrieveResponse::Status::OrSymbol,
|
|
148
152
|
trust_level:
|
|
149
153
|
ModerationAPI::Models::AuthorRetrieveResponse::TrustLevel::OrHash,
|
|
154
|
+
company: T.nilable(String),
|
|
150
155
|
email: T.nilable(String),
|
|
151
156
|
external_id: T.nilable(String),
|
|
152
157
|
external_link: T.nilable(String),
|
|
@@ -173,6 +178,8 @@ module ModerationAPI
|
|
|
173
178
|
# Current author status
|
|
174
179
|
status:,
|
|
175
180
|
trust_level:,
|
|
181
|
+
# The author's company or organization
|
|
182
|
+
company: nil,
|
|
176
183
|
# Author email address
|
|
177
184
|
email: nil,
|
|
178
185
|
# The author's ID from your system
|
|
@@ -206,6 +213,7 @@ module ModerationAPI
|
|
|
206
213
|
ModerationAPI::Models::AuthorRetrieveResponse::Status::TaggedSymbol,
|
|
207
214
|
trust_level:
|
|
208
215
|
ModerationAPI::Models::AuthorRetrieveResponse::TrustLevel,
|
|
216
|
+
company: T.nilable(String),
|
|
209
217
|
email: T.nilable(String),
|
|
210
218
|
external_id: T.nilable(String),
|
|
211
219
|
external_link: T.nilable(String),
|
|
@@ -18,6 +18,10 @@ module ModerationAPI
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
21
|
+
# The author's company or organization
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_accessor :company
|
|
24
|
+
|
|
21
25
|
# Author email address
|
|
22
26
|
sig { returns(T.nilable(String)) }
|
|
23
27
|
attr_accessor :email
|
|
@@ -66,6 +70,7 @@ module ModerationAPI
|
|
|
66
70
|
sig do
|
|
67
71
|
params(
|
|
68
72
|
id: String,
|
|
73
|
+
company: T.nilable(String),
|
|
69
74
|
email: T.nilable(String),
|
|
70
75
|
external_link: T.nilable(String),
|
|
71
76
|
first_seen: Float,
|
|
@@ -80,6 +85,8 @@ module ModerationAPI
|
|
|
80
85
|
def self.new(
|
|
81
86
|
# Either external ID or the ID assigned by moderation API.
|
|
82
87
|
id:,
|
|
88
|
+
# The author's company or organization
|
|
89
|
+
company: nil,
|
|
83
90
|
# Author email address
|
|
84
91
|
email: nil,
|
|
85
92
|
# URL of the author's external profile
|
|
@@ -104,6 +111,7 @@ module ModerationAPI
|
|
|
104
111
|
override.returns(
|
|
105
112
|
{
|
|
106
113
|
id: String,
|
|
114
|
+
company: T.nilable(String),
|
|
107
115
|
email: T.nilable(String),
|
|
108
116
|
external_link: T.nilable(String),
|
|
109
117
|
first_seen: Float,
|
|
@@ -99,6 +99,10 @@ module ModerationAPI
|
|
|
99
99
|
end
|
|
100
100
|
attr_writer :trust_level
|
|
101
101
|
|
|
102
|
+
# The author's company or organization
|
|
103
|
+
sig { returns(T.nilable(String)) }
|
|
104
|
+
attr_accessor :company
|
|
105
|
+
|
|
102
106
|
# Author email address
|
|
103
107
|
sig { returns(T.nilable(String)) }
|
|
104
108
|
attr_accessor :email
|
|
@@ -142,6 +146,7 @@ module ModerationAPI
|
|
|
142
146
|
status: ModerationAPI::Models::AuthorUpdateResponse::Status::OrSymbol,
|
|
143
147
|
trust_level:
|
|
144
148
|
ModerationAPI::Models::AuthorUpdateResponse::TrustLevel::OrHash,
|
|
149
|
+
company: T.nilable(String),
|
|
145
150
|
email: T.nilable(String),
|
|
146
151
|
external_id: T.nilable(String),
|
|
147
152
|
external_link: T.nilable(String),
|
|
@@ -168,6 +173,8 @@ module ModerationAPI
|
|
|
168
173
|
# Current author status
|
|
169
174
|
status:,
|
|
170
175
|
trust_level:,
|
|
176
|
+
# The author's company or organization
|
|
177
|
+
company: nil,
|
|
171
178
|
# Author email address
|
|
172
179
|
email: nil,
|
|
173
180
|
# The author's ID from your system
|
|
@@ -201,6 +208,7 @@ module ModerationAPI
|
|
|
201
208
|
ModerationAPI::Models::AuthorUpdateResponse::Status::TaggedSymbol,
|
|
202
209
|
trust_level:
|
|
203
210
|
ModerationAPI::Models::AuthorUpdateResponse::TrustLevel,
|
|
211
|
+
company: T.nilable(String),
|
|
204
212
|
email: T.nilable(String),
|
|
205
213
|
external_id: T.nilable(String),
|
|
206
214
|
external_link: T.nilable(String),
|
|
@@ -1889,6 +1889,14 @@ module ModerationAPI
|
|
|
1889
1889
|
sig { params(blocklist_wordlist_ids: T::Array[String]).void }
|
|
1890
1890
|
attr_writer :blocklist_wordlist_ids
|
|
1891
1891
|
|
|
1892
|
+
# When true, any URL detected as a free link shortener (bit.ly, t.co, tinyurl,
|
|
1893
|
+
# etc.) is always flagged regardless of risk score. Allowlist matches still win.
|
|
1894
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1895
|
+
attr_reader :flag_link_shorteners
|
|
1896
|
+
|
|
1897
|
+
sig { params(flag_link_shorteners: T::Boolean).void }
|
|
1898
|
+
attr_writer :flag_link_shorteners
|
|
1899
|
+
|
|
1892
1900
|
sig { returns(T.nilable(Float)) }
|
|
1893
1901
|
attr_reader :threshold
|
|
1894
1902
|
|
|
@@ -1900,6 +1908,7 @@ module ModerationAPI
|
|
|
1900
1908
|
flag: T::Boolean,
|
|
1901
1909
|
allowlist_wordlist_ids: T::Array[String],
|
|
1902
1910
|
blocklist_wordlist_ids: T::Array[String],
|
|
1911
|
+
flag_link_shorteners: T::Boolean,
|
|
1903
1912
|
threshold: Float,
|
|
1904
1913
|
id: Symbol
|
|
1905
1914
|
).returns(T.attached_class)
|
|
@@ -1913,6 +1922,9 @@ module ModerationAPI
|
|
|
1913
1922
|
# short-circuit the risk model and are always flagged. Blocklists take precedence
|
|
1914
1923
|
# over allowlists.
|
|
1915
1924
|
blocklist_wordlist_ids: nil,
|
|
1925
|
+
# When true, any URL detected as a free link shortener (bit.ly, t.co, tinyurl,
|
|
1926
|
+
# etc.) is always flagged regardless of risk score. Allowlist matches still win.
|
|
1927
|
+
flag_link_shorteners: nil,
|
|
1916
1928
|
threshold: nil,
|
|
1917
1929
|
id: :url_risk
|
|
1918
1930
|
)
|
|
@@ -1925,6 +1937,7 @@ module ModerationAPI
|
|
|
1925
1937
|
flag: T::Boolean,
|
|
1926
1938
|
allowlist_wordlist_ids: T::Array[String],
|
|
1927
1939
|
blocklist_wordlist_ids: T::Array[String],
|
|
1940
|
+
flag_link_shorteners: T::Boolean,
|
|
1928
1941
|
threshold: Float
|
|
1929
1942
|
}
|
|
1930
1943
|
)
|