context.dev 2.21.0 → 2.22.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 (229) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/client.rb +4 -9
  5. data/lib/context_dev/models/batch_cancel_params.rb +2 -2
  6. data/lib/context_dev/models/batch_cancel_response.rb +16 -21
  7. data/lib/context_dev/models/batch_delete_params.rb +2 -2
  8. data/lib/context_dev/models/batch_delete_response.rb +8 -8
  9. data/lib/context_dev/models/batch_get_results_params.rb +2 -2
  10. data/lib/context_dev/models/batch_get_results_response.rb +17 -22
  11. data/lib/context_dev/models/batch_list_response.rb +38 -47
  12. data/lib/context_dev/models/batch_retrieve_params.rb +2 -2
  13. data/lib/context_dev/models/batch_retrieve_response.rb +37 -46
  14. data/lib/context_dev/models/batch_submit_params.rb +80 -109
  15. data/lib/context_dev/models/batch_submit_response.rb +18 -28
  16. data/lib/context_dev/models/brand_retrieve_params.rb +90 -149
  17. data/lib/context_dev/models/brand_retrieve_response.rb +18 -22
  18. data/lib/context_dev/models/brand_search_params.rb +2 -3
  19. data/lib/context_dev/models/brand_search_response.rb +8 -8
  20. data/lib/context_dev/models/crawl_controls.rb +1 -2
  21. data/lib/context_dev/models/feedback_submit_params.rb +2 -2
  22. data/lib/context_dev/models/feedback_submit_response.rb +8 -8
  23. data/lib/context_dev/models/industry_retrieve_naics_params.rb +17 -32
  24. data/lib/context_dev/models/industry_retrieve_naics_response.rb +10 -10
  25. data/lib/context_dev/models/industry_retrieve_sic_params.rb +20 -39
  26. data/lib/context_dev/models/industry_retrieve_sic_response.rb +10 -10
  27. data/lib/context_dev/models/intake.rb +7 -13
  28. data/lib/context_dev/models/log_list_response.rb +14 -10
  29. data/lib/context_dev/models/log_retrieve_response.rb +15 -41
  30. data/lib/context_dev/models/monitor_create_params.rb +238 -72
  31. data/lib/context_dev/models/monitor_create_response.rb +364 -175
  32. data/lib/context_dev/models/monitor_delete_params.rb +3 -1
  33. data/lib/context_dev/models/monitor_delete_response.rb +44 -1
  34. data/lib/context_dev/models/monitor_get_credit_usage_response.rb +43 -1
  35. data/lib/context_dev/models/monitor_get_limits_response.rb +47 -7
  36. data/lib/context_dev/models/monitor_list_account_changes_response.rb +143 -20
  37. data/lib/context_dev/models/monitor_list_account_runs_response.rb +50 -8
  38. data/lib/context_dev/models/monitor_list_changes_params.rb +2 -1
  39. data/lib/context_dev/models/monitor_list_changes_response.rb +143 -20
  40. data/lib/context_dev/models/monitor_list_params.rb +3 -3
  41. data/lib/context_dev/models/monitor_list_response.rb +304 -106
  42. data/lib/context_dev/models/monitor_list_runs_params.rb +2 -1
  43. data/lib/context_dev/models/monitor_list_runs_response.rb +50 -8
  44. data/lib/context_dev/models/monitor_retrieve_change_params.rb +3 -1
  45. data/lib/context_dev/models/monitor_retrieve_change_response.rb +45 -15
  46. data/lib/context_dev/models/monitor_retrieve_params.rb +3 -1
  47. data/lib/context_dev/models/monitor_retrieve_response.rb +361 -171
  48. data/lib/context_dev/models/monitor_retrieve_run_params.rb +6 -2
  49. data/lib/context_dev/models/monitor_retrieve_run_response.rb +45 -8
  50. data/lib/context_dev/models/monitor_rotate_webhook_secret_params.rb +3 -1
  51. data/lib/context_dev/models/monitor_rotate_webhook_secret_response.rb +364 -172
  52. data/lib/context_dev/models/monitor_run_params.rb +3 -1
  53. data/lib/context_dev/models/monitor_run_response.rb +42 -4
  54. data/lib/context_dev/models/monitor_update_params.rb +239 -71
  55. data/lib/context_dev/models/monitor_update_response.rb +361 -171
  56. data/lib/context_dev/models/news_search_params.rb +10 -6
  57. data/lib/context_dev/models/news_search_response.rb +8 -8
  58. data/lib/context_dev/models/parse_handle_params.rb +9 -20
  59. data/lib/context_dev/models/parse_handle_response.rb +8 -8
  60. data/lib/context_dev/models/person_enrich_params.rb +76 -50
  61. data/lib/context_dev/models/person_enrich_response.rb +8 -8
  62. data/lib/context_dev/models/utility_prefetch_params.rb +15 -29
  63. data/lib/context_dev/models/utility_prefetch_response.rb +10 -10
  64. data/lib/context_dev/models/web_answers_params.rb +28 -47
  65. data/lib/context_dev/models/web_answers_response.rb +9 -8
  66. data/lib/context_dev/models/web_extract_competitors_params.rb +17 -32
  67. data/lib/context_dev/models/web_extract_competitors_response.rb +8 -8
  68. data/lib/context_dev/models/web_extract_styleguide_params.rb +22 -44
  69. data/lib/context_dev/models/web_extract_styleguide_response.rb +34 -44
  70. data/lib/context_dev/models/web_map_urls_params.rb +30 -51
  71. data/lib/context_dev/models/web_map_urls_response.rb +8 -8
  72. data/lib/context_dev/models/web_scrape_params.rb +193 -191
  73. data/lib/context_dev/models/web_scrape_response.rb +219 -95
  74. data/lib/context_dev/models/web_screenshot_params.rb +20 -39
  75. data/lib/context_dev/models/web_screenshot_response.rb +18 -28
  76. data/lib/context_dev/models/web_search_params.rb +76 -65
  77. data/lib/context_dev/models/web_search_response.rb +68 -27
  78. data/lib/context_dev/models/web_web_crawl_md_params.rb +41 -70
  79. data/lib/context_dev/models/web_web_crawl_md_response.rb +11 -15
  80. data/lib/context_dev/models/webhook_delivery.rb +3 -7
  81. data/lib/context_dev/models/webhooks/attempt.rb +3 -3
  82. data/lib/context_dev/models/webhooks/delivery.rb +16 -11
  83. data/lib/context_dev/models/webhooks/delivery_list_attempts_params.rb +2 -6
  84. data/lib/context_dev/models/webhooks/delivery_list_attempts_response.rb +8 -8
  85. data/lib/context_dev/models/webhooks/delivery_list_params.rb +4 -4
  86. data/lib/context_dev/models/webhooks/delivery_list_response.rb +8 -8
  87. data/lib/context_dev/models/webhooks/delivery_retrieve_params.rb +2 -6
  88. data/lib/context_dev/models/webhooks/delivery_retrieve_response.rb +8 -8
  89. data/lib/context_dev/models/webhooks/delivery_retry_params.rb +4 -4
  90. data/lib/context_dev/models/webhooks/delivery_retry_response.rb +8 -8
  91. data/lib/context_dev/models/webhooks/delivery_summary.rb +16 -11
  92. data/lib/context_dev/resources/batch.rb +17 -16
  93. data/lib/context_dev/resources/brand.rb +6 -8
  94. data/lib/context_dev/resources/feedback.rb +4 -5
  95. data/lib/context_dev/resources/industry.rb +9 -11
  96. data/lib/context_dev/resources/logs.rb +4 -5
  97. data/lib/context_dev/resources/monitors.rb +50 -53
  98. data/lib/context_dev/resources/news.rb +4 -8
  99. data/lib/context_dev/resources/parse.rb +4 -5
  100. data/lib/context_dev/resources/people.rb +11 -13
  101. data/lib/context_dev/resources/utility.rb +4 -11
  102. data/lib/context_dev/resources/web.rb +69 -94
  103. data/lib/context_dev/resources/webhooks/deliveries.rb +10 -18
  104. data/lib/context_dev/resources/webhooks.rb +1 -1
  105. data/lib/context_dev/version.rb +1 -1
  106. data/rbi/context_dev/client.rbi +4 -9
  107. data/rbi/context_dev/models/batch_cancel_params.rbi +2 -2
  108. data/rbi/context_dev/models/batch_cancel_response.rbi +17 -21
  109. data/rbi/context_dev/models/batch_delete_params.rbi +2 -2
  110. data/rbi/context_dev/models/batch_delete_response.rbi +9 -9
  111. data/rbi/context_dev/models/batch_get_results_params.rbi +2 -2
  112. data/rbi/context_dev/models/batch_get_results_response.rbi +18 -26
  113. data/rbi/context_dev/models/batch_list_response.rbi +41 -53
  114. data/rbi/context_dev/models/batch_retrieve_params.rbi +2 -2
  115. data/rbi/context_dev/models/batch_retrieve_response.rbi +40 -52
  116. data/rbi/context_dev/models/batch_submit_params.rbi +87 -147
  117. data/rbi/context_dev/models/batch_submit_response.rbi +19 -31
  118. data/rbi/context_dev/models/brand_retrieve_params.rbi +99 -190
  119. data/rbi/context_dev/models/brand_retrieve_response.rbi +19 -25
  120. data/rbi/context_dev/models/brand_search_params.rbi +2 -4
  121. data/rbi/context_dev/models/brand_search_response.rbi +9 -9
  122. data/rbi/context_dev/models/crawl_controls.rbi +1 -2
  123. data/rbi/context_dev/models/feedback_submit_params.rbi +2 -2
  124. data/rbi/context_dev/models/feedback_submit_response.rbi +9 -9
  125. data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +19 -42
  126. data/rbi/context_dev/models/industry_retrieve_naics_response.rbi +11 -11
  127. data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +22 -51
  128. data/rbi/context_dev/models/industry_retrieve_sic_response.rbi +11 -11
  129. data/rbi/context_dev/models/intake.rbi +7 -19
  130. data/rbi/context_dev/models/log_list_response.rbi +13 -11
  131. data/rbi/context_dev/models/log_retrieve_response.rbi +13 -76
  132. data/rbi/context_dev/models/monitor_create_params.rbi +418 -78
  133. data/rbi/context_dev/models/monitor_create_response.rbi +654 -287
  134. data/rbi/context_dev/models/monitor_delete_params.rbi +6 -1
  135. data/rbi/context_dev/models/monitor_delete_response.rbi +89 -3
  136. data/rbi/context_dev/models/monitor_get_credit_usage_response.rbi +77 -3
  137. data/rbi/context_dev/models/monitor_get_limits_response.rbi +83 -10
  138. data/rbi/context_dev/models/monitor_list_account_changes_response.rbi +236 -24
  139. data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +86 -12
  140. data/rbi/context_dev/models/monitor_list_changes_params.rbi +2 -0
  141. data/rbi/context_dev/models/monitor_list_changes_response.rbi +234 -24
  142. data/rbi/context_dev/models/monitor_list_params.rbi +4 -4
  143. data/rbi/context_dev/models/monitor_list_response.rbi +502 -130
  144. data/rbi/context_dev/models/monitor_list_runs_params.rbi +2 -0
  145. data/rbi/context_dev/models/monitor_list_runs_response.rbi +84 -12
  146. data/rbi/context_dev/models/monitor_retrieve_change_params.rbi +6 -1
  147. data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +79 -15
  148. data/rbi/context_dev/models/monitor_retrieve_params.rbi +6 -1
  149. data/rbi/context_dev/models/monitor_retrieve_response.rbi +654 -283
  150. data/rbi/context_dev/models/monitor_retrieve_run_params.rbi +9 -1
  151. data/rbi/context_dev/models/monitor_retrieve_run_response.rbi +77 -9
  152. data/rbi/context_dev/models/monitor_rotate_webhook_secret_params.rbi +6 -1
  153. data/rbi/context_dev/models/monitor_rotate_webhook_secret_response.rbi +659 -288
  154. data/rbi/context_dev/models/monitor_run_params.rbi +6 -1
  155. data/rbi/context_dev/models/monitor_run_response.rbi +82 -9
  156. data/rbi/context_dev/models/monitor_update_params.rbi +420 -75
  157. data/rbi/context_dev/models/monitor_update_response.rbi +650 -281
  158. data/rbi/context_dev/models/news_search_params.rbi +10 -2
  159. data/rbi/context_dev/models/news_search_response.rbi +9 -9
  160. data/rbi/context_dev/models/parse_handle_params.rbi +10 -29
  161. data/rbi/context_dev/models/parse_handle_response.rbi +9 -9
  162. data/rbi/context_dev/models/person_enrich_params.rbi +86 -44
  163. data/rbi/context_dev/models/person_enrich_response.rbi +9 -9
  164. data/rbi/context_dev/models/utility_prefetch_params.rbi +15 -27
  165. data/rbi/context_dev/models/utility_prefetch_response.rbi +11 -11
  166. data/rbi/context_dev/models/web_answers_params.rbi +33 -63
  167. data/rbi/context_dev/models/web_answers_response.rbi +11 -9
  168. data/rbi/context_dev/models/web_extract_competitors_params.rbi +19 -42
  169. data/rbi/context_dev/models/web_extract_competitors_response.rbi +9 -9
  170. data/rbi/context_dev/models/web_extract_styleguide_params.rbi +25 -61
  171. data/rbi/context_dev/models/web_extract_styleguide_response.rbi +36 -51
  172. data/rbi/context_dev/models/web_map_urls_params.rbi +33 -68
  173. data/rbi/context_dev/models/web_map_urls_response.rbi +9 -9
  174. data/rbi/context_dev/models/web_scrape_params.rbi +212 -206
  175. data/rbi/context_dev/models/web_scrape_response.rbi +296 -120
  176. data/rbi/context_dev/models/web_screenshot_params.rbi +22 -51
  177. data/rbi/context_dev/models/web_screenshot_response.rbi +20 -35
  178. data/rbi/context_dev/models/web_search_params.rbi +114 -82
  179. data/rbi/context_dev/models/web_search_response.rbi +145 -33
  180. data/rbi/context_dev/models/web_web_crawl_md_params.rbi +45 -95
  181. data/rbi/context_dev/models/web_web_crawl_md_response.rbi +12 -18
  182. data/rbi/context_dev/models/webhook_delivery.rbi +3 -9
  183. data/rbi/context_dev/models/webhooks/attempt.rbi +3 -3
  184. data/rbi/context_dev/models/webhooks/delivery.rbi +14 -11
  185. data/rbi/context_dev/models/webhooks/delivery_list_attempts_params.rbi +2 -4
  186. data/rbi/context_dev/models/webhooks/delivery_list_attempts_response.rbi +9 -9
  187. data/rbi/context_dev/models/webhooks/delivery_list_params.rbi +4 -4
  188. data/rbi/context_dev/models/webhooks/delivery_list_response.rbi +9 -9
  189. data/rbi/context_dev/models/webhooks/delivery_retrieve_params.rbi +2 -4
  190. data/rbi/context_dev/models/webhooks/delivery_retrieve_response.rbi +9 -9
  191. data/rbi/context_dev/models/webhooks/delivery_retry_params.rbi +4 -4
  192. data/rbi/context_dev/models/webhooks/delivery_retry_response.rbi +9 -9
  193. data/rbi/context_dev/models/webhooks/delivery_summary.rbi +14 -11
  194. data/rbi/context_dev/resources/batch.rbi +19 -18
  195. data/rbi/context_dev/resources/brand.rbi +6 -9
  196. data/rbi/context_dev/resources/feedback.rbi +4 -5
  197. data/rbi/context_dev/resources/industry.rbi +11 -27
  198. data/rbi/context_dev/resources/logs.rbi +4 -5
  199. data/rbi/context_dev/resources/monitors.rbi +71 -49
  200. data/rbi/context_dev/resources/news.rbi +4 -8
  201. data/rbi/context_dev/resources/parse.rbi +7 -14
  202. data/rbi/context_dev/resources/people.rbi +15 -13
  203. data/rbi/context_dev/resources/utility.rbi +4 -11
  204. data/rbi/context_dev/resources/web.rbi +89 -190
  205. data/rbi/context_dev/resources/webhooks/deliveries.rbi +10 -12
  206. data/rbi/context_dev/resources/webhooks.rbi +1 -1
  207. data/sig/context_dev/models/log_retrieve_response.rbs +0 -28
  208. data/sig/context_dev/models/monitor_create_params.rbs +113 -0
  209. data/sig/context_dev/models/monitor_create_response.rbs +203 -53
  210. data/sig/context_dev/models/monitor_delete_response.rbs +46 -3
  211. data/sig/context_dev/models/monitor_get_credit_usage_response.rbs +36 -3
  212. data/sig/context_dev/models/monitor_get_limits_response.rbs +36 -3
  213. data/sig/context_dev/models/monitor_list_account_changes_response.rbs +111 -8
  214. data/sig/context_dev/models/monitor_list_account_runs_response.rbs +36 -3
  215. data/sig/context_dev/models/monitor_list_changes_response.rbs +111 -8
  216. data/sig/context_dev/models/monitor_list_response.rbs +149 -3
  217. data/sig/context_dev/models/monitor_list_runs_response.rbs +36 -3
  218. data/sig/context_dev/models/monitor_retrieve_change_response.rbs +33 -0
  219. data/sig/context_dev/models/monitor_retrieve_response.rbs +203 -53
  220. data/sig/context_dev/models/monitor_retrieve_run_response.rbs +33 -0
  221. data/sig/context_dev/models/monitor_rotate_webhook_secret_response.rbs +203 -53
  222. data/sig/context_dev/models/monitor_run_response.rbs +48 -3
  223. data/sig/context_dev/models/monitor_update_params.rbs +113 -0
  224. data/sig/context_dev/models/monitor_update_response.rbs +203 -53
  225. data/sig/context_dev/models/web_scrape_response.rbs +204 -27
  226. data/sig/context_dev/models/web_search_params.rbs +25 -0
  227. data/sig/context_dev/models/web_search_response.rbs +48 -0
  228. data/sig/context_dev/resources/web.rbs +1 -0
  229. metadata +2 -2
@@ -8,19 +8,19 @@ module ContextDev
8
8
  include ContextDev::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute formats
11
- # Outputs to return. Enable at least one; omitted formats are false.
11
+ # Outputs to return. Set at least one to `true`.
12
12
  #
13
13
  # @return [ContextDev::Models::WebScrapeParams::Formats]
14
14
  required :formats, -> { ContextDev::WebScrapeParams::Formats }
15
15
 
16
16
  # @!attribute url
17
- # The URL to scrape.
17
+ # Public HTTP or HTTPS URL to scrape.
18
18
  #
19
19
  # @return [String]
20
20
  required :url, String
21
21
 
22
22
  # @!attribute highlights_params
23
- # Highlight options. Requires formats.highlights: true.
23
+ # Requires `formats.highlights: true`; required when it is set.
24
24
  #
25
25
  # @return [ContextDev::Models::WebScrapeParams::HighlightsParams, nil]
26
26
  optional :highlights_params,
@@ -34,28 +34,26 @@ module ContextDev
34
34
  optional :image_params, -> { ContextDev::WebScrapeParams::ImageParams }, api_name: :imageParams
35
35
 
36
36
  # @!attribute json_params
37
- # Required when formats.json is true.
37
+ # Requires `formats.json: true`; required when it is set.
38
38
  #
39
39
  # @return [ContextDev::Models::WebScrapeParams::JsonParams, nil]
40
40
  optional :json_params, -> { ContextDev::WebScrapeParams::JsonParams }, api_name: :jsonParams
41
41
 
42
42
  # @!attribute markdown_params
43
- # Markdown options. Requires formats.markdown: true.
43
+ # Markdown options. Requires `formats.markdown`.
44
44
  #
45
45
  # @return [ContextDev::Models::WebScrapeParams::MarkdownParams, nil]
46
46
  optional :markdown_params, -> { ContextDev::WebScrapeParams::MarkdownParams }, api_name: :markdownParams
47
47
 
48
48
  # @!attribute max_age_ms
49
- # Maximum age of each cached output. Defaults to 1 day; 0 fetches fresh and
50
- # updates the requested outputs. Compatible outputs are shared with the individual
51
- # scrape endpoints. Image results with hosted files refresh after 23 hours; other
52
- # outputs retain their own freshness.
49
+ # Maximum age of a cached output, in milliseconds. `0` fetches fresh. Defaults to
50
+ # 3 days (259200000 ms). Maximum: 1 year (31536000000 ms).
53
51
  #
54
52
  # @return [Integer, nil]
55
53
  optional :max_age_ms, Integer, api_name: :maxAgeMs
56
54
 
57
55
  # @!attribute parse_params
58
- # Required when formats.parse is true.
56
+ # Requires `formats.parse: true`; required when it is set.
59
57
  #
60
58
  # @return [ContextDev::Models::WebScrapeParams::ParseParams, nil]
61
59
  optional :parse_params, -> { ContextDev::WebScrapeParams::ParseParams }, api_name: :parseParams
@@ -75,8 +73,7 @@ module ContextDev
75
73
  api_name: :screenshotParams
76
74
 
77
75
  # @!attribute shared_params
78
- # Shared browser and content settings. Content filters leave screenshots and
79
- # original bytes unchanged.
76
+ # Browser and content settings shared by all outputs.
80
77
  #
81
78
  # @return [ContextDev::Models::WebScrapeParams::SharedParams, nil]
82
79
  optional :shared_params, -> { ContextDev::WebScrapeParams::SharedParams }, api_name: :sharedParams
@@ -88,24 +85,14 @@ module ContextDev
88
85
  optional :tags, ContextDev::Internal::Type::ArrayOf[String]
89
86
 
90
87
  # @!attribute timeout_opts
91
- # Total deadline, including navigation, actions, waiting, and all outputs.
92
- # Defaults to 60000 milliseconds with behavior fail. Individual outputs have
93
- # internal deadlines that reserve time to return completed outputs; timed-out
94
- # outputs have success: false and data: null under either behavior. The overall
95
- # request deadline remains enforced: fail returns an error if that deadline is
96
- # reached. Use return-partial to allow the current page state and available
97
- # outputs when the page is still loading. Partial responses set isPartial. Failed
98
- # retrievals and incomplete captures are not cached; valid captured pieces may be
99
- # cached independently. Fixed waits must fit before a response reserve of up to
100
- # 5000 milliseconds (at most one quarter of the timeout) when using
101
- # return-partial.
88
+ # Deadline for the whole request. Defaults to 60000 ms with `fail`. Fixed waits
89
+ # must end before it.
102
90
  #
103
91
  # @return [ContextDev::Models::WebScrapeParams::TimeoutOpts, nil]
104
92
  optional :timeout_opts, -> { ContextDev::WebScrapeParams::TimeoutOpts }, api_name: :timeoutOpts
105
93
 
106
94
  # @!attribute zdr
107
- # Zero data retention. Bypasses caches and uploads; excludes request/response
108
- # content and tags from logs. Must be enabled for your organization.
95
+ # `enabled` turns on zero data retention. Your organization must have ZDR enabled.
109
96
  #
110
97
  # @return [Symbol, ContextDev::Models::WebScrapeParams::Zdr, nil]
111
98
  optional :zdr, enum: -> { ContextDev::WebScrapeParams::Zdr }
@@ -114,33 +101,33 @@ module ContextDev
114
101
  # Some parameter documentations has been truncated, see
115
102
  # {ContextDev::Models::WebScrapeParams} for more details.
116
103
  #
117
- # @param formats [ContextDev::Models::WebScrapeParams::Formats] Outputs to return. Enable at least one; omitted formats are false.
104
+ # @param formats [ContextDev::Models::WebScrapeParams::Formats] Outputs to return. Set at least one to `true`.
118
105
  #
119
- # @param url [String] The URL to scrape.
106
+ # @param url [String] Public HTTP or HTTPS URL to scrape.
120
107
  #
121
- # @param highlights_params [ContextDev::Models::WebScrapeParams::HighlightsParams] Highlight options. Requires formats.highlights: true.
108
+ # @param highlights_params [ContextDev::Models::WebScrapeParams::HighlightsParams] Requires `formats.highlights: true`; required when it is set.
122
109
  #
123
110
  # @param image_params [ContextDev::Models::WebScrapeParams::ImageParams] Image options. Requires formats.images: true.
124
111
  #
125
- # @param json_params [ContextDev::Models::WebScrapeParams::JsonParams] Required when formats.json is true.
112
+ # @param json_params [ContextDev::Models::WebScrapeParams::JsonParams] Requires `formats.json: true`; required when it is set.
126
113
  #
127
- # @param markdown_params [ContextDev::Models::WebScrapeParams::MarkdownParams] Markdown options. Requires formats.markdown: true.
114
+ # @param markdown_params [ContextDev::Models::WebScrapeParams::MarkdownParams] Markdown options. Requires `formats.markdown`.
128
115
  #
129
- # @param max_age_ms [Integer] Maximum age of each cached output. Defaults to 1 day; 0 fetches fresh and update
116
+ # @param max_age_ms [Integer] Maximum age of a cached output, in milliseconds. `0` fetches fresh. Defaults to
130
117
  #
131
- # @param parse_params [ContextDev::Models::WebScrapeParams::ParseParams] Required when formats.parse is true.
118
+ # @param parse_params [ContextDev::Models::WebScrapeParams::ParseParams] Requires `formats.parse: true`; required when it is set.
132
119
  #
133
120
  # @param product_params [ContextDev::Models::WebScrapeParams::ProductParams] Product options. Requires formats.product: true.
134
121
  #
135
122
  # @param screenshot_params [ContextDev::Models::WebScrapeParams::ScreenshotParams] Screenshot options. Requires formats.screenshot: true.
136
123
  #
137
- # @param shared_params [ContextDev::Models::WebScrapeParams::SharedParams] Shared browser and content settings. Content filters leave screenshots and origi
124
+ # @param shared_params [ContextDev::Models::WebScrapeParams::SharedParams] Browser and content settings shared by all outputs.
138
125
  #
139
126
  # @param tags [Array<String>] Labels for tracking request usage. Not retained when zdr is enabled.
140
127
  #
141
- # @param timeout_opts [ContextDev::Models::WebScrapeParams::TimeoutOpts] Total deadline, including navigation, actions, waiting, and all outputs. Default
128
+ # @param timeout_opts [ContextDev::Models::WebScrapeParams::TimeoutOpts] Deadline for the whole request. Defaults to 60000 ms with `fail`. Fixed waits mu
142
129
  #
143
- # @param zdr [Symbol, ContextDev::Models::WebScrapeParams::Zdr] Zero data retention. Bypasses caches and uploads; excludes request/response cont
130
+ # @param zdr [Symbol, ContextDev::Models::WebScrapeParams::Zdr] `enabled` turns on zero data retention. Your organization must have ZDR enabled.
144
131
  #
145
132
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
146
133
 
@@ -152,9 +139,7 @@ module ContextDev
152
139
  optional :bytes, ContextDev::Internal::Type::Boolean
153
140
 
154
141
  # @!attribute highlights
155
- # Relevant Markdown excerpts for your question or topic, preserving code, lists,
156
- # and tables, with headings included when needed for context. Adds 3 credits when
157
- # passages are returned.
142
+ # Markdown excerpts relevant to `highlightsParams.query`.
158
143
  #
159
144
  # @return [Boolean, nil]
160
145
  optional :highlights, ContextDev::Internal::Type::Boolean
@@ -172,8 +157,7 @@ module ContextDev
172
157
  optional :images, ContextDev::Internal::Type::Boolean
173
158
 
174
159
  # @!attribute json
175
- # Page data extracted using your schema. Adds 4 credits when extraction succeeds
176
- # and its result is returned.
160
+ # An object matching `jsonParams.schema`, extracted from the page.
177
161
  #
178
162
  # @return [Boolean, nil]
179
163
  optional :json, ContextDev::Internal::Type::Boolean
@@ -185,47 +169,43 @@ module ContextDev
185
169
  optional :markdown, ContextDev::Internal::Type::Boolean
186
170
 
187
171
  # @!attribute parse
188
- # Fields selected by parseParams.rules.
172
+ # Fields extracted with `parseParams.rules`, returned as `parsed`.
189
173
  #
190
174
  # @return [Boolean, nil]
191
175
  optional :parse, ContextDev::Internal::Type::Boolean
192
176
 
193
177
  # @!attribute product
194
- # Product details such as name, price, and availability. Adds 1 credit when its
195
- # successful result is returned or the target page is missing.
178
+ # Product details such as name, price, and availability.
196
179
  #
197
180
  # @return [Boolean, nil]
198
181
  optional :product, ContextDev::Internal::Type::Boolean
199
182
 
200
183
  # @!attribute screenshot
201
- # An inline image of the page.
184
+ # A screenshot of the page.
202
185
  #
203
186
  # @return [Boolean, nil]
204
187
  optional :screenshot, ContextDev::Internal::Type::Boolean
205
188
 
206
189
  # @!method initialize(bytes: nil, highlights: nil, html: nil, images: nil, json: nil, markdown: nil, parse: nil, product: nil, screenshot: nil)
207
- # Some parameter documentations has been truncated, see
208
- # {ContextDev::Models::WebScrapeParams::Formats} for more details.
209
- #
210
- # Outputs to return. Enable at least one; omitted formats are false.
190
+ # Outputs to return. Set at least one to `true`.
211
191
  #
212
192
  # @param bytes [Boolean] The original HTTP response body.
213
193
  #
214
- # @param highlights [Boolean] Relevant Markdown excerpts for your question or topic, preserving code, lists, a
194
+ # @param highlights [Boolean] Markdown excerpts relevant to `highlightsParams.query`.
215
195
  #
216
196
  # @param html [Boolean] Rendered HTML.
217
197
  #
218
198
  # @param images [Boolean] Images found on the page.
219
199
  #
220
- # @param json [Boolean] Page data extracted using your schema. Adds 4 credits when extraction succeeds a
200
+ # @param json [Boolean] An object matching `jsonParams.schema`, extracted from the page.
221
201
  #
222
202
  # @param markdown [Boolean] Page content as Markdown.
223
203
  #
224
- # @param parse [Boolean] Fields selected by parseParams.rules.
204
+ # @param parse [Boolean] Fields extracted with `parseParams.rules`, returned as `parsed`.
225
205
  #
226
- # @param product [Boolean] Product details such as name, price, and availability. Adds 1 credit when its su
206
+ # @param product [Boolean] Product details such as name, price, and availability.
227
207
  #
228
- # @param screenshot [Boolean] An inline image of the page.
208
+ # @param screenshot [Boolean] A screenshot of the page.
229
209
  end
230
210
 
231
211
  class HighlightsParams < ContextDev::Internal::Type::BaseModel
@@ -236,46 +216,41 @@ module ContextDev
236
216
  required :query, String
237
217
 
238
218
  # @!attribute max_characters
239
- # Maximum combined length of the returned passages, in characters.
219
+ # Maximum combined length of returned passages.
240
220
  #
241
221
  # @return [Integer, nil]
242
222
  optional :max_characters, Integer, api_name: :maxCharacters
243
223
 
244
224
  # @!method initialize(query:, max_characters: nil)
245
- # Highlight options. Requires formats.highlights: true.
225
+ # Requires `formats.highlights: true`; required when it is set.
246
226
  #
247
227
  # @param query [String] The question or topic to find passages for.
248
228
  #
249
- # @param max_characters [Integer] Maximum combined length of the returned passages, in characters.
229
+ # @param max_characters [Integer] Maximum combined length of returned passages.
250
230
  end
251
231
 
252
232
  class ImageParams < ContextDev::Internal::Type::BaseModel
253
233
  # @!attribute dedupe
254
- # For visual duplicates, keep the largest image.
234
+ # Set `visual` to drop visual duplicates, keeping the largest copy.
255
235
  #
256
236
  # @return [Symbol, ContextDev::Models::WebScrapeParams::ImageParams::Dedupe, nil]
257
237
  optional :dedupe, enum: -> { ContextDev::WebScrapeParams::ImageParams::Dedupe }
258
238
 
259
239
  # @!attribute enrich
260
- # Add dimensions, a visual category, or a hosted file URL. Each image has a
261
- # maximum processing time of 30000 milliseconds, bounded by the remaining request
262
- # deadline.
240
+ # Extra data per image: `dimensions`, `classification`, or a hosted `file` URL.
263
241
  #
264
242
  # @return [Array<Symbol, ContextDev::Models::WebScrapeParams::ImageParams::Enrich>, nil]
265
243
  optional :enrich,
266
244
  -> { ContextDev::Internal::Type::ArrayOf[enum: ContextDev::WebScrapeParams::ImageParams::Enrich] }
267
245
 
268
246
  # @!method initialize(dedupe: nil, enrich: nil)
269
- # Some parameter documentations has been truncated, see
270
- # {ContextDev::Models::WebScrapeParams::ImageParams} for more details.
271
- #
272
247
  # Image options. Requires formats.images: true.
273
248
  #
274
- # @param dedupe [Symbol, ContextDev::Models::WebScrapeParams::ImageParams::Dedupe] For visual duplicates, keep the largest image.
249
+ # @param dedupe [Symbol, ContextDev::Models::WebScrapeParams::ImageParams::Dedupe] Set `visual` to drop visual duplicates, keeping the largest copy.
275
250
  #
276
- # @param enrich [Array<Symbol, ContextDev::Models::WebScrapeParams::ImageParams::Enrich>] Add dimensions, a visual category, or a hosted file URL. Each image has a maximu
251
+ # @param enrich [Array<Symbol, ContextDev::Models::WebScrapeParams::ImageParams::Enrich>] Extra data per image: `dimensions`, `classification`, or a hosted `file` URL.
277
252
 
278
- # For visual duplicates, keep the largest image.
253
+ # Set `visual` to drop visual duplicates, keeping the largest copy.
279
254
  #
280
255
  # @see ContextDev::Models::WebScrapeParams::ImageParams#dedupe
281
256
  module Dedupe
@@ -302,18 +277,14 @@ module ContextDev
302
277
 
303
278
  class JsonParams < ContextDev::Internal::Type::BaseModel
304
279
  # @!attribute schema
305
- # JSON Schema for the returned object. Must describe a top-level object; at most
306
- # 50 KB serialized. Optional fields the page does not state are omitted, or null
307
- # when their type allows null, while required non-nullable fields always receive a
308
- # best-effort value, so prefer nullable or optional fields for data a page may
309
- # omit. Zod users can pass the output of z.toJSONSchema().
280
+ # JSON Schema (not an example object) for a top-level object, up to 50 KB. Use
281
+ # optional or nullable fields for missing facts.
310
282
  #
311
283
  # @return [Hash{Symbol=>Object}]
312
284
  required :schema, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]
313
285
 
314
286
  # @!attribute instructions
315
- # Optional guidance on which facts to prioritize or how to interpret schema
316
- # fields.
287
+ # Extra guidance, such as which facts to prefer or how to read a field.
317
288
  #
318
289
  # @return [String, nil]
319
290
  optional :instructions, String
@@ -322,26 +293,29 @@ module ContextDev
322
293
  # Some parameter documentations has been truncated, see
323
294
  # {ContextDev::Models::WebScrapeParams::JsonParams} for more details.
324
295
  #
325
- # Required when formats.json is true.
296
+ # Requires `formats.json: true`; required when it is set.
326
297
  #
327
- # @param schema [Hash{Symbol=>Object}] JSON Schema for the returned object. Must describe a top-level object; at most 5
298
+ # @param schema [Hash{Symbol=>Object}] JSON Schema (not an example object) for a top-level object, up to 50 KB. Use opt
328
299
  #
329
- # @param instructions [String] Optional guidance on which facts to prioritize or how to interpret schema fields
300
+ # @param instructions [String] Extra guidance, such as which facts to prefer or how to read a field.
330
301
  end
331
302
 
332
303
  class MarkdownParams < ContextDev::Internal::Type::BaseModel
333
304
  # @!attribute include_images
305
+ # Include images in the Markdown using image syntax with URLs and alt text.
334
306
  #
335
307
  # @return [Boolean, nil]
336
308
  optional :include_images, ContextDev::Internal::Type::Boolean, api_name: :includeImages
337
309
 
338
310
  # @!attribute include_links
311
+ # Keep link URLs in the Markdown. Set false to return link text without URLs.
339
312
  #
340
313
  # @return [Boolean, nil]
341
314
  optional :include_links, ContextDev::Internal::Type::Boolean, api_name: :includeLinks
342
315
 
343
316
  # @!attribute inline_images
344
- # Base64 images use placeholders by default. Requires includeImages: true.
317
+ # How base64 images appear: `placeholder` (default) or `preserve`. Requires
318
+ # `includeImages`.
345
319
  #
346
320
  # @return [Symbol, ContextDev::Models::WebScrapeParams::MarkdownParams::InlineImages, nil]
347
321
  optional :inline_images,
@@ -349,15 +323,19 @@ module ContextDev
349
323
  api_name: :inlineImages
350
324
 
351
325
  # @!method initialize(include_images: nil, include_links: nil, inline_images: nil)
352
- # Markdown options. Requires formats.markdown: true.
326
+ # Some parameter documentations has been truncated, see
327
+ # {ContextDev::Models::WebScrapeParams::MarkdownParams} for more details.
328
+ #
329
+ # Markdown options. Requires `formats.markdown`.
353
330
  #
354
- # @param include_images [Boolean]
331
+ # @param include_images [Boolean] Include images in the Markdown using image syntax with URLs and alt text.
355
332
  #
356
- # @param include_links [Boolean]
333
+ # @param include_links [Boolean] Keep link URLs in the Markdown. Set false to return link text without URLs.
357
334
  #
358
- # @param inline_images [Symbol, ContextDev::Models::WebScrapeParams::MarkdownParams::InlineImages] Base64 images use placeholders by default. Requires includeImages: true.
335
+ # @param inline_images [Symbol, ContextDev::Models::WebScrapeParams::MarkdownParams::InlineImages] How base64 images appear: `placeholder` (default) or `preserve`. Requires `inclu
359
336
 
360
- # Base64 images use placeholders by default. Requires includeImages: true.
337
+ # How base64 images appear: `placeholder` (default) or `preserve`. Requires
338
+ # `includeImages`.
361
339
  #
362
340
  # @see ContextDev::Models::WebScrapeParams::MarkdownParams#inline_images
363
341
  module InlineImages
@@ -373,8 +351,8 @@ module ContextDev
373
351
 
374
352
  class ParseParams < ContextDev::Internal::Type::BaseModel
375
353
  # @!attribute rules
376
- # Map field names to CSS selectors or rules. Missing items return null; missing
377
- # lists return [].
354
+ # Field names mapped to CSS selectors (`h1`, `a@href`) or rule objects. Max 100
355
+ # fields, 5 levels.
378
356
  #
379
357
  # @return [Hash{Symbol=>String, ContextDev::Models::WebScrapeParams::ParseParams::Rule::UnionMember1}]
380
358
  required :rules,
@@ -384,9 +362,9 @@ module ContextDev
384
362
  # Some parameter documentations has been truncated, see
385
363
  # {ContextDev::Models::WebScrapeParams::ParseParams} for more details.
386
364
  #
387
- # Required when formats.parse is true.
365
+ # Requires `formats.parse: true`; required when it is set.
388
366
  #
389
- # @param rules [Hash{Symbol=>String, ContextDev::Models::WebScrapeParams::ParseParams::Rule::UnionMember1}] Map field names to CSS selectors or rules. Missing items return null; missing li
367
+ # @param rules [Hash{Symbol=>String, ContextDev::Models::WebScrapeParams::ParseParams::Rule::UnionMember1}] Field names mapped to CSS selectors (`h1`, `a@href`) or rule objects. Max 100 fi
390
368
 
391
369
  module Rule
392
370
  extend ContextDev::Internal::Type::Union
@@ -397,25 +375,38 @@ module ContextDev
397
375
 
398
376
  class UnionMember1 < ContextDev::Internal::Type::BaseModel
399
377
  # @!attribute selector
378
+ # CSS selector to match within the current page or parent rule.
400
379
  #
401
380
  # @return [String]
402
381
  required :selector, String
403
382
 
404
383
  # @!attribute output
384
+ # Return text, HTML, an attribute such as `@href`, or nested field rules. Defaults
385
+ # to text.
405
386
  #
406
387
  # @return [Symbol, String, Object, ContextDev::Models::WebScrapeParams::ParseParams::Rule::UnionMember1::Output, nil]
407
388
  optional :output, union: -> { ContextDev::WebScrapeParams::ParseParams::Rule::UnionMember1::Output }
408
389
 
409
390
  # @!attribute type
391
+ # Return the first match with `item` or all matches with `list`.
410
392
  #
411
393
  # @return [Symbol, ContextDev::Models::WebScrapeParams::ParseParams::Rule::UnionMember1::Type, nil]
412
394
  optional :type, enum: -> { ContextDev::WebScrapeParams::ParseParams::Rule::UnionMember1::Type }
413
395
 
414
396
  # @!method initialize(selector:, output: nil, type: nil)
415
- # @param selector [String]
416
- # @param output [Symbol, String, Object, ContextDev::Models::WebScrapeParams::ParseParams::Rule::UnionMember1::Output]
417
- # @param type [Symbol, ContextDev::Models::WebScrapeParams::ParseParams::Rule::UnionMember1::Type]
397
+ # Some parameter documentations has been truncated, see
398
+ # {ContextDev::Models::WebScrapeParams::ParseParams::Rule::UnionMember1} for more
399
+ # details.
400
+ #
401
+ # @param selector [String] CSS selector to match within the current page or parent rule.
402
+ #
403
+ # @param output [Symbol, String, Object, ContextDev::Models::WebScrapeParams::ParseParams::Rule::UnionMember1::Output] Return text, HTML, an attribute such as `@href`, or nested field rules. Defaults
404
+ #
405
+ # @param type [Symbol, ContextDev::Models::WebScrapeParams::ParseParams::Rule::UnionMember1::Type] Return the first match with `item` or all matches with `list`.
418
406
 
407
+ # Return text, HTML, an attribute such as `@href`, or nested field rules. Defaults
408
+ # to text.
409
+ #
419
410
  # @see ContextDev::Models::WebScrapeParams::ParseParams::Rule::UnionMember1#output
420
411
  module Output
421
412
  extend ContextDev::Internal::Type::Union
@@ -449,6 +440,8 @@ module ContextDev
449
440
  # @!endgroup
450
441
  end
451
442
 
443
+ # Return the first match with `item` or all matches with `list`.
444
+ #
452
445
  # @see ContextDev::Models::WebScrapeParams::ParseParams::Rule::UnionMember1#type
453
446
  module Type
454
447
  extend ContextDev::Internal::Type::Enum
@@ -468,32 +461,27 @@ module ContextDev
468
461
 
469
462
  class ProductParams < ContextDev::Internal::Type::BaseModel
470
463
  # @!attribute use_ai_fallback
471
- # Extract the product with a specialized model when the page has no structured
472
- # product data. Adds six credits when the model verdict is returned successfully.
473
- # If the fallback fails, the product output has success: false and data: null with
474
- # no fallback charge; other outputs remain available. Request deadlines and client
475
- # disconnects still apply.
464
+ # Use an AI model when the page has no structured product data.
476
465
  #
477
466
  # @return [Boolean, nil]
478
467
  optional :use_ai_fallback, ContextDev::Internal::Type::Boolean, api_name: :useAIFallback
479
468
 
480
469
  # @!method initialize(use_ai_fallback: nil)
481
- # Some parameter documentations has been truncated, see
482
- # {ContextDev::Models::WebScrapeParams::ProductParams} for more details.
483
- #
484
470
  # Product options. Requires formats.product: true.
485
471
  #
486
- # @param use_ai_fallback [Boolean] Extract the product with a specialized model when the page has no structured pro
472
+ # @param use_ai_fallback [Boolean] Use an AI model when the page has no structured product data.
487
473
  end
488
474
 
489
475
  class ScreenshotParams < ContextDev::Internal::Type::BaseModel
490
476
  # @!attribute area
491
- # Viewport, full page, one visible element, or a rectangle. Maximum 40 megapixels.
477
+ # What to capture: `viewport`, `fullPage`, one element, or a rectangle. Max 40
478
+ # megapixels.
492
479
  #
493
480
  # @return [Symbol, ContextDev::Models::WebScrapeParams::ScreenshotParams::Area::Page, ContextDev::Models::WebScrapeParams::ScreenshotParams::Area::Element, ContextDev::Models::WebScrapeParams::ScreenshotParams::Area::Rectangle, nil]
494
481
  optional :area, union: -> { ContextDev::WebScrapeParams::ScreenshotParams::Area }
495
482
 
496
483
  # @!attribute format_
484
+ # Image format for the screenshot.
497
485
  #
498
486
  # @return [Symbol, ContextDev::Models::WebScrapeParams::ScreenshotParams::Format, nil]
499
487
  optional :format_,
@@ -508,11 +496,12 @@ module ContextDev
508
496
  #
509
497
  # Screenshot options. Requires formats.screenshot: true.
510
498
  #
511
- # @param area [Symbol, ContextDev::Models::WebScrapeParams::ScreenshotParams::Area::Page, ContextDev::Models::WebScrapeParams::ScreenshotParams::Area::Element, ContextDev::Models::WebScrapeParams::ScreenshotParams::Area::Rectangle] Viewport, full page, one visible element, or a rectangle. Maximum 40 megapixels.
499
+ # @param area [Symbol, ContextDev::Models::WebScrapeParams::ScreenshotParams::Area::Page, ContextDev::Models::WebScrapeParams::ScreenshotParams::Area::Element, ContextDev::Models::WebScrapeParams::ScreenshotParams::Area::Rectangle] What to capture: `viewport`, `fullPage`, one element, or a rectangle. Max 40 meg
512
500
  #
513
- # @param format_ [Symbol, ContextDev::Models::WebScrapeParams::ScreenshotParams::Format]
501
+ # @param format_ [Symbol, ContextDev::Models::WebScrapeParams::ScreenshotParams::Format] Image format for the screenshot.
514
502
 
515
- # Viewport, full page, one visible element, or a rectangle. Maximum 40 megapixels.
503
+ # What to capture: `viewport`, `fullPage`, one element, or a rectangle. Max 40
504
+ # megapixels.
516
505
  #
517
506
  # @see ContextDev::Models::WebScrapeParams::ScreenshotParams#area
518
507
  module Area
@@ -537,32 +526,36 @@ module ContextDev
537
526
 
538
527
  class Element < ContextDev::Internal::Type::BaseModel
539
528
  # @!attribute selector
540
- # Must match one visible element.
529
+ # CSS selector matching exactly one visible element.
541
530
  #
542
531
  # @return [String]
543
532
  required :selector, String
544
533
 
545
534
  # @!method initialize(selector:)
546
- # @param selector [String] Must match one visible element.
535
+ # @param selector [String] CSS selector matching exactly one visible element.
547
536
  end
548
537
 
549
538
  class Rectangle < ContextDev::Internal::Type::BaseModel
550
539
  # @!attribute height
540
+ # Height of the capture in pixels.
551
541
  #
552
542
  # @return [Integer]
553
543
  required :height, Integer
554
544
 
555
545
  # @!attribute width
546
+ # Width of the capture in pixels.
556
547
  #
557
548
  # @return [Integer]
558
549
  required :width, Integer
559
550
 
560
551
  # @!attribute x
552
+ # Left edge of the capture, in pixels from the document origin.
561
553
  #
562
554
  # @return [Integer]
563
555
  required :x, Integer
564
556
 
565
557
  # @!attribute y_
558
+ # Top edge of the capture, in pixels from the document origin.
566
559
  #
567
560
  # @return [Integer]
568
561
  required :y_, Integer, api_name: :y
@@ -570,16 +563,21 @@ module ContextDev
570
563
  # @!method initialize(height:, width:, x:, y_:)
571
564
  # Pixels from the document origin.
572
565
  #
573
- # @param height [Integer]
574
- # @param width [Integer]
575
- # @param x [Integer]
576
- # @param y_ [Integer]
566
+ # @param height [Integer] Height of the capture in pixels.
567
+ #
568
+ # @param width [Integer] Width of the capture in pixels.
569
+ #
570
+ # @param x [Integer] Left edge of the capture, in pixels from the document origin.
571
+ #
572
+ # @param y_ [Integer] Top edge of the capture, in pixels from the document origin.
577
573
  end
578
574
 
579
575
  # @!method self.variants
580
576
  # @return [Array(Symbol, ContextDev::Models::WebScrapeParams::ScreenshotParams::Area::Page, ContextDev::Models::WebScrapeParams::ScreenshotParams::Area::Element, ContextDev::Models::WebScrapeParams::ScreenshotParams::Area::Rectangle)]
581
577
  end
582
578
 
579
+ # Image format for the screenshot.
580
+ #
583
581
  # @see ContextDev::Models::WebScrapeParams::ScreenshotParams#format_
584
582
  module Format
585
583
  extend ContextDev::Internal::Type::Enum
@@ -595,59 +593,58 @@ module ContextDev
595
593
 
596
594
  class SharedParams < ContextDev::Internal::Type::BaseModel
597
595
  # @!attribute actions
598
- # Run in order before capture. A failed action fails the request. Bypasses
599
- # caching.
596
+ # Browser steps run in order before capture. Requires a paid plan. Skips the
597
+ # cache.
600
598
  #
601
599
  # @return [Array<ContextDev::Models::WebScrapeParams::SharedParams::Action::Perform, ContextDev::Models::WebScrapeParams::SharedParams::Action::Scroll, ContextDev::Models::WebScrapeParams::SharedParams::Action::Wait, ContextDev::Models::WebScrapeParams::SharedParams::Action::WaitFor>, nil]
602
600
  optional :actions,
603
601
  -> { ContextDev::Internal::Type::ArrayOf[union: ContextDev::WebScrapeParams::SharedParams::Action] }
604
602
 
605
603
  # @!attribute country
606
- # Supported two-letter country code, case-insensitive. Applies to every output,
607
- # including image downloads.
604
+ # Proxy country as a two-letter code, such as `US`. Case-insensitive.
608
605
  #
609
606
  # @return [String, nil]
610
607
  optional :country, String
611
608
 
612
609
  # @!attribute dismiss_cookies
613
- # Dismiss cookie banners by accepting cookies before actions.
610
+ # Accept cookie banners before actions and capture.
614
611
  #
615
612
  # @return [Boolean, nil]
616
613
  optional :dismiss_cookies, ContextDev::Internal::Type::Boolean, api_name: :dismissCookies
617
614
 
618
615
  # @!attribute dismiss_popups
619
- # Dismiss other popups before actions.
616
+ # Close other popups before actions and capture.
620
617
  #
621
618
  # @return [Boolean, nil]
622
619
  optional :dismiss_popups, ContextDev::Internal::Type::Boolean, api_name: :dismissPopups
623
620
 
624
621
  # @!attribute exclude_selectors
625
- # Remove matching content. Exclusions win.
622
+ # Remove elements matching these CSS selectors. Overrides `includeSelectors`.
626
623
  #
627
624
  # @return [Array<String>, nil]
628
625
  optional :exclude_selectors, ContextDev::Internal::Type::ArrayOf[String], api_name: :excludeSelectors
629
626
 
630
627
  # @!attribute headers
631
- # Headers for the target origin. Requests with custom headers bypass caching.
628
+ # HTTP headers to send to the target site. Requests with headers skip the cache.
632
629
  #
633
630
  # @return [Hash{Symbol=>String}, nil]
634
631
  optional :headers, ContextDev::Internal::Type::HashOf[String]
635
632
 
636
633
  # @!attribute include_frames
637
- # Include iframe content in extraction. Screenshots show visible frames
638
- # regardless.
634
+ # Include iframe content in HTML and text outputs. Screenshots always show visible
635
+ # frames.
639
636
  #
640
637
  # @return [Boolean, nil]
641
638
  optional :include_frames, ContextDev::Internal::Type::Boolean, api_name: :includeFrames
642
639
 
643
640
  # @!attribute include_selectors
644
- # Keep matching content after mainContentOnly.
641
+ # Keep only elements matching these CSS selectors.
645
642
  #
646
643
  # @return [Array<String>, nil]
647
644
  optional :include_selectors, ContextDev::Internal::Type::ArrayOf[String], api_name: :includeSelectors
648
645
 
649
646
  # @!attribute main_content_only
650
- # Keep only main content in HTML, Markdown, images, and parsed fields.
647
+ # Keep only the main content. Doesn't affect `screenshot`, `bytes`, or `product`.
651
648
  #
652
649
  # @return [Boolean, nil]
653
650
  optional :main_content_only, ContextDev::Internal::Type::Boolean, api_name: :mainContentOnly
@@ -659,27 +656,28 @@ module ContextDev
659
656
  optional :parsers, -> { ContextDev::WebScrapeParams::SharedParams::Parsers }
660
657
 
661
658
  # @!attribute settle_animations
662
- # Settle animations before capture. Defaults to true with screenshots, otherwise
663
- # false.
659
+ # Wait for CSS animations to finish before capture. Defaults to `true` when
660
+ # `screenshot` is requested.
664
661
  #
665
662
  # @return [Boolean, nil]
666
663
  optional :settle_animations, ContextDev::Internal::Type::Boolean, api_name: :settleAnimations
667
664
 
668
665
  # @!attribute theme
669
- # Override the browser color scheme.
666
+ # Emulate a light or dark color scheme.
670
667
  #
671
668
  # @return [Symbol, ContextDev::Models::WebScrapeParams::SharedParams::Theme, nil]
672
669
  optional :theme, enum: -> { ContextDev::WebScrapeParams::SharedParams::Theme }
673
670
 
674
671
  # @!attribute viewport
675
- # Browser dimensions in pixels.
672
+ # Browser size in pixels. Omit for 1920 × 1080. When provided, missing dimensions
673
+ # default to 1440 × 900.
676
674
  #
677
675
  # @return [ContextDev::Models::WebScrapeParams::SharedParams::Viewport, nil]
678
676
  optional :viewport, -> { ContextDev::WebScrapeParams::SharedParams::Viewport }
679
677
 
680
678
  # @!attribute wait_for
681
- # After actions, wait this many milliseconds or until a CSS selector is visible.
682
- # Defaults to 500 ms, or 2000 ms with frames or an XML URL. Set 0 to skip.
679
+ # Milliseconds, or a CSS selector to wait for, after actions. Defaults to 500
680
+ # (2000 with frames or XML).
683
681
  #
684
682
  # @return [Integer, String, nil]
685
683
  optional :wait_for,
@@ -692,36 +690,35 @@ module ContextDev
692
690
  # Some parameter documentations has been truncated, see
693
691
  # {ContextDev::Models::WebScrapeParams::SharedParams} for more details.
694
692
  #
695
- # Shared browser and content settings. Content filters leave screenshots and
696
- # original bytes unchanged.
693
+ # Browser and content settings shared by all outputs.
697
694
  #
698
- # @param actions [Array<ContextDev::Models::WebScrapeParams::SharedParams::Action::Perform, ContextDev::Models::WebScrapeParams::SharedParams::Action::Scroll, ContextDev::Models::WebScrapeParams::SharedParams::Action::Wait, ContextDev::Models::WebScrapeParams::SharedParams::Action::WaitFor>] Run in order before capture. A failed action fails the request. Bypasses caching
695
+ # @param actions [Array<ContextDev::Models::WebScrapeParams::SharedParams::Action::Perform, ContextDev::Models::WebScrapeParams::SharedParams::Action::Scroll, ContextDev::Models::WebScrapeParams::SharedParams::Action::Wait, ContextDev::Models::WebScrapeParams::SharedParams::Action::WaitFor>] Browser steps run in order before capture. Requires a paid plan. Skips the cache
699
696
  #
700
- # @param country [String] Supported two-letter country code, case-insensitive. Applies to every output, in
697
+ # @param country [String] Proxy country as a two-letter code, such as `US`. Case-insensitive.
701
698
  #
702
- # @param dismiss_cookies [Boolean] Dismiss cookie banners by accepting cookies before actions.
699
+ # @param dismiss_cookies [Boolean] Accept cookie banners before actions and capture.
703
700
  #
704
- # @param dismiss_popups [Boolean] Dismiss other popups before actions.
701
+ # @param dismiss_popups [Boolean] Close other popups before actions and capture.
705
702
  #
706
- # @param exclude_selectors [Array<String>] Remove matching content. Exclusions win.
703
+ # @param exclude_selectors [Array<String>] Remove elements matching these CSS selectors. Overrides `includeSelectors`.
707
704
  #
708
- # @param headers [Hash{Symbol=>String}] Headers for the target origin. Requests with custom headers bypass caching.
705
+ # @param headers [Hash{Symbol=>String}] HTTP headers to send to the target site. Requests with headers skip the cache.
709
706
  #
710
- # @param include_frames [Boolean] Include iframe content in extraction. Screenshots show visible frames regardless
707
+ # @param include_frames [Boolean] Include iframe content in HTML and text outputs. Screenshots always show visible
711
708
  #
712
- # @param include_selectors [Array<String>] Keep matching content after mainContentOnly.
709
+ # @param include_selectors [Array<String>] Keep only elements matching these CSS selectors.
713
710
  #
714
- # @param main_content_only [Boolean] Keep only main content in HTML, Markdown, images, and parsed fields.
711
+ # @param main_content_only [Boolean] Keep only the main content. Doesn't affect `screenshot`, `bytes`, or `product`.
715
712
  #
716
713
  # @param parsers [ContextDev::Models::WebScrapeParams::SharedParams::Parsers] Document parsing options.
717
714
  #
718
- # @param settle_animations [Boolean] Settle animations before capture. Defaults to true with screenshots, otherwise f
715
+ # @param settle_animations [Boolean] Wait for CSS animations to finish before capture. Defaults to `true` when `scree
719
716
  #
720
- # @param theme [Symbol, ContextDev::Models::WebScrapeParams::SharedParams::Theme] Override the browser color scheme.
717
+ # @param theme [Symbol, ContextDev::Models::WebScrapeParams::SharedParams::Theme] Emulate a light or dark color scheme.
721
718
  #
722
- # @param viewport [ContextDev::Models::WebScrapeParams::SharedParams::Viewport] Browser dimensions in pixels.
719
+ # @param viewport [ContextDev::Models::WebScrapeParams::SharedParams::Viewport] Browser size in pixels. Omit for 1920 × 1080. When provided, missing dimensions
723
720
  #
724
- # @param wait_for [Integer, String] After actions, wait this many milliseconds or until a CSS selector is visible. D
721
+ # @param wait_for [Integer, String] Milliseconds, or a CSS selector to wait for, after actions. Defaults to 500 (200
725
722
 
726
723
  module Action
727
724
  extend ContextDev::Internal::Type::Union
@@ -738,37 +735,44 @@ module ContextDev
738
735
 
739
736
  class Perform < ContextDev::Internal::Type::BaseModel
740
737
  # @!attribute action
738
+ # One browser instruction, such as clicking a button or entering text.
741
739
  #
742
740
  # @return [String]
743
741
  required :action, String
744
742
 
745
743
  # @!attribute type
744
+ # Use `perform` for a plain-language browser instruction.
746
745
  #
747
746
  # @return [Symbol, :perform]
748
747
  required :type, const: :perform
749
748
 
750
749
  # @!method initialize(action:, type: :perform)
751
- # @param action [String]
752
- # @param type [Symbol, :perform]
750
+ # @param action [String] One browser instruction, such as clicking a button or entering text.
751
+ #
752
+ # @param type [Symbol, :perform] Use `perform` for a plain-language browser instruction.
753
753
  end
754
754
 
755
755
  class Scroll < ContextDev::Internal::Type::BaseModel
756
756
  # @!attribute type
757
+ # Use `scroll` to move through the page or a container.
757
758
  #
758
759
  # @return [Symbol, :scroll]
759
760
  required :type, const: :scroll
760
761
 
761
762
  # @!attribute amount
763
+ # Distance per scroll: pixels, one `viewport`, or `max` to reach the end.
762
764
  #
763
765
  # @return [Integer, Symbol, ContextDev::Models::WebScrapeParams::SharedParams::Action::Scroll::Amount, nil]
764
766
  optional :amount, union: -> { ContextDev::WebScrapeParams::SharedParams::Action::Scroll::Amount }
765
767
 
766
768
  # @!attribute direction
769
+ # Direction to scroll.
767
770
  #
768
771
  # @return [Symbol, ContextDev::Models::WebScrapeParams::SharedParams::Action::Scroll::Direction, nil]
769
772
  optional :direction, enum: -> { ContextDev::WebScrapeParams::SharedParams::Action::Scroll::Direction }
770
773
 
771
774
  # @!attribute max_scrolls
775
+ # Maximum number of scroll steps for this action.
772
776
  #
773
777
  # @return [Integer, nil]
774
778
  optional :max_scrolls, Integer, api_name: :maxScrolls
@@ -780,16 +784,18 @@ module ContextDev
780
784
  optional :selector, String
781
785
 
782
786
  # @!method initialize(amount: nil, direction: nil, max_scrolls: nil, selector: nil, type: :scroll)
783
- # @param amount [Integer, Symbol, ContextDev::Models::WebScrapeParams::SharedParams::Action::Scroll::Amount]
787
+ # @param amount [Integer, Symbol, ContextDev::Models::WebScrapeParams::SharedParams::Action::Scroll::Amount] Distance per scroll: pixels, one `viewport`, or `max` to reach the end.
784
788
  #
785
- # @param direction [Symbol, ContextDev::Models::WebScrapeParams::SharedParams::Action::Scroll::Direction]
789
+ # @param direction [Symbol, ContextDev::Models::WebScrapeParams::SharedParams::Action::Scroll::Direction] Direction to scroll.
786
790
  #
787
- # @param max_scrolls [Integer]
791
+ # @param max_scrolls [Integer] Maximum number of scroll steps for this action.
788
792
  #
789
793
  # @param selector [String] Scroll this container. Omit to scroll the page.
790
794
  #
791
- # @param type [Symbol, :scroll]
795
+ # @param type [Symbol, :scroll] Use `scroll` to move through the page or a container.
792
796
 
797
+ # Distance per scroll: pixels, one `viewport`, or `max` to reach the end.
798
+ #
793
799
  # @see ContextDev::Models::WebScrapeParams::SharedParams::Action::Scroll#amount
794
800
  module Amount
795
801
  extend ContextDev::Internal::Type::Union
@@ -815,6 +821,8 @@ module ContextDev
815
821
  # @!endgroup
816
822
  end
817
823
 
824
+ # Direction to scroll.
825
+ #
818
826
  # @see ContextDev::Models::WebScrapeParams::SharedParams::Action::Scroll#direction
819
827
  module Direction
820
828
  extend ContextDev::Internal::Type::Enum
@@ -831,34 +839,40 @@ module ContextDev
831
839
 
832
840
  class Wait < ContextDev::Internal::Type::BaseModel
833
841
  # @!attribute milliseconds
842
+ # Time to pause in milliseconds before the next action.
834
843
  #
835
844
  # @return [Integer]
836
845
  required :milliseconds, Integer
837
846
 
838
847
  # @!attribute type
848
+ # Use `wait` to pause for a fixed duration.
839
849
  #
840
850
  # @return [Symbol, :wait]
841
851
  required :type, const: :wait
842
852
 
843
853
  # @!method initialize(milliseconds:, type: :wait)
844
- # @param milliseconds [Integer]
845
- # @param type [Symbol, :wait]
854
+ # @param milliseconds [Integer] Time to pause in milliseconds before the next action.
855
+ #
856
+ # @param type [Symbol, :wait] Use `wait` to pause for a fixed duration.
846
857
  end
847
858
 
848
859
  class WaitFor < ContextDev::Internal::Type::BaseModel
849
860
  # @!attribute selector
861
+ # CSS selector to wait for before continuing.
850
862
  #
851
863
  # @return [String]
852
864
  required :selector, String
853
865
 
854
866
  # @!attribute type
867
+ # Use `waitFor` to wait for a matching element.
855
868
  #
856
869
  # @return [Symbol, :waitFor]
857
870
  required :type, const: :waitFor
858
871
 
859
872
  # @!method initialize(selector:, type: :waitFor)
860
- # @param selector [String]
861
- # @param type [Symbol, :waitFor]
873
+ # @param selector [String] CSS selector to wait for before continuing.
874
+ #
875
+ # @param type [Symbol, :waitFor] Use `waitFor` to wait for a matching element.
862
876
  end
863
877
 
864
878
  # @!method self.variants
@@ -868,7 +882,7 @@ module ContextDev
868
882
  # @see ContextDev::Models::WebScrapeParams::SharedParams#parsers
869
883
  class Parsers < ContextDev::Internal::Type::BaseModel
870
884
  # @!attribute pdf
871
- # PDF text options for HTML, Markdown, and parsed fields.
885
+ # PDF page range and OCR.
872
886
  #
873
887
  # @return [ContextDev::Models::WebScrapeParams::SharedParams::Parsers::Pdf, nil]
874
888
  optional :pdf, -> { ContextDev::WebScrapeParams::SharedParams::Parsers::Pdf }
@@ -876,18 +890,18 @@ module ContextDev
876
890
  # @!method initialize(pdf: nil)
877
891
  # Document parsing options.
878
892
  #
879
- # @param pdf [ContextDev::Models::WebScrapeParams::SharedParams::Parsers::Pdf] PDF text options for HTML, Markdown, and parsed fields.
893
+ # @param pdf [ContextDev::Models::WebScrapeParams::SharedParams::Parsers::Pdf] PDF page range and OCR.
880
894
 
881
895
  # @see ContextDev::Models::WebScrapeParams::SharedParams::Parsers#pdf
882
896
  class Pdf < ContextDev::Internal::Type::BaseModel
883
897
  # @!attribute end_page
884
- # Last page to parse. Must be at least startPage.
898
+ # Last page to parse. Must be at least `startPage`.
885
899
  #
886
900
  # @return [Integer, nil]
887
901
  optional :end_page, Integer, api_name: :endPage
888
902
 
889
903
  # @!attribute ocr
890
- # Read text from scanned pages.
904
+ # Set `auto` to read scanned pages with OCR.
891
905
  #
892
906
  # @return [Symbol, ContextDev::Models::WebScrapeParams::SharedParams::Parsers::Pdf::Ocr, nil]
893
907
  optional :ocr, enum: -> { ContextDev::WebScrapeParams::SharedParams::Parsers::Pdf::Ocr }
@@ -899,15 +913,15 @@ module ContextDev
899
913
  optional :start_page, Integer, api_name: :startPage
900
914
 
901
915
  # @!method initialize(end_page: nil, ocr: nil, start_page: nil)
902
- # PDF text options for HTML, Markdown, and parsed fields.
916
+ # PDF page range and OCR.
903
917
  #
904
- # @param end_page [Integer] Last page to parse. Must be at least startPage.
918
+ # @param end_page [Integer] Last page to parse. Must be at least `startPage`.
905
919
  #
906
- # @param ocr [Symbol, ContextDev::Models::WebScrapeParams::SharedParams::Parsers::Pdf::Ocr] Read text from scanned pages.
920
+ # @param ocr [Symbol, ContextDev::Models::WebScrapeParams::SharedParams::Parsers::Pdf::Ocr] Set `auto` to read scanned pages with OCR.
907
921
  #
908
922
  # @param start_page [Integer] First page to parse, starting at 1.
909
923
 
910
- # Read text from scanned pages.
924
+ # Set `auto` to read scanned pages with OCR.
911
925
  #
912
926
  # @see ContextDev::Models::WebScrapeParams::SharedParams::Parsers::Pdf#ocr
913
927
  module Ocr
@@ -922,7 +936,7 @@ module ContextDev
922
936
  end
923
937
  end
924
938
 
925
- # Override the browser color scheme.
939
+ # Emulate a light or dark color scheme.
926
940
  #
927
941
  # @see ContextDev::Models::WebScrapeParams::SharedParams#theme
928
942
  module Theme
@@ -938,24 +952,28 @@ module ContextDev
938
952
  # @see ContextDev::Models::WebScrapeParams::SharedParams#viewport
939
953
  class Viewport < ContextDev::Internal::Type::BaseModel
940
954
  # @!attribute height
955
+ # Browser viewport height in pixels.
941
956
  #
942
957
  # @return [Integer, nil]
943
958
  optional :height, Integer
944
959
 
945
960
  # @!attribute width
961
+ # Browser viewport width in pixels.
946
962
  #
947
963
  # @return [Integer, nil]
948
964
  optional :width, Integer
949
965
 
950
966
  # @!method initialize(height: nil, width: nil)
951
- # Browser dimensions in pixels.
967
+ # Browser size in pixels. Omit for 1920 × 1080. When provided, missing dimensions
968
+ # default to 1440 × 900.
969
+ #
970
+ # @param height [Integer] Browser viewport height in pixels.
952
971
  #
953
- # @param height [Integer]
954
- # @param width [Integer]
972
+ # @param width [Integer] Browser viewport width in pixels.
955
973
  end
956
974
 
957
- # After actions, wait this many milliseconds or until a CSS selector is visible.
958
- # Defaults to 500 ms, or 2000 ms with frames or an XML URL. Set 0 to skip.
975
+ # Milliseconds, or a CSS selector to wait for, after actions. Defaults to 500
976
+ # (2000 with frames or XML).
959
977
  #
960
978
  # @see ContextDev::Models::WebScrapeParams::SharedParams#wait_for
961
979
  module WaitFor
@@ -972,17 +990,14 @@ module ContextDev
972
990
 
973
991
  class TimeoutOpts < ContextDev::Internal::Type::BaseModel
974
992
  # @!attribute milliseconds
975
- # Request deadline in milliseconds. Maximum: 300000 (5 minutes).
993
+ # Deadline in milliseconds.
976
994
  #
977
995
  # @return [Integer]
978
996
  required :milliseconds, Integer
979
997
 
980
998
  # @!attribute behavior
981
- # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
982
- # credits. "return-partial" returns usable results collected so far; if none are
983
- # available, the request still fails without charging credits. Partial results are
984
- # not cached as complete results. "return-partial" requires milliseconds of at
985
- # least 5000.
999
+ # "fail" returns 408 at the deadline. "return-partial" returns available results;
1000
+ # inspect the response’s partial flag. "return-partial" requires at least 5000 ms.
986
1001
  #
987
1002
  # @return [Symbol, ContextDev::Models::WebScrapeParams::TimeoutOpts::Behavior, nil]
988
1003
  optional :behavior, enum: -> { ContextDev::WebScrapeParams::TimeoutOpts::Behavior }
@@ -991,27 +1006,15 @@ module ContextDev
991
1006
  # Some parameter documentations has been truncated, see
992
1007
  # {ContextDev::Models::WebScrapeParams::TimeoutOpts} for more details.
993
1008
  #
994
- # Total deadline, including navigation, actions, waiting, and all outputs.
995
- # Defaults to 60000 milliseconds with behavior fail. Individual outputs have
996
- # internal deadlines that reserve time to return completed outputs; timed-out
997
- # outputs have success: false and data: null under either behavior. The overall
998
- # request deadline remains enforced: fail returns an error if that deadline is
999
- # reached. Use return-partial to allow the current page state and available
1000
- # outputs when the page is still loading. Partial responses set isPartial. Failed
1001
- # retrievals and incomplete captures are not cached; valid captured pieces may be
1002
- # cached independently. Fixed waits must fit before a response reserve of up to
1003
- # 5000 milliseconds (at most one quarter of the timeout) when using
1004
- # return-partial.
1009
+ # Deadline for the whole request. Defaults to 60000 ms with `fail`. Fixed waits
1010
+ # must end before it.
1005
1011
  #
1006
- # @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
1012
+ # @param milliseconds [Integer] Deadline in milliseconds.
1007
1013
  #
1008
- # @param behavior [Symbol, ContextDev::Models::WebScrapeParams::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
1014
+ # @param behavior [Symbol, ContextDev::Models::WebScrapeParams::TimeoutOpts::Behavior] "fail" returns 408 at the deadline. "return-partial" returns available results;
1009
1015
 
1010
- # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
1011
- # credits. "return-partial" returns usable results collected so far; if none are
1012
- # available, the request still fails without charging credits. Partial results are
1013
- # not cached as complete results. "return-partial" requires milliseconds of at
1014
- # least 5000.
1016
+ # "fail" returns 408 at the deadline. "return-partial" returns available results;
1017
+ # inspect the response’s partial flag. "return-partial" requires at least 5000 ms.
1015
1018
  #
1016
1019
  # @see ContextDev::Models::WebScrapeParams::TimeoutOpts#behavior
1017
1020
  module Behavior
@@ -1025,8 +1028,7 @@ module ContextDev
1025
1028
  end
1026
1029
  end
1027
1030
 
1028
- # Zero data retention. Bypasses caches and uploads; excludes request/response
1029
- # content and tags from logs. Must be enabled for your organization.
1031
+ # `enabled` turns on zero data retention. Your organization must have ZDR enabled.
1030
1032
  module Zdr
1031
1033
  extend ContextDev::Internal::Type::Enum
1032
1034