context.dev 2.18.0 → 2.20.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 (116) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +220 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/client.rb +0 -4
  5. data/lib/context_dev/models/monitor_retrieve_run_params.rb +26 -0
  6. data/lib/context_dev/models/monitor_retrieve_run_response.rb +232 -0
  7. data/lib/context_dev/models/monitor_rotate_webhook_secret_params.rb +20 -0
  8. data/lib/context_dev/models/monitor_rotate_webhook_secret_response.rb +765 -0
  9. data/lib/context_dev/models/{web_web_scrape_sitemap_params.rb → web_map_urls_params.rb} +14 -14
  10. data/lib/context_dev/models/web_map_urls_response.rb +123 -0
  11. data/lib/context_dev/models/web_scrape_params.rb +1035 -0
  12. data/lib/context_dev/models/web_scrape_response.rb +974 -0
  13. data/lib/context_dev/models/web_screenshot_params.rb +15 -1
  14. data/lib/context_dev/models/web_screenshot_response.rb +3 -3
  15. data/lib/context_dev/models.rb +8 -22
  16. data/lib/context_dev/resources/brand.rb +0 -36
  17. data/lib/context_dev/resources/monitors.rb +47 -0
  18. data/lib/context_dev/resources/web.rb +118 -486
  19. data/lib/context_dev/version.rb +1 -1
  20. data/lib/context_dev.rb +8 -23
  21. data/rbi/context_dev/client.rbi +0 -3
  22. data/rbi/context_dev/models/monitor_retrieve_run_params.rbi +46 -0
  23. data/rbi/context_dev/models/monitor_retrieve_run_response.rbi +452 -0
  24. data/rbi/context_dev/models/monitor_rotate_webhook_secret_params.rbi +38 -0
  25. data/rbi/context_dev/models/monitor_rotate_webhook_secret_response.rbi +1367 -0
  26. data/rbi/context_dev/models/{web_web_scrape_sitemap_params.rbi → web_map_urls_params.rbi} +23 -45
  27. data/rbi/context_dev/models/web_map_urls_response.rbi +226 -0
  28. data/rbi/context_dev/models/web_scrape_params.rbi +2221 -0
  29. data/rbi/context_dev/models/web_scrape_response.rbi +1874 -0
  30. data/rbi/context_dev/models/web_screenshot_params.rbi +23 -0
  31. data/rbi/context_dev/models/web_screenshot_response.rbi +4 -4
  32. data/rbi/context_dev/models.rbi +9 -24
  33. data/rbi/context_dev/resources/brand.rbi +0 -35
  34. data/rbi/context_dev/resources/monitors.rbi +24 -0
  35. data/rbi/context_dev/resources/web.rbi +152 -654
  36. data/sig/context_dev/client.rbs +0 -2
  37. data/sig/context_dev/models/monitor_retrieve_run_params.rbs +28 -0
  38. data/sig/context_dev/models/monitor_retrieve_run_response.rbs +182 -0
  39. data/sig/context_dev/models/monitor_rotate_webhook_secret_params.rbs +23 -0
  40. data/sig/context_dev/models/monitor_rotate_webhook_secret_response.rbs +545 -0
  41. data/sig/context_dev/models/{web_web_scrape_sitemap_params.rbs → web_map_urls_params.rbs} +22 -22
  42. data/sig/context_dev/models/web_map_urls_response.rbs +125 -0
  43. data/sig/context_dev/models/web_scrape_params.rbs +925 -0
  44. data/sig/context_dev/models/web_scrape_response.rbs +782 -0
  45. data/sig/context_dev/models/web_screenshot_params.rbs +7 -0
  46. data/sig/context_dev/models.rbs +8 -22
  47. data/sig/context_dev/resources/brand.rbs +0 -9
  48. data/sig/context_dev/resources/monitors.rbs +11 -0
  49. data/sig/context_dev/resources/web.rbs +33 -128
  50. metadata +26 -71
  51. data/lib/context_dev/models/ai_extract_product_params.rb +0 -125
  52. data/lib/context_dev/models/ai_extract_product_response.rb +0 -402
  53. data/lib/context_dev/models/ai_extract_products_params.rb +0 -233
  54. data/lib/context_dev/models/ai_extract_products_response.rb +0 -370
  55. data/lib/context_dev/models/brand_retrieve_simplified_params.rb +0 -120
  56. data/lib/context_dev/models/brand_retrieve_simplified_response.rb +0 -441
  57. data/lib/context_dev/models/web_extract_fonts_params.rb +0 -114
  58. data/lib/context_dev/models/web_extract_fonts_response.rb +0 -291
  59. data/lib/context_dev/models/web_extract_params.rb +0 -419
  60. data/lib/context_dev/models/web_extract_response.rb +0 -287
  61. data/lib/context_dev/models/web_web_scrape_bytes_params.rb +0 -346
  62. data/lib/context_dev/models/web_web_scrape_bytes_response.rb +0 -135
  63. data/lib/context_dev/models/web_web_scrape_html_params.rb +0 -812
  64. data/lib/context_dev/models/web_web_scrape_html_response.rb +0 -628
  65. data/lib/context_dev/models/web_web_scrape_images_params.rb +0 -373
  66. data/lib/context_dev/models/web_web_scrape_images_response.rb +0 -409
  67. data/lib/context_dev/models/web_web_scrape_md_params.rb +0 -670
  68. data/lib/context_dev/models/web_web_scrape_md_response.rb +0 -567
  69. data/lib/context_dev/models/web_web_scrape_screenshot_params.rb +0 -471
  70. data/lib/context_dev/models/web_web_scrape_screenshot_response.rb +0 -169
  71. data/lib/context_dev/models/web_web_scrape_sitemap_response.rb +0 -144
  72. data/lib/context_dev/resources/ai.rb +0 -71
  73. data/rbi/context_dev/models/ai_extract_product_params.rbi +0 -253
  74. data/rbi/context_dev/models/ai_extract_product_response.rbi +0 -791
  75. data/rbi/context_dev/models/ai_extract_products_params.rbi +0 -490
  76. data/rbi/context_dev/models/ai_extract_products_response.rbi +0 -718
  77. data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +0 -256
  78. data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +0 -1040
  79. data/rbi/context_dev/models/web_extract_fonts_params.rbi +0 -223
  80. data/rbi/context_dev/models/web_extract_fonts_response.rbi +0 -563
  81. data/rbi/context_dev/models/web_extract_params.rbi +0 -781
  82. data/rbi/context_dev/models/web_extract_response.rbi +0 -512
  83. data/rbi/context_dev/models/web_web_scrape_bytes_params.rbi +0 -702
  84. data/rbi/context_dev/models/web_web_scrape_bytes_response.rbi +0 -238
  85. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +0 -1690
  86. data/rbi/context_dev/models/web_web_scrape_html_response.rbi +0 -1287
  87. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +0 -728
  88. data/rbi/context_dev/models/web_web_scrape_images_response.rbi +0 -910
  89. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +0 -1052
  90. data/rbi/context_dev/models/web_web_scrape_md_response.rbi +0 -1088
  91. data/rbi/context_dev/models/web_web_scrape_screenshot_params.rbi +0 -1580
  92. data/rbi/context_dev/models/web_web_scrape_screenshot_response.rbi +0 -332
  93. data/rbi/context_dev/models/web_web_scrape_sitemap_response.rbi +0 -258
  94. data/rbi/context_dev/resources/ai.rbi +0 -63
  95. data/sig/context_dev/models/ai_extract_product_params.rbs +0 -106
  96. data/sig/context_dev/models/ai_extract_product_response.rbs +0 -314
  97. data/sig/context_dev/models/ai_extract_products_params.rbs +0 -202
  98. data/sig/context_dev/models/ai_extract_products_response.rbs +0 -293
  99. data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +0 -104
  100. data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +0 -413
  101. data/sig/context_dev/models/web_extract_fonts_params.rbs +0 -93
  102. data/sig/context_dev/models/web_extract_fonts_response.rbs +0 -230
  103. data/sig/context_dev/models/web_extract_params.rbs +0 -324
  104. data/sig/context_dev/models/web_extract_response.rbs +0 -239
  105. data/sig/context_dev/models/web_web_scrape_bytes_params.rbs +0 -531
  106. data/sig/context_dev/models/web_web_scrape_bytes_response.rbs +0 -108
  107. data/sig/context_dev/models/web_web_scrape_html_params.rbs +0 -878
  108. data/sig/context_dev/models/web_web_scrape_html_response.rbs +0 -525
  109. data/sig/context_dev/models/web_web_scrape_images_params.rbs +0 -281
  110. data/sig/context_dev/models/web_web_scrape_images_response.rbs +0 -371
  111. data/sig/context_dev/models/web_web_scrape_md_params.rbs +0 -758
  112. data/sig/context_dev/models/web_web_scrape_md_response.rbs +0 -465
  113. data/sig/context_dev/models/web_web_scrape_screenshot_params.rbs +0 -619
  114. data/sig/context_dev/models/web_web_scrape_screenshot_response.rbs +0 -127
  115. data/sig/context_dev/models/web_web_scrape_sitemap_response.rbs +0 -117
  116. data/sig/context_dev/resources/ai.rbs +0 -21
@@ -1,419 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ContextDev
4
- module Models
5
- # @see ContextDev::Resources::Web#extract
6
- class WebExtractParams < ContextDev::Internal::Type::BaseModel
7
- extend ContextDev::Internal::Type::RequestParameters::Converter
8
- include ContextDev::Internal::Type::RequestParameters
9
-
10
- # @!attribute schema
11
- # JSON Schema for the returned data object. Image fields such as `image_urls` or
12
- # `product_photos` automatically make page image references available to
13
- # extraction, so product data and photos can be returned in one call. TypeScript
14
- # Zod users can pass a JSON Schema generated from a Zod object; Python users can
15
- # pass the equivalent JSON Schema object.
16
- #
17
- # @return [Hash{Symbol=>Object}]
18
- required :schema, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]
19
-
20
- # @!attribute url
21
- # The starting website URL to crawl and extract from. Must include http:// or
22
- # https://.
23
- #
24
- # @return [String]
25
- required :url, String
26
-
27
- # @!attribute actions
28
- # Optional browser actions executed in order on the requested page after it loads,
29
- # before links are discovered or additional pages are crawled. Requires a paid
30
- # plan. When actions are provided and stopAfterMs is omitted, the crawl budget
31
- # defaults to 110000 ms.
32
- #
33
- # @return [Array<ContextDev::Models::WebExtractParams::Action::Wait, ContextDev::Models::WebExtractParams::Action::Perform, ContextDev::Models::WebExtractParams::Action::Scroll>, nil]
34
- optional :actions, -> { ContextDev::Internal::Type::ArrayOf[union: ContextDev::WebExtractParams::Action] }
35
-
36
- # @!attribute fact_check
37
- # When true, every returned value must be grounded in facts stated on the page;
38
- # fields that cannot be supported by the page are returned as null/empty. When
39
- # false (default), the model may make reasonable inferences and derivations from
40
- # the page content (e.g. ideal customer, competitor analysis, recommendations)
41
- # while keeping verifiable specifics (names, quotes, URLs, dates, metrics)
42
- # faithful to the source.
43
- #
44
- # @return [Boolean, nil]
45
- optional :fact_check, ContextDev::Internal::Type::Boolean, api_name: :factCheck
46
-
47
- # @!attribute follow_subdomains
48
- # When true, follow links on subdomains of the starting URL's domain.
49
- #
50
- # @return [Boolean, nil]
51
- optional :follow_subdomains, ContextDev::Internal::Type::Boolean, api_name: :followSubdomains
52
-
53
- # @!attribute include_frames
54
- # When true, iframe contents are included in Markdown before extraction.
55
- #
56
- # @return [Boolean, nil]
57
- optional :include_frames, ContextDev::Internal::Type::Boolean, api_name: :includeFrames
58
-
59
- # @!attribute instructions
60
- # Optional extraction guidance, such as which facts to prioritize or how to
61
- # interpret fields in the schema.
62
- #
63
- # @return [String, nil]
64
- optional :instructions, String
65
-
66
- # @!attribute max_age_ms
67
- # Return cached scrape results if a prior scrape for the same parameters is
68
- # younger than this many milliseconds. Defaults to 7 days (604800000 ms).
69
- #
70
- # @return [Integer, nil]
71
- optional :max_age_ms, Integer, api_name: :maxAgeMs
72
-
73
- # @!attribute max_depth
74
- # Optional maximum link depth from the starting URL (0 = only the starting page).
75
- # If omitted, there is no crawl depth limit.
76
- #
77
- # @return [Integer, nil]
78
- optional :max_depth, Integer, api_name: :maxDepth
79
-
80
- # @!attribute max_pages
81
- # Maximum number of pages to analyze for extraction. Hard cap: 50. Defaults to 5.
82
- #
83
- # @return [Integer, nil]
84
- optional :max_pages, Integer, api_name: :maxPages
85
-
86
- # @!attribute pdf
87
- #
88
- # @return [ContextDev::Models::WebExtractParams::Pdf, nil]
89
- optional :pdf, -> { ContextDev::WebExtractParams::Pdf }
90
-
91
- # @!attribute settle_animations
92
- # When true, waits briefly for CSS and transition animations to settle before
93
- # extracting each crawled page. Defaults to false. This adds a bit of latency in
94
- # exchange for more stable output on animated pages.
95
- #
96
- # @return [Boolean, nil]
97
- optional :settle_animations, ContextDev::Internal::Type::Boolean, api_name: :settleAnimations
98
-
99
- # @!attribute stop_after_ms
100
- # Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
101
- # (110s). Defaults to 80000 (80s), or 110000 (110s) when browser actions are
102
- # provided.
103
- #
104
- # @return [Integer, nil]
105
- optional :stop_after_ms, Integer, api_name: :stopAfterMs
106
-
107
- # @!attribute tags
108
- # Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
109
- #
110
- # @return [Array<String>, nil]
111
- optional :tags, ContextDev::Internal::Type::ArrayOf[String]
112
-
113
- # @!attribute timeout_opts
114
- # Optional request deadline and behavior on timeout. For GET requests, use
115
- # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
116
- # timeoutOpts object.
117
- #
118
- # @return [ContextDev::Models::WebExtractParams::TimeoutOpts, nil]
119
- optional :timeout_opts, -> { ContextDev::WebExtractParams::TimeoutOpts }, api_name: :timeoutOpts
120
-
121
- # @!attribute wait_for_ms
122
- # Optional browser wait time in milliseconds after initial page load for each
123
- # crawled page.
124
- #
125
- # @return [Integer, nil]
126
- optional :wait_for_ms, Integer, api_name: :waitForMs
127
-
128
- # @!attribute zdr
129
- # Set to enabled to bypass shared caches and omit request and response content
130
- # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
131
- # omitted. Requires zero data retention to be enabled for your organization
132
- # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
133
- # Successful ZDR responses include X-Context-ZDR: true.
134
- #
135
- # @return [Symbol, ContextDev::Models::WebExtractParams::Zdr, nil]
136
- optional :zdr, enum: -> { ContextDev::WebExtractParams::Zdr }
137
-
138
- # @!method initialize(schema:, url:, actions: nil, fact_check: nil, follow_subdomains: nil, include_frames: nil, instructions: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, settle_animations: nil, stop_after_ms: nil, tags: nil, timeout_opts: nil, wait_for_ms: nil, zdr: nil, request_options: {})
139
- # Some parameter documentations has been truncated, see
140
- # {ContextDev::Models::WebExtractParams} for more details.
141
- #
142
- # @param schema [Hash{Symbol=>Object}] JSON Schema for the returned data object. Image fields such as `image_urls` or `
143
- #
144
- # @param url [String] The starting website URL to crawl and extract from. Must include http:// or http
145
- #
146
- # @param actions [Array<ContextDev::Models::WebExtractParams::Action::Wait, ContextDev::Models::WebExtractParams::Action::Perform, ContextDev::Models::WebExtractParams::Action::Scroll>] Optional browser actions executed in order on the requested page after it loads,
147
- #
148
- # @param fact_check [Boolean] When true, every returned value must be grounded in facts stated on the page; fi
149
- #
150
- # @param follow_subdomains [Boolean] When true, follow links on subdomains of the starting URL's domain.
151
- #
152
- # @param include_frames [Boolean] When true, iframe contents are included in Markdown before extraction.
153
- #
154
- # @param instructions [String] Optional extraction guidance, such as which facts to prioritize or how to interp
155
- #
156
- # @param max_age_ms [Integer] Return cached scrape results if a prior scrape for the same parameters is younge
157
- #
158
- # @param max_depth [Integer] Optional maximum link depth from the starting URL (0 = only the starting page).
159
- #
160
- # @param max_pages [Integer] Maximum number of pages to analyze for extraction. Hard cap: 50. Defaults to 5.
161
- #
162
- # @param pdf [ContextDev::Models::WebExtractParams::Pdf]
163
- #
164
- # @param settle_animations [Boolean] When true, waits briefly for CSS and transition animations to settle before extr
165
- #
166
- # @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000 (1
167
- #
168
- # @param tags [Array<String>] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
169
- #
170
- # @param timeout_opts [ContextDev::Models::WebExtractParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
171
- #
172
- # @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load for each craw
173
- #
174
- # @param zdr [Symbol, ContextDev::Models::WebExtractParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro
175
- #
176
- # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
177
-
178
- # Browser action discriminated by `do`. Each variant exposes only its applicable
179
- # fields.
180
- module Action
181
- extend ContextDev::Internal::Type::Union
182
-
183
- discriminator :do
184
-
185
- # Pause for a fixed number of milliseconds before continuing to the next action.
186
- variant :wait, -> { ContextDev::WebExtractParams::Action::Wait }
187
-
188
- # Resolve and perform one natural-language browser action.
189
- variant :perform, -> { ContextDev::WebExtractParams::Action::Perform }
190
-
191
- # Scroll the page or a selected scrollable container, waiting adaptively for content and dimensions to settle after each iteration.
192
- variant :scroll, -> { ContextDev::WebExtractParams::Action::Scroll }
193
-
194
- class Wait < ContextDev::Internal::Type::BaseModel
195
- # @!attribute do_
196
- #
197
- # @return [Symbol, :wait]
198
- required :do_, const: :wait, api_name: :do
199
-
200
- # @!attribute time_ms
201
- #
202
- # @return [Integer]
203
- required :time_ms, Integer, api_name: :timeMs
204
-
205
- # @!method initialize(time_ms:, do_: :wait)
206
- # Pause for a fixed number of milliseconds before continuing to the next action.
207
- #
208
- # @param time_ms [Integer]
209
- # @param do_ [Symbol, :wait]
210
- end
211
-
212
- class Perform < ContextDev::Internal::Type::BaseModel
213
- # @!attribute action
214
- #
215
- # @return [String]
216
- required :action, String
217
-
218
- # @!attribute do_
219
- #
220
- # @return [Symbol, :perform]
221
- required :do_, const: :perform, api_name: :do
222
-
223
- # @!method initialize(action:, do_: :perform)
224
- # Resolve and perform one natural-language browser action.
225
- #
226
- # @param action [String]
227
- # @param do_ [Symbol, :perform]
228
- end
229
-
230
- class Scroll < ContextDev::Internal::Type::BaseModel
231
- # @!attribute do_
232
- #
233
- # @return [Symbol, :scroll]
234
- required :do_, const: :scroll, api_name: :do
235
-
236
- # @!attribute amount
237
- # Pixels per scroll, one visible viewport, or the current scroll boundary.
238
- # Defaults to viewport.
239
- #
240
- # @return [Integer, Symbol, ContextDev::Models::WebExtractParams::Action::Scroll::Amount, nil]
241
- optional :amount, union: -> { ContextDev::WebExtractParams::Action::Scroll::Amount }
242
-
243
- # @!attribute container
244
- # CSS selector for the first matching scroll container. Defaults to the page.
245
- #
246
- # @return [String, nil]
247
- optional :container, String
248
-
249
- # @!attribute direction
250
- # Direction to scroll. Defaults to down.
251
- #
252
- # @return [Symbol, ContextDev::Models::WebExtractParams::Action::Scroll::Direction, nil]
253
- optional :direction, enum: -> { ContextDev::WebExtractParams::Action::Scroll::Direction }
254
-
255
- # @!attribute max_scrolls
256
- # Maximum scroll iterations. Stops early when scrolling and scrollable extent stop
257
- # changing. Defaults to 1.
258
- #
259
- # @return [Integer, nil]
260
- optional :max_scrolls, Integer, api_name: :maxScrolls
261
-
262
- # @!method initialize(amount: nil, container: nil, direction: nil, max_scrolls: nil, do_: :scroll)
263
- # Some parameter documentations has been truncated, see
264
- # {ContextDev::Models::WebExtractParams::Action::Scroll} for more details.
265
- #
266
- # Scroll the page or a selected scrollable container, waiting adaptively for
267
- # content and dimensions to settle after each iteration.
268
- #
269
- # @param amount [Integer, Symbol, ContextDev::Models::WebExtractParams::Action::Scroll::Amount] Pixels per scroll, one visible viewport, or the current scroll boundary. Default
270
- #
271
- # @param container [String] CSS selector for the first matching scroll container. Defaults to the page.
272
- #
273
- # @param direction [Symbol, ContextDev::Models::WebExtractParams::Action::Scroll::Direction] Direction to scroll. Defaults to down.
274
- #
275
- # @param max_scrolls [Integer] Maximum scroll iterations. Stops early when scrolling and scrollable extent stop
276
- #
277
- # @param do_ [Symbol, :scroll]
278
-
279
- # Pixels per scroll, one visible viewport, or the current scroll boundary.
280
- # Defaults to viewport.
281
- #
282
- # @see ContextDev::Models::WebExtractParams::Action::Scroll#amount
283
- module Amount
284
- extend ContextDev::Internal::Type::Union
285
-
286
- variant Integer
287
-
288
- variant const: -> { ContextDev::Models::WebExtractParams::Action::Scroll::Amount::VIEWPORT }
289
-
290
- variant const: -> { ContextDev::Models::WebExtractParams::Action::Scroll::Amount::MAX }
291
-
292
- # @!method self.variants
293
- # @return [Array(Integer, Symbol)]
294
-
295
- define_sorbet_constant!(:Variants) do
296
- T.type_alias { T.any(Integer, ContextDev::WebExtractParams::Action::Scroll::Amount::TaggedSymbol) }
297
- end
298
-
299
- # @!group
300
-
301
- VIEWPORT = :viewport
302
- MAX = :max
303
-
304
- # @!endgroup
305
- end
306
-
307
- # Direction to scroll. Defaults to down.
308
- #
309
- # @see ContextDev::Models::WebExtractParams::Action::Scroll#direction
310
- module Direction
311
- extend ContextDev::Internal::Type::Enum
312
-
313
- UP = :up
314
- DOWN = :down
315
- LEFT = :left
316
- RIGHT = :right
317
-
318
- # @!method self.values
319
- # @return [Array<Symbol>]
320
- end
321
- end
322
-
323
- # @!method self.variants
324
- # @return [Array(ContextDev::Models::WebExtractParams::Action::Wait, ContextDev::Models::WebExtractParams::Action::Perform, ContextDev::Models::WebExtractParams::Action::Scroll)]
325
- end
326
-
327
- class Pdf < ContextDev::Internal::Type::BaseModel
328
- # @!attribute end_
329
- # Last 1-based PDF page to parse. Must be greater than or equal to start when both
330
- # are provided.
331
- #
332
- # @return [Integer, nil]
333
- optional :end_, Integer, api_name: :end
334
-
335
- # @!attribute should_parse
336
- # When true, PDF pages are fetched and parsed. When false, PDF pages are skipped.
337
- #
338
- # @return [Boolean, nil]
339
- optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
340
-
341
- # @!attribute start
342
- # First 1-based PDF page to parse.
343
- #
344
- # @return [Integer, nil]
345
- optional :start, Integer
346
-
347
- # @!method initialize(end_: nil, should_parse: nil, start: nil)
348
- # Some parameter documentations has been truncated, see
349
- # {ContextDev::Models::WebExtractParams::Pdf} for more details.
350
- #
351
- # @param end_ [Integer] Last 1-based PDF page to parse. Must be greater than or equal to start when both
352
- #
353
- # @param should_parse [Boolean] When true, PDF pages are fetched and parsed. When false, PDF pages are skipped.
354
- #
355
- # @param start [Integer] First 1-based PDF page to parse.
356
- end
357
-
358
- class TimeoutOpts < ContextDev::Internal::Type::BaseModel
359
- # @!attribute milliseconds
360
- # Request deadline in milliseconds. Maximum: 300000 (5 minutes).
361
- #
362
- # @return [Integer]
363
- required :milliseconds, Integer
364
-
365
- # @!attribute behavior
366
- # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
367
- # credits. "return-partial" returns usable results collected so far; if none are
368
- # available, the request still fails without charging credits. Partial results are
369
- # not cached as complete results.
370
- #
371
- # @return [Symbol, ContextDev::Models::WebExtractParams::TimeoutOpts::Behavior, nil]
372
- optional :behavior, enum: -> { ContextDev::WebExtractParams::TimeoutOpts::Behavior }
373
-
374
- # @!method initialize(milliseconds:, behavior: nil)
375
- # Some parameter documentations has been truncated, see
376
- # {ContextDev::Models::WebExtractParams::TimeoutOpts} for more details.
377
- #
378
- # Optional request deadline and behavior on timeout. For GET requests, use
379
- # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
380
- # timeoutOpts object.
381
- #
382
- # @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
383
- #
384
- # @param behavior [Symbol, ContextDev::Models::WebExtractParams::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
385
-
386
- # What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
387
- # credits. "return-partial" returns usable results collected so far; if none are
388
- # available, the request still fails without charging credits. Partial results are
389
- # not cached as complete results.
390
- #
391
- # @see ContextDev::Models::WebExtractParams::TimeoutOpts#behavior
392
- module Behavior
393
- extend ContextDev::Internal::Type::Enum
394
-
395
- FAIL = :fail
396
- RETURN_PARTIAL = :"return-partial"
397
-
398
- # @!method self.values
399
- # @return [Array<Symbol>]
400
- end
401
- end
402
-
403
- # Set to enabled to bypass shared caches and omit request and response content
404
- # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
405
- # omitted. Requires zero data retention to be enabled for your organization
406
- # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
407
- # Successful ZDR responses include X-Context-ZDR: true.
408
- module Zdr
409
- extend ContextDev::Internal::Type::Enum
410
-
411
- ENABLED = :enabled
412
- DISABLED = :disabled
413
-
414
- # @!method self.values
415
- # @return [Array<Symbol>]
416
- end
417
- end
418
- end
419
- end