diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bfaab56..0c0c0c3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.24.0" + ".": "1.25.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index c86b8f0..8d4f11d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 13 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-e685328e362a28f152bcadfd1ca49680a80bfb7a3834fd422f2e459507305405.yml -openapi_spec_hash: 475543f86e39715f76588de6ccf70beb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-143086f8200f34e6ace805070e2a3ddccf15e30ed7ac3a7193f6a984f2413fa2.yml +openapi_spec_hash: f15bf2b836aee764c02a4fc185f13586 config_hash: 6aaf0fe6f8877c9c5d9af95597123cb4 diff --git a/CHANGELOG.md b/CHANGELOG.md index b57a85d..55ba02f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## 1.25.0 (2025-12-11) + +Full Changelog: [v1.24.0...v1.25.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.24.0...v1.25.0) + +### Features + +* **api:** api update ([3584d59](https://github.com/brand-dot-dev/python-sdk/commit/3584d596dd958801f09f6bc8dc8c805ce77e5351)) + + +### Bug Fixes + +* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([f64c32a](https://github.com/brand-dot-dev/python-sdk/commit/f64c32a4b1a4a7b4560d26fcc14fa9f66961bf5b)) + + +### Chores + +* add missing docstrings ([d511865](https://github.com/brand-dot-dev/python-sdk/commit/d511865b2e098417a8ee142c082938e68db84cfb)) +* **docs:** use environment variables for authentication in code snippets ([ab01c66](https://github.com/brand-dot-dev/python-sdk/commit/ab01c662dc0eeff8e6335f9296c27264fbd27ce2)) +* update lockfile ([8102591](https://github.com/brand-dot-dev/python-sdk/commit/8102591bdc579695e7c9e569962d4e08dedb5ac1)) + ## 1.24.0 (2025-12-01) Full Changelog: [v1.23.0...v1.24.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.23.0...v1.24.0) diff --git a/README.md b/README.md index 5ee938a..03f5619 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ pip install brand.dev[aiohttp] Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: ```python +import os import asyncio from brand.dev import DefaultAioHttpClient from brand.dev import AsyncBrandDev @@ -90,7 +91,7 @@ from brand.dev import AsyncBrandDev async def main() -> None: async with AsyncBrandDev( - api_key="My API Key", + api_key=os.environ.get("BRAND_DEV_API_KEY"), # This is the default and can be omitted http_client=DefaultAioHttpClient(), ) as client: brand = await client.brand.retrieve( diff --git a/pyproject.toml b/pyproject.toml index 41e53ae..819c093 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,22 @@ [project] name = "brand.dev" -version = "1.24.0" +version = "1.25.0" description = "The official Python library for the brand.dev API" dynamic = ["readme"] license = "Apache-2.0" authors = [ { name = "Brand Dev", email = "hello@brand.dev" }, ] + dependencies = [ - "httpx>=0.23.0, <1", - "pydantic>=1.9.0, <3", - "typing-extensions>=4.10, <5", - "anyio>=3.5.0, <5", - "distro>=1.7.0, <2", - "sniffio", + "httpx>=0.23.0, <1", + "pydantic>=1.9.0, <3", + "typing-extensions>=4.10, <5", + "anyio>=3.5.0, <5", + "distro>=1.7.0, <2", + "sniffio", ] + requires-python = ">= 3.9" classifiers = [ "Typing :: Typed", diff --git a/requirements-dev.lock b/requirements-dev.lock index 07ab979..e64ba5e 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -12,40 +12,45 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.12.8 +aiohttp==3.13.2 # via brand-dev # via httpx-aiohttp -aiosignal==1.3.2 +aiosignal==1.4.0 # via aiohttp -annotated-types==0.6.0 +annotated-types==0.7.0 # via pydantic -anyio==4.4.0 +anyio==4.12.0 # via brand-dev # via httpx -argcomplete==3.1.2 +argcomplete==3.6.3 # via nox async-timeout==5.0.1 # via aiohttp -attrs==25.3.0 +attrs==25.4.0 # via aiohttp -certifi==2023.7.22 + # via nox +backports-asyncio-runner==1.2.0 + # via pytest-asyncio +certifi==2025.11.12 # via httpcore # via httpx -colorlog==6.7.0 +colorlog==6.10.1 + # via nox +dependency-groups==1.3.1 # via nox -dirty-equals==0.6.0 -distlib==0.3.7 +dirty-equals==0.11 +distlib==0.4.0 # via virtualenv -distro==1.8.0 +distro==1.9.0 # via brand-dev -exceptiongroup==1.2.2 +exceptiongroup==1.3.1 # via anyio # via pytest -execnet==2.1.1 +execnet==2.1.2 # via pytest-xdist -filelock==3.12.4 +filelock==3.19.1 # via virtualenv -frozenlist==1.6.2 +frozenlist==1.8.0 # via aiohttp # via aiosignal h11==0.16.0 @@ -58,82 +63,87 @@ httpx==0.28.1 # via respx httpx-aiohttp==0.1.9 # via brand-dev -idna==3.4 +humanize==4.13.0 + # via nox +idna==3.11 # via anyio # via httpx # via yarl -importlib-metadata==7.0.0 -iniconfig==2.0.0 +importlib-metadata==8.7.0 +iniconfig==2.1.0 # via pytest markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -multidict==6.4.4 +multidict==6.7.0 # via aiohttp # via yarl mypy==1.17.0 -mypy-extensions==1.0.0 +mypy-extensions==1.1.0 # via mypy -nodeenv==1.8.0 +nodeenv==1.9.1 # via pyright -nox==2023.4.22 -packaging==23.2 +nox==2025.11.12 +packaging==25.0 + # via dependency-groups # via nox # via pytest pathspec==0.12.1 # via mypy -platformdirs==3.11.0 +platformdirs==4.4.0 # via virtualenv -pluggy==1.5.0 +pluggy==1.6.0 # via pytest -propcache==0.3.1 +propcache==0.4.1 # via aiohttp # via yarl -pydantic==2.11.9 +pydantic==2.12.5 # via brand-dev -pydantic-core==2.33.2 +pydantic-core==2.41.5 # via pydantic -pygments==2.18.0 +pygments==2.19.2 + # via pytest # via rich pyright==1.1.399 -pytest==8.3.3 +pytest==8.4.2 # via pytest-asyncio # via pytest-xdist -pytest-asyncio==0.24.0 -pytest-xdist==3.7.0 -python-dateutil==2.8.2 +pytest-asyncio==1.2.0 +pytest-xdist==3.8.0 +python-dateutil==2.9.0.post0 # via time-machine -pytz==2023.3.post1 - # via dirty-equals respx==0.22.0 -rich==13.7.1 -ruff==0.9.4 -setuptools==68.2.2 - # via nodeenv -six==1.16.0 +rich==14.2.0 +ruff==0.14.7 +six==1.17.0 # via python-dateutil -sniffio==1.3.0 - # via anyio +sniffio==1.3.1 # via brand-dev -time-machine==2.9.0 -tomli==2.0.2 +time-machine==2.19.0 +tomli==2.3.0 + # via dependency-groups # via mypy + # via nox # via pytest -typing-extensions==4.12.2 +typing-extensions==4.15.0 + # via aiosignal # via anyio # via brand-dev + # via exceptiongroup # via multidict # via mypy # via pydantic # via pydantic-core # via pyright + # via pytest-asyncio # via typing-inspection -typing-inspection==0.4.1 + # via virtualenv +typing-inspection==0.4.2 # via pydantic -virtualenv==20.24.5 +virtualenv==20.35.4 # via nox -yarl==1.20.0 +yarl==1.22.0 # via aiohttp -zipp==3.17.0 +zipp==3.23.0 # via importlib-metadata diff --git a/requirements.lock b/requirements.lock index 3ac2e1b..a960d32 100644 --- a/requirements.lock +++ b/requirements.lock @@ -12,28 +12,28 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.12.8 +aiohttp==3.13.2 # via brand-dev # via httpx-aiohttp -aiosignal==1.3.2 +aiosignal==1.4.0 # via aiohttp -annotated-types==0.6.0 +annotated-types==0.7.0 # via pydantic -anyio==4.4.0 +anyio==4.12.0 # via brand-dev # via httpx async-timeout==5.0.1 # via aiohttp -attrs==25.3.0 +attrs==25.4.0 # via aiohttp -certifi==2023.7.22 +certifi==2025.11.12 # via httpcore # via httpx -distro==1.8.0 +distro==1.9.0 # via brand-dev -exceptiongroup==1.2.2 +exceptiongroup==1.3.1 # via anyio -frozenlist==1.6.2 +frozenlist==1.8.0 # via aiohttp # via aiosignal h11==0.16.0 @@ -45,31 +45,32 @@ httpx==0.28.1 # via httpx-aiohttp httpx-aiohttp==0.1.9 # via brand-dev -idna==3.4 +idna==3.11 # via anyio # via httpx # via yarl -multidict==6.4.4 +multidict==6.7.0 # via aiohttp # via yarl -propcache==0.3.1 +propcache==0.4.1 # via aiohttp # via yarl pydantic==2.12.5 # via brand-dev pydantic-core==2.41.5 # via pydantic -sniffio==1.3.0 - # via anyio +sniffio==1.3.1 # via brand-dev typing-extensions==4.15.0 + # via aiosignal # via anyio # via brand-dev + # via exceptiongroup # via multidict # via pydantic # via pydantic-core # via typing-inspection typing-inspection==0.4.2 # via pydantic -yarl==1.20.0 +yarl==1.22.0 # via aiohttp diff --git a/src/brand/dev/_types.py b/src/brand/dev/_types.py index b46a2ee..c9ea1de 100644 --- a/src/brand/dev/_types.py +++ b/src/brand/dev/_types.py @@ -243,6 +243,9 @@ class HttpxSendArgs(TypedDict, total=False): if TYPE_CHECKING: # This works because str.__contains__ does not accept object (either in typeshed or at runtime) # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285 + # + # Note: index() and count() methods are intentionally omitted to allow pyright to properly + # infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr. class SequenceNotStr(Protocol[_T_co]): @overload def __getitem__(self, index: SupportsIndex, /) -> _T_co: ... @@ -251,8 +254,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ... def __contains__(self, value: object, /) -> bool: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T_co]: ... - def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ... - def count(self, value: Any, /) -> int: ... def __reversed__(self) -> Iterator[_T_co]: ... else: # just point this to a normal `Sequence` at runtime to avoid having to special case diff --git a/src/brand/dev/_version.py b/src/brand/dev/_version.py index 520080c..0e1f632 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.24.0" # x-release-please-version +__version__ = "1.25.0" # x-release-please-version diff --git a/src/brand/dev/resources/brand.py b/src/brand/dev/resources/brand.py index deb7219..4dfdb9d 100644 --- a/src/brand/dev/resources/brand.py +++ b/src/brand/dev/resources/brand.py @@ -595,6 +595,7 @@ def identify_from_transaction( | Omit = omit, max_speed: bool | Omit = omit, mcc: str | Omit = omit, + phone: float | 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. @@ -624,6 +625,8 @@ def identify_from_transaction( mcc: Optional Merchant Category Code (MCC) to help identify the business category/industry. + phone: Optional phone number from the transaction to help verify brand match. + 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). @@ -651,6 +654,7 @@ def identify_from_transaction( "force_language": force_language, "max_speed": max_speed, "mcc": mcc, + "phone": phone, "timeout_ms": timeout_ms, }, brand_identify_from_transaction_params.BrandIdentifyFromTransactionParams, @@ -2018,6 +2022,7 @@ async def identify_from_transaction( | Omit = omit, max_speed: bool | Omit = omit, mcc: str | Omit = omit, + phone: float | 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. @@ -2047,6 +2052,8 @@ async def identify_from_transaction( mcc: Optional Merchant Category Code (MCC) to help identify the business category/industry. + phone: Optional phone number from the transaction to help verify brand match. + 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). @@ -2074,6 +2081,7 @@ async def identify_from_transaction( "force_language": force_language, "max_speed": max_speed, "mcc": mcc, + "phone": phone, "timeout_ms": timeout_ms, }, brand_identify_from_transaction_params.BrandIdentifyFromTransactionParams, diff --git a/src/brand/dev/types/brand_ai_query_params.py b/src/brand/dev/types/brand_ai_query_params.py index fbfe99a..d45a821 100644 --- a/src/brand/dev/types/brand_ai_query_params.py +++ b/src/brand/dev/types/brand_ai_query_params.py @@ -56,6 +56,8 @@ class DataToExtract(TypedDict, total=False): class SpecificPages(TypedDict, total=False): + """Optional object specifying which pages to analyze""" + about_us: bool """Whether to analyze the about us page""" diff --git a/src/brand/dev/types/brand_identify_from_transaction_params.py b/src/brand/dev/types/brand_identify_from_transaction_params.py index d41c1ce..c509338 100644 --- a/src/brand/dev/types/brand_identify_from_transaction_params.py +++ b/src/brand/dev/types/brand_identify_from_transaction_params.py @@ -331,6 +331,9 @@ class BrandIdentifyFromTransactionParams(TypedDict, total=False): category/industry. """ + phone: float + """Optional phone number from the transaction to help verify brand match.""" + timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")] """Optional timeout in milliseconds for the request. diff --git a/src/brand/dev/types/brand_identify_from_transaction_response.py b/src/brand/dev/types/brand_identify_from_transaction_response.py index 69d4707..5c1261d 100644 --- a/src/brand/dev/types/brand_identify_from_transaction_response.py +++ b/src/brand/dev/types/brand_identify_from_transaction_response.py @@ -25,6 +25,8 @@ class BrandAddress(BaseModel): + """Physical address of the brand""" + city: Optional[str] = None """City name""" @@ -56,6 +58,8 @@ class BrandBackdropColor(BaseModel): class BrandBackdropResolution(BaseModel): + """Resolution of the backdrop image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -340,11 +344,15 @@ class BrandIndustriesEic(BaseModel): class BrandIndustries(BaseModel): + """Industry classification information for the brand""" + eic: Optional[List[BrandIndustriesEic]] = None """Easy Industry Classification - array of industry and subindustry pairs""" class BrandLinks(BaseModel): + """Important website links for the brand""" + blog: Optional[str] = None """URL to the brand's blog or news page""" @@ -373,6 +381,8 @@ class BrandLogoColor(BaseModel): class BrandLogoResolution(BaseModel): + """Resolution of the logo image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -413,6 +423,10 @@ class BrandSocial(BaseModel): class BrandStock(BaseModel): + """ + Stock market information for this brand (will be null if not a publicly traded company) + """ + exchange: Optional[str] = None """Stock exchange name""" @@ -421,6 +435,8 @@ class BrandStock(BaseModel): class Brand(BaseModel): + """Detailed brand information""" + address: Optional[BrandAddress] = None """Physical address of the brand""" diff --git a/src/brand/dev/types/brand_retrieve_by_email_response.py b/src/brand/dev/types/brand_retrieve_by_email_response.py index 47411cd..922fa75 100644 --- a/src/brand/dev/types/brand_retrieve_by_email_response.py +++ b/src/brand/dev/types/brand_retrieve_by_email_response.py @@ -25,6 +25,8 @@ class BrandAddress(BaseModel): + """Physical address of the brand""" + city: Optional[str] = None """City name""" @@ -56,6 +58,8 @@ class BrandBackdropColor(BaseModel): class BrandBackdropResolution(BaseModel): + """Resolution of the backdrop image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -340,11 +344,15 @@ class BrandIndustriesEic(BaseModel): class BrandIndustries(BaseModel): + """Industry classification information for the brand""" + eic: Optional[List[BrandIndustriesEic]] = None """Easy Industry Classification - array of industry and subindustry pairs""" class BrandLinks(BaseModel): + """Important website links for the brand""" + blog: Optional[str] = None """URL to the brand's blog or news page""" @@ -373,6 +381,8 @@ class BrandLogoColor(BaseModel): class BrandLogoResolution(BaseModel): + """Resolution of the logo image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -413,6 +423,10 @@ class BrandSocial(BaseModel): class BrandStock(BaseModel): + """ + Stock market information for this brand (will be null if not a publicly traded company) + """ + exchange: Optional[str] = None """Stock exchange name""" @@ -421,6 +435,8 @@ class BrandStock(BaseModel): class Brand(BaseModel): + """Detailed brand information""" + address: Optional[BrandAddress] = None """Physical address of the brand""" diff --git a/src/brand/dev/types/brand_retrieve_by_isin_response.py b/src/brand/dev/types/brand_retrieve_by_isin_response.py index a9bbe4d..21a860e 100644 --- a/src/brand/dev/types/brand_retrieve_by_isin_response.py +++ b/src/brand/dev/types/brand_retrieve_by_isin_response.py @@ -25,6 +25,8 @@ class BrandAddress(BaseModel): + """Physical address of the brand""" + city: Optional[str] = None """City name""" @@ -56,6 +58,8 @@ class BrandBackdropColor(BaseModel): class BrandBackdropResolution(BaseModel): + """Resolution of the backdrop image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -340,11 +344,15 @@ class BrandIndustriesEic(BaseModel): class BrandIndustries(BaseModel): + """Industry classification information for the brand""" + eic: Optional[List[BrandIndustriesEic]] = None """Easy Industry Classification - array of industry and subindustry pairs""" class BrandLinks(BaseModel): + """Important website links for the brand""" + blog: Optional[str] = None """URL to the brand's blog or news page""" @@ -373,6 +381,8 @@ class BrandLogoColor(BaseModel): class BrandLogoResolution(BaseModel): + """Resolution of the logo image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -413,6 +423,10 @@ class BrandSocial(BaseModel): class BrandStock(BaseModel): + """ + Stock market information for this brand (will be null if not a publicly traded company) + """ + exchange: Optional[str] = None """Stock exchange name""" @@ -421,6 +435,8 @@ class BrandStock(BaseModel): class Brand(BaseModel): + """Detailed brand information""" + address: Optional[BrandAddress] = None """Physical address of the brand""" diff --git a/src/brand/dev/types/brand_retrieve_by_name_response.py b/src/brand/dev/types/brand_retrieve_by_name_response.py index db66fac..1e462e7 100644 --- a/src/brand/dev/types/brand_retrieve_by_name_response.py +++ b/src/brand/dev/types/brand_retrieve_by_name_response.py @@ -25,6 +25,8 @@ class BrandAddress(BaseModel): + """Physical address of the brand""" + city: Optional[str] = None """City name""" @@ -56,6 +58,8 @@ class BrandBackdropColor(BaseModel): class BrandBackdropResolution(BaseModel): + """Resolution of the backdrop image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -340,11 +344,15 @@ class BrandIndustriesEic(BaseModel): class BrandIndustries(BaseModel): + """Industry classification information for the brand""" + eic: Optional[List[BrandIndustriesEic]] = None """Easy Industry Classification - array of industry and subindustry pairs""" class BrandLinks(BaseModel): + """Important website links for the brand""" + blog: Optional[str] = None """URL to the brand's blog or news page""" @@ -373,6 +381,8 @@ class BrandLogoColor(BaseModel): class BrandLogoResolution(BaseModel): + """Resolution of the logo image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -413,6 +423,10 @@ class BrandSocial(BaseModel): class BrandStock(BaseModel): + """ + Stock market information for this brand (will be null if not a publicly traded company) + """ + exchange: Optional[str] = None """Stock exchange name""" @@ -421,6 +435,8 @@ class BrandStock(BaseModel): class Brand(BaseModel): + """Detailed brand information""" + address: Optional[BrandAddress] = None """Physical address of the brand""" diff --git a/src/brand/dev/types/brand_retrieve_by_ticker_response.py b/src/brand/dev/types/brand_retrieve_by_ticker_response.py index 5a04a44..9815a65 100644 --- a/src/brand/dev/types/brand_retrieve_by_ticker_response.py +++ b/src/brand/dev/types/brand_retrieve_by_ticker_response.py @@ -25,6 +25,8 @@ class BrandAddress(BaseModel): + """Physical address of the brand""" + city: Optional[str] = None """City name""" @@ -56,6 +58,8 @@ class BrandBackdropColor(BaseModel): class BrandBackdropResolution(BaseModel): + """Resolution of the backdrop image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -340,11 +344,15 @@ class BrandIndustriesEic(BaseModel): class BrandIndustries(BaseModel): + """Industry classification information for the brand""" + eic: Optional[List[BrandIndustriesEic]] = None """Easy Industry Classification - array of industry and subindustry pairs""" class BrandLinks(BaseModel): + """Important website links for the brand""" + blog: Optional[str] = None """URL to the brand's blog or news page""" @@ -373,6 +381,8 @@ class BrandLogoColor(BaseModel): class BrandLogoResolution(BaseModel): + """Resolution of the logo image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -413,6 +423,10 @@ class BrandSocial(BaseModel): class BrandStock(BaseModel): + """ + Stock market information for this brand (will be null if not a publicly traded company) + """ + exchange: Optional[str] = None """Stock exchange name""" @@ -421,6 +435,8 @@ class BrandStock(BaseModel): class Brand(BaseModel): + """Detailed brand information""" + address: Optional[BrandAddress] = None """Physical address of the brand""" diff --git a/src/brand/dev/types/brand_retrieve_response.py b/src/brand/dev/types/brand_retrieve_response.py index b120889..28aea6f 100644 --- a/src/brand/dev/types/brand_retrieve_response.py +++ b/src/brand/dev/types/brand_retrieve_response.py @@ -25,6 +25,8 @@ class BrandAddress(BaseModel): + """Physical address of the brand""" + city: Optional[str] = None """City name""" @@ -56,6 +58,8 @@ class BrandBackdropColor(BaseModel): class BrandBackdropResolution(BaseModel): + """Resolution of the backdrop image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -340,11 +344,15 @@ class BrandIndustriesEic(BaseModel): class BrandIndustries(BaseModel): + """Industry classification information for the brand""" + eic: Optional[List[BrandIndustriesEic]] = None """Easy Industry Classification - array of industry and subindustry pairs""" class BrandLinks(BaseModel): + """Important website links for the brand""" + blog: Optional[str] = None """URL to the brand's blog or news page""" @@ -373,6 +381,8 @@ class BrandLogoColor(BaseModel): class BrandLogoResolution(BaseModel): + """Resolution of the logo image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -413,6 +423,10 @@ class BrandSocial(BaseModel): class BrandStock(BaseModel): + """ + Stock market information for this brand (will be null if not a publicly traded company) + """ + exchange: Optional[str] = None """Stock exchange name""" @@ -421,6 +435,8 @@ class BrandStock(BaseModel): class Brand(BaseModel): + """Detailed brand information""" + address: Optional[BrandAddress] = None """Physical address of the brand""" diff --git a/src/brand/dev/types/brand_retrieve_simplified_response.py b/src/brand/dev/types/brand_retrieve_simplified_response.py index 523fe18..819e408 100644 --- a/src/brand/dev/types/brand_retrieve_simplified_response.py +++ b/src/brand/dev/types/brand_retrieve_simplified_response.py @@ -27,6 +27,8 @@ class BrandBackdropColor(BaseModel): class BrandBackdropResolution(BaseModel): + """Resolution of the backdrop image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -65,6 +67,8 @@ class BrandLogoColor(BaseModel): class BrandLogoResolution(BaseModel): + """Resolution of the logo image""" + aspect_ratio: Optional[float] = None """Aspect ratio of the image (width/height)""" @@ -97,6 +101,8 @@ class BrandLogo(BaseModel): class Brand(BaseModel): + """Simplified brand information""" + backdrops: Optional[List[BrandBackdrop]] = None """An array of backdrop images for the brand""" diff --git a/src/brand/dev/types/brand_styleguide_response.py b/src/brand/dev/types/brand_styleguide_response.py index 0cc5aa7..35b51b3 100644 --- a/src/brand/dev/types/brand_styleguide_response.py +++ b/src/brand/dev/types/brand_styleguide_response.py @@ -30,6 +30,8 @@ class StyleguideColors(BaseModel): + """Primary colors used on the website""" + accent: Optional[str] = None """Accent color of the website (hex format)""" @@ -41,6 +43,8 @@ class StyleguideColors(BaseModel): class StyleguideComponentsButtonLink(BaseModel): + """Link button style""" + background_color: Optional[str] = FieldInfo(alias="backgroundColor", default=None) border_color: Optional[str] = FieldInfo(alias="borderColor", default=None) @@ -65,6 +69,8 @@ class StyleguideComponentsButtonLink(BaseModel): class StyleguideComponentsButtonPrimary(BaseModel): + """Primary button style""" + background_color: Optional[str] = FieldInfo(alias="backgroundColor", default=None) border_color: Optional[str] = FieldInfo(alias="borderColor", default=None) @@ -89,6 +95,8 @@ class StyleguideComponentsButtonPrimary(BaseModel): class StyleguideComponentsButtonSecondary(BaseModel): + """Secondary button style""" + background_color: Optional[str] = FieldInfo(alias="backgroundColor", default=None) border_color: Optional[str] = FieldInfo(alias="borderColor", default=None) @@ -113,6 +121,8 @@ class StyleguideComponentsButtonSecondary(BaseModel): class StyleguideComponentsButton(BaseModel): + """Button component styles""" + link: Optional[StyleguideComponentsButtonLink] = None """Link button style""" @@ -124,6 +134,8 @@ class StyleguideComponentsButton(BaseModel): class StyleguideComponentsCard(BaseModel): + """Card component style""" + background_color: Optional[str] = FieldInfo(alias="backgroundColor", default=None) border_color: Optional[str] = FieldInfo(alias="borderColor", default=None) @@ -142,6 +154,8 @@ class StyleguideComponentsCard(BaseModel): class StyleguideComponents(BaseModel): + """UI component styles""" + button: Optional[StyleguideComponentsButton] = None """Button component styles""" @@ -150,6 +164,8 @@ class StyleguideComponents(BaseModel): class StyleguideElementSpacing(BaseModel): + """Spacing system used on the website""" + lg: Optional[str] = None """Large spacing value""" @@ -167,6 +183,8 @@ class StyleguideElementSpacing(BaseModel): class StyleguideShadows(BaseModel): + """Shadow styles used on the website""" + inner: Optional[str] = None """Inner shadow value""" @@ -232,6 +250,8 @@ class StyleguideTypographyHeadingsH4(BaseModel): class StyleguideTypographyHeadings(BaseModel): + """Heading styles""" + h1: Optional[StyleguideTypographyHeadingsH1] = None h2: Optional[StyleguideTypographyHeadingsH2] = None @@ -242,6 +262,8 @@ class StyleguideTypographyHeadings(BaseModel): class StyleguideTypographyP(BaseModel): + """Paragraph text styles""" + font_family: Optional[str] = FieldInfo(alias="fontFamily", default=None) font_size: Optional[str] = FieldInfo(alias="fontSize", default=None) @@ -254,6 +276,8 @@ class StyleguideTypographyP(BaseModel): class StyleguideTypography(BaseModel): + """Typography styles used on the website""" + headings: Optional[StyleguideTypographyHeadings] = None """Heading styles""" @@ -262,6 +286,8 @@ class StyleguideTypography(BaseModel): class Styleguide(BaseModel): + """Comprehensive styleguide data extracted from the website""" + colors: Optional[StyleguideColors] = None """Primary colors used on the website""" diff --git a/tests/api_resources/test_brand.py b/tests/api_resources/test_brand.py index 204ab75..09aaa86 100644 --- a/tests/api_resources/test_brand.py +++ b/tests/api_resources/test_brand.py @@ -222,6 +222,7 @@ def test_method_identify_from_transaction_with_all_params(self, client: BrandDev force_language="albanian", max_speed=True, mcc="mcc", + phone=0, timeout_ms=1, ) assert_matches_type(BrandIdentifyFromTransactionResponse, brand, path=["response"]) @@ -848,6 +849,7 @@ async def test_method_identify_from_transaction_with_all_params(self, async_clie force_language="albanian", max_speed=True, mcc="mcc", + phone=0, timeout_ms=1, ) assert_matches_type(BrandIdentifyFromTransactionResponse, brand, path=["response"])