context.dev 1.0.0 → 1.2.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.
@@ -172,6 +172,26 @@ module ContextDev
172
172
  :video,
173
173
  ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::TaggedSymbol
174
174
  )
175
+ CSS =
176
+ T.let(
177
+ :css,
178
+ ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::TaggedSymbol
179
+ )
180
+ OBJECT =
181
+ T.let(
182
+ :object,
183
+ ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::TaggedSymbol
184
+ )
185
+ META =
186
+ T.let(
187
+ :meta,
188
+ ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::TaggedSymbol
189
+ )
190
+ BACKGROUND =
191
+ T.let(
192
+ :background,
193
+ ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::TaggedSymbol
194
+ )
175
195
 
176
196
  sig do
177
197
  override.returns(
@@ -37,12 +37,21 @@ module ContextDev
37
37
  sig { params(shorten_base64_images: T::Boolean).void }
38
38
  attr_writer :shorten_base64_images
39
39
 
40
+ # Extract only the main content of the page, excluding headers, footers, sidebars,
41
+ # and navigation
42
+ sig { returns(T.nilable(T::Boolean)) }
43
+ attr_reader :use_main_content_only
44
+
45
+ sig { params(use_main_content_only: T::Boolean).void }
46
+ attr_writer :use_main_content_only
47
+
40
48
  sig do
41
49
  params(
42
50
  url: String,
43
51
  include_images: T::Boolean,
44
52
  include_links: T::Boolean,
45
53
  shorten_base64_images: T::Boolean,
54
+ use_main_content_only: T::Boolean,
46
55
  request_options: ContextDev::RequestOptions::OrHash
47
56
  ).returns(T.attached_class)
48
57
  end
@@ -56,6 +65,9 @@ module ContextDev
56
65
  include_links: nil,
57
66
  # Shorten base64-encoded image data in the Markdown output
58
67
  shorten_base64_images: nil,
68
+ # Extract only the main content of the page, excluding headers, footers, sidebars,
69
+ # and navigation
70
+ use_main_content_only: nil,
59
71
  request_options: {}
60
72
  )
61
73
  end
@@ -67,6 +79,7 @@ module ContextDev
67
79
  include_images: T::Boolean,
68
80
  include_links: T::Boolean,
69
81
  shorten_base64_images: T::Boolean,
82
+ use_main_content_only: T::Boolean,
70
83
  request_options: ContextDev::RequestOptions
71
84
  }
72
85
  )
@@ -32,8 +32,6 @@ module ContextDev
32
32
  params(
33
33
  direct_url: String,
34
34
  domain: String,
35
- prioritize:
36
- ContextDev::StyleExtractStyleguideParams::Prioritize::OrSymbol,
37
35
  timeout_ms: Integer,
38
36
  request_options: ContextDev::RequestOptions::OrHash
39
37
  ).returns(ContextDev::Models::StyleExtractStyleguideResponse)
@@ -45,11 +43,6 @@ module ContextDev
45
43
  # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
46
44
  # domain will be automatically normalized and validated.
47
45
  domain: nil,
48
- # Optional parameter to prioritize screenshot capture for styleguide extraction.
49
- # If 'speed', optimizes for faster capture with basic quality. If 'quality',
50
- # optimizes for higher quality with longer wait times. Defaults to 'quality' if
51
- # not provided.
52
- prioritize: nil,
53
46
  # Optional timeout in milliseconds for the request. If the request takes longer
54
47
  # than this value, it will be aborted with a 408 status code. Maximum allowed
55
48
  # value is 300000ms (5 minutes).
@@ -76,6 +76,7 @@ module ContextDev
76
76
  include_images: T::Boolean,
77
77
  include_links: T::Boolean,
78
78
  shorten_base64_images: T::Boolean,
79
+ use_main_content_only: T::Boolean,
79
80
  request_options: ContextDev::RequestOptions::OrHash
80
81
  ).returns(ContextDev::Models::WebWebScrapeMdResponse)
81
82
  end
@@ -89,6 +90,9 @@ module ContextDev
89
90
  include_links: nil,
90
91
  # Shorten base64-encoded image data in the Markdown output
91
92
  shorten_base64_images: nil,
93
+ # Extract only the main content of the page, excluding headers, footers, sidebars,
94
+ # and navigation
95
+ use_main_content_only: nil,
92
96
  request_options: {}
93
97
  )
94
98
  end
@@ -45,8 +45,12 @@ module ContextDev
45
45
  -> top?
46
46
  } -> top?
47
47
 
48
+ RFC_3986_NOT_PCHARS: Regexp
49
+
48
50
  def self?.uri_origin: (URI::Generic uri) -> String
49
51
 
52
+ def self?.encode_path: (String | Integer path) -> String
53
+
50
54
  def self?.interpolate_path: (String | ::Array[String] path) -> String
51
55
 
52
56
  def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]]
@@ -1,12 +1,7 @@
1
1
  module ContextDev
2
2
  module Models
3
3
  type style_extract_styleguide_params =
4
- {
5
- direct_url: String,
6
- domain: String,
7
- prioritize: ContextDev::Models::StyleExtractStyleguideParams::prioritize,
8
- timeout_ms: Integer
9
- }
4
+ { direct_url: String, domain: String, timeout_ms: Integer }
10
5
  & ContextDev::Internal::Type::request_parameters
11
6
 
12
7
  class StyleExtractStyleguideParams < ContextDev::Internal::Type::BaseModel
@@ -21,12 +16,6 @@ module ContextDev
21
16
 
22
17
  def domain=: (String) -> String
23
18
 
24
- attr_reader prioritize: ContextDev::Models::StyleExtractStyleguideParams::prioritize?
25
-
26
- def prioritize=: (
27
- ContextDev::Models::StyleExtractStyleguideParams::prioritize
28
- ) -> ContextDev::Models::StyleExtractStyleguideParams::prioritize
29
-
30
19
  attr_reader timeout_ms: Integer?
31
20
 
32
21
  def timeout_ms=: (Integer) -> Integer
@@ -34,7 +23,6 @@ module ContextDev
34
23
  def initialize: (
35
24
  ?direct_url: String,
36
25
  ?domain: String,
37
- ?prioritize: ContextDev::Models::StyleExtractStyleguideParams::prioritize,
38
26
  ?timeout_ms: Integer,
39
27
  ?request_options: ContextDev::request_opts
40
28
  ) -> void
@@ -42,21 +30,9 @@ module ContextDev
42
30
  def to_hash: -> {
43
31
  direct_url: String,
44
32
  domain: String,
45
- prioritize: ContextDev::Models::StyleExtractStyleguideParams::prioritize,
46
33
  timeout_ms: Integer,
47
34
  request_options: ContextDev::RequestOptions
48
35
  }
49
-
50
- type prioritize = :speed | :quality
51
-
52
- module Prioritize
53
- extend ContextDev::Internal::Type::Enum
54
-
55
- SPEED: :speed
56
- QUALITY: :quality
57
-
58
- def self?.values: -> ::Array[ContextDev::Models::StyleExtractStyleguideParams::prioritize]
59
- end
60
36
  end
61
37
  end
62
38
  end