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 @@
{
".": "0.26.0"
".": "0.27.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: 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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
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:
brand.dev (0.26.0)
brand.dev (0.27.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 @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "brand.dev", "~> 0.26.0"
gem "brand.dev", "~> 0.27.0"
```

<!-- x-release-please-end -->
Expand Down
15 changes: 12 additions & 3 deletions lib/brand_dev/models/brand_styleguide_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
10 changes: 7 additions & 3 deletions lib/brand_dev/resources/brand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand All @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion lib/brand_dev/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module BrandDev
VERSION = "0.26.0"
VERSION = "0.27.0"
end
22 changes: 19 additions & 3 deletions rbi/brand_dev/models/brand_styleguide_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -45,16 +56,20 @@ module BrandDev

sig do
params(
direct_url: String,
domain: String,
prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol,
timeout_ms: Integer,
request_options: BrandDev::RequestOptions::OrHash
).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
Expand All @@ -71,6 +86,7 @@ module BrandDev
sig do
override.returns(
{
direct_url: String,
domain: String,
prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol,
timeout_ms: Integer,
Expand Down
8 changes: 7 additions & 1 deletion rbi/brand_dev/resources/brand.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -437,18 +437,24 @@ 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,
request_options: BrandDev::RequestOptions::OrHash
).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
Expand Down
13 changes: 11 additions & 2 deletions sig/brand_dev/models/brand_styleguide_params.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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?

Expand All @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion sig/brand_dev/resources/brand.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/brand_dev/resources/brand_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading