brand.dev 0.1.0.pre.alpha.1 → 0.1.0.pre.alpha.3
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 +27 -0
- data/README.md +1 -1
- data/lib/brand_dev/internal/type/enum.rb +6 -3
- data/lib/brand_dev/internal/type/union.rb +5 -2
- data/lib/brand_dev/internal/util.rb +8 -9
- data/lib/brand_dev/models/brand_ai_query_params.rb +73 -4
- data/lib/brand_dev/models/brand_prefetch_params.rb +22 -0
- data/lib/brand_dev/models/brand_prefetch_response.rb +33 -0
- data/lib/brand_dev/models.rb +6 -4
- data/lib/brand_dev/resources/brand.rb +26 -1
- data/lib/brand_dev/version.rb +1 -1
- data/lib/brand_dev.rb +2 -0
- data/rbi/brand_dev/internal/util.rbi +2 -0
- data/rbi/brand_dev/models/brand_ai_query_params.rbi +126 -6
- data/rbi/brand_dev/models/brand_prefetch_params.rbi +40 -0
- data/rbi/brand_dev/models/brand_prefetch_response.rbi +57 -0
- data/rbi/brand_dev/models.rbi +2 -0
- data/rbi/brand_dev/resources/brand.rbi +19 -2
- data/sig/brand_dev/models/brand_ai_query_params.rbs +75 -5
- data/sig/brand_dev/models/brand_prefetch_params.rbs +23 -0
- data/sig/brand_dev/models/brand_prefetch_response.rbs +28 -0
- data/sig/brand_dev/models.rbs +2 -0
- data/sig/brand_dev/resources/brand.rbs +6 -1
- 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: 5b4785c6a5194cf7d3a6a7da3a3e39a22d115838178cc06abbaef4ccd772b76f
|
4
|
+
data.tar.gz: 2f1de5954cd94b141efb40db439bbc41976e686868c1fcb0f53dd2c882e6d481
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90e4b94324308dbb27808e0cb1e497b6a025d5d828f9c4e51f9e356dbc775732a081c942007423cc11b8f2a98bf5f3e691c353017fe640214033633ba3b4a3e5
|
7
|
+
data.tar.gz: b3b8049f2c366e2d41dd865bcf4d96df7c26b46407df10fb302803f5e7f23990e9e972b350dcfe351a4b82e475e81a5e1f5c6a41ea549562ca4e75a4e471bfca
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.0-alpha.3 (2025-06-06)
|
4
|
+
|
5
|
+
Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** manual updates ([7410667](https://github.com/brand-dot-dev/ruby-sdk/commit/7410667d18ceacfb171c91eb14a4825f77e3487b))
|
10
|
+
|
11
|
+
|
12
|
+
### Chores
|
13
|
+
|
14
|
+
* **internal:** codegen related update ([08a0fc4](https://github.com/brand-dot-dev/ruby-sdk/commit/08a0fc45756634925a18266d526b41a217b37492))
|
15
|
+
|
16
|
+
## 0.1.0-alpha.2 (2025-06-05)
|
17
|
+
|
18
|
+
Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
|
19
|
+
|
20
|
+
### Features
|
21
|
+
|
22
|
+
* **api:** manual updates ([6613bcd](https://github.com/brand-dot-dev/ruby-sdk/commit/6613bcdddf846a0dbcb1e507da7ec58c93e4125d))
|
23
|
+
|
24
|
+
|
25
|
+
### Bug Fixes
|
26
|
+
|
27
|
+
* `to_sorbet_type` should not return branded types ([0047f7c](https://github.com/brand-dot-dev/ruby-sdk/commit/0047f7ce754514e6c5ac04546aa262d1e4df68f5))
|
28
|
+
* default content-type for text in multi-part formdata uploads should be text/plain ([c39a8a7](https://github.com/brand-dot-dev/ruby-sdk/commit/c39a8a78f5445fa88de3b9f765d6211889ba78ef))
|
29
|
+
|
3
30
|
## 0.1.0-alpha.1 (2025-06-02)
|
4
31
|
|
5
32
|
Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
|
data/README.md
CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
15
15
|
<!-- x-release-please-start-version -->
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
gem "brand.dev", "~> 0.1.0.pre.alpha.
|
18
|
+
gem "brand.dev", "~> 0.1.0.pre.alpha.3"
|
19
19
|
```
|
20
20
|
|
21
21
|
<!-- x-release-please-end -->
|
@@ -91,11 +91,14 @@ module BrandDev
|
|
91
91
|
#
|
92
92
|
# @return [Object]
|
93
93
|
def to_sorbet_type
|
94
|
-
|
94
|
+
types = values.map { BrandDev::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
|
95
|
+
case types
|
95
96
|
in []
|
96
97
|
T.noreturn
|
97
|
-
in [
|
98
|
-
|
98
|
+
in [type]
|
99
|
+
type
|
100
|
+
else
|
101
|
+
T.any(*types)
|
99
102
|
end
|
100
103
|
end
|
101
104
|
|
@@ -195,11 +195,14 @@ module BrandDev
|
|
195
195
|
#
|
196
196
|
# @return [Object]
|
197
197
|
def to_sorbet_type
|
198
|
-
|
198
|
+
types = variants.map { BrandDev::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
|
199
|
+
case types
|
199
200
|
in []
|
200
201
|
T.noreturn
|
202
|
+
in [type]
|
203
|
+
type
|
201
204
|
else
|
202
|
-
T.any(*
|
205
|
+
T.any(*types)
|
203
206
|
end
|
204
207
|
end
|
205
208
|
|
@@ -497,7 +497,7 @@ module BrandDev
|
|
497
497
|
# @param closing [Array<Proc>]
|
498
498
|
# @param content_type [String, nil]
|
499
499
|
private def write_multipart_content(y, val:, closing:, content_type: nil)
|
500
|
-
|
500
|
+
content_line = "Content-Type: %s\r\n\r\n"
|
501
501
|
|
502
502
|
case val
|
503
503
|
in BrandDev::FilePart
|
@@ -508,24 +508,21 @@ module BrandDev
|
|
508
508
|
content_type: val.content_type
|
509
509
|
)
|
510
510
|
in Pathname
|
511
|
-
y <<
|
511
|
+
y << format(content_line, content_type || "application/octet-stream")
|
512
512
|
io = val.open(binmode: true)
|
513
513
|
closing << io.method(:close)
|
514
514
|
IO.copy_stream(io, y)
|
515
515
|
in IO
|
516
|
-
y <<
|
516
|
+
y << format(content_line, content_type || "application/octet-stream")
|
517
517
|
IO.copy_stream(val, y)
|
518
518
|
in StringIO
|
519
|
-
y <<
|
519
|
+
y << format(content_line, content_type || "application/octet-stream")
|
520
520
|
y << val.string
|
521
|
-
in String
|
522
|
-
y << "Content-Type: #{content_type}\r\n\r\n"
|
523
|
-
y << val.to_s
|
524
521
|
in -> { primitive?(_1) }
|
525
|
-
y << "
|
522
|
+
y << format(content_line, content_type || "text/plain")
|
526
523
|
y << val.to_s
|
527
524
|
else
|
528
|
-
y << "
|
525
|
+
y << format(content_line, content_type || "application/json")
|
529
526
|
y << JSON.generate(val)
|
530
527
|
end
|
531
528
|
y << "\r\n"
|
@@ -563,6 +560,8 @@ module BrandDev
|
|
563
560
|
|
564
561
|
# @api private
|
565
562
|
#
|
563
|
+
# https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#special-considerations-for-multipart-content
|
564
|
+
#
|
566
565
|
# @param body [Object]
|
567
566
|
#
|
568
567
|
# @return [Array(String, Enumerable<String>)]
|
@@ -21,17 +21,17 @@ module BrandDev
|
|
21
21
|
required :domain, String
|
22
22
|
|
23
23
|
# @!attribute specific_pages
|
24
|
-
# Optional
|
24
|
+
# Optional object specifying which pages to analyze
|
25
25
|
#
|
26
|
-
# @return [
|
27
|
-
optional :specific_pages, BrandDev::
|
26
|
+
# @return [BrandDev::Models::BrandAIQueryParams::SpecificPages, nil]
|
27
|
+
optional :specific_pages, -> { BrandDev::BrandAIQueryParams::SpecificPages }
|
28
28
|
|
29
29
|
# @!method initialize(data_to_extract:, domain:, specific_pages: nil, request_options: {})
|
30
30
|
# @param data_to_extract [Array<BrandDev::Models::BrandAIQueryParams::DataToExtract>] Array of data points to extract from the website
|
31
31
|
#
|
32
32
|
# @param domain [String] The domain name to analyze
|
33
33
|
#
|
34
|
-
# @param specific_pages [
|
34
|
+
# @param specific_pages [BrandDev::Models::BrandAIQueryParams::SpecificPages] Optional object specifying which pages to analyze
|
35
35
|
#
|
36
36
|
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
|
37
37
|
|
@@ -86,6 +86,75 @@ module BrandDev
|
|
86
86
|
# @return [Array<Symbol>]
|
87
87
|
end
|
88
88
|
end
|
89
|
+
|
90
|
+
class SpecificPages < BrandDev::Internal::Type::BaseModel
|
91
|
+
# @!attribute about_us
|
92
|
+
# Whether to analyze the about us page
|
93
|
+
#
|
94
|
+
# @return [Boolean, nil]
|
95
|
+
optional :about_us, BrandDev::Internal::Type::Boolean
|
96
|
+
|
97
|
+
# @!attribute blog
|
98
|
+
# Whether to analyze the blog
|
99
|
+
#
|
100
|
+
# @return [Boolean, nil]
|
101
|
+
optional :blog, BrandDev::Internal::Type::Boolean
|
102
|
+
|
103
|
+
# @!attribute careers
|
104
|
+
# Whether to analyze the careers page
|
105
|
+
#
|
106
|
+
# @return [Boolean, nil]
|
107
|
+
optional :careers, BrandDev::Internal::Type::Boolean
|
108
|
+
|
109
|
+
# @!attribute contact_us
|
110
|
+
# Whether to analyze the contact us page
|
111
|
+
#
|
112
|
+
# @return [Boolean, nil]
|
113
|
+
optional :contact_us, BrandDev::Internal::Type::Boolean
|
114
|
+
|
115
|
+
# @!attribute faq
|
116
|
+
# Whether to analyze the FAQ page
|
117
|
+
#
|
118
|
+
# @return [Boolean, nil]
|
119
|
+
optional :faq, BrandDev::Internal::Type::Boolean
|
120
|
+
|
121
|
+
# @!attribute home_page
|
122
|
+
# Whether to analyze the home page
|
123
|
+
#
|
124
|
+
# @return [Boolean, nil]
|
125
|
+
optional :home_page, BrandDev::Internal::Type::Boolean
|
126
|
+
|
127
|
+
# @!attribute privacy_policy
|
128
|
+
# Whether to analyze the privacy policy page
|
129
|
+
#
|
130
|
+
# @return [Boolean, nil]
|
131
|
+
optional :privacy_policy, BrandDev::Internal::Type::Boolean
|
132
|
+
|
133
|
+
# @!attribute terms_and_conditions
|
134
|
+
# Whether to analyze the terms and conditions page
|
135
|
+
#
|
136
|
+
# @return [Boolean, nil]
|
137
|
+
optional :terms_and_conditions, BrandDev::Internal::Type::Boolean
|
138
|
+
|
139
|
+
# @!method initialize(about_us: nil, blog: nil, careers: nil, contact_us: nil, faq: nil, home_page: nil, privacy_policy: nil, terms_and_conditions: nil)
|
140
|
+
# Optional object specifying which pages to analyze
|
141
|
+
#
|
142
|
+
# @param about_us [Boolean] Whether to analyze the about us page
|
143
|
+
#
|
144
|
+
# @param blog [Boolean] Whether to analyze the blog
|
145
|
+
#
|
146
|
+
# @param careers [Boolean] Whether to analyze the careers page
|
147
|
+
#
|
148
|
+
# @param contact_us [Boolean] Whether to analyze the contact us page
|
149
|
+
#
|
150
|
+
# @param faq [Boolean] Whether to analyze the FAQ page
|
151
|
+
#
|
152
|
+
# @param home_page [Boolean] Whether to analyze the home page
|
153
|
+
#
|
154
|
+
# @param privacy_policy [Boolean] Whether to analyze the privacy policy page
|
155
|
+
#
|
156
|
+
# @param terms_and_conditions [Boolean] Whether to analyze the terms and conditions page
|
157
|
+
end
|
89
158
|
end
|
90
159
|
end
|
91
160
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
# @see BrandDev::Resources::Brand#prefetch
|
6
|
+
class BrandPrefetchParams < 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 prefetch brand data for
|
12
|
+
#
|
13
|
+
# @return [String]
|
14
|
+
required :domain, String
|
15
|
+
|
16
|
+
# @!method initialize(domain:, request_options: {})
|
17
|
+
# @param domain [String] Domain name to prefetch brand data for
|
18
|
+
#
|
19
|
+
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
# @see BrandDev::Resources::Brand#prefetch
|
6
|
+
class BrandPrefetchResponse < BrandDev::Internal::Type::BaseModel
|
7
|
+
# @!attribute domain
|
8
|
+
# The domain that was queued for prefetching
|
9
|
+
#
|
10
|
+
# @return [String, nil]
|
11
|
+
optional :domain, String
|
12
|
+
|
13
|
+
# @!attribute message
|
14
|
+
# Success message
|
15
|
+
#
|
16
|
+
# @return [String, nil]
|
17
|
+
optional :message, String
|
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(domain: nil, message: nil, status: nil)
|
26
|
+
# @param domain [String] The domain that was queued for prefetching
|
27
|
+
#
|
28
|
+
# @param message [String] Success message
|
29
|
+
#
|
30
|
+
# @param status [String] Status of the response, e.g., 'ok'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/brand_dev/models.rb
CHANGED
@@ -11,16 +11,16 @@ module BrandDev
|
|
11
11
|
mod.constants.each do |name|
|
12
12
|
case mod.const_get(name)
|
13
13
|
in true | false
|
14
|
-
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T
|
14
|
+
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T::Boolean } }
|
15
15
|
mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
|
16
16
|
in Integer
|
17
|
-
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias {
|
17
|
+
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { Integer } }
|
18
18
|
mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
|
19
19
|
in Float
|
20
|
-
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias {
|
20
|
+
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { Float } }
|
21
21
|
mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
|
22
22
|
in Symbol
|
23
|
-
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias {
|
23
|
+
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { Symbol } }
|
24
24
|
mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
|
25
25
|
else
|
26
26
|
end
|
@@ -43,6 +43,8 @@ module BrandDev
|
|
43
43
|
|
44
44
|
BrandIdentifyFromTransactionParams = BrandDev::Models::BrandIdentifyFromTransactionParams
|
45
45
|
|
46
|
+
BrandPrefetchParams = BrandDev::Models::BrandPrefetchParams
|
47
|
+
|
46
48
|
BrandRetrieveByTickerParams = BrandDev::Models::BrandRetrieveByTickerParams
|
47
49
|
|
48
50
|
BrandRetrieveNaicsParams = BrandDev::Models::BrandRetrieveNaicsParams
|
@@ -37,7 +37,7 @@ module BrandDev
|
|
37
37
|
#
|
38
38
|
# @param domain [String] The domain name to analyze
|
39
39
|
#
|
40
|
-
# @param specific_pages [
|
40
|
+
# @param specific_pages [BrandDev::Models::BrandAIQueryParams::SpecificPages] Optional object specifying which pages to analyze
|
41
41
|
#
|
42
42
|
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
43
43
|
#
|
@@ -78,6 +78,31 @@ module BrandDev
|
|
78
78
|
)
|
79
79
|
end
|
80
80
|
|
81
|
+
# Signal that you may fetch brand data for a particular domain soon to improve
|
82
|
+
# latency. This endpoint does not charge credits and is available for paid
|
83
|
+
# customers to optimize future requests. [You must be on a paid plan to use this
|
84
|
+
# endpoint]
|
85
|
+
#
|
86
|
+
# @overload prefetch(domain:, request_options: {})
|
87
|
+
#
|
88
|
+
# @param domain [String] Domain name to prefetch brand data for
|
89
|
+
#
|
90
|
+
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
91
|
+
#
|
92
|
+
# @return [BrandDev::Models::BrandPrefetchResponse]
|
93
|
+
#
|
94
|
+
# @see BrandDev::Models::BrandPrefetchParams
|
95
|
+
def prefetch(params)
|
96
|
+
parsed, options = BrandDev::BrandPrefetchParams.dump_request(params)
|
97
|
+
@client.request(
|
98
|
+
method: :post,
|
99
|
+
path: "brand/prefetch",
|
100
|
+
body: parsed,
|
101
|
+
model: BrandDev::Models::BrandPrefetchResponse,
|
102
|
+
options: options
|
103
|
+
)
|
104
|
+
end
|
105
|
+
|
81
106
|
# Retrieve brand data by stock ticker (e.g. AAPL, TSLA, etc.)
|
82
107
|
#
|
83
108
|
# @overload retrieve_by_ticker(ticker:, request_options: {})
|
data/lib/brand_dev/version.rb
CHANGED
data/lib/brand_dev.rb
CHANGED
@@ -54,6 +54,8 @@ require_relative "brand_dev/models/brand_ai_query_params"
|
|
54
54
|
require_relative "brand_dev/models/brand_ai_query_response"
|
55
55
|
require_relative "brand_dev/models/brand_identify_from_transaction_params"
|
56
56
|
require_relative "brand_dev/models/brand_identify_from_transaction_response"
|
57
|
+
require_relative "brand_dev/models/brand_prefetch_params"
|
58
|
+
require_relative "brand_dev/models/brand_prefetch_response"
|
57
59
|
require_relative "brand_dev/models/brand_retrieve_by_ticker_params"
|
58
60
|
require_relative "brand_dev/models/brand_retrieve_by_ticker_response"
|
59
61
|
require_relative "brand_dev/models/brand_retrieve_naics_params"
|
@@ -332,6 +332,8 @@ module BrandDev
|
|
332
332
|
end
|
333
333
|
|
334
334
|
# @api private
|
335
|
+
#
|
336
|
+
# https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#special-considerations-for-multipart-content
|
335
337
|
sig do
|
336
338
|
params(body: T.anything).returns([String, T::Enumerable[String]])
|
337
339
|
end
|
@@ -19,11 +19,15 @@ module BrandDev
|
|
19
19
|
sig { returns(String) }
|
20
20
|
attr_accessor :domain
|
21
21
|
|
22
|
-
# Optional
|
23
|
-
sig { returns(T.nilable(
|
22
|
+
# Optional object specifying which pages to analyze
|
23
|
+
sig { returns(T.nilable(BrandDev::BrandAIQueryParams::SpecificPages)) }
|
24
24
|
attr_reader :specific_pages
|
25
25
|
|
26
|
-
sig
|
26
|
+
sig do
|
27
|
+
params(
|
28
|
+
specific_pages: BrandDev::BrandAIQueryParams::SpecificPages::OrHash
|
29
|
+
).void
|
30
|
+
end
|
27
31
|
attr_writer :specific_pages
|
28
32
|
|
29
33
|
sig do
|
@@ -31,7 +35,7 @@ module BrandDev
|
|
31
35
|
data_to_extract:
|
32
36
|
T::Array[BrandDev::BrandAIQueryParams::DataToExtract::OrHash],
|
33
37
|
domain: String,
|
34
|
-
specific_pages:
|
38
|
+
specific_pages: BrandDev::BrandAIQueryParams::SpecificPages::OrHash,
|
35
39
|
request_options: BrandDev::RequestOptions::OrHash
|
36
40
|
).returns(T.attached_class)
|
37
41
|
end
|
@@ -40,7 +44,7 @@ module BrandDev
|
|
40
44
|
data_to_extract:,
|
41
45
|
# The domain name to analyze
|
42
46
|
domain:,
|
43
|
-
# Optional
|
47
|
+
# Optional object specifying which pages to analyze
|
44
48
|
specific_pages: nil,
|
45
49
|
request_options: {}
|
46
50
|
)
|
@@ -52,7 +56,7 @@ module BrandDev
|
|
52
56
|
data_to_extract:
|
53
57
|
T::Array[BrandDev::BrandAIQueryParams::DataToExtract],
|
54
58
|
domain: String,
|
55
|
-
specific_pages:
|
59
|
+
specific_pages: BrandDev::BrandAIQueryParams::SpecificPages,
|
56
60
|
request_options: BrandDev::RequestOptions
|
57
61
|
}
|
58
62
|
)
|
@@ -179,6 +183,122 @@ module BrandDev
|
|
179
183
|
end
|
180
184
|
end
|
181
185
|
end
|
186
|
+
|
187
|
+
class SpecificPages < BrandDev::Internal::Type::BaseModel
|
188
|
+
OrHash =
|
189
|
+
T.type_alias do
|
190
|
+
T.any(
|
191
|
+
BrandDev::BrandAIQueryParams::SpecificPages,
|
192
|
+
BrandDev::Internal::AnyHash
|
193
|
+
)
|
194
|
+
end
|
195
|
+
|
196
|
+
# Whether to analyze the about us page
|
197
|
+
sig { returns(T.nilable(T::Boolean)) }
|
198
|
+
attr_reader :about_us
|
199
|
+
|
200
|
+
sig { params(about_us: T::Boolean).void }
|
201
|
+
attr_writer :about_us
|
202
|
+
|
203
|
+
# Whether to analyze the blog
|
204
|
+
sig { returns(T.nilable(T::Boolean)) }
|
205
|
+
attr_reader :blog
|
206
|
+
|
207
|
+
sig { params(blog: T::Boolean).void }
|
208
|
+
attr_writer :blog
|
209
|
+
|
210
|
+
# Whether to analyze the careers page
|
211
|
+
sig { returns(T.nilable(T::Boolean)) }
|
212
|
+
attr_reader :careers
|
213
|
+
|
214
|
+
sig { params(careers: T::Boolean).void }
|
215
|
+
attr_writer :careers
|
216
|
+
|
217
|
+
# Whether to analyze the contact us page
|
218
|
+
sig { returns(T.nilable(T::Boolean)) }
|
219
|
+
attr_reader :contact_us
|
220
|
+
|
221
|
+
sig { params(contact_us: T::Boolean).void }
|
222
|
+
attr_writer :contact_us
|
223
|
+
|
224
|
+
# Whether to analyze the FAQ page
|
225
|
+
sig { returns(T.nilable(T::Boolean)) }
|
226
|
+
attr_reader :faq
|
227
|
+
|
228
|
+
sig { params(faq: T::Boolean).void }
|
229
|
+
attr_writer :faq
|
230
|
+
|
231
|
+
# Whether to analyze the home page
|
232
|
+
sig { returns(T.nilable(T::Boolean)) }
|
233
|
+
attr_reader :home_page
|
234
|
+
|
235
|
+
sig { params(home_page: T::Boolean).void }
|
236
|
+
attr_writer :home_page
|
237
|
+
|
238
|
+
# Whether to analyze the privacy policy page
|
239
|
+
sig { returns(T.nilable(T::Boolean)) }
|
240
|
+
attr_reader :privacy_policy
|
241
|
+
|
242
|
+
sig { params(privacy_policy: T::Boolean).void }
|
243
|
+
attr_writer :privacy_policy
|
244
|
+
|
245
|
+
# Whether to analyze the terms and conditions page
|
246
|
+
sig { returns(T.nilable(T::Boolean)) }
|
247
|
+
attr_reader :terms_and_conditions
|
248
|
+
|
249
|
+
sig { params(terms_and_conditions: T::Boolean).void }
|
250
|
+
attr_writer :terms_and_conditions
|
251
|
+
|
252
|
+
# Optional object specifying which pages to analyze
|
253
|
+
sig do
|
254
|
+
params(
|
255
|
+
about_us: T::Boolean,
|
256
|
+
blog: T::Boolean,
|
257
|
+
careers: T::Boolean,
|
258
|
+
contact_us: T::Boolean,
|
259
|
+
faq: T::Boolean,
|
260
|
+
home_page: T::Boolean,
|
261
|
+
privacy_policy: T::Boolean,
|
262
|
+
terms_and_conditions: T::Boolean
|
263
|
+
).returns(T.attached_class)
|
264
|
+
end
|
265
|
+
def self.new(
|
266
|
+
# Whether to analyze the about us page
|
267
|
+
about_us: nil,
|
268
|
+
# Whether to analyze the blog
|
269
|
+
blog: nil,
|
270
|
+
# Whether to analyze the careers page
|
271
|
+
careers: nil,
|
272
|
+
# Whether to analyze the contact us page
|
273
|
+
contact_us: nil,
|
274
|
+
# Whether to analyze the FAQ page
|
275
|
+
faq: nil,
|
276
|
+
# Whether to analyze the home page
|
277
|
+
home_page: nil,
|
278
|
+
# Whether to analyze the privacy policy page
|
279
|
+
privacy_policy: nil,
|
280
|
+
# Whether to analyze the terms and conditions page
|
281
|
+
terms_and_conditions: nil
|
282
|
+
)
|
283
|
+
end
|
284
|
+
|
285
|
+
sig do
|
286
|
+
override.returns(
|
287
|
+
{
|
288
|
+
about_us: T::Boolean,
|
289
|
+
blog: T::Boolean,
|
290
|
+
careers: T::Boolean,
|
291
|
+
contact_us: T::Boolean,
|
292
|
+
faq: T::Boolean,
|
293
|
+
home_page: T::Boolean,
|
294
|
+
privacy_policy: T::Boolean,
|
295
|
+
terms_and_conditions: T::Boolean
|
296
|
+
}
|
297
|
+
)
|
298
|
+
end
|
299
|
+
def to_hash
|
300
|
+
end
|
301
|
+
end
|
182
302
|
end
|
183
303
|
end
|
184
304
|
end
|
@@ -0,0 +1,40 @@
|
|
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
|
+
sig do
|
19
|
+
params(
|
20
|
+
domain: String,
|
21
|
+
request_options: BrandDev::RequestOptions::OrHash
|
22
|
+
).returns(T.attached_class)
|
23
|
+
end
|
24
|
+
def self.new(
|
25
|
+
# Domain name to prefetch brand data for
|
26
|
+
domain:,
|
27
|
+
request_options: {}
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
sig do
|
32
|
+
override.returns(
|
33
|
+
{ domain: String, request_options: BrandDev::RequestOptions }
|
34
|
+
)
|
35
|
+
end
|
36
|
+
def to_hash
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
class BrandPrefetchResponse < BrandDev::Internal::Type::BaseModel
|
6
|
+
OrHash =
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
BrandDev::Models::BrandPrefetchResponse,
|
10
|
+
BrandDev::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
14
|
+
# The domain that was queued for prefetching
|
15
|
+
sig { returns(T.nilable(String)) }
|
16
|
+
attr_reader :domain
|
17
|
+
|
18
|
+
sig { params(domain: String).void }
|
19
|
+
attr_writer :domain
|
20
|
+
|
21
|
+
# Success message
|
22
|
+
sig { returns(T.nilable(String)) }
|
23
|
+
attr_reader :message
|
24
|
+
|
25
|
+
sig { params(message: String).void }
|
26
|
+
attr_writer :message
|
27
|
+
|
28
|
+
# Status of the response, e.g., 'ok'
|
29
|
+
sig { returns(T.nilable(String)) }
|
30
|
+
attr_reader :status
|
31
|
+
|
32
|
+
sig { params(status: String).void }
|
33
|
+
attr_writer :status
|
34
|
+
|
35
|
+
sig do
|
36
|
+
params(domain: String, message: String, status: String).returns(
|
37
|
+
T.attached_class
|
38
|
+
)
|
39
|
+
end
|
40
|
+
def self.new(
|
41
|
+
# The domain that was queued for prefetching
|
42
|
+
domain: nil,
|
43
|
+
# Success message
|
44
|
+
message: nil,
|
45
|
+
# Status of the response, e.g., 'ok'
|
46
|
+
status: nil
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
sig do
|
51
|
+
override.returns({ domain: String, message: String, status: String })
|
52
|
+
end
|
53
|
+
def to_hash
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/rbi/brand_dev/models.rbi
CHANGED
@@ -6,6 +6,8 @@ module BrandDev
|
|
6
6
|
BrandIdentifyFromTransactionParams =
|
7
7
|
BrandDev::Models::BrandIdentifyFromTransactionParams
|
8
8
|
|
9
|
+
BrandPrefetchParams = BrandDev::Models::BrandPrefetchParams
|
10
|
+
|
9
11
|
BrandRetrieveByTickerParams = BrandDev::Models::BrandRetrieveByTickerParams
|
10
12
|
|
11
13
|
BrandRetrieveNaicsParams = BrandDev::Models::BrandRetrieveNaicsParams
|
@@ -29,7 +29,7 @@ module BrandDev
|
|
29
29
|
data_to_extract:
|
30
30
|
T::Array[BrandDev::BrandAIQueryParams::DataToExtract::OrHash],
|
31
31
|
domain: String,
|
32
|
-
specific_pages:
|
32
|
+
specific_pages: BrandDev::BrandAIQueryParams::SpecificPages::OrHash,
|
33
33
|
request_options: BrandDev::RequestOptions::OrHash
|
34
34
|
).returns(BrandDev::Models::BrandAIQueryResponse)
|
35
35
|
end
|
@@ -38,7 +38,7 @@ module BrandDev
|
|
38
38
|
data_to_extract:,
|
39
39
|
# The domain name to analyze
|
40
40
|
domain:,
|
41
|
-
# Optional
|
41
|
+
# Optional object specifying which pages to analyze
|
42
42
|
specific_pages: nil,
|
43
43
|
request_options: {}
|
44
44
|
)
|
@@ -59,6 +59,23 @@ module BrandDev
|
|
59
59
|
)
|
60
60
|
end
|
61
61
|
|
62
|
+
# Signal that you may fetch brand data for a particular domain soon to improve
|
63
|
+
# latency. This endpoint does not charge credits and is available for paid
|
64
|
+
# customers to optimize future requests. [You must be on a paid plan to use this
|
65
|
+
# endpoint]
|
66
|
+
sig do
|
67
|
+
params(
|
68
|
+
domain: String,
|
69
|
+
request_options: BrandDev::RequestOptions::OrHash
|
70
|
+
).returns(BrandDev::Models::BrandPrefetchResponse)
|
71
|
+
end
|
72
|
+
def prefetch(
|
73
|
+
# Domain name to prefetch brand data for
|
74
|
+
domain:,
|
75
|
+
request_options: {}
|
76
|
+
)
|
77
|
+
end
|
78
|
+
|
62
79
|
# Retrieve brand data by stock ticker (e.g. AAPL, TSLA, etc.)
|
63
80
|
sig do
|
64
81
|
params(
|
@@ -4,7 +4,7 @@ module BrandDev
|
|
4
4
|
{
|
5
5
|
data_to_extract: ::Array[BrandDev::BrandAIQueryParams::DataToExtract],
|
6
6
|
domain: String,
|
7
|
-
specific_pages: ::
|
7
|
+
specific_pages: BrandDev::BrandAIQueryParams::SpecificPages
|
8
8
|
}
|
9
9
|
& BrandDev::Internal::Type::request_parameters
|
10
10
|
|
@@ -16,21 +16,23 @@ module BrandDev
|
|
16
16
|
|
17
17
|
attr_accessor domain: String
|
18
18
|
|
19
|
-
attr_reader specific_pages: ::
|
19
|
+
attr_reader specific_pages: BrandDev::BrandAIQueryParams::SpecificPages?
|
20
20
|
|
21
|
-
def specific_pages=: (
|
21
|
+
def specific_pages=: (
|
22
|
+
BrandDev::BrandAIQueryParams::SpecificPages
|
23
|
+
) -> BrandDev::BrandAIQueryParams::SpecificPages
|
22
24
|
|
23
25
|
def initialize: (
|
24
26
|
data_to_extract: ::Array[BrandDev::BrandAIQueryParams::DataToExtract],
|
25
27
|
domain: String,
|
26
|
-
?specific_pages: ::
|
28
|
+
?specific_pages: BrandDev::BrandAIQueryParams::SpecificPages,
|
27
29
|
?request_options: BrandDev::request_opts
|
28
30
|
) -> void
|
29
31
|
|
30
32
|
def to_hash: -> {
|
31
33
|
data_to_extract: ::Array[BrandDev::BrandAIQueryParams::DataToExtract],
|
32
34
|
domain: String,
|
33
|
-
specific_pages: ::
|
35
|
+
specific_pages: BrandDev::BrandAIQueryParams::SpecificPages,
|
34
36
|
request_options: BrandDev::RequestOptions
|
35
37
|
}
|
36
38
|
|
@@ -80,6 +82,74 @@ module BrandDev
|
|
80
82
|
def self?.values: -> ::Array[BrandDev::Models::BrandAIQueryParams::DataToExtract::datapoint_type]
|
81
83
|
end
|
82
84
|
end
|
85
|
+
|
86
|
+
type specific_pages =
|
87
|
+
{
|
88
|
+
about_us: bool,
|
89
|
+
blog: bool,
|
90
|
+
careers: bool,
|
91
|
+
contact_us: bool,
|
92
|
+
faq: bool,
|
93
|
+
home_page: bool,
|
94
|
+
privacy_policy: bool,
|
95
|
+
terms_and_conditions: bool
|
96
|
+
}
|
97
|
+
|
98
|
+
class SpecificPages < BrandDev::Internal::Type::BaseModel
|
99
|
+
attr_reader about_us: bool?
|
100
|
+
|
101
|
+
def about_us=: (bool) -> bool
|
102
|
+
|
103
|
+
attr_reader blog: bool?
|
104
|
+
|
105
|
+
def blog=: (bool) -> bool
|
106
|
+
|
107
|
+
attr_reader careers: bool?
|
108
|
+
|
109
|
+
def careers=: (bool) -> bool
|
110
|
+
|
111
|
+
attr_reader contact_us: bool?
|
112
|
+
|
113
|
+
def contact_us=: (bool) -> bool
|
114
|
+
|
115
|
+
attr_reader faq: bool?
|
116
|
+
|
117
|
+
def faq=: (bool) -> bool
|
118
|
+
|
119
|
+
attr_reader home_page: bool?
|
120
|
+
|
121
|
+
def home_page=: (bool) -> bool
|
122
|
+
|
123
|
+
attr_reader privacy_policy: bool?
|
124
|
+
|
125
|
+
def privacy_policy=: (bool) -> bool
|
126
|
+
|
127
|
+
attr_reader terms_and_conditions: bool?
|
128
|
+
|
129
|
+
def terms_and_conditions=: (bool) -> bool
|
130
|
+
|
131
|
+
def initialize: (
|
132
|
+
?about_us: bool,
|
133
|
+
?blog: bool,
|
134
|
+
?careers: bool,
|
135
|
+
?contact_us: bool,
|
136
|
+
?faq: bool,
|
137
|
+
?home_page: bool,
|
138
|
+
?privacy_policy: bool,
|
139
|
+
?terms_and_conditions: bool
|
140
|
+
) -> void
|
141
|
+
|
142
|
+
def to_hash: -> {
|
143
|
+
about_us: bool,
|
144
|
+
blog: bool,
|
145
|
+
careers: bool,
|
146
|
+
contact_us: bool,
|
147
|
+
faq: bool,
|
148
|
+
home_page: bool,
|
149
|
+
privacy_policy: bool,
|
150
|
+
terms_and_conditions: bool
|
151
|
+
}
|
152
|
+
end
|
83
153
|
end
|
84
154
|
end
|
85
155
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module BrandDev
|
2
|
+
module Models
|
3
|
+
type brand_prefetch_params =
|
4
|
+
{ domain: String } & BrandDev::Internal::Type::request_parameters
|
5
|
+
|
6
|
+
class BrandPrefetchParams < BrandDev::Internal::Type::BaseModel
|
7
|
+
extend BrandDev::Internal::Type::RequestParameters::Converter
|
8
|
+
include BrandDev::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
attr_accessor domain: String
|
11
|
+
|
12
|
+
def initialize: (
|
13
|
+
domain: String,
|
14
|
+
?request_options: BrandDev::request_opts
|
15
|
+
) -> void
|
16
|
+
|
17
|
+
def to_hash: -> {
|
18
|
+
domain: String,
|
19
|
+
request_options: BrandDev::RequestOptions
|
20
|
+
}
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module BrandDev
|
2
|
+
module Models
|
3
|
+
type brand_prefetch_response =
|
4
|
+
{ domain: String, message: String, status: String }
|
5
|
+
|
6
|
+
class BrandPrefetchResponse < BrandDev::Internal::Type::BaseModel
|
7
|
+
attr_reader domain: String?
|
8
|
+
|
9
|
+
def domain=: (String) -> String
|
10
|
+
|
11
|
+
attr_reader message: String?
|
12
|
+
|
13
|
+
def message=: (String) -> String
|
14
|
+
|
15
|
+
attr_reader status: String?
|
16
|
+
|
17
|
+
def status=: (String) -> String
|
18
|
+
|
19
|
+
def initialize: (
|
20
|
+
?domain: String,
|
21
|
+
?message: String,
|
22
|
+
?status: String
|
23
|
+
) -> void
|
24
|
+
|
25
|
+
def to_hash: -> { domain: String, message: String, status: String }
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/sig/brand_dev/models.rbs
CHANGED
@@ -3,6 +3,8 @@ module BrandDev
|
|
3
3
|
|
4
4
|
class BrandIdentifyFromTransactionParams = BrandDev::Models::BrandIdentifyFromTransactionParams
|
5
5
|
|
6
|
+
class BrandPrefetchParams = BrandDev::Models::BrandPrefetchParams
|
7
|
+
|
6
8
|
class BrandRetrieveByTickerParams = BrandDev::Models::BrandRetrieveByTickerParams
|
7
9
|
|
8
10
|
class BrandRetrieveNaicsParams = BrandDev::Models::BrandRetrieveNaicsParams
|
@@ -10,7 +10,7 @@ module BrandDev
|
|
10
10
|
def ai_query: (
|
11
11
|
data_to_extract: ::Array[BrandDev::BrandAIQueryParams::DataToExtract],
|
12
12
|
domain: String,
|
13
|
-
?specific_pages: ::
|
13
|
+
?specific_pages: BrandDev::BrandAIQueryParams::SpecificPages,
|
14
14
|
?request_options: BrandDev::request_opts
|
15
15
|
) -> BrandDev::Models::BrandAIQueryResponse
|
16
16
|
|
@@ -19,6 +19,11 @@ module BrandDev
|
|
19
19
|
?request_options: BrandDev::request_opts
|
20
20
|
) -> BrandDev::Models::BrandIdentifyFromTransactionResponse
|
21
21
|
|
22
|
+
def prefetch: (
|
23
|
+
domain: String,
|
24
|
+
?request_options: BrandDev::request_opts
|
25
|
+
) -> BrandDev::Models::BrandPrefetchResponse
|
26
|
+
|
22
27
|
def retrieve_by_ticker: (
|
23
28
|
ticker: String,
|
24
29
|
?request_options: BrandDev::request_opts
|
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.1.0.pre.alpha.
|
4
|
+
version: 0.1.0.pre.alpha.3
|
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-06-
|
11
|
+
date: 2025-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|
@@ -58,6 +58,8 @@ files:
|
|
58
58
|
- lib/brand_dev/models/brand_ai_query_response.rb
|
59
59
|
- lib/brand_dev/models/brand_identify_from_transaction_params.rb
|
60
60
|
- lib/brand_dev/models/brand_identify_from_transaction_response.rb
|
61
|
+
- lib/brand_dev/models/brand_prefetch_params.rb
|
62
|
+
- lib/brand_dev/models/brand_prefetch_response.rb
|
61
63
|
- lib/brand_dev/models/brand_retrieve_by_ticker_params.rb
|
62
64
|
- lib/brand_dev/models/brand_retrieve_by_ticker_response.rb
|
63
65
|
- lib/brand_dev/models/brand_retrieve_naics_params.rb
|
@@ -93,6 +95,8 @@ files:
|
|
93
95
|
- rbi/brand_dev/models/brand_ai_query_response.rbi
|
94
96
|
- rbi/brand_dev/models/brand_identify_from_transaction_params.rbi
|
95
97
|
- rbi/brand_dev/models/brand_identify_from_transaction_response.rbi
|
98
|
+
- rbi/brand_dev/models/brand_prefetch_params.rbi
|
99
|
+
- rbi/brand_dev/models/brand_prefetch_response.rbi
|
96
100
|
- rbi/brand_dev/models/brand_retrieve_by_ticker_params.rbi
|
97
101
|
- rbi/brand_dev/models/brand_retrieve_by_ticker_response.rbi
|
98
102
|
- rbi/brand_dev/models/brand_retrieve_naics_params.rbi
|
@@ -127,6 +131,8 @@ files:
|
|
127
131
|
- sig/brand_dev/models/brand_ai_query_response.rbs
|
128
132
|
- sig/brand_dev/models/brand_identify_from_transaction_params.rbs
|
129
133
|
- sig/brand_dev/models/brand_identify_from_transaction_response.rbs
|
134
|
+
- sig/brand_dev/models/brand_prefetch_params.rbs
|
135
|
+
- sig/brand_dev/models/brand_prefetch_response.rbs
|
130
136
|
- sig/brand_dev/models/brand_retrieve_by_ticker_params.rbs
|
131
137
|
- sig/brand_dev/models/brand_retrieve_by_ticker_response.rbs
|
132
138
|
- sig/brand_dev/models/brand_retrieve_naics_params.rbs
|