diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4ce109a..de44c40 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.18.0" + ".": "1.19.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index a8430a3..5b8da89 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-6fe842e0549fd5b4fdb1cca0bf44fa9f71a107ca98eb30a9bb3e4d3c2adeaca9.yml -openapi_spec_hash: ee56658b235950cbf3808b56ddde4919 -config_hash: 13d10207114afb65f7ac4e21f4c0e358 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-5d59d9b7fffd1ac6f329a62fdc42c97bfa7821168eeea0d686a2d48d90963c34.yml +openapi_spec_hash: 61cd471624938b233f02dc17416946f2 +config_hash: 9d144cc6c49d3fd53e5b4472c1e22165 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4931eac..6498660 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 1.19.0 (2026-05-08) + +Full Changelog: [v1.18.0...v1.19.0](https://github.com/moderation-api/sdk-python/compare/v1.18.0...v1.19.0) + +### Features + +* **api:** api update ([e5278b0](https://github.com/moderation-api/sdk-python/commit/e5278b0a492caa4ae55e5005cd7fd820abd2a952)) +* **api:** manual updates ([9ddd936](https://github.com/moderation-api/sdk-python/commit/9ddd936295338e01483354cb11986bdcf81350ba)) + ## 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) diff --git a/api.md b/api.md index 3450694..478b6df 100644 --- a/api.md +++ b/api.md @@ -25,7 +25,7 @@ Methods: Types: ```python -from moderation_api.types import QueueRetrieveResponse, QueueGetStatsResponse +from moderation_api.types import WebhookEvent, QueueRetrieveResponse, QueueGetStatsResponse ``` Methods: diff --git a/pyproject.toml b/pyproject.toml index 6b8c503..6124771 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "moderation_api" -version = "1.18.0" +version = "1.19.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 7a3b8ab..6d652ff 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.18.0" # x-release-please-version +__version__ = "1.19.0" # x-release-please-version diff --git a/src/moderation_api/resources/actions/actions.py b/src/moderation_api/resources/actions/actions.py index b867c61..3d1cde1 100644 --- a/src/moderation_api/resources/actions/actions.py +++ b/src/moderation_api/resources/actions/actions.py @@ -88,7 +88,6 @@ def create( ] | Omit = omit, value_required: bool | Omit = omit, - webhooks: Iterable[action_create_params.Webhook] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -126,8 +125,6 @@ def create( value_required: Whether the action requires a value to be executed. - webhooks: The action's webhooks. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -151,7 +148,6 @@ def create( "queue_behaviour": queue_behaviour, "type": type, "value_required": value_required, - "webhooks": webhooks, }, action_create_params.ActionCreateParams, ), @@ -225,7 +221,6 @@ def update( ] | Omit = omit, value_required: bool | Omit = omit, - webhooks: Iterable[action_update_params.Webhook] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -265,8 +260,6 @@ def update( value_required: Whether the action requires a value to be executed. - webhooks: The action's webhooks. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -292,7 +285,6 @@ def update( "queue_behaviour": queue_behaviour, "type": type, "value_required": value_required, - "webhooks": webhooks, }, action_update_params.ActionUpdateParams, ), @@ -425,7 +417,6 @@ async def create( ] | Omit = omit, value_required: bool | Omit = omit, - webhooks: Iterable[action_create_params.Webhook] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -463,8 +454,6 @@ async def create( value_required: Whether the action requires a value to be executed. - webhooks: The action's webhooks. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -488,7 +477,6 @@ async def create( "queue_behaviour": queue_behaviour, "type": type, "value_required": value_required, - "webhooks": webhooks, }, action_create_params.ActionCreateParams, ), @@ -562,7 +550,6 @@ async def update( ] | Omit = omit, value_required: bool | Omit = omit, - webhooks: Iterable[action_update_params.Webhook] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -602,8 +589,6 @@ async def update( value_required: Whether the action requires a value to be executed. - webhooks: The action's webhooks. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -629,7 +614,6 @@ async def update( "queue_behaviour": queue_behaviour, "type": type, "value_required": value_required, - "webhooks": webhooks, }, action_update_params.ActionUpdateParams, ), diff --git a/src/moderation_api/types/action_create_params.py b/src/moderation_api/types/action_create_params.py index 8ff765b..afcf7c8 100644 --- a/src/moderation_api/types/action_create_params.py +++ b/src/moderation_api/types/action_create_params.py @@ -8,7 +8,7 @@ from .._types import SequenceNotStr from .._utils import PropertyInfo -__all__ = ["ActionCreateParams", "PossibleValue", "Webhook"] +__all__ = ["ActionCreateParams", "PossibleValue"] class ActionCreateParams(TypedDict, total=False): @@ -71,24 +71,7 @@ class ActionCreateParams(TypedDict, total=False): value_required: Annotated[bool, PropertyInfo(alias="valueRequired")] """Whether the action requires a value to be executed.""" - webhooks: Iterable[Webhook] - """The action's webhooks.""" - class PossibleValue(TypedDict, total=False): value: Required[str] """The value of the action.""" - - -class Webhook(TypedDict, total=False): - name: Required[str] - """The webhook's name, used to identify it in the dashboard""" - - url: Required[str] - """The webhook's URL. We'll call this URL when the event occurs.""" - - id: str - """ID of an existing webhook or undefined if this is a new webhook.""" - - description: Optional[str] - """The webhook's description""" diff --git a/src/moderation_api/types/action_list_response.py b/src/moderation_api/types/action_list_response.py index b1fadd1..27a774b 100644 --- a/src/moderation_api/types/action_list_response.py +++ b/src/moderation_api/types/action_list_response.py @@ -7,12 +7,7 @@ from .._models import BaseModel -__all__ = [ - "ActionListResponse", - "ActionListResponseItem", - "ActionListResponseItemPossibleValue", - "ActionListResponseItemWebhook", -] +__all__ = ["ActionListResponse", "ActionListResponseItem", "ActionListResponseItemPossibleValue"] class ActionListResponseItemPossibleValue(BaseModel): @@ -20,26 +15,6 @@ class ActionListResponseItemPossibleValue(BaseModel): """The value of the action.""" -class ActionListResponseItemWebhook(BaseModel): - id: str - """The ID of the webhook.""" - - name: str - """The webhook's name, used to identify it in the dashboard""" - - url: str - """The webhook's URL. We'll call this URL when the event occurs.""" - - description: Optional[str] = None - """The webhook's description""" - - moderation_action_id: Optional[str] = FieldInfo(alias="moderationActionId", default=None) - """The ID of the moderation action to trigger the webhook on. - - Only used for moderation action webhooks. - """ - - class ActionListResponseItem(BaseModel): id: str """The ID of the action.""" @@ -84,9 +59,6 @@ class ActionListResponseItem(BaseModel): value_required: bool = FieldInfo(alias="valueRequired") """Whether the action requires a value to be executed.""" - webhooks: List[ActionListResponseItemWebhook] - """The action's webhooks.""" - description: Optional[str] = None """The description of the action.""" diff --git a/src/moderation_api/types/action_retrieve_response.py b/src/moderation_api/types/action_retrieve_response.py index 6ea8c5e..5061231 100644 --- a/src/moderation_api/types/action_retrieve_response.py +++ b/src/moderation_api/types/action_retrieve_response.py @@ -7,7 +7,7 @@ from .._models import BaseModel -__all__ = ["ActionRetrieveResponse", "PossibleValue", "Webhook"] +__all__ = ["ActionRetrieveResponse", "PossibleValue"] class PossibleValue(BaseModel): @@ -15,26 +15,6 @@ class PossibleValue(BaseModel): """The value of the action.""" -class Webhook(BaseModel): - id: str - """The ID of the webhook.""" - - name: str - """The webhook's name, used to identify it in the dashboard""" - - url: str - """The webhook's URL. We'll call this URL when the event occurs.""" - - description: Optional[str] = None - """The webhook's description""" - - moderation_action_id: Optional[str] = FieldInfo(alias="moderationActionId", default=None) - """The ID of the moderation action to trigger the webhook on. - - Only used for moderation action webhooks. - """ - - class ActionRetrieveResponse(BaseModel): id: str """The ID of the action.""" @@ -79,9 +59,6 @@ class ActionRetrieveResponse(BaseModel): value_required: bool = FieldInfo(alias="valueRequired") """Whether the action requires a value to be executed.""" - webhooks: List[Webhook] - """The action's webhooks.""" - description: Optional[str] = None """The description of the action.""" diff --git a/src/moderation_api/types/action_update_params.py b/src/moderation_api/types/action_update_params.py index 19adaee..ac56572 100644 --- a/src/moderation_api/types/action_update_params.py +++ b/src/moderation_api/types/action_update_params.py @@ -8,7 +8,7 @@ from .._types import SequenceNotStr from .._utils import PropertyInfo -__all__ = ["ActionUpdateParams", "PossibleValue", "Webhook"] +__all__ = ["ActionUpdateParams", "PossibleValue"] class ActionUpdateParams(TypedDict, total=False): @@ -71,24 +71,7 @@ class ActionUpdateParams(TypedDict, total=False): value_required: Annotated[bool, PropertyInfo(alias="valueRequired")] """Whether the action requires a value to be executed.""" - webhooks: Iterable[Webhook] - """The action's webhooks.""" - class PossibleValue(TypedDict, total=False): value: Required[str] """The value of the action.""" - - -class Webhook(TypedDict, total=False): - name: Required[str] - """The webhook's name, used to identify it in the dashboard""" - - url: Required[str] - """The webhook's URL. We'll call this URL when the event occurs.""" - - id: str - """ID of an existing webhook or undefined if this is a new webhook.""" - - description: Optional[str] - """The webhook's description""" diff --git a/tests/api_resources/test_actions.py b/tests/api_resources/test_actions.py index 27f64f1..ed7f9a0 100644 --- a/tests/api_resources/test_actions.py +++ b/tests/api_resources/test_actions.py @@ -46,14 +46,6 @@ def test_method_create_with_all_params(self, client: ModerationAPI) -> None: queue_behaviour="REMOVE", type="AUTHOR_BLOCK", value_required=True, - webhooks=[ - { - "name": "name", - "url": "https://example.com", - "id": "id", - "description": "description", - } - ], ) assert_matches_type(ActionCreateResponse, action, path=["response"]) @@ -149,14 +141,6 @@ def test_method_update_with_all_params(self, client: ModerationAPI) -> None: queue_behaviour="REMOVE", type="AUTHOR_BLOCK", value_required=True, - webhooks=[ - { - "name": "name", - "url": "https://example.com", - "id": "id", - "description": "description", - } - ], ) assert_matches_type(ActionUpdateResponse, action, path=["response"]) @@ -301,14 +285,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncModeration queue_behaviour="REMOVE", type="AUTHOR_BLOCK", value_required=True, - webhooks=[ - { - "name": "name", - "url": "https://example.com", - "id": "id", - "description": "description", - } - ], ) assert_matches_type(ActionCreateResponse, action, path=["response"]) @@ -404,14 +380,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncModeration queue_behaviour="REMOVE", type="AUTHOR_BLOCK", value_required=True, - webhooks=[ - { - "name": "name", - "url": "https://example.com", - "id": "id", - "description": "description", - } - ], ) assert_matches_type(ActionUpdateResponse, action, path=["response"])