From 42f10313977a9f557c5b067f81f8bbad55fdd76a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 00:36:48 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +-- src/brand/dev/resources/brand.py | 18 +++++++++++-- .../dev/types/brand_styleguide_params.py | 10 +++++-- tests/api_resources/test_brand.py | 26 ++++++------------- 4 files changed, 34 insertions(+), 24 deletions(-) diff --git a/.stats.yml b/.stats.yml index aaa0f9f..9aae198 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 20 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-2cdd67823c6ac9d1ab68032a695c31a098ad285ffb0c073b9dfc00afe5de9b88.yml -openapi_spec_hash: ac8a965beb9b667b6204a5c573507219 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-3614380ba4315687bbaf6561e9872fd72dd876f9230ce690c35d7efc1250e808.yml +openapi_spec_hash: f1aa17e08d0379766a61de68714c7c21 config_hash: 4cd3173ea1cce7183640aae49cfbb374 diff --git a/src/brand/dev/resources/brand.py b/src/brand/dev/resources/brand.py index f81e0d6..b66a897 100644 --- a/src/brand/dev/resources/brand.py +++ b/src/brand/dev/resources/brand.py @@ -1651,7 +1651,8 @@ def screenshot( def styleguide( self, *, - domain: str, + direct_url: str | Omit = omit, + domain: str | Omit = omit, prioritize: Literal["speed", "quality"] | Omit = omit, timeout_ms: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1664,8 +1665,13 @@ def styleguide( """ Automatically extract comprehensive design system information from a brand's website including colors, typography, spacing, shadows, and UI components. + Either 'domain' or 'directUrl' must be provided as a query parameter, but not + both. Args: + direct_url: A specific URL to fetch the styleguide from directly, bypassing domain + resolution (e.g., 'https://example.com/design-system'). + domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated. @@ -1695,6 +1701,7 @@ def styleguide( timeout=timeout, query=maybe_transform( { + "direct_url": direct_url, "domain": domain, "prioritize": prioritize, "timeout_ms": timeout_ms, @@ -3465,7 +3472,8 @@ async def screenshot( async def styleguide( self, *, - domain: str, + direct_url: str | Omit = omit, + domain: str | Omit = omit, prioritize: Literal["speed", "quality"] | Omit = omit, timeout_ms: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -3478,8 +3486,13 @@ async def styleguide( """ Automatically extract comprehensive design system information from a brand's website including colors, typography, spacing, shadows, and UI components. + Either 'domain' or 'directUrl' must be provided as a query parameter, but not + both. Args: + direct_url: A specific URL to fetch the styleguide from directly, bypassing domain + resolution (e.g., 'https://example.com/design-system'). + domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated. @@ -3509,6 +3522,7 @@ async def styleguide( timeout=timeout, query=await async_maybe_transform( { + "direct_url": direct_url, "domain": domain, "prioritize": prioritize, "timeout_ms": timeout_ms, diff --git a/src/brand/dev/types/brand_styleguide_params.py b/src/brand/dev/types/brand_styleguide_params.py index e633693..e97cf77 100644 --- a/src/brand/dev/types/brand_styleguide_params.py +++ b/src/brand/dev/types/brand_styleguide_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Literal, Required, Annotated, TypedDict +from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo @@ -10,7 +10,13 @@ class BrandStyleguideParams(TypedDict, total=False): - domain: Required[str] + direct_url: Annotated[str, PropertyInfo(alias="directUrl")] + """ + A specific URL to fetch the styleguide from directly, bypassing domain + resolution (e.g., 'https://example.com/design-system'). + """ + + domain: str """Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated. diff --git a/tests/api_resources/test_brand.py b/tests/api_resources/test_brand.py index 4f86fcc..b7c65bc 100644 --- a/tests/api_resources/test_brand.py +++ b/tests/api_resources/test_brand.py @@ -800,15 +800,14 @@ def test_streaming_response_screenshot(self, client: BrandDev) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_styleguide(self, client: BrandDev) -> None: - brand = client.brand.styleguide( - domain="domain", - ) + brand = client.brand.styleguide() assert_matches_type(BrandStyleguideResponse, brand, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_styleguide_with_all_params(self, client: BrandDev) -> None: brand = client.brand.styleguide( + direct_url="https://example.com", domain="domain", prioritize="speed", timeout_ms=1000, @@ -818,9 +817,7 @@ def test_method_styleguide_with_all_params(self, client: BrandDev) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_styleguide(self, client: BrandDev) -> None: - response = client.brand.with_raw_response.styleguide( - domain="domain", - ) + response = client.brand.with_raw_response.styleguide() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -830,9 +827,7 @@ def test_raw_response_styleguide(self, client: BrandDev) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_streaming_response_styleguide(self, client: BrandDev) -> None: - with client.brand.with_streaming_response.styleguide( - domain="domain", - ) as response: + with client.brand.with_streaming_response.styleguide() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1755,15 +1750,14 @@ async def test_streaming_response_screenshot(self, async_client: AsyncBrandDev) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_styleguide(self, async_client: AsyncBrandDev) -> None: - brand = await async_client.brand.styleguide( - domain="domain", - ) + brand = await async_client.brand.styleguide() assert_matches_type(BrandStyleguideResponse, brand, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_styleguide_with_all_params(self, async_client: AsyncBrandDev) -> None: brand = await async_client.brand.styleguide( + direct_url="https://example.com", domain="domain", prioritize="speed", timeout_ms=1000, @@ -1773,9 +1767,7 @@ async def test_method_styleguide_with_all_params(self, async_client: AsyncBrandD @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_styleguide(self, async_client: AsyncBrandDev) -> None: - response = await async_client.brand.with_raw_response.styleguide( - domain="domain", - ) + response = await async_client.brand.with_raw_response.styleguide() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1785,9 +1777,7 @@ async def test_raw_response_styleguide(self, async_client: AsyncBrandDev) -> Non @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_streaming_response_styleguide(self, async_client: AsyncBrandDev) -> None: - async with async_client.brand.with_streaming_response.styleguide( - domain="domain", - ) as response: + async with async_client.brand.with_streaming_response.styleguide() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From 023e76ec85275bec8b0545992a69269356c13cfe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 00:37:07 +0000 Subject: [PATCH 2/2] release: 1.35.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/brand/dev/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 257e308..44959ac 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.34.0" + ".": "1.35.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ea6d90..890b62a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.35.0 (2026-02-24) + +Full Changelog: [v1.34.0...v1.35.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.34.0...v1.35.0) + +### Features + +* **api:** api update ([42f1031](https://github.com/brand-dot-dev/python-sdk/commit/42f10313977a9f557c5b067f81f8bbad55fdd76a)) + ## 1.34.0 (2026-02-23) Full Changelog: [v1.33.0...v1.34.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.33.0...v1.34.0) diff --git a/pyproject.toml b/pyproject.toml index 373c9b7..96ede79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "brand.dev" -version = "1.34.0" +version = "1.35.0" description = "The official Python library for the brand.dev API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/brand/dev/_version.py b/src/brand/dev/_version.py index c0aece0..bf19820 100644 --- a/src/brand/dev/_version.py +++ b/src/brand/dev/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "brand.dev" -__version__ = "1.34.0" # x-release-please-version +__version__ = "1.35.0" # x-release-please-version