Skip to content

Commit f3530fe

Browse files
authored
Merge pull request #37 from brand-dot-dev/release-please--branches--main--changes--next
release: 1.31.0
2 parents 5a1f0b3 + 9ad1c1d commit f3530fe

File tree

8 files changed

+274
-61
lines changed

8 files changed

+274
-61
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.30.0"
2+
".": "1.31.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 15
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-73562e26b663cf10185b9e98966accf5f151c6d3cf99b5e060ce5a847045e383.yml
3-
openapi_spec_hash: bf5994966b84f9dda998ad5059ff8318
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-10f7ae53f4fe4f2394c22788b648d9db742a178ed41a87beb39de741660e646b.yml
3+
openapi_spec_hash: 9885c47a02677471a38f16dddbad1823
44
config_hash: 6f10592c7d0c3bafefc1271472283217

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 1.31.0 (2026-02-07)
4+
5+
Full Changelog: [v1.30.0...v1.31.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.30.0...v1.31.0)
6+
7+
### Features
8+
9+
* **api:** api update ([09fa73a](https://github.com/brand-dot-dev/python-sdk/commit/09fa73a99432c4a131bba9d924d38f12a9537e51))
10+
311
## 1.30.0 (2026-02-07)
412

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "brand.dev"
3-
version = "1.30.0"
3+
version = "1.31.0"
44
description = "The official Python library for the brand.dev API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/brand/dev/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "brand.dev"
4-
__version__ = "1.30.0" # x-release-please-version
4+
__version__ = "1.31.0" # x-release-please-version

src/brand/dev/resources/brand.py

Lines changed: 124 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Iterable
6-
from typing_extensions import Literal
6+
from typing_extensions import Literal, overload
77

88
import httpx
99

@@ -25,7 +25,7 @@
2525
brand_identify_from_transaction_params,
2626
)
2727
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
28-
from .._utils import maybe_transform, async_maybe_transform
28+
from .._utils import required_args, maybe_transform, async_maybe_transform
2929
from .._compat import cached_property
3030
from .._resource import SyncAPIResource, AsyncAPIResource
3131
from .._response import (
@@ -189,11 +189,11 @@ def retrieve(
189189
cast_to=BrandRetrieveResponse,
190190
)
191191

192+
@overload
192193
def ai_products(
193194
self,
194195
*,
195-
direct_url: str | Omit = omit,
196-
domain: str | Omit = omit,
196+
domain: str,
197197
max_products: int | Omit = omit,
198198
timeout_ms: int | Omit = omit,
199199
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -210,19 +210,51 @@ def ai_products(
210210
description, image, pricing, features, and more.
211211
212212
Args:
213-
direct_url: A specific URL to use directly as the starting point for extraction without
214-
domain resolution. Useful when you want to extract products from a specific page
215-
rather than discovering the site's product pages automatically. Either 'domain'
216-
or 'directUrl' must be provided, but not both.
213+
domain: The domain name to analyze.
214+
215+
max_products: Maximum number of products to extract.
216+
217+
timeout_ms: Optional timeout in milliseconds for the request. Maximum allowed value is
218+
300000ms (5 minutes).
219+
220+
extra_headers: Send extra headers
221+
222+
extra_query: Add additional query parameters to the request
223+
224+
extra_body: Add additional JSON properties to the request
225+
226+
timeout: Override the client-level default timeout for this request, in seconds
227+
"""
228+
...
229+
230+
@overload
231+
def ai_products(
232+
self,
233+
*,
234+
direct_url: str,
235+
max_products: int | Omit = omit,
236+
timeout_ms: int | Omit = omit,
237+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
238+
# The extra values given here take precedence over values defined on the client or passed to this method.
239+
extra_headers: Headers | None = None,
240+
extra_query: Query | None = None,
241+
extra_body: Body | None = None,
242+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
243+
) -> BrandAIProductsResponse:
244+
"""Beta feature: Extract product information from a brand's website.
217245
218-
domain: The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but
219-
not both.
246+
Brand.dev will
247+
analyze the website and return a list of products with details such as name,
248+
description, image, pricing, features, and more.
249+
250+
Args:
251+
direct_url: A specific URL to use directly as the starting point for extraction without
252+
domain resolution.
220253
221254
max_products: Maximum number of products to extract.
222255
223-
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
224-
than this value, it will be aborted with a 408 status code. Maximum allowed
225-
value is 300000ms (5 minutes).
256+
timeout_ms: Optional timeout in milliseconds for the request. Maximum allowed value is
257+
300000ms (5 minutes).
226258
227259
extra_headers: Send extra headers
228260
@@ -232,14 +264,31 @@ def ai_products(
232264
233265
timeout: Override the client-level default timeout for this request, in seconds
234266
"""
267+
...
268+
269+
@required_args(["domain"], ["direct_url"])
270+
def ai_products(
271+
self,
272+
*,
273+
domain: str | Omit = omit,
274+
max_products: int | Omit = omit,
275+
timeout_ms: int | Omit = omit,
276+
direct_url: str | Omit = omit,
277+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
278+
# The extra values given here take precedence over values defined on the client or passed to this method.
279+
extra_headers: Headers | None = None,
280+
extra_query: Query | None = None,
281+
extra_body: Body | None = None,
282+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
283+
) -> BrandAIProductsResponse:
235284
return self._post(
236285
"/brand/ai/products",
237286
body=maybe_transform(
238287
{
239-
"direct_url": direct_url,
240288
"domain": domain,
241289
"max_products": max_products,
242290
"timeout_ms": timeout_ms,
291+
"direct_url": direct_url,
243292
},
244293
brand_ai_products_params.BrandAIProductsParams,
245294
),
@@ -1736,11 +1785,11 @@ async def retrieve(
17361785
cast_to=BrandRetrieveResponse,
17371786
)
17381787

1788+
@overload
17391789
async def ai_products(
17401790
self,
17411791
*,
1742-
direct_url: str | Omit = omit,
1743-
domain: str | Omit = omit,
1792+
domain: str,
17441793
max_products: int | Omit = omit,
17451794
timeout_ms: int | Omit = omit,
17461795
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1757,19 +1806,51 @@ async def ai_products(
17571806
description, image, pricing, features, and more.
17581807
17591808
Args:
1760-
direct_url: A specific URL to use directly as the starting point for extraction without
1761-
domain resolution. Useful when you want to extract products from a specific page
1762-
rather than discovering the site's product pages automatically. Either 'domain'
1763-
or 'directUrl' must be provided, but not both.
1809+
domain: The domain name to analyze.
1810+
1811+
max_products: Maximum number of products to extract.
1812+
1813+
timeout_ms: Optional timeout in milliseconds for the request. Maximum allowed value is
1814+
300000ms (5 minutes).
1815+
1816+
extra_headers: Send extra headers
1817+
1818+
extra_query: Add additional query parameters to the request
1819+
1820+
extra_body: Add additional JSON properties to the request
1821+
1822+
timeout: Override the client-level default timeout for this request, in seconds
1823+
"""
1824+
...
1825+
1826+
@overload
1827+
async def ai_products(
1828+
self,
1829+
*,
1830+
direct_url: str,
1831+
max_products: int | Omit = omit,
1832+
timeout_ms: int | Omit = omit,
1833+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1834+
# The extra values given here take precedence over values defined on the client or passed to this method.
1835+
extra_headers: Headers | None = None,
1836+
extra_query: Query | None = None,
1837+
extra_body: Body | None = None,
1838+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
1839+
) -> BrandAIProductsResponse:
1840+
"""Beta feature: Extract product information from a brand's website.
17641841
1765-
domain: The domain name to analyze. Either 'domain' or 'directUrl' must be provided, but
1766-
not both.
1842+
Brand.dev will
1843+
analyze the website and return a list of products with details such as name,
1844+
description, image, pricing, features, and more.
1845+
1846+
Args:
1847+
direct_url: A specific URL to use directly as the starting point for extraction without
1848+
domain resolution.
17671849
17681850
max_products: Maximum number of products to extract.
17691851
1770-
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
1771-
than this value, it will be aborted with a 408 status code. Maximum allowed
1772-
value is 300000ms (5 minutes).
1852+
timeout_ms: Optional timeout in milliseconds for the request. Maximum allowed value is
1853+
300000ms (5 minutes).
17731854
17741855
extra_headers: Send extra headers
17751856
@@ -1779,14 +1860,31 @@ async def ai_products(
17791860
17801861
timeout: Override the client-level default timeout for this request, in seconds
17811862
"""
1863+
...
1864+
1865+
@required_args(["domain"], ["direct_url"])
1866+
async def ai_products(
1867+
self,
1868+
*,
1869+
domain: str | Omit = omit,
1870+
max_products: int | Omit = omit,
1871+
timeout_ms: int | Omit = omit,
1872+
direct_url: str | Omit = omit,
1873+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1874+
# The extra values given here take precedence over values defined on the client or passed to this method.
1875+
extra_headers: Headers | None = None,
1876+
extra_query: Query | None = None,
1877+
extra_body: Body | None = None,
1878+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
1879+
) -> BrandAIProductsResponse:
17821880
return await self._post(
17831881
"/brand/ai/products",
17841882
body=await async_maybe_transform(
17851883
{
1786-
"direct_url": direct_url,
17871884
"domain": domain,
17881885
"max_products": max_products,
17891886
"timeout_ms": timeout_ms,
1887+
"direct_url": direct_url,
17901888
},
17911889
brand_ai_products_params.BrandAIProductsParams,
17921890
),

src/brand/dev/types/brand_ai_products_params.py

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,33 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Annotated, TypedDict
5+
from typing import Union
6+
from typing_extensions import Required, Annotated, TypeAlias, TypedDict
67

78
from .._utils import PropertyInfo
89

9-
__all__ = ["BrandAIProductsParams"]
10+
__all__ = ["BrandAIProductsParams", "ByDomain", "ByDirectURL"]
1011

1112

12-
class BrandAIProductsParams(TypedDict, total=False):
13-
direct_url: Annotated[str, PropertyInfo(alias="directUrl")]
14-
"""
15-
A specific URL to use directly as the starting point for extraction without
16-
domain resolution. Useful when you want to extract products from a specific page
17-
rather than discovering the site's product pages automatically. Either 'domain'
18-
or 'directUrl' must be provided, but not both.
13+
class ByDomain(TypedDict, total=False):
14+
domain: Required[str]
15+
"""The domain name to analyze."""
16+
17+
max_products: Annotated[int, PropertyInfo(alias="maxProducts")]
18+
"""Maximum number of products to extract."""
19+
20+
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
21+
"""Optional timeout in milliseconds for the request.
22+
23+
Maximum allowed value is 300000ms (5 minutes).
1924
"""
2025

21-
domain: str
22-
"""The domain name to analyze.
2326

24-
Either 'domain' or 'directUrl' must be provided, but not both.
27+
class ByDirectURL(TypedDict, total=False):
28+
direct_url: Required[Annotated[str, PropertyInfo(alias="directUrl")]]
29+
"""
30+
A specific URL to use directly as the starting point for extraction without
31+
domain resolution.
2532
"""
2633

2734
max_products: Annotated[int, PropertyInfo(alias="maxProducts")]
@@ -30,6 +37,8 @@ class BrandAIProductsParams(TypedDict, total=False):
3037
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
3138
"""Optional timeout in milliseconds for the request.
3239
33-
If the request takes longer than this value, it will be aborted with a 408
34-
status code. Maximum allowed value is 300000ms (5 minutes).
40+
Maximum allowed value is 300000ms (5 minutes).
3541
"""
42+
43+
44+
BrandAIProductsParams: TypeAlias = Union[ByDomain, ByDirectURL]

0 commit comments

Comments
 (0)