moderation_api 2.5.0 → 2.6.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: 4da2393a0dc444367f36cd6636553143d6f86bb08e64c30a05c3855373105390
4
- data.tar.gz: 030303362113354f37346217060b7853dabe827d03de86fe3b8c7a5c1d041cb7
3
+ metadata.gz: eadc4d2079d3017de1173fb3f2a476d4e5d464714320a2c14ef963c66bea1488
4
+ data.tar.gz: fa7ceff538ac65f7de91b5ea0f67a01e0c2f5180c34d093350de685c12789c77
5
5
  SHA512:
6
- metadata.gz: 401af59bb36f9a7fb382ea217a0d32adaf42a920cc12257c0ee1c363f6be0afe152bbee19139d823a80df3c8c44935b2c7618c992cbf06508e31a490ea1f7882
7
- data.tar.gz: b687d3f5d2097143a50fafc0cdcaba8d1fa49943404509dc07add034afe00d8054df67b446e7d40956d4bf47c9d10c18a2da0ae6a6ae00d2184316658d02941b
6
+ metadata.gz: b5d6eb01d7471d87b5e153fcc8abdd914771cc17bb5f25715db1aa0b5df7d12ae11c0bca62f77783782f87a72a3095d42cd8ed49cbb8dd42c8561e8bf2e73181
7
+ data.tar.gz: 6c177a6dec9bc3c231c84547399a415830971560fe6fd71620cb8bcf592dcf441ab453e7d7a130f24ea862b1ef2f54a9ca0fa92d60b43bf3f08aa8d5b30ec70a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.6.0 (2026-02-06)
4
+
5
+ Full Changelog: [v2.5.1...v2.6.0](https://github.com/moderation-api/sdk-ruby/compare/v2.5.1...v2.6.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([3f29a05](https://github.com/moderation-api/sdk-ruby/commit/3f29a05c2dcf23a3640f6ec76ca450cd44fcd66c))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **docs:** remove www prefix ([f5b51e1](https://github.com/moderation-api/sdk-ruby/commit/f5b51e17d19b441376cedfeca7fbf7858bbf8fe9))
15
+
16
+ ## 2.5.1 (2026-02-03)
17
+
18
+ Full Changelog: [v2.5.0...v2.5.1](https://github.com/moderation-api/sdk-ruby/compare/v2.5.0...v2.5.1)
19
+
20
+ ### Bug Fixes
21
+
22
+ * **client:** always add content-length to post body, even when empty ([22201f0](https://github.com/moderation-api/sdk-ruby/commit/22201f0900c1c285c0900dec155b5e0718ccc035))
23
+
3
24
  ## 2.5.0 (2026-01-28)
4
25
 
5
26
  Full Changelog: [v2.4.0...v2.5.0](https://github.com/moderation-api/sdk-ruby/compare/v2.4.0...v2.5.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.5.0"
18
+ gem "moderation_api", "~> 2.6.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -75,7 +75,7 @@ module ModerationAPI
75
75
 
76
76
  case body
77
77
  in nil
78
- nil
78
+ req["content-length"] ||= 0 unless req["transfer-encoding"]
79
79
  in String
80
80
  req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"]
81
81
  req.body_stream = ModerationAPI::Internal::Util::ReadIOAdapter.new(body, &blk)
@@ -721,6 +721,8 @@ module ModerationAPI
721
721
  SEVERITY_REVIEW = :severity_review
722
722
  AUTHOR_BLOCK = :author_block
723
723
  DRY_RUN = :dry_run
724
+ TRUSTED_ALLOW = :trusted_allow
725
+ UNTRUSTED_SEVERITY = :untrusted_severity
724
726
 
725
727
  # @!method self.values
726
728
  # @return [Array<Symbol>]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ModerationAPI
4
- VERSION = "2.5.0"
4
+ VERSION = "2.6.0"
5
5
  end
@@ -1424,6 +1424,16 @@ module ModerationAPI
1424
1424
  :dry_run,
1425
1425
  ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
1426
1426
  )
1427
+ TRUSTED_ALLOW =
1428
+ T.let(
1429
+ :trusted_allow,
1430
+ ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
1431
+ )
1432
+ UNTRUSTED_SEVERITY =
1433
+ T.let(
1434
+ :untrusted_severity,
1435
+ ModerationAPI::Models::ContentSubmitResponse::Recommendation::ReasonCode::TaggedSymbol
1436
+ )
1427
1437
 
1428
1438
  sig do
1429
1439
  override.returns(
@@ -572,7 +572,12 @@ module ModerationAPI
572
572
  end
573
573
 
574
574
  type reason_code =
575
- :severity_reject | :severity_review | :author_block | :dry_run
575
+ :severity_reject
576
+ | :severity_review
577
+ | :author_block
578
+ | :dry_run
579
+ | :trusted_allow
580
+ | :untrusted_severity
576
581
 
577
582
  module ReasonCode
578
583
  extend ModerationAPI::Internal::Type::Enum
@@ -581,6 +586,8 @@ module ModerationAPI
581
586
  SEVERITY_REVIEW: :severity_review
582
587
  AUTHOR_BLOCK: :author_block
583
588
  DRY_RUN: :dry_run
589
+ TRUSTED_ALLOW: :trusted_allow
590
+ UNTRUSTED_SEVERITY: :untrusted_severity
584
591
 
585
592
  def self?.values: -> ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::reason_code]
586
593
  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.5.0
4
+ version: 2.6.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-01-28 00:00:00.000000000 Z
11
+ date: 2026-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi