Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.8.0"
".": "2.9.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 38
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-155e4761d62255841349c0f8a01b0a9c463ea1d1f2d6c4fd8d1a75c8bef6f226.yml
openapi_spec_hash: ab91f77e7c9d992400cbc7fc8a9e76c1
config_hash: bff282047fafdad771fb7ec685f56944
configured_endpoints: 40
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-a0dda03bbb600917cfb9add468cc4c8c84351a8dbbf61644dbc353263ca1748f.yml
openapi_spec_hash: c24264f32a46d9317aac5af9d6a396f7
config_hash: 920678668dd2da6f8966fbf1b8fde4e2
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 2.9.0 (2026-08-07)

Full Changelog: [v2.8.0...v2.9.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.8.0...v2.9.0)

### Features

* **api:** api update ([ea29f67](https://github.com/context-dot-dev/context-ruby-sdk/commit/ea29f67042bd6fd9b987d7ad4ad9f8993a871653))
* **api:** api update ([e7c64e4](https://github.com/context-dot-dev/context-ruby-sdk/commit/e7c64e4540db4cc313d70cebe5409739b052e567))
* **api:** api update ([975de89](https://github.com/context-dot-dev/context-ruby-sdk/commit/975de893c9145f20f541a443730d7d99f575a313))
* **api:** api update ([a1f13c2](https://github.com/context-dot-dev/context-ruby-sdk/commit/a1f13c2244b0ac81a58c350e6cba79875e0c4bf1))
* **api:** api update ([e7cfd87](https://github.com/context-dot-dev/context-ruby-sdk/commit/e7cfd87ff2e163f572cc33ee4b6af5be79811d03))
* **api:** api update ([c827408](https://github.com/context-dot-dev/context-ruby-sdk/commit/c8274088947813e1090d6232190b5333c025696a))
* **api:** api update ([5c09f03](https://github.com/context-dot-dev/context-ruby-sdk/commit/5c09f03dd90cda2cad388ac2605d6cadebf0e137))
* **api:** manual updates ([cf2f79f](https://github.com/context-dot-dev/context-ruby-sdk/commit/cf2f79ff77dca3e57069cfac612e7fd333a8d83f))

## 2.8.0 (2026-08-05)

Full Changelog: [v2.7.0...v2.8.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.7.0...v2.8.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
context.dev (2.8.0)
context.dev (2.9.0)
cgi
connection_pool

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "context.dev", "~> 2.8.0"
gem "context.dev", "~> 2.9.0"
```

<!-- x-release-please-end -->
Expand Down
5 changes: 5 additions & 0 deletions lib/context_dev.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
require_relative "context_dev/models/ai_extract_products_response"
require_relative "context_dev/models/batch_cancel_params"
require_relative "context_dev/models/batch_cancel_response"
require_relative "context_dev/models/batch_delete_params"
require_relative "context_dev/models/batch_delete_response"
require_relative "context_dev/models/batch_get_results_params"
require_relative "context_dev/models/batch_get_results_response"
require_relative "context_dev/models/batch_list_params"
Expand Down Expand Up @@ -108,6 +110,8 @@
require_relative "context_dev/models/page_error_count"
require_relative "context_dev/models/parse_handle_params"
require_relative "context_dev/models/parse_handle_response"
require_relative "context_dev/models/person_enrich_params"
require_relative "context_dev/models/person_enrich_response"
require_relative "context_dev/models/utility_prefetch_params"
require_relative "context_dev/models/utility_prefetch_response"
require_relative "context_dev/models/web_extract_competitors_params"
Expand Down Expand Up @@ -140,5 +144,6 @@
require_relative "context_dev/resources/industry"
require_relative "context_dev/resources/monitors"
require_relative "context_dev/resources/parse"
require_relative "context_dev/resources/people"
require_relative "context_dev/resources/utility"
require_relative "context_dev/resources/web"
5 changes: 5 additions & 0 deletions lib/context_dev/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ class Client < ContextDev::Internal::Transport::BaseClient
# @return [ContextDev::Resources::Monitors]
attr_reader :monitors

# Scrape many pages or crawl a site asynchronously.
# @return [ContextDev::Resources::Batch]
attr_reader :batch

# @return [ContextDev::Resources::People]
attr_reader :people

# @api private
#
# @return [Hash{String=>String}]
Expand Down Expand Up @@ -115,6 +119,7 @@ def initialize(
@utility = ContextDev::Resources::Utility.new(client: self)
@monitors = ContextDev::Resources::Monitors.new(client: self)
@batch = ContextDev::Resources::Batch.new(client: self)
@people = ContextDev::Resources::People.new(client: self)
end
end
end
4 changes: 4 additions & 0 deletions lib/context_dev/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ module ContextDev

BatchCancelParams = ContextDev::Models::BatchCancelParams

BatchDeleteParams = ContextDev::Models::BatchDeleteParams

BatchGetResultsParams = ContextDev::Models::BatchGetResultsParams

BatchListParams = ContextDev::Models::BatchListParams
Expand Down Expand Up @@ -99,6 +101,8 @@ module ContextDev

ParseHandleParams = ContextDev::Models::ParseHandleParams

PersonEnrichParams = ContextDev::Models::PersonEnrichParams

UtilityPrefetchParams = ContextDev::Models::UtilityPrefetchParams

WebExtractCompetitorsParams = ContextDev::Models::WebExtractCompetitorsParams
Expand Down
22 changes: 22 additions & 0 deletions lib/context_dev/models/batch_delete_params.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true

module ContextDev
module Models
# @see ContextDev::Resources::Batch#delete
class BatchDeleteParams < ContextDev::Internal::Type::BaseModel
extend ContextDev::Internal::Type::RequestParameters::Converter
include ContextDev::Internal::Type::RequestParameters

# @!attribute batch_id
# ID of the batch to retrieve or cancel.
#
# @return [String]
required :batch_id, String

# @!method initialize(batch_id:, request_options: {})
# @param batch_id [String] ID of the batch to retrieve or cancel.
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
end
end
end
60 changes: 60 additions & 0 deletions lib/context_dev/models/batch_delete_response.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# frozen_string_literal: true

module ContextDev
module Models
# @see ContextDev::Resources::Batch#delete
class BatchDeleteResponse < ContextDev::Internal::Type::BaseModel
# @!attribute id
# ID of the deleted batch.
#
# @return [String, nil]
optional :id, String

# @!attribute deleted
# Always true on success.
#
# @return [Boolean, nil]
optional :deleted, ContextDev::Internal::Type::Boolean

# @!attribute key_metadata
# Metadata about the API key used for the request. Included in every response
# whenever a valid API key is provided, even when the response status is not 200.
#
# @return [ContextDev::Models::BatchDeleteResponse::KeyMetadata, nil]
optional :key_metadata, -> { ContextDev::Models::BatchDeleteResponse::KeyMetadata }

# @!method initialize(id: nil, deleted: nil, key_metadata: nil)
# Some parameter documentations has been truncated, see
# {ContextDev::Models::BatchDeleteResponse} for more details.
#
# @param id [String] ID of the deleted batch.
#
# @param deleted [Boolean] Always true on success.
#
# @param key_metadata [ContextDev::Models::BatchDeleteResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when

# @see ContextDev::Models::BatchDeleteResponse#key_metadata
class KeyMetadata < ContextDev::Internal::Type::BaseModel
# @!attribute credits_consumed
# The number of credits consumed by this request.
#
# @return [Integer]
required :credits_consumed, Integer

# @!attribute credits_remaining
# The number of credits remaining for your organization after this request.
#
# @return [Integer]
required :credits_remaining, Integer

# @!method initialize(credits_consumed:, credits_remaining:)
# Metadata about the API key used for the request. Included in every response
# whenever a valid API key is provided, even when the response status is not 200.
#
# @param credits_consumed [Integer] The number of credits consumed by this request.
#
# @param credits_remaining [Integer] The number of credits remaining for your organization after this request.
end
end
end
end
14 changes: 13 additions & 1 deletion lib/context_dev/models/batch_get_results_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,17 @@ class Ok < ContextDev::Internal::Type::BaseModel
# @return [Hash{Symbol=>Object}, nil]
optional :meta, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]

# @!method initialize(final_url:, http_status:, metadata:, url:, html: nil, item_id: nil, markdown: nil, meta: nil, status: :ok)
# @!attribute ocr_pages
# PDF pages of this document recovered by OCR (pdf.ocr=true). Each recovered page
# bills 1 credit on top of the page base credit; absent when no OCR ran.
#
# @return [Integer, nil]
optional :ocr_pages, Integer

# @!method initialize(final_url:, http_status:, metadata:, url:, html: nil, item_id: nil, markdown: nil, meta: nil, ocr_pages: nil, status: :ok)
# Some parameter documentations has been truncated, see
# {ContextDev::Models::BatchGetResultsResponse::Data::Ok} for more details.
#
# A page the batch fetched successfully.
#
# @param final_url [String] URL the content was read from, after redirects.
Expand All @@ -128,6 +138,8 @@ class Ok < ContextDev::Internal::Type::BaseModel
#
# @param meta [Hash{Symbol=>Object}] Caller-supplied metadata echoed from submission.
#
# @param ocr_pages [Integer] PDF pages of this document recovered by OCR (pdf.ocr=true). Each recovered page
#
# @param status [Symbol, :ok] The page was scraped.

# @see ContextDev::Models::BatchGetResultsResponse::Data::Ok#metadata
Expand Down
17 changes: 13 additions & 4 deletions lib/context_dev/models/batch_list_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,19 @@ class Data < ContextDev::Internal::Type::BaseModel
# @see ContextDev::Models::BatchListResponse::Data#credits
class Credits < ContextDev::Internal::Type::BaseModel
# @!attribute net
# `reserved` minus `refunded` — what the batch has cost so far. Equal to
# `reserved` until the batch settles.
# `reserved` minus `refunded` plus `ocr_charged` — what the batch has cost so far.
# Equal to `reserved` until the batch settles.
#
# @return [Integer]
required :net, Integer

# @!attribute ocr_charged
# Credits charged for PDF pages recovered by OCR (pdf.ocr=true), 1 per recovered
# page, on top of `reserved`. Stays 0 until the batch settles.
#
# @return [Integer]
required :ocr_charged, Integer

# @!attribute refunded
# Credits returned for pages that did not succeed. Stays 0 until the batch reaches
# a final status, then settles in one movement.
Expand All @@ -180,13 +187,15 @@ class Credits < ContextDev::Internal::Type::BaseModel
# @return [Integer]
required :reserved, Integer

# @!method initialize(net:, refunded:, reserved:)
# @!method initialize(net:, ocr_charged:, refunded:, reserved:)
# Some parameter documentations has been truncated, see
# {ContextDev::Models::BatchListResponse::Data::Credits} for more details.
#
# What this batch has done to your credit balance.
#
# @param net [Integer] `reserved` minus `refunded` — what the batch has cost so far. Equal to `reserved
# @param net [Integer] `reserved` minus `refunded` plus `ocr_charged` — what the batch has cost so far.
#
# @param ocr_charged [Integer] Credits charged for PDF pages recovered by OCR (pdf.ocr=true), 1 per recovered p
#
# @param refunded [Integer] Credits returned for pages that did not succeed. Stays 0 until the batch reaches
#
Expand Down
17 changes: 13 additions & 4 deletions lib/context_dev/models/batch_retrieve_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,19 @@ class BatchRetrieveResponse < ContextDev::Internal::Type::BaseModel
# @see ContextDev::Models::BatchRetrieveResponse#credits
class Credits < ContextDev::Internal::Type::BaseModel
# @!attribute net
# `reserved` minus `refunded` — what the batch has cost so far. Equal to
# `reserved` until the batch settles.
# `reserved` minus `refunded` plus `ocr_charged` — what the batch has cost so far.
# Equal to `reserved` until the batch settles.
#
# @return [Integer]
required :net, Integer

# @!attribute ocr_charged
# Credits charged for PDF pages recovered by OCR (pdf.ocr=true), 1 per recovered
# page, on top of `reserved`. Stays 0 until the batch settles.
#
# @return [Integer]
required :ocr_charged, Integer

# @!attribute refunded
# Credits returned for pages that did not succeed. Stays 0 until the batch reaches
# a final status, then settles in one movement.
Expand All @@ -157,13 +164,15 @@ class Credits < ContextDev::Internal::Type::BaseModel
# @return [Integer]
required :reserved, Integer

# @!method initialize(net:, refunded:, reserved:)
# @!method initialize(net:, ocr_charged:, refunded:, reserved:)
# Some parameter documentations has been truncated, see
# {ContextDev::Models::BatchRetrieveResponse::Credits} for more details.
#
# What this batch has done to your credit balance.
#
# @param net [Integer] `reserved` minus `refunded` — what the batch has cost so far. Equal to `reserved
# @param net [Integer] `reserved` minus `refunded` plus `ocr_charged` — what the batch has cost so far.
#
# @param ocr_charged [Integer] Credits charged for PDF pages recovered by OCR (pdf.ocr=true), 1 per recovered p
#
# @param refunded [Integer] Credits returned for pages that did not succeed. Stays 0 until the batch reaches
#
Expand Down
Loading