From 6a73896c105b660392e7d6d092674a0bf6732fcf Mon Sep 17 00:00:00 2001 From: chrisdengso <8185683+chrisdengso@users.noreply.github.com> Date: Thu, 12 Nov 2026 18:55:04 +0000 Subject: [PATCH] feat: v1.5.0, API changes --- .speakeasy/gen.lock | 20 ++-- .speakeasy/gen.yaml | 2 +- .speakeasy/openapi.json | 190 ++++++++++++++++++++++----------- CHANGELOG.md | 8 ++ docs/Models/Operations/Sort.md | 3 +- docs/sdks/actions/README.md | 10 +- docs/sdks/content/README.md | 2 +- src/Actions.php | 12 +-- src/Content.php | 2 + src/Models/Operations/Sort.php | 1 + src/SDKConfiguration.php | 4 +- 11 files changed, 163 insertions(+), 91 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index cffd100..86463f2 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 0199302d-9d48-4081-a021-a66e7a11ce41 management: - docChecksum: 29c7bb10b9655dcfe925eacf9d5f4758 + docChecksum: d1c7a760d4c00f34fad01646ab23b9eb docVersion: 1.1.0 speakeasyVersion: internal generationVersion: internal - releaseVersion: 1.4.0 - configChecksum: 8dd588e2f67e2feb90c248cfac22e589 + releaseVersion: 1.5.0 + configChecksum: 89b0ece60d4724cedee3ea727e567e05 repoURL: https://github.com/moderation-api/sdk-php installationURL: https://github.com/moderation-api/sdk-php.git published: true @@ -716,7 +716,7 @@ trackedFiles: docs/Models/Operations/SignalsResponse.md: last_write_checksum: sha1:ab81434597d9401b483d689acf9cc993b1fd8473 docs/Models/Operations/Sort.md: - last_write_checksum: sha1:4933f2964f135a5d6b74596b625ff254d35a123b + last_write_checksum: sha1:f38e9c8cbbbd61470a5fc037960d81aa043be448 docs/Models/Operations/SortBy.md: last_write_checksum: sha1:64e38bedd26e4d3fca155a257e6536945f56a453 docs/Models/Operations/SortDirection.md: @@ -874,7 +874,7 @@ trackedFiles: docs/sdks/account/README.md: last_write_checksum: sha1:edc81d8fb02e7e2f907d5ac8563ad2961cf0d4df docs/sdks/actions/README.md: - last_write_checksum: sha1:e507621a42936c296ae03eac2ee068106ba47909 + last_write_checksum: sha1:d72df4833b739ecdfa036962266dc9215f4b7dfd docs/sdks/analytics/README.md: last_write_checksum: sha1:47430172462b2cc2a9ca4f0f3487d5137f60e0ab docs/sdks/apikeys/README.md: @@ -884,7 +884,7 @@ trackedFiles: docs/sdks/channels/README.md: last_write_checksum: sha1:784bad3ada3395f36a632bf3a16f7cd944cb9c5e docs/sdks/content/README.md: - last_write_checksum: sha1:64ddd93e4d2dca3fb7f7df27c04eb1ee82a4d680 + last_write_checksum: sha1:d4b359b0315bc1664c5147eaaa7d96c2c07b4676 docs/sdks/feedback/README.md: last_write_checksum: sha1:c94088099f0c490ede88e5a6e31de669fe2a2cd5 docs/sdks/items/README.md: @@ -912,7 +912,7 @@ trackedFiles: src/Account.php: last_write_checksum: sha1:26391ec4892280e1d53af5902ee40e9972024151 src/Actions.php: - last_write_checksum: sha1:09b60a8e5784ab74e6fd02d13a167d41bad6df4f + last_write_checksum: sha1:a8627b6dc24757c3d7121042647cff184c8166ec src/Analytics.php: last_write_checksum: sha1:ee29552223bc73767994879c3b1ecfc041c9abd3 src/ApiKeys.php: @@ -922,7 +922,7 @@ trackedFiles: src/Channels.php: last_write_checksum: sha1:e21a72abd3bcc3c758a5b6be405a9c9ae913e2f6 src/Content.php: - last_write_checksum: sha1:0af180b999501ccaf0bd250ea6c63531a8859f2a + last_write_checksum: sha1:1374011165519449ac78e69ca9836bec861b0392 src/Feedback.php: last_write_checksum: sha1:9bcf1711ab2b98d185316c243fea74a34e33d949 src/Hooks/AfterErrorContext.php: @@ -1634,7 +1634,7 @@ trackedFiles: src/Models/Operations/SignalsResponse.php: last_write_checksum: sha1:def75e4b92c4ea9f8e01724d9ff1847e261b976e src/Models/Operations/Sort.php: - last_write_checksum: sha1:8ae288dc521988dcbfebae3ddc0e53959bdc197a + last_write_checksum: sha1:1c519243572868034035a6ddd8525a4298e56737 src/Models/Operations/SortBy.php: last_write_checksum: sha1:5958d560878c915648566a433afc382a2c010d11 src/Models/Operations/SortDirection.php: @@ -1796,7 +1796,7 @@ trackedFiles: src/Queue.php: last_write_checksum: sha1:be966a810109ae154cee3d97d78b3dec2c7512ef src/SDKConfiguration.php: - last_write_checksum: sha1:d94629e6785e23d2f3eae32160d246604ef5724d + last_write_checksum: sha1:fb9aae471e87833318ef78fba6fbd03b9f113dc2 src/Utils/BigDecimalHandler.php: last_write_checksum: sha1:2d36b5ae690b042acfcdfe7e7277d44c5055416f src/Utils/BigIntHandler.php: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 9b167f1..0f16a5a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false php: - version: 1.4.0 + version: 1.5.0 additionalDependencies: autoload: {} autoload-dev: {} diff --git a/.speakeasy/openapi.json b/.speakeasy/openapi.json index e6db07f..81ffb54 100644 --- a/.speakeasy/openapi.json +++ b/.speakeasy/openapi.json @@ -394,7 +394,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -591,7 +592,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -790,7 +792,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -972,7 +975,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -1179,7 +1183,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -1433,7 +1438,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -1624,7 +1630,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false }, "x-speakeasy-pagination": { "type": "offsetLimit", @@ -1874,7 +1881,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -1993,7 +2001,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } }, "put": { @@ -2234,7 +2243,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": false } }, "delete": { @@ -2360,7 +2370,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": false } } }, @@ -2510,7 +2521,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -2658,7 +2670,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false }, "x-speakeasy-pagination": { "type": "offsetLimit", @@ -2805,7 +2818,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -3025,7 +3039,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -3084,7 +3099,8 @@ "FIFO", "LIFO", "RANDOM", - "SEVERITY_DESC" + "SEVERITY_DESC", + "ROBOCALL_DESC" ] } }, @@ -3254,7 +3270,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false }, "x-speakeasy-pagination": { "type": "offsetLimit", @@ -3406,7 +3423,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": true } } }, @@ -3563,7 +3581,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": true } } }, @@ -3705,7 +3724,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -3713,7 +3733,7 @@ "get": { "operationId": "listActions", "summary": "List moderation actions", - "description": "List the moderation actions of the project. The list is paginated.", + "description": "List the moderation actions of the project, with their webhooks. An action is a decision that a reviewer or a rule can take on content or an author. Built-in actions (for example reject an item or block an author) change the item or author in Moderation API. Custom actions record the decision and send it to the webhooks of the action, where the customer platform acts on it. The list is paginated.", "tags": [ "Actions" ], @@ -3988,7 +4008,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false }, "x-speakeasy-pagination": { "type": "offsetLimit", @@ -4013,7 +4034,7 @@ "post": { "operationId": "createAction", "summary": "Create an action", - "description": "Create an action.", + "description": "Create an action that reviewers and rules can take. `type` sets what it does: a built-in type changes the item or author in Moderation API, and a custom type (`ITEM_CUSTOM`, `AUTHOR_CUSTOM`) only records the decision for the webhooks to deliver. Creating an action does not execute it.", "tags": [ "Actions" ], @@ -4347,7 +4368,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -4355,7 +4377,7 @@ "get": { "operationId": "getAction", "summary": "Get an action", - "description": "Get an action by ID.", + "description": "Get an action by ID: its type, where it shows in the review queues, the values it takes and its webhooks.", "tags": [ "Actions" ], @@ -4574,13 +4596,14 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } }, "put": { "operationId": "updateAction", "summary": "Update an action", - "description": "Update an action.", + "description": "Update the settings of an action: its name, type, queues and values. The new settings apply the next time the action is executed. Updating an action does not execute it.", "tags": [ "Actions" ], @@ -4925,7 +4948,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": false } }, "delete": { @@ -5037,7 +5061,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": false } } }, @@ -5045,7 +5070,7 @@ "post": { "operationId": "executeAction", "summary": "Execute moderation action", - "description": "Execute a moderation action on one or more content items.", + "description": "Execute one action of the project, by ID or key, on content items or authors. A built-in action changes them in Moderation API (for example rejects the items or blocks the authors). Every executed action is recorded, and the project sends it to the webhooks of the action and to its other webhook endpoints, where the customer platform can act on it. List the actions first to see what each one does.", "tags": [ "Actions" ], @@ -5198,7 +5223,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": true } } }, @@ -5206,7 +5232,7 @@ "post": { "operationId": "executeActionById", "summary": "Execute an action", - "description": "Execute an action on a set of content items in a queue.", + "description": "Execute an action on a set of content items in a queue. The project sends the result to the webhooks of the action. Use `POST /actions/execute` instead.", "tags": [ "Actions" ], @@ -5487,7 +5513,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": true } } }, @@ -5625,7 +5652,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": true } } }, @@ -5751,7 +5779,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": true } } }, @@ -5886,7 +5915,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": true } } }, @@ -6012,7 +6042,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": true } } }, @@ -6183,7 +6214,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false }, "x-speakeasy-pagination": { "type": "offsetLimit", @@ -6405,7 +6437,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": true } } }, @@ -6557,7 +6590,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } }, "put": { @@ -6767,7 +6801,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": true } }, "delete": { @@ -6869,7 +6904,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": false } } }, @@ -7664,7 +7700,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -8066,7 +8103,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false }, "x-speakeasy-pagination": { "type": "offsetLimit", @@ -8255,7 +8293,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -8431,7 +8470,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } }, "put": { @@ -8620,7 +8660,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": false } }, "delete": { @@ -8730,7 +8771,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": false } } }, @@ -8870,7 +8912,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -9020,7 +9063,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } }, "delete": { @@ -9153,7 +9197,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": false } } }, @@ -9161,6 +9206,7 @@ "post": { "operationId": "submitContent", "summary": "Submit content", + "description": "Moderate one piece of content: text, an image, a video, audio or an object with several fields. The project checks it against the policies of its channel and returns the result. Act on `recommendation.action` (allow, review or reject). The content is stored in the project unless `doNotStore` is set, and items to review go to the review queue. The project can send the result to its webhook endpoints.", "tags": [ "Content" ], @@ -11552,7 +11598,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": true } } }, @@ -11660,7 +11707,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false }, "x-speakeasy-pagination": { "type": "offsetLimit", @@ -11796,7 +11844,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -11885,7 +11934,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } }, "put": { @@ -12052,7 +12102,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": false } }, "delete": { @@ -12154,7 +12205,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": false } } }, @@ -12271,7 +12323,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -12389,7 +12442,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -12517,7 +12571,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false }, "x-speakeasy-pagination": { "type": "offsetLimit", @@ -12681,7 +12736,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, @@ -12770,7 +12826,8 @@ "read" ], "readOnlyHint": true, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } }, "put": { @@ -12980,7 +13037,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": false } }, "delete": { @@ -13092,7 +13150,8 @@ "destructive" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": true, + "openWorldHint": false } } }, @@ -13216,7 +13275,8 @@ "write" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": false, + "openWorldHint": false } } }, diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f1c2c3..0ea226a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.5.0 (2026-11-12) + +Full Changelog: [v1.4.0...v1.5.0](https://github.com/moderation-api/sdk-php/compare/v1.4.0...v1.5.0) + +### API changes + +- `GET /queue/{id}/items`: added the new enum value `ROBOCALL_DESC` to the `query` request parameter `sort` + ## 1.4.0 (2026-10-29) Full Changelog: [v1.3.0...v1.4.0](https://github.com/moderation-api/sdk-php/compare/v1.3.0...v1.4.0) diff --git a/docs/Models/Operations/Sort.md b/docs/Models/Operations/Sort.md index 0f50b1f..b6c9a5f 100644 --- a/docs/Models/Operations/Sort.md +++ b/docs/Models/Operations/Sort.md @@ -8,4 +8,5 @@ | `Fifo` | FIFO | | `Lifo` | LIFO | | `Random` | RANDOM | -| `SeverityDesc` | SEVERITY_DESC | \ No newline at end of file +| `SeverityDesc` | SEVERITY_DESC | +| `RobocallDesc` | ROBOCALL_DESC | \ No newline at end of file diff --git a/docs/sdks/actions/README.md b/docs/sdks/actions/README.md index af6f771..105d48c 100644 --- a/docs/sdks/actions/README.md +++ b/docs/sdks/actions/README.md @@ -13,7 +13,7 @@ ## list -List the moderation actions of the project. The list is paginated. +List the moderation actions of the project, with their webhooks. An action is a decision that a reviewer or a rule can take on content or an author. Built-in actions (for example reject an item or block an author) change the item or author in Moderation API. Custom actions record the decision and send it to the webhooks of the action, where the customer platform acts on it. The list is paginated. ### Example Usage @@ -74,7 +74,7 @@ foreach ($responses as $response) { ## create -Create an action. +Create an action that reviewers and rules can take. `type` sets what it does: a built-in type changes the item or author in Moderation API, and a custom type (`ITEM_CUSTOM`, `AUTHOR_CUSTOM`) only records the decision for the webhooks to deliver. Creating an action does not execute it. ### Example Usage @@ -132,7 +132,7 @@ if ($response->object !== null) { ## retrieve -Get an action by ID. +Get an action by ID: its type, where it shows in the review queues, the values it takes and its webhooks. ### Example Usage @@ -184,7 +184,7 @@ if ($response->object !== null) { ## update -Update an action. +Update the settings of an action: its name, type, queues and values. The new settings apply the next time the action is executed. Updating an action does not execute it. ### Example Usage @@ -293,7 +293,7 @@ if ($response->object !== null) { ## execute -Execute a moderation action on one or more content items. +Execute one action of the project, by ID or key, on content items or authors. A built-in action changes them in Moderation API (for example rejects the items or blocks the authors). Every executed action is recorded, and the project sends it to the webhooks of the action and to its other webhook endpoints, where the customer platform can act on it. List the actions first to see what each one does. ### Example Usage diff --git a/docs/sdks/content/README.md b/docs/sdks/content/README.md index 7e5bb4e..bf32fb6 100644 --- a/docs/sdks/content/README.md +++ b/docs/sdks/content/README.md @@ -124,7 +124,7 @@ if ($response->object !== null) { ## submit -Submit content +Moderate one piece of content: text, an image, a video, audio or an object with several fields. The project checks it against the policies of its channel and returns the result. Act on `recommendation.action` (allow, review or reject). The content is stored in the project unless `doNotStore` is set, and items to review go to the review queue. The project can send the result to its webhook endpoints. ### Example Usage diff --git a/src/Actions.php b/src/Actions.php index ca7f4ed..d569dd5 100644 --- a/src/Actions.php +++ b/src/Actions.php @@ -47,7 +47,7 @@ public function getUrl(string $baseUrl, array $urlVariables): string /** * Create an action * - * Create an action. + * Create an action that reviewers and rules can take. `type` sets what it does: a built-in type changes the item or author in Moderation API, and a custom type (`ITEM_CUSTOM`, `AUTHOR_CUSTOM`) only records the decision for the webhooks to deliver. Creating an action does not execute it. * * @param \ModerationApi\Models\Operations\CreateActionRequestBody $body * @param ?string $projectId @@ -290,7 +290,7 @@ public function delete(string $id, ?string $projectId = null, ?Options $options /** * Execute moderation action * - * Execute a moderation action on one or more content items. + * Execute one action of the project, by ID or key, on content items or authors. A built-in action changes them in Moderation API (for example rejects the items or blocks the authors). Every executed action is recorded, and the project sends it to the webhooks of the action and to its other webhook endpoints, where the customer platform can act on it. List the actions first to see what each one does. * * @param \ModerationApi\Models\Operations\ExecuteActionRequestBody $body * @param ?string $projectId @@ -414,7 +414,7 @@ public function execute(Operations\ExecuteActionRequestBody $body, ?string $proj /** * Get an action * - * Get an action by ID. + * Get an action by ID: its type, where it shows in the review queues, the values it takes and its webhooks. * * @param string $id * @param ?string $projectId @@ -533,7 +533,7 @@ public function retrieve(string $id, ?string $projectId = null, ?Options $option /** * List moderation actions * - * List the moderation actions of the project. The list is paginated. + * List the moderation actions of the project, with their webhooks. An action is a decision that a reviewer or a rule can take on content or an author. Built-in actions (for example reject an item or block an author) change the item or author in Moderation API. Custom actions record the decision and send it to the webhooks of the action, where the customer platform acts on it. The list is paginated. * * @param ?string $queueId * @param ?int $page @@ -717,7 +717,7 @@ private function listIndividual(?string $queueId = null, ?int $page = null, ?int /** * List moderation actions * - * List the moderation actions of the project. The list is paginated. + * List the moderation actions of the project, with their webhooks. An action is a decision that a reviewer or a rule can take on content or an author. Built-in actions (for example reject an item or block an author) change the item or author in Moderation API. Custom actions record the decision and send it to the webhooks of the action, where the customer platform acts on it. The list is paginated. * * @param ?string $queueId * @param ?int $page @@ -738,7 +738,7 @@ public function list(?string $queueId = null, ?int $page = null, ?int $pageSize /** * Update an action * - * Update an action. + * Update the settings of an action: its name, type, queues and values. The new settings apply the next time the action is executed. Updating an action does not execute it. * * @param \ModerationApi\Models\Operations\UpdateActionRequestBody $body * @param string $id diff --git a/src/Content.php b/src/Content.php index e8b0267..f4759c3 100644 --- a/src/Content.php +++ b/src/Content.php @@ -299,6 +299,8 @@ public function reject(Operations\RejectContentRequestBody $body, string $id, ?s /** * Submit content * + * Moderate one piece of content: text, an image, a video, audio or an object with several fields. The project checks it against the policies of its channel and returns the result. Act on `recommendation.action` (allow, review or reject). The content is stored in the project unless `doNotStore` is set, and items to review go to the review queue. The project can send the result to its webhook endpoints. + * * @param \ModerationApi\Models\Operations\SubmitContentRequestBody $body * @param ?string $projectId * @return \ModerationApi\Models\Operations\SubmitContentResponse diff --git a/src/Models/Operations/Sort.php b/src/Models/Operations/Sort.php index 4725212..d6b114f 100644 --- a/src/Models/Operations/Sort.php +++ b/src/Models/Operations/Sort.php @@ -16,4 +16,5 @@ enum Sort: string case Lifo = 'LIFO'; case Random = 'RANDOM'; case SeverityDesc = 'SEVERITY_DESC'; + case RobocallDesc = 'ROBOCALL_DESC'; } diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index 211e520..6acff8d 100644 --- a/src/SDKConfiguration.php +++ b/src/SDKConfiguration.php @@ -26,11 +26,11 @@ class SDKConfiguration public string $openapiDocVersion = '1.1.0'; - public string $sdkVersion = '1.4.0'; + public string $sdkVersion = '1.5.0'; public string $genVersion = 'internal'; - public string $userAgent = 'speakeasy-sdk/php 1.4.0 internal 1.1.0 moderation-api/sdk-php'; + public string $userAgent = 'speakeasy-sdk/php 1.5.0 internal 1.1.0 moderation-api/sdk-php'; public ?RetryConfig $retryConfig = null;