context.dev 0.0.2 → 0.2.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 (131) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +9 -9
  4. data/lib/context_dev/client.rb +20 -0
  5. data/lib/context_dev/internal/type/base_model.rb +4 -4
  6. data/lib/context_dev/models/{brand_ai_query_params.rb → ai_ai_query_params.rb} +21 -22
  7. data/lib/context_dev/models/{brand_ai_query_response.rb → ai_ai_query_response.rb} +11 -11
  8. data/lib/context_dev/models/{brand_ai_product_params.rb → ai_extract_product_params.rb} +3 -3
  9. data/lib/context_dev/models/{brand_ai_product_response.rb → ai_extract_product_response.rb} +18 -18
  10. data/lib/context_dev/models/{brand_ai_products_params.rb → ai_extract_products_params.rb} +11 -10
  11. data/lib/context_dev/models/{brand_ai_products_response.rb → ai_extract_products_response.rb} +13 -13
  12. data/lib/context_dev/models/brand_identify_from_transaction_params.rb +3 -0
  13. data/lib/context_dev/models/brand_retrieve_by_email_params.rb +3 -0
  14. data/lib/context_dev/models/brand_retrieve_by_isin_params.rb +3 -0
  15. data/lib/context_dev/models/brand_retrieve_by_name_params.rb +262 -1
  16. data/lib/context_dev/models/brand_retrieve_by_ticker_params.rb +3 -0
  17. data/lib/context_dev/models/brand_retrieve_params.rb +3 -0
  18. data/lib/context_dev/models/{brand_retrieve_naics_params.rb → industry_retrieve_naics_params.rb} +3 -3
  19. data/lib/context_dev/models/{brand_retrieve_naics_response.rb → industry_retrieve_naics_response.rb} +9 -9
  20. data/lib/context_dev/models/{brand_fonts_params.rb → style_extract_fonts_params.rb} +3 -3
  21. data/lib/context_dev/models/{brand_fonts_response.rb → style_extract_fonts_response.rb} +6 -5
  22. data/lib/context_dev/models/{brand_styleguide_params.rb → style_extract_styleguide_params.rb} +6 -6
  23. data/lib/context_dev/models/{brand_styleguide_response.rb → style_extract_styleguide_response.rb} +83 -74
  24. data/lib/context_dev/models/{brand_prefetch_by_email_params.rb → utility_prefetch_by_email_params.rb} +3 -3
  25. data/lib/context_dev/models/{brand_prefetch_by_email_response.rb → utility_prefetch_by_email_response.rb} +2 -2
  26. data/lib/context_dev/models/{brand_prefetch_params.rb → utility_prefetch_params.rb} +3 -3
  27. data/lib/context_dev/models/{brand_prefetch_response.rb → utility_prefetch_response.rb} +2 -2
  28. data/lib/context_dev/models/{brand_screenshot_params.rb → web_screenshot_params.rb} +12 -12
  29. data/lib/context_dev/models/{brand_screenshot_response.rb → web_screenshot_response.rb} +6 -6
  30. data/lib/context_dev/models/{brand_web_scrape_html_params.rb → web_web_scrape_html_params.rb} +2 -2
  31. data/lib/context_dev/models/{brand_web_scrape_html_response.rb → web_web_scrape_html_response.rb} +6 -6
  32. data/lib/context_dev/models/{brand_web_scrape_images_params.rb → web_web_scrape_images_params.rb} +2 -2
  33. data/lib/context_dev/models/{brand_web_scrape_images_response.rb → web_web_scrape_images_response.rb} +17 -17
  34. data/lib/context_dev/models/{brand_web_scrape_md_params.rb → web_web_scrape_md_params.rb} +3 -3
  35. data/lib/context_dev/models/{brand_web_scrape_md_response.rb → web_web_scrape_md_response.rb} +6 -6
  36. data/lib/context_dev/models/{brand_web_scrape_sitemap_params.rb → web_web_scrape_sitemap_params.rb} +3 -3
  37. data/lib/context_dev/models/{brand_web_scrape_sitemap_response.rb → web_web_scrape_sitemap_response.rb} +10 -10
  38. data/lib/context_dev/models.rb +17 -17
  39. data/lib/context_dev/resources/ai.rb +99 -0
  40. data/lib/context_dev/resources/brand.rb +3 -398
  41. data/lib/context_dev/resources/industry.rb +50 -0
  42. data/lib/context_dev/resources/style.rb +78 -0
  43. data/lib/context_dev/resources/utility.rb +76 -0
  44. data/lib/context_dev/resources/web.rb +164 -0
  45. data/lib/context_dev/version.rb +1 -1
  46. data/lib/context_dev.rb +31 -26
  47. data/rbi/context_dev/client.rbi +15 -0
  48. data/rbi/context_dev/models/{brand_ai_query_params.rbi → ai_ai_query_params.rbi} +46 -46
  49. data/rbi/context_dev/models/{brand_ai_query_response.rbi → ai_ai_query_response.rbi} +12 -12
  50. data/rbi/context_dev/models/{brand_ai_product_params.rbi → ai_extract_product_params.rbi} +5 -2
  51. data/rbi/context_dev/models/{brand_ai_product_response.rbi → ai_extract_product_response.rbi} +40 -35
  52. data/rbi/context_dev/models/{brand_ai_products_params.rbi → ai_extract_products_params.rbi} +13 -13
  53. data/rbi/context_dev/models/{brand_ai_products_response.rbi → ai_extract_products_response.rbi} +26 -26
  54. data/rbi/context_dev/models/brand_identify_from_transaction_params.rbi +15 -0
  55. data/rbi/context_dev/models/brand_retrieve_by_email_params.rbi +15 -0
  56. data/rbi/context_dev/models/brand_retrieve_by_isin_params.rbi +15 -0
  57. data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +1326 -70
  58. data/rbi/context_dev/models/brand_retrieve_by_ticker_params.rbi +15 -0
  59. data/rbi/context_dev/models/brand_retrieve_params.rbi +15 -0
  60. data/rbi/context_dev/models/{brand_retrieve_naics_params.rbi → industry_retrieve_naics_params.rbi} +2 -2
  61. data/rbi/context_dev/models/{brand_retrieve_naics_response.rbi → industry_retrieve_naics_response.rbi} +15 -15
  62. data/rbi/context_dev/models/{brand_fonts_params.rbi → style_extract_fonts_params.rbi} +5 -2
  63. data/rbi/context_dev/models/{brand_fonts_response.rbi → style_extract_fonts_response.rbi} +12 -6
  64. data/rbi/context_dev/models/{brand_styleguide_params.rbi → style_extract_styleguide_params.rbi} +15 -10
  65. data/rbi/context_dev/models/{brand_styleguide_response.rbi → style_extract_styleguide_response.rbi} +98 -95
  66. data/rbi/context_dev/models/{brand_prefetch_by_email_params.rbi → utility_prefetch_by_email_params.rbi} +2 -2
  67. data/rbi/context_dev/models/{brand_prefetch_by_email_response.rbi → utility_prefetch_by_email_response.rbi} +2 -2
  68. data/rbi/context_dev/models/{brand_prefetch_params.rbi → utility_prefetch_params.rbi} +5 -2
  69. data/rbi/context_dev/models/{brand_prefetch_response.rbi → utility_prefetch_response.rbi} +2 -2
  70. data/rbi/context_dev/models/{brand_screenshot_params.rbi → web_screenshot_params.rbi} +32 -42
  71. data/rbi/context_dev/models/{brand_screenshot_response.rbi → web_screenshot_response.rbi} +10 -10
  72. data/rbi/context_dev/models/{brand_web_scrape_html_params.rbi → web_web_scrape_html_params.rbi} +2 -2
  73. data/rbi/context_dev/models/{brand_web_scrape_html_response.rbi → web_web_scrape_html_response.rbi} +8 -8
  74. data/rbi/context_dev/models/{brand_web_scrape_images_params.rbi → web_web_scrape_images_params.rbi} +2 -2
  75. data/rbi/context_dev/models/{brand_web_scrape_images_response.rbi → web_web_scrape_images_response.rbi} +30 -32
  76. data/rbi/context_dev/models/{brand_web_scrape_md_params.rbi → web_web_scrape_md_params.rbi} +2 -5
  77. data/rbi/context_dev/models/{brand_web_scrape_md_response.rbi → web_web_scrape_md_response.rbi} +8 -8
  78. data/rbi/context_dev/models/{brand_web_scrape_sitemap_params.rbi → web_web_scrape_sitemap_params.rbi} +2 -2
  79. data/rbi/context_dev/models/{brand_web_scrape_sitemap_response.rbi → web_web_scrape_sitemap_response.rbi} +13 -13
  80. data/rbi/context_dev/models.rbi +19 -17
  81. data/rbi/context_dev/resources/ai.rbi +76 -0
  82. data/rbi/context_dev/resources/brand.rbi +5 -303
  83. data/rbi/context_dev/resources/industry.rbi +40 -0
  84. data/rbi/context_dev/resources/style.rbi +67 -0
  85. data/rbi/context_dev/resources/utility.rbi +60 -0
  86. data/rbi/context_dev/resources/web.rbi +121 -0
  87. data/sig/context_dev/client.rbs +10 -0
  88. data/sig/context_dev/models/{brand_ai_query_params.rbs → ai_ai_query_params.rbs} +31 -31
  89. data/sig/context_dev/models/{brand_ai_query_response.rbs → ai_ai_query_response.rbs} +15 -15
  90. data/sig/context_dev/models/{brand_ai_product_params.rbs → ai_extract_product_params.rbs} +2 -2
  91. data/sig/context_dev/models/{brand_ai_product_response.rbs → ai_extract_product_response.rbs} +21 -21
  92. data/sig/context_dev/models/{brand_ai_products_params.rbs → ai_extract_products_params.rbs} +9 -9
  93. data/sig/context_dev/models/{brand_ai_products_response.rbs → ai_extract_products_response.rbs} +18 -18
  94. data/sig/context_dev/models/brand_identify_from_transaction_params.rbs +6 -0
  95. data/sig/context_dev/models/brand_retrieve_by_email_params.rbs +6 -0
  96. data/sig/context_dev/models/brand_retrieve_by_isin_params.rbs +6 -0
  97. data/sig/context_dev/models/brand_retrieve_by_name_params.rbs +502 -0
  98. data/sig/context_dev/models/brand_retrieve_by_ticker_params.rbs +6 -0
  99. data/sig/context_dev/models/brand_retrieve_params.rbs +6 -0
  100. data/sig/context_dev/models/{brand_retrieve_naics_params.rbs → industry_retrieve_naics_params.rbs} +2 -2
  101. data/sig/context_dev/models/{brand_retrieve_naics_response.rbs → industry_retrieve_naics_response.rbs} +13 -13
  102. data/sig/context_dev/models/{brand_fonts_params.rbs → style_extract_fonts_params.rbs} +2 -2
  103. data/sig/context_dev/models/{brand_fonts_response.rbs → style_extract_fonts_response.rbs} +6 -6
  104. data/sig/context_dev/models/{brand_styleguide_params.rbs → style_extract_styleguide_params.rbs} +9 -9
  105. data/sig/context_dev/models/{brand_styleguide_response.rbs → style_extract_styleguide_response.rbs} +111 -111
  106. data/sig/context_dev/models/{brand_prefetch_by_email_params.rbs → utility_prefetch_by_email_params.rbs} +2 -2
  107. data/sig/context_dev/models/{brand_prefetch_by_email_response.rbs → utility_prefetch_by_email_response.rbs} +2 -2
  108. data/sig/context_dev/models/{brand_prefetch_params.rbs → utility_prefetch_params.rbs} +2 -2
  109. data/sig/context_dev/models/{brand_prefetch_response.rbs → utility_prefetch_response.rbs} +2 -2
  110. data/sig/context_dev/models/web_screenshot_params.rbs +100 -0
  111. data/sig/context_dev/models/{brand_screenshot_response.rbs → web_screenshot_response.rbs} +9 -9
  112. data/sig/context_dev/models/{brand_web_scrape_images_params.rbs → web_web_scrape_html_params.rbs} +2 -2
  113. data/sig/context_dev/models/web_web_scrape_html_response.rbs +40 -0
  114. data/sig/context_dev/models/{brand_web_scrape_html_params.rbs → web_web_scrape_images_params.rbs} +2 -2
  115. data/sig/context_dev/models/web_web_scrape_images_response.rbs +98 -0
  116. data/sig/context_dev/models/{brand_web_scrape_md_params.rbs → web_web_scrape_md_params.rbs} +2 -2
  117. data/sig/context_dev/models/web_web_scrape_md_response.rbs +40 -0
  118. data/sig/context_dev/models/{brand_web_scrape_sitemap_params.rbs → web_web_scrape_sitemap_params.rbs} +2 -2
  119. data/sig/context_dev/models/{brand_web_scrape_sitemap_response.rbs → web_web_scrape_sitemap_response.rbs} +11 -11
  120. data/sig/context_dev/models.rbs +17 -17
  121. data/sig/context_dev/resources/ai.rbs +26 -0
  122. data/sig/context_dev/resources/brand.rbs +1 -84
  123. data/sig/context_dev/resources/industry.rbs +15 -0
  124. data/sig/context_dev/resources/style.rbs +21 -0
  125. data/sig/context_dev/resources/utility.rbs +19 -0
  126. data/sig/context_dev/resources/web.rbs +38 -0
  127. metadata +95 -80
  128. data/sig/context_dev/models/brand_screenshot_params.rbs +0 -100
  129. data/sig/context_dev/models/brand_web_scrape_html_response.rbs +0 -40
  130. data/sig/context_dev/models/brand_web_scrape_images_response.rbs +0 -98
  131. data/sig/context_dev/models/brand_web_scrape_md_response.rbs +0 -40
@@ -2,16 +2,13 @@
2
2
 
3
3
  module ContextDev
4
4
  module Models
5
- class BrandWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
5
+ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
6
6
  extend ContextDev::Internal::Type::RequestParameters::Converter
7
7
  include ContextDev::Internal::Type::RequestParameters
8
8
 
9
9
  OrHash =
10
10
  T.type_alias do
11
- T.any(
12
- ContextDev::BrandWebScrapeMdParams,
13
- ContextDev::Internal::AnyHash
14
- )
11
+ T.any(ContextDev::WebWebScrapeMdParams, ContextDev::Internal::AnyHash)
15
12
  end
16
13
 
17
14
  # Full URL to scrape and convert to markdown (must include http:// or https://
@@ -2,11 +2,11 @@
2
2
 
3
3
  module ContextDev
4
4
  module Models
5
- class BrandWebScrapeMdResponse < ContextDev::Internal::Type::BaseModel
5
+ class WebWebScrapeMdResponse < ContextDev::Internal::Type::BaseModel
6
6
  OrHash =
7
7
  T.type_alias do
8
8
  T.any(
9
- ContextDev::Models::BrandWebScrapeMdResponse,
9
+ ContextDev::Models::WebWebScrapeMdResponse,
10
10
  ContextDev::Internal::AnyHash
11
11
  )
12
12
  end
@@ -18,7 +18,7 @@ module ContextDev
18
18
  # Indicates success
19
19
  sig do
20
20
  returns(
21
- ContextDev::Models::BrandWebScrapeMdResponse::Success::TaggedBoolean
21
+ ContextDev::Models::WebWebScrapeMdResponse::Success::TaggedBoolean
22
22
  )
23
23
  end
24
24
  attr_accessor :success
@@ -31,7 +31,7 @@ module ContextDev
31
31
  params(
32
32
  markdown: String,
33
33
  success:
34
- ContextDev::Models::BrandWebScrapeMdResponse::Success::OrBoolean,
34
+ ContextDev::Models::WebWebScrapeMdResponse::Success::OrBoolean,
35
35
  url: String
36
36
  ).returns(T.attached_class)
37
37
  end
@@ -50,7 +50,7 @@ module ContextDev
50
50
  {
51
51
  markdown: String,
52
52
  success:
53
- ContextDev::Models::BrandWebScrapeMdResponse::Success::TaggedBoolean,
53
+ ContextDev::Models::WebWebScrapeMdResponse::Success::TaggedBoolean,
54
54
  url: String
55
55
  }
56
56
  )
@@ -66,7 +66,7 @@ module ContextDev
66
66
  T.type_alias do
67
67
  T.all(
68
68
  T::Boolean,
69
- ContextDev::Models::BrandWebScrapeMdResponse::Success
69
+ ContextDev::Models::WebWebScrapeMdResponse::Success
70
70
  )
71
71
  end
72
72
  OrBoolean = T.type_alias { T::Boolean }
@@ -74,13 +74,13 @@ module ContextDev
74
74
  TRUE =
75
75
  T.let(
76
76
  true,
77
- ContextDev::Models::BrandWebScrapeMdResponse::Success::TaggedBoolean
77
+ ContextDev::Models::WebWebScrapeMdResponse::Success::TaggedBoolean
78
78
  )
79
79
 
80
80
  sig do
81
81
  override.returns(
82
82
  T::Array[
83
- ContextDev::Models::BrandWebScrapeMdResponse::Success::TaggedBoolean
83
+ ContextDev::Models::WebWebScrapeMdResponse::Success::TaggedBoolean
84
84
  ]
85
85
  )
86
86
  end
@@ -2,14 +2,14 @@
2
2
 
3
3
  module ContextDev
4
4
  module Models
5
- class BrandWebScrapeSitemapParams < ContextDev::Internal::Type::BaseModel
5
+ class WebWebScrapeSitemapParams < ContextDev::Internal::Type::BaseModel
6
6
  extend ContextDev::Internal::Type::RequestParameters::Converter
7
7
  include ContextDev::Internal::Type::RequestParameters
8
8
 
9
9
  OrHash =
10
10
  T.type_alias do
11
11
  T.any(
12
- ContextDev::BrandWebScrapeSitemapParams,
12
+ ContextDev::WebWebScrapeSitemapParams,
13
13
  ContextDev::Internal::AnyHash
14
14
  )
15
15
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  module ContextDev
4
4
  module Models
5
- class BrandWebScrapeSitemapResponse < ContextDev::Internal::Type::BaseModel
5
+ class WebWebScrapeSitemapResponse < ContextDev::Internal::Type::BaseModel
6
6
  OrHash =
7
7
  T.type_alias do
8
8
  T.any(
9
- ContextDev::Models::BrandWebScrapeSitemapResponse,
9
+ ContextDev::Models::WebWebScrapeSitemapResponse,
10
10
  ContextDev::Internal::AnyHash
11
11
  )
12
12
  end
@@ -16,12 +16,12 @@ module ContextDev
16
16
  attr_accessor :domain
17
17
 
18
18
  # Metadata about the sitemap crawl operation
19
- sig { returns(ContextDev::Models::BrandWebScrapeSitemapResponse::Meta) }
19
+ sig { returns(ContextDev::Models::WebWebScrapeSitemapResponse::Meta) }
20
20
  attr_reader :meta
21
21
 
22
22
  sig do
23
23
  params(
24
- meta: ContextDev::Models::BrandWebScrapeSitemapResponse::Meta::OrHash
24
+ meta: ContextDev::Models::WebWebScrapeSitemapResponse::Meta::OrHash
25
25
  ).void
26
26
  end
27
27
  attr_writer :meta
@@ -29,7 +29,7 @@ module ContextDev
29
29
  # Indicates success
30
30
  sig do
31
31
  returns(
32
- ContextDev::Models::BrandWebScrapeSitemapResponse::Success::TaggedBoolean
32
+ ContextDev::Models::WebWebScrapeSitemapResponse::Success::TaggedBoolean
33
33
  )
34
34
  end
35
35
  attr_accessor :success
@@ -41,9 +41,9 @@ module ContextDev
41
41
  sig do
42
42
  params(
43
43
  domain: String,
44
- meta: ContextDev::Models::BrandWebScrapeSitemapResponse::Meta::OrHash,
44
+ meta: ContextDev::Models::WebWebScrapeSitemapResponse::Meta::OrHash,
45
45
  success:
46
- ContextDev::Models::BrandWebScrapeSitemapResponse::Success::OrBoolean,
46
+ ContextDev::Models::WebWebScrapeSitemapResponse::Success::OrBoolean,
47
47
  urls: T::Array[String]
48
48
  ).returns(T.attached_class)
49
49
  end
@@ -63,9 +63,9 @@ module ContextDev
63
63
  override.returns(
64
64
  {
65
65
  domain: String,
66
- meta: ContextDev::Models::BrandWebScrapeSitemapResponse::Meta,
66
+ meta: ContextDev::Models::WebWebScrapeSitemapResponse::Meta,
67
67
  success:
68
- ContextDev::Models::BrandWebScrapeSitemapResponse::Success::TaggedBoolean,
68
+ ContextDev::Models::WebWebScrapeSitemapResponse::Success::TaggedBoolean,
69
69
  urls: T::Array[String]
70
70
  }
71
71
  )
@@ -77,7 +77,7 @@ module ContextDev
77
77
  OrHash =
78
78
  T.type_alias do
79
79
  T.any(
80
- ContextDev::Models::BrandWebScrapeSitemapResponse::Meta,
80
+ ContextDev::Models::WebWebScrapeSitemapResponse::Meta,
81
81
  ContextDev::Internal::AnyHash
82
82
  )
83
83
  end
@@ -141,7 +141,7 @@ module ContextDev
141
141
  T.type_alias do
142
142
  T.all(
143
143
  T::Boolean,
144
- ContextDev::Models::BrandWebScrapeSitemapResponse::Success
144
+ ContextDev::Models::WebWebScrapeSitemapResponse::Success
145
145
  )
146
146
  end
147
147
  OrBoolean = T.type_alias { T::Boolean }
@@ -149,13 +149,13 @@ module ContextDev
149
149
  TRUE =
150
150
  T.let(
151
151
  true,
152
- ContextDev::Models::BrandWebScrapeSitemapResponse::Success::TaggedBoolean
152
+ ContextDev::Models::WebWebScrapeSitemapResponse::Success::TaggedBoolean
153
153
  )
154
154
 
155
155
  sig do
156
156
  override.returns(
157
157
  T::Array[
158
- ContextDev::Models::BrandWebScrapeSitemapResponse::Success::TaggedBoolean
158
+ ContextDev::Models::WebWebScrapeSitemapResponse::Success::TaggedBoolean
159
159
  ]
160
160
  )
161
161
  end
@@ -1,21 +1,15 @@
1
1
  # typed: strong
2
2
 
3
3
  module ContextDev
4
- BrandAIProductParams = ContextDev::Models::BrandAIProductParams
4
+ AIAIQueryParams = ContextDev::Models::AIAIQueryParams
5
5
 
6
- BrandAIProductsParams = ContextDev::Models::BrandAIProductsParams
6
+ AIExtractProductParams = ContextDev::Models::AIExtractProductParams
7
7
 
8
- BrandAIQueryParams = ContextDev::Models::BrandAIQueryParams
9
-
10
- BrandFontsParams = ContextDev::Models::BrandFontsParams
8
+ AIExtractProductsParams = ContextDev::Models::AIExtractProductsParams
11
9
 
12
10
  BrandIdentifyFromTransactionParams =
13
11
  ContextDev::Models::BrandIdentifyFromTransactionParams
14
12
 
15
- BrandPrefetchByEmailParams = ContextDev::Models::BrandPrefetchByEmailParams
16
-
17
- BrandPrefetchParams = ContextDev::Models::BrandPrefetchParams
18
-
19
13
  BrandRetrieveByEmailParams = ContextDev::Models::BrandRetrieveByEmailParams
20
14
 
21
15
  BrandRetrieveByIsinParams = ContextDev::Models::BrandRetrieveByIsinParams
@@ -24,22 +18,30 @@ module ContextDev
24
18
 
25
19
  BrandRetrieveByTickerParams = ContextDev::Models::BrandRetrieveByTickerParams
26
20
 
27
- BrandRetrieveNaicsParams = ContextDev::Models::BrandRetrieveNaicsParams
28
-
29
21
  BrandRetrieveParams = ContextDev::Models::BrandRetrieveParams
30
22
 
31
23
  BrandRetrieveSimplifiedParams =
32
24
  ContextDev::Models::BrandRetrieveSimplifiedParams
33
25
 
34
- BrandScreenshotParams = ContextDev::Models::BrandScreenshotParams
26
+ IndustryRetrieveNaicsParams = ContextDev::Models::IndustryRetrieveNaicsParams
27
+
28
+ StyleExtractFontsParams = ContextDev::Models::StyleExtractFontsParams
29
+
30
+ StyleExtractStyleguideParams =
31
+ ContextDev::Models::StyleExtractStyleguideParams
32
+
33
+ UtilityPrefetchByEmailParams =
34
+ ContextDev::Models::UtilityPrefetchByEmailParams
35
+
36
+ UtilityPrefetchParams = ContextDev::Models::UtilityPrefetchParams
35
37
 
36
- BrandStyleguideParams = ContextDev::Models::BrandStyleguideParams
38
+ WebScreenshotParams = ContextDev::Models::WebScreenshotParams
37
39
 
38
- BrandWebScrapeHTMLParams = ContextDev::Models::BrandWebScrapeHTMLParams
40
+ WebWebScrapeHTMLParams = ContextDev::Models::WebWebScrapeHTMLParams
39
41
 
40
- BrandWebScrapeImagesParams = ContextDev::Models::BrandWebScrapeImagesParams
42
+ WebWebScrapeImagesParams = ContextDev::Models::WebWebScrapeImagesParams
41
43
 
42
- BrandWebScrapeMdParams = ContextDev::Models::BrandWebScrapeMdParams
44
+ WebWebScrapeMdParams = ContextDev::Models::WebWebScrapeMdParams
43
45
 
44
- BrandWebScrapeSitemapParams = ContextDev::Models::BrandWebScrapeSitemapParams
46
+ WebWebScrapeSitemapParams = ContextDev::Models::WebWebScrapeSitemapParams
45
47
  end
@@ -0,0 +1,76 @@
1
+ # typed: strong
2
+
3
+ module ContextDev
4
+ module Resources
5
+ class AI
6
+ # Use AI to extract specific data points from a brand's website. The AI will crawl
7
+ # the website and extract the requested information based on the provided data
8
+ # points.
9
+ sig do
10
+ params(
11
+ data_to_extract:
12
+ T::Array[ContextDev::AIAIQueryParams::DataToExtract::OrHash],
13
+ domain: String,
14
+ specific_pages: ContextDev::AIAIQueryParams::SpecificPages::OrHash,
15
+ timeout_ms: Integer,
16
+ request_options: ContextDev::RequestOptions::OrHash
17
+ ).returns(ContextDev::Models::AIAIQueryResponse)
18
+ end
19
+ def ai_query(
20
+ # Array of data points to extract from the website
21
+ data_to_extract:,
22
+ # The domain name to analyze
23
+ domain:,
24
+ # Optional object specifying which pages to analyze
25
+ specific_pages: nil,
26
+ # Optional timeout in milliseconds for the request. If the request takes longer
27
+ # than this value, it will be aborted with a 408 status code. Maximum allowed
28
+ # value is 300000ms (5 minutes).
29
+ timeout_ms: nil,
30
+ request_options: {}
31
+ )
32
+ end
33
+
34
+ # Beta feature: Given a single URL, determines if it is a product detail page,
35
+ # classifies the platform/product type, and extracts the product information.
36
+ # Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites.
37
+ sig do
38
+ params(
39
+ url: String,
40
+ timeout_ms: Integer,
41
+ request_options: ContextDev::RequestOptions::OrHash
42
+ ).returns(ContextDev::Models::AIExtractProductResponse)
43
+ end
44
+ def extract_product(
45
+ # The product page URL to extract product data from.
46
+ url:,
47
+ # Optional timeout in milliseconds for the request. Maximum allowed value is
48
+ # 300000ms (5 minutes).
49
+ timeout_ms: nil,
50
+ request_options: {}
51
+ )
52
+ end
53
+
54
+ # Beta feature: Extract product information from a brand's website. Brand.dev will
55
+ # analyze the website and return a list of products with details such as name,
56
+ # description, image, pricing, features, and more.
57
+ sig do
58
+ params(
59
+ body:
60
+ T.any(
61
+ ContextDev::AIExtractProductsParams::Body::ByDomain::OrHash,
62
+ ContextDev::AIExtractProductsParams::Body::ByDirectURL::OrHash
63
+ ),
64
+ request_options: ContextDev::RequestOptions::OrHash
65
+ ).returns(ContextDev::Models::AIExtractProductsResponse)
66
+ end
67
+ def extract_products(body:, request_options: {})
68
+ end
69
+
70
+ # @api private
71
+ sig { params(client: ContextDev::Client).returns(T.attached_class) }
72
+ def self.new(client:)
73
+ end
74
+ end
75
+ end
76
+ end
@@ -34,91 +34,6 @@ module ContextDev
34
34
  )
35
35
  end
36
36
 
37
- # Beta feature: Given a single URL, determines if it is a product detail page,
38
- # classifies the platform/product type, and extracts the product information.
39
- # Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites.
40
- sig do
41
- params(
42
- url: String,
43
- timeout_ms: Integer,
44
- request_options: ContextDev::RequestOptions::OrHash
45
- ).returns(ContextDev::Models::BrandAIProductResponse)
46
- end
47
- def ai_product(
48
- # The product page URL to extract product data from.
49
- url:,
50
- # Optional timeout in milliseconds for the request. Maximum allowed value is
51
- # 300000ms (5 minutes).
52
- timeout_ms: nil,
53
- request_options: {}
54
- )
55
- end
56
-
57
- # Beta feature: Extract product information from a brand's website. Brand.dev will
58
- # analyze the website and return a list of products with details such as name,
59
- # description, image, pricing, features, and more.
60
- sig do
61
- params(
62
- body:
63
- T.any(
64
- ContextDev::BrandAIProductsParams::Body::ByDomain::OrHash,
65
- ContextDev::BrandAIProductsParams::Body::ByDirectURL::OrHash
66
- ),
67
- request_options: ContextDev::RequestOptions::OrHash
68
- ).returns(ContextDev::Models::BrandAIProductsResponse)
69
- end
70
- def ai_products(body:, request_options: {})
71
- end
72
-
73
- # Use AI to extract specific data points from a brand's website. The AI will crawl
74
- # the website and extract the requested information based on the provided data
75
- # points.
76
- sig do
77
- params(
78
- data_to_extract:
79
- T::Array[ContextDev::BrandAIQueryParams::DataToExtract::OrHash],
80
- domain: String,
81
- specific_pages: ContextDev::BrandAIQueryParams::SpecificPages::OrHash,
82
- timeout_ms: Integer,
83
- request_options: ContextDev::RequestOptions::OrHash
84
- ).returns(ContextDev::Models::BrandAIQueryResponse)
85
- end
86
- def ai_query(
87
- # Array of data points to extract from the website
88
- data_to_extract:,
89
- # The domain name to analyze
90
- domain:,
91
- # Optional object specifying which pages to analyze
92
- specific_pages: nil,
93
- # Optional timeout in milliseconds for the request. If the request takes longer
94
- # than this value, it will be aborted with a 408 status code. Maximum allowed
95
- # value is 300000ms (5 minutes).
96
- timeout_ms: nil,
97
- request_options: {}
98
- )
99
- end
100
-
101
- # Extract font information from a brand's website including font families, usage
102
- # statistics, fallbacks, and element/word counts.
103
- sig do
104
- params(
105
- domain: String,
106
- timeout_ms: Integer,
107
- request_options: ContextDev::RequestOptions::OrHash
108
- ).returns(ContextDev::Models::BrandFontsResponse)
109
- end
110
- def fonts(
111
- # Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
112
- # domain will be automatically normalized and validated.
113
- domain:,
114
- # Optional timeout in milliseconds for the request. If the request takes longer
115
- # than this value, it will be aborted with a 408 status code. Maximum allowed
116
- # value is 300000ms (5 minutes).
117
- timeout_ms: nil,
118
- request_options: {}
119
- )
120
- end
121
-
122
37
  # Endpoint specially designed for platforms that want to identify transaction data
123
38
  # by the transaction title.
124
39
  sig do
@@ -168,54 +83,6 @@ module ContextDev
168
83
  )
169
84
  end
170
85
 
171
- # Signal that you may fetch brand data for a particular domain soon to improve
172
- # latency. This endpoint does not charge credits and is available for paid
173
- # customers to optimize future requests. [You must be on a paid plan to use this
174
- # endpoint]
175
- sig do
176
- params(
177
- domain: String,
178
- timeout_ms: Integer,
179
- request_options: ContextDev::RequestOptions::OrHash
180
- ).returns(ContextDev::Models::BrandPrefetchResponse)
181
- end
182
- def prefetch(
183
- # Domain name to prefetch brand data for
184
- domain:,
185
- # Optional timeout in milliseconds for the request. If the request takes longer
186
- # than this value, it will be aborted with a 408 status code. Maximum allowed
187
- # value is 300000ms (5 minutes).
188
- timeout_ms: nil,
189
- request_options: {}
190
- )
191
- end
192
-
193
- # Signal that you may fetch brand data for a particular domain soon to improve
194
- # latency. This endpoint accepts an email address, extracts the domain from it,
195
- # validates that it's not a disposable or free email provider, and queues the
196
- # domain for prefetching. This endpoint does not charge credits and is available
197
- # for paid customers to optimize future requests. [You must be on a paid plan to
198
- # use this endpoint]
199
- sig do
200
- params(
201
- email: String,
202
- timeout_ms: Integer,
203
- request_options: ContextDev::RequestOptions::OrHash
204
- ).returns(ContextDev::Models::BrandPrefetchByEmailResponse)
205
- end
206
- def prefetch_by_email(
207
- # Email address to prefetch brand data for. The domain will be extracted from the
208
- # email. Free email providers (gmail.com, yahoo.com, etc.) and disposable email
209
- # addresses are not allowed.
210
- email:,
211
- # Optional timeout in milliseconds for the request. If the request takes longer
212
- # than this value, it will be aborted with a 408 status code. Maximum allowed
213
- # value is 300000ms (5 minutes).
214
- timeout_ms: nil,
215
- request_options: {}
216
- )
217
- end
218
-
219
86
  # Retrieve brand information using an email address while detecting disposable and
220
87
  # free email addresses. This endpoint extracts the domain from the email address
221
88
  # and returns brand data for that domain. Disposable and free email addresses
@@ -286,6 +153,8 @@ module ContextDev
286
153
  sig do
287
154
  params(
288
155
  name: String,
156
+ country_gl:
157
+ ContextDev::BrandRetrieveByNameParams::CountryGl::OrSymbol,
289
158
  force_language:
290
159
  ContextDev::BrandRetrieveByNameParams::ForceLanguage::OrSymbol,
291
160
  max_speed: T::Boolean,
@@ -297,6 +166,9 @@ module ContextDev
297
166
  # Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft
298
167
  # Corporation'). Must be 3-30 characters.
299
168
  name:,
169
+ # Optional country code (GL parameter) to specify the country. This affects the
170
+ # geographic location used for search queries.
171
+ country_gl: nil,
300
172
  # Optional parameter to force the language of the retrieved brand data.
301
173
  force_language: nil,
302
174
  # Optional parameter to optimize the API call for maximum speed. When set to true,
@@ -345,34 +217,6 @@ module ContextDev
345
217
  )
346
218
  end
347
219
 
348
- # Endpoint to classify any brand into a 2022 NAICS code.
349
- sig do
350
- params(
351
- input: String,
352
- max_results: Integer,
353
- min_results: Integer,
354
- timeout_ms: Integer,
355
- request_options: ContextDev::RequestOptions::OrHash
356
- ).returns(ContextDev::Models::BrandRetrieveNaicsResponse)
357
- end
358
- def retrieve_naics(
359
- # Brand domain or title to retrieve NAICS code for. If a valid domain is provided
360
- # in `input`, it will be used for classification, otherwise, we will search for
361
- # the brand using the provided title.
362
- input:,
363
- # Maximum number of NAICS codes to return. Must be between 1 and 10. Defaults
364
- # to 5.
365
- max_results: nil,
366
- # Minimum number of NAICS codes to return. Must be at least 1. Defaults to 1.
367
- min_results: nil,
368
- # Optional timeout in milliseconds for the request. If the request takes longer
369
- # than this value, it will be aborted with a 408 status code. Maximum allowed
370
- # value is 300000ms (5 minutes).
371
- timeout_ms: nil,
372
- request_options: {}
373
- )
374
- end
375
-
376
220
  # Returns a simplified version of brand data containing only essential
377
221
  # information: domain, title, colors, logos, and backdrops. This endpoint is
378
222
  # optimized for faster responses and reduced data transfer.
@@ -394,148 +238,6 @@ module ContextDev
394
238
  )
395
239
  end
396
240
 
397
- # Capture a screenshot of a website. Supports both viewport (standard browser
398
- # view) and full-page screenshots. Can also screenshot specific page types (login,
399
- # pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to
400
- # the uploaded screenshot image hosted on our CDN.
401
- sig do
402
- params(
403
- domain: String,
404
- full_screenshot:
405
- ContextDev::BrandScreenshotParams::FullScreenshot::OrSymbol,
406
- page: ContextDev::BrandScreenshotParams::Page::OrSymbol,
407
- prioritize: ContextDev::BrandScreenshotParams::Prioritize::OrSymbol,
408
- request_options: ContextDev::RequestOptions::OrHash
409
- ).returns(ContextDev::Models::BrandScreenshotResponse)
410
- end
411
- def screenshot(
412
- # Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
413
- # domain will be automatically normalized and validated.
414
- domain:,
415
- # Optional parameter to determine screenshot type. If 'true', takes a full page
416
- # screenshot capturing all content. If 'false' or not provided, takes a viewport
417
- # screenshot (standard browser view).
418
- full_screenshot: nil,
419
- # Optional parameter to specify which page type to screenshot. If provided, the
420
- # system will scrape the domain's links and use heuristics to find the most
421
- # appropriate URL for the specified page type (30 supported languages). If not
422
- # provided, screenshots the main domain landing page.
423
- page: nil,
424
- # Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
425
- # faster capture with basic quality. If 'quality', optimizes for higher quality
426
- # with longer wait times. Defaults to 'quality' if not provided.
427
- prioritize: nil,
428
- request_options: {}
429
- )
430
- end
431
-
432
- # Automatically extract comprehensive design system information from a brand's
433
- # website including colors, typography, spacing, shadows, and UI components.
434
- # Either 'domain' or 'directUrl' must be provided as a query parameter, but not
435
- # both.
436
- sig do
437
- params(
438
- direct_url: String,
439
- domain: String,
440
- prioritize: ContextDev::BrandStyleguideParams::Prioritize::OrSymbol,
441
- timeout_ms: Integer,
442
- request_options: ContextDev::RequestOptions::OrHash
443
- ).returns(ContextDev::Models::BrandStyleguideResponse)
444
- end
445
- def styleguide(
446
- # A specific URL to fetch the styleguide from directly, bypassing domain
447
- # resolution (e.g., 'https://example.com/design-system').
448
- direct_url: nil,
449
- # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
450
- # domain will be automatically normalized and validated.
451
- domain: nil,
452
- # Optional parameter to prioritize screenshot capture for styleguide extraction.
453
- # If 'speed', optimizes for faster capture with basic quality. If 'quality',
454
- # optimizes for higher quality with longer wait times. Defaults to 'quality' if
455
- # not provided.
456
- prioritize: nil,
457
- # Optional timeout in milliseconds for the request. If the request takes longer
458
- # than this value, it will be aborted with a 408 status code. Maximum allowed
459
- # value is 300000ms (5 minutes).
460
- timeout_ms: nil,
461
- request_options: {}
462
- )
463
- end
464
-
465
- # Scrapes the given URL and returns the raw HTML content of the page. Uses
466
- # automatic proxy escalation to handle blocked sites.
467
- sig do
468
- params(
469
- url: String,
470
- request_options: ContextDev::RequestOptions::OrHash
471
- ).returns(ContextDev::Models::BrandWebScrapeHTMLResponse)
472
- end
473
- def web_scrape_html(
474
- # Full URL to scrape (must include http:// or https:// protocol)
475
- url:,
476
- request_options: {}
477
- )
478
- end
479
-
480
- # Scrapes all images from the given URL. Extracts images from img, svg,
481
- # picture/source, link, and video elements including inline SVGs, base64 data
482
- # URIs, and standard URLs.
483
- sig do
484
- params(
485
- url: String,
486
- request_options: ContextDev::RequestOptions::OrHash
487
- ).returns(ContextDev::Models::BrandWebScrapeImagesResponse)
488
- end
489
- def web_scrape_images(
490
- # Full URL to scrape images from (must include http:// or https:// protocol)
491
- url:,
492
- request_options: {}
493
- )
494
- end
495
-
496
- # Scrapes the given URL, converts the HTML content to GitHub Flavored Markdown
497
- # (GFM), and returns the result. Uses automatic proxy escalation to handle blocked
498
- # sites.
499
- sig do
500
- params(
501
- url: String,
502
- include_images: T::Boolean,
503
- include_links: T::Boolean,
504
- shorten_base64_images: T::Boolean,
505
- request_options: ContextDev::RequestOptions::OrHash
506
- ).returns(ContextDev::Models::BrandWebScrapeMdResponse)
507
- end
508
- def web_scrape_md(
509
- # Full URL to scrape and convert to markdown (must include http:// or https://
510
- # protocol)
511
- url:,
512
- # Include image references in Markdown output
513
- include_images: nil,
514
- # Preserve hyperlinks in Markdown output
515
- include_links: nil,
516
- # Shorten base64-encoded image data in the Markdown output
517
- shorten_base64_images: nil,
518
- request_options: {}
519
- )
520
- end
521
-
522
- # Crawls the sitemap of the given domain and returns all discovered page URLs.
523
- # Supports sitemap index files (recursive), parallel fetching with concurrency
524
- # control, deduplication, and filters out non-page resources (images, PDFs, etc.).
525
- sig do
526
- params(
527
- domain: String,
528
- request_options: ContextDev::RequestOptions::OrHash
529
- ).returns(ContextDev::Models::BrandWebScrapeSitemapResponse)
530
- end
531
- def web_scrape_sitemap(
532
- # Domain name to crawl sitemaps for (e.g., 'example.com'). The domain will be
533
- # automatically normalized and validated.
534
- domain:,
535
- request_options: {}
536
- )
537
- end
538
-
539
241
  # @api private
540
242
  sig { params(client: ContextDev::Client).returns(T.attached_class) }
541
243
  def self.new(client:)