diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2601677..d0ab664 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.1.0" + ".": "1.2.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index bacd568..e34b116 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 25 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-3024c2681b0acf12535d68f39c1b49113330548513a54b276116cd3f2eda182e.yml -openapi_spec_hash: ab3a6473e575381cacd245bf54dcf0f7 -config_hash: b0f343b2ab3baebad7b0d6d51f0f16fc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-4903d5902cec6a80f42b9adaa9cf0defa9805ff22d7ae96970d209a4f867e195.yml +openapi_spec_hash: 1097891c23530dfe0155f23170daf973 +config_hash: c7b0cdaba3b9797b77efd89e1754d803 diff --git a/CHANGELOG.md b/CHANGELOG.md index 878551c..7dfe38d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.2.0 (2026-06-25) + +Full Changelog: [v1.1.0...v1.2.0](https://github.com/context-dot-dev/context-python-sdk/compare/v1.1.0...v1.2.0) + +### Features + +* **api:** api update ([5c97d99](https://github.com/context-dot-dev/context-python-sdk/commit/5c97d9910c3ea61b4440d3d3dde189b62f4de2b6)) + ## 1.1.0 (2026-06-21) Full Changelog: [v1.0.0...v1.1.0](https://github.com/context-dot-dev/context-python-sdk/compare/v1.0.0...v1.1.0) diff --git a/pyproject.toml b/pyproject.toml index 260951d..69032f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "context.dev" -version = "1.1.0" +version = "1.2.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 9b4775d..bbb9761 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__ = "1.1.0" # x-release-please-version +__version__ = "1.2.0" # x-release-please-version diff --git a/src/context/dev/resources/web.py b/src/context/dev/resources/web.py index b615f3b..b320e57 100644 --- a/src/context/dev/resources/web.py +++ b/src/context/dev/resources/web.py @@ -359,6 +359,7 @@ def screenshot( 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, + scroll_offset: int | Omit = omit, timeout_ms: int | Omit = omit, viewport: web_screenshot_params.Viewport | Omit = omit, wait_for_ms: int | Omit = omit, @@ -399,6 +400,13 @@ def screenshot( provided, screenshots the main domain landing page. Only applicable when using 'domain', not 'directUrl'. + scroll_offset: Optional vertical scroll offset in pixels for capturing a long page in + viewport-sized chunks. When provided, the full page is captured once and the + returned image is the viewport-sized slice that begins at this Y offset (e.g. + request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page + top to bottom). The final slice may be shorter than the viewport height. Takes + precedence over fullScreenshot. Max: 100000. + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes). @@ -432,6 +440,7 @@ def screenshot( "handle_cookie_popup": handle_cookie_popup, "max_age_ms": max_age_ms, "page": page, + "scroll_offset": scroll_offset, "timeout_ms": timeout_ms, "viewport": viewport, "wait_for_ms": wait_for_ms, @@ -1277,6 +1286,7 @@ async def screenshot( 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, + scroll_offset: int | Omit = omit, timeout_ms: int | Omit = omit, viewport: web_screenshot_params.Viewport | Omit = omit, wait_for_ms: int | Omit = omit, @@ -1317,6 +1327,13 @@ async def screenshot( provided, screenshots the main domain landing page. Only applicable when using 'domain', not 'directUrl'. + scroll_offset: Optional vertical scroll offset in pixels for capturing a long page in + viewport-sized chunks. When provided, the full page is captured once and the + returned image is the viewport-sized slice that begins at this Y offset (e.g. + request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page + top to bottom). The final slice may be shorter than the viewport height. Takes + precedence over fullScreenshot. Max: 100000. + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes). @@ -1350,6 +1367,7 @@ async def screenshot( "handle_cookie_popup": handle_cookie_popup, "max_age_ms": max_age_ms, "page": page, + "scroll_offset": scroll_offset, "timeout_ms": timeout_ms, "viewport": viewport, "wait_for_ms": wait_for_ms, diff --git a/src/context/dev/types/web_screenshot_params.py b/src/context/dev/types/web_screenshot_params.py index a282def..fc01822 100644 --- a/src/context/dev/types/web_screenshot_params.py +++ b/src/context/dev/types/web_screenshot_params.py @@ -54,6 +54,16 @@ class WebScreenshotParams(TypedDict, total=False): applicable when using 'domain', not 'directUrl'. """ + scroll_offset: Annotated[int, PropertyInfo(alias="scrollOffset")] + """ + Optional vertical scroll offset in pixels for capturing a long page in + viewport-sized chunks. When provided, the full page is captured once and the + returned image is the viewport-sized slice that begins at this Y offset (e.g. + request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page + top to bottom). The final slice may be shorter than the viewport height. Takes + precedence over fullScreenshot. Max: 100000. + """ + timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")] """Optional timeout in milliseconds for the request. diff --git a/tests/api_resources/test_web.py b/tests/api_resources/test_web.py index 95a4074..60f8e9f 100644 --- a/tests/api_resources/test_web.py +++ b/tests/api_resources/test_web.py @@ -248,6 +248,7 @@ def test_method_screenshot_with_all_params(self, client: ContextDev) -> None: handle_cookie_popup="true", max_age_ms=0, page="login", + scroll_offset=0, timeout_ms=1000, viewport={ "height": 240, @@ -840,6 +841,7 @@ async def test_method_screenshot_with_all_params(self, async_client: AsyncContex handle_cookie_popup="true", max_age_ms=0, page="login", + scroll_offset=0, timeout_ms=1000, viewport={ "height": 240,