From 27a808d92a746a2e7393a78f6a74fa2331a09eb6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 03:17:27 +0000 Subject: [PATCH 1/5] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5019f81..b226859 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-5cee858ce17e48e25e7503767dd979c6570a485511274e48129a1922eae67098.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-5cee858ce17e48e25e7503767dd979c6570a485511274e48129a1922eae67098.yml openapi_spec_hash: 54c716ac4e888bfddc2c6402192bb33a config_hash: 13d10207114afb65f7ac4e21f4c0e358 From a97c02b383ddaacee75e69ff69e0787e719890be Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 03:21:42 +0000 Subject: [PATCH 2/5] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b226859..0e50ab3 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/moderation-api-5cee858ce17e48e25e7503767dd979c6570a485511274e48129a1922eae67098.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-9c7780b743898a6c0abf377cb05d4fa4c7a6e2273c3b9176faaa2c80f8c07f28.yml openapi_spec_hash: 54c716ac4e888bfddc2c6402192bb33a config_hash: 13d10207114afb65f7ac4e21f4c0e358 From d2e57b30bb588d023745bd0250e91846b609bf0a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 03:25:14 +0000 Subject: [PATCH 3/5] chore(internal): reformat pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 922c4a5..5692d9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -154,7 +154,7 @@ show_error_codes = true # # We also exclude our `tests` as mypy doesn't always infer # types correctly and Pyright will still catch any type errors. -exclude = ['src/moderation_api/_files.py', '_dev/.*.py', 'tests/.*'] +exclude = ["src/moderation_api/_files.py", "_dev/.*.py", "tests/.*"] strict_equality = true implicit_reexport = true From 9f119a9f2586fd0454a0c37b0d2673840d5a4b34 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 09:13:31 +0000 Subject: [PATCH 4/5] feat(api): api update --- .stats.yml | 4 ++-- src/moderation_api/resources/authors.py | 16 ++++++++++++++++ src/moderation_api/types/author_create_params.py | 3 +++ .../types/author_create_response.py | 3 +++ src/moderation_api/types/author_list_response.py | 3 +++ .../types/author_retrieve_response.py | 3 +++ src/moderation_api/types/author_update_params.py | 3 +++ .../types/author_update_response.py | 3 +++ .../types/content_submit_params.py | 6 ++++++ tests/api_resources/test_authors.py | 4 ++++ 10 files changed, 46 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0e50ab3..a8430a3 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/moderation-api-9c7780b743898a6c0abf377cb05d4fa4c7a6e2273c3b9176faaa2c80f8c07f28.yml -openapi_spec_hash: 54c716ac4e888bfddc2c6402192bb33a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-6fe842e0549fd5b4fdb1cca0bf44fa9f71a107ca98eb30a9bb3e4d3c2adeaca9.yml +openapi_spec_hash: ee56658b235950cbf3808b56ddde4919 config_hash: 13d10207114afb65f7ac4e21f4c0e358 diff --git a/src/moderation_api/resources/authors.py b/src/moderation_api/resources/authors.py index 22b8bf1..d8c2027 100644 --- a/src/moderation_api/resources/authors.py +++ b/src/moderation_api/resources/authors.py @@ -52,6 +52,7 @@ def create( self, *, external_id: str, + company: Optional[str] | Omit = omit, email: Optional[str] | Omit = omit, external_link: Optional[str] | Omit = omit, first_seen: float | Omit = omit, @@ -75,6 +76,8 @@ def create( Args: external_id: External ID of the user, typically the ID of the author in your database. + company: The author's company or organization + email: Author email address external_link: URL of the author's external profile @@ -103,6 +106,7 @@ def create( body=maybe_transform( { "external_id": external_id, + "company": company, "email": email, "external_link": external_link, "first_seen": first_seen, @@ -160,6 +164,7 @@ def update( self, id: str, *, + company: Optional[str] | Omit = omit, email: Optional[str] | Omit = omit, external_link: Optional[str] | Omit = omit, first_seen: float | Omit = omit, @@ -181,6 +186,8 @@ def update( Args: id: Either external ID or the ID assigned by moderation API. + company: The author's company or organization + email: Author email address external_link: URL of the author's external profile @@ -210,6 +217,7 @@ def update( path_template("/authors/{id}", id=id), body=maybe_transform( { + "company": company, "email": email, "external_link": external_link, "first_seen": first_seen, @@ -353,6 +361,7 @@ async def create( self, *, external_id: str, + company: Optional[str] | Omit = omit, email: Optional[str] | Omit = omit, external_link: Optional[str] | Omit = omit, first_seen: float | Omit = omit, @@ -376,6 +385,8 @@ async def create( Args: external_id: External ID of the user, typically the ID of the author in your database. + company: The author's company or organization + email: Author email address external_link: URL of the author's external profile @@ -404,6 +415,7 @@ async def create( body=await async_maybe_transform( { "external_id": external_id, + "company": company, "email": email, "external_link": external_link, "first_seen": first_seen, @@ -461,6 +473,7 @@ async def update( self, id: str, *, + company: Optional[str] | Omit = omit, email: Optional[str] | Omit = omit, external_link: Optional[str] | Omit = omit, first_seen: float | Omit = omit, @@ -482,6 +495,8 @@ async def update( Args: id: Either external ID or the ID assigned by moderation API. + company: The author's company or organization + email: Author email address external_link: URL of the author's external profile @@ -511,6 +526,7 @@ async def update( path_template("/authors/{id}", id=id), body=await async_maybe_transform( { + "company": company, "email": email, "external_link": external_link, "first_seen": first_seen, diff --git a/src/moderation_api/types/author_create_params.py b/src/moderation_api/types/author_create_params.py index 427c575..4882d2a 100644 --- a/src/moderation_api/types/author_create_params.py +++ b/src/moderation_api/types/author_create_params.py @@ -12,6 +12,9 @@ class AuthorCreateParams(TypedDict, total=False): external_id: Required[str] """External ID of the user, typically the ID of the author in your database.""" + company: Optional[str] + """The author's company or organization""" + email: Optional[str] """Author email address""" diff --git a/src/moderation_api/types/author_create_response.py b/src/moderation_api/types/author_create_response.py index f0b1ab4..6a4f8f5 100644 --- a/src/moderation_api/types/author_create_response.py +++ b/src/moderation_api/types/author_create_response.py @@ -110,6 +110,9 @@ class AuthorCreateResponse(BaseModel): trust_level: TrustLevel + company: Optional[str] = None + """The author's company or organization""" + email: Optional[str] = None """Author email address""" diff --git a/src/moderation_api/types/author_list_response.py b/src/moderation_api/types/author_list_response.py index 1ad47f4..aafcb37 100644 --- a/src/moderation_api/types/author_list_response.py +++ b/src/moderation_api/types/author_list_response.py @@ -119,6 +119,9 @@ class Author(BaseModel): trust_level: AuthorTrustLevel + company: Optional[str] = None + """The author's company or organization""" + email: Optional[str] = None """Author email address""" diff --git a/src/moderation_api/types/author_retrieve_response.py b/src/moderation_api/types/author_retrieve_response.py index 6b45b36..20fe406 100644 --- a/src/moderation_api/types/author_retrieve_response.py +++ b/src/moderation_api/types/author_retrieve_response.py @@ -110,6 +110,9 @@ class AuthorRetrieveResponse(BaseModel): trust_level: TrustLevel + company: Optional[str] = None + """The author's company or organization""" + email: Optional[str] = None """Author email address""" diff --git a/src/moderation_api/types/author_update_params.py b/src/moderation_api/types/author_update_params.py index 0faecbc..94bab88 100644 --- a/src/moderation_api/types/author_update_params.py +++ b/src/moderation_api/types/author_update_params.py @@ -9,6 +9,9 @@ class AuthorUpdateParams(TypedDict, total=False): + company: Optional[str] + """The author's company or organization""" + email: Optional[str] """Author email address""" diff --git a/src/moderation_api/types/author_update_response.py b/src/moderation_api/types/author_update_response.py index 4215ebb..6bec395 100644 --- a/src/moderation_api/types/author_update_response.py +++ b/src/moderation_api/types/author_update_response.py @@ -110,6 +110,9 @@ class AuthorUpdateResponse(BaseModel): trust_level: TrustLevel + company: Optional[str] = None + """The author's company or organization""" + email: Optional[str] = None """Author email address""" diff --git a/src/moderation_api/types/content_submit_params.py b/src/moderation_api/types/content_submit_params.py index 51d117e..f964ddc 100644 --- a/src/moderation_api/types/content_submit_params.py +++ b/src/moderation_api/types/content_submit_params.py @@ -432,6 +432,12 @@ class PolicyURLRisk(TypedDict, total=False): precedence over allowlists. """ + flag_link_shorteners: Annotated[bool, PropertyInfo(alias="flagLinkShorteners")] + """ + When true, any URL detected as a free link shortener (bit.ly, t.co, tinyurl, + etc.) is always flagged regardless of risk score. Allowlist matches still win. + """ + threshold: float diff --git a/tests/api_resources/test_authors.py b/tests/api_resources/test_authors.py index 2cbc343..0639c7f 100644 --- a/tests/api_resources/test_authors.py +++ b/tests/api_resources/test_authors.py @@ -36,6 +36,7 @@ def test_method_create(self, client: ModerationAPI) -> None: def test_method_create_with_all_params(self, client: ModerationAPI) -> None: author = client.authors.create( external_id="external_id", + company="company", email="dev@stainless.com", external_link="https://example.com", first_seen=0, @@ -133,6 +134,7 @@ def test_method_update(self, client: ModerationAPI) -> None: def test_method_update_with_all_params(self, client: ModerationAPI) -> None: author = client.authors.update( id="id", + company="company", email="dev@stainless.com", external_link="https://example.com", first_seen=0, @@ -286,6 +288,7 @@ async def test_method_create(self, async_client: AsyncModerationAPI) -> None: async def test_method_create_with_all_params(self, async_client: AsyncModerationAPI) -> None: author = await async_client.authors.create( external_id="external_id", + company="company", email="dev@stainless.com", external_link="https://example.com", first_seen=0, @@ -383,6 +386,7 @@ async def test_method_update(self, async_client: AsyncModerationAPI) -> None: async def test_method_update_with_all_params(self, async_client: AsyncModerationAPI) -> None: author = await async_client.authors.update( id="id", + company="company", email="dev@stainless.com", external_link="https://example.com", first_seen=0, From 5c604aff0587b3fbcb3278e709877415e6e7e4e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 09:14:16 +0000 Subject: [PATCH 5/5] release: 1.18.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ pyproject.toml | 2 +- src/moderation_api/_version.py | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6a197be..4ce109a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.17.0" + ".": "1.18.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b802ad..4931eac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 1.18.0 (2026-05-06) + +Full Changelog: [v1.17.0...v1.18.0](https://github.com/moderation-api/sdk-python/compare/v1.17.0...v1.18.0) + +### Features + +* **api:** api update ([9f119a9](https://github.com/moderation-api/sdk-python/commit/9f119a9f2586fd0454a0c37b0d2673840d5a4b34)) + + +### Chores + +* **internal:** reformat pyproject.toml ([d2e57b3](https://github.com/moderation-api/sdk-python/commit/d2e57b30bb588d023745bd0250e91846b609bf0a)) + ## 1.17.0 (2026-04-29) Full Changelog: [v1.16.0...v1.17.0](https://github.com/moderation-api/sdk-python/compare/v1.16.0...v1.17.0) diff --git a/pyproject.toml b/pyproject.toml index 5692d9a..6b8c503 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "moderation_api" -version = "1.17.0" +version = "1.18.0" description = "The official Python library for the moderation-api API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/moderation_api/_version.py b/src/moderation_api/_version.py index 4e6e834..7a3b8ab 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.17.0" # x-release-please-version +__version__ = "1.18.0" # x-release-please-version