From 30730189cb2ff72aef33f93eafee4ca17d488362 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 16:08:42 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- src/brand/dev/resources/brand.py | 14 - .../dev/types/brand_styleguide_params.py | 10 +- .../dev/types/brand_styleguide_response.py | 292 +++++++++++------- tests/api_resources/test_brand.py | 2 - 5 files changed, 186 insertions(+), 136 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2c5f954..bee881e 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-c91b0567307b069c250d073074b7c861b64e632a8380b24925e15d981846bb43.yml -openapi_spec_hash: e479aa097b1283c2acf19d6360787449 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-05a30711e18b0023520a660352d75595a050d1299bf0e3ee4a8cf55ded36aea2.yml +openapi_spec_hash: 8d0e1115a7d864f27c55cec3255d1e77 config_hash: 91cf2dcefb99c39eb9cd3e98e15d6011 diff --git a/src/brand/dev/resources/brand.py b/src/brand/dev/resources/brand.py index 86fccc7..856a490 100644 --- a/src/brand/dev/resources/brand.py +++ b/src/brand/dev/resources/brand.py @@ -1923,7 +1923,6 @@ def styleguide( *, 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. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1945,11 +1944,6 @@ def styleguide( domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated. - prioritize: Optional parameter to prioritize screenshot capture for styleguide extraction. - If 'speed', optimizes for faster capture with basic quality. If 'quality', - optimizes for higher quality with longer wait times. Defaults to 'quality' if - not provided. - 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). @@ -1973,7 +1967,6 @@ def styleguide( { "direct_url": direct_url, "domain": domain, - "prioritize": prioritize, "timeout_ms": timeout_ms, }, brand_styleguide_params.BrandStyleguideParams, @@ -4030,7 +4023,6 @@ async def styleguide( *, 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. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -4052,11 +4044,6 @@ async def styleguide( domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated. - prioritize: Optional parameter to prioritize screenshot capture for styleguide extraction. - If 'speed', optimizes for faster capture with basic quality. If 'quality', - optimizes for higher quality with longer wait times. Defaults to 'quality' if - not provided. - 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). @@ -4080,7 +4067,6 @@ async def styleguide( { "direct_url": direct_url, "domain": domain, - "prioritize": prioritize, "timeout_ms": timeout_ms, }, brand_styleguide_params.BrandStyleguideParams, diff --git a/src/brand/dev/types/brand_styleguide_params.py b/src/brand/dev/types/brand_styleguide_params.py index e97cf77..9c858b5 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, Annotated, TypedDict +from typing_extensions import Annotated, TypedDict from .._utils import PropertyInfo @@ -22,14 +22,6 @@ class BrandStyleguideParams(TypedDict, total=False): The domain will be automatically normalized and validated. """ - prioritize: Literal["speed", "quality"] - """Optional parameter to prioritize screenshot capture for styleguide extraction. - - If 'speed', optimizes for faster capture with basic quality. If 'quality', - optimizes for higher quality with longer wait times. Defaults to 'quality' if - not provided. - """ - timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")] """Optional timeout in milliseconds for the request. diff --git a/src/brand/dev/types/brand_styleguide_response.py b/src/brand/dev/types/brand_styleguide_response.py index 35b51b3..edc2d29 100644 --- a/src/brand/dev/types/brand_styleguide_response.py +++ b/src/brand/dev/types/brand_styleguide_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import List, Optional from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -32,131 +32,198 @@ class StyleguideColors(BaseModel): """Primary colors used on the website""" - accent: Optional[str] = None - """Accent color of the website (hex format)""" + accent: str + """Accent color (hex format)""" - background: Optional[str] = None - """Background color of the website (hex format)""" + background: str + """Background color (hex format)""" - text: Optional[str] = None - """Text color of the website (hex format)""" + text: str + """Text color (hex format)""" class StyleguideComponentsButtonLink(BaseModel): - """Link button style""" + background_color: str = FieldInfo(alias="backgroundColor") - background_color: Optional[str] = FieldInfo(alias="backgroundColor", default=None) + border_color: str = FieldInfo(alias="borderColor") + """ + Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + alpha) + """ - border_color: Optional[str] = FieldInfo(alias="borderColor", default=None) + border_radius: str = FieldInfo(alias="borderRadius") - border_radius: Optional[str] = FieldInfo(alias="borderRadius", default=None) + border_style: str = FieldInfo(alias="borderStyle") - border_style: Optional[str] = FieldInfo(alias="borderStyle", default=None) + border_width: str = FieldInfo(alias="borderWidth") - border_width: Optional[str] = FieldInfo(alias="borderWidth", default=None) + box_shadow: str = FieldInfo(alias="boxShadow") + """Computed box-shadow (comma-separated layers when present)""" - box_shadow: Optional[str] = FieldInfo(alias="boxShadow", default=None) + color: str - color: Optional[str] = None + css: str + """Ready-to-use CSS declaration block for this component style""" - font_size: Optional[str] = FieldInfo(alias="fontSize", default=None) + font_size: str = FieldInfo(alias="fontSize") - font_weight: Optional[float] = FieldInfo(alias="fontWeight", default=None) + font_weight: float = FieldInfo(alias="fontWeight") - padding: Optional[str] = None + min_height: str = FieldInfo(alias="minHeight") + """Sampled minimum height of the button box (typically px)""" - text_decoration: Optional[str] = FieldInfo(alias="textDecoration", default=None) + min_width: str = FieldInfo(alias="minWidth") + """Sampled minimum width of the button box (typically px)""" + + padding: str + + text_decoration: str = FieldInfo(alias="textDecoration") + + font_fallbacks: Optional[List[str]] = FieldInfo(alias="fontFallbacks", default=None) + """Full ordered font list from computed font-family""" + + font_family: Optional[str] = FieldInfo(alias="fontFamily", default=None) + """Primary button typeface (first in fontFallbacks)""" + + text_decoration_color: Optional[str] = FieldInfo(alias="textDecorationColor", default=None) + """Hex color of the underline when it differs from the text color""" class StyleguideComponentsButtonPrimary(BaseModel): - """Primary button style""" + background_color: str = FieldInfo(alias="backgroundColor") + + border_color: str = FieldInfo(alias="borderColor") + """ + Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + alpha) + """ - background_color: Optional[str] = FieldInfo(alias="backgroundColor", default=None) + border_radius: str = FieldInfo(alias="borderRadius") - border_color: Optional[str] = FieldInfo(alias="borderColor", default=None) + border_style: str = FieldInfo(alias="borderStyle") - border_radius: Optional[str] = FieldInfo(alias="borderRadius", default=None) + border_width: str = FieldInfo(alias="borderWidth") - border_style: Optional[str] = FieldInfo(alias="borderStyle", default=None) + box_shadow: str = FieldInfo(alias="boxShadow") + """Computed box-shadow (comma-separated layers when present)""" - border_width: Optional[str] = FieldInfo(alias="borderWidth", default=None) + color: str - box_shadow: Optional[str] = FieldInfo(alias="boxShadow", default=None) + css: str + """Ready-to-use CSS declaration block for this component style""" - color: Optional[str] = None + font_size: str = FieldInfo(alias="fontSize") - font_size: Optional[str] = FieldInfo(alias="fontSize", default=None) + font_weight: float = FieldInfo(alias="fontWeight") - font_weight: Optional[float] = FieldInfo(alias="fontWeight", default=None) + min_height: str = FieldInfo(alias="minHeight") + """Sampled minimum height of the button box (typically px)""" - padding: Optional[str] = None + min_width: str = FieldInfo(alias="minWidth") + """Sampled minimum width of the button box (typically px)""" - text_decoration: Optional[str] = FieldInfo(alias="textDecoration", default=None) + padding: str + + text_decoration: str = FieldInfo(alias="textDecoration") + + font_fallbacks: Optional[List[str]] = FieldInfo(alias="fontFallbacks", default=None) + """Full ordered font list from computed font-family""" + + font_family: Optional[str] = FieldInfo(alias="fontFamily", default=None) + """Primary button typeface (first in fontFallbacks)""" + + text_decoration_color: Optional[str] = FieldInfo(alias="textDecorationColor", default=None) + """Hex color of the underline when it differs from the text color""" class StyleguideComponentsButtonSecondary(BaseModel): - """Secondary button style""" + background_color: str = FieldInfo(alias="backgroundColor") + + border_color: str = FieldInfo(alias="borderColor") + """ + Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + alpha) + """ + + border_radius: str = FieldInfo(alias="borderRadius") - background_color: Optional[str] = FieldInfo(alias="backgroundColor", default=None) + border_style: str = FieldInfo(alias="borderStyle") - border_color: Optional[str] = FieldInfo(alias="borderColor", default=None) + border_width: str = FieldInfo(alias="borderWidth") - border_radius: Optional[str] = FieldInfo(alias="borderRadius", default=None) + box_shadow: str = FieldInfo(alias="boxShadow") + """Computed box-shadow (comma-separated layers when present)""" - border_style: Optional[str] = FieldInfo(alias="borderStyle", default=None) + color: str - border_width: Optional[str] = FieldInfo(alias="borderWidth", default=None) + css: str + """Ready-to-use CSS declaration block for this component style""" - box_shadow: Optional[str] = FieldInfo(alias="boxShadow", default=None) + font_size: str = FieldInfo(alias="fontSize") - color: Optional[str] = None + font_weight: float = FieldInfo(alias="fontWeight") - font_size: Optional[str] = FieldInfo(alias="fontSize", default=None) + min_height: str = FieldInfo(alias="minHeight") + """Sampled minimum height of the button box (typically px)""" - font_weight: Optional[float] = FieldInfo(alias="fontWeight", default=None) + min_width: str = FieldInfo(alias="minWidth") + """Sampled minimum width of the button box (typically px)""" - padding: Optional[str] = None + padding: str - text_decoration: Optional[str] = FieldInfo(alias="textDecoration", default=None) + text_decoration: str = FieldInfo(alias="textDecoration") + + font_fallbacks: Optional[List[str]] = FieldInfo(alias="fontFallbacks", default=None) + """Full ordered font list from computed font-family""" + + font_family: Optional[str] = FieldInfo(alias="fontFamily", default=None) + """Primary button typeface (first in fontFallbacks)""" + + text_decoration_color: Optional[str] = FieldInfo(alias="textDecorationColor", default=None) + """Hex color of the underline when it differs from the text color""" class StyleguideComponentsButton(BaseModel): """Button component styles""" link: Optional[StyleguideComponentsButtonLink] = None - """Link button style""" primary: Optional[StyleguideComponentsButtonPrimary] = None - """Primary button style""" secondary: Optional[StyleguideComponentsButtonSecondary] = None - """Secondary button style""" class StyleguideComponentsCard(BaseModel): """Card component style""" - background_color: Optional[str] = FieldInfo(alias="backgroundColor", default=None) + background_color: str = FieldInfo(alias="backgroundColor") - border_color: Optional[str] = FieldInfo(alias="borderColor", default=None) + border_color: str = FieldInfo(alias="borderColor") + """ + Border color as CSS hex (#RRGGBB or #RRGGBBAA when computed border-color has + alpha) + """ - border_radius: Optional[str] = FieldInfo(alias="borderRadius", default=None) + border_radius: str = FieldInfo(alias="borderRadius") - border_style: Optional[str] = FieldInfo(alias="borderStyle", default=None) + border_style: str = FieldInfo(alias="borderStyle") - border_width: Optional[str] = FieldInfo(alias="borderWidth", default=None) + border_width: str = FieldInfo(alias="borderWidth") - box_shadow: Optional[str] = FieldInfo(alias="boxShadow", default=None) + box_shadow: str = FieldInfo(alias="boxShadow") - padding: Optional[str] = None + css: str + """Ready-to-use CSS declaration block for this component style""" - text_color: Optional[str] = FieldInfo(alias="textColor", default=None) + padding: str + + text_color: str = FieldInfo(alias="textColor") class StyleguideComponents(BaseModel): """UI component styles""" - button: Optional[StyleguideComponentsButton] = None + button: StyleguideComponentsButton """Button component styles""" card: Optional[StyleguideComponentsCard] = None @@ -166,87 +233,93 @@ class StyleguideComponents(BaseModel): class StyleguideElementSpacing(BaseModel): """Spacing system used on the website""" - lg: Optional[str] = None - """Large spacing value""" + lg: str - md: Optional[str] = None - """Medium spacing value""" + md: str - sm: Optional[str] = None - """Small spacing value""" + sm: str - xl: Optional[str] = None - """Extra large spacing value""" + xl: str - xs: Optional[str] = None - """Extra small spacing value""" + xs: str class StyleguideShadows(BaseModel): """Shadow styles used on the website""" - inner: Optional[str] = None - """Inner shadow value""" + inner: str - lg: Optional[str] = None - """Large shadow value""" + lg: str - md: Optional[str] = None - """Medium shadow value""" + md: str - sm: Optional[str] = None - """Small shadow value""" + sm: str - xl: Optional[str] = None - """Extra large shadow value""" + xl: str class StyleguideTypographyHeadingsH1(BaseModel): - font_family: Optional[str] = FieldInfo(alias="fontFamily", default=None) + font_fallbacks: List[str] = FieldInfo(alias="fontFallbacks") + """Full ordered font list from resolved computed font-family""" + + font_family: str = FieldInfo(alias="fontFamily") + """Primary face (first family in the computed stack)""" - font_size: Optional[str] = FieldInfo(alias="fontSize", default=None) + font_size: str = FieldInfo(alias="fontSize") - font_weight: Optional[float] = FieldInfo(alias="fontWeight", default=None) + font_weight: float = FieldInfo(alias="fontWeight") - letter_spacing: Optional[str] = FieldInfo(alias="letterSpacing", default=None) + letter_spacing: str = FieldInfo(alias="letterSpacing") - line_height: Optional[str] = FieldInfo(alias="lineHeight", default=None) + line_height: str = FieldInfo(alias="lineHeight") class StyleguideTypographyHeadingsH2(BaseModel): - font_family: Optional[str] = FieldInfo(alias="fontFamily", default=None) + font_fallbacks: List[str] = FieldInfo(alias="fontFallbacks") + """Full ordered font list from resolved computed font-family""" + + font_family: str = FieldInfo(alias="fontFamily") + """Primary face (first family in the computed stack)""" - font_size: Optional[str] = FieldInfo(alias="fontSize", default=None) + font_size: str = FieldInfo(alias="fontSize") - font_weight: Optional[float] = FieldInfo(alias="fontWeight", default=None) + font_weight: float = FieldInfo(alias="fontWeight") - letter_spacing: Optional[str] = FieldInfo(alias="letterSpacing", default=None) + letter_spacing: str = FieldInfo(alias="letterSpacing") - line_height: Optional[str] = FieldInfo(alias="lineHeight", default=None) + line_height: str = FieldInfo(alias="lineHeight") class StyleguideTypographyHeadingsH3(BaseModel): - font_family: Optional[str] = FieldInfo(alias="fontFamily", default=None) + font_fallbacks: List[str] = FieldInfo(alias="fontFallbacks") + """Full ordered font list from resolved computed font-family""" + + font_family: str = FieldInfo(alias="fontFamily") + """Primary face (first family in the computed stack)""" - font_size: Optional[str] = FieldInfo(alias="fontSize", default=None) + font_size: str = FieldInfo(alias="fontSize") - font_weight: Optional[float] = FieldInfo(alias="fontWeight", default=None) + font_weight: float = FieldInfo(alias="fontWeight") - letter_spacing: Optional[str] = FieldInfo(alias="letterSpacing", default=None) + letter_spacing: str = FieldInfo(alias="letterSpacing") - line_height: Optional[str] = FieldInfo(alias="lineHeight", default=None) + line_height: str = FieldInfo(alias="lineHeight") class StyleguideTypographyHeadingsH4(BaseModel): - font_family: Optional[str] = FieldInfo(alias="fontFamily", default=None) + font_fallbacks: List[str] = FieldInfo(alias="fontFallbacks") + """Full ordered font list from resolved computed font-family""" + + font_family: str = FieldInfo(alias="fontFamily") + """Primary face (first family in the computed stack)""" - font_size: Optional[str] = FieldInfo(alias="fontSize", default=None) + font_size: str = FieldInfo(alias="fontSize") - font_weight: Optional[float] = FieldInfo(alias="fontWeight", default=None) + font_weight: float = FieldInfo(alias="fontWeight") - letter_spacing: Optional[str] = FieldInfo(alias="letterSpacing", default=None) + letter_spacing: str = FieldInfo(alias="letterSpacing") - line_height: Optional[str] = FieldInfo(alias="lineHeight", default=None) + line_height: str = FieldInfo(alias="lineHeight") class StyleguideTypographyHeadings(BaseModel): @@ -262,48 +335,49 @@ class StyleguideTypographyHeadings(BaseModel): class StyleguideTypographyP(BaseModel): - """Paragraph text styles""" + font_fallbacks: List[str] = FieldInfo(alias="fontFallbacks") + """Full ordered font list from resolved computed font-family""" - font_family: Optional[str] = FieldInfo(alias="fontFamily", default=None) + font_family: str = FieldInfo(alias="fontFamily") + """Primary face (first family in the computed stack)""" - font_size: Optional[str] = FieldInfo(alias="fontSize", default=None) + font_size: str = FieldInfo(alias="fontSize") - font_weight: Optional[float] = FieldInfo(alias="fontWeight", default=None) + font_weight: float = FieldInfo(alias="fontWeight") - letter_spacing: Optional[str] = FieldInfo(alias="letterSpacing", default=None) + letter_spacing: str = FieldInfo(alias="letterSpacing") - line_height: Optional[str] = FieldInfo(alias="lineHeight", default=None) + line_height: str = FieldInfo(alias="lineHeight") class StyleguideTypography(BaseModel): """Typography styles used on the website""" - headings: Optional[StyleguideTypographyHeadings] = None + headings: StyleguideTypographyHeadings """Heading styles""" p: Optional[StyleguideTypographyP] = None - """Paragraph text styles""" class Styleguide(BaseModel): """Comprehensive styleguide data extracted from the website""" - colors: Optional[StyleguideColors] = None + colors: StyleguideColors """Primary colors used on the website""" - components: Optional[StyleguideComponents] = None + components: StyleguideComponents """UI component styles""" - element_spacing: Optional[StyleguideElementSpacing] = FieldInfo(alias="elementSpacing", default=None) + element_spacing: StyleguideElementSpacing = FieldInfo(alias="elementSpacing") """Spacing system used on the website""" - mode: Optional[Literal["light", "dark"]] = None + mode: Literal["light", "dark"] """The primary color mode of the website design""" - shadows: Optional[StyleguideShadows] = None + shadows: StyleguideShadows """Shadow styles used on the website""" - typography: Optional[StyleguideTypography] = None + typography: StyleguideTypography """Typography styles used on the website""" diff --git a/tests/api_resources/test_brand.py b/tests/api_resources/test_brand.py index bc49440..5587585 100644 --- a/tests/api_resources/test_brand.py +++ b/tests/api_resources/test_brand.py @@ -811,7 +811,6 @@ 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, ) assert_matches_type(BrandStyleguideResponse, brand, path=["response"]) @@ -1774,7 +1773,6 @@ async def test_method_styleguide_with_all_params(self, async_client: AsyncBrandD brand = await async_client.brand.styleguide( direct_url="https://example.com", domain="domain", - prioritize="speed", timeout_ms=1000, ) assert_matches_type(BrandStyleguideResponse, brand, path=["response"]) From e2d1ae6a8460376dcde412af0f03d065b3393e88 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 16:09:01 +0000 Subject: [PATCH 2/2] release: 1.43.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 507912c..b5fcdb9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.42.0" + ".": "1.43.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f777b7..d135655 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.43.0 (2026-04-03) + +Full Changelog: [v1.42.0...v1.43.0](https://github.com/context-dot-dev/deprecated-brand-python-sdk/compare/v1.42.0...v1.43.0) + +### Features + +* **api:** api update ([3073018](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/30730189cb2ff72aef33f93eafee4ca17d488362)) + ## 1.42.0 (2026-03-28) Full Changelog: [v1.41.0...v1.42.0](https://github.com/context-dot-dev/deprecated-brand-python-sdk/compare/v1.41.0...v1.42.0) diff --git a/pyproject.toml b/pyproject.toml index 28dc0ed..1ac8a24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "brand.dev" -version = "1.42.0" +version = "1.43.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 f9a8340..6c398c0 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.42.0" # x-release-please-version +__version__ = "1.43.0" # x-release-please-version