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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +1 -1
  4. data/lib/moderation_api/internal/type/union.rb +25 -0
  5. data/lib/moderation_api/models/action_create_params.rb +1 -45
  6. data/lib/moderation_api/models/action_list_response.rb +1 -57
  7. data/lib/moderation_api/models/action_retrieve_response.rb +1 -57
  8. data/lib/moderation_api/models/action_update_params.rb +1 -45
  9. data/lib/moderation_api/models/author_create_params.rb +9 -1
  10. data/lib/moderation_api/models/author_create_response.rb +9 -1
  11. data/lib/moderation_api/models/author_list_response.rb +9 -1
  12. data/lib/moderation_api/models/author_retrieve_response.rb +9 -1
  13. data/lib/moderation_api/models/author_update_params.rb +9 -1
  14. data/lib/moderation_api/models/author_update_response.rb +9 -1
  15. data/lib/moderation_api/models/content_submit_params.rb +12 -1
  16. data/lib/moderation_api/models/webhook_event.rb +6231 -0
  17. data/lib/moderation_api/models.rb +2 -0
  18. data/lib/moderation_api/resources/actions.rb +2 -6
  19. data/lib/moderation_api/resources/authors.rb +6 -2
  20. data/lib/moderation_api/version.rb +1 -1
  21. data/lib/moderation_api.rb +1 -0
  22. data/rbi/moderation_api/models/action_create_params.rbi +0 -80
  23. data/rbi/moderation_api/models/action_list_response.rbi +0 -85
  24. data/rbi/moderation_api/models/action_retrieve_response.rbi +0 -85
  25. data/rbi/moderation_api/models/action_update_params.rbi +0 -80
  26. data/rbi/moderation_api/models/author_create_params.rbi +8 -0
  27. data/rbi/moderation_api/models/author_create_response.rbi +8 -0
  28. data/rbi/moderation_api/models/author_list_response.rbi +8 -0
  29. data/rbi/moderation_api/models/author_retrieve_response.rbi +8 -0
  30. data/rbi/moderation_api/models/author_update_params.rbi +8 -0
  31. data/rbi/moderation_api/models/author_update_response.rbi +8 -0
  32. data/rbi/moderation_api/models/content_submit_params.rbi +13 -0
  33. data/rbi/moderation_api/models/webhook_event.rbi +11307 -0
  34. data/rbi/moderation_api/models.rbi +2 -0
  35. data/rbi/moderation_api/resources/actions.rbi +0 -8
  36. data/rbi/moderation_api/resources/authors.rbi +6 -0
  37. data/sig/moderation_api/models/action_create_params.rbs +1 -39
  38. data/sig/moderation_api/models/action_list_response.rbs +0 -42
  39. data/sig/moderation_api/models/action_retrieve_response.rbs +0 -42
  40. data/sig/moderation_api/models/action_update_params.rbs +1 -39
  41. data/sig/moderation_api/models/author_create_params.rbs +5 -0
  42. data/sig/moderation_api/models/author_create_response.rbs +5 -0
  43. data/sig/moderation_api/models/author_list_response.rbs +5 -0
  44. data/sig/moderation_api/models/author_retrieve_response.rbs +5 -0
  45. data/sig/moderation_api/models/author_update_params.rbs +5 -0
  46. data/sig/moderation_api/models/author_update_response.rbs +5 -0
  47. data/sig/moderation_api/models/content_submit_params.rbs +7 -0
  48. data/sig/moderation_api/models/webhook_event.rbs +4746 -0
  49. data/sig/moderation_api/models.rbs +2 -0
  50. data/sig/moderation_api/resources/actions.rbs +0 -2
  51. data/sig/moderation_api/resources/authors.rbs +2 -0
  52. metadata +5 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 192a6f5315a5b55f4f6b762d716b3d9ce040c173a93985c1155a5debfd69b053
4
- data.tar.gz: 8bcf509d720e00d1744c76dffb6aba7f4b6ebf750fad5859816df308c0f96c6f
3
+ metadata.gz: de1a136db4d8241134cdfbc409a0509c4d01e2955619249fad875c38ceb7cd4c
4
+ data.tar.gz: f7e22c1f1f5554878cfd83abac7f51f5468665989fd9c81846d6207462956b0e
5
5
  SHA512:
6
- metadata.gz: 8c684c5b8669978604e1333bb800c61f2af4be0e95d79f4bc9578c56bfc2462a224d0f994fbc3343d99a7996acf130de7a5abd2e53fc3a01456a7a75dd6493d6
7
- data.tar.gz: 336064028d535e29f792abf679b80454b5eab96eda45418f6e9f7fc07fa65c61513ea14e6fba4cc01396dad62855e59aa68051fea48183576064b39d70db09a1
6
+ metadata.gz: eca1219b263c3afb4a025016f0abdcd39380c75caa6b268842dc7d1ffc255d9bb66eacc012c025a1bbaa9590f4e4d69f821462f9b9c9757602d97e9fac2cee16
7
+ data.tar.gz: 776dc5e69582118a7600eef868cfbd699d80f5be3e35443e2e850dd53e17baf8bb12cc44154e09366fc603d394e4dee3d825829c37159fbe04def22487636f59
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.16.0 (2026-05-08)
4
+
5
+ Full Changelog: [v2.15.0...v2.16.0](https://github.com/moderation-api/sdk-ruby/compare/v2.15.0...v2.16.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([b84cbe4](https://github.com/moderation-api/sdk-ruby/commit/b84cbe4d456abf5ede25c5754295f498daa8b3ac))
10
+ * **api:** manual updates ([0293cc9](https://github.com/moderation-api/sdk-ruby/commit/0293cc979a8cae07a2b6a8fc12c34d882ce0337a))
11
+
12
+ ## 2.15.0 (2026-05-06)
13
+
14
+ Full Changelog: [v2.14.0...v2.15.0](https://github.com/moderation-api/sdk-ruby/compare/v2.14.0...v2.15.0)
15
+
16
+ ### Features
17
+
18
+ * **api:** api update ([db53bf6](https://github.com/moderation-api/sdk-ruby/commit/db53bf6ff1ba85a2a7fab66b097317133a377e5f))
19
+
3
20
  ## 2.14.0 (2026-04-29)
4
21
 
5
22
  Full Changelog: [v2.13.0...v2.14.0](https://github.com/moderation-api/sdk-ruby/compare/v2.13.0...v2.14.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "moderation_api", "~> 2.14.0"
18
+ gem "moderation_api", "~> 2.16.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -4,6 +4,31 @@ module ModerationAPI
4
4
  module Internal
5
5
  module Type
6
6
  # @api private
7
+ #
8
+ # @example
9
+ # # `webhook_event` is a `ModerationAPI::WebhookEvent`
10
+ # case webhook_event
11
+ # when ModerationAPI::WebhookEvent::AuthorBlocked
12
+ # puts(webhook_event.id)
13
+ # when ModerationAPI::WebhookEvent::AuthorUnblocked
14
+ # puts(webhook_event.api_version)
15
+ # when ModerationAPI::WebhookEvent::AuthorSuspended
16
+ # puts(webhook_event.created)
17
+ # else
18
+ # puts(webhook_event)
19
+ # end
20
+ #
21
+ # @example
22
+ # case webhook_event
23
+ # in {type: :"author.blocked", id: id, api_version: api_version, created: created}
24
+ # puts(id)
25
+ # in {type: :"author.unblocked", id: id, api_version: api_version, created: created}
26
+ # puts(api_version)
27
+ # in {type: :"author.suspended", id: id, api_version: api_version, created: created}
28
+ # puts(created)
29
+ # else
30
+ # puts(webhook_event)
31
+ # end
7
32
  module Union
8
33
  include ModerationAPI::Internal::Type::Converter
9
34
  include ModerationAPI::Internal::Util::SorbetRuntimeSupport
@@ -85,14 +85,7 @@ module ModerationAPI
85
85
  # @return [Boolean, nil]
86
86
  optional :value_required, ModerationAPI::Internal::Type::Boolean, api_name: :valueRequired
87
87
 
88
- # @!attribute webhooks
89
- # The action's webhooks.
90
- #
91
- # @return [Array<ModerationAPI::Models::ActionCreateParams::Webhook>, nil]
92
- optional :webhooks,
93
- -> { ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::ActionCreateParams::Webhook] }
94
-
95
- # @!method initialize(name:, built_in: nil, description: nil, filter_in_queue_ids: nil, free_text: nil, key: nil, position: nil, possible_values: nil, queue_behaviour: nil, type: nil, value_required: nil, webhooks: nil, request_options: {})
88
+ # @!method initialize(name:, built_in: nil, description: nil, filter_in_queue_ids: nil, free_text: nil, key: nil, position: nil, possible_values: nil, queue_behaviour: nil, type: nil, value_required: nil, request_options: {})
96
89
  # Some parameter documentations has been truncated, see
97
90
  # {ModerationAPI::Models::ActionCreateParams} for more details.
98
91
  #
@@ -118,8 +111,6 @@ module ModerationAPI
118
111
  #
119
112
  # @param value_required [Boolean] Whether the action requires a value to be executed.
120
113
  #
121
- # @param webhooks [Array<ModerationAPI::Models::ActionCreateParams::Webhook>] The action's webhooks.
122
- #
123
114
  # @param request_options [ModerationAPI::RequestOptions, Hash{Symbol=>Object}]
124
115
 
125
116
  # Show the action in all queues, selected queues or no queues (to use via API
@@ -177,41 +168,6 @@ module ModerationAPI
177
168
  # @!method self.values
178
169
  # @return [Array<Symbol>]
179
170
  end
180
-
181
- class Webhook < ModerationAPI::Internal::Type::BaseModel
182
- # @!attribute name
183
- # The webhook's name, used to identify it in the dashboard
184
- #
185
- # @return [String]
186
- required :name, String
187
-
188
- # @!attribute url
189
- # The webhook's URL. We'll call this URL when the event occurs.
190
- #
191
- # @return [String]
192
- required :url, String
193
-
194
- # @!attribute id
195
- # ID of an existing webhook or undefined if this is a new webhook.
196
- #
197
- # @return [String, nil]
198
- optional :id, String
199
-
200
- # @!attribute description
201
- # The webhook's description
202
- #
203
- # @return [String, nil]
204
- optional :description, String, nil?: true
205
-
206
- # @!method initialize(name:, url:, id: nil, description: nil)
207
- # @param name [String] The webhook's name, used to identify it in the dashboard
208
- #
209
- # @param url [String] The webhook's URL. We'll call this URL when the event occurs.
210
- #
211
- # @param id [String] ID of an existing webhook or undefined if this is a new webhook.
212
- #
213
- # @param description [String, nil] The webhook's description
214
- end
215
171
  end
216
172
  end
217
173
  end
@@ -73,13 +73,6 @@ module ModerationAPI
73
73
  # @return [Boolean]
74
74
  required :value_required, ModerationAPI::Internal::Type::Boolean, api_name: :valueRequired
75
75
 
76
- # @!attribute webhooks
77
- # The action's webhooks.
78
- #
79
- # @return [Array<ModerationAPI::Models::ActionListResponseItem::Webhook>]
80
- required :webhooks,
81
- -> { ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Models::ActionListResponseItem::Webhook] }
82
-
83
76
  # @!attribute description
84
77
  # The description of the action.
85
78
  #
@@ -98,7 +91,7 @@ module ModerationAPI
98
91
  # @return [Symbol, ModerationAPI::Models::ActionListResponseItem::Type, nil]
99
92
  optional :type, enum: -> { ModerationAPI::Models::ActionListResponseItem::Type }, nil?: true
100
93
 
101
- # @!method initialize(id:, built_in:, created_at:, filter_in_queue_ids:, free_text:, name:, position:, possible_values:, queue_behaviour:, value_required:, webhooks:, description: nil, key: nil, type: nil)
94
+ # @!method initialize(id:, built_in:, created_at:, filter_in_queue_ids:, free_text:, name:, position:, possible_values:, queue_behaviour:, value_required:, description: nil, key: nil, type: nil)
102
95
  # Some parameter documentations has been truncated, see
103
96
  # {ModerationAPI::Models::ActionListResponseItem} for more details.
104
97
  #
@@ -122,8 +115,6 @@ module ModerationAPI
122
115
  #
123
116
  # @param value_required [Boolean] Whether the action requires a value to be executed.
124
117
  #
125
- # @param webhooks [Array<ModerationAPI::Models::ActionListResponseItem::Webhook>] The action's webhooks.
126
- #
127
118
  # @param description [String, nil] The description of the action.
128
119
  #
129
120
  # @param key [String, nil] User defined key of the action.
@@ -171,53 +162,6 @@ module ModerationAPI
171
162
  # @return [Array<Symbol>]
172
163
  end
173
164
 
174
- class Webhook < ModerationAPI::Internal::Type::BaseModel
175
- # @!attribute id
176
- # The ID of the webhook.
177
- #
178
- # @return [String]
179
- required :id, String
180
-
181
- # @!attribute name
182
- # The webhook's name, used to identify it in the dashboard
183
- #
184
- # @return [String]
185
- required :name, String
186
-
187
- # @!attribute url
188
- # The webhook's URL. We'll call this URL when the event occurs.
189
- #
190
- # @return [String]
191
- required :url, String
192
-
193
- # @!attribute description
194
- # The webhook's description
195
- #
196
- # @return [String, nil]
197
- optional :description, String, nil?: true
198
-
199
- # @!attribute moderation_action_id
200
- # The ID of the moderation action to trigger the webhook on. Only used for
201
- # moderation action webhooks.
202
- #
203
- # @return [String, nil]
204
- optional :moderation_action_id, String, api_name: :moderationActionId, nil?: true
205
-
206
- # @!method initialize(id:, name:, url:, description: nil, moderation_action_id: nil)
207
- # Some parameter documentations has been truncated, see
208
- # {ModerationAPI::Models::ActionListResponseItem::Webhook} for more details.
209
- #
210
- # @param id [String] The ID of the webhook.
211
- #
212
- # @param name [String] The webhook's name, used to identify it in the dashboard
213
- #
214
- # @param url [String] The webhook's URL. We'll call this URL when the event occurs.
215
- #
216
- # @param description [String, nil] The webhook's description
217
- #
218
- # @param moderation_action_id [String, nil] The ID of the moderation action to trigger the webhook on. Only used for moderat
219
- end
220
-
221
165
  # The type of the action.
222
166
  #
223
167
  # @see ModerationAPI::Models::ActionListResponseItem#type
@@ -74,13 +74,6 @@ module ModerationAPI
74
74
  # @return [Boolean]
75
75
  required :value_required, ModerationAPI::Internal::Type::Boolean, api_name: :valueRequired
76
76
 
77
- # @!attribute webhooks
78
- # The action's webhooks.
79
- #
80
- # @return [Array<ModerationAPI::Models::ActionRetrieveResponse::Webhook>]
81
- required :webhooks,
82
- -> { ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Models::ActionRetrieveResponse::Webhook] }
83
-
84
77
  # @!attribute description
85
78
  # The description of the action.
86
79
  #
@@ -99,7 +92,7 @@ module ModerationAPI
99
92
  # @return [Symbol, ModerationAPI::Models::ActionRetrieveResponse::Type, nil]
100
93
  optional :type, enum: -> { ModerationAPI::Models::ActionRetrieveResponse::Type }, nil?: true
101
94
 
102
- # @!method initialize(id:, built_in:, created_at:, filter_in_queue_ids:, free_text:, name:, position:, possible_values:, queue_behaviour:, value_required:, webhooks:, description: nil, key: nil, type: nil)
95
+ # @!method initialize(id:, built_in:, created_at:, filter_in_queue_ids:, free_text:, name:, position:, possible_values:, queue_behaviour:, value_required:, description: nil, key: nil, type: nil)
103
96
  # Some parameter documentations has been truncated, see
104
97
  # {ModerationAPI::Models::ActionRetrieveResponse} for more details.
105
98
  #
@@ -123,8 +116,6 @@ module ModerationAPI
123
116
  #
124
117
  # @param value_required [Boolean] Whether the action requires a value to be executed.
125
118
  #
126
- # @param webhooks [Array<ModerationAPI::Models::ActionRetrieveResponse::Webhook>] The action's webhooks.
127
- #
128
119
  # @param description [String, nil] The description of the action.
129
120
  #
130
121
  # @param key [String, nil] User defined key of the action.
@@ -172,53 +163,6 @@ module ModerationAPI
172
163
  # @return [Array<Symbol>]
173
164
  end
174
165
 
175
- class Webhook < ModerationAPI::Internal::Type::BaseModel
176
- # @!attribute id
177
- # The ID of the webhook.
178
- #
179
- # @return [String]
180
- required :id, String
181
-
182
- # @!attribute name
183
- # The webhook's name, used to identify it in the dashboard
184
- #
185
- # @return [String]
186
- required :name, String
187
-
188
- # @!attribute url
189
- # The webhook's URL. We'll call this URL when the event occurs.
190
- #
191
- # @return [String]
192
- required :url, String
193
-
194
- # @!attribute description
195
- # The webhook's description
196
- #
197
- # @return [String, nil]
198
- optional :description, String, nil?: true
199
-
200
- # @!attribute moderation_action_id
201
- # The ID of the moderation action to trigger the webhook on. Only used for
202
- # moderation action webhooks.
203
- #
204
- # @return [String, nil]
205
- optional :moderation_action_id, String, api_name: :moderationActionId, nil?: true
206
-
207
- # @!method initialize(id:, name:, url:, description: nil, moderation_action_id: nil)
208
- # Some parameter documentations has been truncated, see
209
- # {ModerationAPI::Models::ActionRetrieveResponse::Webhook} for more details.
210
- #
211
- # @param id [String] The ID of the webhook.
212
- #
213
- # @param name [String] The webhook's name, used to identify it in the dashboard
214
- #
215
- # @param url [String] The webhook's URL. We'll call this URL when the event occurs.
216
- #
217
- # @param description [String, nil] The webhook's description
218
- #
219
- # @param moderation_action_id [String, nil] The ID of the moderation action to trigger the webhook on. Only used for moderat
220
- end
221
-
222
166
  # The type of the action.
223
167
  #
224
168
  # @see ModerationAPI::Models::ActionRetrieveResponse#type
@@ -91,14 +91,7 @@ module ModerationAPI
91
91
  # @return [Boolean, nil]
92
92
  optional :value_required, ModerationAPI::Internal::Type::Boolean, api_name: :valueRequired
93
93
 
94
- # @!attribute webhooks
95
- # The action's webhooks.
96
- #
97
- # @return [Array<ModerationAPI::Models::ActionUpdateParams::Webhook>, nil]
98
- optional :webhooks,
99
- -> { ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::ActionUpdateParams::Webhook] }
100
-
101
- # @!method initialize(id:, built_in: nil, description: nil, filter_in_queue_ids: nil, free_text: nil, key: nil, name: nil, position: nil, possible_values: nil, queue_behaviour: nil, type: nil, value_required: nil, webhooks: nil, request_options: {})
94
+ # @!method initialize(id:, built_in: nil, description: nil, filter_in_queue_ids: nil, free_text: nil, key: nil, name: nil, position: nil, possible_values: nil, queue_behaviour: nil, type: nil, value_required: nil, request_options: {})
102
95
  # Some parameter documentations has been truncated, see
103
96
  # {ModerationAPI::Models::ActionUpdateParams} for more details.
104
97
  #
@@ -126,8 +119,6 @@ module ModerationAPI
126
119
  #
127
120
  # @param value_required [Boolean] Whether the action requires a value to be executed.
128
121
  #
129
- # @param webhooks [Array<ModerationAPI::Models::ActionUpdateParams::Webhook>] The action's webhooks.
130
- #
131
122
  # @param request_options [ModerationAPI::RequestOptions, Hash{Symbol=>Object}]
132
123
 
133
124
  # Show the action in all queues, selected queues or no queues (to use via API
@@ -185,41 +176,6 @@ module ModerationAPI
185
176
  # @!method self.values
186
177
  # @return [Array<Symbol>]
187
178
  end
188
-
189
- class Webhook < ModerationAPI::Internal::Type::BaseModel
190
- # @!attribute name
191
- # The webhook's name, used to identify it in the dashboard
192
- #
193
- # @return [String]
194
- required :name, String
195
-
196
- # @!attribute url
197
- # The webhook's URL. We'll call this URL when the event occurs.
198
- #
199
- # @return [String]
200
- required :url, String
201
-
202
- # @!attribute id
203
- # ID of an existing webhook or undefined if this is a new webhook.
204
- #
205
- # @return [String, nil]
206
- optional :id, String
207
-
208
- # @!attribute description
209
- # The webhook's description
210
- #
211
- # @return [String, nil]
212
- optional :description, String, nil?: true
213
-
214
- # @!method initialize(name:, url:, id: nil, description: nil)
215
- # @param name [String] The webhook's name, used to identify it in the dashboard
216
- #
217
- # @param url [String] The webhook's URL. We'll call this URL when the event occurs.
218
- #
219
- # @param id [String] ID of an existing webhook or undefined if this is a new webhook.
220
- #
221
- # @param description [String, nil] The webhook's description
222
- end
223
179
  end
224
180
  end
225
181
  end
@@ -13,6 +13,12 @@ module ModerationAPI
13
13
  # @return [String]
14
14
  required :external_id, String
15
15
 
16
+ # @!attribute company
17
+ # The author's company or organization
18
+ #
19
+ # @return [String, nil]
20
+ optional :company, String, nil?: true
21
+
16
22
  # @!attribute email
17
23
  # Author email address
18
24
  #
@@ -61,12 +67,14 @@ module ModerationAPI
61
67
  # @return [String, nil]
62
68
  optional :profile_picture, String, nil?: true
63
69
 
64
- # @!method initialize(external_id:, email: nil, external_link: nil, first_seen: nil, last_seen: nil, manual_trust_level: nil, metadata: nil, name: nil, profile_picture: nil, request_options: {})
70
+ # @!method initialize(external_id:, company: nil, email: nil, external_link: nil, first_seen: nil, last_seen: nil, manual_trust_level: nil, metadata: nil, name: nil, profile_picture: nil, request_options: {})
65
71
  # Some parameter documentations has been truncated, see
66
72
  # {ModerationAPI::Models::AuthorCreateParams} for more details.
67
73
  #
68
74
  # @param external_id [String] External ID of the user, typically the ID of the author in your database.
69
75
  #
76
+ # @param company [String, nil] The author's company or organization
77
+ #
70
78
  # @param email [String, nil] Author email address
71
79
  #
72
80
  # @param external_link [String, nil] URL of the author's external profile
@@ -57,6 +57,12 @@ module ModerationAPI
57
57
  # @return [ModerationAPI::Models::AuthorCreateResponse::TrustLevel]
58
58
  required :trust_level, -> { ModerationAPI::Models::AuthorCreateResponse::TrustLevel }
59
59
 
60
+ # @!attribute company
61
+ # The author's company or organization
62
+ #
63
+ # @return [String, nil]
64
+ optional :company, String, nil?: true
65
+
60
66
  # @!attribute email
61
67
  # Author email address
62
68
  #
@@ -93,7 +99,7 @@ module ModerationAPI
93
99
  # @return [String, nil]
94
100
  optional :profile_picture, String, nil?: true
95
101
 
96
- # @!method initialize(id:, block:, first_seen:, last_seen:, metadata:, metrics:, risk_evaluation:, status:, trust_level:, email: nil, external_id: nil, external_link: nil, last_incident: nil, name: nil, profile_picture: nil)
102
+ # @!method initialize(id:, block:, first_seen:, last_seen:, metadata:, metrics:, risk_evaluation:, status:, trust_level:, company: nil, email: nil, external_id: nil, external_link: nil, last_incident: nil, name: nil, profile_picture: nil)
97
103
  # Some parameter documentations has been truncated, see
98
104
  # {ModerationAPI::Models::AuthorCreateResponse} for more details.
99
105
  #
@@ -115,6 +121,8 @@ module ModerationAPI
115
121
  #
116
122
  # @param trust_level [ModerationAPI::Models::AuthorCreateResponse::TrustLevel]
117
123
  #
124
+ # @param company [String, nil] The author's company or organization
125
+ #
118
126
  # @param email [String, nil] Author email address
119
127
  #
120
128
  # @param external_id [String, nil] The author's ID from your system
@@ -75,6 +75,12 @@ module ModerationAPI
75
75
  # @return [ModerationAPI::Models::AuthorListResponse::Author::TrustLevel]
76
76
  required :trust_level, -> { ModerationAPI::Models::AuthorListResponse::Author::TrustLevel }
77
77
 
78
+ # @!attribute company
79
+ # The author's company or organization
80
+ #
81
+ # @return [String, nil]
82
+ optional :company, String, nil?: true
83
+
78
84
  # @!attribute email
79
85
  # Author email address
80
86
  #
@@ -111,7 +117,7 @@ module ModerationAPI
111
117
  # @return [String, nil]
112
118
  optional :profile_picture, String, nil?: true
113
119
 
114
- # @!method initialize(id:, block:, first_seen:, last_seen:, metadata:, metrics:, risk_evaluation:, status:, trust_level:, email: nil, external_id: nil, external_link: nil, last_incident: nil, name: nil, profile_picture: nil)
120
+ # @!method initialize(id:, block:, first_seen:, last_seen:, metadata:, metrics:, risk_evaluation:, status:, trust_level:, company: nil, email: nil, external_id: nil, external_link: nil, last_incident: nil, name: nil, profile_picture: nil)
115
121
  # Some parameter documentations has been truncated, see
116
122
  # {ModerationAPI::Models::AuthorListResponse::Author} for more details.
117
123
  #
@@ -133,6 +139,8 @@ module ModerationAPI
133
139
  #
134
140
  # @param trust_level [ModerationAPI::Models::AuthorListResponse::Author::TrustLevel]
135
141
  #
142
+ # @param company [String, nil] The author's company or organization
143
+ #
136
144
  # @param email [String, nil] Author email address
137
145
  #
138
146
  # @param external_id [String, nil] The author's ID from your system
@@ -59,6 +59,12 @@ module ModerationAPI
59
59
  # @return [ModerationAPI::Models::AuthorRetrieveResponse::TrustLevel]
60
60
  required :trust_level, -> { ModerationAPI::Models::AuthorRetrieveResponse::TrustLevel }
61
61
 
62
+ # @!attribute company
63
+ # The author's company or organization
64
+ #
65
+ # @return [String, nil]
66
+ optional :company, String, nil?: true
67
+
62
68
  # @!attribute email
63
69
  # Author email address
64
70
  #
@@ -95,7 +101,7 @@ module ModerationAPI
95
101
  # @return [String, nil]
96
102
  optional :profile_picture, String, nil?: true
97
103
 
98
- # @!method initialize(id:, block:, first_seen:, last_seen:, metadata:, metrics:, risk_evaluation:, status:, trust_level:, email: nil, external_id: nil, external_link: nil, last_incident: nil, name: nil, profile_picture: nil)
104
+ # @!method initialize(id:, block:, first_seen:, last_seen:, metadata:, metrics:, risk_evaluation:, status:, trust_level:, company: nil, email: nil, external_id: nil, external_link: nil, last_incident: nil, name: nil, profile_picture: nil)
99
105
  # Some parameter documentations has been truncated, see
100
106
  # {ModerationAPI::Models::AuthorRetrieveResponse} for more details.
101
107
  #
@@ -117,6 +123,8 @@ module ModerationAPI
117
123
  #
118
124
  # @param trust_level [ModerationAPI::Models::AuthorRetrieveResponse::TrustLevel]
119
125
  #
126
+ # @param company [String, nil] The author's company or organization
127
+ #
120
128
  # @param email [String, nil] Author email address
121
129
  #
122
130
  # @param external_id [String, nil] The author's ID from your system
@@ -13,6 +13,12 @@ module ModerationAPI
13
13
  # @return [String]
14
14
  required :id, String
15
15
 
16
+ # @!attribute company
17
+ # The author's company or organization
18
+ #
19
+ # @return [String, nil]
20
+ optional :company, String, nil?: true
21
+
16
22
  # @!attribute email
17
23
  # Author email address
18
24
  #
@@ -61,12 +67,14 @@ module ModerationAPI
61
67
  # @return [String, nil]
62
68
  optional :profile_picture, String, nil?: true
63
69
 
64
- # @!method initialize(id:, email: nil, external_link: nil, first_seen: nil, last_seen: nil, manual_trust_level: nil, metadata: nil, name: nil, profile_picture: nil, request_options: {})
70
+ # @!method initialize(id:, company: nil, email: nil, external_link: nil, first_seen: nil, last_seen: nil, manual_trust_level: nil, metadata: nil, name: nil, profile_picture: nil, request_options: {})
65
71
  # Some parameter documentations has been truncated, see
66
72
  # {ModerationAPI::Models::AuthorUpdateParams} for more details.
67
73
  #
68
74
  # @param id [String] Either external ID or the ID assigned by moderation API.
69
75
  #
76
+ # @param company [String, nil] The author's company or organization
77
+ #
70
78
  # @param email [String, nil] Author email address
71
79
  #
72
80
  # @param external_link [String, nil] URL of the author's external profile
@@ -57,6 +57,12 @@ module ModerationAPI
57
57
  # @return [ModerationAPI::Models::AuthorUpdateResponse::TrustLevel]
58
58
  required :trust_level, -> { ModerationAPI::Models::AuthorUpdateResponse::TrustLevel }
59
59
 
60
+ # @!attribute company
61
+ # The author's company or organization
62
+ #
63
+ # @return [String, nil]
64
+ optional :company, String, nil?: true
65
+
60
66
  # @!attribute email
61
67
  # Author email address
62
68
  #
@@ -93,7 +99,7 @@ module ModerationAPI
93
99
  # @return [String, nil]
94
100
  optional :profile_picture, String, nil?: true
95
101
 
96
- # @!method initialize(id:, block:, first_seen:, last_seen:, metadata:, metrics:, risk_evaluation:, status:, trust_level:, email: nil, external_id: nil, external_link: nil, last_incident: nil, name: nil, profile_picture: nil)
102
+ # @!method initialize(id:, block:, first_seen:, last_seen:, metadata:, metrics:, risk_evaluation:, status:, trust_level:, company: nil, email: nil, external_id: nil, external_link: nil, last_incident: nil, name: nil, profile_picture: nil)
97
103
  # Some parameter documentations has been truncated, see
98
104
  # {ModerationAPI::Models::AuthorUpdateResponse} for more details.
99
105
  #
@@ -115,6 +121,8 @@ module ModerationAPI
115
121
  #
116
122
  # @param trust_level [ModerationAPI::Models::AuthorUpdateResponse::TrustLevel]
117
123
  #
124
+ # @param company [String, nil] The author's company or organization
125
+ #
118
126
  # @param email [String, nil] Author email address
119
127
  #
120
128
  # @param external_id [String, nil] The author's ID from your system
@@ -1045,12 +1045,21 @@ module ModerationAPI
1045
1045
  ModerationAPI::Internal::Type::ArrayOf[String],
1046
1046
  api_name: :blocklistWordlistIds
1047
1047
 
1048
+ # @!attribute flag_link_shorteners
1049
+ # When true, any URL detected as a free link shortener (bit.ly, t.co, tinyurl,
1050
+ # etc.) is always flagged regardless of risk score. Allowlist matches still win.
1051
+ #
1052
+ # @return [Boolean, nil]
1053
+ optional :flag_link_shorteners,
1054
+ ModerationAPI::Internal::Type::Boolean,
1055
+ api_name: :flagLinkShorteners
1056
+
1048
1057
  # @!attribute threshold
1049
1058
  #
1050
1059
  # @return [Float, nil]
1051
1060
  optional :threshold, Float
1052
1061
 
1053
- # @!method initialize(flag:, allowlist_wordlist_ids: nil, blocklist_wordlist_ids: nil, threshold: nil, id: :url_risk)
1062
+ # @!method initialize(flag:, allowlist_wordlist_ids: nil, blocklist_wordlist_ids: nil, flag_link_shorteners: nil, threshold: nil, id: :url_risk)
1054
1063
  # Some parameter documentations has been truncated, see
1055
1064
  # {ModerationAPI::Models::ContentSubmitParams::Policy::URLRisk} for more details.
1056
1065
  #
@@ -1060,6 +1069,8 @@ module ModerationAPI
1060
1069
  #
1061
1070
  # @param blocklist_wordlist_ids [Array<String>] IDs of wordlists whose entries are treated as blocked URL domains. Matches short
1062
1071
  #
1072
+ # @param flag_link_shorteners [Boolean] When true, any URL detected as a free link shortener (bit.ly, t.co, tinyurl, etc
1073
+ #
1063
1074
  # @param threshold [Float]
1064
1075
  #
1065
1076
  # @param id [Symbol, :url_risk]