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.35.0"
".": "1.36.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: 25
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-4903d5902cec6a80f42b9adaa9cf0defa9805ff22d7ae96970d209a4f867e195.yml
openapi_spec_hash: 1097891c23530dfe0155f23170daf973
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-021b48afe1d6e3f54c4ebe3d0da4beb3fb8b69a6d384a4aeadbc5bab7f967603.yml
openapi_spec_hash: 2aa5b59d78c708b094acf29cc0d9a68a
config_hash: c7b0cdaba3b9797b77efd89e1754d803
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 1.36.0 (2026-06-27)

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

### Features

* **api:** api update ([edf39d7](https://github.com/context-dot-dev/context-ruby-sdk/commit/edf39d75e9ca0a7b96ddac6467f9b50ceca0acf1))
* **api:** api update ([893f11d](https://github.com/context-dot-dev/context-ruby-sdk/commit/893f11d2746ccb636e971e12c24553043046cb11))
* **api:** api update ([59319b0](https://github.com/context-dot-dev/context-ruby-sdk/commit/59319b0421154c96a444f5e2d45b83e8f4bc9074))
* **api:** api update ([125ebe5](https://github.com/context-dot-dev/context-ruby-sdk/commit/125ebe5cb023b276c01bdc8c3cafbe8841dffddb))

## 1.35.0 (2026-06-25)

Full Changelog: [v1.34.0...v1.35.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.34.0...v1.35.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.35.0)
context.dev (1.36.0)
cgi
connection_pool

Expand Down
18 changes: 9 additions & 9 deletions 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.35.0"
gem "context.dev", "~> 1.36.0"
```

<!-- x-release-please-end -->
Expand Down Expand Up @@ -206,25 +206,25 @@ context_dev.brand.retrieve(**params)
Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:

```ruby
# :true
puts(ContextDev::WebScreenshotParams::FullScreenshot::TRUE)
# :light
puts(ContextDev::WebExtractStyleguideParams::ColorScheme::LIGHT)

# Revealed type: `T.all(ContextDev::WebScreenshotParams::FullScreenshot, Symbol)`
T.reveal_type(ContextDev::WebScreenshotParams::FullScreenshot::TRUE)
# Revealed type: `T.all(ContextDev::WebExtractStyleguideParams::ColorScheme, Symbol)`
T.reveal_type(ContextDev::WebExtractStyleguideParams::ColorScheme::LIGHT)
```

Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:

```ruby
# Using the enum constants preserves the tagged type information:
context_dev.web.screenshot(
full_screenshot: ContextDev::WebScreenshotParams::FullScreenshot::TRUE,
context_dev.web.extract_styleguide(
color_scheme: ContextDev::WebExtractStyleguideParams::ColorScheme::LIGHT,
# …
)

# Literal values are also permissible:
context_dev.web.screenshot(
full_screenshot: :true,
context_dev.web.extract_styleguide(
color_scheme: :light,
# …
)
```
Expand Down
23 changes: 22 additions & 1 deletion lib/context_dev/models/web_extract_styleguide_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ class WebExtractStyleguideParams < ContextDev::Internal::Type::BaseModel
extend ContextDev::Internal::Type::RequestParameters::Converter
include ContextDev::Internal::Type::RequestParameters

# @!attribute color_scheme
# Optional browser color scheme to emulate for websites that respond to
# prefers-color-scheme. This value is part of the styleguide cache key.
#
# @return [Symbol, ContextDev::Models::WebExtractStyleguideParams::ColorScheme, nil]
optional :color_scheme, enum: -> { ContextDev::WebExtractStyleguideParams::ColorScheme }

# @!attribute direct_url
# A specific URL to fetch the styleguide from directly, bypassing domain
# resolution (e.g., 'https://example.com/design-system'). When provided, the
Expand Down Expand Up @@ -41,10 +48,12 @@ class WebExtractStyleguideParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :timeout_ms, Integer

# @!method initialize(direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {})
# @!method initialize(color_scheme: nil, 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.
#
# @param color_scheme [Symbol, ContextDev::Models::WebExtractStyleguideParams::ColorScheme] Optional browser color scheme to emulate for websites that respond to prefers-co
#
# @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
Expand All @@ -54,6 +63,18 @@ class WebExtractStyleguideParams < ContextDev::Internal::Type::BaseModel
# @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}]

# Optional browser color scheme to emulate for websites that respond to
# prefers-color-scheme. This value is part of the styleguide cache key.
module ColorScheme
extend ContextDev::Internal::Type::Enum

LIGHT = :light
DARK = :dark

# @!method self.values
# @return [Array<Symbol>]
end
end
end
end
246 changes: 245 additions & 1 deletion lib/context_dev/models/web_screenshot_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ class WebScreenshotParams < ContextDev::Internal::Type::BaseModel
extend ContextDev::Internal::Type::RequestParameters::Converter
include ContextDev::Internal::Type::RequestParameters

# @!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.
#
# @return [Symbol, ContextDev::Models::WebScreenshotParams::ColorScheme, nil]
optional :color_scheme, enum: -> { ContextDev::WebScreenshotParams::ColorScheme }

# @!attribute country
# Two-letter ISO 3166-1 alpha-2 country code for the website request location.
# When provided, Context.dev fetches the target page from that country.
#
# @return [Symbol, ContextDev::Models::WebScreenshotParams::Country, nil]
optional :country, enum: -> { ContextDev::WebScreenshotParams::Country }

# @!attribute direct_url
# A specific URL to screenshot directly, bypassing domain resolution (e.g.,
# 'https://example.com/pricing'). When provided, the screenshot is taken of this
Expand Down Expand Up @@ -90,10 +104,14 @@ class WebScreenshotParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :wait_for_ms, Integer

# @!method initialize(direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, request_options: {})
# @!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, timeout_ms: nil, viewport: nil, wait_for_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebScreenshotParams} for more details.
#
# @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] Two-letter ISO 3166-1 alpha-2 country code for the website request location. Whe
#
# @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
Expand All @@ -116,6 +134,232 @@ class WebScreenshotParams < ContextDev::Internal::Type::BaseModel
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]

# Optional parameter to choose the site's visual theme in the screenshot. Use
# 'light' or 'dark' when the site offers both appearances.
module ColorScheme
extend ContextDev::Internal::Type::Enum

LIGHT = :light
DARK = :dark

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

# Two-letter ISO 3166-1 alpha-2 country code for the website request location.
# When provided, Context.dev fetches the target page from that country.
module Country
extend ContextDev::Internal::Type::Enum

AD = :ad
AE = :ae
AF = :af
AG = :ag
AI = :ai
AL = :al
AM = :am
AO = :ao
AR = :ar
AT = :at
AU = :au
AW = :aw
AZ = :az
BA = :ba
BB = :bb
BD = :bd
BE = :be
BF = :bf
BG = :bg
BH = :bh
BI = :bi
BJ = :bj
BM = :bm
BN = :bn
BO = :bo
BQ = :bq
BR = :br
BS = :bs
BW = :bw
BY = :by
BZ = :bz
CA = :ca
CD = :cd
CF = :cf
CG = :cg
CH = :ch
CI = :ci
CL = :cl
CM = :cm
CN = :cn
CO = :co
CR = :cr
CV = :cv
CW = :cw
CY = :cy
CZ = :cz
DE = :de
DJ = :dj
DK = :dk
DM = :dm
DO = :do
DZ = :dz
EC = :ec
EE = :ee
EG = :eg
ES = :es
ET = :et
FI = :fi
FJ = :fj
FR = :fr
GA = :ga
GB = :gb
GD = :gd
GE = :ge
GF = :gf
GG = :gg
GH = :gh
GM = :gm
GN = :gn
GP = :gp
GQ = :gq
GR = :gr
GT = :gt
GU = :gu
GW = :gw
GY = :gy
HK = :hk
HN = :hn
HR = :hr
HT = :ht
HU = :hu
ID = :id
IE = :ie
IL = :il
IM = :im
IN = :in
IQ = :iq
IR = :ir
IS = :is
IT = :it
JE = :je
JM = :jm
JO = :jo
JP = :jp
KE = :ke
KG = :kg
KH = :kh
KN = :kn
KR = :kr
KW = :kw
KY = :ky
KZ = :kz
LA = :la
LB = :lb
LC = :lc
LK = :lk
LR = :lr
LS = :ls
LT = :lt
LU = :lu
LV = :lv
LY = :ly
MA = :ma
MC = :mc
MD = :md
ME = :me
MF = :mf
MG = :mg
MK = :mk
ML = :ml
MM = :mm
MN = :mn
MO = :mo
MQ = :mq
MR = :mr
MT = :mt
MU = :mu
MV = :mv
MW = :mw
MX = :mx
MY = :my
MZ = :mz
NA = :na
NC = :nc
NE = :ne
NG = :ng
NI = :ni
NL = :nl
NO = :no
NP = :np
NZ = :nz
OM = :om
PA = :pa
PE = :pe
PF = :pf
PG = :pg
PH = :ph
PK = :pk
PL = :pl
PR = :pr
PS = :ps
PT = :pt
PY = :py
QA = :qa
RE = :re
RO = :ro
RS = :rs
RU = :ru
RW = :rw
SA = :sa
SC = :sc
SD = :sd
SE = :se
SG = :sg
SI = :si
SK = :sk
SL = :sl
SM = :sm
SN = :sn
SO = :so
SR = :sr
SS = :ss
ST = :st
SV = :sv
SX = :sx
SY = :sy
SZ = :sz
TC = :tc
TD = :td
TG = :tg
TH = :th
TJ = :tj
TL = :tl
TM = :tm
TN = :tn
TR = :tr
TT = :tt
TW = :tw
TZ = :tz
UA = :ua
UG = :ug
US = :us
UY = :uy
UZ = :uz
VC = :vc
VE = :ve
VG = :vg
VI = :vi
VN = :vn
YE = :ye
YT = :yt
ZA = :za
ZM = :zm
ZW = :zw

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

# Optional parameter to determine screenshot type. If 'true', takes a full page
# screenshot capturing all content. If 'false' or not provided, takes a viewport
# screenshot (standard browser view).
Expand Down
Loading
Loading