diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cdcf20eb..bfaab56f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.23.0" + ".": "1.24.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index a5eefde4..af822916 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-65a744f4c7f4e0a4e92ff201092cf48901757824d7eb32e79cd6e36919284c10.yml -openapi_spec_hash: 88c222227b33b3cba5898fd55782cce9 -config_hash: f481fca4de4b1657023180d4fc47ef22 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-079e4949baaeab93254aa8a651f4e9976e95387b1633002e925114ce36f29013.yml +openapi_spec_hash: 331f27b62376aaf9c311af03a21d31b8 +config_hash: ada0970327c433e075b4ceef583e0755 diff --git a/CHANGELOG.md b/CHANGELOG.md index 888a2fdd..852c36eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.24.0 (2026-05-30) + +Full Changelog: [v1.23.0...v1.24.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.23.0...v1.24.0) + +### Features + +* **api:** api update ([7948cbf](https://github.com/context-dot-dev/context-ruby-sdk/commit/7948cbf296742dd0fea7c08c148962a35ed88c20)) + ## 1.23.0 (2026-05-19) Full Changelog: [v1.22.0...v1.23.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.22.0...v1.23.0) diff --git a/Gemfile.lock b/Gemfile.lock index fac66d94..6422e86a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - context.dev (1.23.0) + context.dev (1.24.0) cgi connection_pool diff --git a/README.md b/README.md index 7675a0ab..b52d19fe 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.23.0" +gem "context.dev", "~> 1.24.0" ``` diff --git a/lib/context_dev/models/web_extract_fonts_params.rb b/lib/context_dev/models/web_extract_fonts_params.rb index 7a7a23d9..269a2949 100644 --- a/lib/context_dev/models/web_extract_fonts_params.rb +++ b/lib/context_dev/models/web_extract_fonts_params.rb @@ -23,6 +23,15 @@ class WebExtractFontsParams < ContextDev::Internal::Type::BaseModel # @return [String, nil] optional :domain, String + # @!attribute max_age_ms + # Maximum age in milliseconds for cached data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + # + # @return [Integer, nil] + optional :max_age_ms, Integer + # @!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 @@ -31,7 +40,7 @@ class WebExtractFontsParams < ContextDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {ContextDev::Models::WebExtractFontsParams} for more details. # @@ -39,6 +48,8 @@ class WebExtractFontsParams < ContextDev::Internal::Type::BaseModel # # @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai # + # @param max_age_ms [Integer] Maximum age in milliseconds for cached data before the API performs a hard refre + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/context_dev/models/web_extract_styleguide_params.rb b/lib/context_dev/models/web_extract_styleguide_params.rb index d11adaed..cd561c45 100644 --- a/lib/context_dev/models/web_extract_styleguide_params.rb +++ b/lib/context_dev/models/web_extract_styleguide_params.rb @@ -24,6 +24,15 @@ class WebExtractStyleguideParams < ContextDev::Internal::Type::BaseModel # @return [String, nil] optional :domain, String + # @!attribute max_age_ms + # Maximum age in milliseconds for cached data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + # + # @return [Integer, nil] + optional :max_age_ms, Integer + # @!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 @@ -32,7 +41,7 @@ class WebExtractStyleguideParams < ContextDev::Internal::Type::BaseModel # @return [Integer, nil] optional :timeout_ms, Integer - # @!method initialize(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {}) + # @!method initialize(direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {ContextDev::Models::WebExtractStyleguideParams} for more details. # @@ -40,6 +49,8 @@ class WebExtractStyleguideParams < ContextDev::Internal::Type::BaseModel # # @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The # + # @param max_age_ms [Integer] Maximum age in milliseconds for cached data before the API performs a hard refre + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/context_dev/resources/web.rb b/lib/context_dev/resources/web.rb index caeb93c9..351f4349 100644 --- a/lib/context_dev/resources/web.rb +++ b/lib/context_dev/resources/web.rb @@ -9,12 +9,14 @@ class Web # Scrape font information from a website including font families, usage # statistics, fallbacks, and element/word counts. # - # @overload extract_fonts(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {}) + # @overload extract_fonts(direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {}) # # @param direct_url [String] A specific URL to fetch fonts from directly, bypassing domain resolution (e.g., # # @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai # + # @param max_age_ms [Integer] Maximum age in milliseconds for cached data before the API performs a hard refre + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil] @@ -28,7 +30,11 @@ def extract_fonts(params = {}) @client.request( method: :get, path: "web/fonts", - query: query.transform_keys(direct_url: "directUrl", timeout_ms: "timeoutMS"), + query: query.transform_keys( + direct_url: "directUrl", + max_age_ms: "maxAgeMs", + timeout_ms: "timeoutMS" + ), model: ContextDev::Models::WebExtractFontsResponse, options: options ) @@ -40,12 +46,14 @@ def extract_fonts(params = {}) # Extract a comprehensive design system from a website including colors, # typography, spacing, shadows, and UI components. # - # @overload extract_styleguide(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {}) + # @overload extract_styleguide(direct_url: nil, domain: nil, max_age_ms: 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 # + # @param max_age_ms [Integer] Maximum age in milliseconds for cached data before the API performs a hard refre + # # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th # # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil] @@ -59,7 +67,11 @@ def extract_styleguide(params = {}) @client.request( method: :get, path: "web/styleguide", - query: query.transform_keys(direct_url: "directUrl", timeout_ms: "timeoutMS"), + query: query.transform_keys( + direct_url: "directUrl", + max_age_ms: "maxAgeMs", + timeout_ms: "timeoutMS" + ), model: ContextDev::Models::WebExtractStyleguideResponse, options: options ) diff --git a/lib/context_dev/version.rb b/lib/context_dev/version.rb index f56b8a7d..1947f293 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.23.0" + VERSION = "1.24.0" end diff --git a/rbi/context_dev/models/web_extract_fonts_params.rbi b/rbi/context_dev/models/web_extract_fonts_params.rbi index 7817e2d5..f606a601 100644 --- a/rbi/context_dev/models/web_extract_fonts_params.rbi +++ b/rbi/context_dev/models/web_extract_fonts_params.rbi @@ -32,6 +32,16 @@ module ContextDev sig { params(domain: String).void } attr_writer :domain + # Maximum age in milliseconds for cached data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + 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. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -45,6 +55,7 @@ module ContextDev params( direct_url: String, domain: String, + max_age_ms: Integer, timeout_ms: Integer, request_options: ContextDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -58,6 +69,11 @@ module ContextDev # domain will be automatically normalized and validated. You must provide either # 'domain' or 'directUrl', but not both. domain: nil, + # Maximum age in milliseconds for cached data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: 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). @@ -71,6 +87,7 @@ module ContextDev { direct_url: String, domain: String, + max_age_ms: Integer, timeout_ms: Integer, request_options: ContextDev::RequestOptions } diff --git a/rbi/context_dev/models/web_extract_styleguide_params.rbi b/rbi/context_dev/models/web_extract_styleguide_params.rbi index d704be66..7e9c3bf4 100644 --- a/rbi/context_dev/models/web_extract_styleguide_params.rbi +++ b/rbi/context_dev/models/web_extract_styleguide_params.rbi @@ -33,6 +33,16 @@ module ContextDev sig { params(domain: String).void } attr_writer :domain + # Maximum age in milliseconds for cached data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + 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. If the request takes longer # than this value, it will be aborted with a 408 status code. Maximum allowed # value is 300000ms (5 minutes). @@ -46,6 +56,7 @@ module ContextDev params( direct_url: String, domain: String, + max_age_ms: Integer, timeout_ms: Integer, request_options: ContextDev::RequestOptions::OrHash ).returns(T.attached_class) @@ -60,6 +71,11 @@ module ContextDev # domain will be automatically normalized and validated. You must provide either # 'domain' or 'directUrl', but not both. domain: nil, + # Maximum age in milliseconds for cached data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: 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). @@ -73,6 +89,7 @@ module ContextDev { direct_url: String, domain: String, + max_age_ms: Integer, timeout_ms: Integer, request_options: ContextDev::RequestOptions } diff --git a/rbi/context_dev/resources/web.rbi b/rbi/context_dev/resources/web.rbi index d1526b75..c56745b9 100644 --- a/rbi/context_dev/resources/web.rbi +++ b/rbi/context_dev/resources/web.rbi @@ -9,6 +9,7 @@ module ContextDev params( direct_url: String, domain: String, + max_age_ms: Integer, timeout_ms: Integer, request_options: ContextDev::RequestOptions::OrHash ).returns(ContextDev::Models::WebExtractFontsResponse) @@ -22,6 +23,11 @@ module ContextDev # domain will be automatically normalized and validated. You must provide either # 'domain' or 'directUrl', but not both. domain: nil, + # Maximum age in milliseconds for cached data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: 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). @@ -36,6 +42,7 @@ module ContextDev params( direct_url: String, domain: String, + max_age_ms: Integer, timeout_ms: Integer, request_options: ContextDev::RequestOptions::OrHash ).returns(ContextDev::Models::WebExtractStyleguideResponse) @@ -50,6 +57,11 @@ module ContextDev # domain will be automatically normalized and validated. You must provide either # 'domain' or 'directUrl', but not both. domain: nil, + # Maximum age in milliseconds for cached data before the API performs a hard + # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms) + # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1 + # year. + max_age_ms: 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). diff --git a/sig/context_dev/models/web_extract_fonts_params.rbs b/sig/context_dev/models/web_extract_fonts_params.rbs index f16167a2..7101e5cb 100644 --- a/sig/context_dev/models/web_extract_fonts_params.rbs +++ b/sig/context_dev/models/web_extract_fonts_params.rbs @@ -1,7 +1,12 @@ module ContextDev module Models type web_extract_fonts_params = - { direct_url: String, domain: String, timeout_ms: Integer } + { + direct_url: String, + domain: String, + max_age_ms: Integer, + timeout_ms: Integer + } & ContextDev::Internal::Type::request_parameters class WebExtractFontsParams < ContextDev::Internal::Type::BaseModel @@ -16,6 +21,10 @@ module ContextDev def domain=: (String) -> String + attr_reader max_age_ms: Integer? + + def max_age_ms=: (Integer) -> Integer + attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer @@ -23,6 +32,7 @@ module ContextDev def initialize: ( ?direct_url: String, ?domain: String, + ?max_age_ms: Integer, ?timeout_ms: Integer, ?request_options: ContextDev::request_opts ) -> void @@ -30,6 +40,7 @@ module ContextDev def to_hash: -> { direct_url: String, domain: String, + max_age_ms: Integer, timeout_ms: Integer, request_options: ContextDev::RequestOptions } diff --git a/sig/context_dev/models/web_extract_styleguide_params.rbs b/sig/context_dev/models/web_extract_styleguide_params.rbs index d8fbc143..fe7ed993 100644 --- a/sig/context_dev/models/web_extract_styleguide_params.rbs +++ b/sig/context_dev/models/web_extract_styleguide_params.rbs @@ -1,7 +1,12 @@ module ContextDev module Models type web_extract_styleguide_params = - { direct_url: String, domain: String, timeout_ms: Integer } + { + direct_url: String, + domain: String, + max_age_ms: Integer, + timeout_ms: Integer + } & ContextDev::Internal::Type::request_parameters class WebExtractStyleguideParams < ContextDev::Internal::Type::BaseModel @@ -16,6 +21,10 @@ module ContextDev def domain=: (String) -> String + attr_reader max_age_ms: Integer? + + def max_age_ms=: (Integer) -> Integer + attr_reader timeout_ms: Integer? def timeout_ms=: (Integer) -> Integer @@ -23,6 +32,7 @@ module ContextDev def initialize: ( ?direct_url: String, ?domain: String, + ?max_age_ms: Integer, ?timeout_ms: Integer, ?request_options: ContextDev::request_opts ) -> void @@ -30,6 +40,7 @@ module ContextDev def to_hash: -> { direct_url: String, domain: String, + max_age_ms: Integer, timeout_ms: Integer, request_options: ContextDev::RequestOptions } diff --git a/sig/context_dev/resources/web.rbs b/sig/context_dev/resources/web.rbs index 66a40765..5eeac331 100644 --- a/sig/context_dev/resources/web.rbs +++ b/sig/context_dev/resources/web.rbs @@ -4,6 +4,7 @@ module ContextDev def extract_fonts: ( ?direct_url: String, ?domain: String, + ?max_age_ms: Integer, ?timeout_ms: Integer, ?request_options: ContextDev::request_opts ) -> ContextDev::Models::WebExtractFontsResponse @@ -11,6 +12,7 @@ module ContextDev def extract_styleguide: ( ?direct_url: String, ?domain: String, + ?max_age_ms: Integer, ?timeout_ms: Integer, ?request_options: ContextDev::request_opts ) -> ContextDev::Models::WebExtractStyleguideResponse