diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0c2ecec..86b0e83 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.20.0" + ".": "0.21.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index ddc345a..496a47a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-f27c9584f74632a8c9603fce7190e3f63275a4ec4030da2a9475efb619618b3f.yml -openapi_spec_hash: 224cb935536a4d999d9683f8c03ea32f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-e8d4199dcf2a97bcd0858e18db7feb3bb4f5a64c9c2d0ee0105636d28c35227d.yml +openapi_spec_hash: 8e825842065c24f11fd3f51fdd705337 config_hash: ff13935d1231ad44cd3822ffe39904b4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a18db5..36d9c6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.21.0 (2026-05-11) + +Full Changelog: [v0.20.0...v0.21.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.20.0...v0.21.0) + +### Features + +* **api:** api update ([3758473](https://github.com/context-dot-dev/context-python-sdk/commit/3758473b755cd5624e8cdcdc63e30075f3b3860c)) +* **api:** api update ([d41b2b0](https://github.com/context-dot-dev/context-python-sdk/commit/d41b2b0e278d2c2b6a0d04e4890c2b5f0f518560)) + ## 0.20.0 (2026-05-10) Full Changelog: [v0.19.0...v0.20.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.19.0...v0.20.0) diff --git a/pyproject.toml b/pyproject.toml index e15bab8..062ab46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "context.dev" -version = "0.20.0" +version = "0.21.0" description = "The official Python library for the context.dev API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/context/dev/_version.py b/src/context/dev/_version.py index eccf38e..fe7f28d 100644 --- a/src/context/dev/_version.py +++ b/src/context/dev/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "context.dev" -__version__ = "0.20.0" # x-release-please-version +__version__ = "0.21.0" # x-release-please-version diff --git a/src/context/dev/resources/web.py b/src/context/dev/resources/web.py index f98ed51..61b54bb 100644 --- a/src/context/dev/resources/web.py +++ b/src/context/dev/resources/web.py @@ -180,6 +180,7 @@ def screenshot( direct_url: str | Omit = omit, domain: str | Omit = omit, full_screenshot: Literal["true", "false"] | Omit = omit, + handle_cookie_popup: Literal["true", "false"] | Omit = omit, max_age_ms: int | Omit = omit, page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"] | Omit = omit, timeout_ms: int | Omit = omit, @@ -208,6 +209,10 @@ def screenshot( screenshot capturing all content. If 'false' or not provided, takes a viewport screenshot (standard browser view). + handle_cookie_popup: Optional parameter to control cookie/consent popup handling. If 'true', we + dismiss cookie banner before capture. If 'false' or not provided, captures the + page without that step. + max_age_ms: Return a cached screenshot if a prior screenshot for the same parameters exists and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh. @@ -248,6 +253,7 @@ def screenshot( "direct_url": direct_url, "domain": domain, "full_screenshot": full_screenshot, + "handle_cookie_popup": handle_cookie_popup, "max_age_ms": max_age_ms, "page": page, "timeout_ms": timeout_ms, @@ -790,6 +796,7 @@ async def screenshot( direct_url: str | Omit = omit, domain: str | Omit = omit, full_screenshot: Literal["true", "false"] | Omit = omit, + handle_cookie_popup: Literal["true", "false"] | Omit = omit, max_age_ms: int | Omit = omit, page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"] | Omit = omit, timeout_ms: int | Omit = omit, @@ -818,6 +825,10 @@ async def screenshot( screenshot capturing all content. If 'false' or not provided, takes a viewport screenshot (standard browser view). + handle_cookie_popup: Optional parameter to control cookie/consent popup handling. If 'true', we + dismiss cookie banner before capture. If 'false' or not provided, captures the + page without that step. + max_age_ms: Return a cached screenshot if a prior screenshot for the same parameters exists and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh. @@ -858,6 +869,7 @@ async def screenshot( "direct_url": direct_url, "domain": domain, "full_screenshot": full_screenshot, + "handle_cookie_popup": handle_cookie_popup, "max_age_ms": max_age_ms, "page": page, "timeout_ms": timeout_ms, diff --git a/src/context/dev/types/web_screenshot_params.py b/src/context/dev/types/web_screenshot_params.py index 04b0909..a282def 100644 --- a/src/context/dev/types/web_screenshot_params.py +++ b/src/context/dev/types/web_screenshot_params.py @@ -31,6 +31,13 @@ class WebScreenshotParams(TypedDict, total=False): provided, takes a viewport screenshot (standard browser view). """ + handle_cookie_popup: Annotated[Literal["true", "false"], PropertyInfo(alias="handleCookiePopup")] + """Optional parameter to control cookie/consent popup handling. + + If 'true', we dismiss cookie banner before capture. If 'false' or not provided, + captures the page without that step. + """ + max_age_ms: Annotated[int, PropertyInfo(alias="maxAgeMs")] """ Return a cached screenshot if a prior screenshot for the same parameters exists diff --git a/tests/api_resources/test_web.py b/tests/api_resources/test_web.py index 5c31c7f..51f2720 100644 --- a/tests/api_resources/test_web.py +++ b/tests/api_resources/test_web.py @@ -115,6 +115,7 @@ def test_method_screenshot_with_all_params(self, client: ContextDev) -> None: direct_url="https://example.com", domain="domain", full_screenshot="true", + handle_cookie_popup="true", max_age_ms=0, page="login", timeout_ms=1000, @@ -505,6 +506,7 @@ async def test_method_screenshot_with_all_params(self, async_client: AsyncContex direct_url="https://example.com", domain="domain", full_screenshot="true", + handle_cookie_popup="true", max_age_ms=0, page="login", timeout_ms=1000,