context.dev 2.22.0 → 2.23.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 +15 -0
- data/README.md +1 -1
- data/lib/context_dev/models/batch_list_params.rb +21 -4
- data/lib/context_dev/models/batch_submit_params.rb +32 -40
- data/lib/context_dev/models/brand_retrieve_params.rb +599 -14
- data/lib/context_dev/models/parse_handle_params.rb +5 -5
- data/lib/context_dev/models/web_scrape_params.rb +8 -8
- data/lib/context_dev/models/web_scrape_response.rb +2 -2
- data/lib/context_dev/models/web_search_params.rb +15 -13
- data/lib/context_dev/models/web_web_crawl_md_params.rb +21 -15
- data/lib/context_dev/resources/batch.rb +1 -1
- data/lib/context_dev/resources/logs.rb +2 -2
- data/lib/context_dev/resources/web.rb +7 -7
- data/lib/context_dev/version.rb +1 -1
- data/rbi/context_dev/models/batch_list_params.rbi +30 -6
- data/rbi/context_dev/models/batch_submit_params.rbi +36 -48
- data/rbi/context_dev/models/brand_retrieve_params.rbi +4515 -1649
- data/rbi/context_dev/models/parse_handle_params.rbi +6 -6
- data/rbi/context_dev/models/web_scrape_params.rbi +11 -11
- data/rbi/context_dev/models/web_scrape_response.rbi +2 -2
- data/rbi/context_dev/models/web_search_params.rbi +20 -23
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +20 -32
- data/rbi/context_dev/resources/batch.rbi +3 -2
- data/rbi/context_dev/resources/web.rbi +7 -7
- data/sig/context_dev/models/batch_list_params.rbs +17 -5
- data/sig/context_dev/models/brand_retrieve_params.rbs +1148 -15
- data/sig/context_dev/models/web_scrape_params.rbs +5 -5
- data/sig/context_dev/models/web_search_params.rbs +16 -28
- data/sig/context_dev/models/web_web_crawl_md_params.rbs +16 -24
- data/sig/context_dev/resources/batch.rbs +1 -1
- data/sig/context_dev/resources/web.rbs +6 -6
- metadata +2 -2
|
@@ -85,7 +85,7 @@ module ContextDev
|
|
|
85
85
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
86
86
|
|
|
87
87
|
# @!attribute timeout_opts
|
|
88
|
-
# Deadline for the whole request. Defaults to
|
|
88
|
+
# Deadline for the whole request. Defaults to 90000 ms with `fail`. Fixed waits
|
|
89
89
|
# must end before it.
|
|
90
90
|
#
|
|
91
91
|
# @return [ContextDev::Models::WebScrapeParams::TimeoutOpts, nil]
|
|
@@ -125,7 +125,7 @@ module ContextDev
|
|
|
125
125
|
#
|
|
126
126
|
# @param tags [Array<String>] Labels for tracking request usage. Not retained when zdr is enabled.
|
|
127
127
|
#
|
|
128
|
-
# @param timeout_opts [ContextDev::Models::WebScrapeParams::TimeoutOpts] Deadline for the whole request. Defaults to
|
|
128
|
+
# @param timeout_opts [ContextDev::Models::WebScrapeParams::TimeoutOpts] Deadline for the whole request. Defaults to 90000 ms with `fail`. Fixed waits mu
|
|
129
129
|
#
|
|
130
130
|
# @param zdr [Symbol, ContextDev::Models::WebScrapeParams::Zdr] `enabled` turns on zero data retention. Your organization must have ZDR enabled.
|
|
131
131
|
#
|
|
@@ -460,16 +460,16 @@ module ContextDev
|
|
|
460
460
|
end
|
|
461
461
|
|
|
462
462
|
class ProductParams < ContextDev::Internal::Type::BaseModel
|
|
463
|
-
# @!attribute
|
|
464
|
-
#
|
|
463
|
+
# @!attribute dedupe_images
|
|
464
|
+
# Drop visually duplicate product images, keeping the largest copy.
|
|
465
465
|
#
|
|
466
466
|
# @return [Boolean, nil]
|
|
467
|
-
optional :
|
|
467
|
+
optional :dedupe_images, ContextDev::Internal::Type::Boolean, api_name: :dedupeImages
|
|
468
468
|
|
|
469
|
-
# @!method initialize(
|
|
469
|
+
# @!method initialize(dedupe_images: nil)
|
|
470
470
|
# Product options. Requires formats.product: true.
|
|
471
471
|
#
|
|
472
|
-
# @param
|
|
472
|
+
# @param dedupe_images [Boolean] Drop visually duplicate product images, keeping the largest copy.
|
|
473
473
|
end
|
|
474
474
|
|
|
475
475
|
class ScreenshotParams < ContextDev::Internal::Type::BaseModel
|
|
@@ -1006,7 +1006,7 @@ module ContextDev
|
|
|
1006
1006
|
# Some parameter documentations has been truncated, see
|
|
1007
1007
|
# {ContextDev::Models::WebScrapeParams::TimeoutOpts} for more details.
|
|
1008
1008
|
#
|
|
1009
|
-
# Deadline for the whole request. Defaults to
|
|
1009
|
+
# Deadline for the whole request. Defaults to 90000 ms with `fail`. Fixed waits
|
|
1010
1010
|
# must end before it.
|
|
1011
1011
|
#
|
|
1012
1012
|
# @param milliseconds [Integer] Deadline in milliseconds.
|
|
@@ -178,7 +178,7 @@ module ContextDev
|
|
|
178
178
|
# @see ContextDev::Models::WebScrapeResponse::Bytes#data
|
|
179
179
|
class Data < ContextDev::Internal::Type::BaseModel
|
|
180
180
|
# @!attribute base64
|
|
181
|
-
# Body as base64, after HTTP decompression. Up to
|
|
181
|
+
# Body as base64, after HTTP decompression. Up to 50 MiB decoded.
|
|
182
182
|
#
|
|
183
183
|
# @return [String]
|
|
184
184
|
required :base64, String
|
|
@@ -189,7 +189,7 @@ module ContextDev
|
|
|
189
189
|
required :content_type, String, api_name: :contentType
|
|
190
190
|
|
|
191
191
|
# @!method initialize(base64:, content_type:)
|
|
192
|
-
# @param base64 [String] Body as base64, after HTTP decompression. Up to
|
|
192
|
+
# @param base64 [String] Body as base64, after HTTP decompression. Up to 50 MiB decoded.
|
|
193
193
|
#
|
|
194
194
|
# @param content_type [String]
|
|
195
195
|
end
|
|
@@ -41,7 +41,8 @@ module ContextDev
|
|
|
41
41
|
# @return [ContextDev::Models::WebSearchParams::HighlightsOptions, nil]
|
|
42
42
|
optional :highlights_options,
|
|
43
43
|
-> { ContextDev::WebSearchParams::HighlightsOptions },
|
|
44
|
-
api_name: :highlightsOptions
|
|
44
|
+
api_name: :highlightsOptions,
|
|
45
|
+
nil?: true
|
|
45
46
|
|
|
46
47
|
# @!attribute include_domains
|
|
47
48
|
# Allowlist — only return results from these domains. Up to 100 domains. Example:
|
|
@@ -56,7 +57,8 @@ module ContextDev
|
|
|
56
57
|
# @return [ContextDev::Models::WebSearchParams::MarkdownOptions, nil]
|
|
57
58
|
optional :markdown_options,
|
|
58
59
|
-> { ContextDev::WebSearchParams::MarkdownOptions },
|
|
59
|
-
api_name: :markdownOptions
|
|
60
|
+
api_name: :markdownOptions,
|
|
61
|
+
nil?: true
|
|
60
62
|
|
|
61
63
|
# @!attribute num_results
|
|
62
64
|
# Number of results to request and return (10–100). Defaults to 10.
|
|
@@ -101,11 +103,11 @@ module ContextDev
|
|
|
101
103
|
#
|
|
102
104
|
# @param freshness [Symbol, ContextDev::Models::WebSearchParams::Freshness] Restrict results to content published within this window.
|
|
103
105
|
#
|
|
104
|
-
# @param highlights_options [ContextDev::Models::WebSearchParams::HighlightsOptions] Passages from each result page that are relevant to the query. Pages are read wi
|
|
106
|
+
# @param highlights_options [ContextDev::Models::WebSearchParams::HighlightsOptions, nil] Passages from each result page that are relevant to the query. Pages are read wi
|
|
105
107
|
#
|
|
106
108
|
# @param include_domains [Array<String>] Allowlist — only return results from these domains. Up to 100 domains. Example:
|
|
107
109
|
#
|
|
108
|
-
# @param markdown_options [ContextDev::Models::WebSearchParams::MarkdownOptions] Inline Markdown scraping for each result. Set `enabled: true` to activate.
|
|
110
|
+
# @param markdown_options [ContextDev::Models::WebSearchParams::MarkdownOptions, nil] Inline Markdown scraping for each result. Set `enabled: true` to activate.
|
|
109
111
|
#
|
|
110
112
|
# @param num_results [Integer] Number of results to request and return (10–100). Defaults to 10.
|
|
111
113
|
#
|
|
@@ -435,10 +437,10 @@ module ContextDev
|
|
|
435
437
|
# 365 days. Set to 0 to force a fresh scrape.
|
|
436
438
|
#
|
|
437
439
|
# @return [Integer, nil]
|
|
438
|
-
optional :max_age_ms, Integer, api_name: :maxAgeMs
|
|
440
|
+
optional :max_age_ms, Integer, api_name: :maxAgeMs, nil?: true
|
|
439
441
|
|
|
440
442
|
# @!attribute pdf
|
|
441
|
-
# PDF handling.
|
|
443
|
+
# PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
|
|
442
444
|
#
|
|
443
445
|
# @return [ContextDev::Models::WebSearchParams::MarkdownOptions::Pdf, nil]
|
|
444
446
|
optional :pdf, -> { ContextDev::WebSearchParams::MarkdownOptions::Pdf }
|
|
@@ -468,7 +470,7 @@ module ContextDev
|
|
|
468
470
|
# JS-heavy pages.
|
|
469
471
|
#
|
|
470
472
|
# @return [Integer, nil]
|
|
471
|
-
optional :wait_for_ms, Integer, api_name: :waitForMs
|
|
473
|
+
optional :wait_for_ms, Integer, api_name: :waitForMs, nil?: true
|
|
472
474
|
|
|
473
475
|
# @!method initialize(enabled: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, pdf: nil, shorten_base64_images: nil, timeout_opts: nil, use_main_content_only: nil, wait_for_ms: nil)
|
|
474
476
|
# Some parameter documentations has been truncated, see
|
|
@@ -484,9 +486,9 @@ module ContextDev
|
|
|
484
486
|
#
|
|
485
487
|
# @param include_links [Boolean] Keep hyperlinks in the Markdown.
|
|
486
488
|
#
|
|
487
|
-
# @param max_age_ms [Integer] Maximum cache age in milliseconds for result page content. Defaults to 180 days
|
|
489
|
+
# @param max_age_ms [Integer, nil] Maximum cache age in milliseconds for result page content. Defaults to 180 days
|
|
488
490
|
#
|
|
489
|
-
# @param pdf [ContextDev::Models::WebSearchParams::MarkdownOptions::Pdf] PDF handling.
|
|
491
|
+
# @param pdf [ContextDev::Models::WebSearchParams::MarkdownOptions::Pdf] PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
|
|
490
492
|
#
|
|
491
493
|
# @param shorten_base64_images [Boolean] Truncate inline base64 image payloads to keep responses small.
|
|
492
494
|
#
|
|
@@ -494,7 +496,7 @@ module ContextDev
|
|
|
494
496
|
#
|
|
495
497
|
# @param use_main_content_only [Boolean] Strip nav, header, footer, and sidebar — keep only the primary article content.
|
|
496
498
|
#
|
|
497
|
-
# @param wait_for_ms [Integer] Extra wait after page load before rendering, in ms (0–30000). Useful for JS-heav
|
|
499
|
+
# @param wait_for_ms [Integer, nil] Extra wait after page load before rendering, in ms (0–30000). Useful for JS-heav
|
|
498
500
|
|
|
499
501
|
# @see ContextDev::Models::WebSearchParams::MarkdownOptions#pdf
|
|
500
502
|
class Pdf < ContextDev::Internal::Type::BaseModel
|
|
@@ -512,7 +514,7 @@ module ContextDev
|
|
|
512
514
|
optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
|
|
513
515
|
|
|
514
516
|
# @!attribute start
|
|
515
|
-
# First
|
|
517
|
+
# First 1-based PDF page to parse.
|
|
516
518
|
#
|
|
517
519
|
# @return [Integer, nil]
|
|
518
520
|
optional :start, Integer
|
|
@@ -521,13 +523,13 @@ module ContextDev
|
|
|
521
523
|
# Some parameter documentations has been truncated, see
|
|
522
524
|
# {ContextDev::Models::WebSearchParams::MarkdownOptions::Pdf} for more details.
|
|
523
525
|
#
|
|
524
|
-
# PDF handling.
|
|
526
|
+
# PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
|
|
525
527
|
#
|
|
526
528
|
# @param end_ [Integer] Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must be
|
|
527
529
|
#
|
|
528
530
|
# @param should_parse [Boolean] Parse PDF URLs. When false, PDF results are skipped with WEBSITE_ACCESS_ERROR.
|
|
529
531
|
#
|
|
530
|
-
# @param start [Integer] First
|
|
532
|
+
# @param start [Integer] First 1-based PDF page to parse.
|
|
531
533
|
end
|
|
532
534
|
|
|
533
535
|
# @see ContextDev::Models::WebSearchParams::MarkdownOptions#timeout_opts
|
|
@@ -23,7 +23,10 @@ module ContextDev
|
|
|
23
23
|
# Remove matching elements after inclusions. Exclusions take precedence.
|
|
24
24
|
#
|
|
25
25
|
# @return [Array<String>, nil]
|
|
26
|
-
optional :exclude_selectors,
|
|
26
|
+
optional :exclude_selectors,
|
|
27
|
+
ContextDev::Internal::Type::ArrayOf[String],
|
|
28
|
+
api_name: :excludeSelectors,
|
|
29
|
+
nil?: true
|
|
27
30
|
|
|
28
31
|
# @!attribute follow_subdomains
|
|
29
32
|
# When true, follow links on subdomains of the starting URL's domain (e.g.
|
|
@@ -56,13 +59,16 @@ module ContextDev
|
|
|
56
59
|
# Keep matching HTML subtrees before converting each page to Markdown.
|
|
57
60
|
#
|
|
58
61
|
# @return [Array<String>, nil]
|
|
59
|
-
optional :include_selectors,
|
|
62
|
+
optional :include_selectors,
|
|
63
|
+
ContextDev::Internal::Type::ArrayOf[String],
|
|
64
|
+
api_name: :includeSelectors,
|
|
65
|
+
nil?: true
|
|
60
66
|
|
|
61
67
|
# @!attribute max_age_ms
|
|
62
68
|
# Maximum cache age in milliseconds. Defaults to 1 day; `0` fetches fresh.
|
|
63
69
|
#
|
|
64
70
|
# @return [Integer, nil]
|
|
65
|
-
optional :max_age_ms, Integer, api_name: :maxAgeMs
|
|
71
|
+
optional :max_age_ms, Integer, api_name: :maxAgeMs, nil?: true
|
|
66
72
|
|
|
67
73
|
# @!attribute max_depth
|
|
68
74
|
# Maximum link depth from the starting URL (0 = only the starting page)
|
|
@@ -134,7 +140,7 @@ module ContextDev
|
|
|
134
140
|
# Defaults to 3500 (3.5 seconds). Min: 0. Max: 30000 (30 seconds).
|
|
135
141
|
#
|
|
136
142
|
# @return [Integer, nil]
|
|
137
|
-
optional :wait_for_ms, Integer, api_name: :waitForMs
|
|
143
|
+
optional :wait_for_ms, Integer, api_name: :waitForMs, nil?: true
|
|
138
144
|
|
|
139
145
|
# @!attribute zdr
|
|
140
146
|
# `enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless
|
|
@@ -151,7 +157,7 @@ module ContextDev
|
|
|
151
157
|
#
|
|
152
158
|
# @param country [Symbol, ContextDev::Models::WebWebCrawlMdParams::Country] Fetch from this country (ISO 3166-1 alpha-2).
|
|
153
159
|
#
|
|
154
|
-
# @param exclude_selectors [Array<String
|
|
160
|
+
# @param exclude_selectors [Array<String>, nil] Remove matching elements after inclusions. Exclusions take precedence.
|
|
155
161
|
#
|
|
156
162
|
# @param follow_subdomains [Boolean] When true, follow links on subdomains of the starting URL's domain (e.g. docs.ex
|
|
157
163
|
#
|
|
@@ -161,9 +167,9 @@ module ContextDev
|
|
|
161
167
|
#
|
|
162
168
|
# @param include_links [Boolean] Preserve hyperlinks in the Markdown output
|
|
163
169
|
#
|
|
164
|
-
# @param include_selectors [Array<String
|
|
170
|
+
# @param include_selectors [Array<String>, nil] Keep matching HTML subtrees before converting each page to Markdown.
|
|
165
171
|
#
|
|
166
|
-
# @param max_age_ms [Integer] Maximum cache age in milliseconds. Defaults to 1 day; `0` fetches fresh.
|
|
172
|
+
# @param max_age_ms [Integer, nil] Maximum cache age in milliseconds. Defaults to 1 day; `0` fetches fresh.
|
|
167
173
|
#
|
|
168
174
|
# @param max_depth [Integer] Maximum link depth from the starting URL (0 = only the starting page)
|
|
169
175
|
#
|
|
@@ -185,7 +191,7 @@ module ContextDev
|
|
|
185
191
|
#
|
|
186
192
|
# @param use_main_content_only [Boolean] Extract only the main content, stripping headers, footers, sidebars, and navigat
|
|
187
193
|
#
|
|
188
|
-
# @param wait_for_ms [Integer] Browser wait time in milliseconds after initial page load for each crawled page.
|
|
194
|
+
# @param wait_for_ms [Integer, nil] Browser wait time in milliseconds after initial page load for each crawled page.
|
|
189
195
|
#
|
|
190
196
|
# @param zdr [Symbol, ContextDev::Models::WebWebCrawlMdParams::Zdr] `enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless you
|
|
191
197
|
#
|
|
@@ -406,14 +412,14 @@ module ContextDev
|
|
|
406
412
|
|
|
407
413
|
class Pdf < ContextDev::Internal::Type::BaseModel
|
|
408
414
|
# @!attribute end_
|
|
409
|
-
# Last
|
|
410
|
-
#
|
|
415
|
+
# Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must
|
|
416
|
+
# be >= start.
|
|
411
417
|
#
|
|
412
418
|
# @return [Integer, nil]
|
|
413
419
|
optional :end_, Integer, api_name: :end
|
|
414
420
|
|
|
415
421
|
# @!attribute ocr
|
|
416
|
-
# Read scanned PDF pages with OCR; preserve pages that already
|
|
422
|
+
# Read scanned PDF pages with OCR; preserve pages that already have text.
|
|
417
423
|
#
|
|
418
424
|
# @return [Boolean, nil]
|
|
419
425
|
optional :ocr, ContextDev::Internal::Type::Boolean
|
|
@@ -426,7 +432,7 @@ module ContextDev
|
|
|
426
432
|
optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
|
|
427
433
|
|
|
428
434
|
# @!attribute start
|
|
429
|
-
# First 1-based PDF page to parse.
|
|
435
|
+
# First 1-based PDF page to parse.
|
|
430
436
|
#
|
|
431
437
|
# @return [Integer, nil]
|
|
432
438
|
optional :start, Integer
|
|
@@ -437,13 +443,13 @@ module ContextDev
|
|
|
437
443
|
#
|
|
438
444
|
# PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
|
|
439
445
|
#
|
|
440
|
-
# @param end_ [Integer] Last
|
|
446
|
+
# @param end_ [Integer] Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must be
|
|
441
447
|
#
|
|
442
|
-
# @param ocr [Boolean] Read scanned PDF pages with OCR; preserve pages that already
|
|
448
|
+
# @param ocr [Boolean] Read scanned PDF pages with OCR; preserve pages that already have text.
|
|
443
449
|
#
|
|
444
450
|
# @param should_parse [Boolean] When true, PDF pages are fetched and parsed. When false, PDF pages are skipped e
|
|
445
451
|
#
|
|
446
|
-
# @param start [Integer] First 1-based PDF page to parse.
|
|
452
|
+
# @param start [Integer] First 1-based PDF page to parse.
|
|
447
453
|
end
|
|
448
454
|
|
|
449
455
|
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
@@ -42,7 +42,7 @@ module ContextDev
|
|
|
42
42
|
#
|
|
43
43
|
# @param status [Symbol, ContextDev::Models::BatchListParams::Status] Filter by status.
|
|
44
44
|
#
|
|
45
|
-
# @param tags [String]
|
|
45
|
+
# @param tags [String, Array<String>] Tags to filter by (matches batches having any of them). Pass repeated `tags` par
|
|
46
46
|
#
|
|
47
47
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
48
48
|
#
|
|
@@ -18,7 +18,7 @@ module ContextDev
|
|
|
18
18
|
def retrieve(request_id, params = {})
|
|
19
19
|
@client.request(
|
|
20
20
|
method: :get,
|
|
21
|
-
path: ["logs/%1$s", request_id],
|
|
21
|
+
path: ["org/logs/%1$s", request_id],
|
|
22
22
|
model: ContextDev::Models::LogRetrieveResponse,
|
|
23
23
|
options: params[:request_options]
|
|
24
24
|
)
|
|
@@ -64,7 +64,7 @@ module ContextDev
|
|
|
64
64
|
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
65
65
|
@client.request(
|
|
66
66
|
method: :get,
|
|
67
|
-
path: "logs",
|
|
67
|
+
path: "org/logs",
|
|
68
68
|
query: query,
|
|
69
69
|
model: ContextDev::Models::LogListResponse,
|
|
70
70
|
options: options
|
|
@@ -200,7 +200,7 @@ module ContextDev
|
|
|
200
200
|
#
|
|
201
201
|
# @param tags [Array<String>] Labels for tracking request usage. Not retained when zdr is enabled.
|
|
202
202
|
#
|
|
203
|
-
# @param timeout_opts [ContextDev::Models::WebScrapeParams::TimeoutOpts] Deadline for the whole request. Defaults to
|
|
203
|
+
# @param timeout_opts [ContextDev::Models::WebScrapeParams::TimeoutOpts] Deadline for the whole request. Defaults to 90000 ms with `fail`. Fixed waits mu
|
|
204
204
|
#
|
|
205
205
|
# @param zdr [Symbol, ContextDev::Models::WebScrapeParams::Zdr] `enabled` turns on zero data retention. Your organization must have ZDR enabled.
|
|
206
206
|
#
|
|
@@ -302,11 +302,11 @@ module ContextDev
|
|
|
302
302
|
#
|
|
303
303
|
# @param freshness [Symbol, ContextDev::Models::WebSearchParams::Freshness] Restrict results to content published within this window.
|
|
304
304
|
#
|
|
305
|
-
# @param highlights_options [ContextDev::Models::WebSearchParams::HighlightsOptions] Passages from each result page that are relevant to the query. Pages are read wi
|
|
305
|
+
# @param highlights_options [ContextDev::Models::WebSearchParams::HighlightsOptions, nil] Passages from each result page that are relevant to the query. Pages are read wi
|
|
306
306
|
#
|
|
307
307
|
# @param include_domains [Array<String>] Allowlist — only return results from these domains. Up to 100 domains. Example:
|
|
308
308
|
#
|
|
309
|
-
# @param markdown_options [ContextDev::Models::WebSearchParams::MarkdownOptions] Inline Markdown scraping for each result. Set `enabled: true` to activate.
|
|
309
|
+
# @param markdown_options [ContextDev::Models::WebSearchParams::MarkdownOptions, nil] Inline Markdown scraping for each result. Set `enabled: true` to activate.
|
|
310
310
|
#
|
|
311
311
|
# @param num_results [Integer] Number of results to request and return (10–100). Defaults to 10.
|
|
312
312
|
#
|
|
@@ -346,7 +346,7 @@ module ContextDev
|
|
|
346
346
|
#
|
|
347
347
|
# @param country [Symbol, ContextDev::Models::WebWebCrawlMdParams::Country] Fetch from this country (ISO 3166-1 alpha-2).
|
|
348
348
|
#
|
|
349
|
-
# @param exclude_selectors [Array<String
|
|
349
|
+
# @param exclude_selectors [Array<String>, nil] Remove matching elements after inclusions. Exclusions take precedence.
|
|
350
350
|
#
|
|
351
351
|
# @param follow_subdomains [Boolean] When true, follow links on subdomains of the starting URL's domain (e.g. docs.ex
|
|
352
352
|
#
|
|
@@ -356,9 +356,9 @@ module ContextDev
|
|
|
356
356
|
#
|
|
357
357
|
# @param include_links [Boolean] Preserve hyperlinks in the Markdown output
|
|
358
358
|
#
|
|
359
|
-
# @param include_selectors [Array<String
|
|
359
|
+
# @param include_selectors [Array<String>, nil] Keep matching HTML subtrees before converting each page to Markdown.
|
|
360
360
|
#
|
|
361
|
-
# @param max_age_ms [Integer] Maximum cache age in milliseconds. Defaults to 1 day; `0` fetches fresh.
|
|
361
|
+
# @param max_age_ms [Integer, nil] Maximum cache age in milliseconds. Defaults to 1 day; `0` fetches fresh.
|
|
362
362
|
#
|
|
363
363
|
# @param max_depth [Integer] Maximum link depth from the starting URL (0 = only the starting page)
|
|
364
364
|
#
|
|
@@ -380,7 +380,7 @@ module ContextDev
|
|
|
380
380
|
#
|
|
381
381
|
# @param use_main_content_only [Boolean] Extract only the main content, stripping headers, footers, sidebars, and navigat
|
|
382
382
|
#
|
|
383
|
-
# @param wait_for_ms [Integer] Browser wait time in milliseconds after initial page load for each crawled page.
|
|
383
|
+
# @param wait_for_ms [Integer, nil] Browser wait time in milliseconds after initial page load for each crawled page.
|
|
384
384
|
#
|
|
385
385
|
# @param zdr [Symbol, ContextDev::Models::WebWebCrawlMdParams::Zdr] `enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless you
|
|
386
386
|
#
|
data/lib/context_dev/version.rb
CHANGED
|
@@ -54,11 +54,12 @@ module ContextDev
|
|
|
54
54
|
sig { params(status: ContextDev::BatchListParams::Status::OrSymbol).void }
|
|
55
55
|
attr_writer :status
|
|
56
56
|
|
|
57
|
-
#
|
|
58
|
-
|
|
57
|
+
# Tags to filter by (matches batches having any of them). Pass repeated `tags`
|
|
58
|
+
# params or one comma-separated list, e.g. `tags=docs,competitor`.
|
|
59
|
+
sig { returns(T.nilable(ContextDev::BatchListParams::Tags::Variants)) }
|
|
59
60
|
attr_reader :tags
|
|
60
61
|
|
|
61
|
-
sig { params(tags:
|
|
62
|
+
sig { params(tags: ContextDev::BatchListParams::Tags::Variants).void }
|
|
62
63
|
attr_writer :tags
|
|
63
64
|
|
|
64
65
|
sig do
|
|
@@ -68,7 +69,7 @@ module ContextDev
|
|
|
68
69
|
q: String,
|
|
69
70
|
search_type: ContextDev::BatchListParams::SearchType::OrSymbol,
|
|
70
71
|
status: ContextDev::BatchListParams::Status::OrSymbol,
|
|
71
|
-
tags:
|
|
72
|
+
tags: ContextDev::BatchListParams::Tags::Variants,
|
|
72
73
|
request_options: ContextDev::RequestOptions::OrHash
|
|
73
74
|
).returns(T.attached_class)
|
|
74
75
|
end
|
|
@@ -85,7 +86,8 @@ module ContextDev
|
|
|
85
86
|
search_type: nil,
|
|
86
87
|
# Filter by status.
|
|
87
88
|
status: nil,
|
|
88
|
-
#
|
|
89
|
+
# Tags to filter by (matches batches having any of them). Pass repeated `tags`
|
|
90
|
+
# params or one comma-separated list, e.g. `tags=docs,competitor`.
|
|
89
91
|
tags: nil,
|
|
90
92
|
request_options: {}
|
|
91
93
|
)
|
|
@@ -99,7 +101,7 @@ module ContextDev
|
|
|
99
101
|
q: String,
|
|
100
102
|
search_type: ContextDev::BatchListParams::SearchType::OrSymbol,
|
|
101
103
|
status: ContextDev::BatchListParams::Status::OrSymbol,
|
|
102
|
-
tags:
|
|
104
|
+
tags: ContextDev::BatchListParams::Tags::Variants,
|
|
103
105
|
request_options: ContextDev::RequestOptions
|
|
104
106
|
}
|
|
105
107
|
)
|
|
@@ -161,6 +163,28 @@ module ContextDev
|
|
|
161
163
|
def self.values
|
|
162
164
|
end
|
|
163
165
|
end
|
|
166
|
+
|
|
167
|
+
# Tags to filter by (matches batches having any of them). Pass repeated `tags`
|
|
168
|
+
# params or one comma-separated list, e.g. `tags=docs,competitor`.
|
|
169
|
+
module Tags
|
|
170
|
+
extend ContextDev::Internal::Type::Union
|
|
171
|
+
|
|
172
|
+
Variants = T.type_alias { T.any(String, T::Array[String]) }
|
|
173
|
+
|
|
174
|
+
sig do
|
|
175
|
+
override.returns(
|
|
176
|
+
T::Array[ContextDev::BatchListParams::Tags::Variants]
|
|
177
|
+
)
|
|
178
|
+
end
|
|
179
|
+
def self.variants
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
StringArray =
|
|
183
|
+
T.let(
|
|
184
|
+
ContextDev::Internal::Type::ArrayOf[String],
|
|
185
|
+
ContextDev::Internal::Type::Converter
|
|
186
|
+
)
|
|
187
|
+
end
|
|
164
188
|
end
|
|
165
189
|
end
|
|
166
190
|
end
|