From 04095f7afab929c3acc2506b7c3b933f2e71a46a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 12:13:37 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 ++-- .../types/content_submit_params.py | 22 +++++++++++++++++++ .../types/content_submit_response.py | 7 ++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 18f68d3..78bcea0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 27 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-c3aa8563e03f0cddc62cbbc8ad42dcbd6f35b4652fd2dd09e0eb4d6a41364872.yml -openapi_spec_hash: 4647c8878266624f4af6605277061a59 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-c6993914ad5f9cb983c4b4eb18276af82b53ef3b56fbb7aec82fad2e2a39049a.yml +openapi_spec_hash: b528665c10bbfa79a5de41c338423fdd config_hash: 9d144cc6c49d3fd53e5b4472c1e22165 diff --git a/src/moderation_api/types/content_submit_params.py b/src/moderation_api/types/content_submit_params.py index 4a2d30f..e4dd842 100644 --- a/src/moderation_api/types/content_submit_params.py +++ b/src/moderation_api/types/content_submit_params.py @@ -48,6 +48,8 @@ "PolicyPolitical", "PolicyReligion", "PolicyCodeAbuse", + "PolicyUnicodeSpoofing", + "PolicyUnicodeSpoofingSignals", "PolicyPiiMasking", "PolicyPiiMaskingEntities", "PolicyURLMasking", @@ -450,6 +452,25 @@ class PolicyCodeAbuse(TypedDict, total=False): threshold: float +class PolicyUnicodeSpoofingSignals(TypedDict, total=False): + flag: bool + + +class PolicyUnicodeSpoofing(TypedDict, total=False): + id: Required[Literal["unicode_spoofing"]] + + flag: Required[bool] + + signals: Dict[str, PolicyUnicodeSpoofingSignals] + """Per-signal flag toggles. + + Omitted signals are enabled. A signal set to { flag: false } is still detected + and reported as a label, but does not by itself flag the policy. + """ + + threshold: float + + class PolicyPiiMaskingEntities( # type: ignore[call-arg] TypedDict, total=False, @@ -555,6 +576,7 @@ class PolicyGuideline(TypedDict, total=False): PolicyPolitical, PolicyReligion, PolicyCodeAbuse, + PolicyUnicodeSpoofing, PolicyPiiMasking, PolicyURLMasking, PolicyURLRisk, diff --git a/src/moderation_api/types/content_submit_response.py b/src/moderation_api/types/content_submit_response.py index f79afe3..a2331ef 100644 --- a/src/moderation_api/types/content_submit_response.py +++ b/src/moderation_api/types/content_submit_response.py @@ -151,6 +151,13 @@ class Content(BaseModel): on the channel. """ + unicode_cleaned: Optional[bool] = None + """ + Whether Unicode spoofing normalization rewrote the content — confusables folded + to their Latin lookalikes, invisible characters and combining-mark abuse + stripped. + """ + class Evaluation(BaseModel): """The evaluation of the content after running the channel policies.""" From c9322e9a36566b9c2ab7d8096cb91b2ac9782186 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 12:14:04 +0000 Subject: [PATCH 2/2] release: 1.27.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/moderation_api/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f3dbfd2..4eb8987 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.26.0" + ".": "1.27.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e3b1036..e05fd27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.27.0 (2026-07-20) + +Full Changelog: [v1.26.0...v1.27.0](https://github.com/moderation-api/sdk-python/compare/v1.26.0...v1.27.0) + +### Features + +* **api:** api update ([04095f7](https://github.com/moderation-api/sdk-python/commit/04095f7afab929c3acc2506b7c3b933f2e71a46a)) + ## 1.26.0 (2026-07-18) Full Changelog: [v1.25.2...v1.26.0](https://github.com/moderation-api/sdk-python/compare/v1.25.2...v1.26.0) diff --git a/pyproject.toml b/pyproject.toml index 19f10f4..acc30f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "moderation_api" -version = "1.26.0" +version = "1.27.0" description = "The official Python library for the moderation-api API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/moderation_api/_version.py b/src/moderation_api/_version.py index f9f6c34..e4fa426 100644 --- a/src/moderation_api/_version.py +++ b/src/moderation_api/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "moderation_api" -__version__ = "1.26.0" # x-release-please-version +__version__ = "1.27.0" # x-release-please-version