diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index d3ee64ee..ddf57510 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: a78f35a2-6d8d-4b9f-8962-89b8103f2924 management: - docChecksum: 29c7bb10b9655dcfe925eacf9d5f4758 + docChecksum: d1c7a760d4c00f34fad01646ab23b9eb docVersion: 1.1.0 speakeasyVersion: internal generationVersion: internal - releaseVersion: 3.4.0 - configChecksum: c9a222e953fdc5d702181456b833ed7c + releaseVersion: 3.5.0 + configChecksum: ce2c622cc19dc09d2d1f3762fa7ed26e repoURL: https://github.com/moderation-api/sdk-ruby installationURL: https://github.com/moderation-api/sdk-ruby published: true @@ -38,7 +38,7 @@ trackedFiles: Gemfile: last_write_checksum: sha1:8c1b6fa9505f61abd0fb6741f8094e9655a55495 Gemfile.lock: - last_write_checksum: sha1:c8e6dae81c73f4a444ac274375a62c07a4bf1853 + last_write_checksum: sha1:bc90cde5e7816f72d047b535d2b1751f85f94d74 Rakefile: last_write_checksum: sha1:c572639efdae8c7b24141ee5c02d8f009e101ed8 USAGE.md: @@ -724,7 +724,7 @@ trackedFiles: docs/models/operations/signalsresponse.md: last_write_checksum: sha1:5b353278302ad0b1cbdd679f0bcba3d3f7daa12a docs/models/operations/sort.md: - last_write_checksum: sha1:95eebfceaa7d2bff93bce63c80396fc17c3bdca6 + last_write_checksum: sha1:0dbc3e07ed3bb3d8f5c2b39e375d79f61de9804d docs/models/operations/sortby.md: last_write_checksum: sha1:1b1edd5725c7f62071e643064436dea559772933 docs/models/operations/sortdirection.md: @@ -882,7 +882,7 @@ trackedFiles: docs/sdks/account/README.md: last_write_checksum: sha1:8287c6d548c1942909e34ec4c9dc7e5cbb966c83 docs/sdks/actions/README.md: - last_write_checksum: sha1:698e3600b3ae9416e882ccfc7f2204de9d49949b + last_write_checksum: sha1:339f36c15d221795a15b7b0ff5bda69f45757ee6 docs/sdks/analytics/README.md: last_write_checksum: sha1:8e703b00a8e03fed2d138c7bcccb15cf091b8d22 docs/sdks/apikeys/README.md: @@ -892,7 +892,7 @@ trackedFiles: docs/sdks/channels/README.md: last_write_checksum: sha1:ed1f37cd92ff8ef60df01de8567e533f4c2adf26 docs/sdks/content/README.md: - last_write_checksum: sha1:a83d960a8c159a36fb3f99a1912dbdf346d0ad13 + last_write_checksum: sha1:805c9fd790313074b8692450451f04e8dd215200 docs/sdks/feedback/README.md: last_write_checksum: sha1:a01d711b5e761184a0033a59f4604075be684cfb docs/sdks/items/README.md: @@ -926,7 +926,7 @@ trackedFiles: lib/moderation_api/account.rb: last_write_checksum: sha1:ea3cfe55787ecb7cc8ed798b76d4036b1aa3d3bc lib/moderation_api/actions.rb: - last_write_checksum: sha1:176a1320c5e48a9a9198fa2f934aea4719173fbe + last_write_checksum: sha1:fc8df659f5fbc2b00ed6849fb4a510b35f8db83c lib/moderation_api/analytics.rb: last_write_checksum: sha1:6a23dddf048a3ca91c1a78c1bc75ac97f1ab5e15 lib/moderation_api/apikeys.rb: @@ -936,7 +936,7 @@ trackedFiles: lib/moderation_api/channels.rb: last_write_checksum: sha1:8d995eac91d890d34e95f9c6120c503337bda145 lib/moderation_api/content.rb: - last_write_checksum: sha1:3bb7a2028db1c2e83b3e66f428e4ded4c7f5a9bc + last_write_checksum: sha1:04c3ec8becc60dab54d1143df4f7918cb57e8404 lib/moderation_api/feedback.rb: last_write_checksum: sha1:184f119c5d2fc1bcb5f65416c2d61ae445759303 lib/moderation_api/items.rb: @@ -2314,7 +2314,7 @@ trackedFiles: lib/moderation_api/models/operations/signals_response.rbi: last_write_checksum: sha1:940bd85b83ca55cde1d96a9ebb6b8b48505cc75f lib/moderation_api/models/operations/sort.rb: - last_write_checksum: sha1:463f524ac3587870a9ca62dc74aaf97d5b46c1b4 + last_write_checksum: sha1:1f21a1fab7eef5ed597b83989f3522b5bb74d7a1 lib/moderation_api/models/operations/sort.rbi: last_write_checksum: sha1:b2e3ffdcf17a1fd7b8577ddd0c8c463e5a41ee95 lib/moderation_api/models/operations/sortby.rb: @@ -2636,7 +2636,7 @@ trackedFiles: lib/moderation_api/sdk_hooks/types.rb: last_write_checksum: sha1:4c965332c50ba795946cf8df50a6202e89db0a45 lib/moderation_api/sdkconfiguration.rb: - last_write_checksum: sha1:2f2fbd9b5954e2fc9f4ee6e206490ea6f067ed7f + last_write_checksum: sha1:04ebeab88831fe74ff107e603042be7f78f9e187 lib/moderation_api/sdkconfiguration.rbi: last_write_checksum: sha1:0ff7c53716ae2b6668c84ad4f83b9a8697482c33 lib/moderation_api/utils/forms.rb: @@ -2664,7 +2664,7 @@ trackedFiles: lib/moderation_api/words.rb: last_write_checksum: sha1:1caff3b1db9983d6cd6d76e0f90d47a39e376842 moderation_api.gemspec: - last_write_checksum: sha1:166cc314904fa48b06f09c7fcb565cf219238c51 + last_write_checksum: sha1:88f1fb881b71f1fd2642e55c3866572e548d41a8 sorbet/config: last_write_checksum: sha1:d02b32628dad70edc5929a9b9801d5e2dca15d40 sorbet/rbi/annotations/.gitattributes: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 397463ec..5ad6cc61 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false ruby: - version: 3.4.0 + version: 3.5.0 additionalDependencies: development: {} runtime: {} diff --git a/.speakeasy/openapi.json b/.speakeasy/openapi.json index e6db07ff..81ffb54c 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 72257d13..a6e1f3b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.5.0 (2026-11-12) + +Full Changelog: [v3.4.0...v3.5.0](https://github.com/moderation-api/sdk-ruby/compare/v3.4.0...v3.5.0) + +### API changes + +- `GET /queue/{id}/items`: added the new enum value `ROBOCALL_DESC` to the `query` request parameter `sort` + ## 3.4.0 (2026-10-29) Full Changelog: [v3.3.0...v3.4.0](https://github.com/moderation-api/sdk-ruby/compare/v3.3.0...v3.4.0) diff --git a/Gemfile.lock b/Gemfile.lock index 5ac2b810..d083e18d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - moderation_api (3.4.0) + moderation_api (3.5.0) faraday faraday-multipart faraday-retry diff --git a/docs/models/operations/sort.md b/docs/models/operations/sort.md index 5339d244..5c617907 100644 --- a/docs/models/operations/sort.md +++ b/docs/models/operations/sort.md @@ -16,4 +16,5 @@ value = Sort::FIFO | `FIFO` | FIFO | | `LIFO` | LIFO | | `RANDOM` | RANDOM | -| `SEVERITY_DESC` | SEVERITY_DESC | \ No newline at end of file +| `SEVERITY_DESC` | SEVERITY_DESC | +| `ROBOCALL_DESC` | ROBOCALL_DESC | \ No newline at end of file diff --git a/docs/sdks/actions/README.md b/docs/sdks/actions/README.md index 2d8ea213..93558add 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 @@ -60,7 +60,7 @@ end ## 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 @@ -108,7 +108,7 @@ end ## 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 @@ -151,7 +151,7 @@ end ## 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 @@ -239,7 +239,7 @@ end ## 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 41f698b7..370d582d 100644 --- a/docs/sdks/content/README.md +++ b/docs/sdks/content/README.md @@ -100,7 +100,7 @@ end ## 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/lib/moderation_api/actions.rb b/lib/moderation_api/actions.rb index 8d260cd5..26d259ad 100644 --- a/lib/moderation_api/actions.rb +++ b/lib/moderation_api/actions.rb @@ -51,7 +51,7 @@ def get_url(base_url:, url_variables: nil) } def list(queue_id: nil, page: nil, page_size: nil, project_id: nil, timeout_ms: nil, http_headers: nil) # list - 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. request = Models::Operations::ListActionsRequest.new( queue_id: queue_id, page: page, @@ -368,7 +368,7 @@ def list(queue_id: nil, page: nil, page_size: nil, project_id: nil, timeout_ms: } def create(body:, project_id: nil, timeout_ms: nil, http_headers: nil) # create - 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. request = Models::Operations::CreateActionRequest.new( body: body, project_id: project_id @@ -614,7 +614,7 @@ def create(body:, project_id: nil, timeout_ms: nil, http_headers: nil) } def retrieve(id:, project_id: nil, timeout_ms: nil, http_headers: nil) # retrieve - 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. request = Models::Operations::GetActionRequest.new( id: id, project_id: project_id @@ -853,7 +853,7 @@ def retrieve(id:, project_id: nil, timeout_ms: nil, http_headers: nil) } def update(body:, id:, project_id: nil, timeout_ms: nil, http_headers: nil) # update - 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. request = Models::Operations::UpdateActionRequest.new( id: id, body: body, @@ -1365,7 +1365,7 @@ def delete(id:, project_id: nil, timeout_ms: nil, http_headers: nil) } def execute(body:, project_id: nil, timeout_ms: nil, http_headers: nil) # execute - 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. request = Models::Operations::ExecuteActionRequest.new( body: body, project_id: project_id diff --git a/lib/moderation_api/content.rb b/lib/moderation_api/content.rb index f2fbc7bd..f6296c22 100644 --- a/lib/moderation_api/content.rb +++ b/lib/moderation_api/content.rb @@ -554,6 +554,7 @@ def allow(body:, id:, project_id: nil, timeout_ms: nil, http_headers: nil) } def submit(body:, project_id: nil, timeout_ms: nil, http_headers: nil) # 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. request = Models::Operations::SubmitContentRequest.new( body: body, project_id: project_id diff --git a/lib/moderation_api/models/operations/sort.rb b/lib/moderation_api/models/operations/sort.rb index 62520524..06dcea5a 100644 --- a/lib/moderation_api/models/operations/sort.rb +++ b/lib/moderation_api/models/operations/sort.rb @@ -13,6 +13,7 @@ class Sort < T::Enum LIFO = new("LIFO") RANDOM = new("RANDOM") SEVERITY_DESC = new("SEVERITY_DESC") + ROBOCALL_DESC = new("ROBOCALL_DESC") end end end diff --git a/lib/moderation_api/sdkconfiguration.rb b/lib/moderation_api/sdkconfiguration.rb index 8668320f..768cde75 100644 --- a/lib/moderation_api/sdkconfiguration.rb +++ b/lib/moderation_api/sdkconfiguration.rb @@ -93,9 +93,9 @@ def initialize(client, hooks, retry_config, timeout_ms, secret_key, security_sou @language = "ruby" @openapi_doc_version = "1.1.0" - @sdk_version = "3.4.0" + @sdk_version = "3.5.0" @gen_version = "internal" - @user_agent = "speakeasy-sdk/ruby 3.4.0 internal 1.1.0 moderation_api" + @user_agent = "speakeasy-sdk/ruby 3.5.0 internal 1.1.0 moderation_api" end sig { returns([String, T::Hash[Symbol, String]]) } diff --git a/moderation_api.gemspec b/moderation_api.gemspec index 58a911d4..10d171a7 100644 --- a/moderation_api.gemspec +++ b/moderation_api.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__) Gem::Specification.new do |s| s.name = 'moderation_api' - s.version = '3.4.0' + s.version = '3.5.0' s.platform = Gem::Platform::RUBY s.licenses = ['Apache-2.0'] s.summary = ''