context.dev 2.10.0 → 2.12.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 +4 -4
- data/CHANGELOG.md +21 -0
- data/README.md +1 -1
- data/lib/context_dev/models/ai_extract_product_response.rb +48 -1
- data/lib/context_dev/models/ai_extract_products_response.rb +48 -1
- data/lib/context_dev/models/brand_retrieve_response.rb +29 -1
- data/lib/context_dev/models/brand_retrieve_simplified_response.rb +30 -1
- data/lib/context_dev/models/news_search_params.rb +1 -0
- data/lib/context_dev/models/news_search_response.rb +68 -22
- data/lib/context_dev/models/web_extract_params.rb +169 -6
- data/lib/context_dev/models/web_extract_response.rb +85 -1
- data/lib/context_dev/models/web_screenshot_params.rb +13 -1
- data/lib/context_dev/models/web_web_crawl_md_params.rb +7 -5
- data/lib/context_dev/models/web_web_scrape_html_params.rb +99 -3
- data/lib/context_dev/models/web_web_scrape_images_params.rb +99 -3
- data/lib/context_dev/models/web_web_scrape_images_response.rb +85 -1
- data/lib/context_dev/models/web_web_scrape_md_params.rb +99 -3
- data/lib/context_dev/resources/web.rb +13 -8
- data/lib/context_dev/version.rb +1 -1
- data/rbi/context_dev/models/ai_extract_product_response.rbi +99 -0
- data/rbi/context_dev/models/ai_extract_products_response.rbi +99 -0
- data/rbi/context_dev/models/brand_retrieve_response.rbi +80 -3
- data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +80 -3
- data/rbi/context_dev/models/news_search_params.rbi +5 -0
- data/rbi/context_dev/models/news_search_response.rbi +70 -4
- data/rbi/context_dev/models/web_extract_params.rbi +353 -8
- data/rbi/context_dev/models/web_extract_response.rbi +172 -3
- data/rbi/context_dev/models/web_screenshot_params.rbi +19 -0
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +10 -6
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +218 -4
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +218 -4
- data/rbi/context_dev/models/web_web_scrape_images_response.rbi +169 -0
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +218 -4
- data/rbi/context_dev/resources/web.rbi +38 -10
- data/sig/context_dev/models/ai_extract_product_response.rbs +40 -0
- data/sig/context_dev/models/ai_extract_products_response.rbs +40 -0
- data/sig/context_dev/models/brand_retrieve_response.rbs +33 -3
- data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +33 -3
- data/sig/context_dev/models/news_search_params.rbs +2 -0
- data/sig/context_dev/models/web_extract_params.rbs +117 -0
- data/sig/context_dev/models/web_extract_response.rbs +81 -3
- data/sig/context_dev/models/web_screenshot_params.rbs +7 -0
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +74 -0
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +74 -0
- data/sig/context_dev/models/web_web_scrape_images_response.rbs +78 -0
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +74 -0
- data/sig/context_dev/resources/web.rbs +2 -0
- metadata +2 -2
|
@@ -5,6 +5,7 @@ module ContextDev
|
|
|
5
5
|
images: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::Image],
|
|
6
6
|
success: ContextDev::Models::WebWebScrapeImagesResponse::success,
|
|
7
7
|
url: String,
|
|
8
|
+
actions_applied: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied],
|
|
8
9
|
key_metadata: ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -15,6 +16,12 @@ module ContextDev
|
|
|
15
16
|
|
|
16
17
|
attr_accessor url: String
|
|
17
18
|
|
|
19
|
+
attr_reader actions_applied: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied]?
|
|
20
|
+
|
|
21
|
+
def actions_applied=: (
|
|
22
|
+
::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied]
|
|
23
|
+
) -> ::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied]
|
|
24
|
+
|
|
18
25
|
attr_reader key_metadata: ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata?
|
|
19
26
|
|
|
20
27
|
def key_metadata=: (
|
|
@@ -25,6 +32,7 @@ module ContextDev
|
|
|
25
32
|
images: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::Image],
|
|
26
33
|
success: ContextDev::Models::WebWebScrapeImagesResponse::success,
|
|
27
34
|
url: String,
|
|
35
|
+
?actions_applied: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied],
|
|
28
36
|
?key_metadata: ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata
|
|
29
37
|
) -> void
|
|
30
38
|
|
|
@@ -32,6 +40,7 @@ module ContextDev
|
|
|
32
40
|
images: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::Image],
|
|
33
41
|
success: ContextDev::Models::WebWebScrapeImagesResponse::success,
|
|
34
42
|
url: String,
|
|
43
|
+
actions_applied: ::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied],
|
|
35
44
|
key_metadata: ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata
|
|
36
45
|
}
|
|
37
46
|
|
|
@@ -199,6 +208,75 @@ module ContextDev
|
|
|
199
208
|
def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeImagesResponse::success]
|
|
200
209
|
end
|
|
201
210
|
|
|
211
|
+
type actions_applied =
|
|
212
|
+
{
|
|
213
|
+
instruction: String,
|
|
214
|
+
status: ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::status,
|
|
215
|
+
completion_evidence: String,
|
|
216
|
+
duration_ms: Float,
|
|
217
|
+
error: String,
|
|
218
|
+
method_: String,
|
|
219
|
+
target_description: String
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
class ActionsApplied < ContextDev::Internal::Type::BaseModel
|
|
223
|
+
attr_accessor instruction: String
|
|
224
|
+
|
|
225
|
+
attr_accessor status: ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::status
|
|
226
|
+
|
|
227
|
+
attr_reader completion_evidence: String?
|
|
228
|
+
|
|
229
|
+
def completion_evidence=: (String) -> String
|
|
230
|
+
|
|
231
|
+
attr_reader duration_ms: Float?
|
|
232
|
+
|
|
233
|
+
def duration_ms=: (Float) -> Float
|
|
234
|
+
|
|
235
|
+
attr_reader error: String?
|
|
236
|
+
|
|
237
|
+
def error=: (String) -> String
|
|
238
|
+
|
|
239
|
+
attr_reader method_: String?
|
|
240
|
+
|
|
241
|
+
def method_=: (String) -> String
|
|
242
|
+
|
|
243
|
+
attr_reader target_description: String?
|
|
244
|
+
|
|
245
|
+
def target_description=: (String) -> String
|
|
246
|
+
|
|
247
|
+
def initialize: (
|
|
248
|
+
instruction: String,
|
|
249
|
+
status: ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::status,
|
|
250
|
+
?completion_evidence: String,
|
|
251
|
+
?duration_ms: Float,
|
|
252
|
+
?error: String,
|
|
253
|
+
?method_: String,
|
|
254
|
+
?target_description: String
|
|
255
|
+
) -> void
|
|
256
|
+
|
|
257
|
+
def to_hash: -> {
|
|
258
|
+
instruction: String,
|
|
259
|
+
status: ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::status,
|
|
260
|
+
completion_evidence: String,
|
|
261
|
+
duration_ms: Float,
|
|
262
|
+
error: String,
|
|
263
|
+
method_: String,
|
|
264
|
+
target_description: String
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
type status = :applied | :failed | :skipped
|
|
268
|
+
|
|
269
|
+
module Status
|
|
270
|
+
extend ContextDev::Internal::Type::Enum
|
|
271
|
+
|
|
272
|
+
APPLIED: :applied
|
|
273
|
+
FAILED: :failed
|
|
274
|
+
SKIPPED: :skipped
|
|
275
|
+
|
|
276
|
+
def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::status]
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
|
|
202
280
|
type key_metadata =
|
|
203
281
|
{ credits_consumed: Integer, credits_remaining: Integer }
|
|
204
282
|
|
|
@@ -147,6 +147,7 @@ module ContextDev
|
|
|
147
147
|
type action =
|
|
148
148
|
ContextDev::WebWebScrapeMdParams::Action::Wait
|
|
149
149
|
| ContextDev::WebWebScrapeMdParams::Action::Perform
|
|
150
|
+
| ContextDev::WebWebScrapeMdParams::Action::Scroll
|
|
150
151
|
|
|
151
152
|
module Action
|
|
152
153
|
extend ContextDev::Internal::Type::Union
|
|
@@ -175,6 +176,79 @@ module ContextDev
|
|
|
175
176
|
def to_hash: -> { action: String, do_: :perform }
|
|
176
177
|
end
|
|
177
178
|
|
|
179
|
+
type scroll =
|
|
180
|
+
{
|
|
181
|
+
do_: :scroll,
|
|
182
|
+
amount: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount,
|
|
183
|
+
container: String,
|
|
184
|
+
direction: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction,
|
|
185
|
+
max_scrolls: Integer
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
class Scroll < ContextDev::Internal::Type::BaseModel
|
|
189
|
+
attr_accessor do_: :scroll
|
|
190
|
+
|
|
191
|
+
attr_reader amount: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount?
|
|
192
|
+
|
|
193
|
+
def amount=: (
|
|
194
|
+
ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount
|
|
195
|
+
) -> ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount
|
|
196
|
+
|
|
197
|
+
attr_reader container: String?
|
|
198
|
+
|
|
199
|
+
def container=: (String) -> String
|
|
200
|
+
|
|
201
|
+
attr_reader direction: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction?
|
|
202
|
+
|
|
203
|
+
def direction=: (
|
|
204
|
+
ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction
|
|
205
|
+
) -> ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction
|
|
206
|
+
|
|
207
|
+
attr_reader max_scrolls: Integer?
|
|
208
|
+
|
|
209
|
+
def max_scrolls=: (Integer) -> Integer
|
|
210
|
+
|
|
211
|
+
def initialize: (
|
|
212
|
+
?amount: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount,
|
|
213
|
+
?container: String,
|
|
214
|
+
?direction: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction,
|
|
215
|
+
?max_scrolls: Integer,
|
|
216
|
+
?do_: :scroll
|
|
217
|
+
) -> void
|
|
218
|
+
|
|
219
|
+
def to_hash: -> {
|
|
220
|
+
do_: :scroll,
|
|
221
|
+
amount: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount,
|
|
222
|
+
container: String,
|
|
223
|
+
direction: ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction,
|
|
224
|
+
max_scrolls: Integer
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
type amount = Integer | :viewport | :max
|
|
228
|
+
|
|
229
|
+
module Amount
|
|
230
|
+
extend ContextDev::Internal::Type::Union
|
|
231
|
+
|
|
232
|
+
def self?.variants: -> ::Array[ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::amount]
|
|
233
|
+
|
|
234
|
+
VIEWPORT: :viewport
|
|
235
|
+
MAX: :max
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
type direction = :up | :down | :left | :right
|
|
239
|
+
|
|
240
|
+
module Direction
|
|
241
|
+
extend ContextDev::Internal::Type::Enum
|
|
242
|
+
|
|
243
|
+
UP: :up
|
|
244
|
+
DOWN: :down
|
|
245
|
+
LEFT: :left
|
|
246
|
+
RIGHT: :right
|
|
247
|
+
|
|
248
|
+
def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::direction]
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
178
252
|
def self?.variants: -> ::Array[ContextDev::Models::WebWebScrapeMdParams::action]
|
|
179
253
|
end
|
|
180
254
|
|
|
@@ -4,6 +4,7 @@ module ContextDev
|
|
|
4
4
|
def extract: (
|
|
5
5
|
schema: ::Hash[Symbol, top],
|
|
6
6
|
url: String,
|
|
7
|
+
?actions: ::Array[ContextDev::Models::WebExtractParams::action],
|
|
7
8
|
?fact_check: bool,
|
|
8
9
|
?follow_subdomains: bool,
|
|
9
10
|
?include_frames: bool,
|
|
@@ -48,6 +49,7 @@ module ContextDev
|
|
|
48
49
|
) -> ContextDev::Models::WebExtractStyleguideResponse
|
|
49
50
|
|
|
50
51
|
def screenshot: (
|
|
52
|
+
?clear_popups: bool,
|
|
51
53
|
?color_scheme: ContextDev::Models::WebScreenshotParams::color_scheme,
|
|
52
54
|
?country: ContextDev::Models::WebScreenshotParams::country,
|
|
53
55
|
?direct_url: String,
|
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: 2.
|
|
4
|
+
version: 2.12.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-08-
|
|
11
|
+
date: 2026-08-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|