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.21.0"
".": "2.22.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/moderation-api-9c5291067ec36cba0c9ef772c5c8eb10238fb332f1f25d0e31f3f2ad87c24e5e.yml
openapi_spec_hash: 790cc0a36d6ed693c06a285c441ab977
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-e2abce1482c148fbbce5c7a7048691afc45935d1bde7feddea11c522ad47a3a1.yml
openapi_spec_hash: 3b3b86090b2243f865bc5aea8554c737
config_hash: 9d144cc6c49d3fd53e5b4472c1e22165
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2.22.0 (2026-06-02)

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

### Features

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

## 2.21.0 (2026-06-02)

Full Changelog: [v2.20.0...v2.21.0](https://github.com/moderation-api/sdk-ruby/compare/v2.20.0...v2.21.0)
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.21.0)
moderation_api (2.22.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.21.0"
gem "moderation_api", "~> 2.22.0"
```

<!-- x-release-please-end -->
Expand Down
44 changes: 40 additions & 4 deletions lib/moderation_api/models/webhook_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2464,6 +2464,13 @@ class Item < ModerationAPI::Internal::Type::BaseModel
# @return [Boolean, nil]
required :flagged, ModerationAPI::Internal::Type::Boolean, nil?: true

# @!attribute flagged_fields
# For object content, the field keys (e.g. "bio") that triggered a flag. Empty
# when no fields were flagged or the content is not an object.
#
# @return [Array<String>]
required :flagged_fields, ModerationAPI::Internal::Type::ArrayOf[String]

# @!attribute labels
# Moderation labels applied to the content
#
Expand Down Expand Up @@ -2506,7 +2513,7 @@ class Item < ModerationAPI::Internal::Type::BaseModel
# @return [Time]
required :timestamp, Time

# @!method initialize(id:, author_id:, channel_key:, client_action:, content:, conversation_id:, flagged:, labels:, language:, meta_type:, metadata:, timestamp:)
# @!method initialize(id:, author_id:, channel_key:, client_action:, content:, conversation_id:, flagged:, flagged_fields:, labels:, language:, meta_type:, metadata:, timestamp:)
# Some parameter documentations has been truncated, see
# {ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item} for
# more details.
Expand All @@ -2525,6 +2532,8 @@ class Item < ModerationAPI::Internal::Type::BaseModel
#
# @param flagged [Boolean, nil] Whether the content was flagged by moderation
#
# @param flagged_fields [Array<String>] For object content, the field keys (e.g. "bio") that triggered a flag. Empty whe
#
# @param labels [Array<ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::Label>, nil] Moderation labels applied to the content
#
# @param language [String, nil] Detected ISO language code, if available
Expand Down Expand Up @@ -3810,6 +3819,13 @@ class Item < ModerationAPI::Internal::Type::BaseModel
# @return [Boolean, nil]
required :flagged, ModerationAPI::Internal::Type::Boolean, nil?: true

# @!attribute flagged_fields
# For object content, the field keys (e.g. "bio") that triggered a flag. Empty
# when no fields were flagged or the content is not an object.
#
# @return [Array<String>]
required :flagged_fields, ModerationAPI::Internal::Type::ArrayOf[String]

# @!attribute labels
# Moderation labels applied to the content
#
Expand Down Expand Up @@ -3852,7 +3868,7 @@ class Item < ModerationAPI::Internal::Type::BaseModel
# @return [Time]
required :timestamp, Time

# @!method initialize(id:, author_id:, channel_key:, client_action:, content:, conversation_id:, flagged:, labels:, language:, meta_type:, metadata:, timestamp:)
# @!method initialize(id:, author_id:, channel_key:, client_action:, content:, conversation_id:, flagged:, flagged_fields:, labels:, language:, meta_type:, metadata:, timestamp:)
# Some parameter documentations has been truncated, see
# {ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item} for
# more details.
Expand All @@ -3873,6 +3889,8 @@ class Item < ModerationAPI::Internal::Type::BaseModel
#
# @param flagged [Boolean, nil] Whether the content was flagged by moderation
#
# @param flagged_fields [Array<String>] For object content, the field keys (e.g. "bio") that triggered a flag. Empty whe
#
# @param labels [Array<ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::Label>, nil] Moderation labels applied to the content
#
# @param language [String, nil] Detected ISO language code, if available
Expand Down Expand Up @@ -4879,6 +4897,13 @@ class Item < ModerationAPI::Internal::Type::BaseModel
# @return [Boolean, nil]
required :flagged, ModerationAPI::Internal::Type::Boolean, nil?: true

# @!attribute flagged_fields
# For object content, the field keys (e.g. "bio") that triggered a flag. Empty
# when no fields were flagged or the content is not an object.
#
# @return [Array<String>]
required :flagged_fields, ModerationAPI::Internal::Type::ArrayOf[String]

# @!attribute labels
# Moderation labels applied to the content
#
Expand Down Expand Up @@ -4921,7 +4946,7 @@ class Item < ModerationAPI::Internal::Type::BaseModel
# @return [Time]
required :timestamp, Time

# @!method initialize(id:, author_id:, channel_key:, client_action:, content:, conversation_id:, flagged:, labels:, language:, meta_type:, metadata:, timestamp:)
# @!method initialize(id:, author_id:, channel_key:, client_action:, content:, conversation_id:, flagged:, flagged_fields:, labels:, language:, meta_type:, metadata:, timestamp:)
# Some parameter documentations has been truncated, see
# {ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item} for
# more details.
Expand All @@ -4942,6 +4967,8 @@ class Item < ModerationAPI::Internal::Type::BaseModel
#
# @param flagged [Boolean, nil] Whether the content was flagged by moderation
#
# @param flagged_fields [Array<String>] For object content, the field keys (e.g. "bio") that triggered a flag. Empty whe
#
# @param labels [Array<ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::Label>, nil] Moderation labels applied to the content
#
# @param language [String, nil] Detected ISO language code, if available
Expand Down Expand Up @@ -5945,6 +5972,13 @@ class Item < ModerationAPI::Internal::Type::BaseModel
# @return [Boolean, nil]
required :flagged, ModerationAPI::Internal::Type::Boolean, nil?: true

# @!attribute flagged_fields
# For object content, the field keys (e.g. "bio") that triggered a flag. Empty
# when no fields were flagged or the content is not an object.
#
# @return [Array<String>]
required :flagged_fields, ModerationAPI::Internal::Type::ArrayOf[String]

# @!attribute labels
# Moderation labels applied to the content
#
Expand Down Expand Up @@ -5987,7 +6021,7 @@ class Item < ModerationAPI::Internal::Type::BaseModel
# @return [Time]
required :timestamp, Time

# @!method initialize(id:, author_id:, channel_key:, client_action:, content:, conversation_id:, flagged:, labels:, language:, meta_type:, metadata:, timestamp:)
# @!method initialize(id:, author_id:, channel_key:, client_action:, content:, conversation_id:, flagged:, flagged_fields:, labels:, language:, meta_type:, metadata:, timestamp:)
# Some parameter documentations has been truncated, see
# {ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item} for
# more details.
Expand All @@ -6008,6 +6042,8 @@ class Item < ModerationAPI::Internal::Type::BaseModel
#
# @param flagged [Boolean, nil] Whether the content was flagged by moderation
#
# @param flagged_fields [Array<String>] For object content, the field keys (e.g. "bio") that triggered a flag. Empty whe
#
# @param labels [Array<ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label>, nil] Moderation labels applied to the content
#
# @param language [String, nil] Detected ISO language code, if available
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.21.0"
VERSION = "2.22.0"
end
40 changes: 40 additions & 0 deletions rbi/moderation_api/models/webhook_event.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -4529,6 +4529,11 @@ module ModerationAPI
sig { returns(T.nilable(T::Boolean)) }
attr_accessor :flagged

# For object content, the field keys (e.g. "bio") that triggered a flag. Empty
# when no fields were flagged or the content is not an object.
sig { returns(T::Array[String]) }
attr_accessor :flagged_fields

# Moderation labels applied to the content
sig do
returns(
Expand Down Expand Up @@ -4584,6 +4589,7 @@ module ModerationAPI
),
conversation_id: T.nilable(String),
flagged: T.nilable(T::Boolean),
flagged_fields: T::Array[String],
labels:
T.nilable(
T::Array[
Expand Down Expand Up @@ -4615,6 +4621,9 @@ module ModerationAPI
conversation_id:,
# Whether the content was flagged by moderation
flagged:,
# For object content, the field keys (e.g. "bio") that triggered a flag. Empty
# when no fields were flagged or the content is not an object.
flagged_fields:,
# Moderation labels applied to the content
labels:,
# Detected ISO language code, if available
Expand Down Expand Up @@ -4650,6 +4659,7 @@ module ModerationAPI
),
conversation_id: T.nilable(String),
flagged: T.nilable(T::Boolean),
flagged_fields: T::Array[String],
labels:
T.nilable(
T::Array[
Expand Down Expand Up @@ -6997,6 +7007,11 @@ module ModerationAPI
sig { returns(T.nilable(T::Boolean)) }
attr_accessor :flagged

# For object content, the field keys (e.g. "bio") that triggered a flag. Empty
# when no fields were flagged or the content is not an object.
sig { returns(T::Array[String]) }
attr_accessor :flagged_fields

# Moderation labels applied to the content
sig do
returns(
Expand Down Expand Up @@ -7053,6 +7068,7 @@ module ModerationAPI
),
conversation_id: T.nilable(String),
flagged: T.nilable(T::Boolean),
flagged_fields: T::Array[String],
labels:
T.nilable(
T::Array[
Expand Down Expand Up @@ -7084,6 +7100,9 @@ module ModerationAPI
conversation_id:,
# Whether the content was flagged by moderation
flagged:,
# For object content, the field keys (e.g. "bio") that triggered a flag. Empty
# when no fields were flagged or the content is not an object.
flagged_fields:,
# Moderation labels applied to the content
labels:,
# Detected ISO language code, if available
Expand Down Expand Up @@ -7119,6 +7138,7 @@ module ModerationAPI
),
conversation_id: T.nilable(String),
flagged: T.nilable(T::Boolean),
flagged_fields: T::Array[String],
labels:
T.nilable(
T::Array[
Expand Down Expand Up @@ -8966,6 +8986,11 @@ module ModerationAPI
sig { returns(T.nilable(T::Boolean)) }
attr_accessor :flagged

# For object content, the field keys (e.g. "bio") that triggered a flag. Empty
# when no fields were flagged or the content is not an object.
sig { returns(T::Array[String]) }
attr_accessor :flagged_fields

# Moderation labels applied to the content
sig do
returns(
Expand Down Expand Up @@ -9022,6 +9047,7 @@ module ModerationAPI
),
conversation_id: T.nilable(String),
flagged: T.nilable(T::Boolean),
flagged_fields: T::Array[String],
labels:
T.nilable(
T::Array[
Expand Down Expand Up @@ -9053,6 +9079,9 @@ module ModerationAPI
conversation_id:,
# Whether the content was flagged by moderation
flagged:,
# For object content, the field keys (e.g. "bio") that triggered a flag. Empty
# when no fields were flagged or the content is not an object.
flagged_fields:,
# Moderation labels applied to the content
labels:,
# Detected ISO language code, if available
Expand Down Expand Up @@ -9088,6 +9117,7 @@ module ModerationAPI
),
conversation_id: T.nilable(String),
flagged: T.nilable(T::Boolean),
flagged_fields: T::Array[String],
labels:
T.nilable(
T::Array[
Expand Down Expand Up @@ -10933,6 +10963,11 @@ module ModerationAPI
sig { returns(T.nilable(T::Boolean)) }
attr_accessor :flagged

# For object content, the field keys (e.g. "bio") that triggered a flag. Empty
# when no fields were flagged or the content is not an object.
sig { returns(T::Array[String]) }
attr_accessor :flagged_fields

# Moderation labels applied to the content
sig do
returns(
Expand Down Expand Up @@ -10989,6 +11024,7 @@ module ModerationAPI
),
conversation_id: T.nilable(String),
flagged: T.nilable(T::Boolean),
flagged_fields: T::Array[String],
labels:
T.nilable(
T::Array[
Expand Down Expand Up @@ -11020,6 +11056,9 @@ module ModerationAPI
conversation_id:,
# Whether the content was flagged by moderation
flagged:,
# For object content, the field keys (e.g. "bio") that triggered a flag. Empty
# when no fields were flagged or the content is not an object.
flagged_fields:,
# Moderation labels applied to the content
labels:,
# Detected ISO language code, if available
Expand Down Expand Up @@ -11055,6 +11094,7 @@ module ModerationAPI
),
conversation_id: T.nilable(String),
flagged: T.nilable(T::Boolean),
flagged_fields: T::Array[String],
labels:
T.nilable(
T::Array[
Expand Down
Loading