diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cb9d254..7f3f5c8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.22.0" + ".": "0.23.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index ef7f019..3c2db8b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 28bee12..89a946d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/Gemfile.lock b/Gemfile.lock index 61c4bb4..f3fc938 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - brand.dev (0.22.0) + brand.dev (0.23.0) cgi connection_pool diff --git a/README.md b/README.md index a610b5e..cfdf62e 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.22.0" +gem "brand.dev", "~> 0.23.0" ``` diff --git a/lib/brand_dev/models/brand_ai_products_params.rb b/lib/brand_dev/models/brand_ai_products_params.rb index 6aad592..05fef53 100644 --- a/lib/brand_dev/models/brand_ai_products_params.rb +++ b/lib/brand_dev/models/brand_ai_products_params.rb @@ -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. @@ -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 diff --git a/lib/brand_dev/resources/brand.rb b/lib/brand_dev/resources/brand.rb index 951aed2..e846d79 100644 --- a/lib/brand_dev/resources/brand.rb +++ b/lib/brand_dev/resources/brand.rb @@ -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, diff --git a/lib/brand_dev/version.rb b/lib/brand_dev/version.rb index 99f29ec..6a39158 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.22.0" + VERSION = "0.23.0" end diff --git a/rbi/brand_dev/models/brand_ai_products_params.rbi b/rbi/brand_dev/models/brand_ai_products_params.rbi index 1e0e1c9..9b582b4 100644 --- a/rbi/brand_dev/models/brand_ai_products_params.rbi +++ b/rbi/brand_dev/models/brand_ai_products_params.rbi @@ -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)) } @@ -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: {} ) @@ -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 } ) diff --git a/rbi/brand_dev/resources/brand.rbi b/rbi/brand_dev/resources/brand.rbi index 395da65..8c1871b 100644 --- a/rbi/brand_dev/resources/brand.rbi +++ b/rbi/brand_dev/resources/brand.rbi @@ -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: {} ) diff --git a/sig/brand_dev/models/brand_ai_products_params.rbs b/sig/brand_dev/models/brand_ai_products_params.rbs index a6d8ea6..f44865d 100644 --- a/sig/brand_dev/models/brand_ai_products_params.rbs +++ b/sig/brand_dev/models/brand_ai_products_params.rbs @@ -2,10 +2,10 @@ 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 @@ -13,13 +13,7 @@ module BrandDev 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? @@ -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 diff --git a/sig/brand_dev/resources/brand.rbs b/sig/brand_dev/resources/brand.rbs index d065cbb..c315c4e 100644 --- a/sig/brand_dev/resources/brand.rbs +++ b/sig/brand_dev/resources/brand.rbs @@ -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 diff --git a/test/brand_dev/resources/brand_test.rb b/test/brand_dev/resources/brand_test.rb index d79c82a..22afe6e 100644 --- a/test/brand_dev/resources/brand_test.rb +++ b/test/brand_dev/resources/brand_test.rb @@ -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