diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 21f60560..e6c39adb 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.10.0" + ".": "2.11.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 4b9b1cb6..9673209d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 41 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-5dbe631ce516ca688273053ddcb58870561bd6dc76fa75df354c954d7af65a3c.yml -openapi_spec_hash: 53a74c4cccbdec8590db38183840a446 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-b0c72d2fe5911c9ce155275b954198bf2152e915a7e5b9f719aad50e222b9ef8.yml +openapi_spec_hash: 5cf943ea5718059b7975417b012cee28 config_hash: 0fb0ceca5946298c416cec0cca5260c7 diff --git a/CHANGELOG.md b/CHANGELOG.md index 90d61047..46da4ad4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 2.11.0 (2026-08-18) + +Full Changelog: [v2.10.0...v2.11.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.10.0...v2.11.0) + +### Features + +* **api:** api update ([9bff49f](https://github.com/context-dot-dev/context-ruby-sdk/commit/9bff49f9a966fd40691f2cd7a41ba96ec7679243)) +* **api:** api update ([5b19e0c](https://github.com/context-dot-dev/context-ruby-sdk/commit/5b19e0ce1f7ad615a92e28440bec6ab3703ffe02)) +* **api:** api update ([f4ccf22](https://github.com/context-dot-dev/context-ruby-sdk/commit/f4ccf220f130672950d3231a6b9952c166168ef9)) + ## 2.10.0 (2026-08-17) Full Changelog: [v2.9.0...v2.10.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.9.0...v2.10.0) diff --git a/Gemfile.lock b/Gemfile.lock index 972db589..c19d1c76 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - context.dev (2.10.0) + context.dev (2.11.0) cgi connection_pool diff --git a/README.md b/README.md index c99d02dc..3c7187c4 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", "~> 2.10.0" +gem "context.dev", "~> 2.11.0" ``` diff --git a/lib/context_dev/models/brand_retrieve_response.rb b/lib/context_dev/models/brand_retrieve_response.rb index af515059..44dd5e63 100644 --- a/lib/context_dev/models/brand_retrieve_response.rb +++ b/lib/context_dev/models/brand_retrieve_response.rb @@ -344,10 +344,38 @@ class Color < ContextDev::Internal::Type::BaseModel # @return [String, nil] optional :name, String - # @!method initialize(hex: nil, name: nil) + # @!attribute source + # Where the color was observed: 'site' colors come from the website's own theme + # signals (rendered page colors, manifest, theme-color meta), 'logo' colors from + # logo image pixels. + # + # @return [Symbol, ContextDev::Models::BrandRetrieveResponse::Brand::Color::Source, nil] + optional :source, enum: -> { ContextDev::Models::BrandRetrieveResponse::Brand::Color::Source } + + # @!method initialize(hex: nil, name: nil, source: nil) + # Some parameter documentations has been truncated, see + # {ContextDev::Models::BrandRetrieveResponse::Brand::Color} for more details. + # # @param hex [String] Color in hexadecimal format # # @param name [String] Name of the color + # + # @param source [Symbol, ContextDev::Models::BrandRetrieveResponse::Brand::Color::Source] Where the color was observed: 'site' colors come from the website's own theme si + + # Where the color was observed: 'site' colors come from the website's own theme + # signals (rendered page colors, manifest, theme-color meta), 'logo' colors from + # logo image pixels. + # + # @see ContextDev::Models::BrandRetrieveResponse::Brand::Color#source + module Source + extend ContextDev::Internal::Type::Enum + + SITE = :site + LOGO = :logo + + # @!method self.values + # @return [Array] + end end # @see ContextDev::Models::BrandRetrieveResponse::Brand#employees diff --git a/lib/context_dev/models/brand_retrieve_simplified_response.rb b/lib/context_dev/models/brand_retrieve_simplified_response.rb index afd7e0fc..b42dde6e 100644 --- a/lib/context_dev/models/brand_retrieve_simplified_response.rb +++ b/lib/context_dev/models/brand_retrieve_simplified_response.rb @@ -180,10 +180,39 @@ class Color < ContextDev::Internal::Type::BaseModel # @return [String, nil] optional :name, String - # @!method initialize(hex: nil, name: nil) + # @!attribute source + # Where the color was observed: 'site' colors come from the website's own theme + # signals (rendered page colors, manifest, theme-color meta), 'logo' colors from + # logo image pixels. + # + # @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source, nil] + optional :source, enum: -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source } + + # @!method initialize(hex: nil, name: nil, source: nil) + # Some parameter documentations has been truncated, see + # {ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color} for more + # details. + # # @param hex [String] Color in hexadecimal format # # @param name [String] Name of the color + # + # @param source [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source] Where the color was observed: 'site' colors come from the website's own theme si + + # Where the color was observed: 'site' colors come from the website's own theme + # signals (rendered page colors, manifest, theme-color meta), 'logo' colors from + # logo image pixels. + # + # @see ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color#source + module Source + extend ContextDev::Internal::Type::Enum + + SITE = :site + LOGO = :logo + + # @!method self.values + # @return [Array] + end end class Logo < ContextDev::Internal::Type::BaseModel diff --git a/lib/context_dev/models/news_search_response.rb b/lib/context_dev/models/news_search_response.rb index 0c4ee02b..3edb5668 100644 --- a/lib/context_dev/models/news_search_response.rb +++ b/lib/context_dev/models/news_search_response.rb @@ -5,21 +5,26 @@ module Models # @see ContextDev::Resources::News#search class NewsSearchResponse < ContextDev::Internal::Type::BaseModel # @!attribute data + # Articles matching the search, in the requested order. # # @return [Array] required :data, -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::NewsSearchResponse::Data] } # @!attribute has_more + # True when more results are available beyond this page. # # @return [Boolean] required :has_more, ContextDev::Internal::Type::Boolean # @!attribute meta + # Summary information about this response. # # @return [ContextDev::Models::NewsSearchResponse::Meta] required :meta, -> { ContextDev::Models::NewsSearchResponse::Meta } # @!attribute next_cursor + # Pass as cursor in the next request to fetch the following page. Null when there + # are no more results. # # @return [String, nil] required :next_cursor, String, nil?: true @@ -35,119 +40,150 @@ class NewsSearchResponse < ContextDev::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {ContextDev::Models::NewsSearchResponse} for more details. # - # @param data [Array] + # @param data [Array] Articles matching the search, in the requested order. # - # @param has_more [Boolean] + # @param has_more [Boolean] True when more results are available beyond this page. # - # @param meta [ContextDev::Models::NewsSearchResponse::Meta] + # @param meta [ContextDev::Models::NewsSearchResponse::Meta] Summary information about this response. # - # @param next_cursor [String, nil] + # @param next_cursor [String, nil] Pass as cursor in the next request to fetch the following page. Null when there # # @param key_metadata [ContextDev::Models::NewsSearchResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when class Data < ContextDev::Internal::Type::BaseModel # @!attribute id + # Stable unique identifier for this article. Use it to deduplicate or reference an + # article across requests. # # @return [String] required :id, String # @!attribute authors + # Bylined authors. Empty when no byline is available. # # @return [Array] required :authors, ContextDev::Internal::Type::ArrayOf[String] # @!attribute description + # Short summary or excerpt of the article, when the publisher provides one. # # @return [String, nil] required :description, String, nil?: true # @!attribute image_url + # Lead image for the article, when one is available. # # @return [String, nil] required :image_url, String, nil?: true # @!attribute language + # Language the article is written in, as a lowercase ISO 639-1 code such as en. + # Null when unknown. # # @return [String, nil] required :language, String, nil?: true # @!attribute match + # How the article relates to the company you searched for. # # @return [ContextDev::Models::NewsSearchResponse::Data::Match] required :match, -> { ContextDev::Models::NewsSearchResponse::Data::Match } # @!attribute published_at + # When the article was published, as an ISO 8601 timestamp. Null when the + # publisher does not state a reliable date. # # @return [Time, nil] required :published_at, Time, nil?: true # @!attribute source + # The publication that published the article. # # @return [ContextDev::Models::NewsSearchResponse::Data::Source] required :source, -> { ContextDev::Models::NewsSearchResponse::Data::Source } # @!attribute story_id - # Groups matching normalized headlines published on the same UTC day. + # Shared by articles covering the same story on the same day. Use it to group or + # collapse syndicated copies of one announcement across outlets. # # @return [String] required :story_id, String # @!attribute title + # Article headline. # # @return [String] required :title, String # @!attribute type + # Kind of coverage. Use it to separate independent reporting (editorial) from + # company-issued content (press_release, regulatory_filing, advisory). # # @return [Symbol, ContextDev::Models::NewsSearchResponse::Data::Type] required :type, enum: -> { ContextDev::Models::NewsSearchResponse::Data::Type } # @!attribute url + # Link to the article on the publisher site. # # @return [String] required :url, String # @!method initialize(id:, authors:, description:, image_url:, language:, match:, published_at:, source:, story_id:, title:, type:, url:) - # @param id [String] + # Some parameter documentations has been truncated, see + # {ContextDev::Models::NewsSearchResponse::Data} for more details. # - # @param authors [Array] + # @param id [String] Stable unique identifier for this article. Use it to deduplicate or reference an # - # @param description [String, nil] + # @param authors [Array] Bylined authors. Empty when no byline is available. # - # @param image_url [String, nil] + # @param description [String, nil] Short summary or excerpt of the article, when the publisher provides one. # - # @param language [String, nil] + # @param image_url [String, nil] Lead image for the article, when one is available. # - # @param match [ContextDev::Models::NewsSearchResponse::Data::Match] + # @param language [String, nil] Language the article is written in, as a lowercase ISO 639-1 code such as en. Nu # - # @param published_at [Time, nil] + # @param match [ContextDev::Models::NewsSearchResponse::Data::Match] How the article relates to the company you searched for. # - # @param source [ContextDev::Models::NewsSearchResponse::Data::Source] + # @param published_at [Time, nil] When the article was published, as an ISO 8601 timestamp. Null when the publishe # - # @param story_id [String] Groups matching normalized headlines published on the same UTC day. + # @param source [ContextDev::Models::NewsSearchResponse::Data::Source] The publication that published the article. # - # @param title [String] + # @param story_id [String] Shared by articles covering the same story on the same day. Use it to group or c # - # @param type [Symbol, ContextDev::Models::NewsSearchResponse::Data::Type] + # @param title [String] Article headline. # - # @param url [String] + # @param type [Symbol, ContextDev::Models::NewsSearchResponse::Data::Type] Kind of coverage. Use it to separate independent reporting (editorial) from comp + # + # @param url [String] Link to the article on the publisher site. # @see ContextDev::Models::NewsSearchResponse::Data#match class Match < ContextDev::Internal::Type::BaseModel # @!attribute confidence + # How confident the match is, from 0 to 1. Null when a score is unavailable. # # @return [Float, nil] required :confidence, Float, nil?: true # @!attribute level + # primary when the article is mainly about the company, secondary when the company + # is mentioned but is not the main subject. # # @return [Symbol, ContextDev::Models::NewsSearchResponse::Data::Match::Level] required :level, enum: -> { ContextDev::Models::NewsSearchResponse::Data::Match::Level } # @!method initialize(confidence:, level:) - # @param confidence [Float, nil] - # @param level [Symbol, ContextDev::Models::NewsSearchResponse::Data::Match::Level] + # Some parameter documentations has been truncated, see + # {ContextDev::Models::NewsSearchResponse::Data::Match} for more details. + # + # How the article relates to the company you searched for. + # + # @param confidence [Float, nil] How confident the match is, from 0 to 1. Null when a score is unavailable. + # + # @param level [Symbol, ContextDev::Models::NewsSearchResponse::Data::Match::Level] primary when the article is mainly about the company, secondary when the company + # primary when the article is mainly about the company, secondary when the company + # is mentioned but is not the main subject. + # # @see ContextDev::Models::NewsSearchResponse::Data::Match#level module Level extend ContextDev::Internal::Type::Enum @@ -169,23 +205,30 @@ class Source < ContextDev::Internal::Type::BaseModel required :direct, ContextDev::Internal::Type::Boolean # @!attribute domain + # Website domain of the publication. # # @return [String] required :domain, String # @!attribute name + # Name of the publication, such as Reuters. # # @return [String] required :name, String # @!method initialize(direct:, domain:, name:) + # The publication that published the article. + # # @param direct [Boolean] True when Context observed this article in the publisher-owned feed. # - # @param domain [String] + # @param domain [String] Website domain of the publication. # - # @param name [String] + # @param name [String] Name of the publication, such as Reuters. end + # Kind of coverage. Use it to separate independent reporting (editorial) from + # company-issued content (press_release, regulatory_filing, advisory). + # # @see ContextDev::Models::NewsSearchResponse::Data#type module Type extend ContextDev::Internal::Type::Enum @@ -203,12 +246,15 @@ module Type # @see ContextDev::Models::NewsSearchResponse#meta class Meta < ContextDev::Internal::Type::BaseModel # @!attribute count + # Number of articles in this page. # # @return [Integer] required :count, Integer # @!method initialize(count:) - # @param count [Integer] + # Summary information about this response. + # + # @param count [Integer] Number of articles in this page. end # @see ContextDev::Models::NewsSearchResponse#key_metadata diff --git a/lib/context_dev/models/web_screenshot_params.rb b/lib/context_dev/models/web_screenshot_params.rb index 1f9ac021..42f57b73 100644 --- a/lib/context_dev/models/web_screenshot_params.rb +++ b/lib/context_dev/models/web_screenshot_params.rb @@ -7,6 +7,16 @@ class WebScreenshotParams < ContextDev::Internal::Type::BaseModel extend ContextDev::Internal::Type::RequestParameters::Converter include ContextDev::Internal::Type::RequestParameters + # @!attribute clear_popups + # Optional parameter for comprehensive popup cleanup. If 'true', the browser + # dismisses detected cookie/consent UI and clears other detected obstructive + # popups and overlays before capture. If 'false' or not provided, this parameter + # requests no cleanup; handleCookiePopup can still request cookie/consent handling + # independently. + # + # @return [Boolean, nil] + optional :clear_popups, ContextDev::Internal::Type::Boolean + # @!attribute color_scheme # Optional parameter to choose the site's visual theme in the screenshot. Use # 'light' or 'dark' when the site offers both appearances. @@ -121,10 +131,12 @@ class WebScreenshotParams < ContextDev::Internal::Type::BaseModel # @return [Symbol, ContextDev::Models::WebScreenshotParams::Zdr, nil] optional :zdr, enum: -> { ContextDev::WebScreenshotParams::Zdr } - # @!method initialize(color_scheme: nil, country: nil, direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, tags: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, zdr: nil, request_options: {}) + # @!method initialize(clear_popups: nil, color_scheme: nil, country: nil, direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, tags: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, zdr: nil, request_options: {}) # Some parameter documentations has been truncated, see # {ContextDev::Models::WebScreenshotParams} for more details. # + # @param clear_popups [Boolean] Optional parameter for comprehensive popup cleanup. If 'true', the browser dismi + # # @param color_scheme [Symbol, ContextDev::Models::WebScreenshotParams::ColorScheme] Optional parameter to choose the site's visual theme in the screenshot. Use 'lig # # @param country [Symbol, ContextDev::Models::WebScreenshotParams::Country] Fetch the target page through a residential proxy in this country (ISO 3166-1 al diff --git a/lib/context_dev/resources/web.rb b/lib/context_dev/resources/web.rb index eb811ba7..625244a6 100644 --- a/lib/context_dev/resources/web.rb +++ b/lib/context_dev/resources/web.rb @@ -176,7 +176,9 @@ def extract_styleguide(params = {}) # # Capture a screenshot of a website. # - # @overload screenshot(color_scheme: nil, country: nil, direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, tags: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, zdr: nil, request_options: {}) + # @overload screenshot(clear_popups: nil, color_scheme: nil, country: nil, direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, tags: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, zdr: nil, request_options: {}) + # + # @param clear_popups [Boolean] Optional parameter for comprehensive popup cleanup. If 'true', the browser dismi # # @param color_scheme [Symbol, ContextDev::Models::WebScreenshotParams::ColorScheme] Optional parameter to choose the site's visual theme in the screenshot. Use 'lig # @@ -218,6 +220,7 @@ def screenshot(params = {}) method: :get, path: "web/screenshot", query: query.transform_keys( + clear_popups: "clearPopups", color_scheme: "colorScheme", direct_url: "directUrl", full_screenshot: "fullScreenshot", diff --git a/lib/context_dev/version.rb b/lib/context_dev/version.rb index bb2a6730..279b966c 100644 --- a/lib/context_dev/version.rb +++ b/lib/context_dev/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ContextDev - VERSION = "2.10.0" + VERSION = "2.11.0" end diff --git a/rbi/context_dev/models/brand_retrieve_response.rbi b/rbi/context_dev/models/brand_retrieve_response.rbi index 306d3b44..f91ea189 100644 --- a/rbi/context_dev/models/brand_retrieve_response.rbi +++ b/rbi/context_dev/models/brand_retrieve_response.rbi @@ -767,18 +767,95 @@ module ContextDev sig { params(name: String).void } attr_writer :name - sig { params(hex: String, name: String).returns(T.attached_class) } + # Where the color was observed: 'site' colors come from the website's own theme + # signals (rendered page colors, manifest, theme-color meta), 'logo' colors from + # logo image pixels. + sig do + returns( + T.nilable( + ContextDev::Models::BrandRetrieveResponse::Brand::Color::Source::TaggedSymbol + ) + ) + end + attr_reader :source + + sig do + params( + source: + ContextDev::Models::BrandRetrieveResponse::Brand::Color::Source::OrSymbol + ).void + end + attr_writer :source + + sig do + params( + hex: String, + name: String, + source: + ContextDev::Models::BrandRetrieveResponse::Brand::Color::Source::OrSymbol + ).returns(T.attached_class) + end def self.new( # Color in hexadecimal format hex: nil, # Name of the color - name: nil + name: nil, + # Where the color was observed: 'site' colors come from the website's own theme + # signals (rendered page colors, manifest, theme-color meta), 'logo' colors from + # logo image pixels. + source: nil ) end - sig { override.returns({ hex: String, name: String }) } + sig do + override.returns( + { + hex: String, + name: String, + source: + ContextDev::Models::BrandRetrieveResponse::Brand::Color::Source::TaggedSymbol + } + ) + end def to_hash end + + # Where the color was observed: 'site' colors come from the website's own theme + # signals (rendered page colors, manifest, theme-color meta), 'logo' colors from + # logo image pixels. + module Source + extend ContextDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + ContextDev::Models::BrandRetrieveResponse::Brand::Color::Source + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SITE = + T.let( + :site, + ContextDev::Models::BrandRetrieveResponse::Brand::Color::Source::TaggedSymbol + ) + LOGO = + T.let( + :logo, + ContextDev::Models::BrandRetrieveResponse::Brand::Color::Source::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + ContextDev::Models::BrandRetrieveResponse::Brand::Color::Source::TaggedSymbol + ] + ) + end + def self.values + end + end end class Employees < ContextDev::Internal::Type::BaseModel diff --git a/rbi/context_dev/models/brand_retrieve_simplified_response.rbi b/rbi/context_dev/models/brand_retrieve_simplified_response.rbi index 50fb35d5..da89c784 100644 --- a/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +++ b/rbi/context_dev/models/brand_retrieve_simplified_response.rbi @@ -453,18 +453,95 @@ module ContextDev sig { params(name: String).void } attr_writer :name - sig { params(hex: String, name: String).returns(T.attached_class) } + # Where the color was observed: 'site' colors come from the website's own theme + # signals (rendered page colors, manifest, theme-color meta), 'logo' colors from + # logo image pixels. + sig do + returns( + T.nilable( + ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source::TaggedSymbol + ) + ) + end + attr_reader :source + + sig do + params( + source: + ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source::OrSymbol + ).void + end + attr_writer :source + + sig do + params( + hex: String, + name: String, + source: + ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source::OrSymbol + ).returns(T.attached_class) + end def self.new( # Color in hexadecimal format hex: nil, # Name of the color - name: nil + name: nil, + # Where the color was observed: 'site' colors come from the website's own theme + # signals (rendered page colors, manifest, theme-color meta), 'logo' colors from + # logo image pixels. + source: nil ) end - sig { override.returns({ hex: String, name: String }) } + sig do + override.returns( + { + hex: String, + name: String, + source: + ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source::TaggedSymbol + } + ) + end def to_hash end + + # Where the color was observed: 'site' colors come from the website's own theme + # signals (rendered page colors, manifest, theme-color meta), 'logo' colors from + # logo image pixels. + module Source + extend ContextDev::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SITE = + T.let( + :site, + ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source::TaggedSymbol + ) + LOGO = + T.let( + :logo, + ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::Source::TaggedSymbol + ] + ) + end + def self.values + end + end end class Logo < ContextDev::Internal::Type::BaseModel diff --git a/rbi/context_dev/models/news_search_response.rbi b/rbi/context_dev/models/news_search_response.rbi index 76051bbf..fd1ec510 100644 --- a/rbi/context_dev/models/news_search_response.rbi +++ b/rbi/context_dev/models/news_search_response.rbi @@ -11,12 +11,15 @@ module ContextDev ) end + # Articles matching the search, in the requested order. sig { returns(T::Array[ContextDev::Models::NewsSearchResponse::Data]) } attr_accessor :data + # True when more results are available beyond this page. sig { returns(T::Boolean) } attr_accessor :has_more + # Summary information about this response. sig { returns(ContextDev::Models::NewsSearchResponse::Meta) } attr_reader :meta @@ -25,6 +28,8 @@ module ContextDev end attr_writer :meta + # Pass as cursor in the next request to fetch the following page. Null when there + # are no more results. sig { returns(T.nilable(String)) } attr_accessor :next_cursor @@ -54,9 +59,14 @@ module ContextDev ).returns(T.attached_class) end def self.new( + # Articles matching the search, in the requested order. data:, + # True when more results are available beyond this page. has_more:, + # Summary information about this response. meta:, + # Pass as cursor in the next request to fetch the following page. Null when there + # are no more results. next_cursor:, # Metadata about the API key used for the request. Included in every response # whenever a valid API key is provided, even when the response status is not 200. @@ -87,21 +97,29 @@ module ContextDev ) end + # Stable unique identifier for this article. Use it to deduplicate or reference an + # article across requests. sig { returns(String) } attr_accessor :id + # Bylined authors. Empty when no byline is available. sig { returns(T::Array[String]) } attr_accessor :authors + # Short summary or excerpt of the article, when the publisher provides one. sig { returns(T.nilable(String)) } attr_accessor :description + # Lead image for the article, when one is available. sig { returns(T.nilable(String)) } attr_accessor :image_url + # Language the article is written in, as a lowercase ISO 639-1 code such as en. + # Null when unknown. sig { returns(T.nilable(String)) } attr_accessor :language + # How the article relates to the company you searched for. sig { returns(ContextDev::Models::NewsSearchResponse::Data::Match) } attr_reader :match @@ -112,9 +130,12 @@ module ContextDev end attr_writer :match + # When the article was published, as an ISO 8601 timestamp. Null when the + # publisher does not state a reliable date. sig { returns(T.nilable(Time)) } attr_accessor :published_at + # The publication that published the article. sig { returns(ContextDev::Models::NewsSearchResponse::Data::Source) } attr_reader :source @@ -125,13 +146,17 @@ module ContextDev end attr_writer :source - # Groups matching normalized headlines published on the same UTC day. + # Shared by articles covering the same story on the same day. Use it to group or + # collapse syndicated copies of one announcement across outlets. sig { returns(String) } attr_accessor :story_id + # Article headline. sig { returns(String) } attr_accessor :title + # Kind of coverage. Use it to separate independent reporting (editorial) from + # company-issued content (press_release, regulatory_filing, advisory). sig do returns( ContextDev::Models::NewsSearchResponse::Data::Type::TaggedSymbol @@ -139,6 +164,7 @@ module ContextDev end attr_accessor :type + # Link to the article on the publisher site. sig { returns(String) } attr_accessor :url @@ -160,18 +186,34 @@ module ContextDev ).returns(T.attached_class) end def self.new( + # Stable unique identifier for this article. Use it to deduplicate or reference an + # article across requests. id:, + # Bylined authors. Empty when no byline is available. authors:, + # Short summary or excerpt of the article, when the publisher provides one. description:, + # Lead image for the article, when one is available. image_url:, + # Language the article is written in, as a lowercase ISO 639-1 code such as en. + # Null when unknown. language:, + # How the article relates to the company you searched for. match:, + # When the article was published, as an ISO 8601 timestamp. Null when the + # publisher does not state a reliable date. published_at:, + # The publication that published the article. source:, - # Groups matching normalized headlines published on the same UTC day. + # Shared by articles covering the same story on the same day. Use it to group or + # collapse syndicated copies of one announcement across outlets. story_id:, + # Article headline. title:, + # Kind of coverage. Use it to separate independent reporting (editorial) from + # company-issued content (press_release, regulatory_filing, advisory). type:, + # Link to the article on the publisher site. url: ) end @@ -207,9 +249,12 @@ module ContextDev ) end + # How confident the match is, from 0 to 1. Null when a score is unavailable. sig { returns(T.nilable(Float)) } attr_accessor :confidence + # primary when the article is mainly about the company, secondary when the company + # is mentioned but is not the main subject. sig do returns( ContextDev::Models::NewsSearchResponse::Data::Match::Level::TaggedSymbol @@ -217,6 +262,7 @@ module ContextDev end attr_accessor :level + # How the article relates to the company you searched for. sig do params( confidence: T.nilable(Float), @@ -224,7 +270,13 @@ module ContextDev ContextDev::Models::NewsSearchResponse::Data::Match::Level::OrSymbol ).returns(T.attached_class) end - def self.new(confidence:, level:) + def self.new( + # How confident the match is, from 0 to 1. Null when a score is unavailable. + confidence:, + # primary when the article is mainly about the company, secondary when the company + # is mentioned but is not the main subject. + level: + ) end sig do @@ -239,6 +291,8 @@ module ContextDev def to_hash end + # primary when the article is mainly about the company, secondary when the company + # is mentioned but is not the main subject. module Level extend ContextDev::Internal::Type::Enum @@ -287,12 +341,15 @@ module ContextDev sig { returns(T::Boolean) } attr_accessor :direct + # Website domain of the publication. sig { returns(String) } attr_accessor :domain + # Name of the publication, such as Reuters. sig { returns(String) } attr_accessor :name + # The publication that published the article. sig do params(direct: T::Boolean, domain: String, name: String).returns( T.attached_class @@ -301,7 +358,9 @@ module ContextDev def self.new( # True when Context observed this article in the publisher-owned feed. direct:, + # Website domain of the publication. domain:, + # Name of the publication, such as Reuters. name: ) end @@ -315,6 +374,8 @@ module ContextDev end end + # Kind of coverage. Use it to separate independent reporting (editorial) from + # company-issued content (press_release, regulatory_filing, advisory). module Type extend ContextDev::Internal::Type::Enum @@ -366,11 +427,16 @@ module ContextDev ) end + # Number of articles in this page. sig { returns(Integer) } attr_accessor :count + # Summary information about this response. sig { params(count: Integer).returns(T.attached_class) } - def self.new(count:) + def self.new( + # Number of articles in this page. + count: + ) end sig { override.returns({ count: Integer }) } diff --git a/rbi/context_dev/models/web_screenshot_params.rbi b/rbi/context_dev/models/web_screenshot_params.rbi index 45c117be..8f6b48a0 100644 --- a/rbi/context_dev/models/web_screenshot_params.rbi +++ b/rbi/context_dev/models/web_screenshot_params.rbi @@ -11,6 +11,17 @@ module ContextDev T.any(ContextDev::WebScreenshotParams, ContextDev::Internal::AnyHash) end + # Optional parameter for comprehensive popup cleanup. If 'true', the browser + # dismisses detected cookie/consent UI and clears other detected obstructive + # popups and overlays before capture. If 'false' or not provided, this parameter + # requests no cleanup; handleCookiePopup can still request cookie/consent handling + # independently. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :clear_popups + + sig { params(clear_popups: T::Boolean).void } + attr_writer :clear_popups + # Optional parameter to choose the site's visual theme in the screenshot. Use # 'light' or 'dark' when the site offers both appearances. sig do @@ -157,6 +168,7 @@ module ContextDev sig do params( + clear_popups: T::Boolean, color_scheme: ContextDev::WebScreenshotParams::ColorScheme::OrSymbol, country: ContextDev::WebScreenshotParams::Country::OrSymbol, direct_url: String, @@ -176,6 +188,12 @@ module ContextDev ).returns(T.attached_class) end def self.new( + # Optional parameter for comprehensive popup cleanup. If 'true', the browser + # dismisses detected cookie/consent UI and clears other detected obstructive + # popups and overlays before capture. If 'false' or not provided, this parameter + # requests no cleanup; handleCookiePopup can still request cookie/consent handling + # independently. + clear_popups: nil, # Optional parameter to choose the site's visual theme in the screenshot. Use # 'light' or 'dark' when the site offers both appearances. color_scheme: nil, @@ -241,6 +259,7 @@ module ContextDev sig do override.returns( { + clear_popups: T::Boolean, color_scheme: ContextDev::WebScreenshotParams::ColorScheme::OrSymbol, country: ContextDev::WebScreenshotParams::Country::OrSymbol, diff --git a/rbi/context_dev/resources/web.rbi b/rbi/context_dev/resources/web.rbi index 6c9088a1..b61dd31b 100644 --- a/rbi/context_dev/resources/web.rbi +++ b/rbi/context_dev/resources/web.rbi @@ -190,6 +190,7 @@ module ContextDev # Capture a screenshot of a website. sig do params( + clear_popups: T::Boolean, color_scheme: ContextDev::WebScreenshotParams::ColorScheme::OrSymbol, country: ContextDev::WebScreenshotParams::Country::OrSymbol, direct_url: String, @@ -209,6 +210,12 @@ module ContextDev ).returns(ContextDev::Models::WebScreenshotResponse) end def screenshot( + # Optional parameter for comprehensive popup cleanup. If 'true', the browser + # dismisses detected cookie/consent UI and clears other detected obstructive + # popups and overlays before capture. If 'false' or not provided, this parameter + # requests no cleanup; handleCookiePopup can still request cookie/consent handling + # independently. + clear_popups: nil, # Optional parameter to choose the site's visual theme in the screenshot. Use # 'light' or 'dark' when the site offers both appearances. color_scheme: nil, diff --git a/sig/context_dev/models/brand_retrieve_response.rbs b/sig/context_dev/models/brand_retrieve_response.rbs index 29e033d3..18080690 100644 --- a/sig/context_dev/models/brand_retrieve_response.rbs +++ b/sig/context_dev/models/brand_retrieve_response.rbs @@ -332,7 +332,12 @@ module ContextDev end end - type color = { hex: String, name: String } + type color = + { + hex: String, + name: String, + source: ContextDev::Models::BrandRetrieveResponse::Brand::Color::source + } class Color < ContextDev::Internal::Type::BaseModel attr_reader hex: String? @@ -343,9 +348,34 @@ module ContextDev def name=: (String) -> String - def initialize: (?hex: String, ?name: String) -> void + attr_reader source: ContextDev::Models::BrandRetrieveResponse::Brand::Color::source? + + def source=: ( + ContextDev::Models::BrandRetrieveResponse::Brand::Color::source + ) -> ContextDev::Models::BrandRetrieveResponse::Brand::Color::source + + def initialize: ( + ?hex: String, + ?name: String, + ?source: ContextDev::Models::BrandRetrieveResponse::Brand::Color::source + ) -> void - def to_hash: -> { hex: String, name: String } + def to_hash: -> { + hex: String, + name: String, + source: ContextDev::Models::BrandRetrieveResponse::Brand::Color::source + } + + type source = :site | :logo + + module Source + extend ContextDev::Internal::Type::Enum + + SITE: :site + LOGO: :logo + + def self?.values: -> ::Array[ContextDev::Models::BrandRetrieveResponse::Brand::Color::source] + end end type employees = diff --git a/sig/context_dev/models/brand_retrieve_simplified_response.rbs b/sig/context_dev/models/brand_retrieve_simplified_response.rbs index b97af147..fbae681b 100644 --- a/sig/context_dev/models/brand_retrieve_simplified_response.rbs +++ b/sig/context_dev/models/brand_retrieve_simplified_response.rbs @@ -177,7 +177,12 @@ module ContextDev end end - type color = { hex: String, name: String } + type color = + { + hex: String, + name: String, + source: ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::source + } class Color < ContextDev::Internal::Type::BaseModel attr_reader hex: String? @@ -188,9 +193,34 @@ module ContextDev def name=: (String) -> String - def initialize: (?hex: String, ?name: String) -> void + attr_reader source: ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::source? + + def source=: ( + ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::source + ) -> ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::source + + def initialize: ( + ?hex: String, + ?name: String, + ?source: ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::source + ) -> void - def to_hash: -> { hex: String, name: String } + def to_hash: -> { + hex: String, + name: String, + source: ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::source + } + + type source = :site | :logo + + module Source + extend ContextDev::Internal::Type::Enum + + SITE: :site + LOGO: :logo + + def self?.values: -> ::Array[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color::source] + end end type logo = diff --git a/sig/context_dev/models/web_screenshot_params.rbs b/sig/context_dev/models/web_screenshot_params.rbs index 0a33af7f..de1848d4 100644 --- a/sig/context_dev/models/web_screenshot_params.rbs +++ b/sig/context_dev/models/web_screenshot_params.rbs @@ -2,6 +2,7 @@ module ContextDev module Models type web_screenshot_params = { + clear_popups: bool, color_scheme: ContextDev::Models::WebScreenshotParams::color_scheme, country: ContextDev::Models::WebScreenshotParams::country, direct_url: String, @@ -23,6 +24,10 @@ module ContextDev extend ContextDev::Internal::Type::RequestParameters::Converter include ContextDev::Internal::Type::RequestParameters + attr_reader clear_popups: bool? + + def clear_popups=: (bool) -> bool + attr_reader color_scheme: ContextDev::Models::WebScreenshotParams::color_scheme? def color_scheme=: ( @@ -86,6 +91,7 @@ module ContextDev ) -> ContextDev::Models::WebScreenshotParams::zdr def initialize: ( + ?clear_popups: bool, ?color_scheme: ContextDev::Models::WebScreenshotParams::color_scheme, ?country: ContextDev::Models::WebScreenshotParams::country, ?direct_url: String, @@ -104,6 +110,7 @@ module ContextDev ) -> void def to_hash: -> { + clear_popups: bool, color_scheme: ContextDev::Models::WebScreenshotParams::color_scheme, country: ContextDev::Models::WebScreenshotParams::country, direct_url: String, diff --git a/sig/context_dev/resources/web.rbs b/sig/context_dev/resources/web.rbs index 8500cc1c..40ebce6e 100644 --- a/sig/context_dev/resources/web.rbs +++ b/sig/context_dev/resources/web.rbs @@ -48,6 +48,7 @@ module ContextDev ) -> ContextDev::Models::WebExtractStyleguideResponse def screenshot: ( + ?clear_popups: bool, ?color_scheme: ContextDev::Models::WebScreenshotParams::color_scheme, ?country: ContextDev::Models::WebScreenshotParams::country, ?direct_url: String,