context.dev 2.6.0 → 2.7.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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/models/batch_cancel_response.rb +70 -183
  5. data/lib/context_dev/models/batch_list_response.rb +86 -95
  6. data/lib/context_dev/models/batch_retrieve_response.rb +86 -103
  7. data/lib/context_dev/models/crawl_controls.rb +126 -0
  8. data/lib/context_dev/models/failure.rb +27 -0
  9. data/lib/context_dev/models/intake.rb +62 -0
  10. data/lib/context_dev/models/{error_count.rb → page_error_count.rb} +1 -1
  11. data/lib/context_dev/models/web_screenshot_params.rb +5 -7
  12. data/lib/context_dev/models/web_web_crawl_md_params.rb +5 -7
  13. data/lib/context_dev/models/web_web_scrape_html_params.rb +5 -7
  14. data/lib/context_dev/models/web_web_scrape_md_params.rb +5 -7
  15. data/lib/context_dev/models.rb +6 -2
  16. data/lib/context_dev/resources/batch.rb +3 -6
  17. data/lib/context_dev/resources/web.rb +4 -4
  18. data/lib/context_dev/version.rb +1 -1
  19. data/lib/context_dev.rb +4 -2
  20. data/rbi/context_dev/models/batch_cancel_response.rbi +98 -316
  21. data/rbi/context_dev/models/batch_list_response.rbi +127 -152
  22. data/rbi/context_dev/models/batch_retrieve_response.rbi +126 -161
  23. data/rbi/context_dev/models/crawl_controls.rbi +252 -0
  24. data/rbi/context_dev/models/{error.rbi → failure.rbi} +10 -7
  25. data/rbi/context_dev/models/intake.rbi +88 -0
  26. data/rbi/context_dev/models/{error_count.rbi → page_error_count.rbi} +2 -2
  27. data/rbi/context_dev/models/web_screenshot_params.rbi +6 -9
  28. data/rbi/context_dev/models/web_web_crawl_md_params.rbi +6 -9
  29. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +6 -9
  30. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +6 -9
  31. data/rbi/context_dev/models.rbi +6 -2
  32. data/rbi/context_dev/resources/batch.rbi +3 -6
  33. data/rbi/context_dev/resources/web.rbi +8 -12
  34. data/sig/context_dev/models/batch_cancel_response.rbs +32 -124
  35. data/sig/context_dev/models/batch_list_response.rbs +42 -63
  36. data/sig/context_dev/models/batch_retrieve_response.rbs +42 -70
  37. data/sig/context_dev/models/crawl_controls.rbs +114 -0
  38. data/sig/context_dev/models/{error.rbs → failure.rbs} +2 -2
  39. data/sig/context_dev/models/intake.rbs +40 -0
  40. data/sig/context_dev/models/{error_count.rbs → page_error_count.rbs} +2 -2
  41. data/sig/context_dev/models.rbs +6 -2
  42. metadata +14 -8
  43. data/lib/context_dev/models/error.rb +0 -26
@@ -0,0 +1,252 @@
1
+ # typed: strong
2
+
3
+ module ContextDev
4
+ module Models
5
+ class CrawlControls < ContextDev::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(ContextDev::CrawlControls, ContextDev::Internal::AnyHash)
9
+ end
10
+
11
+ # Whether links to subdomains were followed. Always false for a sitemap crawl.
12
+ sig { returns(T::Boolean) }
13
+ attr_accessor :follow_subdomains
14
+
15
+ # Link depth limit. Always 0 for a sitemap crawl, which never follows links off
16
+ # its URLs; null when a `start_url` crawl set no limit.
17
+ sig { returns(T.nilable(Integer)) }
18
+ attr_accessor :max_depth
19
+
20
+ # The `maxUrls` submitted with the crawl. A sitemap crawl scrapes only the URLs
21
+ # its sitemap actually lists, up to this many, so `input.reserved` is often lower.
22
+ sig { returns(Integer) }
23
+ attr_accessor :max_pages
24
+
25
+ # Where the crawl started.
26
+ sig { returns(ContextDev::CrawlControls::Source::Variants) }
27
+ attr_accessor :source
28
+
29
+ # RE2 pattern URLs had to match to be crawled. Null when the crawl set none.
30
+ sig { returns(T.nilable(String)) }
31
+ attr_accessor :url_pattern
32
+
33
+ # The crawl controls as submitted, so the limits requested can be compared against
34
+ # what the crawl reached.
35
+ sig do
36
+ params(
37
+ follow_subdomains: T::Boolean,
38
+ max_depth: T.nilable(Integer),
39
+ max_pages: Integer,
40
+ source:
41
+ T.any(
42
+ ContextDev::CrawlControls::Source::UnionMember0::OrHash,
43
+ ContextDev::CrawlControls::Source::UnionMember1::OrHash
44
+ ),
45
+ url_pattern: T.nilable(String)
46
+ ).returns(T.attached_class)
47
+ end
48
+ def self.new(
49
+ # Whether links to subdomains were followed. Always false for a sitemap crawl.
50
+ follow_subdomains:,
51
+ # Link depth limit. Always 0 for a sitemap crawl, which never follows links off
52
+ # its URLs; null when a `start_url` crawl set no limit.
53
+ max_depth:,
54
+ # The `maxUrls` submitted with the crawl. A sitemap crawl scrapes only the URLs
55
+ # its sitemap actually lists, up to this many, so `input.reserved` is often lower.
56
+ max_pages:,
57
+ # Where the crawl started.
58
+ source:,
59
+ # RE2 pattern URLs had to match to be crawled. Null when the crawl set none.
60
+ url_pattern:
61
+ )
62
+ end
63
+
64
+ sig do
65
+ override.returns(
66
+ {
67
+ follow_subdomains: T::Boolean,
68
+ max_depth: T.nilable(Integer),
69
+ max_pages: Integer,
70
+ source: ContextDev::CrawlControls::Source::Variants,
71
+ url_pattern: T.nilable(String)
72
+ }
73
+ )
74
+ end
75
+ def to_hash
76
+ end
77
+
78
+ # Where the crawl started.
79
+ module Source
80
+ extend ContextDev::Internal::Type::Union
81
+
82
+ Variants =
83
+ T.type_alias do
84
+ T.any(
85
+ ContextDev::CrawlControls::Source::UnionMember0,
86
+ ContextDev::CrawlControls::Source::UnionMember1
87
+ )
88
+ end
89
+
90
+ class UnionMember0 < ContextDev::Internal::Type::BaseModel
91
+ OrHash =
92
+ T.type_alias do
93
+ T.any(
94
+ ContextDev::CrawlControls::Source::UnionMember0,
95
+ ContextDev::Internal::AnyHash
96
+ )
97
+ end
98
+
99
+ sig do
100
+ returns(
101
+ ContextDev::CrawlControls::Source::UnionMember0::Type::TaggedSymbol
102
+ )
103
+ end
104
+ attr_accessor :type
105
+
106
+ # Page the crawl started from.
107
+ sig { returns(String) }
108
+ attr_accessor :url
109
+
110
+ sig do
111
+ params(
112
+ type:
113
+ ContextDev::CrawlControls::Source::UnionMember0::Type::OrSymbol,
114
+ url: String
115
+ ).returns(T.attached_class)
116
+ end
117
+ def self.new(
118
+ type:,
119
+ # Page the crawl started from.
120
+ url:
121
+ )
122
+ end
123
+
124
+ sig do
125
+ override.returns(
126
+ {
127
+ type:
128
+ ContextDev::CrawlControls::Source::UnionMember0::Type::TaggedSymbol,
129
+ url: String
130
+ }
131
+ )
132
+ end
133
+ def to_hash
134
+ end
135
+
136
+ module Type
137
+ extend ContextDev::Internal::Type::Enum
138
+
139
+ TaggedSymbol =
140
+ T.type_alias do
141
+ T.all(
142
+ Symbol,
143
+ ContextDev::CrawlControls::Source::UnionMember0::Type
144
+ )
145
+ end
146
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
147
+
148
+ START_URL =
149
+ T.let(
150
+ :start_url,
151
+ ContextDev::CrawlControls::Source::UnionMember0::Type::TaggedSymbol
152
+ )
153
+
154
+ sig do
155
+ override.returns(
156
+ T::Array[
157
+ ContextDev::CrawlControls::Source::UnionMember0::Type::TaggedSymbol
158
+ ]
159
+ )
160
+ end
161
+ def self.values
162
+ end
163
+ end
164
+ end
165
+
166
+ class UnionMember1 < ContextDev::Internal::Type::BaseModel
167
+ OrHash =
168
+ T.type_alias do
169
+ T.any(
170
+ ContextDev::CrawlControls::Source::UnionMember1,
171
+ ContextDev::Internal::AnyHash
172
+ )
173
+ end
174
+
175
+ # Domain whose sitemap supplied the pages.
176
+ sig { returns(String) }
177
+ attr_accessor :domain
178
+
179
+ sig do
180
+ returns(
181
+ ContextDev::CrawlControls::Source::UnionMember1::Type::TaggedSymbol
182
+ )
183
+ end
184
+ attr_accessor :type
185
+
186
+ sig do
187
+ params(
188
+ domain: String,
189
+ type:
190
+ ContextDev::CrawlControls::Source::UnionMember1::Type::OrSymbol
191
+ ).returns(T.attached_class)
192
+ end
193
+ def self.new(
194
+ # Domain whose sitemap supplied the pages.
195
+ domain:,
196
+ type:
197
+ )
198
+ end
199
+
200
+ sig do
201
+ override.returns(
202
+ {
203
+ domain: String,
204
+ type:
205
+ ContextDev::CrawlControls::Source::UnionMember1::Type::TaggedSymbol
206
+ }
207
+ )
208
+ end
209
+ def to_hash
210
+ end
211
+
212
+ module Type
213
+ extend ContextDev::Internal::Type::Enum
214
+
215
+ TaggedSymbol =
216
+ T.type_alias do
217
+ T.all(
218
+ Symbol,
219
+ ContextDev::CrawlControls::Source::UnionMember1::Type
220
+ )
221
+ end
222
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
223
+
224
+ SITEMAP =
225
+ T.let(
226
+ :sitemap,
227
+ ContextDev::CrawlControls::Source::UnionMember1::Type::TaggedSymbol
228
+ )
229
+
230
+ sig do
231
+ override.returns(
232
+ T::Array[
233
+ ContextDev::CrawlControls::Source::UnionMember1::Type::TaggedSymbol
234
+ ]
235
+ )
236
+ end
237
+ def self.values
238
+ end
239
+ end
240
+ end
241
+
242
+ sig do
243
+ override.returns(
244
+ T::Array[ContextDev::CrawlControls::Source::Variants]
245
+ )
246
+ end
247
+ def self.variants
248
+ end
249
+ end
250
+ end
251
+ end
252
+ end
@@ -2,24 +2,27 @@
2
2
 
3
3
  module ContextDev
4
4
  module Models
5
- class Error < ContextDev::Internal::Type::BaseModel
5
+ class Failure < ContextDev::Internal::Type::BaseModel
6
6
  OrHash =
7
- T.type_alias { T.any(ContextDev::Error, ContextDev::Internal::AnyHash) }
7
+ T.type_alias do
8
+ T.any(ContextDev::Failure, ContextDev::Internal::AnyHash)
9
+ end
8
10
 
9
- # Batch error code.
11
+ # Why the batch itself stopped.
10
12
  sig { returns(String) }
11
13
  attr_accessor :code
12
14
 
13
- # Batch error message.
15
+ # Human-readable explanation.
14
16
  sig { returns(String) }
15
17
  attr_accessor :message
16
18
 
17
- # Why the batch failed.
19
+ # A failure of the batch as a whole, distinct from the per-page failures in
20
+ # `page_errors`.
18
21
  sig { params(code: String, message: String).returns(T.attached_class) }
19
22
  def self.new(
20
- # Batch error code.
23
+ # Why the batch itself stopped.
21
24
  code:,
22
- # Batch error message.
25
+ # Human-readable explanation.
23
26
  message:
24
27
  )
25
28
  end
@@ -0,0 +1,88 @@
1
+ # typed: strong
2
+
3
+ module ContextDev
4
+ module Models
5
+ class Intake < ContextDev::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(ContextDev::Intake, ContextDev::Internal::AnyHash)
9
+ end
10
+
11
+ # URLs dropped before reserving because another entry resolved to the same page.
12
+ # Non-zero for sitemap crawls too, whose sitemaps routinely list a page more than
13
+ # once.
14
+ sig { returns(Integer) }
15
+ attr_accessor :duplicates
16
+
17
+ # URLs from your list rejected as unusable; the same ones are itemised in
18
+ # `invalid_urls` at submission. Null for a crawl — a crawl that resolves no usable
19
+ # page is rejected outright with a 400 rather than accepted with an empty list.
20
+ sig { returns(T.nilable(Integer)) }
21
+ attr_accessor :invalid
22
+
23
+ # Pages credits were reserved for. Everything else — progress, the refund, the
24
+ # completion percentage — is measured against this.
25
+ sig { returns(Integer) }
26
+ attr_accessor :reserved
27
+
28
+ # Whether `reserved` is an upper bound the batch may finish under. True only for a
29
+ # crawl that follows links, whose reachable page count is unknowable until it
30
+ # runs. False for a scrape and for a sitemap crawl, where `reserved` is an exact
31
+ # page count.
32
+ sig { returns(T::Boolean) }
33
+ attr_accessor :reserved_is_ceiling
34
+
35
+ # URLs in the list you sent, before validation and de-duplication. Null for a
36
+ # crawl, which is given a source rather than a list.
37
+ sig { returns(T.nilable(Integer)) }
38
+ attr_accessor :submitted
39
+
40
+ # What submission took in, and what it charged for.
41
+ sig do
42
+ params(
43
+ duplicates: Integer,
44
+ invalid: T.nilable(Integer),
45
+ reserved: Integer,
46
+ reserved_is_ceiling: T::Boolean,
47
+ submitted: T.nilable(Integer)
48
+ ).returns(T.attached_class)
49
+ end
50
+ def self.new(
51
+ # URLs dropped before reserving because another entry resolved to the same page.
52
+ # Non-zero for sitemap crawls too, whose sitemaps routinely list a page more than
53
+ # once.
54
+ duplicates:,
55
+ # URLs from your list rejected as unusable; the same ones are itemised in
56
+ # `invalid_urls` at submission. Null for a crawl — a crawl that resolves no usable
57
+ # page is rejected outright with a 400 rather than accepted with an empty list.
58
+ invalid:,
59
+ # Pages credits were reserved for. Everything else — progress, the refund, the
60
+ # completion percentage — is measured against this.
61
+ reserved:,
62
+ # Whether `reserved` is an upper bound the batch may finish under. True only for a
63
+ # crawl that follows links, whose reachable page count is unknowable until it
64
+ # runs. False for a scrape and for a sitemap crawl, where `reserved` is an exact
65
+ # page count.
66
+ reserved_is_ceiling:,
67
+ # URLs in the list you sent, before validation and de-duplication. Null for a
68
+ # crawl, which is given a source rather than a list.
69
+ submitted:
70
+ )
71
+ end
72
+
73
+ sig do
74
+ override.returns(
75
+ {
76
+ duplicates: Integer,
77
+ invalid: T.nilable(Integer),
78
+ reserved: Integer,
79
+ reserved_is_ceiling: T::Boolean,
80
+ submitted: T.nilable(Integer)
81
+ }
82
+ )
83
+ end
84
+ def to_hash
85
+ end
86
+ end
87
+ end
88
+ end
@@ -2,10 +2,10 @@
2
2
 
3
3
  module ContextDev
4
4
  module Models
5
- class ErrorCount < ContextDev::Internal::Type::BaseModel
5
+ class PageErrorCount < ContextDev::Internal::Type::BaseModel
6
6
  OrHash =
7
7
  T.type_alias do
8
- T.any(ContextDev::ErrorCount, ContextDev::Internal::AnyHash)
8
+ T.any(ContextDev::PageErrorCount, ContextDev::Internal::AnyHash)
9
9
  end
10
10
 
11
11
  # Error code for these failures.
@@ -27,9 +27,8 @@ module ContextDev
27
27
  end
28
28
  attr_writer :color_scheme
29
29
 
30
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
31
- # residential proxy exit location. Must be one of Context.dev's supported
32
- # countries. When provided, Context.dev fetches the target page from that country.
30
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
31
+ # alpha-2).
33
32
  sig do
34
33
  returns(T.nilable(ContextDev::WebScreenshotParams::Country::OrSymbol))
35
34
  end
@@ -201,9 +200,8 @@ module ContextDev
201
200
  # Optional parameter to choose the site's visual theme in the screenshot. Use
202
201
  # 'light' or 'dark' when the site offers both appearances.
203
202
  color_scheme: nil,
204
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
205
- # residential proxy exit location. Must be one of Context.dev's supported
206
- # countries. When provided, Context.dev fetches the target page from that country.
203
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
204
+ # alpha-2).
207
205
  country: nil,
208
206
  # A specific URL to screenshot directly, bypassing domain resolution (e.g.,
209
207
  # 'https://example.com/pricing'). When provided, the screenshot is taken of this
@@ -322,9 +320,8 @@ module ContextDev
322
320
  end
323
321
  end
324
322
 
325
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
326
- # residential proxy exit location. Must be one of Context.dev's supported
327
- # countries. When provided, Context.dev fetches the target page from that country.
323
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
324
+ # alpha-2).
328
325
  module Country
329
326
  extend ContextDev::Internal::Type::Enum
330
327
 
@@ -15,9 +15,8 @@ module ContextDev
15
15
  sig { returns(String) }
16
16
  attr_accessor :url
17
17
 
18
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
19
- # residential proxy exit location. Must be one of Context.dev's supported
20
- # countries. When provided, Context.dev fetches the target page from that country.
18
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
19
+ # alpha-2).
21
20
  sig do
22
21
  returns(T.nilable(ContextDev::WebWebCrawlMdParams::Country::OrSymbol))
23
22
  end
@@ -213,9 +212,8 @@ module ContextDev
213
212
  def self.new(
214
213
  # The starting URL for the crawl (must include http:// or https:// protocol)
215
214
  url:,
216
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
217
- # residential proxy exit location. Must be one of Context.dev's supported
218
- # countries. When provided, Context.dev fetches the target page from that country.
215
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
216
+ # alpha-2).
219
217
  country: nil,
220
218
  # CSS selectors to remove before each crawled page is converted to Markdown.
221
219
  # Applied after includeSelectors. Exclusion takes precedence: an element matching
@@ -313,9 +311,8 @@ module ContextDev
313
311
  def to_hash
314
312
  end
315
313
 
316
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
317
- # residential proxy exit location. Must be one of Context.dev's supported
318
- # countries. When provided, Context.dev fetches the target page from that country.
314
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
315
+ # alpha-2).
319
316
  module Country
320
317
  extend ContextDev::Internal::Type::Enum
321
318
 
@@ -35,9 +35,8 @@ module ContextDev
35
35
  end
36
36
  attr_accessor :actions
37
37
 
38
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
39
- # residential proxy exit location. Must be one of Context.dev's supported
40
- # countries. When provided, Context.dev fetches the target page from that country.
38
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
39
+ # alpha-2).
41
40
  sig do
42
41
  returns(
43
42
  T.nilable(ContextDev::WebWebScrapeHTMLParams::Country::OrSymbol)
@@ -246,9 +245,8 @@ module ContextDev
246
245
  # content is captured. Requires a paid plan. Send a JSON array in the query
247
246
  # parameter. Maximum: 5 actions.
248
247
  actions: nil,
249
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
250
- # residential proxy exit location. Must be one of Context.dev's supported
251
- # countries. When provided, Context.dev fetches the target page from that country.
248
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
249
+ # alpha-2).
252
250
  country: nil,
253
251
  # CSS selectors to remove from the result. Applied after includeSelectors.
254
252
  # Exclusion takes precedence: an element matching both is removed. Examples:
@@ -417,9 +415,8 @@ module ContextDev
417
415
  end
418
416
  end
419
417
 
420
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
421
- # residential proxy exit location. Must be one of Context.dev's supported
422
- # countries. When provided, Context.dev fetches the target page from that country.
418
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
419
+ # alpha-2).
423
420
  module Country
424
421
  extend ContextDev::Internal::Type::Enum
425
422
 
@@ -33,9 +33,8 @@ module ContextDev
33
33
  end
34
34
  attr_accessor :actions
35
35
 
36
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
37
- # residential proxy exit location. Must be one of Context.dev's supported
38
- # countries. When provided, Context.dev fetches the target page from that country.
36
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
37
+ # alpha-2).
39
38
  sig do
40
39
  returns(T.nilable(ContextDev::WebWebScrapeMdParams::Country::OrSymbol))
41
40
  end
@@ -328,9 +327,8 @@ module ContextDev
328
327
  # content is captured. Requires a paid plan. Send a JSON array in the query
329
328
  # parameter. Maximum: 5 actions.
330
329
  actions: nil,
331
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
332
- # residential proxy exit location. Must be one of Context.dev's supported
333
- # countries. When provided, Context.dev fetches the target page from that country.
330
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
331
+ # alpha-2).
334
332
  country: nil,
335
333
  # CSS selectors to remove before conversion to Markdown. Applied after
336
334
  # includeSelectors. Exclusion takes precedence: an element matching both is
@@ -520,9 +518,8 @@ module ContextDev
520
518
  end
521
519
  end
522
520
 
523
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
524
- # residential proxy exit location. Must be one of Context.dev's supported
525
- # countries. When provided, Context.dev fetches the target page from that country.
521
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
522
+ # alpha-2).
526
523
  module Country
527
524
  extend ContextDev::Internal::Type::Enum
528
525
 
@@ -20,14 +20,16 @@ module ContextDev
20
20
  BrandRetrieveSimplifiedParams =
21
21
  ContextDev::Models::BrandRetrieveSimplifiedParams
22
22
 
23
- Error = ContextDev::Models::Error
23
+ CrawlControls = ContextDev::Models::CrawlControls
24
24
 
25
- ErrorCount = ContextDev::Models::ErrorCount
25
+ Failure = ContextDev::Models::Failure
26
26
 
27
27
  IndustryRetrieveNaicsParams = ContextDev::Models::IndustryRetrieveNaicsParams
28
28
 
29
29
  IndustryRetrieveSicParams = ContextDev::Models::IndustryRetrieveSicParams
30
30
 
31
+ Intake = ContextDev::Models::Intake
32
+
31
33
  MonitorCreateParams = ContextDev::Models::MonitorCreateParams
32
34
 
33
35
  MonitorDeleteParams = ContextDev::Models::MonitorDeleteParams
@@ -56,6 +58,8 @@ module ContextDev
56
58
 
57
59
  MonitorUpdateParams = ContextDev::Models::MonitorUpdateParams
58
60
 
61
+ PageErrorCount = ContextDev::Models::PageErrorCount
62
+
59
63
  ParseHandleParams = ContextDev::Models::ParseHandleParams
60
64
 
61
65
  UtilityPrefetchParams = ContextDev::Models::UtilityPrefetchParams
@@ -3,9 +3,7 @@
3
3
  module ContextDev
4
4
  module Resources
5
5
  class Batch
6
- # Check progress and get download links when the batch finishes. Also returns the
7
- # rejected-URL list and webhook signing secret from submission, so nothing is lost
8
- # if the submit response was dropped.
6
+ # Check progress, and get download links once the batch finishes.
9
7
  sig do
10
8
  params(
11
9
  batch_id: String,
@@ -66,9 +64,8 @@ module ContextDev
66
64
  )
67
65
  end
68
66
 
69
- # Page through the result records of a finished batch as JSON, in the same order
70
- # as the downloadable result files. Use this instead of downloading and parsing
71
- # the NDJSON files yourself.
67
+ # Page through a finished batch's results as JSON instead of downloading the
68
+ # NDJSON files.
72
69
  sig do
73
70
  params(
74
71
  batch_id: String,
@@ -216,9 +216,8 @@ module ContextDev
216
216
  # Optional parameter to choose the site's visual theme in the screenshot. Use
217
217
  # 'light' or 'dark' when the site offers both appearances.
218
218
  color_scheme: nil,
219
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
220
- # residential proxy exit location. Must be one of Context.dev's supported
221
- # countries. When provided, Context.dev fetches the target page from that country.
219
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
220
+ # alpha-2).
222
221
  country: nil,
223
222
  # A specific URL to screenshot directly, bypassing domain resolution (e.g.,
224
223
  # 'https://example.com/pricing'). When provided, the screenshot is taken of this
@@ -355,9 +354,8 @@ module ContextDev
355
354
  def web_crawl_md(
356
355
  # The starting URL for the crawl (must include http:// or https:// protocol)
357
356
  url:,
358
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
359
- # residential proxy exit location. Must be one of Context.dev's supported
360
- # countries. When provided, Context.dev fetches the target page from that country.
357
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
358
+ # alpha-2).
361
359
  country: nil,
362
360
  # CSS selectors to remove before each crawled page is converted to Markdown.
363
361
  # Applied after includeSelectors. Exclusion takes precedence: an element matching
@@ -473,9 +471,8 @@ module ContextDev
473
471
  # content is captured. Requires a paid plan. Send a JSON array in the query
474
472
  # parameter. Maximum: 5 actions.
475
473
  actions: nil,
476
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
477
- # residential proxy exit location. Must be one of Context.dev's supported
478
- # countries. When provided, Context.dev fetches the target page from that country.
474
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
475
+ # alpha-2).
479
476
  country: nil,
480
477
  # CSS selectors to remove from the result. Applied after includeSelectors.
481
478
  # Exclusion takes precedence: an element matching both is removed. Examples:
@@ -673,9 +670,8 @@ module ContextDev
673
670
  # content is captured. Requires a paid plan. Send a JSON array in the query
674
671
  # parameter. Maximum: 5 actions.
675
672
  actions: nil,
676
- # Two-letter ISO 3166-1 alpha-2 country code identifying a supported Context.dev
677
- # residential proxy exit location. Must be one of Context.dev's supported
678
- # countries. When provided, Context.dev fetches the target page from that country.
673
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
674
+ # alpha-2).
679
675
  country: nil,
680
676
  # CSS selectors to remove before conversion to Markdown. Applied after
681
677
  # includeSelectors. Exclusion takes precedence: an element matching both is