From 97aecb720e13ae94fca1795c448b1c8fb131e96b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 15:13:42 +0000 Subject: [PATCH 1/3] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f063655..c7df25c 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-317272429c96ee7d56a914736b87148fa21d8633cc852697ae293c50fde29531.yml -openapi_spec_hash: fb74bd59fcba6e28af9fe34844bb965f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-1bc6ac7fd0ec0c55304b9b847541fa456d3caa754f28aa54b6bec79b30da76a1.yml +openapi_spec_hash: 7a9eaa12e311a424bd913a8a7b473a9c config_hash: 9d144cc6c49d3fd53e5b4472c1e22165 From ee03a0d70404398f985d9c39fb48e9d59039c0cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 12:13:13 +0000 Subject: [PATCH 2/3] feat(api): api update --- .stats.yml | 4 +-- .../types/content_submit_response.py | 30 +++++++++++-------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.stats.yml b/.stats.yml index c7df25c..b8f7654 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-1bc6ac7fd0ec0c55304b9b847541fa456d3caa754f28aa54b6bec79b30da76a1.yml -openapi_spec_hash: 7a9eaa12e311a424bd913a8a7b473a9c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-b1a168c5b055c5dbc30b3e92d02c3065f452d03c1ad762878c60d5554cc4daca.yml +openapi_spec_hash: 76d503c11575d55fb72376018fa8387d config_hash: 9d144cc6c49d3fd53e5b4472c1e22165 diff --git a/src/moderation_api/types/content_submit_response.py b/src/moderation_api/types/content_submit_response.py index 93fd0d3..f5e83ce 100644 --- a/src/moderation_api/types/content_submit_response.py +++ b/src/moderation_api/types/content_submit_response.py @@ -352,22 +352,26 @@ class Recommendation(BaseModel): """The action to take based on the recommendation""" reason_codes: List[ - Literal[ - "severity_reject", - "severity_review", - "author_block", - "dry_run", - "trusted_allow", - "untrusted_severity", - "rule_match", - "rule_default", - "rule_fallback", - "client_override", + Union[ + Literal[ + "severity_reject", + "severity_review", + "author_block", + "dry_run", + "trusted_allow", + "untrusted_severity", + "rule_match", + "rule_default", + "rule_fallback", + "client_override", + ], + str, ] ] - """The reason code for the recommendation. + """Reason codes for the recommendation. - Can be used to display a reason to the user. + Standard codes plus a `rule:` code identifying the rule that produced the + action. Can be used to display a reason to the user. """ matched_rules: Optional[List[RecommendationMatchedRule]] = None From bf735133b0cc915fca1f6ed085a6d0c1cbd8f0d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 12:13:35 +0000 Subject: [PATCH 3/3] release: 1.31.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 35c30ad..81d2de2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.30.0" + ".": "1.31.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e4d1765..7f791ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.31.0 (2026-08-04) + +Full Changelog: [v1.30.0...v1.31.0](https://github.com/moderation-api/sdk-python/compare/v1.30.0...v1.31.0) + +### Features + +* **api:** api update ([ee03a0d](https://github.com/moderation-api/sdk-python/commit/ee03a0d70404398f985d9c39fb48e9d59039c0cc)) + ## 1.30.0 (2026-07-23) Full Changelog: [v1.29.0...v1.30.0](https://github.com/moderation-api/sdk-python/compare/v1.29.0...v1.30.0) diff --git a/pyproject.toml b/pyproject.toml index d0776d7..cd5dea6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "moderation_api" -version = "1.30.0" +version = "1.31.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 3425c03..4abf133 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.30.0" # x-release-please-version +__version__ = "1.31.0" # x-release-please-version