context.dev 2.16.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 +17 -0
- data/README.md +1 -1
- data/lib/context_dev/models/ai_extract_product_params.rb +53 -8
- data/lib/context_dev/models/ai_extract_product_response.rb +10 -1
- data/lib/context_dev/models/ai_extract_products_params.rb +116 -16
- data/lib/context_dev/models/ai_extract_products_response.rb +11 -1
- data/lib/context_dev/models/brand_retrieve_params.rb +355 -60
- data/lib/context_dev/models/brand_retrieve_response.rb +10 -1
- data/lib/context_dev/models/brand_retrieve_simplified_params.rb +57 -11
- data/lib/context_dev/models/brand_retrieve_simplified_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 +10 -1
- data/lib/context_dev/models/industry_retrieve_sic_params.rb +53 -8
- data/lib/context_dev/models/industry_retrieve_sic_response.rb +10 -1
- 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/person_enrich_params.rb +53 -8
- data/lib/context_dev/models/person_enrich_response.rb +10 -1
- data/lib/context_dev/models/utility_prefetch_params.rb +48 -8
- 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 +10 -1
- data/lib/context_dev/models/web_extract_fonts_params.rb +58 -11
- data/lib/context_dev/models/web_extract_fonts_response.rb +32 -1
- data/lib/context_dev/models/web_extract_params.rb +53 -8
- data/lib/context_dev/models/web_extract_response.rb +10 -1
- data/lib/context_dev/models/web_extract_styleguide_params.rb +58 -11
- data/lib/context_dev/models/web_extract_styleguide_response.rb +32 -1
- data/lib/context_dev/models/web_screenshot_params.rb +58 -10
- data/lib/context_dev/models/web_screenshot_response.rb +32 -1
- data/lib/context_dev/models/web_search_params.rb +112 -16
- data/lib/context_dev/models/web_search_response.rb +43 -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 +11 -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 +57 -10
- data/lib/context_dev/models/web_web_scrape_html_response.rb +32 -1
- data/lib/context_dev/models/web_web_scrape_images_params.rb +57 -10
- data/lib/context_dev/models/web_web_scrape_images_response.rb +42 -1
- data/lib/context_dev/models/web_web_scrape_md_params.rb +57 -10
- data/lib/context_dev/models/web_web_scrape_md_response.rb +32 -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 +11 -1
- data/lib/context_dev/models.rb +4 -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/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 +4 -0
- data/rbi/context_dev/models/ai_extract_product_params.rbi +125 -13
- data/rbi/context_dev/models/ai_extract_product_response.rbi +13 -0
- data/rbi/context_dev/models/ai_extract_products_params.rbi +264 -26
- data/rbi/context_dev/models/ai_extract_products_response.rbi +15 -0
- data/rbi/context_dev/models/brand_retrieve_params.rbi +816 -102
- data/rbi/context_dev/models/brand_retrieve_response.rbi +13 -0
- data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +136 -19
- data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +13 -0
- data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +127 -13
- data/rbi/context_dev/models/industry_retrieve_naics_response.rbi +13 -0
- data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +127 -13
- data/rbi/context_dev/models/industry_retrieve_sic_response.rbi +13 -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/person_enrich_params.rbi +123 -13
- data/rbi/context_dev/models/person_enrich_response.rbi +16 -3
- data/rbi/context_dev/models/utility_prefetch_params.rbi +112 -13
- 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 +16 -3
- data/rbi/context_dev/models/web_extract_fonts_params.rbi +132 -19
- data/rbi/context_dev/models/web_extract_fonts_response.rbi +71 -0
- data/rbi/context_dev/models/web_extract_params.rbi +120 -13
- data/rbi/context_dev/models/web_extract_response.rbi +16 -3
- data/rbi/context_dev/models/web_extract_styleguide_params.rbi +136 -19
- data/rbi/context_dev/models/web_extract_styleguide_response.rbi +71 -0
- data/rbi/context_dev/models/web_screenshot_params.rbi +132 -17
- data/rbi/context_dev/models/web_screenshot_response.rbi +71 -0
- data/rbi/context_dev/models/web_search_params.rbi +253 -26
- data/rbi/context_dev/models/web_search_response.rbi +92 -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 +19 -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 +132 -17
- data/rbi/context_dev/models/web_web_scrape_html_response.rbi +61 -0
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +134 -17
- data/rbi/context_dev/models/web_web_scrape_images_response.rbi +89 -3
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +130 -17
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +61 -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 +18 -3
- data/rbi/context_dev/models.rbi +4 -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/people.rbi +5 -5
- data/rbi/context_dev/resources/utility.rbi +5 -5
- data/rbi/context_dev/resources/web.rbi +170 -72
- data/sig/context_dev/models/ai_extract_product_params.rbs +44 -5
- data/sig/context_dev/models/ai_extract_product_response.rbs +7 -0
- data/sig/context_dev/models/ai_extract_products_params.rbs +88 -10
- data/sig/context_dev/models/ai_extract_products_response.rbs +7 -0
- data/sig/context_dev/models/brand_retrieve_params.rbs +264 -30
- data/sig/context_dev/models/brand_retrieve_response.rbs +7 -0
- data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +44 -5
- data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +7 -0
- data/sig/context_dev/models/industry_retrieve_naics_params.rbs +44 -5
- data/sig/context_dev/models/industry_retrieve_naics_response.rbs +7 -0
- data/sig/context_dev/models/industry_retrieve_sic_params.rbs +44 -5
- data/sig/context_dev/models/industry_retrieve_sic_response.rbs +7 -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/person_enrich_params.rbs +44 -5
- data/sig/context_dev/models/person_enrich_response.rbs +10 -3
- data/sig/context_dev/models/utility_prefetch_params.rbs +43 -5
- 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 +10 -3
- data/sig/context_dev/models/web_extract_fonts_params.rbs +44 -5
- data/sig/context_dev/models/web_extract_fonts_response.rbs +20 -0
- data/sig/context_dev/models/web_extract_params.rbs +44 -5
- data/sig/context_dev/models/web_extract_response.rbs +10 -3
- data/sig/context_dev/models/web_extract_styleguide_params.rbs +44 -5
- data/sig/context_dev/models/web_extract_styleguide_response.rbs +20 -0
- data/sig/context_dev/models/web_screenshot_params.rbs +44 -5
- data/sig/context_dev/models/web_screenshot_response.rbs +20 -0
- data/sig/context_dev/models/web_search_params.rbs +88 -10
- data/sig/context_dev/models/web_search_response.rbs +33 -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 +10 -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 +16 -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 +30 -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 +16 -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 +10 -3
- data/sig/context_dev/models.rbs +4 -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/people.rbs +1 -1
- data/sig/context_dev/resources/utility.rbs +1 -1
- data/sig/context_dev/resources/web.rbs +30 -11
- metadata +14 -2
|
@@ -66,6 +66,14 @@ module ContextDev
|
|
|
66
66
|
end
|
|
67
67
|
attr_writer :key_metadata
|
|
68
68
|
|
|
69
|
+
# True when the timeout ended processing and this response contains the usable
|
|
70
|
+
# data completed so far. Unfinished fields are omitted.
|
|
71
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
72
|
+
attr_reader :partial
|
|
73
|
+
|
|
74
|
+
sig { params(partial: T::Boolean).void }
|
|
75
|
+
attr_writer :partial
|
|
76
|
+
|
|
69
77
|
# Status of the response, e.g., 'ok'
|
|
70
78
|
sig { returns(T.nilable(String)) }
|
|
71
79
|
attr_reader :status
|
|
@@ -82,6 +90,7 @@ module ContextDev
|
|
|
82
90
|
code: Integer,
|
|
83
91
|
key_metadata:
|
|
84
92
|
ContextDev::Models::BrandRetrieveResponse::KeyMetadata::OrHash,
|
|
93
|
+
partial: T::Boolean,
|
|
85
94
|
status: String
|
|
86
95
|
).returns(T.attached_class)
|
|
87
96
|
end
|
|
@@ -99,6 +108,9 @@ module ContextDev
|
|
|
99
108
|
code: nil,
|
|
100
109
|
# Credit usage, included whenever a valid API key is provided.
|
|
101
110
|
key_metadata: nil,
|
|
111
|
+
# True when the timeout ended processing and this response contains the usable
|
|
112
|
+
# data completed so far. Unfinished fields are omitted.
|
|
113
|
+
partial: nil,
|
|
102
114
|
# Status of the response, e.g., 'ok'
|
|
103
115
|
status: nil
|
|
104
116
|
)
|
|
@@ -114,6 +126,7 @@ module ContextDev
|
|
|
114
126
|
code: Integer,
|
|
115
127
|
key_metadata:
|
|
116
128
|
ContextDev::Models::BrandRetrieveResponse::KeyMetadata,
|
|
129
|
+
partial: T::Boolean,
|
|
117
130
|
status: String
|
|
118
131
|
}
|
|
119
132
|
)
|
|
@@ -19,9 +19,9 @@ module ContextDev
|
|
|
19
19
|
attr_accessor :domain
|
|
20
20
|
|
|
21
21
|
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
22
|
-
# refresh. Defaults to 3 months (7776000000 ms).
|
|
23
|
-
# are clamped to
|
|
24
|
-
# year.
|
|
22
|
+
# refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
|
|
23
|
+
# refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
|
|
24
|
+
# are clamped to 1 year.
|
|
25
25
|
sig { returns(T.nilable(Integer)) }
|
|
26
26
|
attr_accessor :max_age_ms
|
|
27
27
|
|
|
@@ -48,14 +48,23 @@ module ContextDev
|
|
|
48
48
|
end
|
|
49
49
|
attr_writer :theme
|
|
50
50
|
|
|
51
|
-
# Optional
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
sig
|
|
55
|
-
|
|
51
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
52
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
53
|
+
# timeoutOpts object.
|
|
54
|
+
sig do
|
|
55
|
+
returns(
|
|
56
|
+
T.nilable(ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts)
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
attr_reader :timeout_opts
|
|
56
60
|
|
|
57
|
-
sig
|
|
58
|
-
|
|
61
|
+
sig do
|
|
62
|
+
params(
|
|
63
|
+
timeout_opts:
|
|
64
|
+
ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts::OrHash
|
|
65
|
+
).void
|
|
66
|
+
end
|
|
67
|
+
attr_writer :timeout_opts
|
|
59
68
|
|
|
60
69
|
sig do
|
|
61
70
|
params(
|
|
@@ -63,7 +72,8 @@ module ContextDev
|
|
|
63
72
|
max_age_ms: T.nilable(Integer),
|
|
64
73
|
tags: T::Array[String],
|
|
65
74
|
theme: ContextDev::BrandRetrieveSimplifiedParams::Theme::OrSymbol,
|
|
66
|
-
|
|
75
|
+
timeout_opts:
|
|
76
|
+
ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts::OrHash,
|
|
67
77
|
request_options: ContextDev::RequestOptions::OrHash
|
|
68
78
|
).returns(T.attached_class)
|
|
69
79
|
end
|
|
@@ -71,19 +81,19 @@ module ContextDev
|
|
|
71
81
|
# Domain name to retrieve simplified brand data for
|
|
72
82
|
domain:,
|
|
73
83
|
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
74
|
-
# refresh. Defaults to 3 months (7776000000 ms).
|
|
75
|
-
# are clamped to
|
|
76
|
-
# year.
|
|
84
|
+
# refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
|
|
85
|
+
# refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
|
|
86
|
+
# are clamped to 1 year.
|
|
77
87
|
max_age_ms: nil,
|
|
78
88
|
# Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
|
|
79
89
|
# characters.
|
|
80
90
|
tags: nil,
|
|
81
91
|
# Optional theme preference used when selecting brand assets.
|
|
82
92
|
theme: nil,
|
|
83
|
-
# Optional
|
|
84
|
-
#
|
|
85
|
-
#
|
|
86
|
-
|
|
93
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
94
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
95
|
+
# timeoutOpts object.
|
|
96
|
+
timeout_opts: nil,
|
|
87
97
|
request_options: {}
|
|
88
98
|
)
|
|
89
99
|
end
|
|
@@ -95,7 +105,8 @@ module ContextDev
|
|
|
95
105
|
max_age_ms: T.nilable(Integer),
|
|
96
106
|
tags: T::Array[String],
|
|
97
107
|
theme: ContextDev::BrandRetrieveSimplifiedParams::Theme::OrSymbol,
|
|
98
|
-
|
|
108
|
+
timeout_opts:
|
|
109
|
+
ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts,
|
|
99
110
|
request_options: ContextDev::RequestOptions
|
|
100
111
|
}
|
|
101
112
|
)
|
|
@@ -134,6 +145,112 @@ module ContextDev
|
|
|
134
145
|
def self.values
|
|
135
146
|
end
|
|
136
147
|
end
|
|
148
|
+
|
|
149
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
150
|
+
OrHash =
|
|
151
|
+
T.type_alias do
|
|
152
|
+
T.any(
|
|
153
|
+
ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts,
|
|
154
|
+
ContextDev::Internal::AnyHash
|
|
155
|
+
)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
159
|
+
sig { returns(Integer) }
|
|
160
|
+
attr_accessor :milliseconds
|
|
161
|
+
|
|
162
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
163
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
164
|
+
# available, the request still fails without charging credits. Partial results are
|
|
165
|
+
# not cached as complete results.
|
|
166
|
+
sig do
|
|
167
|
+
returns(
|
|
168
|
+
T.nilable(
|
|
169
|
+
ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior::OrSymbol
|
|
170
|
+
)
|
|
171
|
+
)
|
|
172
|
+
end
|
|
173
|
+
attr_reader :behavior
|
|
174
|
+
|
|
175
|
+
sig do
|
|
176
|
+
params(
|
|
177
|
+
behavior:
|
|
178
|
+
ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior::OrSymbol
|
|
179
|
+
).void
|
|
180
|
+
end
|
|
181
|
+
attr_writer :behavior
|
|
182
|
+
|
|
183
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
184
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
185
|
+
# timeoutOpts object.
|
|
186
|
+
sig do
|
|
187
|
+
params(
|
|
188
|
+
milliseconds: Integer,
|
|
189
|
+
behavior:
|
|
190
|
+
ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior::OrSymbol
|
|
191
|
+
).returns(T.attached_class)
|
|
192
|
+
end
|
|
193
|
+
def self.new(
|
|
194
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
195
|
+
milliseconds:,
|
|
196
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
197
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
198
|
+
# available, the request still fails without charging credits. Partial results are
|
|
199
|
+
# not cached as complete results.
|
|
200
|
+
behavior: nil
|
|
201
|
+
)
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
sig do
|
|
205
|
+
override.returns(
|
|
206
|
+
{
|
|
207
|
+
milliseconds: Integer,
|
|
208
|
+
behavior:
|
|
209
|
+
ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior::OrSymbol
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
end
|
|
213
|
+
def to_hash
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
217
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
218
|
+
# available, the request still fails without charging credits. Partial results are
|
|
219
|
+
# not cached as complete results.
|
|
220
|
+
module Behavior
|
|
221
|
+
extend ContextDev::Internal::Type::Enum
|
|
222
|
+
|
|
223
|
+
TaggedSymbol =
|
|
224
|
+
T.type_alias do
|
|
225
|
+
T.all(
|
|
226
|
+
Symbol,
|
|
227
|
+
ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior
|
|
228
|
+
)
|
|
229
|
+
end
|
|
230
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
231
|
+
|
|
232
|
+
FAIL =
|
|
233
|
+
T.let(
|
|
234
|
+
:fail,
|
|
235
|
+
ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior::TaggedSymbol
|
|
236
|
+
)
|
|
237
|
+
RETURN_PARTIAL =
|
|
238
|
+
T.let(
|
|
239
|
+
:"return-partial",
|
|
240
|
+
ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior::TaggedSymbol
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
sig do
|
|
244
|
+
override.returns(
|
|
245
|
+
T::Array[
|
|
246
|
+
ContextDev::BrandRetrieveSimplifiedParams::TimeoutOpts::Behavior::TaggedSymbol
|
|
247
|
+
]
|
|
248
|
+
)
|
|
249
|
+
end
|
|
250
|
+
def self.values
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
end
|
|
137
254
|
end
|
|
138
255
|
end
|
|
139
256
|
end
|
|
@@ -75,6 +75,14 @@ module ContextDev
|
|
|
75
75
|
end
|
|
76
76
|
attr_writer :key_metadata
|
|
77
77
|
|
|
78
|
+
# True when the timeout ended processing and only completed brand data is
|
|
79
|
+
# returned.
|
|
80
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
81
|
+
attr_reader :partial
|
|
82
|
+
|
|
83
|
+
sig { params(partial: T::Boolean).void }
|
|
84
|
+
attr_writer :partial
|
|
85
|
+
|
|
78
86
|
# Status of the response, e.g., 'ok'
|
|
79
87
|
sig { returns(T.nilable(String)) }
|
|
80
88
|
attr_reader :status
|
|
@@ -92,6 +100,7 @@ module ContextDev
|
|
|
92
100
|
code: Integer,
|
|
93
101
|
key_metadata:
|
|
94
102
|
ContextDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata::OrHash,
|
|
103
|
+
partial: T::Boolean,
|
|
95
104
|
status: String
|
|
96
105
|
).returns(T.attached_class)
|
|
97
106
|
end
|
|
@@ -109,6 +118,9 @@ module ContextDev
|
|
|
109
118
|
code: nil,
|
|
110
119
|
# Credit usage, included whenever a valid API key is provided.
|
|
111
120
|
key_metadata: nil,
|
|
121
|
+
# True when the timeout ended processing and only completed brand data is
|
|
122
|
+
# returned.
|
|
123
|
+
partial: nil,
|
|
112
124
|
# Status of the response, e.g., 'ok'
|
|
113
125
|
status: nil
|
|
114
126
|
)
|
|
@@ -124,6 +136,7 @@ module ContextDev
|
|
|
124
136
|
code: Integer,
|
|
125
137
|
key_metadata:
|
|
126
138
|
ContextDev::Models::BrandRetrieveSimplifiedResponse::KeyMetadata,
|
|
139
|
+
partial: T::Boolean,
|
|
127
140
|
status: String
|
|
128
141
|
}
|
|
129
142
|
)
|
|
@@ -43,14 +43,21 @@ module ContextDev
|
|
|
43
43
|
sig { params(tags: T::Array[String]).void }
|
|
44
44
|
attr_writer :tags
|
|
45
45
|
|
|
46
|
-
# Optional
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
sig
|
|
50
|
-
|
|
46
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
47
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
48
|
+
# timeoutOpts object.
|
|
49
|
+
sig do
|
|
50
|
+
returns(T.nilable(ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts))
|
|
51
|
+
end
|
|
52
|
+
attr_reader :timeout_opts
|
|
51
53
|
|
|
52
|
-
sig
|
|
53
|
-
|
|
54
|
+
sig do
|
|
55
|
+
params(
|
|
56
|
+
timeout_opts:
|
|
57
|
+
ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts::OrHash
|
|
58
|
+
).void
|
|
59
|
+
end
|
|
60
|
+
attr_writer :timeout_opts
|
|
54
61
|
|
|
55
62
|
sig do
|
|
56
63
|
params(
|
|
@@ -58,7 +65,8 @@ module ContextDev
|
|
|
58
65
|
max_results: Integer,
|
|
59
66
|
min_results: Integer,
|
|
60
67
|
tags: T::Array[String],
|
|
61
|
-
|
|
68
|
+
timeout_opts:
|
|
69
|
+
ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts::OrHash,
|
|
62
70
|
request_options: ContextDev::RequestOptions::OrHash
|
|
63
71
|
).returns(T.attached_class)
|
|
64
72
|
end
|
|
@@ -75,10 +83,10 @@ module ContextDev
|
|
|
75
83
|
# Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
|
|
76
84
|
# characters.
|
|
77
85
|
tags: nil,
|
|
78
|
-
# Optional
|
|
79
|
-
#
|
|
80
|
-
#
|
|
81
|
-
|
|
86
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
87
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
88
|
+
# timeoutOpts object.
|
|
89
|
+
timeout_opts: nil,
|
|
82
90
|
request_options: {}
|
|
83
91
|
)
|
|
84
92
|
end
|
|
@@ -90,13 +98,119 @@ module ContextDev
|
|
|
90
98
|
max_results: Integer,
|
|
91
99
|
min_results: Integer,
|
|
92
100
|
tags: T::Array[String],
|
|
93
|
-
|
|
101
|
+
timeout_opts: ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts,
|
|
94
102
|
request_options: ContextDev::RequestOptions
|
|
95
103
|
}
|
|
96
104
|
)
|
|
97
105
|
end
|
|
98
106
|
def to_hash
|
|
99
107
|
end
|
|
108
|
+
|
|
109
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
110
|
+
OrHash =
|
|
111
|
+
T.type_alias do
|
|
112
|
+
T.any(
|
|
113
|
+
ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts,
|
|
114
|
+
ContextDev::Internal::AnyHash
|
|
115
|
+
)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
119
|
+
sig { returns(Integer) }
|
|
120
|
+
attr_accessor :milliseconds
|
|
121
|
+
|
|
122
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
123
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
124
|
+
# available, the request still fails without charging credits. Partial results are
|
|
125
|
+
# not cached as complete results.
|
|
126
|
+
sig do
|
|
127
|
+
returns(
|
|
128
|
+
T.nilable(
|
|
129
|
+
ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts::Behavior::OrSymbol
|
|
130
|
+
)
|
|
131
|
+
)
|
|
132
|
+
end
|
|
133
|
+
attr_reader :behavior
|
|
134
|
+
|
|
135
|
+
sig do
|
|
136
|
+
params(
|
|
137
|
+
behavior:
|
|
138
|
+
ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts::Behavior::OrSymbol
|
|
139
|
+
).void
|
|
140
|
+
end
|
|
141
|
+
attr_writer :behavior
|
|
142
|
+
|
|
143
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
144
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
145
|
+
# timeoutOpts object.
|
|
146
|
+
sig do
|
|
147
|
+
params(
|
|
148
|
+
milliseconds: Integer,
|
|
149
|
+
behavior:
|
|
150
|
+
ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts::Behavior::OrSymbol
|
|
151
|
+
).returns(T.attached_class)
|
|
152
|
+
end
|
|
153
|
+
def self.new(
|
|
154
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
155
|
+
milliseconds:,
|
|
156
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
157
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
158
|
+
# available, the request still fails without charging credits. Partial results are
|
|
159
|
+
# not cached as complete results.
|
|
160
|
+
behavior: nil
|
|
161
|
+
)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
sig do
|
|
165
|
+
override.returns(
|
|
166
|
+
{
|
|
167
|
+
milliseconds: Integer,
|
|
168
|
+
behavior:
|
|
169
|
+
ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts::Behavior::OrSymbol
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
end
|
|
173
|
+
def to_hash
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
177
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
178
|
+
# available, the request still fails without charging credits. Partial results are
|
|
179
|
+
# not cached as complete results.
|
|
180
|
+
module Behavior
|
|
181
|
+
extend ContextDev::Internal::Type::Enum
|
|
182
|
+
|
|
183
|
+
TaggedSymbol =
|
|
184
|
+
T.type_alias do
|
|
185
|
+
T.all(
|
|
186
|
+
Symbol,
|
|
187
|
+
ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts::Behavior
|
|
188
|
+
)
|
|
189
|
+
end
|
|
190
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
191
|
+
|
|
192
|
+
FAIL =
|
|
193
|
+
T.let(
|
|
194
|
+
:fail,
|
|
195
|
+
ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts::Behavior::TaggedSymbol
|
|
196
|
+
)
|
|
197
|
+
RETURN_PARTIAL =
|
|
198
|
+
T.let(
|
|
199
|
+
:"return-partial",
|
|
200
|
+
ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts::Behavior::TaggedSymbol
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
sig do
|
|
204
|
+
override.returns(
|
|
205
|
+
T::Array[
|
|
206
|
+
ContextDev::IndustryRetrieveNaicsParams::TimeoutOpts::Behavior::TaggedSymbol
|
|
207
|
+
]
|
|
208
|
+
)
|
|
209
|
+
end
|
|
210
|
+
def self.values
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
end
|
|
100
214
|
end
|
|
101
215
|
end
|
|
102
216
|
end
|
|
@@ -61,6 +61,14 @@ module ContextDev
|
|
|
61
61
|
end
|
|
62
62
|
attr_writer :key_metadata
|
|
63
63
|
|
|
64
|
+
# True when the timeout ended processing and this response contains only usable
|
|
65
|
+
# results completed so far. Unfinished results are omitted.
|
|
66
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
67
|
+
attr_reader :partial
|
|
68
|
+
|
|
69
|
+
sig { params(partial: T::Boolean).void }
|
|
70
|
+
attr_writer :partial
|
|
71
|
+
|
|
64
72
|
# Status of the response, e.g., 'ok'
|
|
65
73
|
sig { returns(T.nilable(String)) }
|
|
66
74
|
attr_reader :status
|
|
@@ -85,6 +93,7 @@ module ContextDev
|
|
|
85
93
|
domain: String,
|
|
86
94
|
key_metadata:
|
|
87
95
|
ContextDev::Models::IndustryRetrieveNaicsResponse::KeyMetadata::OrHash,
|
|
96
|
+
partial: T::Boolean,
|
|
88
97
|
status: String,
|
|
89
98
|
type: String
|
|
90
99
|
).returns(T.attached_class)
|
|
@@ -99,6 +108,9 @@ module ContextDev
|
|
|
99
108
|
domain: nil,
|
|
100
109
|
# Credit usage, included whenever a valid API key is provided.
|
|
101
110
|
key_metadata: nil,
|
|
111
|
+
# True when the timeout ended processing and this response contains only usable
|
|
112
|
+
# results completed so far. Unfinished results are omitted.
|
|
113
|
+
partial: nil,
|
|
102
114
|
# Status of the response, e.g., 'ok'
|
|
103
115
|
status: nil,
|
|
104
116
|
# Industry classification type, for naics api it will be `naics`
|
|
@@ -115,6 +127,7 @@ module ContextDev
|
|
|
115
127
|
domain: String,
|
|
116
128
|
key_metadata:
|
|
117
129
|
ContextDev::Models::IndustryRetrieveNaicsResponse::KeyMetadata,
|
|
130
|
+
partial: T::Boolean,
|
|
118
131
|
status: String,
|
|
119
132
|
type: String
|
|
120
133
|
}
|
|
@@ -42,14 +42,21 @@ module ContextDev
|
|
|
42
42
|
sig { params(tags: T::Array[String]).void }
|
|
43
43
|
attr_writer :tags
|
|
44
44
|
|
|
45
|
-
# Optional
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
-
sig
|
|
49
|
-
|
|
45
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
46
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
47
|
+
# timeoutOpts object.
|
|
48
|
+
sig do
|
|
49
|
+
returns(T.nilable(ContextDev::IndustryRetrieveSicParams::TimeoutOpts))
|
|
50
|
+
end
|
|
51
|
+
attr_reader :timeout_opts
|
|
50
52
|
|
|
51
|
-
sig
|
|
52
|
-
|
|
53
|
+
sig do
|
|
54
|
+
params(
|
|
55
|
+
timeout_opts:
|
|
56
|
+
ContextDev::IndustryRetrieveSicParams::TimeoutOpts::OrHash
|
|
57
|
+
).void
|
|
58
|
+
end
|
|
59
|
+
attr_writer :timeout_opts
|
|
53
60
|
|
|
54
61
|
# Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
|
|
55
62
|
# Industrial Classification system; `latest_sec` uses the current SIC list as
|
|
@@ -72,7 +79,8 @@ module ContextDev
|
|
|
72
79
|
max_results: Integer,
|
|
73
80
|
min_results: Integer,
|
|
74
81
|
tags: T::Array[String],
|
|
75
|
-
|
|
82
|
+
timeout_opts:
|
|
83
|
+
ContextDev::IndustryRetrieveSicParams::TimeoutOpts::OrHash,
|
|
76
84
|
type: ContextDev::IndustryRetrieveSicParams::Type::OrSymbol,
|
|
77
85
|
request_options: ContextDev::RequestOptions::OrHash
|
|
78
86
|
).returns(T.attached_class)
|
|
@@ -89,10 +97,10 @@ module ContextDev
|
|
|
89
97
|
# Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
|
|
90
98
|
# characters.
|
|
91
99
|
tags: nil,
|
|
92
|
-
# Optional
|
|
93
|
-
#
|
|
94
|
-
#
|
|
95
|
-
|
|
100
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
101
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
102
|
+
# timeoutOpts object.
|
|
103
|
+
timeout_opts: nil,
|
|
96
104
|
# Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
|
|
97
105
|
# Industrial Classification system; `latest_sec` uses the current SIC list as
|
|
98
106
|
# published by the SEC. Defaults to `original_sic`.
|
|
@@ -108,7 +116,7 @@ module ContextDev
|
|
|
108
116
|
max_results: Integer,
|
|
109
117
|
min_results: Integer,
|
|
110
118
|
tags: T::Array[String],
|
|
111
|
-
|
|
119
|
+
timeout_opts: ContextDev::IndustryRetrieveSicParams::TimeoutOpts,
|
|
112
120
|
type: ContextDev::IndustryRetrieveSicParams::Type::OrSymbol,
|
|
113
121
|
request_options: ContextDev::RequestOptions
|
|
114
122
|
}
|
|
@@ -117,6 +125,112 @@ module ContextDev
|
|
|
117
125
|
def to_hash
|
|
118
126
|
end
|
|
119
127
|
|
|
128
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
129
|
+
OrHash =
|
|
130
|
+
T.type_alias do
|
|
131
|
+
T.any(
|
|
132
|
+
ContextDev::IndustryRetrieveSicParams::TimeoutOpts,
|
|
133
|
+
ContextDev::Internal::AnyHash
|
|
134
|
+
)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
138
|
+
sig { returns(Integer) }
|
|
139
|
+
attr_accessor :milliseconds
|
|
140
|
+
|
|
141
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
142
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
143
|
+
# available, the request still fails without charging credits. Partial results are
|
|
144
|
+
# not cached as complete results.
|
|
145
|
+
sig do
|
|
146
|
+
returns(
|
|
147
|
+
T.nilable(
|
|
148
|
+
ContextDev::IndustryRetrieveSicParams::TimeoutOpts::Behavior::OrSymbol
|
|
149
|
+
)
|
|
150
|
+
)
|
|
151
|
+
end
|
|
152
|
+
attr_reader :behavior
|
|
153
|
+
|
|
154
|
+
sig do
|
|
155
|
+
params(
|
|
156
|
+
behavior:
|
|
157
|
+
ContextDev::IndustryRetrieveSicParams::TimeoutOpts::Behavior::OrSymbol
|
|
158
|
+
).void
|
|
159
|
+
end
|
|
160
|
+
attr_writer :behavior
|
|
161
|
+
|
|
162
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
163
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
164
|
+
# timeoutOpts object.
|
|
165
|
+
sig do
|
|
166
|
+
params(
|
|
167
|
+
milliseconds: Integer,
|
|
168
|
+
behavior:
|
|
169
|
+
ContextDev::IndustryRetrieveSicParams::TimeoutOpts::Behavior::OrSymbol
|
|
170
|
+
).returns(T.attached_class)
|
|
171
|
+
end
|
|
172
|
+
def self.new(
|
|
173
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
174
|
+
milliseconds:,
|
|
175
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
176
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
177
|
+
# available, the request still fails without charging credits. Partial results are
|
|
178
|
+
# not cached as complete results.
|
|
179
|
+
behavior: nil
|
|
180
|
+
)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
sig do
|
|
184
|
+
override.returns(
|
|
185
|
+
{
|
|
186
|
+
milliseconds: Integer,
|
|
187
|
+
behavior:
|
|
188
|
+
ContextDev::IndustryRetrieveSicParams::TimeoutOpts::Behavior::OrSymbol
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
def to_hash
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
196
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
197
|
+
# available, the request still fails without charging credits. Partial results are
|
|
198
|
+
# not cached as complete results.
|
|
199
|
+
module Behavior
|
|
200
|
+
extend ContextDev::Internal::Type::Enum
|
|
201
|
+
|
|
202
|
+
TaggedSymbol =
|
|
203
|
+
T.type_alias do
|
|
204
|
+
T.all(
|
|
205
|
+
Symbol,
|
|
206
|
+
ContextDev::IndustryRetrieveSicParams::TimeoutOpts::Behavior
|
|
207
|
+
)
|
|
208
|
+
end
|
|
209
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
210
|
+
|
|
211
|
+
FAIL =
|
|
212
|
+
T.let(
|
|
213
|
+
:fail,
|
|
214
|
+
ContextDev::IndustryRetrieveSicParams::TimeoutOpts::Behavior::TaggedSymbol
|
|
215
|
+
)
|
|
216
|
+
RETURN_PARTIAL =
|
|
217
|
+
T.let(
|
|
218
|
+
:"return-partial",
|
|
219
|
+
ContextDev::IndustryRetrieveSicParams::TimeoutOpts::Behavior::TaggedSymbol
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
sig do
|
|
223
|
+
override.returns(
|
|
224
|
+
T::Array[
|
|
225
|
+
ContextDev::IndustryRetrieveSicParams::TimeoutOpts::Behavior::TaggedSymbol
|
|
226
|
+
]
|
|
227
|
+
)
|
|
228
|
+
end
|
|
229
|
+
def self.values
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
120
234
|
# Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
|
|
121
235
|
# Industrial Classification system; `latest_sec` uses the current SIC list as
|
|
122
236
|
# published by the SEC. Defaults to `original_sic`.
|