brand.dev 0.1.0.pre.alpha.7 → 0.1.0.pre.alpha.9

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +1 -1
  4. data/lib/brand_dev/errors.rb +22 -0
  5. data/lib/brand_dev/internal/type/array_of.rb +6 -1
  6. data/lib/brand_dev/internal/type/base_model.rb +77 -25
  7. data/lib/brand_dev/internal/type/boolean.rb +7 -1
  8. data/lib/brand_dev/internal/type/converter.rb +42 -34
  9. data/lib/brand_dev/internal/type/enum.rb +10 -2
  10. data/lib/brand_dev/internal/type/file_input.rb +6 -1
  11. data/lib/brand_dev/internal/type/hash_of.rb +6 -1
  12. data/lib/brand_dev/internal/type/union.rb +12 -7
  13. data/lib/brand_dev/internal/type/unknown.rb +7 -1
  14. data/lib/brand_dev/models/brand_retrieve_simplified_params.rb +35 -0
  15. data/lib/brand_dev/models/brand_retrieve_simplified_response.rb +280 -0
  16. data/lib/brand_dev/models/brand_screenshot_params.rb +49 -0
  17. data/lib/brand_dev/models/brand_screenshot_response.rb +64 -0
  18. data/lib/brand_dev/models/brand_styleguide_params.rb +36 -0
  19. data/lib/brand_dev/models/brand_styleguide_response.rb +769 -0
  20. data/lib/brand_dev/models.rb +6 -0
  21. data/lib/brand_dev/resources/brand.rb +88 -0
  22. data/lib/brand_dev/version.rb +1 -1
  23. data/lib/brand_dev.rb +6 -0
  24. data/rbi/brand_dev/errors.rbi +16 -0
  25. data/rbi/brand_dev/internal/type/boolean.rbi +2 -0
  26. data/rbi/brand_dev/internal/type/converter.rbi +15 -15
  27. data/rbi/brand_dev/internal/type/union.rbi +5 -0
  28. data/rbi/brand_dev/internal/type/unknown.rbi +2 -0
  29. data/rbi/brand_dev/models/brand_retrieve_simplified_params.rbi +61 -0
  30. data/rbi/brand_dev/models/brand_retrieve_simplified_response.rbi +667 -0
  31. data/rbi/brand_dev/models/brand_screenshot_params.rbi +105 -0
  32. data/rbi/brand_dev/models/brand_screenshot_response.rbi +135 -0
  33. data/rbi/brand_dev/models/brand_styleguide_params.rbi +60 -0
  34. data/rbi/brand_dev/models/brand_styleguide_response.rbi +1648 -0
  35. data/rbi/brand_dev/models.rbi +7 -0
  36. data/rbi/brand_dev/resources/brand.rbi +67 -0
  37. data/sig/brand_dev/errors.rbs +9 -0
  38. data/sig/brand_dev/internal/type/converter.rbs +7 -1
  39. data/sig/brand_dev/models/brand_retrieve_simplified_params.rbs +30 -0
  40. data/sig/brand_dev/models/brand_retrieve_simplified_response.rbs +292 -0
  41. data/sig/brand_dev/models/brand_screenshot_params.rbs +46 -0
  42. data/sig/brand_dev/models/brand_screenshot_response.rbs +63 -0
  43. data/sig/brand_dev/models/brand_styleguide_params.rbs +30 -0
  44. data/sig/brand_dev/models/brand_styleguide_response.rbs +925 -0
  45. data/sig/brand_dev/models.rbs +6 -0
  46. data/sig/brand_dev/resources/brand.rbs +18 -0
  47. metadata +20 -2
@@ -0,0 +1,280 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrandDev
4
+ module Models
5
+ # @see BrandDev::Resources::Brand#retrieve_simplified
6
+ class BrandRetrieveSimplifiedResponse < BrandDev::Internal::Type::BaseModel
7
+ # @!attribute brand
8
+ # Simplified brand information
9
+ #
10
+ # @return [BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand, nil]
11
+ optional :brand, -> { BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand }
12
+
13
+ # @!attribute code
14
+ # HTTP status code of the response
15
+ #
16
+ # @return [Integer, nil]
17
+ optional :code, Integer
18
+
19
+ # @!attribute status
20
+ # Status of the response, e.g., 'ok'
21
+ #
22
+ # @return [String, nil]
23
+ optional :status, String
24
+
25
+ # @!method initialize(brand: nil, code: nil, status: nil)
26
+ # @param brand [BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand] Simplified brand information
27
+ #
28
+ # @param code [Integer] HTTP status code of the response
29
+ #
30
+ # @param status [String] Status of the response, e.g., 'ok'
31
+
32
+ # @see BrandDev::Models::BrandRetrieveSimplifiedResponse#brand
33
+ class Brand < BrandDev::Internal::Type::BaseModel
34
+ # @!attribute backdrops
35
+ # An array of backdrop images for the brand
36
+ #
37
+ # @return [Array<BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop>, nil]
38
+ optional :backdrops,
39
+ -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop] }
40
+
41
+ # @!attribute colors
42
+ # An array of brand colors
43
+ #
44
+ # @return [Array<BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color>, nil]
45
+ optional :colors,
46
+ -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color] }
47
+
48
+ # @!attribute domain
49
+ # The domain name of the brand
50
+ #
51
+ # @return [String, nil]
52
+ optional :domain, String
53
+
54
+ # @!attribute logos
55
+ # An array of logos associated with the brand
56
+ #
57
+ # @return [Array<BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo>, nil]
58
+ optional :logos,
59
+ -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo] }
60
+
61
+ # @!attribute title
62
+ # The title or name of the brand
63
+ #
64
+ # @return [String, nil]
65
+ optional :title, String
66
+
67
+ # @!method initialize(backdrops: nil, colors: nil, domain: nil, logos: nil, title: nil)
68
+ # Simplified brand information
69
+ #
70
+ # @param backdrops [Array<BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop>] An array of backdrop images for the brand
71
+ #
72
+ # @param colors [Array<BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color>] An array of brand colors
73
+ #
74
+ # @param domain [String] The domain name of the brand
75
+ #
76
+ # @param logos [Array<BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo>] An array of logos associated with the brand
77
+ #
78
+ # @param title [String] The title or name of the brand
79
+
80
+ class Backdrop < BrandDev::Internal::Type::BaseModel
81
+ # @!attribute colors
82
+ # Array of colors in the backdrop image
83
+ #
84
+ # @return [Array<BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color>, nil]
85
+ optional :colors,
86
+ -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color] }
87
+
88
+ # @!attribute resolution
89
+ # Resolution of the backdrop image
90
+ #
91
+ # @return [BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution, nil]
92
+ optional :resolution,
93
+ -> { BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution }
94
+
95
+ # @!attribute url
96
+ # URL of the backdrop image
97
+ #
98
+ # @return [String, nil]
99
+ optional :url, String
100
+
101
+ # @!method initialize(colors: nil, resolution: nil, url: nil)
102
+ # @param colors [Array<BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color>] Array of colors in the backdrop image
103
+ #
104
+ # @param resolution [BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution] Resolution of the backdrop image
105
+ #
106
+ # @param url [String] URL of the backdrop image
107
+
108
+ class Color < BrandDev::Internal::Type::BaseModel
109
+ # @!attribute hex
110
+ # Color in hexadecimal format
111
+ #
112
+ # @return [String, nil]
113
+ optional :hex, String
114
+
115
+ # @!attribute name
116
+ # Name of the color
117
+ #
118
+ # @return [String, nil]
119
+ optional :name, String
120
+
121
+ # @!method initialize(hex: nil, name: nil)
122
+ # @param hex [String] Color in hexadecimal format
123
+ #
124
+ # @param name [String] Name of the color
125
+ end
126
+
127
+ # @see BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop#resolution
128
+ class Resolution < BrandDev::Internal::Type::BaseModel
129
+ # @!attribute aspect_ratio
130
+ # Aspect ratio of the image (width/height)
131
+ #
132
+ # @return [Float, nil]
133
+ optional :aspect_ratio, Float
134
+
135
+ # @!attribute height
136
+ # Height of the image in pixels
137
+ #
138
+ # @return [Integer, nil]
139
+ optional :height, Integer
140
+
141
+ # @!attribute width
142
+ # Width of the image in pixels
143
+ #
144
+ # @return [Integer, nil]
145
+ optional :width, Integer
146
+
147
+ # @!method initialize(aspect_ratio: nil, height: nil, width: nil)
148
+ # Resolution of the backdrop image
149
+ #
150
+ # @param aspect_ratio [Float] Aspect ratio of the image (width/height)
151
+ #
152
+ # @param height [Integer] Height of the image in pixels
153
+ #
154
+ # @param width [Integer] Width of the image in pixels
155
+ end
156
+ end
157
+
158
+ class Color < BrandDev::Internal::Type::BaseModel
159
+ # @!attribute hex
160
+ # Color in hexadecimal format
161
+ #
162
+ # @return [String, nil]
163
+ optional :hex, String
164
+
165
+ # @!attribute name
166
+ # Name of the color
167
+ #
168
+ # @return [String, nil]
169
+ optional :name, String
170
+
171
+ # @!method initialize(hex: nil, name: nil)
172
+ # @param hex [String] Color in hexadecimal format
173
+ #
174
+ # @param name [String] Name of the color
175
+ end
176
+
177
+ class Logo < BrandDev::Internal::Type::BaseModel
178
+ # @!attribute colors
179
+ # Array of colors in the logo
180
+ #
181
+ # @return [Array<BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Color>, nil]
182
+ optional :colors,
183
+ -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Color] }
184
+
185
+ # @!attribute group
186
+ # Group identifier for logos
187
+ #
188
+ # @return [Integer, nil]
189
+ optional :group, Integer
190
+
191
+ # @!attribute mode
192
+ # Mode of the logo, e.g., 'dark', 'light'
193
+ #
194
+ # @return [String, nil]
195
+ optional :mode, String
196
+
197
+ # @!attribute resolution
198
+ # Resolution of the logo image
199
+ #
200
+ # @return [BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Resolution, nil]
201
+ optional :resolution, -> { BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Resolution }
202
+
203
+ # @!attribute type
204
+ # Type of the logo based on resolution (e.g., 'icon', 'logo', 'banner')
205
+ #
206
+ # @return [String, nil]
207
+ optional :type, String
208
+
209
+ # @!attribute url
210
+ # URL of the logo image
211
+ #
212
+ # @return [String, nil]
213
+ optional :url, String
214
+
215
+ # @!method initialize(colors: nil, group: nil, mode: nil, resolution: nil, type: nil, url: nil)
216
+ # @param colors [Array<BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Color>] Array of colors in the logo
217
+ #
218
+ # @param group [Integer] Group identifier for logos
219
+ #
220
+ # @param mode [String] Mode of the logo, e.g., 'dark', 'light'
221
+ #
222
+ # @param resolution [BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Resolution] Resolution of the logo image
223
+ #
224
+ # @param type [String] Type of the logo based on resolution (e.g., 'icon', 'logo', 'banner')
225
+ #
226
+ # @param url [String] URL of the logo image
227
+
228
+ class Color < BrandDev::Internal::Type::BaseModel
229
+ # @!attribute hex
230
+ # Color in hexadecimal format
231
+ #
232
+ # @return [String, nil]
233
+ optional :hex, String
234
+
235
+ # @!attribute name
236
+ # Name of the color
237
+ #
238
+ # @return [String, nil]
239
+ optional :name, String
240
+
241
+ # @!method initialize(hex: nil, name: nil)
242
+ # @param hex [String] Color in hexadecimal format
243
+ #
244
+ # @param name [String] Name of the color
245
+ end
246
+
247
+ # @see BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo#resolution
248
+ class Resolution < BrandDev::Internal::Type::BaseModel
249
+ # @!attribute aspect_ratio
250
+ # Aspect ratio of the image (width/height)
251
+ #
252
+ # @return [Float, nil]
253
+ optional :aspect_ratio, Float
254
+
255
+ # @!attribute height
256
+ # Height of the image in pixels
257
+ #
258
+ # @return [Integer, nil]
259
+ optional :height, Integer
260
+
261
+ # @!attribute width
262
+ # Width of the image in pixels
263
+ #
264
+ # @return [Integer, nil]
265
+ optional :width, Integer
266
+
267
+ # @!method initialize(aspect_ratio: nil, height: nil, width: nil)
268
+ # Resolution of the logo image
269
+ #
270
+ # @param aspect_ratio [Float] Aspect ratio of the image (width/height)
271
+ #
272
+ # @param height [Integer] Height of the image in pixels
273
+ #
274
+ # @param width [Integer] Width of the image in pixels
275
+ end
276
+ end
277
+ end
278
+ end
279
+ end
280
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrandDev
4
+ module Models
5
+ # @see BrandDev::Resources::Brand#screenshot
6
+ class BrandScreenshotParams < 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 take screenshot of (e.g., 'example.com', 'google.com'). The
12
+ # domain will be automatically normalized and validated.
13
+ #
14
+ # @return [String]
15
+ required :domain, String
16
+
17
+ # @!attribute full_screenshot
18
+ # Optional parameter to determine screenshot type. If 'true', takes a full page
19
+ # screenshot capturing all content. If 'false' or not provided, takes a viewport
20
+ # screenshot (standard browser view).
21
+ #
22
+ # @return [Symbol, BrandDev::Models::BrandScreenshotParams::FullScreenshot, nil]
23
+ optional :full_screenshot, enum: -> { BrandDev::BrandScreenshotParams::FullScreenshot }
24
+
25
+ # @!method initialize(domain:, full_screenshot: nil, request_options: {})
26
+ # Some parameter documentations has been truncated, see
27
+ # {BrandDev::Models::BrandScreenshotParams} for more details.
28
+ #
29
+ # @param domain [String] Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The domai
30
+ #
31
+ # @param full_screenshot [Symbol, BrandDev::Models::BrandScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc
32
+ #
33
+ # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
34
+
35
+ # Optional parameter to determine screenshot type. If 'true', takes a full page
36
+ # screenshot capturing all content. If 'false' or not provided, takes a viewport
37
+ # screenshot (standard browser view).
38
+ module FullScreenshot
39
+ extend BrandDev::Internal::Type::Enum
40
+
41
+ TRUE = :true
42
+ FALSE = :false
43
+
44
+ # @!method self.values
45
+ # @return [Array<Symbol>]
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrandDev
4
+ module Models
5
+ # @see BrandDev::Resources::Brand#screenshot
6
+ class BrandScreenshotResponse < BrandDev::Internal::Type::BaseModel
7
+ # @!attribute code
8
+ # HTTP status code
9
+ #
10
+ # @return [Integer, nil]
11
+ optional :code, Integer
12
+
13
+ # @!attribute domain
14
+ # The normalized domain that was processed
15
+ #
16
+ # @return [String, nil]
17
+ optional :domain, String
18
+
19
+ # @!attribute screenshot
20
+ # Public URL of the uploaded screenshot image
21
+ #
22
+ # @return [String, nil]
23
+ optional :screenshot, String
24
+
25
+ # @!attribute screenshot_type
26
+ # Type of screenshot that was captured
27
+ #
28
+ # @return [Symbol, BrandDev::Models::BrandScreenshotResponse::ScreenshotType, nil]
29
+ optional :screenshot_type,
30
+ enum: -> { BrandDev::Models::BrandScreenshotResponse::ScreenshotType },
31
+ api_name: :screenshotType
32
+
33
+ # @!attribute status
34
+ # Status of the response, e.g., 'ok'
35
+ #
36
+ # @return [String, nil]
37
+ optional :status, String
38
+
39
+ # @!method initialize(code: nil, domain: nil, screenshot: nil, screenshot_type: nil, status: nil)
40
+ # @param code [Integer] HTTP status code
41
+ #
42
+ # @param domain [String] The normalized domain that was processed
43
+ #
44
+ # @param screenshot [String] Public URL of the uploaded screenshot image
45
+ #
46
+ # @param screenshot_type [Symbol, BrandDev::Models::BrandScreenshotResponse::ScreenshotType] Type of screenshot that was captured
47
+ #
48
+ # @param status [String] Status of the response, e.g., 'ok'
49
+
50
+ # Type of screenshot that was captured
51
+ #
52
+ # @see BrandDev::Models::BrandScreenshotResponse#screenshot_type
53
+ module ScreenshotType
54
+ extend BrandDev::Internal::Type::Enum
55
+
56
+ VIEWPORT = :viewport
57
+ FULL_PAGE = :fullPage
58
+
59
+ # @!method self.values
60
+ # @return [Array<Symbol>]
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BrandDev
4
+ module Models
5
+ # @see BrandDev::Resources::Brand#styleguide
6
+ class BrandStyleguideParams < 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 extract styleguide from (e.g., 'example.com', 'google.com'). The
12
+ # domain will be automatically normalized and validated.
13
+ #
14
+ # @return [String]
15
+ required :domain, String
16
+
17
+ # @!attribute timeout_ms
18
+ # Optional timeout in milliseconds for the request. If the request takes longer
19
+ # than this value, it will be aborted with a 408 status code. Maximum allowed
20
+ # value is 300000ms (5 minutes).
21
+ #
22
+ # @return [Integer, nil]
23
+ optional :timeout_ms, Integer
24
+
25
+ # @!method initialize(domain:, timeout_ms: nil, request_options: {})
26
+ # Some parameter documentations has been truncated, see
27
+ # {BrandDev::Models::BrandStyleguideParams} for more details.
28
+ #
29
+ # @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
30
+ #
31
+ # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
32
+ #
33
+ # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
34
+ end
35
+ end
36
+ end