diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4bce58a..507912c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.41.0" + ".": "1.42.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 9f87d60..2c5f954 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-fb4ca438793aa469ccc6d74266351ce4ad23b90521c62690755940dc7758225b.yml -openapi_spec_hash: caaf8fcba98e886cef121c2845ecbc57 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-c91b0567307b069c250d073074b7c861b64e632a8380b24925e15d981846bb43.yml +openapi_spec_hash: e479aa097b1283c2acf19d6360787449 config_hash: 91cf2dcefb99c39eb9cd3e98e15d6011 diff --git a/CHANGELOG.md b/CHANGELOG.md index d860673..9f777b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 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) + +### Features + +* **api:** api update ([390760b](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/390760b95536c4c33df15159da8d5376971461c1)) +* **api:** api update ([6e85f32](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/6e85f322b7317b82f7d400263f8980434351a8cd)) +* **internal:** implement indices array format for query and form serialization ([6e12fab](https://github.com/context-dot-dev/deprecated-brand-python-sdk/commit/6e12fab6f4d3a77719729ad86207903e600adcef)) + ## 1.41.0 (2026-03-25) Full Changelog: [v1.40.0...v1.41.0](https://github.com/context-dot-dev/deprecated-brand-python-sdk/compare/v1.40.0...v1.41.0) diff --git a/pyproject.toml b/pyproject.toml index de8148f..28dc0ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "brand.dev" -version = "1.41.0" +version = "1.42.0" description = "The official Python library for the brand.dev API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/brand/dev/_qs.py b/src/brand/dev/_qs.py index ada6fd3..de8c99b 100644 --- a/src/brand/dev/_qs.py +++ b/src/brand/dev/_qs.py @@ -101,7 +101,10 @@ def _stringify_item( items.extend(self._stringify_item(key, item, opts)) return items elif array_format == "indices": - raise NotImplementedError("The array indices format is not supported yet") + items = [] + for i, item in enumerate(value): + items.extend(self._stringify_item(f"{key}[{i}]", item, opts)) + return items elif array_format == "brackets": items = [] key = key + "[]" diff --git a/src/brand/dev/_version.py b/src/brand/dev/_version.py index 42c86ee..f9a8340 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.41.0" # x-release-please-version +__version__ = "1.42.0" # x-release-please-version diff --git a/src/brand/dev/resources/brand.py b/src/brand/dev/resources/brand.py index 1506403..86fccc7 100644 --- a/src/brand/dev/resources/brand.py +++ b/src/brand/dev/resources/brand.py @@ -2066,6 +2066,7 @@ def web_scrape_md( include_images: bool | Omit = omit, include_links: bool | Omit = omit, shorten_base64_images: bool | Omit = omit, + use_main_content_only: bool | 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. extra_headers: Headers | None = None, @@ -2087,6 +2088,9 @@ def web_scrape_md( shorten_base64_images: Shorten base64-encoded image data in the Markdown output + use_main_content_only: Extract only the main content of the page, excluding headers, footers, sidebars, + and navigation + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2108,6 +2112,7 @@ def web_scrape_md( "include_images": include_images, "include_links": include_links, "shorten_base64_images": shorten_base64_images, + "use_main_content_only": use_main_content_only, }, brand_web_scrape_md_params.BrandWebScrapeMdParams, ), @@ -4170,6 +4175,7 @@ async def web_scrape_md( include_images: bool | Omit = omit, include_links: bool | Omit = omit, shorten_base64_images: bool | Omit = omit, + use_main_content_only: bool | 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. extra_headers: Headers | None = None, @@ -4191,6 +4197,9 @@ async def web_scrape_md( shorten_base64_images: Shorten base64-encoded image data in the Markdown output + use_main_content_only: Extract only the main content of the page, excluding headers, footers, sidebars, + and navigation + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -4212,6 +4221,7 @@ async def web_scrape_md( "include_images": include_images, "include_links": include_links, "shorten_base64_images": shorten_base64_images, + "use_main_content_only": use_main_content_only, }, brand_web_scrape_md_params.BrandWebScrapeMdParams, ), diff --git a/src/brand/dev/types/brand_web_scrape_images_response.py b/src/brand/dev/types/brand_web_scrape_images_response.py index e97d79a..7f475f8 100644 --- a/src/brand/dev/types/brand_web_scrape_images_response.py +++ b/src/brand/dev/types/brand_web_scrape_images_response.py @@ -12,7 +12,7 @@ class Image(BaseModel): alt: Optional[str] = None """Alt text of the image, or null if not present""" - element: Literal["img", "svg", "link", "source", "video"] + element: Literal["img", "svg", "link", "source", "video", "css", "object", "meta", "background"] """The HTML element the image was found in""" src: str diff --git a/src/brand/dev/types/brand_web_scrape_md_params.py b/src/brand/dev/types/brand_web_scrape_md_params.py index bf8c2e1..6bf905e 100644 --- a/src/brand/dev/types/brand_web_scrape_md_params.py +++ b/src/brand/dev/types/brand_web_scrape_md_params.py @@ -24,3 +24,9 @@ class BrandWebScrapeMdParams(TypedDict, total=False): shorten_base64_images: Annotated[bool, PropertyInfo(alias="shortenBase64Images")] """Shorten base64-encoded image data in the Markdown output""" + + use_main_content_only: Annotated[bool, PropertyInfo(alias="useMainContentOnly")] + """ + Extract only the main content of the page, excluding headers, footers, sidebars, + and navigation + """ diff --git a/tests/api_resources/test_brand.py b/tests/api_resources/test_brand.py index 769b100..bc49440 100644 --- a/tests/api_resources/test_brand.py +++ b/tests/api_resources/test_brand.py @@ -922,6 +922,7 @@ def test_method_web_scrape_md_with_all_params(self, client: BrandDev) -> None: include_images=True, include_links=True, shorten_base64_images=True, + use_main_content_only=True, ) assert_matches_type(BrandWebScrapeMdResponse, brand, path=["response"]) @@ -1884,6 +1885,7 @@ async def test_method_web_scrape_md_with_all_params(self, async_client: AsyncBra include_images=True, include_links=True, shorten_base64_images=True, + use_main_content_only=True, ) assert_matches_type(BrandWebScrapeMdResponse, brand, path=["response"])