From d41b2b0e278d2c2b6a0d04e4890c2b5f0f518560 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 01:43:12 +0000 Subject: [PATCH 1/3] feat(api): api update --- .stats.yml | 4 ++-- src/context/dev/resources/web.py | 14 ++++++++++++++ src/context/dev/types/web_screenshot_params.py | 8 ++++++++ tests/api_resources/test_web.py | 2 ++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ddc345a..9df4f18 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-9cbf61fcc1963e0a895575e95d6d57101ceebd06e7e83b2e6ab2e6559921d8b9.yml +openapi_spec_hash: 3e687221fe05e917a1c5b622afd17103 config_hash: ff13935d1231ad44cd3822ffe39904b4 diff --git a/src/context/dev/resources/web.py b/src/context/dev/resources/web.py index f98ed51..6cccaeb 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,11 @@ 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', the + browser service dismisses cookie consent before capture. If 'false' or not + provided, captures the page without that step. This value is part of the + screenshot cache key. + 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 +254,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 +797,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 +826,11 @@ 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', the + browser service dismisses cookie consent before capture. If 'false' or not + provided, captures the page without that step. This value is part of the + screenshot cache key. + 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 +871,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..7cd0da9 100644 --- a/src/context/dev/types/web_screenshot_params.py +++ b/src/context/dev/types/web_screenshot_params.py @@ -31,6 +31,14 @@ 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', the browser service dismisses cookie consent before capture. If + 'false' or not provided, captures the page without that step. This value is part + of the screenshot cache key. + """ + 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, From 3758473b755cd5624e8cdcdc63e30075f3b3860c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 01:45:39 +0000 Subject: [PATCH 2/3] feat(api): api update --- .stats.yml | 4 ++-- src/context/dev/resources/web.py | 14 ++++++-------- src/context/dev/types/web_screenshot_params.py | 5 ++--- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9df4f18..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-9cbf61fcc1963e0a895575e95d6d57101ceebd06e7e83b2e6ab2e6559921d8b9.yml -openapi_spec_hash: 3e687221fe05e917a1c5b622afd17103 +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/src/context/dev/resources/web.py b/src/context/dev/resources/web.py index 6cccaeb..61b54bb 100644 --- a/src/context/dev/resources/web.py +++ b/src/context/dev/resources/web.py @@ -209,10 +209,9 @@ 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', the - browser service dismisses cookie consent before capture. If 'false' or not - provided, captures the page without that step. This value is part of the - screenshot cache key. + 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 @@ -826,10 +825,9 @@ 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', the - browser service dismisses cookie consent before capture. If 'false' or not - provided, captures the page without that step. This value is part of the - screenshot cache key. + 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 diff --git a/src/context/dev/types/web_screenshot_params.py b/src/context/dev/types/web_screenshot_params.py index 7cd0da9..a282def 100644 --- a/src/context/dev/types/web_screenshot_params.py +++ b/src/context/dev/types/web_screenshot_params.py @@ -34,9 +34,8 @@ class WebScreenshotParams(TypedDict, total=False): handle_cookie_popup: Annotated[Literal["true", "false"], PropertyInfo(alias="handleCookiePopup")] """Optional parameter to control cookie/consent popup handling. - If 'true', the browser service dismisses cookie consent before capture. If - 'false' or not provided, captures the page without that step. This value is part - of the screenshot cache key. + 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")] From d59a8fc841e62a05125904c4cf887aee201735e7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 01:45:58 +0000 Subject: [PATCH 3/3] release: 0.21.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ pyproject.toml | 2 +- src/context/dev/_version.py | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) 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/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