Skip to content
Open
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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ jobs:
run: uv build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/moderation-api-python'
if: |-
github.repository == 'stainless-sdks/moderation-api-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/moderation-api-python'
if: |-
github.repository == 'stainless-sdks/moderation-api-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand Down
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.11.0"
".": "1.11.1"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 1.11.1 (2026-03-07)

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

### Chores

* **ci:** skip uploading artifacts on stainless-internal branches ([e610021](https://github.com/moderation-api/sdk-python/commit/e6100213a30c4915355288c031b412f945479bc8))


### Refactors

* **types:** use `extra_items` from PEP 728 ([430bfe0](https://github.com/moderation-api/sdk-python/commit/430bfe06ab9314f3f3013bf6928d47a9a450109e))

## 1.11.0 (2026-03-03)

Full Changelog: [v1.10.0...v1.11.0](https://github.com/moderation-api/sdk-python/compare/v1.10.0...v1.11.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.11.0"
version = "1.11.1"
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.11.0" # x-release-please-version
__version__ = "1.11.1" # x-release-please-version
9 changes: 3 additions & 6 deletions src/moderation_api/types/author_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from __future__ import annotations

from typing import Dict, Union, Optional
from typing_extensions import Required, TypeAlias, TypedDict
from typing import Optional
from typing_extensions import Required, TypedDict

__all__ = ["AuthorCreateParams", "Metadata"]

Expand Down Expand Up @@ -40,7 +40,7 @@ class AuthorCreateParams(TypedDict, total=False):
"""URL of the author's profile picture"""


class MetadataTyped(TypedDict, total=False):
class Metadata(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
"""Additional metadata provided by your system.

We recommend including any relevant information that may assist in the moderation process.
Expand All @@ -57,6 +57,3 @@ class MetadataTyped(TypedDict, total=False):

phone_verified: Optional[bool]
"""Whether the author's phone number is verified"""


Metadata: TypeAlias = Union[MetadataTyped, Dict[str, object]]
9 changes: 3 additions & 6 deletions src/moderation_api/types/author_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from __future__ import annotations

from typing import Dict, Union, Optional
from typing_extensions import TypeAlias, TypedDict
from typing import Optional
from typing_extensions import TypedDict

__all__ = ["AuthorUpdateParams", "Metadata"]

Expand Down Expand Up @@ -37,7 +37,7 @@ class AuthorUpdateParams(TypedDict, total=False):
"""URL of the author's profile picture"""


class MetadataTyped(TypedDict, total=False):
class Metadata(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
"""Additional metadata provided by your system.

We recommend including any relevant information that may assist in the moderation process.
Expand All @@ -54,6 +54,3 @@ class MetadataTyped(TypedDict, total=False):

phone_verified: Optional[bool]
"""Whether the author's phone number is verified"""


Metadata: TypeAlias = Union[MetadataTyped, Dict[str, object]]
10 changes: 2 additions & 8 deletions src/moderation_api/types/content_submit_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class PolicyCodeAbuse(TypedDict, total=False):
threshold: float


class PolicyPiiMaskingEntitiesTyped(TypedDict, total=False):
class PolicyPiiMaskingEntities(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
enable: bool

flag: bool
Expand All @@ -390,16 +390,13 @@ class PolicyPiiMaskingEntitiesTyped(TypedDict, total=False):
should_mask: Annotated[bool, PropertyInfo(alias="shouldMask")]


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


class PolicyPiiMasking(TypedDict, total=False):
id: Required[Literal["pii"]]

entities: Required[Dict[str, PolicyPiiMaskingEntities]]


class PolicyURLMaskingEntitiesTyped(TypedDict, total=False):
class PolicyURLMaskingEntities(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
enable: bool

flag: bool
Expand All @@ -409,9 +406,6 @@ class PolicyURLMaskingEntitiesTyped(TypedDict, total=False):
should_mask: Annotated[bool, PropertyInfo(alias="shouldMask")]


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


class PolicyURLMasking(TypedDict, total=False):
id: Required[Literal["url"]]

Expand Down