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
|
@@ -23,6 +23,14 @@ module ContextDev
|
|
|
23
23
|
# @return [String]
|
|
24
24
|
required :url, String
|
|
25
25
|
|
|
26
|
+
# @!attribute actions_applied
|
|
27
|
+
# One verified outcome per requested browser action, in request order.
|
|
28
|
+
#
|
|
29
|
+
# @return [Array<ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied>, nil]
|
|
30
|
+
optional :actions_applied,
|
|
31
|
+
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied] },
|
|
32
|
+
api_name: :actionsApplied
|
|
33
|
+
|
|
26
34
|
# @!attribute key_metadata
|
|
27
35
|
# Metadata about the API key used for the request. Included in every response
|
|
28
36
|
# whenever a valid API key is provided, even when the response status is not 200.
|
|
@@ -30,7 +38,7 @@ module ContextDev
|
|
|
30
38
|
# @return [ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata, nil]
|
|
31
39
|
optional :key_metadata, -> { ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata }
|
|
32
40
|
|
|
33
|
-
# @!method initialize(images:, success:, url:, key_metadata: nil)
|
|
41
|
+
# @!method initialize(images:, success:, url:, actions_applied: nil, key_metadata: nil)
|
|
34
42
|
# Some parameter documentations has been truncated, see
|
|
35
43
|
# {ContextDev::Models::WebWebScrapeImagesResponse} for more details.
|
|
36
44
|
#
|
|
@@ -40,6 +48,8 @@ module ContextDev
|
|
|
40
48
|
#
|
|
41
49
|
# @param url [String] Page URL that was scraped.
|
|
42
50
|
#
|
|
51
|
+
# @param actions_applied [Array<ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied>] One verified outcome per requested browser action, in request order.
|
|
52
|
+
#
|
|
43
53
|
# @param key_metadata [ContextDev::Models::WebWebScrapeImagesResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when
|
|
44
54
|
|
|
45
55
|
class Image < ContextDev::Internal::Type::BaseModel
|
|
@@ -196,6 +206,80 @@ module ContextDev
|
|
|
196
206
|
# @return [Array<Boolean>]
|
|
197
207
|
end
|
|
198
208
|
|
|
209
|
+
class ActionsApplied < ContextDev::Internal::Type::BaseModel
|
|
210
|
+
# @!attribute instruction
|
|
211
|
+
#
|
|
212
|
+
# @return [String]
|
|
213
|
+
required :instruction, String
|
|
214
|
+
|
|
215
|
+
# @!attribute status
|
|
216
|
+
# Applied means the requested page state was visibly verified. Failed means it was
|
|
217
|
+
# not verified. Skipped means it was not attempted.
|
|
218
|
+
#
|
|
219
|
+
# @return [Symbol, ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::Status]
|
|
220
|
+
required :status, enum: -> { ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::Status }
|
|
221
|
+
|
|
222
|
+
# @!attribute completion_evidence
|
|
223
|
+
# Visible page evidence used to verify an applied action.
|
|
224
|
+
#
|
|
225
|
+
# @return [String, nil]
|
|
226
|
+
optional :completion_evidence, String, api_name: :completionEvidence
|
|
227
|
+
|
|
228
|
+
# @!attribute duration_ms
|
|
229
|
+
#
|
|
230
|
+
# @return [Float, nil]
|
|
231
|
+
optional :duration_ms, Float, api_name: :durationMs
|
|
232
|
+
|
|
233
|
+
# @!attribute error
|
|
234
|
+
#
|
|
235
|
+
# @return [String, nil]
|
|
236
|
+
optional :error, String
|
|
237
|
+
|
|
238
|
+
# @!attribute method_
|
|
239
|
+
#
|
|
240
|
+
# @return [String, nil]
|
|
241
|
+
optional :method_, String, api_name: :method
|
|
242
|
+
|
|
243
|
+
# @!attribute target_description
|
|
244
|
+
#
|
|
245
|
+
# @return [String, nil]
|
|
246
|
+
optional :target_description, String, api_name: :targetDescription
|
|
247
|
+
|
|
248
|
+
# @!method initialize(instruction:, status:, completion_evidence: nil, duration_ms: nil, error: nil, method_: nil, target_description: nil)
|
|
249
|
+
# Some parameter documentations has been truncated, see
|
|
250
|
+
# {ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied} for more
|
|
251
|
+
# details.
|
|
252
|
+
#
|
|
253
|
+
# @param instruction [String]
|
|
254
|
+
#
|
|
255
|
+
# @param status [Symbol, ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied::Status] Applied means the requested page state was visibly verified. Failed means it was
|
|
256
|
+
#
|
|
257
|
+
# @param completion_evidence [String] Visible page evidence used to verify an applied action.
|
|
258
|
+
#
|
|
259
|
+
# @param duration_ms [Float]
|
|
260
|
+
#
|
|
261
|
+
# @param error [String]
|
|
262
|
+
#
|
|
263
|
+
# @param method_ [String]
|
|
264
|
+
#
|
|
265
|
+
# @param target_description [String]
|
|
266
|
+
|
|
267
|
+
# Applied means the requested page state was visibly verified. Failed means it was
|
|
268
|
+
# not verified. Skipped means it was not attempted.
|
|
269
|
+
#
|
|
270
|
+
# @see ContextDev::Models::WebWebScrapeImagesResponse::ActionsApplied#status
|
|
271
|
+
module Status
|
|
272
|
+
extend ContextDev::Internal::Type::Enum
|
|
273
|
+
|
|
274
|
+
APPLIED = :applied
|
|
275
|
+
FAILED = :failed
|
|
276
|
+
SKIPPED = :skipped
|
|
277
|
+
|
|
278
|
+
# @!method self.values
|
|
279
|
+
# @return [Array<Symbol>]
|
|
280
|
+
end
|
|
281
|
+
end
|
|
282
|
+
|
|
199
283
|
# @see ContextDev::Models::WebWebScrapeImagesResponse#key_metadata
|
|
200
284
|
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
201
285
|
# @!attribute credits_consumed
|
|
@@ -19,7 +19,7 @@ module ContextDev
|
|
|
19
19
|
# content is captured. Requires a paid plan. Send a JSON array in the query
|
|
20
20
|
# parameter. Maximum: 5 actions.
|
|
21
21
|
#
|
|
22
|
-
# @return [Array<ContextDev::Models::WebWebScrapeMdParams::Action::Wait, ContextDev::Models::WebWebScrapeMdParams::Action::Perform>, nil]
|
|
22
|
+
# @return [Array<ContextDev::Models::WebWebScrapeMdParams::Action::Wait, ContextDev::Models::WebWebScrapeMdParams::Action::Perform, ContextDev::Models::WebWebScrapeMdParams::Action::Scroll>, nil]
|
|
23
23
|
optional :actions,
|
|
24
24
|
-> { ContextDev::Internal::Type::ArrayOf[union: ContextDev::WebWebScrapeMdParams::Action] },
|
|
25
25
|
nil?: true
|
|
@@ -155,7 +155,7 @@ module ContextDev
|
|
|
155
155
|
#
|
|
156
156
|
# @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr
|
|
157
157
|
#
|
|
158
|
-
# @param actions [Array<ContextDev::Models::WebWebScrapeMdParams::Action::Wait, ContextDev::Models::WebWebScrapeMdParams::Action::Perform>, nil] Optional browser actions executed in array order after the page loads and before
|
|
158
|
+
# @param actions [Array<ContextDev::Models::WebWebScrapeMdParams::Action::Wait, ContextDev::Models::WebWebScrapeMdParams::Action::Perform, ContextDev::Models::WebWebScrapeMdParams::Action::Scroll>, nil] Optional browser actions executed in array order after the page loads and before
|
|
159
159
|
#
|
|
160
160
|
# @param country [Symbol, ContextDev::Models::WebWebScrapeMdParams::Country] Fetch the target page through a residential proxy in this country (ISO 3166-1 al
|
|
161
161
|
#
|
|
@@ -206,6 +206,9 @@ module ContextDev
|
|
|
206
206
|
# Resolve and perform one natural-language browser action.
|
|
207
207
|
variant :perform, -> { ContextDev::WebWebScrapeMdParams::Action::Perform }
|
|
208
208
|
|
|
209
|
+
# Scroll the page or a selected scrollable container, waiting adaptively for content and dimensions to settle after each iteration.
|
|
210
|
+
variant :scroll, -> { ContextDev::WebWebScrapeMdParams::Action::Scroll }
|
|
211
|
+
|
|
209
212
|
class Wait < ContextDev::Internal::Type::BaseModel
|
|
210
213
|
# @!attribute do_
|
|
211
214
|
#
|
|
@@ -242,8 +245,101 @@ module ContextDev
|
|
|
242
245
|
# @param do_ [Symbol, :perform]
|
|
243
246
|
end
|
|
244
247
|
|
|
248
|
+
class Scroll < ContextDev::Internal::Type::BaseModel
|
|
249
|
+
# @!attribute do_
|
|
250
|
+
#
|
|
251
|
+
# @return [Symbol, :scroll]
|
|
252
|
+
required :do_, const: :scroll, api_name: :do
|
|
253
|
+
|
|
254
|
+
# @!attribute amount
|
|
255
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
256
|
+
# Defaults to viewport.
|
|
257
|
+
#
|
|
258
|
+
# @return [Integer, Symbol, ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::Amount, nil]
|
|
259
|
+
optional :amount, union: -> { ContextDev::WebWebScrapeMdParams::Action::Scroll::Amount }
|
|
260
|
+
|
|
261
|
+
# @!attribute container
|
|
262
|
+
# CSS selector for the first matching scroll container. Defaults to the page.
|
|
263
|
+
#
|
|
264
|
+
# @return [String, nil]
|
|
265
|
+
optional :container, String
|
|
266
|
+
|
|
267
|
+
# @!attribute direction
|
|
268
|
+
# Direction to scroll. Defaults to down.
|
|
269
|
+
#
|
|
270
|
+
# @return [Symbol, ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::Direction, nil]
|
|
271
|
+
optional :direction, enum: -> { ContextDev::WebWebScrapeMdParams::Action::Scroll::Direction }
|
|
272
|
+
|
|
273
|
+
# @!attribute max_scrolls
|
|
274
|
+
# Maximum scroll iterations. Stops early when scrolling and scrollable extent stop
|
|
275
|
+
# changing. Defaults to 1.
|
|
276
|
+
#
|
|
277
|
+
# @return [Integer, nil]
|
|
278
|
+
optional :max_scrolls, Integer, api_name: :maxScrolls
|
|
279
|
+
|
|
280
|
+
# @!method initialize(amount: nil, container: nil, direction: nil, max_scrolls: nil, do_: :scroll)
|
|
281
|
+
# Some parameter documentations has been truncated, see
|
|
282
|
+
# {ContextDev::Models::WebWebScrapeMdParams::Action::Scroll} for more details.
|
|
283
|
+
#
|
|
284
|
+
# Scroll the page or a selected scrollable container, waiting adaptively for
|
|
285
|
+
# content and dimensions to settle after each iteration.
|
|
286
|
+
#
|
|
287
|
+
# @param amount [Integer, Symbol, ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::Amount] Pixels per scroll, one visible viewport, or the current scroll boundary. Default
|
|
288
|
+
#
|
|
289
|
+
# @param container [String] CSS selector for the first matching scroll container. Defaults to the page.
|
|
290
|
+
#
|
|
291
|
+
# @param direction [Symbol, ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::Direction] Direction to scroll. Defaults to down.
|
|
292
|
+
#
|
|
293
|
+
# @param max_scrolls [Integer] Maximum scroll iterations. Stops early when scrolling and scrollable extent stop
|
|
294
|
+
#
|
|
295
|
+
# @param do_ [Symbol, :scroll]
|
|
296
|
+
|
|
297
|
+
# Pixels per scroll, one visible viewport, or the current scroll boundary.
|
|
298
|
+
# Defaults to viewport.
|
|
299
|
+
#
|
|
300
|
+
# @see ContextDev::Models::WebWebScrapeMdParams::Action::Scroll#amount
|
|
301
|
+
module Amount
|
|
302
|
+
extend ContextDev::Internal::Type::Union
|
|
303
|
+
|
|
304
|
+
variant Integer
|
|
305
|
+
|
|
306
|
+
variant const: -> { ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::Amount::VIEWPORT }
|
|
307
|
+
|
|
308
|
+
variant const: -> { ContextDev::Models::WebWebScrapeMdParams::Action::Scroll::Amount::MAX }
|
|
309
|
+
|
|
310
|
+
# @!method self.variants
|
|
311
|
+
# @return [Array(Integer, Symbol)]
|
|
312
|
+
|
|
313
|
+
define_sorbet_constant!(:Variants) do
|
|
314
|
+
T.type_alias { T.any(Integer, ContextDev::WebWebScrapeMdParams::Action::Scroll::Amount::TaggedSymbol) }
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# @!group
|
|
318
|
+
|
|
319
|
+
VIEWPORT = :viewport
|
|
320
|
+
MAX = :max
|
|
321
|
+
|
|
322
|
+
# @!endgroup
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# Direction to scroll. Defaults to down.
|
|
326
|
+
#
|
|
327
|
+
# @see ContextDev::Models::WebWebScrapeMdParams::Action::Scroll#direction
|
|
328
|
+
module Direction
|
|
329
|
+
extend ContextDev::Internal::Type::Enum
|
|
330
|
+
|
|
331
|
+
UP = :up
|
|
332
|
+
DOWN = :down
|
|
333
|
+
LEFT = :left
|
|
334
|
+
RIGHT = :right
|
|
335
|
+
|
|
336
|
+
# @!method self.values
|
|
337
|
+
# @return [Array<Symbol>]
|
|
338
|
+
end
|
|
339
|
+
end
|
|
340
|
+
|
|
245
341
|
# @!method self.variants
|
|
246
|
-
# @return [Array(ContextDev::Models::WebWebScrapeMdParams::Action::Wait, ContextDev::Models::WebWebScrapeMdParams::Action::Perform)]
|
|
342
|
+
# @return [Array(ContextDev::Models::WebWebScrapeMdParams::Action::Wait, ContextDev::Models::WebWebScrapeMdParams::Action::Perform, ContextDev::Models::WebWebScrapeMdParams::Action::Scroll)]
|
|
247
343
|
end
|
|
248
344
|
|
|
249
345
|
# Fetch the target page through a residential proxy in this country (ISO 3166-1
|
|
@@ -9,12 +9,14 @@ module ContextDev
|
|
|
9
9
|
# Crawl a website, use the provided JSON Schema and instructions to prioritize
|
|
10
10
|
# relevant internal links, and extract structured data from the selected pages.
|
|
11
11
|
#
|
|
12
|
-
# @overload extract(schema:, url:, fact_check: nil, follow_subdomains: nil, include_frames: nil, instructions: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, settle_animations: nil, stop_after_ms: nil, tags: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
|
|
12
|
+
# @overload extract(schema:, url:, actions: nil, fact_check: nil, follow_subdomains: nil, include_frames: nil, instructions: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, settle_animations: nil, stop_after_ms: nil, tags: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
|
|
13
13
|
#
|
|
14
|
-
# @param schema [Hash{Symbol=>Object}] JSON Schema for the returned data object.
|
|
14
|
+
# @param schema [Hash{Symbol=>Object}] JSON Schema for the returned data object. Image fields such as `image_urls` or `
|
|
15
15
|
#
|
|
16
16
|
# @param url [String] The starting website URL to crawl and extract from. Must include http:// or http
|
|
17
17
|
#
|
|
18
|
+
# @param actions [Array<ContextDev::Models::WebExtractParams::Action::Wait, ContextDev::Models::WebExtractParams::Action::Perform, ContextDev::Models::WebExtractParams::Action::Scroll>] Optional browser actions executed in order on the requested page after it loads,
|
|
19
|
+
#
|
|
18
20
|
# @param fact_check [Boolean] When true, every returned value must be grounded in facts stated on the page; fi
|
|
19
21
|
#
|
|
20
22
|
# @param follow_subdomains [Boolean] When true, follow links on subdomains of the starting URL's domain.
|
|
@@ -176,7 +178,9 @@ module ContextDev
|
|
|
176
178
|
#
|
|
177
179
|
# Capture a screenshot of a website.
|
|
178
180
|
#
|
|
179
|
-
# @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: {})
|
|
181
|
+
# @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: {})
|
|
182
|
+
#
|
|
183
|
+
# @param clear_popups [Boolean] Optional parameter for comprehensive popup cleanup. If 'true', the browser dismi
|
|
180
184
|
#
|
|
181
185
|
# @param color_scheme [Symbol, ContextDev::Models::WebScreenshotParams::ColorScheme] Optional parameter to choose the site's visual theme in the screenshot. Use 'lig
|
|
182
186
|
#
|
|
@@ -218,6 +222,7 @@ module ContextDev
|
|
|
218
222
|
method: :get,
|
|
219
223
|
path: "web/screenshot",
|
|
220
224
|
query: query.transform_keys(
|
|
225
|
+
clear_popups: "clearPopups",
|
|
221
226
|
color_scheme: "colorScheme",
|
|
222
227
|
direct_url: "directUrl",
|
|
223
228
|
full_screenshot: "fullScreenshot",
|
|
@@ -317,11 +322,11 @@ module ContextDev
|
|
|
317
322
|
#
|
|
318
323
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
319
324
|
#
|
|
320
|
-
# @param url_regex [String] Regex pattern. Only URLs matching this pattern will be followed and scraped.
|
|
325
|
+
# @param url_regex [String] Regex pattern. Only URLs matching this pattern will be followed and scraped. An
|
|
321
326
|
#
|
|
322
327
|
# @param use_main_content_only [Boolean] Extract only the main content, stripping headers, footers, sidebars, and navigat
|
|
323
328
|
#
|
|
324
|
-
# @param wait_for_ms [Integer]
|
|
329
|
+
# @param wait_for_ms [Integer] Browser wait time in milliseconds after initial page load for each crawled page.
|
|
325
330
|
#
|
|
326
331
|
# @param zdr [Symbol, ContextDev::Models::WebWebCrawlMdParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro
|
|
327
332
|
#
|
|
@@ -351,7 +356,7 @@ module ContextDev
|
|
|
351
356
|
#
|
|
352
357
|
# @param url [String] Full URL to scrape (must include http:// or https:// protocol)
|
|
353
358
|
#
|
|
354
|
-
# @param actions [Array<ContextDev::Models::WebWebScrapeHTMLParams::Action::Wait, ContextDev::Models::WebWebScrapeHTMLParams::Action::Perform>, nil] Optional browser actions executed in array order after the page loads and before
|
|
359
|
+
# @param actions [Array<ContextDev::Models::WebWebScrapeHTMLParams::Action::Wait, ContextDev::Models::WebWebScrapeHTMLParams::Action::Perform, ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll>, nil] Optional browser actions executed in array order after the page loads and before
|
|
355
360
|
#
|
|
356
361
|
# @param country [Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Country] Fetch the target page through a residential proxy in this country (ISO 3166-1 al
|
|
357
362
|
#
|
|
@@ -418,7 +423,7 @@ module ContextDev
|
|
|
418
423
|
#
|
|
419
424
|
# @param url [String] Page URL to inspect. Must include http:// or https://.
|
|
420
425
|
#
|
|
421
|
-
# @param actions [Array<ContextDev::Models::WebWebScrapeImagesParams::Action::Wait, ContextDev::Models::WebWebScrapeImagesParams::Action::Perform>, nil] Optional browser actions executed in array order after the page loads and before
|
|
426
|
+
# @param actions [Array<ContextDev::Models::WebWebScrapeImagesParams::Action::Wait, ContextDev::Models::WebWebScrapeImagesParams::Action::Perform, ContextDev::Models::WebWebScrapeImagesParams::Action::Scroll>, nil] Optional browser actions executed in array order after the page loads and before
|
|
422
427
|
#
|
|
423
428
|
# @param dedupe [Boolean] When true, visually duplicate images are removed: every image is loaded and perc
|
|
424
429
|
#
|
|
@@ -492,7 +497,7 @@ module ContextDev
|
|
|
492
497
|
#
|
|
493
498
|
# @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr
|
|
494
499
|
#
|
|
495
|
-
# @param actions [Array<ContextDev::Models::WebWebScrapeMdParams::Action::Wait, ContextDev::Models::WebWebScrapeMdParams::Action::Perform>, nil] Optional browser actions executed in array order after the page loads and before
|
|
500
|
+
# @param actions [Array<ContextDev::Models::WebWebScrapeMdParams::Action::Wait, ContextDev::Models::WebWebScrapeMdParams::Action::Perform, ContextDev::Models::WebWebScrapeMdParams::Action::Scroll>, nil] Optional browser actions executed in array order after the page loads and before
|
|
496
501
|
#
|
|
497
502
|
# @param country [Symbol, ContextDev::Models::WebWebScrapeMdParams::Country] Fetch the target page through a residential proxy in this country (ISO 3166-1 al
|
|
498
503
|
#
|
data/lib/context_dev/version.rb
CHANGED
|
@@ -232,6 +232,16 @@ module ContextDev
|
|
|
232
232
|
sig { returns(T::Array[String]) }
|
|
233
233
|
attr_accessor :target_audience
|
|
234
234
|
|
|
235
|
+
# Normalized stock or ordering availability
|
|
236
|
+
sig do
|
|
237
|
+
returns(
|
|
238
|
+
T.nilable(
|
|
239
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
240
|
+
)
|
|
241
|
+
)
|
|
242
|
+
end
|
|
243
|
+
attr_accessor :availability
|
|
244
|
+
|
|
235
245
|
# Billing frequency for the product
|
|
236
246
|
sig do
|
|
237
247
|
returns(
|
|
@@ -250,6 +260,13 @@ module ContextDev
|
|
|
250
260
|
sig { returns(T.nilable(String)) }
|
|
251
261
|
attr_accessor :currency
|
|
252
262
|
|
|
263
|
+
# Dimension statements shown for the product, preserving labels, values, and units
|
|
264
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
265
|
+
attr_reader :dimensions
|
|
266
|
+
|
|
267
|
+
sig { params(dimensions: T::Array[String]).void }
|
|
268
|
+
attr_writer :dimensions
|
|
269
|
+
|
|
253
270
|
# URL to the product image
|
|
254
271
|
sig { returns(T.nilable(String)) }
|
|
255
272
|
attr_accessor :image_url
|
|
@@ -268,6 +285,10 @@ module ContextDev
|
|
|
268
285
|
end
|
|
269
286
|
attr_accessor :pricing_model
|
|
270
287
|
|
|
288
|
+
# Original or regular price before a displayed discount
|
|
289
|
+
sig { returns(T.nilable(Float)) }
|
|
290
|
+
attr_accessor :regular_price
|
|
291
|
+
|
|
271
292
|
# URL to the product page
|
|
272
293
|
sig { returns(T.nilable(String)) }
|
|
273
294
|
attr_accessor :url
|
|
@@ -282,18 +303,24 @@ module ContextDev
|
|
|
282
303
|
sku: T.nilable(String),
|
|
283
304
|
tags: T::Array[String],
|
|
284
305
|
target_audience: T::Array[String],
|
|
306
|
+
availability:
|
|
307
|
+
T.nilable(
|
|
308
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::OrSymbol
|
|
309
|
+
),
|
|
285
310
|
billing_frequency:
|
|
286
311
|
T.nilable(
|
|
287
312
|
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency::OrSymbol
|
|
288
313
|
),
|
|
289
314
|
category: T.nilable(String),
|
|
290
315
|
currency: T.nilable(String),
|
|
316
|
+
dimensions: T::Array[String],
|
|
291
317
|
image_url: T.nilable(String),
|
|
292
318
|
price: T.nilable(Float),
|
|
293
319
|
pricing_model:
|
|
294
320
|
T.nilable(
|
|
295
321
|
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::OrSymbol
|
|
296
322
|
),
|
|
323
|
+
regular_price: T.nilable(Float),
|
|
297
324
|
url: T.nilable(String)
|
|
298
325
|
).returns(T.attached_class)
|
|
299
326
|
end
|
|
@@ -312,18 +339,24 @@ module ContextDev
|
|
|
312
339
|
tags:,
|
|
313
340
|
# Target audience for the product (array of strings)
|
|
314
341
|
target_audience:,
|
|
342
|
+
# Normalized stock or ordering availability
|
|
343
|
+
availability: nil,
|
|
315
344
|
# Billing frequency for the product
|
|
316
345
|
billing_frequency: nil,
|
|
317
346
|
# Category of the product
|
|
318
347
|
category: nil,
|
|
319
348
|
# Currency code for the price (e.g., USD, EUR)
|
|
320
349
|
currency: nil,
|
|
350
|
+
# Dimension statements shown for the product, preserving labels, values, and units
|
|
351
|
+
dimensions: nil,
|
|
321
352
|
# URL to the product image
|
|
322
353
|
image_url: nil,
|
|
323
354
|
# Price of the product
|
|
324
355
|
price: nil,
|
|
325
356
|
# Pricing model for the product
|
|
326
357
|
pricing_model: nil,
|
|
358
|
+
# Original or regular price before a displayed discount
|
|
359
|
+
regular_price: nil,
|
|
327
360
|
# URL to the product page
|
|
328
361
|
url: nil
|
|
329
362
|
)
|
|
@@ -339,18 +372,24 @@ module ContextDev
|
|
|
339
372
|
sku: T.nilable(String),
|
|
340
373
|
tags: T::Array[String],
|
|
341
374
|
target_audience: T::Array[String],
|
|
375
|
+
availability:
|
|
376
|
+
T.nilable(
|
|
377
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
378
|
+
),
|
|
342
379
|
billing_frequency:
|
|
343
380
|
T.nilable(
|
|
344
381
|
ContextDev::Models::AIExtractProductResponse::Product::BillingFrequency::TaggedSymbol
|
|
345
382
|
),
|
|
346
383
|
category: T.nilable(String),
|
|
347
384
|
currency: T.nilable(String),
|
|
385
|
+
dimensions: T::Array[String],
|
|
348
386
|
image_url: T.nilable(String),
|
|
349
387
|
price: T.nilable(Float),
|
|
350
388
|
pricing_model:
|
|
351
389
|
T.nilable(
|
|
352
390
|
ContextDev::Models::AIExtractProductResponse::Product::PricingModel::TaggedSymbol
|
|
353
391
|
),
|
|
392
|
+
regular_price: T.nilable(Float),
|
|
354
393
|
url: T.nilable(String)
|
|
355
394
|
}
|
|
356
395
|
)
|
|
@@ -358,6 +397,66 @@ module ContextDev
|
|
|
358
397
|
def to_hash
|
|
359
398
|
end
|
|
360
399
|
|
|
400
|
+
# Normalized stock or ordering availability
|
|
401
|
+
module Availability
|
|
402
|
+
extend ContextDev::Internal::Type::Enum
|
|
403
|
+
|
|
404
|
+
TaggedSymbol =
|
|
405
|
+
T.type_alias do
|
|
406
|
+
T.all(
|
|
407
|
+
Symbol,
|
|
408
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability
|
|
409
|
+
)
|
|
410
|
+
end
|
|
411
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
412
|
+
|
|
413
|
+
IN_STOCK =
|
|
414
|
+
T.let(
|
|
415
|
+
:in_stock,
|
|
416
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
417
|
+
)
|
|
418
|
+
OUT_OF_STOCK =
|
|
419
|
+
T.let(
|
|
420
|
+
:out_of_stock,
|
|
421
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
422
|
+
)
|
|
423
|
+
LIMITED_AVAILABILITY =
|
|
424
|
+
T.let(
|
|
425
|
+
:limited_availability,
|
|
426
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
427
|
+
)
|
|
428
|
+
PREORDER =
|
|
429
|
+
T.let(
|
|
430
|
+
:preorder,
|
|
431
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
432
|
+
)
|
|
433
|
+
BACKORDER =
|
|
434
|
+
T.let(
|
|
435
|
+
:backorder,
|
|
436
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
437
|
+
)
|
|
438
|
+
MADE_TO_ORDER =
|
|
439
|
+
T.let(
|
|
440
|
+
:made_to_order,
|
|
441
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
442
|
+
)
|
|
443
|
+
DISCONTINUED =
|
|
444
|
+
T.let(
|
|
445
|
+
:discontinued,
|
|
446
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
sig do
|
|
450
|
+
override.returns(
|
|
451
|
+
T::Array[
|
|
452
|
+
ContextDev::Models::AIExtractProductResponse::Product::Availability::TaggedSymbol
|
|
453
|
+
]
|
|
454
|
+
)
|
|
455
|
+
end
|
|
456
|
+
def self.values
|
|
457
|
+
end
|
|
458
|
+
end
|
|
459
|
+
|
|
361
460
|
# Billing frequency for the product
|
|
362
461
|
module BillingFrequency
|
|
363
462
|
extend ContextDev::Internal::Type::Enum
|