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.22.0"
".": "0.23.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: 15
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-73562e26b663cf10185b9e98966accf5f151c6d3cf99b5e060ce5a847045e383.yml
openapi_spec_hash: bf5994966b84f9dda998ad5059ff8318
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-10f7ae53f4fe4f2394c22788b648d9db742a178ed41a87beb39de741660e646b.yml
openapi_spec_hash: 9885c47a02677471a38f16dddbad1823
config_hash: 6f10592c7d0c3bafefc1271472283217
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.23.0 (2026-02-07)

Full Changelog: [v0.22.0...v0.23.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.22.0...v0.23.0)

### Features

* **api:** api update ([c1d523e](https://github.com/brand-dot-dev/ruby-sdk/commit/c1d523ebcc0e29a2a3231a2df3f755e2e02b4616))

## 0.22.0 (2026-02-07)

Full Changelog: [v0.21.0...v0.22.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.21.0...v0.22.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.22.0)
brand.dev (0.23.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.22.0"
gem "brand.dev", "~> 0.23.0"
```

<!-- x-release-please-end -->
Expand Down
36 changes: 16 additions & 20 deletions lib/brand_dev/models/brand_ai_products_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,11 @@ class BrandAIProductsParams < BrandDev::Internal::Type::BaseModel
extend BrandDev::Internal::Type::RequestParameters::Converter
include BrandDev::Internal::Type::RequestParameters

# @!attribute direct_url
# A specific URL to use directly as the starting point for extraction without
# domain resolution. Useful when you want to extract products from a specific page
# rather than discovering the site's product pages automatically. Either 'domain'
# or 'directUrl' must be provided, but not both.
#
# @return [String, nil]
optional :direct_url, String, api_name: :directUrl

# @!attribute domain
# The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but
# not both.
# The domain name to analyze.
#
# @return [String, nil]
optional :domain, String
# @return [String]
required :domain, String

# @!attribute max_products
# Maximum number of products to extract.
Expand All @@ -30,24 +20,30 @@ class BrandAIProductsParams < BrandDev::Internal::Type::BaseModel
optional :max_products, Integer, api_name: :maxProducts

# @!attribute timeout_ms
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
# Optional timeout in milliseconds for the request. Maximum allowed value is
# 300000ms (5 minutes).
#
# @return [Integer, nil]
optional :timeout_ms, Integer, api_name: :timeoutMS

# @!method initialize(direct_url: nil, domain: nil, max_products: nil, timeout_ms: nil, request_options: {})
# @!attribute direct_url
# A specific URL to use directly as the starting point for extraction without
# domain resolution.
#
# @return [String]
required :direct_url, String, api_name: :directUrl

# @!method initialize(domain:, direct_url:, max_products: nil, timeout_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {BrandDev::Models::BrandAIProductsParams} for more details.
#
# @param direct_url [String] A specific URL to use directly as the starting point for extraction without doma
# @param domain [String] The domain name to analyze.
#
# @param domain [String] The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but
# @param direct_url [String] A specific URL to use directly as the starting point for extraction without doma
#
# @param max_products [Integer] Maximum number of products to extract.
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000
#
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
end
Expand Down
10 changes: 5 additions & 5 deletions lib/brand_dev/resources/brand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ def retrieve(params)
# analyze the website and return a list of products with details such as name,
# description, image, pricing, features, and more.
#
# @overload ai_products(direct_url: nil, domain: nil, max_products: nil, timeout_ms: nil, request_options: {})
# @overload ai_products(domain:, direct_url:, max_products: nil, timeout_ms: nil, request_options: {})
#
# @param direct_url [String] A specific URL to use directly as the starting point for extraction without doma
# @param domain [String] The domain name to analyze.
#
# @param domain [String] The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but
# @param direct_url [String] A specific URL to use directly as the starting point for extraction without doma
#
# @param max_products [Integer] Maximum number of products to extract.
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000
#
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
#
# @return [BrandDev::Models::BrandAIProductsResponse]
#
# @see BrandDev::Models::BrandAIProductsParams
def ai_products(params = {})
def ai_products(params)
parsed, options = BrandDev::BrandAIProductsParams.dump_request(params)
@client.request(
method: :post,
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.22.0"
VERSION = "0.23.0"
end
50 changes: 18 additions & 32 deletions rbi/brand_dev/models/brand_ai_products_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,9 @@ module BrandDev
T.any(BrandDev::BrandAIProductsParams, BrandDev::Internal::AnyHash)
end

# A specific URL to use directly as the starting point for extraction without
# domain resolution. Useful when you want to extract products from a specific page
# rather than discovering the site's product pages automatically. Either 'domain'
# or 'directUrl' must be provided, but not both.
sig { returns(T.nilable(String)) }
attr_reader :direct_url

sig { params(direct_url: String).void }
attr_writer :direct_url

# The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but
# not both.
sig { returns(T.nilable(String)) }
attr_reader :domain

sig { params(domain: String).void }
attr_writer :domain
# The domain name to analyze.
sig { returns(String) }
attr_accessor :domain

# Maximum number of products to extract.
sig { returns(T.nilable(Integer)) }
Expand All @@ -36,38 +22,38 @@ module BrandDev
sig { params(max_products: Integer).void }
attr_writer :max_products

# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
# Optional timeout in milliseconds for the request. Maximum allowed value is
# 300000ms (5 minutes).
sig { returns(T.nilable(Integer)) }
attr_reader :timeout_ms

sig { params(timeout_ms: Integer).void }
attr_writer :timeout_ms

# A specific URL to use directly as the starting point for extraction without
# domain resolution.
sig { returns(String) }
attr_accessor :direct_url

sig do
params(
direct_url: String,
domain: String,
direct_url: String,
max_products: Integer,
timeout_ms: Integer,
request_options: BrandDev::RequestOptions::OrHash
).returns(T.attached_class)
end
def self.new(
# The domain name to analyze.
domain:,
# A specific URL to use directly as the starting point for extraction without
# domain resolution. Useful when you want to extract products from a specific page
# rather than discovering the site's product pages automatically. Either 'domain'
# or 'directUrl' must be provided, but not both.
direct_url: nil,
# The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but
# not both.
domain: nil,
# domain resolution.
direct_url:,
# Maximum number of products to extract.
max_products: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
# Optional timeout in milliseconds for the request. Maximum allowed value is
# 300000ms (5 minutes).
timeout_ms: nil,
request_options: {}
)
Expand All @@ -76,10 +62,10 @@ module BrandDev
sig do
override.returns(
{
direct_url: String,
domain: String,
max_products: Integer,
timeout_ms: Integer,
direct_url: String,
request_options: BrandDev::RequestOptions
}
)
Expand Down
18 changes: 7 additions & 11 deletions rbi/brand_dev/resources/brand.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,23 @@ module BrandDev
# description, image, pricing, features, and more.
sig do
params(
direct_url: String,
domain: String,
direct_url: String,
max_products: Integer,
timeout_ms: Integer,
request_options: BrandDev::RequestOptions::OrHash
).returns(BrandDev::Models::BrandAIProductsResponse)
end
def ai_products(
# The domain name to analyze.
domain:,
# A specific URL to use directly as the starting point for extraction without
# domain resolution. Useful when you want to extract products from a specific page
# rather than discovering the site's product pages automatically. Either 'domain'
# or 'directUrl' must be provided, but not both.
direct_url: nil,
# The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but
# not both.
domain: nil,
# domain resolution.
direct_url:,
# Maximum number of products to extract.
max_products: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
# Optional timeout in milliseconds for the request. Maximum allowed value is
# 300000ms (5 minutes).
timeout_ms: nil,
request_options: {}
)
Expand Down
20 changes: 8 additions & 12 deletions sig/brand_dev/models/brand_ai_products_params.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,18 @@ module BrandDev
module Models
type brand_ai_products_params =
{
direct_url: String,
domain: String,
max_products: Integer,
timeout_ms: Integer
timeout_ms: Integer,
direct_url: String
}
& BrandDev::Internal::Type::request_parameters

class BrandAIProductsParams < BrandDev::Internal::Type::BaseModel
extend BrandDev::Internal::Type::RequestParameters::Converter
include BrandDev::Internal::Type::RequestParameters

attr_reader direct_url: String?

def direct_url=: (String) -> String

attr_reader domain: String?

def domain=: (String) -> String
attr_accessor domain: String

attr_reader max_products: Integer?

Expand All @@ -29,19 +23,21 @@ module BrandDev

def timeout_ms=: (Integer) -> Integer

attr_accessor direct_url: String

def initialize: (
?direct_url: String,
?domain: String,
domain: String,
direct_url: String,
?max_products: Integer,
?timeout_ms: Integer,
?request_options: BrandDev::request_opts
) -> void

def to_hash: -> {
direct_url: String,
domain: String,
max_products: Integer,
timeout_ms: Integer,
direct_url: String,
request_options: BrandDev::RequestOptions
}
end
Expand Down
4 changes: 2 additions & 2 deletions sig/brand_dev/resources/brand.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ module BrandDev
) -> BrandDev::Models::BrandRetrieveResponse

def ai_products: (
?direct_url: String,
?domain: String,
domain: String,
direct_url: String,
?max_products: Integer,
?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 @@ -21,10 +21,10 @@ def test_retrieve_required_params
end
end

def test_ai_products
def test_ai_products_required_params
skip("Prism tests are disabled")

response = @brand_dev.brand.ai_products
response = @brand_dev.brand.ai_products(domain: "domain")

assert_pattern do
response => BrandDev::Models::BrandAIProductsResponse
Expand Down
Loading