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.1.0"
".": "1.2.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-00324cd69f885e08708180c380317fd48101cb81c36f0bfaf7f8248d951d92f7.yml
openapi_spec_hash: 47c828ded2fac0ded969760340b6b6fa
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-07681c3b51c92b9d92d71f11e9245c37a37ac1ea6df730cd730e85968064d814.yml
openapi_spec_hash: 48bffabe129598fc41a232cf5469bd4b
config_hash: 6a52f6ae7d55cf3b4e91538cc7752aeb
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 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)

### Features

* **api:** api update ([15074fd](https://github.com/moderation-api/sdk-python/commit/15074fd461baf06418a47910229566c2064c7e11))


### Chores

* **internal:** add `--fix` argument to lint script ([893326c](https://github.com/moderation-api/sdk-python/commit/893326cd41958716559755c3da9a967a453db4b9))

## 1.1.0 (2025-12-18)

Full Changelog: [v1.0.2...v1.1.0](https://github.com/moderation-api/sdk-python/compare/v1.0.2...v1.1.0)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 Moderation API
Copyright 2026 Moderation API

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
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.1.0"
version = "1.2.0"
description = "The official Python library for the moderation-api API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
9 changes: 7 additions & 2 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ set -e

cd "$(dirname "$0")/.."

echo "==> Running ruff"
uv run ruff check .
if [ "$1" = "--fix" ]; then
echo "==> Running ruff with --fix"
uv run ruff check . --fix
else
echo "==> Running ruff"
uv run ruff check .
fi

echo "==> Running pyright"
uv run pyright
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.1.0" # x-release-please-version
__version__ = "1.2.0" # x-release-please-version
30 changes: 14 additions & 16 deletions src/moderation_api/types/content_submit_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,17 @@ class PolicyCodeAbuse(TypedDict, total=False):
threshold: float


class PolicyPiiMaskingEntities(TypedDict, total=False):
id: Required[
Literal["email", "phone", "url", "address", "name", "username", "ip_address", "credit_card", "sensitive_other"]
]
class PolicyPiiMaskingEntitiesTyped(TypedDict, total=False):
enable: bool

enable: Required[bool]
flag: bool

flag: Required[bool]
mask: str

should_mask: Required[Annotated[bool, PropertyInfo(alias="shouldMask")]]
should_mask: Annotated[bool, PropertyInfo(alias="shouldMask")]

mask: str

PolicyPiiMaskingEntities: TypeAlias = Union[PolicyPiiMaskingEntitiesTyped, Dict[str, object]]


class PolicyPiiMasking(TypedDict, total=False):
Expand All @@ -353,18 +352,17 @@ class PolicyPiiMasking(TypedDict, total=False):
entities: Required[Dict[str, PolicyPiiMaskingEntities]]


class PolicyURLMaskingEntities(TypedDict, total=False):
id: Required[
Literal["email", "phone", "url", "address", "name", "username", "ip_address", "credit_card", "sensitive_other"]
]
class PolicyURLMaskingEntitiesTyped(TypedDict, total=False):
enable: bool

enable: Required[bool]
flag: bool

flag: Required[bool]
mask: str

should_mask: Required[Annotated[bool, PropertyInfo(alias="shouldMask")]]
should_mask: Annotated[bool, PropertyInfo(alias="shouldMask")]

mask: str

PolicyURLMaskingEntities: TypeAlias = Union[PolicyURLMaskingEntitiesTyped, Dict[str, object]]


class PolicyURLMasking(TypedDict, total=False):
Expand Down