context.dev 1.4.0 → 1.5.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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/client.rb +0 -4
  5. data/lib/context_dev/internal/type/base_model.rb +3 -3
  6. data/lib/context_dev/models/brand_identify_from_transaction_params.rb +0 -1
  7. data/lib/context_dev/models/brand_retrieve_by_name_params.rb +5 -5
  8. data/lib/context_dev/models/industry_retrieve_naics_params.rb +4 -4
  9. data/lib/context_dev/models/{style_extract_fonts_params.rb → web_extract_fonts_params.rb} +18 -7
  10. data/lib/context_dev/models/{style_extract_fonts_response.rb → web_extract_fonts_response.rb} +5 -5
  11. data/lib/context_dev/models/{style_extract_styleguide_params.rb → web_extract_styleguide_params.rb} +8 -5
  12. data/lib/context_dev/models/{style_extract_styleguide_response.rb → web_extract_styleguide_response.rb} +147 -80
  13. data/lib/context_dev/models/web_screenshot_params.rb +3 -2
  14. data/lib/context_dev/models/web_web_scrape_html_params.rb +14 -1
  15. data/lib/context_dev/models/web_web_scrape_md_params.rb +13 -3
  16. data/lib/context_dev/models/web_web_scrape_sitemap_params.rb +2 -3
  17. data/lib/context_dev/models.rb +4 -4
  18. data/lib/context_dev/resources/brand.rb +8 -12
  19. data/lib/context_dev/resources/industry.rb +3 -3
  20. data/lib/context_dev/resources/web.rb +80 -18
  21. data/lib/context_dev/version.rb +1 -1
  22. data/lib/context_dev.rb +4 -5
  23. data/rbi/context_dev/client.rbi +0 -3
  24. data/rbi/context_dev/models/brand_identify_from_transaction_params.rbi +0 -2
  25. data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +6 -6
  26. data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +6 -6
  27. data/rbi/context_dev/models/{style_extract_fonts_params.rbi → web_extract_fonts_params.rbi} +27 -7
  28. data/rbi/context_dev/models/{style_extract_fonts_response.rbi → web_extract_fonts_response.rbi} +6 -9
  29. data/rbi/context_dev/models/{style_extract_styleguide_params.rbi → web_extract_styleguide_params.rbi} +12 -6
  30. data/rbi/context_dev/models/{style_extract_styleguide_response.rbi → web_extract_styleguide_response.rbi} +232 -94
  31. data/rbi/context_dev/models/web_screenshot_params.rbi +6 -4
  32. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +19 -1
  33. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +17 -2
  34. data/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +2 -4
  35. data/rbi/context_dev/models.rbi +4 -5
  36. data/rbi/context_dev/resources/brand.rbi +9 -14
  37. data/rbi/context_dev/resources/industry.rbi +4 -4
  38. data/rbi/context_dev/resources/web.rbi +74 -17
  39. data/sig/context_dev/client.rbs +0 -2
  40. data/sig/context_dev/models/{style_extract_styleguide_params.rbs → web_extract_fonts_params.rbs} +2 -2
  41. data/sig/context_dev/models/{style_extract_fonts_response.rbs → web_extract_fonts_response.rbs} +6 -6
  42. data/sig/context_dev/models/{style_extract_fonts_params.rbs → web_extract_styleguide_params.rbs} +13 -5
  43. data/sig/context_dev/models/{style_extract_styleguide_response.rbs → web_extract_styleguide_response.rbs} +147 -95
  44. data/sig/context_dev/models/web_web_scrape_html_params.rbs +8 -1
  45. data/sig/context_dev/models/web_web_scrape_md_params.rbs +7 -0
  46. data/sig/context_dev/models.rbs +4 -4
  47. data/sig/context_dev/resources/web.rbs +16 -0
  48. metadata +14 -17
  49. data/lib/context_dev/resources/style.rb +0 -76
  50. data/rbi/context_dev/resources/style.rbi +0 -60
  51. data/sig/context_dev/resources/style.rbs +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3705a281e34eef9ffc4463edc521cba0709ca05b66b031d283dce7c4da01907e
4
- data.tar.gz: 870005e686eb6fdbbf727a414fc14fc9664617c475055f77dea9fee1039a9f70
3
+ metadata.gz: 3f1e1d592ab2aa15df4461bc35f04e15efa1b44be4b88d19089042a707ee48c9
4
+ data.tar.gz: 7c2386bf4040b419009b3a68a366ff3d6a044116b71590d2036dfe69df4c24de
5
5
  SHA512:
6
- metadata.gz: f655d93e67d82677bfe70b853f21589e32b9b7075c07c44aab8d34a31419a0e0cfa914d5d17d30fea53b195c6aa2b16550c406cbb7506c51223ee6ff25b74505
7
- data.tar.gz: c5bfd49bb0bde0f49e64036e236fe0ea94e4847c3ced34c12dd762c0b5c57b8e4e94f0e08a63fbb87a97e2c71aef5c745075cf15788515c4f2ab557b0722f4f6
6
+ metadata.gz: 701c64ee8193b73126b354a672c698f41e240d49c96885f0aef670b7ef78e4bad4ad59a21b1ed3d43f16b4a84911ae8931519c09b3702c03c7ec3e86c85a0ca8
7
+ data.tar.gz: 74cc296a2d2d6d9a09a3105dc09813fca9de9ea5d98b193ab002fc07bd5cf169019897bff847fdb4291ccb0f4bbdddfd741256489642b42a317ade298e3f2dcd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.5.0 (2026-04-19)
4
+
5
+ Full Changelog: [v1.4.0...v1.5.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.4.0...v1.5.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([30ef99f](https://github.com/context-dot-dev/context-ruby-sdk/commit/30ef99f9a0d61f6528aed16b080f376753b3447a))
10
+ * **api:** api update ([c9851eb](https://github.com/context-dot-dev/context-ruby-sdk/commit/c9851ebc0618d7433ed88f7062902fcec575b229))
11
+ * **api:** api update ([55529f6](https://github.com/context-dot-dev/context-ruby-sdk/commit/55529f63e23cf255645bdb2d0420bf24aaba28b1))
12
+ * **api:** api update ([51320a5](https://github.com/context-dot-dev/context-ruby-sdk/commit/51320a5677298ab231dc417ef3c54d6a75e640ba))
13
+ * **api:** api update ([5a69904](https://github.com/context-dot-dev/context-ruby-sdk/commit/5a69904d89cc873614e8320308eecac9304992d2))
14
+ * **api:** api update ([7d186fa](https://github.com/context-dot-dev/context-ruby-sdk/commit/7d186faf849e20bcd958beb5f46b71f6440b8358))
15
+ * **api:** api update ([2d439b9](https://github.com/context-dot-dev/context-ruby-sdk/commit/2d439b9814f0e3be9efead3d2e70e3e5d7e3a1f0))
16
+ * **api:** api update ([8b33b1e](https://github.com/context-dot-dev/context-ruby-sdk/commit/8b33b1ee26acc8314d9c285ea53e3531ba390a16))
17
+ * **api:** api update ([7b5ddec](https://github.com/context-dot-dev/context-ruby-sdk/commit/7b5ddec0b8e306df34a72ccd39e8d731168a62ea))
18
+ * **api:** api update ([b09024f](https://github.com/context-dot-dev/context-ruby-sdk/commit/b09024fa19c7aecafaf4fe4bd211bfc3738484ed))
19
+ * **api:** api update ([4e74fe3](https://github.com/context-dot-dev/context-ruby-sdk/commit/4e74fe3f395778efb1ca3f1e752f2f71e21a3191))
20
+ * **api:** manual updates ([f451afe](https://github.com/context-dot-dev/context-ruby-sdk/commit/f451afea50625bba49a808a4b193c451c7019571))
21
+ * **api:** manual updates ([11ea49f](https://github.com/context-dot-dev/context-ruby-sdk/commit/11ea49fac95ca680db1f9880b8b8590aa650b00a))
22
+ * **api:** manual updates ([739b99f](https://github.com/context-dot-dev/context-ruby-sdk/commit/739b99fddcd745960b3cf390cc9bff4220941ee8))
23
+ * **api:** manual updates ([d32eb69](https://github.com/context-dot-dev/context-ruby-sdk/commit/d32eb69f2bafb655156587bfb2daa659dcc3b731))
24
+
3
25
  ## 1.4.0 (2026-04-09)
4
26
 
5
27
  Full Changelog: [v1.3.0...v1.4.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.3.0...v1.4.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "context.dev", "~> 1.4.0"
29
+ gem "context.dev", "~> 1.5.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -24,9 +24,6 @@ module ContextDev
24
24
  # @return [ContextDev::Resources::AI]
25
25
  attr_reader :ai
26
26
 
27
- # @return [ContextDev::Resources::Style]
28
- attr_reader :style
29
-
30
27
  # @return [ContextDev::Resources::Brand]
31
28
  attr_reader :brand
32
29
 
@@ -85,7 +82,6 @@ module ContextDev
85
82
 
86
83
  @web = ContextDev::Resources::Web.new(client: self)
87
84
  @ai = ContextDev::Resources::AI.new(client: self)
88
- @style = ContextDev::Resources::Style.new(client: self)
89
85
  @brand = ContextDev::Resources::Brand.new(client: self)
90
86
  @industry = ContextDev::Resources::Industry.new(client: self)
91
87
  @utility = ContextDev::Resources::Utility.new(client: self)
@@ -438,11 +438,11 @@ module ContextDev
438
438
  # @return [Hash{Symbol=>Object}]
439
439
  #
440
440
  # @example
441
- # # `web_screenshot_response` is a `ContextDev::Models::WebScreenshotResponse`
442
- # web_screenshot_response => {
441
+ # # `web_extract_fonts_response` is a `ContextDev::Models::WebExtractFontsResponse`
442
+ # web_extract_fonts_response => {
443
443
  # code: code,
444
444
  # domain: domain,
445
- # screenshot: screenshot
445
+ # fonts: fonts
446
446
  # }
447
447
  def deconstruct_keys(keys)
448
448
  (keys || self.class.known_fields.keys)
@@ -35,7 +35,6 @@ module ContextDev
35
35
  # @!attribute high_confidence_only
36
36
  # When set to true, the API will perform an additional verification steps to
37
37
  # ensure the identified brand matches the transaction with high confidence.
38
- # Defaults to false.
39
38
  #
40
39
  # @return [Boolean, nil]
41
40
  optional :high_confidence_only, ContextDev::Internal::Type::Boolean
@@ -15,8 +15,8 @@ module ContextDev
15
15
  required :name, String
16
16
 
17
17
  # @!attribute country_gl
18
- # Optional country code (GL parameter) to specify the country. This affects the
19
- # geographic location used for search queries.
18
+ # Optional country code hint (GL parameter) to specify the country for the company
19
+ # name.
20
20
  #
21
21
  # @return [Symbol, ContextDev::Models::BrandRetrieveByNameParams::CountryGl, nil]
22
22
  optional :country_gl, enum: -> { ContextDev::BrandRetrieveByNameParams::CountryGl }
@@ -49,7 +49,7 @@ module ContextDev
49
49
  #
50
50
  # @param name [String] Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft Corporati
51
51
  #
52
- # @param country_gl [Symbol, ContextDev::Models::BrandRetrieveByNameParams::CountryGl] Optional country code (GL parameter) to specify the country. This affects the ge
52
+ # @param country_gl [Symbol, ContextDev::Models::BrandRetrieveByNameParams::CountryGl] Optional country code hint (GL parameter) to specify the country for the company
53
53
  #
54
54
  # @param force_language [Symbol, ContextDev::Models::BrandRetrieveByNameParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
55
55
  #
@@ -59,8 +59,8 @@ module ContextDev
59
59
  #
60
60
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
61
61
 
62
- # Optional country code (GL parameter) to specify the country. This affects the
63
- # geographic location used for search queries.
62
+ # Optional country code hint (GL parameter) to specify the country for the company
63
+ # name.
64
64
  module CountryGl
65
65
  extend ContextDev::Internal::Type::Enum
66
66
 
@@ -8,9 +8,9 @@ module ContextDev
8
8
  include ContextDev::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute input
11
- # Brand domain or title to retrieve NAICS code for. If a valid domain is provided
12
- # in `input`, it will be used for classification, otherwise, we will search for
13
- # the brand using the provided title.
11
+ # Brand domain or title to retrieve NAICS code for. If a valid domain is provided,
12
+ # it will be used for classification, otherwise, we will search for the brand
13
+ # using the provided title.
14
14
  #
15
15
  # @return [String]
16
16
  required :input, String
@@ -40,7 +40,7 @@ module ContextDev
40
40
  # Some parameter documentations has been truncated, see
41
41
  # {ContextDev::Models::IndustryRetrieveNaicsParams} for more details.
42
42
  #
43
- # @param input [String] Brand domain or title to retrieve NAICS code for. If a valid domain is provided
43
+ # @param input [String] Brand domain or title to retrieve NAICS code for. If a valid domain is provided,
44
44
  #
45
45
  # @param max_results [Integer] Maximum number of NAICS codes to return. Must be between 1 and 10. Defaults to 5
46
46
  #
@@ -2,17 +2,26 @@
2
2
 
3
3
  module ContextDev
4
4
  module Models
5
- # @see ContextDev::Resources::Style#extract_fonts
6
- class StyleExtractFontsParams < ContextDev::Internal::Type::BaseModel
5
+ # @see ContextDev::Resources::Web#extract_fonts
6
+ class WebExtractFontsParams < ContextDev::Internal::Type::BaseModel
7
7
  extend ContextDev::Internal::Type::RequestParameters::Converter
8
8
  include ContextDev::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute direct_url
11
+ # A specific URL to fetch fonts from directly, bypassing domain resolution (e.g.,
12
+ # 'https://example.com/design-system'). When provided, fonts are extracted from
13
+ # this exact URL. You must provide either 'domain' or 'directUrl', but not both.
14
+ #
15
+ # @return [String, nil]
16
+ optional :direct_url, String
17
+
10
18
  # @!attribute domain
11
19
  # Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
12
- # domain will be automatically normalized and validated.
20
+ # domain will be automatically normalized and validated. You must provide either
21
+ # 'domain' or 'directUrl', but not both.
13
22
  #
14
- # @return [String]
15
- required :domain, String
23
+ # @return [String, nil]
24
+ optional :domain, String
16
25
 
17
26
  # @!attribute timeout_ms
18
27
  # Optional timeout in milliseconds for the request. If the request takes longer
@@ -22,9 +31,11 @@ module ContextDev
22
31
  # @return [Integer, nil]
23
32
  optional :timeout_ms, Integer
24
33
 
25
- # @!method initialize(domain:, timeout_ms: nil, request_options: {})
34
+ # @!method initialize(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {})
26
35
  # Some parameter documentations has been truncated, see
27
- # {ContextDev::Models::StyleExtractFontsParams} for more details.
36
+ # {ContextDev::Models::WebExtractFontsParams} for more details.
37
+ #
38
+ # @param direct_url [String] A specific URL to fetch fonts from directly, bypassing domain resolution (e.g.,
28
39
  #
29
40
  # @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai
30
41
  #
@@ -2,8 +2,8 @@
2
2
 
3
3
  module ContextDev
4
4
  module Models
5
- # @see ContextDev::Resources::Style#extract_fonts
6
- class StyleExtractFontsResponse < ContextDev::Internal::Type::BaseModel
5
+ # @see ContextDev::Resources::Web#extract_fonts
6
+ class WebExtractFontsResponse < ContextDev::Internal::Type::BaseModel
7
7
  # @!attribute code
8
8
  # HTTP status code, e.g., 200
9
9
  #
@@ -19,9 +19,9 @@ module ContextDev
19
19
  # @!attribute fonts
20
20
  # Array of font usage information
21
21
  #
22
- # @return [Array<ContextDev::Models::StyleExtractFontsResponse::Font>]
22
+ # @return [Array<ContextDev::Models::WebExtractFontsResponse::Font>]
23
23
  required :fonts,
24
- -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::StyleExtractFontsResponse::Font] }
24
+ -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::WebExtractFontsResponse::Font] }
25
25
 
26
26
  # @!attribute status
27
27
  # Status of the response, e.g., 'ok'
@@ -34,7 +34,7 @@ module ContextDev
34
34
  #
35
35
  # @param domain [String] The normalized domain that was processed
36
36
  #
37
- # @param fonts [Array<ContextDev::Models::StyleExtractFontsResponse::Font>] Array of font usage information
37
+ # @param fonts [Array<ContextDev::Models::WebExtractFontsResponse::Font>] Array of font usage information
38
38
  #
39
39
  # @param status [String] Status of the response, e.g., 'ok'
40
40
 
@@ -2,21 +2,24 @@
2
2
 
3
3
  module ContextDev
4
4
  module Models
5
- # @see ContextDev::Resources::Style#extract_styleguide
6
- class StyleExtractStyleguideParams < ContextDev::Internal::Type::BaseModel
5
+ # @see ContextDev::Resources::Web#extract_styleguide
6
+ class WebExtractStyleguideParams < ContextDev::Internal::Type::BaseModel
7
7
  extend ContextDev::Internal::Type::RequestParameters::Converter
8
8
  include ContextDev::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute direct_url
11
11
  # A specific URL to fetch the styleguide from directly, bypassing domain
12
- # resolution (e.g., 'https://example.com/design-system').
12
+ # resolution (e.g., 'https://example.com/design-system'). When provided, the
13
+ # styleguide is extracted from this exact URL. You must provide either 'domain' or
14
+ # 'directUrl', but not both.
13
15
  #
14
16
  # @return [String, nil]
15
17
  optional :direct_url, String
16
18
 
17
19
  # @!attribute domain
18
20
  # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
19
- # domain will be automatically normalized and validated.
21
+ # domain will be automatically normalized and validated. You must provide either
22
+ # 'domain' or 'directUrl', but not both.
20
23
  #
21
24
  # @return [String, nil]
22
25
  optional :domain, String
@@ -31,7 +34,7 @@ module ContextDev
31
34
 
32
35
  # @!method initialize(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {})
33
36
  # Some parameter documentations has been truncated, see
34
- # {ContextDev::Models::StyleExtractStyleguideParams} for more details.
37
+ # {ContextDev::Models::WebExtractStyleguideParams} for more details.
35
38
  #
36
39
  # @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio
37
40
  #