Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.18.0"
".": "1.19.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-f27c9584f74632a8c9603fce7190e3f63275a4ec4030da2a9475efb619618b3f.yml
openapi_spec_hash: 224cb935536a4d999d9683f8c03ea32f
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-e8d4199dcf2a97bcd0858e18db7feb3bb4f5a64c9c2d0ee0105636d28c35227d.yml
openapi_spec_hash: 8e825842065c24f11fd3f51fdd705337
config_hash: ff13935d1231ad44cd3822ffe39904b4
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 1.19.0 (2026-05-11)

Full Changelog: [v1.18.0...v1.19.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.18.0...v1.19.0)

### Features

* **api:** api update ([ab9c393](https://github.com/context-dot-dev/context-ruby-sdk/commit/ab9c3935b669fbe2c7a8ffdd5bff7ea05fc2ae56))
* **api:** api update ([7f8b7b7](https://github.com/context-dot-dev/context-ruby-sdk/commit/7f8b7b7a720f3fdf5364ffaf7c7e55f171b72c0e))

## 1.18.0 (2026-05-10)

Full Changelog: [v1.17.0...v1.18.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.17.0...v1.18.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
context.dev (1.18.0)
context.dev (1.19.0)
cgi
connection_pool

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "context.dev", "~> 1.18.0"
gem "context.dev", "~> 1.19.0"
```

<!-- x-release-please-end -->
Expand Down
25 changes: 24 additions & 1 deletion lib/context_dev/models/web_screenshot_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ class WebScreenshotParams < ContextDev::Internal::Type::BaseModel
# @return [Symbol, ContextDev::Models::WebScreenshotParams::FullScreenshot, nil]
optional :full_screenshot, enum: -> { ContextDev::WebScreenshotParams::FullScreenshot }

# @!attribute handle_cookie_popup
# Optional parameter to control cookie/consent popup handling. If 'true', we
# dismiss cookie banner before capture. If 'false' or not provided, captures the
# page without that step.
#
# @return [Symbol, ContextDev::Models::WebScreenshotParams::HandleCookiePopup, nil]
optional :handle_cookie_popup, enum: -> { ContextDev::WebScreenshotParams::HandleCookiePopup }

# @!attribute max_age_ms
# Return a cached screenshot if a prior screenshot for the same parameters exists
# and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
Expand Down Expand Up @@ -71,7 +79,7 @@ class WebScreenshotParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :wait_for_ms, Integer

# @!method initialize(direct_url: nil, domain: nil, full_screenshot: nil, max_age_ms: nil, page: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, request_options: {})
# @!method initialize(direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebScreenshotParams} for more details.
#
Expand All @@ -81,6 +89,8 @@ class WebScreenshotParams < ContextDev::Internal::Type::BaseModel
#
# @param full_screenshot [Symbol, ContextDev::Models::WebScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc
#
# @param handle_cookie_popup [Symbol, ContextDev::Models::WebScreenshotParams::HandleCookiePopup] Optional parameter to control cookie/consent popup handling. If 'true', we dismi
#
# @param max_age_ms [Integer] Return a cached screenshot if a prior screenshot for the same parameters exists
#
# @param page [Symbol, ContextDev::Models::WebScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy
Expand All @@ -106,6 +116,19 @@ module FullScreenshot
# @return [Array<Symbol>]
end

# Optional parameter to control cookie/consent popup handling. If 'true', we
# dismiss cookie banner before capture. If 'false' or not provided, captures the
# page without that step.
module HandleCookiePopup
extend ContextDev::Internal::Type::Enum

TRUE = :true
FALSE = :false

# @!method self.values
# @return [Array<Symbol>]
end

# Optional parameter to specify which page type to screenshot. If provided, the
# system will scrape the domain's links and use heuristics to find the most
# appropriate URL for the specified page type (30 supported languages). If not
Expand Down
5 changes: 4 additions & 1 deletion lib/context_dev/resources/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,16 @@ def extract_styleguide(params = {})
#
# Capture a screenshot of a website.
#
# @overload screenshot(direct_url: nil, domain: nil, full_screenshot: nil, max_age_ms: nil, page: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, request_options: {})
# @overload screenshot(direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, request_options: {})
#
# @param direct_url [String] A specific URL to screenshot directly, bypassing domain resolution (e.g., 'https
#
# @param domain [String] Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The domai
#
# @param full_screenshot [Symbol, ContextDev::Models::WebScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc
#
# @param handle_cookie_popup [Symbol, ContextDev::Models::WebScreenshotParams::HandleCookiePopup] Optional parameter to control cookie/consent popup handling. If 'true', we dismi
#
# @param max_age_ms [Integer] Return a cached screenshot if a prior screenshot for the same parameters exists
#
# @param page [Symbol, ContextDev::Models::WebScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy
Expand All @@ -102,6 +104,7 @@ def screenshot(params = {})
query: query.transform_keys(
direct_url: "directUrl",
full_screenshot: "fullScreenshot",
handle_cookie_popup: "handleCookiePopup",
max_age_ms: "maxAgeMs",
timeout_ms: "timeoutMS",
wait_for_ms: "waitForMs"
Expand Down
2 changes: 1 addition & 1 deletion lib/context_dev/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ContextDev
VERSION = "1.18.0"
VERSION = "1.19.0"
end
62 changes: 62 additions & 0 deletions rbi/context_dev/models/web_screenshot_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,26 @@ module ContextDev
end
attr_writer :full_screenshot

# Optional parameter to control cookie/consent popup handling. If 'true', we
# dismiss cookie banner before capture. If 'false' or not provided, captures the
# page without that step.
sig do
returns(
T.nilable(
ContextDev::WebScreenshotParams::HandleCookiePopup::OrSymbol
)
)
end
attr_reader :handle_cookie_popup

sig do
params(
handle_cookie_popup:
ContextDev::WebScreenshotParams::HandleCookiePopup::OrSymbol
).void
end
attr_writer :handle_cookie_popup

# Return a cached screenshot if a prior screenshot for the same parameters exists
# and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
Expand Down Expand Up @@ -102,6 +122,8 @@ module ContextDev
domain: String,
full_screenshot:
ContextDev::WebScreenshotParams::FullScreenshot::OrSymbol,
handle_cookie_popup:
ContextDev::WebScreenshotParams::HandleCookiePopup::OrSymbol,
max_age_ms: Integer,
page: ContextDev::WebScreenshotParams::Page::OrSymbol,
timeout_ms: Integer,
Expand All @@ -123,6 +145,10 @@ module ContextDev
# screenshot capturing all content. If 'false' or not provided, takes a viewport
# screenshot (standard browser view).
full_screenshot: nil,
# Optional parameter to control cookie/consent popup handling. If 'true', we
# dismiss cookie banner before capture. If 'false' or not provided, captures the
# page without that step.
handle_cookie_popup: nil,
# Return a cached screenshot if a prior screenshot for the same parameters exists
# and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
Expand Down Expand Up @@ -154,6 +180,8 @@ module ContextDev
domain: String,
full_screenshot:
ContextDev::WebScreenshotParams::FullScreenshot::OrSymbol,
handle_cookie_popup:
ContextDev::WebScreenshotParams::HandleCookiePopup::OrSymbol,
max_age_ms: Integer,
page: ContextDev::WebScreenshotParams::Page::OrSymbol,
timeout_ms: Integer,
Expand Down Expand Up @@ -200,6 +228,40 @@ module ContextDev
end
end

# Optional parameter to control cookie/consent popup handling. If 'true', we
# dismiss cookie banner before capture. If 'false' or not provided, captures the
# page without that step.
module HandleCookiePopup
extend ContextDev::Internal::Type::Enum

TaggedSymbol =
T.type_alias do
T.all(Symbol, ContextDev::WebScreenshotParams::HandleCookiePopup)
end
OrSymbol = T.type_alias { T.any(Symbol, String) }

TRUE =
T.let(
:true,
ContextDev::WebScreenshotParams::HandleCookiePopup::TaggedSymbol
)
FALSE =
T.let(
:false,
ContextDev::WebScreenshotParams::HandleCookiePopup::TaggedSymbol
)

sig do
override.returns(
T::Array[
ContextDev::WebScreenshotParams::HandleCookiePopup::TaggedSymbol
]
)
end
def self.values
end
end

# Optional parameter to specify which page type to screenshot. If provided, the
# system will scrape the domain's links and use heuristics to find the most
# appropriate URL for the specified page type (30 supported languages). If not
Expand Down
6 changes: 6 additions & 0 deletions rbi/context_dev/resources/web.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ module ContextDev
domain: String,
full_screenshot:
ContextDev::WebScreenshotParams::FullScreenshot::OrSymbol,
handle_cookie_popup:
ContextDev::WebScreenshotParams::HandleCookiePopup::OrSymbol,
max_age_ms: Integer,
page: ContextDev::WebScreenshotParams::Page::OrSymbol,
timeout_ms: Integer,
Expand All @@ -86,6 +88,10 @@ module ContextDev
# screenshot capturing all content. If 'false' or not provided, takes a viewport
# screenshot (standard browser view).
full_screenshot: nil,
# Optional parameter to control cookie/consent popup handling. If 'true', we
# dismiss cookie banner before capture. If 'false' or not provided, captures the
# page without that step.
handle_cookie_popup: nil,
# Return a cached screenshot if a prior screenshot for the same parameters exists
# and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
Expand Down
20 changes: 20 additions & 0 deletions sig/context_dev/models/web_screenshot_params.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module ContextDev
direct_url: String,
domain: String,
full_screenshot: ContextDev::Models::WebScreenshotParams::full_screenshot,
handle_cookie_popup: ContextDev::Models::WebScreenshotParams::handle_cookie_popup,
max_age_ms: Integer,
page: ContextDev::Models::WebScreenshotParams::page,
timeout_ms: Integer,
Expand All @@ -31,6 +32,12 @@ module ContextDev
ContextDev::Models::WebScreenshotParams::full_screenshot
) -> ContextDev::Models::WebScreenshotParams::full_screenshot

attr_reader handle_cookie_popup: ContextDev::Models::WebScreenshotParams::handle_cookie_popup?

def handle_cookie_popup=: (
ContextDev::Models::WebScreenshotParams::handle_cookie_popup
) -> ContextDev::Models::WebScreenshotParams::handle_cookie_popup

attr_reader max_age_ms: Integer?

def max_age_ms=: (Integer) -> Integer
Expand Down Expand Up @@ -59,6 +66,7 @@ module ContextDev
?direct_url: String,
?domain: String,
?full_screenshot: ContextDev::Models::WebScreenshotParams::full_screenshot,
?handle_cookie_popup: ContextDev::Models::WebScreenshotParams::handle_cookie_popup,
?max_age_ms: Integer,
?page: ContextDev::Models::WebScreenshotParams::page,
?timeout_ms: Integer,
Expand All @@ -71,6 +79,7 @@ module ContextDev
direct_url: String,
domain: String,
full_screenshot: ContextDev::Models::WebScreenshotParams::full_screenshot,
handle_cookie_popup: ContextDev::Models::WebScreenshotParams::handle_cookie_popup,
max_age_ms: Integer,
page: ContextDev::Models::WebScreenshotParams::page,
timeout_ms: Integer,
Expand All @@ -90,6 +99,17 @@ module ContextDev
def self?.values: -> ::Array[ContextDev::Models::WebScreenshotParams::full_screenshot]
end

type handle_cookie_popup = :true | :false

module HandleCookiePopup
extend ContextDev::Internal::Type::Enum

TRUE: :true
FALSE: :false

def self?.values: -> ::Array[ContextDev::Models::WebScreenshotParams::handle_cookie_popup]
end

type page =
:login
| :signup
Expand Down
1 change: 1 addition & 0 deletions sig/context_dev/resources/web.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module ContextDev
?direct_url: String,
?domain: String,
?full_screenshot: ContextDev::Models::WebScreenshotParams::full_screenshot,
?handle_cookie_popup: ContextDev::Models::WebScreenshotParams::handle_cookie_popup,
?max_age_ms: Integer,
?page: ContextDev::Models::WebScreenshotParams::page,
?timeout_ms: Integer,
Expand Down
Loading