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.41.0"
".": "1.42.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: 34
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-4e324c5b209f6b1e2451e0fbafd20b35ba5fe2b57e3c70dd082faad332c3b779.yml
openapi_spec_hash: e974a7107729bb684c55008102a17754
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-a4c5163e3271601b36a74223b756d304ce8246f832f8c531d53cdd30f9ee4c68.yml
openapi_spec_hash: fd9fe8a54c1c46032bd5fccb995f04b8
config_hash: 6e090a71f4d354167d93b4534a0e7f05
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 1.42.0 (2026-09-14)

Full Changelog: [v1.41.0...v1.42.0](https://github.com/moderation-api/sdk-python/compare/v1.41.0...v1.42.0)

### Features

* **api:** api update ([98f74e1](https://github.com/moderation-api/sdk-python/commit/98f74e1336d204eb9a939cbeb2dfed01bb633300))
* **api:** api update ([f4cb41b](https://github.com/moderation-api/sdk-python/commit/f4cb41b2b35942e6dee0c9701a2498f845876eaf))

## 1.41.0 (2026-08-28)

Full Changelog: [v1.40.0...v1.41.0](https://github.com/moderation-api/sdk-python/compare/v1.40.0...v1.41.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.41.0"
version = "1.42.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.41.0" # x-release-please-version
__version__ = "1.42.0" # x-release-please-version
18 changes: 14 additions & 4 deletions src/moderation_api/resources/authors.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,15 @@ def delete(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AuthorDeleteResponse:
"""
Delete a specific author
"""Delete a specific author.

This resets the author: status, blocks, trust level,
metrics and action history are removed. The author is created again with a clean
record the next time content is moderated for the same ID.

Args:
id: Either external ID or the ID assigned by moderation API.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -623,10 +628,15 @@ async def delete(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AuthorDeleteResponse:
"""
Delete a specific author
"""Delete a specific author.

This resets the author: status, blocks, trust level,
metrics and action history are removed. The author is created again with a clean
record the next time content is moderated for the same ID.

Args:
id: Either external ID or the ID assigned by moderation API.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down
10 changes: 10 additions & 0 deletions src/moderation_api/types/content_submit_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"PolicyAdult",
"PolicyCrypto",
"PolicySexual",
"PolicySexualMinors",
"PolicyFlirtation",
"PolicyProfanity",
"PolicyViolence",
Expand Down Expand Up @@ -346,6 +347,14 @@ class PolicySexual(TypedDict, total=False):
threshold: float


class PolicySexualMinors(TypedDict, total=False):
id: Required[Literal["sexual_minors"]]

flag: Required[bool]

threshold: float


class PolicyFlirtation(TypedDict, total=False):
id: Required[Literal["flirtation"]]

Expand Down Expand Up @@ -567,6 +576,7 @@ class PolicyGuideline(TypedDict, total=False):
PolicyAdult,
PolicyCrypto,
PolicySexual,
PolicySexualMinors,
PolicyFlirtation,
PolicyProfanity,
PolicyViolence,
Expand Down
Loading