context.dev 2.9.0 → 2.10.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 +13 -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_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 +238 -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 +3 -30
- 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 +26 -23
- 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_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 +423 -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 +4 -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 +27 -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_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 +5 -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 +12 -11
- metadata +11 -2
|
@@ -0,0 +1,238 @@
|
|
|
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
|
+
#
|
|
9
|
+
# @return [Array<ContextDev::Models::NewsSearchResponse::Data>]
|
|
10
|
+
required :data, -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::NewsSearchResponse::Data] }
|
|
11
|
+
|
|
12
|
+
# @!attribute has_more
|
|
13
|
+
#
|
|
14
|
+
# @return [Boolean]
|
|
15
|
+
required :has_more, ContextDev::Internal::Type::Boolean
|
|
16
|
+
|
|
17
|
+
# @!attribute meta
|
|
18
|
+
#
|
|
19
|
+
# @return [ContextDev::Models::NewsSearchResponse::Meta]
|
|
20
|
+
required :meta, -> { ContextDev::Models::NewsSearchResponse::Meta }
|
|
21
|
+
|
|
22
|
+
# @!attribute next_cursor
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
required :next_cursor, String, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!attribute key_metadata
|
|
28
|
+
# Metadata about the API key used for the request. Included in every response
|
|
29
|
+
# whenever a valid API key is provided, even when the response status is not 200.
|
|
30
|
+
#
|
|
31
|
+
# @return [ContextDev::Models::NewsSearchResponse::KeyMetadata, nil]
|
|
32
|
+
optional :key_metadata, -> { ContextDev::Models::NewsSearchResponse::KeyMetadata }
|
|
33
|
+
|
|
34
|
+
# @!method initialize(data:, has_more:, meta:, next_cursor:, key_metadata: nil)
|
|
35
|
+
# Some parameter documentations has been truncated, see
|
|
36
|
+
# {ContextDev::Models::NewsSearchResponse} for more details.
|
|
37
|
+
#
|
|
38
|
+
# @param data [Array<ContextDev::Models::NewsSearchResponse::Data>]
|
|
39
|
+
#
|
|
40
|
+
# @param has_more [Boolean]
|
|
41
|
+
#
|
|
42
|
+
# @param meta [ContextDev::Models::NewsSearchResponse::Meta]
|
|
43
|
+
#
|
|
44
|
+
# @param next_cursor [String, nil]
|
|
45
|
+
#
|
|
46
|
+
# @param key_metadata [ContextDev::Models::NewsSearchResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when
|
|
47
|
+
|
|
48
|
+
class Data < ContextDev::Internal::Type::BaseModel
|
|
49
|
+
# @!attribute id
|
|
50
|
+
#
|
|
51
|
+
# @return [String]
|
|
52
|
+
required :id, String
|
|
53
|
+
|
|
54
|
+
# @!attribute authors
|
|
55
|
+
#
|
|
56
|
+
# @return [Array<String>]
|
|
57
|
+
required :authors, ContextDev::Internal::Type::ArrayOf[String]
|
|
58
|
+
|
|
59
|
+
# @!attribute description
|
|
60
|
+
#
|
|
61
|
+
# @return [String, nil]
|
|
62
|
+
required :description, String, nil?: true
|
|
63
|
+
|
|
64
|
+
# @!attribute image_url
|
|
65
|
+
#
|
|
66
|
+
# @return [String, nil]
|
|
67
|
+
required :image_url, String, nil?: true
|
|
68
|
+
|
|
69
|
+
# @!attribute language
|
|
70
|
+
#
|
|
71
|
+
# @return [String, nil]
|
|
72
|
+
required :language, String, nil?: true
|
|
73
|
+
|
|
74
|
+
# @!attribute match
|
|
75
|
+
#
|
|
76
|
+
# @return [ContextDev::Models::NewsSearchResponse::Data::Match]
|
|
77
|
+
required :match, -> { ContextDev::Models::NewsSearchResponse::Data::Match }
|
|
78
|
+
|
|
79
|
+
# @!attribute published_at
|
|
80
|
+
#
|
|
81
|
+
# @return [Time, nil]
|
|
82
|
+
required :published_at, Time, nil?: true
|
|
83
|
+
|
|
84
|
+
# @!attribute source
|
|
85
|
+
#
|
|
86
|
+
# @return [ContextDev::Models::NewsSearchResponse::Data::Source]
|
|
87
|
+
required :source, -> { ContextDev::Models::NewsSearchResponse::Data::Source }
|
|
88
|
+
|
|
89
|
+
# @!attribute story_id
|
|
90
|
+
# Groups matching normalized headlines published on the same UTC day.
|
|
91
|
+
#
|
|
92
|
+
# @return [String]
|
|
93
|
+
required :story_id, String
|
|
94
|
+
|
|
95
|
+
# @!attribute title
|
|
96
|
+
#
|
|
97
|
+
# @return [String]
|
|
98
|
+
required :title, String
|
|
99
|
+
|
|
100
|
+
# @!attribute type
|
|
101
|
+
#
|
|
102
|
+
# @return [Symbol, ContextDev::Models::NewsSearchResponse::Data::Type]
|
|
103
|
+
required :type, enum: -> { ContextDev::Models::NewsSearchResponse::Data::Type }
|
|
104
|
+
|
|
105
|
+
# @!attribute url
|
|
106
|
+
#
|
|
107
|
+
# @return [String]
|
|
108
|
+
required :url, String
|
|
109
|
+
|
|
110
|
+
# @!method initialize(id:, authors:, description:, image_url:, language:, match:, published_at:, source:, story_id:, title:, type:, url:)
|
|
111
|
+
# @param id [String]
|
|
112
|
+
#
|
|
113
|
+
# @param authors [Array<String>]
|
|
114
|
+
#
|
|
115
|
+
# @param description [String, nil]
|
|
116
|
+
#
|
|
117
|
+
# @param image_url [String, nil]
|
|
118
|
+
#
|
|
119
|
+
# @param language [String, nil]
|
|
120
|
+
#
|
|
121
|
+
# @param match [ContextDev::Models::NewsSearchResponse::Data::Match]
|
|
122
|
+
#
|
|
123
|
+
# @param published_at [Time, nil]
|
|
124
|
+
#
|
|
125
|
+
# @param source [ContextDev::Models::NewsSearchResponse::Data::Source]
|
|
126
|
+
#
|
|
127
|
+
# @param story_id [String] Groups matching normalized headlines published on the same UTC day.
|
|
128
|
+
#
|
|
129
|
+
# @param title [String]
|
|
130
|
+
#
|
|
131
|
+
# @param type [Symbol, ContextDev::Models::NewsSearchResponse::Data::Type]
|
|
132
|
+
#
|
|
133
|
+
# @param url [String]
|
|
134
|
+
|
|
135
|
+
# @see ContextDev::Models::NewsSearchResponse::Data#match
|
|
136
|
+
class Match < ContextDev::Internal::Type::BaseModel
|
|
137
|
+
# @!attribute confidence
|
|
138
|
+
#
|
|
139
|
+
# @return [Float, nil]
|
|
140
|
+
required :confidence, Float, nil?: true
|
|
141
|
+
|
|
142
|
+
# @!attribute level
|
|
143
|
+
#
|
|
144
|
+
# @return [Symbol, ContextDev::Models::NewsSearchResponse::Data::Match::Level]
|
|
145
|
+
required :level, enum: -> { ContextDev::Models::NewsSearchResponse::Data::Match::Level }
|
|
146
|
+
|
|
147
|
+
# @!method initialize(confidence:, level:)
|
|
148
|
+
# @param confidence [Float, nil]
|
|
149
|
+
# @param level [Symbol, ContextDev::Models::NewsSearchResponse::Data::Match::Level]
|
|
150
|
+
|
|
151
|
+
# @see ContextDev::Models::NewsSearchResponse::Data::Match#level
|
|
152
|
+
module Level
|
|
153
|
+
extend ContextDev::Internal::Type::Enum
|
|
154
|
+
|
|
155
|
+
PRIMARY = :primary
|
|
156
|
+
SECONDARY = :secondary
|
|
157
|
+
|
|
158
|
+
# @!method self.values
|
|
159
|
+
# @return [Array<Symbol>]
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# @see ContextDev::Models::NewsSearchResponse::Data#source
|
|
164
|
+
class Source < ContextDev::Internal::Type::BaseModel
|
|
165
|
+
# @!attribute direct
|
|
166
|
+
# True when Context observed this article in the publisher-owned feed.
|
|
167
|
+
#
|
|
168
|
+
# @return [Boolean]
|
|
169
|
+
required :direct, ContextDev::Internal::Type::Boolean
|
|
170
|
+
|
|
171
|
+
# @!attribute domain
|
|
172
|
+
#
|
|
173
|
+
# @return [String]
|
|
174
|
+
required :domain, String
|
|
175
|
+
|
|
176
|
+
# @!attribute name
|
|
177
|
+
#
|
|
178
|
+
# @return [String]
|
|
179
|
+
required :name, String
|
|
180
|
+
|
|
181
|
+
# @!method initialize(direct:, domain:, name:)
|
|
182
|
+
# @param direct [Boolean] True when Context observed this article in the publisher-owned feed.
|
|
183
|
+
#
|
|
184
|
+
# @param domain [String]
|
|
185
|
+
#
|
|
186
|
+
# @param name [String]
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# @see ContextDev::Models::NewsSearchResponse::Data#type
|
|
190
|
+
module Type
|
|
191
|
+
extend ContextDev::Internal::Type::Enum
|
|
192
|
+
|
|
193
|
+
EDITORIAL = :editorial
|
|
194
|
+
PRESS_RELEASE = :press_release
|
|
195
|
+
REGULATORY_FILING = :regulatory_filing
|
|
196
|
+
ADVISORY = :advisory
|
|
197
|
+
|
|
198
|
+
# @!method self.values
|
|
199
|
+
# @return [Array<Symbol>]
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# @see ContextDev::Models::NewsSearchResponse#meta
|
|
204
|
+
class Meta < ContextDev::Internal::Type::BaseModel
|
|
205
|
+
# @!attribute count
|
|
206
|
+
#
|
|
207
|
+
# @return [Integer]
|
|
208
|
+
required :count, Integer
|
|
209
|
+
|
|
210
|
+
# @!method initialize(count:)
|
|
211
|
+
# @param count [Integer]
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# @see ContextDev::Models::NewsSearchResponse#key_metadata
|
|
215
|
+
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
216
|
+
# @!attribute credits_consumed
|
|
217
|
+
# The number of credits consumed by this request.
|
|
218
|
+
#
|
|
219
|
+
# @return [Integer]
|
|
220
|
+
required :credits_consumed, Integer
|
|
221
|
+
|
|
222
|
+
# @!attribute credits_remaining
|
|
223
|
+
# The number of credits remaining for your organization after this request.
|
|
224
|
+
#
|
|
225
|
+
# @return [Integer]
|
|
226
|
+
required :credits_remaining, Integer
|
|
227
|
+
|
|
228
|
+
# @!method initialize(credits_consumed:, credits_remaining:)
|
|
229
|
+
# Metadata about the API key used for the request. Included in every response
|
|
230
|
+
# whenever a valid API key is provided, even when the response status is not 200.
|
|
231
|
+
#
|
|
232
|
+
# @param credits_consumed [Integer] The number of credits consumed by this request.
|
|
233
|
+
#
|
|
234
|
+
# @param credits_remaining [Integer] The number of credits remaining for your organization after this request.
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
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
|
#
|
|
@@ -8,13 +8,14 @@ module ContextDev
|
|
|
8
8
|
include ContextDev::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute identifier
|
|
11
|
-
# Identifier of the
|
|
11
|
+
# Identifier of the target to prefetch. Provide exactly one of domain or email.
|
|
12
12
|
#
|
|
13
13
|
# @return [ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier, ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier]
|
|
14
14
|
required :identifier, union: -> { ContextDev::UtilityPrefetchParams::Identifier }
|
|
15
15
|
|
|
16
16
|
# @!attribute type
|
|
17
|
-
# What to prefetch
|
|
17
|
+
# What to prefetch: 'brand' warms the brand data cache, 'styleguide' warms the
|
|
18
|
+
# styleguide cache.
|
|
18
19
|
#
|
|
19
20
|
# @return [Symbol, ContextDev::Models::UtilityPrefetchParams::Type]
|
|
20
21
|
required :type, enum: -> { ContextDev::UtilityPrefetchParams::Type }
|
|
@@ -37,9 +38,9 @@ module ContextDev
|
|
|
37
38
|
# Some parameter documentations has been truncated, see
|
|
38
39
|
# {ContextDev::Models::UtilityPrefetchParams} for more details.
|
|
39
40
|
#
|
|
40
|
-
# @param identifier [ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier, ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier] Identifier of the
|
|
41
|
+
# @param identifier [ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier, ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier] Identifier of the target to prefetch. Provide exactly one of domain or email.
|
|
41
42
|
#
|
|
42
|
-
# @param type [Symbol, ContextDev::Models::UtilityPrefetchParams::Type] What to prefetch
|
|
43
|
+
# @param type [Symbol, ContextDev::Models::UtilityPrefetchParams::Type] What to prefetch: 'brand' warms the brand data cache, 'styleguide' warms the sty
|
|
43
44
|
#
|
|
44
45
|
# @param tags [Array<String>] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
45
46
|
#
|
|
@@ -47,34 +48,34 @@ module ContextDev
|
|
|
47
48
|
#
|
|
48
49
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
49
50
|
|
|
50
|
-
# Identifier of the
|
|
51
|
+
# Identifier of the target to prefetch. Provide exactly one of domain or email.
|
|
51
52
|
module Identifier
|
|
52
53
|
extend ContextDev::Internal::Type::Union
|
|
53
54
|
|
|
54
|
-
# Prefetch
|
|
55
|
+
# Prefetch by domain.
|
|
55
56
|
variant -> { ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier }
|
|
56
57
|
|
|
57
|
-
# Prefetch
|
|
58
|
+
# Prefetch by email. The domain will be extracted and validated.
|
|
58
59
|
variant -> { ContextDev::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier }
|
|
59
60
|
|
|
60
61
|
class UtilityPrefetchDomainIdentifier < ContextDev::Internal::Type::BaseModel
|
|
61
62
|
# @!attribute domain
|
|
62
|
-
# Domain name to prefetch
|
|
63
|
+
# Domain name to prefetch data for
|
|
63
64
|
#
|
|
64
65
|
# @return [String]
|
|
65
66
|
required :domain, String
|
|
66
67
|
|
|
67
68
|
# @!method initialize(domain:)
|
|
68
|
-
# Prefetch
|
|
69
|
+
# Prefetch by domain.
|
|
69
70
|
#
|
|
70
|
-
# @param domain [String] Domain name to prefetch
|
|
71
|
+
# @param domain [String] Domain name to prefetch data for
|
|
71
72
|
end
|
|
72
73
|
|
|
73
74
|
class UtilityPrefetchEmailIdentifier < ContextDev::Internal::Type::BaseModel
|
|
74
75
|
# @!attribute email
|
|
75
|
-
# Email address to prefetch
|
|
76
|
-
#
|
|
77
|
-
#
|
|
76
|
+
# Email address to prefetch data for. The domain will be extracted from the email.
|
|
77
|
+
# Free email providers (gmail.com, yahoo.com, etc.) and disposable email addresses
|
|
78
|
+
# are not allowed.
|
|
78
79
|
#
|
|
79
80
|
# @return [String]
|
|
80
81
|
required :email, String
|
|
@@ -84,20 +85,22 @@ module ContextDev
|
|
|
84
85
|
# {ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier}
|
|
85
86
|
# for more details.
|
|
86
87
|
#
|
|
87
|
-
# Prefetch
|
|
88
|
+
# Prefetch by email. The domain will be extracted and validated.
|
|
88
89
|
#
|
|
89
|
-
# @param email [String] Email address to prefetch
|
|
90
|
+
# @param email [String] Email address to prefetch data for. The domain will be extracted from the email.
|
|
90
91
|
end
|
|
91
92
|
|
|
92
93
|
# @!method self.variants
|
|
93
94
|
# @return [Array(ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier, ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier)]
|
|
94
95
|
end
|
|
95
96
|
|
|
96
|
-
# What to prefetch
|
|
97
|
+
# What to prefetch: 'brand' warms the brand data cache, 'styleguide' warms the
|
|
98
|
+
# styleguide cache.
|
|
97
99
|
module Type
|
|
98
100
|
extend ContextDev::Internal::Type::Enum
|
|
99
101
|
|
|
100
102
|
BRAND = :brand
|
|
103
|
+
STYLEGUIDE = :styleguide
|
|
101
104
|
|
|
102
105
|
# @!method self.values
|
|
103
106
|
# @return [Array<Symbol>]
|