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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/moderation-api-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v5
Expand All @@ -41,7 +41,7 @@ jobs:
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/moderation-api-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v5
Expand All @@ -57,7 +57,7 @@ jobs:
- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/moderation-api-python'
id: github-oidc
uses: actions/github-script@v6
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

Expand All @@ -75,7 +75,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/moderation-api-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'moderation-api/sdk-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Check release environment
run: |
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.4.0"
".": "1.5.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-c4b4a6dd58ac7acb74655c95e375be9c52d9b4b23a6b4c40ac6fceeb3e91f8ed.yml
openapi_spec_hash: 436eb030ad0ba2f3c53382a40ec9f4c9
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-4c45cb81092c51edd3affb49ac04582b6416054870f15e8bb30565375cd390eb.yml
openapi_spec_hash: 9ff39aca0794f22638ac710075bf70fe
config_hash: 6a52f6ae7d55cf3b4e91538cc7752aeb
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 1.5.0 (2026-01-28)

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

### Features

* **api:** api update ([f169692](https://github.com/moderation-api/sdk-python/commit/f1696924142a6c6ab846a6d2186986000e767f16))


### Chores

* **ci:** upgrade `actions/github-script` ([2b6a3c8](https://github.com/moderation-api/sdk-python/commit/2b6a3c800e24d79e9e33856f7c30131d7c6b43f6))
* **internal:** update `actions/checkout` version ([bb501b1](https://github.com/moderation-api/sdk-python/commit/bb501b1f60a8a374c8357993e67251e436c161fa))

## 1.4.0 (2026-01-14)

Full Changelog: [v1.3.0...v1.4.0](https://github.com/moderation-api/sdk-python/compare/v1.3.0...v1.4.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.4.0"
version = "1.5.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.4.0" # x-release-please-version
__version__ = "1.5.0" # x-release-please-version
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 @@ -31,6 +31,7 @@
"PolicyIllicitFirearms",
"PolicyIllicitTobacco",
"PolicyIllicitGambling",
"PolicyCannabis",
"PolicySexual",
"PolicyFlirtation",
"PolicyProfanity",
Expand Down Expand Up @@ -259,6 +260,14 @@ class PolicyIllicitGambling(TypedDict, total=False):
threshold: float


class PolicyCannabis(TypedDict, total=False):
id: Required[Literal["cannabis"]]

flag: Required[bool]

threshold: float


class PolicySexual(TypedDict, total=False):
id: Required[Literal["sexual"]]

Expand Down Expand Up @@ -400,6 +409,7 @@ class PolicyGuideline(TypedDict, total=False):
PolicyIllicitFirearms,
PolicyIllicitTobacco,
PolicyIllicitGambling,
PolicyCannabis,
PolicySexual,
PolicyFlirtation,
PolicyProfanity,
Expand Down