context.dev 2.9.0 → 2.11.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 +23 -0
- data/README.md +1 -1
- data/lib/context_dev/client.rb +5 -0
- data/lib/context_dev/models/batch_get_results_response.rb +33 -3
- data/lib/context_dev/models/batch_submit_params.rb +44 -316
- data/lib/context_dev/models/brand_retrieve_response.rb +29 -1
- data/lib/context_dev/models/brand_retrieve_simplified_response.rb +30 -1
- data/lib/context_dev/models/brand_search_params.rb +41 -3
- data/lib/context_dev/models/news_search_params.rb +467 -0
- data/lib/context_dev/models/news_search_response.rb +284 -0
- data/lib/context_dev/models/parse_handle_params.rb +15 -144
- data/lib/context_dev/models/person_enrich_response.rb +61 -1
- data/lib/context_dev/models/utility_prefetch_params.rb +19 -16
- data/lib/context_dev/models/utility_prefetch_response.rb +4 -5
- data/lib/context_dev/models/web_screenshot_params.rb +16 -31
- data/lib/context_dev/models/web_web_crawl_md_response.rb +30 -1
- data/lib/context_dev/models/web_web_scrape_html_params.rb +15 -153
- data/lib/context_dev/models/web_web_scrape_html_response.rb +30 -1
- data/lib/context_dev/models/web_web_scrape_images_params.rb +12 -124
- data/lib/context_dev/models/web_web_scrape_md_params.rb +35 -238
- data/lib/context_dev/models/web_web_scrape_md_response.rb +41 -2
- data/lib/context_dev/models.rb +2 -0
- data/lib/context_dev/resources/brand.rb +10 -11
- data/lib/context_dev/resources/news.rb +51 -0
- data/lib/context_dev/resources/parse.rb +5 -5
- data/lib/context_dev/resources/utility.rb +7 -6
- data/lib/context_dev/resources/web.rb +30 -24
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +3 -0
- data/rbi/context_dev/client.rbi +4 -0
- data/rbi/context_dev/models/batch_get_results_response.rbi +71 -2
- data/rbi/context_dev/models/batch_submit_params.rbi +58 -592
- data/rbi/context_dev/models/brand_retrieve_response.rbi +80 -3
- data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +80 -3
- data/rbi/context_dev/models/brand_search_params.rbi +71 -2
- data/rbi/context_dev/models/news_search_params.rbi +1294 -0
- data/rbi/context_dev/models/news_search_response.rbi +489 -0
- data/rbi/context_dev/models/parse_handle_params.rbi +20 -316
- data/rbi/context_dev/models/person_enrich_response.rbi +87 -0
- data/rbi/context_dev/models/utility_prefetch_params.rbi +24 -16
- data/rbi/context_dev/models/utility_prefetch_response.rbi +8 -6
- data/rbi/context_dev/models/web_screenshot_params.rbi +23 -71
- data/rbi/context_dev/models/web_web_crawl_md_response.rbi +67 -0
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +20 -356
- data/rbi/context_dev/models/web_web_scrape_html_response.rbi +65 -0
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +16 -287
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +47 -551
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +80 -0
- data/rbi/context_dev/models.rbi +2 -0
- data/rbi/context_dev/resources/brand.rbi +14 -9
- data/rbi/context_dev/resources/news.rbi +46 -0
- data/rbi/context_dev/resources/parse.rbi +5 -21
- data/rbi/context_dev/resources/utility.rbi +8 -6
- data/rbi/context_dev/resources/web.rbi +34 -66
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/batch_get_results_response.rbs +21 -0
- data/sig/context_dev/models/batch_submit_params.rbs +54 -144
- data/sig/context_dev/models/brand_retrieve_response.rbs +33 -3
- data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +33 -3
- data/sig/context_dev/models/brand_search_params.rbs +38 -1
- data/sig/context_dev/models/news_search_params.rbs +532 -0
- data/sig/context_dev/models/news_search_response.rbs +206 -0
- data/sig/context_dev/models/parse_handle_params.rbs +25 -90
- data/sig/context_dev/models/person_enrich_response.rbs +31 -0
- data/sig/context_dev/models/utility_prefetch_params.rbs +2 -1
- data/sig/context_dev/models/utility_prefetch_response.rbs +2 -1
- data/sig/context_dev/models/web_screenshot_params.rbs +12 -18
- data/sig/context_dev/models/web_web_crawl_md_response.rbs +21 -0
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +24 -94
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +21 -0
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +20 -72
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +46 -148
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +28 -0
- data/sig/context_dev/models.rbs +2 -0
- data/sig/context_dev/resources/brand.rbs +3 -0
- data/sig/context_dev/resources/news.rbs +17 -0
- data/sig/context_dev/resources/parse.rbs +5 -5
- data/sig/context_dev/resources/web.rbs +13 -11
- metadata +11 -2
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::News#search
|
|
6
|
+
class NewsSearchResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
# Articles matching the search, in the requested order.
|
|
9
|
+
#
|
|
10
|
+
# @return [Array<ContextDev::Models::NewsSearchResponse::Data>]
|
|
11
|
+
required :data, -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::NewsSearchResponse::Data] }
|
|
12
|
+
|
|
13
|
+
# @!attribute has_more
|
|
14
|
+
# True when more results are available beyond this page.
|
|
15
|
+
#
|
|
16
|
+
# @return [Boolean]
|
|
17
|
+
required :has_more, ContextDev::Internal::Type::Boolean
|
|
18
|
+
|
|
19
|
+
# @!attribute meta
|
|
20
|
+
# Summary information about this response.
|
|
21
|
+
#
|
|
22
|
+
# @return [ContextDev::Models::NewsSearchResponse::Meta]
|
|
23
|
+
required :meta, -> { ContextDev::Models::NewsSearchResponse::Meta }
|
|
24
|
+
|
|
25
|
+
# @!attribute next_cursor
|
|
26
|
+
# Pass as cursor in the next request to fetch the following page. Null when there
|
|
27
|
+
# are no more results.
|
|
28
|
+
#
|
|
29
|
+
# @return [String, nil]
|
|
30
|
+
required :next_cursor, String, nil?: true
|
|
31
|
+
|
|
32
|
+
# @!attribute key_metadata
|
|
33
|
+
# Metadata about the API key used for the request. Included in every response
|
|
34
|
+
# whenever a valid API key is provided, even when the response status is not 200.
|
|
35
|
+
#
|
|
36
|
+
# @return [ContextDev::Models::NewsSearchResponse::KeyMetadata, nil]
|
|
37
|
+
optional :key_metadata, -> { ContextDev::Models::NewsSearchResponse::KeyMetadata }
|
|
38
|
+
|
|
39
|
+
# @!method initialize(data:, has_more:, meta:, next_cursor:, key_metadata: nil)
|
|
40
|
+
# Some parameter documentations has been truncated, see
|
|
41
|
+
# {ContextDev::Models::NewsSearchResponse} for more details.
|
|
42
|
+
#
|
|
43
|
+
# @param data [Array<ContextDev::Models::NewsSearchResponse::Data>] Articles matching the search, in the requested order.
|
|
44
|
+
#
|
|
45
|
+
# @param has_more [Boolean] True when more results are available beyond this page.
|
|
46
|
+
#
|
|
47
|
+
# @param meta [ContextDev::Models::NewsSearchResponse::Meta] Summary information about this response.
|
|
48
|
+
#
|
|
49
|
+
# @param next_cursor [String, nil] Pass as cursor in the next request to fetch the following page. Null when there
|
|
50
|
+
#
|
|
51
|
+
# @param key_metadata [ContextDev::Models::NewsSearchResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when
|
|
52
|
+
|
|
53
|
+
class Data < ContextDev::Internal::Type::BaseModel
|
|
54
|
+
# @!attribute id
|
|
55
|
+
# Stable unique identifier for this article. Use it to deduplicate or reference an
|
|
56
|
+
# article across requests.
|
|
57
|
+
#
|
|
58
|
+
# @return [String]
|
|
59
|
+
required :id, String
|
|
60
|
+
|
|
61
|
+
# @!attribute authors
|
|
62
|
+
# Bylined authors. Empty when no byline is available.
|
|
63
|
+
#
|
|
64
|
+
# @return [Array<String>]
|
|
65
|
+
required :authors, ContextDev::Internal::Type::ArrayOf[String]
|
|
66
|
+
|
|
67
|
+
# @!attribute description
|
|
68
|
+
# Short summary or excerpt of the article, when the publisher provides one.
|
|
69
|
+
#
|
|
70
|
+
# @return [String, nil]
|
|
71
|
+
required :description, String, nil?: true
|
|
72
|
+
|
|
73
|
+
# @!attribute image_url
|
|
74
|
+
# Lead image for the article, when one is available.
|
|
75
|
+
#
|
|
76
|
+
# @return [String, nil]
|
|
77
|
+
required :image_url, String, nil?: true
|
|
78
|
+
|
|
79
|
+
# @!attribute language
|
|
80
|
+
# Language the article is written in, as a lowercase ISO 639-1 code such as en.
|
|
81
|
+
# Null when unknown.
|
|
82
|
+
#
|
|
83
|
+
# @return [String, nil]
|
|
84
|
+
required :language, String, nil?: true
|
|
85
|
+
|
|
86
|
+
# @!attribute match
|
|
87
|
+
# How the article relates to the company you searched for.
|
|
88
|
+
#
|
|
89
|
+
# @return [ContextDev::Models::NewsSearchResponse::Data::Match]
|
|
90
|
+
required :match, -> { ContextDev::Models::NewsSearchResponse::Data::Match }
|
|
91
|
+
|
|
92
|
+
# @!attribute published_at
|
|
93
|
+
# When the article was published, as an ISO 8601 timestamp. Null when the
|
|
94
|
+
# publisher does not state a reliable date.
|
|
95
|
+
#
|
|
96
|
+
# @return [Time, nil]
|
|
97
|
+
required :published_at, Time, nil?: true
|
|
98
|
+
|
|
99
|
+
# @!attribute source
|
|
100
|
+
# The publication that published the article.
|
|
101
|
+
#
|
|
102
|
+
# @return [ContextDev::Models::NewsSearchResponse::Data::Source]
|
|
103
|
+
required :source, -> { ContextDev::Models::NewsSearchResponse::Data::Source }
|
|
104
|
+
|
|
105
|
+
# @!attribute story_id
|
|
106
|
+
# Shared by articles covering the same story on the same day. Use it to group or
|
|
107
|
+
# collapse syndicated copies of one announcement across outlets.
|
|
108
|
+
#
|
|
109
|
+
# @return [String]
|
|
110
|
+
required :story_id, String
|
|
111
|
+
|
|
112
|
+
# @!attribute title
|
|
113
|
+
# Article headline.
|
|
114
|
+
#
|
|
115
|
+
# @return [String]
|
|
116
|
+
required :title, String
|
|
117
|
+
|
|
118
|
+
# @!attribute type
|
|
119
|
+
# Kind of coverage. Use it to separate independent reporting (editorial) from
|
|
120
|
+
# company-issued content (press_release, regulatory_filing, advisory).
|
|
121
|
+
#
|
|
122
|
+
# @return [Symbol, ContextDev::Models::NewsSearchResponse::Data::Type]
|
|
123
|
+
required :type, enum: -> { ContextDev::Models::NewsSearchResponse::Data::Type }
|
|
124
|
+
|
|
125
|
+
# @!attribute url
|
|
126
|
+
# Link to the article on the publisher site.
|
|
127
|
+
#
|
|
128
|
+
# @return [String]
|
|
129
|
+
required :url, String
|
|
130
|
+
|
|
131
|
+
# @!method initialize(id:, authors:, description:, image_url:, language:, match:, published_at:, source:, story_id:, title:, type:, url:)
|
|
132
|
+
# Some parameter documentations has been truncated, see
|
|
133
|
+
# {ContextDev::Models::NewsSearchResponse::Data} for more details.
|
|
134
|
+
#
|
|
135
|
+
# @param id [String] Stable unique identifier for this article. Use it to deduplicate or reference an
|
|
136
|
+
#
|
|
137
|
+
# @param authors [Array<String>] Bylined authors. Empty when no byline is available.
|
|
138
|
+
#
|
|
139
|
+
# @param description [String, nil] Short summary or excerpt of the article, when the publisher provides one.
|
|
140
|
+
#
|
|
141
|
+
# @param image_url [String, nil] Lead image for the article, when one is available.
|
|
142
|
+
#
|
|
143
|
+
# @param language [String, nil] Language the article is written in, as a lowercase ISO 639-1 code such as en. Nu
|
|
144
|
+
#
|
|
145
|
+
# @param match [ContextDev::Models::NewsSearchResponse::Data::Match] How the article relates to the company you searched for.
|
|
146
|
+
#
|
|
147
|
+
# @param published_at [Time, nil] When the article was published, as an ISO 8601 timestamp. Null when the publishe
|
|
148
|
+
#
|
|
149
|
+
# @param source [ContextDev::Models::NewsSearchResponse::Data::Source] The publication that published the article.
|
|
150
|
+
#
|
|
151
|
+
# @param story_id [String] Shared by articles covering the same story on the same day. Use it to group or c
|
|
152
|
+
#
|
|
153
|
+
# @param title [String] Article headline.
|
|
154
|
+
#
|
|
155
|
+
# @param type [Symbol, ContextDev::Models::NewsSearchResponse::Data::Type] Kind of coverage. Use it to separate independent reporting (editorial) from comp
|
|
156
|
+
#
|
|
157
|
+
# @param url [String] Link to the article on the publisher site.
|
|
158
|
+
|
|
159
|
+
# @see ContextDev::Models::NewsSearchResponse::Data#match
|
|
160
|
+
class Match < ContextDev::Internal::Type::BaseModel
|
|
161
|
+
# @!attribute confidence
|
|
162
|
+
# How confident the match is, from 0 to 1. Null when a score is unavailable.
|
|
163
|
+
#
|
|
164
|
+
# @return [Float, nil]
|
|
165
|
+
required :confidence, Float, nil?: true
|
|
166
|
+
|
|
167
|
+
# @!attribute level
|
|
168
|
+
# primary when the article is mainly about the company, secondary when the company
|
|
169
|
+
# is mentioned but is not the main subject.
|
|
170
|
+
#
|
|
171
|
+
# @return [Symbol, ContextDev::Models::NewsSearchResponse::Data::Match::Level]
|
|
172
|
+
required :level, enum: -> { ContextDev::Models::NewsSearchResponse::Data::Match::Level }
|
|
173
|
+
|
|
174
|
+
# @!method initialize(confidence:, level:)
|
|
175
|
+
# Some parameter documentations has been truncated, see
|
|
176
|
+
# {ContextDev::Models::NewsSearchResponse::Data::Match} for more details.
|
|
177
|
+
#
|
|
178
|
+
# How the article relates to the company you searched for.
|
|
179
|
+
#
|
|
180
|
+
# @param confidence [Float, nil] How confident the match is, from 0 to 1. Null when a score is unavailable.
|
|
181
|
+
#
|
|
182
|
+
# @param level [Symbol, ContextDev::Models::NewsSearchResponse::Data::Match::Level] primary when the article is mainly about the company, secondary when the company
|
|
183
|
+
|
|
184
|
+
# primary when the article is mainly about the company, secondary when the company
|
|
185
|
+
# is mentioned but is not the main subject.
|
|
186
|
+
#
|
|
187
|
+
# @see ContextDev::Models::NewsSearchResponse::Data::Match#level
|
|
188
|
+
module Level
|
|
189
|
+
extend ContextDev::Internal::Type::Enum
|
|
190
|
+
|
|
191
|
+
PRIMARY = :primary
|
|
192
|
+
SECONDARY = :secondary
|
|
193
|
+
|
|
194
|
+
# @!method self.values
|
|
195
|
+
# @return [Array<Symbol>]
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# @see ContextDev::Models::NewsSearchResponse::Data#source
|
|
200
|
+
class Source < ContextDev::Internal::Type::BaseModel
|
|
201
|
+
# @!attribute direct
|
|
202
|
+
# True when Context observed this article in the publisher-owned feed.
|
|
203
|
+
#
|
|
204
|
+
# @return [Boolean]
|
|
205
|
+
required :direct, ContextDev::Internal::Type::Boolean
|
|
206
|
+
|
|
207
|
+
# @!attribute domain
|
|
208
|
+
# Website domain of the publication.
|
|
209
|
+
#
|
|
210
|
+
# @return [String]
|
|
211
|
+
required :domain, String
|
|
212
|
+
|
|
213
|
+
# @!attribute name
|
|
214
|
+
# Name of the publication, such as Reuters.
|
|
215
|
+
#
|
|
216
|
+
# @return [String]
|
|
217
|
+
required :name, String
|
|
218
|
+
|
|
219
|
+
# @!method initialize(direct:, domain:, name:)
|
|
220
|
+
# The publication that published the article.
|
|
221
|
+
#
|
|
222
|
+
# @param direct [Boolean] True when Context observed this article in the publisher-owned feed.
|
|
223
|
+
#
|
|
224
|
+
# @param domain [String] Website domain of the publication.
|
|
225
|
+
#
|
|
226
|
+
# @param name [String] Name of the publication, such as Reuters.
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Kind of coverage. Use it to separate independent reporting (editorial) from
|
|
230
|
+
# company-issued content (press_release, regulatory_filing, advisory).
|
|
231
|
+
#
|
|
232
|
+
# @see ContextDev::Models::NewsSearchResponse::Data#type
|
|
233
|
+
module Type
|
|
234
|
+
extend ContextDev::Internal::Type::Enum
|
|
235
|
+
|
|
236
|
+
EDITORIAL = :editorial
|
|
237
|
+
PRESS_RELEASE = :press_release
|
|
238
|
+
REGULATORY_FILING = :regulatory_filing
|
|
239
|
+
ADVISORY = :advisory
|
|
240
|
+
|
|
241
|
+
# @!method self.values
|
|
242
|
+
# @return [Array<Symbol>]
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# @see ContextDev::Models::NewsSearchResponse#meta
|
|
247
|
+
class Meta < ContextDev::Internal::Type::BaseModel
|
|
248
|
+
# @!attribute count
|
|
249
|
+
# Number of articles in this page.
|
|
250
|
+
#
|
|
251
|
+
# @return [Integer]
|
|
252
|
+
required :count, Integer
|
|
253
|
+
|
|
254
|
+
# @!method initialize(count:)
|
|
255
|
+
# Summary information about this response.
|
|
256
|
+
#
|
|
257
|
+
# @param count [Integer] Number of articles in this page.
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# @see ContextDev::Models::NewsSearchResponse#key_metadata
|
|
261
|
+
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
262
|
+
# @!attribute credits_consumed
|
|
263
|
+
# The number of credits consumed by this request.
|
|
264
|
+
#
|
|
265
|
+
# @return [Integer]
|
|
266
|
+
required :credits_consumed, Integer
|
|
267
|
+
|
|
268
|
+
# @!attribute credits_remaining
|
|
269
|
+
# The number of credits remaining for your organization after this request.
|
|
270
|
+
#
|
|
271
|
+
# @return [Integer]
|
|
272
|
+
required :credits_remaining, Integer
|
|
273
|
+
|
|
274
|
+
# @!method initialize(credits_consumed:, credits_remaining:)
|
|
275
|
+
# Metadata about the API key used for the request. Included in every response
|
|
276
|
+
# whenever a valid API key is provided, even when the response status is not 200.
|
|
277
|
+
#
|
|
278
|
+
# @param credits_consumed [Integer] The number of credits consumed by this request.
|
|
279
|
+
#
|
|
280
|
+
# @param credits_remaining [Integer] The number of credits remaining for your organization after this request.
|
|
281
|
+
end
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
end
|
|
@@ -28,14 +28,14 @@ module ContextDev
|
|
|
28
28
|
# @!attribute include_images
|
|
29
29
|
# Include image references in Markdown output
|
|
30
30
|
#
|
|
31
|
-
# @return [Boolean,
|
|
32
|
-
optional :include_images,
|
|
31
|
+
# @return [Boolean, nil]
|
|
32
|
+
optional :include_images, ContextDev::Internal::Type::Boolean
|
|
33
33
|
|
|
34
34
|
# @!attribute include_links
|
|
35
35
|
# Preserve hyperlinks in Markdown output
|
|
36
36
|
#
|
|
37
|
-
# @return [Boolean,
|
|
38
|
-
optional :include_links,
|
|
37
|
+
# @return [Boolean, nil]
|
|
38
|
+
optional :include_links, ContextDev::Internal::Type::Boolean
|
|
39
39
|
|
|
40
40
|
# @!attribute ocr
|
|
41
41
|
# When true for PDF inputs, OCR the selected pages that have no usable text layer
|
|
@@ -44,8 +44,8 @@ module ContextDev
|
|
|
44
44
|
# range. Billed at 1 credit per page OCR actually recovered, on top of the base
|
|
45
45
|
# request cost. When false, no OCR runs.
|
|
46
46
|
#
|
|
47
|
-
# @return [Boolean,
|
|
48
|
-
optional :ocr,
|
|
47
|
+
# @return [Boolean, nil]
|
|
48
|
+
optional :ocr, ContextDev::Internal::Type::Boolean
|
|
49
49
|
|
|
50
50
|
# @!attribute pdf
|
|
51
51
|
# PDF page-range options as a JSON object, e.g. {"start": 2, "end": 5}.
|
|
@@ -56,8 +56,8 @@ module ContextDev
|
|
|
56
56
|
# @!attribute shorten_base64_images
|
|
57
57
|
# Shorten base64-encoded image data in the Markdown output
|
|
58
58
|
#
|
|
59
|
-
# @return [Boolean,
|
|
60
|
-
optional :shorten_base64_images,
|
|
59
|
+
# @return [Boolean, nil]
|
|
60
|
+
optional :shorten_base64_images, ContextDev::Internal::Type::Boolean
|
|
61
61
|
|
|
62
62
|
# @!attribute tags
|
|
63
63
|
# Optional comma-separated caller-defined tags for tracking this request. Tags are
|
|
@@ -70,8 +70,8 @@ module ContextDev
|
|
|
70
70
|
# @!attribute use_main_content_only
|
|
71
71
|
# Extract only the main content from HTML-like inputs
|
|
72
72
|
#
|
|
73
|
-
# @return [Boolean,
|
|
74
|
-
optional :use_main_content_only,
|
|
73
|
+
# @return [Boolean, nil]
|
|
74
|
+
optional :use_main_content_only, ContextDev::Internal::Type::Boolean
|
|
75
75
|
|
|
76
76
|
# @!attribute zdr
|
|
77
77
|
# Set to enabled to bypass shared caches and omit request and response content
|
|
@@ -92,19 +92,19 @@ module ContextDev
|
|
|
92
92
|
#
|
|
93
93
|
# @param extension [Symbol, ContextDev::Models::ParseHandleParams::Extension] Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv, md
|
|
94
94
|
#
|
|
95
|
-
# @param include_images [Boolean
|
|
95
|
+
# @param include_images [Boolean] Include image references in Markdown output
|
|
96
96
|
#
|
|
97
|
-
# @param include_links [Boolean
|
|
97
|
+
# @param include_links [Boolean] Preserve hyperlinks in Markdown output
|
|
98
98
|
#
|
|
99
|
-
# @param ocr [Boolean
|
|
99
|
+
# @param ocr [Boolean] When true for PDF inputs, OCR the selected pages that have no usable text layer
|
|
100
100
|
#
|
|
101
101
|
# @param pdf [ContextDev::Models::ParseHandleParams::Pdf] PDF page-range options as a JSON object, e.g. {"start": 2, "end": 5}.
|
|
102
102
|
#
|
|
103
|
-
# @param shorten_base64_images [Boolean
|
|
103
|
+
# @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output
|
|
104
104
|
#
|
|
105
105
|
# @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
|
|
106
106
|
#
|
|
107
|
-
# @param use_main_content_only [Boolean
|
|
107
|
+
# @param use_main_content_only [Boolean] Extract only the main content from HTML-like inputs
|
|
108
108
|
#
|
|
109
109
|
# @param zdr [Symbol, ContextDev::Models::ParseHandleParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro
|
|
110
110
|
#
|
|
@@ -190,85 +190,6 @@ module ContextDev
|
|
|
190
190
|
# @return [Array<Symbol>]
|
|
191
191
|
end
|
|
192
192
|
|
|
193
|
-
# Include image references in Markdown output
|
|
194
|
-
module IncludeImages
|
|
195
|
-
extend ContextDev::Internal::Type::Union
|
|
196
|
-
|
|
197
|
-
variant ContextDev::Internal::Type::Boolean
|
|
198
|
-
|
|
199
|
-
variant const: -> { ContextDev::Models::ParseHandleParams::IncludeImages::TRUE }
|
|
200
|
-
|
|
201
|
-
variant const: -> { ContextDev::Models::ParseHandleParams::IncludeImages::FALSE }
|
|
202
|
-
|
|
203
|
-
# @!method self.variants
|
|
204
|
-
# @return [Array(Boolean, Symbol)]
|
|
205
|
-
|
|
206
|
-
define_sorbet_constant!(:Variants) do
|
|
207
|
-
T.type_alias { T.any(T::Boolean, ContextDev::ParseHandleParams::IncludeImages::TaggedSymbol) }
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
# @!group
|
|
211
|
-
|
|
212
|
-
TRUE = :true
|
|
213
|
-
FALSE = :false
|
|
214
|
-
|
|
215
|
-
# @!endgroup
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
# Preserve hyperlinks in Markdown output
|
|
219
|
-
module IncludeLinks
|
|
220
|
-
extend ContextDev::Internal::Type::Union
|
|
221
|
-
|
|
222
|
-
variant ContextDev::Internal::Type::Boolean
|
|
223
|
-
|
|
224
|
-
variant const: -> { ContextDev::Models::ParseHandleParams::IncludeLinks::TRUE }
|
|
225
|
-
|
|
226
|
-
variant const: -> { ContextDev::Models::ParseHandleParams::IncludeLinks::FALSE }
|
|
227
|
-
|
|
228
|
-
# @!method self.variants
|
|
229
|
-
# @return [Array(Boolean, Symbol)]
|
|
230
|
-
|
|
231
|
-
define_sorbet_constant!(:Variants) do
|
|
232
|
-
T.type_alias { T.any(T::Boolean, ContextDev::ParseHandleParams::IncludeLinks::TaggedSymbol) }
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
# @!group
|
|
236
|
-
|
|
237
|
-
TRUE = :true
|
|
238
|
-
FALSE = :false
|
|
239
|
-
|
|
240
|
-
# @!endgroup
|
|
241
|
-
end
|
|
242
|
-
|
|
243
|
-
# When true for PDF inputs, OCR the selected pages that have no usable text layer
|
|
244
|
-
# (scans), replacing each recovered page's text with the OCR result while pages
|
|
245
|
-
# with a real text layer keep it. pdf.start/pdf.end limit the inclusive page
|
|
246
|
-
# range. Billed at 1 credit per page OCR actually recovered, on top of the base
|
|
247
|
-
# request cost. When false, no OCR runs.
|
|
248
|
-
module Ocr
|
|
249
|
-
extend ContextDev::Internal::Type::Union
|
|
250
|
-
|
|
251
|
-
variant ContextDev::Internal::Type::Boolean
|
|
252
|
-
|
|
253
|
-
variant const: -> { ContextDev::Models::ParseHandleParams::Ocr::TRUE }
|
|
254
|
-
|
|
255
|
-
variant const: -> { ContextDev::Models::ParseHandleParams::Ocr::FALSE }
|
|
256
|
-
|
|
257
|
-
# @!method self.variants
|
|
258
|
-
# @return [Array(Boolean, Symbol)]
|
|
259
|
-
|
|
260
|
-
define_sorbet_constant!(:Variants) do
|
|
261
|
-
T.type_alias { T.any(T::Boolean, ContextDev::ParseHandleParams::Ocr::TaggedSymbol) }
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
# @!group
|
|
265
|
-
|
|
266
|
-
TRUE = :true
|
|
267
|
-
FALSE = :false
|
|
268
|
-
|
|
269
|
-
# @!endgroup
|
|
270
|
-
end
|
|
271
|
-
|
|
272
193
|
class Pdf < ContextDev::Internal::Type::BaseModel
|
|
273
194
|
# @!attribute end_
|
|
274
195
|
# Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
|
|
@@ -294,56 +215,6 @@ module ContextDev
|
|
|
294
215
|
# @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
|
|
295
216
|
end
|
|
296
217
|
|
|
297
|
-
# Shorten base64-encoded image data in the Markdown output
|
|
298
|
-
module ShortenBase64Images
|
|
299
|
-
extend ContextDev::Internal::Type::Union
|
|
300
|
-
|
|
301
|
-
variant ContextDev::Internal::Type::Boolean
|
|
302
|
-
|
|
303
|
-
variant const: -> { ContextDev::Models::ParseHandleParams::ShortenBase64Images::TRUE }
|
|
304
|
-
|
|
305
|
-
variant const: -> { ContextDev::Models::ParseHandleParams::ShortenBase64Images::FALSE }
|
|
306
|
-
|
|
307
|
-
# @!method self.variants
|
|
308
|
-
# @return [Array(Boolean, Symbol)]
|
|
309
|
-
|
|
310
|
-
define_sorbet_constant!(:Variants) do
|
|
311
|
-
T.type_alias { T.any(T::Boolean, ContextDev::ParseHandleParams::ShortenBase64Images::TaggedSymbol) }
|
|
312
|
-
end
|
|
313
|
-
|
|
314
|
-
# @!group
|
|
315
|
-
|
|
316
|
-
TRUE = :true
|
|
317
|
-
FALSE = :false
|
|
318
|
-
|
|
319
|
-
# @!endgroup
|
|
320
|
-
end
|
|
321
|
-
|
|
322
|
-
# Extract only the main content from HTML-like inputs
|
|
323
|
-
module UseMainContentOnly
|
|
324
|
-
extend ContextDev::Internal::Type::Union
|
|
325
|
-
|
|
326
|
-
variant ContextDev::Internal::Type::Boolean
|
|
327
|
-
|
|
328
|
-
variant const: -> { ContextDev::Models::ParseHandleParams::UseMainContentOnly::TRUE }
|
|
329
|
-
|
|
330
|
-
variant const: -> { ContextDev::Models::ParseHandleParams::UseMainContentOnly::FALSE }
|
|
331
|
-
|
|
332
|
-
# @!method self.variants
|
|
333
|
-
# @return [Array(Boolean, Symbol)]
|
|
334
|
-
|
|
335
|
-
define_sorbet_constant!(:Variants) do
|
|
336
|
-
T.type_alias { T.any(T::Boolean, ContextDev::ParseHandleParams::UseMainContentOnly::TaggedSymbol) }
|
|
337
|
-
end
|
|
338
|
-
|
|
339
|
-
# @!group
|
|
340
|
-
|
|
341
|
-
TRUE = :true
|
|
342
|
-
FALSE = :false
|
|
343
|
-
|
|
344
|
-
# @!endgroup
|
|
345
|
-
end
|
|
346
|
-
|
|
347
218
|
# Set to enabled to bypass shared caches and omit request and response content
|
|
348
219
|
# from retained usage logs. Requires zero data retention to be enabled for your
|
|
349
220
|
# organization (contact support@context.dev), otherwise the request fails with
|
|
@@ -64,6 +64,16 @@ module ContextDev
|
|
|
64
64
|
|
|
65
65
|
# @see ContextDev::Models::PersonEnrichResponse::Match::Candidate#person
|
|
66
66
|
class Person < ContextDev::Internal::Type::BaseModel
|
|
67
|
+
# @!attribute current_role_status
|
|
68
|
+
# Whether the person's current role is known. `present` — current_role is
|
|
69
|
+
# populated. `none` — the work history explicitly shows every role has ended.
|
|
70
|
+
# `unknown` — our data sources could not confirm either way; treat a missing
|
|
71
|
+
# current_role as unverified rather than vacant.
|
|
72
|
+
#
|
|
73
|
+
# @return [Symbol, ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRoleStatus]
|
|
74
|
+
required :current_role_status,
|
|
75
|
+
enum: -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRoleStatus }
|
|
76
|
+
|
|
67
77
|
# @!attribute education
|
|
68
78
|
#
|
|
69
79
|
# @return [Array<ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education>]
|
|
@@ -101,6 +111,12 @@ module ContextDev
|
|
|
101
111
|
# @return [String, nil]
|
|
102
112
|
optional :bio, String
|
|
103
113
|
|
|
114
|
+
# @!attribute checked_at
|
|
115
|
+
# When we last refreshed this profile from our data sources (ISO 8601).
|
|
116
|
+
#
|
|
117
|
+
# @return [String, nil]
|
|
118
|
+
optional :checked_at, String
|
|
119
|
+
|
|
104
120
|
# @!attribute current_role
|
|
105
121
|
#
|
|
106
122
|
# @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole, nil]
|
|
@@ -112,6 +128,13 @@ module ContextDev
|
|
|
112
128
|
# @return [String, nil]
|
|
113
129
|
optional :email, String
|
|
114
130
|
|
|
131
|
+
# @!attribute last_updated
|
|
132
|
+
# When the underlying profile data last changed in our data sources (ISO 8601).
|
|
133
|
+
# Omitted when unknown.
|
|
134
|
+
#
|
|
135
|
+
# @return [String, nil]
|
|
136
|
+
optional :last_updated, String
|
|
137
|
+
|
|
115
138
|
# @!attribute location
|
|
116
139
|
#
|
|
117
140
|
# @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Location, nil]
|
|
@@ -122,19 +145,56 @@ module ContextDev
|
|
|
122
145
|
# @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Name, nil]
|
|
123
146
|
optional :name, -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Name }
|
|
124
147
|
|
|
125
|
-
# @!method initialize(education:, experience:, skills:, social_urls:, website_urls:, avatar_url: nil, bio: nil, current_role: nil, email: nil, location: nil, name: nil)
|
|
148
|
+
# @!method initialize(current_role_status:, education:, experience:, skills:, social_urls:, website_urls:, avatar_url: nil, bio: nil, checked_at: nil, current_role: nil, email: nil, last_updated: nil, location: nil, name: nil)
|
|
149
|
+
# Some parameter documentations has been truncated, see
|
|
150
|
+
# {ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person} for more
|
|
151
|
+
# details.
|
|
152
|
+
#
|
|
153
|
+
# @param current_role_status [Symbol, ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRoleStatus] Whether the person's current role is known. `present` — current_role is populate
|
|
154
|
+
#
|
|
126
155
|
# @param education [Array<ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education>]
|
|
156
|
+
#
|
|
127
157
|
# @param experience [Array<ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience>]
|
|
158
|
+
#
|
|
128
159
|
# @param skills [Array<String>]
|
|
160
|
+
#
|
|
129
161
|
# @param social_urls [Array<String>]
|
|
162
|
+
#
|
|
130
163
|
# @param website_urls [Array<String>]
|
|
164
|
+
#
|
|
131
165
|
# @param avatar_url [String]
|
|
166
|
+
#
|
|
132
167
|
# @param bio [String]
|
|
168
|
+
#
|
|
169
|
+
# @param checked_at [String] When we last refreshed this profile from our data sources (ISO 8601).
|
|
170
|
+
#
|
|
133
171
|
# @param current_role [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole]
|
|
172
|
+
#
|
|
134
173
|
# @param email [String]
|
|
174
|
+
#
|
|
175
|
+
# @param last_updated [String] When the underlying profile data last changed in our data sources (ISO 8601). Om
|
|
176
|
+
#
|
|
135
177
|
# @param location [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Location]
|
|
178
|
+
#
|
|
136
179
|
# @param name [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Name]
|
|
137
180
|
|
|
181
|
+
# Whether the person's current role is known. `present` — current_role is
|
|
182
|
+
# populated. `none` — the work history explicitly shows every role has ended.
|
|
183
|
+
# `unknown` — our data sources could not confirm either way; treat a missing
|
|
184
|
+
# current_role as unverified rather than vacant.
|
|
185
|
+
#
|
|
186
|
+
# @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person#current_role_status
|
|
187
|
+
module CurrentRoleStatus
|
|
188
|
+
extend ContextDev::Internal::Type::Enum
|
|
189
|
+
|
|
190
|
+
PRESENT = :present
|
|
191
|
+
NONE = :none
|
|
192
|
+
UNKNOWN = :unknown
|
|
193
|
+
|
|
194
|
+
# @!method self.values
|
|
195
|
+
# @return [Array<Symbol>]
|
|
196
|
+
end
|
|
197
|
+
|
|
138
198
|
class Education < ContextDev::Internal::Type::BaseModel
|
|
139
199
|
# @!attribute institution
|
|
140
200
|
#
|