From cbe6c7376d1fb53af66e31c6154edd684722e712 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 00:37:01 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 ++-- .../models/brand_styleguide_params.rb | 15 ++++++++++--- lib/brand_dev/resources/brand.rb | 10 ++++++--- .../models/brand_styleguide_params.rbi | 22 ++++++++++++++++--- rbi/brand_dev/resources/brand.rbi | 8 ++++++- .../models/brand_styleguide_params.rbs | 13 +++++++++-- sig/brand_dev/resources/brand.rbs | 3 ++- test/brand_dev/resources/brand_test.rb | 4 ++-- 8 files changed, 62 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index aaa0f9f..9aae198 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 20 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-2cdd67823c6ac9d1ab68032a695c31a098ad285ffb0c073b9dfc00afe5de9b88.yml -openapi_spec_hash: ac8a965beb9b667b6204a5c573507219 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-3614380ba4315687bbaf6561e9872fd72dd876f9230ce690c35d7efc1250e808.yml +openapi_spec_hash: f1aa17e08d0379766a61de68714c7c21 config_hash: 4cd3173ea1cce7183640aae49cfbb374 diff --git a/lib/brand_dev/models/brand_styleguide_params.rb b/lib/brand_dev/models/brand_styleguide_params.rb index c118891..745c3cf 100644 --- a/lib/brand_dev/models/brand_styleguide_params.rb +++ b/lib/brand_dev/models/brand_styleguide_params.rb @@ -7,12 +7,19 @@ class BrandStyleguideParams < BrandDev::Internal::Type::BaseModel extend BrandDev::Internal::Type::RequestParameters::Converter include BrandDev::Internal::Type::RequestParameters + # @!attribute direct_url + # A specific URL to fetch the styleguide from directly, bypassing domain + # resolution (e.g., 'https://example.com/design-system'). + # + # @return [String, nil] + optional :direct_url, String + # @!attribute domain # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # domain will be automatically normalized and validated. # - # @return [String] - required :domain, String + # @return [String, nil] + optional :domain, String # @!attribute prioritize # Optional parameter to prioritize screenshot capture for styleguide extraction. @@ -31,10 +38,12 @@ class BrandStyleguideParams < BrandDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(domain:, prioritize: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(direct_url: nil, domain: nil, prioritize: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandStyleguideParams} for more details. # + # @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio + # # @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # # @param prioritize [Symbol, BrandDev::Models::BrandStyleguideParams::Prioritize] Optional parameter to prioritize screenshot capture for styleguide extraction. I diff --git a/lib/brand_dev/resources/brand.rb b/lib/brand_dev/resources/brand.rb index 6497860..5190040 100644 --- a/lib/brand_dev/resources/brand.rb +++ b/lib/brand_dev/resources/brand.rb @@ -496,8 +496,12 @@ def screenshot(params) # # Automatically extract comprehensive design system information from a brand's # website including colors, typography, spacing, shadows, and UI components. + # Either 'domain' or 'directUrl' must be provided as a query parameter, but not + # both. # - # @overload styleguide(domain:, prioritize: nil, timeout_ms: nil, request_options: {}) + # @overload styleguide(direct_url: nil, domain: nil, prioritize: nil, timeout_ms: nil, request_options: {}) + # + # @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio # # @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # @@ -510,12 +514,12 @@ def screenshot(params) # @return [BrandDev::Models::BrandStyleguideResponse] # # @see BrandDev::Models::BrandStyleguideParams - def styleguide(params) + def styleguide(params = {}) parsed, options = BrandDev::BrandStyleguideParams.dump_request(params) @client.request( method: :get, path: "brand/styleguide", - query: parsed.transform_keys(timeout_ms: "timeoutMS"), + query: parsed.transform_keys(direct_url: "directUrl", timeout_ms: "timeoutMS"), model: BrandDev::Models::BrandStyleguideResponse, options: options ) diff --git a/rbi/brand_dev/models/brand_styleguide_params.rbi b/rbi/brand_dev/models/brand_styleguide_params.rbi index e7e5f52..d33c19c 100644 --- a/rbi/brand_dev/models/brand_styleguide_params.rbi +++ b/rbi/brand_dev/models/brand_styleguide_params.rbi @@ -11,10 +11,21 @@ module BrandDev T.any(BrandDev::BrandStyleguideParams, BrandDev::Internal::AnyHash) end + # A specific URL to fetch the styleguide from directly, bypassing domain + # resolution (e.g., 'https://example.com/design-system'). + sig { returns(T.nilable(String)) } + attr_reader :direct_url + + sig { params(direct_url: String).void } + attr_writer :direct_url + # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # domain will be automatically normalized and validated. - sig { returns(String) } - attr_accessor :domain + sig { returns(T.nilable(String)) } + attr_reader :domain + + sig { params(domain: String).void } + attr_writer :domain # Optional parameter to prioritize screenshot capture for styleguide extraction. # If 'speed', optimizes for faster capture with basic quality. If 'quality', @@ -45,6 +56,7 @@ module BrandDev sig do params( + direct_url: String, domain: String, prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol, timeout_ms: Integer, @@ -52,9 +64,12 @@ module BrandDev ).returns(T.attached_class) end def self.new( + # A specific URL to fetch the styleguide from directly, bypassing domain + # resolution (e.g., 'https://example.com/design-system'). + direct_url: nil, # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # domain will be automatically normalized and validated. - domain:, + domain: nil, # Optional parameter to prioritize screenshot capture for styleguide extraction. # If 'speed', optimizes for faster capture with basic quality. If 'quality', # optimizes for higher quality with longer wait times. Defaults to 'quality' if @@ -71,6 +86,7 @@ module BrandDev sig do override.returns( { + direct_url: String, domain: String, prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol, timeout_ms: Integer, diff --git a/rbi/brand_dev/resources/brand.rbi b/rbi/brand_dev/resources/brand.rbi index f3ccbf7..f11dee8 100644 --- a/rbi/brand_dev/resources/brand.rbi +++ b/rbi/brand_dev/resources/brand.rbi @@ -437,8 +437,11 @@ module BrandDev # Automatically extract comprehensive design system information from a brand's # website including colors, typography, spacing, shadows, and UI components. + # Either 'domain' or 'directUrl' must be provided as a query parameter, but not + # both. sig do params( + direct_url: String, domain: String, prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol, timeout_ms: Integer, @@ -446,9 +449,12 @@ module BrandDev ).returns(BrandDev::Models::BrandStyleguideResponse) end def styleguide( + # A specific URL to fetch the styleguide from directly, bypassing domain + # resolution (e.g., 'https://example.com/design-system'). + direct_url: nil, # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # domain will be automatically normalized and validated. - domain:, + domain: nil, # Optional parameter to prioritize screenshot capture for styleguide extraction. # If 'speed', optimizes for faster capture with basic quality. If 'quality', # optimizes for higher quality with longer wait times. Defaults to 'quality' if diff --git a/sig/brand_dev/models/brand_styleguide_params.rbs b/sig/brand_dev/models/brand_styleguide_params.rbs index 6787d70..6985e43 100644 --- a/sig/brand_dev/models/brand_styleguide_params.rbs +++ b/sig/brand_dev/models/brand_styleguide_params.rbs @@ -2,6 +2,7 @@ module BrandDev module Models type brand_styleguide_params = { + direct_url: String, domain: String, prioritize: BrandDev::Models::BrandStyleguideParams::prioritize, timeout_ms: Integer @@ -12,7 +13,13 @@ module BrandDev extend BrandDev::Internal::Type::RequestParameters::Converter include BrandDev::Internal::Type::RequestParameters - attr_accessor domain: String + attr_reader direct_url: String? + + def direct_url=: (String) -> String + + attr_reader domain: String? + + def domain=: (String) -> String attr_reader prioritize: BrandDev::Models::BrandStyleguideParams::prioritize? @@ -25,13 +32,15 @@ module BrandDev def timeout_ms=: (Integer) -> Integer def initialize: ( - domain: String, + ?direct_url: String, + ?domain: String, ?prioritize: BrandDev::Models::BrandStyleguideParams::prioritize, ?timeout_ms: Integer, ?request_options: BrandDev::request_opts ) -> void def to_hash: -> { + direct_url: String, domain: String, prioritize: BrandDev::Models::BrandStyleguideParams::prioritize, timeout_ms: Integer, diff --git a/sig/brand_dev/resources/brand.rbs b/sig/brand_dev/resources/brand.rbs index f91712c..7ee57b6 100644 --- a/sig/brand_dev/resources/brand.rbs +++ b/sig/brand_dev/resources/brand.rbs @@ -117,7 +117,8 @@ module BrandDev ) -> BrandDev::Models::BrandScreenshotResponse def styleguide: ( - domain: String, + ?direct_url: String, + ?domain: String, ?prioritize: BrandDev::Models::BrandStyleguideParams::prioritize, ?timeout_ms: Integer, ?request_options: BrandDev::request_opts diff --git a/test/brand_dev/resources/brand_test.rb b/test/brand_dev/resources/brand_test.rb index 19dac7f..41e3da1 100644 --- a/test/brand_dev/resources/brand_test.rb +++ b/test/brand_dev/resources/brand_test.rb @@ -287,10 +287,10 @@ def test_screenshot_required_params end end - def test_styleguide_required_params + def test_styleguide skip("Mock server tests are disabled") - response = @brand_dev.brand.styleguide(domain: "domain") + response = @brand_dev.brand.styleguide assert_pattern do response => BrandDev::Models::BrandStyleguideResponse From 6c80e1956be6e9c4345eb956b7a34116e4d76bd6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 00:37:21 +0000 Subject: [PATCH 2/2] release: 0.27.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/brand_dev/version.rb | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index caf5ca3..59acac4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.26.0" + ".": "0.27.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e654ff7..8588c40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.27.0 (2026-02-24) + +Full Changelog: [v0.26.0...v0.27.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.26.0...v0.27.0) + +### Features + +* **api:** api update ([cbe6c73](https://github.com/brand-dot-dev/ruby-sdk/commit/cbe6c7376d1fb53af66e31c6154edd684722e712)) + ## 0.26.0 (2026-02-23) Full Changelog: [v0.25.0...v0.26.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.25.0...v0.26.0) diff --git a/Gemfile.lock b/Gemfile.lock index 957c9ae..8250f61 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - brand.dev (0.26.0) + brand.dev (0.27.0) cgi connection_pool diff --git a/README.md b/README.md index b46adeb..5d9c68f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "brand.dev", "~> 0.26.0" +gem "brand.dev", "~> 0.27.0" ``` diff --git a/lib/brand_dev/version.rb b/lib/brand_dev/version.rb index 7b13d7d..6f3a15d 100644 --- a/lib/brand_dev/version.rb +++ b/lib/brand_dev/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module BrandDev - VERSION = "0.26.0" + VERSION = "0.27.0" end