brand.dev 0.1.0 → 0.2.1

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.
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrandDev
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -213,7 +213,7 @@ module BrandDev
213
213
  send_retry_header: T::Boolean
214
214
  ).returns([Integer, Net::HTTPResponse, T::Enumerable[String]])
215
215
  end
216
- private def send_request(
216
+ def send_request(
217
217
  request,
218
218
  redirect_count:,
219
219
  retry_count:,
@@ -11,13 +11,6 @@ module BrandDev
11
11
  )
12
12
  end
13
13
 
14
- # HTTP status code
15
- sig { returns(T.nilable(Integer)) }
16
- attr_reader :code
17
-
18
- sig { params(code: Integer).void }
19
- attr_writer :code
20
-
21
14
  # Array of extracted data points
22
15
  sig do
23
16
  returns(
@@ -61,7 +54,6 @@ module BrandDev
61
54
 
62
55
  sig do
63
56
  params(
64
- code: Integer,
65
57
  data_extracted:
66
58
  T::Array[
67
59
  BrandDev::Models::BrandAIQueryResponse::DataExtracted::OrHash
@@ -72,8 +64,6 @@ module BrandDev
72
64
  ).returns(T.attached_class)
73
65
  end
74
66
  def self.new(
75
- # HTTP status code
76
- code: nil,
77
67
  # Array of extracted data points
78
68
  data_extracted: nil,
79
69
  # The domain that was analyzed
@@ -88,7 +78,6 @@ module BrandDev
88
78
  sig do
89
79
  override.returns(
90
80
  {
91
- code: Integer,
92
81
  data_extracted:
93
82
  T::Array[BrandDev::Models::BrandAIQueryResponse::DataExtracted],
94
83
  domain: String,
@@ -159,6 +159,13 @@ module BrandDev
159
159
  sig { params(domain: String).void }
160
160
  attr_writer :domain
161
161
 
162
+ # Company email address
163
+ sig { returns(T.nilable(String)) }
164
+ attr_reader :email
165
+
166
+ sig { params(email: String).void }
167
+ attr_writer :email
168
+
162
169
  # Indicates whether the brand content is not safe for work (NSFW)
163
170
  sig { returns(T.nilable(T::Boolean)) }
164
171
  attr_reader :is_nsfw
@@ -188,6 +195,13 @@ module BrandDev
188
195
  end
189
196
  attr_writer :logos
190
197
 
198
+ # Company phone number
199
+ sig { returns(T.nilable(String)) }
200
+ attr_reader :phone
201
+
202
+ sig { params(phone: String).void }
203
+ attr_writer :phone
204
+
191
205
  # The brand's slogan
192
206
  sig { returns(T.nilable(String)) }
193
207
  attr_reader :slogan
@@ -258,11 +272,13 @@ module BrandDev
258
272
  ],
259
273
  description: String,
260
274
  domain: String,
275
+ email: String,
261
276
  is_nsfw: T::Boolean,
262
277
  logos:
263
278
  T::Array[
264
279
  BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::OrHash
265
280
  ],
281
+ phone: String,
266
282
  slogan: String,
267
283
  socials:
268
284
  T::Array[
@@ -284,10 +300,14 @@ module BrandDev
284
300
  description: nil,
285
301
  # The domain name of the brand
286
302
  domain: nil,
303
+ # Company email address
304
+ email: nil,
287
305
  # Indicates whether the brand content is not safe for work (NSFW)
288
306
  is_nsfw: nil,
289
307
  # An array of logos associated with the brand
290
308
  logos: nil,
309
+ # Company phone number
310
+ phone: nil,
291
311
  # The brand's slogan
292
312
  slogan: nil,
293
313
  # An array of social media links for the brand
@@ -315,11 +335,13 @@ module BrandDev
315
335
  ],
316
336
  description: String,
317
337
  domain: String,
338
+ email: String,
318
339
  is_nsfw: T::Boolean,
319
340
  logos:
320
341
  T::Array[
321
342
  BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo
322
343
  ],
344
+ phone: String,
323
345
  slogan: String,
324
346
  socials:
325
347
  T::Array[
@@ -578,6 +600,13 @@ module BrandDev
578
600
  )
579
601
  end
580
602
 
603
+ # Aspect ratio of the image (width/height)
604
+ sig { returns(T.nilable(Float)) }
605
+ attr_reader :aspect_ratio
606
+
607
+ sig { params(aspect_ratio: Float).void }
608
+ attr_writer :aspect_ratio
609
+
581
610
  # Height of the image in pixels
582
611
  sig { returns(T.nilable(Integer)) }
583
612
  attr_reader :height
@@ -594,9 +623,15 @@ module BrandDev
594
623
 
595
624
  # Resolution of the backdrop image
596
625
  sig do
597
- params(height: Integer, width: Integer).returns(T.attached_class)
626
+ params(
627
+ aspect_ratio: Float,
628
+ height: Integer,
629
+ width: Integer
630
+ ).returns(T.attached_class)
598
631
  end
599
632
  def self.new(
633
+ # Aspect ratio of the image (width/height)
634
+ aspect_ratio: nil,
600
635
  # Height of the image in pixels
601
636
  height: nil,
602
637
  # Width of the image in pixels
@@ -604,7 +639,11 @@ module BrandDev
604
639
  )
605
640
  end
606
641
 
607
- sig { override.returns({ height: Integer, width: Integer }) }
642
+ sig do
643
+ override.returns(
644
+ { aspect_ratio: Float, height: Integer, width: Integer }
645
+ )
646
+ end
608
647
  def to_hash
609
648
  end
610
649
  end
@@ -678,18 +717,24 @@ module BrandDev
678
717
  end
679
718
  attr_writer :colors
680
719
 
681
- # Group identifier for logos
682
- sig { returns(T.nilable(Integer)) }
683
- attr_reader :group
684
-
685
- sig { params(group: Integer).void }
686
- attr_writer :group
687
-
688
- # Mode of the logo, e.g., 'dark', 'light'
689
- sig { returns(T.nilable(String)) }
720
+ # Indicates when this logo is best used: 'light' = best for light mode, 'dark' =
721
+ # best for dark mode, 'has_opaque_background' = can be used for either as image
722
+ # has its own background
723
+ sig do
724
+ returns(
725
+ T.nilable(
726
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Mode::TaggedSymbol
727
+ )
728
+ )
729
+ end
690
730
  attr_reader :mode
691
731
 
692
- sig { params(mode: String).void }
732
+ sig do
733
+ params(
734
+ mode:
735
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Mode::OrSymbol
736
+ ).void
737
+ end
693
738
  attr_writer :mode
694
739
 
695
740
  # Resolution of the logo image
@@ -710,7 +755,25 @@ module BrandDev
710
755
  end
711
756
  attr_writer :resolution
712
757
 
713
- # URL of the logo image
758
+ # Type of the logo based on resolution (e.g., 'icon', 'logo')
759
+ sig do
760
+ returns(
761
+ T.nilable(
762
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Type::TaggedSymbol
763
+ )
764
+ )
765
+ end
766
+ attr_reader :type
767
+
768
+ sig do
769
+ params(
770
+ type:
771
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Type::OrSymbol
772
+ ).void
773
+ end
774
+ attr_writer :type
775
+
776
+ # CDN hosted url of the logo (ready for display)
714
777
  sig { returns(T.nilable(String)) }
715
778
  attr_reader :url
716
779
 
@@ -723,23 +786,27 @@ module BrandDev
723
786
  T::Array[
724
787
  BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Color::OrHash
725
788
  ],
726
- group: Integer,
727
- mode: String,
789
+ mode:
790
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Mode::OrSymbol,
728
791
  resolution:
729
792
  BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Resolution::OrHash,
793
+ type:
794
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Type::OrSymbol,
730
795
  url: String
731
796
  ).returns(T.attached_class)
732
797
  end
733
798
  def self.new(
734
799
  # Array of colors in the logo
735
800
  colors: nil,
736
- # Group identifier for logos
737
- group: nil,
738
- # Mode of the logo, e.g., 'dark', 'light'
801
+ # Indicates when this logo is best used: 'light' = best for light mode, 'dark' =
802
+ # best for dark mode, 'has_opaque_background' = can be used for either as image
803
+ # has its own background
739
804
  mode: nil,
740
805
  # Resolution of the logo image
741
806
  resolution: nil,
742
- # URL of the logo image
807
+ # Type of the logo based on resolution (e.g., 'icon', 'logo')
808
+ type: nil,
809
+ # CDN hosted url of the logo (ready for display)
743
810
  url: nil
744
811
  )
745
812
  end
@@ -751,10 +818,12 @@ module BrandDev
751
818
  T::Array[
752
819
  BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Color
753
820
  ],
754
- group: Integer,
755
- mode: String,
821
+ mode:
822
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Mode::TaggedSymbol,
756
823
  resolution:
757
824
  BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Resolution,
825
+ type:
826
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Type::TaggedSymbol,
758
827
  url: String
759
828
  }
760
829
  )
@@ -799,6 +868,48 @@ module BrandDev
799
868
  end
800
869
  end
801
870
 
871
+ # Indicates when this logo is best used: 'light' = best for light mode, 'dark' =
872
+ # best for dark mode, 'has_opaque_background' = can be used for either as image
873
+ # has its own background
874
+ module Mode
875
+ extend BrandDev::Internal::Type::Enum
876
+
877
+ TaggedSymbol =
878
+ T.type_alias do
879
+ T.all(
880
+ Symbol,
881
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Mode
882
+ )
883
+ end
884
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
885
+
886
+ LIGHT =
887
+ T.let(
888
+ :light,
889
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Mode::TaggedSymbol
890
+ )
891
+ DARK =
892
+ T.let(
893
+ :dark,
894
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Mode::TaggedSymbol
895
+ )
896
+ HAS_OPAQUE_BACKGROUND =
897
+ T.let(
898
+ :has_opaque_background,
899
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Mode::TaggedSymbol
900
+ )
901
+
902
+ sig do
903
+ override.returns(
904
+ T::Array[
905
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Mode::TaggedSymbol
906
+ ]
907
+ )
908
+ end
909
+ def self.values
910
+ end
911
+ end
912
+
802
913
  class Resolution < BrandDev::Internal::Type::BaseModel
803
914
  OrHash =
804
915
  T.type_alias do
@@ -808,6 +919,13 @@ module BrandDev
808
919
  )
809
920
  end
810
921
 
922
+ # Aspect ratio of the image (width/height)
923
+ sig { returns(T.nilable(Float)) }
924
+ attr_reader :aspect_ratio
925
+
926
+ sig { params(aspect_ratio: Float).void }
927
+ attr_writer :aspect_ratio
928
+
811
929
  # Height of the image in pixels
812
930
  sig { returns(T.nilable(Integer)) }
813
931
  attr_reader :height
@@ -824,9 +942,15 @@ module BrandDev
824
942
 
825
943
  # Resolution of the logo image
826
944
  sig do
827
- params(height: Integer, width: Integer).returns(T.attached_class)
945
+ params(
946
+ aspect_ratio: Float,
947
+ height: Integer,
948
+ width: Integer
949
+ ).returns(T.attached_class)
828
950
  end
829
951
  def self.new(
952
+ # Aspect ratio of the image (width/height)
953
+ aspect_ratio: nil,
830
954
  # Height of the image in pixels
831
955
  height: nil,
832
956
  # Width of the image in pixels
@@ -834,10 +958,49 @@ module BrandDev
834
958
  )
835
959
  end
836
960
 
837
- sig { override.returns({ height: Integer, width: Integer }) }
961
+ sig do
962
+ override.returns(
963
+ { aspect_ratio: Float, height: Integer, width: Integer }
964
+ )
965
+ end
838
966
  def to_hash
839
967
  end
840
968
  end
969
+
970
+ # Type of the logo based on resolution (e.g., 'icon', 'logo')
971
+ module Type
972
+ extend BrandDev::Internal::Type::Enum
973
+
974
+ TaggedSymbol =
975
+ T.type_alias do
976
+ T.all(
977
+ Symbol,
978
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Type
979
+ )
980
+ end
981
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
982
+
983
+ ICON =
984
+ T.let(
985
+ :icon,
986
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Type::TaggedSymbol
987
+ )
988
+ LOGO =
989
+ T.let(
990
+ :logo,
991
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Type::TaggedSymbol
992
+ )
993
+
994
+ sig do
995
+ override.returns(
996
+ T::Array[
997
+ BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::Type::TaggedSymbol
998
+ ]
999
+ )
1000
+ end
1001
+ def self.values
1002
+ end
1003
+ end
841
1004
  end
842
1005
 
843
1006
  class Social < BrandDev::Internal::Type::BaseModel