Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.29.0"
".": "1.30.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 15
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-737dbedd830e2c989387e90a9bb5baa3915306ecfef2e46b09d02cb1879f043c.yml
openapi_spec_hash: 7bc21f4c6d5fd39c1a3b22626846ca87
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-73562e26b663cf10185b9e98966accf5f151c6d3cf99b5e060ce5a847045e383.yml
openapi_spec_hash: bf5994966b84f9dda998ad5059ff8318
config_hash: 6f10592c7d0c3bafefc1271472283217
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.30.0 (2026-02-07)

Full Changelog: [v1.29.0...v1.30.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.29.0...v1.30.0)

### Features

* **api:** api update ([c94b956](https://github.com/brand-dot-dev/python-sdk/commit/c94b95672e4a684f5375f1b48f351c0839be1fdc))

## 1.29.0 (2026-02-02)

Full Changelog: [v1.28.0...v1.29.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.28.0...v1.29.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "brand.dev"
version = "1.29.0"
version = "1.30.0"
description = "The official Python library for the brand.dev API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/brand/dev/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "brand.dev"
__version__ = "1.29.0" # x-release-please-version
__version__ = "1.30.0" # x-release-please-version
24 changes: 20 additions & 4 deletions src/brand/dev/resources/brand.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ def retrieve(
def ai_products(
self,
*,
domain: str,
direct_url: str | Omit = omit,
domain: str | Omit = omit,
max_products: int | 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.
Expand All @@ -209,7 +210,13 @@ def ai_products(
description, image, pricing, features, and more.

Args:
domain: The domain name to analyze
direct_url: A specific URL to use directly as the starting point for extraction without
domain resolution. Useful when you want to extract products from a specific page
rather than discovering the site's product pages automatically. Either 'domain'
or 'directUrl' must be provided, but not both.

domain: The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but
not both.

max_products: Maximum number of products to extract.

Expand All @@ -229,6 +236,7 @@ def ai_products(
"/brand/ai/products",
body=maybe_transform(
{
"direct_url": direct_url,
"domain": domain,
"max_products": max_products,
"timeout_ms": timeout_ms,
Expand Down Expand Up @@ -1731,7 +1739,8 @@ async def retrieve(
async def ai_products(
self,
*,
domain: str,
direct_url: str | Omit = omit,
domain: str | Omit = omit,
max_products: int | 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.
Expand All @@ -1748,7 +1757,13 @@ async def ai_products(
description, image, pricing, features, and more.

Args:
domain: The domain name to analyze
direct_url: A specific URL to use directly as the starting point for extraction without
domain resolution. Useful when you want to extract products from a specific page
rather than discovering the site's product pages automatically. Either 'domain'
or 'directUrl' must be provided, but not both.

domain: The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but
not both.

max_products: Maximum number of products to extract.

Expand All @@ -1768,6 +1783,7 @@ async def ai_products(
"/brand/ai/products",
body=await async_maybe_transform(
{
"direct_url": direct_url,
"domain": domain,
"max_products": max_products,
"timeout_ms": timeout_ms,
Expand Down
17 changes: 14 additions & 3 deletions src/brand/dev/types/brand_ai_products_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,27 @@

from __future__ import annotations

from typing_extensions import Required, Annotated, TypedDict
from typing_extensions import Annotated, TypedDict

from .._utils import PropertyInfo

__all__ = ["BrandAIProductsParams"]


class BrandAIProductsParams(TypedDict, total=False):
domain: Required[str]
"""The domain name to analyze"""
direct_url: Annotated[str, PropertyInfo(alias="directUrl")]
"""
A specific URL to use directly as the starting point for extraction without
domain resolution. Useful when you want to extract products from a specific page
rather than discovering the site's product pages automatically. Either 'domain'
or 'directUrl' must be provided, but not both.
"""

domain: str
"""The domain name to analyze.

Either 'domain' or 'directUrl' must be provided, but not both.
"""

max_products: Annotated[int, PropertyInfo(alias="maxProducts")]
"""Maximum number of products to extract."""
Expand Down
26 changes: 8 additions & 18 deletions tests/api_resources/test_brand.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,14 @@ def test_streaming_response_retrieve(self, client: BrandDev) -> None:
@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
def test_method_ai_products(self, client: BrandDev) -> None:
brand = client.brand.ai_products(
domain="domain",
)
brand = client.brand.ai_products()
assert_matches_type(BrandAIProductsResponse, brand, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
def test_method_ai_products_with_all_params(self, client: BrandDev) -> None:
brand = client.brand.ai_products(
direct_url="https://example.com",
domain="domain",
max_products=1,
timeout_ms=1,
Expand All @@ -99,9 +98,7 @@ def test_method_ai_products_with_all_params(self, client: BrandDev) -> None:
@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
def test_raw_response_ai_products(self, client: BrandDev) -> None:
response = client.brand.with_raw_response.ai_products(
domain="domain",
)
response = client.brand.with_raw_response.ai_products()

assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -111,9 +108,7 @@ def test_raw_response_ai_products(self, client: BrandDev) -> None:
@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
def test_streaming_response_ai_products(self, client: BrandDev) -> None:
with client.brand.with_streaming_response.ai_products(
domain="domain",
) as response:
with client.brand.with_streaming_response.ai_products() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

Expand Down Expand Up @@ -803,15 +798,14 @@ async def test_streaming_response_retrieve(self, async_client: AsyncBrandDev) ->
@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
async def test_method_ai_products(self, async_client: AsyncBrandDev) -> None:
brand = await async_client.brand.ai_products(
domain="domain",
)
brand = await async_client.brand.ai_products()
assert_matches_type(BrandAIProductsResponse, brand, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
async def test_method_ai_products_with_all_params(self, async_client: AsyncBrandDev) -> None:
brand = await async_client.brand.ai_products(
direct_url="https://example.com",
domain="domain",
max_products=1,
timeout_ms=1,
Expand All @@ -821,9 +815,7 @@ async def test_method_ai_products_with_all_params(self, async_client: AsyncBrand
@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
async def test_raw_response_ai_products(self, async_client: AsyncBrandDev) -> None:
response = await async_client.brand.with_raw_response.ai_products(
domain="domain",
)
response = await async_client.brand.with_raw_response.ai_products()

assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -833,9 +825,7 @@ async def test_raw_response_ai_products(self, async_client: AsyncBrandDev) -> No
@pytest.mark.skip(reason="Prism tests are disabled")
@parametrize
async def test_streaming_response_ai_products(self, async_client: AsyncBrandDev) -> None:
async with async_client.brand.with_streaming_response.ai_products(
domain="domain",
) as response:
async with async_client.brand.with_streaming_response.ai_products() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

Expand Down