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 @@
{
".": "1.28.0"
".": "1.29.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 25
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-9575a58bf027da9ca006bf34d9e24850ef2bbc6de0459b9fff6f26cf62e1d82d.yml
openapi_spec_hash: e68a98dbc0e29b45c42b3517eb554e6c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-de0ba2ed18ec7265b0b20d9639b3da207dd33e354f0a856091902291c6661830.yml
openapi_spec_hash: ae25efc2ac6bcab54bc3f4efaab73a55
config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.29.0 (2026-06-07)

Full Changelog: [v1.28.0...v1.29.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.28.0...v1.29.0)

### Features

* **api:** api update ([9aa6127](https://github.com/context-dot-dev/context-ruby-sdk/commit/9aa6127b563032655648c3c24fe9564616ebe3f1))

## 1.28.0 (2026-06-06)

Full Changelog: [v1.27.0...v1.28.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.27.0...v1.28.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 (1.28.0)
context.dev (1.29.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", "~> 1.28.0"
gem "context.dev", "~> 1.29.0"
```

<!-- x-release-please-end -->
Expand Down
40 changes: 37 additions & 3 deletions lib/context_dev/models/web_web_scrape_html_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ module Models
# @see ContextDev::Resources::Web#web_scrape_html
class WebWebScrapeHTMLResponse < ContextDev::Internal::Type::BaseModel
# @!attribute html
# Raw HTML content of the page
# The scraped content of the page. For normal pages this is the raw HTML. When the
# page is a sitemap or feed served behind an XSL stylesheet (which browsers render
# into HTML), this is the underlying XML instead — see the `type` field.
#
# @return [String]
required :html, String
Expand All @@ -16,17 +18,29 @@ class WebWebScrapeHTMLResponse < ContextDev::Internal::Type::BaseModel
# @return [Boolean, ContextDev::Models::WebWebScrapeHTMLResponse::Success]
required :success, enum: -> { ContextDev::Models::WebWebScrapeHTMLResponse::Success }

# @!attribute type
# Detected content type of the returned `html` field. Sitemaps and feeds are
# surfaced as `xml`; ordinary pages are `html`.
#
# @return [Symbol, ContextDev::Models::WebWebScrapeHTMLResponse::Type]
required :type, enum: -> { ContextDev::Models::WebWebScrapeHTMLResponse::Type }

# @!attribute url
# The URL that was scraped
#
# @return [String]
required :url, String

# @!method initialize(html:, success:, url:)
# @param html [String] Raw HTML content of the page
# @!method initialize(html:, success:, type:, url:)
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebWebScrapeHTMLResponse} for more details.
#
# @param html [String] The scraped content of the page. For normal pages this is the raw HTML. When the
#
# @param success [Boolean, ContextDev::Models::WebWebScrapeHTMLResponse::Success] Indicates success
#
# @param type [Symbol, ContextDev::Models::WebWebScrapeHTMLResponse::Type] Detected content type of the returned `html` field. Sitemaps and feeds are surfa
#
# @param url [String] The URL that was scraped

# Indicates success
Expand All @@ -40,6 +54,26 @@ module Success
# @!method self.values
# @return [Array<Boolean>]
end

# Detected content type of the returned `html` field. Sitemaps and feeds are
# surfaced as `xml`; ordinary pages are `html`.
#
# @see ContextDev::Models::WebWebScrapeHTMLResponse#type
module Type
extend ContextDev::Internal::Type::Enum

HTML = :html
XML = :xml
JSON = :json
TEXT = :text
CSV = :csv
MARKDOWN = :markdown
SVG = :svg
PDF = :pdf

# @!method self.values
# @return [Array<Symbol>]
end
end
end
end
2 changes: 1 addition & 1 deletion lib/context_dev/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ContextDev
VERSION = "1.28.0"
VERSION = "1.29.0"
end
86 changes: 84 additions & 2 deletions rbi/context_dev/models/web_web_scrape_html_response.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ module ContextDev
)
end

# Raw HTML content of the page
# The scraped content of the page. For normal pages this is the raw HTML. When the
# page is a sitemap or feed served behind an XSL stylesheet (which browsers render
# into HTML), this is the underlying XML instead — see the `type` field.
sig { returns(String) }
attr_accessor :html

Expand All @@ -23,6 +25,15 @@ module ContextDev
end
attr_accessor :success

# Detected content type of the returned `html` field. Sitemaps and feeds are
# surfaced as `xml`; ordinary pages are `html`.
sig do
returns(
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
)
end
attr_accessor :type

# The URL that was scraped
sig { returns(String) }
attr_accessor :url
Expand All @@ -32,14 +43,20 @@ module ContextDev
html: String,
success:
ContextDev::Models::WebWebScrapeHTMLResponse::Success::OrBoolean,
type: ContextDev::Models::WebWebScrapeHTMLResponse::Type::OrSymbol,
url: String
).returns(T.attached_class)
end
def self.new(
# Raw HTML content of the page
# The scraped content of the page. For normal pages this is the raw HTML. When the
# page is a sitemap or feed served behind an XSL stylesheet (which browsers render
# into HTML), this is the underlying XML instead — see the `type` field.
html:,
# Indicates success
success:,
# Detected content type of the returned `html` field. Sitemaps and feeds are
# surfaced as `xml`; ordinary pages are `html`.
type:,
# The URL that was scraped
url:
)
Expand All @@ -51,6 +68,8 @@ module ContextDev
html: String,
success:
ContextDev::Models::WebWebScrapeHTMLResponse::Success::TaggedBoolean,
type:
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol,
url: String
}
)
Expand Down Expand Up @@ -87,6 +106,69 @@ module ContextDev
def self.values
end
end

# Detected content type of the returned `html` field. Sitemaps and feeds are
# surfaced as `xml`; ordinary pages are `html`.
module Type
extend ContextDev::Internal::Type::Enum

TaggedSymbol =
T.type_alias do
T.all(Symbol, ContextDev::Models::WebWebScrapeHTMLResponse::Type)
end
OrSymbol = T.type_alias { T.any(Symbol, String) }

HTML =
T.let(
:html,
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
)
XML =
T.let(
:xml,
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
)
JSON =
T.let(
:json,
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
)
TEXT =
T.let(
:text,
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
)
CSV =
T.let(
:csv,
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
)
MARKDOWN =
T.let(
:markdown,
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
)
SVG =
T.let(
:svg,
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
)
PDF =
T.let(
:pdf,
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
)

sig do
override.returns(
T::Array[
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol
]
)
end
def self.values
end
end
end
end
end
22 changes: 22 additions & 0 deletions sig/context_dev/models/web_web_scrape_html_response.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module ContextDev
{
html: String,
success: ContextDev::Models::WebWebScrapeHTMLResponse::success,
type: ContextDev::Models::WebWebScrapeHTMLResponse::type_,
url: String
}

Expand All @@ -12,17 +13,21 @@ module ContextDev

attr_accessor success: ContextDev::Models::WebWebScrapeHTMLResponse::success

attr_accessor type: ContextDev::Models::WebWebScrapeHTMLResponse::type_

attr_accessor url: String

def initialize: (
html: String,
success: ContextDev::Models::WebWebScrapeHTMLResponse::success,
type: ContextDev::Models::WebWebScrapeHTMLResponse::type_,
url: String
) -> void

def to_hash: -> {
html: String,
success: ContextDev::Models::WebWebScrapeHTMLResponse::success,
type: ContextDev::Models::WebWebScrapeHTMLResponse::type_,
url: String
}

Expand All @@ -35,6 +40,23 @@ module ContextDev

def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeHTMLResponse::success]
end

type type_ = :html | :xml | :json | :text | :csv | :markdown | :svg | :pdf

module Type
extend ContextDev::Internal::Type::Enum

HTML: :html
XML: :xml
JSON: :json
TEXT: :text
CSV: :csv
MARKDOWN: :markdown
SVG: :svg
PDF: :pdf

def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeHTMLResponse::type_]
end
end
end
end
1 change: 1 addition & 0 deletions test/context_dev/resources/web_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def test_web_scrape_html_required_params
response => {
html: String,
success: ContextDev::Models::WebWebScrapeHTMLResponse::Success,
type: ContextDev::Models::WebWebScrapeHTMLResponse::Type,
url: String
}
end
Expand Down
Loading