context.dev 1.3.0 → 1.4.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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/internal/util.rb +3 -1
  5. data/lib/context_dev/models/brand_identify_from_transaction_params.rb +65 -0
  6. data/lib/context_dev/models/brand_identify_from_transaction_response.rb +190 -5
  7. data/lib/context_dev/models/brand_retrieve_by_email_params.rb +65 -0
  8. data/lib/context_dev/models/brand_retrieve_by_email_response.rb +190 -5
  9. data/lib/context_dev/models/brand_retrieve_by_isin_params.rb +65 -0
  10. data/lib/context_dev/models/brand_retrieve_by_isin_response.rb +190 -5
  11. data/lib/context_dev/models/brand_retrieve_by_name_params.rb +65 -0
  12. data/lib/context_dev/models/brand_retrieve_by_name_response.rb +190 -5
  13. data/lib/context_dev/models/brand_retrieve_by_ticker_params.rb +65 -0
  14. data/lib/context_dev/models/brand_retrieve_by_ticker_response.rb +190 -5
  15. data/lib/context_dev/models/brand_retrieve_params.rb +68 -5
  16. data/lib/context_dev/models/brand_retrieve_response.rb +190 -5
  17. data/lib/context_dev/models/web_screenshot_params.rb +17 -5
  18. data/lib/context_dev/resources/brand.rb +1 -1
  19. data/lib/context_dev/resources/web.rb +8 -5
  20. data/lib/context_dev/version.rb +1 -1
  21. data/rbi/context_dev/models/brand_identify_from_transaction_params.rbi +325 -0
  22. data/rbi/context_dev/models/brand_identify_from_transaction_response.rbi +859 -6
  23. data/rbi/context_dev/models/brand_retrieve_by_email_params.rbi +325 -0
  24. data/rbi/context_dev/models/brand_retrieve_by_email_response.rbi +859 -6
  25. data/rbi/context_dev/models/brand_retrieve_by_isin_params.rbi +325 -0
  26. data/rbi/context_dev/models/brand_retrieve_by_isin_response.rbi +859 -6
  27. data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +325 -0
  28. data/rbi/context_dev/models/brand_retrieve_by_name_response.rbi +859 -6
  29. data/rbi/context_dev/models/brand_retrieve_by_ticker_params.rbi +325 -0
  30. data/rbi/context_dev/models/brand_retrieve_by_ticker_response.rbi +859 -6
  31. data/rbi/context_dev/models/brand_retrieve_params.rbi +328 -6
  32. data/rbi/context_dev/models/brand_retrieve_response.rbi +859 -6
  33. data/rbi/context_dev/models/web_screenshot_params.rbi +27 -6
  34. data/rbi/context_dev/resources/brand.rbi +1 -2
  35. data/rbi/context_dev/resources/web.rbi +11 -4
  36. data/sig/context_dev/models/brand_identify_from_transaction_params.rbs +131 -1
  37. data/sig/context_dev/models/brand_identify_from_transaction_response.rbs +342 -5
  38. data/sig/context_dev/models/brand_retrieve_by_email_params.rbs +131 -1
  39. data/sig/context_dev/models/brand_retrieve_by_email_response.rbs +342 -5
  40. data/sig/context_dev/models/brand_retrieve_by_isin_params.rbs +131 -1
  41. data/sig/context_dev/models/brand_retrieve_by_isin_response.rbs +342 -5
  42. data/sig/context_dev/models/brand_retrieve_by_name_params.rbs +131 -1
  43. data/sig/context_dev/models/brand_retrieve_by_name_response.rbs +342 -5
  44. data/sig/context_dev/models/brand_retrieve_by_ticker_params.rbs +131 -1
  45. data/sig/context_dev/models/brand_retrieve_by_ticker_response.rbs +342 -5
  46. data/sig/context_dev/models/brand_retrieve_params.rbs +131 -1
  47. data/sig/context_dev/models/brand_retrieve_response.rbs +342 -5
  48. data/sig/context_dev/models/web_screenshot_params.rbs +11 -2
  49. data/sig/context_dev/resources/web.rbs +2 -1
  50. metadata +2 -2
@@ -11,10 +11,22 @@ module ContextDev
11
11
  T.any(ContextDev::WebScreenshotParams, ContextDev::Internal::AnyHash)
12
12
  end
13
13
 
14
+ # A specific URL to screenshot directly, bypassing domain resolution (e.g.,
15
+ # 'https://example.com/pricing'). When provided, the screenshot is taken of this
16
+ # exact URL.
17
+ sig { returns(T.nilable(String)) }
18
+ attr_reader :direct_url
19
+
20
+ sig { params(direct_url: String).void }
21
+ attr_writer :direct_url
22
+
14
23
  # Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
15
24
  # domain will be automatically normalized and validated.
16
- sig { returns(String) }
17
- attr_accessor :domain
25
+ sig { returns(T.nilable(String)) }
26
+ attr_reader :domain
27
+
28
+ sig { params(domain: String).void }
29
+ attr_writer :domain
18
30
 
19
31
  # Optional parameter to determine screenshot type. If 'true', takes a full page
20
32
  # screenshot capturing all content. If 'false' or not provided, takes a viewport
@@ -37,7 +49,8 @@ module ContextDev
37
49
  # Optional parameter to specify which page type to screenshot. If provided, the
38
50
  # system will scrape the domain's links and use heuristics to find the most
39
51
  # appropriate URL for the specified page type (30 supported languages). If not
40
- # provided, screenshots the main domain landing page.
52
+ # provided, screenshots the main domain landing page. Only applicable when using
53
+ # 'domain', not 'directUrl'.
41
54
  sig do
42
55
  returns(T.nilable(ContextDev::WebScreenshotParams::Page::OrSymbol))
43
56
  end
@@ -65,6 +78,7 @@ module ContextDev
65
78
 
66
79
  sig do
67
80
  params(
81
+ direct_url: String,
68
82
  domain: String,
69
83
  full_screenshot:
70
84
  ContextDev::WebScreenshotParams::FullScreenshot::OrSymbol,
@@ -74,9 +88,13 @@ module ContextDev
74
88
  ).returns(T.attached_class)
75
89
  end
76
90
  def self.new(
91
+ # A specific URL to screenshot directly, bypassing domain resolution (e.g.,
92
+ # 'https://example.com/pricing'). When provided, the screenshot is taken of this
93
+ # exact URL.
94
+ direct_url: nil,
77
95
  # Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
78
96
  # domain will be automatically normalized and validated.
79
- domain:,
97
+ domain: nil,
80
98
  # Optional parameter to determine screenshot type. If 'true', takes a full page
81
99
  # screenshot capturing all content. If 'false' or not provided, takes a viewport
82
100
  # screenshot (standard browser view).
@@ -84,7 +102,8 @@ module ContextDev
84
102
  # Optional parameter to specify which page type to screenshot. If provided, the
85
103
  # system will scrape the domain's links and use heuristics to find the most
86
104
  # appropriate URL for the specified page type (30 supported languages). If not
87
- # provided, screenshots the main domain landing page.
105
+ # provided, screenshots the main domain landing page. Only applicable when using
106
+ # 'domain', not 'directUrl'.
88
107
  page: nil,
89
108
  # Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
90
109
  # faster capture with basic quality. If 'quality', optimizes for higher quality
@@ -97,6 +116,7 @@ module ContextDev
97
116
  sig do
98
117
  override.returns(
99
118
  {
119
+ direct_url: String,
100
120
  domain: String,
101
121
  full_screenshot:
102
122
  ContextDev::WebScreenshotParams::FullScreenshot::OrSymbol,
@@ -146,7 +166,8 @@ module ContextDev
146
166
  # Optional parameter to specify which page type to screenshot. If provided, the
147
167
  # system will scrape the domain's links and use heuristics to find the most
148
168
  # appropriate URL for the specified page type (30 supported languages). If not
149
- # provided, screenshots the main domain landing page.
169
+ # provided, screenshots the main domain landing page. Only applicable when using
170
+ # 'domain', not 'directUrl'.
150
171
  module Page
151
172
  extend ContextDev::Internal::Type::Enum
152
173
 
@@ -19,8 +19,7 @@ module ContextDev
19
19
  # Domain name to retrieve brand data for (e.g., 'example.com', 'google.com').
20
20
  # Cannot be used with name or ticker parameters.
21
21
  domain:,
22
- # Optional parameter to force the language of the retrieved brand data. Works with
23
- # all three lookup methods.
22
+ # Optional parameter to force the language of the retrieved brand data.
24
23
  force_language: nil,
25
24
  # Optional parameter to optimize the API call for maximum speed. When set to true,
26
25
  # the API will skip time-consuming operations for faster response at the cost of
@@ -5,10 +5,12 @@ module ContextDev
5
5
  class Web
6
6
  # Capture a screenshot of a website. Supports both viewport (standard browser
7
7
  # view) and full-page screenshots. Can also screenshot specific page types (login,
8
- # pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to
9
- # the uploaded screenshot image hosted on our CDN.
8
+ # pricing, etc.) by using heuristics to find the appropriate URL. Either 'domain'
9
+ # or 'directUrl' must be provided as a query parameter, but not both. Returns a
10
+ # URL to the uploaded screenshot image hosted on our CDN.
10
11
  sig do
11
12
  params(
13
+ direct_url: String,
12
14
  domain: String,
13
15
  full_screenshot:
14
16
  ContextDev::WebScreenshotParams::FullScreenshot::OrSymbol,
@@ -18,9 +20,13 @@ module ContextDev
18
20
  ).returns(ContextDev::Models::WebScreenshotResponse)
19
21
  end
20
22
  def screenshot(
23
+ # A specific URL to screenshot directly, bypassing domain resolution (e.g.,
24
+ # 'https://example.com/pricing'). When provided, the screenshot is taken of this
25
+ # exact URL.
26
+ direct_url: nil,
21
27
  # Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
22
28
  # domain will be automatically normalized and validated.
23
- domain:,
29
+ domain: nil,
24
30
  # Optional parameter to determine screenshot type. If 'true', takes a full page
25
31
  # screenshot capturing all content. If 'false' or not provided, takes a viewport
26
32
  # screenshot (standard browser view).
@@ -28,7 +34,8 @@ module ContextDev
28
34
  # Optional parameter to specify which page type to screenshot. If provided, the
29
35
  # system will scrape the domain's links and use heuristics to find the most
30
36
  # appropriate URL for the specified page type (30 supported languages). If not
31
- # provided, screenshots the main domain landing page.
37
+ # provided, screenshots the main domain landing page. Only applicable when using
38
+ # 'domain', not 'directUrl'.
32
39
  page: nil,
33
40
  # Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
34
41
  # faster capture with basic quality. If 'quality', optimizes for higher quality
@@ -570,120 +570,250 @@ module ContextDev
570
570
  end
571
571
 
572
572
  type force_language =
573
- :albanian
573
+ :afrikaans
574
+ | :albanian
575
+ | :amharic
574
576
  | :arabic
577
+ | :armenian
578
+ | :assamese
579
+ | :aymara
575
580
  | :azeri
581
+ | :basque
582
+ | :belarusian
576
583
  | :bengali
584
+ | :bosnian
577
585
  | :bulgarian
586
+ | :burmese
578
587
  | :cantonese
588
+ | :catalan
579
589
  | :cebuano
590
+ | :chinese
591
+ | :corsican
580
592
  | :croatian
581
593
  | :czech
582
594
  | :danish
583
595
  | :dutch
584
596
  | :english
597
+ | :esperanto
585
598
  | :estonian
586
599
  | :farsi
600
+ | :fijian
587
601
  | :finnish
588
602
  | :french
603
+ | :galician
604
+ | :georgian
589
605
  | :german
606
+ | :greek
607
+ | :guarani
608
+ | :gujarati
609
+ | :"haitian-creole"
590
610
  | :hausa
591
611
  | :hawaiian
612
+ | :hebrew
592
613
  | :hindi
614
+ | :hmong
593
615
  | :hungarian
594
616
  | :icelandic
617
+ | :igbo
595
618
  | :indonesian
619
+ | :irish
596
620
  | :italian
621
+ | :japanese
622
+ | :javanese
623
+ | :kannada
597
624
  | :kazakh
625
+ | :khmer
626
+ | :kinyarwanda
598
627
  | :korean
628
+ | :kurdish
599
629
  | :kyrgyz
630
+ | :lao
600
631
  | :latin
601
632
  | :latvian
633
+ | :lingala
602
634
  | :lithuanian
635
+ | :luxembourgish
603
636
  | :macedonian
637
+ | :malagasy
638
+ | :malay
639
+ | :malayalam
640
+ | :maltese
641
+ | :maori
642
+ | :marathi
604
643
  | :mongolian
605
644
  | :nepali
606
645
  | :norwegian
646
+ | :odia
647
+ | :oromo
607
648
  | :pashto
608
649
  | :pidgin
609
650
  | :polish
610
651
  | :portuguese
652
+ | :punjabi
653
+ | :quechua
611
654
  | :romanian
612
655
  | :russian
656
+ | :samoan
657
+ | :"scottish-gaelic"
613
658
  | :serbian
659
+ | :sesotho
660
+ | :shona
661
+ | :sindhi
662
+ | :sinhala
614
663
  | :slovak
615
664
  | :slovene
616
665
  | :somali
617
666
  | :spanish
667
+ | :sundanese
618
668
  | :swahili
619
669
  | :swedish
620
670
  | :tagalog
671
+ | :tajik
672
+ | :tamil
673
+ | :tatar
674
+ | :telugu
621
675
  | :thai
676
+ | :tibetan
677
+ | :tigrinya
678
+ | :tongan
679
+ | :tswana
622
680
  | :turkish
681
+ | :turkmen
623
682
  | :ukrainian
624
683
  | :urdu
684
+ | :uyghur
625
685
  | :uzbek
626
686
  | :vietnamese
627
687
  | :welsh
688
+ | :wolof
689
+ | :xhosa
690
+ | :yiddish
691
+ | :yoruba
692
+ | :zulu
628
693
 
629
694
  module ForceLanguage
630
695
  extend ContextDev::Internal::Type::Enum
631
696
 
697
+ AFRIKAANS: :afrikaans
632
698
  ALBANIAN: :albanian
699
+ AMHARIC: :amharic
633
700
  ARABIC: :arabic
701
+ ARMENIAN: :armenian
702
+ ASSAMESE: :assamese
703
+ AYMARA: :aymara
634
704
  AZERI: :azeri
705
+ BASQUE: :basque
706
+ BELARUSIAN: :belarusian
635
707
  BENGALI: :bengali
708
+ BOSNIAN: :bosnian
636
709
  BULGARIAN: :bulgarian
710
+ BURMESE: :burmese
637
711
  CANTONESE: :cantonese
712
+ CATALAN: :catalan
638
713
  CEBUANO: :cebuano
714
+ CHINESE: :chinese
715
+ CORSICAN: :corsican
639
716
  CROATIAN: :croatian
640
717
  CZECH: :czech
641
718
  DANISH: :danish
642
719
  DUTCH: :dutch
643
720
  ENGLISH: :english
721
+ ESPERANTO: :esperanto
644
722
  ESTONIAN: :estonian
645
723
  FARSI: :farsi
724
+ FIJIAN: :fijian
646
725
  FINNISH: :finnish
647
726
  FRENCH: :french
727
+ GALICIAN: :galician
728
+ GEORGIAN: :georgian
648
729
  GERMAN: :german
730
+ GREEK: :greek
731
+ GUARANI: :guarani
732
+ GUJARATI: :gujarati
733
+ HAITIAN_CREOLE: :"haitian-creole"
649
734
  HAUSA: :hausa
650
735
  HAWAIIAN: :hawaiian
736
+ HEBREW: :hebrew
651
737
  HINDI: :hindi
738
+ HMONG: :hmong
652
739
  HUNGARIAN: :hungarian
653
740
  ICELANDIC: :icelandic
741
+ IGBO: :igbo
654
742
  INDONESIAN: :indonesian
743
+ IRISH: :irish
655
744
  ITALIAN: :italian
745
+ JAPANESE: :japanese
746
+ JAVANESE: :javanese
747
+ KANNADA: :kannada
656
748
  KAZAKH: :kazakh
749
+ KHMER: :khmer
750
+ KINYARWANDA: :kinyarwanda
657
751
  KOREAN: :korean
752
+ KURDISH: :kurdish
658
753
  KYRGYZ: :kyrgyz
754
+ LAO: :lao
659
755
  LATIN: :latin
660
756
  LATVIAN: :latvian
757
+ LINGALA: :lingala
661
758
  LITHUANIAN: :lithuanian
759
+ LUXEMBOURGISH: :luxembourgish
662
760
  MACEDONIAN: :macedonian
761
+ MALAGASY: :malagasy
762
+ MALAY: :malay
763
+ MALAYALAM: :malayalam
764
+ MALTESE: :maltese
765
+ MAORI: :maori
766
+ MARATHI: :marathi
663
767
  MONGOLIAN: :mongolian
664
768
  NEPALI: :nepali
665
769
  NORWEGIAN: :norwegian
770
+ ODIA: :odia
771
+ OROMO: :oromo
666
772
  PASHTO: :pashto
667
773
  PIDGIN: :pidgin
668
774
  POLISH: :polish
669
775
  PORTUGUESE: :portuguese
776
+ PUNJABI: :punjabi
777
+ QUECHUA: :quechua
670
778
  ROMANIAN: :romanian
671
779
  RUSSIAN: :russian
780
+ SAMOAN: :samoan
781
+ SCOTTISH_GAELIC: :"scottish-gaelic"
672
782
  SERBIAN: :serbian
783
+ SESOTHO: :sesotho
784
+ SHONA: :shona
785
+ SINDHI: :sindhi
786
+ SINHALA: :sinhala
673
787
  SLOVAK: :slovak
674
788
  SLOVENE: :slovene
675
789
  SOMALI: :somali
676
790
  SPANISH: :spanish
791
+ SUNDANESE: :sundanese
677
792
  SWAHILI: :swahili
678
793
  SWEDISH: :swedish
679
794
  TAGALOG: :tagalog
795
+ TAJIK: :tajik
796
+ TAMIL: :tamil
797
+ TATAR: :tatar
798
+ TELUGU: :telugu
680
799
  THAI: :thai
800
+ TIBETAN: :tibetan
801
+ TIGRINYA: :tigrinya
802
+ TONGAN: :tongan
803
+ TSWANA: :tswana
681
804
  TURKISH: :turkish
805
+ TURKMEN: :turkmen
682
806
  UKRAINIAN: :ukrainian
683
807
  URDU: :urdu
808
+ UYGHUR: :uyghur
684
809
  UZBEK: :uzbek
685
810
  VIETNAMESE: :vietnamese
686
811
  WELSH: :welsh
812
+ WOLOF: :wolof
813
+ XHOSA: :xhosa
814
+ YIDDISH: :yiddish
815
+ YORUBA: :yoruba
816
+ ZULU: :zulu
687
817
 
688
818
  def self?.values: -> ::Array[ContextDev::Models::BrandIdentifyFromTransactionParams::force_language]
689
819
  end