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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/brand_dev/models/brand_styleguide_params.rb +12 -3
- data/lib/brand_dev/models/brand_web_scrape_html_params.rb +22 -0
- data/lib/brand_dev/models/brand_web_scrape_html_response.rb +45 -0
- data/lib/brand_dev/models/brand_web_scrape_images_params.rb +22 -0
- data/lib/brand_dev/models/brand_web_scrape_images_response.rb +111 -0
- data/lib/brand_dev/models/brand_web_scrape_md_params.rb +42 -0
- data/lib/brand_dev/models/brand_web_scrape_md_response.rb +45 -0
- data/lib/brand_dev/models/brand_web_scrape_sitemap_params.rb +26 -0
- data/lib/brand_dev/models/brand_web_scrape_sitemap_response.rb +91 -0
- data/lib/brand_dev/models.rb +8 -0
- data/lib/brand_dev/resources/brand.rb +112 -3
- data/lib/brand_dev/version.rb +1 -1
- data/lib/brand_dev.rb +8 -0
- data/rbi/brand_dev/models/brand_styleguide_params.rbi +19 -3
- data/rbi/brand_dev/models/brand_web_scrape_html_params.rbi +40 -0
- data/rbi/brand_dev/models/brand_web_scrape_html_response.rbi +92 -0
- data/rbi/brand_dev/models/brand_web_scrape_images_params.rbi +43 -0
- data/rbi/brand_dev/models/brand_web_scrape_images_response.rbi +259 -0
- data/rbi/brand_dev/models/brand_web_scrape_md_params.rbi +67 -0
- data/rbi/brand_dev/models/brand_web_scrape_md_response.rbi +92 -0
- data/rbi/brand_dev/models/brand_web_scrape_sitemap_params.rbi +45 -0
- data/rbi/brand_dev/models/brand_web_scrape_sitemap_response.rbi +167 -0
- data/rbi/brand_dev/models.rbi +8 -0
- data/rbi/brand_dev/resources/brand.rbi +78 -1
- data/sig/brand_dev/models/brand_styleguide_params.rbs +11 -2
- data/sig/brand_dev/models/brand_web_scrape_html_params.rbs +20 -0
- data/sig/brand_dev/models/brand_web_scrape_html_response.rbs +40 -0
- data/sig/brand_dev/models/brand_web_scrape_images_params.rbs +20 -0
- data/sig/brand_dev/models/brand_web_scrape_images_response.rbs +98 -0
- data/sig/brand_dev/models/brand_web_scrape_md_params.rbs +36 -0
- data/sig/brand_dev/models/brand_web_scrape_md_response.rbs +40 -0
- data/sig/brand_dev/models/brand_web_scrape_sitemap_params.rbs +23 -0
- data/sig/brand_dev/models/brand_web_scrape_sitemap_response.rbs +77 -0
- data/sig/brand_dev/models.rbs +8 -0
- data/sig/brand_dev/resources/brand.rbs +24 -1
- metadata +26 -2
|
@@ -11,10 +11,21 @@ module BrandDev
|
|
|
11
11
|
T.any(BrandDev::BrandStyleguideParams, BrandDev::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# A specific URL to fetch the styleguide from directly, bypassing domain
|
|
15
|
+
# resolution (e.g., 'https://example.com/design-system').
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_reader :direct_url
|
|
18
|
+
|
|
19
|
+
sig { params(direct_url: String).void }
|
|
20
|
+
attr_writer :direct_url
|
|
21
|
+
|
|
14
22
|
# Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
|
|
15
23
|
# domain will be automatically normalized and validated.
|
|
16
|
-
sig { returns(String) }
|
|
17
|
-
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_reader :domain
|
|
26
|
+
|
|
27
|
+
sig { params(domain: String).void }
|
|
28
|
+
attr_writer :domain
|
|
18
29
|
|
|
19
30
|
# Optional parameter to prioritize screenshot capture for styleguide extraction.
|
|
20
31
|
# If 'speed', optimizes for faster capture with basic quality. If 'quality',
|
|
@@ -45,6 +56,7 @@ module BrandDev
|
|
|
45
56
|
|
|
46
57
|
sig do
|
|
47
58
|
params(
|
|
59
|
+
direct_url: String,
|
|
48
60
|
domain: String,
|
|
49
61
|
prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol,
|
|
50
62
|
timeout_ms: Integer,
|
|
@@ -52,9 +64,12 @@ module BrandDev
|
|
|
52
64
|
).returns(T.attached_class)
|
|
53
65
|
end
|
|
54
66
|
def self.new(
|
|
67
|
+
# A specific URL to fetch the styleguide from directly, bypassing domain
|
|
68
|
+
# resolution (e.g., 'https://example.com/design-system').
|
|
69
|
+
direct_url: nil,
|
|
55
70
|
# Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
|
|
56
71
|
# domain will be automatically normalized and validated.
|
|
57
|
-
domain
|
|
72
|
+
domain: nil,
|
|
58
73
|
# Optional parameter to prioritize screenshot capture for styleguide extraction.
|
|
59
74
|
# If 'speed', optimizes for faster capture with basic quality. If 'quality',
|
|
60
75
|
# optimizes for higher quality with longer wait times. Defaults to 'quality' if
|
|
@@ -71,6 +86,7 @@ module BrandDev
|
|
|
71
86
|
sig do
|
|
72
87
|
override.returns(
|
|
73
88
|
{
|
|
89
|
+
direct_url: String,
|
|
74
90
|
domain: String,
|
|
75
91
|
prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol,
|
|
76
92
|
timeout_ms: Integer,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module BrandDev
|
|
4
|
+
module Models
|
|
5
|
+
class BrandWebScrapeHTMLParams < BrandDev::Internal::Type::BaseModel
|
|
6
|
+
extend BrandDev::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include BrandDev::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(BrandDev::BrandWebScrapeHTMLParams, BrandDev::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Full URL to scrape (must include http:// or https:// protocol)
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :url
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
params(
|
|
20
|
+
url: String,
|
|
21
|
+
request_options: BrandDev::RequestOptions::OrHash
|
|
22
|
+
).returns(T.attached_class)
|
|
23
|
+
end
|
|
24
|
+
def self.new(
|
|
25
|
+
# Full URL to scrape (must include http:// or https:// protocol)
|
|
26
|
+
url:,
|
|
27
|
+
request_options: {}
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
sig do
|
|
32
|
+
override.returns(
|
|
33
|
+
{ url: String, request_options: BrandDev::RequestOptions }
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
def to_hash
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module BrandDev
|
|
4
|
+
module Models
|
|
5
|
+
class BrandWebScrapeHTMLResponse < BrandDev::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
BrandDev::Models::BrandWebScrapeHTMLResponse,
|
|
10
|
+
BrandDev::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Raw HTML content of the page
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :html
|
|
17
|
+
|
|
18
|
+
# Indicates success
|
|
19
|
+
sig do
|
|
20
|
+
returns(
|
|
21
|
+
BrandDev::Models::BrandWebScrapeHTMLResponse::Success::TaggedBoolean
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
attr_accessor :success
|
|
25
|
+
|
|
26
|
+
# The URL that was scraped
|
|
27
|
+
sig { returns(String) }
|
|
28
|
+
attr_accessor :url
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
html: String,
|
|
33
|
+
success:
|
|
34
|
+
BrandDev::Models::BrandWebScrapeHTMLResponse::Success::OrBoolean,
|
|
35
|
+
url: String
|
|
36
|
+
).returns(T.attached_class)
|
|
37
|
+
end
|
|
38
|
+
def self.new(
|
|
39
|
+
# Raw HTML content of the page
|
|
40
|
+
html:,
|
|
41
|
+
# Indicates success
|
|
42
|
+
success:,
|
|
43
|
+
# The URL that was scraped
|
|
44
|
+
url:
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
sig do
|
|
49
|
+
override.returns(
|
|
50
|
+
{
|
|
51
|
+
html: String,
|
|
52
|
+
success:
|
|
53
|
+
BrandDev::Models::BrandWebScrapeHTMLResponse::Success::TaggedBoolean,
|
|
54
|
+
url: String
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
def to_hash
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Indicates success
|
|
62
|
+
module Success
|
|
63
|
+
extend BrandDev::Internal::Type::Enum
|
|
64
|
+
|
|
65
|
+
TaggedBoolean =
|
|
66
|
+
T.type_alias do
|
|
67
|
+
T.all(
|
|
68
|
+
T::Boolean,
|
|
69
|
+
BrandDev::Models::BrandWebScrapeHTMLResponse::Success
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
OrBoolean = T.type_alias { T::Boolean }
|
|
73
|
+
|
|
74
|
+
TRUE =
|
|
75
|
+
T.let(
|
|
76
|
+
true,
|
|
77
|
+
BrandDev::Models::BrandWebScrapeHTMLResponse::Success::TaggedBoolean
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
sig do
|
|
81
|
+
override.returns(
|
|
82
|
+
T::Array[
|
|
83
|
+
BrandDev::Models::BrandWebScrapeHTMLResponse::Success::TaggedBoolean
|
|
84
|
+
]
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
def self.values
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module BrandDev
|
|
4
|
+
module Models
|
|
5
|
+
class BrandWebScrapeImagesParams < BrandDev::Internal::Type::BaseModel
|
|
6
|
+
extend BrandDev::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include BrandDev::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
BrandDev::BrandWebScrapeImagesParams,
|
|
13
|
+
BrandDev::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Full URL to scrape images from (must include http:// or https:// protocol)
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :url
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
url: String,
|
|
24
|
+
request_options: BrandDev::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(
|
|
28
|
+
# Full URL to scrape images from (must include http:// or https:// protocol)
|
|
29
|
+
url:,
|
|
30
|
+
request_options: {}
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{ url: String, request_options: BrandDev::RequestOptions }
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
def to_hash
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module BrandDev
|
|
4
|
+
module Models
|
|
5
|
+
class BrandWebScrapeImagesResponse < BrandDev::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
BrandDev::Models::BrandWebScrapeImagesResponse,
|
|
10
|
+
BrandDev::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Array of scraped images
|
|
15
|
+
sig do
|
|
16
|
+
returns(T::Array[BrandDev::Models::BrandWebScrapeImagesResponse::Image])
|
|
17
|
+
end
|
|
18
|
+
attr_accessor :images
|
|
19
|
+
|
|
20
|
+
# Indicates success
|
|
21
|
+
sig do
|
|
22
|
+
returns(
|
|
23
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Success::TaggedBoolean
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
attr_accessor :success
|
|
27
|
+
|
|
28
|
+
# The URL that was scraped
|
|
29
|
+
sig { returns(String) }
|
|
30
|
+
attr_accessor :url
|
|
31
|
+
|
|
32
|
+
sig do
|
|
33
|
+
params(
|
|
34
|
+
images:
|
|
35
|
+
T::Array[
|
|
36
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::OrHash
|
|
37
|
+
],
|
|
38
|
+
success:
|
|
39
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Success::OrBoolean,
|
|
40
|
+
url: String
|
|
41
|
+
).returns(T.attached_class)
|
|
42
|
+
end
|
|
43
|
+
def self.new(
|
|
44
|
+
# Array of scraped images
|
|
45
|
+
images:,
|
|
46
|
+
# Indicates success
|
|
47
|
+
success:,
|
|
48
|
+
# The URL that was scraped
|
|
49
|
+
url:
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
sig do
|
|
54
|
+
override.returns(
|
|
55
|
+
{
|
|
56
|
+
images:
|
|
57
|
+
T::Array[BrandDev::Models::BrandWebScrapeImagesResponse::Image],
|
|
58
|
+
success:
|
|
59
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Success::TaggedBoolean,
|
|
60
|
+
url: String
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
def to_hash
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
class Image < BrandDev::Internal::Type::BaseModel
|
|
68
|
+
OrHash =
|
|
69
|
+
T.type_alias do
|
|
70
|
+
T.any(
|
|
71
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image,
|
|
72
|
+
BrandDev::Internal::AnyHash
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Alt text of the image, or null if not present
|
|
77
|
+
sig { returns(T.nilable(String)) }
|
|
78
|
+
attr_accessor :alt
|
|
79
|
+
|
|
80
|
+
# The HTML element the image was found in
|
|
81
|
+
sig do
|
|
82
|
+
returns(
|
|
83
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
attr_accessor :element
|
|
87
|
+
|
|
88
|
+
# The image source - can be a URL, inline HTML (for SVGs), or a base64 data URI
|
|
89
|
+
sig { returns(String) }
|
|
90
|
+
attr_accessor :src
|
|
91
|
+
|
|
92
|
+
# The type/format of the src value
|
|
93
|
+
sig do
|
|
94
|
+
returns(
|
|
95
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type::TaggedSymbol
|
|
96
|
+
)
|
|
97
|
+
end
|
|
98
|
+
attr_accessor :type
|
|
99
|
+
|
|
100
|
+
sig do
|
|
101
|
+
params(
|
|
102
|
+
alt: T.nilable(String),
|
|
103
|
+
element:
|
|
104
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::OrSymbol,
|
|
105
|
+
src: String,
|
|
106
|
+
type:
|
|
107
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type::OrSymbol
|
|
108
|
+
).returns(T.attached_class)
|
|
109
|
+
end
|
|
110
|
+
def self.new(
|
|
111
|
+
# Alt text of the image, or null if not present
|
|
112
|
+
alt:,
|
|
113
|
+
# The HTML element the image was found in
|
|
114
|
+
element:,
|
|
115
|
+
# The image source - can be a URL, inline HTML (for SVGs), or a base64 data URI
|
|
116
|
+
src:,
|
|
117
|
+
# The type/format of the src value
|
|
118
|
+
type:
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
sig do
|
|
123
|
+
override.returns(
|
|
124
|
+
{
|
|
125
|
+
alt: T.nilable(String),
|
|
126
|
+
element:
|
|
127
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol,
|
|
128
|
+
src: String,
|
|
129
|
+
type:
|
|
130
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type::TaggedSymbol
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
end
|
|
134
|
+
def to_hash
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# The HTML element the image was found in
|
|
138
|
+
module Element
|
|
139
|
+
extend BrandDev::Internal::Type::Enum
|
|
140
|
+
|
|
141
|
+
TaggedSymbol =
|
|
142
|
+
T.type_alias do
|
|
143
|
+
T.all(
|
|
144
|
+
Symbol,
|
|
145
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element
|
|
146
|
+
)
|
|
147
|
+
end
|
|
148
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
149
|
+
|
|
150
|
+
IMG =
|
|
151
|
+
T.let(
|
|
152
|
+
:img,
|
|
153
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
|
|
154
|
+
)
|
|
155
|
+
SVG =
|
|
156
|
+
T.let(
|
|
157
|
+
:svg,
|
|
158
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
|
|
159
|
+
)
|
|
160
|
+
LINK =
|
|
161
|
+
T.let(
|
|
162
|
+
:link,
|
|
163
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
|
|
164
|
+
)
|
|
165
|
+
SOURCE =
|
|
166
|
+
T.let(
|
|
167
|
+
:source,
|
|
168
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
|
|
169
|
+
)
|
|
170
|
+
VIDEO =
|
|
171
|
+
T.let(
|
|
172
|
+
:video,
|
|
173
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
sig do
|
|
177
|
+
override.returns(
|
|
178
|
+
T::Array[
|
|
179
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
|
|
180
|
+
]
|
|
181
|
+
)
|
|
182
|
+
end
|
|
183
|
+
def self.values
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# The type/format of the src value
|
|
188
|
+
module Type
|
|
189
|
+
extend BrandDev::Internal::Type::Enum
|
|
190
|
+
|
|
191
|
+
TaggedSymbol =
|
|
192
|
+
T.type_alias do
|
|
193
|
+
T.all(
|
|
194
|
+
Symbol,
|
|
195
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type
|
|
196
|
+
)
|
|
197
|
+
end
|
|
198
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
199
|
+
|
|
200
|
+
URL =
|
|
201
|
+
T.let(
|
|
202
|
+
:url,
|
|
203
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type::TaggedSymbol
|
|
204
|
+
)
|
|
205
|
+
HTML =
|
|
206
|
+
T.let(
|
|
207
|
+
:html,
|
|
208
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type::TaggedSymbol
|
|
209
|
+
)
|
|
210
|
+
BASE64 =
|
|
211
|
+
T.let(
|
|
212
|
+
:base64,
|
|
213
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type::TaggedSymbol
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
sig do
|
|
217
|
+
override.returns(
|
|
218
|
+
T::Array[
|
|
219
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Type::TaggedSymbol
|
|
220
|
+
]
|
|
221
|
+
)
|
|
222
|
+
end
|
|
223
|
+
def self.values
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Indicates success
|
|
229
|
+
module Success
|
|
230
|
+
extend BrandDev::Internal::Type::Enum
|
|
231
|
+
|
|
232
|
+
TaggedBoolean =
|
|
233
|
+
T.type_alias do
|
|
234
|
+
T.all(
|
|
235
|
+
T::Boolean,
|
|
236
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Success
|
|
237
|
+
)
|
|
238
|
+
end
|
|
239
|
+
OrBoolean = T.type_alias { T::Boolean }
|
|
240
|
+
|
|
241
|
+
TRUE =
|
|
242
|
+
T.let(
|
|
243
|
+
true,
|
|
244
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Success::TaggedBoolean
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
sig do
|
|
248
|
+
override.returns(
|
|
249
|
+
T::Array[
|
|
250
|
+
BrandDev::Models::BrandWebScrapeImagesResponse::Success::TaggedBoolean
|
|
251
|
+
]
|
|
252
|
+
)
|
|
253
|
+
end
|
|
254
|
+
def self.values
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
end
|
|
258
|
+
end
|
|
259
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module BrandDev
|
|
4
|
+
module Models
|
|
5
|
+
class BrandWebScrapeMdParams < BrandDev::Internal::Type::BaseModel
|
|
6
|
+
extend BrandDev::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include BrandDev::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(BrandDev::BrandWebScrapeMdParams, BrandDev::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Full URL to scrape and convert to markdown (must include http:// or https://
|
|
15
|
+
# protocol)
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :url
|
|
18
|
+
|
|
19
|
+
# Include image references in Markdown output
|
|
20
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
21
|
+
attr_reader :include_images
|
|
22
|
+
|
|
23
|
+
sig { params(include_images: T::Boolean).void }
|
|
24
|
+
attr_writer :include_images
|
|
25
|
+
|
|
26
|
+
# Preserve hyperlinks in Markdown output
|
|
27
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
28
|
+
attr_reader :include_links
|
|
29
|
+
|
|
30
|
+
sig { params(include_links: T::Boolean).void }
|
|
31
|
+
attr_writer :include_links
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
url: String,
|
|
36
|
+
include_images: T::Boolean,
|
|
37
|
+
include_links: T::Boolean,
|
|
38
|
+
request_options: BrandDev::RequestOptions::OrHash
|
|
39
|
+
).returns(T.attached_class)
|
|
40
|
+
end
|
|
41
|
+
def self.new(
|
|
42
|
+
# Full URL to scrape and convert to markdown (must include http:// or https://
|
|
43
|
+
# protocol)
|
|
44
|
+
url:,
|
|
45
|
+
# Include image references in Markdown output
|
|
46
|
+
include_images: nil,
|
|
47
|
+
# Preserve hyperlinks in Markdown output
|
|
48
|
+
include_links: nil,
|
|
49
|
+
request_options: {}
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
sig do
|
|
54
|
+
override.returns(
|
|
55
|
+
{
|
|
56
|
+
url: String,
|
|
57
|
+
include_images: T::Boolean,
|
|
58
|
+
include_links: T::Boolean,
|
|
59
|
+
request_options: BrandDev::RequestOptions
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
def to_hash
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module BrandDev
|
|
4
|
+
module Models
|
|
5
|
+
class BrandWebScrapeMdResponse < BrandDev::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
BrandDev::Models::BrandWebScrapeMdResponse,
|
|
10
|
+
BrandDev::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Page content converted to GitHub Flavored Markdown
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :markdown
|
|
17
|
+
|
|
18
|
+
# Indicates success
|
|
19
|
+
sig do
|
|
20
|
+
returns(
|
|
21
|
+
BrandDev::Models::BrandWebScrapeMdResponse::Success::TaggedBoolean
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
attr_accessor :success
|
|
25
|
+
|
|
26
|
+
# The URL that was scraped
|
|
27
|
+
sig { returns(String) }
|
|
28
|
+
attr_accessor :url
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
markdown: String,
|
|
33
|
+
success:
|
|
34
|
+
BrandDev::Models::BrandWebScrapeMdResponse::Success::OrBoolean,
|
|
35
|
+
url: String
|
|
36
|
+
).returns(T.attached_class)
|
|
37
|
+
end
|
|
38
|
+
def self.new(
|
|
39
|
+
# Page content converted to GitHub Flavored Markdown
|
|
40
|
+
markdown:,
|
|
41
|
+
# Indicates success
|
|
42
|
+
success:,
|
|
43
|
+
# The URL that was scraped
|
|
44
|
+
url:
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
sig do
|
|
49
|
+
override.returns(
|
|
50
|
+
{
|
|
51
|
+
markdown: String,
|
|
52
|
+
success:
|
|
53
|
+
BrandDev::Models::BrandWebScrapeMdResponse::Success::TaggedBoolean,
|
|
54
|
+
url: String
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
def to_hash
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Indicates success
|
|
62
|
+
module Success
|
|
63
|
+
extend BrandDev::Internal::Type::Enum
|
|
64
|
+
|
|
65
|
+
TaggedBoolean =
|
|
66
|
+
T.type_alias do
|
|
67
|
+
T.all(
|
|
68
|
+
T::Boolean,
|
|
69
|
+
BrandDev::Models::BrandWebScrapeMdResponse::Success
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
OrBoolean = T.type_alias { T::Boolean }
|
|
73
|
+
|
|
74
|
+
TRUE =
|
|
75
|
+
T.let(
|
|
76
|
+
true,
|
|
77
|
+
BrandDev::Models::BrandWebScrapeMdResponse::Success::TaggedBoolean
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
sig do
|
|
81
|
+
override.returns(
|
|
82
|
+
T::Array[
|
|
83
|
+
BrandDev::Models::BrandWebScrapeMdResponse::Success::TaggedBoolean
|
|
84
|
+
]
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
def self.values
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module BrandDev
|
|
4
|
+
module Models
|
|
5
|
+
class BrandWebScrapeSitemapParams < BrandDev::Internal::Type::BaseModel
|
|
6
|
+
extend BrandDev::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include BrandDev::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
BrandDev::BrandWebScrapeSitemapParams,
|
|
13
|
+
BrandDev::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be
|
|
18
|
+
# automatically normalized and validated.
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :domain
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
domain: String,
|
|
25
|
+
request_options: BrandDev::RequestOptions::OrHash
|
|
26
|
+
).returns(T.attached_class)
|
|
27
|
+
end
|
|
28
|
+
def self.new(
|
|
29
|
+
# Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be
|
|
30
|
+
# automatically normalized and validated.
|
|
31
|
+
domain:,
|
|
32
|
+
request_options: {}
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
override.returns(
|
|
38
|
+
{ domain: String, request_options: BrandDev::RequestOptions }
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
def to_hash
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|