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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/moderation-api-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: |-
github.repository == 'stainless-sdks/moderation-api-ruby' &&
(github.event_name == 'push' || github.event.pull_request.head.repo.fork) &&
(github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
(github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
Expand Down
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.10.1"
".": "2.11.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-815dce43cbb14e41f094bdbca84682c0b379dcfd02b7e8800f9d8b45c00a76fd.yml
openapi_spec_hash: ab7d073e793fe5a556e64d39963aea93
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-a4934bf1e7f1348c021b48224f7a7110a6e41838253dda4fbcc720dd2d2ed6b7.yml
openapi_spec_hash: 537542216811907b1d4ebf23a54dc669
config_hash: 6b825a08e19dfb747c5dc1766502b789
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.11.0 (2026-03-31)

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

### Features

* **api:** api update ([7003628](https://github.com/moderation-api/sdk-ruby/commit/70036284e49ac86dd1de5f1e9b10f908c35571cc))


### Chores

* **ci:** support opting out of skipping builds on metadata-only commits ([8cbba6f](https://github.com/moderation-api/sdk-ruby/commit/8cbba6fe84670b175bb6283c543ecff4bad13006))

## 2.10.1 (2026-03-27)

Full Changelog: [v2.10.0...v2.10.1](https://github.com/moderation-api/sdk-ruby/compare/v2.10.0...v2.10.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.10.1)
moderation_api (2.11.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.10.1"
gem "moderation_api", "~> 2.11.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 @@ -201,7 +201,14 @@ class Content < ModerationAPI::Internal::Type::BaseModel
union: -> { ModerationAPI::Models::ContentSubmitResponse::Content::Modified },
nil?: true

# @!method initialize(id:, masked:, modified:)
# @!attribute transcript
# The transcribed text from audio content. Only present when audio moderation is
# used and transcript inclusion is enabled on the channel.
#
# @return [String, nil]
optional :transcript, String, nil?: true

# @!method initialize(id:, masked:, modified:, transcript: nil)
# Some parameter documentations has been truncated, see
# {ModerationAPI::Models::ContentSubmitResponse::Content} for more details.
#
Expand All @@ -212,6 +219,8 @@ class Content < ModerationAPI::Internal::Type::BaseModel
# @param masked [Boolean] Whether any values have been masked.
#
# @param modified [String, Hash{Symbol=>Object}, Hash{Symbol=>ModerationAPI::Models::ContentSubmitResponse::Content::Modified::ModifiedNestedObjectContent::Text, ModerationAPI::Models::ContentSubmitResponse::Content::Modified::ModifiedNestedObjectContent::Image, ModerationAPI::Models::ContentSubmitResponse::Content::Modified::ModifiedNestedObjectContent::Video, ModerationAPI::Models::ContentSubmitResponse::Content::Modified::ModifiedNestedObjectContent::Audio}, nil] The modified content, if any.
#
# @param transcript [String, nil] The transcribed text from audio content. Only present when audio moderation is u

# The modified content, if any.
#
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.10.1"
VERSION = "2.11.0"
end
16 changes: 13 additions & 3 deletions rbi/moderation_api/models/content_submit_response.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,11 @@ module ModerationAPI
end
attr_accessor :modified

# The transcribed text from audio content. Only present when audio moderation is
# used and transcript inclusion is enabled on the channel.
sig { returns(T.nilable(String)) }
attr_accessor :transcript

# Potentially modified content.
sig do
params(
Expand All @@ -455,7 +460,8 @@ module ModerationAPI
modified:
T.nilable(
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::Variants
)
),
transcript: T.nilable(String)
).returns(T.attached_class)
end
def self.new(
Expand All @@ -465,7 +471,10 @@ module ModerationAPI
# Whether any values have been masked.
masked:,
# The modified content, if any.
modified:
modified:,
# The transcribed text from audio content. Only present when audio moderation is
# used and transcript inclusion is enabled on the channel.
transcript: nil
)
end

Expand All @@ -477,7 +486,8 @@ module ModerationAPI
modified:
T.nilable(
ModerationAPI::Models::ContentSubmitResponse::Content::Modified::Variants
)
),
transcript: T.nilable(String)
}
)
end
Expand Down
11 changes: 8 additions & 3 deletions sig/moderation_api/models/content_submit_response.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ module ModerationAPI
{
id: String,
masked: bool,
modified: ModerationAPI::Models::ContentSubmitResponse::Content::modified?
modified: ModerationAPI::Models::ContentSubmitResponse::Content::modified?,
transcript: String?
}

class Content < ModerationAPI::Internal::Type::BaseModel
Expand All @@ -142,16 +143,20 @@ module ModerationAPI

attr_accessor modified: ModerationAPI::Models::ContentSubmitResponse::Content::modified?

attr_accessor transcript: String?

def initialize: (
id: String,
masked: bool,
modified: ModerationAPI::Models::ContentSubmitResponse::Content::modified?
modified: ModerationAPI::Models::ContentSubmitResponse::Content::modified?,
?transcript: String?
) -> void

def to_hash: -> {
id: String,
masked: bool,
modified: ModerationAPI::Models::ContentSubmitResponse::Content::modified?
modified: ModerationAPI::Models::ContentSubmitResponse::Content::modified?,
transcript: String?
}

type modified =
Expand Down