From 2c2a05eeeefeefd3fcd0ff616ffcc36f9969b299 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 25 Apr 2026 23:40:40 +0000 Subject: [PATCH 1/8] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6d33ce61..fd64b393 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-a831ece9950c336fba69327e01aed391a08418e1898f4aff27a800471f139cc7.yml -openapi_spec_hash: 459258410b739536cdc75b91e8b4eac7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-1cbd2dedb73f97573854f4ec863ebc17920b5813b6b16259f26989935b0cb1f4.yml +openapi_spec_hash: 1da5f104706e10973ebe29341f6cc0b7 config_hash: 70354330f92ce169beabc98696ebb9a3 From cc576729ce6c522ee578e7dc5f99122463014515 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 26 Apr 2026 02:23:48 +0000 Subject: [PATCH 2/8] feat(api): api update --- .stats.yml | 4 ++-- lib/context_dev/resources/ai.rb | 11 +++++------ lib/context_dev/resources/industry.rb | 4 ++-- lib/context_dev/resources/utility.rb | 8 ++------ rbi/context_dev/resources/ai.rbi | 11 +++++------ rbi/context_dev/resources/industry.rbi | 4 ++-- rbi/context_dev/resources/utility.rbi | 8 ++------ 7 files changed, 20 insertions(+), 30 deletions(-) diff --git a/.stats.yml b/.stats.yml index fd64b393..20d2c165 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-1cbd2dedb73f97573854f4ec863ebc17920b5813b6b16259f26989935b0cb1f4.yml -openapi_spec_hash: 1da5f104706e10973ebe29341f6cc0b7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-0f4b818ec07eb384832ac53f99b79eb59b0af5246209c6954c416148c8f0b5c0.yml +openapi_spec_hash: 08043c0ff1dea4cb8f0c5e54368a84c4 config_hash: 70354330f92ce169beabc98696ebb9a3 diff --git a/lib/context_dev/resources/ai.rb b/lib/context_dev/resources/ai.rb index 85fe376b..373204ad 100644 --- a/lib/context_dev/resources/ai.rb +++ b/lib/context_dev/resources/ai.rb @@ -39,9 +39,8 @@ def ai_query(params) # Some parameter documentations has been truncated, see # {ContextDev::Models::AIExtractProductParams} for more details. # - # Beta feature: Given a single URL, determines if it is a product detail page, - # classifies the platform/product type, and extracts the product information. - # Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites. + # Given a single URL, determines if it is a product page and extracts the product + # information. # # @overload extract_product(url:, timeout_ms: nil, request_options: {}) # @@ -65,9 +64,9 @@ def extract_product(params) ) end - # Beta feature: Extract product information from a brand's website. We will - # analyze the website and return a list of products with details such as name, - # description, image, pricing, features, and more. + # Extract product information from a brand's website. We will analyze the website + # and return a list of products with details such as name, description, image, + # pricing, features, and more. # # @overload extract_products(body:, request_options: {}) # diff --git a/lib/context_dev/resources/industry.rb b/lib/context_dev/resources/industry.rb index a90c3851..614bc40d 100644 --- a/lib/context_dev/resources/industry.rb +++ b/lib/context_dev/resources/industry.rb @@ -43,8 +43,8 @@ def retrieve_naics(params) # {ContextDev::Models::IndustryRetrieveSicParams} for more details. # # Classify any brand into Standard Industrial Classification (SIC) codes from its - # domain or name. Choose between the original 1987 SIC system (`original_sic`) or - # the latest SIC list maintained by the SEC (`latest_sec`). + # domain or name. Choose between the original SIC system (`original_sic`) or the + # latest SIC list maintained by the SEC (`latest_sec`). # # @overload retrieve_sic(input:, max_results: nil, min_results: nil, timeout_ms: nil, type: nil, request_options: {}) # diff --git a/lib/context_dev/resources/utility.rb b/lib/context_dev/resources/utility.rb index 83849e53..1729a6f3 100644 --- a/lib/context_dev/resources/utility.rb +++ b/lib/context_dev/resources/utility.rb @@ -7,9 +7,7 @@ class Utility # {ContextDev::Models::UtilityPrefetchParams} for more details. # # Signal that you may fetch brand data for a particular domain soon to improve - # latency. This endpoint does not charge credits and is available for paid - # customers to optimize future requests. [You must be on a paid plan to use this - # endpoint] + # latency. # # @overload prefetch(domain:, timeout_ms: nil, request_options: {}) # @@ -39,9 +37,7 @@ def prefetch(params) # Signal that you may fetch brand data for a particular domain soon to improve # latency. This endpoint accepts an email address, extracts the domain from it, # validates that it's not a disposable or free email provider, and queues the - # domain for prefetching. This endpoint does not charge credits and is available - # for paid customers to optimize future requests. [You must be on a paid plan to - # use this endpoint] + # domain for prefetching. # # @overload prefetch_by_email(email:, timeout_ms: nil, request_options: {}) # diff --git a/rbi/context_dev/resources/ai.rbi b/rbi/context_dev/resources/ai.rbi index 15ebef1f..bad94ddb 100644 --- a/rbi/context_dev/resources/ai.rbi +++ b/rbi/context_dev/resources/ai.rbi @@ -31,9 +31,8 @@ module ContextDev ) end - # Beta feature: Given a single URL, determines if it is a product detail page, - # classifies the platform/product type, and extracts the product information. - # Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites. + # Given a single URL, determines if it is a product page and extracts the product + # information. sig do params( url: String, @@ -51,9 +50,9 @@ module ContextDev ) end - # Beta feature: Extract product information from a brand's website. We will - # analyze the website and return a list of products with details such as name, - # description, image, pricing, features, and more. + # Extract product information from a brand's website. We will analyze the website + # and return a list of products with details such as name, description, image, + # pricing, features, and more. sig do params( body: diff --git a/rbi/context_dev/resources/industry.rbi b/rbi/context_dev/resources/industry.rbi index 4b653879..cd30adbd 100644 --- a/rbi/context_dev/resources/industry.rbi +++ b/rbi/context_dev/resources/industry.rbi @@ -32,8 +32,8 @@ module ContextDev end # Classify any brand into Standard Industrial Classification (SIC) codes from its - # domain or name. Choose between the original 1987 SIC system (`original_sic`) or - # the latest SIC list maintained by the SEC (`latest_sec`). + # domain or name. Choose between the original SIC system (`original_sic`) or the + # latest SIC list maintained by the SEC (`latest_sec`). sig do params( input: String, diff --git a/rbi/context_dev/resources/utility.rbi b/rbi/context_dev/resources/utility.rbi index 0301cad6..8f4452a8 100644 --- a/rbi/context_dev/resources/utility.rbi +++ b/rbi/context_dev/resources/utility.rbi @@ -4,9 +4,7 @@ module ContextDev module Resources class Utility # Signal that you may fetch brand data for a particular domain soon to improve - # latency. This endpoint does not charge credits and is available for paid - # customers to optimize future requests. [You must be on a paid plan to use this - # endpoint] + # latency. sig do params( domain: String, @@ -28,9 +26,7 @@ module ContextDev # Signal that you may fetch brand data for a particular domain soon to improve # latency. This endpoint accepts an email address, extracts the domain from it, # validates that it's not a disposable or free email provider, and queues the - # domain for prefetching. This endpoint does not charge credits and is available - # for paid customers to optimize future requests. [You must be on a paid plan to - # use this endpoint] + # domain for prefetching. sig do params( email: String, From 99f908e4da2b1d7255fb3787f72d4bd9e97cc972 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 26 Apr 2026 19:23:27 +0000 Subject: [PATCH 3/8] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 20d2c165..67073473 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-0f4b818ec07eb384832ac53f99b79eb59b0af5246209c6954c416148c8f0b5c0.yml -openapi_spec_hash: 08043c0ff1dea4cb8f0c5e54368a84c4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-91dbd4c6ac7e59beea9c160c063dbcc54ab6375444833f1da0d38a3e6c182384.yml +openapi_spec_hash: 5a827539bca2813c6d0d2bba2c3301a2 config_hash: 70354330f92ce169beabc98696ebb9a3 From c74cbf354e15c2b56680b4248ed69462a1a84d23 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 26 Apr 2026 23:26:41 +0000 Subject: [PATCH 4/8] feat(api): api update --- .stats.yml | 4 +- .../models/ai_extract_product_params.rb | 12 +++++- .../models/ai_extract_products_params.rb | 24 ++++++++++- lib/context_dev/resources/ai.rb | 4 +- .../models/ai_extract_product_params.rbi | 15 +++++++ .../models/ai_extract_products_params.rbi | 42 ++++++++++++++++++- rbi/context_dev/resources/ai.rbi | 5 +++ .../models/ai_extract_product_params.rbs | 8 +++- .../models/ai_extract_products_params.rbs | 26 +++++++++++- sig/context_dev/resources/ai.rbs | 1 + 10 files changed, 130 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index 67073473..5ceb8086 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-91dbd4c6ac7e59beea9c160c063dbcc54ab6375444833f1da0d38a3e6c182384.yml -openapi_spec_hash: 5a827539bca2813c6d0d2bba2c3301a2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-d5ca4cac056c38a1cb69c6d9033abe0d2b4d5858ee9a76e1172b23649ab1cca6.yml +openapi_spec_hash: 8e1dd204746bcfaaf637d93b1d339eb2 config_hash: 70354330f92ce169beabc98696ebb9a3 diff --git a/lib/context_dev/models/ai_extract_product_params.rb b/lib/context_dev/models/ai_extract_product_params.rb index 1fc7d187..364bb703 100644 --- a/lib/context_dev/models/ai_extract_product_params.rb +++ b/lib/context_dev/models/ai_extract_product_params.rb @@ -13,6 +13,14 @@ class AIExtractProductParams < ContextDev::Internal::Type::BaseModel # @return [String] required :url, String + # @!attribute max_age_ms + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, api_name: :maxAgeMs + # @!attribute timeout_ms # Optional timeout in milliseconds for the request. Maximum allowed value is # 300000ms (5 minutes). @@ -20,12 +28,14 @@ class AIExtractProductParams < ContextDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer, api_name: :timeoutMS - # @!method initialize(url:, timeout_ms: nil, request_options: {}) + # @!method initialize(url:, max_age_ms: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {ContextDev::Models::AIExtractProductParams} for more details. # # @param url [String] The product page URL to extract product data from. # + # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000 # # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/context_dev/models/ai_extract_products_params.rb b/lib/context_dev/models/ai_extract_products_params.rb index baa73a56..7594ddba 100644 --- a/lib/context_dev/models/ai_extract_products_params.rb +++ b/lib/context_dev/models/ai_extract_products_params.rb @@ -30,6 +30,14 @@ class ByDomain < ContextDev::Internal::Type::BaseModel # @return [String] required :domain, String + # @!attribute max_age_ms + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, api_name: :maxAgeMs + # @!attribute max_products # Maximum number of products to extract. # @@ -43,12 +51,14 @@ class ByDomain < ContextDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer, api_name: :timeoutMS - # @!method initialize(domain:, max_products: nil, timeout_ms: nil) + # @!method initialize(domain:, max_age_ms: nil, max_products: nil, timeout_ms: nil) # Some parameter documentations has been truncated, see # {ContextDev::Models::AIExtractProductsParams::Body::ByDomain} for more details. # # @param domain [String] The domain name to analyze. # + # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y + # # @param max_products [Integer] Maximum number of products to extract. # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000 @@ -62,6 +72,14 @@ class ByDirectURL < ContextDev::Internal::Type::BaseModel # @return [String] required :direct_url, String, api_name: :directUrl + # @!attribute max_age_ms + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + # + # @return [Integer, nil] + optional :max_age_ms, Integer, api_name: :maxAgeMs + # @!attribute max_products # Maximum number of products to extract. # @@ -75,13 +93,15 @@ class ByDirectURL < ContextDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer, api_name: :timeoutMS - # @!method initialize(direct_url:, max_products: nil, timeout_ms: nil) + # @!method initialize(direct_url:, max_age_ms: nil, max_products: nil, timeout_ms: nil) # Some parameter documentations has been truncated, see # {ContextDev::Models::AIExtractProductsParams::Body::ByDirectURL} for more # details. # # @param direct_url [String] A specific URL to use directly as the starting point for extraction without doma # + # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y + # # @param max_products [Integer] Maximum number of products to extract. # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000 diff --git a/lib/context_dev/resources/ai.rb b/lib/context_dev/resources/ai.rb index 373204ad..f604cbb8 100644 --- a/lib/context_dev/resources/ai.rb +++ b/lib/context_dev/resources/ai.rb @@ -42,10 +42,12 @@ def ai_query(params) # Given a single URL, determines if it is a product page and extracts the product # information. # - # @overload extract_product(url:, timeout_ms: nil, request_options: {}) + # @overload extract_product(url:, max_age_ms: nil, timeout_ms: nil, request_options: {}) # # @param url [String] The product page URL to extract product data from. # + # @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000 # # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil] diff --git a/rbi/context_dev/models/ai_extract_product_params.rbi b/rbi/context_dev/models/ai_extract_product_params.rbi index 0a8934d5..669ed76c 100644 --- a/rbi/context_dev/models/ai_extract_product_params.rbi +++ b/rbi/context_dev/models/ai_extract_product_params.rbi @@ -18,6 +18,15 @@ module ContextDev sig { returns(String) } attr_accessor :url + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + sig { returns(T.nilable(Integer)) } + attr_reader :max_age_ms + + sig { params(max_age_ms: Integer).void } + attr_writer :max_age_ms + # Optional timeout in milliseconds for the request. Maximum allowed value is # 300000ms (5 minutes). sig { returns(T.nilable(Integer)) } @@ -29,6 +38,7 @@ module ContextDev sig do params( url: String, + max_age_ms: Integer, timeout_ms: Integer, request_options: ContextDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -36,6 +46,10 @@ module ContextDev def self.new( # The product page URL to extract product data from. url:, + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + max_age_ms: nil, # Optional timeout in milliseconds for the request. Maximum allowed value is # 300000ms (5 minutes). timeout_ms: nil, @@ -47,6 +61,7 @@ module ContextDev override.returns( { url: String, + max_age_ms: Integer, timeout_ms: Integer, request_options: ContextDev::RequestOptions } diff --git a/rbi/context_dev/models/ai_extract_products_params.rbi b/rbi/context_dev/models/ai_extract_products_params.rbi index c0d91f62..4976fae8 100644 --- a/rbi/context_dev/models/ai_extract_products_params.rbi +++ b/rbi/context_dev/models/ai_extract_products_params.rbi @@ -76,6 +76,15 @@ module ContextDev sig { returns(String) } attr_accessor :domain + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + sig { returns(T.nilable(Integer)) } + attr_reader :max_age_ms + + sig { params(max_age_ms: Integer).void } + attr_writer :max_age_ms + # Maximum number of products to extract. sig { returns(T.nilable(Integer)) } attr_reader :max_products @@ -94,6 +103,7 @@ module ContextDev sig do params( domain: String, + max_age_ms: Integer, max_products: Integer, timeout_ms: Integer ).returns(T.attached_class) @@ -101,6 +111,10 @@ module ContextDev def self.new( # The domain name to analyze. domain:, + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + max_age_ms: nil, # Maximum number of products to extract. max_products: nil, # Optional timeout in milliseconds for the request. Maximum allowed value is @@ -111,7 +125,12 @@ module ContextDev sig do override.returns( - { domain: String, max_products: Integer, timeout_ms: Integer } + { + domain: String, + max_age_ms: Integer, + max_products: Integer, + timeout_ms: Integer + } ) end def to_hash @@ -132,6 +151,15 @@ module ContextDev sig { returns(String) } attr_accessor :direct_url + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + sig { returns(T.nilable(Integer)) } + attr_reader :max_age_ms + + sig { params(max_age_ms: Integer).void } + attr_writer :max_age_ms + # Maximum number of products to extract. sig { returns(T.nilable(Integer)) } attr_reader :max_products @@ -150,6 +178,7 @@ module ContextDev sig do params( direct_url: String, + max_age_ms: Integer, max_products: Integer, timeout_ms: Integer ).returns(T.attached_class) @@ -158,6 +187,10 @@ module ContextDev # A specific URL to use directly as the starting point for extraction without # domain resolution. direct_url:, + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + max_age_ms: nil, # Maximum number of products to extract. max_products: nil, # Optional timeout in milliseconds for the request. Maximum allowed value is @@ -168,7 +201,12 @@ module ContextDev sig do override.returns( - { direct_url: String, max_products: Integer, timeout_ms: Integer } + { + direct_url: String, + max_age_ms: Integer, + max_products: Integer, + timeout_ms: Integer + } ) end def to_hash diff --git a/rbi/context_dev/resources/ai.rbi b/rbi/context_dev/resources/ai.rbi index bad94ddb..dc103d43 100644 --- a/rbi/context_dev/resources/ai.rbi +++ b/rbi/context_dev/resources/ai.rbi @@ -36,6 +36,7 @@ module ContextDev sig do params( url: String, + max_age_ms: Integer, timeout_ms: Integer, request_options: ContextDev::RequestOptions::OrHash ).returns(ContextDev::Models::AIExtractProductResponse) @@ -43,6 +44,10 @@ module ContextDev def extract_product( # The product page URL to extract product data from. url:, + # Return a cached result if a prior scrape for the same parameters exists and is + # younger than this many milliseconds. Defaults to 7 days (604800000 ms) when + # omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. + max_age_ms: nil, # Optional timeout in milliseconds for the request. Maximum allowed value is # 300000ms (5 minutes). timeout_ms: nil, diff --git a/sig/context_dev/models/ai_extract_product_params.rbs b/sig/context_dev/models/ai_extract_product_params.rbs index 516063e1..129edff6 100644 --- a/sig/context_dev/models/ai_extract_product_params.rbs +++ b/sig/context_dev/models/ai_extract_product_params.rbs @@ -1,7 +1,7 @@ module ContextDev module Models type ai_extract_product_params = - { url: String, timeout_ms: Integer } + { url: String, max_age_ms: Integer, timeout_ms: Integer } & ContextDev::Internal::Type::request_parameters class AIExtractProductParams < ContextDev::Internal::Type::BaseModel @@ -10,18 +10,24 @@ module ContextDev attr_accessor url: String + attr_reader max_age_ms: Integer? + + def max_age_ms=: (Integer) -> Integer + attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer def initialize: ( url: String, + ?max_age_ms: Integer, ?timeout_ms: Integer, ?request_options: ContextDev::request_opts ) -> void def to_hash: -> { url: String, + max_age_ms: Integer, timeout_ms: Integer, request_options: ContextDev::RequestOptions } diff --git a/sig/context_dev/models/ai_extract_products_params.rbs b/sig/context_dev/models/ai_extract_products_params.rbs index f51d13e7..db8ee3a7 100644 --- a/sig/context_dev/models/ai_extract_products_params.rbs +++ b/sig/context_dev/models/ai_extract_products_params.rbs @@ -28,11 +28,20 @@ module ContextDev extend ContextDev::Internal::Type::Union type by_domain = - { domain: String, max_products: Integer, timeout_ms: Integer } + { + domain: String, + max_age_ms: Integer, + max_products: Integer, + timeout_ms: Integer + } class ByDomain < ContextDev::Internal::Type::BaseModel attr_accessor domain: String + attr_reader max_age_ms: Integer? + + def max_age_ms=: (Integer) -> Integer + attr_reader max_products: Integer? def max_products=: (Integer) -> Integer @@ -43,23 +52,34 @@ module ContextDev def initialize: ( domain: String, + ?max_age_ms: Integer, ?max_products: Integer, ?timeout_ms: Integer ) -> void def to_hash: -> { domain: String, + max_age_ms: Integer, max_products: Integer, timeout_ms: Integer } end type by_direct_url = - { direct_url: String, max_products: Integer, timeout_ms: Integer } + { + direct_url: String, + max_age_ms: Integer, + max_products: Integer, + timeout_ms: Integer + } class ByDirectURL < ContextDev::Internal::Type::BaseModel attr_accessor direct_url: String + attr_reader max_age_ms: Integer? + + def max_age_ms=: (Integer) -> Integer + attr_reader max_products: Integer? def max_products=: (Integer) -> Integer @@ -70,12 +90,14 @@ module ContextDev def initialize: ( direct_url: String, + ?max_age_ms: Integer, ?max_products: Integer, ?timeout_ms: Integer ) -> void def to_hash: -> { direct_url: String, + max_age_ms: Integer, max_products: Integer, timeout_ms: Integer } diff --git a/sig/context_dev/resources/ai.rbs b/sig/context_dev/resources/ai.rbs index 51587505..34773112 100644 --- a/sig/context_dev/resources/ai.rbs +++ b/sig/context_dev/resources/ai.rbs @@ -11,6 +11,7 @@ module ContextDev def extract_product: ( url: String, + ?max_age_ms: Integer, ?timeout_ms: Integer, ?request_options: ContextDev::request_opts ) -> ContextDev::Models::AIExtractProductResponse From e625fee97a6d4f6ab25f69447b33521cac6a896c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 02:16:25 +0000 Subject: [PATCH 5/8] feat: support setting headers via env --- lib/context_dev/client.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/context_dev/client.rb b/lib/context_dev/client.rb index b16831f8..d8bc689a 100644 --- a/lib/context_dev/client.rb +++ b/lib/context_dev/client.rb @@ -70,6 +70,19 @@ def initialize( raise ArgumentError.new("api_key is required, and can be set via environ: \"CONTEXT_DEV_API_KEY\"") end + headers = {} + custom_headers_env = ENV["CONTEXT_DEV_CUSTOM_HEADERS"] + unless custom_headers_env.nil? + parsed = {} + custom_headers_env.split("\n").each do |line| + colon = line.index(":") + unless colon.nil? + parsed[line[0...colon].strip] = line[(colon + 1)..].strip + end + end + headers = parsed.merge(headers) + end + @api_key = api_key.to_s super( @@ -77,7 +90,8 @@ def initialize( timeout: timeout, max_retries: max_retries, initial_retry_delay: initial_retry_delay, - max_retry_delay: max_retry_delay + max_retry_delay: max_retry_delay, + headers: headers ) @web = ContextDev::Resources::Web.new(client: self) From 468f9626d594c96ae16e944cb9dad6af3e6842a6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 07:10:43 +0000 Subject: [PATCH 6/8] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5ceb8086..adf31ebb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-d5ca4cac056c38a1cb69c6d9033abe0d2b4d5858ee9a76e1172b23649ab1cca6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-d5ca4cac056c38a1cb69c6d9033abe0d2b4d5858ee9a76e1172b23649ab1cca6.yml openapi_spec_hash: 8e1dd204746bcfaaf637d93b1d339eb2 config_hash: 70354330f92ce169beabc98696ebb9a3 From a6adc9c8ddc6a0ad030b2d65a992133790ac3849 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 02:27:03 +0000 Subject: [PATCH 7/8] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index adf31ebb..e4dbd5b4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-d5ca4cac056c38a1cb69c6d9033abe0d2b4d5858ee9a76e1172b23649ab1cca6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-1c5074f316b556d15dca19f0a7c5b9238c698d6f3e20b42bec67f122a97764cc.yml openapi_spec_hash: 8e1dd204746bcfaaf637d93b1d339eb2 config_hash: 70354330f92ce169beabc98696ebb9a3 From 82820a5391e0d0ee799298adbe0d49c2033fb4d9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 02:39:47 +0000 Subject: [PATCH 8/8] release: 1.10.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/context_dev/version.rb | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c3c95522..eb4e0dba 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.9.0" + ".": "1.10.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c3c32c4d..a6ed1d20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 1.10.0 (2026-05-01) + +Full Changelog: [v1.9.0...v1.10.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.9.0...v1.10.0) + +### Features + +* **api:** api update ([c74cbf3](https://github.com/context-dot-dev/context-ruby-sdk/commit/c74cbf354e15c2b56680b4248ed69462a1a84d23)) +* **api:** api update ([cc57672](https://github.com/context-dot-dev/context-ruby-sdk/commit/cc576729ce6c522ee578e7dc5f99122463014515)) +* support setting headers via env ([e625fee](https://github.com/context-dot-dev/context-ruby-sdk/commit/e625fee97a6d4f6ab25f69447b33521cac6a896c)) + ## 1.9.0 (2026-04-25) Full Changelog: [v1.8.0...v1.9.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.8.0...v1.9.0) diff --git a/Gemfile.lock b/Gemfile.lock index 39d83909..400f6b99 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - context.dev (1.9.0) + context.dev (1.10.0) cgi connection_pool diff --git a/README.md b/README.md index 55c45cee..19dd5e13 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 "context.dev", "~> 1.9.0" +gem "context.dev", "~> 1.10.0" ``` diff --git a/lib/context_dev/version.rb b/lib/context_dev/version.rb index e28554d1..d6cc9716 100644 --- a/lib/context_dev/version.rb +++ b/lib/context_dev/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ContextDev - VERSION = "1.9.0" + VERSION = "1.10.0" end