Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.8.1"
".": "2.9.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 27
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-7270e2afd5e9c57ffcb1b83d5eb8b549a33c471b72ab494f903473a23b3f7115.yml
openapi_spec_hash: cfd11087252e28bc7e7d4f4dbefc51ee
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-fb621278289bf54b9c00e8cadce0cc9fa89506ec908464fdb99d66620a953f0a.yml
openapi_spec_hash: c2a3e2de6f910fc28c7ccd88bf722e06
config_hash: 6b825a08e19dfb747c5dc1766502b789
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2.9.0 (2026-03-03)

Full Changelog: [v2.8.1...v2.9.0](https://github.com/moderation-api/sdk-ruby/compare/v2.8.1...v2.9.0)

### Features

* **api:** api update ([b6bc2c8](https://github.com/moderation-api/sdk-ruby/commit/b6bc2c86c329084595d528ead7516b002006cd7a))

## 2.8.1 (2026-02-27)

Full Changelog: [v2.8.0...v2.8.1](https://github.com/moderation-api/sdk-ruby/compare/v2.8.0...v2.8.1)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
moderation_api (2.8.1)
moderation_api (2.9.0)
cgi
connection_pool

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "moderation_api", "~> 2.8.1"
gem "moderation_api", "~> 2.9.0"
```

<!-- x-release-please-end -->
Expand Down
11 changes: 10 additions & 1 deletion lib/moderation_api/models/content_submit_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,20 @@ class Evaluation < ModerationAPI::Internal::Type::BaseModel
# @return [Float]
required :severity_score, Float

# @!attribute shadow_flagged
# Whether the content would have been flagged by analyze-only policies (flag:
# false).
#
# @return [Boolean, nil]
optional :shadow_flagged, ModerationAPI::Internal::Type::Boolean

# @!attribute unicode_spoofed
# Whether the content was flagged for Unicode spoofing.
#
# @return [Boolean, nil]
optional :unicode_spoofed, ModerationAPI::Internal::Type::Boolean

# @!method initialize(flag_probability:, flagged:, severity_score:, unicode_spoofed: nil)
# @!method initialize(flag_probability:, flagged:, severity_score:, shadow_flagged: nil, unicode_spoofed: nil)
# Some parameter documentations has been truncated, see
# {ModerationAPI::Models::ContentSubmitResponse::Evaluation} for more details.
#
Expand All @@ -388,6 +395,8 @@ class Evaluation < ModerationAPI::Internal::Type::BaseModel
#
# @param severity_score [Float] The severity score of the content. A higher score indicates more severe content.
#
# @param shadow_flagged [Boolean] Whether the content would have been flagged by analyze-only policies (flag: fals
#
# @param unicode_spoofed [Boolean] Whether the content was flagged for Unicode spoofing.
end

Expand Down
2 changes: 1 addition & 1 deletion lib/moderation_api/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ModerationAPI
VERSION = "2.8.1"
VERSION = "2.9.0"
end
13 changes: 13 additions & 0 deletions rbi/moderation_api/models/content_submit_response.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,14 @@ module ModerationAPI
sig { returns(Float) }
attr_accessor :severity_score

# Whether the content would have been flagged by analyze-only policies (flag:
# false).
sig { returns(T.nilable(T::Boolean)) }
attr_reader :shadow_flagged

sig { params(shadow_flagged: T::Boolean).void }
attr_writer :shadow_flagged

# Whether the content was flagged for Unicode spoofing.
sig { returns(T.nilable(T::Boolean)) }
attr_reader :unicode_spoofed
Expand All @@ -734,6 +742,7 @@ module ModerationAPI
flag_probability: Float,
flagged: T::Boolean,
severity_score: Float,
shadow_flagged: T::Boolean,
unicode_spoofed: T::Boolean
).returns(T.attached_class)
end
Expand All @@ -744,6 +753,9 @@ module ModerationAPI
flagged:,
# The severity score of the content. A higher score indicates more severe content.
severity_score:,
# Whether the content would have been flagged by analyze-only policies (flag:
# false).
shadow_flagged: nil,
# Whether the content was flagged for Unicode spoofing.
unicode_spoofed: nil
)
Expand All @@ -755,6 +767,7 @@ module ModerationAPI
flag_probability: Float,
flagged: T::Boolean,
severity_score: Float,
shadow_flagged: T::Boolean,
unicode_spoofed: T::Boolean
}
)
Expand Down
7 changes: 7 additions & 0 deletions sig/moderation_api/models/content_submit_response.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ module ModerationAPI
flag_probability: Float,
flagged: bool,
severity_score: Float,
shadow_flagged: bool,
unicode_spoofed: bool
}

Expand All @@ -255,6 +256,10 @@ module ModerationAPI

attr_accessor severity_score: Float

attr_reader shadow_flagged: bool?

def shadow_flagged=: (bool) -> bool

attr_reader unicode_spoofed: bool?

def unicode_spoofed=: (bool) -> bool
Expand All @@ -263,13 +268,15 @@ module ModerationAPI
flag_probability: Float,
flagged: bool,
severity_score: Float,
?shadow_flagged: bool,
?unicode_spoofed: bool
) -> void

def to_hash: -> {
flag_probability: Float,
flagged: bool,
severity_score: Float,
shadow_flagged: bool,
unicode_spoofed: bool
}
end
Expand Down