context.dev 1.36.0 → 2.1.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 +35 -0
- data/README.md +16 -9
- data/lib/context_dev/client.rb +7 -0
- data/lib/context_dev/models/brand_retrieve_params.rb +1079 -174
- data/lib/context_dev/models/monitor_create_params.rb +364 -0
- data/lib/context_dev/models/monitor_create_response.rb +608 -0
- data/lib/context_dev/models/monitor_delete_params.rb +20 -0
- data/lib/context_dev/models/monitor_delete_response.rb +22 -0
- data/lib/context_dev/models/monitor_list_account_changes_params.rb +93 -0
- data/lib/context_dev/models/monitor_list_account_changes_response.rb +199 -0
- data/lib/context_dev/models/monitor_list_account_runs_params.rb +55 -0
- data/lib/context_dev/models/monitor_list_account_runs_response.rb +227 -0
- data/lib/context_dev/models/monitor_list_changes_params.rb +57 -0
- data/lib/context_dev/models/monitor_list_changes_response.rb +198 -0
- data/lib/context_dev/models/monitor_list_params.rb +161 -0
- data/lib/context_dev/models/monitor_list_response.rb +631 -0
- data/lib/context_dev/models/monitor_list_runs_params.rb +62 -0
- data/lib/context_dev/models/monitor_list_runs_response.rb +227 -0
- data/lib/context_dev/models/monitor_retrieve_change_params.rb +20 -0
- data/lib/context_dev/models/monitor_retrieve_change_response.rb +264 -0
- data/lib/context_dev/models/monitor_retrieve_params.rb +20 -0
- data/lib/context_dev/models/monitor_retrieve_response.rb +608 -0
- data/lib/context_dev/models/monitor_run_params.rb +20 -0
- data/lib/context_dev/models/monitor_run_response.rb +35 -0
- data/lib/context_dev/models/monitor_update_params.rb +371 -0
- data/lib/context_dev/models/monitor_update_response.rb +608 -0
- data/lib/context_dev/models/utility_prefetch_params.rb +70 -6
- data/lib/context_dev/models/utility_prefetch_response.rb +23 -1
- data/lib/context_dev/models/web_extract_response.rb +17 -1
- data/lib/context_dev/models/web_web_crawl_md_params.rb +11 -1
- data/lib/context_dev/models/web_web_scrape_html_params.rb +11 -1
- data/lib/context_dev/models/web_web_scrape_html_response.rb +10 -2
- data/lib/context_dev/models/web_web_scrape_images_params.rb +12 -1
- data/lib/context_dev/models/web_web_scrape_md_params.rb +11 -1
- data/lib/context_dev/models.rb +20 -12
- data/lib/context_dev/resources/ai.rb +0 -33
- data/lib/context_dev/resources/brand.rb +9 -204
- data/lib/context_dev/resources/monitors.rb +352 -0
- data/lib/context_dev/resources/utility.rb +9 -35
- data/lib/context_dev/resources/web.rb +14 -4
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +23 -14
- data/rbi/context_dev/client.rbi +6 -0
- data/rbi/context_dev/models/brand_retrieve_params.rbi +3858 -678
- data/rbi/context_dev/models/monitor_create_params.rbi +641 -0
- data/rbi/context_dev/models/monitor_create_response.rbi +1020 -0
- data/rbi/context_dev/models/monitor_delete_params.rbi +35 -0
- data/rbi/context_dev/models/monitor_delete_response.rbi +29 -0
- data/rbi/context_dev/models/monitor_list_account_changes_params.rbi +211 -0
- data/rbi/context_dev/models/monitor_list_account_changes_response.rbi +376 -0
- data/rbi/context_dev/models/monitor_list_account_runs_params.rbi +125 -0
- data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +464 -0
- data/rbi/context_dev/models/monitor_list_changes_params.rbi +91 -0
- data/rbi/context_dev/models/monitor_list_changes_response.rbi +372 -0
- data/rbi/context_dev/models/monitor_list_params.rbi +335 -0
- data/rbi/context_dev/models/monitor_list_response.rbi +1089 -0
- data/rbi/context_dev/models/monitor_list_runs_params.rbi +125 -0
- data/rbi/context_dev/models/monitor_list_runs_response.rbi +455 -0
- data/rbi/context_dev/models/monitor_retrieve_change_params.rbi +38 -0
- data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +469 -0
- data/rbi/context_dev/models/monitor_retrieve_params.rbi +38 -0
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +1028 -0
- data/rbi/context_dev/models/monitor_run_params.rbi +35 -0
- data/rbi/context_dev/models/monitor_run_response.rbi +48 -0
- data/rbi/context_dev/models/monitor_update_params.rbi +681 -0
- data/rbi/context_dev/models/monitor_update_response.rbi +1020 -0
- data/rbi/context_dev/models/utility_prefetch_params.rbi +129 -7
- data/rbi/context_dev/models/utility_prefetch_response.rbi +55 -3
- data/rbi/context_dev/models/web_extract_response.rbi +10 -0
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +15 -0
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +15 -0
- data/rbi/context_dev/models/web_web_scrape_html_response.rbi +29 -3
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +17 -0
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +15 -0
- data/rbi/context_dev/models.rbi +23 -15
- data/rbi/context_dev/resources/ai.rbi +0 -28
- data/rbi/context_dev/resources/brand.rbi +16 -228
- data/rbi/context_dev/resources/monitors.rbi +286 -0
- data/rbi/context_dev/resources/utility.rbi +14 -29
- data/rbi/context_dev/resources/web.rbi +21 -0
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/brand_retrieve_params.rbs +1586 -281
- data/sig/context_dev/models/monitor_create_params.rbs +301 -0
- data/sig/context_dev/models/monitor_create_response.rbs +433 -0
- data/sig/context_dev/models/monitor_delete_params.rbs +23 -0
- data/sig/context_dev/models/monitor_delete_response.rbs +15 -0
- data/sig/context_dev/models/monitor_list_account_changes_params.rbs +104 -0
- data/sig/context_dev/models/monitor_list_account_changes_response.rbs +176 -0
- data/sig/context_dev/models/monitor_list_account_runs_params.rbs +58 -0
- data/sig/context_dev/models/monitor_list_account_runs_response.rbs +184 -0
- data/sig/context_dev/models/monitor_list_changes_params.rbs +61 -0
- data/sig/context_dev/models/monitor_list_changes_response.rbs +176 -0
- data/sig/context_dev/models/monitor_list_params.rbs +160 -0
- data/sig/context_dev/models/monitor_list_response.rbs +460 -0
- data/sig/context_dev/models/monitor_list_runs_params.rbs +63 -0
- data/sig/context_dev/models/monitor_list_runs_response.rbs +184 -0
- data/sig/context_dev/models/monitor_retrieve_change_params.rbs +23 -0
- data/sig/context_dev/models/monitor_retrieve_change_response.rbs +221 -0
- data/sig/context_dev/models/monitor_retrieve_params.rbs +23 -0
- data/sig/context_dev/models/monitor_retrieve_response.rbs +433 -0
- data/sig/context_dev/models/monitor_run_params.rbs +23 -0
- data/sig/context_dev/models/monitor_run_response.rbs +18 -0
- data/sig/context_dev/models/monitor_update_params.rbs +321 -0
- data/sig/context_dev/models/monitor_update_response.rbs +433 -0
- data/sig/context_dev/models/utility_prefetch_params.rbs +52 -4
- data/sig/context_dev/models/utility_prefetch_response.rbs +22 -3
- data/sig/context_dev/models/web_extract_response.rbs +5 -0
- data/sig/context_dev/models/web_web_crawl_md_params.rbs +7 -0
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +7 -0
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +8 -0
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +7 -0
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +7 -0
- data/sig/context_dev/models.rbs +20 -12
- data/sig/context_dev/resources/ai.rbs +0 -8
- data/sig/context_dev/resources/brand.rbs +1 -56
- data/sig/context_dev/resources/monitors.rbs +101 -0
- data/sig/context_dev/resources/utility.rbs +2 -7
- data/sig/context_dev/resources/web.rbs +4 -0
- metadata +71 -44
- data/lib/context_dev/models/ai_ai_query_params.rb +0 -235
- data/lib/context_dev/models/ai_ai_query_response.rb +0 -133
- data/lib/context_dev/models/brand_identify_from_transaction_params.rb +0 -474
- data/lib/context_dev/models/brand_identify_from_transaction_response.rb +0 -1074
- data/lib/context_dev/models/brand_retrieve_by_email_params.rb +0 -195
- data/lib/context_dev/models/brand_retrieve_by_email_response.rb +0 -1071
- data/lib/context_dev/models/brand_retrieve_by_isin_params.rb +0 -195
- data/lib/context_dev/models/brand_retrieve_by_isin_response.rb +0 -1070
- data/lib/context_dev/models/brand_retrieve_by_name_params.rb +0 -452
- data/lib/context_dev/models/brand_retrieve_by_name_response.rb +0 -1070
- data/lib/context_dev/models/brand_retrieve_by_ticker_params.rb +0 -283
- data/lib/context_dev/models/brand_retrieve_by_ticker_response.rb +0 -1072
- data/lib/context_dev/models/utility_prefetch_by_email_params.rb +0 -37
- data/lib/context_dev/models/utility_prefetch_by_email_response.rb +0 -68
- data/rbi/context_dev/models/ai_ai_query_params.rbi +0 -504
- data/rbi/context_dev/models/ai_ai_query_response.rbi +0 -267
- data/rbi/context_dev/models/brand_identify_from_transaction_params.rbi +0 -2020
- data/rbi/context_dev/models/brand_identify_from_transaction_response.rbi +0 -3515
- data/rbi/context_dev/models/brand_retrieve_by_email_params.rbi +0 -743
- data/rbi/context_dev/models/brand_retrieve_by_email_response.rbi +0 -3511
- data/rbi/context_dev/models/brand_retrieve_by_isin_params.rbi +0 -743
- data/rbi/context_dev/models/brand_retrieve_by_isin_response.rbi +0 -3510
- data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +0 -1982
- data/rbi/context_dev/models/brand_retrieve_by_name_response.rbi +0 -3510
- data/rbi/context_dev/models/brand_retrieve_by_ticker_params.rbi +0 -1153
- data/rbi/context_dev/models/brand_retrieve_by_ticker_response.rbi +0 -3512
- data/rbi/context_dev/models/utility_prefetch_by_email_params.rbi +0 -65
- data/rbi/context_dev/models/utility_prefetch_by_email_response.rbi +0 -132
- data/sig/context_dev/models/ai_ai_query_params.rbs +0 -218
- data/sig/context_dev/models/ai_ai_query_response.rbs +0 -121
- data/sig/context_dev/models/brand_identify_from_transaction_params.rbs +0 -822
- data/sig/context_dev/models/brand_identify_from_transaction_response.rbs +0 -1441
- data/sig/context_dev/models/brand_retrieve_by_email_params.rbs +0 -305
- data/sig/context_dev/models/brand_retrieve_by_email_response.rbs +0 -1441
- data/sig/context_dev/models/brand_retrieve_by_isin_params.rbs +0 -305
- data/sig/context_dev/models/brand_retrieve_by_isin_response.rbs +0 -1441
- data/sig/context_dev/models/brand_retrieve_by_name_params.rbs +0 -801
- data/sig/context_dev/models/brand_retrieve_by_name_response.rbs +0 -1441
- data/sig/context_dev/models/brand_retrieve_by_ticker_params.rbs +0 -467
- data/sig/context_dev/models/brand_retrieve_by_ticker_response.rbs +0 -1441
- data/sig/context_dev/models/utility_prefetch_by_email_params.rbs +0 -30
- data/sig/context_dev/models/utility_prefetch_by_email_response.rbs +0 -64
|
@@ -14,9 +14,20 @@ module ContextDev
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
#
|
|
18
|
-
sig
|
|
19
|
-
|
|
17
|
+
# Identifier of the brand to prefetch. Provide exactly one of domain or email.
|
|
18
|
+
sig do
|
|
19
|
+
returns(
|
|
20
|
+
T.any(
|
|
21
|
+
ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier,
|
|
22
|
+
ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier
|
|
23
|
+
)
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
attr_accessor :identifier
|
|
27
|
+
|
|
28
|
+
# What to prefetch. Currently only 'brand' is supported.
|
|
29
|
+
sig { returns(ContextDev::UtilityPrefetchParams::Type::OrSymbol) }
|
|
30
|
+
attr_accessor :type
|
|
20
31
|
|
|
21
32
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
22
33
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
@@ -29,14 +40,21 @@ module ContextDev
|
|
|
29
40
|
|
|
30
41
|
sig do
|
|
31
42
|
params(
|
|
32
|
-
|
|
43
|
+
identifier:
|
|
44
|
+
T.any(
|
|
45
|
+
ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier::OrHash,
|
|
46
|
+
ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier::OrHash
|
|
47
|
+
),
|
|
48
|
+
type: ContextDev::UtilityPrefetchParams::Type::OrSymbol,
|
|
33
49
|
timeout_ms: Integer,
|
|
34
50
|
request_options: ContextDev::RequestOptions::OrHash
|
|
35
51
|
).returns(T.attached_class)
|
|
36
52
|
end
|
|
37
53
|
def self.new(
|
|
38
|
-
#
|
|
39
|
-
|
|
54
|
+
# Identifier of the brand to prefetch. Provide exactly one of domain or email.
|
|
55
|
+
identifier:,
|
|
56
|
+
# What to prefetch. Currently only 'brand' is supported.
|
|
57
|
+
type:,
|
|
40
58
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
41
59
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
42
60
|
# value is 300000ms (5 minutes).
|
|
@@ -48,7 +66,12 @@ module ContextDev
|
|
|
48
66
|
sig do
|
|
49
67
|
override.returns(
|
|
50
68
|
{
|
|
51
|
-
|
|
69
|
+
identifier:
|
|
70
|
+
T.any(
|
|
71
|
+
ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier,
|
|
72
|
+
ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier
|
|
73
|
+
),
|
|
74
|
+
type: ContextDev::UtilityPrefetchParams::Type::OrSymbol,
|
|
52
75
|
timeout_ms: Integer,
|
|
53
76
|
request_options: ContextDev::RequestOptions
|
|
54
77
|
}
|
|
@@ -56,6 +79,105 @@ module ContextDev
|
|
|
56
79
|
end
|
|
57
80
|
def to_hash
|
|
58
81
|
end
|
|
82
|
+
|
|
83
|
+
# Identifier of the brand to prefetch. Provide exactly one of domain or email.
|
|
84
|
+
module Identifier
|
|
85
|
+
extend ContextDev::Internal::Type::Union
|
|
86
|
+
|
|
87
|
+
Variants =
|
|
88
|
+
T.type_alias do
|
|
89
|
+
T.any(
|
|
90
|
+
ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier,
|
|
91
|
+
ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier
|
|
92
|
+
)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
class UtilityPrefetchDomainIdentifier < ContextDev::Internal::Type::BaseModel
|
|
96
|
+
OrHash =
|
|
97
|
+
T.type_alias do
|
|
98
|
+
T.any(
|
|
99
|
+
ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier,
|
|
100
|
+
ContextDev::Internal::AnyHash
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Domain name to prefetch brand data for
|
|
105
|
+
sig { returns(String) }
|
|
106
|
+
attr_accessor :domain
|
|
107
|
+
|
|
108
|
+
# Prefetch brand data by domain.
|
|
109
|
+
sig { params(domain: String).returns(T.attached_class) }
|
|
110
|
+
def self.new(
|
|
111
|
+
# Domain name to prefetch brand data for
|
|
112
|
+
domain:
|
|
113
|
+
)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
sig { override.returns({ domain: String }) }
|
|
117
|
+
def to_hash
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
class UtilityPrefetchEmailIdentifier < ContextDev::Internal::Type::BaseModel
|
|
122
|
+
OrHash =
|
|
123
|
+
T.type_alias do
|
|
124
|
+
T.any(
|
|
125
|
+
ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier,
|
|
126
|
+
ContextDev::Internal::AnyHash
|
|
127
|
+
)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Email address to prefetch brand data for. The domain will be extracted from the
|
|
131
|
+
# email. Free email providers (gmail.com, yahoo.com, etc.) and disposable email
|
|
132
|
+
# addresses are not allowed.
|
|
133
|
+
sig { returns(String) }
|
|
134
|
+
attr_accessor :email
|
|
135
|
+
|
|
136
|
+
# Prefetch brand data by email. The domain will be extracted and validated.
|
|
137
|
+
sig { params(email: String).returns(T.attached_class) }
|
|
138
|
+
def self.new(
|
|
139
|
+
# Email address to prefetch brand data for. The domain will be extracted from the
|
|
140
|
+
# email. Free email providers (gmail.com, yahoo.com, etc.) and disposable email
|
|
141
|
+
# addresses are not allowed.
|
|
142
|
+
email:
|
|
143
|
+
)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
sig { override.returns({ email: String }) }
|
|
147
|
+
def to_hash
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
sig do
|
|
152
|
+
override.returns(
|
|
153
|
+
T::Array[ContextDev::UtilityPrefetchParams::Identifier::Variants]
|
|
154
|
+
)
|
|
155
|
+
end
|
|
156
|
+
def self.variants
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# What to prefetch. Currently only 'brand' is supported.
|
|
161
|
+
module Type
|
|
162
|
+
extend ContextDev::Internal::Type::Enum
|
|
163
|
+
|
|
164
|
+
TaggedSymbol =
|
|
165
|
+
T.type_alias do
|
|
166
|
+
T.all(Symbol, ContextDev::UtilityPrefetchParams::Type)
|
|
167
|
+
end
|
|
168
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
169
|
+
|
|
170
|
+
BRAND =
|
|
171
|
+
T.let(:brand, ContextDev::UtilityPrefetchParams::Type::TaggedSymbol)
|
|
172
|
+
|
|
173
|
+
sig do
|
|
174
|
+
override.returns(
|
|
175
|
+
T::Array[ContextDev::UtilityPrefetchParams::Type::TaggedSymbol]
|
|
176
|
+
)
|
|
177
|
+
end
|
|
178
|
+
def self.values
|
|
179
|
+
end
|
|
180
|
+
end
|
|
59
181
|
end
|
|
60
182
|
end
|
|
61
183
|
end
|
|
@@ -49,13 +49,32 @@ module ContextDev
|
|
|
49
49
|
sig { params(status: String).void }
|
|
50
50
|
attr_writer :status
|
|
51
51
|
|
|
52
|
+
# The type of prefetch that was queued, echoed from the request (currently always
|
|
53
|
+
# 'brand')
|
|
54
|
+
sig do
|
|
55
|
+
returns(
|
|
56
|
+
T.nilable(
|
|
57
|
+
ContextDev::Models::UtilityPrefetchResponse::Type::TaggedSymbol
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
attr_reader :type
|
|
62
|
+
|
|
63
|
+
sig do
|
|
64
|
+
params(
|
|
65
|
+
type: ContextDev::Models::UtilityPrefetchResponse::Type::OrSymbol
|
|
66
|
+
).void
|
|
67
|
+
end
|
|
68
|
+
attr_writer :type
|
|
69
|
+
|
|
52
70
|
sig do
|
|
53
71
|
params(
|
|
54
72
|
domain: String,
|
|
55
73
|
key_metadata:
|
|
56
74
|
ContextDev::Models::UtilityPrefetchResponse::KeyMetadata::OrHash,
|
|
57
75
|
message: String,
|
|
58
|
-
status: String
|
|
76
|
+
status: String,
|
|
77
|
+
type: ContextDev::Models::UtilityPrefetchResponse::Type::OrSymbol
|
|
59
78
|
).returns(T.attached_class)
|
|
60
79
|
end
|
|
61
80
|
def self.new(
|
|
@@ -67,7 +86,10 @@ module ContextDev
|
|
|
67
86
|
# Success message
|
|
68
87
|
message: nil,
|
|
69
88
|
# Status of the response, e.g., 'ok'
|
|
70
|
-
status: nil
|
|
89
|
+
status: nil,
|
|
90
|
+
# The type of prefetch that was queued, echoed from the request (currently always
|
|
91
|
+
# 'brand')
|
|
92
|
+
type: nil
|
|
71
93
|
)
|
|
72
94
|
end
|
|
73
95
|
|
|
@@ -78,7 +100,9 @@ module ContextDev
|
|
|
78
100
|
key_metadata:
|
|
79
101
|
ContextDev::Models::UtilityPrefetchResponse::KeyMetadata,
|
|
80
102
|
message: String,
|
|
81
|
-
status: String
|
|
103
|
+
status: String,
|
|
104
|
+
type:
|
|
105
|
+
ContextDev::Models::UtilityPrefetchResponse::Type::TaggedSymbol
|
|
82
106
|
}
|
|
83
107
|
)
|
|
84
108
|
end
|
|
@@ -125,6 +149,34 @@ module ContextDev
|
|
|
125
149
|
def to_hash
|
|
126
150
|
end
|
|
127
151
|
end
|
|
152
|
+
|
|
153
|
+
# The type of prefetch that was queued, echoed from the request (currently always
|
|
154
|
+
# 'brand')
|
|
155
|
+
module Type
|
|
156
|
+
extend ContextDev::Internal::Type::Enum
|
|
157
|
+
|
|
158
|
+
TaggedSymbol =
|
|
159
|
+
T.type_alias do
|
|
160
|
+
T.all(Symbol, ContextDev::Models::UtilityPrefetchResponse::Type)
|
|
161
|
+
end
|
|
162
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
163
|
+
|
|
164
|
+
BRAND =
|
|
165
|
+
T.let(
|
|
166
|
+
:brand,
|
|
167
|
+
ContextDev::Models::UtilityPrefetchResponse::Type::TaggedSymbol
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
sig do
|
|
171
|
+
override.returns(
|
|
172
|
+
T::Array[
|
|
173
|
+
ContextDev::Models::UtilityPrefetchResponse::Type::TaggedSymbol
|
|
174
|
+
]
|
|
175
|
+
)
|
|
176
|
+
end
|
|
177
|
+
def self.values
|
|
178
|
+
end
|
|
179
|
+
end
|
|
128
180
|
end
|
|
129
181
|
end
|
|
130
182
|
end
|
|
@@ -106,6 +106,11 @@ module ContextDev
|
|
|
106
106
|
sig { returns(Integer) }
|
|
107
107
|
attr_accessor :max_crawl_depth
|
|
108
108
|
|
|
109
|
+
# Number of crawled pages excluded because they were anti-bot challenges, error
|
|
110
|
+
# pages, or parked-domain placeholders.
|
|
111
|
+
sig { returns(Integer) }
|
|
112
|
+
attr_accessor :num_blocked
|
|
113
|
+
|
|
109
114
|
sig { returns(Integer) }
|
|
110
115
|
attr_accessor :num_failed
|
|
111
116
|
|
|
@@ -121,6 +126,7 @@ module ContextDev
|
|
|
121
126
|
sig do
|
|
122
127
|
params(
|
|
123
128
|
max_crawl_depth: Integer,
|
|
129
|
+
num_blocked: Integer,
|
|
124
130
|
num_failed: Integer,
|
|
125
131
|
num_skipped: Integer,
|
|
126
132
|
num_succeeded: Integer,
|
|
@@ -129,6 +135,9 @@ module ContextDev
|
|
|
129
135
|
end
|
|
130
136
|
def self.new(
|
|
131
137
|
max_crawl_depth:,
|
|
138
|
+
# Number of crawled pages excluded because they were anti-bot challenges, error
|
|
139
|
+
# pages, or parked-domain placeholders.
|
|
140
|
+
num_blocked:,
|
|
132
141
|
num_failed:,
|
|
133
142
|
num_skipped:,
|
|
134
143
|
num_succeeded:,
|
|
@@ -140,6 +149,7 @@ module ContextDev
|
|
|
140
149
|
override.returns(
|
|
141
150
|
{
|
|
142
151
|
max_crawl_depth: Integer,
|
|
152
|
+
num_blocked: Integer,
|
|
143
153
|
num_failed: Integer,
|
|
144
154
|
num_skipped: Integer,
|
|
145
155
|
num_succeeded: Integer,
|
|
@@ -109,6 +109,15 @@ module ContextDev
|
|
|
109
109
|
sig { params(pdf: ContextDev::WebWebCrawlMdParams::Pdf::OrHash).void }
|
|
110
110
|
attr_writer :pdf
|
|
111
111
|
|
|
112
|
+
# When true, waits briefly for CSS and transition animations to settle before
|
|
113
|
+
# extracting each crawled page. Defaults to false. This adds a bit of latency in
|
|
114
|
+
# exchange for more stable output on animated pages.
|
|
115
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
116
|
+
attr_reader :settle_animations
|
|
117
|
+
|
|
118
|
+
sig { params(settle_animations: T::Boolean).void }
|
|
119
|
+
attr_writer :settle_animations
|
|
120
|
+
|
|
112
121
|
# Truncate base64-encoded image data in the Markdown output
|
|
113
122
|
sig { returns(T.nilable(T::Boolean)) }
|
|
114
123
|
attr_reader :shorten_base64_images
|
|
@@ -172,6 +181,7 @@ module ContextDev
|
|
|
172
181
|
max_depth: Integer,
|
|
173
182
|
max_pages: Integer,
|
|
174
183
|
pdf: ContextDev::WebWebCrawlMdParams::Pdf::OrHash,
|
|
184
|
+
settle_animations: T::Boolean,
|
|
175
185
|
shorten_base64_images: T::Boolean,
|
|
176
186
|
stop_after_ms: Integer,
|
|
177
187
|
timeout_ms: Integer,
|
|
@@ -219,6 +229,10 @@ module ContextDev
|
|
|
219
229
|
# PDF parsing controls. Use start/end to limit text extraction and OCR to an
|
|
220
230
|
# inclusive 1-based page range.
|
|
221
231
|
pdf: nil,
|
|
232
|
+
# When true, waits briefly for CSS and transition animations to settle before
|
|
233
|
+
# extracting each crawled page. Defaults to false. This adds a bit of latency in
|
|
234
|
+
# exchange for more stable output on animated pages.
|
|
235
|
+
settle_animations: nil,
|
|
222
236
|
# Truncate base64-encoded image data in the Markdown output
|
|
223
237
|
shorten_base64_images: nil,
|
|
224
238
|
# Soft time budget for the crawl in milliseconds. After each scrape, the crawler
|
|
@@ -257,6 +271,7 @@ module ContextDev
|
|
|
257
271
|
max_depth: Integer,
|
|
258
272
|
max_pages: Integer,
|
|
259
273
|
pdf: ContextDev::WebWebCrawlMdParams::Pdf,
|
|
274
|
+
settle_animations: T::Boolean,
|
|
260
275
|
shorten_base64_images: T::Boolean,
|
|
261
276
|
stop_after_ms: Integer,
|
|
262
277
|
timeout_ms: Integer,
|
|
@@ -85,6 +85,15 @@ module ContextDev
|
|
|
85
85
|
sig { params(pdf: ContextDev::WebWebScrapeHTMLParams::Pdf::OrHash).void }
|
|
86
86
|
attr_writer :pdf
|
|
87
87
|
|
|
88
|
+
# When true, waits briefly for CSS and transition animations to settle before
|
|
89
|
+
# extracting HTML. Defaults to false. This adds a bit of latency in exchange for
|
|
90
|
+
# more stable output on animated pages.
|
|
91
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
92
|
+
attr_reader :settle_animations
|
|
93
|
+
|
|
94
|
+
sig { params(settle_animations: T::Boolean).void }
|
|
95
|
+
attr_writer :settle_animations
|
|
96
|
+
|
|
88
97
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
89
98
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
90
99
|
# value is 300000ms (5 minutes).
|
|
@@ -120,6 +129,7 @@ module ContextDev
|
|
|
120
129
|
include_selectors: T::Array[String],
|
|
121
130
|
max_age_ms: Integer,
|
|
122
131
|
pdf: ContextDev::WebWebScrapeHTMLParams::Pdf::OrHash,
|
|
132
|
+
settle_animations: T::Boolean,
|
|
123
133
|
timeout_ms: Integer,
|
|
124
134
|
use_main_content_only: T::Boolean,
|
|
125
135
|
wait_for_ms: Integer,
|
|
@@ -153,6 +163,10 @@ module ContextDev
|
|
|
153
163
|
# PDF parsing controls. Use start/end to limit text extraction and OCR to an
|
|
154
164
|
# inclusive 1-based page range.
|
|
155
165
|
pdf: nil,
|
|
166
|
+
# When true, waits briefly for CSS and transition animations to settle before
|
|
167
|
+
# extracting HTML. Defaults to false. This adds a bit of latency in exchange for
|
|
168
|
+
# more stable output on animated pages.
|
|
169
|
+
settle_animations: nil,
|
|
156
170
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
157
171
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
158
172
|
# value is 300000ms (5 minutes).
|
|
@@ -178,6 +192,7 @@ module ContextDev
|
|
|
178
192
|
include_selectors: T::Array[String],
|
|
179
193
|
max_age_ms: Integer,
|
|
180
194
|
pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
|
|
195
|
+
settle_animations: T::Boolean,
|
|
181
196
|
timeout_ms: Integer,
|
|
182
197
|
use_main_content_only: T::Boolean,
|
|
183
198
|
wait_for_ms: Integer,
|
|
@@ -38,7 +38,9 @@ module ContextDev
|
|
|
38
38
|
attr_accessor :success
|
|
39
39
|
|
|
40
40
|
# Detected content type of the returned `html` field. Sitemaps and feeds are
|
|
41
|
-
# surfaced as `xml`; ordinary pages are `html`.
|
|
41
|
+
# surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as
|
|
42
|
+
# `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations
|
|
43
|
+
# are surfaced as `pptx`/`ppt` with the extracted slides as HTML.
|
|
42
44
|
sig do
|
|
43
45
|
returns(
|
|
44
46
|
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
@@ -90,7 +92,9 @@ module ContextDev
|
|
|
90
92
|
# Indicates success
|
|
91
93
|
success:,
|
|
92
94
|
# Detected content type of the returned `html` field. Sitemaps and feeds are
|
|
93
|
-
# surfaced as `xml`; ordinary pages are `html`.
|
|
95
|
+
# surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as
|
|
96
|
+
# `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations
|
|
97
|
+
# are surfaced as `pptx`/`ppt` with the extracted slides as HTML.
|
|
94
98
|
type:,
|
|
95
99
|
# The URL that was scraped
|
|
96
100
|
url:,
|
|
@@ -607,7 +611,9 @@ module ContextDev
|
|
|
607
611
|
end
|
|
608
612
|
|
|
609
613
|
# Detected content type of the returned `html` field. Sitemaps and feeds are
|
|
610
|
-
# surfaced as `xml`; ordinary pages are `html`.
|
|
614
|
+
# surfaced as `xml`; ordinary pages are `html`. Excel workbooks are surfaced as
|
|
615
|
+
# `xlsx`/`xls` with the extracted sheets as HTML tables; PowerPoint presentations
|
|
616
|
+
# are surfaced as `pptx`/`ppt` with the extracted slides as HTML.
|
|
611
617
|
module Type
|
|
612
618
|
extend ContextDev::Internal::Type::Enum
|
|
613
619
|
|
|
@@ -667,6 +673,26 @@ module ContextDev
|
|
|
667
673
|
:doc,
|
|
668
674
|
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
669
675
|
)
|
|
676
|
+
XLSX =
|
|
677
|
+
T.let(
|
|
678
|
+
:xlsx,
|
|
679
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
680
|
+
)
|
|
681
|
+
XLS =
|
|
682
|
+
T.let(
|
|
683
|
+
:xls,
|
|
684
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
685
|
+
)
|
|
686
|
+
PPTX =
|
|
687
|
+
T.let(
|
|
688
|
+
:pptx,
|
|
689
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
690
|
+
)
|
|
691
|
+
PPT =
|
|
692
|
+
T.let(
|
|
693
|
+
:ppt,
|
|
694
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
|
|
695
|
+
)
|
|
670
696
|
|
|
671
697
|
sig do
|
|
672
698
|
override.returns(
|
|
@@ -18,6 +18,16 @@ module ContextDev
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :url
|
|
20
20
|
|
|
21
|
+
# When true, visually duplicate images are removed: every image is loaded and
|
|
22
|
+
# perceptually hashed, and only the highest-resolution copy of each duplicate
|
|
23
|
+
# group is kept. Images that cannot be downloaded or hashed are kept. Default:
|
|
24
|
+
# false.
|
|
25
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
26
|
+
attr_reader :dedupe
|
|
27
|
+
|
|
28
|
+
sig { params(dedupe: T::Boolean).void }
|
|
29
|
+
attr_writer :dedupe
|
|
30
|
+
|
|
21
31
|
# Optional per-image processing, sent as deep-object query params such as
|
|
22
32
|
# enrichment[resolution]=true.
|
|
23
33
|
sig do
|
|
@@ -69,6 +79,7 @@ module ContextDev
|
|
|
69
79
|
sig do
|
|
70
80
|
params(
|
|
71
81
|
url: String,
|
|
82
|
+
dedupe: T::Boolean,
|
|
72
83
|
enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment::OrHash,
|
|
73
84
|
headers: T::Hash[Symbol, String],
|
|
74
85
|
max_age_ms: Integer,
|
|
@@ -80,6 +91,11 @@ module ContextDev
|
|
|
80
91
|
def self.new(
|
|
81
92
|
# Page URL to inspect. Must include http:// or https://.
|
|
82
93
|
url:,
|
|
94
|
+
# When true, visually duplicate images are removed: every image is loaded and
|
|
95
|
+
# perceptually hashed, and only the highest-resolution copy of each duplicate
|
|
96
|
+
# group is kept. Images that cannot be downloaded or hashed are kept. Default:
|
|
97
|
+
# false.
|
|
98
|
+
dedupe: nil,
|
|
83
99
|
# Optional per-image processing, sent as deep-object query params such as
|
|
84
100
|
# enrichment[resolution]=true.
|
|
85
101
|
enrichment: nil,
|
|
@@ -105,6 +121,7 @@ module ContextDev
|
|
|
105
121
|
override.returns(
|
|
106
122
|
{
|
|
107
123
|
url: String,
|
|
124
|
+
dedupe: T::Boolean,
|
|
108
125
|
enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment,
|
|
109
126
|
headers: T::Hash[Symbol, String],
|
|
110
127
|
max_age_ms: Integer,
|
|
@@ -95,6 +95,15 @@ module ContextDev
|
|
|
95
95
|
sig { params(pdf: ContextDev::WebWebScrapeMdParams::Pdf::OrHash).void }
|
|
96
96
|
attr_writer :pdf
|
|
97
97
|
|
|
98
|
+
# When true, waits briefly for CSS and transition animations to settle before
|
|
99
|
+
# converting to Markdown. Defaults to false. This adds a bit of latency in
|
|
100
|
+
# exchange for more stable output on animated pages.
|
|
101
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
102
|
+
attr_reader :settle_animations
|
|
103
|
+
|
|
104
|
+
sig { params(settle_animations: T::Boolean).void }
|
|
105
|
+
attr_writer :settle_animations
|
|
106
|
+
|
|
98
107
|
# Shorten base64-encoded image data in the Markdown output
|
|
99
108
|
sig { returns(T.nilable(T::Boolean)) }
|
|
100
109
|
attr_reader :shorten_base64_images
|
|
@@ -139,6 +148,7 @@ module ContextDev
|
|
|
139
148
|
include_selectors: T::Array[String],
|
|
140
149
|
max_age_ms: Integer,
|
|
141
150
|
pdf: ContextDev::WebWebScrapeMdParams::Pdf::OrHash,
|
|
151
|
+
settle_animations: T::Boolean,
|
|
142
152
|
shorten_base64_images: T::Boolean,
|
|
143
153
|
timeout_ms: Integer,
|
|
144
154
|
use_main_content_only: T::Boolean,
|
|
@@ -178,6 +188,10 @@ module ContextDev
|
|
|
178
188
|
# PDF parsing controls. Use start/end to limit text extraction and OCR to an
|
|
179
189
|
# inclusive 1-based page range.
|
|
180
190
|
pdf: nil,
|
|
191
|
+
# When true, waits briefly for CSS and transition animations to settle before
|
|
192
|
+
# converting to Markdown. Defaults to false. This adds a bit of latency in
|
|
193
|
+
# exchange for more stable output on animated pages.
|
|
194
|
+
settle_animations: nil,
|
|
181
195
|
# Shorten base64-encoded image data in the Markdown output
|
|
182
196
|
shorten_base64_images: nil,
|
|
183
197
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
@@ -207,6 +221,7 @@ module ContextDev
|
|
|
207
221
|
include_selectors: T::Array[String],
|
|
208
222
|
max_age_ms: Integer,
|
|
209
223
|
pdf: ContextDev::WebWebScrapeMdParams::Pdf,
|
|
224
|
+
settle_animations: T::Boolean,
|
|
210
225
|
shorten_base64_images: T::Boolean,
|
|
211
226
|
timeout_ms: Integer,
|
|
212
227
|
use_main_content_only: T::Boolean,
|
data/rbi/context_dev/models.rbi
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
# typed: strong
|
|
2
2
|
|
|
3
3
|
module ContextDev
|
|
4
|
-
AIAIQueryParams = ContextDev::Models::AIAIQueryParams
|
|
5
|
-
|
|
6
4
|
AIExtractProductParams = ContextDev::Models::AIExtractProductParams
|
|
7
5
|
|
|
8
6
|
AIExtractProductsParams = ContextDev::Models::AIExtractProductsParams
|
|
9
7
|
|
|
10
|
-
BrandIdentifyFromTransactionParams =
|
|
11
|
-
ContextDev::Models::BrandIdentifyFromTransactionParams
|
|
12
|
-
|
|
13
|
-
BrandRetrieveByEmailParams = ContextDev::Models::BrandRetrieveByEmailParams
|
|
14
|
-
|
|
15
|
-
BrandRetrieveByIsinParams = ContextDev::Models::BrandRetrieveByIsinParams
|
|
16
|
-
|
|
17
|
-
BrandRetrieveByNameParams = ContextDev::Models::BrandRetrieveByNameParams
|
|
18
|
-
|
|
19
|
-
BrandRetrieveByTickerParams = ContextDev::Models::BrandRetrieveByTickerParams
|
|
20
|
-
|
|
21
8
|
BrandRetrieveParams = ContextDev::Models::BrandRetrieveParams
|
|
22
9
|
|
|
23
10
|
BrandRetrieveSimplifiedParams =
|
|
@@ -27,8 +14,29 @@ module ContextDev
|
|
|
27
14
|
|
|
28
15
|
IndustryRetrieveSicParams = ContextDev::Models::IndustryRetrieveSicParams
|
|
29
16
|
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
MonitorCreateParams = ContextDev::Models::MonitorCreateParams
|
|
18
|
+
|
|
19
|
+
MonitorDeleteParams = ContextDev::Models::MonitorDeleteParams
|
|
20
|
+
|
|
21
|
+
MonitorListAccountChangesParams =
|
|
22
|
+
ContextDev::Models::MonitorListAccountChangesParams
|
|
23
|
+
|
|
24
|
+
MonitorListAccountRunsParams =
|
|
25
|
+
ContextDev::Models::MonitorListAccountRunsParams
|
|
26
|
+
|
|
27
|
+
MonitorListChangesParams = ContextDev::Models::MonitorListChangesParams
|
|
28
|
+
|
|
29
|
+
MonitorListParams = ContextDev::Models::MonitorListParams
|
|
30
|
+
|
|
31
|
+
MonitorListRunsParams = ContextDev::Models::MonitorListRunsParams
|
|
32
|
+
|
|
33
|
+
MonitorRetrieveChangeParams = ContextDev::Models::MonitorRetrieveChangeParams
|
|
34
|
+
|
|
35
|
+
MonitorRetrieveParams = ContextDev::Models::MonitorRetrieveParams
|
|
36
|
+
|
|
37
|
+
MonitorRunParams = ContextDev::Models::MonitorRunParams
|
|
38
|
+
|
|
39
|
+
MonitorUpdateParams = ContextDev::Models::MonitorUpdateParams
|
|
32
40
|
|
|
33
41
|
UtilityPrefetchParams = ContextDev::Models::UtilityPrefetchParams
|
|
34
42
|
|
|
@@ -3,34 +3,6 @@
|
|
|
3
3
|
module ContextDev
|
|
4
4
|
module Resources
|
|
5
5
|
class AI
|
|
6
|
-
# Use AI to extract specific data points from a brand's website. The AI will crawl
|
|
7
|
-
# the website and extract the requested information based on the provided data
|
|
8
|
-
# points.
|
|
9
|
-
sig do
|
|
10
|
-
params(
|
|
11
|
-
data_to_extract:
|
|
12
|
-
T::Array[ContextDev::AIAIQueryParams::DataToExtract::OrHash],
|
|
13
|
-
domain: String,
|
|
14
|
-
specific_pages: ContextDev::AIAIQueryParams::SpecificPages::OrHash,
|
|
15
|
-
timeout_ms: Integer,
|
|
16
|
-
request_options: ContextDev::RequestOptions::OrHash
|
|
17
|
-
).returns(ContextDev::Models::AIAIQueryResponse)
|
|
18
|
-
end
|
|
19
|
-
def ai_query(
|
|
20
|
-
# Array of data points to extract from the website
|
|
21
|
-
data_to_extract:,
|
|
22
|
-
# The domain name to analyze
|
|
23
|
-
domain:,
|
|
24
|
-
# Optional object specifying which pages to analyze
|
|
25
|
-
specific_pages: nil,
|
|
26
|
-
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
27
|
-
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
28
|
-
# value is 300000ms (5 minutes).
|
|
29
|
-
timeout_ms: nil,
|
|
30
|
-
request_options: {}
|
|
31
|
-
)
|
|
32
|
-
end
|
|
33
|
-
|
|
34
6
|
# Given a single URL, determines if it is a product page and extracts the product
|
|
35
7
|
# information.
|
|
36
8
|
sig do
|