context.dev 2.20.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +1 -1
- data/lib/context_dev/client.rb +6 -0
- data/lib/context_dev/models/feedback_submit_params.rb +73 -0
- data/lib/context_dev/models/feedback_submit_response.rb +68 -0
- data/lib/context_dev/models/news_search_params.rb +13 -6
- data/lib/context_dev/models/web_scrape_params.rb +36 -30
- data/lib/context_dev/models/web_scrape_response.rb +114 -37
- data/lib/context_dev/models.rb +2 -0
- data/lib/context_dev/resources/feedback.rb +50 -0
- data/lib/context_dev/resources/news.rb +8 -4
- data/lib/context_dev/resources/web.rb +15 -9
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +3 -0
- data/rbi/context_dev/client.rbi +5 -0
- data/rbi/context_dev/models/feedback_submit_params.rbi +133 -0
- data/rbi/context_dev/models/feedback_submit_response.rbi +122 -0
- data/rbi/context_dev/models/news_search_params.rbi +12 -6
- data/rbi/context_dev/models/web_scrape_params.rbi +55 -46
- data/rbi/context_dev/models/web_scrape_response.rbi +183 -69
- data/rbi/context_dev/models.rbi +2 -0
- data/rbi/context_dev/resources/feedback.rbi +42 -0
- data/rbi/context_dev/resources/news.rbi +7 -4
- data/rbi/context_dev/resources/web.rbi +26 -17
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/feedback_submit_params.rbs +73 -0
- data/sig/context_dev/models/feedback_submit_response.rbs +58 -0
- data/sig/context_dev/models/web_scrape_response.rbs +81 -27
- data/sig/context_dev/models.rbs +2 -0
- data/sig/context_dev/resources/feedback.rbs +16 -0
- metadata +11 -2
|
@@ -35,9 +35,9 @@ module ContextDev
|
|
|
35
35
|
end
|
|
36
36
|
attr_writer :cache_metadata
|
|
37
37
|
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
# text.
|
|
38
|
+
# Relevant Markdown excerpts for your question or topic, in page order. Headings
|
|
39
|
+
# in square brackets supply necessary context; ellipses mark omitted portions.
|
|
40
|
+
# Empty when the page has no text.
|
|
41
41
|
sig { returns(ContextDev::Models::WebScrapeResponse::Highlights) }
|
|
42
42
|
attr_reader :highlights
|
|
43
43
|
|
|
@@ -68,10 +68,7 @@ module ContextDev
|
|
|
68
68
|
end
|
|
69
69
|
attr_writer :images
|
|
70
70
|
|
|
71
|
-
# Page data extracted
|
|
72
|
-
# are grounded in the page; optional fields the page does not state are omitted,
|
|
73
|
-
# or null when their type allows null. An empty object when the filters leave no
|
|
74
|
-
# text.
|
|
71
|
+
# Page data extracted using your schema.
|
|
75
72
|
sig { returns(ContextDev::Models::WebScrapeResponse::Json) }
|
|
76
73
|
attr_reader :json
|
|
77
74
|
|
|
@@ -113,7 +110,7 @@ module ContextDev
|
|
|
113
110
|
end
|
|
114
111
|
attr_writer :parsed
|
|
115
112
|
|
|
116
|
-
# Product
|
|
113
|
+
# Product details found on the page.
|
|
117
114
|
sig { returns(ContextDev::Models::WebScrapeResponse::Product) }
|
|
118
115
|
attr_reader :product
|
|
119
116
|
|
|
@@ -144,10 +141,11 @@ module ContextDev
|
|
|
144
141
|
sig { returns(String) }
|
|
145
142
|
attr_accessor :url
|
|
146
143
|
|
|
147
|
-
# Present when
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
#
|
|
144
|
+
# Present when at least one requested output succeeds while another fails, or when
|
|
145
|
+
# successful outputs come from a page that is still loading or images returned
|
|
146
|
+
# before processing finished. Absent when every requested output fails. Check each
|
|
147
|
+
# output's success field for its result. Valid captured pieces may be cached
|
|
148
|
+
# independently; failed retrievals and incomplete captures are not cached.
|
|
151
149
|
sig do
|
|
152
150
|
returns(
|
|
153
151
|
T.nilable(
|
|
@@ -209,18 +207,15 @@ module ContextDev
|
|
|
209
207
|
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
210
208
|
# oldest contributing hit.
|
|
211
209
|
cache_metadata:,
|
|
212
|
-
#
|
|
213
|
-
#
|
|
214
|
-
# text.
|
|
210
|
+
# Relevant Markdown excerpts for your question or topic, in page order. Headings
|
|
211
|
+
# in square brackets supply necessary context; ellipses mark omitted portions.
|
|
212
|
+
# Empty when the page has no text.
|
|
215
213
|
highlights:,
|
|
216
214
|
# Rendered HTML after content filters.
|
|
217
215
|
html:,
|
|
218
216
|
# Images after content filters. Empty when none are found.
|
|
219
217
|
images:,
|
|
220
|
-
# Page data extracted
|
|
221
|
-
# are grounded in the page; optional fields the page does not state are omitted,
|
|
222
|
-
# or null when their type allows null. An empty object when the filters leave no
|
|
223
|
-
# text.
|
|
218
|
+
# Page data extracted using your schema.
|
|
224
219
|
json:,
|
|
225
220
|
# Markdown after content filters.
|
|
226
221
|
markdown:,
|
|
@@ -228,7 +223,7 @@ module ContextDev
|
|
|
228
223
|
metadata:,
|
|
229
224
|
# Fields produced by parseParams.rules, after shared content filters.
|
|
230
225
|
parsed:,
|
|
231
|
-
# Product
|
|
226
|
+
# Product details found on the page.
|
|
232
227
|
product:,
|
|
233
228
|
# Unique id of this API call, also sent in the X-Request-Id response header. Quote
|
|
234
229
|
# it when contacting support about a failed request.
|
|
@@ -237,10 +232,11 @@ module ContextDev
|
|
|
237
232
|
screenshot:,
|
|
238
233
|
# Final URL after redirects and browser actions.
|
|
239
234
|
url:,
|
|
240
|
-
# Present when
|
|
241
|
-
#
|
|
242
|
-
#
|
|
243
|
-
#
|
|
235
|
+
# Present when at least one requested output succeeds while another fails, or when
|
|
236
|
+
# successful outputs come from a page that is still loading or images returned
|
|
237
|
+
# before processing finished. Absent when every requested output fails. Check each
|
|
238
|
+
# output's success field for its result. Valid captured pieces may be cached
|
|
239
|
+
# independently; failed retrievals and incomplete captures are not cached.
|
|
244
240
|
is_partial: nil,
|
|
245
241
|
# Credit usage, included whenever a valid API key is provided.
|
|
246
242
|
key_metadata: nil
|
|
@@ -300,6 +296,10 @@ module ContextDev
|
|
|
300
296
|
sig { returns(T::Boolean) }
|
|
301
297
|
attr_accessor :requested
|
|
302
298
|
|
|
299
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
300
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
301
|
+
attr_accessor :success
|
|
302
|
+
|
|
303
303
|
# Original HTTP response body. Waiting, actions, and content filters never change
|
|
304
304
|
# it.
|
|
305
305
|
sig do
|
|
@@ -308,10 +308,16 @@ module ContextDev
|
|
|
308
308
|
T.nilable(
|
|
309
309
|
ContextDev::Models::WebScrapeResponse::Bytes::Data::OrHash
|
|
310
310
|
),
|
|
311
|
-
requested: T::Boolean
|
|
311
|
+
requested: T::Boolean,
|
|
312
|
+
success: T.nilable(T::Boolean)
|
|
312
313
|
).returns(T.attached_class)
|
|
313
314
|
end
|
|
314
|
-
def self.new(
|
|
315
|
+
def self.new(
|
|
316
|
+
data:,
|
|
317
|
+
requested:,
|
|
318
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
319
|
+
success:
|
|
320
|
+
)
|
|
315
321
|
end
|
|
316
322
|
|
|
317
323
|
sig do
|
|
@@ -319,7 +325,8 @@ module ContextDev
|
|
|
319
325
|
{
|
|
320
326
|
data:
|
|
321
327
|
T.nilable(ContextDev::Models::WebScrapeResponse::Bytes::Data),
|
|
322
|
-
requested: T::Boolean
|
|
328
|
+
requested: T::Boolean,
|
|
329
|
+
success: T.nilable(T::Boolean)
|
|
323
330
|
}
|
|
324
331
|
)
|
|
325
332
|
end
|
|
@@ -472,21 +479,35 @@ module ContextDev
|
|
|
472
479
|
sig { returns(T::Boolean) }
|
|
473
480
|
attr_accessor :requested
|
|
474
481
|
|
|
475
|
-
#
|
|
476
|
-
|
|
477
|
-
|
|
482
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
483
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
484
|
+
attr_accessor :success
|
|
485
|
+
|
|
486
|
+
# Relevant Markdown excerpts for your question or topic, in page order. Headings
|
|
487
|
+
# in square brackets supply necessary context; ellipses mark omitted portions.
|
|
488
|
+
# Empty when the page has no text.
|
|
478
489
|
sig do
|
|
479
490
|
params(
|
|
480
491
|
data: T.nilable(T::Array[String]),
|
|
481
|
-
requested: T::Boolean
|
|
492
|
+
requested: T::Boolean,
|
|
493
|
+
success: T.nilable(T::Boolean)
|
|
482
494
|
).returns(T.attached_class)
|
|
483
495
|
end
|
|
484
|
-
def self.new(
|
|
496
|
+
def self.new(
|
|
497
|
+
data:,
|
|
498
|
+
requested:,
|
|
499
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
500
|
+
success:
|
|
501
|
+
)
|
|
485
502
|
end
|
|
486
503
|
|
|
487
504
|
sig do
|
|
488
505
|
override.returns(
|
|
489
|
-
{
|
|
506
|
+
{
|
|
507
|
+
data: T.nilable(T::Array[String]),
|
|
508
|
+
requested: T::Boolean,
|
|
509
|
+
success: T.nilable(T::Boolean)
|
|
510
|
+
}
|
|
490
511
|
)
|
|
491
512
|
end
|
|
492
513
|
def to_hash
|
|
@@ -508,17 +529,34 @@ module ContextDev
|
|
|
508
529
|
sig { returns(T::Boolean) }
|
|
509
530
|
attr_accessor :requested
|
|
510
531
|
|
|
532
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
533
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
534
|
+
attr_accessor :success
|
|
535
|
+
|
|
511
536
|
# Rendered HTML after content filters.
|
|
512
537
|
sig do
|
|
513
|
-
params(
|
|
514
|
-
T.
|
|
515
|
-
|
|
538
|
+
params(
|
|
539
|
+
data: T.nilable(String),
|
|
540
|
+
requested: T::Boolean,
|
|
541
|
+
success: T.nilable(T::Boolean)
|
|
542
|
+
).returns(T.attached_class)
|
|
516
543
|
end
|
|
517
|
-
def self.new(
|
|
544
|
+
def self.new(
|
|
545
|
+
data:,
|
|
546
|
+
requested:,
|
|
547
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
548
|
+
success:
|
|
549
|
+
)
|
|
518
550
|
end
|
|
519
551
|
|
|
520
552
|
sig do
|
|
521
|
-
override.returns(
|
|
553
|
+
override.returns(
|
|
554
|
+
{
|
|
555
|
+
data: T.nilable(String),
|
|
556
|
+
requested: T::Boolean,
|
|
557
|
+
success: T.nilable(T::Boolean)
|
|
558
|
+
}
|
|
559
|
+
)
|
|
522
560
|
end
|
|
523
561
|
def to_hash
|
|
524
562
|
end
|
|
@@ -545,6 +583,10 @@ module ContextDev
|
|
|
545
583
|
sig { returns(T::Boolean) }
|
|
546
584
|
attr_accessor :requested
|
|
547
585
|
|
|
586
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
587
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
588
|
+
attr_accessor :success
|
|
589
|
+
|
|
548
590
|
# Images after content filters. Empty when none are found.
|
|
549
591
|
sig do
|
|
550
592
|
params(
|
|
@@ -554,10 +596,16 @@ module ContextDev
|
|
|
554
596
|
ContextDev::Models::WebScrapeResponse::Images::Data::OrHash
|
|
555
597
|
]
|
|
556
598
|
),
|
|
557
|
-
requested: T::Boolean
|
|
599
|
+
requested: T::Boolean,
|
|
600
|
+
success: T.nilable(T::Boolean)
|
|
558
601
|
).returns(T.attached_class)
|
|
559
602
|
end
|
|
560
|
-
def self.new(
|
|
603
|
+
def self.new(
|
|
604
|
+
data:,
|
|
605
|
+
requested:,
|
|
606
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
607
|
+
success:
|
|
608
|
+
)
|
|
561
609
|
end
|
|
562
610
|
|
|
563
611
|
sig do
|
|
@@ -567,7 +615,8 @@ module ContextDev
|
|
|
567
615
|
T.nilable(
|
|
568
616
|
T::Array[ContextDev::Models::WebScrapeResponse::Images::Data]
|
|
569
617
|
),
|
|
570
|
-
requested: T::Boolean
|
|
618
|
+
requested: T::Boolean,
|
|
619
|
+
success: T.nilable(T::Boolean)
|
|
571
620
|
}
|
|
572
621
|
)
|
|
573
622
|
end
|
|
@@ -750,24 +799,32 @@ module ContextDev
|
|
|
750
799
|
sig { returns(T::Boolean) }
|
|
751
800
|
attr_accessor :requested
|
|
752
801
|
|
|
753
|
-
#
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
802
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
803
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
804
|
+
attr_accessor :success
|
|
805
|
+
|
|
806
|
+
# Page data extracted using your schema.
|
|
757
807
|
sig do
|
|
758
808
|
params(
|
|
759
809
|
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
760
|
-
requested: T::Boolean
|
|
810
|
+
requested: T::Boolean,
|
|
811
|
+
success: T.nilable(T::Boolean)
|
|
761
812
|
).returns(T.attached_class)
|
|
762
813
|
end
|
|
763
|
-
def self.new(
|
|
814
|
+
def self.new(
|
|
815
|
+
data:,
|
|
816
|
+
requested:,
|
|
817
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
818
|
+
success:
|
|
819
|
+
)
|
|
764
820
|
end
|
|
765
821
|
|
|
766
822
|
sig do
|
|
767
823
|
override.returns(
|
|
768
824
|
{
|
|
769
825
|
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
770
|
-
requested: T::Boolean
|
|
826
|
+
requested: T::Boolean,
|
|
827
|
+
success: T.nilable(T::Boolean)
|
|
771
828
|
}
|
|
772
829
|
)
|
|
773
830
|
end
|
|
@@ -790,17 +847,34 @@ module ContextDev
|
|
|
790
847
|
sig { returns(T::Boolean) }
|
|
791
848
|
attr_accessor :requested
|
|
792
849
|
|
|
850
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
851
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
852
|
+
attr_accessor :success
|
|
853
|
+
|
|
793
854
|
# Markdown after content filters.
|
|
794
855
|
sig do
|
|
795
|
-
params(
|
|
796
|
-
T.
|
|
797
|
-
|
|
856
|
+
params(
|
|
857
|
+
data: T.nilable(String),
|
|
858
|
+
requested: T::Boolean,
|
|
859
|
+
success: T.nilable(T::Boolean)
|
|
860
|
+
).returns(T.attached_class)
|
|
798
861
|
end
|
|
799
|
-
def self.new(
|
|
862
|
+
def self.new(
|
|
863
|
+
data:,
|
|
864
|
+
requested:,
|
|
865
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
866
|
+
success:
|
|
867
|
+
)
|
|
800
868
|
end
|
|
801
869
|
|
|
802
870
|
sig do
|
|
803
|
-
override.returns(
|
|
871
|
+
override.returns(
|
|
872
|
+
{
|
|
873
|
+
data: T.nilable(String),
|
|
874
|
+
requested: T::Boolean,
|
|
875
|
+
success: T.nilable(T::Boolean)
|
|
876
|
+
}
|
|
877
|
+
)
|
|
804
878
|
end
|
|
805
879
|
def to_hash
|
|
806
880
|
end
|
|
@@ -1324,21 +1398,32 @@ module ContextDev
|
|
|
1324
1398
|
sig { returns(T::Boolean) }
|
|
1325
1399
|
attr_accessor :requested
|
|
1326
1400
|
|
|
1401
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
1402
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1403
|
+
attr_accessor :success
|
|
1404
|
+
|
|
1327
1405
|
# Fields produced by parseParams.rules, after shared content filters.
|
|
1328
1406
|
sig do
|
|
1329
1407
|
params(
|
|
1330
1408
|
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
1331
|
-
requested: T::Boolean
|
|
1409
|
+
requested: T::Boolean,
|
|
1410
|
+
success: T.nilable(T::Boolean)
|
|
1332
1411
|
).returns(T.attached_class)
|
|
1333
1412
|
end
|
|
1334
|
-
def self.new(
|
|
1413
|
+
def self.new(
|
|
1414
|
+
data:,
|
|
1415
|
+
requested:,
|
|
1416
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
1417
|
+
success:
|
|
1418
|
+
)
|
|
1335
1419
|
end
|
|
1336
1420
|
|
|
1337
1421
|
sig do
|
|
1338
1422
|
override.returns(
|
|
1339
1423
|
{
|
|
1340
1424
|
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
1341
|
-
requested: T::Boolean
|
|
1425
|
+
requested: T::Boolean,
|
|
1426
|
+
success: T.nilable(T::Boolean)
|
|
1342
1427
|
}
|
|
1343
1428
|
)
|
|
1344
1429
|
end
|
|
@@ -1375,17 +1460,27 @@ module ContextDev
|
|
|
1375
1460
|
sig { returns(T::Boolean) }
|
|
1376
1461
|
attr_accessor :requested
|
|
1377
1462
|
|
|
1378
|
-
#
|
|
1463
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
1464
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1465
|
+
attr_accessor :success
|
|
1466
|
+
|
|
1467
|
+
# Product details found on the page.
|
|
1379
1468
|
sig do
|
|
1380
1469
|
params(
|
|
1381
1470
|
data:
|
|
1382
1471
|
T.nilable(
|
|
1383
1472
|
ContextDev::Models::WebScrapeResponse::Product::Data::OrHash
|
|
1384
1473
|
),
|
|
1385
|
-
requested: T::Boolean
|
|
1474
|
+
requested: T::Boolean,
|
|
1475
|
+
success: T.nilable(T::Boolean)
|
|
1386
1476
|
).returns(T.attached_class)
|
|
1387
1477
|
end
|
|
1388
|
-
def self.new(
|
|
1478
|
+
def self.new(
|
|
1479
|
+
data:,
|
|
1480
|
+
requested:,
|
|
1481
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
1482
|
+
success:
|
|
1483
|
+
)
|
|
1389
1484
|
end
|
|
1390
1485
|
|
|
1391
1486
|
sig do
|
|
@@ -1393,7 +1488,8 @@ module ContextDev
|
|
|
1393
1488
|
{
|
|
1394
1489
|
data:
|
|
1395
1490
|
T.nilable(ContextDev::Models::WebScrapeResponse::Product::Data),
|
|
1396
|
-
requested: T::Boolean
|
|
1491
|
+
requested: T::Boolean,
|
|
1492
|
+
success: T.nilable(T::Boolean)
|
|
1397
1493
|
}
|
|
1398
1494
|
)
|
|
1399
1495
|
end
|
|
@@ -1784,26 +1880,44 @@ module ContextDev
|
|
|
1784
1880
|
sig { returns(T::Boolean) }
|
|
1785
1881
|
attr_accessor :requested
|
|
1786
1882
|
|
|
1883
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
1884
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1885
|
+
attr_accessor :success
|
|
1886
|
+
|
|
1787
1887
|
# An image data URL. Use directly as an image src.
|
|
1788
1888
|
sig do
|
|
1789
|
-
params(
|
|
1790
|
-
T.
|
|
1791
|
-
|
|
1889
|
+
params(
|
|
1890
|
+
data: T.nilable(String),
|
|
1891
|
+
requested: T::Boolean,
|
|
1892
|
+
success: T.nilable(T::Boolean)
|
|
1893
|
+
).returns(T.attached_class)
|
|
1792
1894
|
end
|
|
1793
|
-
def self.new(
|
|
1895
|
+
def self.new(
|
|
1896
|
+
data:,
|
|
1897
|
+
requested:,
|
|
1898
|
+
# True when retrieved, false when retrieval failed, and null when not requested.
|
|
1899
|
+
success:
|
|
1900
|
+
)
|
|
1794
1901
|
end
|
|
1795
1902
|
|
|
1796
1903
|
sig do
|
|
1797
|
-
override.returns(
|
|
1904
|
+
override.returns(
|
|
1905
|
+
{
|
|
1906
|
+
data: T.nilable(String),
|
|
1907
|
+
requested: T::Boolean,
|
|
1908
|
+
success: T.nilable(T::Boolean)
|
|
1909
|
+
}
|
|
1910
|
+
)
|
|
1798
1911
|
end
|
|
1799
1912
|
def to_hash
|
|
1800
1913
|
end
|
|
1801
1914
|
end
|
|
1802
1915
|
|
|
1803
|
-
# Present when
|
|
1804
|
-
#
|
|
1805
|
-
#
|
|
1806
|
-
#
|
|
1916
|
+
# Present when at least one requested output succeeds while another fails, or when
|
|
1917
|
+
# successful outputs come from a page that is still loading or images returned
|
|
1918
|
+
# before processing finished. Absent when every requested output fails. Check each
|
|
1919
|
+
# output's success field for its result. Valid captured pieces may be cached
|
|
1920
|
+
# independently; failed retrievals and incomplete captures are not cached.
|
|
1807
1921
|
module IsPartial
|
|
1808
1922
|
extend ContextDev::Internal::Type::Enum
|
|
1809
1923
|
|
data/rbi/context_dev/models.rbi
CHANGED
|
@@ -21,6 +21,8 @@ module ContextDev
|
|
|
21
21
|
|
|
22
22
|
Failure = ContextDev::Models::Failure
|
|
23
23
|
|
|
24
|
+
FeedbackSubmitParams = ContextDev::Models::FeedbackSubmitParams
|
|
25
|
+
|
|
24
26
|
IndustryRetrieveNaicsParams = ContextDev::Models::IndustryRetrieveNaicsParams
|
|
25
27
|
|
|
26
28
|
IndustryRetrieveSicParams = ContextDev::Models::IndustryRetrieveSicParams
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Resources
|
|
5
|
+
# Report bugs, docs mismatches, and friction with any Context.dev API. Submissions
|
|
6
|
+
# cost no credits and use a separate rate limit.
|
|
7
|
+
class Feedback
|
|
8
|
+
# Report a problem with a Context.dev API call, docs page, SDK, or CLI. Include
|
|
9
|
+
# request_id, url, or both.
|
|
10
|
+
sig do
|
|
11
|
+
params(
|
|
12
|
+
category: ContextDev::FeedbackSubmitParams::Category::OrSymbol,
|
|
13
|
+
note: String,
|
|
14
|
+
request_id: String,
|
|
15
|
+
tags: T::Array[String],
|
|
16
|
+
url: String,
|
|
17
|
+
request_options: ContextDev::RequestOptions::OrHash
|
|
18
|
+
).returns(ContextDev::Models::FeedbackSubmitResponse)
|
|
19
|
+
end
|
|
20
|
+
def submit(
|
|
21
|
+
# Kind of issue.
|
|
22
|
+
category:,
|
|
23
|
+
# What went wrong and what you expected instead.
|
|
24
|
+
note:,
|
|
25
|
+
# The request_id of the API call the feedback is about, from its response body or
|
|
26
|
+
# X-Request-Id header.
|
|
27
|
+
request_id: nil,
|
|
28
|
+
# Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
29
|
+
tags: nil,
|
|
30
|
+
# The page the feedback is about, such as one page of a crawl or a docs page.
|
|
31
|
+
url: nil,
|
|
32
|
+
request_options: {}
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# @api private
|
|
37
|
+
sig { params(client: ContextDev::Client).returns(T.attached_class) }
|
|
38
|
+
def self.new(client:)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -6,9 +6,10 @@ module ContextDev
|
|
|
6
6
|
class News
|
|
7
7
|
# Searches live and historical company news for one company, identified in
|
|
8
8
|
# searchBy by name, domain, ticker (optionally disambiguated by exchange), or
|
|
9
|
-
# ISIN. Results can be filtered by publisher domain, publisher country,
|
|
10
|
-
# language, article type,
|
|
11
|
-
# source metadata, verified entity relevance,
|
|
9
|
+
# ISIN. Results can be filtered by one of publisher domain, publisher country,
|
|
10
|
+
# article language, or article type, optionally combined with a published-at date
|
|
11
|
+
# range, and include stable story IDs, source metadata, verified entity relevance,
|
|
12
|
+
# and cursor pagination.
|
|
12
13
|
sig do
|
|
13
14
|
params(
|
|
14
15
|
search_by: ContextDev::NewsSearchParams::SearchBy::OrHash,
|
|
@@ -25,7 +26,9 @@ module ContextDev
|
|
|
25
26
|
search_by:,
|
|
26
27
|
# Opaque next_cursor from the previous response, or null for the first page.
|
|
27
28
|
cursor: nil,
|
|
28
|
-
# Optional result filters.
|
|
29
|
+
# Optional result filters. Use at most one of sourceDomain, sourceCountry,
|
|
30
|
+
# articleLanguage, or articleType. A date range may accompany that category;
|
|
31
|
+
# date.from must not exceed date.to.
|
|
29
32
|
filter_by: nil,
|
|
30
33
|
# Maximum results to return. Defaults to 10.
|
|
31
34
|
limit: nil,
|
|
@@ -204,15 +204,21 @@ module ContextDev
|
|
|
204
204
|
# is shared with Markdown, parsed fields, product data, highlights, and JSON
|
|
205
205
|
# extraction. Cached outputs can come from different visits within maxAgeMs; use 0
|
|
206
206
|
# for a fresh capture. HTML-only requests use the existing fast acquisition path.
|
|
207
|
-
# Highlights return
|
|
208
|
-
#
|
|
209
|
-
#
|
|
210
|
-
#
|
|
211
|
-
#
|
|
212
|
-
#
|
|
213
|
-
#
|
|
214
|
-
#
|
|
215
|
-
#
|
|
207
|
+
# Highlights return Markdown excerpts most relevant to highlightsParams.query.
|
|
208
|
+
# Requests with at least one successful output cost one base credit, including
|
|
209
|
+
# cache hits, or two with browser actions. All-failed responses are unbilled
|
|
210
|
+
# except missing pages, which retain the base price and the one-credit product
|
|
211
|
+
# charge when product was requested. Highlights add 3 credits when passages are
|
|
212
|
+
# returned. JSON extraction runs an LLM over nonempty page Markdown and adds four
|
|
213
|
+
# credits only when its result is returned successfully. PDF OCR adds one credit
|
|
214
|
+
# per recovered page on fresh extraction. Product adds one credit when its
|
|
215
|
+
# successful result is returned, plus six if that result used the specialized
|
|
216
|
+
# model. Original response bytes and screenshots are limited to 20 MiB each,
|
|
217
|
+
# screenshots to 40 megapixels, and the combined response to 60 MiB. An oversized
|
|
218
|
+
# output has success: false and data: null. If the combined response exceeds its
|
|
219
|
+
# limit, the largest outputs are marked failed until the remaining outputs fit.
|
|
220
|
+
# Valid captured pieces may still be cached when omitted to meet the response size
|
|
221
|
+
# limit.
|
|
216
222
|
sig do
|
|
217
223
|
params(
|
|
218
224
|
formats: ContextDev::WebScrapeParams::Formats::OrHash,
|
|
@@ -264,16 +270,19 @@ module ContextDev
|
|
|
264
270
|
# Labels for tracking request usage. Not retained when zdr is enabled.
|
|
265
271
|
tags: nil,
|
|
266
272
|
# Total deadline, including navigation, actions, waiting, and all outputs.
|
|
267
|
-
# Defaults to 60000 milliseconds with behavior fail.
|
|
268
|
-
#
|
|
269
|
-
#
|
|
270
|
-
#
|
|
271
|
-
#
|
|
272
|
-
# when
|
|
273
|
+
# Defaults to 60000 milliseconds with behavior fail. Individual outputs have
|
|
274
|
+
# internal deadlines that reserve time to return completed outputs; timed-out
|
|
275
|
+
# outputs have success: false and data: null under either behavior. The overall
|
|
276
|
+
# request deadline remains enforced: fail returns an error if that deadline is
|
|
277
|
+
# reached. Use return-partial to allow the current page state and available
|
|
278
|
+
# outputs when the page is still loading. Partial responses set isPartial. Failed
|
|
279
|
+
# retrievals and incomplete captures are not cached; valid captured pieces may be
|
|
280
|
+
# cached independently. Fixed waits must fit before a response reserve of up to
|
|
281
|
+
# 5000 milliseconds (at most one quarter of the timeout) when using
|
|
282
|
+
# return-partial.
|
|
273
283
|
timeout_opts: nil,
|
|
274
284
|
# Zero data retention. Bypasses caches and uploads; excludes request/response
|
|
275
|
-
# content and tags from logs. Must be enabled for your organization.
|
|
276
|
-
# with the highlights output.
|
|
285
|
+
# content and tags from logs. Must be enabled for your organization.
|
|
277
286
|
zdr: nil,
|
|
278
287
|
request_options: {}
|
|
279
288
|
)
|