context.dev 2.4.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -0
- data/README.md +1 -1
- data/lib/context_dev/client.rb +4 -0
- data/lib/context_dev/models/ai_extract_product_params.rb +9 -1
- data/lib/context_dev/models/ai_extract_products_params.rb +18 -2
- data/lib/context_dev/models/batch_cancel_params.rb +22 -0
- data/lib/context_dev/models/batch_cancel_response.rb +354 -0
- data/lib/context_dev/models/batch_get_results_params.rb +42 -0
- data/lib/context_dev/models/batch_get_results_response.rb +463 -0
- data/lib/context_dev/models/batch_list_params.rb +94 -0
- data/lib/context_dev/models/batch_list_response.rb +388 -0
- data/lib/context_dev/models/batch_retrieve_params.rb +22 -0
- data/lib/context_dev/models/batch_retrieve_response.rb +390 -0
- data/lib/context_dev/models/batch_submit_params.rb +56 -0
- data/lib/context_dev/models/batch_submit_response.rb +614 -0
- data/lib/context_dev/models/brand_retrieve_params.rb +109 -22
- data/lib/context_dev/models/brand_retrieve_response.rb +4 -6
- data/lib/context_dev/models/brand_retrieve_simplified_params.rb +32 -3
- data/lib/context_dev/models/error.rb +26 -0
- data/lib/context_dev/models/error_count.rb +26 -0
- data/lib/context_dev/models/industry_retrieve_naics_params.rb +11 -1
- data/lib/context_dev/models/industry_retrieve_sic_params.rb +11 -1
- data/lib/context_dev/models/monitor_create_params.rb +147 -132
- data/lib/context_dev/models/monitor_create_response.rb +40 -15
- data/lib/context_dev/models/monitor_get_credit_usage_params.rb +30 -0
- data/lib/context_dev/models/monitor_get_credit_usage_response.rb +59 -0
- data/lib/context_dev/models/monitor_get_limits_params.rb +14 -0
- data/lib/context_dev/models/monitor_get_limits_response.rb +52 -0
- data/lib/context_dev/models/monitor_list_account_changes_params.rb +16 -7
- data/lib/context_dev/models/monitor_list_account_changes_response.rb +2 -1
- data/lib/context_dev/models/monitor_list_account_runs_params.rb +7 -10
- data/lib/context_dev/models/monitor_list_changes_params.rb +8 -4
- data/lib/context_dev/models/monitor_list_changes_response.rb +2 -1
- data/lib/context_dev/models/monitor_list_params.rb +18 -19
- data/lib/context_dev/models/monitor_list_response.rb +27 -12
- data/lib/context_dev/models/monitor_list_runs_params.rb +7 -10
- data/lib/context_dev/models/monitor_retrieve_change_response.rb +2 -1
- data/lib/context_dev/models/monitor_retrieve_response.rb +27 -12
- data/lib/context_dev/models/monitor_update_params.rb +27 -12
- data/lib/context_dev/models/monitor_update_response.rb +27 -12
- data/lib/context_dev/models/parse_handle_params.rb +199 -33
- data/lib/context_dev/models/utility_prefetch_params.rb +9 -1
- data/lib/context_dev/models/web_extract_competitors_params.rb +11 -1
- data/lib/context_dev/models/web_extract_fonts_params.rb +14 -4
- data/lib/context_dev/models/web_extract_params.rb +19 -1
- data/lib/context_dev/models/web_extract_styleguide_params.rb +14 -4
- data/lib/context_dev/models/web_screenshot_params.rb +69 -18
- data/lib/context_dev/models/web_screenshot_response.rb +3 -2
- data/lib/context_dev/models/web_search_params.rb +9 -1
- data/lib/context_dev/models/web_web_crawl_md_params.rb +34 -1
- data/lib/context_dev/models/web_web_scrape_html_params.rb +268 -29
- data/lib/context_dev/models/web_web_scrape_html_response.rb +93 -1
- data/lib/context_dev/models/web_web_scrape_images_params.rb +208 -19
- data/lib/context_dev/models/web_web_scrape_md_params.rb +352 -38
- data/lib/context_dev/models/web_web_scrape_md_response.rb +93 -1
- data/lib/context_dev/models/web_web_scrape_sitemap_params.rb +45 -1
- data/lib/context_dev/models.rb +18 -0
- data/lib/context_dev/resources/ai.rb +3 -1
- data/lib/context_dev/resources/batch.rb +155 -0
- data/lib/context_dev/resources/brand.rb +6 -2
- data/lib/context_dev/resources/industry.rb +6 -2
- data/lib/context_dev/resources/monitors.rb +75 -37
- data/lib/context_dev/resources/parse.rb +15 -11
- data/lib/context_dev/resources/utility.rb +3 -1
- data/lib/context_dev/resources/web.rb +104 -55
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +17 -0
- data/rbi/context_dev/client.rbi +3 -0
- data/rbi/context_dev/models/ai_extract_product_params.rbi +11 -0
- data/rbi/context_dev/models/ai_extract_products_params.rbi +22 -0
- data/rbi/context_dev/models/batch_cancel_params.rbi +40 -0
- data/rbi/context_dev/models/batch_cancel_response.rbi +642 -0
- data/rbi/context_dev/models/batch_get_results_params.rbi +70 -0
- data/rbi/context_dev/models/batch_get_results_response.rbi +848 -0
- data/rbi/context_dev/models/batch_list_params.rbi +166 -0
- data/rbi/context_dev/models/batch_list_response.rbi +738 -0
- data/rbi/context_dev/models/batch_retrieve_params.rbi +40 -0
- data/rbi/context_dev/models/batch_retrieve_response.rbi +707 -0
- data/rbi/context_dev/models/batch_submit_params.rbi +105 -0
- data/rbi/context_dev/models/batch_submit_response.rbi +1330 -0
- data/rbi/context_dev/models/brand_retrieve_params.rbi +175 -64
- data/rbi/context_dev/models/brand_retrieve_response.rbi +8 -11
- data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +68 -5
- data/rbi/context_dev/models/error.rbi +32 -0
- data/rbi/context_dev/models/error_count.rbi +34 -0
- data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +15 -0
- data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +15 -0
- data/rbi/context_dev/models/monitor_create_params.rbi +280 -246
- data/rbi/context_dev/models/monitor_create_response.rbi +44 -11
- data/rbi/context_dev/models/monitor_get_credit_usage_params.rbi +60 -0
- data/rbi/context_dev/models/monitor_get_credit_usage_response.rbi +111 -0
- data/rbi/context_dev/models/monitor_get_limits_params.rbi +30 -0
- data/rbi/context_dev/models/monitor_get_limits_response.rbi +105 -0
- data/rbi/context_dev/models/monitor_list_account_changes_params.rbi +16 -0
- data/rbi/context_dev/models/monitor_list_account_changes_response.rbi +2 -0
- data/rbi/context_dev/models/monitor_list_account_runs_params.rbi +7 -6
- data/rbi/context_dev/models/monitor_list_changes_params.rbi +8 -0
- data/rbi/context_dev/models/monitor_list_changes_response.rbi +2 -0
- data/rbi/context_dev/models/monitor_list_params.rbi +23 -31
- data/rbi/context_dev/models/monitor_list_response.rbi +30 -9
- data/rbi/context_dev/models/monitor_list_runs_params.rbi +7 -6
- data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +2 -0
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +30 -9
- data/rbi/context_dev/models/monitor_update_params.rbi +30 -9
- data/rbi/context_dev/models/monitor_update_response.rbi +30 -9
- data/rbi/context_dev/models/parse_handle_params.rbi +400 -46
- data/rbi/context_dev/models/utility_prefetch_params.rbi +11 -0
- data/rbi/context_dev/models/web_extract_competitors_params.rbi +15 -0
- data/rbi/context_dev/models/web_extract_fonts_params.rbi +19 -7
- data/rbi/context_dev/models/web_extract_params.rbi +26 -0
- data/rbi/context_dev/models/web_extract_styleguide_params.rbi +19 -7
- data/rbi/context_dev/models/web_screenshot_params.rbi +108 -37
- data/rbi/context_dev/models/web_screenshot_response.rbi +4 -2
- data/rbi/context_dev/models/web_search_params.rbi +11 -0
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +53 -0
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +554 -49
- data/rbi/context_dev/models/web_web_scrape_html_response.rbi +182 -0
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +426 -30
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +742 -61
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +180 -0
- data/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +82 -0
- data/rbi/context_dev/models.rbi +18 -0
- data/rbi/context_dev/resources/ai.rbi +3 -0
- data/rbi/context_dev/resources/batch.rbi +120 -0
- data/rbi/context_dev/resources/brand.rbi +9 -1
- data/rbi/context_dev/resources/industry.rbi +10 -0
- data/rbi/context_dev/resources/monitors.rbi +67 -23
- data/rbi/context_dev/resources/parse.rbi +46 -19
- data/rbi/context_dev/resources/utility.rbi +3 -0
- data/rbi/context_dev/resources/web.rbi +224 -48
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/ai_extract_product_params.rbs +12 -1
- data/sig/context_dev/models/ai_extract_products_params.rbs +14 -0
- data/sig/context_dev/models/batch_cancel_params.rbs +23 -0
- data/sig/context_dev/models/batch_cancel_response.rbs +266 -0
- data/sig/context_dev/models/batch_get_results_params.rbs +36 -0
- data/sig/context_dev/models/batch_get_results_response.rbs +399 -0
- data/sig/context_dev/models/batch_list_params.rbs +94 -0
- data/sig/context_dev/models/batch_list_response.rbs +304 -0
- data/sig/context_dev/models/batch_retrieve_params.rbs +23 -0
- data/sig/context_dev/models/batch_retrieve_response.rbs +290 -0
- data/sig/context_dev/models/batch_submit_params.rbs +52 -0
- data/sig/context_dev/models/batch_submit_response.rbs +542 -0
- data/sig/context_dev/models/brand_retrieve_params.rbs +97 -51
- data/sig/context_dev/models/brand_retrieve_response.rbs +2 -2
- data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +34 -5
- data/sig/context_dev/models/error.rbs +15 -0
- data/sig/context_dev/models/error_count.rbs +15 -0
- data/sig/context_dev/models/industry_retrieve_naics_params.rbs +7 -0
- data/sig/context_dev/models/industry_retrieve_sic_params.rbs +7 -0
- data/sig/context_dev/models/monitor_create_params.rbs +117 -97
- data/sig/context_dev/models/monitor_create_response.rbs +18 -1
- data/sig/context_dev/models/monitor_get_credit_usage_params.rbs +32 -0
- data/sig/context_dev/models/monitor_get_credit_usage_response.rbs +52 -0
- data/sig/context_dev/models/monitor_get_limits_params.rbs +15 -0
- data/sig/context_dev/models/monitor_get_limits_response.rbs +43 -0
- data/sig/context_dev/models/monitor_list_params.rbs +8 -14
- data/sig/context_dev/models/monitor_list_response.rbs +13 -1
- data/sig/context_dev/models/monitor_retrieve_response.rbs +13 -1
- data/sig/context_dev/models/monitor_update_params.rbs +13 -1
- data/sig/context_dev/models/monitor_update_response.rbs +13 -1
- data/sig/context_dev/models/parse_handle_params.rbs +124 -25
- data/sig/context_dev/models/utility_prefetch_params.rbs +7 -0
- data/sig/context_dev/models/web_extract_competitors_params.rbs +12 -1
- data/sig/context_dev/models/web_extract_fonts_params.rbs +10 -5
- data/sig/context_dev/models/web_extract_params.rbs +14 -0
- data/sig/context_dev/models/web_extract_styleguide_params.rbs +10 -5
- data/sig/context_dev/models/web_screenshot_params.rbs +41 -20
- data/sig/context_dev/models/web_search_params.rbs +7 -0
- data/sig/context_dev/models/web_web_crawl_md_params.rbs +28 -1
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +175 -47
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +85 -0
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +128 -38
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +229 -62
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +85 -0
- data/sig/context_dev/models/web_web_scrape_sitemap_params.rbs +35 -1
- data/sig/context_dev/models.rbs +18 -0
- data/sig/context_dev/resources/ai.rbs +1 -0
- data/sig/context_dev/resources/batch.rbs +41 -0
- data/sig/context_dev/resources/brand.rbs +3 -1
- data/sig/context_dev/resources/industry.rbs +2 -0
- data/sig/context_dev/resources/monitors.rbs +14 -4
- data/sig/context_dev/resources/parse.rbs +8 -5
- data/sig/context_dev/resources/utility.rbs +1 -0
- data/sig/context_dev/resources/web.rbs +47 -26
- metadata +53 -2
|
@@ -38,6 +38,7 @@ module ContextDev
|
|
|
38
38
|
|
|
39
39
|
# @!attribute tags
|
|
40
40
|
# User-defined tags for grouping and filtering monitors and their changes.
|
|
41
|
+
# Duplicates are removed.
|
|
41
42
|
#
|
|
42
43
|
# @return [Array<String>, nil]
|
|
43
44
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
@@ -68,7 +69,7 @@ module ContextDev
|
|
|
68
69
|
#
|
|
69
70
|
# @param status [Symbol, ContextDev::Models::MonitorUpdateParams::Status]
|
|
70
71
|
#
|
|
71
|
-
# @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes.
|
|
72
|
+
# @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes. Duplica
|
|
72
73
|
#
|
|
73
74
|
# @param target [ContextDev::Models::MonitorUpdateParams::Target::Page, ContextDev::Models::MonitorUpdateParams::Target::Sitemap, ContextDev::Models::MonitorUpdateParams::Target::Extract] Discriminated union describing what the monitor watches.
|
|
74
75
|
#
|
|
@@ -85,7 +86,7 @@ module ContextDev
|
|
|
85
86
|
# Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
|
|
86
87
|
variant :exact, -> { ContextDev::MonitorUpdateParams::ChangeDetection::Exact }
|
|
87
88
|
|
|
88
|
-
# Detect meaning-level changes to
|
|
89
|
+
# Detect meaning-level changes to page content, ignoring cosmetic or instruction-irrelevant differences. Which changes are meaningful is judged against the page or extract target's `instructions` (and an extract target's `schema`, when provided).
|
|
89
90
|
variant :semantic, -> { ContextDev::MonitorUpdateParams::ChangeDetection::Semantic }
|
|
90
91
|
|
|
91
92
|
class Exact < ContextDev::Internal::Type::BaseModel
|
|
@@ -113,9 +114,10 @@ module ContextDev
|
|
|
113
114
|
optional :confidence_threshold, Float
|
|
114
115
|
|
|
115
116
|
# @!method initialize(confidence_threshold: nil, type: :semantic)
|
|
116
|
-
# Detect meaning-level changes to
|
|
117
|
-
#
|
|
118
|
-
# extract target's `instructions` (and
|
|
117
|
+
# Detect meaning-level changes to page content, ignoring cosmetic or
|
|
118
|
+
# instruction-irrelevant differences. Which changes are meaningful is judged
|
|
119
|
+
# against the page or extract target's `instructions` (and an extract target's
|
|
120
|
+
# `schema`, when provided).
|
|
119
121
|
#
|
|
120
122
|
# @param confidence_threshold [Float]
|
|
121
123
|
# @param type [Symbol, :semantic]
|
|
@@ -197,7 +199,7 @@ module ContextDev
|
|
|
197
199
|
|
|
198
200
|
discriminator :type
|
|
199
201
|
|
|
200
|
-
# Watch a single web page.
|
|
202
|
+
# Watch a single web page. Exact detection reports visible-text diffs; semantic detection judges confirmed stable diffs against `instructions`.
|
|
201
203
|
variant :page, -> { ContextDev::MonitorUpdateParams::Target::Page }
|
|
202
204
|
|
|
203
205
|
# Watch a sitemap for URL additions and removals. Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.
|
|
@@ -217,17 +219,30 @@ module ContextDev
|
|
|
217
219
|
# @return [String]
|
|
218
220
|
required :url, String
|
|
219
221
|
|
|
222
|
+
# @!attribute instructions
|
|
223
|
+
# Plain-language goal describing which page changes matter. When provided without
|
|
224
|
+
# change_detection, semantic detection is inferred.
|
|
225
|
+
#
|
|
226
|
+
# @return [String, nil]
|
|
227
|
+
optional :instructions, String
|
|
228
|
+
|
|
220
229
|
# @!attribute normalize_whitespace
|
|
221
230
|
# Normalize whitespace before comparing or analyzing text.
|
|
222
231
|
#
|
|
223
232
|
# @return [Boolean, nil]
|
|
224
233
|
optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
|
|
225
234
|
|
|
226
|
-
# @!method initialize(url:, normalize_whitespace: nil, type: :page)
|
|
227
|
-
#
|
|
235
|
+
# @!method initialize(url:, instructions: nil, normalize_whitespace: nil, type: :page)
|
|
236
|
+
# Some parameter documentations has been truncated, see
|
|
237
|
+
# {ContextDev::Models::MonitorUpdateParams::Target::Page} for more details.
|
|
238
|
+
#
|
|
239
|
+
# Watch a single web page. Exact detection reports visible-text diffs; semantic
|
|
240
|
+
# detection judges confirmed stable diffs against `instructions`.
|
|
228
241
|
#
|
|
229
242
|
# @param url [String]
|
|
230
243
|
#
|
|
244
|
+
# @param instructions [String] Plain-language goal describing which page changes matter. When provided without
|
|
245
|
+
#
|
|
231
246
|
# @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
|
|
232
247
|
#
|
|
233
248
|
# @param type [Symbol, :page]
|
|
@@ -246,13 +261,13 @@ module ContextDev
|
|
|
246
261
|
required :url, String
|
|
247
262
|
|
|
248
263
|
# @!attribute exclude
|
|
249
|
-
# URL path patterns to exclude.
|
|
264
|
+
# URL path patterns to exclude (max 50).
|
|
250
265
|
#
|
|
251
266
|
# @return [Array<String>, nil]
|
|
252
267
|
optional :exclude, ContextDev::Internal::Type::ArrayOf[String]
|
|
253
268
|
|
|
254
269
|
# @!attribute include
|
|
255
|
-
# URL path patterns to include.
|
|
270
|
+
# URL path patterns to include (max 50).
|
|
256
271
|
#
|
|
257
272
|
# @return [Array<String>, nil]
|
|
258
273
|
optional :include, ContextDev::Internal::Type::ArrayOf[String]
|
|
@@ -272,9 +287,9 @@ module ContextDev
|
|
|
272
287
|
#
|
|
273
288
|
# @param url [String] Sitemap URL to monitor.
|
|
274
289
|
#
|
|
275
|
-
# @param exclude [Array<String>] URL path patterns to exclude.
|
|
290
|
+
# @param exclude [Array<String>] URL path patterns to exclude (max 50).
|
|
276
291
|
#
|
|
277
|
-
# @param include [Array<String>] URL path patterns to include.
|
|
292
|
+
# @param include [Array<String>] URL path patterns to include (max 50).
|
|
278
293
|
#
|
|
279
294
|
# @param max_urls [Integer] Maximum number of sitemap URLs to track (capped at 10,000).
|
|
280
295
|
#
|
|
@@ -94,6 +94,7 @@ module ContextDev
|
|
|
94
94
|
|
|
95
95
|
# @!attribute tags
|
|
96
96
|
# User-defined tags for grouping and filtering monitors and their changes.
|
|
97
|
+
# Duplicates are removed.
|
|
97
98
|
#
|
|
98
99
|
# @return [Array<String>, nil]
|
|
99
100
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
@@ -146,7 +147,7 @@ module ContextDev
|
|
|
146
147
|
#
|
|
147
148
|
# @param next_run_at [Time, nil] When the next scheduled run is due.
|
|
148
149
|
#
|
|
149
|
-
# @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes.
|
|
150
|
+
# @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes. Duplica
|
|
150
151
|
#
|
|
151
152
|
# @param webhook [ContextDev::Models::MonitorUpdateResponse::Webhook, nil]
|
|
152
153
|
#
|
|
@@ -163,7 +164,7 @@ module ContextDev
|
|
|
163
164
|
# Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
|
|
164
165
|
variant :exact, -> { ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Exact }
|
|
165
166
|
|
|
166
|
-
# Detect meaning-level changes to
|
|
167
|
+
# Detect meaning-level changes to page content, ignoring cosmetic or instruction-irrelevant differences. Which changes are meaningful is judged against the page or extract target's `instructions` (and an extract target's `schema`, when provided).
|
|
167
168
|
variant :semantic, -> { ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Semantic }
|
|
168
169
|
|
|
169
170
|
class Exact < ContextDev::Internal::Type::BaseModel
|
|
@@ -191,9 +192,10 @@ module ContextDev
|
|
|
191
192
|
optional :confidence_threshold, Float
|
|
192
193
|
|
|
193
194
|
# @!method initialize(confidence_threshold: nil, type: :semantic)
|
|
194
|
-
# Detect meaning-level changes to
|
|
195
|
-
#
|
|
196
|
-
# extract target's `instructions` (and
|
|
195
|
+
# Detect meaning-level changes to page content, ignoring cosmetic or
|
|
196
|
+
# instruction-irrelevant differences. Which changes are meaningful is judged
|
|
197
|
+
# against the page or extract target's `instructions` (and an extract target's
|
|
198
|
+
# `schema`, when provided).
|
|
197
199
|
#
|
|
198
200
|
# @param confidence_threshold [Float]
|
|
199
201
|
# @param type [Symbol, :semantic]
|
|
@@ -299,7 +301,7 @@ module ContextDev
|
|
|
299
301
|
|
|
300
302
|
discriminator :type
|
|
301
303
|
|
|
302
|
-
# Watch a single web page.
|
|
304
|
+
# Watch a single web page. Exact detection reports visible-text diffs; semantic detection judges confirmed stable diffs against `instructions`.
|
|
303
305
|
variant :page, -> { ContextDev::Models::MonitorUpdateResponse::Target::Page }
|
|
304
306
|
|
|
305
307
|
# Watch a sitemap for URL additions and removals. Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.
|
|
@@ -319,17 +321,30 @@ module ContextDev
|
|
|
319
321
|
# @return [String]
|
|
320
322
|
required :url, String
|
|
321
323
|
|
|
324
|
+
# @!attribute instructions
|
|
325
|
+
# Plain-language goal describing which page changes matter. When provided without
|
|
326
|
+
# change_detection, semantic detection is inferred.
|
|
327
|
+
#
|
|
328
|
+
# @return [String, nil]
|
|
329
|
+
optional :instructions, String
|
|
330
|
+
|
|
322
331
|
# @!attribute normalize_whitespace
|
|
323
332
|
# Normalize whitespace before comparing or analyzing text.
|
|
324
333
|
#
|
|
325
334
|
# @return [Boolean, nil]
|
|
326
335
|
optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
|
|
327
336
|
|
|
328
|
-
# @!method initialize(url:, normalize_whitespace: nil, type: :page)
|
|
329
|
-
#
|
|
337
|
+
# @!method initialize(url:, instructions: nil, normalize_whitespace: nil, type: :page)
|
|
338
|
+
# Some parameter documentations has been truncated, see
|
|
339
|
+
# {ContextDev::Models::MonitorUpdateResponse::Target::Page} for more details.
|
|
340
|
+
#
|
|
341
|
+
# Watch a single web page. Exact detection reports visible-text diffs; semantic
|
|
342
|
+
# detection judges confirmed stable diffs against `instructions`.
|
|
330
343
|
#
|
|
331
344
|
# @param url [String]
|
|
332
345
|
#
|
|
346
|
+
# @param instructions [String] Plain-language goal describing which page changes matter. When provided without
|
|
347
|
+
#
|
|
333
348
|
# @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
|
|
334
349
|
#
|
|
335
350
|
# @param type [Symbol, :page]
|
|
@@ -348,13 +363,13 @@ module ContextDev
|
|
|
348
363
|
required :url, String
|
|
349
364
|
|
|
350
365
|
# @!attribute exclude
|
|
351
|
-
# URL path patterns to exclude.
|
|
366
|
+
# URL path patterns to exclude (max 50).
|
|
352
367
|
#
|
|
353
368
|
# @return [Array<String>, nil]
|
|
354
369
|
optional :exclude, ContextDev::Internal::Type::ArrayOf[String]
|
|
355
370
|
|
|
356
371
|
# @!attribute include
|
|
357
|
-
# URL path patterns to include.
|
|
372
|
+
# URL path patterns to include (max 50).
|
|
358
373
|
#
|
|
359
374
|
# @return [Array<String>, nil]
|
|
360
375
|
optional :include, ContextDev::Internal::Type::ArrayOf[String]
|
|
@@ -374,9 +389,9 @@ module ContextDev
|
|
|
374
389
|
#
|
|
375
390
|
# @param url [String] Sitemap URL to monitor.
|
|
376
391
|
#
|
|
377
|
-
# @param exclude [Array<String>] URL path patterns to exclude.
|
|
392
|
+
# @param exclude [Array<String>] URL path patterns to exclude (max 50).
|
|
378
393
|
#
|
|
379
|
-
# @param include [Array<String>] URL path patterns to include.
|
|
394
|
+
# @param include [Array<String>] URL path patterns to include (max 50).
|
|
380
395
|
#
|
|
381
396
|
# @param max_urls [Integer] Maximum number of sitemap URLs to track (capped at 10,000).
|
|
382
397
|
#
|
|
@@ -12,9 +12,15 @@ module ContextDev
|
|
|
12
12
|
# @return [Pathname, StringIO, IO, String, ContextDev::FilePart]
|
|
13
13
|
required :body, ContextDev::Internal::Type::FileInput
|
|
14
14
|
|
|
15
|
+
# @!attribute client
|
|
16
|
+
# Optional client identifier used for usage attribution.
|
|
17
|
+
#
|
|
18
|
+
# @return [String, nil]
|
|
19
|
+
optional :client, String
|
|
20
|
+
|
|
15
21
|
# @!attribute extension
|
|
16
|
-
# Optional file extension hint
|
|
17
|
-
#
|
|
22
|
+
# Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv,
|
|
23
|
+
# md, py, rtf, jpg, png, or txt.
|
|
18
24
|
#
|
|
19
25
|
# @return [Symbol, ContextDev::Models::ParseHandleParams::Extension, nil]
|
|
20
26
|
optional :extension, enum: -> { ContextDev::ParseHandleParams::Extension }
|
|
@@ -22,30 +28,26 @@ module ContextDev
|
|
|
22
28
|
# @!attribute include_images
|
|
23
29
|
# Include image references in Markdown output
|
|
24
30
|
#
|
|
25
|
-
# @return [Boolean, nil]
|
|
26
|
-
optional :include_images, ContextDev::
|
|
31
|
+
# @return [Boolean, Symbol, ContextDev::Models::ParseHandleParams::IncludeImages, nil]
|
|
32
|
+
optional :include_images, union: -> { ContextDev::ParseHandleParams::IncludeImages }
|
|
27
33
|
|
|
28
34
|
# @!attribute include_links
|
|
29
35
|
# Preserve hyperlinks in Markdown output
|
|
30
36
|
#
|
|
31
|
-
# @return [Boolean, nil]
|
|
32
|
-
optional :include_links, ContextDev::
|
|
37
|
+
# @return [Boolean, Symbol, ContextDev::Models::ParseHandleParams::IncludeLinks, nil]
|
|
38
|
+
optional :include_links, union: -> { ContextDev::ParseHandleParams::IncludeLinks }
|
|
33
39
|
|
|
34
40
|
# @!attribute ocr
|
|
35
|
-
#
|
|
36
|
-
# at each image's position in page reading order
|
|
37
|
-
# pdf.start/pdf.end limit the page range
|
|
38
|
-
#
|
|
39
|
-
# false, no OCR runs: scanned PDFs may yield no content and images return only
|
|
40
|
-
# format/dimension metadata. Calls where OCR actually runs cost 5 credits instead
|
|
41
|
-
# of 1.
|
|
41
|
+
# When true for PDF inputs, detect and OCR images embedded in the selected pages,
|
|
42
|
+
# inserting recognized text at each image's position in page reading order while
|
|
43
|
+
# preserving the PDF text layer. pdf.start/pdf.end limit the inclusive page range.
|
|
44
|
+
# When false, all OCR is disabled, including the automatic scanned-PDF fallback.
|
|
42
45
|
#
|
|
43
|
-
# @return [Boolean, nil]
|
|
44
|
-
optional :ocr, ContextDev::
|
|
46
|
+
# @return [Boolean, Symbol, ContextDev::Models::ParseHandleParams::Ocr, nil]
|
|
47
|
+
optional :ocr, union: -> { ContextDev::ParseHandleParams::Ocr }
|
|
45
48
|
|
|
46
49
|
# @!attribute pdf
|
|
47
|
-
# PDF page-range
|
|
48
|
-
# to an inclusive 1-based page range.
|
|
50
|
+
# PDF page-range options as a JSON object, e.g. {"start": 2, "end": 5}.
|
|
49
51
|
#
|
|
50
52
|
# @return [ContextDev::Models::ParseHandleParams::Pdf, nil]
|
|
51
53
|
optional :pdf, -> { ContextDev::ParseHandleParams::Pdf }
|
|
@@ -53,39 +55,62 @@ module ContextDev
|
|
|
53
55
|
# @!attribute shorten_base64_images
|
|
54
56
|
# Shorten base64-encoded image data in the Markdown output
|
|
55
57
|
#
|
|
56
|
-
# @return [Boolean, nil]
|
|
57
|
-
optional :shorten_base64_images, ContextDev::
|
|
58
|
+
# @return [Boolean, Symbol, ContextDev::Models::ParseHandleParams::ShortenBase64Images, nil]
|
|
59
|
+
optional :shorten_base64_images, union: -> { ContextDev::ParseHandleParams::ShortenBase64Images }
|
|
60
|
+
|
|
61
|
+
# @!attribute tags
|
|
62
|
+
# Optional comma-separated caller-defined tags for tracking this request. Tags are
|
|
63
|
+
# recorded on the request's usage log and can be used to filter usage on the
|
|
64
|
+
# dashboard usage page. Up to 20 tags, each 1-50 characters.
|
|
65
|
+
#
|
|
66
|
+
# @return [Array<String>, nil]
|
|
67
|
+
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
58
68
|
|
|
59
69
|
# @!attribute use_main_content_only
|
|
60
70
|
# Extract only the main content from HTML-like inputs
|
|
61
71
|
#
|
|
62
|
-
# @return [Boolean, nil]
|
|
63
|
-
optional :use_main_content_only, ContextDev::
|
|
72
|
+
# @return [Boolean, Symbol, ContextDev::Models::ParseHandleParams::UseMainContentOnly, nil]
|
|
73
|
+
optional :use_main_content_only, union: -> { ContextDev::ParseHandleParams::UseMainContentOnly }
|
|
64
74
|
|
|
65
|
-
# @!
|
|
75
|
+
# @!attribute zdr
|
|
76
|
+
# Set to enabled to bypass shared caches and omit request and response content
|
|
77
|
+
# from retained usage logs. Requires zero data retention to be enabled for your
|
|
78
|
+
# organization (contact support@context.dev), otherwise the request fails with
|
|
79
|
+
# ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.
|
|
80
|
+
#
|
|
81
|
+
# @return [Symbol, ContextDev::Models::ParseHandleParams::Zdr, nil]
|
|
82
|
+
optional :zdr, enum: -> { ContextDev::ParseHandleParams::Zdr }
|
|
83
|
+
|
|
84
|
+
# @!method initialize(body:, client: nil, extension: nil, include_images: nil, include_links: nil, ocr: nil, pdf: nil, shorten_base64_images: nil, tags: nil, use_main_content_only: nil, zdr: nil, request_options: {})
|
|
66
85
|
# Some parameter documentations has been truncated, see
|
|
67
86
|
# {ContextDev::Models::ParseHandleParams} for more details.
|
|
68
87
|
#
|
|
69
88
|
# @param body [Pathname, StringIO, IO, String, ContextDev::FilePart]
|
|
70
89
|
#
|
|
71
|
-
# @param
|
|
90
|
+
# @param client [String] Optional client identifier used for usage attribution.
|
|
91
|
+
#
|
|
92
|
+
# @param extension [Symbol, ContextDev::Models::ParseHandleParams::Extension] Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv, md
|
|
93
|
+
#
|
|
94
|
+
# @param include_images [Boolean, Symbol, ContextDev::Models::ParseHandleParams::IncludeImages] Include image references in Markdown output
|
|
95
|
+
#
|
|
96
|
+
# @param include_links [Boolean, Symbol, ContextDev::Models::ParseHandleParams::IncludeLinks] Preserve hyperlinks in Markdown output
|
|
72
97
|
#
|
|
73
|
-
# @param
|
|
98
|
+
# @param ocr [Boolean, Symbol, ContextDev::Models::ParseHandleParams::Ocr] When true for PDF inputs, detect and OCR images embedded in the selected pages,
|
|
74
99
|
#
|
|
75
|
-
# @param
|
|
100
|
+
# @param pdf [ContextDev::Models::ParseHandleParams::Pdf] PDF page-range options as a JSON object, e.g. {"start": 2, "end": 5}.
|
|
76
101
|
#
|
|
77
|
-
# @param
|
|
102
|
+
# @param shorten_base64_images [Boolean, Symbol, ContextDev::Models::ParseHandleParams::ShortenBase64Images] Shorten base64-encoded image data in the Markdown output
|
|
78
103
|
#
|
|
79
|
-
# @param
|
|
104
|
+
# @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
|
|
80
105
|
#
|
|
81
|
-
# @param
|
|
106
|
+
# @param use_main_content_only [Boolean, Symbol, ContextDev::Models::ParseHandleParams::UseMainContentOnly] Extract only the main content from HTML-like inputs
|
|
82
107
|
#
|
|
83
|
-
# @param
|
|
108
|
+
# @param zdr [Symbol, ContextDev::Models::ParseHandleParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro
|
|
84
109
|
#
|
|
85
110
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
86
111
|
|
|
87
|
-
# Optional file extension hint
|
|
88
|
-
#
|
|
112
|
+
# Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv,
|
|
113
|
+
# md, py, rtf, jpg, png, or txt.
|
|
89
114
|
module Extension
|
|
90
115
|
extend ContextDev::Internal::Type::Enum
|
|
91
116
|
|
|
@@ -164,6 +189,84 @@ module ContextDev
|
|
|
164
189
|
# @return [Array<Symbol>]
|
|
165
190
|
end
|
|
166
191
|
|
|
192
|
+
# Include image references in Markdown output
|
|
193
|
+
module IncludeImages
|
|
194
|
+
extend ContextDev::Internal::Type::Union
|
|
195
|
+
|
|
196
|
+
variant ContextDev::Internal::Type::Boolean
|
|
197
|
+
|
|
198
|
+
variant const: -> { ContextDev::Models::ParseHandleParams::IncludeImages::TRUE }
|
|
199
|
+
|
|
200
|
+
variant const: -> { ContextDev::Models::ParseHandleParams::IncludeImages::FALSE }
|
|
201
|
+
|
|
202
|
+
# @!method self.variants
|
|
203
|
+
# @return [Array(Boolean, Symbol)]
|
|
204
|
+
|
|
205
|
+
define_sorbet_constant!(:Variants) do
|
|
206
|
+
T.type_alias { T.any(T::Boolean, ContextDev::ParseHandleParams::IncludeImages::TaggedSymbol) }
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# @!group
|
|
210
|
+
|
|
211
|
+
TRUE = :true
|
|
212
|
+
FALSE = :false
|
|
213
|
+
|
|
214
|
+
# @!endgroup
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Preserve hyperlinks in Markdown output
|
|
218
|
+
module IncludeLinks
|
|
219
|
+
extend ContextDev::Internal::Type::Union
|
|
220
|
+
|
|
221
|
+
variant ContextDev::Internal::Type::Boolean
|
|
222
|
+
|
|
223
|
+
variant const: -> { ContextDev::Models::ParseHandleParams::IncludeLinks::TRUE }
|
|
224
|
+
|
|
225
|
+
variant const: -> { ContextDev::Models::ParseHandleParams::IncludeLinks::FALSE }
|
|
226
|
+
|
|
227
|
+
# @!method self.variants
|
|
228
|
+
# @return [Array(Boolean, Symbol)]
|
|
229
|
+
|
|
230
|
+
define_sorbet_constant!(:Variants) do
|
|
231
|
+
T.type_alias { T.any(T::Boolean, ContextDev::ParseHandleParams::IncludeLinks::TaggedSymbol) }
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# @!group
|
|
235
|
+
|
|
236
|
+
TRUE = :true
|
|
237
|
+
FALSE = :false
|
|
238
|
+
|
|
239
|
+
# @!endgroup
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# When true for PDF inputs, detect and OCR images embedded in the selected pages,
|
|
243
|
+
# inserting recognized text at each image's position in page reading order while
|
|
244
|
+
# preserving the PDF text layer. pdf.start/pdf.end limit the inclusive page range.
|
|
245
|
+
# When false, all OCR is disabled, including the automatic scanned-PDF fallback.
|
|
246
|
+
module Ocr
|
|
247
|
+
extend ContextDev::Internal::Type::Union
|
|
248
|
+
|
|
249
|
+
variant ContextDev::Internal::Type::Boolean
|
|
250
|
+
|
|
251
|
+
variant const: -> { ContextDev::Models::ParseHandleParams::Ocr::TRUE }
|
|
252
|
+
|
|
253
|
+
variant const: -> { ContextDev::Models::ParseHandleParams::Ocr::FALSE }
|
|
254
|
+
|
|
255
|
+
# @!method self.variants
|
|
256
|
+
# @return [Array(Boolean, Symbol)]
|
|
257
|
+
|
|
258
|
+
define_sorbet_constant!(:Variants) do
|
|
259
|
+
T.type_alias { T.any(T::Boolean, ContextDev::ParseHandleParams::Ocr::TaggedSymbol) }
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# @!group
|
|
263
|
+
|
|
264
|
+
TRUE = :true
|
|
265
|
+
FALSE = :false
|
|
266
|
+
|
|
267
|
+
# @!endgroup
|
|
268
|
+
end
|
|
269
|
+
|
|
167
270
|
class Pdf < ContextDev::Internal::Type::BaseModel
|
|
168
271
|
# @!attribute end_
|
|
169
272
|
# Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
|
|
@@ -182,13 +285,76 @@ module ContextDev
|
|
|
182
285
|
# Some parameter documentations has been truncated, see
|
|
183
286
|
# {ContextDev::Models::ParseHandleParams::Pdf} for more details.
|
|
184
287
|
#
|
|
185
|
-
# PDF page-range
|
|
186
|
-
# to an inclusive 1-based page range.
|
|
288
|
+
# PDF page-range options as a JSON object, e.g. {"start": 2, "end": 5}.
|
|
187
289
|
#
|
|
188
290
|
# @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
|
|
189
291
|
#
|
|
190
292
|
# @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
|
|
191
293
|
end
|
|
294
|
+
|
|
295
|
+
# Shorten base64-encoded image data in the Markdown output
|
|
296
|
+
module ShortenBase64Images
|
|
297
|
+
extend ContextDev::Internal::Type::Union
|
|
298
|
+
|
|
299
|
+
variant ContextDev::Internal::Type::Boolean
|
|
300
|
+
|
|
301
|
+
variant const: -> { ContextDev::Models::ParseHandleParams::ShortenBase64Images::TRUE }
|
|
302
|
+
|
|
303
|
+
variant const: -> { ContextDev::Models::ParseHandleParams::ShortenBase64Images::FALSE }
|
|
304
|
+
|
|
305
|
+
# @!method self.variants
|
|
306
|
+
# @return [Array(Boolean, Symbol)]
|
|
307
|
+
|
|
308
|
+
define_sorbet_constant!(:Variants) do
|
|
309
|
+
T.type_alias { T.any(T::Boolean, ContextDev::ParseHandleParams::ShortenBase64Images::TaggedSymbol) }
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# @!group
|
|
313
|
+
|
|
314
|
+
TRUE = :true
|
|
315
|
+
FALSE = :false
|
|
316
|
+
|
|
317
|
+
# @!endgroup
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# Extract only the main content from HTML-like inputs
|
|
321
|
+
module UseMainContentOnly
|
|
322
|
+
extend ContextDev::Internal::Type::Union
|
|
323
|
+
|
|
324
|
+
variant ContextDev::Internal::Type::Boolean
|
|
325
|
+
|
|
326
|
+
variant const: -> { ContextDev::Models::ParseHandleParams::UseMainContentOnly::TRUE }
|
|
327
|
+
|
|
328
|
+
variant const: -> { ContextDev::Models::ParseHandleParams::UseMainContentOnly::FALSE }
|
|
329
|
+
|
|
330
|
+
# @!method self.variants
|
|
331
|
+
# @return [Array(Boolean, Symbol)]
|
|
332
|
+
|
|
333
|
+
define_sorbet_constant!(:Variants) do
|
|
334
|
+
T.type_alias { T.any(T::Boolean, ContextDev::ParseHandleParams::UseMainContentOnly::TaggedSymbol) }
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# @!group
|
|
338
|
+
|
|
339
|
+
TRUE = :true
|
|
340
|
+
FALSE = :false
|
|
341
|
+
|
|
342
|
+
# @!endgroup
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
# Set to enabled to bypass shared caches and omit request and response content
|
|
346
|
+
# from retained usage logs. Requires zero data retention to be enabled for your
|
|
347
|
+
# organization (contact support@context.dev), otherwise the request fails with
|
|
348
|
+
# ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.
|
|
349
|
+
module Zdr
|
|
350
|
+
extend ContextDev::Internal::Type::Enum
|
|
351
|
+
|
|
352
|
+
ENABLED = :enabled
|
|
353
|
+
DISABLED = :disabled
|
|
354
|
+
|
|
355
|
+
# @!method self.values
|
|
356
|
+
# @return [Array<Symbol>]
|
|
357
|
+
end
|
|
192
358
|
end
|
|
193
359
|
end
|
|
194
360
|
end
|
|
@@ -19,6 +19,12 @@ module ContextDev
|
|
|
19
19
|
# @return [Symbol, ContextDev::Models::UtilityPrefetchParams::Type]
|
|
20
20
|
required :type, enum: -> { ContextDev::UtilityPrefetchParams::Type }
|
|
21
21
|
|
|
22
|
+
# @!attribute tags
|
|
23
|
+
# Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
24
|
+
#
|
|
25
|
+
# @return [Array<String>, nil]
|
|
26
|
+
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
27
|
+
|
|
22
28
|
# @!attribute timeout_ms
|
|
23
29
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
24
30
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
@@ -27,7 +33,7 @@ module ContextDev
|
|
|
27
33
|
# @return [Integer, nil]
|
|
28
34
|
optional :timeout_ms, Integer, api_name: :timeoutMS
|
|
29
35
|
|
|
30
|
-
# @!method initialize(identifier:, type:, timeout_ms: nil, request_options: {})
|
|
36
|
+
# @!method initialize(identifier:, type:, tags: nil, timeout_ms: nil, request_options: {})
|
|
31
37
|
# Some parameter documentations has been truncated, see
|
|
32
38
|
# {ContextDev::Models::UtilityPrefetchParams} for more details.
|
|
33
39
|
#
|
|
@@ -35,6 +41,8 @@ module ContextDev
|
|
|
35
41
|
#
|
|
36
42
|
# @param type [Symbol, ContextDev::Models::UtilityPrefetchParams::Type] What to prefetch. Currently only 'brand' is supported.
|
|
37
43
|
#
|
|
44
|
+
# @param tags [Array<String>] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
45
|
+
#
|
|
38
46
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
39
47
|
#
|
|
40
48
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -20,6 +20,14 @@ module ContextDev
|
|
|
20
20
|
# @return [Integer, nil]
|
|
21
21
|
optional :num_competitors, Integer
|
|
22
22
|
|
|
23
|
+
# @!attribute tags
|
|
24
|
+
# Optional comma-separated caller-defined tags for tracking this request. Tags are
|
|
25
|
+
# recorded on the request's usage log and can be used to filter usage on the
|
|
26
|
+
# dashboard usage page. Up to 20 tags, each 1-50 characters.
|
|
27
|
+
#
|
|
28
|
+
# @return [Array<String>, nil]
|
|
29
|
+
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
30
|
+
|
|
23
31
|
# @!attribute timeout_ms
|
|
24
32
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
25
33
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
@@ -28,7 +36,7 @@ module ContextDev
|
|
|
28
36
|
# @return [Integer, nil]
|
|
29
37
|
optional :timeout_ms, Integer
|
|
30
38
|
|
|
31
|
-
# @!method initialize(domain:, num_competitors: nil, timeout_ms: nil, request_options: {})
|
|
39
|
+
# @!method initialize(domain:, num_competitors: nil, tags: nil, timeout_ms: nil, request_options: {})
|
|
32
40
|
# Some parameter documentations has been truncated, see
|
|
33
41
|
# {ContextDev::Models::WebExtractCompetitorsParams} for more details.
|
|
34
42
|
#
|
|
@@ -36,6 +44,8 @@ module ContextDev
|
|
|
36
44
|
#
|
|
37
45
|
# @param num_competitors [Integer] Exact number of direct competitors to return. Defaults to 5.
|
|
38
46
|
#
|
|
47
|
+
# @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
|
|
48
|
+
#
|
|
39
49
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
40
50
|
#
|
|
41
51
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -24,13 +24,21 @@ module ContextDev
|
|
|
24
24
|
optional :domain, String
|
|
25
25
|
|
|
26
26
|
# @!attribute max_age_ms
|
|
27
|
-
# Maximum age in milliseconds for cached data before the API performs a hard
|
|
27
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
28
28
|
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
29
29
|
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
30
30
|
# year.
|
|
31
31
|
#
|
|
32
32
|
# @return [Integer, nil]
|
|
33
|
-
optional :max_age_ms, Integer
|
|
33
|
+
optional :max_age_ms, Integer, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute tags
|
|
36
|
+
# Optional comma-separated caller-defined tags for tracking this request. Tags are
|
|
37
|
+
# recorded on the request's usage log and can be used to filter usage on the
|
|
38
|
+
# dashboard usage page. Up to 20 tags, each 1-50 characters.
|
|
39
|
+
#
|
|
40
|
+
# @return [Array<String>, nil]
|
|
41
|
+
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
34
42
|
|
|
35
43
|
# @!attribute timeout_ms
|
|
36
44
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
@@ -40,7 +48,7 @@ module ContextDev
|
|
|
40
48
|
# @return [Integer, nil]
|
|
41
49
|
optional :timeout_ms, Integer
|
|
42
50
|
|
|
43
|
-
# @!method initialize(direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {})
|
|
51
|
+
# @!method initialize(direct_url: nil, domain: nil, max_age_ms: nil, tags: nil, timeout_ms: nil, request_options: {})
|
|
44
52
|
# Some parameter documentations has been truncated, see
|
|
45
53
|
# {ContextDev::Models::WebExtractFontsParams} for more details.
|
|
46
54
|
#
|
|
@@ -48,7 +56,9 @@ module ContextDev
|
|
|
48
56
|
#
|
|
49
57
|
# @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai
|
|
50
58
|
#
|
|
51
|
-
# @param max_age_ms [Integer] Maximum age in milliseconds for cached data before the API performs a hard
|
|
59
|
+
# @param max_age_ms [Integer, nil] Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
60
|
+
#
|
|
61
|
+
# @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
|
|
52
62
|
#
|
|
53
63
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
54
64
|
#
|