moderation_api 2.13.0 → 2.15.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 +16 -0
- data/README.md +1 -1
- 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/content_submit_response.rb +29 -1
- data/lib/moderation_api/resources/authors.rb +6 -2
- data/lib/moderation_api/version.rb +1 -1
- 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/content_submit_response.rbi +72 -1
- data/rbi/moderation_api/resources/authors.rbi +6 -0
- 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/content_submit_response.rbs +30 -3
- data/sig/moderation_api/resources/authors.rbs +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 73ed49f88340b458488a1807d795ebafa28c32358e1c2ea543590a22abe383be
|
|
4
|
+
data.tar.gz: 86650a69b6feecb8c06efd19a2f7d1fd08752770edf0a5113bb558a34b0f7498
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb7d15470c344227d5ab6022a3098621d8199da6c5cb4a70eae16a38b1f0fa509562d1d0faf9368dbaf705c5cc0044514c0212285597e76e7668324241070cbe
|
|
7
|
+
data.tar.gz: 7a14a705d2f5e1fb5a446ea8edd404ef35740834232fbfeaa721886fbe86a5c9731c066a98f7a7342ab7379b5b326972b59c82f3a3e1fa19d12cbe6cf79d4fdf
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.15.0 (2026-05-06)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v2.14.0...v2.15.0](https://github.com/moderation-api/sdk-ruby/compare/v2.14.0...v2.15.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([db53bf6](https://github.com/moderation-api/sdk-ruby/commit/db53bf6ff1ba85a2a7fab66b097317133a377e5f))
|
|
10
|
+
|
|
11
|
+
## 2.14.0 (2026-04-29)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v2.13.0...v2.14.0](https://github.com/moderation-api/sdk-ruby/compare/v2.13.0...v2.14.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([ac53fee](https://github.com/moderation-api/sdk-ruby/commit/ac53feeb7fe66fde8f0eac2462e36f5c8aa5da6a))
|
|
18
|
+
|
|
3
19
|
## 2.13.0 (2026-04-28)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v2.12.0...v2.13.0](https://github.com/moderation-api/sdk-ruby/compare/v2.12.0...v2.13.0)
|
data/README.md
CHANGED
|
@@ -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]
|
|
@@ -849,7 +849,14 @@ module ModerationAPI
|
|
|
849
849
|
required :reason_codes,
|
|
850
850
|
-> { ModerationAPI::Internal::Type::ArrayOf[enum: ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode] }
|
|
851
851
|
|
|
852
|
-
# @!
|
|
852
|
+
# @!attribute matched_rules
|
|
853
|
+
# Rules that matched during evaluation, if rules engine is active.
|
|
854
|
+
#
|
|
855
|
+
# @return [Array<ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule>, nil]
|
|
856
|
+
optional :matched_rules,
|
|
857
|
+
-> { ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule] }
|
|
858
|
+
|
|
859
|
+
# @!method initialize(action:, reason_codes:, matched_rules: nil)
|
|
853
860
|
# Some parameter documentations has been truncated, see
|
|
854
861
|
# {ModerationAPI::Models::ContentSubmitResponse::Recommendation} for more details.
|
|
855
862
|
#
|
|
@@ -858,6 +865,8 @@ module ModerationAPI
|
|
|
858
865
|
# @param action [Symbol, ModerationAPI::Models::ContentSubmitResponse::Recommendation::Action] The action to take based on the recommendation
|
|
859
866
|
#
|
|
860
867
|
# @param reason_codes [Array<Symbol, ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode>] The reason code for the recommendation. Can be used to display a reason to the u
|
|
868
|
+
#
|
|
869
|
+
# @param matched_rules [Array<ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule>] Rules that matched during evaluation, if rules engine is active.
|
|
861
870
|
|
|
862
871
|
# The action to take based on the recommendation
|
|
863
872
|
#
|
|
@@ -882,10 +891,29 @@ module ModerationAPI
|
|
|
882
891
|
DRY_RUN = :dry_run
|
|
883
892
|
TRUSTED_ALLOW = :trusted_allow
|
|
884
893
|
UNTRUSTED_SEVERITY = :untrusted_severity
|
|
894
|
+
RULE_MATCH = :rule_match
|
|
895
|
+
RULE_DEFAULT = :rule_default
|
|
896
|
+
RULE_FALLBACK = :rule_fallback
|
|
885
897
|
|
|
886
898
|
# @!method self.values
|
|
887
899
|
# @return [Array<Symbol>]
|
|
888
900
|
end
|
|
901
|
+
|
|
902
|
+
class MatchedRule < ModerationAPI::Internal::Type::BaseModel
|
|
903
|
+
# @!attribute key
|
|
904
|
+
#
|
|
905
|
+
# @return [String]
|
|
906
|
+
required :key, String
|
|
907
|
+
|
|
908
|
+
# @!attribute name
|
|
909
|
+
#
|
|
910
|
+
# @return [String]
|
|
911
|
+
required :name, String
|
|
912
|
+
|
|
913
|
+
# @!method initialize(key:, name:)
|
|
914
|
+
# @param key [String]
|
|
915
|
+
# @param name [String]
|
|
916
|
+
end
|
|
889
917
|
end
|
|
890
918
|
|
|
891
919
|
class Error < ModerationAPI::Internal::Type::BaseModel
|
|
@@ -9,10 +9,12 @@ module ModerationAPI
|
|
|
9
9
|
# Create a new author. Typically not needed as authors are created automatically
|
|
10
10
|
# when content is moderated.
|
|
11
11
|
#
|
|
12
|
-
# @overload create(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: {})
|
|
12
|
+
# @overload create(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: {})
|
|
13
13
|
#
|
|
14
14
|
# @param external_id [String] External ID of the user, typically the ID of the author in your database.
|
|
15
15
|
#
|
|
16
|
+
# @param company [String, nil] The author's company or organization
|
|
17
|
+
#
|
|
16
18
|
# @param email [String, nil] Author email address
|
|
17
19
|
#
|
|
18
20
|
# @param external_link [String, nil] URL of the author's external profile
|
|
@@ -71,10 +73,12 @@ module ModerationAPI
|
|
|
71
73
|
#
|
|
72
74
|
# Update the details of a specific author
|
|
73
75
|
#
|
|
74
|
-
# @overload update(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: {})
|
|
76
|
+
# @overload update(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: {})
|
|
75
77
|
#
|
|
76
78
|
# @param id [String] Either external ID or the ID assigned by moderation API.
|
|
77
79
|
#
|
|
80
|
+
# @param company [String, nil] The author's company or organization
|
|
81
|
+
#
|
|
78
82
|
# @param email [String, nil] Author email address
|
|
79
83
|
#
|
|
80
84
|
# @param external_link [String, nil] URL of the author's external profile
|
|
@@ -18,6 +18,10 @@ module ModerationAPI
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :external_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
|
external_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
|
# External ID of the user, typically the ID of the author in your database.
|
|
82
87
|
external_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
|
external_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::AuthorCreateResponse::Status::OrSymbol,
|
|
143
147
|
trust_level:
|
|
144
148
|
ModerationAPI::Models::AuthorCreateResponse::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::AuthorCreateResponse::Status::TaggedSymbol,
|
|
202
209
|
trust_level:
|
|
203
210
|
ModerationAPI::Models::AuthorCreateResponse::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),
|
|
@@ -158,6 +158,10 @@ module ModerationAPI
|
|
|
158
158
|
end
|
|
159
159
|
attr_writer :trust_level
|
|
160
160
|
|
|
161
|
+
# The author's company or organization
|
|
162
|
+
sig { returns(T.nilable(String)) }
|
|
163
|
+
attr_accessor :company
|
|
164
|
+
|
|
161
165
|
# Author email address
|
|
162
166
|
sig { returns(T.nilable(String)) }
|
|
163
167
|
attr_accessor :email
|
|
@@ -203,6 +207,7 @@ module ModerationAPI
|
|
|
203
207
|
ModerationAPI::Models::AuthorListResponse::Author::Status::OrSymbol,
|
|
204
208
|
trust_level:
|
|
205
209
|
ModerationAPI::Models::AuthorListResponse::Author::TrustLevel::OrHash,
|
|
210
|
+
company: T.nilable(String),
|
|
206
211
|
email: T.nilable(String),
|
|
207
212
|
external_id: T.nilable(String),
|
|
208
213
|
external_link: T.nilable(String),
|
|
@@ -229,6 +234,8 @@ module ModerationAPI
|
|
|
229
234
|
# Current author status
|
|
230
235
|
status:,
|
|
231
236
|
trust_level:,
|
|
237
|
+
# The author's company or organization
|
|
238
|
+
company: nil,
|
|
232
239
|
# Author email address
|
|
233
240
|
email: nil,
|
|
234
241
|
# The author's ID from your system
|
|
@@ -266,6 +273,7 @@ module ModerationAPI
|
|
|
266
273
|
ModerationAPI::Models::AuthorListResponse::Author::Status::TaggedSymbol,
|
|
267
274
|
trust_level:
|
|
268
275
|
ModerationAPI::Models::AuthorListResponse::Author::TrustLevel,
|
|
276
|
+
company: T.nilable(String),
|
|
269
277
|
email: T.nilable(String),
|
|
270
278
|
external_id: T.nilable(String),
|
|
271
279
|
external_link: T.nilable(String),
|
|
@@ -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
|
)
|
|
@@ -1599,6 +1599,28 @@ module ModerationAPI
|
|
|
1599
1599
|
end
|
|
1600
1600
|
attr_accessor :reason_codes
|
|
1601
1601
|
|
|
1602
|
+
# Rules that matched during evaluation, if rules engine is active.
|
|
1603
|
+
sig do
|
|
1604
|
+
returns(
|
|
1605
|
+
T.nilable(
|
|
1606
|
+
T::Array[
|
|
1607
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule
|
|
1608
|
+
]
|
|
1609
|
+
)
|
|
1610
|
+
)
|
|
1611
|
+
end
|
|
1612
|
+
attr_reader :matched_rules
|
|
1613
|
+
|
|
1614
|
+
sig do
|
|
1615
|
+
params(
|
|
1616
|
+
matched_rules:
|
|
1617
|
+
T::Array[
|
|
1618
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule::OrHash
|
|
1619
|
+
]
|
|
1620
|
+
).void
|
|
1621
|
+
end
|
|
1622
|
+
attr_writer :matched_rules
|
|
1623
|
+
|
|
1602
1624
|
# The recommendation for the content based on the evaluation.
|
|
1603
1625
|
sig do
|
|
1604
1626
|
params(
|
|
@@ -1607,6 +1629,10 @@ module ModerationAPI
|
|
|
1607
1629
|
reason_codes:
|
|
1608
1630
|
T::Array[
|
|
1609
1631
|
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::OrSymbol
|
|
1632
|
+
],
|
|
1633
|
+
matched_rules:
|
|
1634
|
+
T::Array[
|
|
1635
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule::OrHash
|
|
1610
1636
|
]
|
|
1611
1637
|
).returns(T.attached_class)
|
|
1612
1638
|
end
|
|
@@ -1615,7 +1641,9 @@ module ModerationAPI
|
|
|
1615
1641
|
action:,
|
|
1616
1642
|
# The reason code for the recommendation. Can be used to display a reason to the
|
|
1617
1643
|
# user.
|
|
1618
|
-
reason_codes
|
|
1644
|
+
reason_codes:,
|
|
1645
|
+
# Rules that matched during evaluation, if rules engine is active.
|
|
1646
|
+
matched_rules: nil
|
|
1619
1647
|
)
|
|
1620
1648
|
end
|
|
1621
1649
|
|
|
@@ -1627,6 +1655,10 @@ module ModerationAPI
|
|
|
1627
1655
|
reason_codes:
|
|
1628
1656
|
T::Array[
|
|
1629
1657
|
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
|
|
1658
|
+
],
|
|
1659
|
+
matched_rules:
|
|
1660
|
+
T::Array[
|
|
1661
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule
|
|
1630
1662
|
]
|
|
1631
1663
|
}
|
|
1632
1664
|
)
|
|
@@ -1716,6 +1748,21 @@ module ModerationAPI
|
|
|
1716
1748
|
:untrusted_severity,
|
|
1717
1749
|
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
|
|
1718
1750
|
)
|
|
1751
|
+
RULE_MATCH =
|
|
1752
|
+
T.let(
|
|
1753
|
+
:rule_match,
|
|
1754
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
|
|
1755
|
+
)
|
|
1756
|
+
RULE_DEFAULT =
|
|
1757
|
+
T.let(
|
|
1758
|
+
:rule_default,
|
|
1759
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
|
|
1760
|
+
)
|
|
1761
|
+
RULE_FALLBACK =
|
|
1762
|
+
T.let(
|
|
1763
|
+
:rule_fallback,
|
|
1764
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
|
|
1765
|
+
)
|
|
1719
1766
|
|
|
1720
1767
|
sig do
|
|
1721
1768
|
override.returns(
|
|
@@ -1727,6 +1774,30 @@ module ModerationAPI
|
|
|
1727
1774
|
def self.values
|
|
1728
1775
|
end
|
|
1729
1776
|
end
|
|
1777
|
+
|
|
1778
|
+
class MatchedRule < ModerationAPI::Internal::Type::BaseModel
|
|
1779
|
+
OrHash =
|
|
1780
|
+
T.type_alias do
|
|
1781
|
+
T.any(
|
|
1782
|
+
ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule,
|
|
1783
|
+
ModerationAPI::Internal::AnyHash
|
|
1784
|
+
)
|
|
1785
|
+
end
|
|
1786
|
+
|
|
1787
|
+
sig { returns(String) }
|
|
1788
|
+
attr_accessor :key
|
|
1789
|
+
|
|
1790
|
+
sig { returns(String) }
|
|
1791
|
+
attr_accessor :name
|
|
1792
|
+
|
|
1793
|
+
sig { params(key: String, name: String).returns(T.attached_class) }
|
|
1794
|
+
def self.new(key:, name:)
|
|
1795
|
+
end
|
|
1796
|
+
|
|
1797
|
+
sig { override.returns({ key: String, name: String }) }
|
|
1798
|
+
def to_hash
|
|
1799
|
+
end
|
|
1800
|
+
end
|
|
1730
1801
|
end
|
|
1731
1802
|
|
|
1732
1803
|
class Error < ModerationAPI::Internal::Type::BaseModel
|
|
@@ -8,6 +8,7 @@ module ModerationAPI
|
|
|
8
8
|
sig do
|
|
9
9
|
params(
|
|
10
10
|
external_id: String,
|
|
11
|
+
company: T.nilable(String),
|
|
11
12
|
email: T.nilable(String),
|
|
12
13
|
external_link: T.nilable(String),
|
|
13
14
|
first_seen: Float,
|
|
@@ -22,6 +23,8 @@ module ModerationAPI
|
|
|
22
23
|
def create(
|
|
23
24
|
# External ID of the user, typically the ID of the author in your database.
|
|
24
25
|
external_id:,
|
|
26
|
+
# The author's company or organization
|
|
27
|
+
company: nil,
|
|
25
28
|
# Author email address
|
|
26
29
|
email: nil,
|
|
27
30
|
# URL of the author's external profile
|
|
@@ -61,6 +64,7 @@ module ModerationAPI
|
|
|
61
64
|
sig do
|
|
62
65
|
params(
|
|
63
66
|
id: String,
|
|
67
|
+
company: T.nilable(String),
|
|
64
68
|
email: T.nilable(String),
|
|
65
69
|
external_link: T.nilable(String),
|
|
66
70
|
first_seen: Float,
|
|
@@ -75,6 +79,8 @@ module ModerationAPI
|
|
|
75
79
|
def update(
|
|
76
80
|
# Either external ID or the ID assigned by moderation API.
|
|
77
81
|
id,
|
|
82
|
+
# The author's company or organization
|
|
83
|
+
company: nil,
|
|
78
84
|
# Author email address
|
|
79
85
|
email: nil,
|
|
80
86
|
# URL of the author's external profile
|
|
@@ -3,6 +3,7 @@ module ModerationAPI
|
|
|
3
3
|
type author_create_params =
|
|
4
4
|
{
|
|
5
5
|
external_id: String,
|
|
6
|
+
company: String?,
|
|
6
7
|
email: String?,
|
|
7
8
|
external_link: String?,
|
|
8
9
|
first_seen: Float,
|
|
@@ -20,6 +21,8 @@ module ModerationAPI
|
|
|
20
21
|
|
|
21
22
|
attr_accessor external_id: String
|
|
22
23
|
|
|
24
|
+
attr_accessor company: String?
|
|
25
|
+
|
|
23
26
|
attr_accessor email: String?
|
|
24
27
|
|
|
25
28
|
attr_accessor external_link: String?
|
|
@@ -46,6 +49,7 @@ module ModerationAPI
|
|
|
46
49
|
|
|
47
50
|
def initialize: (
|
|
48
51
|
external_id: String,
|
|
52
|
+
?company: String?,
|
|
49
53
|
?email: String?,
|
|
50
54
|
?external_link: String?,
|
|
51
55
|
?first_seen: Float,
|
|
@@ -59,6 +63,7 @@ module ModerationAPI
|
|
|
59
63
|
|
|
60
64
|
def to_hash: -> {
|
|
61
65
|
external_id: String,
|
|
66
|
+
company: String?,
|
|
62
67
|
email: String?,
|
|
63
68
|
external_link: String?,
|
|
64
69
|
first_seen: Float,
|
|
@@ -11,6 +11,7 @@ module ModerationAPI
|
|
|
11
11
|
risk_evaluation: ModerationAPI::Models::AuthorCreateResponse::RiskEvaluation?,
|
|
12
12
|
status: ModerationAPI::Models::AuthorCreateResponse::status,
|
|
13
13
|
trust_level: ModerationAPI::Models::AuthorCreateResponse::TrustLevel,
|
|
14
|
+
company: String?,
|
|
14
15
|
email: String?,
|
|
15
16
|
external_id: String?,
|
|
16
17
|
external_link: String?,
|
|
@@ -38,6 +39,8 @@ module ModerationAPI
|
|
|
38
39
|
|
|
39
40
|
attr_accessor trust_level: ModerationAPI::Models::AuthorCreateResponse::TrustLevel
|
|
40
41
|
|
|
42
|
+
attr_accessor company: String?
|
|
43
|
+
|
|
41
44
|
attr_accessor email: String?
|
|
42
45
|
|
|
43
46
|
attr_accessor external_id: String?
|
|
@@ -60,6 +63,7 @@ module ModerationAPI
|
|
|
60
63
|
risk_evaluation: ModerationAPI::Models::AuthorCreateResponse::RiskEvaluation?,
|
|
61
64
|
status: ModerationAPI::Models::AuthorCreateResponse::status,
|
|
62
65
|
trust_level: ModerationAPI::Models::AuthorCreateResponse::TrustLevel,
|
|
66
|
+
?company: String?,
|
|
63
67
|
?email: String?,
|
|
64
68
|
?external_id: String?,
|
|
65
69
|
?external_link: String?,
|
|
@@ -78,6 +82,7 @@ module ModerationAPI
|
|
|
78
82
|
risk_evaluation: ModerationAPI::Models::AuthorCreateResponse::RiskEvaluation?,
|
|
79
83
|
status: ModerationAPI::Models::AuthorCreateResponse::status,
|
|
80
84
|
trust_level: ModerationAPI::Models::AuthorCreateResponse::TrustLevel,
|
|
85
|
+
company: String?,
|
|
81
86
|
email: String?,
|
|
82
87
|
external_id: String?,
|
|
83
88
|
external_link: String?,
|
|
@@ -32,6 +32,7 @@ module ModerationAPI
|
|
|
32
32
|
risk_evaluation: ModerationAPI::Models::AuthorListResponse::Author::RiskEvaluation?,
|
|
33
33
|
status: ModerationAPI::Models::AuthorListResponse::Author::status,
|
|
34
34
|
trust_level: ModerationAPI::Models::AuthorListResponse::Author::TrustLevel,
|
|
35
|
+
company: String?,
|
|
35
36
|
email: String?,
|
|
36
37
|
external_id: String?,
|
|
37
38
|
external_link: String?,
|
|
@@ -59,6 +60,8 @@ module ModerationAPI
|
|
|
59
60
|
|
|
60
61
|
attr_accessor trust_level: ModerationAPI::Models::AuthorListResponse::Author::TrustLevel
|
|
61
62
|
|
|
63
|
+
attr_accessor company: String?
|
|
64
|
+
|
|
62
65
|
attr_accessor email: String?
|
|
63
66
|
|
|
64
67
|
attr_accessor external_id: String?
|
|
@@ -81,6 +84,7 @@ module ModerationAPI
|
|
|
81
84
|
risk_evaluation: ModerationAPI::Models::AuthorListResponse::Author::RiskEvaluation?,
|
|
82
85
|
status: ModerationAPI::Models::AuthorListResponse::Author::status,
|
|
83
86
|
trust_level: ModerationAPI::Models::AuthorListResponse::Author::TrustLevel,
|
|
87
|
+
?company: String?,
|
|
84
88
|
?email: String?,
|
|
85
89
|
?external_id: String?,
|
|
86
90
|
?external_link: String?,
|
|
@@ -99,6 +103,7 @@ module ModerationAPI
|
|
|
99
103
|
risk_evaluation: ModerationAPI::Models::AuthorListResponse::Author::RiskEvaluation?,
|
|
100
104
|
status: ModerationAPI::Models::AuthorListResponse::Author::status,
|
|
101
105
|
trust_level: ModerationAPI::Models::AuthorListResponse::Author::TrustLevel,
|
|
106
|
+
company: String?,
|
|
102
107
|
email: String?,
|
|
103
108
|
external_id: String?,
|
|
104
109
|
external_link: String?,
|
|
@@ -11,6 +11,7 @@ module ModerationAPI
|
|
|
11
11
|
risk_evaluation: ModerationAPI::Models::AuthorRetrieveResponse::RiskEvaluation?,
|
|
12
12
|
status: ModerationAPI::Models::AuthorRetrieveResponse::status,
|
|
13
13
|
trust_level: ModerationAPI::Models::AuthorRetrieveResponse::TrustLevel,
|
|
14
|
+
company: String?,
|
|
14
15
|
email: String?,
|
|
15
16
|
external_id: String?,
|
|
16
17
|
external_link: String?,
|
|
@@ -38,6 +39,8 @@ module ModerationAPI
|
|
|
38
39
|
|
|
39
40
|
attr_accessor trust_level: ModerationAPI::Models::AuthorRetrieveResponse::TrustLevel
|
|
40
41
|
|
|
42
|
+
attr_accessor company: String?
|
|
43
|
+
|
|
41
44
|
attr_accessor email: String?
|
|
42
45
|
|
|
43
46
|
attr_accessor external_id: String?
|
|
@@ -60,6 +63,7 @@ module ModerationAPI
|
|
|
60
63
|
risk_evaluation: ModerationAPI::Models::AuthorRetrieveResponse::RiskEvaluation?,
|
|
61
64
|
status: ModerationAPI::Models::AuthorRetrieveResponse::status,
|
|
62
65
|
trust_level: ModerationAPI::Models::AuthorRetrieveResponse::TrustLevel,
|
|
66
|
+
?company: String?,
|
|
63
67
|
?email: String?,
|
|
64
68
|
?external_id: String?,
|
|
65
69
|
?external_link: String?,
|
|
@@ -78,6 +82,7 @@ module ModerationAPI
|
|
|
78
82
|
risk_evaluation: ModerationAPI::Models::AuthorRetrieveResponse::RiskEvaluation?,
|
|
79
83
|
status: ModerationAPI::Models::AuthorRetrieveResponse::status,
|
|
80
84
|
trust_level: ModerationAPI::Models::AuthorRetrieveResponse::TrustLevel,
|
|
85
|
+
company: String?,
|
|
81
86
|
email: String?,
|
|
82
87
|
external_id: String?,
|
|
83
88
|
external_link: String?,
|
|
@@ -3,6 +3,7 @@ module ModerationAPI
|
|
|
3
3
|
type author_update_params =
|
|
4
4
|
{
|
|
5
5
|
id: String,
|
|
6
|
+
company: String?,
|
|
6
7
|
email: String?,
|
|
7
8
|
external_link: String?,
|
|
8
9
|
first_seen: Float,
|
|
@@ -20,6 +21,8 @@ module ModerationAPI
|
|
|
20
21
|
|
|
21
22
|
attr_accessor id: String
|
|
22
23
|
|
|
24
|
+
attr_accessor company: String?
|
|
25
|
+
|
|
23
26
|
attr_accessor email: String?
|
|
24
27
|
|
|
25
28
|
attr_accessor external_link: String?
|
|
@@ -46,6 +49,7 @@ module ModerationAPI
|
|
|
46
49
|
|
|
47
50
|
def initialize: (
|
|
48
51
|
id: String,
|
|
52
|
+
?company: String?,
|
|
49
53
|
?email: String?,
|
|
50
54
|
?external_link: String?,
|
|
51
55
|
?first_seen: Float,
|
|
@@ -59,6 +63,7 @@ module ModerationAPI
|
|
|
59
63
|
|
|
60
64
|
def to_hash: -> {
|
|
61
65
|
id: String,
|
|
66
|
+
company: String?,
|
|
62
67
|
email: String?,
|
|
63
68
|
external_link: String?,
|
|
64
69
|
first_seen: Float,
|
|
@@ -11,6 +11,7 @@ module ModerationAPI
|
|
|
11
11
|
risk_evaluation: ModerationAPI::Models::AuthorUpdateResponse::RiskEvaluation?,
|
|
12
12
|
status: ModerationAPI::Models::AuthorUpdateResponse::status,
|
|
13
13
|
trust_level: ModerationAPI::Models::AuthorUpdateResponse::TrustLevel,
|
|
14
|
+
company: String?,
|
|
14
15
|
email: String?,
|
|
15
16
|
external_id: String?,
|
|
16
17
|
external_link: String?,
|
|
@@ -38,6 +39,8 @@ module ModerationAPI
|
|
|
38
39
|
|
|
39
40
|
attr_accessor trust_level: ModerationAPI::Models::AuthorUpdateResponse::TrustLevel
|
|
40
41
|
|
|
42
|
+
attr_accessor company: String?
|
|
43
|
+
|
|
41
44
|
attr_accessor email: String?
|
|
42
45
|
|
|
43
46
|
attr_accessor external_id: String?
|
|
@@ -60,6 +63,7 @@ module ModerationAPI
|
|
|
60
63
|
risk_evaluation: ModerationAPI::Models::AuthorUpdateResponse::RiskEvaluation?,
|
|
61
64
|
status: ModerationAPI::Models::AuthorUpdateResponse::status,
|
|
62
65
|
trust_level: ModerationAPI::Models::AuthorUpdateResponse::TrustLevel,
|
|
66
|
+
?company: String?,
|
|
63
67
|
?email: String?,
|
|
64
68
|
?external_id: String?,
|
|
65
69
|
?external_link: String?,
|
|
@@ -78,6 +82,7 @@ module ModerationAPI
|
|
|
78
82
|
risk_evaluation: ModerationAPI::Models::AuthorUpdateResponse::RiskEvaluation?,
|
|
79
83
|
status: ModerationAPI::Models::AuthorUpdateResponse::status,
|
|
80
84
|
trust_level: ModerationAPI::Models::AuthorUpdateResponse::TrustLevel,
|
|
85
|
+
company: String?,
|
|
81
86
|
email: String?,
|
|
82
87
|
external_id: String?,
|
|
83
88
|
external_link: String?,
|
|
@@ -881,6 +881,7 @@ module ModerationAPI
|
|
|
881
881
|
flag: bool,
|
|
882
882
|
allowlist_wordlist_ids: ::Array[String],
|
|
883
883
|
blocklist_wordlist_ids: ::Array[String],
|
|
884
|
+
flag_link_shorteners: bool,
|
|
884
885
|
threshold: Float
|
|
885
886
|
}
|
|
886
887
|
|
|
@@ -897,6 +898,10 @@ module ModerationAPI
|
|
|
897
898
|
|
|
898
899
|
def blocklist_wordlist_ids=: (::Array[String]) -> ::Array[String]
|
|
899
900
|
|
|
901
|
+
attr_reader flag_link_shorteners: bool?
|
|
902
|
+
|
|
903
|
+
def flag_link_shorteners=: (bool) -> bool
|
|
904
|
+
|
|
900
905
|
attr_reader threshold: Float?
|
|
901
906
|
|
|
902
907
|
def threshold=: (Float) -> Float
|
|
@@ -905,6 +910,7 @@ module ModerationAPI
|
|
|
905
910
|
flag: bool,
|
|
906
911
|
?allowlist_wordlist_ids: ::Array[String],
|
|
907
912
|
?blocklist_wordlist_ids: ::Array[String],
|
|
913
|
+
?flag_link_shorteners: bool,
|
|
908
914
|
?threshold: Float,
|
|
909
915
|
?id: :url_risk
|
|
910
916
|
) -> void
|
|
@@ -914,6 +920,7 @@ module ModerationAPI
|
|
|
914
920
|
flag: bool,
|
|
915
921
|
allowlist_wordlist_ids: ::Array[String],
|
|
916
922
|
blocklist_wordlist_ids: ::Array[String],
|
|
923
|
+
flag_link_shorteners: bool,
|
|
917
924
|
threshold: Float
|
|
918
925
|
}
|
|
919
926
|
end
|
|
@@ -680,7 +680,8 @@ module ModerationAPI
|
|
|
680
680
|
type recommendation =
|
|
681
681
|
{
|
|
682
682
|
action: ModerationAPI::Models::ContentSubmitResponse::Recommendation::action,
|
|
683
|
-
reason_codes: ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::reason_code]
|
|
683
|
+
reason_codes: ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::reason_code],
|
|
684
|
+
matched_rules: ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule]
|
|
684
685
|
}
|
|
685
686
|
|
|
686
687
|
class Recommendation < ModerationAPI::Internal::Type::BaseModel
|
|
@@ -688,14 +689,22 @@ module ModerationAPI
|
|
|
688
689
|
|
|
689
690
|
attr_accessor reason_codes: ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::reason_code]
|
|
690
691
|
|
|
692
|
+
attr_reader matched_rules: ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule]?
|
|
693
|
+
|
|
694
|
+
def matched_rules=: (
|
|
695
|
+
::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule]
|
|
696
|
+
) -> ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule]
|
|
697
|
+
|
|
691
698
|
def initialize: (
|
|
692
699
|
action: ModerationAPI::Models::ContentSubmitResponse::Recommendation::action,
|
|
693
|
-
reason_codes: ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::reason_code]
|
|
700
|
+
reason_codes: ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::reason_code],
|
|
701
|
+
?matched_rules: ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule]
|
|
694
702
|
) -> void
|
|
695
703
|
|
|
696
704
|
def to_hash: -> {
|
|
697
705
|
action: ModerationAPI::Models::ContentSubmitResponse::Recommendation::action,
|
|
698
|
-
reason_codes: ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::reason_code]
|
|
706
|
+
reason_codes: ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::reason_code],
|
|
707
|
+
matched_rules: ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::MatchedRule]
|
|
699
708
|
}
|
|
700
709
|
|
|
701
710
|
type action = :review | :allow | :reject
|
|
@@ -717,6 +726,9 @@ module ModerationAPI
|
|
|
717
726
|
| :dry_run
|
|
718
727
|
| :trusted_allow
|
|
719
728
|
| :untrusted_severity
|
|
729
|
+
| :rule_match
|
|
730
|
+
| :rule_default
|
|
731
|
+
| :rule_fallback
|
|
720
732
|
|
|
721
733
|
module ReasonCode
|
|
722
734
|
extend ModerationAPI::Internal::Type::Enum
|
|
@@ -727,9 +739,24 @@ module ModerationAPI
|
|
|
727
739
|
DRY_RUN: :dry_run
|
|
728
740
|
TRUSTED_ALLOW: :trusted_allow
|
|
729
741
|
UNTRUSTED_SEVERITY: :untrusted_severity
|
|
742
|
+
RULE_MATCH: :rule_match
|
|
743
|
+
RULE_DEFAULT: :rule_default
|
|
744
|
+
RULE_FALLBACK: :rule_fallback
|
|
730
745
|
|
|
731
746
|
def self?.values: -> ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::reason_code]
|
|
732
747
|
end
|
|
748
|
+
|
|
749
|
+
type matched_rule = { key: String, name: String }
|
|
750
|
+
|
|
751
|
+
class MatchedRule < ModerationAPI::Internal::Type::BaseModel
|
|
752
|
+
attr_accessor key: String
|
|
753
|
+
|
|
754
|
+
attr_accessor name: String
|
|
755
|
+
|
|
756
|
+
def initialize: (key: String, name: String) -> void
|
|
757
|
+
|
|
758
|
+
def to_hash: -> { key: String, name: String }
|
|
759
|
+
end
|
|
733
760
|
end
|
|
734
761
|
|
|
735
762
|
type error = { id: String, message: String }
|
|
@@ -3,6 +3,7 @@ module ModerationAPI
|
|
|
3
3
|
class Authors
|
|
4
4
|
def create: (
|
|
5
5
|
external_id: String,
|
|
6
|
+
?company: String?,
|
|
6
7
|
?email: String?,
|
|
7
8
|
?external_link: String?,
|
|
8
9
|
?first_seen: Float,
|
|
@@ -21,6 +22,7 @@ module ModerationAPI
|
|
|
21
22
|
|
|
22
23
|
def update: (
|
|
23
24
|
String id,
|
|
25
|
+
?company: String?,
|
|
24
26
|
?email: String?,
|
|
25
27
|
?external_link: String?,
|
|
26
28
|
?first_seen: Float,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: moderation_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Moderation API
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-05-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|