brand.dev 0.0.1.pre.alpha.0 → 0.0.2
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 +188 -0
- data/README.md +7 -3
- data/lib/brand_dev/errors.rb +22 -0
- data/lib/brand_dev/internal/transport/base_client.rb +10 -2
- data/lib/brand_dev/internal/type/array_of.rb +6 -1
- data/lib/brand_dev/internal/type/base_model.rb +77 -25
- data/lib/brand_dev/internal/type/boolean.rb +7 -1
- data/lib/brand_dev/internal/type/converter.rb +42 -34
- data/lib/brand_dev/internal/type/enum.rb +16 -5
- data/lib/brand_dev/internal/type/file_input.rb +6 -1
- data/lib/brand_dev/internal/type/hash_of.rb +6 -1
- data/lib/brand_dev/internal/type/union.rb +17 -9
- data/lib/brand_dev/internal/type/unknown.rb +7 -1
- data/lib/brand_dev/internal/util.rb +8 -9
- data/lib/brand_dev/models/brand_ai_query_params.rb +173 -0
- data/lib/brand_dev/models/brand_ai_query_response.rb +80 -0
- data/lib/brand_dev/models/brand_identify_from_transaction_params.rb +14 -1
- data/lib/brand_dev/models/brand_identify_from_transaction_response.rb +1 -29
- data/lib/brand_dev/models/brand_prefetch_params.rb +35 -0
- data/lib/brand_dev/models/brand_prefetch_response.rb +33 -0
- data/lib/brand_dev/models/brand_retrieve_by_ticker_params.rb +14 -1
- data/lib/brand_dev/models/brand_retrieve_by_ticker_response.rb +1 -29
- data/lib/brand_dev/models/brand_retrieve_naics_params.rb +11 -1
- data/lib/brand_dev/models/brand_retrieve_params.rb +24 -1
- data/lib/brand_dev/models/brand_retrieve_response.rb +1 -29
- data/lib/brand_dev/models/brand_retrieve_simplified_params.rb +35 -0
- data/lib/brand_dev/models/brand_retrieve_simplified_response.rb +280 -0
- data/lib/brand_dev/models/brand_screenshot_params.rb +49 -0
- data/lib/brand_dev/models/brand_screenshot_response.rb +64 -0
- data/lib/brand_dev/models/brand_styleguide_params.rb +36 -0
- data/lib/brand_dev/models/brand_styleguide_response.rb +769 -0
- data/lib/brand_dev/models.rb +13 -5
- data/lib/brand_dev/resources/brand.rb +165 -18
- data/lib/brand_dev/version.rb +1 -1
- data/lib/brand_dev.rb +10 -2
- data/rbi/brand_dev/errors.rbi +16 -0
- data/rbi/brand_dev/internal/type/boolean.rbi +2 -0
- data/rbi/brand_dev/internal/type/converter.rbi +15 -15
- data/rbi/brand_dev/internal/type/union.rbi +5 -0
- data/rbi/brand_dev/internal/type/unknown.rbi +2 -0
- data/rbi/brand_dev/internal/util.rbi +2 -0
- data/rbi/brand_dev/models/brand_ai_query_params.rbi +319 -0
- data/rbi/brand_dev/models/brand_ai_query_response.rbi +182 -0
- data/rbi/brand_dev/models/brand_identify_from_transaction_params.rbi +15 -0
- data/rbi/brand_dev/models/brand_identify_from_transaction_response.rbi +0 -69
- data/rbi/brand_dev/models/brand_prefetch_params.rbi +58 -0
- data/rbi/brand_dev/models/brand_prefetch_response.rbi +57 -0
- data/rbi/brand_dev/models/brand_retrieve_by_ticker_params.rbi +19 -1
- data/rbi/brand_dev/models/brand_retrieve_by_ticker_response.rbi +0 -69
- data/rbi/brand_dev/models/brand_retrieve_naics_params.rbi +19 -1
- data/rbi/brand_dev/models/brand_retrieve_params.rbi +30 -0
- data/rbi/brand_dev/models/brand_retrieve_response.rbi +0 -65
- data/rbi/brand_dev/models/brand_retrieve_simplified_params.rbi +61 -0
- data/rbi/brand_dev/models/brand_retrieve_simplified_response.rbi +667 -0
- data/rbi/brand_dev/models/brand_screenshot_params.rbi +105 -0
- data/rbi/brand_dev/models/brand_screenshot_response.rbi +135 -0
- data/rbi/brand_dev/models/brand_styleguide_params.rbi +60 -0
- data/rbi/brand_dev/models/brand_styleguide_response.rbi +1648 -0
- data/rbi/brand_dev/models.rbi +10 -1
- data/rbi/brand_dev/resources/brand.rbi +133 -6
- data/sig/brand_dev/errors.rbs +9 -0
- data/sig/brand_dev/internal/type/converter.rbs +7 -1
- data/sig/brand_dev/models/brand_ai_query_params.rbs +162 -0
- data/sig/brand_dev/models/brand_ai_query_response.rbs +79 -0
- data/sig/brand_dev/models/brand_identify_from_transaction_params.rbs +7 -1
- data/sig/brand_dev/models/brand_identify_from_transaction_response.rbs +0 -25
- data/sig/brand_dev/models/brand_prefetch_params.rbs +30 -0
- data/sig/brand_dev/models/brand_prefetch_response.rbs +28 -0
- data/sig/brand_dev/models/brand_retrieve_by_ticker_params.rbs +8 -1
- data/sig/brand_dev/models/brand_retrieve_by_ticker_response.rbs +0 -25
- data/sig/brand_dev/models/brand_retrieve_naics_params.rbs +8 -1
- data/sig/brand_dev/models/brand_retrieve_params.rbs +15 -1
- data/sig/brand_dev/models/brand_retrieve_response.rbs +0 -25
- data/sig/brand_dev/models/brand_retrieve_simplified_params.rbs +30 -0
- data/sig/brand_dev/models/brand_retrieve_simplified_response.rbs +292 -0
- data/sig/brand_dev/models/brand_screenshot_params.rbs +46 -0
- data/sig/brand_dev/models/brand_screenshot_response.rbs +63 -0
- data/sig/brand_dev/models/brand_styleguide_params.rbs +30 -0
- data/sig/brand_dev/models/brand_styleguide_response.rbs +925 -0
- data/sig/brand_dev/models.rbs +9 -1
- data/sig/brand_dev/resources/brand.rbs +35 -3
- metadata +46 -22
- data/lib/brand_dev/models/brand_search_params.rb +0 -22
- data/lib/brand_dev/models/brand_search_response.rb +0 -35
- data/rbi/brand_dev/models/brand_search_params.rbi +0 -40
- data/rbi/brand_dev/models/brand_search_response.rbi +0 -63
- data/sig/brand_dev/models/brand_search_params.rbs +0 -23
- data/sig/brand_dev/models/brand_search_response.rbs +0 -29
@@ -0,0 +1,319 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
class BrandAIQueryParams < 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::BrandAIQueryParams, BrandDev::Internal::AnyHash)
|
12
|
+
end
|
13
|
+
|
14
|
+
# Array of data points to extract from the website
|
15
|
+
sig { returns(T::Array[BrandDev::BrandAIQueryParams::DataToExtract]) }
|
16
|
+
attr_accessor :data_to_extract
|
17
|
+
|
18
|
+
# The domain name to analyze
|
19
|
+
sig { returns(String) }
|
20
|
+
attr_accessor :domain
|
21
|
+
|
22
|
+
# Optional object specifying which pages to analyze
|
23
|
+
sig { returns(T.nilable(BrandDev::BrandAIQueryParams::SpecificPages)) }
|
24
|
+
attr_reader :specific_pages
|
25
|
+
|
26
|
+
sig do
|
27
|
+
params(
|
28
|
+
specific_pages: BrandDev::BrandAIQueryParams::SpecificPages::OrHash
|
29
|
+
).void
|
30
|
+
end
|
31
|
+
attr_writer :specific_pages
|
32
|
+
|
33
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
34
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
35
|
+
# value is 300000ms (5 minutes).
|
36
|
+
sig { returns(T.nilable(Integer)) }
|
37
|
+
attr_reader :timeout_ms
|
38
|
+
|
39
|
+
sig { params(timeout_ms: Integer).void }
|
40
|
+
attr_writer :timeout_ms
|
41
|
+
|
42
|
+
sig do
|
43
|
+
params(
|
44
|
+
data_to_extract:
|
45
|
+
T::Array[BrandDev::BrandAIQueryParams::DataToExtract::OrHash],
|
46
|
+
domain: String,
|
47
|
+
specific_pages: BrandDev::BrandAIQueryParams::SpecificPages::OrHash,
|
48
|
+
timeout_ms: Integer,
|
49
|
+
request_options: BrandDev::RequestOptions::OrHash
|
50
|
+
).returns(T.attached_class)
|
51
|
+
end
|
52
|
+
def self.new(
|
53
|
+
# Array of data points to extract from the website
|
54
|
+
data_to_extract:,
|
55
|
+
# The domain name to analyze
|
56
|
+
domain:,
|
57
|
+
# Optional object specifying which pages to analyze
|
58
|
+
specific_pages: nil,
|
59
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
60
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
61
|
+
# value is 300000ms (5 minutes).
|
62
|
+
timeout_ms: nil,
|
63
|
+
request_options: {}
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
sig do
|
68
|
+
override.returns(
|
69
|
+
{
|
70
|
+
data_to_extract:
|
71
|
+
T::Array[BrandDev::BrandAIQueryParams::DataToExtract],
|
72
|
+
domain: String,
|
73
|
+
specific_pages: BrandDev::BrandAIQueryParams::SpecificPages,
|
74
|
+
timeout_ms: Integer,
|
75
|
+
request_options: BrandDev::RequestOptions
|
76
|
+
}
|
77
|
+
)
|
78
|
+
end
|
79
|
+
def to_hash
|
80
|
+
end
|
81
|
+
|
82
|
+
class DataToExtract < BrandDev::Internal::Type::BaseModel
|
83
|
+
OrHash =
|
84
|
+
T.type_alias do
|
85
|
+
T.any(
|
86
|
+
BrandDev::BrandAIQueryParams::DataToExtract,
|
87
|
+
BrandDev::Internal::AnyHash
|
88
|
+
)
|
89
|
+
end
|
90
|
+
|
91
|
+
# Description of what to extract
|
92
|
+
sig { returns(String) }
|
93
|
+
attr_accessor :datapoint_description
|
94
|
+
|
95
|
+
# Example of the expected value
|
96
|
+
sig { returns(String) }
|
97
|
+
attr_accessor :datapoint_example
|
98
|
+
|
99
|
+
# Name of the data point to extract
|
100
|
+
sig { returns(String) }
|
101
|
+
attr_accessor :datapoint_name
|
102
|
+
|
103
|
+
# Type of the data point
|
104
|
+
sig do
|
105
|
+
returns(
|
106
|
+
BrandDev::BrandAIQueryParams::DataToExtract::DatapointType::OrSymbol
|
107
|
+
)
|
108
|
+
end
|
109
|
+
attr_accessor :datapoint_type
|
110
|
+
|
111
|
+
sig do
|
112
|
+
params(
|
113
|
+
datapoint_description: String,
|
114
|
+
datapoint_example: String,
|
115
|
+
datapoint_name: String,
|
116
|
+
datapoint_type:
|
117
|
+
BrandDev::BrandAIQueryParams::DataToExtract::DatapointType::OrSymbol
|
118
|
+
).returns(T.attached_class)
|
119
|
+
end
|
120
|
+
def self.new(
|
121
|
+
# Description of what to extract
|
122
|
+
datapoint_description:,
|
123
|
+
# Example of the expected value
|
124
|
+
datapoint_example:,
|
125
|
+
# Name of the data point to extract
|
126
|
+
datapoint_name:,
|
127
|
+
# Type of the data point
|
128
|
+
datapoint_type:
|
129
|
+
)
|
130
|
+
end
|
131
|
+
|
132
|
+
sig do
|
133
|
+
override.returns(
|
134
|
+
{
|
135
|
+
datapoint_description: String,
|
136
|
+
datapoint_example: String,
|
137
|
+
datapoint_name: String,
|
138
|
+
datapoint_type:
|
139
|
+
BrandDev::BrandAIQueryParams::DataToExtract::DatapointType::OrSymbol
|
140
|
+
}
|
141
|
+
)
|
142
|
+
end
|
143
|
+
def to_hash
|
144
|
+
end
|
145
|
+
|
146
|
+
# Type of the data point
|
147
|
+
module DatapointType
|
148
|
+
extend BrandDev::Internal::Type::Enum
|
149
|
+
|
150
|
+
TaggedSymbol =
|
151
|
+
T.type_alias do
|
152
|
+
T.all(
|
153
|
+
Symbol,
|
154
|
+
BrandDev::BrandAIQueryParams::DataToExtract::DatapointType
|
155
|
+
)
|
156
|
+
end
|
157
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
158
|
+
|
159
|
+
TEXT =
|
160
|
+
T.let(
|
161
|
+
:text,
|
162
|
+
BrandDev::BrandAIQueryParams::DataToExtract::DatapointType::TaggedSymbol
|
163
|
+
)
|
164
|
+
NUMBER =
|
165
|
+
T.let(
|
166
|
+
:number,
|
167
|
+
BrandDev::BrandAIQueryParams::DataToExtract::DatapointType::TaggedSymbol
|
168
|
+
)
|
169
|
+
DATE =
|
170
|
+
T.let(
|
171
|
+
:date,
|
172
|
+
BrandDev::BrandAIQueryParams::DataToExtract::DatapointType::TaggedSymbol
|
173
|
+
)
|
174
|
+
BOOLEAN =
|
175
|
+
T.let(
|
176
|
+
:boolean,
|
177
|
+
BrandDev::BrandAIQueryParams::DataToExtract::DatapointType::TaggedSymbol
|
178
|
+
)
|
179
|
+
LIST =
|
180
|
+
T.let(
|
181
|
+
:list,
|
182
|
+
BrandDev::BrandAIQueryParams::DataToExtract::DatapointType::TaggedSymbol
|
183
|
+
)
|
184
|
+
URL =
|
185
|
+
T.let(
|
186
|
+
:url,
|
187
|
+
BrandDev::BrandAIQueryParams::DataToExtract::DatapointType::TaggedSymbol
|
188
|
+
)
|
189
|
+
|
190
|
+
sig do
|
191
|
+
override.returns(
|
192
|
+
T::Array[
|
193
|
+
BrandDev::BrandAIQueryParams::DataToExtract::DatapointType::TaggedSymbol
|
194
|
+
]
|
195
|
+
)
|
196
|
+
end
|
197
|
+
def self.values
|
198
|
+
end
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
class SpecificPages < BrandDev::Internal::Type::BaseModel
|
203
|
+
OrHash =
|
204
|
+
T.type_alias do
|
205
|
+
T.any(
|
206
|
+
BrandDev::BrandAIQueryParams::SpecificPages,
|
207
|
+
BrandDev::Internal::AnyHash
|
208
|
+
)
|
209
|
+
end
|
210
|
+
|
211
|
+
# Whether to analyze the about us page
|
212
|
+
sig { returns(T.nilable(T::Boolean)) }
|
213
|
+
attr_reader :about_us
|
214
|
+
|
215
|
+
sig { params(about_us: T::Boolean).void }
|
216
|
+
attr_writer :about_us
|
217
|
+
|
218
|
+
# Whether to analyze the blog
|
219
|
+
sig { returns(T.nilable(T::Boolean)) }
|
220
|
+
attr_reader :blog
|
221
|
+
|
222
|
+
sig { params(blog: T::Boolean).void }
|
223
|
+
attr_writer :blog
|
224
|
+
|
225
|
+
# Whether to analyze the careers page
|
226
|
+
sig { returns(T.nilable(T::Boolean)) }
|
227
|
+
attr_reader :careers
|
228
|
+
|
229
|
+
sig { params(careers: T::Boolean).void }
|
230
|
+
attr_writer :careers
|
231
|
+
|
232
|
+
# Whether to analyze the contact us page
|
233
|
+
sig { returns(T.nilable(T::Boolean)) }
|
234
|
+
attr_reader :contact_us
|
235
|
+
|
236
|
+
sig { params(contact_us: T::Boolean).void }
|
237
|
+
attr_writer :contact_us
|
238
|
+
|
239
|
+
# Whether to analyze the FAQ page
|
240
|
+
sig { returns(T.nilable(T::Boolean)) }
|
241
|
+
attr_reader :faq
|
242
|
+
|
243
|
+
sig { params(faq: T::Boolean).void }
|
244
|
+
attr_writer :faq
|
245
|
+
|
246
|
+
# Whether to analyze the home page
|
247
|
+
sig { returns(T.nilable(T::Boolean)) }
|
248
|
+
attr_reader :home_page
|
249
|
+
|
250
|
+
sig { params(home_page: T::Boolean).void }
|
251
|
+
attr_writer :home_page
|
252
|
+
|
253
|
+
# Whether to analyze the privacy policy page
|
254
|
+
sig { returns(T.nilable(T::Boolean)) }
|
255
|
+
attr_reader :privacy_policy
|
256
|
+
|
257
|
+
sig { params(privacy_policy: T::Boolean).void }
|
258
|
+
attr_writer :privacy_policy
|
259
|
+
|
260
|
+
# Whether to analyze the terms and conditions page
|
261
|
+
sig { returns(T.nilable(T::Boolean)) }
|
262
|
+
attr_reader :terms_and_conditions
|
263
|
+
|
264
|
+
sig { params(terms_and_conditions: T::Boolean).void }
|
265
|
+
attr_writer :terms_and_conditions
|
266
|
+
|
267
|
+
# Optional object specifying which pages to analyze
|
268
|
+
sig do
|
269
|
+
params(
|
270
|
+
about_us: T::Boolean,
|
271
|
+
blog: T::Boolean,
|
272
|
+
careers: T::Boolean,
|
273
|
+
contact_us: T::Boolean,
|
274
|
+
faq: T::Boolean,
|
275
|
+
home_page: T::Boolean,
|
276
|
+
privacy_policy: T::Boolean,
|
277
|
+
terms_and_conditions: T::Boolean
|
278
|
+
).returns(T.attached_class)
|
279
|
+
end
|
280
|
+
def self.new(
|
281
|
+
# Whether to analyze the about us page
|
282
|
+
about_us: nil,
|
283
|
+
# Whether to analyze the blog
|
284
|
+
blog: nil,
|
285
|
+
# Whether to analyze the careers page
|
286
|
+
careers: nil,
|
287
|
+
# Whether to analyze the contact us page
|
288
|
+
contact_us: nil,
|
289
|
+
# Whether to analyze the FAQ page
|
290
|
+
faq: nil,
|
291
|
+
# Whether to analyze the home page
|
292
|
+
home_page: nil,
|
293
|
+
# Whether to analyze the privacy policy page
|
294
|
+
privacy_policy: nil,
|
295
|
+
# Whether to analyze the terms and conditions page
|
296
|
+
terms_and_conditions: nil
|
297
|
+
)
|
298
|
+
end
|
299
|
+
|
300
|
+
sig do
|
301
|
+
override.returns(
|
302
|
+
{
|
303
|
+
about_us: T::Boolean,
|
304
|
+
blog: T::Boolean,
|
305
|
+
careers: T::Boolean,
|
306
|
+
contact_us: T::Boolean,
|
307
|
+
faq: T::Boolean,
|
308
|
+
home_page: T::Boolean,
|
309
|
+
privacy_policy: T::Boolean,
|
310
|
+
terms_and_conditions: T::Boolean
|
311
|
+
}
|
312
|
+
)
|
313
|
+
end
|
314
|
+
def to_hash
|
315
|
+
end
|
316
|
+
end
|
317
|
+
end
|
318
|
+
end
|
319
|
+
end
|
@@ -0,0 +1,182 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
class BrandAIQueryResponse < BrandDev::Internal::Type::BaseModel
|
6
|
+
OrHash =
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
BrandDev::Models::BrandAIQueryResponse,
|
10
|
+
BrandDev::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
14
|
+
# Array of extracted data points
|
15
|
+
sig do
|
16
|
+
returns(
|
17
|
+
T.nilable(
|
18
|
+
T::Array[BrandDev::Models::BrandAIQueryResponse::DataExtracted]
|
19
|
+
)
|
20
|
+
)
|
21
|
+
end
|
22
|
+
attr_reader :data_extracted
|
23
|
+
|
24
|
+
sig do
|
25
|
+
params(
|
26
|
+
data_extracted:
|
27
|
+
T::Array[
|
28
|
+
BrandDev::Models::BrandAIQueryResponse::DataExtracted::OrHash
|
29
|
+
]
|
30
|
+
).void
|
31
|
+
end
|
32
|
+
attr_writer :data_extracted
|
33
|
+
|
34
|
+
# The domain that was analyzed
|
35
|
+
sig { returns(T.nilable(String)) }
|
36
|
+
attr_reader :domain
|
37
|
+
|
38
|
+
sig { params(domain: String).void }
|
39
|
+
attr_writer :domain
|
40
|
+
|
41
|
+
# List of URLs that were analyzed
|
42
|
+
sig { returns(T.nilable(T::Array[String])) }
|
43
|
+
attr_reader :urls_analyzed
|
44
|
+
|
45
|
+
sig { params(urls_analyzed: T::Array[String]).void }
|
46
|
+
attr_writer :urls_analyzed
|
47
|
+
|
48
|
+
sig do
|
49
|
+
params(
|
50
|
+
data_extracted:
|
51
|
+
T::Array[
|
52
|
+
BrandDev::Models::BrandAIQueryResponse::DataExtracted::OrHash
|
53
|
+
],
|
54
|
+
domain: String,
|
55
|
+
urls_analyzed: T::Array[String]
|
56
|
+
).returns(T.attached_class)
|
57
|
+
end
|
58
|
+
def self.new(
|
59
|
+
# Array of extracted data points
|
60
|
+
data_extracted: nil,
|
61
|
+
# The domain that was analyzed
|
62
|
+
domain: nil,
|
63
|
+
# List of URLs that were analyzed
|
64
|
+
urls_analyzed: nil
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
sig do
|
69
|
+
override.returns(
|
70
|
+
{
|
71
|
+
data_extracted:
|
72
|
+
T::Array[BrandDev::Models::BrandAIQueryResponse::DataExtracted],
|
73
|
+
domain: String,
|
74
|
+
urls_analyzed: T::Array[String]
|
75
|
+
}
|
76
|
+
)
|
77
|
+
end
|
78
|
+
def to_hash
|
79
|
+
end
|
80
|
+
|
81
|
+
class DataExtracted < BrandDev::Internal::Type::BaseModel
|
82
|
+
OrHash =
|
83
|
+
T.type_alias do
|
84
|
+
T.any(
|
85
|
+
BrandDev::Models::BrandAIQueryResponse::DataExtracted,
|
86
|
+
BrandDev::Internal::AnyHash
|
87
|
+
)
|
88
|
+
end
|
89
|
+
|
90
|
+
# Name of the extracted data point
|
91
|
+
sig { returns(T.nilable(String)) }
|
92
|
+
attr_reader :datapoint_name
|
93
|
+
|
94
|
+
sig { params(datapoint_name: String).void }
|
95
|
+
attr_writer :datapoint_name
|
96
|
+
|
97
|
+
# Value of the extracted data point
|
98
|
+
sig do
|
99
|
+
returns(
|
100
|
+
T.nilable(
|
101
|
+
BrandDev::Models::BrandAIQueryResponse::DataExtracted::DatapointValue::Variants
|
102
|
+
)
|
103
|
+
)
|
104
|
+
end
|
105
|
+
attr_reader :datapoint_value
|
106
|
+
|
107
|
+
sig do
|
108
|
+
params(
|
109
|
+
datapoint_value:
|
110
|
+
BrandDev::Models::BrandAIQueryResponse::DataExtracted::DatapointValue::Variants
|
111
|
+
).void
|
112
|
+
end
|
113
|
+
attr_writer :datapoint_value
|
114
|
+
|
115
|
+
sig do
|
116
|
+
params(
|
117
|
+
datapoint_name: String,
|
118
|
+
datapoint_value:
|
119
|
+
BrandDev::Models::BrandAIQueryResponse::DataExtracted::DatapointValue::Variants
|
120
|
+
).returns(T.attached_class)
|
121
|
+
end
|
122
|
+
def self.new(
|
123
|
+
# Name of the extracted data point
|
124
|
+
datapoint_name: nil,
|
125
|
+
# Value of the extracted data point
|
126
|
+
datapoint_value: nil
|
127
|
+
)
|
128
|
+
end
|
129
|
+
|
130
|
+
sig do
|
131
|
+
override.returns(
|
132
|
+
{
|
133
|
+
datapoint_name: String,
|
134
|
+
datapoint_value:
|
135
|
+
BrandDev::Models::BrandAIQueryResponse::DataExtracted::DatapointValue::Variants
|
136
|
+
}
|
137
|
+
)
|
138
|
+
end
|
139
|
+
def to_hash
|
140
|
+
end
|
141
|
+
|
142
|
+
# Value of the extracted data point
|
143
|
+
module DatapointValue
|
144
|
+
extend BrandDev::Internal::Type::Union
|
145
|
+
|
146
|
+
Variants =
|
147
|
+
T.type_alias do
|
148
|
+
T.any(
|
149
|
+
String,
|
150
|
+
Float,
|
151
|
+
T::Boolean,
|
152
|
+
T::Array[String],
|
153
|
+
T::Array[Float]
|
154
|
+
)
|
155
|
+
end
|
156
|
+
|
157
|
+
sig do
|
158
|
+
override.returns(
|
159
|
+
T::Array[
|
160
|
+
BrandDev::Models::BrandAIQueryResponse::DataExtracted::DatapointValue::Variants
|
161
|
+
]
|
162
|
+
)
|
163
|
+
end
|
164
|
+
def self.variants
|
165
|
+
end
|
166
|
+
|
167
|
+
StringArray =
|
168
|
+
T.let(
|
169
|
+
BrandDev::Internal::Type::ArrayOf[String],
|
170
|
+
BrandDev::Internal::Type::Converter
|
171
|
+
)
|
172
|
+
|
173
|
+
FloatArray =
|
174
|
+
T.let(
|
175
|
+
BrandDev::Internal::Type::ArrayOf[Float],
|
176
|
+
BrandDev::Internal::Type::Converter
|
177
|
+
)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
@@ -18,15 +18,29 @@ module BrandDev
|
|
18
18
|
sig { returns(String) }
|
19
19
|
attr_accessor :transaction_info
|
20
20
|
|
21
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
22
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
23
|
+
# value is 300000ms (5 minutes).
|
24
|
+
sig { returns(T.nilable(Integer)) }
|
25
|
+
attr_reader :timeout_ms
|
26
|
+
|
27
|
+
sig { params(timeout_ms: Integer).void }
|
28
|
+
attr_writer :timeout_ms
|
29
|
+
|
21
30
|
sig do
|
22
31
|
params(
|
23
32
|
transaction_info: String,
|
33
|
+
timeout_ms: Integer,
|
24
34
|
request_options: BrandDev::RequestOptions::OrHash
|
25
35
|
).returns(T.attached_class)
|
26
36
|
end
|
27
37
|
def self.new(
|
28
38
|
# Transaction information to identify the brand
|
29
39
|
transaction_info:,
|
40
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
41
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
42
|
+
# value is 300000ms (5 minutes).
|
43
|
+
timeout_ms: nil,
|
30
44
|
request_options: {}
|
31
45
|
)
|
32
46
|
end
|
@@ -35,6 +49,7 @@ module BrandDev
|
|
35
49
|
override.returns(
|
36
50
|
{
|
37
51
|
transaction_info: String,
|
52
|
+
timeout_ms: Integer,
|
38
53
|
request_options: BrandDev::RequestOptions
|
39
54
|
}
|
40
55
|
)
|
@@ -159,28 +159,6 @@ module BrandDev
|
|
159
159
|
sig { params(domain: String).void }
|
160
160
|
attr_writer :domain
|
161
161
|
|
162
|
-
# An array of fonts used by the brand's website
|
163
|
-
sig do
|
164
|
-
returns(
|
165
|
-
T.nilable(
|
166
|
-
T::Array[
|
167
|
-
BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Font
|
168
|
-
]
|
169
|
-
)
|
170
|
-
)
|
171
|
-
end
|
172
|
-
attr_reader :fonts
|
173
|
-
|
174
|
-
sig do
|
175
|
-
params(
|
176
|
-
fonts:
|
177
|
-
T::Array[
|
178
|
-
BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Font::OrHash
|
179
|
-
]
|
180
|
-
).void
|
181
|
-
end
|
182
|
-
attr_writer :fonts
|
183
|
-
|
184
162
|
# An array of logos associated with the brand
|
185
163
|
sig do
|
186
164
|
returns(
|
@@ -273,10 +251,6 @@ module BrandDev
|
|
273
251
|
],
|
274
252
|
description: String,
|
275
253
|
domain: String,
|
276
|
-
fonts:
|
277
|
-
T::Array[
|
278
|
-
BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Font::OrHash
|
279
|
-
],
|
280
254
|
logos:
|
281
255
|
T::Array[
|
282
256
|
BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo::OrHash
|
@@ -302,8 +276,6 @@ module BrandDev
|
|
302
276
|
description: nil,
|
303
277
|
# The domain name of the brand
|
304
278
|
domain: nil,
|
305
|
-
# An array of fonts used by the brand's website
|
306
|
-
fonts: nil,
|
307
279
|
# An array of logos associated with the brand
|
308
280
|
logos: nil,
|
309
281
|
# The brand's slogan
|
@@ -333,10 +305,6 @@ module BrandDev
|
|
333
305
|
],
|
334
306
|
description: String,
|
335
307
|
domain: String,
|
336
|
-
fonts:
|
337
|
-
T::Array[
|
338
|
-
BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Font
|
339
|
-
],
|
340
308
|
logos:
|
341
309
|
T::Array[
|
342
310
|
BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo
|
@@ -668,43 +636,6 @@ module BrandDev
|
|
668
636
|
end
|
669
637
|
end
|
670
638
|
|
671
|
-
class Font < BrandDev::Internal::Type::BaseModel
|
672
|
-
OrHash =
|
673
|
-
T.type_alias do
|
674
|
-
T.any(
|
675
|
-
BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Font,
|
676
|
-
BrandDev::Internal::AnyHash
|
677
|
-
)
|
678
|
-
end
|
679
|
-
|
680
|
-
# Name of the font
|
681
|
-
sig { returns(T.nilable(String)) }
|
682
|
-
attr_reader :name
|
683
|
-
|
684
|
-
sig { params(name: String).void }
|
685
|
-
attr_writer :name
|
686
|
-
|
687
|
-
# Usage of the font, e.g., 'title', 'body', 'button'
|
688
|
-
sig { returns(T.nilable(String)) }
|
689
|
-
attr_reader :usage
|
690
|
-
|
691
|
-
sig { params(usage: String).void }
|
692
|
-
attr_writer :usage
|
693
|
-
|
694
|
-
sig { params(name: String, usage: String).returns(T.attached_class) }
|
695
|
-
def self.new(
|
696
|
-
# Name of the font
|
697
|
-
name: nil,
|
698
|
-
# Usage of the font, e.g., 'title', 'body', 'button'
|
699
|
-
usage: nil
|
700
|
-
)
|
701
|
-
end
|
702
|
-
|
703
|
-
sig { override.returns({ name: String, usage: String }) }
|
704
|
-
def to_hash
|
705
|
-
end
|
706
|
-
end
|
707
|
-
|
708
639
|
class Logo < BrandDev::Internal::Type::BaseModel
|
709
640
|
OrHash =
|
710
641
|
T.type_alias do
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
class BrandPrefetchParams < 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::BrandPrefetchParams, BrandDev::Internal::AnyHash)
|
12
|
+
end
|
13
|
+
|
14
|
+
# Domain name to prefetch brand data for
|
15
|
+
sig { returns(String) }
|
16
|
+
attr_accessor :domain
|
17
|
+
|
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
|
+
sig { returns(T.nilable(Integer)) }
|
22
|
+
attr_reader :timeout_ms
|
23
|
+
|
24
|
+
sig { params(timeout_ms: Integer).void }
|
25
|
+
attr_writer :timeout_ms
|
26
|
+
|
27
|
+
sig do
|
28
|
+
params(
|
29
|
+
domain: String,
|
30
|
+
timeout_ms: Integer,
|
31
|
+
request_options: BrandDev::RequestOptions::OrHash
|
32
|
+
).returns(T.attached_class)
|
33
|
+
end
|
34
|
+
def self.new(
|
35
|
+
# Domain name to prefetch brand data for
|
36
|
+
domain:,
|
37
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
38
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
39
|
+
# value is 300000ms (5 minutes).
|
40
|
+
timeout_ms: nil,
|
41
|
+
request_options: {}
|
42
|
+
)
|
43
|
+
end
|
44
|
+
|
45
|
+
sig do
|
46
|
+
override.returns(
|
47
|
+
{
|
48
|
+
domain: String,
|
49
|
+
timeout_ms: Integer,
|
50
|
+
request_options: BrandDev::RequestOptions
|
51
|
+
}
|
52
|
+
)
|
53
|
+
end
|
54
|
+
def to_hash
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|