diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 21f6056..e6c39ad 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.10.0" + ".": "2.11.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 4b9b1cb..9673209 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 41 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-5dbe631ce516ca688273053ddcb58870561bd6dc76fa75df354c954d7af65a3c.yml -openapi_spec_hash: 53a74c4cccbdec8590db38183840a446 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-b0c72d2fe5911c9ce155275b954198bf2152e915a7e5b9f719aad50e222b9ef8.yml +openapi_spec_hash: 5cf943ea5718059b7975417b012cee28 config_hash: 0fb0ceca5946298c416cec0cca5260c7 diff --git a/CHANGELOG.md b/CHANGELOG.md index b8cde85..54d9d18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 2.11.0 (2026-08-18) + +Full Changelog: [v2.10.0...v2.11.0](https://github.com/context-dot-dev/context-python-sdk/compare/v2.10.0...v2.11.0) + +### Features + +* **api:** api update ([2bdb356](https://github.com/context-dot-dev/context-python-sdk/commit/2bdb356049b2611469b28d34c9ddcc990a629525)) +* **api:** api update ([2ac4e0c](https://github.com/context-dot-dev/context-python-sdk/commit/2ac4e0c1b06711b284477705f83d20e0c1dd83f5)) +* **api:** api update ([68cb98c](https://github.com/context-dot-dev/context-python-sdk/commit/68cb98ca3b510157f56d34ed0cf598d7cae3b988)) + ## 2.10.0 (2026-08-17) Full Changelog: [v2.9.0...v2.10.0](https://github.com/context-dot-dev/context-python-sdk/compare/v2.9.0...v2.10.0) diff --git a/pyproject.toml b/pyproject.toml index 5d891ed..f87c5c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "context.dev" -version = "2.10.0" +version = "2.11.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 9acee71..0e1698d 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__ = "2.10.0" # x-release-please-version +__version__ = "2.11.0" # x-release-please-version diff --git a/src/context/dev/resources/web.py b/src/context/dev/resources/web.py index a058849..b24e638 100644 --- a/src/context/dev/resources/web.py +++ b/src/context/dev/resources/web.py @@ -386,6 +386,7 @@ def extract_styleguide( def screenshot( self, *, + clear_popups: bool | Omit = omit, color_scheme: Literal["light", "dark"] | Omit = omit, country: Literal[ "ad", @@ -617,6 +618,12 @@ def screenshot( Capture a screenshot of a website. Args: + clear_popups: Optional parameter for comprehensive popup cleanup. If 'true', the browser + dismisses detected cookie/consent UI and clears other detected obstructive + popups and overlays before capture. If 'false' or not provided, this parameter + requests no cleanup; handleCookiePopup can still request cookie/consent handling + independently. + color_scheme: Optional parameter to choose the site's visual theme in the screenshot. Use 'light' or 'dark' when the site offers both appearances. @@ -692,6 +699,7 @@ def screenshot( timeout=timeout, query=maybe_transform( { + "clear_popups": clear_popups, "color_scheme": color_scheme, "country": country, "direct_url": direct_url, @@ -2616,6 +2624,7 @@ async def extract_styleguide( async def screenshot( self, *, + clear_popups: bool | Omit = omit, color_scheme: Literal["light", "dark"] | Omit = omit, country: Literal[ "ad", @@ -2847,6 +2856,12 @@ async def screenshot( Capture a screenshot of a website. Args: + clear_popups: Optional parameter for comprehensive popup cleanup. If 'true', the browser + dismisses detected cookie/consent UI and clears other detected obstructive + popups and overlays before capture. If 'false' or not provided, this parameter + requests no cleanup; handleCookiePopup can still request cookie/consent handling + independently. + color_scheme: Optional parameter to choose the site's visual theme in the screenshot. Use 'light' or 'dark' when the site offers both appearances. @@ -2922,6 +2937,7 @@ async def screenshot( timeout=timeout, query=await async_maybe_transform( { + "clear_popups": clear_popups, "color_scheme": color_scheme, "country": country, "direct_url": direct_url, diff --git a/src/context/dev/types/brand_retrieve_response.py b/src/context/dev/types/brand_retrieve_response.py index e732559..ef726c1 100644 --- a/src/context/dev/types/brand_retrieve_response.py +++ b/src/context/dev/types/brand_retrieve_response.py @@ -90,6 +90,13 @@ class BrandColor(BaseModel): name: Optional[str] = None """Name of the color""" + source: Optional[Literal["site", "logo"]] = None + """ + Where the color was observed: 'site' colors come from the website's own theme + signals (rendered page colors, manifest, theme-color meta), 'logo' colors from + logo image pixels. + """ + class BrandEmployees(BaseModel): """Employee headcount information for the brand (will be null if unknown)""" diff --git a/src/context/dev/types/brand_retrieve_simplified_response.py b/src/context/dev/types/brand_retrieve_simplified_response.py index 6684272..ab750a4 100644 --- a/src/context/dev/types/brand_retrieve_simplified_response.py +++ b/src/context/dev/types/brand_retrieve_simplified_response.py @@ -58,6 +58,13 @@ class BrandColor(BaseModel): name: Optional[str] = None """Name of the color""" + source: Optional[Literal["site", "logo"]] = None + """ + Where the color was observed: 'site' colors come from the website's own theme + signals (rendered page colors, manifest, theme-color meta), 'logo' colors from + logo image pixels. + """ + class BrandLogoColor(BaseModel): hex: Optional[str] = None diff --git a/src/context/dev/types/news_search_response.py b/src/context/dev/types/news_search_response.py index af82932..be6b7b2 100644 --- a/src/context/dev/types/news_search_response.py +++ b/src/context/dev/types/news_search_response.py @@ -10,49 +10,91 @@ class DataMatch(BaseModel): + """How the article relates to the company you searched for.""" + confidence: Optional[float] = None + """How confident the match is, from 0 to 1. Null when a score is unavailable.""" level: Literal["primary", "secondary"] + """ + primary when the article is mainly about the company, secondary when the company + is mentioned but is not the main subject. + """ class DataSource(BaseModel): + """The publication that published the article.""" + direct: bool """True when Context observed this article in the publisher-owned feed.""" domain: str + """Website domain of the publication.""" name: str + """Name of the publication, such as Reuters.""" class Data(BaseModel): id: str + """Stable unique identifier for this article. + + Use it to deduplicate or reference an article across requests. + """ authors: List[str] + """Bylined authors. Empty when no byline is available.""" description: Optional[str] = None + """Short summary or excerpt of the article, when the publisher provides one.""" image_url: Optional[str] = None + """Lead image for the article, when one is available.""" language: Optional[str] = None + """Language the article is written in, as a lowercase ISO 639-1 code such as en. + + Null when unknown. + """ match: DataMatch + """How the article relates to the company you searched for.""" published_at: Optional[datetime] = None + """When the article was published, as an ISO 8601 timestamp. + + Null when the publisher does not state a reliable date. + """ source: DataSource + """The publication that published the article.""" story_id: str - """Groups matching normalized headlines published on the same UTC day.""" + """Shared by articles covering the same story on the same day. + + Use it to group or collapse syndicated copies of one announcement across + outlets. + """ title: str + """Article headline.""" type: Literal["editorial", "press_release", "regulatory_filing", "advisory"] + """Kind of coverage. + + Use it to separate independent reporting (editorial) from company-issued content + (press_release, regulatory_filing, advisory). + """ url: str + """Link to the article on the publisher site.""" class Meta(BaseModel): + """Summary information about this response.""" + count: int + """Number of articles in this page.""" class KeyMetadata(BaseModel): @@ -70,12 +112,19 @@ class KeyMetadata(BaseModel): class NewsSearchResponse(BaseModel): data: List[Data] + """Articles matching the search, in the requested order.""" has_more: bool + """True when more results are available beyond this page.""" meta: Meta + """Summary information about this response.""" next_cursor: Optional[str] = None + """Pass as cursor in the next request to fetch the following page. + + Null when there are no more results. + """ key_metadata: Optional[KeyMetadata] = None """Metadata about the API key used for the request. diff --git a/src/context/dev/types/web_screenshot_params.py b/src/context/dev/types/web_screenshot_params.py index 2442d70..3b0f9a3 100644 --- a/src/context/dev/types/web_screenshot_params.py +++ b/src/context/dev/types/web_screenshot_params.py @@ -12,6 +12,15 @@ class WebScreenshotParams(TypedDict, total=False): + clear_popups: Annotated[bool, PropertyInfo(alias="clearPopups")] + """Optional parameter for comprehensive popup cleanup. + + If 'true', the browser dismisses detected cookie/consent UI and clears other + detected obstructive popups and overlays before capture. If 'false' or not + provided, this parameter requests no cleanup; handleCookiePopup can still + request cookie/consent handling independently. + """ + color_scheme: Annotated[Literal["light", "dark"], PropertyInfo(alias="colorScheme")] """Optional parameter to choose the site's visual theme in the screenshot. diff --git a/tests/api_resources/test_web.py b/tests/api_resources/test_web.py index 724e013..4805129 100644 --- a/tests/api_resources/test_web.py +++ b/tests/api_resources/test_web.py @@ -248,6 +248,7 @@ def test_method_screenshot(self, client: ContextDev) -> None: @parametrize def test_method_screenshot_with_all_params(self, client: ContextDev) -> None: web = client.web.screenshot( + clear_popups=True, color_scheme="light", country="de", direct_url="https://example.com", @@ -894,6 +895,7 @@ async def test_method_screenshot(self, async_client: AsyncContextDev) -> None: @parametrize async def test_method_screenshot_with_all_params(self, async_client: AsyncContextDev) -> None: web = await async_client.web.screenshot( + clear_popups=True, color_scheme="light", country="de", direct_url="https://example.com",