context.dev 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a6ec86b2fdf43b0c3f9b800d8b93558a0c93fdf23fd72fad27a46ba43f2dccc
4
- data.tar.gz: 8d5533fd69c08516b77b15b9bdcdfafea6cd18f4be1a77d17daa20bad2a6f9b1
3
+ metadata.gz: 1f8d1ca708475c531193510f12a13c95d03e0a28c10b5411d6f1de6fc922dcab
4
+ data.tar.gz: 55b4b7999f774bd387bd3cc03a0c4095b4fb33295a5bb27d3a1ed69968557b14
5
5
  SHA512:
6
- metadata.gz: e98fe1516e060eb780f470e8c5ddc29ba4fdea44c4b11ca40d79d2dfacc7009eb11c95360c19dc0f2864857cc2560ce91569d3587cdaacc8009f757b76a293a8
7
- data.tar.gz: 515ce97f5f873d21cef0665843408f507ad5ee2221ae9308d336617e57b2980d0c8add55c46193f2e10c580819cf09654213d32d6f15558f17c6adc87114ef32
6
+ metadata.gz: f6b4313f8b005eb2680db0468f0854b1d64bae299a89997ada0e7fb7d82559deca0e59431bd6d5b7c8342362233e2289cfd365d1afbaf2da1961e3481366ebfb
7
+ data.tar.gz: 20d55c97248661498d7ff43a627d63c97457900625bc53f7fb1a6c35ae28229ad2ece229c26474468330c6a23e4e50f0921307f7c78f3cf3ade343f893bea481
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.19.0 (2026-05-11)
4
+
5
+ Full Changelog: [v1.18.0...v1.19.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.18.0...v1.19.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([ab9c393](https://github.com/context-dot-dev/context-ruby-sdk/commit/ab9c3935b669fbe2c7a8ffdd5bff7ea05fc2ae56))
10
+ * **api:** api update ([7f8b7b7](https://github.com/context-dot-dev/context-ruby-sdk/commit/7f8b7b7a720f3fdf5364ffaf7c7e55f171b72c0e))
11
+
3
12
  ## 1.18.0 (2026-05-10)
4
13
 
5
14
  Full Changelog: [v1.17.0...v1.18.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.17.0...v1.18.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "context.dev", "~> 1.18.0"
29
+ gem "context.dev", "~> 1.19.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -31,6 +31,14 @@ module ContextDev
31
31
  # @return [Symbol, ContextDev::Models::WebScreenshotParams::FullScreenshot, nil]
32
32
  optional :full_screenshot, enum: -> { ContextDev::WebScreenshotParams::FullScreenshot }
33
33
 
34
+ # @!attribute handle_cookie_popup
35
+ # Optional parameter to control cookie/consent popup handling. If 'true', we
36
+ # dismiss cookie banner before capture. If 'false' or not provided, captures the
37
+ # page without that step.
38
+ #
39
+ # @return [Symbol, ContextDev::Models::WebScreenshotParams::HandleCookiePopup, nil]
40
+ optional :handle_cookie_popup, enum: -> { ContextDev::WebScreenshotParams::HandleCookiePopup }
41
+
34
42
  # @!attribute max_age_ms
35
43
  # Return a cached screenshot if a prior screenshot for the same parameters exists
36
44
  # and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
@@ -71,7 +79,7 @@ module ContextDev
71
79
  # @return [Integer, nil]
72
80
  optional :wait_for_ms, Integer
73
81
 
74
- # @!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: {})
82
+ # @!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: {})
75
83
  # Some parameter documentations has been truncated, see
76
84
  # {ContextDev::Models::WebScreenshotParams} for more details.
77
85
  #
@@ -81,6 +89,8 @@ module ContextDev
81
89
  #
82
90
  # @param full_screenshot [Symbol, ContextDev::Models::WebScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc
83
91
  #
92
+ # @param handle_cookie_popup [Symbol, ContextDev::Models::WebScreenshotParams::HandleCookiePopup] Optional parameter to control cookie/consent popup handling. If 'true', we dismi
93
+ #
84
94
  # @param max_age_ms [Integer] Return a cached screenshot if a prior screenshot for the same parameters exists
85
95
  #
86
96
  # @param page [Symbol, ContextDev::Models::WebScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy
@@ -106,6 +116,19 @@ module ContextDev
106
116
  # @return [Array<Symbol>]
107
117
  end
108
118
 
119
+ # Optional parameter to control cookie/consent popup handling. If 'true', we
120
+ # dismiss cookie banner before capture. If 'false' or not provided, captures the
121
+ # page without that step.
122
+ module HandleCookiePopup
123
+ extend ContextDev::Internal::Type::Enum
124
+
125
+ TRUE = :true
126
+ FALSE = :false
127
+
128
+ # @!method self.values
129
+ # @return [Array<Symbol>]
130
+ end
131
+
109
132
  # Optional parameter to specify which page type to screenshot. If provided, the
110
133
  # system will scrape the domain's links and use heuristics to find the most
111
134
  # appropriate URL for the specified page type (30 supported languages). If not
@@ -70,7 +70,7 @@ module ContextDev
70
70
  #
71
71
  # Capture a screenshot of a website.
72
72
  #
73
- # @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: {})
73
+ # @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: {})
74
74
  #
75
75
  # @param direct_url [String] A specific URL to screenshot directly, bypassing domain resolution (e.g., 'https
76
76
  #
@@ -78,6 +78,8 @@ module ContextDev
78
78
  #
79
79
  # @param full_screenshot [Symbol, ContextDev::Models::WebScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc
80
80
  #
81
+ # @param handle_cookie_popup [Symbol, ContextDev::Models::WebScreenshotParams::HandleCookiePopup] Optional parameter to control cookie/consent popup handling. If 'true', we dismi
82
+ #
81
83
  # @param max_age_ms [Integer] Return a cached screenshot if a prior screenshot for the same parameters exists
82
84
  #
83
85
  # @param page [Symbol, ContextDev::Models::WebScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy
@@ -102,6 +104,7 @@ module ContextDev
102
104
  query: query.transform_keys(
103
105
  direct_url: "directUrl",
104
106
  full_screenshot: "fullScreenshot",
107
+ handle_cookie_popup: "handleCookiePopup",
105
108
  max_age_ms: "maxAgeMs",
106
109
  timeout_ms: "timeoutMS",
107
110
  wait_for_ms: "waitForMs"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ContextDev
4
- VERSION = "1.18.0"
4
+ VERSION = "1.19.0"
5
5
  end
@@ -47,6 +47,26 @@ module ContextDev
47
47
  end
48
48
  attr_writer :full_screenshot
49
49
 
50
+ # Optional parameter to control cookie/consent popup handling. If 'true', we
51
+ # dismiss cookie banner before capture. If 'false' or not provided, captures the
52
+ # page without that step.
53
+ sig do
54
+ returns(
55
+ T.nilable(
56
+ ContextDev::WebScreenshotParams::HandleCookiePopup::OrSymbol
57
+ )
58
+ )
59
+ end
60
+ attr_reader :handle_cookie_popup
61
+
62
+ sig do
63
+ params(
64
+ handle_cookie_popup:
65
+ ContextDev::WebScreenshotParams::HandleCookiePopup::OrSymbol
66
+ ).void
67
+ end
68
+ attr_writer :handle_cookie_popup
69
+
50
70
  # Return a cached screenshot if a prior screenshot for the same parameters exists
51
71
  # and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
52
72
  # omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
@@ -102,6 +122,8 @@ module ContextDev
102
122
  domain: String,
103
123
  full_screenshot:
104
124
  ContextDev::WebScreenshotParams::FullScreenshot::OrSymbol,
125
+ handle_cookie_popup:
126
+ ContextDev::WebScreenshotParams::HandleCookiePopup::OrSymbol,
105
127
  max_age_ms: Integer,
106
128
  page: ContextDev::WebScreenshotParams::Page::OrSymbol,
107
129
  timeout_ms: Integer,
@@ -123,6 +145,10 @@ module ContextDev
123
145
  # screenshot capturing all content. If 'false' or not provided, takes a viewport
124
146
  # screenshot (standard browser view).
125
147
  full_screenshot: nil,
148
+ # Optional parameter to control cookie/consent popup handling. If 'true', we
149
+ # dismiss cookie banner before capture. If 'false' or not provided, captures the
150
+ # page without that step.
151
+ handle_cookie_popup: nil,
126
152
  # Return a cached screenshot if a prior screenshot for the same parameters exists
127
153
  # and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
128
154
  # omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
@@ -154,6 +180,8 @@ module ContextDev
154
180
  domain: String,
155
181
  full_screenshot:
156
182
  ContextDev::WebScreenshotParams::FullScreenshot::OrSymbol,
183
+ handle_cookie_popup:
184
+ ContextDev::WebScreenshotParams::HandleCookiePopup::OrSymbol,
157
185
  max_age_ms: Integer,
158
186
  page: ContextDev::WebScreenshotParams::Page::OrSymbol,
159
187
  timeout_ms: Integer,
@@ -200,6 +228,40 @@ module ContextDev
200
228
  end
201
229
  end
202
230
 
231
+ # Optional parameter to control cookie/consent popup handling. If 'true', we
232
+ # dismiss cookie banner before capture. If 'false' or not provided, captures the
233
+ # page without that step.
234
+ module HandleCookiePopup
235
+ extend ContextDev::Internal::Type::Enum
236
+
237
+ TaggedSymbol =
238
+ T.type_alias do
239
+ T.all(Symbol, ContextDev::WebScreenshotParams::HandleCookiePopup)
240
+ end
241
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
242
+
243
+ TRUE =
244
+ T.let(
245
+ :true,
246
+ ContextDev::WebScreenshotParams::HandleCookiePopup::TaggedSymbol
247
+ )
248
+ FALSE =
249
+ T.let(
250
+ :false,
251
+ ContextDev::WebScreenshotParams::HandleCookiePopup::TaggedSymbol
252
+ )
253
+
254
+ sig do
255
+ override.returns(
256
+ T::Array[
257
+ ContextDev::WebScreenshotParams::HandleCookiePopup::TaggedSymbol
258
+ ]
259
+ )
260
+ end
261
+ def self.values
262
+ end
263
+ end
264
+
203
265
  # Optional parameter to specify which page type to screenshot. If provided, the
204
266
  # system will scrape the domain's links and use heuristics to find the most
205
267
  # appropriate URL for the specified page type (30 supported languages). If not
@@ -65,6 +65,8 @@ module ContextDev
65
65
  domain: String,
66
66
  full_screenshot:
67
67
  ContextDev::WebScreenshotParams::FullScreenshot::OrSymbol,
68
+ handle_cookie_popup:
69
+ ContextDev::WebScreenshotParams::HandleCookiePopup::OrSymbol,
68
70
  max_age_ms: Integer,
69
71
  page: ContextDev::WebScreenshotParams::Page::OrSymbol,
70
72
  timeout_ms: Integer,
@@ -86,6 +88,10 @@ module ContextDev
86
88
  # screenshot capturing all content. If 'false' or not provided, takes a viewport
87
89
  # screenshot (standard browser view).
88
90
  full_screenshot: nil,
91
+ # Optional parameter to control cookie/consent popup handling. If 'true', we
92
+ # dismiss cookie banner before capture. If 'false' or not provided, captures the
93
+ # page without that step.
94
+ handle_cookie_popup: nil,
89
95
  # Return a cached screenshot if a prior screenshot for the same parameters exists
90
96
  # and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
91
97
  # omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
@@ -5,6 +5,7 @@ module ContextDev
5
5
  direct_url: String,
6
6
  domain: String,
7
7
  full_screenshot: ContextDev::Models::WebScreenshotParams::full_screenshot,
8
+ handle_cookie_popup: ContextDev::Models::WebScreenshotParams::handle_cookie_popup,
8
9
  max_age_ms: Integer,
9
10
  page: ContextDev::Models::WebScreenshotParams::page,
10
11
  timeout_ms: Integer,
@@ -31,6 +32,12 @@ module ContextDev
31
32
  ContextDev::Models::WebScreenshotParams::full_screenshot
32
33
  ) -> ContextDev::Models::WebScreenshotParams::full_screenshot
33
34
 
35
+ attr_reader handle_cookie_popup: ContextDev::Models::WebScreenshotParams::handle_cookie_popup?
36
+
37
+ def handle_cookie_popup=: (
38
+ ContextDev::Models::WebScreenshotParams::handle_cookie_popup
39
+ ) -> ContextDev::Models::WebScreenshotParams::handle_cookie_popup
40
+
34
41
  attr_reader max_age_ms: Integer?
35
42
 
36
43
  def max_age_ms=: (Integer) -> Integer
@@ -59,6 +66,7 @@ module ContextDev
59
66
  ?direct_url: String,
60
67
  ?domain: String,
61
68
  ?full_screenshot: ContextDev::Models::WebScreenshotParams::full_screenshot,
69
+ ?handle_cookie_popup: ContextDev::Models::WebScreenshotParams::handle_cookie_popup,
62
70
  ?max_age_ms: Integer,
63
71
  ?page: ContextDev::Models::WebScreenshotParams::page,
64
72
  ?timeout_ms: Integer,
@@ -71,6 +79,7 @@ module ContextDev
71
79
  direct_url: String,
72
80
  domain: String,
73
81
  full_screenshot: ContextDev::Models::WebScreenshotParams::full_screenshot,
82
+ handle_cookie_popup: ContextDev::Models::WebScreenshotParams::handle_cookie_popup,
74
83
  max_age_ms: Integer,
75
84
  page: ContextDev::Models::WebScreenshotParams::page,
76
85
  timeout_ms: Integer,
@@ -90,6 +99,17 @@ module ContextDev
90
99
  def self?.values: -> ::Array[ContextDev::Models::WebScreenshotParams::full_screenshot]
91
100
  end
92
101
 
102
+ type handle_cookie_popup = :true | :false
103
+
104
+ module HandleCookiePopup
105
+ extend ContextDev::Internal::Type::Enum
106
+
107
+ TRUE: :true
108
+ FALSE: :false
109
+
110
+ def self?.values: -> ::Array[ContextDev::Models::WebScreenshotParams::handle_cookie_popup]
111
+ end
112
+
93
113
  type page =
94
114
  :login
95
115
  | :signup
@@ -19,6 +19,7 @@ module ContextDev
19
19
  ?direct_url: String,
20
20
  ?domain: String,
21
21
  ?full_screenshot: ContextDev::Models::WebScreenshotParams::full_screenshot,
22
+ ?handle_cookie_popup: ContextDev::Models::WebScreenshotParams::handle_cookie_popup,
22
23
  ?max_age_ms: Integer,
23
24
  ?page: ContextDev::Models::WebScreenshotParams::page,
24
25
  ?timeout_ms: Integer,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: context.dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Context Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-10 00:00:00.000000000 Z
11
+ date: 2026-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi