Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.2.0"
".": "1.3.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/moderation_api/_version.py
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions src/moderation_api/resources/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -106,6 +110,7 @@ def submit(
"metadata": metadata,
"meta_type": meta_type,
"policies": policies,
"timestamp": timestamp,
},
content_submit_params.ContentSubmitParams,
),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -198,6 +207,7 @@ async def submit(
"metadata": metadata,
"meta_type": meta_type,
"policies": policies,
"timestamp": timestamp,
},
content_submit_params.ContentSubmitParams,
),
Expand Down
6 changes: 6 additions & 0 deletions src/moderation_api/types/content_submit_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down Expand Up @@ -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"])

Expand Down