context.dev 2.22.0 → 2.23.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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/models/batch_list_params.rb +21 -4
  5. data/lib/context_dev/models/batch_submit_params.rb +32 -40
  6. data/lib/context_dev/models/brand_retrieve_params.rb +599 -14
  7. data/lib/context_dev/models/parse_handle_params.rb +5 -5
  8. data/lib/context_dev/models/web_scrape_params.rb +8 -8
  9. data/lib/context_dev/models/web_scrape_response.rb +2 -2
  10. data/lib/context_dev/models/web_search_params.rb +15 -13
  11. data/lib/context_dev/models/web_web_crawl_md_params.rb +21 -15
  12. data/lib/context_dev/resources/batch.rb +1 -1
  13. data/lib/context_dev/resources/logs.rb +2 -2
  14. data/lib/context_dev/resources/web.rb +7 -7
  15. data/lib/context_dev/version.rb +1 -1
  16. data/rbi/context_dev/models/batch_list_params.rbi +30 -6
  17. data/rbi/context_dev/models/batch_submit_params.rbi +36 -48
  18. data/rbi/context_dev/models/brand_retrieve_params.rbi +4515 -1649
  19. data/rbi/context_dev/models/parse_handle_params.rbi +6 -6
  20. data/rbi/context_dev/models/web_scrape_params.rbi +11 -11
  21. data/rbi/context_dev/models/web_scrape_response.rbi +2 -2
  22. data/rbi/context_dev/models/web_search_params.rbi +20 -23
  23. data/rbi/context_dev/models/web_web_crawl_md_params.rbi +20 -32
  24. data/rbi/context_dev/resources/batch.rbi +3 -2
  25. data/rbi/context_dev/resources/web.rbi +7 -7
  26. data/sig/context_dev/models/batch_list_params.rbs +17 -5
  27. data/sig/context_dev/models/brand_retrieve_params.rbs +1148 -15
  28. data/sig/context_dev/models/web_scrape_params.rbs +5 -5
  29. data/sig/context_dev/models/web_search_params.rbs +16 -28
  30. data/sig/context_dev/models/web_web_crawl_md_params.rbs +16 -24
  31. data/sig/context_dev/resources/batch.rbs +1 -1
  32. data/sig/context_dev/resources/web.rbs +6 -6
  33. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ccb5b760add7b469b5b7c31e28f5fbbeed36d43da665b4621200a7d4480a031
4
- data.tar.gz: a12d36d177df270279744f67f3c5842fa9816e0f31c2928c8f8336098df00d67
3
+ metadata.gz: dd58b48caa6c53db343977dbe38ace6c9295425d5ff80abeeb739b447b7d54e2
4
+ data.tar.gz: fb06ad88a0ac1d5ae1b04720cd2c9c925bec789b65caf2e7ff06e03817ce819f
5
5
  SHA512:
6
- metadata.gz: e3540a099629f125ed338f5d9db1c07220915c28b1d2991fdf2f45db5785bbd107bcc98c773eed02f738753b58fcd5bde43f28b1da1ff02cc02459b9e9bf9098
7
- data.tar.gz: 23ff10f563f2ea4862bd4aa410aaf22d87209d94135c66d33f781d0d249fc03fda088612b0becad5d38ec2653b4bf6307498e4bd4101be01060d67d70139ab32
6
+ metadata.gz: 1aa3d970abebbe41658fd6124d5068fceae94e4cdabf85783b5d8238ac3b06fa9fa3cd5ea6ea0243bae28ef7fa543d42c35c5e604102db4c9d71f338f321164f
7
+ data.tar.gz: d55d39e6c7a1c86c77c5f50ba3bff3d50ca45a906ffbfcc4af85c2ddad3c80c23ff54352ca1e3028bf7182a81c537eb61cad4b2afc19f78653e710465a2eeca1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.23.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.22.0...v2.23.0) (2026-09-30)
4
+
5
+
6
+ ### Features
7
+
8
+ * **logs:** serve request logs at /org/logs ([#1442](https://github.com/context-dot-dev/context-ruby-sdk/issues/1442)) ([c5093d3](https://github.com/context-dot-dev/context-ruby-sdk/commit/c5093d3ab3a75b169d477ed38d0130c6f4bf0b3d))
9
+ * **scrape:** accept documents up to 50 MB ([#1436](https://github.com/context-dot-dev/context-ruby-sdk/issues/1436)) ([7382a7a](https://github.com/context-dot-dev/context-ruby-sdk/commit/7382a7a256e353c9ab7e0d2a6cf12fb225bf4cbd))
10
+ * **scrape:** add productParams.dedupeImages, always run product AI fallback ([#1423](https://github.com/context-dot-dev/context-ruby-sdk/issues/1423)) ([83b2be2](https://github.com/context-dot-dev/context-ruby-sdk/commit/83b2be23f9a00eafc933c8791ed373ada3460455))
11
+ * **scrape:** default POST /web/scrape deadline to 90s ([#1428](https://github.com/context-dot-dev/context-ruby-sdk/issues/1428)) ([adacc1a](https://github.com/context-dot-dev/context-ruby-sdk/commit/adacc1a247f8146d1cba9c234c60ff7f8830513b))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **api:** derive OpenAPI request docs from runtime Zod schemas ([#1421](https://github.com/context-dot-dev/context-ruby-sdk/issues/1421)) ([4f3308e](https://github.com/context-dot-dev/context-ruby-sdk/commit/4f3308e35c4a1bec06fc28ad759ef25a6617f163))
17
+
3
18
  ## [2.22.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.21.0...v2.22.0) (2026-09-29)
4
19
 
5
20
 
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "context.dev", "~> 2.22.0"
20
+ gem "context.dev", "~> 2.23.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -40,10 +40,11 @@ module ContextDev
40
40
  optional :status, enum: -> { ContextDev::BatchListParams::Status }
41
41
 
42
42
  # @!attribute tags
43
- # Comma-separated list of tags to filter by (matches batches having any of them).
43
+ # Tags to filter by (matches batches having any of them). Pass repeated `tags`
44
+ # params or one comma-separated list, e.g. `tags=docs,competitor`.
44
45
  #
45
- # @return [String, nil]
46
- optional :tags, String
46
+ # @return [String, Array<String>, nil]
47
+ optional :tags, union: -> { ContextDev::BatchListParams::Tags }
47
48
 
48
49
  # @!method initialize(cursor: nil, limit: nil, q: nil, search_type: nil, status: nil, tags: nil, request_options: {})
49
50
  # Some parameter documentations has been truncated, see
@@ -59,7 +60,7 @@ module ContextDev
59
60
  #
60
61
  # @param status [Symbol, ContextDev::Models::BatchListParams::Status] Filter by status.
61
62
  #
62
- # @param tags [String] Comma-separated list of tags to filter by (matches batches having any of them).
63
+ # @param tags [String, Array<String>] Tags to filter by (matches batches having any of them). Pass repeated `tags` par
63
64
  #
64
65
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
65
66
 
@@ -89,6 +90,22 @@ module ContextDev
89
90
  # @!method self.values
90
91
  # @return [Array<Symbol>]
91
92
  end
93
+
94
+ # Tags to filter by (matches batches having any of them). Pass repeated `tags`
95
+ # params or one comma-separated list, e.g. `tags=docs,competitor`.
96
+ module Tags
97
+ extend ContextDev::Internal::Type::Union
98
+
99
+ variant String
100
+
101
+ variant -> { ContextDev::Models::BatchListParams::Tags::StringArray }
102
+
103
+ # @!method self.variants
104
+ # @return [Array(String, Array<String>)]
105
+
106
+ # @type [ContextDev::Internal::Type::Converter]
107
+ StringArray = ContextDev::Internal::Type::ArrayOf[String]
108
+ end
92
109
  end
93
110
  end
94
111
  end
@@ -220,8 +220,7 @@ module ContextDev
220
220
  optional :max_age_ms, Integer, api_name: :maxAgeMs, nil?: true
221
221
 
222
222
  # @!attribute pdf
223
- # PDF parsing controls. Use start/end to limit text extraction and embedded-image
224
- # detection/OCR to an inclusive 1-based page range.
223
+ # PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
225
224
  #
226
225
  # @return [ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown::Options::Pdf, nil]
227
226
  optional :pdf, -> { ContextDev::BatchSubmitParams::Input::Scrape::Data::Markdown::Options::Pdf }
@@ -275,7 +274,7 @@ module ContextDev
275
274
  #
276
275
  # @param max_age_ms [Integer, nil] Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1
277
276
  #
278
- # @param pdf [ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown::Options::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image
277
+ # @param pdf [ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown::Options::Pdf] PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
279
278
  #
280
279
  # @param settle_animations [Boolean] Wait for CSS animations to finish before extracting, on browser-rendered pages.
281
280
  #
@@ -503,8 +502,8 @@ module ContextDev
503
502
  # @see ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown::Options#pdf
504
503
  class Pdf < ContextDev::Internal::Type::BaseModel
505
504
  # @!attribute end_
506
- # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
507
- # Must be greater than or equal to start when both are provided.
505
+ # Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must
506
+ # be >= start.
508
507
  #
509
508
  # @return [Integer, nil]
510
509
  optional :end_, Integer, api_name: :end
@@ -522,7 +521,7 @@ module ContextDev
522
521
  optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
523
522
 
524
523
  # @!attribute start
525
- # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
524
+ # First 1-based PDF page to parse.
526
525
  #
527
526
  # @return [Integer, nil]
528
527
  optional :start, Integer
@@ -532,16 +531,15 @@ module ContextDev
532
531
  # {ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown::Options::Pdf}
533
532
  # for more details.
534
533
  #
535
- # PDF parsing controls. Use start/end to limit text extraction and embedded-image
536
- # detection/OCR to an inclusive 1-based page range.
534
+ # PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
537
535
  #
538
- # @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
536
+ # @param end_ [Integer] Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must be
539
537
  #
540
538
  # @param ocr [Boolean] Read scanned PDF pages with OCR; preserve pages that already have text.
541
539
  #
542
540
  # @param should_parse [Boolean] Parse PDF URLs. When false, PDFs fail with `PDF_SKIPPED`.
543
541
  #
544
- # @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
542
+ # @param start [Integer] First 1-based PDF page to parse.
545
543
  end
546
544
  end
547
545
  end
@@ -645,8 +643,7 @@ module ContextDev
645
643
  optional :max_age_ms, Integer, api_name: :maxAgeMs, nil?: true
646
644
 
647
645
  # @!attribute pdf
648
- # PDF parsing controls. Use start/end to limit text extraction and embedded-image
649
- # detection/OCR to an inclusive 1-based page range.
646
+ # PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
650
647
  #
651
648
  # @return [ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Pdf, nil]
652
649
  optional :pdf, -> { ContextDev::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Pdf }
@@ -686,7 +683,7 @@ module ContextDev
686
683
  #
687
684
  # @param max_age_ms [Integer, nil] Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1
688
685
  #
689
- # @param pdf [ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image
686
+ # @param pdf [ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Pdf] PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
690
687
  #
691
688
  # @param settle_animations [Boolean] Wait for CSS animations to finish before extracting, on browser-rendered pages.
692
689
  #
@@ -912,8 +909,8 @@ module ContextDev
912
909
  # @see ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options#pdf
913
910
  class Pdf < ContextDev::Internal::Type::BaseModel
914
911
  # @!attribute end_
915
- # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
916
- # Must be greater than or equal to start when both are provided.
912
+ # Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must
913
+ # be >= start.
917
914
  #
918
915
  # @return [Integer, nil]
919
916
  optional :end_, Integer, api_name: :end
@@ -931,7 +928,7 @@ module ContextDev
931
928
  optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
932
929
 
933
930
  # @!attribute start
934
- # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
931
+ # First 1-based PDF page to parse.
935
932
  #
936
933
  # @return [Integer, nil]
937
934
  optional :start, Integer
@@ -941,16 +938,15 @@ module ContextDev
941
938
  # {ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Pdf}
942
939
  # for more details.
943
940
  #
944
- # PDF parsing controls. Use start/end to limit text extraction and embedded-image
945
- # detection/OCR to an inclusive 1-based page range.
941
+ # PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
946
942
  #
947
- # @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
943
+ # @param end_ [Integer] Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must be
948
944
  #
949
945
  # @param ocr [Boolean] Read scanned PDF pages with OCR; preserve pages that already have text.
950
946
  #
951
947
  # @param should_parse [Boolean] Parse PDF URLs. When false, PDFs fail with `PDF_SKIPPED`.
952
948
  #
953
- # @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
949
+ # @param start [Integer] First 1-based PDF page to parse.
954
950
  end
955
951
  end
956
952
  end
@@ -1225,8 +1221,7 @@ module ContextDev
1225
1221
  optional :max_age_ms, Integer, api_name: :maxAgeMs, nil?: true
1226
1222
 
1227
1223
  # @!attribute pdf
1228
- # PDF parsing controls. Use start/end to limit text extraction and embedded-image
1229
- # detection/OCR to an inclusive 1-based page range.
1224
+ # PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
1230
1225
  #
1231
1226
  # @return [ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::Markdown::Options::Pdf, nil]
1232
1227
  optional :pdf, -> { ContextDev::BatchSubmitParams::Input::Crawl::Data::Markdown::Options::Pdf }
@@ -1280,7 +1275,7 @@ module ContextDev
1280
1275
  #
1281
1276
  # @param max_age_ms [Integer, nil] Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1
1282
1277
  #
1283
- # @param pdf [ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::Markdown::Options::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image
1278
+ # @param pdf [ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::Markdown::Options::Pdf] PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
1284
1279
  #
1285
1280
  # @param settle_animations [Boolean] Wait for CSS animations to finish before extracting, on browser-rendered pages.
1286
1281
  #
@@ -1508,8 +1503,8 @@ module ContextDev
1508
1503
  # @see ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::Markdown::Options#pdf
1509
1504
  class Pdf < ContextDev::Internal::Type::BaseModel
1510
1505
  # @!attribute end_
1511
- # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
1512
- # Must be greater than or equal to start when both are provided.
1506
+ # Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must
1507
+ # be >= start.
1513
1508
  #
1514
1509
  # @return [Integer, nil]
1515
1510
  optional :end_, Integer, api_name: :end
@@ -1527,7 +1522,7 @@ module ContextDev
1527
1522
  optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
1528
1523
 
1529
1524
  # @!attribute start
1530
- # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
1525
+ # First 1-based PDF page to parse.
1531
1526
  #
1532
1527
  # @return [Integer, nil]
1533
1528
  optional :start, Integer
@@ -1537,16 +1532,15 @@ module ContextDev
1537
1532
  # {ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::Markdown::Options::Pdf}
1538
1533
  # for more details.
1539
1534
  #
1540
- # PDF parsing controls. Use start/end to limit text extraction and embedded-image
1541
- # detection/OCR to an inclusive 1-based page range.
1535
+ # PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
1542
1536
  #
1543
- # @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
1537
+ # @param end_ [Integer] Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must be
1544
1538
  #
1545
1539
  # @param ocr [Boolean] Read scanned PDF pages with OCR; preserve pages that already have text.
1546
1540
  #
1547
1541
  # @param should_parse [Boolean] Parse PDF URLs. When false, PDFs fail with `PDF_SKIPPED`.
1548
1542
  #
1549
- # @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
1543
+ # @param start [Integer] First 1-based PDF page to parse.
1550
1544
  end
1551
1545
  end
1552
1546
  end
@@ -1763,8 +1757,7 @@ module ContextDev
1763
1757
  optional :max_age_ms, Integer, api_name: :maxAgeMs, nil?: true
1764
1758
 
1765
1759
  # @!attribute pdf
1766
- # PDF parsing controls. Use start/end to limit text extraction and embedded-image
1767
- # detection/OCR to an inclusive 1-based page range.
1760
+ # PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
1768
1761
  #
1769
1762
  # @return [ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::HTML::Options::Pdf, nil]
1770
1763
  optional :pdf, -> { ContextDev::BatchSubmitParams::Input::Crawl::Data::HTML::Options::Pdf }
@@ -1804,7 +1797,7 @@ module ContextDev
1804
1797
  #
1805
1798
  # @param max_age_ms [Integer, nil] Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1
1806
1799
  #
1807
- # @param pdf [ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::HTML::Options::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image
1800
+ # @param pdf [ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::HTML::Options::Pdf] PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
1808
1801
  #
1809
1802
  # @param settle_animations [Boolean] Wait for CSS animations to finish before extracting, on browser-rendered pages.
1810
1803
  #
@@ -2030,8 +2023,8 @@ module ContextDev
2030
2023
  # @see ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::HTML::Options#pdf
2031
2024
  class Pdf < ContextDev::Internal::Type::BaseModel
2032
2025
  # @!attribute end_
2033
- # Last 1-based PDF page to parse. When omitted, parsing ends at the last page.
2034
- # Must be greater than or equal to start when both are provided.
2026
+ # Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must
2027
+ # be >= start.
2035
2028
  #
2036
2029
  # @return [Integer, nil]
2037
2030
  optional :end_, Integer, api_name: :end
@@ -2049,7 +2042,7 @@ module ContextDev
2049
2042
  optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
2050
2043
 
2051
2044
  # @!attribute start
2052
- # First 1-based PDF page to parse. When omitted, parsing starts at the first page.
2045
+ # First 1-based PDF page to parse.
2053
2046
  #
2054
2047
  # @return [Integer, nil]
2055
2048
  optional :start, Integer
@@ -2059,16 +2052,15 @@ module ContextDev
2059
2052
  # {ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::HTML::Options::Pdf}
2060
2053
  # for more details.
2061
2054
  #
2062
- # PDF parsing controls. Use start/end to limit text extraction and embedded-image
2063
- # detection/OCR to an inclusive 1-based page range.
2055
+ # PDF handling. `start`/`end` limit parsing to an inclusive, 1-based page range.
2064
2056
  #
2065
- # @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
2057
+ # @param end_ [Integer] Last PDF page to parse (1-based, inclusive). Defaults to the final page. Must be
2066
2058
  #
2067
2059
  # @param ocr [Boolean] Read scanned PDF pages with OCR; preserve pages that already have text.
2068
2060
  #
2069
2061
  # @param should_parse [Boolean] Parse PDF URLs. When false, PDFs fail with `PDF_SKIPPED`.
2070
2062
  #
2071
- # @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
2063
+ # @param start [Integer] First 1-based PDF page to parse.
2072
2064
  end
2073
2065
  end
2074
2066
  end