From 2217d9c080e5fbc4276ec3fed81e91b51f9d653e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 04:04:36 +0000 Subject: [PATCH 1/3] chore(internal): more robust bootstrap script --- scripts/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index 3487864..a5e1b80 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd -- "$(dirname -- "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response From 18b3b6dce2befe3c2b0051d0dc33b737d99308a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 13:30:21 +0000 Subject: [PATCH 2/3] feat(api): api update --- .stats.yml | 4 +- .../models/content_submit_params.rb | 30 ++- .../models/content_submit_response.rb | 130 ++++++++- .../models/content_submit_params.rbi | 50 +++- .../models/content_submit_response.rbi | 247 +++++++++++++++++- .../models/content_submit_params.rbs | 27 +- .../models/content_submit_response.rbs | 123 ++++++++- 7 files changed, 594 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index 188067d..423ab65 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 27 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-a4934bf1e7f1348c021b48224f7a7110a6e41838253dda4fbcc720dd2d2ed6b7.yml -openapi_spec_hash: 537542216811907b1d4ebf23a54dc669 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-c8e66e827fc2b1465b740a29e87da71c3b1ddca1a4bdb1023aa96c569b80e9be.yml +openapi_spec_hash: 35fdc3e34feb56cafaf4de2834201978 config_hash: 0a024bca1710e3a3194925edfedc513c diff --git a/lib/moderation_api/models/content_submit_params.rb b/lib/moderation_api/models/content_submit_params.rb index b443db8..c962081 100644 --- a/lib/moderation_api/models/content_submit_params.rb +++ b/lib/moderation_api/models/content_submit_params.rb @@ -1026,14 +1026,42 @@ class URLRisk < ModerationAPI::Internal::Type::BaseModel # @return [Boolean] required :flag, ModerationAPI::Internal::Type::Boolean + # @!attribute allowlist_wordlist_ids + # IDs of wordlists whose entries are treated as allowed URL domains. Matches + # short-circuit the risk model and are never flagged. + # + # @return [Array, nil] + optional :allowlist_wordlist_ids, + ModerationAPI::Internal::Type::ArrayOf[String], + api_name: :allowlistWordlistIds + + # @!attribute blocklist_wordlist_ids + # IDs of wordlists whose entries are treated as blocked URL domains. Matches + # short-circuit the risk model and are always flagged. Blocklists take precedence + # over allowlists. + # + # @return [Array, nil] + optional :blocklist_wordlist_ids, + ModerationAPI::Internal::Type::ArrayOf[String], + api_name: :blocklistWordlistIds + # @!attribute threshold # # @return [Float, nil] optional :threshold, Float - # @!method initialize(flag:, threshold: nil, id: :url_risk) + # @!method initialize(flag:, allowlist_wordlist_ids: nil, blocklist_wordlist_ids: nil, threshold: nil, id: :url_risk) + # Some parameter documentations has been truncated, see + # {ModerationAPI::Models::ContentSubmitParams::Policy::URLRisk} for more details. + # # @param flag [Boolean] + # + # @param allowlist_wordlist_ids [Array] IDs of wordlists whose entries are treated as allowed URL domains. Matches short + # + # @param blocklist_wordlist_ids [Array] IDs of wordlists whose entries are treated as blocked URL domains. Matches short + # # @param threshold [Float] + # # @param id [Symbol, :url_risk] end diff --git a/lib/moderation_api/models/content_submit_response.rb b/lib/moderation_api/models/content_submit_response.rb index 76cae70..62e7941 100644 --- a/lib/moderation_api/models/content_submit_response.rb +++ b/lib/moderation_api/models/content_submit_response.rb @@ -694,10 +694,138 @@ class Match < ModerationAPI::Internal::Type::BaseModel # @return [Array] required :span, ModerationAPI::Internal::Type::ArrayOf[Integer] - # @!method initialize(match:, probability:, span:) + # @!attribute entity_type + # Sub-type of the entity match — e.g. the NER key (email, phone, name, …) for PII + # matches. Absent for URL Risk and wordlist matches where the type is already + # encoded in the parent label. + # + # @return [String, nil] + optional :entity_type, String + + # @!attribute reasons + # Stable codes explaining why a URL was flagged (URL Risk only). + # + # @return [Array, nil] + optional :reasons, ModerationAPI::Internal::Type::ArrayOf[String] + + # @!attribute signals + # Observable properties of a URL (URL Risk only). Absent for allow/block list + # matches. + # + # @return [ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals, nil] + optional :signals, + -> { ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals } + + # @!method initialize(match:, probability:, span:, entity_type: nil, reasons: nil, signals: nil) + # Some parameter documentations has been truncated, see + # {ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match} + # for more details. + # # @param match [String] + # # @param probability [Float] + # # @param span [Array] + # + # @param entity_type [String] Sub-type of the entity match — e.g. the NER key (email, phone, name, …) for PII + # + # @param reasons [Array] Stable codes explaining why a URL was flagged (URL Risk only). + # + # @param signals [ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals] Observable properties of a URL (URL Risk only). Absent for allow/block list matc + + # @see ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match#signals + class Signals < ModerationAPI::Internal::Type::BaseModel + # @!attribute bot_protection + # + # @return [Boolean, nil] + required :bot_protection, ModerationAPI::Internal::Type::Boolean, nil?: true + + # @!attribute brand_impersonation + # + # @return [ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation, nil] + required :brand_impersonation, + -> { ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation }, + nil?: true + + # @!attribute domain_age_days + # + # @return [Integer, nil] + required :domain_age_days, Integer, nil?: true + + # @!attribute final_url + # + # @return [String, nil] + required :final_url, String, nil?: true + + # @!attribute has_email_setup + # + # @return [Boolean, nil] + required :has_email_setup, ModerationAPI::Internal::Type::Boolean, nil?: true + + # @!attribute has_suspicious_characters + # + # @return [Boolean] + required :has_suspicious_characters, ModerationAPI::Internal::Type::Boolean + + # @!attribute is_link_shortener + # + # @return [Boolean] + required :is_link_shortener, ModerationAPI::Internal::Type::Boolean + + # @!attribute is_reported + # + # @return [Boolean] + required :is_reported, ModerationAPI::Internal::Type::Boolean + + # @!attribute redirect_count + # + # @return [Integer, nil] + required :redirect_count, Integer, nil?: true + + # @!method initialize(bot_protection:, brand_impersonation:, domain_age_days:, final_url:, has_email_setup:, has_suspicious_characters:, is_link_shortener:, is_reported:, redirect_count:) + # Observable properties of a URL (URL Risk only). Absent for allow/block list + # matches. + # + # @param bot_protection [Boolean, nil] + # @param brand_impersonation [ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation, nil] + # @param domain_age_days [Integer, nil] + # @param final_url [String, nil] + # @param has_email_setup [Boolean, nil] + # @param has_suspicious_characters [Boolean] + # @param is_link_shortener [Boolean] + # @param is_reported [Boolean] + # @param redirect_count [Integer, nil] + + # @see ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals#brand_impersonation + class BrandImpersonation < ModerationAPI::Internal::Type::BaseModel + # @!attribute brand + # + # @return [String] + required :brand, String + + # @!attribute method_ + # + # @return [Symbol, ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::Method] + required :method_, + enum: -> { ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::Method }, + api_name: :method + + # @!method initialize(brand:, method_:) + # @param brand [String] + # @param method_ [Symbol, ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::Method] + + # @see ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation#method_ + module Method + extend ModerationAPI::Internal::Type::Enum + + REGISTERED_DOMAIN_TOKEN = :registered_domain_token + SUBDOMAIN_TOKEN = :subdomain_token + + # @!method self.values + # @return [Array] + end + end + end end end diff --git a/rbi/moderation_api/models/content_submit_params.rbi b/rbi/moderation_api/models/content_submit_params.rbi index e035849..e22d87d 100644 --- a/rbi/moderation_api/models/content_submit_params.rbi +++ b/rbi/moderation_api/models/content_submit_params.rbi @@ -1872,6 +1872,23 @@ module ModerationAPI sig { returns(T::Boolean) } attr_accessor :flag + # IDs of wordlists whose entries are treated as allowed URL domains. Matches + # short-circuit the risk model and are never flagged. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :allowlist_wordlist_ids + + sig { params(allowlist_wordlist_ids: T::Array[String]).void } + attr_writer :allowlist_wordlist_ids + + # IDs of wordlists whose entries are treated as blocked URL domains. Matches + # short-circuit the risk model and are always flagged. Blocklists take precedence + # over allowlists. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :blocklist_wordlist_ids + + sig { params(blocklist_wordlist_ids: T::Array[String]).void } + attr_writer :blocklist_wordlist_ids + sig { returns(T.nilable(Float)) } attr_reader :threshold @@ -1879,15 +1896,38 @@ module ModerationAPI attr_writer :threshold sig do - params(flag: T::Boolean, threshold: Float, id: Symbol).returns( - T.attached_class - ) + params( + flag: T::Boolean, + allowlist_wordlist_ids: T::Array[String], + blocklist_wordlist_ids: T::Array[String], + threshold: Float, + id: Symbol + ).returns(T.attached_class) end - def self.new(flag:, threshold: nil, id: :url_risk) + def self.new( + flag:, + # IDs of wordlists whose entries are treated as allowed URL domains. Matches + # short-circuit the risk model and are never flagged. + allowlist_wordlist_ids: nil, + # IDs of wordlists whose entries are treated as blocked URL domains. Matches + # short-circuit the risk model and are always flagged. Blocklists take precedence + # over allowlists. + blocklist_wordlist_ids: nil, + threshold: nil, + id: :url_risk + ) end sig do - override.returns({ id: Symbol, flag: T::Boolean, threshold: Float }) + override.returns( + { + id: Symbol, + flag: T::Boolean, + allowlist_wordlist_ids: T::Array[String], + blocklist_wordlist_ids: T::Array[String], + threshold: Float + } + ) end def to_hash end diff --git a/rbi/moderation_api/models/content_submit_response.rbi b/rbi/moderation_api/models/content_submit_response.rbi index 94a4ac0..16c9fc9 100644 --- a/rbi/moderation_api/models/content_submit_response.rbi +++ b/rbi/moderation_api/models/content_submit_response.rbi @@ -1299,23 +1299,264 @@ module ModerationAPI sig { returns(T::Array[Integer]) } attr_accessor :span + # Sub-type of the entity match — e.g. the NER key (email, phone, name, …) for PII + # matches. Absent for URL Risk and wordlist matches where the type is already + # encoded in the parent label. + sig { returns(T.nilable(String)) } + attr_reader :entity_type + + sig { params(entity_type: String).void } + attr_writer :entity_type + + # Stable codes explaining why a URL was flagged (URL Risk only). + sig { returns(T.nilable(T::Array[String])) } + attr_reader :reasons + + sig { params(reasons: T::Array[String]).void } + attr_writer :reasons + + # Observable properties of a URL (URL Risk only). Absent for allow/block list + # matches. + sig do + returns( + T.nilable( + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals + ) + ) + end + attr_reader :signals + + sig do + params( + signals: + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::OrHash + ).void + end + attr_writer :signals + sig do params( match: String, probability: Float, - span: T::Array[Integer] + span: T::Array[Integer], + entity_type: String, + reasons: T::Array[String], + signals: + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::OrHash ).returns(T.attached_class) end - def self.new(match:, probability:, span:) + def self.new( + match:, + probability:, + span:, + # Sub-type of the entity match — e.g. the NER key (email, phone, name, …) for PII + # matches. Absent for URL Risk and wordlist matches where the type is already + # encoded in the parent label. + entity_type: nil, + # Stable codes explaining why a URL was flagged (URL Risk only). + reasons: nil, + # Observable properties of a URL (URL Risk only). Absent for allow/block list + # matches. + signals: nil + ) end sig do override.returns( - { match: String, probability: Float, span: T::Array[Integer] } + { + match: String, + probability: Float, + span: T::Array[Integer], + entity_type: String, + reasons: T::Array[String], + signals: + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals + } ) end def to_hash end + + class Signals < ModerationAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals, + ModerationAPI::Internal::AnyHash + ) + end + + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :bot_protection + + sig do + returns( + T.nilable( + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation + ) + ) + end + attr_reader :brand_impersonation + + sig do + params( + brand_impersonation: + T.nilable( + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::OrHash + ) + ).void + end + attr_writer :brand_impersonation + + sig { returns(T.nilable(Integer)) } + attr_accessor :domain_age_days + + sig { returns(T.nilable(String)) } + attr_accessor :final_url + + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :has_email_setup + + sig { returns(T::Boolean) } + attr_accessor :has_suspicious_characters + + sig { returns(T::Boolean) } + attr_accessor :is_link_shortener + + sig { returns(T::Boolean) } + attr_accessor :is_reported + + sig { returns(T.nilable(Integer)) } + attr_accessor :redirect_count + + # Observable properties of a URL (URL Risk only). Absent for allow/block list + # matches. + sig do + params( + bot_protection: T.nilable(T::Boolean), + brand_impersonation: + T.nilable( + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::OrHash + ), + domain_age_days: T.nilable(Integer), + final_url: T.nilable(String), + has_email_setup: T.nilable(T::Boolean), + has_suspicious_characters: T::Boolean, + is_link_shortener: T::Boolean, + is_reported: T::Boolean, + redirect_count: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + bot_protection:, + brand_impersonation:, + domain_age_days:, + final_url:, + has_email_setup:, + has_suspicious_characters:, + is_link_shortener:, + is_reported:, + redirect_count: + ) + end + + sig do + override.returns( + { + bot_protection: T.nilable(T::Boolean), + brand_impersonation: + T.nilable( + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation + ), + domain_age_days: T.nilable(Integer), + final_url: T.nilable(String), + has_email_setup: T.nilable(T::Boolean), + has_suspicious_characters: T::Boolean, + is_link_shortener: T::Boolean, + is_reported: T::Boolean, + redirect_count: T.nilable(Integer) + } + ) + end + def to_hash + end + + class BrandImpersonation < ModerationAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation, + ModerationAPI::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :brand + + sig do + returns( + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::Method::TaggedSymbol + ) + end + attr_accessor :method_ + + sig do + params( + brand: String, + method_: + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::Method::OrSymbol + ).returns(T.attached_class) + end + def self.new(brand:, method_:) + end + + sig do + override.returns( + { + brand: String, + method_: + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::Method::TaggedSymbol + } + ) + end + def to_hash + end + + module Method + extend ModerationAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::Method + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + REGISTERED_DOMAIN_TOKEN = + T.let( + :registered_domain_token, + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::Method::TaggedSymbol + ) + SUBDOMAIN_TOKEN = + T.let( + :subdomain_token, + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::Method::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::Method::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end end end diff --git a/sig/moderation_api/models/content_submit_params.rbs b/sig/moderation_api/models/content_submit_params.rbs index aa1bec3..aa5f833 100644 --- a/sig/moderation_api/models/content_submit_params.rbs +++ b/sig/moderation_api/models/content_submit_params.rbs @@ -875,24 +875,47 @@ module ModerationAPI end end - type url_risk = { id: :url_risk, flag: bool, threshold: Float } + type url_risk = + { + id: :url_risk, + flag: bool, + allowlist_wordlist_ids: ::Array[String], + blocklist_wordlist_ids: ::Array[String], + threshold: Float + } class URLRisk < ModerationAPI::Internal::Type::BaseModel attr_accessor id: :url_risk attr_accessor flag: bool + attr_reader allowlist_wordlist_ids: ::Array[String]? + + def allowlist_wordlist_ids=: (::Array[String]) -> ::Array[String] + + attr_reader blocklist_wordlist_ids: ::Array[String]? + + def blocklist_wordlist_ids=: (::Array[String]) -> ::Array[String] + attr_reader threshold: Float? def threshold=: (Float) -> Float def initialize: ( flag: bool, + ?allowlist_wordlist_ids: ::Array[String], + ?blocklist_wordlist_ids: ::Array[String], ?threshold: Float, ?id: :url_risk ) -> void - def to_hash: -> { id: :url_risk, flag: bool, threshold: Float } + def to_hash: -> { + id: :url_risk, + flag: bool, + allowlist_wordlist_ids: ::Array[String], + blocklist_wordlist_ids: ::Array[String], + threshold: Float + } end type guideline = diff --git a/sig/moderation_api/models/content_submit_response.rbs b/sig/moderation_api/models/content_submit_response.rbs index d0ff6ec..ab0740b 100644 --- a/sig/moderation_api/models/content_submit_response.rbs +++ b/sig/moderation_api/models/content_submit_response.rbs @@ -534,7 +534,14 @@ module ModerationAPI } type match = - { match: String, probability: Float, span: ::Array[Integer] } + { + match: String, + probability: Float, + span: ::Array[Integer], + entity_type: String, + reasons: ::Array[String], + signals: ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals + } class Match < ModerationAPI::Internal::Type::BaseModel attr_accessor match: String @@ -543,17 +550,127 @@ module ModerationAPI attr_accessor span: ::Array[Integer] + attr_reader entity_type: String? + + def entity_type=: (String) -> String + + attr_reader reasons: ::Array[String]? + + def reasons=: (::Array[String]) -> ::Array[String] + + attr_reader signals: ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals? + + def signals=: ( + ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals + ) -> ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals + def initialize: ( match: String, probability: Float, - span: ::Array[Integer] + span: ::Array[Integer], + ?entity_type: String, + ?reasons: ::Array[String], + ?signals: ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals ) -> void def to_hash: -> { match: String, probability: Float, - span: ::Array[Integer] + span: ::Array[Integer], + entity_type: String, + reasons: ::Array[String], + signals: ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals } + + type signals = + { + bot_protection: bool?, + brand_impersonation: ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation?, + domain_age_days: Integer?, + final_url: String?, + has_email_setup: bool?, + has_suspicious_characters: bool, + is_link_shortener: bool, + is_reported: bool, + redirect_count: Integer? + } + + class Signals < ModerationAPI::Internal::Type::BaseModel + attr_accessor bot_protection: bool? + + attr_accessor brand_impersonation: ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation? + + attr_accessor domain_age_days: Integer? + + attr_accessor final_url: String? + + attr_accessor has_email_setup: bool? + + attr_accessor has_suspicious_characters: bool + + attr_accessor is_link_shortener: bool + + attr_accessor is_reported: bool + + attr_accessor redirect_count: Integer? + + def initialize: ( + bot_protection: bool?, + brand_impersonation: ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation?, + domain_age_days: Integer?, + final_url: String?, + has_email_setup: bool?, + has_suspicious_characters: bool, + is_link_shortener: bool, + is_reported: bool, + redirect_count: Integer? + ) -> void + + def to_hash: -> { + bot_protection: bool?, + brand_impersonation: ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation?, + domain_age_days: Integer?, + final_url: String?, + has_email_setup: bool?, + has_suspicious_characters: bool, + is_link_shortener: bool, + is_reported: bool, + redirect_count: Integer? + } + + type brand_impersonation = + { + brand: String, + method_: ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::method_ + } + + class BrandImpersonation < ModerationAPI::Internal::Type::BaseModel + attr_accessor brand: String + + attr_accessor method_: ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::method_ + + def initialize: ( + brand: String, + method_: ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::method_ + ) -> void + + def to_hash: -> { + brand: String, + method_: ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::method_ + } + + type method_ = :registered_domain_token | :subdomain_token + + module Method + extend ModerationAPI::Internal::Type::Enum + + REGISTERED_DOMAIN_TOKEN: :registered_domain_token + SUBDOMAIN_TOKEN: :subdomain_token + + def self?.values: -> ::Array[ModerationAPI::Models::ContentSubmitResponse::Policy::EntityMatcherOutput::Match::Signals::BrandImpersonation::method_] + end + end + end end end From 04c40291ad7a6eb3f8685b8db9c7674f1b57750f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 13:31:05 +0000 Subject: [PATCH 3/3] release: 2.12.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/moderation_api/version.rb | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 074dfc8..0746cbe 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.11.3" + ".": "2.12.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 17a05b8..29a815a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 2.12.0 (2026-04-24) + +Full Changelog: [v2.11.3...v2.12.0](https://github.com/moderation-api/sdk-ruby/compare/v2.11.3...v2.12.0) + +### Features + +* **api:** api update ([18b3b6d](https://github.com/moderation-api/sdk-ruby/commit/18b3b6dce2befe3c2b0051d0dc33b737d99308a9)) + + +### Chores + +* **internal:** more robust bootstrap script ([2217d9c](https://github.com/moderation-api/sdk-ruby/commit/2217d9c080e5fbc4276ec3fed81e91b51f9d653e)) + ## 2.11.3 (2026-04-09) Full Changelog: [v2.11.2...v2.11.3](https://github.com/moderation-api/sdk-ruby/compare/v2.11.2...v2.11.3) diff --git a/Gemfile.lock b/Gemfile.lock index 8eb6062..24e3355 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - moderation_api (2.11.3) + moderation_api (2.12.0) cgi connection_pool diff --git a/README.md b/README.md index 05a9a8a..cf53987 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "moderation_api", "~> 2.11.3" +gem "moderation_api", "~> 2.12.0" ``` diff --git a/lib/moderation_api/version.rb b/lib/moderation_api/version.rb index d956e88..3a01059 100644 --- a/lib/moderation_api/version.rb +++ b/lib/moderation_api/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ModerationAPI - VERSION = "2.11.3" + VERSION = "2.12.0" end