moderation_api 2.8.1 → 2.9.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: ed1d708395d447d33b2969c47dcc0f60206404e616b7a38f188cc6b246e89b6a
4
- data.tar.gz: 2440c3f3f5bdf3526c71ab8a7b17e842581fba9c9b49d582f45695b4a2d58766
3
+ metadata.gz: 0f3323914772d042544494f2ca1a728d1f0c947e08e2347ec6c36d3372e1251a
4
+ data.tar.gz: 16eb59e90c6238533ed014ae94429c92bea53f7da622674b9072ce1ae409ba27
5
5
  SHA512:
6
- metadata.gz: e91c6505460df45778a397759b68e6d467341fab174209b39e3d2a8ac65b90067ac09e586a97061e72d0eb30c7751d34bc6c6e3ee43dac9e6973e61f61a1d8e4
7
- data.tar.gz: 9cf7d9095b429af9d66436ac99982025978f4e18f3d0dec717e204db30730b2f4291c38f6563212731d1f4f82d8d3c3588a6c42b9625deca3ee5ba6b3a0c7b8a
6
+ metadata.gz: 21b0f24c6ff0fd8ca8c5c5427ef1677d992edcd483e91a1b2327d43c8b41699184b6d2486cb1ba600defa60153a40a155aed72fab8c80375dc9b21cf1450a85f
7
+ data.tar.gz: cbc24e8553124634c9a0151f081346031177d13c692c4c0d524c29949b85b6636fe5bb3331616eeb99171acd57ff9d2e4de5184d5910d37b876d44b831fec91f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.9.0 (2026-03-03)
4
+
5
+ Full Changelog: [v2.8.1...v2.9.0](https://github.com/moderation-api/sdk-ruby/compare/v2.8.1...v2.9.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([b6bc2c8](https://github.com/moderation-api/sdk-ruby/commit/b6bc2c86c329084595d528ead7516b002006cd7a))
10
+
3
11
  ## 2.8.1 (2026-02-27)
4
12
 
5
13
  Full Changelog: [v2.8.0...v2.8.1](https://github.com/moderation-api/sdk-ruby/compare/v2.8.0...v2.8.1)
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.8.1"
18
+ gem "moderation_api", "~> 2.9.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -370,13 +370,20 @@ module ModerationAPI
370
370
  # @return [Float]
371
371
  required :severity_score, Float
372
372
 
373
+ # @!attribute shadow_flagged
374
+ # Whether the content would have been flagged by analyze-only policies (flag:
375
+ # false).
376
+ #
377
+ # @return [Boolean, nil]
378
+ optional :shadow_flagged, ModerationAPI::Internal::Type::Boolean
379
+
373
380
  # @!attribute unicode_spoofed
374
381
  # Whether the content was flagged for Unicode spoofing.
375
382
  #
376
383
  # @return [Boolean, nil]
377
384
  optional :unicode_spoofed, ModerationAPI::Internal::Type::Boolean
378
385
 
379
- # @!method initialize(flag_probability:, flagged:, severity_score:, unicode_spoofed: nil)
386
+ # @!method initialize(flag_probability:, flagged:, severity_score:, shadow_flagged: nil, unicode_spoofed: nil)
380
387
  # Some parameter documentations has been truncated, see
381
388
  # {ModerationAPI::Models::ContentSubmitResponse::Evaluation} for more details.
382
389
  #
@@ -388,6 +395,8 @@ module ModerationAPI
388
395
  #
389
396
  # @param severity_score [Float] The severity score of the content. A higher score indicates more severe content.
390
397
  #
398
+ # @param shadow_flagged [Boolean] Whether the content would have been flagged by analyze-only policies (flag: fals
399
+ #
391
400
  # @param unicode_spoofed [Boolean] Whether the content was flagged for Unicode spoofing.
392
401
  end
393
402
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ModerationAPI
4
- VERSION = "2.8.1"
4
+ VERSION = "2.9.0"
5
5
  end
@@ -721,6 +721,14 @@ module ModerationAPI
721
721
  sig { returns(Float) }
722
722
  attr_accessor :severity_score
723
723
 
724
+ # Whether the content would have been flagged by analyze-only policies (flag:
725
+ # false).
726
+ sig { returns(T.nilable(T::Boolean)) }
727
+ attr_reader :shadow_flagged
728
+
729
+ sig { params(shadow_flagged: T::Boolean).void }
730
+ attr_writer :shadow_flagged
731
+
724
732
  # Whether the content was flagged for Unicode spoofing.
725
733
  sig { returns(T.nilable(T::Boolean)) }
726
734
  attr_reader :unicode_spoofed
@@ -734,6 +742,7 @@ module ModerationAPI
734
742
  flag_probability: Float,
735
743
  flagged: T::Boolean,
736
744
  severity_score: Float,
745
+ shadow_flagged: T::Boolean,
737
746
  unicode_spoofed: T::Boolean
738
747
  ).returns(T.attached_class)
739
748
  end
@@ -744,6 +753,9 @@ module ModerationAPI
744
753
  flagged:,
745
754
  # The severity score of the content. A higher score indicates more severe content.
746
755
  severity_score:,
756
+ # Whether the content would have been flagged by analyze-only policies (flag:
757
+ # false).
758
+ shadow_flagged: nil,
747
759
  # Whether the content was flagged for Unicode spoofing.
748
760
  unicode_spoofed: nil
749
761
  )
@@ -755,6 +767,7 @@ module ModerationAPI
755
767
  flag_probability: Float,
756
768
  flagged: T::Boolean,
757
769
  severity_score: Float,
770
+ shadow_flagged: T::Boolean,
758
771
  unicode_spoofed: T::Boolean
759
772
  }
760
773
  )
@@ -245,6 +245,7 @@ module ModerationAPI
245
245
  flag_probability: Float,
246
246
  flagged: bool,
247
247
  severity_score: Float,
248
+ shadow_flagged: bool,
248
249
  unicode_spoofed: bool
249
250
  }
250
251
 
@@ -255,6 +256,10 @@ module ModerationAPI
255
256
 
256
257
  attr_accessor severity_score: Float
257
258
 
259
+ attr_reader shadow_flagged: bool?
260
+
261
+ def shadow_flagged=: (bool) -> bool
262
+
258
263
  attr_reader unicode_spoofed: bool?
259
264
 
260
265
  def unicode_spoofed=: (bool) -> bool
@@ -263,6 +268,7 @@ module ModerationAPI
263
268
  flag_probability: Float,
264
269
  flagged: bool,
265
270
  severity_score: Float,
271
+ ?shadow_flagged: bool,
266
272
  ?unicode_spoofed: bool
267
273
  ) -> void
268
274
 
@@ -270,6 +276,7 @@ module ModerationAPI
270
276
  flag_probability: Float,
271
277
  flagged: bool,
272
278
  severity_score: Float,
279
+ shadow_flagged: bool,
273
280
  unicode_spoofed: bool
274
281
  }
275
282
  end
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.8.1
4
+ version: 2.9.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-02-27 00:00:00.000000000 Z
11
+ date: 2026-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi