safetykit 0.59.0 → 0.61.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cd8382bd07b22eba07c2a3db9f9a9cd0c30e5644842b3c47e8f1b1954fa0cba
4
- data.tar.gz: bb032a524f14bce495197601991f86b2005a3d93f9bc8da789f0ea35a44556a2
3
+ metadata.gz: 74d37bde20ce0dd29500d68690165a6c335b938f34981b568b1a3178a856bc20
4
+ data.tar.gz: 19a8abb52f8080e83e47025562fdc33bf6dece0f8dcb6a2097b4ad08845ed64f
5
5
  SHA512:
6
- metadata.gz: 8e9f79189873e0b34f05815bf85ccfc038016c061e4956163ac9062255b51bcc8050745bcb336a6fa28c69dfb7d6d9a12b9925550523e00890f600c91257ae61
7
- data.tar.gz: d8d90a4ae6535c35f3fc26865918d34a23bbdf03a169aac8fff19c6ebfc56a54f1ea6c06be5aef382a6cfb63bdd6bc340db22154e39caa390d6652613992e269
6
+ metadata.gz: 99472b2eff90b254304c3e57274013398bbf81b5e9dd8f862ac3e222c1b2345ceb8158a5e866582763968dbe173f00bbb471605553b2123f6b84c64ddd3aac19
7
+ data.tar.gz: c184514d9a4b98b3104486af354bff6595d170fd4fa7ad8cb1e26a4c3bca729e290b95256d052a000f8215a8e953d615c1a35253c16a0840a0cac2ccae4d9112
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.61.0 (2026-08-13)
4
+
5
+ Full Changelog: [v0.60.0...v0.61.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.60.0...v0.61.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([5fbad62](https://github.com/GetSafetyKit/safetykit-ruby/commit/5fbad6289871e01019b6ffc6036b763c56ff5c2b))
10
+
11
+ ## 0.60.0 (2026-08-12)
12
+
13
+ Full Changelog: [v0.59.0...v0.60.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.59.0...v0.60.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([8a1cae4](https://github.com/GetSafetyKit/safetykit-ruby/commit/8a1cae4ed0d2f9c53e4f934a63fb9f245da6c814))
18
+
3
19
  ## 0.59.0 (2026-08-12)
4
20
 
5
21
  Full Changelog: [v0.58.0...v0.59.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.58.0...v0.59.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "safetykit", "~> 0.59.0"
20
+ gem "safetykit", "~> 0.61.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -50,7 +50,7 @@ module SafetyKit
50
50
  # A user appeals a moderation action taken against them. Use user_id for the appealing user, appealed_decision_id to reference the decision being appealed, and content and content_id for the appeal itself.
51
51
  variant -> { SafetyKit::AsyncCreateAsyncParams::Body::AppealEventRequest }
52
52
 
53
- # A moderation label or decision from an automated enforcement system or manual review workflow. Do not send user_id; use source_type and source_id for attribution.
53
+ # A moderation label or decision from an automated enforcement system or manual review workflow. Do not send user_id; use source_type and source_id for attribution. Use labels for categories the decision applied and negative_labels for categories the decision explicitly reviewed and determined do not apply; at least one of the two is required.
54
54
  variant -> { SafetyKit::AsyncCreateAsyncParams::Body::ModerationDecisionEventRequest }
55
55
 
56
56
  variant -> { SafetyKit::Models::AsyncCreateAsyncParams::Body::UnionMember8Array }
@@ -2931,12 +2931,6 @@ module SafetyKit
2931
2931
  # @return [String]
2932
2932
  required :event_name, String
2933
2933
 
2934
- # @!attribute labels
2935
- # One or more label categories supplied with the report or moderation decision.
2936
- #
2937
- # @return [Array<String>]
2938
- required :labels, SafetyKit::Internal::Type::ArrayOf[String]
2939
-
2940
2934
  # @!attribute source_id
2941
2935
  # Stable identifier within source_type. Examples: moderator@example.com or
2942
2936
  # 550e8400-e29b-41d4-a716-446655440000 for expert_labeler or human_moderator,
@@ -2998,6 +2992,13 @@ module SafetyKit
2998
2992
  # @return [String, nil]
2999
2993
  optional :idempotency_key, String
3000
2994
 
2995
+ # @!attribute labels
2996
+ # Label categories the decision determined apply to the target. At least one of
2997
+ # labels or negative_labels is required.
2998
+ #
2999
+ # @return [Array<String>, nil]
3000
+ optional :labels, SafetyKit::Internal::Type::ArrayOf[String]
3001
+
3001
3002
  # @!attribute metadata
3002
3003
  # Non-PII product context for filtering, segmentation, and debugging. Values may
3003
3004
  # be strings, numbers, booleans, or arrays of those scalar values.
@@ -3006,6 +3007,14 @@ module SafetyKit
3006
3007
  optional :metadata,
3007
3008
  -> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::AsyncCreateAsyncParams::Body::ModerationDecisionEventRequest::Metadata] }
3008
3009
 
3010
+ # @!attribute negative_labels
3011
+ # Label categories the decision explicitly reviewed and determined do NOT apply to
3012
+ # the target, such as a manual review that clears a user reported for spam. A
3013
+ # label cannot appear in both labels and negative_labels.
3014
+ #
3015
+ # @return [Array<String>, nil]
3016
+ optional :negative_labels, SafetyKit::Internal::Type::ArrayOf[String]
3017
+
3009
3018
  # @!attribute resources_used
3010
3019
  # Reusable resources observed during the event. Use this for emails, phone
3011
3020
  # numbers, names, addresses, social handles, URLs, payment identifiers,
@@ -3027,19 +3036,19 @@ module SafetyKit
3027
3036
  # @return [String, nil]
3028
3037
  optional :target_user_id, String
3029
3038
 
3030
- # @!method initialize(event_name:, labels:, source_id:, source_type:, timestamp:, type:, client_info: nil, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, target_content_id: nil, target_user_id: nil)
3039
+ # @!method initialize(event_name:, source_id:, source_type:, timestamp:, type:, client_info: nil, content: nil, content_id: nil, idempotency_key: nil, labels: nil, metadata: nil, negative_labels: nil, resources_used: nil, target_content_id: nil, target_user_id: nil)
3031
3040
  # Some parameter documentations has been truncated, see
3032
3041
  # {SafetyKit::Models::AsyncCreateAsyncParams::Body::ModerationDecisionEventRequest}
3033
3042
  # for more details.
3034
3043
  #
3035
3044
  # A moderation label or decision from an automated enforcement system or manual
3036
3045
  # review workflow. Do not send user_id; use source_type and source_id for
3037
- # attribution.
3046
+ # attribution. Use labels for categories the decision applied and negative_labels
3047
+ # for categories the decision explicitly reviewed and determined do not apply; at
3048
+ # least one of the two is required.
3038
3049
  #
3039
3050
  # @param event_name [String] Stable, low-cardinality product action name. Use snake_case and put dynamic valu
3040
3051
  #
3041
- # @param labels [Array<String>] One or more label categories supplied with the report or moderation decision.
3042
- #
3043
3052
  # @param source_id [String] Stable identifier within source_type. Examples: moderator@example.com or 550e840
3044
3053
  #
3045
3054
  # @param source_type [Symbol, SafetyKit::Models::AsyncCreateAsyncParams::Body::ModerationDecisionEventRequest::SourceType] Coarse attribution category for the moderation decision source. Supported values
@@ -3056,8 +3065,12 @@ module SafetyKit
3056
3065
  #
3057
3066
  # @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
3058
3067
  #
3068
+ # @param labels [Array<String>] Label categories the decision determined apply to the target. At least one of la
3069
+ #
3059
3070
  # @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
3060
3071
  #
3072
+ # @param negative_labels [Array<String>] Label categories the decision explicitly reviewed and determined do NOT apply to
3073
+ #
3061
3074
  # @param resources_used [Array<SafetyKit::Models::AsyncCreateAsyncParams::Body::ModerationDecisionEventRequest::ResourcesUsed::EntityIDResource, SafetyKit::Models::AsyncCreateAsyncParams::Body::ModerationDecisionEventRequest::ResourcesUsed::UnionMember1>] Reusable resources observed during the event. Use this for emails, phone numbers
3062
3075
  #
3063
3076
  # @param target_content_id [String] Your stable identifier for the content being reported.
@@ -3396,7 +3409,7 @@ module SafetyKit
3396
3409
  # A user appeals a moderation action taken against them. Use user_id for the appealing user, appealed_decision_id to reference the decision being appealed, and content and content_id for the appeal itself.
3397
3410
  variant :appeal, -> { SafetyKit::AsyncCreateAsyncParams::Body::UnionMember8::Appeal }
3398
3411
 
3399
- # A moderation label or decision from an automated enforcement system or manual review workflow. Do not send user_id; use source_type and source_id for attribution.
3412
+ # A moderation label or decision from an automated enforcement system or manual review workflow. Do not send user_id; use source_type and source_id for attribution. Use labels for categories the decision applied and negative_labels for categories the decision explicitly reviewed and determined do not apply; at least one of the two is required.
3400
3413
  variant :moderation_decision,
3401
3414
  -> { SafetyKit::AsyncCreateAsyncParams::Body::UnionMember8::ModerationDecision }
3402
3415
 
@@ -6208,12 +6221,6 @@ module SafetyKit
6208
6221
  # @return [String]
6209
6222
  required :event_name, String
6210
6223
 
6211
- # @!attribute labels
6212
- # One or more label categories supplied with the report or moderation decision.
6213
- #
6214
- # @return [Array<String>]
6215
- required :labels, SafetyKit::Internal::Type::ArrayOf[String]
6216
-
6217
6224
  # @!attribute source_id
6218
6225
  # Stable identifier within source_type. Examples: moderator@example.com or
6219
6226
  # 550e8400-e29b-41d4-a716-446655440000 for expert_labeler or human_moderator,
@@ -6275,6 +6282,13 @@ module SafetyKit
6275
6282
  # @return [String, nil]
6276
6283
  optional :idempotency_key, String
6277
6284
 
6285
+ # @!attribute labels
6286
+ # Label categories the decision determined apply to the target. At least one of
6287
+ # labels or negative_labels is required.
6288
+ #
6289
+ # @return [Array<String>, nil]
6290
+ optional :labels, SafetyKit::Internal::Type::ArrayOf[String]
6291
+
6278
6292
  # @!attribute metadata
6279
6293
  # Non-PII product context for filtering, segmentation, and debugging. Values may
6280
6294
  # be strings, numbers, booleans, or arrays of those scalar values.
@@ -6283,6 +6297,14 @@ module SafetyKit
6283
6297
  optional :metadata,
6284
6298
  -> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::AsyncCreateAsyncParams::Body::UnionMember8::ModerationDecision::Metadata] }
6285
6299
 
6300
+ # @!attribute negative_labels
6301
+ # Label categories the decision explicitly reviewed and determined do NOT apply to
6302
+ # the target, such as a manual review that clears a user reported for spam. A
6303
+ # label cannot appear in both labels and negative_labels.
6304
+ #
6305
+ # @return [Array<String>, nil]
6306
+ optional :negative_labels, SafetyKit::Internal::Type::ArrayOf[String]
6307
+
6286
6308
  # @!attribute resources_used
6287
6309
  # Reusable resources observed during the event. Use this for emails, phone
6288
6310
  # numbers, names, addresses, social handles, URLs, payment identifiers,
@@ -6304,19 +6326,19 @@ module SafetyKit
6304
6326
  # @return [String, nil]
6305
6327
  optional :target_user_id, String
6306
6328
 
6307
- # @!method initialize(event_name:, labels:, source_id:, source_type:, timestamp:, client_info: nil, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, target_content_id: nil, target_user_id: nil, type: :moderation_decision)
6329
+ # @!method initialize(event_name:, source_id:, source_type:, timestamp:, client_info: nil, content: nil, content_id: nil, idempotency_key: nil, labels: nil, metadata: nil, negative_labels: nil, resources_used: nil, target_content_id: nil, target_user_id: nil, type: :moderation_decision)
6308
6330
  # Some parameter documentations has been truncated, see
6309
6331
  # {SafetyKit::Models::AsyncCreateAsyncParams::Body::UnionMember8::ModerationDecision}
6310
6332
  # for more details.
6311
6333
  #
6312
6334
  # A moderation label or decision from an automated enforcement system or manual
6313
6335
  # review workflow. Do not send user_id; use source_type and source_id for
6314
- # attribution.
6336
+ # attribution. Use labels for categories the decision applied and negative_labels
6337
+ # for categories the decision explicitly reviewed and determined do not apply; at
6338
+ # least one of the two is required.
6315
6339
  #
6316
6340
  # @param event_name [String] Stable, low-cardinality product action name. Use snake_case and put dynamic valu
6317
6341
  #
6318
- # @param labels [Array<String>] One or more label categories supplied with the report or moderation decision.
6319
- #
6320
6342
  # @param source_id [String] Stable identifier within source_type. Examples: moderator@example.com or 550e840
6321
6343
  #
6322
6344
  # @param source_type [Symbol, SafetyKit::Models::AsyncCreateAsyncParams::Body::UnionMember8::ModerationDecision::SourceType] Coarse attribution category for the moderation decision source. Supported values
@@ -6331,8 +6353,12 @@ module SafetyKit
6331
6353
  #
6332
6354
  # @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
6333
6355
  #
6356
+ # @param labels [Array<String>] Label categories the decision determined apply to the target. At least one of la
6357
+ #
6334
6358
  # @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
6335
6359
  #
6360
+ # @param negative_labels [Array<String>] Label categories the decision explicitly reviewed and determined do NOT apply to
6361
+ #
6336
6362
  # @param resources_used [Array<SafetyKit::Models::AsyncCreateAsyncParams::Body::UnionMember8::ModerationDecision::ResourcesUsed::EntityIDResource, SafetyKit::Models::AsyncCreateAsyncParams::Body::UnionMember8::ModerationDecision::ResourcesUsed::UnionMember1>] Reusable resources observed during the event. Use this for emails, phone numbers
6337
6363
  #
6338
6364
  # @param target_content_id [String] Your stable identifier for the content being reported.
@@ -51,7 +51,7 @@ module SafetyKit
51
51
  # A user appeals a moderation action taken against them. Use user_id for the appealing user, appealed_decision_id to reference the decision being appealed, and content and content_id for the appeal itself.
52
52
  variant -> { SafetyKit::Beta::EventCreateParams::Body::AppealEventRequest }
53
53
 
54
- # A moderation label or decision from an automated enforcement system or manual review workflow. Do not send user_id; use source_type and source_id for attribution.
54
+ # A moderation label or decision from an automated enforcement system or manual review workflow. Do not send user_id; use source_type and source_id for attribution. Use labels for categories the decision applied and negative_labels for categories the decision explicitly reviewed and determined do not apply; at least one of the two is required.
55
55
  variant -> { SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest }
56
56
 
57
57
  variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember8Array }
@@ -2933,12 +2933,6 @@ module SafetyKit
2933
2933
  # @return [String]
2934
2934
  required :event_name, String
2935
2935
 
2936
- # @!attribute labels
2937
- # One or more label categories supplied with the report or moderation decision.
2938
- #
2939
- # @return [Array<String>]
2940
- required :labels, SafetyKit::Internal::Type::ArrayOf[String]
2941
-
2942
2936
  # @!attribute source_id
2943
2937
  # Stable identifier within source_type. Examples: moderator@example.com or
2944
2938
  # 550e8400-e29b-41d4-a716-446655440000 for expert_labeler or human_moderator,
@@ -3001,6 +2995,13 @@ module SafetyKit
3001
2995
  # @return [String, nil]
3002
2996
  optional :idempotency_key, String
3003
2997
 
2998
+ # @!attribute labels
2999
+ # Label categories the decision determined apply to the target. At least one of
3000
+ # labels or negative_labels is required.
3001
+ #
3002
+ # @return [Array<String>, nil]
3003
+ optional :labels, SafetyKit::Internal::Type::ArrayOf[String]
3004
+
3004
3005
  # @!attribute metadata
3005
3006
  # Non-PII product context for filtering, segmentation, and debugging. Values may
3006
3007
  # be strings, numbers, booleans, or arrays of those scalar values.
@@ -3009,6 +3010,14 @@ module SafetyKit
3009
3010
  optional :metadata,
3010
3011
  -> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Metadata] }
3011
3012
 
3013
+ # @!attribute negative_labels
3014
+ # Label categories the decision explicitly reviewed and determined do NOT apply to
3015
+ # the target, such as a manual review that clears a user reported for spam. A
3016
+ # label cannot appear in both labels and negative_labels.
3017
+ #
3018
+ # @return [Array<String>, nil]
3019
+ optional :negative_labels, SafetyKit::Internal::Type::ArrayOf[String]
3020
+
3012
3021
  # @!attribute resources_used
3013
3022
  # Reusable resources observed during the event. Use this for emails, phone
3014
3023
  # numbers, names, addresses, social handles, URLs, payment identifiers,
@@ -3030,19 +3039,19 @@ module SafetyKit
3030
3039
  # @return [String, nil]
3031
3040
  optional :target_user_id, String
3032
3041
 
3033
- # @!method initialize(event_name:, labels:, source_id:, source_type:, timestamp:, type:, client_info: nil, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, target_content_id: nil, target_user_id: nil)
3042
+ # @!method initialize(event_name:, source_id:, source_type:, timestamp:, type:, client_info: nil, content: nil, content_id: nil, idempotency_key: nil, labels: nil, metadata: nil, negative_labels: nil, resources_used: nil, target_content_id: nil, target_user_id: nil)
3034
3043
  # Some parameter documentations has been truncated, see
3035
3044
  # {SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest}
3036
3045
  # for more details.
3037
3046
  #
3038
3047
  # A moderation label or decision from an automated enforcement system or manual
3039
3048
  # review workflow. Do not send user_id; use source_type and source_id for
3040
- # attribution.
3049
+ # attribution. Use labels for categories the decision applied and negative_labels
3050
+ # for categories the decision explicitly reviewed and determined do not apply; at
3051
+ # least one of the two is required.
3041
3052
  #
3042
3053
  # @param event_name [String] Stable, low-cardinality product action name. Use snake_case and put dynamic valu
3043
3054
  #
3044
- # @param labels [Array<String>] One or more label categories supplied with the report or moderation decision.
3045
- #
3046
3055
  # @param source_id [String] Stable identifier within source_type. Examples: moderator@example.com or 550e840
3047
3056
  #
3048
3057
  # @param source_type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::SourceType] Coarse attribution category for the moderation decision source. Supported values
@@ -3059,8 +3068,12 @@ module SafetyKit
3059
3068
  #
3060
3069
  # @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
3061
3070
  #
3071
+ # @param labels [Array<String>] Label categories the decision determined apply to the target. At least one of la
3072
+ #
3062
3073
  # @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
3063
3074
  #
3075
+ # @param negative_labels [Array<String>] Label categories the decision explicitly reviewed and determined do NOT apply to
3076
+ #
3064
3077
  # @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::ResourcesUsed::EntityIDResource, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::ResourcesUsed::UnionMember1>] Reusable resources observed during the event. Use this for emails, phone numbers
3065
3078
  #
3066
3079
  # @param target_content_id [String] Your stable identifier for the content being reported.
@@ -3399,7 +3412,7 @@ module SafetyKit
3399
3412
  # A user appeals a moderation action taken against them. Use user_id for the appealing user, appealed_decision_id to reference the decision being appealed, and content and content_id for the appeal itself.
3400
3413
  variant :appeal, -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember8::Appeal }
3401
3414
 
3402
- # A moderation label or decision from an automated enforcement system or manual review workflow. Do not send user_id; use source_type and source_id for attribution.
3415
+ # A moderation label or decision from an automated enforcement system or manual review workflow. Do not send user_id; use source_type and source_id for attribution. Use labels for categories the decision applied and negative_labels for categories the decision explicitly reviewed and determined do not apply; at least one of the two is required.
3403
3416
  variant :moderation_decision,
3404
3417
  -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember8::ModerationDecision }
3405
3418
 
@@ -6211,12 +6224,6 @@ module SafetyKit
6211
6224
  # @return [String]
6212
6225
  required :event_name, String
6213
6226
 
6214
- # @!attribute labels
6215
- # One or more label categories supplied with the report or moderation decision.
6216
- #
6217
- # @return [Array<String>]
6218
- required :labels, SafetyKit::Internal::Type::ArrayOf[String]
6219
-
6220
6227
  # @!attribute source_id
6221
6228
  # Stable identifier within source_type. Examples: moderator@example.com or
6222
6229
  # 550e8400-e29b-41d4-a716-446655440000 for expert_labeler or human_moderator,
@@ -6278,6 +6285,13 @@ module SafetyKit
6278
6285
  # @return [String, nil]
6279
6286
  optional :idempotency_key, String
6280
6287
 
6288
+ # @!attribute labels
6289
+ # Label categories the decision determined apply to the target. At least one of
6290
+ # labels or negative_labels is required.
6291
+ #
6292
+ # @return [Array<String>, nil]
6293
+ optional :labels, SafetyKit::Internal::Type::ArrayOf[String]
6294
+
6281
6295
  # @!attribute metadata
6282
6296
  # Non-PII product context for filtering, segmentation, and debugging. Values may
6283
6297
  # be strings, numbers, booleans, or arrays of those scalar values.
@@ -6286,6 +6300,14 @@ module SafetyKit
6286
6300
  optional :metadata,
6287
6301
  -> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember8::ModerationDecision::Metadata] }
6288
6302
 
6303
+ # @!attribute negative_labels
6304
+ # Label categories the decision explicitly reviewed and determined do NOT apply to
6305
+ # the target, such as a manual review that clears a user reported for spam. A
6306
+ # label cannot appear in both labels and negative_labels.
6307
+ #
6308
+ # @return [Array<String>, nil]
6309
+ optional :negative_labels, SafetyKit::Internal::Type::ArrayOf[String]
6310
+
6289
6311
  # @!attribute resources_used
6290
6312
  # Reusable resources observed during the event. Use this for emails, phone
6291
6313
  # numbers, names, addresses, social handles, URLs, payment identifiers,
@@ -6307,19 +6329,19 @@ module SafetyKit
6307
6329
  # @return [String, nil]
6308
6330
  optional :target_user_id, String
6309
6331
 
6310
- # @!method initialize(event_name:, labels:, source_id:, source_type:, timestamp:, client_info: nil, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, target_content_id: nil, target_user_id: nil, type: :moderation_decision)
6332
+ # @!method initialize(event_name:, source_id:, source_type:, timestamp:, client_info: nil, content: nil, content_id: nil, idempotency_key: nil, labels: nil, metadata: nil, negative_labels: nil, resources_used: nil, target_content_id: nil, target_user_id: nil, type: :moderation_decision)
6311
6333
  # Some parameter documentations has been truncated, see
6312
6334
  # {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember8::ModerationDecision}
6313
6335
  # for more details.
6314
6336
  #
6315
6337
  # A moderation label or decision from an automated enforcement system or manual
6316
6338
  # review workflow. Do not send user_id; use source_type and source_id for
6317
- # attribution.
6339
+ # attribution. Use labels for categories the decision applied and negative_labels
6340
+ # for categories the decision explicitly reviewed and determined do not apply; at
6341
+ # least one of the two is required.
6318
6342
  #
6319
6343
  # @param event_name [String] Stable, low-cardinality product action name. Use snake_case and put dynamic valu
6320
6344
  #
6321
- # @param labels [Array<String>] One or more label categories supplied with the report or moderation decision.
6322
- #
6323
6345
  # @param source_id [String] Stable identifier within source_type. Examples: moderator@example.com or 550e840
6324
6346
  #
6325
6347
  # @param source_type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember8::ModerationDecision::SourceType] Coarse attribution category for the moderation decision source. Supported values
@@ -6334,8 +6356,12 @@ module SafetyKit
6334
6356
  #
6335
6357
  # @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
6336
6358
  #
6359
+ # @param labels [Array<String>] Label categories the decision determined apply to the target. At least one of la
6360
+ #
6337
6361
  # @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
6338
6362
  #
6363
+ # @param negative_labels [Array<String>] Label categories the decision explicitly reviewed and determined do NOT apply to
6364
+ #
6339
6365
  # @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember8::ModerationDecision::ResourcesUsed::EntityIDResource, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember8::ModerationDecision::ResourcesUsed::UnionMember1>] Reusable resources observed during the event. Use this for emails, phone numbers
6340
6366
  #
6341
6367
  # @param target_content_id [String] Your stable identifier for the content being reported.
@@ -8,7 +8,9 @@ module SafetyKit
8
8
  include SafetyKit::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute content
11
- # Content parts to classify together. At most 20 images.
11
+ # Content parts to classify together. At most 20 images. Text parts may total
12
+ # 128,000 characters. Text is classified in overlapping windows and a label
13
+ # matches when any window matches.
12
14
  #
13
15
  # @return [Array<SafetyKit::Models::ContentCreateParams::Content::UnionMember0, SafetyKit::Models::ContentCreateParams::Content::UnionMember1>]
14
16
  required :content,
@@ -39,7 +41,10 @@ module SafetyKit
39
41
  optional :safety_kit_version, enum: -> { SafetyKit::ContentCreateParams::SafetyKitVersion }
40
42
 
41
43
  # @!method initialize(content:, user_id:, content_id: nil, metadata: nil, safety_kit_version: nil, request_options: {})
42
- # @param content [Array<SafetyKit::Models::ContentCreateParams::Content::UnionMember0, SafetyKit::Models::ContentCreateParams::Content::UnionMember1>] Content parts to classify together. At most 20 images.
44
+ # Some parameter documentations has been truncated, see
45
+ # {SafetyKit::Models::ContentCreateParams} for more details.
46
+ #
47
+ # @param content [Array<SafetyKit::Models::ContentCreateParams::Content::UnionMember0, SafetyKit::Models::ContentCreateParams::Content::UnionMember1>] Content parts to classify together. At most 20 images. Text parts may total 128,
43
48
  #
44
49
  # @param user_id [String] Your stable identifier for the user this content belongs to.
45
50
  #
@@ -61,7 +66,7 @@ module SafetyKit
61
66
 
62
67
  class UnionMember0 < SafetyKit::Internal::Type::BaseModel
63
68
  # @!attribute text
64
- # User-authored text to classify.
69
+ # User-authored text to classify. At most 16,000 characters per part.
65
70
  #
66
71
  # @return [String]
67
72
  required :text, String
@@ -78,7 +83,7 @@ module SafetyKit
78
83
  optional :key, String
79
84
 
80
85
  # @!method initialize(text:, type:, key: nil)
81
- # @param text [String] User-authored text to classify.
86
+ # @param text [String] User-authored text to classify. At most 16,000 characters per part.
82
87
  #
83
88
  # @param type [Symbol, SafetyKit::Models::ContentCreateParams::Content::UnionMember0::Type]
84
89
  #
@@ -19,7 +19,7 @@ module SafetyKit
19
19
  #
20
20
  # @overload create(content:, user_id:, content_id: nil, metadata: nil, safety_kit_version: nil, request_options: {})
21
21
  #
22
- # @param content [Array<SafetyKit::Models::ContentCreateParams::Content::UnionMember0, SafetyKit::Models::ContentCreateParams::Content::UnionMember1>] Body param: Content parts to classify together. At most 20 images.
22
+ # @param content [Array<SafetyKit::Models::ContentCreateParams::Content::UnionMember0, SafetyKit::Models::ContentCreateParams::Content::UnionMember1>] Body param: Content parts to classify together. At most 20 images. Text parts ma
23
23
  #
24
24
  # @param user_id [String] Body param: Your stable identifier for the user this content belongs to.
25
25
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SafetyKit
4
- VERSION = "0.59.0"
4
+ VERSION = "0.61.0"
5
5
  end