context.dev 2.7.0 → 2.9.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.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/client.rb +5 -0
  5. data/lib/context_dev/models/batch_delete_params.rb +22 -0
  6. data/lib/context_dev/models/batch_delete_response.rb +60 -0
  7. data/lib/context_dev/models/batch_get_results_response.rb +13 -1
  8. data/lib/context_dev/models/batch_list_response.rb +13 -4
  9. data/lib/context_dev/models/batch_retrieve_response.rb +13 -4
  10. data/lib/context_dev/models/batch_submit_params.rb +2352 -26
  11. data/lib/context_dev/models/batch_submit_response.rb +125 -531
  12. data/lib/context_dev/models/brand_retrieve_response.rb +50 -1
  13. data/lib/context_dev/models/brand_search_params.rb +36 -0
  14. data/lib/context_dev/models/brand_search_response.rb +85 -0
  15. data/lib/context_dev/models/crawl_controls.rb +21 -15
  16. data/lib/context_dev/models/parse_handle_params.rb +11 -9
  17. data/lib/context_dev/models/person_enrich_params.rb +176 -0
  18. data/lib/context_dev/models/person_enrich_response.rb +581 -0
  19. data/lib/context_dev/models/web_search_response.rb +1 -0
  20. data/lib/context_dev/models/web_web_crawl_md_params.rb +5 -4
  21. data/lib/context_dev/models/web_web_scrape_html_params.rb +11 -9
  22. data/lib/context_dev/models/web_web_scrape_md_params.rb +11 -9
  23. data/lib/context_dev/models/web_web_scrape_sitemap_params.rb +11 -1
  24. data/lib/context_dev/models/web_web_scrape_sitemap_response.rb +3 -2
  25. data/lib/context_dev/models.rb +6 -0
  26. data/lib/context_dev/resources/batch.rb +33 -7
  27. data/lib/context_dev/resources/brand.rb +35 -0
  28. data/lib/context_dev/resources/parse.rb +1 -1
  29. data/lib/context_dev/resources/people.rb +56 -0
  30. data/lib/context_dev/resources/web.rb +21 -2
  31. data/lib/context_dev/version.rb +1 -1
  32. data/lib/context_dev.rb +7 -0
  33. data/rbi/context_dev/client.rbi +4 -0
  34. data/rbi/context_dev/models/batch_delete_params.rbi +40 -0
  35. data/rbi/context_dev/models/batch_delete_response.rbi +116 -0
  36. data/rbi/context_dev/models/batch_get_results_response.rbi +14 -1
  37. data/rbi/context_dev/models/batch_list_response.rbi +24 -8
  38. data/rbi/context_dev/models/batch_retrieve_response.rbi +24 -8
  39. data/rbi/context_dev/models/batch_submit_params.rbi +6955 -44
  40. data/rbi/context_dev/models/batch_submit_response.rbi +184 -1151
  41. data/rbi/context_dev/models/brand_retrieve_response.rbi +152 -0
  42. data/rbi/context_dev/models/brand_search_params.rbi +60 -0
  43. data/rbi/context_dev/models/brand_search_response.rbi +148 -0
  44. data/rbi/context_dev/models/crawl_controls.rbi +22 -28
  45. data/rbi/context_dev/models/parse_handle_params.rbi +15 -12
  46. data/rbi/context_dev/models/person_enrich_params.rbi +332 -0
  47. data/rbi/context_dev/models/person_enrich_response.rbi +1208 -0
  48. data/rbi/context_dev/models/web_search_response.rbi +5 -0
  49. data/rbi/context_dev/models/web_web_crawl_md_params.rbi +8 -6
  50. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +15 -12
  51. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +15 -12
  52. data/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +15 -0
  53. data/rbi/context_dev/models/web_web_scrape_sitemap_response.rbi +4 -2
  54. data/rbi/context_dev/models.rbi +6 -0
  55. data/rbi/context_dev/resources/batch.rbi +32 -10
  56. data/rbi/context_dev/resources/brand.rbi +27 -0
  57. data/rbi/context_dev/resources/parse.rbi +5 -5
  58. data/rbi/context_dev/resources/people.rbi +47 -0
  59. data/rbi/context_dev/resources/web.rbi +23 -1
  60. data/sig/context_dev/client.rbs +2 -0
  61. data/sig/context_dev/models/batch_delete_params.rbs +23 -0
  62. data/sig/context_dev/models/batch_delete_response.rbs +57 -0
  63. data/sig/context_dev/models/batch_get_results_response.rbs +9 -2
  64. data/sig/context_dev/models/batch_list_response.rbs +16 -2
  65. data/sig/context_dev/models/batch_retrieve_response.rbs +16 -2
  66. data/sig/context_dev/models/batch_submit_params.rbs +2756 -15
  67. data/sig/context_dev/models/batch_submit_response.rbs +78 -466
  68. data/sig/context_dev/models/brand_retrieve_response.rbs +62 -0
  69. data/sig/context_dev/models/brand_search_params.rbs +30 -0
  70. data/sig/context_dev/models/brand_search_response.rbs +62 -0
  71. data/sig/context_dev/models/crawl_controls.rbs +16 -16
  72. data/sig/context_dev/models/person_enrich_params.rbs +199 -0
  73. data/sig/context_dev/models/person_enrich_response.rbs +607 -0
  74. data/sig/context_dev/models/web_search_response.rbs +2 -0
  75. data/sig/context_dev/models/web_web_scrape_sitemap_params.rbs +7 -0
  76. data/sig/context_dev/models.rbs +6 -0
  77. data/sig/context_dev/resources/batch.rbs +8 -2
  78. data/sig/context_dev/resources/brand.rbs +6 -0
  79. data/sig/context_dev/resources/people.rbs +19 -0
  80. data/sig/context_dev/resources/web.rbs +1 -0
  81. metadata +23 -2
@@ -0,0 +1,581 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ContextDev
4
+ module Models
5
+ # @see ContextDev::Resources::People#enrich
6
+ class PersonEnrichResponse < ContextDev::Internal::Type::BaseModel
7
+ # @!attribute match
8
+ # The highest-scoring person candidate.
9
+ #
10
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate, ContextDev::Models::PersonEnrichResponse::Match::NotFound]
11
+ required :match, union: -> { ContextDev::Models::PersonEnrichResponse::Match }
12
+
13
+ # @!attribute key_metadata
14
+ # Metadata about the API key used for the request. Included in every response
15
+ # whenever a valid API key is provided, even when the response status is not 200.
16
+ #
17
+ # @return [ContextDev::Models::PersonEnrichResponse::KeyMetadata, nil]
18
+ optional :key_metadata, -> { ContextDev::Models::PersonEnrichResponse::KeyMetadata }
19
+
20
+ # @!method initialize(match:, key_metadata: nil)
21
+ # Some parameter documentations has been truncated, see
22
+ # {ContextDev::Models::PersonEnrichResponse} for more details.
23
+ #
24
+ # @param match [ContextDev::Models::PersonEnrichResponse::Match::Candidate, ContextDev::Models::PersonEnrichResponse::Match::NotFound] The highest-scoring person candidate.
25
+ #
26
+ # @param key_metadata [ContextDev::Models::PersonEnrichResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when
27
+
28
+ # The highest-scoring person candidate.
29
+ #
30
+ # @see ContextDev::Models::PersonEnrichResponse#match
31
+ module Match
32
+ extend ContextDev::Internal::Type::Union
33
+
34
+ discriminator :status
35
+
36
+ # The highest-scoring person candidate.
37
+ variant :candidate, -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate }
38
+
39
+ # No usable person candidate was found.
40
+ variant :not_found, -> { ContextDev::Models::PersonEnrichResponse::Match::NotFound }
41
+
42
+ class Candidate < ContextDev::Internal::Type::BaseModel
43
+ # @!attribute person
44
+ #
45
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person]
46
+ required :person, -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person }
47
+
48
+ # @!attribute score
49
+ #
50
+ # @return [Integer]
51
+ required :score, Integer
52
+
53
+ # @!attribute status
54
+ #
55
+ # @return [Symbol, :candidate]
56
+ required :status, const: :candidate
57
+
58
+ # @!method initialize(person:, score:, status: :candidate)
59
+ # The highest-scoring person candidate.
60
+ #
61
+ # @param person [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person]
62
+ # @param score [Integer]
63
+ # @param status [Symbol, :candidate]
64
+
65
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate#person
66
+ class Person < ContextDev::Internal::Type::BaseModel
67
+ # @!attribute education
68
+ #
69
+ # @return [Array<ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education>]
70
+ required :education,
71
+ -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education] }
72
+
73
+ # @!attribute experience
74
+ #
75
+ # @return [Array<ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience>]
76
+ required :experience,
77
+ -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience] }
78
+
79
+ # @!attribute skills
80
+ #
81
+ # @return [Array<String>]
82
+ required :skills, ContextDev::Internal::Type::ArrayOf[String]
83
+
84
+ # @!attribute social_urls
85
+ #
86
+ # @return [Array<String>]
87
+ required :social_urls, ContextDev::Internal::Type::ArrayOf[String]
88
+
89
+ # @!attribute website_urls
90
+ #
91
+ # @return [Array<String>]
92
+ required :website_urls, ContextDev::Internal::Type::ArrayOf[String]
93
+
94
+ # @!attribute avatar_url
95
+ #
96
+ # @return [String, nil]
97
+ optional :avatar_url, String
98
+
99
+ # @!attribute bio
100
+ #
101
+ # @return [String, nil]
102
+ optional :bio, String
103
+
104
+ # @!attribute current_role
105
+ #
106
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole, nil]
107
+ optional :current_role,
108
+ -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole }
109
+
110
+ # @!attribute email
111
+ #
112
+ # @return [String, nil]
113
+ optional :email, String
114
+
115
+ # @!attribute location
116
+ #
117
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Location, nil]
118
+ optional :location, -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Location }
119
+
120
+ # @!attribute name
121
+ #
122
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Name, nil]
123
+ optional :name, -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Name }
124
+
125
+ # @!method initialize(education:, experience:, skills:, social_urls:, website_urls:, avatar_url: nil, bio: nil, current_role: nil, email: nil, location: nil, name: nil)
126
+ # @param education [Array<ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education>]
127
+ # @param experience [Array<ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience>]
128
+ # @param skills [Array<String>]
129
+ # @param social_urls [Array<String>]
130
+ # @param website_urls [Array<String>]
131
+ # @param avatar_url [String]
132
+ # @param bio [String]
133
+ # @param current_role [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole]
134
+ # @param email [String]
135
+ # @param location [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Location]
136
+ # @param name [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Name]
137
+
138
+ class Education < ContextDev::Internal::Type::BaseModel
139
+ # @!attribute institution
140
+ #
141
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education::Institution]
142
+ required :institution,
143
+ -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education::Institution }
144
+
145
+ # @!attribute degree
146
+ #
147
+ # @return [String, nil]
148
+ optional :degree, String
149
+
150
+ # @!attribute description
151
+ #
152
+ # @return [String, nil]
153
+ optional :description, String
154
+
155
+ # @!attribute end_date
156
+ #
157
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education::EndDate, nil]
158
+ optional :end_date,
159
+ -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education::EndDate }
160
+
161
+ # @!attribute field_of_study
162
+ #
163
+ # @return [String, nil]
164
+ optional :field_of_study, String
165
+
166
+ # @!attribute start_date
167
+ #
168
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education::StartDate, nil]
169
+ optional :start_date,
170
+ -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education::StartDate }
171
+
172
+ # @!method initialize(institution:, degree: nil, description: nil, end_date: nil, field_of_study: nil, start_date: nil)
173
+ # @param institution [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education::Institution]
174
+ # @param degree [String]
175
+ # @param description [String]
176
+ # @param end_date [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education::EndDate]
177
+ # @param field_of_study [String]
178
+ # @param start_date [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education::StartDate]
179
+
180
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education#institution
181
+ class Institution < ContextDev::Internal::Type::BaseModel
182
+ # @!attribute name
183
+ #
184
+ # @return [String]
185
+ required :name, String
186
+
187
+ # @!attribute domain
188
+ #
189
+ # @return [String, nil]
190
+ optional :domain, String
191
+
192
+ # @!method initialize(name:, domain: nil)
193
+ # @param name [String]
194
+ # @param domain [String]
195
+ end
196
+
197
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education#end_date
198
+ class EndDate < ContextDev::Internal::Type::BaseModel
199
+ # @!attribute year
200
+ #
201
+ # @return [Integer]
202
+ required :year, Integer
203
+
204
+ # @!attribute day
205
+ #
206
+ # @return [Integer, nil]
207
+ optional :day, Integer
208
+
209
+ # @!attribute month
210
+ #
211
+ # @return [Integer, nil]
212
+ optional :month, Integer
213
+
214
+ # @!method initialize(year:, day: nil, month: nil)
215
+ # @param year [Integer]
216
+ # @param day [Integer]
217
+ # @param month [Integer]
218
+ end
219
+
220
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Education#start_date
221
+ class StartDate < ContextDev::Internal::Type::BaseModel
222
+ # @!attribute year
223
+ #
224
+ # @return [Integer]
225
+ required :year, Integer
226
+
227
+ # @!attribute day
228
+ #
229
+ # @return [Integer, nil]
230
+ optional :day, Integer
231
+
232
+ # @!attribute month
233
+ #
234
+ # @return [Integer, nil]
235
+ optional :month, Integer
236
+
237
+ # @!method initialize(year:, day: nil, month: nil)
238
+ # @param year [Integer]
239
+ # @param day [Integer]
240
+ # @param month [Integer]
241
+ end
242
+ end
243
+
244
+ class Experience < ContextDev::Internal::Type::BaseModel
245
+ # @!attribute organization
246
+ #
247
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience::Organization]
248
+ required :organization,
249
+ -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience::Organization }
250
+
251
+ # @!attribute title
252
+ #
253
+ # @return [String]
254
+ required :title, String
255
+
256
+ # @!attribute description
257
+ #
258
+ # @return [String, nil]
259
+ optional :description, String
260
+
261
+ # @!attribute end_date
262
+ #
263
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience::EndDate, nil]
264
+ optional :end_date,
265
+ -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience::EndDate }
266
+
267
+ # @!attribute is_current
268
+ #
269
+ # @return [Boolean, nil]
270
+ optional :is_current, ContextDev::Internal::Type::Boolean
271
+
272
+ # @!attribute location
273
+ #
274
+ # @return [String, nil]
275
+ optional :location, String
276
+
277
+ # @!attribute start_date
278
+ #
279
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience::StartDate, nil]
280
+ optional :start_date,
281
+ -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience::StartDate }
282
+
283
+ # @!method initialize(organization:, title:, description: nil, end_date: nil, is_current: nil, location: nil, start_date: nil)
284
+ # @param organization [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience::Organization]
285
+ # @param title [String]
286
+ # @param description [String]
287
+ # @param end_date [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience::EndDate]
288
+ # @param is_current [Boolean]
289
+ # @param location [String]
290
+ # @param start_date [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience::StartDate]
291
+
292
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience#organization
293
+ class Organization < ContextDev::Internal::Type::BaseModel
294
+ # @!attribute name
295
+ #
296
+ # @return [String]
297
+ required :name, String
298
+
299
+ # @!attribute domain
300
+ #
301
+ # @return [String, nil]
302
+ optional :domain, String
303
+
304
+ # @!method initialize(name:, domain: nil)
305
+ # @param name [String]
306
+ # @param domain [String]
307
+ end
308
+
309
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience#end_date
310
+ class EndDate < ContextDev::Internal::Type::BaseModel
311
+ # @!attribute year
312
+ #
313
+ # @return [Integer]
314
+ required :year, Integer
315
+
316
+ # @!attribute day
317
+ #
318
+ # @return [Integer, nil]
319
+ optional :day, Integer
320
+
321
+ # @!attribute month
322
+ #
323
+ # @return [Integer, nil]
324
+ optional :month, Integer
325
+
326
+ # @!method initialize(year:, day: nil, month: nil)
327
+ # @param year [Integer]
328
+ # @param day [Integer]
329
+ # @param month [Integer]
330
+ end
331
+
332
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::Experience#start_date
333
+ class StartDate < ContextDev::Internal::Type::BaseModel
334
+ # @!attribute year
335
+ #
336
+ # @return [Integer]
337
+ required :year, Integer
338
+
339
+ # @!attribute day
340
+ #
341
+ # @return [Integer, nil]
342
+ optional :day, Integer
343
+
344
+ # @!attribute month
345
+ #
346
+ # @return [Integer, nil]
347
+ optional :month, Integer
348
+
349
+ # @!method initialize(year:, day: nil, month: nil)
350
+ # @param year [Integer]
351
+ # @param day [Integer]
352
+ # @param month [Integer]
353
+ end
354
+ end
355
+
356
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person#current_role
357
+ class CurrentRole < ContextDev::Internal::Type::BaseModel
358
+ # @!attribute organization
359
+ #
360
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole::Organization]
361
+ required :organization,
362
+ -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole::Organization }
363
+
364
+ # @!attribute title
365
+ #
366
+ # @return [String]
367
+ required :title, String
368
+
369
+ # @!attribute description
370
+ #
371
+ # @return [String, nil]
372
+ optional :description, String
373
+
374
+ # @!attribute end_date
375
+ #
376
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole::EndDate, nil]
377
+ optional :end_date,
378
+ -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole::EndDate }
379
+
380
+ # @!attribute is_current
381
+ #
382
+ # @return [Boolean, nil]
383
+ optional :is_current, ContextDev::Internal::Type::Boolean
384
+
385
+ # @!attribute location
386
+ #
387
+ # @return [String, nil]
388
+ optional :location, String
389
+
390
+ # @!attribute start_date
391
+ #
392
+ # @return [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole::StartDate, nil]
393
+ optional :start_date,
394
+ -> { ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole::StartDate }
395
+
396
+ # @!method initialize(organization:, title:, description: nil, end_date: nil, is_current: nil, location: nil, start_date: nil)
397
+ # @param organization [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole::Organization]
398
+ # @param title [String]
399
+ # @param description [String]
400
+ # @param end_date [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole::EndDate]
401
+ # @param is_current [Boolean]
402
+ # @param location [String]
403
+ # @param start_date [ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole::StartDate]
404
+
405
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole#organization
406
+ class Organization < ContextDev::Internal::Type::BaseModel
407
+ # @!attribute name
408
+ #
409
+ # @return [String]
410
+ required :name, String
411
+
412
+ # @!attribute domain
413
+ #
414
+ # @return [String, nil]
415
+ optional :domain, String
416
+
417
+ # @!method initialize(name:, domain: nil)
418
+ # @param name [String]
419
+ # @param domain [String]
420
+ end
421
+
422
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole#end_date
423
+ class EndDate < ContextDev::Internal::Type::BaseModel
424
+ # @!attribute year
425
+ #
426
+ # @return [Integer]
427
+ required :year, Integer
428
+
429
+ # @!attribute day
430
+ #
431
+ # @return [Integer, nil]
432
+ optional :day, Integer
433
+
434
+ # @!attribute month
435
+ #
436
+ # @return [Integer, nil]
437
+ optional :month, Integer
438
+
439
+ # @!method initialize(year:, day: nil, month: nil)
440
+ # @param year [Integer]
441
+ # @param day [Integer]
442
+ # @param month [Integer]
443
+ end
444
+
445
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person::CurrentRole#start_date
446
+ class StartDate < ContextDev::Internal::Type::BaseModel
447
+ # @!attribute year
448
+ #
449
+ # @return [Integer]
450
+ required :year, Integer
451
+
452
+ # @!attribute day
453
+ #
454
+ # @return [Integer, nil]
455
+ optional :day, Integer
456
+
457
+ # @!attribute month
458
+ #
459
+ # @return [Integer, nil]
460
+ optional :month, Integer
461
+
462
+ # @!method initialize(year:, day: nil, month: nil)
463
+ # @param year [Integer]
464
+ # @param day [Integer]
465
+ # @param month [Integer]
466
+ end
467
+ end
468
+
469
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person#location
470
+ class Location < ContextDev::Internal::Type::BaseModel
471
+ # @!attribute city
472
+ #
473
+ # @return [String, nil]
474
+ optional :city, String
475
+
476
+ # @!attribute country
477
+ #
478
+ # @return [String, nil]
479
+ optional :country, String
480
+
481
+ # @!attribute country_code
482
+ #
483
+ # @return [String, nil]
484
+ optional :country_code, String
485
+
486
+ # @!attribute display_
487
+ #
488
+ # @return [String, nil]
489
+ optional :display_, String, api_name: :display
490
+
491
+ # @!attribute region
492
+ #
493
+ # @return [String, nil]
494
+ optional :region, String
495
+
496
+ # @!method initialize(city: nil, country: nil, country_code: nil, display_: nil, region: nil)
497
+ # @param city [String]
498
+ # @param country [String]
499
+ # @param country_code [String]
500
+ # @param display_ [String]
501
+ # @param region [String]
502
+ end
503
+
504
+ # @see ContextDev::Models::PersonEnrichResponse::Match::Candidate::Person#name
505
+ class Name < ContextDev::Internal::Type::BaseModel
506
+ # @!attribute first
507
+ #
508
+ # @return [String, nil]
509
+ optional :first, String
510
+
511
+ # @!attribute full
512
+ #
513
+ # @return [String, nil]
514
+ optional :full, String
515
+
516
+ # @!attribute last
517
+ #
518
+ # @return [String, nil]
519
+ optional :last, String
520
+
521
+ # @!method initialize(first: nil, full: nil, last: nil)
522
+ # @param first [String]
523
+ # @param full [String]
524
+ # @param last [String]
525
+ end
526
+ end
527
+ end
528
+
529
+ class NotFound < ContextDev::Internal::Type::BaseModel
530
+ # @!attribute person
531
+ #
532
+ # @return [nil]
533
+ required :person, NilClass
534
+
535
+ # @!attribute score
536
+ #
537
+ # @return [nil]
538
+ required :score, NilClass
539
+
540
+ # @!attribute status
541
+ #
542
+ # @return [Symbol, :not_found]
543
+ required :status, const: :not_found
544
+
545
+ # @!method initialize(person:, score:, status: :not_found)
546
+ # No usable person candidate was found.
547
+ #
548
+ # @param person [nil]
549
+ # @param score [nil]
550
+ # @param status [Symbol, :not_found]
551
+ end
552
+
553
+ # @!method self.variants
554
+ # @return [Array(ContextDev::Models::PersonEnrichResponse::Match::Candidate, ContextDev::Models::PersonEnrichResponse::Match::NotFound)]
555
+ end
556
+
557
+ # @see ContextDev::Models::PersonEnrichResponse#key_metadata
558
+ class KeyMetadata < ContextDev::Internal::Type::BaseModel
559
+ # @!attribute credits_consumed
560
+ # The number of credits consumed by this request.
561
+ #
562
+ # @return [Integer]
563
+ required :credits_consumed, Integer
564
+
565
+ # @!attribute credits_remaining
566
+ # The number of credits remaining for your organization after this request.
567
+ #
568
+ # @return [Integer]
569
+ required :credits_remaining, Integer
570
+
571
+ # @!method initialize(credits_consumed:, credits_remaining:)
572
+ # Metadata about the API key used for the request. Included in every response
573
+ # whenever a valid API key is provided, even when the response status is not 200.
574
+ #
575
+ # @param credits_consumed [Integer] The number of credits consumed by this request.
576
+ #
577
+ # @param credits_remaining [Integer] The number of credits remaining for your organization after this request.
578
+ end
579
+ end
580
+ end
581
+ end
@@ -109,6 +109,7 @@ module ContextDev
109
109
  SUCCESS = :SUCCESS
110
110
  NOT_REQUESTED = :NOT_REQUESTED
111
111
  TIMEOUT = :TIMEOUT
112
+ CONTENT_TOO_LARGE = :CONTENT_TOO_LARGE
112
113
  WEBSITE_ACCESS_ERROR = :WEBSITE_ACCESS_ERROR
113
114
  ERROR = :ERROR
114
115
 
@@ -428,9 +428,10 @@ module ContextDev
428
428
  optional :end_, Integer, api_name: :end
429
429
 
430
430
  # @!attribute ocr
431
- # When true, detect and OCR images embedded in the selected PDF pages, inserting
432
- # recognized text at each image's position in page reading order while preserving
433
- # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback.
431
+ # When true, OCR the selected PDF pages that have no usable text layer (scans),
432
+ # replacing each recovered page's text with the OCR result while pages with a real
433
+ # text layer keep it. Billed at 1 credit per page OCR actually recovered, on top
434
+ # of the base request cost.
434
435
  #
435
436
  # @return [Boolean, nil]
436
437
  optional :ocr, ContextDev::Internal::Type::Boolean
@@ -457,7 +458,7 @@ module ContextDev
457
458
  #
458
459
  # @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
459
460
  #
460
- # @param ocr [Boolean] When true, detect and OCR images embedded in the selected PDF pages, inserting r
461
+ # @param ocr [Boolean] When true, OCR the selected PDF pages that have no usable text layer (scans), re
461
462
  #
462
463
  # @param should_parse [Boolean] When true, PDF pages are fetched and parsed. When false, PDF pages are skipped e
463
464
  #
@@ -459,16 +459,17 @@ module ContextDev
459
459
  optional :end_, Integer, api_name: :end
460
460
 
461
461
  # @!attribute ocr
462
- # When true, detect and OCR images embedded in the selected PDF pages, inserting
463
- # recognized text at each image's position in page reading order while preserving
464
- # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback.
462
+ # When true, OCR the selected PDF pages that have no usable text layer (scans),
463
+ # replacing each recovered page's text with the OCR result while pages with a real
464
+ # text layer keep it. Billed at 1 credit per page OCR actually recovered, on top
465
+ # of the base request cost. When false, no OCR runs.
465
466
  #
466
467
  # @return [Boolean, Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Pdf::Ocr, nil]
467
468
  optional :ocr, union: -> { ContextDev::WebWebScrapeHTMLParams::Pdf::Ocr }
468
469
 
469
470
  # @!attribute should_parse
470
471
  # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and
471
- # a 400 WEBSITE_ACCESS_ERROR is returned.
472
+ # a 400 PDF_SKIPPED is returned.
472
473
  #
473
474
  # @return [Boolean, Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Pdf::ShouldParse, nil]
474
475
  optional :should_parse,
@@ -490,15 +491,16 @@ module ContextDev
490
491
  #
491
492
  # @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
492
493
  #
493
- # @param ocr [Boolean, Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Pdf::Ocr] When true, detect and OCR images embedded in the selected PDF pages, inserting r
494
+ # @param ocr [Boolean, Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Pdf::Ocr] When true, OCR the selected PDF pages that have no usable text layer (scans), re
494
495
  #
495
496
  # @param should_parse [Boolean, Symbol, ContextDev::Models::WebWebScrapeHTMLParams::Pdf::ShouldParse] When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and
496
497
  #
497
498
  # @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
498
499
 
499
- # When true, detect and OCR images embedded in the selected PDF pages, inserting
500
- # recognized text at each image's position in page reading order while preserving
501
- # the PDF text layer. This is separate from automatic scanned-PDF OCR fallback.
500
+ # When true, OCR the selected PDF pages that have no usable text layer (scans),
501
+ # replacing each recovered page's text with the OCR result while pages with a real
502
+ # text layer keep it. Billed at 1 credit per page OCR actually recovered, on top
503
+ # of the base request cost. When false, no OCR runs.
502
504
  #
503
505
  # @see ContextDev::Models::WebWebScrapeHTMLParams::Pdf#ocr
504
506
  module Ocr
@@ -526,7 +528,7 @@ module ContextDev
526
528
  end
527
529
 
528
530
  # When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and
529
- # a 400 WEBSITE_ACCESS_ERROR is returned.
531
+ # a 400 PDF_SKIPPED is returned.
530
532
  #
531
533
  # @see ContextDev::Models::WebWebScrapeHTMLParams::Pdf#should_parse
532
534
  module ShouldParse