diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2601677..d0ab664 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.1.0" + ".": "1.2.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 65327ac..bc3bcfa 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-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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 36f02e0..c905948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/LICENSE b/LICENSE index d7eaab6..507011e 100644 --- a/LICENSE +++ b/LICENSE @@ -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. diff --git a/pyproject.toml b/pyproject.toml index bd3325b..0c01d83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/scripts/lint b/scripts/lint index 218ed01..d035533 100755 --- a/scripts/lint +++ b/scripts/lint @@ -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 diff --git a/src/moderation_api/_version.py b/src/moderation_api/_version.py index 49fceda..068825d 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.1.0" # x-release-please-version +__version__ = "1.2.0" # x-release-please-version diff --git a/src/moderation_api/types/content_submit_params.py b/src/moderation_api/types/content_submit_params.py index bab1384..a04ddca 100644 --- a/src/moderation_api/types/content_submit_params.py +++ b/src/moderation_api/types/content_submit_params.py @@ -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): @@ -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):