brand.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 BrandDev
172
172
  :video,
173
173
  BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
174
174
  )
175
+ CSS =
176
+ T.let(
177
+ :css,
178
+ BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
179
+ )
180
+ OBJECT =
181
+ T.let(
182
+ :object,
183
+ BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
184
+ )
185
+ META =
186
+ T.let(
187
+ :meta,
188
+ BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
189
+ )
190
+ BACKGROUND =
191
+ T.let(
192
+ :background,
193
+ BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
194
+ )
175
195
 
176
196
  sig do
177
197
  override.returns(
@@ -37,12 +37,21 @@ module BrandDev
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: BrandDev::RequestOptions::OrHash
47
56
  ).returns(T.attached_class)
48
57
  end
@@ -56,6 +65,9 @@ module BrandDev
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 BrandDev
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: BrandDev::RequestOptions
71
84
  }
72
85
  )
@@ -441,7 +441,6 @@ module BrandDev
441
441
  params(
442
442
  direct_url: String,
443
443
  domain: String,
444
- prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol,
445
444
  timeout_ms: Integer,
446
445
  request_options: BrandDev::RequestOptions::OrHash
447
446
  ).returns(BrandDev::Models::BrandStyleguideResponse)
@@ -453,11 +452,6 @@ module BrandDev
453
452
  # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
454
453
  # domain will be automatically normalized and validated.
455
454
  domain: nil,
456
- # Optional parameter to prioritize screenshot capture for styleguide extraction.
457
- # If 'speed', optimizes for faster capture with basic quality. If 'quality',
458
- # optimizes for higher quality with longer wait times. Defaults to 'quality' if
459
- # not provided.
460
- prioritize: nil,
461
455
  # Optional timeout in milliseconds for the request. If the request takes longer
462
456
  # than this value, it will be aborted with a 408 status code. Maximum allowed
463
457
  # value is 300000ms (5 minutes).
@@ -504,6 +498,7 @@ module BrandDev
504
498
  include_images: T::Boolean,
505
499
  include_links: T::Boolean,
506
500
  shorten_base64_images: T::Boolean,
501
+ use_main_content_only: T::Boolean,
507
502
  request_options: BrandDev::RequestOptions::OrHash
508
503
  ).returns(BrandDev::Models::BrandWebScrapeMdResponse)
509
504
  end
@@ -517,6 +512,9 @@ module BrandDev
517
512
  include_links: nil,
518
513
  # Shorten base64-encoded image data in the Markdown output
519
514
  shorten_base64_images: nil,
515
+ # Extract only the main content of the page, excluding headers, footers, sidebars,
516
+ # and navigation
517
+ use_main_content_only: nil,
520
518
  request_options: {}
521
519
  )
522
520
  end
@@ -45,8 +45,12 @@ module BrandDev
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 BrandDev
2
2
  module Models
3
3
  type brand_styleguide_params =
4
- {
5
- direct_url: String,
6
- domain: String,
7
- prioritize: BrandDev::Models::BrandStyleguideParams::prioritize,
8
- timeout_ms: Integer
9
- }
4
+ { direct_url: String, domain: String, timeout_ms: Integer }
10
5
  & BrandDev::Internal::Type::request_parameters
11
6
 
12
7
  class BrandStyleguideParams < BrandDev::Internal::Type::BaseModel
@@ -21,12 +16,6 @@ module BrandDev
21
16
 
22
17
  def domain=: (String) -> String
23
18
 
24
- attr_reader prioritize: BrandDev::Models::BrandStyleguideParams::prioritize?
25
-
26
- def prioritize=: (
27
- BrandDev::Models::BrandStyleguideParams::prioritize
28
- ) -> BrandDev::Models::BrandStyleguideParams::prioritize
29
-
30
19
  attr_reader timeout_ms: Integer?
31
20
 
32
21
  def timeout_ms=: (Integer) -> Integer
@@ -34,7 +23,6 @@ module BrandDev
34
23
  def initialize: (
35
24
  ?direct_url: String,
36
25
  ?domain: String,
37
- ?prioritize: BrandDev::Models::BrandStyleguideParams::prioritize,
38
26
  ?timeout_ms: Integer,
39
27
  ?request_options: BrandDev::request_opts
40
28
  ) -> void
@@ -42,21 +30,9 @@ module BrandDev
42
30
  def to_hash: -> {
43
31
  direct_url: String,
44
32
  domain: String,
45
- prioritize: BrandDev::Models::BrandStyleguideParams::prioritize,
46
33
  timeout_ms: Integer,
47
34
  request_options: BrandDev::RequestOptions
48
35
  }
49
-
50
- type prioritize = :speed | :quality
51
-
52
- module Prioritize
53
- extend BrandDev::Internal::Type::Enum
54
-
55
- SPEED: :speed
56
- QUALITY: :quality
57
-
58
- def self?.values: -> ::Array[BrandDev::Models::BrandStyleguideParams::prioritize]
59
- end
60
36
  end
61
37
  end
62
38
  end