brand.dev 0.1.0.pre.alpha.13 → 0.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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +49 -0
  3. data/README.md +1 -1
  4. data/lib/brand_dev/internal/transport/base_client.rb +10 -2
  5. data/lib/brand_dev/models/brand_ai_query_response.rb +9 -1
  6. data/lib/brand_dev/models/brand_identify_from_transaction_response.rb +90 -43
  7. data/lib/brand_dev/models/brand_retrieve_by_ticker_response.rb +89 -43
  8. data/lib/brand_dev/models/brand_retrieve_response.rb +89 -44
  9. data/lib/brand_dev/models/brand_retrieve_simplified_response.rb +46 -19
  10. data/lib/brand_dev/models.rb +0 -2
  11. data/lib/brand_dev/resources/brand.rb +0 -27
  12. data/lib/brand_dev/version.rb +1 -1
  13. data/lib/brand_dev.rb +0 -2
  14. data/rbi/brand_dev/models/brand_ai_query_response.rbi +11 -0
  15. data/rbi/brand_dev/models/brand_identify_from_transaction_response.rbi +195 -90
  16. data/rbi/brand_dev/models/brand_retrieve_by_ticker_response.rbi +195 -90
  17. data/rbi/brand_dev/models/brand_retrieve_response.rbi +195 -88
  18. data/rbi/brand_dev/models/brand_retrieve_simplified_response.rbi +121 -25
  19. data/rbi/brand_dev/models.rbi +0 -2
  20. data/rbi/brand_dev/resources/brand.rbi +0 -19
  21. data/sig/brand_dev/models/brand_ai_query_response.rbs +7 -0
  22. data/sig/brand_dev/models/brand_identify_from_transaction_response.rbs +91 -42
  23. data/sig/brand_dev/models/brand_retrieve_by_ticker_response.rbs +91 -42
  24. data/sig/brand_dev/models/brand_retrieve_response.rbs +91 -42
  25. data/sig/brand_dev/models/brand_retrieve_simplified_response.rbs +37 -17
  26. data/sig/brand_dev/models.rbs +0 -2
  27. data/sig/brand_dev/resources/brand.rbs +0 -6
  28. metadata +4 -10
  29. data/lib/brand_dev/models/brand_search_params.rb +0 -35
  30. data/lib/brand_dev/models/brand_search_response.rb +0 -35
  31. data/rbi/brand_dev/models/brand_search_params.rbi +0 -58
  32. data/rbi/brand_dev/models/brand_search_response.rbi +0 -63
  33. data/sig/brand_dev/models/brand_search_params.rbs +0 -30
  34. data/sig/brand_dev/models/brand_search_response.rbs +0 -29
@@ -63,13 +63,17 @@ module BrandDev
63
63
  # @return [String, nil]
64
64
  optional :domain, String
65
65
 
66
- # @!attribute fonts
67
- # An array of fonts used by the brand's website. NOTE: This is deprecated and will
68
- # be removed in the future. Please migrate to the styleguide API.
66
+ # @!attribute email
67
+ # Company email address
69
68
  #
70
- # @return [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Font>, nil]
71
- optional :fonts,
72
- -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveResponse::Brand::Font] }
69
+ # @return [String, nil]
70
+ optional :email, String
71
+
72
+ # @!attribute is_nsfw
73
+ # Indicates whether the brand content is not safe for work (NSFW)
74
+ #
75
+ # @return [Boolean, nil]
76
+ optional :is_nsfw, BrandDev::Internal::Type::Boolean
73
77
 
74
78
  # @!attribute logos
75
79
  # An array of logos associated with the brand
@@ -78,6 +82,12 @@ module BrandDev
78
82
  optional :logos,
79
83
  -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveResponse::Brand::Logo] }
80
84
 
85
+ # @!attribute phone
86
+ # Company phone number
87
+ #
88
+ # @return [String, nil]
89
+ optional :phone, String
90
+
81
91
  # @!attribute slogan
82
92
  # The brand's slogan
83
93
  #
@@ -104,7 +114,7 @@ module BrandDev
104
114
  # @return [String, nil]
105
115
  optional :title, String
106
116
 
107
- # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, fonts: nil, logos: nil, slogan: nil, socials: nil, stock: nil, title: nil)
117
+ # @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, email: nil, is_nsfw: nil, logos: nil, phone: nil, slogan: nil, socials: nil, stock: nil, title: nil)
108
118
  # Some parameter documentations has been truncated, see
109
119
  # {BrandDev::Models::BrandRetrieveResponse::Brand} for more details.
110
120
  #
@@ -120,10 +130,14 @@ module BrandDev
120
130
  #
121
131
  # @param domain [String] The domain name of the brand
122
132
  #
123
- # @param fonts [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Font>] An array of fonts used by the brand's website. NOTE: This is deprecated and will
133
+ # @param email [String] Company email address
134
+ #
135
+ # @param is_nsfw [Boolean] Indicates whether the brand content is not safe for work (NSFW)
124
136
  #
125
137
  # @param logos [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Logo>] An array of logos associated with the brand
126
138
  #
139
+ # @param phone [String] Company phone number
140
+ #
127
141
  # @param slogan [String] The brand's slogan
128
142
  #
129
143
  # @param socials [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Social>] An array of social media links for the brand
@@ -242,6 +256,12 @@ module BrandDev
242
256
 
243
257
  # @see BrandDev::Models::BrandRetrieveResponse::Brand::Backdrop#resolution
244
258
  class Resolution < BrandDev::Internal::Type::BaseModel
259
+ # @!attribute aspect_ratio
260
+ # Aspect ratio of the image (width/height)
261
+ #
262
+ # @return [Float, nil]
263
+ optional :aspect_ratio, Float
264
+
245
265
  # @!attribute height
246
266
  # Height of the image in pixels
247
267
  #
@@ -254,9 +274,11 @@ module BrandDev
254
274
  # @return [Integer, nil]
255
275
  optional :width, Integer
256
276
 
257
- # @!method initialize(height: nil, width: nil)
277
+ # @!method initialize(aspect_ratio: nil, height: nil, width: nil)
258
278
  # Resolution of the backdrop image
259
279
  #
280
+ # @param aspect_ratio [Float] Aspect ratio of the image (width/height)
281
+ #
260
282
  # @param height [Integer] Height of the image in pixels
261
283
  #
262
284
  # @param width [Integer] Width of the image in pixels
@@ -282,25 +304,6 @@ module BrandDev
282
304
  # @param name [String] Name of the color
283
305
  end
284
306
 
285
- class Font < BrandDev::Internal::Type::BaseModel
286
- # @!attribute name
287
- # Name of the font
288
- #
289
- # @return [String, nil]
290
- optional :name, String
291
-
292
- # @!attribute usage
293
- # Usage of the font, e.g., 'title', 'body', 'button'
294
- #
295
- # @return [String, nil]
296
- optional :usage, String
297
-
298
- # @!method initialize(name: nil, usage: nil)
299
- # @param name [String] Name of the font
300
- #
301
- # @param usage [String] Usage of the font, e.g., 'title', 'body', 'button'
302
- end
303
-
304
307
  class Logo < BrandDev::Internal::Type::BaseModel
305
308
  # @!attribute colors
306
309
  # Array of colors in the logo
@@ -309,17 +312,13 @@ module BrandDev
309
312
  optional :colors,
310
313
  -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Color] }
311
314
 
312
- # @!attribute group
313
- # Group identifier for logos
314
- #
315
- # @return [Integer, nil]
316
- optional :group, Integer
317
-
318
315
  # @!attribute mode
319
- # Mode of the logo, e.g., 'dark', 'light'
316
+ # Indicates when this logo is best used: 'light' = best for light mode, 'dark' =
317
+ # best for dark mode, 'has_opaque_background' = can be used for either as image
318
+ # has its own background
320
319
  #
321
- # @return [String, nil]
322
- optional :mode, String
320
+ # @return [Symbol, BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Mode, nil]
321
+ optional :mode, enum: -> { BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Mode }
323
322
 
324
323
  # @!attribute resolution
325
324
  # Resolution of the logo image
@@ -327,22 +326,31 @@ module BrandDev
327
326
  # @return [BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Resolution, nil]
328
327
  optional :resolution, -> { BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Resolution }
329
328
 
329
+ # @!attribute type
330
+ # Type of the logo based on resolution (e.g., 'icon', 'logo')
331
+ #
332
+ # @return [Symbol, BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Type, nil]
333
+ optional :type, enum: -> { BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Type }
334
+
330
335
  # @!attribute url
331
- # URL of the logo image
336
+ # CDN hosted url of the logo (ready for display)
332
337
  #
333
338
  # @return [String, nil]
334
339
  optional :url, String
335
340
 
336
- # @!method initialize(colors: nil, group: nil, mode: nil, resolution: nil, url: nil)
337
- # @param colors [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Color>] Array of colors in the logo
341
+ # @!method initialize(colors: nil, mode: nil, resolution: nil, type: nil, url: nil)
342
+ # Some parameter documentations has been truncated, see
343
+ # {BrandDev::Models::BrandRetrieveResponse::Brand::Logo} for more details.
338
344
  #
339
- # @param group [Integer] Group identifier for logos
345
+ # @param colors [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Color>] Array of colors in the logo
340
346
  #
341
- # @param mode [String] Mode of the logo, e.g., 'dark', 'light'
347
+ # @param mode [Symbol, BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Mode] Indicates when this logo is best used: 'light' = best for light mode, 'dark' = b
342
348
  #
343
349
  # @param resolution [BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Resolution] Resolution of the logo image
344
350
  #
345
- # @param url [String] URL of the logo image
351
+ # @param type [Symbol, BrandDev::Models::BrandRetrieveResponse::Brand::Logo::Type] Type of the logo based on resolution (e.g., 'icon', 'logo')
352
+ #
353
+ # @param url [String] CDN hosted url of the logo (ready for display)
346
354
 
347
355
  class Color < BrandDev::Internal::Type::BaseModel
348
356
  # @!attribute hex
@@ -363,8 +371,30 @@ module BrandDev
363
371
  # @param name [String] Name of the color
364
372
  end
365
373
 
374
+ # Indicates when this logo is best used: 'light' = best for light mode, 'dark' =
375
+ # best for dark mode, 'has_opaque_background' = can be used for either as image
376
+ # has its own background
377
+ #
378
+ # @see BrandDev::Models::BrandRetrieveResponse::Brand::Logo#mode
379
+ module Mode
380
+ extend BrandDev::Internal::Type::Enum
381
+
382
+ LIGHT = :light
383
+ DARK = :dark
384
+ HAS_OPAQUE_BACKGROUND = :has_opaque_background
385
+
386
+ # @!method self.values
387
+ # @return [Array<Symbol>]
388
+ end
389
+
366
390
  # @see BrandDev::Models::BrandRetrieveResponse::Brand::Logo#resolution
367
391
  class Resolution < BrandDev::Internal::Type::BaseModel
392
+ # @!attribute aspect_ratio
393
+ # Aspect ratio of the image (width/height)
394
+ #
395
+ # @return [Float, nil]
396
+ optional :aspect_ratio, Float
397
+
368
398
  # @!attribute height
369
399
  # Height of the image in pixels
370
400
  #
@@ -377,13 +407,28 @@ module BrandDev
377
407
  # @return [Integer, nil]
378
408
  optional :width, Integer
379
409
 
380
- # @!method initialize(height: nil, width: nil)
410
+ # @!method initialize(aspect_ratio: nil, height: nil, width: nil)
381
411
  # Resolution of the logo image
382
412
  #
413
+ # @param aspect_ratio [Float] Aspect ratio of the image (width/height)
414
+ #
383
415
  # @param height [Integer] Height of the image in pixels
384
416
  #
385
417
  # @param width [Integer] Width of the image in pixels
386
418
  end
419
+
420
+ # Type of the logo based on resolution (e.g., 'icon', 'logo')
421
+ #
422
+ # @see BrandDev::Models::BrandRetrieveResponse::Brand::Logo#type
423
+ module Type
424
+ extend BrandDev::Internal::Type::Enum
425
+
426
+ ICON = :icon
427
+ LOGO = :logo
428
+
429
+ # @!method self.values
430
+ # @return [Array<Symbol>]
431
+ end
387
432
  end
388
433
 
389
434
  class Social < BrandDev::Internal::Type::BaseModel
@@ -182,17 +182,13 @@ module BrandDev
182
182
  optional :colors,
183
183
  -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Color] }
184
184
 
185
- # @!attribute group
186
- # Group identifier for logos
187
- #
188
- # @return [Integer, nil]
189
- optional :group, Integer
190
-
191
185
  # @!attribute mode
192
- # Mode of the logo, e.g., 'dark', 'light'
186
+ # Indicates when this logo is best used: 'light' = best for light mode, 'dark' =
187
+ # best for dark mode, 'has_opaque_background' = can be used for either as image
188
+ # has its own background
193
189
  #
194
- # @return [String, nil]
195
- optional :mode, String
190
+ # @return [Symbol, BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Mode, nil]
191
+ optional :mode, enum: -> { BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Mode }
196
192
 
197
193
  # @!attribute resolution
198
194
  # Resolution of the logo image
@@ -201,29 +197,31 @@ module BrandDev
201
197
  optional :resolution, -> { BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Resolution }
202
198
 
203
199
  # @!attribute type
204
- # Type of the logo based on resolution (e.g., 'icon', 'logo', 'banner')
200
+ # Type of the logo based on resolution (e.g., 'icon', 'logo')
205
201
  #
206
- # @return [String, nil]
207
- optional :type, String
202
+ # @return [Symbol, BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Type, nil]
203
+ optional :type, enum: -> { BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Type }
208
204
 
209
205
  # @!attribute url
210
- # URL of the logo image
206
+ # CDN hosted url of the logo (ready for display)
211
207
  #
212
208
  # @return [String, nil]
213
209
  optional :url, String
214
210
 
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
211
+ # @!method initialize(colors: nil, mode: nil, resolution: nil, type: nil, url: nil)
212
+ # Some parameter documentations has been truncated, see
213
+ # {BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo} for more
214
+ # details.
217
215
  #
218
- # @param group [Integer] Group identifier for logos
216
+ # @param colors [Array<BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Color>] Array of colors in the logo
219
217
  #
220
- # @param mode [String] Mode of the logo, e.g., 'dark', 'light'
218
+ # @param mode [Symbol, BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Mode] Indicates when this logo is best used: 'light' = best for light mode, 'dark' = b
221
219
  #
222
220
  # @param resolution [BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Resolution] Resolution of the logo image
223
221
  #
224
- # @param type [String] Type of the logo based on resolution (e.g., 'icon', 'logo', 'banner')
222
+ # @param type [Symbol, BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Type] Type of the logo based on resolution (e.g., 'icon', 'logo')
225
223
  #
226
- # @param url [String] URL of the logo image
224
+ # @param url [String] CDN hosted url of the logo (ready for display)
227
225
 
228
226
  class Color < BrandDev::Internal::Type::BaseModel
229
227
  # @!attribute hex
@@ -244,6 +242,22 @@ module BrandDev
244
242
  # @param name [String] Name of the color
245
243
  end
246
244
 
245
+ # Indicates when this logo is best used: 'light' = best for light mode, 'dark' =
246
+ # best for dark mode, 'has_opaque_background' = can be used for either as image
247
+ # has its own background
248
+ #
249
+ # @see BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo#mode
250
+ module Mode
251
+ extend BrandDev::Internal::Type::Enum
252
+
253
+ LIGHT = :light
254
+ DARK = :dark
255
+ HAS_OPAQUE_BACKGROUND = :has_opaque_background
256
+
257
+ # @!method self.values
258
+ # @return [Array<Symbol>]
259
+ end
260
+
247
261
  # @see BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo#resolution
248
262
  class Resolution < BrandDev::Internal::Type::BaseModel
249
263
  # @!attribute aspect_ratio
@@ -273,6 +287,19 @@ module BrandDev
273
287
  #
274
288
  # @param width [Integer] Width of the image in pixels
275
289
  end
290
+
291
+ # Type of the logo based on resolution (e.g., 'icon', 'logo')
292
+ #
293
+ # @see BrandDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo#type
294
+ module Type
295
+ extend BrandDev::Internal::Type::Enum
296
+
297
+ ICON = :icon
298
+ LOGO = :logo
299
+
300
+ # @!method self.values
301
+ # @return [Array<Symbol>]
302
+ end
276
303
  end
277
304
  end
278
305
  end
@@ -55,7 +55,5 @@ module BrandDev
55
55
 
56
56
  BrandScreenshotParams = BrandDev::Models::BrandScreenshotParams
57
57
 
58
- BrandSearchParams = BrandDev::Models::BrandSearchParams
59
-
60
58
  BrandStyleguideParams = BrandDev::Models::BrandStyleguideParams
61
59
  end
@@ -237,33 +237,6 @@ module BrandDev
237
237
  )
238
238
  end
239
239
 
240
- # Some parameter documentations has been truncated, see
241
- # {BrandDev::Models::BrandSearchParams} for more details.
242
- #
243
- # Search brands by query
244
- #
245
- # @overload search(query:, timeout_ms: nil, request_options: {})
246
- #
247
- # @param query [String] Query string to search brands
248
- #
249
- # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
250
- #
251
- # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
252
- #
253
- # @return [Array<BrandDev::Models::BrandSearchResponseItem>]
254
- #
255
- # @see BrandDev::Models::BrandSearchParams
256
- def search(params)
257
- parsed, options = BrandDev::BrandSearchParams.dump_request(params)
258
- @client.request(
259
- method: :get,
260
- path: "brand/search",
261
- query: parsed.transform_keys(timeout_ms: "timeoutMS"),
262
- model: BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandSearchResponseItem],
263
- options: options
264
- )
265
- end
266
-
267
240
  # Some parameter documentations has been truncated, see
268
241
  # {BrandDev::Models::BrandStyleguideParams} for more details.
269
242
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrandDev
4
- VERSION = "0.1.0.pre.alpha.13"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/brand_dev.rb CHANGED
@@ -66,8 +66,6 @@ require_relative "brand_dev/models/brand_retrieve_simplified_params"
66
66
  require_relative "brand_dev/models/brand_retrieve_simplified_response"
67
67
  require_relative "brand_dev/models/brand_screenshot_params"
68
68
  require_relative "brand_dev/models/brand_screenshot_response"
69
- require_relative "brand_dev/models/brand_search_params"
70
- require_relative "brand_dev/models/brand_search_response"
71
69
  require_relative "brand_dev/models/brand_styleguide_params"
72
70
  require_relative "brand_dev/models/brand_styleguide_response"
73
71
  require_relative "brand_dev/models"
@@ -38,6 +38,13 @@ module BrandDev
38
38
  sig { params(domain: String).void }
39
39
  attr_writer :domain
40
40
 
41
+ # Status of the response, e.g., 'ok'
42
+ sig { returns(T.nilable(String)) }
43
+ attr_reader :status
44
+
45
+ sig { params(status: String).void }
46
+ attr_writer :status
47
+
41
48
  # List of URLs that were analyzed
42
49
  sig { returns(T.nilable(T::Array[String])) }
43
50
  attr_reader :urls_analyzed
@@ -52,6 +59,7 @@ module BrandDev
52
59
  BrandDev::Models::BrandAIQueryResponse::DataExtracted::OrHash
53
60
  ],
54
61
  domain: String,
62
+ status: String,
55
63
  urls_analyzed: T::Array[String]
56
64
  ).returns(T.attached_class)
57
65
  end
@@ -60,6 +68,8 @@ module BrandDev
60
68
  data_extracted: nil,
61
69
  # The domain that was analyzed
62
70
  domain: nil,
71
+ # Status of the response, e.g., 'ok'
72
+ status: nil,
63
73
  # List of URLs that were analyzed
64
74
  urls_analyzed: nil
65
75
  )
@@ -71,6 +81,7 @@ module BrandDev
71
81
  data_extracted:
72
82
  T::Array[BrandDev::Models::BrandAIQueryResponse::DataExtracted],
73
83
  domain: String,
84
+ status: String,
74
85
  urls_analyzed: T::Array[String]
75
86
  }
76
87
  )