context.dev 2.17.0 → 2.18.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 (90) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/models/ai_extract_product_params.rb +28 -1
  5. data/lib/context_dev/models/ai_extract_product_response.rb +51 -1
  6. data/lib/context_dev/models/ai_extract_products_response.rb +51 -1
  7. data/lib/context_dev/models/brand_retrieve_response.rb +65 -65
  8. data/lib/context_dev/models/brand_retrieve_simplified_response.rb +66 -66
  9. data/lib/context_dev/models/industry_retrieve_naics_params.rb +28 -1
  10. data/lib/context_dev/models/industry_retrieve_sic_params.rb +28 -1
  11. data/lib/context_dev/models/parse_handle_params.rb +8 -6
  12. data/lib/context_dev/models/person_enrich_params.rb +28 -1
  13. data/lib/context_dev/models/web_answers_params.rb +28 -1
  14. data/lib/context_dev/models/web_extract_competitors_params.rb +28 -1
  15. data/lib/context_dev/models/web_extract_fonts_params.rb +2 -2
  16. data/lib/context_dev/models/web_extract_params.rb +28 -1
  17. data/lib/context_dev/models/web_extract_styleguide_params.rb +30 -3
  18. data/lib/context_dev/models/web_screenshot_params.rb +10 -8
  19. data/lib/context_dev/models/web_search_params.rb +30 -3
  20. data/lib/context_dev/models/web_search_response.rb +6 -2
  21. data/lib/context_dev/models/web_web_scrape_bytes_params.rb +8 -6
  22. data/lib/context_dev/models/web_web_scrape_html_params.rb +188 -9
  23. data/lib/context_dev/models/web_web_scrape_html_response.rb +41 -1
  24. data/lib/context_dev/models/web_web_scrape_images_params.rb +31 -4
  25. data/lib/context_dev/models/web_web_scrape_md_params.rb +10 -8
  26. data/lib/context_dev/models/web_web_scrape_screenshot_params.rb +471 -0
  27. data/lib/context_dev/models/web_web_scrape_screenshot_response.rb +169 -0
  28. data/lib/context_dev/models/web_web_scrape_sitemap_params.rb +8 -6
  29. data/lib/context_dev/models.rb +2 -0
  30. data/lib/context_dev/resources/ai.rb +3 -1
  31. data/lib/context_dev/resources/industry.rb +6 -2
  32. data/lib/context_dev/resources/people.rb +3 -1
  33. data/lib/context_dev/resources/web.rb +96 -13
  34. data/lib/context_dev/version.rb +1 -1
  35. data/lib/context_dev.rb +2 -0
  36. data/rbi/context_dev/models/ai_extract_product_params.rbi +54 -0
  37. data/rbi/context_dev/models/ai_extract_product_response.rbi +98 -3
  38. data/rbi/context_dev/models/ai_extract_products_response.rbi +98 -3
  39. data/rbi/context_dev/models/brand_retrieve_response.rbi +128 -136
  40. data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +132 -140
  41. data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +59 -0
  42. data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +57 -0
  43. data/rbi/context_dev/models/parse_handle_params.rbi +12 -9
  44. data/rbi/context_dev/models/person_enrich_params.rbi +45 -0
  45. data/rbi/context_dev/models/web_answers_params.rbi +45 -0
  46. data/rbi/context_dev/models/web_extract_competitors_params.rbi +59 -0
  47. data/rbi/context_dev/models/web_extract_fonts_params.rbi +3 -3
  48. data/rbi/context_dev/models/web_extract_params.rbi +45 -0
  49. data/rbi/context_dev/models/web_extract_styleguide_params.rbi +62 -3
  50. data/rbi/context_dev/models/web_screenshot_params.rbi +15 -12
  51. data/rbi/context_dev/models/web_search_params.rbi +48 -3
  52. data/rbi/context_dev/models/web_search_response.rbi +4 -2
  53. data/rbi/context_dev/models/web_web_scrape_bytes_params.rbi +12 -9
  54. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +485 -12
  55. data/rbi/context_dev/models/web_web_scrape_html_response.rbi +103 -0
  56. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +62 -5
  57. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +15 -12
  58. data/rbi/context_dev/models/web_web_scrape_screenshot_params.rbi +1580 -0
  59. data/rbi/context_dev/models/web_web_scrape_screenshot_response.rbi +332 -0
  60. data/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +12 -9
  61. data/rbi/context_dev/models.rbi +3 -0
  62. data/rbi/context_dev/resources/ai.rbi +7 -0
  63. data/rbi/context_dev/resources/industry.rbi +14 -0
  64. data/rbi/context_dev/resources/parse.rbi +4 -4
  65. data/rbi/context_dev/resources/people.rbi +7 -0
  66. data/rbi/context_dev/resources/web.rbi +173 -21
  67. data/sig/context_dev/models/ai_extract_product_params.rbs +21 -1
  68. data/sig/context_dev/models/ai_extract_product_response.rbs +44 -3
  69. data/sig/context_dev/models/ai_extract_products_response.rbs +44 -3
  70. data/sig/context_dev/models/brand_retrieve_response.rbs +51 -59
  71. data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +51 -59
  72. data/sig/context_dev/models/industry_retrieve_naics_params.rbs +21 -1
  73. data/sig/context_dev/models/industry_retrieve_sic_params.rbs +21 -1
  74. data/sig/context_dev/models/person_enrich_params.rbs +21 -1
  75. data/sig/context_dev/models/web_answers_params.rbs +21 -1
  76. data/sig/context_dev/models/web_extract_competitors_params.rbs +21 -1
  77. data/sig/context_dev/models/web_extract_params.rbs +21 -1
  78. data/sig/context_dev/models/web_extract_styleguide_params.rbs +21 -1
  79. data/sig/context_dev/models/web_search_params.rbs +21 -1
  80. data/sig/context_dev/models/web_web_scrape_html_params.rbs +148 -0
  81. data/sig/context_dev/models/web_web_scrape_html_response.rbs +30 -0
  82. data/sig/context_dev/models/web_web_scrape_images_params.rbs +21 -1
  83. data/sig/context_dev/models/web_web_scrape_screenshot_params.rbs +619 -0
  84. data/sig/context_dev/models/web_web_scrape_screenshot_response.rbs +127 -0
  85. data/sig/context_dev/models.rbs +2 -0
  86. data/sig/context_dev/resources/ai.rbs +1 -0
  87. data/sig/context_dev/resources/industry.rbs +2 -0
  88. data/sig/context_dev/resources/people.rbs +1 -0
  89. data/sig/context_dev/resources/web.rbs +24 -0
  90. metadata +8 -2
@@ -15,6 +15,7 @@ module ContextDev
15
15
  mode: ContextDev::WebAnswersParams::Mode::OrSymbol,
16
16
  tags: T::Array[String],
17
17
  timeout_opts: ContextDev::WebAnswersParams::TimeoutOpts::OrHash,
18
+ zdr: ContextDev::WebAnswersParams::Zdr::OrSymbol,
18
19
  request_options: ContextDev::RequestOptions::OrHash
19
20
  ).returns(ContextDev::Models::WebAnswersResponse)
20
21
  end
@@ -38,6 +39,12 @@ module ContextDev
38
39
  # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
39
40
  # timeoutOpts object.
40
41
  timeout_opts: nil,
42
+ # Set to enabled to bypass shared caches and omit request and response content
43
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
44
+ # omitted. Requires zero data retention to be enabled for your organization
45
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
46
+ # Successful ZDR responses include X-Context-ZDR: true.
47
+ zdr: nil,
41
48
  request_options: {}
42
49
  )
43
50
  end
@@ -69,6 +76,7 @@ module ContextDev
69
76
  tags: T::Array[String],
70
77
  timeout_opts: ContextDev::WebExtractParams::TimeoutOpts::OrHash,
71
78
  wait_for_ms: Integer,
79
+ zdr: ContextDev::WebExtractParams::Zdr::OrSymbol,
72
80
  request_options: ContextDev::RequestOptions::OrHash
73
81
  ).returns(ContextDev::Models::WebExtractResponse)
74
82
  end
@@ -127,6 +135,12 @@ module ContextDev
127
135
  # Optional browser wait time in milliseconds after initial page load for each
128
136
  # crawled page.
129
137
  wait_for_ms: nil,
138
+ # Set to enabled to bypass shared caches and omit request and response content
139
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
140
+ # omitted. Requires zero data retention to be enabled for your organization
141
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
142
+ # Successful ZDR responses include X-Context-ZDR: true.
143
+ zdr: nil,
130
144
  request_options: {}
131
145
  )
132
146
  end
@@ -140,6 +154,7 @@ module ContextDev
140
154
  tags: T::Array[String],
141
155
  timeout_opts:
142
156
  ContextDev::WebExtractCompetitorsParams::TimeoutOpts::OrHash,
157
+ zdr: ContextDev::WebExtractCompetitorsParams::Zdr::OrSymbol,
143
158
  request_options: ContextDev::RequestOptions::OrHash
144
159
  ).returns(ContextDev::Models::WebExtractCompetitorsResponse)
145
160
  end
@@ -156,6 +171,12 @@ module ContextDev
156
171
  # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
157
172
  # timeoutOpts object.
158
173
  timeout_opts: nil,
174
+ # Set to enabled to bypass shared caches and omit request and response content
175
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
176
+ # omitted. Requires zero data retention to be enabled for your organization
177
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
178
+ # Successful ZDR responses include X-Context-ZDR: true.
179
+ zdr: nil,
159
180
  request_options: {}
160
181
  )
161
182
  end
@@ -209,6 +230,7 @@ module ContextDev
209
230
  tags: T::Array[String],
210
231
  timeout_opts:
211
232
  ContextDev::WebExtractStyleguideParams::TimeoutOpts::OrHash,
233
+ zdr: ContextDev::WebExtractStyleguideParams::Zdr::OrSymbol,
212
234
  request_options: ContextDev::RequestOptions::OrHash
213
235
  ).returns(ContextDev::Models::WebExtractStyleguideResponse)
214
236
  end
@@ -237,6 +259,12 @@ module ContextDev
237
259
  # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
238
260
  # timeoutOpts object.
239
261
  timeout_opts: nil,
262
+ # Set to enabled to bypass shared caches and omit request and response content
263
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
264
+ # omitted. Requires zero data retention to be enabled for your organization
265
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
266
+ # Successful ZDR responses include X-Context-ZDR: true.
267
+ zdr: nil,
240
268
  request_options: {}
241
269
  )
242
270
  end
@@ -325,9 +353,10 @@ module ContextDev
325
353
  # TIMEOUT_TOO_SHORT_FOR_WAIT.
326
354
  wait_for_ms: nil,
327
355
  # Set to enabled to bypass shared caches and omit request and response content
328
- # from retained usage logs. Requires zero data retention to be enabled for your
329
- # organization (contact support@context.dev), otherwise the request fails with
330
- # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.
356
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
357
+ # omitted. Requires zero data retention to be enabled for your organization
358
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
359
+ # Successful ZDR responses include X-Context-ZDR: true.
331
360
  zdr: nil,
332
361
  request_options: {}
333
362
  )
@@ -347,6 +376,7 @@ module ContextDev
347
376
  query_fanout: T::Boolean,
348
377
  tags: T::Array[String],
349
378
  timeout_opts: ContextDev::WebSearchParams::TimeoutOpts::OrHash,
379
+ zdr: ContextDev::WebSearchParams::Zdr::OrSymbol,
350
380
  request_options: ContextDev::RequestOptions::OrHash
351
381
  ).returns(ContextDev::Models::WebSearchResponse)
352
382
  end
@@ -377,6 +407,12 @@ module ContextDev
377
407
  # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
378
408
  # timeoutOpts object.
379
409
  timeout_opts: nil,
410
+ # Set to enabled to bypass shared caches and omit request and response content
411
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
412
+ # omitted. Requires zero data retention to be enabled for your organization
413
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
414
+ # Successful ZDR responses include X-Context-ZDR: true.
415
+ zdr: nil,
380
416
  request_options: {}
381
417
  )
382
418
  end
@@ -524,20 +560,25 @@ module ContextDev
524
560
  # timeoutOpts object.
525
561
  timeout_opts: nil,
526
562
  # Set to enabled to bypass shared caches and omit request and response content
527
- # from retained usage logs. Requires zero data retention to be enabled for your
528
- # organization (contact support@context.dev), otherwise the request fails with
529
- # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.
563
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
564
+ # omitted. Requires zero data retention to be enabled for your organization
565
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
566
+ # Successful ZDR responses include X-Context-ZDR: true.
530
567
  zdr: nil,
531
568
  request_options: {}
532
569
  )
533
570
  end
534
571
 
535
- # Scrapes the given URL and returns the raw HTML content of the page. The base
536
- # request costs 1 credit; requests with browser actions cost 2 credits. A request
537
- # that hits its timeoutOpts.milliseconds deadline fails with 408 and is not
538
- # billed, unless timeoutOpts.behavior=return-partial is set — then the page as
539
- # rendered so far is returned with `finalDOMState: "still-loading"` and billed at
540
- # the base cost of 1 credit.
572
+ # Scrapes the given URL and returns the HTML content of the page. Optional
573
+ # extractRules return deterministic structured data in extracted using CSS
574
+ # selectors, attributes, lists, and nested rules, without an LLM or additional
575
+ # credits. Rules run on the returned HTML after selector and main-content
576
+ # filtering. Send extractRules as a JSON-encoded query parameter. The base request
577
+ # costs 1 credit; requests with browser actions cost 2 credits. A request that
578
+ # hits its timeoutOpts.milliseconds deadline fails with 408 and is not billed,
579
+ # unless timeoutOpts.behavior=return-partial is set — then the page as rendered so
580
+ # far is returned with `finalDOMState: "still-loading"` and billed at the base
581
+ # cost of 1 credit.
541
582
  sig do
542
583
  params(
543
584
  url: String,
@@ -553,6 +594,14 @@ module ContextDev
553
594
  ),
554
595
  country: ContextDev::WebWebScrapeHTMLParams::Country::OrSymbol,
555
596
  exclude_selectors: T.nilable(T::Array[String]),
597
+ extract_rules:
598
+ T::Hash[
599
+ Symbol,
600
+ T.any(
601
+ String,
602
+ ContextDev::WebWebScrapeHTMLParams::ExtractRule::UnionMember1::OrHash
603
+ )
604
+ ],
556
605
  headers: T::Hash[Symbol, String],
557
606
  include_frames: T::Boolean,
558
607
  include_selectors: T.nilable(T::Array[String]),
@@ -581,6 +630,14 @@ module ContextDev
581
630
  # Exclusion takes precedence: an element matching both is removed. Examples:
582
631
  # "nav", "footer", ".ad-banner", "[aria-hidden=true]".
583
632
  exclude_selectors: nil,
633
+ # Optional CSS extraction rules applied to the returned HTML after selector and
634
+ # main-content filtering. Use selector strings ("h1", "a@href") or objects with
635
+ # selector, type (item or list), and output (text, html, @attribute, or nested
636
+ # rules). Text whitespace is normalized; html includes the matched element;
637
+ # attributes are returned as written. Missing items are null and missing lists are
638
+ # empty. CSS only; XPath is not supported. Maximum: 100 fields across 5 levels.
639
+ # Send a JSON-encoded string in the extractRules query parameter.
640
+ extract_rules: nil,
584
641
  # Optional outbound HTTP headers forwarded only to the target URL, sent as
585
642
  # deep-object query params such as headers[X-Custom]=value. When provided, caching
586
643
  # is bypassed: the result is neither read from nor written to cache.
@@ -618,9 +675,10 @@ module ContextDev
618
675
  # TIMEOUT_TOO_SHORT_FOR_WAIT.
619
676
  wait_for_ms: nil,
620
677
  # Set to enabled to bypass shared caches and omit request and response content
621
- # from retained usage logs. Requires zero data retention to be enabled for your
622
- # organization (contact support@context.dev), otherwise the request fails with
623
- # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.
678
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
679
+ # omitted. Requires zero data retention to be enabled for your organization
680
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
681
+ # Successful ZDR responses include X-Context-ZDR: true.
624
682
  zdr: nil,
625
683
  request_options: {}
626
684
  )
@@ -653,6 +711,7 @@ module ContextDev
653
711
  timeout_opts:
654
712
  ContextDev::WebWebScrapeImagesParams::TimeoutOpts::OrHash,
655
713
  wait_for_ms: T.nilable(Integer),
714
+ zdr: ContextDev::WebWebScrapeImagesParams::Zdr::OrSymbol,
656
715
  request_options: ContextDev::RequestOptions::OrHash
657
716
  ).returns(ContextDev::Models::WebWebScrapeImagesResponse)
658
717
  end
@@ -690,6 +749,12 @@ module ContextDev
690
749
  # timeoutOpts, timeoutOpts.milliseconds must be at least waitForMs + 10000 ms; a
691
750
  # shorter deadline is rejected with 400 TIMEOUT_TOO_SHORT_FOR_WAIT.
692
751
  wait_for_ms: nil,
752
+ # Set to enabled to bypass shared caches and omit request and response content
753
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
754
+ # omitted. Requires zero data retention to be enabled for your organization
755
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
756
+ # Successful ZDR responses include X-Context-ZDR: true.
757
+ zdr: nil,
693
758
  request_options: {}
694
759
  )
695
760
  end
@@ -818,9 +883,95 @@ module ContextDev
818
883
  # ms; a shorter deadline is rejected with 400 TIMEOUT_TOO_SHORT_FOR_WAIT.
819
884
  wait_for_ms: nil,
820
885
  # Set to enabled to bypass shared caches and omit request and response content
821
- # from retained usage logs. Requires zero data retention to be enabled for your
822
- # organization (contact support@context.dev), otherwise the request fails with
823
- # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.
886
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
887
+ # omitted. Requires zero data retention to be enabled for your organization
888
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
889
+ # Successful ZDR responses include X-Context-ZDR: true.
890
+ zdr: nil,
891
+ request_options: {}
892
+ )
893
+ end
894
+
895
+ # Capture the given HTTP or HTTPS URL with configurable viewport, full-page
896
+ # capture, wait time, popup handling, theme, scroll offset, cache age, country,
897
+ # and request timeout. Defaults to a 1920x1080 viewport, a 3-second wait, and a
898
+ # cache age of 1 day. With timeoutOpts.behavior=return-partial, a screenshot of
899
+ # the page rendered so far may be returned; inspect finalDOMState to identify an
900
+ # incomplete render. Successful requests cost 1 credit; errors are not billed.
901
+ sig do
902
+ params(
903
+ url: String,
904
+ clear_popups: T::Boolean,
905
+ color_scheme:
906
+ ContextDev::WebWebScrapeScreenshotParams::ColorScheme::OrSymbol,
907
+ country: ContextDev::WebWebScrapeScreenshotParams::Country::OrSymbol,
908
+ full_screenshot:
909
+ ContextDev::WebWebScrapeScreenshotParams::FullScreenshot::OrSymbol,
910
+ handle_cookie_popup: T::Boolean,
911
+ max_age_ms: T.nilable(Integer),
912
+ scroll_offset: T.nilable(Integer),
913
+ tags: T::Array[String],
914
+ timeout_opts:
915
+ ContextDev::WebWebScrapeScreenshotParams::TimeoutOpts::OrHash,
916
+ viewport: ContextDev::WebWebScrapeScreenshotParams::Viewport::OrHash,
917
+ wait_for_ms: T.nilable(Integer),
918
+ zdr: ContextDev::WebWebScrapeScreenshotParams::Zdr::OrSymbol,
919
+ request_options: ContextDev::RequestOptions::OrHash
920
+ ).returns(ContextDev::Models::WebWebScrapeScreenshotResponse)
921
+ end
922
+ def web_scrape_screenshot(
923
+ url:,
924
+ # Optional parameter for comprehensive popup cleanup. If 'true', the browser
925
+ # dismisses detected cookie/consent UI and clears other detected obstructive
926
+ # popups and overlays before capture. If 'false' or not provided, this parameter
927
+ # requests no cleanup; handleCookiePopup can still request cookie/consent handling
928
+ # independently.
929
+ clear_popups: nil,
930
+ # Optional parameter to choose the site's visual theme in the screenshot. Use
931
+ # 'light' or 'dark' when the site offers both appearances.
932
+ color_scheme: nil,
933
+ # Fetch the target page through a residential proxy in this country (ISO 3166-1
934
+ # alpha-2).
935
+ country: nil,
936
+ # Optional parameter to determine screenshot type. If 'true', takes a full page
937
+ # screenshot capturing all content. If 'false' or not provided, takes a viewport
938
+ # screenshot (standard browser view).
939
+ full_screenshot: nil,
940
+ # Optional parameter to control cookie/consent popup handling. If 'true', we
941
+ # dismiss cookie banner before capture. If 'false' or not provided, captures the
942
+ # page without that step.
943
+ handle_cookie_popup: nil,
944
+ # Return a cached screenshot if a prior screenshot for the same parameters exists
945
+ # and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
946
+ # omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
947
+ max_age_ms: nil,
948
+ # Optional vertical scroll offset in pixels for capturing a long page in
949
+ # viewport-sized chunks. When provided, the full page is captured once and the
950
+ # returned image is the viewport-sized slice that begins at this Y offset (e.g.
951
+ # request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page
952
+ # top to bottom). The final slice may be shorter than the viewport height. Takes
953
+ # precedence over fullScreenshot. Max: 100000.
954
+ scroll_offset: nil,
955
+ # Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
956
+ # characters.
957
+ tags: nil,
958
+ # Optional request deadline and behavior on timeout. For GET requests, use
959
+ # timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
960
+ # timeoutOpts object.
961
+ timeout_opts: nil,
962
+ # Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
963
+ viewport: nil,
964
+ # Optional browser wait time in milliseconds after initial page load before taking
965
+ # the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when
966
+ # omitted. When combined with timeoutOpts, timeoutOpts.milliseconds must be at
967
+ # least waitForMs + 10000 ms; a shorter deadline is rejected with 400
968
+ # TIMEOUT_TOO_SHORT_FOR_WAIT.
969
+ wait_for_ms: nil,
970
+ # Set to enabled to bypass shared caches and omit request and response content
971
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
972
+ # omitted. Requires zero data retention to be enabled for your organization
973
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
974
+ # Successful ZDR responses include X-Context-ZDR: true.
824
975
  zdr: nil,
825
976
  request_options: {}
826
977
  )
@@ -879,9 +1030,10 @@ module ContextDev
879
1030
  # returned and counted against maxLinks.
880
1031
  url_regex: nil,
881
1032
  # Set to enabled to bypass shared caches and omit request and response content
882
- # from retained usage logs. Requires zero data retention to be enabled for your
883
- # organization (contact support@context.dev), otherwise the request fails with
884
- # ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.
1033
+ # from retained usage logs. Asset uploads are skipped, so hosted image URLs are
1034
+ # omitted. Requires zero data retention to be enabled for your organization
1035
+ # (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
1036
+ # Successful ZDR responses include X-Context-ZDR: true.
885
1037
  zdr: nil,
886
1038
  request_options: {}
887
1039
  )
@@ -5,7 +5,8 @@ module ContextDev
5
5
  url: String,
6
6
  max_age_ms: Integer,
7
7
  tags: ::Array[String],
8
- timeout_opts: ContextDev::AIExtractProductParams::TimeoutOpts
8
+ timeout_opts: ContextDev::AIExtractProductParams::TimeoutOpts,
9
+ zdr: ContextDev::Models::AIExtractProductParams::zdr
9
10
  }
10
11
  & ContextDev::Internal::Type::request_parameters
11
12
 
@@ -29,11 +30,18 @@ module ContextDev
29
30
  ContextDev::AIExtractProductParams::TimeoutOpts
30
31
  ) -> ContextDev::AIExtractProductParams::TimeoutOpts
31
32
 
33
+ attr_reader zdr: ContextDev::Models::AIExtractProductParams::zdr?
34
+
35
+ def zdr=: (
36
+ ContextDev::Models::AIExtractProductParams::zdr
37
+ ) -> ContextDev::Models::AIExtractProductParams::zdr
38
+
32
39
  def initialize: (
33
40
  url: String,
34
41
  ?max_age_ms: Integer,
35
42
  ?tags: ::Array[String],
36
43
  ?timeout_opts: ContextDev::AIExtractProductParams::TimeoutOpts,
44
+ ?zdr: ContextDev::Models::AIExtractProductParams::zdr,
37
45
  ?request_options: ContextDev::request_opts
38
46
  ) -> void
39
47
 
@@ -42,6 +50,7 @@ module ContextDev
42
50
  max_age_ms: Integer,
43
51
  tags: ::Array[String],
44
52
  timeout_opts: ContextDev::AIExtractProductParams::TimeoutOpts,
53
+ zdr: ContextDev::Models::AIExtractProductParams::zdr,
45
54
  request_options: ContextDev::RequestOptions
46
55
  }
47
56
 
@@ -81,6 +90,17 @@ module ContextDev
81
90
  def self?.values: -> ::Array[ContextDev::Models::AIExtractProductParams::TimeoutOpts::behavior]
82
91
  end
83
92
  end
93
+
94
+ type zdr = :enabled | :disabled
95
+
96
+ module Zdr
97
+ extend ContextDev::Internal::Type::Enum
98
+
99
+ ENABLED: :enabled
100
+ DISABLED: :disabled
101
+
102
+ def self?.values: -> ::Array[ContextDev::Models::AIExtractProductParams::zdr]
103
+ end
84
104
  end
85
105
  end
86
106
  end
@@ -138,7 +138,8 @@ module ContextDev
138
138
  price: Float?,
139
139
  pricing_model: ContextDev::Models::AIExtractProductResponse::Product::pricing_model?,
140
140
  regular_price: Float?,
141
- url: String?
141
+ url: String?,
142
+ variants: ::Array[ContextDev::Models::AIExtractProductResponse::Product::Variant]
142
143
  }
143
144
 
144
145
  class Product < ContextDev::Internal::Type::BaseModel
@@ -178,6 +179,12 @@ module ContextDev
178
179
 
179
180
  attr_accessor url: String?
180
181
 
182
+ attr_reader variants: ::Array[ContextDev::Models::AIExtractProductResponse::Product::Variant]?
183
+
184
+ def variants=: (
185
+ ::Array[ContextDev::Models::AIExtractProductResponse::Product::Variant]
186
+ ) -> ::Array[ContextDev::Models::AIExtractProductResponse::Product::Variant]
187
+
181
188
  def initialize: (
182
189
  description: String,
183
190
  features: ::Array[String],
@@ -195,7 +202,8 @@ module ContextDev
195
202
  ?price: Float?,
196
203
  ?pricing_model: ContextDev::Models::AIExtractProductResponse::Product::pricing_model?,
197
204
  ?regular_price: Float?,
198
- ?url: String?
205
+ ?url: String?,
206
+ ?variants: ::Array[ContextDev::Models::AIExtractProductResponse::Product::Variant]
199
207
  ) -> void
200
208
 
201
209
  def to_hash: -> {
@@ -215,7 +223,8 @@ module ContextDev
215
223
  price: Float?,
216
224
  pricing_model: ContextDev::Models::AIExtractProductResponse::Product::pricing_model?,
217
225
  regular_price: Float?,
218
- url: String?
226
+ url: String?,
227
+ variants: ::Array[ContextDev::Models::AIExtractProductResponse::Product::Variant]
219
228
  }
220
229
 
221
230
  type availability =
@@ -267,6 +276,38 @@ module ContextDev
267
276
 
268
277
  def self?.values: -> ::Array[ContextDev::Models::AIExtractProductResponse::Product::pricing_model]
269
278
  end
279
+
280
+ type variant =
281
+ {
282
+ attributes: ::Hash[Symbol, String],
283
+ images: ::Array[String],
284
+ sku: String?,
285
+ url: String?
286
+ }
287
+
288
+ class Variant < ContextDev::Internal::Type::BaseModel
289
+ attr_accessor attributes: ::Hash[Symbol, String]
290
+
291
+ attr_accessor images: ::Array[String]
292
+
293
+ attr_accessor sku: String?
294
+
295
+ attr_accessor url: String?
296
+
297
+ def initialize: (
298
+ attributes: ::Hash[Symbol, String],
299
+ images: ::Array[String],
300
+ sku: String?,
301
+ url: String?
302
+ ) -> void
303
+
304
+ def to_hash: -> {
305
+ attributes: ::Hash[Symbol, String],
306
+ images: ::Array[String],
307
+ sku: String?,
308
+ url: String?
309
+ }
310
+ end
270
311
  end
271
312
  end
272
313
  end
@@ -117,7 +117,8 @@ module ContextDev
117
117
  price: Float?,
118
118
  pricing_model: ContextDev::Models::AIExtractProductsResponse::Product::pricing_model?,
119
119
  regular_price: Float?,
120
- url: String?
120
+ url: String?,
121
+ variants: ::Array[ContextDev::Models::AIExtractProductsResponse::Product::Variant]
121
122
  }
122
123
 
123
124
  class Product < ContextDev::Internal::Type::BaseModel
@@ -157,6 +158,12 @@ module ContextDev
157
158
 
158
159
  attr_accessor url: String?
159
160
 
161
+ attr_reader variants: ::Array[ContextDev::Models::AIExtractProductsResponse::Product::Variant]?
162
+
163
+ def variants=: (
164
+ ::Array[ContextDev::Models::AIExtractProductsResponse::Product::Variant]
165
+ ) -> ::Array[ContextDev::Models::AIExtractProductsResponse::Product::Variant]
166
+
160
167
  def initialize: (
161
168
  description: String,
162
169
  features: ::Array[String],
@@ -174,7 +181,8 @@ module ContextDev
174
181
  ?price: Float?,
175
182
  ?pricing_model: ContextDev::Models::AIExtractProductsResponse::Product::pricing_model?,
176
183
  ?regular_price: Float?,
177
- ?url: String?
184
+ ?url: String?,
185
+ ?variants: ::Array[ContextDev::Models::AIExtractProductsResponse::Product::Variant]
178
186
  ) -> void
179
187
 
180
188
  def to_hash: -> {
@@ -194,7 +202,8 @@ module ContextDev
194
202
  price: Float?,
195
203
  pricing_model: ContextDev::Models::AIExtractProductsResponse::Product::pricing_model?,
196
204
  regular_price: Float?,
197
- url: String?
205
+ url: String?,
206
+ variants: ::Array[ContextDev::Models::AIExtractProductsResponse::Product::Variant]
198
207
  }
199
208
 
200
209
  type availability =
@@ -246,6 +255,38 @@ module ContextDev
246
255
 
247
256
  def self?.values: -> ::Array[ContextDev::Models::AIExtractProductsResponse::Product::pricing_model]
248
257
  end
258
+
259
+ type variant =
260
+ {
261
+ attributes: ::Hash[Symbol, String],
262
+ images: ::Array[String],
263
+ sku: String?,
264
+ url: String?
265
+ }
266
+
267
+ class Variant < ContextDev::Internal::Type::BaseModel
268
+ attr_accessor attributes: ::Hash[Symbol, String]
269
+
270
+ attr_accessor images: ::Array[String]
271
+
272
+ attr_accessor sku: String?
273
+
274
+ attr_accessor url: String?
275
+
276
+ def initialize: (
277
+ attributes: ::Hash[Symbol, String],
278
+ images: ::Array[String],
279
+ sku: String?,
280
+ url: String?
281
+ ) -> void
282
+
283
+ def to_hash: -> {
284
+ attributes: ::Hash[Symbol, String],
285
+ images: ::Array[String],
286
+ sku: String?,
287
+ url: String?
288
+ }
289
+ end
249
290
  end
250
291
  end
251
292
  end