brand.dev 0.25.0 → 0.27.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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/brand_dev/models/brand_styleguide_params.rb +12 -3
  5. data/lib/brand_dev/models/brand_web_scrape_html_params.rb +22 -0
  6. data/lib/brand_dev/models/brand_web_scrape_html_response.rb +45 -0
  7. data/lib/brand_dev/models/brand_web_scrape_images_params.rb +22 -0
  8. data/lib/brand_dev/models/brand_web_scrape_images_response.rb +111 -0
  9. data/lib/brand_dev/models/brand_web_scrape_md_params.rb +42 -0
  10. data/lib/brand_dev/models/brand_web_scrape_md_response.rb +45 -0
  11. data/lib/brand_dev/models/brand_web_scrape_sitemap_params.rb +26 -0
  12. data/lib/brand_dev/models/brand_web_scrape_sitemap_response.rb +91 -0
  13. data/lib/brand_dev/models.rb +8 -0
  14. data/lib/brand_dev/resources/brand.rb +112 -3
  15. data/lib/brand_dev/version.rb +1 -1
  16. data/lib/brand_dev.rb +8 -0
  17. data/rbi/brand_dev/models/brand_styleguide_params.rbi +19 -3
  18. data/rbi/brand_dev/models/brand_web_scrape_html_params.rbi +40 -0
  19. data/rbi/brand_dev/models/brand_web_scrape_html_response.rbi +92 -0
  20. data/rbi/brand_dev/models/brand_web_scrape_images_params.rbi +43 -0
  21. data/rbi/brand_dev/models/brand_web_scrape_images_response.rbi +259 -0
  22. data/rbi/brand_dev/models/brand_web_scrape_md_params.rbi +67 -0
  23. data/rbi/brand_dev/models/brand_web_scrape_md_response.rbi +92 -0
  24. data/rbi/brand_dev/models/brand_web_scrape_sitemap_params.rbi +45 -0
  25. data/rbi/brand_dev/models/brand_web_scrape_sitemap_response.rbi +167 -0
  26. data/rbi/brand_dev/models.rbi +8 -0
  27. data/rbi/brand_dev/resources/brand.rbi +78 -1
  28. data/sig/brand_dev/models/brand_styleguide_params.rbs +11 -2
  29. data/sig/brand_dev/models/brand_web_scrape_html_params.rbs +20 -0
  30. data/sig/brand_dev/models/brand_web_scrape_html_response.rbs +40 -0
  31. data/sig/brand_dev/models/brand_web_scrape_images_params.rbs +20 -0
  32. data/sig/brand_dev/models/brand_web_scrape_images_response.rbs +98 -0
  33. data/sig/brand_dev/models/brand_web_scrape_md_params.rbs +36 -0
  34. data/sig/brand_dev/models/brand_web_scrape_md_response.rbs +40 -0
  35. data/sig/brand_dev/models/brand_web_scrape_sitemap_params.rbs +23 -0
  36. data/sig/brand_dev/models/brand_web_scrape_sitemap_response.rbs +77 -0
  37. data/sig/brand_dev/models.rbs +8 -0
  38. data/sig/brand_dev/resources/brand.rbs +24 -1
  39. metadata +26 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 586503b2436acd1a836fdd867ebaf4258c5cb928320defd1b62b70c712439bc8
4
- data.tar.gz: 3adcd4f046fd0a5d7ee98a6ee2367191e1925a3549a0a8a4b779d876d1c2fe72
3
+ metadata.gz: 352acbb6668a328d87a316a4dba30616f02c7d1d7fcf472df6bb0109d9befdb1
4
+ data.tar.gz: 155f0018fd308c55dead3ef2ea0850085d21ded6920a9ae9c2f9229a2a527cd3
5
5
  SHA512:
6
- metadata.gz: 96a199073279aa10b42f908a1fc3705290eebb271559fd8249bfdb2d8cd157dbd32fdb177381139ebed4bc2b6154f6e1b251c6e4278f6f19091c0321d3408063
7
- data.tar.gz: cb915b6992b9ab682c0a0ebec5b11d7245f18c18e23fbf649bd19595157733f99e5d68763b37e2443572fa9911fe32d4f406d3a72e173035a7342a17aafc56ac
6
+ metadata.gz: 1f0a1068ce78f873ff484541d3a482de10824e093a4e70ee4df02804e3be6e02d2b5850bece4540b5519e92cd365af87a93b05d2b6fce9d315131d0fce525c02
7
+ data.tar.gz: e91395f9bb9671f7346e2e3dc0cc5d1e5a6a3b86ff28bd6eba0d03d3e8e546acce9dc8dc43b629f9fd7dc6dd9ea39503e64a3d29202e92bc3bbd3de049268aa1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.27.0 (2026-02-24)
4
+
5
+ Full Changelog: [v0.26.0...v0.27.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.26.0...v0.27.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([cbe6c73](https://github.com/brand-dot-dev/ruby-sdk/commit/cbe6c7376d1fb53af66e31c6154edd684722e712))
10
+
11
+ ## 0.26.0 (2026-02-23)
12
+
13
+ Full Changelog: [v0.25.0...v0.26.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.25.0...v0.26.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** manual updates ([bfe9b29](https://github.com/brand-dot-dev/ruby-sdk/commit/bfe9b298f2c51f4d2762da550344251c2b0b7256))
18
+
3
19
  ## 0.25.0 (2026-02-22)
4
20
 
5
21
  Full Changelog: [v0.24.0...v0.25.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.24.0...v0.25.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "brand.dev", "~> 0.25.0"
29
+ gem "brand.dev", "~> 0.27.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -7,12 +7,19 @@ module BrandDev
7
7
  extend BrandDev::Internal::Type::RequestParameters::Converter
8
8
  include BrandDev::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute direct_url
11
+ # A specific URL to fetch the styleguide from directly, bypassing domain
12
+ # resolution (e.g., 'https://example.com/design-system').
13
+ #
14
+ # @return [String, nil]
15
+ optional :direct_url, String
16
+
10
17
  # @!attribute domain
11
18
  # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
12
19
  # domain will be automatically normalized and validated.
13
20
  #
14
- # @return [String]
15
- required :domain, String
21
+ # @return [String, nil]
22
+ optional :domain, String
16
23
 
17
24
  # @!attribute prioritize
18
25
  # Optional parameter to prioritize screenshot capture for styleguide extraction.
@@ -31,10 +38,12 @@ module BrandDev
31
38
  # @return [Integer, nil]
32
39
  optional :timeout_ms, Integer
33
40
 
34
- # @!method initialize(domain:, prioritize: nil, timeout_ms: nil, request_options: {})
41
+ # @!method initialize(direct_url: nil, domain: nil, prioritize: nil, timeout_ms: nil, request_options: {})
35
42
  # Some parameter documentations has been truncated, see
36
43
  # {BrandDev::Models::BrandStyleguideParams} for more details.
37
44
  #
45
+ # @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio
46
+ #
38
47
  # @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
39
48
  #
40
49
  # @param prioritize [Symbol, BrandDev::Models::BrandStyleguideParams::Prioritize] Optional parameter to prioritize screenshot capture for styleguide extraction. I
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrandDev
4
+ module Models
5
+ # @see BrandDev::Resources::Brand#web_scrape_html
6
+ class BrandWebScrapeHTMLParams < BrandDev::Internal::Type::BaseModel
7
+ extend BrandDev::Internal::Type::RequestParameters::Converter
8
+ include BrandDev::Internal::Type::RequestParameters
9
+
10
+ # @!attribute url
11
+ # Full URL to scrape (must include http:// or https:// protocol)
12
+ #
13
+ # @return [String]
14
+ required :url, String
15
+
16
+ # @!method initialize(url:, request_options: {})
17
+ # @param url [String] Full URL to scrape (must include http:// or https:// protocol)
18
+ #
19
+ # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrandDev
4
+ module Models
5
+ # @see BrandDev::Resources::Brand#web_scrape_html
6
+ class BrandWebScrapeHTMLResponse < BrandDev::Internal::Type::BaseModel
7
+ # @!attribute html
8
+ # Raw HTML content of the page
9
+ #
10
+ # @return [String]
11
+ required :html, String
12
+
13
+ # @!attribute success
14
+ # Indicates success
15
+ #
16
+ # @return [Boolean, BrandDev::Models::BrandWebScrapeHTMLResponse::Success]
17
+ required :success, enum: -> { BrandDev::Models::BrandWebScrapeHTMLResponse::Success }
18
+
19
+ # @!attribute url
20
+ # The URL that was scraped
21
+ #
22
+ # @return [String]
23
+ required :url, String
24
+
25
+ # @!method initialize(html:, success:, url:)
26
+ # @param html [String] Raw HTML content of the page
27
+ #
28
+ # @param success [Boolean, BrandDev::Models::BrandWebScrapeHTMLResponse::Success] Indicates success
29
+ #
30
+ # @param url [String] The URL that was scraped
31
+
32
+ # Indicates success
33
+ #
34
+ # @see BrandDev::Models::BrandWebScrapeHTMLResponse#success
35
+ module Success
36
+ extend BrandDev::Internal::Type::Enum
37
+
38
+ TRUE = true
39
+
40
+ # @!method self.values
41
+ # @return [Array<Boolean>]
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrandDev
4
+ module Models
5
+ # @see BrandDev::Resources::Brand#web_scrape_images
6
+ class BrandWebScrapeImagesParams < BrandDev::Internal::Type::BaseModel
7
+ extend BrandDev::Internal::Type::RequestParameters::Converter
8
+ include BrandDev::Internal::Type::RequestParameters
9
+
10
+ # @!attribute url
11
+ # Full URL to scrape images from (must include http:// or https:// protocol)
12
+ #
13
+ # @return [String]
14
+ required :url, String
15
+
16
+ # @!method initialize(url:, request_options: {})
17
+ # @param url [String] Full URL to scrape images from (must include http:// or https:// protocol)
18
+ #
19
+ # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,111 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrandDev
4
+ module Models
5
+ # @see BrandDev::Resources::Brand#web_scrape_images
6
+ class BrandWebScrapeImagesResponse < BrandDev::Internal::Type::BaseModel
7
+ # @!attribute images
8
+ # Array of scraped images
9
+ #
10
+ # @return [Array<BrandDev::Models::BrandWebScrapeImagesResponse::Image>]
11
+ required :images,
12
+ -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandWebScrapeImagesResponse::Image] }
13
+
14
+ # @!attribute success
15
+ # Indicates success
16
+ #
17
+ # @return [Boolean, BrandDev::Models::BrandWebScrapeImagesResponse::Success]
18
+ required :success, enum: -> { BrandDev::Models::BrandWebScrapeImagesResponse::Success }
19
+
20
+ # @!attribute url
21
+ # The URL that was scraped
22
+ #
23
+ # @return [String]
24
+ required :url, String
25
+
26
+ # @!method initialize(images:, success:, url:)
27
+ # @param images [Array<BrandDev::Models::BrandWebScrapeImagesResponse::Image>] Array of scraped images
28
+ #
29
+ # @param success [Boolean, BrandDev::Models::BrandWebScrapeImagesResponse::Success] Indicates success
30
+ #
31
+ # @param url [String] The URL that was scraped
32
+
33
+ class Image < BrandDev::Internal::Type::BaseModel
34
+ # @!attribute alt
35
+ # Alt text of the image, or null if not present
36
+ #
37
+ # @return [String, nil]
38
+ required :alt, String, nil?: true
39
+
40
+ # @!attribute element
41
+ # The HTML element the image was found in
42
+ #
43
+ # @return [Symbol, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element]
44
+ required :element, enum: -> { BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element }
45
+
46
+ # @!attribute src
47
+ # The image source - can be a URL, inline HTML (for SVGs), or a base64 data URI
48
+ #
49
+ # @return [String]
50
+ required :src, String
51
+
52
+ # @!attribute type
53
+ # The type/format of the src value
54
+ #
55
+ # @return [Symbol, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type]
56
+ required :type, enum: -> { BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type }
57
+
58
+ # @!method initialize(alt:, element:, src:, type:)
59
+ # @param alt [String, nil] Alt text of the image, or null if not present
60
+ #
61
+ # @param element [Symbol, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element] The HTML element the image was found in
62
+ #
63
+ # @param src [String] The image source - can be a URL, inline HTML (for SVGs), or a base64 data URI
64
+ #
65
+ # @param type [Symbol, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type] The type/format of the src value
66
+
67
+ # The HTML element the image was found in
68
+ #
69
+ # @see BrandDev::Models::BrandWebScrapeImagesResponse::Image#element
70
+ module Element
71
+ extend BrandDev::Internal::Type::Enum
72
+
73
+ IMG = :img
74
+ SVG = :svg
75
+ LINK = :link
76
+ SOURCE = :source
77
+ VIDEO = :video
78
+
79
+ # @!method self.values
80
+ # @return [Array<Symbol>]
81
+ end
82
+
83
+ # The type/format of the src value
84
+ #
85
+ # @see BrandDev::Models::BrandWebScrapeImagesResponse::Image#type
86
+ module Type
87
+ extend BrandDev::Internal::Type::Enum
88
+
89
+ URL = :url
90
+ HTML = :html
91
+ BASE64 = :base64
92
+
93
+ # @!method self.values
94
+ # @return [Array<Symbol>]
95
+ end
96
+ end
97
+
98
+ # Indicates success
99
+ #
100
+ # @see BrandDev::Models::BrandWebScrapeImagesResponse#success
101
+ module Success
102
+ extend BrandDev::Internal::Type::Enum
103
+
104
+ TRUE = true
105
+
106
+ # @!method self.values
107
+ # @return [Array<Boolean>]
108
+ end
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrandDev
4
+ module Models
5
+ # @see BrandDev::Resources::Brand#web_scrape_md
6
+ class BrandWebScrapeMdParams < BrandDev::Internal::Type::BaseModel
7
+ extend BrandDev::Internal::Type::RequestParameters::Converter
8
+ include BrandDev::Internal::Type::RequestParameters
9
+
10
+ # @!attribute url
11
+ # Full URL to scrape and convert to markdown (must include http:// or https://
12
+ # protocol)
13
+ #
14
+ # @return [String]
15
+ required :url, String
16
+
17
+ # @!attribute include_images
18
+ # Include image references in Markdown output
19
+ #
20
+ # @return [Boolean, nil]
21
+ optional :include_images, BrandDev::Internal::Type::Boolean
22
+
23
+ # @!attribute include_links
24
+ # Preserve hyperlinks in Markdown output
25
+ #
26
+ # @return [Boolean, nil]
27
+ optional :include_links, BrandDev::Internal::Type::Boolean
28
+
29
+ # @!method initialize(url:, include_images: nil, include_links: nil, request_options: {})
30
+ # Some parameter documentations has been truncated, see
31
+ # {BrandDev::Models::BrandWebScrapeMdParams} for more details.
32
+ #
33
+ # @param url [String] Full URL to scrape and convert to markdown (must include http:// or https:// pro
34
+ #
35
+ # @param include_images [Boolean] Include image references in Markdown output
36
+ #
37
+ # @param include_links [Boolean] Preserve hyperlinks in Markdown output
38
+ #
39
+ # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrandDev
4
+ module Models
5
+ # @see BrandDev::Resources::Brand#web_scrape_md
6
+ class BrandWebScrapeMdResponse < BrandDev::Internal::Type::BaseModel
7
+ # @!attribute markdown
8
+ # Page content converted to GitHub Flavored Markdown
9
+ #
10
+ # @return [String]
11
+ required :markdown, String
12
+
13
+ # @!attribute success
14
+ # Indicates success
15
+ #
16
+ # @return [Boolean, BrandDev::Models::BrandWebScrapeMdResponse::Success]
17
+ required :success, enum: -> { BrandDev::Models::BrandWebScrapeMdResponse::Success }
18
+
19
+ # @!attribute url
20
+ # The URL that was scraped
21
+ #
22
+ # @return [String]
23
+ required :url, String
24
+
25
+ # @!method initialize(markdown:, success:, url:)
26
+ # @param markdown [String] Page content converted to GitHub Flavored Markdown
27
+ #
28
+ # @param success [Boolean, BrandDev::Models::BrandWebScrapeMdResponse::Success] Indicates success
29
+ #
30
+ # @param url [String] The URL that was scraped
31
+
32
+ # Indicates success
33
+ #
34
+ # @see BrandDev::Models::BrandWebScrapeMdResponse#success
35
+ module Success
36
+ extend BrandDev::Internal::Type::Enum
37
+
38
+ TRUE = true
39
+
40
+ # @!method self.values
41
+ # @return [Array<Boolean>]
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrandDev
4
+ module Models
5
+ # @see BrandDev::Resources::Brand#web_scrape_sitemap
6
+ class BrandWebScrapeSitemapParams < BrandDev::Internal::Type::BaseModel
7
+ extend BrandDev::Internal::Type::RequestParameters::Converter
8
+ include BrandDev::Internal::Type::RequestParameters
9
+
10
+ # @!attribute domain
11
+ # Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be
12
+ # automatically normalized and validated.
13
+ #
14
+ # @return [String]
15
+ required :domain, String
16
+
17
+ # @!method initialize(domain:, request_options: {})
18
+ # Some parameter documentations has been truncated, see
19
+ # {BrandDev::Models::BrandWebScrapeSitemapParams} for more details.
20
+ #
21
+ # @param domain [String] Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be auto
22
+ #
23
+ # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,91 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrandDev
4
+ module Models
5
+ # @see BrandDev::Resources::Brand#web_scrape_sitemap
6
+ class BrandWebScrapeSitemapResponse < BrandDev::Internal::Type::BaseModel
7
+ # @!attribute domain
8
+ # The normalized domain that was crawled
9
+ #
10
+ # @return [String]
11
+ required :domain, String
12
+
13
+ # @!attribute meta
14
+ # Metadata about the sitemap crawl operation
15
+ #
16
+ # @return [BrandDev::Models::BrandWebScrapeSitemapResponse::Meta]
17
+ required :meta, -> { BrandDev::Models::BrandWebScrapeSitemapResponse::Meta }
18
+
19
+ # @!attribute success
20
+ # Indicates success
21
+ #
22
+ # @return [Boolean, BrandDev::Models::BrandWebScrapeSitemapResponse::Success]
23
+ required :success, enum: -> { BrandDev::Models::BrandWebScrapeSitemapResponse::Success }
24
+
25
+ # @!attribute urls
26
+ # Array of discovered page URLs from the sitemap (max 500)
27
+ #
28
+ # @return [Array<String>]
29
+ required :urls, BrandDev::Internal::Type::ArrayOf[String]
30
+
31
+ # @!method initialize(domain:, meta:, success:, urls:)
32
+ # @param domain [String] The normalized domain that was crawled
33
+ #
34
+ # @param meta [BrandDev::Models::BrandWebScrapeSitemapResponse::Meta] Metadata about the sitemap crawl operation
35
+ #
36
+ # @param success [Boolean, BrandDev::Models::BrandWebScrapeSitemapResponse::Success] Indicates success
37
+ #
38
+ # @param urls [Array<String>] Array of discovered page URLs from the sitemap (max 500)
39
+
40
+ # @see BrandDev::Models::BrandWebScrapeSitemapResponse#meta
41
+ class Meta < BrandDev::Internal::Type::BaseModel
42
+ # @!attribute errors
43
+ # Number of errors encountered during crawling
44
+ #
45
+ # @return [Integer]
46
+ required :errors, Integer
47
+
48
+ # @!attribute sitemaps_discovered
49
+ # Total number of sitemap files discovered
50
+ #
51
+ # @return [Integer]
52
+ required :sitemaps_discovered, Integer, api_name: :sitemapsDiscovered
53
+
54
+ # @!attribute sitemaps_fetched
55
+ # Number of sitemap files successfully fetched and parsed
56
+ #
57
+ # @return [Integer]
58
+ required :sitemaps_fetched, Integer, api_name: :sitemapsFetched
59
+
60
+ # @!attribute sitemaps_skipped
61
+ # Number of sitemap files skipped (due to errors, timeouts, or limits)
62
+ #
63
+ # @return [Integer]
64
+ required :sitemaps_skipped, Integer, api_name: :sitemapsSkipped
65
+
66
+ # @!method initialize(errors:, sitemaps_discovered:, sitemaps_fetched:, sitemaps_skipped:)
67
+ # Metadata about the sitemap crawl operation
68
+ #
69
+ # @param errors [Integer] Number of errors encountered during crawling
70
+ #
71
+ # @param sitemaps_discovered [Integer] Total number of sitemap files discovered
72
+ #
73
+ # @param sitemaps_fetched [Integer] Number of sitemap files successfully fetched and parsed
74
+ #
75
+ # @param sitemaps_skipped [Integer] Number of sitemap files skipped (due to errors, timeouts, or limits)
76
+ end
77
+
78
+ # Indicates success
79
+ #
80
+ # @see BrandDev::Models::BrandWebScrapeSitemapResponse#success
81
+ module Success
82
+ extend BrandDev::Internal::Type::Enum
83
+
84
+ TRUE = true
85
+
86
+ # @!method self.values
87
+ # @return [Array<Boolean>]
88
+ end
89
+ end
90
+ end
91
+ end
@@ -70,4 +70,12 @@ module BrandDev
70
70
  BrandScreenshotParams = BrandDev::Models::BrandScreenshotParams
71
71
 
72
72
  BrandStyleguideParams = BrandDev::Models::BrandStyleguideParams
73
+
74
+ BrandWebScrapeHTMLParams = BrandDev::Models::BrandWebScrapeHTMLParams
75
+
76
+ BrandWebScrapeImagesParams = BrandDev::Models::BrandWebScrapeImagesParams
77
+
78
+ BrandWebScrapeMdParams = BrandDev::Models::BrandWebScrapeMdParams
79
+
80
+ BrandWebScrapeSitemapParams = BrandDev::Models::BrandWebScrapeSitemapParams
73
81
  end
@@ -496,8 +496,12 @@ module BrandDev
496
496
  #
497
497
  # Automatically extract comprehensive design system information from a brand's
498
498
  # website including colors, typography, spacing, shadows, and UI components.
499
+ # Either 'domain' or 'directUrl' must be provided as a query parameter, but not
500
+ # both.
499
501
  #
500
- # @overload styleguide(domain:, prioritize: nil, timeout_ms: nil, request_options: {})
502
+ # @overload styleguide(direct_url: nil, domain: nil, prioritize: nil, timeout_ms: nil, request_options: {})
503
+ #
504
+ # @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio
501
505
  #
502
506
  # @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
503
507
  #
@@ -510,17 +514,122 @@ module BrandDev
510
514
  # @return [BrandDev::Models::BrandStyleguideResponse]
511
515
  #
512
516
  # @see BrandDev::Models::BrandStyleguideParams
513
- def styleguide(params)
517
+ def styleguide(params = {})
514
518
  parsed, options = BrandDev::BrandStyleguideParams.dump_request(params)
515
519
  @client.request(
516
520
  method: :get,
517
521
  path: "brand/styleguide",
518
- query: parsed.transform_keys(timeout_ms: "timeoutMS"),
522
+ query: parsed.transform_keys(direct_url: "directUrl", timeout_ms: "timeoutMS"),
519
523
  model: BrandDev::Models::BrandStyleguideResponse,
520
524
  options: options
521
525
  )
522
526
  end
523
527
 
528
+ # Scrapes the given URL and returns the raw HTML content of the page. Uses
529
+ # automatic proxy escalation to handle blocked sites.
530
+ #
531
+ # @overload web_scrape_html(url:, request_options: {})
532
+ #
533
+ # @param url [String] Full URL to scrape (must include http:// or https:// protocol)
534
+ #
535
+ # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
536
+ #
537
+ # @return [BrandDev::Models::BrandWebScrapeHTMLResponse]
538
+ #
539
+ # @see BrandDev::Models::BrandWebScrapeHTMLParams
540
+ def web_scrape_html(params)
541
+ parsed, options = BrandDev::BrandWebScrapeHTMLParams.dump_request(params)
542
+ @client.request(
543
+ method: :get,
544
+ path: "web/scrape/html",
545
+ query: parsed,
546
+ model: BrandDev::Models::BrandWebScrapeHTMLResponse,
547
+ options: options
548
+ )
549
+ end
550
+
551
+ # Scrapes all images from the given URL. Extracts images from img, svg,
552
+ # picture/source, link, and video elements including inline SVGs, base64 data
553
+ # URIs, and standard URLs.
554
+ #
555
+ # @overload web_scrape_images(url:, request_options: {})
556
+ #
557
+ # @param url [String] Full URL to scrape images from (must include http:// or https:// protocol)
558
+ #
559
+ # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
560
+ #
561
+ # @return [BrandDev::Models::BrandWebScrapeImagesResponse]
562
+ #
563
+ # @see BrandDev::Models::BrandWebScrapeImagesParams
564
+ def web_scrape_images(params)
565
+ parsed, options = BrandDev::BrandWebScrapeImagesParams.dump_request(params)
566
+ @client.request(
567
+ method: :get,
568
+ path: "web/scrape/images",
569
+ query: parsed,
570
+ model: BrandDev::Models::BrandWebScrapeImagesResponse,
571
+ options: options
572
+ )
573
+ end
574
+
575
+ # Some parameter documentations has been truncated, see
576
+ # {BrandDev::Models::BrandWebScrapeMdParams} for more details.
577
+ #
578
+ # Scrapes the given URL, converts the HTML content to GitHub Flavored Markdown
579
+ # (GFM), and returns the result. Uses automatic proxy escalation to handle blocked
580
+ # sites.
581
+ #
582
+ # @overload web_scrape_md(url:, include_images: nil, include_links: nil, request_options: {})
583
+ #
584
+ # @param url [String] Full URL to scrape and convert to markdown (must include http:// or https:// pro
585
+ #
586
+ # @param include_images [Boolean] Include image references in Markdown output
587
+ #
588
+ # @param include_links [Boolean] Preserve hyperlinks in Markdown output
589
+ #
590
+ # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
591
+ #
592
+ # @return [BrandDev::Models::BrandWebScrapeMdResponse]
593
+ #
594
+ # @see BrandDev::Models::BrandWebScrapeMdParams
595
+ def web_scrape_md(params)
596
+ parsed, options = BrandDev::BrandWebScrapeMdParams.dump_request(params)
597
+ @client.request(
598
+ method: :get,
599
+ path: "web/scrape/markdown",
600
+ query: parsed.transform_keys(include_images: "includeImages", include_links: "includeLinks"),
601
+ model: BrandDev::Models::BrandWebScrapeMdResponse,
602
+ options: options
603
+ )
604
+ end
605
+
606
+ # Some parameter documentations has been truncated, see
607
+ # {BrandDev::Models::BrandWebScrapeSitemapParams} for more details.
608
+ #
609
+ # Crawls the sitemap of the given domain and returns all discovered page URLs.
610
+ # Supports sitemap index files (recursive), parallel fetching with concurrency
611
+ # control, deduplication, and filters out non-page resources (images, PDFs, etc.).
612
+ #
613
+ # @overload web_scrape_sitemap(domain:, request_options: {})
614
+ #
615
+ # @param domain [String] Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be auto
616
+ #
617
+ # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
618
+ #
619
+ # @return [BrandDev::Models::BrandWebScrapeSitemapResponse]
620
+ #
621
+ # @see BrandDev::Models::BrandWebScrapeSitemapParams
622
+ def web_scrape_sitemap(params)
623
+ parsed, options = BrandDev::BrandWebScrapeSitemapParams.dump_request(params)
624
+ @client.request(
625
+ method: :get,
626
+ path: "web/scrape/sitemap",
627
+ query: parsed,
628
+ model: BrandDev::Models::BrandWebScrapeSitemapResponse,
629
+ options: options
630
+ )
631
+ end
632
+
524
633
  # @api private
525
634
  #
526
635
  # @param client [BrandDev::Client]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrandDev
4
- VERSION = "0.25.0"
4
+ VERSION = "0.27.0"
5
5
  end
data/lib/brand_dev.rb CHANGED
@@ -84,5 +84,13 @@ require_relative "brand_dev/models/brand_screenshot_params"
84
84
  require_relative "brand_dev/models/brand_screenshot_response"
85
85
  require_relative "brand_dev/models/brand_styleguide_params"
86
86
  require_relative "brand_dev/models/brand_styleguide_response"
87
+ require_relative "brand_dev/models/brand_web_scrape_html_params"
88
+ require_relative "brand_dev/models/brand_web_scrape_html_response"
89
+ require_relative "brand_dev/models/brand_web_scrape_images_params"
90
+ require_relative "brand_dev/models/brand_web_scrape_images_response"
91
+ require_relative "brand_dev/models/brand_web_scrape_md_params"
92
+ require_relative "brand_dev/models/brand_web_scrape_md_response"
93
+ require_relative "brand_dev/models/brand_web_scrape_sitemap_params"
94
+ require_relative "brand_dev/models/brand_web_scrape_sitemap_response"
87
95
  require_relative "brand_dev/models"
88
96
  require_relative "brand_dev/resources/brand"