From d5460a20acbde158441a86bd68d89816f11ae30b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 10 Jan 2026 12:31:51 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 ++-- src/moderation_api/resources/content.py | 10 ++++++++++ src/moderation_api/types/content_submit_params.py | 6 ++++++ tests/api_resources/test_content.py | 2 ++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bc3bcfa..6aa934b 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%2Fmoderation-api-07681c3b51c92b9d92d71f11e9245c37a37ac1ea6df730cd730e85968064d814.yml -openapi_spec_hash: 48bffabe129598fc41a232cf5469bd4b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-c4b4a6dd58ac7acb74655c95e375be9c52d9b4b23a6b4c40ac6fceeb3e91f8ed.yml +openapi_spec_hash: 436eb030ad0ba2f3c53382a40ec9f4c9 config_hash: 6a52f6ae7d55cf3b4e91538cc7752aeb diff --git a/src/moderation_api/resources/content.py b/src/moderation_api/resources/content.py index 50dc8b5..5c0543b 100644 --- a/src/moderation_api/resources/content.py +++ b/src/moderation_api/resources/content.py @@ -57,6 +57,7 @@ def submit( meta_type: Literal["profile", "message", "post", "comment", "event", "product", "review", "other"] | Omit = omit, policies: Iterable[content_submit_params.Policy] | Omit = omit, + timestamp: float | 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, @@ -85,6 +86,9 @@ def submit( policies: (Enterprise) override the channel policies for this moderation request only. + timestamp: Unix timestamp (in milliseconds) of when the content was created. Use if content + is not submitted in real-time. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -106,6 +110,7 @@ def submit( "metadata": metadata, "meta_type": meta_type, "policies": policies, + "timestamp": timestamp, }, content_submit_params.ContentSubmitParams, ), @@ -149,6 +154,7 @@ async def submit( meta_type: Literal["profile", "message", "post", "comment", "event", "product", "review", "other"] | Omit = omit, policies: Iterable[content_submit_params.Policy] | Omit = omit, + timestamp: float | 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, @@ -177,6 +183,9 @@ async def submit( policies: (Enterprise) override the channel policies for this moderation request only. + timestamp: Unix timestamp (in milliseconds) of when the content was created. Use if content + is not submitted in real-time. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -198,6 +207,7 @@ async def submit( "metadata": metadata, "meta_type": meta_type, "policies": policies, + "timestamp": timestamp, }, content_submit_params.ContentSubmitParams, ), diff --git a/src/moderation_api/types/content_submit_params.py b/src/moderation_api/types/content_submit_params.py index a04ddca..1216409 100644 --- a/src/moderation_api/types/content_submit_params.py +++ b/src/moderation_api/types/content_submit_params.py @@ -83,6 +83,12 @@ class ContentSubmitParams(TypedDict, total=False): policies: Iterable[Policy] """(Enterprise) override the channel policies for this moderation request only.""" + timestamp: float + """Unix timestamp (in milliseconds) of when the content was created. + + Use if content is not submitted in real-time. + """ + class ContentText(TypedDict, total=False): """Text""" diff --git a/tests/api_resources/test_content.py b/tests/api_resources/test_content.py index 3dc6d2c..60d707c 100644 --- a/tests/api_resources/test_content.py +++ b/tests/api_resources/test_content.py @@ -50,6 +50,7 @@ def test_method_submit_with_all_params(self, client: ModerationAPI) -> None: "threshold": 0, } ], + timestamp=0, ) assert_matches_type(ContentSubmitResponse, content, path=["response"]) @@ -124,6 +125,7 @@ async def test_method_submit_with_all_params(self, async_client: AsyncModeration "threshold": 0, } ], + timestamp=0, ) assert_matches_type(ContentSubmitResponse, content, path=["response"]) From af59ce4e920e692065e934f3ae654b7b9be8918f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 10 Jan 2026 12:32:06 +0000 Subject: [PATCH 2/2] release: 1.3.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 d0ab664..2a8f4ff 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.2.0" + ".": "1.3.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c905948..c557c5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.3.0 (2026-01-10) + +Full Changelog: [v1.2.0...v1.3.0](https://github.com/moderation-api/sdk-python/compare/v1.2.0...v1.3.0) + +### Features + +* **api:** api update ([d5460a2](https://github.com/moderation-api/sdk-python/commit/d5460a20acbde158441a86bd68d89816f11ae30b)) + ## 1.2.0 (2026-01-02) Full Changelog: [v1.1.0...v1.2.0](https://github.com/moderation-api/sdk-python/compare/v1.1.0...v1.2.0) diff --git a/pyproject.toml b/pyproject.toml index 0c01d83..d845f3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "moderation_api" -version = "1.2.0" +version = "1.3.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 068825d..9d29fcf 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.2.0" # x-release-please-version +__version__ = "1.3.0" # x-release-please-version