context.dev 2.15.0 → 2.17.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 +30 -0
- data/README.md +2 -2
- data/lib/context_dev/client.rb +6 -0
- data/lib/context_dev/internal/type/base_model.rb +2 -2
- data/lib/context_dev/models/ai_extract_product_params.rb +53 -8
- data/lib/context_dev/models/ai_extract_product_response.rb +19 -1
- data/lib/context_dev/models/ai_extract_products_params.rb +116 -16
- data/lib/context_dev/models/ai_extract_products_response.rb +20 -1
- data/lib/context_dev/models/batch_cancel_response.rb +10 -1
- data/lib/context_dev/models/batch_delete_response.rb +13 -1
- data/lib/context_dev/models/batch_get_results_response.rb +13 -1
- data/lib/context_dev/models/batch_list_response.rb +13 -1
- data/lib/context_dev/models/batch_retrieve_response.rb +10 -1
- data/lib/context_dev/models/batch_submit_response.rb +10 -1
- data/lib/context_dev/models/brand_retrieve_params.rb +355 -60
- data/lib/context_dev/models/brand_retrieve_response.rb +19 -1
- data/lib/context_dev/models/brand_retrieve_simplified_params.rb +57 -11
- data/lib/context_dev/models/brand_retrieve_simplified_response.rb +19 -1
- data/lib/context_dev/models/brand_search_response.rb +10 -1
- data/lib/context_dev/models/industry_retrieve_naics_params.rb +53 -8
- data/lib/context_dev/models/industry_retrieve_naics_response.rb +22 -1
- data/lib/context_dev/models/industry_retrieve_sic_params.rb +53 -8
- data/lib/context_dev/models/industry_retrieve_sic_response.rb +19 -1
- data/lib/context_dev/models/log_list_params.rb +108 -0
- data/lib/context_dev/models/log_list_response.rb +174 -0
- data/lib/context_dev/models/log_retrieve_params.rb +22 -0
- data/lib/context_dev/models/log_retrieve_response.rb +226 -0
- data/lib/context_dev/models/monitor_create_params.rb +27 -3
- data/lib/context_dev/models/monitor_create_response.rb +30 -5
- data/lib/context_dev/models/monitor_list_response.rb +30 -5
- data/lib/context_dev/models/monitor_retrieve_response.rb +30 -5
- data/lib/context_dev/models/monitor_update_params.rb +27 -3
- data/lib/context_dev/models/monitor_update_response.rb +30 -5
- data/lib/context_dev/models/news_search_response.rb +10 -1
- data/lib/context_dev/models/parse_handle_response.rb +13 -1
- data/lib/context_dev/models/person_enrich_params.rb +53 -8
- data/lib/context_dev/models/person_enrich_response.rb +22 -1
- data/lib/context_dev/models/utility_prefetch_params.rb +48 -8
- data/lib/context_dev/models/utility_prefetch_response.rb +13 -1
- data/lib/context_dev/models/web_answers_params.rb +124 -0
- data/lib/context_dev/models/web_answers_response.rb +68 -0
- data/lib/context_dev/models/web_extract_competitors_params.rb +53 -8
- data/lib/context_dev/models/web_extract_competitors_response.rb +22 -1
- data/lib/context_dev/models/web_extract_fonts_params.rb +58 -11
- data/lib/context_dev/models/web_extract_fonts_response.rb +41 -1
- data/lib/context_dev/models/web_extract_params.rb +53 -8
- data/lib/context_dev/models/web_extract_response.rb +19 -1
- data/lib/context_dev/models/web_extract_styleguide_params.rb +58 -11
- data/lib/context_dev/models/web_extract_styleguide_response.rb +41 -1
- data/lib/context_dev/models/web_screenshot_params.rb +58 -9
- data/lib/context_dev/models/web_screenshot_response.rb +41 -1
- data/lib/context_dev/models/web_search_params.rb +112 -16
- data/lib/context_dev/models/web_search_response.rb +52 -2
- data/lib/context_dev/models/web_web_crawl_md_params.rb +53 -8
- data/lib/context_dev/models/web_web_crawl_md_response.rb +20 -1
- data/lib/context_dev/models/web_web_scrape_bytes_params.rb +344 -0
- data/lib/context_dev/models/web_web_scrape_bytes_response.rb +135 -0
- data/lib/context_dev/models/web_web_scrape_html_params.rb +58 -9
- data/lib/context_dev/models/web_web_scrape_html_response.rb +41 -1
- data/lib/context_dev/models/web_web_scrape_images_params.rb +58 -9
- data/lib/context_dev/models/web_web_scrape_images_response.rb +51 -1
- data/lib/context_dev/models/web_web_scrape_md_params.rb +58 -9
- data/lib/context_dev/models/web_web_scrape_md_response.rb +41 -1
- data/lib/context_dev/models/web_web_scrape_sitemap_params.rb +53 -8
- data/lib/context_dev/models/web_web_scrape_sitemap_response.rb +20 -1
- data/lib/context_dev/models/webhooks/delivery_list_attempts_response.rb +13 -1
- data/lib/context_dev/models/webhooks/delivery_list_response.rb +13 -1
- data/lib/context_dev/models/webhooks/delivery_retrieve_response.rb +13 -1
- data/lib/context_dev/models/webhooks/delivery_retry_response.rb +13 -1
- data/lib/context_dev/models.rb +8 -0
- data/lib/context_dev/resources/ai.rb +2 -2
- data/lib/context_dev/resources/brand.rb +3 -3
- data/lib/context_dev/resources/industry.rb +6 -6
- data/lib/context_dev/resources/logs.rb +83 -0
- data/lib/context_dev/resources/people.rb +2 -2
- data/lib/context_dev/resources/utility.rb +2 -2
- data/lib/context_dev/resources/web.rb +119 -33
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +9 -0
- data/rbi/context_dev/client.rbi +5 -0
- data/rbi/context_dev/models/ai_extract_product_params.rbi +125 -13
- data/rbi/context_dev/models/ai_extract_product_response.rbi +23 -0
- data/rbi/context_dev/models/ai_extract_products_params.rbi +264 -26
- data/rbi/context_dev/models/ai_extract_products_response.rbi +25 -0
- data/rbi/context_dev/models/batch_cancel_response.rbi +10 -0
- data/rbi/context_dev/models/batch_delete_response.rbi +10 -0
- data/rbi/context_dev/models/batch_get_results_response.rbi +10 -0
- data/rbi/context_dev/models/batch_list_response.rbi +10 -0
- data/rbi/context_dev/models/batch_retrieve_response.rbi +10 -0
- data/rbi/context_dev/models/batch_submit_response.rbi +10 -0
- data/rbi/context_dev/models/brand_retrieve_params.rbi +816 -102
- data/rbi/context_dev/models/brand_retrieve_response.rbi +23 -0
- data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +136 -19
- data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +23 -0
- data/rbi/context_dev/models/brand_search_response.rbi +10 -0
- data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +127 -13
- data/rbi/context_dev/models/industry_retrieve_naics_response.rbi +23 -0
- data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +127 -13
- data/rbi/context_dev/models/industry_retrieve_sic_response.rbi +23 -0
- data/rbi/context_dev/models/log_list_params.rbi +162 -0
- data/rbi/context_dev/models/log_list_response.rbi +246 -0
- data/rbi/context_dev/models/log_retrieve_params.rbi +40 -0
- data/rbi/context_dev/models/log_retrieve_response.rbi +370 -0
- data/rbi/context_dev/models/monitor_create_params.rbi +40 -2
- data/rbi/context_dev/models/monitor_create_response.rbi +44 -4
- data/rbi/context_dev/models/monitor_list_response.rbi +44 -4
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +44 -4
- data/rbi/context_dev/models/monitor_update_params.rbi +40 -2
- data/rbi/context_dev/models/monitor_update_response.rbi +44 -4
- data/rbi/context_dev/models/news_search_response.rbi +10 -0
- data/rbi/context_dev/models/parse_handle_response.rbi +10 -0
- data/rbi/context_dev/models/person_enrich_params.rbi +123 -13
- data/rbi/context_dev/models/person_enrich_response.rbi +26 -3
- data/rbi/context_dev/models/utility_prefetch_params.rbi +112 -13
- data/rbi/context_dev/models/utility_prefetch_response.rbi +10 -0
- data/rbi/context_dev/models/web_answers_params.rbi +234 -0
- data/rbi/context_dev/models/web_answers_response.rbi +122 -0
- data/rbi/context_dev/models/web_extract_competitors_params.rbi +127 -13
- data/rbi/context_dev/models/web_extract_competitors_response.rbi +26 -3
- data/rbi/context_dev/models/web_extract_fonts_params.rbi +132 -19
- data/rbi/context_dev/models/web_extract_fonts_response.rbi +81 -0
- data/rbi/context_dev/models/web_extract_params.rbi +120 -13
- data/rbi/context_dev/models/web_extract_response.rbi +26 -3
- data/rbi/context_dev/models/web_extract_styleguide_params.rbi +136 -19
- data/rbi/context_dev/models/web_extract_styleguide_response.rbi +81 -0
- data/rbi/context_dev/models/web_screenshot_params.rbi +132 -15
- data/rbi/context_dev/models/web_screenshot_response.rbi +81 -0
- data/rbi/context_dev/models/web_search_params.rbi +253 -26
- data/rbi/context_dev/models/web_search_response.rbi +102 -6
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +123 -13
- data/rbi/context_dev/models/web_web_crawl_md_response.rbi +29 -3
- data/rbi/context_dev/models/web_web_scrape_bytes_params.rbi +699 -0
- data/rbi/context_dev/models/web_web_scrape_bytes_response.rbi +238 -0
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +134 -15
- data/rbi/context_dev/models/web_web_scrape_html_response.rbi +71 -0
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +136 -15
- data/rbi/context_dev/models/web_web_scrape_images_response.rbi +99 -3
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +132 -15
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +71 -0
- data/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +127 -13
- data/rbi/context_dev/models/web_web_scrape_sitemap_response.rbi +28 -3
- data/rbi/context_dev/models/webhooks/delivery_list_attempts_response.rbi +10 -0
- data/rbi/context_dev/models/webhooks/delivery_list_response.rbi +10 -0
- data/rbi/context_dev/models/webhooks/delivery_retrieve_response.rbi +10 -0
- data/rbi/context_dev/models/webhooks/delivery_retry_response.rbi +10 -0
- data/rbi/context_dev/models.rbi +8 -0
- data/rbi/context_dev/resources/ai.rbi +5 -5
- data/rbi/context_dev/resources/brand.rbi +9 -8
- data/rbi/context_dev/resources/industry.rbi +12 -10
- data/rbi/context_dev/resources/logs.rbi +76 -0
- data/rbi/context_dev/resources/people.rbi +5 -5
- data/rbi/context_dev/resources/utility.rbi +5 -5
- data/rbi/context_dev/resources/web.rbi +173 -68
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/ai_extract_product_params.rbs +44 -5
- data/sig/context_dev/models/ai_extract_product_response.rbs +12 -0
- data/sig/context_dev/models/ai_extract_products_params.rbs +88 -10
- data/sig/context_dev/models/ai_extract_products_response.rbs +12 -0
- data/sig/context_dev/models/batch_cancel_response.rbs +5 -0
- data/sig/context_dev/models/batch_delete_response.rbs +5 -0
- data/sig/context_dev/models/batch_get_results_response.rbs +5 -0
- data/sig/context_dev/models/batch_list_response.rbs +5 -0
- data/sig/context_dev/models/batch_retrieve_response.rbs +5 -0
- data/sig/context_dev/models/batch_submit_response.rbs +5 -0
- data/sig/context_dev/models/brand_retrieve_params.rbs +264 -30
- data/sig/context_dev/models/brand_retrieve_response.rbs +12 -0
- data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +44 -5
- data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +12 -0
- data/sig/context_dev/models/brand_search_response.rbs +5 -0
- data/sig/context_dev/models/industry_retrieve_naics_params.rbs +44 -5
- data/sig/context_dev/models/industry_retrieve_naics_response.rbs +12 -0
- data/sig/context_dev/models/industry_retrieve_sic_params.rbs +44 -5
- data/sig/context_dev/models/industry_retrieve_sic_response.rbs +12 -0
- data/sig/context_dev/models/log_list_params.rbs +98 -0
- data/sig/context_dev/models/log_list_response.rbs +135 -0
- data/sig/context_dev/models/log_retrieve_params.rbs +23 -0
- data/sig/context_dev/models/log_retrieve_response.rbs +179 -0
- data/sig/context_dev/models/monitor_create_params.rbs +14 -0
- data/sig/context_dev/models/monitor_create_response.rbs +14 -0
- data/sig/context_dev/models/monitor_list_response.rbs +14 -0
- data/sig/context_dev/models/monitor_retrieve_response.rbs +14 -0
- data/sig/context_dev/models/monitor_update_params.rbs +14 -0
- data/sig/context_dev/models/monitor_update_response.rbs +14 -0
- data/sig/context_dev/models/news_search_response.rbs +5 -0
- data/sig/context_dev/models/parse_handle_response.rbs +5 -0
- data/sig/context_dev/models/person_enrich_params.rbs +44 -5
- data/sig/context_dev/models/person_enrich_response.rbs +15 -3
- data/sig/context_dev/models/utility_prefetch_params.rbs +43 -5
- data/sig/context_dev/models/utility_prefetch_response.rbs +5 -0
- data/sig/context_dev/models/web_answers_params.rbs +106 -0
- data/sig/context_dev/models/web_answers_response.rbs +60 -0
- data/sig/context_dev/models/web_extract_competitors_params.rbs +44 -5
- data/sig/context_dev/models/web_extract_competitors_response.rbs +15 -3
- data/sig/context_dev/models/web_extract_fonts_params.rbs +44 -5
- data/sig/context_dev/models/web_extract_fonts_response.rbs +25 -0
- data/sig/context_dev/models/web_extract_params.rbs +44 -5
- data/sig/context_dev/models/web_extract_response.rbs +15 -3
- data/sig/context_dev/models/web_extract_styleguide_params.rbs +44 -5
- data/sig/context_dev/models/web_extract_styleguide_response.rbs +25 -0
- data/sig/context_dev/models/web_screenshot_params.rbs +44 -5
- data/sig/context_dev/models/web_screenshot_response.rbs +25 -0
- data/sig/context_dev/models/web_search_params.rbs +88 -10
- data/sig/context_dev/models/web_search_response.rbs +38 -6
- data/sig/context_dev/models/web_web_crawl_md_params.rbs +44 -5
- data/sig/context_dev/models/web_web_crawl_md_response.rbs +15 -3
- data/sig/context_dev/models/web_web_scrape_bytes_params.rbs +531 -0
- data/sig/context_dev/models/web_web_scrape_bytes_response.rbs +108 -0
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +44 -5
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +21 -0
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +44 -5
- data/sig/context_dev/models/web_web_scrape_images_response.rbs +35 -3
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +44 -5
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +21 -0
- data/sig/context_dev/models/web_web_scrape_sitemap_params.rbs +44 -5
- data/sig/context_dev/models/web_web_scrape_sitemap_response.rbs +15 -3
- data/sig/context_dev/models/webhooks/delivery_list_attempts_response.rbs +5 -0
- data/sig/context_dev/models/webhooks/delivery_list_response.rbs +5 -0
- data/sig/context_dev/models/webhooks/delivery_retrieve_response.rbs +7 -0
- data/sig/context_dev/models/webhooks/delivery_retry_response.rbs +5 -0
- data/sig/context_dev/models.rbs +8 -0
- data/sig/context_dev/resources/ai.rbs +1 -1
- data/sig/context_dev/resources/brand.rbs +1 -1
- data/sig/context_dev/resources/industry.rbs +2 -2
- data/sig/context_dev/resources/logs.rbs +27 -0
- data/sig/context_dev/resources/people.rbs +1 -1
- data/sig/context_dev/resources/utility.rbs +1 -1
- data/sig/context_dev/resources/web.rbs +30 -11
- metadata +29 -2
|
@@ -109,9 +109,9 @@ module ContextDev
|
|
|
109
109
|
attr_accessor :force_language
|
|
110
110
|
|
|
111
111
|
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
112
|
-
# refresh. Defaults to 3 months (7776000000 ms).
|
|
113
|
-
# are clamped to
|
|
114
|
-
# year.
|
|
112
|
+
# refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
|
|
113
|
+
# refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
|
|
114
|
+
# are clamped to 1 year.
|
|
115
115
|
sig { returns(T.nilable(Integer)) }
|
|
116
116
|
attr_reader :max_age_ms
|
|
117
117
|
|
|
@@ -134,14 +134,25 @@ module ContextDev
|
|
|
134
134
|
sig { params(tags: T::Array[String]).void }
|
|
135
135
|
attr_writer :tags
|
|
136
136
|
|
|
137
|
-
# Optional
|
|
138
|
-
#
|
|
139
|
-
#
|
|
140
|
-
sig
|
|
141
|
-
|
|
137
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
138
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
139
|
+
# timeoutOpts object.
|
|
140
|
+
sig do
|
|
141
|
+
returns(
|
|
142
|
+
T.nilable(
|
|
143
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts
|
|
144
|
+
)
|
|
145
|
+
)
|
|
146
|
+
end
|
|
147
|
+
attr_reader :timeout_opts
|
|
142
148
|
|
|
143
|
-
sig
|
|
144
|
-
|
|
149
|
+
sig do
|
|
150
|
+
params(
|
|
151
|
+
timeout_opts:
|
|
152
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts::OrHash
|
|
153
|
+
).void
|
|
154
|
+
end
|
|
155
|
+
attr_writer :timeout_opts
|
|
145
156
|
|
|
146
157
|
# Retrieve brand data by domain. Cannot be combined with name, email, or ticker.
|
|
147
158
|
sig do
|
|
@@ -154,7 +165,8 @@ module ContextDev
|
|
|
154
165
|
max_age_ms: Integer,
|
|
155
166
|
max_speed: T::Boolean,
|
|
156
167
|
tags: T::Array[String],
|
|
157
|
-
|
|
168
|
+
timeout_opts:
|
|
169
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts::OrHash,
|
|
158
170
|
type: Symbol
|
|
159
171
|
).returns(T.attached_class)
|
|
160
172
|
end
|
|
@@ -163,9 +175,9 @@ module ContextDev
|
|
|
163
175
|
domain:,
|
|
164
176
|
force_language: nil,
|
|
165
177
|
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
166
|
-
# refresh. Defaults to 3 months (7776000000 ms).
|
|
167
|
-
# are clamped to
|
|
168
|
-
# year.
|
|
178
|
+
# refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
|
|
179
|
+
# refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
|
|
180
|
+
# are clamped to 1 year.
|
|
169
181
|
max_age_ms: nil,
|
|
170
182
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
171
183
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
@@ -173,10 +185,10 @@ module ContextDev
|
|
|
173
185
|
max_speed: nil,
|
|
174
186
|
# Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
175
187
|
tags: nil,
|
|
176
|
-
# Optional
|
|
177
|
-
#
|
|
178
|
-
#
|
|
179
|
-
|
|
188
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
189
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
190
|
+
# timeoutOpts object.
|
|
191
|
+
timeout_opts: nil,
|
|
180
192
|
# Discriminator for domain-based brand retrieval.
|
|
181
193
|
type: :by_domain
|
|
182
194
|
)
|
|
@@ -194,7 +206,8 @@ module ContextDev
|
|
|
194
206
|
max_age_ms: Integer,
|
|
195
207
|
max_speed: T::Boolean,
|
|
196
208
|
tags: T::Array[String],
|
|
197
|
-
|
|
209
|
+
timeout_opts:
|
|
210
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts
|
|
198
211
|
}
|
|
199
212
|
)
|
|
200
213
|
end
|
|
@@ -824,6 +837,112 @@ module ContextDev
|
|
|
824
837
|
def self.values
|
|
825
838
|
end
|
|
826
839
|
end
|
|
840
|
+
|
|
841
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
842
|
+
OrHash =
|
|
843
|
+
T.type_alias do
|
|
844
|
+
T.any(
|
|
845
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts,
|
|
846
|
+
ContextDev::Internal::AnyHash
|
|
847
|
+
)
|
|
848
|
+
end
|
|
849
|
+
|
|
850
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
851
|
+
sig { returns(Integer) }
|
|
852
|
+
attr_accessor :milliseconds
|
|
853
|
+
|
|
854
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
855
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
856
|
+
# available, the request still fails without charging credits. Partial results are
|
|
857
|
+
# not cached as complete results.
|
|
858
|
+
sig do
|
|
859
|
+
returns(
|
|
860
|
+
T.nilable(
|
|
861
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts::Behavior::OrSymbol
|
|
862
|
+
)
|
|
863
|
+
)
|
|
864
|
+
end
|
|
865
|
+
attr_reader :behavior
|
|
866
|
+
|
|
867
|
+
sig do
|
|
868
|
+
params(
|
|
869
|
+
behavior:
|
|
870
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts::Behavior::OrSymbol
|
|
871
|
+
).void
|
|
872
|
+
end
|
|
873
|
+
attr_writer :behavior
|
|
874
|
+
|
|
875
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
876
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
877
|
+
# timeoutOpts object.
|
|
878
|
+
sig do
|
|
879
|
+
params(
|
|
880
|
+
milliseconds: Integer,
|
|
881
|
+
behavior:
|
|
882
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts::Behavior::OrSymbol
|
|
883
|
+
).returns(T.attached_class)
|
|
884
|
+
end
|
|
885
|
+
def self.new(
|
|
886
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
887
|
+
milliseconds:,
|
|
888
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
889
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
890
|
+
# available, the request still fails without charging credits. Partial results are
|
|
891
|
+
# not cached as complete results.
|
|
892
|
+
behavior: nil
|
|
893
|
+
)
|
|
894
|
+
end
|
|
895
|
+
|
|
896
|
+
sig do
|
|
897
|
+
override.returns(
|
|
898
|
+
{
|
|
899
|
+
milliseconds: Integer,
|
|
900
|
+
behavior:
|
|
901
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts::Behavior::OrSymbol
|
|
902
|
+
}
|
|
903
|
+
)
|
|
904
|
+
end
|
|
905
|
+
def to_hash
|
|
906
|
+
end
|
|
907
|
+
|
|
908
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
909
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
910
|
+
# available, the request still fails without charging credits. Partial results are
|
|
911
|
+
# not cached as complete results.
|
|
912
|
+
module Behavior
|
|
913
|
+
extend ContextDev::Internal::Type::Enum
|
|
914
|
+
|
|
915
|
+
TaggedSymbol =
|
|
916
|
+
T.type_alias do
|
|
917
|
+
T.all(
|
|
918
|
+
Symbol,
|
|
919
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts::Behavior
|
|
920
|
+
)
|
|
921
|
+
end
|
|
922
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
923
|
+
|
|
924
|
+
FAIL =
|
|
925
|
+
T.let(
|
|
926
|
+
:fail,
|
|
927
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts::Behavior::TaggedSymbol
|
|
928
|
+
)
|
|
929
|
+
RETURN_PARTIAL =
|
|
930
|
+
T.let(
|
|
931
|
+
:"return-partial",
|
|
932
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts::Behavior::TaggedSymbol
|
|
933
|
+
)
|
|
934
|
+
|
|
935
|
+
sig do
|
|
936
|
+
override.returns(
|
|
937
|
+
T::Array[
|
|
938
|
+
ContextDev::BrandRetrieveParams::Body::ByDomain::TimeoutOpts::Behavior::TaggedSymbol
|
|
939
|
+
]
|
|
940
|
+
)
|
|
941
|
+
end
|
|
942
|
+
def self.values
|
|
943
|
+
end
|
|
944
|
+
end
|
|
945
|
+
end
|
|
827
946
|
end
|
|
828
947
|
|
|
829
948
|
class ByName < ContextDev::Internal::Type::BaseModel
|
|
@@ -861,9 +980,9 @@ module ContextDev
|
|
|
861
980
|
attr_accessor :force_language
|
|
862
981
|
|
|
863
982
|
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
864
|
-
# refresh. Defaults to 3 months (7776000000 ms).
|
|
865
|
-
# are clamped to
|
|
866
|
-
# year.
|
|
983
|
+
# refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
|
|
984
|
+
# refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
|
|
985
|
+
# are clamped to 1 year.
|
|
867
986
|
sig { returns(T.nilable(Integer)) }
|
|
868
987
|
attr_reader :max_age_ms
|
|
869
988
|
|
|
@@ -886,14 +1005,25 @@ module ContextDev
|
|
|
886
1005
|
sig { params(tags: T::Array[String]).void }
|
|
887
1006
|
attr_writer :tags
|
|
888
1007
|
|
|
889
|
-
# Optional
|
|
890
|
-
#
|
|
891
|
-
#
|
|
892
|
-
sig
|
|
893
|
-
|
|
1008
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
1009
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
1010
|
+
# timeoutOpts object.
|
|
1011
|
+
sig do
|
|
1012
|
+
returns(
|
|
1013
|
+
T.nilable(
|
|
1014
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts
|
|
1015
|
+
)
|
|
1016
|
+
)
|
|
1017
|
+
end
|
|
1018
|
+
attr_reader :timeout_opts
|
|
894
1019
|
|
|
895
|
-
sig
|
|
896
|
-
|
|
1020
|
+
sig do
|
|
1021
|
+
params(
|
|
1022
|
+
timeout_opts:
|
|
1023
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts::OrHash
|
|
1024
|
+
).void
|
|
1025
|
+
end
|
|
1026
|
+
attr_writer :timeout_opts
|
|
897
1027
|
|
|
898
1028
|
# Retrieve brand data by company name. Cannot be combined with domain, email, or
|
|
899
1029
|
# ticker.
|
|
@@ -908,7 +1038,8 @@ module ContextDev
|
|
|
908
1038
|
max_age_ms: Integer,
|
|
909
1039
|
max_speed: T::Boolean,
|
|
910
1040
|
tags: T::Array[String],
|
|
911
|
-
|
|
1041
|
+
timeout_opts:
|
|
1042
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts::OrHash,
|
|
912
1043
|
type: Symbol
|
|
913
1044
|
).returns(T.attached_class)
|
|
914
1045
|
end
|
|
@@ -920,9 +1051,9 @@ module ContextDev
|
|
|
920
1051
|
country_gl: nil,
|
|
921
1052
|
force_language: nil,
|
|
922
1053
|
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
923
|
-
# refresh. Defaults to 3 months (7776000000 ms).
|
|
924
|
-
# are clamped to
|
|
925
|
-
# year.
|
|
1054
|
+
# refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
|
|
1055
|
+
# refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
|
|
1056
|
+
# are clamped to 1 year.
|
|
926
1057
|
max_age_ms: nil,
|
|
927
1058
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
928
1059
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
@@ -930,10 +1061,10 @@ module ContextDev
|
|
|
930
1061
|
max_speed: nil,
|
|
931
1062
|
# Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
932
1063
|
tags: nil,
|
|
933
|
-
# Optional
|
|
934
|
-
#
|
|
935
|
-
#
|
|
936
|
-
|
|
1064
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
1065
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
1066
|
+
# timeoutOpts object.
|
|
1067
|
+
timeout_opts: nil,
|
|
937
1068
|
# Discriminator for name-based brand retrieval.
|
|
938
1069
|
type: :by_name
|
|
939
1070
|
)
|
|
@@ -952,7 +1083,8 @@ module ContextDev
|
|
|
952
1083
|
max_age_ms: Integer,
|
|
953
1084
|
max_speed: T::Boolean,
|
|
954
1085
|
tags: T::Array[String],
|
|
955
|
-
|
|
1086
|
+
timeout_opts:
|
|
1087
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts
|
|
956
1088
|
}
|
|
957
1089
|
)
|
|
958
1090
|
end
|
|
@@ -1582,6 +1714,112 @@ module ContextDev
|
|
|
1582
1714
|
def self.values
|
|
1583
1715
|
end
|
|
1584
1716
|
end
|
|
1717
|
+
|
|
1718
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
1719
|
+
OrHash =
|
|
1720
|
+
T.type_alias do
|
|
1721
|
+
T.any(
|
|
1722
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts,
|
|
1723
|
+
ContextDev::Internal::AnyHash
|
|
1724
|
+
)
|
|
1725
|
+
end
|
|
1726
|
+
|
|
1727
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
1728
|
+
sig { returns(Integer) }
|
|
1729
|
+
attr_accessor :milliseconds
|
|
1730
|
+
|
|
1731
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
1732
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
1733
|
+
# available, the request still fails without charging credits. Partial results are
|
|
1734
|
+
# not cached as complete results.
|
|
1735
|
+
sig do
|
|
1736
|
+
returns(
|
|
1737
|
+
T.nilable(
|
|
1738
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts::Behavior::OrSymbol
|
|
1739
|
+
)
|
|
1740
|
+
)
|
|
1741
|
+
end
|
|
1742
|
+
attr_reader :behavior
|
|
1743
|
+
|
|
1744
|
+
sig do
|
|
1745
|
+
params(
|
|
1746
|
+
behavior:
|
|
1747
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts::Behavior::OrSymbol
|
|
1748
|
+
).void
|
|
1749
|
+
end
|
|
1750
|
+
attr_writer :behavior
|
|
1751
|
+
|
|
1752
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
1753
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
1754
|
+
# timeoutOpts object.
|
|
1755
|
+
sig do
|
|
1756
|
+
params(
|
|
1757
|
+
milliseconds: Integer,
|
|
1758
|
+
behavior:
|
|
1759
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts::Behavior::OrSymbol
|
|
1760
|
+
).returns(T.attached_class)
|
|
1761
|
+
end
|
|
1762
|
+
def self.new(
|
|
1763
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
1764
|
+
milliseconds:,
|
|
1765
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
1766
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
1767
|
+
# available, the request still fails without charging credits. Partial results are
|
|
1768
|
+
# not cached as complete results.
|
|
1769
|
+
behavior: nil
|
|
1770
|
+
)
|
|
1771
|
+
end
|
|
1772
|
+
|
|
1773
|
+
sig do
|
|
1774
|
+
override.returns(
|
|
1775
|
+
{
|
|
1776
|
+
milliseconds: Integer,
|
|
1777
|
+
behavior:
|
|
1778
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts::Behavior::OrSymbol
|
|
1779
|
+
}
|
|
1780
|
+
)
|
|
1781
|
+
end
|
|
1782
|
+
def to_hash
|
|
1783
|
+
end
|
|
1784
|
+
|
|
1785
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
1786
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
1787
|
+
# available, the request still fails without charging credits. Partial results are
|
|
1788
|
+
# not cached as complete results.
|
|
1789
|
+
module Behavior
|
|
1790
|
+
extend ContextDev::Internal::Type::Enum
|
|
1791
|
+
|
|
1792
|
+
TaggedSymbol =
|
|
1793
|
+
T.type_alias do
|
|
1794
|
+
T.all(
|
|
1795
|
+
Symbol,
|
|
1796
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts::Behavior
|
|
1797
|
+
)
|
|
1798
|
+
end
|
|
1799
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1800
|
+
|
|
1801
|
+
FAIL =
|
|
1802
|
+
T.let(
|
|
1803
|
+
:fail,
|
|
1804
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts::Behavior::TaggedSymbol
|
|
1805
|
+
)
|
|
1806
|
+
RETURN_PARTIAL =
|
|
1807
|
+
T.let(
|
|
1808
|
+
:"return-partial",
|
|
1809
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts::Behavior::TaggedSymbol
|
|
1810
|
+
)
|
|
1811
|
+
|
|
1812
|
+
sig do
|
|
1813
|
+
override.returns(
|
|
1814
|
+
T::Array[
|
|
1815
|
+
ContextDev::BrandRetrieveParams::Body::ByName::TimeoutOpts::Behavior::TaggedSymbol
|
|
1816
|
+
]
|
|
1817
|
+
)
|
|
1818
|
+
end
|
|
1819
|
+
def self.values
|
|
1820
|
+
end
|
|
1821
|
+
end
|
|
1822
|
+
end
|
|
1585
1823
|
end
|
|
1586
1824
|
|
|
1587
1825
|
class ByEmail < ContextDev::Internal::Type::BaseModel
|
|
@@ -1611,9 +1849,9 @@ module ContextDev
|
|
|
1611
1849
|
attr_accessor :force_language
|
|
1612
1850
|
|
|
1613
1851
|
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
1614
|
-
# refresh. Defaults to 3 months (7776000000 ms).
|
|
1615
|
-
# are clamped to
|
|
1616
|
-
# year.
|
|
1852
|
+
# refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
|
|
1853
|
+
# refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
|
|
1854
|
+
# are clamped to 1 year.
|
|
1617
1855
|
sig { returns(T.nilable(Integer)) }
|
|
1618
1856
|
attr_reader :max_age_ms
|
|
1619
1857
|
|
|
@@ -1636,14 +1874,25 @@ module ContextDev
|
|
|
1636
1874
|
sig { params(tags: T::Array[String]).void }
|
|
1637
1875
|
attr_writer :tags
|
|
1638
1876
|
|
|
1639
|
-
# Optional
|
|
1640
|
-
#
|
|
1641
|
-
#
|
|
1642
|
-
sig
|
|
1643
|
-
|
|
1877
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
1878
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
1879
|
+
# timeoutOpts object.
|
|
1880
|
+
sig do
|
|
1881
|
+
returns(
|
|
1882
|
+
T.nilable(
|
|
1883
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts
|
|
1884
|
+
)
|
|
1885
|
+
)
|
|
1886
|
+
end
|
|
1887
|
+
attr_reader :timeout_opts
|
|
1644
1888
|
|
|
1645
|
-
sig
|
|
1646
|
-
|
|
1889
|
+
sig do
|
|
1890
|
+
params(
|
|
1891
|
+
timeout_opts:
|
|
1892
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts::OrHash
|
|
1893
|
+
).void
|
|
1894
|
+
end
|
|
1895
|
+
attr_writer :timeout_opts
|
|
1647
1896
|
|
|
1648
1897
|
# Retrieve brand data by email address. The domain is extracted from the email.
|
|
1649
1898
|
# Free and disposable email providers are rejected with 422. Cannot be combined
|
|
@@ -1658,7 +1907,8 @@ module ContextDev
|
|
|
1658
1907
|
max_age_ms: Integer,
|
|
1659
1908
|
max_speed: T::Boolean,
|
|
1660
1909
|
tags: T::Array[String],
|
|
1661
|
-
|
|
1910
|
+
timeout_opts:
|
|
1911
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts::OrHash,
|
|
1662
1912
|
type: Symbol
|
|
1663
1913
|
).returns(T.attached_class)
|
|
1664
1914
|
end
|
|
@@ -1667,9 +1917,9 @@ module ContextDev
|
|
|
1667
1917
|
email:,
|
|
1668
1918
|
force_language: nil,
|
|
1669
1919
|
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
1670
|
-
# refresh. Defaults to 3 months (7776000000 ms).
|
|
1671
|
-
# are clamped to
|
|
1672
|
-
# year.
|
|
1920
|
+
# refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
|
|
1921
|
+
# refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
|
|
1922
|
+
# are clamped to 1 year.
|
|
1673
1923
|
max_age_ms: nil,
|
|
1674
1924
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
1675
1925
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
@@ -1677,10 +1927,10 @@ module ContextDev
|
|
|
1677
1927
|
max_speed: nil,
|
|
1678
1928
|
# Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
1679
1929
|
tags: nil,
|
|
1680
|
-
# Optional
|
|
1681
|
-
#
|
|
1682
|
-
#
|
|
1683
|
-
|
|
1930
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
1931
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
1932
|
+
# timeoutOpts object.
|
|
1933
|
+
timeout_opts: nil,
|
|
1684
1934
|
# Discriminator for email-based brand retrieval.
|
|
1685
1935
|
type: :by_email
|
|
1686
1936
|
)
|
|
@@ -1698,7 +1948,8 @@ module ContextDev
|
|
|
1698
1948
|
max_age_ms: Integer,
|
|
1699
1949
|
max_speed: T::Boolean,
|
|
1700
1950
|
tags: T::Array[String],
|
|
1701
|
-
|
|
1951
|
+
timeout_opts:
|
|
1952
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts
|
|
1702
1953
|
}
|
|
1703
1954
|
)
|
|
1704
1955
|
end
|
|
@@ -2328,6 +2579,112 @@ module ContextDev
|
|
|
2328
2579
|
def self.values
|
|
2329
2580
|
end
|
|
2330
2581
|
end
|
|
2582
|
+
|
|
2583
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
2584
|
+
OrHash =
|
|
2585
|
+
T.type_alias do
|
|
2586
|
+
T.any(
|
|
2587
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts,
|
|
2588
|
+
ContextDev::Internal::AnyHash
|
|
2589
|
+
)
|
|
2590
|
+
end
|
|
2591
|
+
|
|
2592
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
2593
|
+
sig { returns(Integer) }
|
|
2594
|
+
attr_accessor :milliseconds
|
|
2595
|
+
|
|
2596
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
2597
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
2598
|
+
# available, the request still fails without charging credits. Partial results are
|
|
2599
|
+
# not cached as complete results.
|
|
2600
|
+
sig do
|
|
2601
|
+
returns(
|
|
2602
|
+
T.nilable(
|
|
2603
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts::Behavior::OrSymbol
|
|
2604
|
+
)
|
|
2605
|
+
)
|
|
2606
|
+
end
|
|
2607
|
+
attr_reader :behavior
|
|
2608
|
+
|
|
2609
|
+
sig do
|
|
2610
|
+
params(
|
|
2611
|
+
behavior:
|
|
2612
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts::Behavior::OrSymbol
|
|
2613
|
+
).void
|
|
2614
|
+
end
|
|
2615
|
+
attr_writer :behavior
|
|
2616
|
+
|
|
2617
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
2618
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
2619
|
+
# timeoutOpts object.
|
|
2620
|
+
sig do
|
|
2621
|
+
params(
|
|
2622
|
+
milliseconds: Integer,
|
|
2623
|
+
behavior:
|
|
2624
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts::Behavior::OrSymbol
|
|
2625
|
+
).returns(T.attached_class)
|
|
2626
|
+
end
|
|
2627
|
+
def self.new(
|
|
2628
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
2629
|
+
milliseconds:,
|
|
2630
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
2631
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
2632
|
+
# available, the request still fails without charging credits. Partial results are
|
|
2633
|
+
# not cached as complete results.
|
|
2634
|
+
behavior: nil
|
|
2635
|
+
)
|
|
2636
|
+
end
|
|
2637
|
+
|
|
2638
|
+
sig do
|
|
2639
|
+
override.returns(
|
|
2640
|
+
{
|
|
2641
|
+
milliseconds: Integer,
|
|
2642
|
+
behavior:
|
|
2643
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts::Behavior::OrSymbol
|
|
2644
|
+
}
|
|
2645
|
+
)
|
|
2646
|
+
end
|
|
2647
|
+
def to_hash
|
|
2648
|
+
end
|
|
2649
|
+
|
|
2650
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
2651
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
2652
|
+
# available, the request still fails without charging credits. Partial results are
|
|
2653
|
+
# not cached as complete results.
|
|
2654
|
+
module Behavior
|
|
2655
|
+
extend ContextDev::Internal::Type::Enum
|
|
2656
|
+
|
|
2657
|
+
TaggedSymbol =
|
|
2658
|
+
T.type_alias do
|
|
2659
|
+
T.all(
|
|
2660
|
+
Symbol,
|
|
2661
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts::Behavior
|
|
2662
|
+
)
|
|
2663
|
+
end
|
|
2664
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2665
|
+
|
|
2666
|
+
FAIL =
|
|
2667
|
+
T.let(
|
|
2668
|
+
:fail,
|
|
2669
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts::Behavior::TaggedSymbol
|
|
2670
|
+
)
|
|
2671
|
+
RETURN_PARTIAL =
|
|
2672
|
+
T.let(
|
|
2673
|
+
:"return-partial",
|
|
2674
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts::Behavior::TaggedSymbol
|
|
2675
|
+
)
|
|
2676
|
+
|
|
2677
|
+
sig do
|
|
2678
|
+
override.returns(
|
|
2679
|
+
T::Array[
|
|
2680
|
+
ContextDev::BrandRetrieveParams::Body::ByEmail::TimeoutOpts::Behavior::TaggedSymbol
|
|
2681
|
+
]
|
|
2682
|
+
)
|
|
2683
|
+
end
|
|
2684
|
+
def self.values
|
|
2685
|
+
end
|
|
2686
|
+
end
|
|
2687
|
+
end
|
|
2331
2688
|
end
|
|
2332
2689
|
|
|
2333
2690
|
class ByTicker < ContextDev::Internal::Type::BaseModel
|
|
@@ -2357,9 +2714,9 @@ module ContextDev
|
|
|
2357
2714
|
attr_accessor :force_language
|
|
2358
2715
|
|
|
2359
2716
|
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
2360
|
-
# refresh. Defaults to 3 months (7776000000 ms).
|
|
2361
|
-
# are clamped to
|
|
2362
|
-
# year.
|
|
2717
|
+
# refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
|
|
2718
|
+
# refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
|
|
2719
|
+
# are clamped to 1 year.
|
|
2363
2720
|
sig { returns(T.nilable(Integer)) }
|
|
2364
2721
|
attr_reader :max_age_ms
|
|
2365
2722
|
|
|
@@ -2389,14 +2746,25 @@ module ContextDev
|
|
|
2389
2746
|
sig { params(ticker_exchange: String).void }
|
|
2390
2747
|
attr_writer :ticker_exchange
|
|
2391
2748
|
|
|
2392
|
-
# Optional
|
|
2393
|
-
#
|
|
2394
|
-
#
|
|
2395
|
-
sig
|
|
2396
|
-
|
|
2749
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
2750
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
2751
|
+
# timeoutOpts object.
|
|
2752
|
+
sig do
|
|
2753
|
+
returns(
|
|
2754
|
+
T.nilable(
|
|
2755
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts
|
|
2756
|
+
)
|
|
2757
|
+
)
|
|
2758
|
+
end
|
|
2759
|
+
attr_reader :timeout_opts
|
|
2397
2760
|
|
|
2398
|
-
sig
|
|
2399
|
-
|
|
2761
|
+
sig do
|
|
2762
|
+
params(
|
|
2763
|
+
timeout_opts:
|
|
2764
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts::OrHash
|
|
2765
|
+
).void
|
|
2766
|
+
end
|
|
2767
|
+
attr_writer :timeout_opts
|
|
2400
2768
|
|
|
2401
2769
|
# Retrieve brand data by stock ticker. Cannot be combined with domain, name, or
|
|
2402
2770
|
# email.
|
|
@@ -2411,7 +2779,8 @@ module ContextDev
|
|
|
2411
2779
|
max_speed: T::Boolean,
|
|
2412
2780
|
tags: T::Array[String],
|
|
2413
2781
|
ticker_exchange: String,
|
|
2414
|
-
|
|
2782
|
+
timeout_opts:
|
|
2783
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts::OrHash,
|
|
2415
2784
|
type: Symbol
|
|
2416
2785
|
).returns(T.attached_class)
|
|
2417
2786
|
end
|
|
@@ -2420,9 +2789,9 @@ module ContextDev
|
|
|
2420
2789
|
ticker:,
|
|
2421
2790
|
force_language: nil,
|
|
2422
2791
|
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
2423
|
-
# refresh. Defaults to 3 months (7776000000 ms).
|
|
2424
|
-
# are clamped to
|
|
2425
|
-
# year.
|
|
2792
|
+
# refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
|
|
2793
|
+
# refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
|
|
2794
|
+
# are clamped to 1 year.
|
|
2426
2795
|
max_age_ms: nil,
|
|
2427
2796
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
2428
2797
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
@@ -2432,10 +2801,10 @@ module ContextDev
|
|
|
2432
2801
|
tags: nil,
|
|
2433
2802
|
# Optional stock exchange for the ticker. Defaults to NASDAQ if not specified.
|
|
2434
2803
|
ticker_exchange: nil,
|
|
2435
|
-
# Optional
|
|
2436
|
-
#
|
|
2437
|
-
#
|
|
2438
|
-
|
|
2804
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
2805
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
2806
|
+
# timeoutOpts object.
|
|
2807
|
+
timeout_opts: nil,
|
|
2439
2808
|
# Discriminator for ticker-based brand retrieval.
|
|
2440
2809
|
type: :by_ticker
|
|
2441
2810
|
)
|
|
@@ -2454,7 +2823,8 @@ module ContextDev
|
|
|
2454
2823
|
max_speed: T::Boolean,
|
|
2455
2824
|
tags: T::Array[String],
|
|
2456
2825
|
ticker_exchange: String,
|
|
2457
|
-
|
|
2826
|
+
timeout_opts:
|
|
2827
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts
|
|
2458
2828
|
}
|
|
2459
2829
|
)
|
|
2460
2830
|
end
|
|
@@ -3084,6 +3454,112 @@ module ContextDev
|
|
|
3084
3454
|
def self.values
|
|
3085
3455
|
end
|
|
3086
3456
|
end
|
|
3457
|
+
|
|
3458
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
3459
|
+
OrHash =
|
|
3460
|
+
T.type_alias do
|
|
3461
|
+
T.any(
|
|
3462
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts,
|
|
3463
|
+
ContextDev::Internal::AnyHash
|
|
3464
|
+
)
|
|
3465
|
+
end
|
|
3466
|
+
|
|
3467
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
3468
|
+
sig { returns(Integer) }
|
|
3469
|
+
attr_accessor :milliseconds
|
|
3470
|
+
|
|
3471
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
3472
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
3473
|
+
# available, the request still fails without charging credits. Partial results are
|
|
3474
|
+
# not cached as complete results.
|
|
3475
|
+
sig do
|
|
3476
|
+
returns(
|
|
3477
|
+
T.nilable(
|
|
3478
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts::Behavior::OrSymbol
|
|
3479
|
+
)
|
|
3480
|
+
)
|
|
3481
|
+
end
|
|
3482
|
+
attr_reader :behavior
|
|
3483
|
+
|
|
3484
|
+
sig do
|
|
3485
|
+
params(
|
|
3486
|
+
behavior:
|
|
3487
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts::Behavior::OrSymbol
|
|
3488
|
+
).void
|
|
3489
|
+
end
|
|
3490
|
+
attr_writer :behavior
|
|
3491
|
+
|
|
3492
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
3493
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
3494
|
+
# timeoutOpts object.
|
|
3495
|
+
sig do
|
|
3496
|
+
params(
|
|
3497
|
+
milliseconds: Integer,
|
|
3498
|
+
behavior:
|
|
3499
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts::Behavior::OrSymbol
|
|
3500
|
+
).returns(T.attached_class)
|
|
3501
|
+
end
|
|
3502
|
+
def self.new(
|
|
3503
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
3504
|
+
milliseconds:,
|
|
3505
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
3506
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
3507
|
+
# available, the request still fails without charging credits. Partial results are
|
|
3508
|
+
# not cached as complete results.
|
|
3509
|
+
behavior: nil
|
|
3510
|
+
)
|
|
3511
|
+
end
|
|
3512
|
+
|
|
3513
|
+
sig do
|
|
3514
|
+
override.returns(
|
|
3515
|
+
{
|
|
3516
|
+
milliseconds: Integer,
|
|
3517
|
+
behavior:
|
|
3518
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts::Behavior::OrSymbol
|
|
3519
|
+
}
|
|
3520
|
+
)
|
|
3521
|
+
end
|
|
3522
|
+
def to_hash
|
|
3523
|
+
end
|
|
3524
|
+
|
|
3525
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
3526
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
3527
|
+
# available, the request still fails without charging credits. Partial results are
|
|
3528
|
+
# not cached as complete results.
|
|
3529
|
+
module Behavior
|
|
3530
|
+
extend ContextDev::Internal::Type::Enum
|
|
3531
|
+
|
|
3532
|
+
TaggedSymbol =
|
|
3533
|
+
T.type_alias do
|
|
3534
|
+
T.all(
|
|
3535
|
+
Symbol,
|
|
3536
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts::Behavior
|
|
3537
|
+
)
|
|
3538
|
+
end
|
|
3539
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3540
|
+
|
|
3541
|
+
FAIL =
|
|
3542
|
+
T.let(
|
|
3543
|
+
:fail,
|
|
3544
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts::Behavior::TaggedSymbol
|
|
3545
|
+
)
|
|
3546
|
+
RETURN_PARTIAL =
|
|
3547
|
+
T.let(
|
|
3548
|
+
:"return-partial",
|
|
3549
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts::Behavior::TaggedSymbol
|
|
3550
|
+
)
|
|
3551
|
+
|
|
3552
|
+
sig do
|
|
3553
|
+
override.returns(
|
|
3554
|
+
T::Array[
|
|
3555
|
+
ContextDev::BrandRetrieveParams::Body::ByTicker::TimeoutOpts::Behavior::TaggedSymbol
|
|
3556
|
+
]
|
|
3557
|
+
)
|
|
3558
|
+
end
|
|
3559
|
+
def self.values
|
|
3560
|
+
end
|
|
3561
|
+
end
|
|
3562
|
+
end
|
|
3087
3563
|
end
|
|
3088
3564
|
|
|
3089
3565
|
class ByDirectURL < ContextDev::Internal::Type::BaseModel
|
|
@@ -3112,14 +3588,25 @@ module ContextDev
|
|
|
3112
3588
|
sig { params(tags: T::Array[String]).void }
|
|
3113
3589
|
attr_writer :tags
|
|
3114
3590
|
|
|
3115
|
-
# Optional
|
|
3116
|
-
#
|
|
3117
|
-
#
|
|
3118
|
-
sig
|
|
3119
|
-
|
|
3591
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
3592
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
3593
|
+
# timeoutOpts object.
|
|
3594
|
+
sig do
|
|
3595
|
+
returns(
|
|
3596
|
+
T.nilable(
|
|
3597
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts
|
|
3598
|
+
)
|
|
3599
|
+
)
|
|
3600
|
+
end
|
|
3601
|
+
attr_reader :timeout_opts
|
|
3120
3602
|
|
|
3121
|
-
sig
|
|
3122
|
-
|
|
3603
|
+
sig do
|
|
3604
|
+
params(
|
|
3605
|
+
timeout_opts:
|
|
3606
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts::OrHash
|
|
3607
|
+
).void
|
|
3608
|
+
end
|
|
3609
|
+
attr_writer :timeout_opts
|
|
3123
3610
|
|
|
3124
3611
|
# Retrieve brand data by fetching the provided URL directly. Note: if you use
|
|
3125
3612
|
# this, brand data is fetched only from the provided URL — not from the entire
|
|
@@ -3130,7 +3617,8 @@ module ContextDev
|
|
|
3130
3617
|
params(
|
|
3131
3618
|
direct_url: String,
|
|
3132
3619
|
tags: T::Array[String],
|
|
3133
|
-
|
|
3620
|
+
timeout_opts:
|
|
3621
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts::OrHash,
|
|
3134
3622
|
type: Symbol
|
|
3135
3623
|
).returns(T.attached_class)
|
|
3136
3624
|
end
|
|
@@ -3141,10 +3629,10 @@ module ContextDev
|
|
|
3141
3629
|
direct_url:,
|
|
3142
3630
|
# Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
3143
3631
|
tags: nil,
|
|
3144
|
-
# Optional
|
|
3145
|
-
#
|
|
3146
|
-
#
|
|
3147
|
-
|
|
3632
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
3633
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
3634
|
+
# timeoutOpts object.
|
|
3635
|
+
timeout_opts: nil,
|
|
3148
3636
|
# Discriminator for direct-URL-based brand retrieval.
|
|
3149
3637
|
type: :by_direct_url
|
|
3150
3638
|
)
|
|
@@ -3156,12 +3644,119 @@ module ContextDev
|
|
|
3156
3644
|
direct_url: String,
|
|
3157
3645
|
type: Symbol,
|
|
3158
3646
|
tags: T::Array[String],
|
|
3159
|
-
|
|
3647
|
+
timeout_opts:
|
|
3648
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts
|
|
3160
3649
|
}
|
|
3161
3650
|
)
|
|
3162
3651
|
end
|
|
3163
3652
|
def to_hash
|
|
3164
3653
|
end
|
|
3654
|
+
|
|
3655
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
3656
|
+
OrHash =
|
|
3657
|
+
T.type_alias do
|
|
3658
|
+
T.any(
|
|
3659
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts,
|
|
3660
|
+
ContextDev::Internal::AnyHash
|
|
3661
|
+
)
|
|
3662
|
+
end
|
|
3663
|
+
|
|
3664
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
3665
|
+
sig { returns(Integer) }
|
|
3666
|
+
attr_accessor :milliseconds
|
|
3667
|
+
|
|
3668
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
3669
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
3670
|
+
# available, the request still fails without charging credits. Partial results are
|
|
3671
|
+
# not cached as complete results.
|
|
3672
|
+
sig do
|
|
3673
|
+
returns(
|
|
3674
|
+
T.nilable(
|
|
3675
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts::Behavior::OrSymbol
|
|
3676
|
+
)
|
|
3677
|
+
)
|
|
3678
|
+
end
|
|
3679
|
+
attr_reader :behavior
|
|
3680
|
+
|
|
3681
|
+
sig do
|
|
3682
|
+
params(
|
|
3683
|
+
behavior:
|
|
3684
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts::Behavior::OrSymbol
|
|
3685
|
+
).void
|
|
3686
|
+
end
|
|
3687
|
+
attr_writer :behavior
|
|
3688
|
+
|
|
3689
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
3690
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
3691
|
+
# timeoutOpts object.
|
|
3692
|
+
sig do
|
|
3693
|
+
params(
|
|
3694
|
+
milliseconds: Integer,
|
|
3695
|
+
behavior:
|
|
3696
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts::Behavior::OrSymbol
|
|
3697
|
+
).returns(T.attached_class)
|
|
3698
|
+
end
|
|
3699
|
+
def self.new(
|
|
3700
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
3701
|
+
milliseconds:,
|
|
3702
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
3703
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
3704
|
+
# available, the request still fails without charging credits. Partial results are
|
|
3705
|
+
# not cached as complete results.
|
|
3706
|
+
behavior: nil
|
|
3707
|
+
)
|
|
3708
|
+
end
|
|
3709
|
+
|
|
3710
|
+
sig do
|
|
3711
|
+
override.returns(
|
|
3712
|
+
{
|
|
3713
|
+
milliseconds: Integer,
|
|
3714
|
+
behavior:
|
|
3715
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts::Behavior::OrSymbol
|
|
3716
|
+
}
|
|
3717
|
+
)
|
|
3718
|
+
end
|
|
3719
|
+
def to_hash
|
|
3720
|
+
end
|
|
3721
|
+
|
|
3722
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
3723
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
3724
|
+
# available, the request still fails without charging credits. Partial results are
|
|
3725
|
+
# not cached as complete results.
|
|
3726
|
+
module Behavior
|
|
3727
|
+
extend ContextDev::Internal::Type::Enum
|
|
3728
|
+
|
|
3729
|
+
TaggedSymbol =
|
|
3730
|
+
T.type_alias do
|
|
3731
|
+
T.all(
|
|
3732
|
+
Symbol,
|
|
3733
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts::Behavior
|
|
3734
|
+
)
|
|
3735
|
+
end
|
|
3736
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3737
|
+
|
|
3738
|
+
FAIL =
|
|
3739
|
+
T.let(
|
|
3740
|
+
:fail,
|
|
3741
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts::Behavior::TaggedSymbol
|
|
3742
|
+
)
|
|
3743
|
+
RETURN_PARTIAL =
|
|
3744
|
+
T.let(
|
|
3745
|
+
:"return-partial",
|
|
3746
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts::Behavior::TaggedSymbol
|
|
3747
|
+
)
|
|
3748
|
+
|
|
3749
|
+
sig do
|
|
3750
|
+
override.returns(
|
|
3751
|
+
T::Array[
|
|
3752
|
+
ContextDev::BrandRetrieveParams::Body::ByDirectURL::TimeoutOpts::Behavior::TaggedSymbol
|
|
3753
|
+
]
|
|
3754
|
+
)
|
|
3755
|
+
end
|
|
3756
|
+
def self.values
|
|
3757
|
+
end
|
|
3758
|
+
end
|
|
3759
|
+
end
|
|
3165
3760
|
end
|
|
3166
3761
|
|
|
3167
3762
|
class ByTransaction < ContextDev::Internal::Type::BaseModel
|
|
@@ -3266,14 +3861,25 @@ module ContextDev
|
|
|
3266
3861
|
sig { params(tags: T::Array[String]).void }
|
|
3267
3862
|
attr_writer :tags
|
|
3268
3863
|
|
|
3269
|
-
# Optional
|
|
3270
|
-
#
|
|
3271
|
-
#
|
|
3272
|
-
sig
|
|
3273
|
-
|
|
3864
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
3865
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
3866
|
+
# timeoutOpts object.
|
|
3867
|
+
sig do
|
|
3868
|
+
returns(
|
|
3869
|
+
T.nilable(
|
|
3870
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts
|
|
3871
|
+
)
|
|
3872
|
+
)
|
|
3873
|
+
end
|
|
3874
|
+
attr_reader :timeout_opts
|
|
3274
3875
|
|
|
3275
|
-
sig
|
|
3276
|
-
|
|
3876
|
+
sig do
|
|
3877
|
+
params(
|
|
3878
|
+
timeout_opts:
|
|
3879
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts::OrHash
|
|
3880
|
+
).void
|
|
3881
|
+
end
|
|
3882
|
+
attr_writer :timeout_opts
|
|
3277
3883
|
|
|
3278
3884
|
# Identify brand data from a transaction descriptor. Cannot be combined with
|
|
3279
3885
|
# domain, name, email, or ticker.
|
|
@@ -3293,7 +3899,8 @@ module ContextDev
|
|
|
3293
3899
|
phone:
|
|
3294
3900
|
ContextDev::BrandRetrieveParams::Body::ByTransaction::Phone::Variants,
|
|
3295
3901
|
tags: T::Array[String],
|
|
3296
|
-
|
|
3902
|
+
timeout_opts:
|
|
3903
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts::OrHash,
|
|
3297
3904
|
type: Symbol
|
|
3298
3905
|
).returns(T.attached_class)
|
|
3299
3906
|
end
|
|
@@ -3320,10 +3927,10 @@ module ContextDev
|
|
|
3320
3927
|
phone: nil,
|
|
3321
3928
|
# Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
3322
3929
|
tags: nil,
|
|
3323
|
-
# Optional
|
|
3324
|
-
#
|
|
3325
|
-
#
|
|
3326
|
-
|
|
3930
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
3931
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
3932
|
+
# timeoutOpts object.
|
|
3933
|
+
timeout_opts: nil,
|
|
3327
3934
|
# Discriminator for transaction-based brand retrieval.
|
|
3328
3935
|
type: :by_transaction
|
|
3329
3936
|
)
|
|
@@ -3347,7 +3954,8 @@ module ContextDev
|
|
|
3347
3954
|
phone:
|
|
3348
3955
|
ContextDev::BrandRetrieveParams::Body::ByTransaction::Phone::Variants,
|
|
3349
3956
|
tags: T::Array[String],
|
|
3350
|
-
|
|
3957
|
+
timeout_opts:
|
|
3958
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts
|
|
3351
3959
|
}
|
|
3352
3960
|
)
|
|
3353
3961
|
end
|
|
@@ -4012,6 +4620,112 @@ module ContextDev
|
|
|
4012
4620
|
def self.variants
|
|
4013
4621
|
end
|
|
4014
4622
|
end
|
|
4623
|
+
|
|
4624
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
4625
|
+
OrHash =
|
|
4626
|
+
T.type_alias do
|
|
4627
|
+
T.any(
|
|
4628
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts,
|
|
4629
|
+
ContextDev::Internal::AnyHash
|
|
4630
|
+
)
|
|
4631
|
+
end
|
|
4632
|
+
|
|
4633
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
4634
|
+
sig { returns(Integer) }
|
|
4635
|
+
attr_accessor :milliseconds
|
|
4636
|
+
|
|
4637
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
4638
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
4639
|
+
# available, the request still fails without charging credits. Partial results are
|
|
4640
|
+
# not cached as complete results.
|
|
4641
|
+
sig do
|
|
4642
|
+
returns(
|
|
4643
|
+
T.nilable(
|
|
4644
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts::Behavior::OrSymbol
|
|
4645
|
+
)
|
|
4646
|
+
)
|
|
4647
|
+
end
|
|
4648
|
+
attr_reader :behavior
|
|
4649
|
+
|
|
4650
|
+
sig do
|
|
4651
|
+
params(
|
|
4652
|
+
behavior:
|
|
4653
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts::Behavior::OrSymbol
|
|
4654
|
+
).void
|
|
4655
|
+
end
|
|
4656
|
+
attr_writer :behavior
|
|
4657
|
+
|
|
4658
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
4659
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
4660
|
+
# timeoutOpts object.
|
|
4661
|
+
sig do
|
|
4662
|
+
params(
|
|
4663
|
+
milliseconds: Integer,
|
|
4664
|
+
behavior:
|
|
4665
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts::Behavior::OrSymbol
|
|
4666
|
+
).returns(T.attached_class)
|
|
4667
|
+
end
|
|
4668
|
+
def self.new(
|
|
4669
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
4670
|
+
milliseconds:,
|
|
4671
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
4672
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
4673
|
+
# available, the request still fails without charging credits. Partial results are
|
|
4674
|
+
# not cached as complete results.
|
|
4675
|
+
behavior: nil
|
|
4676
|
+
)
|
|
4677
|
+
end
|
|
4678
|
+
|
|
4679
|
+
sig do
|
|
4680
|
+
override.returns(
|
|
4681
|
+
{
|
|
4682
|
+
milliseconds: Integer,
|
|
4683
|
+
behavior:
|
|
4684
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts::Behavior::OrSymbol
|
|
4685
|
+
}
|
|
4686
|
+
)
|
|
4687
|
+
end
|
|
4688
|
+
def to_hash
|
|
4689
|
+
end
|
|
4690
|
+
|
|
4691
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
4692
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
4693
|
+
# available, the request still fails without charging credits. Partial results are
|
|
4694
|
+
# not cached as complete results.
|
|
4695
|
+
module Behavior
|
|
4696
|
+
extend ContextDev::Internal::Type::Enum
|
|
4697
|
+
|
|
4698
|
+
TaggedSymbol =
|
|
4699
|
+
T.type_alias do
|
|
4700
|
+
T.all(
|
|
4701
|
+
Symbol,
|
|
4702
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts::Behavior
|
|
4703
|
+
)
|
|
4704
|
+
end
|
|
4705
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4706
|
+
|
|
4707
|
+
FAIL =
|
|
4708
|
+
T.let(
|
|
4709
|
+
:fail,
|
|
4710
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts::Behavior::TaggedSymbol
|
|
4711
|
+
)
|
|
4712
|
+
RETURN_PARTIAL =
|
|
4713
|
+
T.let(
|
|
4714
|
+
:"return-partial",
|
|
4715
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts::Behavior::TaggedSymbol
|
|
4716
|
+
)
|
|
4717
|
+
|
|
4718
|
+
sig do
|
|
4719
|
+
override.returns(
|
|
4720
|
+
T::Array[
|
|
4721
|
+
ContextDev::BrandRetrieveParams::Body::ByTransaction::TimeoutOpts::Behavior::TaggedSymbol
|
|
4722
|
+
]
|
|
4723
|
+
)
|
|
4724
|
+
end
|
|
4725
|
+
def self.values
|
|
4726
|
+
end
|
|
4727
|
+
end
|
|
4728
|
+
end
|
|
4015
4729
|
end
|
|
4016
4730
|
|
|
4017
4731
|
sig do
|