brand.dev 0.14.0 → 0.15.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 +8 -0
- data/README.md +1 -1
- data/lib/brand_dev/models/brand_fonts_params.rb +36 -0
- data/lib/brand_dev/models/brand_fonts_response.rb +100 -0
- data/lib/brand_dev/models.rb +2 -0
- data/lib/brand_dev/resources/brand.rb +28 -0
- data/lib/brand_dev/version.rb +1 -1
- data/lib/brand_dev.rb +2 -0
- data/rbi/brand_dev/models/brand_fonts_params.rbi +60 -0
- data/rbi/brand_dev/models/brand_fonts_response.rbi +147 -0
- data/rbi/brand_dev/models.rbi +2 -0
- data/rbi/brand_dev/resources/brand.rbi +21 -0
- data/sig/brand_dev/models/brand_fonts_params.rbs +30 -0
- data/sig/brand_dev/models/brand_fonts_response.rbs +82 -0
- data/sig/brand_dev/models.rbs +2 -0
- data/sig/brand_dev/resources/brand.rbs +6 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3f9ebb12f9033819d1b196df0a48f03924e87fc84ae9cd67d60b834285d58298
|
|
4
|
+
data.tar.gz: 68aa38b428a97dc6feb04978eda77b985fe10dd2ad2c9eb90d253e8ab51ffb5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c4e90eac0c02156ab50c09d4954044c26b3732e4c6176e0e7d3b62e8287963d728f200b8bc37b6b6de7c1254b10178c6855624663a252c1663ca375341ba20a1
|
|
7
|
+
data.tar.gz: 1982d5065604c5eba9dcc4e9de75bbecb7ed3b0436d671ab2132ac2fac751a589db33831391077664166e84bd84ca1273e1f0c0a075c34311341387768e0a45e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.15.0 (2025-11-29)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.14.0...v0.15.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.14.0...v0.15.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([1586ca9](https://github.com/brand-dot-dev/ruby-sdk/commit/1586ca9407bc0c7821563fb93b640c1e7308528d))
|
|
10
|
+
|
|
3
11
|
## 0.14.0 (2025-11-24)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.13.0...v0.14.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.13.0...v0.14.0)
|
data/README.md
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module BrandDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see BrandDev::Resources::Brand#fonts
|
|
6
|
+
class BrandFontsParams < 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 fonts 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::BrandFontsParams} for more details.
|
|
28
|
+
#
|
|
29
|
+
# @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai
|
|
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
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module BrandDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see BrandDev::Resources::Brand#fonts
|
|
6
|
+
class BrandFontsResponse < BrandDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute code
|
|
8
|
+
# HTTP status code, e.g., 200
|
|
9
|
+
#
|
|
10
|
+
# @return [Integer]
|
|
11
|
+
required :code, Integer
|
|
12
|
+
|
|
13
|
+
# @!attribute domain
|
|
14
|
+
# The normalized domain that was processed
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :domain, String
|
|
18
|
+
|
|
19
|
+
# @!attribute fonts
|
|
20
|
+
# Array of font usage information
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<BrandDev::Models::BrandFontsResponse::Font>]
|
|
23
|
+
required :fonts, -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandFontsResponse::Font] }
|
|
24
|
+
|
|
25
|
+
# @!attribute status
|
|
26
|
+
# Status of the response, e.g., 'ok'
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :status, String
|
|
30
|
+
|
|
31
|
+
# @!method initialize(code:, domain:, fonts:, status:)
|
|
32
|
+
# @param code [Integer] HTTP status code, e.g., 200
|
|
33
|
+
#
|
|
34
|
+
# @param domain [String] The normalized domain that was processed
|
|
35
|
+
#
|
|
36
|
+
# @param fonts [Array<BrandDev::Models::BrandFontsResponse::Font>] Array of font usage information
|
|
37
|
+
#
|
|
38
|
+
# @param status [String] Status of the response, e.g., 'ok'
|
|
39
|
+
|
|
40
|
+
class Font < BrandDev::Internal::Type::BaseModel
|
|
41
|
+
# @!attribute fallbacks
|
|
42
|
+
# Array of fallback font families
|
|
43
|
+
#
|
|
44
|
+
# @return [Array<String>]
|
|
45
|
+
required :fallbacks, BrandDev::Internal::Type::ArrayOf[String]
|
|
46
|
+
|
|
47
|
+
# @!attribute font
|
|
48
|
+
# Font family name
|
|
49
|
+
#
|
|
50
|
+
# @return [String]
|
|
51
|
+
required :font, String
|
|
52
|
+
|
|
53
|
+
# @!attribute num_elements
|
|
54
|
+
# Number of elements using this font
|
|
55
|
+
#
|
|
56
|
+
# @return [Float]
|
|
57
|
+
required :num_elements, Float
|
|
58
|
+
|
|
59
|
+
# @!attribute num_words
|
|
60
|
+
# Number of words using this font
|
|
61
|
+
#
|
|
62
|
+
# @return [Float]
|
|
63
|
+
required :num_words, Float
|
|
64
|
+
|
|
65
|
+
# @!attribute percent_elements
|
|
66
|
+
# Percentage of elements using this font
|
|
67
|
+
#
|
|
68
|
+
# @return [Float]
|
|
69
|
+
required :percent_elements, Float
|
|
70
|
+
|
|
71
|
+
# @!attribute percent_words
|
|
72
|
+
# Percentage of words using this font
|
|
73
|
+
#
|
|
74
|
+
# @return [Float]
|
|
75
|
+
required :percent_words, Float
|
|
76
|
+
|
|
77
|
+
# @!attribute uses
|
|
78
|
+
# Array of CSS selectors or element types where this font is used
|
|
79
|
+
#
|
|
80
|
+
# @return [Array<String>]
|
|
81
|
+
required :uses, BrandDev::Internal::Type::ArrayOf[String]
|
|
82
|
+
|
|
83
|
+
# @!method initialize(fallbacks:, font:, num_elements:, num_words:, percent_elements:, percent_words:, uses:)
|
|
84
|
+
# @param fallbacks [Array<String>] Array of fallback font families
|
|
85
|
+
#
|
|
86
|
+
# @param font [String] Font family name
|
|
87
|
+
#
|
|
88
|
+
# @param num_elements [Float] Number of elements using this font
|
|
89
|
+
#
|
|
90
|
+
# @param num_words [Float] Number of words using this font
|
|
91
|
+
#
|
|
92
|
+
# @param percent_elements [Float] Percentage of elements using this font
|
|
93
|
+
#
|
|
94
|
+
# @param percent_words [Float] Percentage of words using this font
|
|
95
|
+
#
|
|
96
|
+
# @param uses [Array<String>] Array of CSS selectors or element types where this font is used
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
data/lib/brand_dev/models.rb
CHANGED
|
@@ -41,6 +41,8 @@ module BrandDev
|
|
|
41
41
|
|
|
42
42
|
BrandAIQueryParams = BrandDev::Models::BrandAIQueryParams
|
|
43
43
|
|
|
44
|
+
BrandFontsParams = BrandDev::Models::BrandFontsParams
|
|
45
|
+
|
|
44
46
|
BrandIdentifyFromTransactionParams = BrandDev::Models::BrandIdentifyFromTransactionParams
|
|
45
47
|
|
|
46
48
|
BrandPrefetchParams = BrandDev::Models::BrandPrefetchParams
|
|
@@ -68,6 +68,34 @@ module BrandDev
|
|
|
68
68
|
)
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
+
# Some parameter documentations has been truncated, see
|
|
72
|
+
# {BrandDev::Models::BrandFontsParams} for more details.
|
|
73
|
+
#
|
|
74
|
+
# Beta feature: Extract font information from a brand's website including font
|
|
75
|
+
# families, usage statistics, fallbacks, and element/word counts.
|
|
76
|
+
#
|
|
77
|
+
# @overload fonts(domain:, timeout_ms: nil, request_options: {})
|
|
78
|
+
#
|
|
79
|
+
# @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai
|
|
80
|
+
#
|
|
81
|
+
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
82
|
+
#
|
|
83
|
+
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
84
|
+
#
|
|
85
|
+
# @return [BrandDev::Models::BrandFontsResponse]
|
|
86
|
+
#
|
|
87
|
+
# @see BrandDev::Models::BrandFontsParams
|
|
88
|
+
def fonts(params)
|
|
89
|
+
parsed, options = BrandDev::BrandFontsParams.dump_request(params)
|
|
90
|
+
@client.request(
|
|
91
|
+
method: :get,
|
|
92
|
+
path: "brand/fonts",
|
|
93
|
+
query: parsed.transform_keys(timeout_ms: "timeoutMS"),
|
|
94
|
+
model: BrandDev::Models::BrandFontsResponse,
|
|
95
|
+
options: options
|
|
96
|
+
)
|
|
97
|
+
end
|
|
98
|
+
|
|
71
99
|
# Some parameter documentations has been truncated, see
|
|
72
100
|
# {BrandDev::Models::BrandIdentifyFromTransactionParams} for more details.
|
|
73
101
|
#
|
data/lib/brand_dev/version.rb
CHANGED
data/lib/brand_dev.rb
CHANGED
|
@@ -54,6 +54,8 @@ require_relative "brand_dev/internal/transport/pooled_net_requester"
|
|
|
54
54
|
require_relative "brand_dev/client"
|
|
55
55
|
require_relative "brand_dev/models/brand_ai_query_params"
|
|
56
56
|
require_relative "brand_dev/models/brand_ai_query_response"
|
|
57
|
+
require_relative "brand_dev/models/brand_fonts_params"
|
|
58
|
+
require_relative "brand_dev/models/brand_fonts_response"
|
|
57
59
|
require_relative "brand_dev/models/brand_identify_from_transaction_params"
|
|
58
60
|
require_relative "brand_dev/models/brand_identify_from_transaction_response"
|
|
59
61
|
require_relative "brand_dev/models/brand_prefetch_params"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module BrandDev
|
|
4
|
+
module Models
|
|
5
|
+
class BrandFontsParams < 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::BrandFontsParams, BrandDev::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
|
|
15
|
+
# domain will be automatically normalized and validated.
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :domain
|
|
18
|
+
|
|
19
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
20
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
21
|
+
# value is 300000ms (5 minutes).
|
|
22
|
+
sig { returns(T.nilable(Integer)) }
|
|
23
|
+
attr_reader :timeout_ms
|
|
24
|
+
|
|
25
|
+
sig { params(timeout_ms: Integer).void }
|
|
26
|
+
attr_writer :timeout_ms
|
|
27
|
+
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
domain: String,
|
|
31
|
+
timeout_ms: Integer,
|
|
32
|
+
request_options: BrandDev::RequestOptions::OrHash
|
|
33
|
+
).returns(T.attached_class)
|
|
34
|
+
end
|
|
35
|
+
def self.new(
|
|
36
|
+
# Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
|
|
37
|
+
# domain will be automatically normalized and validated.
|
|
38
|
+
domain:,
|
|
39
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
40
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
41
|
+
# value is 300000ms (5 minutes).
|
|
42
|
+
timeout_ms: nil,
|
|
43
|
+
request_options: {}
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
sig do
|
|
48
|
+
override.returns(
|
|
49
|
+
{
|
|
50
|
+
domain: String,
|
|
51
|
+
timeout_ms: Integer,
|
|
52
|
+
request_options: BrandDev::RequestOptions
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
def to_hash
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module BrandDev
|
|
4
|
+
module Models
|
|
5
|
+
class BrandFontsResponse < BrandDev::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
BrandDev::Models::BrandFontsResponse,
|
|
10
|
+
BrandDev::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# HTTP status code, e.g., 200
|
|
15
|
+
sig { returns(Integer) }
|
|
16
|
+
attr_accessor :code
|
|
17
|
+
|
|
18
|
+
# The normalized domain that was processed
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :domain
|
|
21
|
+
|
|
22
|
+
# Array of font usage information
|
|
23
|
+
sig { returns(T::Array[BrandDev::Models::BrandFontsResponse::Font]) }
|
|
24
|
+
attr_accessor :fonts
|
|
25
|
+
|
|
26
|
+
# Status of the response, e.g., 'ok'
|
|
27
|
+
sig { returns(String) }
|
|
28
|
+
attr_accessor :status
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
code: Integer,
|
|
33
|
+
domain: String,
|
|
34
|
+
fonts: T::Array[BrandDev::Models::BrandFontsResponse::Font::OrHash],
|
|
35
|
+
status: String
|
|
36
|
+
).returns(T.attached_class)
|
|
37
|
+
end
|
|
38
|
+
def self.new(
|
|
39
|
+
# HTTP status code, e.g., 200
|
|
40
|
+
code:,
|
|
41
|
+
# The normalized domain that was processed
|
|
42
|
+
domain:,
|
|
43
|
+
# Array of font usage information
|
|
44
|
+
fonts:,
|
|
45
|
+
# Status of the response, e.g., 'ok'
|
|
46
|
+
status:
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
override.returns(
|
|
52
|
+
{
|
|
53
|
+
code: Integer,
|
|
54
|
+
domain: String,
|
|
55
|
+
fonts: T::Array[BrandDev::Models::BrandFontsResponse::Font],
|
|
56
|
+
status: String
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
def to_hash
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
class Font < BrandDev::Internal::Type::BaseModel
|
|
64
|
+
OrHash =
|
|
65
|
+
T.type_alias do
|
|
66
|
+
T.any(
|
|
67
|
+
BrandDev::Models::BrandFontsResponse::Font,
|
|
68
|
+
BrandDev::Internal::AnyHash
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Array of fallback font families
|
|
73
|
+
sig { returns(T::Array[String]) }
|
|
74
|
+
attr_accessor :fallbacks
|
|
75
|
+
|
|
76
|
+
# Font family name
|
|
77
|
+
sig { returns(String) }
|
|
78
|
+
attr_accessor :font
|
|
79
|
+
|
|
80
|
+
# Number of elements using this font
|
|
81
|
+
sig { returns(Float) }
|
|
82
|
+
attr_accessor :num_elements
|
|
83
|
+
|
|
84
|
+
# Number of words using this font
|
|
85
|
+
sig { returns(Float) }
|
|
86
|
+
attr_accessor :num_words
|
|
87
|
+
|
|
88
|
+
# Percentage of elements using this font
|
|
89
|
+
sig { returns(Float) }
|
|
90
|
+
attr_accessor :percent_elements
|
|
91
|
+
|
|
92
|
+
# Percentage of words using this font
|
|
93
|
+
sig { returns(Float) }
|
|
94
|
+
attr_accessor :percent_words
|
|
95
|
+
|
|
96
|
+
# Array of CSS selectors or element types where this font is used
|
|
97
|
+
sig { returns(T::Array[String]) }
|
|
98
|
+
attr_accessor :uses
|
|
99
|
+
|
|
100
|
+
sig do
|
|
101
|
+
params(
|
|
102
|
+
fallbacks: T::Array[String],
|
|
103
|
+
font: String,
|
|
104
|
+
num_elements: Float,
|
|
105
|
+
num_words: Float,
|
|
106
|
+
percent_elements: Float,
|
|
107
|
+
percent_words: Float,
|
|
108
|
+
uses: T::Array[String]
|
|
109
|
+
).returns(T.attached_class)
|
|
110
|
+
end
|
|
111
|
+
def self.new(
|
|
112
|
+
# Array of fallback font families
|
|
113
|
+
fallbacks:,
|
|
114
|
+
# Font family name
|
|
115
|
+
font:,
|
|
116
|
+
# Number of elements using this font
|
|
117
|
+
num_elements:,
|
|
118
|
+
# Number of words using this font
|
|
119
|
+
num_words:,
|
|
120
|
+
# Percentage of elements using this font
|
|
121
|
+
percent_elements:,
|
|
122
|
+
# Percentage of words using this font
|
|
123
|
+
percent_words:,
|
|
124
|
+
# Array of CSS selectors or element types where this font is used
|
|
125
|
+
uses:
|
|
126
|
+
)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
sig do
|
|
130
|
+
override.returns(
|
|
131
|
+
{
|
|
132
|
+
fallbacks: T::Array[String],
|
|
133
|
+
font: String,
|
|
134
|
+
num_elements: Float,
|
|
135
|
+
num_words: Float,
|
|
136
|
+
percent_elements: Float,
|
|
137
|
+
percent_words: Float,
|
|
138
|
+
uses: T::Array[String]
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
def to_hash
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
end
|
data/rbi/brand_dev/models.rbi
CHANGED
|
@@ -62,6 +62,27 @@ module BrandDev
|
|
|
62
62
|
)
|
|
63
63
|
end
|
|
64
64
|
|
|
65
|
+
# Beta feature: Extract font information from a brand's website including font
|
|
66
|
+
# families, usage statistics, fallbacks, and element/word counts.
|
|
67
|
+
sig do
|
|
68
|
+
params(
|
|
69
|
+
domain: String,
|
|
70
|
+
timeout_ms: Integer,
|
|
71
|
+
request_options: BrandDev::RequestOptions::OrHash
|
|
72
|
+
).returns(BrandDev::Models::BrandFontsResponse)
|
|
73
|
+
end
|
|
74
|
+
def fonts(
|
|
75
|
+
# Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
|
|
76
|
+
# domain will be automatically normalized and validated.
|
|
77
|
+
domain:,
|
|
78
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
79
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
80
|
+
# value is 300000ms (5 minutes).
|
|
81
|
+
timeout_ms: nil,
|
|
82
|
+
request_options: {}
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
|
|
65
86
|
# Endpoint specially designed for platforms that want to identify transaction data
|
|
66
87
|
# by the transaction title.
|
|
67
88
|
sig do
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module BrandDev
|
|
2
|
+
module Models
|
|
3
|
+
type brand_fonts_params =
|
|
4
|
+
{ domain: String, timeout_ms: Integer }
|
|
5
|
+
& BrandDev::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class BrandFontsParams < BrandDev::Internal::Type::BaseModel
|
|
8
|
+
extend BrandDev::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include BrandDev::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor domain: String
|
|
12
|
+
|
|
13
|
+
attr_reader timeout_ms: Integer?
|
|
14
|
+
|
|
15
|
+
def timeout_ms=: (Integer) -> Integer
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
domain: String,
|
|
19
|
+
?timeout_ms: Integer,
|
|
20
|
+
?request_options: BrandDev::request_opts
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
domain: String,
|
|
25
|
+
timeout_ms: Integer,
|
|
26
|
+
request_options: BrandDev::RequestOptions
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
module BrandDev
|
|
2
|
+
module Models
|
|
3
|
+
type brand_fonts_response =
|
|
4
|
+
{
|
|
5
|
+
code: Integer,
|
|
6
|
+
domain: String,
|
|
7
|
+
fonts: ::Array[BrandDev::Models::BrandFontsResponse::Font],
|
|
8
|
+
status: String
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class BrandFontsResponse < BrandDev::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor code: Integer
|
|
13
|
+
|
|
14
|
+
attr_accessor domain: String
|
|
15
|
+
|
|
16
|
+
attr_accessor fonts: ::Array[BrandDev::Models::BrandFontsResponse::Font]
|
|
17
|
+
|
|
18
|
+
attr_accessor status: String
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
code: Integer,
|
|
22
|
+
domain: String,
|
|
23
|
+
fonts: ::Array[BrandDev::Models::BrandFontsResponse::Font],
|
|
24
|
+
status: String
|
|
25
|
+
) -> void
|
|
26
|
+
|
|
27
|
+
def to_hash: -> {
|
|
28
|
+
code: Integer,
|
|
29
|
+
domain: String,
|
|
30
|
+
fonts: ::Array[BrandDev::Models::BrandFontsResponse::Font],
|
|
31
|
+
status: String
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type font =
|
|
35
|
+
{
|
|
36
|
+
fallbacks: ::Array[String],
|
|
37
|
+
font: String,
|
|
38
|
+
num_elements: Float,
|
|
39
|
+
num_words: Float,
|
|
40
|
+
percent_elements: Float,
|
|
41
|
+
percent_words: Float,
|
|
42
|
+
uses: ::Array[String]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
class Font < BrandDev::Internal::Type::BaseModel
|
|
46
|
+
attr_accessor fallbacks: ::Array[String]
|
|
47
|
+
|
|
48
|
+
attr_accessor font: String
|
|
49
|
+
|
|
50
|
+
attr_accessor num_elements: Float
|
|
51
|
+
|
|
52
|
+
attr_accessor num_words: Float
|
|
53
|
+
|
|
54
|
+
attr_accessor percent_elements: Float
|
|
55
|
+
|
|
56
|
+
attr_accessor percent_words: Float
|
|
57
|
+
|
|
58
|
+
attr_accessor uses: ::Array[String]
|
|
59
|
+
|
|
60
|
+
def initialize: (
|
|
61
|
+
fallbacks: ::Array[String],
|
|
62
|
+
font: String,
|
|
63
|
+
num_elements: Float,
|
|
64
|
+
num_words: Float,
|
|
65
|
+
percent_elements: Float,
|
|
66
|
+
percent_words: Float,
|
|
67
|
+
uses: ::Array[String]
|
|
68
|
+
) -> void
|
|
69
|
+
|
|
70
|
+
def to_hash: -> {
|
|
71
|
+
fallbacks: ::Array[String],
|
|
72
|
+
font: String,
|
|
73
|
+
num_elements: Float,
|
|
74
|
+
num_words: Float,
|
|
75
|
+
percent_elements: Float,
|
|
76
|
+
percent_words: Float,
|
|
77
|
+
uses: ::Array[String]
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
data/sig/brand_dev/models.rbs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
module BrandDev
|
|
2
2
|
class BrandAIQueryParams = BrandDev::Models::BrandAIQueryParams
|
|
3
3
|
|
|
4
|
+
class BrandFontsParams = BrandDev::Models::BrandFontsParams
|
|
5
|
+
|
|
4
6
|
class BrandIdentifyFromTransactionParams = BrandDev::Models::BrandIdentifyFromTransactionParams
|
|
5
7
|
|
|
6
8
|
class BrandPrefetchParams = BrandDev::Models::BrandPrefetchParams
|
|
@@ -17,6 +17,12 @@ module BrandDev
|
|
|
17
17
|
?request_options: BrandDev::request_opts
|
|
18
18
|
) -> BrandDev::Models::BrandAIQueryResponse
|
|
19
19
|
|
|
20
|
+
def fonts: (
|
|
21
|
+
domain: String,
|
|
22
|
+
?timeout_ms: Integer,
|
|
23
|
+
?request_options: BrandDev::request_opts
|
|
24
|
+
) -> BrandDev::Models::BrandFontsResponse
|
|
25
|
+
|
|
20
26
|
def identify_from_transaction: (
|
|
21
27
|
transaction_info: String,
|
|
22
28
|
?city: String,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: brand.dev
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brand Dev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: connection_pool
|
|
@@ -56,6 +56,8 @@ files:
|
|
|
56
56
|
- lib/brand_dev/models.rb
|
|
57
57
|
- lib/brand_dev/models/brand_ai_query_params.rb
|
|
58
58
|
- lib/brand_dev/models/brand_ai_query_response.rb
|
|
59
|
+
- lib/brand_dev/models/brand_fonts_params.rb
|
|
60
|
+
- lib/brand_dev/models/brand_fonts_response.rb
|
|
59
61
|
- lib/brand_dev/models/brand_identify_from_transaction_params.rb
|
|
60
62
|
- lib/brand_dev/models/brand_identify_from_transaction_response.rb
|
|
61
63
|
- lib/brand_dev/models/brand_prefetch_params.rb
|
|
@@ -103,6 +105,8 @@ files:
|
|
|
103
105
|
- rbi/brand_dev/models.rbi
|
|
104
106
|
- rbi/brand_dev/models/brand_ai_query_params.rbi
|
|
105
107
|
- rbi/brand_dev/models/brand_ai_query_response.rbi
|
|
108
|
+
- rbi/brand_dev/models/brand_fonts_params.rbi
|
|
109
|
+
- rbi/brand_dev/models/brand_fonts_response.rbi
|
|
106
110
|
- rbi/brand_dev/models/brand_identify_from_transaction_params.rbi
|
|
107
111
|
- rbi/brand_dev/models/brand_identify_from_transaction_response.rbi
|
|
108
112
|
- rbi/brand_dev/models/brand_prefetch_params.rbi
|
|
@@ -149,6 +153,8 @@ files:
|
|
|
149
153
|
- sig/brand_dev/models.rbs
|
|
150
154
|
- sig/brand_dev/models/brand_ai_query_params.rbs
|
|
151
155
|
- sig/brand_dev/models/brand_ai_query_response.rbs
|
|
156
|
+
- sig/brand_dev/models/brand_fonts_params.rbs
|
|
157
|
+
- sig/brand_dev/models/brand_fonts_response.rbs
|
|
152
158
|
- sig/brand_dev/models/brand_identify_from_transaction_params.rbs
|
|
153
159
|
- sig/brand_dev/models/brand_identify_from_transaction_response.rbs
|
|
154
160
|
- sig/brand_dev/models/brand_prefetch_params.rbs
|