From 6d6658cd07e8ac63eb3e8dabcdcacb9e9b434eac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 04:07:10 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 ++-- src/brand/dev/types/brand_ai_query_params.py | 18 +++++++++++++++++- src/brand/dev/types/brand_ai_query_response.py | 8 ++++++-- tests/api_resources/test_brand.py | 12 ++++++++++++ 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index e312258..c86b8f0 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-f69782c2c4296df9db6b41a3a7359a9e4910f59e34901b9f0e8045cec3f9ca69.yml -openapi_spec_hash: f06c3956a6fc7e57614b120910339747 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-e685328e362a28f152bcadfd1ca49680a80bfb7a3834fd422f2e459507305405.yml +openapi_spec_hash: 475543f86e39715f76588de6ccf70beb config_hash: 6aaf0fe6f8877c9c5d9af95597123cb4 diff --git a/src/brand/dev/types/brand_ai_query_params.py b/src/brand/dev/types/brand_ai_query_params.py index 303a508..fbfe99a 100644 --- a/src/brand/dev/types/brand_ai_query_params.py +++ b/src/brand/dev/types/brand_ai_query_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Iterable +from typing import Dict, Iterable from typing_extensions import Literal, Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -41,6 +41,19 @@ class DataToExtract(TypedDict, total=False): datapoint_type: Required[Literal["text", "number", "date", "boolean", "list", "url"]] """Type of the data point""" + datapoint_list_type: Literal["string", "text", "number", "date", "boolean", "list", "url", "object"] + """Type of items in the list when datapoint_type is 'list'. + + Defaults to 'string'. Use 'object' to extract an array of objects matching a + schema. + """ + + datapoint_object_schema: Dict[str, Literal["string", "number", "date", "boolean"]] + """Schema definition for objects when datapoint_list_type is 'object'. + + Provide a map of field names to their scalar types. + """ + class SpecificPages(TypedDict, total=False): about_us: bool @@ -61,6 +74,9 @@ class SpecificPages(TypedDict, total=False): home_page: bool """Whether to analyze the home page""" + pricing: bool + """Whether to analyze the pricing page""" + privacy_policy: bool """Whether to analyze the privacy policy page""" diff --git a/src/brand/dev/types/brand_ai_query_response.py b/src/brand/dev/types/brand_ai_query_response.py index 53edd47..9971458 100644 --- a/src/brand/dev/types/brand_ai_query_response.py +++ b/src/brand/dev/types/brand_ai_query_response.py @@ -11,8 +11,12 @@ class DataExtracted(BaseModel): datapoint_name: Optional[str] = None """Name of the extracted data point""" - datapoint_value: Union[str, float, bool, List[str], List[float], None] = None - """Value of the extracted data point""" + datapoint_value: Union[str, float, bool, List[str], List[float], List[object], None] = None + """Value of the extracted data point. + + Can be a primitive type, an array of primitives, or an array of objects when + datapoint_list_type is 'object'. + """ class BrandAIQueryResponse(BaseModel): diff --git a/tests/api_resources/test_brand.py b/tests/api_resources/test_brand.py index 43fa03b..204ab75 100644 --- a/tests/api_resources/test_brand.py +++ b/tests/api_resources/test_brand.py @@ -96,6 +96,11 @@ def test_method_ai_query_with_all_params(self, client: BrandDev) -> None: "datapoint_example": "datapoint_example", "datapoint_name": "datapoint_name", "datapoint_type": "text", + "datapoint_list_type": "string", + "datapoint_object_schema": { + "testimonial_text": "string", + "testimonial_author": "string", + }, } ], domain="domain", @@ -106,6 +111,7 @@ def test_method_ai_query_with_all_params(self, client: BrandDev) -> None: "contact_us": True, "faq": True, "home_page": True, + "pricing": True, "privacy_policy": True, "terms_and_conditions": True, }, @@ -716,6 +722,11 @@ async def test_method_ai_query_with_all_params(self, async_client: AsyncBrandDev "datapoint_example": "datapoint_example", "datapoint_name": "datapoint_name", "datapoint_type": "text", + "datapoint_list_type": "string", + "datapoint_object_schema": { + "testimonial_text": "string", + "testimonial_author": "string", + }, } ], domain="domain", @@ -726,6 +737,7 @@ async def test_method_ai_query_with_all_params(self, async_client: AsyncBrandDev "contact_us": True, "faq": True, "home_page": True, + "pricing": True, "privacy_policy": True, "terms_and_conditions": True, }, From 273a4d56a906237dee6096502b2c5eeac960900b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 04:07:26 +0000 Subject: [PATCH 2/2] release: 1.24.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 cdcf20e..bfaab56 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.23.0" + ".": "1.24.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index dc9a3ea..b57a85d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 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) + +### Features + +* **api:** api update ([6d6658c](https://github.com/brand-dot-dev/python-sdk/commit/6d6658cd07e8ac63eb3e8dabcdcacb9e9b434eac)) + ## 1.23.0 (2025-11-29) Full Changelog: [v1.22.0...v1.23.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.22.0...v1.23.0) diff --git a/pyproject.toml b/pyproject.toml index 611985f..41e53ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "brand.dev" -version = "1.23.0" +version = "1.24.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 0745ee5..520080c 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.23.0" # x-release-please-version +__version__ = "1.24.0" # x-release-please-version