From b6c2480be34efd872e3929d137386c5f44218713 Mon Sep 17 00:00:00 2001 From: chrisdengso <8185683+chrisdengso@users.noreply.github.com> Date: Thu, 22 Oct 2026 12:48:33 +0000 Subject: [PATCH] feat: v1.1.0, API changes --- .github/workflows/publish-packagist.yml | 13 +- .speakeasy/gen.lock | 206 +- .speakeasy/gen.yaml | 2 +- .speakeasy/openapi.json | 14224 ++++++++++++++++ CHANGELOG.md | 42 + README.md | 6 +- USAGE.md | 4 +- docs/Models/Components/BadRequestErrorCode.md | 10 +- .../Components/PermissionDeniedErrorCode.md | 2 - docs/Models/Errors/BadRequestError.md | 18 +- docs/Models/Errors/PermissionDeniedError.md | 18 +- .../Operations/AddWordlistWordsRequest.md | 9 +- docs/Models/Operations/CreateActionRequest.md | 17 +- .../Operations/CreateActionRequestBody.md | 18 + docs/Models/Operations/CreateAuthorRequest.md | 16 +- .../Operations/CreateAuthorRequestBody.md | 17 + .../Models/Operations/CreateWebhookRequest.md | 10 +- .../Operations/CreateWebhookRequestBody.md | 11 + docs/Models/Operations/DeleteActionRequest.md | 7 +- docs/Models/Operations/DeleteAuthorRequest.md | 7 +- .../Models/Operations/DeleteWebhookRequest.md | 7 +- .../Models/Operations/ExecuteActionRequest.md | 14 +- .../Operations/ExecuteActionRequestBody.md | 15 + docs/Models/Operations/GetAccountRequest.md | 8 + docs/Models/Operations/GetActionRequest.md | 7 +- docs/Models/Operations/GetAuthorRequest.md | 7 +- docs/Models/Operations/GetQueueRequest.md | 7 +- .../Models/Operations/GetQueueStatsRequest.md | 9 +- docs/Models/Operations/GetWebhookRequest.md | 7 +- .../Operations/GetWebhookSecretRequest.md | 8 + .../GetWordlistEmbeddingStatusRequest.md | 7 +- docs/Models/Operations/GetWordlistRequest.md | 7 +- docs/Models/Operations/ListActionsRequest.md | 11 +- docs/Models/Operations/ListAuthorsRequest.md | 19 +- .../Operations/ListQueueItemsRequest.md | 29 +- docs/Models/Operations/ListWebhooksRequest.md | 9 +- .../Models/Operations/ListWordlistsRequest.md | 9 +- .../Operations/RemoveWordlistWordsRequest.md | 9 +- .../Operations/ResolveQueueItemRequest.md | 11 +- .../Models/Operations/SubmitContentRequest.md | 17 +- .../Operations/SubmitContentRequestBody.md | 18 + .../Operations/UnresolveQueueItemRequest.md | 11 +- docs/Models/Operations/UpdateActionRequest.md | 9 +- docs/Models/Operations/UpdateAuthorRequest.md | 9 +- .../Models/Operations/UpdateWebhookRequest.md | 9 +- .../Operations/UpdateWordlistRequest.md | 9 +- docs/sdks/account/README.md | 6 + docs/sdks/actions/README.md | 56 +- docs/sdks/authors/README.md | 34 +- docs/sdks/content/README.md | 15 +- docs/sdks/items/README.md | 22 +- docs/sdks/queue/README.md | 16 +- docs/sdks/webhooks/README.md | 43 +- docs/sdks/webhooksecret/README.md | 6 + docs/sdks/wordlist/README.md | 32 +- docs/sdks/words/README.md | 18 +- src/Account.php | 10 +- src/Actions.php | 68 +- src/Authors.php | 44 +- src/Content.php | 17 +- src/Items.php | 21 +- src/Models/Components/BadRequestErrorCode.php | 2 + .../Components/PermissionDeniedErrorCode.php | 2 - src/Models/Errors/BadRequestError.php | 1 + src/Models/Errors/PermissionDeniedError.php | 1 - .../Operations/AddWordlistWordsRequest.php | 12 +- src/Models/Operations/CreateActionRequest.php | 132 +- .../Operations/CreateActionRequestBody.php | 145 + src/Models/Operations/CreateAuthorRequest.php | 116 +- .../Operations/CreateAuthorRequestBody.php | 129 + .../Operations/CreateWebhookRequest.php | 49 +- .../Operations/CreateWebhookRequestBody.php | 62 + src/Models/Operations/DeleteActionRequest.php | 12 +- src/Models/Operations/DeleteAuthorRequest.php | 12 +- .../Operations/DeleteWebhookRequest.php | 12 +- .../Operations/ExecuteActionRequest.php | 75 +- .../Operations/ExecuteActionRequestBody.php | 88 + src/Models/Operations/GetAccountRequest.php | 30 + src/Models/Operations/GetActionRequest.php | 12 +- src/Models/Operations/GetAuthorRequest.php | 12 +- src/Models/Operations/GetQueueRequest.php | 12 +- .../Operations/GetQueueStatsRequest.php | 12 +- src/Models/Operations/GetWebhookRequest.php | 12 +- .../Operations/GetWebhookSecretRequest.php | 30 + .../GetWordlistEmbeddingStatusRequest.php | 12 +- src/Models/Operations/GetWordlistRequest.php | 12 +- src/Models/Operations/ListActionsRequest.php | 12 +- src/Models/Operations/ListAuthorsRequest.php | 12 +- .../Operations/ListQueueItemsRequest.php | 12 +- src/Models/Operations/ListWebhooksRequest.php | 12 +- .../Operations/ListWordlistsRequest.php | 12 +- .../Operations/RemoveWordlistWordsRequest.php | 12 +- .../Operations/ResolveQueueItemRequest.php | 12 +- .../Operations/SubmitContentRequest.php | 133 +- .../Operations/SubmitContentRequestBody.php | 146 + .../Operations/UnresolveQueueItemRequest.php | 12 +- src/Models/Operations/UpdateActionRequest.php | 12 +- src/Models/Operations/UpdateAuthorRequest.php | 12 +- .../Operations/UpdateWebhookRequest.php | 12 +- .../Operations/UpdateWordlistRequest.php | 12 +- src/Queue.php | 16 +- src/SDKConfiguration.php | 4 +- src/WebhookSecret.php | 10 +- src/Webhooks.php | 53 +- src/Wordlist.php | 38 +- src/Words.php | 16 +- 106 files changed, 16006 insertions(+), 895 deletions(-) create mode 100644 .speakeasy/openapi.json create mode 100644 docs/Models/Operations/CreateActionRequestBody.md create mode 100644 docs/Models/Operations/CreateAuthorRequestBody.md create mode 100644 docs/Models/Operations/CreateWebhookRequestBody.md create mode 100644 docs/Models/Operations/ExecuteActionRequestBody.md create mode 100644 docs/Models/Operations/GetAccountRequest.md create mode 100644 docs/Models/Operations/GetWebhookSecretRequest.md create mode 100644 docs/Models/Operations/SubmitContentRequestBody.md create mode 100644 src/Models/Operations/CreateActionRequestBody.php create mode 100644 src/Models/Operations/CreateAuthorRequestBody.php create mode 100644 src/Models/Operations/CreateWebhookRequestBody.php create mode 100644 src/Models/Operations/ExecuteActionRequestBody.php create mode 100644 src/Models/Operations/GetAccountRequest.php create mode 100644 src/Models/Operations/GetWebhookSecretRequest.php create mode 100644 src/Models/Operations/SubmitContentRequestBody.php diff --git a/.github/workflows/publish-packagist.yml b/.github/workflows/publish-packagist.yml index c702ced..08df54c 100644 --- a/.github/workflows/publish-packagist.yml +++ b/.github/workflows/publish-packagist.yml @@ -1,7 +1,6 @@ # Maintained in moderation-api/sdk-generator (custom/php). Edits here are overwritten. # Every push to main whose package version has no release tag yet publishes -# that version and creates the GitHub release (notes: .github/release-notes/vX.Y.Z.md -# if present, otherwise generated from the merged pull requests). +# that version and creates the GitHub release (notes: the CHANGELOG.md entry). # Packagist reads the version from the tag, so the release comes first. name: Publish Packagist on: @@ -37,8 +36,14 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | - notes=".github/release-notes/v${VERSION}.md" - if [ -f "$notes" ]; then + # Notes: the CHANGELOG.md entry of this version, then the release notes file, + # then the merged pull requests. + notes="$RUNNER_TEMP/notes.md" + awk -v v="$VERSION" 'index($0, "## " v " (") == 1 {f = 1; next} f && /^## / {exit} f' CHANGELOG.md > "$notes" || true + if [ ! -s "$notes" ] && [ -f ".github/release-notes/v${VERSION}.md" ]; then + cp ".github/release-notes/v${VERSION}.md" "$notes" + fi + if [ -s "$notes" ]; then gh release create "v${VERSION}" --target "$GITHUB_SHA" --title "v${VERSION}" --notes-file "$notes" else gh release create "v${VERSION}" --target "$GITHUB_SHA" --title "v${VERSION}" --generate-notes diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 6e03ad3..5bb2f25 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: 9e61a5512adcd4b1e0a74112ed775731 + docChecksum: c27787b45fc5b72aafff31ba945a9e61 docVersion: 1.1.0 speakeasyVersion: internal generationVersion: internal - releaseVersion: 1.0.0 - configChecksum: cfb7efdb93627b41cad438be9a9f2811 + releaseVersion: 1.1.0 + configChecksum: 02c26a6ca40c5c5326664594c00efaf8 repoURL: https://github.com/moderation-api/sdk-php installationURL: https://github.com/moderation-api/sdk-php.git published: true @@ -32,13 +32,13 @@ trackedFiles: .gitattributes: last_write_checksum: sha1:d1d000f6673e5838a636562dceffa2d9dec820df USAGE.md: - last_write_checksum: sha1:cd23fcf6d50864fcdc2cd354abf5cb8a51cefd1d + last_write_checksum: sha1:915c1043fb986a5b633c004cb514ec6a8e15d055 composer.json: last_write_checksum: sha1:6a0554564610bee70b7b994b0408bd6e40c44746 docs/Models/Components/AuthenticationErrorCode.md: last_write_checksum: sha1:77a5b839e6e9801a15872fd82d47fd77651016c5 docs/Models/Components/BadRequestErrorCode.md: - last_write_checksum: sha1:f9aed60f95056516f8b2734228850e98e9707271 + last_write_checksum: sha1:f1b2867eb97dd660b63d8c77821b33406e97a1af docs/Models/Components/Block.md: last_write_checksum: sha1:334b51a56857c865c3777021eef19c61b8e41b37 docs/Models/Components/Channel.md: @@ -64,7 +64,7 @@ trackedFiles: docs/Models/Components/Path.md: last_write_checksum: sha1:59349a1104bace372a506492f859db94df29d333 docs/Models/Components/PermissionDeniedErrorCode.md: - last_write_checksum: sha1:1b6e1d2b1b088d93f3d757083732c85fcb5a1e66 + last_write_checksum: sha1:8d2215f0f16d48c277c84e25b3534fc17dd3498f docs/Models/Components/Project.md: last_write_checksum: sha1:4e1138762d9b1c2535fcc30a738c33f367446552 docs/Models/Components/ProjectGlobalFlaggingMode.md: @@ -90,7 +90,7 @@ trackedFiles: docs/Models/Errors/AuthenticationError.md: last_write_checksum: sha1:19eddc52faa3565fd9b66d39b55e727711eb5b12 docs/Models/Errors/BadRequestError.md: - last_write_checksum: sha1:120972e06d83d4e7aefcec1ad1dbe3933ff307e8 + last_write_checksum: sha1:c31c0f5b7444f18e2ef8b5a6b63d45a6bd411849 docs/Models/Errors/ConflictError.md: last_write_checksum: sha1:b1c7a7a062a6822a0604151f257f401afd969c41 docs/Models/Errors/InternalServerError.md: @@ -98,7 +98,7 @@ trackedFiles: docs/Models/Errors/NotFoundError.md: last_write_checksum: sha1:e9c31df6f8d3b6787599d6590413b0e3f3ba1253 docs/Models/Errors/PermissionDeniedError.md: - last_write_checksum: sha1:6da0652b9f3cbd98c28f131816eb736fa1326643 + last_write_checksum: sha1:06856791f3e1f92a4be0a82835dad3d7718bbf6b docs/Models/Errors/RateLimitError.md: last_write_checksum: sha1:2b85021bb6d8241e9989a5ba52ed3a24c988de8d docs/Models/Operations/ActionRequest.md: @@ -106,7 +106,7 @@ trackedFiles: docs/Models/Operations/ActionStat.md: last_write_checksum: sha1:034f55d8bf87a2e062cb242a8da2220c4d0754db docs/Models/Operations/AddWordlistWordsRequest.md: - last_write_checksum: sha1:54e45f672e21d12ebc16e0ad4b51fa8b98485f8c + last_write_checksum: sha1:ca66de87647fa35c062d5d758c8a531cb6c7a8a0 docs/Models/Operations/AddWordlistWordsRequestBody.md: last_write_checksum: sha1:5622b3b98b1276644fe08116a626fd2649003632 docs/Models/Operations/AddWordlistWordsResponse.md: @@ -174,7 +174,9 @@ trackedFiles: docs/Models/Operations/CreateActionQueueBehaviourResponse.md: last_write_checksum: sha1:97f02c2df095405ae5100f60ce4188c29fb7caa5 docs/Models/Operations/CreateActionRequest.md: - last_write_checksum: sha1:6552029f1e83eef217e68ea89852f45058869676 + last_write_checksum: sha1:4a89d2021662c1f7974550977d9c6b52651ee038 + docs/Models/Operations/CreateActionRequestBody.md: + last_write_checksum: sha1:4301b6c396498c2099be259ecba75004e59605b2 docs/Models/Operations/CreateActionResponse.md: last_write_checksum: sha1:997aec7078dbe25ab61cae2d82cc2a0b796ae166 docs/Models/Operations/CreateActionResponseBody.md: @@ -186,7 +188,9 @@ trackedFiles: docs/Models/Operations/CreateAuthorMetadata.md: last_write_checksum: sha1:cf046cd307e8a834bb4b2c4aad5d8031022ba16b docs/Models/Operations/CreateAuthorRequest.md: - last_write_checksum: sha1:d234d4a39cc29140d6e8a200cddb30b85e6ee852 + last_write_checksum: sha1:f2708d51c0eff657bb2ddceca06dd2c7b50187d4 + docs/Models/Operations/CreateAuthorRequestBody.md: + last_write_checksum: sha1:99f2d4900c44691cd5d41330c169c5da5ad3b827 docs/Models/Operations/CreateAuthorResponse.md: last_write_checksum: sha1:63cb4584fed1c5d1391ca009d5c5389c3a023808 docs/Models/Operations/CreateChannelContentType.md: @@ -208,7 +212,9 @@ trackedFiles: docs/Models/Operations/CreateWebhookPayloadVersion.md: last_write_checksum: sha1:2014e238e3e3f1e845d0edc6d69b0fc3608d6752 docs/Models/Operations/CreateWebhookRequest.md: - last_write_checksum: sha1:8a4939bd4c8aa4adc321fb61583bb376809302fe + last_write_checksum: sha1:6e4d43f1371567a8e5c47c04562944de66e264f2 + docs/Models/Operations/CreateWebhookRequestBody.md: + last_write_checksum: sha1:bf54406bb72b5a2d37bb53813290161db9e58c07 docs/Models/Operations/CreateWebhookResponse.md: last_write_checksum: sha1:39f5f50b291f24e39aede11c8b20a5f6ca0b4718 docs/Models/Operations/CreateWebhookResponseBody.md: @@ -230,13 +236,13 @@ trackedFiles: docs/Models/Operations/DataVideo.md: last_write_checksum: sha1:1299100c36d4060d8c8d125b0ae92f674f94f2a3 docs/Models/Operations/DeleteActionRequest.md: - last_write_checksum: sha1:a3d5bd016657d479ab161ceec553888be461ab74 + last_write_checksum: sha1:d2a2b266b2829e578ab34af318a5798167b67d8b docs/Models/Operations/DeleteActionResponse.md: last_write_checksum: sha1:d38fc0330e1c4c6cc4ff4a1f669d76991672d694 docs/Models/Operations/DeleteActionResponseBody.md: last_write_checksum: sha1:9f56d6d9b5dd5c6bdd13d2ea9542bd4b06cc23b5 docs/Models/Operations/DeleteAuthorRequest.md: - last_write_checksum: sha1:4023cf1691d10284d46ae9a08540e497ac2213e5 + last_write_checksum: sha1:ce209f49281f23ddad217c0394543f45596638cc docs/Models/Operations/DeleteAuthorResponse.md: last_write_checksum: sha1:b21b20143ad0f5a3cb2b5f2b3bd5b9592bd32b1f docs/Models/Operations/DeleteAuthorResponseBody.md: @@ -254,7 +260,7 @@ trackedFiles: docs/Models/Operations/DeleteProjectResponseBody.md: last_write_checksum: sha1:0438264cd7fd578d0d7aea8b2b57725304a94be8 docs/Models/Operations/DeleteWebhookRequest.md: - last_write_checksum: sha1:e735ed38dc58ee4aa7712690b3beb184d2a48229 + last_write_checksum: sha1:8394ab30c9d0b2019409d776162fe412d08332b9 docs/Models/Operations/DeleteWebhookResponse.md: last_write_checksum: sha1:dbe1e045ca97e7659e8812cf1a2d98e9858b52f3 docs/Models/Operations/DeleteWebhookResponseBody.md: @@ -284,7 +290,9 @@ trackedFiles: docs/Models/Operations/Evaluation.md: last_write_checksum: sha1:4b66033c588178d83a3b3672c9943fe022b512e4 docs/Models/Operations/ExecuteActionRequest.md: - last_write_checksum: sha1:0c45670953fe8571f61428e196a34aec9c9c6e82 + last_write_checksum: sha1:f24f4d64dc5f257f22a12c9e729943ab0d8aa038 + docs/Models/Operations/ExecuteActionRequestBody.md: + last_write_checksum: sha1:fec12bfabf9159c95312a01b419137d122841935 docs/Models/Operations/ExecuteActionResponse.md: last_write_checksum: sha1:0b9f8a95be5a0a0da917452b4c8a07ce571b6555 docs/Models/Operations/ExecuteActionResponseBody.md: @@ -303,6 +311,8 @@ trackedFiles: last_write_checksum: sha1:84d7586419914429a7cd64c837e54bc49896d39d docs/Models/Operations/Gambling.md: last_write_checksum: sha1:01f2ff59643479cc21a02287d43acd1d62d5b073 + docs/Models/Operations/GetAccountRequest.md: + last_write_checksum: sha1:ff6e41ea856cff666dc89a2c4aab97104cc241a1 docs/Models/Operations/GetAccountResponse.md: last_write_checksum: sha1:f5f553b8548a75d4737c98b9e3bf911dc695f15a docs/Models/Operations/GetAccountResponseBody.md: @@ -314,7 +324,7 @@ trackedFiles: docs/Models/Operations/GetActionQueueBehaviour.md: last_write_checksum: sha1:ff0521f4add44128f7fc18833a770be9769dc252 docs/Models/Operations/GetActionRequest.md: - last_write_checksum: sha1:4a37824dadb5a21e2f2657bcb450aff961eaaed7 + last_write_checksum: sha1:89dec2bc286056e4e7554f1a49e1874802ed1cd2 docs/Models/Operations/GetActionResponse.md: last_write_checksum: sha1:3de861dd9d7b52b5231033ecd07927f028cda330 docs/Models/Operations/GetActionResponseBody.md: @@ -322,7 +332,7 @@ trackedFiles: docs/Models/Operations/GetActionType.md: last_write_checksum: sha1:1b45f56d331c400c5135c3af59b9e2cd4141160c docs/Models/Operations/GetAuthorRequest.md: - last_write_checksum: sha1:1bc3abf8aa5423bfe9e8e7e5fdb7f98de7958ee8 + last_write_checksum: sha1:38eb9602951fb1ff345d471d5b8e9ec835cd353f docs/Models/Operations/GetAuthorResponse.md: last_write_checksum: sha1:01855737e8ae45cba45c02cbbcbf5227a1daf3c3 docs/Models/Operations/GetChannelRequest.md: @@ -338,13 +348,13 @@ trackedFiles: docs/Models/Operations/GetQueueRecommendationAction.md: last_write_checksum: sha1:959b206a2f957168b3172b45f9f7fe43e75489b2 docs/Models/Operations/GetQueueRequest.md: - last_write_checksum: sha1:fe9cd2a9267a3753a75d737c3becb92b4df89ec5 + last_write_checksum: sha1:271b0b92ab4c4ee657ce32d288380ab1e41478ff docs/Models/Operations/GetQueueResponse.md: last_write_checksum: sha1:c87e3d4c8010544370dad7cb6a88faf68547cfba docs/Models/Operations/GetQueueResponseBody.md: last_write_checksum: sha1:f0f2e26a5b760e481c31045a3e36c4f3cd0e04d0 docs/Models/Operations/GetQueueStatsRequest.md: - last_write_checksum: sha1:fd4ac6849db93d70bb81e45c574575fa088b9e4b + last_write_checksum: sha1:9e31575b53c8f1a92296ff425a379da938457bf5 docs/Models/Operations/GetQueueStatsResponse.md: last_write_checksum: sha1:590857365e4b87ccd7e77b96d6c1bcc950db6438 docs/Models/Operations/GetQueueStatsResponseBody.md: @@ -356,23 +366,25 @@ trackedFiles: docs/Models/Operations/GetWebhookPayloadVersion.md: last_write_checksum: sha1:85d85e2b79ffc5dff2bf655e31bc2f841b013343 docs/Models/Operations/GetWebhookRequest.md: - last_write_checksum: sha1:2ade966ada273c3627b2c9bc0813c856a371ffe0 + last_write_checksum: sha1:5c0614c58e2807ff94329e7857cf9c3d66f8a0fd docs/Models/Operations/GetWebhookResponse.md: last_write_checksum: sha1:f7a91e8cff31fe6519f29202e9824a8ab6389056 docs/Models/Operations/GetWebhookResponseBody.md: last_write_checksum: sha1:48568d4ced96eb856066c723f07633bb14d059a8 + docs/Models/Operations/GetWebhookSecretRequest.md: + last_write_checksum: sha1:56a01a4772bf2d0f07b0096a9cac9c8c636114b4 docs/Models/Operations/GetWebhookSecretResponse.md: last_write_checksum: sha1:6beee2803c94d7222f41c89159eefe81ae9933d7 docs/Models/Operations/GetWebhookSecretResponseBody.md: last_write_checksum: sha1:32b8a9b5a6a45638bd8c3f97a2d231aa0257779f docs/Models/Operations/GetWordlistEmbeddingStatusRequest.md: - last_write_checksum: sha1:7fce7be4cefd9f2f68cfae4e8b51adbe0ae8c0b4 + last_write_checksum: sha1:16de4e8c9fb1c9e292eaa2104f5bb601a6af53e7 docs/Models/Operations/GetWordlistEmbeddingStatusResponse.md: last_write_checksum: sha1:9c3033144a1b46304107fdfa14a55a55e2ea0904 docs/Models/Operations/GetWordlistEmbeddingStatusResponseBody.md: last_write_checksum: sha1:af312a1202ac03c542339923b8c7a6fb77b58554 docs/Models/Operations/GetWordlistRequest.md: - last_write_checksum: sha1:f1cac50c6435baa829522b4ff0dfc04537613c23 + last_write_checksum: sha1:c42243f43f4696b85c9a67b3a54e08632ac10147 docs/Models/Operations/GetWordlistResponse.md: last_write_checksum: sha1:6aee57085d2c9c8e6ebb7be6c7995535120227e4 docs/Models/Operations/GetWordlistResponseBody.md: @@ -416,7 +428,7 @@ trackedFiles: docs/Models/Operations/ListActionsQueueBehaviour.md: last_write_checksum: sha1:2ce17ac10ce3c61b35fb177a088037d9485c9920 docs/Models/Operations/ListActionsRequest.md: - last_write_checksum: sha1:b12d8db02439868ae9acec66c5f8cfc73cc3c997 + last_write_checksum: sha1:1b52ccd546eca30307537ce73713f1ad955eca80 docs/Models/Operations/ListActionsResponse.md: last_write_checksum: sha1:e2be97cbec27c544659baf908d5e9ecb52716229 docs/Models/Operations/ListActionsResponseBody.md: @@ -424,7 +436,7 @@ trackedFiles: docs/Models/Operations/ListActionsType.md: last_write_checksum: sha1:3faa1997dc8d38f0ca9a12309deca30dd193a32b docs/Models/Operations/ListAuthorsRequest.md: - last_write_checksum: sha1:d3018a71ab43cd620c70a10754705fe4767da48c + last_write_checksum: sha1:d50641af94e59d90bbe9954253c1abed18607cad docs/Models/Operations/ListAuthorsResponse.md: last_write_checksum: sha1:c94a1efc7f86964a9159fdc8fe1200cbf0dcb62b docs/Models/Operations/ListAuthorsResponseBody.md: @@ -450,7 +462,7 @@ trackedFiles: docs/Models/Operations/ListQueueItemsLabel.md: last_write_checksum: sha1:57afb1138db827561edd8c574ad01dd7182a3506 docs/Models/Operations/ListQueueItemsRequest.md: - last_write_checksum: sha1:7aad449c4dce04ceed2f57d5c20bdbd8c79e710f + last_write_checksum: sha1:d6d3a426d359dc1aad081185f598feee28741ba5 docs/Models/Operations/ListQueueItemsResponse.md: last_write_checksum: sha1:76b991316ed29264e755e4415578e9f06a8e0c8f docs/Models/Operations/ListQueueItemsResponseBody.md: @@ -466,7 +478,7 @@ trackedFiles: docs/Models/Operations/ListWebhooksPayloadVersion.md: last_write_checksum: sha1:340572c959aa5cdc165bc4e72868880bd774fd5f docs/Models/Operations/ListWebhooksRequest.md: - last_write_checksum: sha1:96cca270297739e6c94b6dade3055d500ee30532 + last_write_checksum: sha1:db168b3ffdacf5656f09c77fc632197293978094 docs/Models/Operations/ListWebhooksResponse.md: last_write_checksum: sha1:118987580439842a19d35b88f034c175d4b6a0c3 docs/Models/Operations/ListWebhooksResponseBody.md: @@ -474,7 +486,7 @@ trackedFiles: docs/Models/Operations/ListWordlistsData.md: last_write_checksum: sha1:acab4667f14a1aac32b9de3b62c29acdb198bfcb docs/Models/Operations/ListWordlistsRequest.md: - last_write_checksum: sha1:21ee79a51bcf722dba1f76983099be611651b540 + last_write_checksum: sha1:7ccfefbce646271f6bc1a0ecbbc194473d1ce7c3 docs/Models/Operations/ListWordlistsResponse.md: last_write_checksum: sha1:dbb76da5dc339cbe53a03338ce2ffd51016b59ea docs/Models/Operations/ListWordlistsResponseBody.md: @@ -528,13 +540,13 @@ trackedFiles: docs/Models/Operations/Religion.md: last_write_checksum: sha1:4dafe8419b1c34e4b9db06ddf46ebf4d2e6a70f2 docs/Models/Operations/RemoveWordlistWordsRequest.md: - last_write_checksum: sha1:3b39eda924ae8ebe11662a63b47132aabdd0d7f6 + last_write_checksum: sha1:eaeb0bd7aed4c9bb1342eeb940dae649ad9ace9a docs/Models/Operations/RemoveWordlistWordsResponse.md: last_write_checksum: sha1:e0e9b71e5809d6ee4d63070f34a1300c33f0dab5 docs/Models/Operations/RemoveWordlistWordsResponseBody.md: last_write_checksum: sha1:fd7813fca61c3aedd3405949ae1e889bc151239d docs/Models/Operations/ResolveQueueItemRequest.md: - last_write_checksum: sha1:334299a05b4decf0627e161e825327d32e5e7014 + last_write_checksum: sha1:c0aff0ed331152fdaf301b29d8a563ebd92e2a7a docs/Models/Operations/ResolveQueueItemRequestBody.md: last_write_checksum: sha1:1800ca9c7d7cfaacca71957bb53adab7cd256fee docs/Models/Operations/ResolveQueueItemResponse.md: @@ -574,7 +586,9 @@ trackedFiles: docs/Models/Operations/SubmitContentRecommendationAction.md: last_write_checksum: sha1:b8e9f6a5210ef87c29c7f350ccddfe883e83f605 docs/Models/Operations/SubmitContentRequest.md: - last_write_checksum: sha1:173d9fd398e8c5fe60350dcf2f6c1c7f65b9fc48 + last_write_checksum: sha1:9e8360977e279ef42497484f960092589a878ab0 + docs/Models/Operations/SubmitContentRequestBody.md: + last_write_checksum: sha1:03b70e01abd797ae990c3511fc56fcf1a4c57796 docs/Models/Operations/SubmitContentResponse.md: last_write_checksum: sha1:e9c17f5657f3d9e6ef368d40240b85c53df4dff3 docs/Models/Operations/SubmitContentResponseBody.md: @@ -608,7 +622,7 @@ trackedFiles: docs/Models/Operations/UnicodeSpoofing.md: last_write_checksum: sha1:dcc11bf5e62c90b2ac0c2f11329dfdabd0c205ef docs/Models/Operations/UnresolveQueueItemRequest.md: - last_write_checksum: sha1:ddecc7c0e8352e1abda2d022bf2971d8145a174f + last_write_checksum: sha1:d9ef94ad5122c0c79e13462fdd09aa9e1c5cd52f docs/Models/Operations/UnresolveQueueItemRequestBody.md: last_write_checksum: sha1:fdb81f1fc9aa95002621d4cbf2379fbe8e289849 docs/Models/Operations/UnresolveQueueItemResponse.md: @@ -628,7 +642,7 @@ trackedFiles: docs/Models/Operations/UpdateActionQueueBehaviourResponse.md: last_write_checksum: sha1:0120c46dff33f5ff47ce5f561824e42ba45d3dbe docs/Models/Operations/UpdateActionRequest.md: - last_write_checksum: sha1:80b681d69418c07b2ea976ef2a968f67314fa5ba + last_write_checksum: sha1:9a8d6b936481cd896a60ae162e24139e08f141f4 docs/Models/Operations/UpdateActionRequestBody.md: last_write_checksum: sha1:341d1566c7ce1d4bfa2dad27ac874674cf16c7d8 docs/Models/Operations/UpdateActionResponse.md: @@ -642,7 +656,7 @@ trackedFiles: docs/Models/Operations/UpdateAuthorMetadata.md: last_write_checksum: sha1:4c3c1ddf47f6124a0acdaf8e659a5a9f10485116 docs/Models/Operations/UpdateAuthorRequest.md: - last_write_checksum: sha1:c4db915e9bdb4e3bca8dbf78133c4e90ebcb23c1 + last_write_checksum: sha1:bcf7e447d32a78dbe17e047949c75c43824cb6b6 docs/Models/Operations/UpdateAuthorRequestBody.md: last_write_checksum: sha1:42460753284c620cc42fc696ab49ef61249cd20c docs/Models/Operations/UpdateAuthorResponse.md: @@ -668,7 +682,7 @@ trackedFiles: docs/Models/Operations/UpdateWebhookPayloadVersion.md: last_write_checksum: sha1:a7b148d92f1d18cfb79b16fa3d716ed4593a28d5 docs/Models/Operations/UpdateWebhookRequest.md: - last_write_checksum: sha1:afb97212818ce6c2cfabf7b919ea8c9eee501c1a + last_write_checksum: sha1:d6478f187cd1f934cbbaa2b38df0a371e872c507 docs/Models/Operations/UpdateWebhookRequestBody.md: last_write_checksum: sha1:685106d93400695395ccddb0814d70d2cd054c8f docs/Models/Operations/UpdateWebhookResponse.md: @@ -676,7 +690,7 @@ trackedFiles: docs/Models/Operations/UpdateWebhookResponseBody.md: last_write_checksum: sha1:664bc06a56ec1a03dbaafad9b949bc6d24c2e18d docs/Models/Operations/UpdateWordlistRequest.md: - last_write_checksum: sha1:bd1cd7a4ba3bfa7d9a6848ea2b9e87d9368d155a + last_write_checksum: sha1:23291ec9e03a21aae2585bb960307180c9bf6b93 docs/Models/Operations/UpdateWordlistRequestBody.md: last_write_checksum: sha1:fe8075134703770b447178e9a79e32c053b63a36 docs/Models/Operations/UpdateWordlistResponse.md: @@ -698,29 +712,29 @@ trackedFiles: docs/Models/Operations/WithinUnit.md: last_write_checksum: sha1:569a6533d5762727109074fe181f89e0ea99eb6a docs/sdks/account/README.md: - last_write_checksum: sha1:ff1ac978b0f6d4f17c0fd52be95db67f5c19be0a + last_write_checksum: sha1:627cabe2358331201ba5169a1e1fc8061601fa98 docs/sdks/actions/README.md: - last_write_checksum: sha1:9763c368b517288e9a5df4a02476630a4f6b1bda + last_write_checksum: sha1:cc8aa4c3106eb725d105abe1e0874b2045b0a139 docs/sdks/authors/README.md: - last_write_checksum: sha1:83ae071bc2d45e4c51a9720bf1b5676295ad0f59 + last_write_checksum: sha1:86778df7d7f476fbb4b163bcc15379856da9f9dd docs/sdks/channels/README.md: last_write_checksum: sha1:784bad3ada3395f36a632bf3a16f7cd944cb9c5e docs/sdks/content/README.md: - last_write_checksum: sha1:d1a7476f9997f70e3470a9c0d59022f10da1c187 + last_write_checksum: sha1:02f75654872e56352232dc3a50d56ed365f6edc1 docs/sdks/items/README.md: - last_write_checksum: sha1:6646597f2e664d9d499bb5894139f7ea01ba039f + last_write_checksum: sha1:afd4c5a33585f96a771a97cba8716b114e94ae47 docs/sdks/projects/README.md: last_write_checksum: sha1:867175adea7355b0fa2e9a014b6a62272d188d83 docs/sdks/queue/README.md: - last_write_checksum: sha1:e6b91c359fe26f4f06e7efd7b4bc48efbec386a0 + last_write_checksum: sha1:03794862dae3ea5754681ec0cfb1cb5e9336037d docs/sdks/webhooks/README.md: - last_write_checksum: sha1:3af09f644d6b66d85b6dd536495cad080a4afb1c + last_write_checksum: sha1:7be9c12ff34316d7bf28d498e2507674f6b8b43b docs/sdks/webhooksecret/README.md: - last_write_checksum: sha1:cc52970568a1c535805640832db0bb8d77c5815b + last_write_checksum: sha1:c58e27014d24521f36998d3d36fd6c9fd382c46a docs/sdks/wordlist/README.md: - last_write_checksum: sha1:6a13526973cbf38e9558668bb2233402f240a36c + last_write_checksum: sha1:90141a2300cc924e8fe96d088a328390cb987bff docs/sdks/words/README.md: - last_write_checksum: sha1:770223d54a30af4a1555f24450906f95a655ed0f + last_write_checksum: sha1:636806c21a727454953ceadd95d96f75e9b92ee2 phpstan.neon: last_write_checksum: sha1:c76cf3ac20b114f85cd6c3b569a6e297d00b4612 phpunit.xml: @@ -730,15 +744,15 @@ trackedFiles: rector.php: last_write_checksum: sha1:2c0586f29783d1cdf80ea09f3ed0f4693329f3e6 src/Account.php: - last_write_checksum: sha1:d6e5dda2ebdf10278a0dde448e173e2faa04870c + last_write_checksum: sha1:26391ec4892280e1d53af5902ee40e9972024151 src/Actions.php: - last_write_checksum: sha1:d4869f0530f412bd3d15d9e47a1cdfdb8fdd05f2 + last_write_checksum: sha1:09b60a8e5784ab74e6fd02d13a167d41bad6df4f src/Authors.php: - last_write_checksum: sha1:b6704040f60fbed99b10257502fd10fff6eb2227 + last_write_checksum: sha1:b0c9ee7d6a181d5ec157a538c3bfc46e58aa9c5d src/Channels.php: last_write_checksum: sha1:e21a72abd3bcc3c758a5b6be405a9c9ae913e2f6 src/Content.php: - last_write_checksum: sha1:7218bacaa7f1e0d7d121564b39fe39eec7e549c8 + last_write_checksum: sha1:587e1073d70b1ba8b5a127dcba655d7259aa1194 src/Hooks/AfterErrorContext.php: last_write_checksum: sha1:b345a66e5dcb5c691b2bf573efe1e00f3351d19c src/Hooks/AfterErrorHook.php: @@ -770,11 +784,11 @@ trackedFiles: src/Hooks/TokenResponse.php: last_write_checksum: sha1:4f4b445bf43144d2d423367512caf2ac8f63341d src/Items.php: - last_write_checksum: sha1:ff85a30779195a290377e4877e017672e6d1479c + last_write_checksum: sha1:4dc815a5ecd35f8f061041824f842740d888f292 src/Models/Components/AuthenticationErrorCode.php: last_write_checksum: sha1:903736b77081716fb731d0d241fd98149b46eee9 src/Models/Components/BadRequestErrorCode.php: - last_write_checksum: sha1:1657a16fd2052e21eb8c18da47e240ffb7ccdfba + last_write_checksum: sha1:f082dcf371b056285e05af321dd1a4a52147c426 src/Models/Components/Block.php: last_write_checksum: sha1:918ae12854bff879ffb2c47d83ffbb3f2538241b src/Models/Components/Channel.php: @@ -798,7 +812,7 @@ trackedFiles: src/Models/Components/Pagination.php: last_write_checksum: sha1:7ba60cd247dab634581430e335d141743772e8ee src/Models/Components/PermissionDeniedErrorCode.php: - last_write_checksum: sha1:153ece16f8e5a0289dfbf26d6c969f2107f9c624 + last_write_checksum: sha1:709ebf053fdacbbc87ea46cb9d3f5fb9746c2a99 src/Models/Components/Project.php: last_write_checksum: sha1:4c8ff4f14ee36ea43736c54d4c5d55f9ae72d01e src/Models/Components/ProjectGlobalFlaggingMode.php: @@ -828,7 +842,7 @@ trackedFiles: src/Models/Errors/AuthenticationErrorThrowable.php: last_write_checksum: sha1:bacbc1ed3f9c68f87ba17890ec68903fb586ad38 src/Models/Errors/BadRequestError.php: - last_write_checksum: sha1:753165e682850dc00509520e814a68b78a44742c + last_write_checksum: sha1:3a4085c29360ca3b3ad39b59f7012abb1218a512 src/Models/Errors/BadRequestErrorThrowable.php: last_write_checksum: sha1:e61d38061c476360d7d4816f2dfbc45d2f3c6758 src/Models/Errors/ConflictError.php: @@ -844,7 +858,7 @@ trackedFiles: src/Models/Errors/NotFoundErrorThrowable.php: last_write_checksum: sha1:b774c27ab506ce7cc11f8657988a21cfa26e13ad src/Models/Errors/PermissionDeniedError.php: - last_write_checksum: sha1:a249e143444877288f0a3904bdac9a82a0f91a86 + last_write_checksum: sha1:9dd2f8b661329c689bcbeb544b01e39b58f6d9f7 src/Models/Errors/PermissionDeniedErrorThrowable.php: last_write_checksum: sha1:eefce68fd94be0cccef6a518d74031b648980cdc src/Models/Errors/RateLimitError.php: @@ -856,7 +870,7 @@ trackedFiles: src/Models/Operations/ActionStat.php: last_write_checksum: sha1:044f1a6cf8fd19215358b3a711d6d4cc1d0637b3 src/Models/Operations/AddWordlistWordsRequest.php: - last_write_checksum: sha1:82c1a4260c6ca9482cecdd225138b96390d72875 + last_write_checksum: sha1:88167e4e1c8fd124c54f665ea8d86dbc3d644f26 src/Models/Operations/AddWordlistWordsRequestBody.php: last_write_checksum: sha1:cd9c142857de573a2d6af9837fba2309816ea0cd src/Models/Operations/AddWordlistWordsResponse.php: @@ -918,7 +932,9 @@ trackedFiles: src/Models/Operations/CreateActionQueueBehaviourResponse.php: last_write_checksum: sha1:313bcd625e89178af4d06de97282b56f2f23380b src/Models/Operations/CreateActionRequest.php: - last_write_checksum: sha1:1dd35087cf2966b37533baada1c13f370b497f44 + last_write_checksum: sha1:79560591ded44d12574eb1c6c71402e172ffeb5b + src/Models/Operations/CreateActionRequestBody.php: + last_write_checksum: sha1:b3bf78b8e42667c7a73faed04293f2ef93d570e7 src/Models/Operations/CreateActionResponse.php: last_write_checksum: sha1:b60f839334fa4d5c7859322db57a56951317260b src/Models/Operations/CreateActionResponseBody.php: @@ -930,7 +946,9 @@ trackedFiles: src/Models/Operations/CreateAuthorMetadata.php: last_write_checksum: sha1:87d57a17914c29041de19c2bb4138a822ed24744 src/Models/Operations/CreateAuthorRequest.php: - last_write_checksum: sha1:ee322e69fda5e5bbda78dabb9e933d3e6495621e + last_write_checksum: sha1:79b0e48646ed4687cd0ae848488e770749f0a11d + src/Models/Operations/CreateAuthorRequestBody.php: + last_write_checksum: sha1:9bc05523bef9bdd6028286dc922ac81391b447bd src/Models/Operations/CreateAuthorResponse.php: last_write_checksum: sha1:3a5efddfea090ce088cc9c03fc25262f3ab9c5c0 src/Models/Operations/CreateChannelContentType.php: @@ -952,7 +970,9 @@ trackedFiles: src/Models/Operations/CreateWebhookPayloadVersion.php: last_write_checksum: sha1:dcddf61864e95fb647b43c892473995e7feb2560 src/Models/Operations/CreateWebhookRequest.php: - last_write_checksum: sha1:fd3e21414adc7495ce5c78dbd38e491794f62ca8 + last_write_checksum: sha1:4dc8fa0726b9d26ee1a4acff88cbc50e4e4b1679 + src/Models/Operations/CreateWebhookRequestBody.php: + last_write_checksum: sha1:c75c8528cdf902ab4d2e81f4b576a6a3e4cf7267 src/Models/Operations/CreateWebhookResponse.php: last_write_checksum: sha1:a321682cb48fb638a686cc1bbfe4d03fb5b522e2 src/Models/Operations/CreateWebhookResponseBody.php: @@ -974,13 +994,13 @@ trackedFiles: src/Models/Operations/DataVideo.php: last_write_checksum: sha1:4dccc253a0c8b286d38af7d806d11d8be7788ecc src/Models/Operations/DeleteActionRequest.php: - last_write_checksum: sha1:ea6fd38a59e369fab4f623c8c54685070f87b4ed + last_write_checksum: sha1:45c9a051e3b5827f8e68481d87c6a95bac26221b src/Models/Operations/DeleteActionResponse.php: last_write_checksum: sha1:f2bf397d8a5338926aa4b7c210111a38e673c91b src/Models/Operations/DeleteActionResponseBody.php: last_write_checksum: sha1:1d484357e5d39e48a6c3f421fa2d9d817f0b4c68 src/Models/Operations/DeleteAuthorRequest.php: - last_write_checksum: sha1:33bfee35ea4df635b59fbb133af888d24601ff67 + last_write_checksum: sha1:b847a944d9c673fdcbad8c9fc0b9e52f37c92ce3 src/Models/Operations/DeleteAuthorResponse.php: last_write_checksum: sha1:c8ebb0b3287231ba23751000d2ef94f795b97cfa src/Models/Operations/DeleteAuthorResponseBody.php: @@ -998,7 +1018,7 @@ trackedFiles: src/Models/Operations/DeleteProjectResponseBody.php: last_write_checksum: sha1:f2e3f57e6e1c383dd374647b95d31bfec55f51e9 src/Models/Operations/DeleteWebhookRequest.php: - last_write_checksum: sha1:fdcedfe3ef3c0a85ddce8aa70a443c202728db49 + last_write_checksum: sha1:7db3fa98d22df81339470990fbcad2847c03b22a src/Models/Operations/DeleteWebhookResponse.php: last_write_checksum: sha1:c02adbc6a20d61a9bef2a7e3a54f921be157e72d src/Models/Operations/DeleteWebhookResponseBody.php: @@ -1028,7 +1048,9 @@ trackedFiles: src/Models/Operations/Evaluation.php: last_write_checksum: sha1:a63ce92e36cae2dc2be9305d04d3893d6a442ee4 src/Models/Operations/ExecuteActionRequest.php: - last_write_checksum: sha1:261b9c875ea9b2c6d06dc063c9a46b24a695ede8 + last_write_checksum: sha1:12e7e2038d7b6a142c859e11576845c036d95977 + src/Models/Operations/ExecuteActionRequestBody.php: + last_write_checksum: sha1:3136009ab309a9f9b23a6618f6357cf8bcfe9351 src/Models/Operations/ExecuteActionResponse.php: last_write_checksum: sha1:3fd15a00a8bccc0167ee30686ebc8efcf25a3652 src/Models/Operations/ExecuteActionResponseBody.php: @@ -1047,6 +1069,8 @@ trackedFiles: last_write_checksum: sha1:46ef364d7538d4218ea41268c2480610c76ef0a1 src/Models/Operations/Gambling.php: last_write_checksum: sha1:ce701dbd4fd3f3a2aaa509fbe1dc62e37b0cecc8 + src/Models/Operations/GetAccountRequest.php: + last_write_checksum: sha1:11c77490927e296bcee419651454becbcce62f45 src/Models/Operations/GetAccountResponse.php: last_write_checksum: sha1:d8b431f1ea282814bdfc9ca80f068f39a5074d56 src/Models/Operations/GetAccountResponseBody.php: @@ -1058,7 +1082,7 @@ trackedFiles: src/Models/Operations/GetActionQueueBehaviour.php: last_write_checksum: sha1:ae630aa7d41eec1848123c9af1e901e48ce11e7c src/Models/Operations/GetActionRequest.php: - last_write_checksum: sha1:09aa5bc1ddca625dfcb9e49477b830b15f8460c0 + last_write_checksum: sha1:4ad67307bafe60b947d8129d00a0d51118024db5 src/Models/Operations/GetActionResponse.php: last_write_checksum: sha1:baae3308fb5aa12a98b02595dcbdd3a48f75b959 src/Models/Operations/GetActionResponseBody.php: @@ -1066,7 +1090,7 @@ trackedFiles: src/Models/Operations/GetActionType.php: last_write_checksum: sha1:fcf2c33e09f6c896fded285f64d4bed9548c185a src/Models/Operations/GetAuthorRequest.php: - last_write_checksum: sha1:1adca02babc7ff2d0d90eb0ad8fd10bddf9602f7 + last_write_checksum: sha1:78420dbc05a9af8bcc46bf68cdbc9518416db798 src/Models/Operations/GetAuthorResponse.php: last_write_checksum: sha1:e5c6517e769fc7b0c5d8139327b1d12926dff8da src/Models/Operations/GetChannelRequest.php: @@ -1082,13 +1106,13 @@ trackedFiles: src/Models/Operations/GetQueueRecommendationAction.php: last_write_checksum: sha1:0f5a10569d177612578212a0b9d97140a1296b7c src/Models/Operations/GetQueueRequest.php: - last_write_checksum: sha1:c61d492a04422f0c594af378e4001d8c7e9e3e4a + last_write_checksum: sha1:79d0e4f68038d18e84bb37b011bc933111b9af7d src/Models/Operations/GetQueueResponse.php: last_write_checksum: sha1:fd66044c894e522ac92cab79793b2f41169ec298 src/Models/Operations/GetQueueResponseBody.php: last_write_checksum: sha1:2ca5dca83fd39bbafefca851d093a577e8bc12ac src/Models/Operations/GetQueueStatsRequest.php: - last_write_checksum: sha1:8b0e58185f2f09a5ef6ecd8ef646ea217513e5ed + last_write_checksum: sha1:f3136afe2d481db1d0909063939d87234e4c42ff src/Models/Operations/GetQueueStatsResponse.php: last_write_checksum: sha1:dde9ab723d155e5e55f60e1c498d32c47181533d src/Models/Operations/GetQueueStatsResponseBody.php: @@ -1100,23 +1124,25 @@ trackedFiles: src/Models/Operations/GetWebhookPayloadVersion.php: last_write_checksum: sha1:5ac2d564aa48f415a0fc29c7c89f281fee832f1a src/Models/Operations/GetWebhookRequest.php: - last_write_checksum: sha1:6ed2856bfa7448a81105d1a9c4b6da9628681348 + last_write_checksum: sha1:920ff90f7b649c0759c70941e37d93471afb1c0f src/Models/Operations/GetWebhookResponse.php: last_write_checksum: sha1:56e9ecda90f2f48ce9a0ab26ab517b7b18a967fb src/Models/Operations/GetWebhookResponseBody.php: last_write_checksum: sha1:4e0885fa5571b72a7e35b4f9374691e6e4c5f1c7 + src/Models/Operations/GetWebhookSecretRequest.php: + last_write_checksum: sha1:0b855ed6ac67aa6bdeb7973a7e7f2a62e42420d4 src/Models/Operations/GetWebhookSecretResponse.php: last_write_checksum: sha1:da002d0f56812b48bd32105501c9f1b80afea107 src/Models/Operations/GetWebhookSecretResponseBody.php: last_write_checksum: sha1:92a28e74d3e264c0c97f97a7a079a50ee6358bcb src/Models/Operations/GetWordlistEmbeddingStatusRequest.php: - last_write_checksum: sha1:9294d55598f4207e624db2f0ff5737c697c1d20e + last_write_checksum: sha1:8c29ac516030176fe3be275b22669c2718651d6f src/Models/Operations/GetWordlistEmbeddingStatusResponse.php: last_write_checksum: sha1:efd22df7e9ea92f09462d244e886d64c5005d00e src/Models/Operations/GetWordlistEmbeddingStatusResponseBody.php: last_write_checksum: sha1:63599f1504d30689717e8c73fdd62aaaa579e71f src/Models/Operations/GetWordlistRequest.php: - last_write_checksum: sha1:a0cc806d223bb682c316c4dc37b3175d3413ff5d + last_write_checksum: sha1:9478177efdd9c94bac6559e1071608c236ae9eb1 src/Models/Operations/GetWordlistResponse.php: last_write_checksum: sha1:109838af6005b73b1d1c68ef254a9b5b18afaefd src/Models/Operations/GetWordlistResponseBody.php: @@ -1158,7 +1184,7 @@ trackedFiles: src/Models/Operations/ListActionsQueueBehaviour.php: last_write_checksum: sha1:0c8e33b429fa9ca12b03cdac8223a6b201027b2f src/Models/Operations/ListActionsRequest.php: - last_write_checksum: sha1:5def34106b13956ba7310f9f72746d672b07c6fa + last_write_checksum: sha1:39b6e1efd8a113b3cfba1132e5bb29f793b309cd src/Models/Operations/ListActionsResponse.php: last_write_checksum: sha1:57db3b2d174ad07cdb1b5f5556d6e9dad9bd025c src/Models/Operations/ListActionsResponseBody.php: @@ -1166,7 +1192,7 @@ trackedFiles: src/Models/Operations/ListActionsType.php: last_write_checksum: sha1:0c8962ffc3ef8451b1d12eaba04a61f24f51765f src/Models/Operations/ListAuthorsRequest.php: - last_write_checksum: sha1:2ea59c12e5e50e21a0a0a980575e58a89061cac8 + last_write_checksum: sha1:f7bc29d33c9ddefbba5a1ad8e129a7ccd4168ec3 src/Models/Operations/ListAuthorsResponse.php: last_write_checksum: sha1:310c8d4e136956f38222de060dc3460ede0c185e src/Models/Operations/ListAuthorsResponseBody.php: @@ -1192,7 +1218,7 @@ trackedFiles: src/Models/Operations/ListQueueItemsLabel.php: last_write_checksum: sha1:0d5d3dcd6b113f05a8cbe0ea2a4a64a02c503edc src/Models/Operations/ListQueueItemsRequest.php: - last_write_checksum: sha1:94a8ea26891ce8d9ffa648241bc74e6658dab051 + last_write_checksum: sha1:a40c073e21c3dc66a2f3f9168c3371abfe8e73f2 src/Models/Operations/ListQueueItemsResponse.php: last_write_checksum: sha1:3277eea35702e991534b8f51d1333fefde8e5779 src/Models/Operations/ListQueueItemsResponseBody.php: @@ -1208,7 +1234,7 @@ trackedFiles: src/Models/Operations/ListWebhooksPayloadVersion.php: last_write_checksum: sha1:fbeca33e8478ebfc89591df3e1b7b7fdf8527a9e src/Models/Operations/ListWebhooksRequest.php: - last_write_checksum: sha1:b48a0ca9068ed18f87a2d7f718a37453fdf7df0d + last_write_checksum: sha1:e193e65654c9ede48dc7424b54fc896f45a0b490 src/Models/Operations/ListWebhooksResponse.php: last_write_checksum: sha1:f9fb807c707dd6565fcbc4d589c7fc88c70f94bd src/Models/Operations/ListWebhooksResponseBody.php: @@ -1216,7 +1242,7 @@ trackedFiles: src/Models/Operations/ListWordlistsData.php: last_write_checksum: sha1:69c58130e30f976fb171c36fc457df97cc8e4bd5 src/Models/Operations/ListWordlistsRequest.php: - last_write_checksum: sha1:c56c3b98bd50efceb69f2f5c6b71b32eabcaafbd + last_write_checksum: sha1:95efd159c7b0193bf434148f6ccbfbec1f279540 src/Models/Operations/ListWordlistsResponse.php: last_write_checksum: sha1:7cdcc8c5efdc90d59c57b26601660cfbed556dea src/Models/Operations/ListWordlistsResponseBody.php: @@ -1262,13 +1288,13 @@ trackedFiles: src/Models/Operations/Religion.php: last_write_checksum: sha1:77cf485d673e50a293b5261c256cb572133adac7 src/Models/Operations/RemoveWordlistWordsRequest.php: - last_write_checksum: sha1:a17a87c4501b48b2f2afcdd1c93f9e0ee278047f + last_write_checksum: sha1:e3698c6e02689d45316b3d1f7694afaed250f96c src/Models/Operations/RemoveWordlistWordsResponse.php: last_write_checksum: sha1:0c8f1f021c5e4d53e010198da9ede996b7b232b9 src/Models/Operations/RemoveWordlistWordsResponseBody.php: last_write_checksum: sha1:616012ca61922bfb310e29c791df90767b646c44 src/Models/Operations/ResolveQueueItemRequest.php: - last_write_checksum: sha1:450f5d0047c4c4af7b0cbf4631faa9e087f1c8e6 + last_write_checksum: sha1:c9639d1518000013bf1e10033b76a90b0bc60337 src/Models/Operations/ResolveQueueItemRequestBody.php: last_write_checksum: sha1:eca8b3874e279a09dc505a2804be0e0e41ece1fc src/Models/Operations/ResolveQueueItemResponse.php: @@ -1308,7 +1334,9 @@ trackedFiles: src/Models/Operations/SubmitContentRecommendationAction.php: last_write_checksum: sha1:828f11273d8233c82dbc41be5c2c12b907aad56c src/Models/Operations/SubmitContentRequest.php: - last_write_checksum: sha1:7acacfba5ed4f773fa55d426768111c7913ba372 + last_write_checksum: sha1:d320a1bcc1f66b1894134de9ce2cb41e003cc825 + src/Models/Operations/SubmitContentRequestBody.php: + last_write_checksum: sha1:449c091e46d27cd4493654ed9c32f97d4068921f src/Models/Operations/SubmitContentResponse.php: last_write_checksum: sha1:69f1b46bd44843fddb5c9ac81e89607ad6ca0019 src/Models/Operations/SubmitContentResponseBody.php: @@ -1342,7 +1370,7 @@ trackedFiles: src/Models/Operations/UnicodeSpoofing.php: last_write_checksum: sha1:280971a1558295ec10314a1f8ea945083b2b10e2 src/Models/Operations/UnresolveQueueItemRequest.php: - last_write_checksum: sha1:a3e17d77a39988c0f70a211632f20da9506f3c71 + last_write_checksum: sha1:6959683937a2a177ce5093803384cc31bcf1c9dd src/Models/Operations/UnresolveQueueItemRequestBody.php: last_write_checksum: sha1:850deadebf4b9e3044dbbdd56992525937f60cc1 src/Models/Operations/UnresolveQueueItemResponse.php: @@ -1362,7 +1390,7 @@ trackedFiles: src/Models/Operations/UpdateActionQueueBehaviourResponse.php: last_write_checksum: sha1:093e54a0e1695af1ebfafdd71d7000d9884d5b78 src/Models/Operations/UpdateActionRequest.php: - last_write_checksum: sha1:f7052a5eb295402fcd2396cf5f9e94490a958a78 + last_write_checksum: sha1:1ab53d92cd1bbf516098eb4083760241dfae064b src/Models/Operations/UpdateActionRequestBody.php: last_write_checksum: sha1:9aa9023855c8c17e77ccfa516c9fb5eb3ad4dcad src/Models/Operations/UpdateActionResponse.php: @@ -1376,7 +1404,7 @@ trackedFiles: src/Models/Operations/UpdateAuthorMetadata.php: last_write_checksum: sha1:f530dd3597b8dd3773d105b2af7930ae87f2c892 src/Models/Operations/UpdateAuthorRequest.php: - last_write_checksum: sha1:3f706e8252de31bd0adfbf0017dc27369ba4cfef + last_write_checksum: sha1:d6efc3740cce71de26abb19925dc89e0574b1b9c src/Models/Operations/UpdateAuthorRequestBody.php: last_write_checksum: sha1:90a85a572f6a627e4b2f1215cff2a16bcf17cd7f src/Models/Operations/UpdateAuthorResponse.php: @@ -1402,7 +1430,7 @@ trackedFiles: src/Models/Operations/UpdateWebhookPayloadVersion.php: last_write_checksum: sha1:ab86561e2cdf2076c60459152bf356b480b35b2e src/Models/Operations/UpdateWebhookRequest.php: - last_write_checksum: sha1:2045d5e5d1d210042087f3a47c238f1700faa1ec + last_write_checksum: sha1:99b95fa8148a3257435b80b8c00a975e158ace6d src/Models/Operations/UpdateWebhookRequestBody.php: last_write_checksum: sha1:36c01c23a9efd73d603a99720530cd426300bfe0 src/Models/Operations/UpdateWebhookResponse.php: @@ -1410,7 +1438,7 @@ trackedFiles: src/Models/Operations/UpdateWebhookResponseBody.php: last_write_checksum: sha1:007baee2512abe6a851b7db47f728889ece8c146 src/Models/Operations/UpdateWordlistRequest.php: - last_write_checksum: sha1:51ef8756686941270479b694cb917864c9e53474 + last_write_checksum: sha1:d0ada12c8093a8b11132f792007ab946cc80b72c src/Models/Operations/UpdateWordlistRequestBody.php: last_write_checksum: sha1:4c87601c65a232654f2fdaa080aa5e6e19e773f7 src/Models/Operations/UpdateWordlistResponse.php: @@ -1438,9 +1466,9 @@ trackedFiles: src/Projects.php: last_write_checksum: sha1:50ff2ba13fe33e6d62384ff9825977e6efd40a34 src/Queue.php: - last_write_checksum: sha1:96d3c46cf5515a01756160f09d4c87eb9315181a + last_write_checksum: sha1:6e827e98b2489b7f06b1d5869e54f47e6ae2816c src/SDKConfiguration.php: - last_write_checksum: sha1:e4afb919aa901b141982a198f783cf80119cc0f9 + last_write_checksum: sha1:83f89b5b0365374df283316c53a96f9cfc99f1d5 src/Utils/BigDecimalHandler.php: last_write_checksum: sha1:2d36b5ae690b042acfcdfe7e7277d44c5055416f src/Utils/BigIntHandler.php: @@ -1512,13 +1540,13 @@ trackedFiles: src/Utils/Utils.php: last_write_checksum: sha1:04da74b34bc4af2fc4b85bd64e3dd39d176588b1 src/WebhookSecret.php: - last_write_checksum: sha1:09a0d04cc3d38e452e40d1beb72280b8a5399eda + last_write_checksum: sha1:15f2dccf20ad0de071894d5f9a5d1dccafe7e606 src/Webhooks.php: - last_write_checksum: sha1:996e5766ad5d02adf279162f18cc4c8936312e2c + last_write_checksum: sha1:bcaee6b9579d83bca24b0082b34d43af8ae3ec48 src/Wordlist.php: - last_write_checksum: sha1:96793d106a3a19d8bf24b20c98d7323b8708f1ea + last_write_checksum: sha1:db67c57d48233ad9948cdf8d4a034c3bb38f4390 src/Words.php: - last_write_checksum: sha1:846bb7c716212a96d3e88cb58766195722ee46a7 + last_write_checksum: sha1:4637eb2d0b501a92de44a21f70e7326408ff892b examples: listAuthors: speakeasy-default-list-authors: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index fd58293..f55c7a4 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false php: - version: 1.0.0 + version: 1.1.0 additionalDependencies: autoload: {} autoload-dev: {} diff --git a/.speakeasy/openapi.json b/.speakeasy/openapi.json new file mode 100644 index 0000000..88ae723 --- /dev/null +++ b/.speakeasy/openapi.json @@ -0,0 +1,14224 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Moderation API", + "description": "Moderate text, images, video and audio in real time, manage authors, review queues and actions, and receive webhooks.", + "version": "1.1.0" + }, + "servers": [ + { + "url": "https://moderationapi.com/api/v1" + } + ], + "tags": [ + { + "name": "Content", + "description": "Submit content for moderation." + }, + { + "name": "Authors", + "description": "The users who create content, with their trust level and history." + }, + { + "name": "Review queues", + "description": "Queues of content for human review, and their items." + }, + { + "name": "Actions", + "description": "Moderation actions reviewers and rules can take." + }, + { + "name": "Wordlists", + "description": "Custom word and phrase lists used by policies." + }, + { + "name": "Webhooks", + "description": "Endpoints that receive events, and the events they receive." + }, + { + "name": "Account", + "description": "The account that owns the API key." + }, + { + "name": "Projects", + "description": "Projects in the organization. Needs an organization key." + }, + { + "name": "Channels", + "description": "Channels in a project. Needs an organization key." + }, + { + "name": "Voice", + "description": "Real-time voice moderation over WebSocket." + } + ], + "externalDocs": { + "url": "https://docs.moderationapi.com" + }, + "paths": { + "/authors": { + "get": { + "operationId": "listAuthors", + "summary": "List authors", + "description": "List authors with their activity metrics and reputation. The list is paginated.", + "tags": [ + "Authors" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "page", + "schema": { + "default": 1, + "description": "Page number, starting at 1.", + "type": "integer", + "minimum": 1, + "maximum": 100000 + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "default": 20, + "description": "Number of items per page. Maximum 100.", + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + { + "in": "query", + "name": "sortBy", + "schema": { + "type": "string", + "enum": [ + "trustLevel", + "violationCount", + "reportCount", + "memberSince", + "lastActive", + "contentCount", + "flaggedContentRatio", + "averageSentiment" + ] + } + }, + { + "in": "query", + "name": "sortDirection", + "schema": { + "default": "desc", + "description": "Sort direction", + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + }, + { + "in": "query", + "name": "memberSinceDate", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "lastActiveDate", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "contentTypes", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicAuthor" + }, + "description": "The items on this page." + }, + "pagination": { + "$ref": "#/components/schemas/Pagination" + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "authors", + "x-speakeasy-name-override": "list", + "x-speakeasy-mcp": { + "title": "List authors", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + }, + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "pageSize", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data", + "numPages": "$.pagination.totalPages" + } + } + }, + "post": { + "operationId": "createAuthor", + "summary": "Create a new author", + "description": "Create a new author. Typically not needed as authors are created automatically when content is moderated.", + "tags": [ + "Authors" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "profile_picture": { + "description": "URL of the author's profile picture", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "external_link": { + "description": "URL of the author's external profile", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "name": { + "description": "Author name or identifier", + "type": [ + "string", + "null" + ] + }, + "email": { + "description": "Author email address", + "anyOf": [ + { + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, + { + "type": "null" + } + ] + }, + "company": { + "description": "The author's company or organization", + "type": [ + "string", + "null" + ] + }, + "metadata": { + "type": "object", + "properties": { + "email_verified": { + "description": "Whether the author's email is verified", + "type": [ + "boolean", + "null" + ] + }, + "phone_verified": { + "description": "Whether the author's phone number is verified", + "type": [ + "boolean", + "null" + ] + }, + "identity_verified": { + "description": "Whether the author's identity is verified", + "type": [ + "boolean", + "null" + ] + }, + "is_paying_customer": { + "description": "Whether the author is a paying customer", + "type": [ + "boolean", + "null" + ] + } + }, + "additionalProperties": {}, + "description": "Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process." + }, + "first_seen": { + "type": "number", + "description": "Timestamp when author first appeared" + }, + "last_seen": { + "type": "number", + "description": "Timestamp of last activity" + }, + "manual_trust_level": { + "anyOf": [ + { + "type": "number", + "minimum": -1, + "maximum": 4 + }, + { + "type": "null" + } + ] + }, + "external_id": { + "type": "string", + "description": "External ID of the user, typically the ID of the author in your database." + } + }, + "required": [ + "external_id" + ] + }, + "example": { + "external_id": "user-1092", + "name": "Jamie Rivera", + "email": "jamie@example.com", + "metadata": { + "email_verified": true, + "is_paying_customer": false + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicAuthor" + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "authors", + "x-speakeasy-name-override": "create", + "x-speakeasy-mcp": { + "title": "Create a new author", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/authors/{id}": { + "get": { + "operationId": "getAuthor", + "summary": "Get author details", + "description": "Get detailed information about a specific author including historical data and analysis", + "tags": [ + "Authors" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "Either external ID or the ID assigned by moderation API." + }, + "required": true, + "description": "Either external ID or the ID assigned by moderation API." + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicAuthor" + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "authors", + "x-speakeasy-name-override": "retrieve", + "x-speakeasy-mcp": { + "title": "Get author details", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + }, + "put": { + "operationId": "updateAuthor", + "summary": "Update author details", + "description": "Update the details of a specific author", + "tags": [ + "Authors" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "Either external ID or the ID assigned by moderation API." + }, + "required": true, + "description": "Either external ID or the ID assigned by moderation API." + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "profile_picture": { + "description": "URL of the author's profile picture", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "external_link": { + "description": "URL of the author's external profile", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "name": { + "description": "Author name or identifier", + "type": [ + "string", + "null" + ] + }, + "email": { + "description": "Author email address", + "anyOf": [ + { + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, + { + "type": "null" + } + ] + }, + "company": { + "description": "The author's company or organization", + "type": [ + "string", + "null" + ] + }, + "metadata": { + "type": "object", + "properties": { + "email_verified": { + "description": "Whether the author's email is verified", + "type": [ + "boolean", + "null" + ] + }, + "phone_verified": { + "description": "Whether the author's phone number is verified", + "type": [ + "boolean", + "null" + ] + }, + "identity_verified": { + "description": "Whether the author's identity is verified", + "type": [ + "boolean", + "null" + ] + }, + "is_paying_customer": { + "description": "Whether the author is a paying customer", + "type": [ + "boolean", + "null" + ] + } + }, + "additionalProperties": {}, + "description": "Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process." + }, + "first_seen": { + "type": "number", + "description": "Timestamp when author first appeared" + }, + "last_seen": { + "type": "number", + "description": "Timestamp of last activity" + }, + "manual_trust_level": { + "anyOf": [ + { + "type": "number", + "minimum": -1, + "maximum": 4 + }, + { + "type": "null" + } + ] + } + } + }, + "example": { + "manual_trust_level": 2, + "metadata": { + "identity_verified": true + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicAuthor" + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "authors", + "x-speakeasy-name-override": "update", + "x-speakeasy-mcp": { + "title": "Update author details", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + }, + "delete": { + "operationId": "deleteAuthor", + "summary": "Delete an author", + "description": "Delete a specific author. This resets the author: status, blocks, trust level, metrics and action history are removed. The author is created again with a clean record the next time content is moderated for the same ID.", + "tags": [ + "Authors" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "Either external ID or the ID assigned by moderation API." + }, + "required": true, + "description": "Either external ID or the ID assigned by moderation API." + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "authors", + "x-speakeasy-name-override": "delete", + "x-speakeasy-mcp": { + "title": "Delete an author", + "scopes": [ + "destructive" + ], + "readOnlyHint": false, + "destructiveHint": true + } + } + }, + "/queue/{id}": { + "get": { + "operationId": "getQueue", + "summary": "Get a queue", + "description": "Get a queue", + "tags": [ + "Review queues" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The queue ID" + }, + "required": true, + "description": "The queue ID" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "queue": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "filter": { + "type": "object", + "properties": { + "isFlagged": { + "type": "string", + "enum": [ + "ALL", + "FLAGGED", + "NOT_FLAGGED", + "SHADOW_FLAGGED" + ] + }, + "casebookAnswer": { + "type": "string", + "enum": [ + "ALL", + "ALLOWED", + "REJECTED", + "NO_ANSWER" + ] + }, + "casebookAgreement": { + "type": "string", + "enum": [ + "ALL", + "OVERRULED", + "AGREED" + ] + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "filterLabels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "FLAGGED", + "NOT_FLAGGED", + "THRESHOLDS", + "MATCHED" + ] + }, + "minThreshold": { + "anyOf": [ + { + "type": "number", + "minimum": 0, + "maximum": 100 + }, + { + "type": "null" + } + ] + }, + "maxThreshold": { + "anyOf": [ + { + "type": "number", + "minimum": 0, + "maximum": 100 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "label", + "type" + ], + "additionalProperties": false + } + }, + "metadataFilters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "minLength": 1, + "maxLength": 128 + }, + "value": { + "type": "string", + "maxLength": 512 + } + }, + "required": [ + "key", + "value" + ], + "additionalProperties": false + } + }, + "filteredChannelIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "filteredActionIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "languages": { + "type": "array", + "items": { + "type": "string" + } + }, + "contentTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "profile", + "message", + "post", + "comment", + "event", + "product", + "review", + "voice", + "other" + ] + } + }, + "mediaTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "text", + "image", + "video", + "object", + "audio" + ] + } + }, + "authorTrustLevels": { + "type": "array", + "items": { + "type": "integer", + "minimum": -1, + "maximum": 4 + } + }, + "recommendationActions": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "review", + "allow", + "reject" + ] + } + }, + "minSeverity": { + "type": "integer", + "minimum": 0, + "maximum": 100 + }, + "maxSeverity": { + "type": "integer", + "minimum": 0, + "maximum": 100 + }, + "afterDate": { + "type": "string" + }, + "beforeDate": { + "type": "string" + }, + "within": { + "type": "number", + "exclusiveMinimum": 0 + }, + "withinUnit": { + "type": "string", + "enum": [ + "MINUTES", + "HOURS", + "DAYS", + "WEEKS", + "MONTHS", + "YEARS" + ] + }, + "clearDateWindow": { + "type": "boolean" + }, + "checkStatus": { + "anyOf": [ + { + "type": "string", + "enum": [ + "all", + "checked", + "unchecked" + ] + }, + { + "type": "null" + } + ] + }, + "authorID": { + "type": "string" + }, + "contentID": { + "type": "string" + }, + "conversationIds": { + "type": "array", + "items": { + "type": [ + "string", + "null" + ] + } + }, + "search": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "unresolvedItemsCount": { + "type": "number" + }, + "resolvedItemsCount": { + "type": "number" + }, + "totalItemsCount": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "description", + "filter", + "unresolvedItemsCount", + "resolvedItemsCount", + "totalItemsCount" + ], + "additionalProperties": false + } + }, + "required": [ + "queue" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "queue", + "x-speakeasy-name-override": "retrieve", + "x-speakeasy-mcp": { + "title": "Get a queue", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + } + }, + "/queue/{id}/stats": { + "get": { + "operationId": "getQueueStats", + "summary": "Get queue statistics", + "description": "Get detailed statistics about a moderation queue including review times, action counts, and trends", + "tags": [ + "Review queues" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The queue ID" + }, + "required": true, + "description": "The queue ID" + }, + { + "in": "query", + "name": "withinDays", + "schema": { + "default": 30, + "description": "Number of days to analyze statistics for", + "type": "integer", + "minimum": 1, + "maximum": 365 + } + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "reviewStats": { + "type": "object", + "properties": { + "averageTimeToReview": { + "type": "number", + "description": "Average time in milliseconds to review an item" + }, + "totalReviewed": { + "type": "number", + "description": "Total number of items reviewed" + }, + "totalPending": { + "type": "number", + "description": "Total number of items pending review" + } + }, + "required": [ + "averageTimeToReview", + "totalReviewed", + "totalPending" + ], + "additionalProperties": false + }, + "actionStats": { + "type": "array", + "items": { + "type": "object", + "properties": { + "actionId": { + "type": "string", + "description": "ID of the moderation action" + }, + "actionName": { + "type": "string", + "description": "Name of the moderation action" + }, + "count": { + "type": "number", + "description": "Number of times this action was taken" + }, + "percentageOfTotal": { + "type": "number", + "description": "Percentage this action represents of all actions" + } + }, + "required": [ + "actionId", + "actionName", + "count", + "percentageOfTotal" + ], + "additionalProperties": false + } + }, + "topReviewers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "ID of the reviewer" + }, + "name": { + "type": "string", + "description": "Name of the reviewer" + }, + "reviewCount": { + "type": "number", + "description": "Number of items reviewed" + }, + "averageTimePerReview": { + "type": "number", + "description": "Average review time in milliseconds" + }, + "accuracyScore": { + "description": "Optional accuracy score based on review quality metrics", + "type": "number" + }, + "topActions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "actionId": { + "type": "string", + "description": "Most used action by this reviewer" + }, + "actionName": { + "type": "string", + "description": "Name of the most used action" + }, + "count": { + "type": "number", + "description": "Number of times this action was used" + } + }, + "required": [ + "actionId", + "actionName", + "count" + ], + "additionalProperties": false + }, + "description": "Most common actions taken by this reviewer" + } + }, + "required": [ + "userId", + "name", + "reviewCount", + "averageTimePerReview", + "topActions" + ], + "additionalProperties": false + }, + "description": "List of top reviewers and their statistics" + }, + "trends": { + "type": "object", + "properties": { + "dailyReviewCounts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Date in YYYY-MM-DD format" + }, + "count": { + "type": "number", + "description": "Number of reviews on this date" + } + }, + "required": [ + "date", + "count" + ], + "additionalProperties": false + } + }, + "flaggedContentTrends": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Content flag/label" + }, + "trend": { + "type": "number", + "description": "Trend indicator (-1 to 1) showing if this type of flagged content is increasing or decreasing" + } + }, + "required": [ + "label", + "trend" + ], + "additionalProperties": false + } + } + }, + "required": [ + "dailyReviewCounts", + "flaggedContentTrends" + ], + "additionalProperties": false + } + }, + "required": [ + "reviewStats", + "actionStats", + "topReviewers", + "trends" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "queue", + "x-speakeasy-name-override": "getStats", + "x-speakeasy-mcp": { + "title": "Get queue statistics", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + } + }, + "/queue/{id}/items": { + "get": { + "operationId": "listQueueItems", + "summary": "Get queue items", + "description": "Get paginated list of items in a moderation queue with filtering options", + "tags": [ + "Review queues" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The queue ID" + }, + "required": true, + "description": "The queue ID" + }, + { + "in": "query", + "name": "page", + "schema": { + "default": 1, + "description": "Page number, starting at 1.", + "type": "integer", + "minimum": 1, + "maximum": 100000 + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "default": 20, + "description": "Number of items per page. Maximum 100.", + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + { + "in": "query", + "name": "sortField", + "schema": { + "type": "string", + "enum": [ + "createdAt", + "severity", + "reviewedAt" + ] + } + }, + { + "in": "query", + "name": "sortDirection", + "schema": { + "default": "desc", + "description": "Sort direction", + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + }, + { + "in": "query", + "name": "conversationIds", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "labels", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "afterDate", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "beforeDate", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "includeResolved", + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "authorId", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "filteredActionIds", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Content ID" + }, + "content": { + "type": "string", + "description": "The content to be moderated" + }, + "language": { + "description": "Content language", + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Label name" + }, + "score": { + "type": "number", + "description": "Confidence score of the label" + }, + "flagged": { + "type": "boolean", + "description": "Whether this label caused a flag" + } + }, + "required": [ + "label", + "score", + "flagged" + ], + "additionalProperties": false + } + }, + "conversationId": { + "description": "Conversation ID", + "type": "string" + }, + "authorId": { + "description": "Author ID", + "type": "string" + }, + "actions": { + "description": "Action IDs taken on this item", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Action ID" + }, + "name": { + "type": "string", + "description": "Action name" + }, + "comment": { + "description": "Action comment", + "type": "string" + }, + "timestamp": { + "type": "number", + "description": "Unix timestamp of when the action was taken" + }, + "reviewer": { + "description": "Moderator userID", + "type": "string" + } + }, + "required": [ + "id", + "name", + "timestamp" + ], + "additionalProperties": false + } + }, + "flagged": { + "type": "boolean", + "description": "Whether the item is flagged by any label" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "resolved" + ], + "description": "Status of the item" + }, + "timestamp": { + "type": "number", + "description": "Unix timestamp of when the item was created" + }, + "contentType": { + "description": "Type of the content object", + "type": "string" + } + }, + "required": [ + "id", + "content", + "labels", + "flagged", + "status", + "timestamp" + ], + "additionalProperties": false + }, + "description": "The items on this page." + }, + "pagination": { + "$ref": "#/components/schemas/Pagination" + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "queue.items", + "x-speakeasy-name-override": "list", + "x-speakeasy-mcp": { + "title": "Get queue items", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + }, + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "pageSize", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data", + "numPages": "$.pagination.totalPages" + } + } + } + }, + "/queue/{id}/items/{itemId}/resolve": { + "post": { + "operationId": "resolveQueueItem", + "summary": "Resolve a queue item", + "description": "Mark a queue item as resolved with a specific moderation action", + "tags": [ + "Review queues" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The queue ID" + }, + "required": true, + "description": "The queue ID" + }, + { + "in": "path", + "name": "itemId", + "schema": { + "type": "string", + "description": "The item ID to resolve" + }, + "required": true, + "description": "The item ID to resolve" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "description": "Optional comment", + "type": "string" + } + } + }, + "example": { + "comment": "Reviewed: no violation." + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "resolvedAt": { + "type": "string", + "description": "Timestamp when the item was resolved" + }, + "comment": { + "description": "Optional comment", + "type": "string" + } + }, + "required": [ + "success", + "resolvedAt" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "queue.items", + "x-speakeasy-name-override": "resolve", + "x-speakeasy-mcp": { + "title": "Resolve a queue item", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/queue/{id}/items/{itemId}/unresolve": { + "post": { + "operationId": "unresolveQueueItem", + "summary": "Unresolve a queue item", + "description": "Mark a previously resolved queue item as unresolved/pending", + "tags": [ + "Review queues" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The queue ID" + }, + "required": true, + "description": "The queue ID" + }, + { + "in": "path", + "name": "itemId", + "schema": { + "type": "string", + "description": "The item ID to unresolve" + }, + "required": true, + "description": "The item ID to unresolve" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "description": "Optional reason for unresolving the item", + "type": "string" + } + } + }, + "example": { + "comment": "Reopened after an appeal." + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "status": { + "type": "string", + "description": "New status of the item" + }, + "unresolvedAt": { + "type": "string", + "description": "Timestamp when the item was unresolved" + } + }, + "required": [ + "success", + "status", + "unresolvedAt" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "queue.items", + "x-speakeasy-name-override": "unresolve", + "x-speakeasy-mcp": { + "title": "Unresolve a queue item", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/actions": { + "get": { + "operationId": "listActions", + "summary": "List moderation actions", + "description": "List the moderation actions of the project. The list is paginated.", + "tags": [ + "Actions" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "queueId", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page", + "schema": { + "default": 1, + "description": "Page number, starting at 1.", + "type": "integer", + "minimum": 1, + "maximum": 100000 + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "default": 20, + "description": "Number of items per page. Maximum 100.", + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the action." + }, + "key": { + "description": "User defined key of the action.", + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "description": "The date the action was created.", + "type": "string" + }, + "name": { + "type": "string", + "description": "The name of the action." + }, + "description": { + "description": "The description of the action.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the action.", + "anyOf": [ + { + "type": "string", + "enum": [ + "AUTHOR_BLOCK", + "AUTHOR_BLOCK_TEMP", + "AUTHOR_UNBLOCK", + "AUTHOR_DELETE", + "AUTHOR_REPORT", + "AUTHOR_WARN", + "AUTHOR_CUSTOM", + "ITEM_REJECT", + "ITEM_ALLOW", + "ITEM_CUSTOM" + ] + }, + { + "type": "null" + } + ] + }, + "builtIn": { + "default": false, + "description": "Whether the action is a built-in action or a custom one.", + "type": [ + "boolean", + "null" + ] + }, + "queueBehaviour": { + "default": "NO_CHANGE", + "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "type": "string", + "enum": [ + "REMOVE", + "ADD", + "NO_CHANGE" + ] + }, + "filterInQueueIds": { + "default": [], + "description": "The IDs of the queues the action is available in.", + "type": "array", + "items": { + "type": "string" + } + }, + "position": { + "default": "ALL_QUEUES", + "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "type": "string", + "enum": [ + "ALL_QUEUES", + "SOME_QUEUES", + "HIDDEN" + ] + }, + "possibleValues": { + "default": [], + "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the action." + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "valueRequired": { + "default": false, + "description": "Whether the action requires a value to be executed.", + "type": "boolean" + }, + "freeText": { + "default": false, + "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", + "type": "boolean" + } + }, + "required": [ + "id", + "createdAt", + "name", + "builtIn", + "queueBehaviour", + "filterInQueueIds", + "position", + "possibleValues", + "valueRequired", + "freeText" + ], + "additionalProperties": false + }, + "description": "The items on this page." + }, + "pagination": { + "$ref": "#/components/schemas/Pagination" + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "actions", + "x-speakeasy-name-override": "list", + "x-speakeasy-mcp": { + "title": "List moderation actions", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + }, + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "pageSize", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data", + "numPages": "$.pagination.totalPages" + } + } + }, + "post": { + "operationId": "createAction", + "summary": "Create an action", + "description": "Create an action.", + "tags": [ + "Actions" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "User defined key of the action.", + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string", + "description": "The name of the action." + }, + "description": { + "description": "The description of the action.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the action.", + "anyOf": [ + { + "type": "string", + "enum": [ + "AUTHOR_BLOCK", + "AUTHOR_BLOCK_TEMP", + "AUTHOR_UNBLOCK", + "AUTHOR_DELETE", + "AUTHOR_REPORT", + "AUTHOR_WARN", + "AUTHOR_CUSTOM", + "ITEM_REJECT", + "ITEM_ALLOW", + "ITEM_CUSTOM" + ] + }, + { + "type": "null" + } + ] + }, + "builtIn": { + "default": false, + "description": "Whether the action is a built-in action or a custom one.", + "type": [ + "boolean", + "null" + ] + }, + "queueBehaviour": { + "default": "NO_CHANGE", + "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "type": "string", + "enum": [ + "REMOVE", + "ADD", + "NO_CHANGE" + ] + }, + "filterInQueueIds": { + "default": [], + "description": "The IDs of the queues the action is available in.", + "type": "array", + "items": { + "type": "string" + } + }, + "position": { + "default": "ALL_QUEUES", + "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "type": "string", + "enum": [ + "ALL_QUEUES", + "SOME_QUEUES", + "HIDDEN" + ] + }, + "possibleValues": { + "default": [], + "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the action." + } + }, + "required": [ + "value" + ] + } + }, + "valueRequired": { + "default": false, + "description": "Whether the action requires a value to be executed.", + "type": "boolean" + }, + "freeText": { + "default": false, + "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", + "type": "boolean" + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Suspend for 24 hours", + "key": "suspend-24h", + "type": "AUTHOR_BLOCK_TEMP", + "queueBehaviour": "REMOVE" + } + } + } + }, + "responses": { + "200": { + "description": "Action created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the action." + }, + "key": { + "description": "User defined key of the action.", + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "description": "The date the action was created.", + "type": "string" + }, + "name": { + "type": "string", + "description": "The name of the action." + }, + "description": { + "description": "The description of the action.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the action.", + "anyOf": [ + { + "type": "string", + "enum": [ + "AUTHOR_BLOCK", + "AUTHOR_BLOCK_TEMP", + "AUTHOR_UNBLOCK", + "AUTHOR_DELETE", + "AUTHOR_REPORT", + "AUTHOR_WARN", + "AUTHOR_CUSTOM", + "ITEM_REJECT", + "ITEM_ALLOW", + "ITEM_CUSTOM" + ] + }, + { + "type": "null" + } + ] + }, + "builtIn": { + "default": false, + "description": "Whether the action is a built-in action or a custom one.", + "type": [ + "boolean", + "null" + ] + }, + "queueBehaviour": { + "default": "NO_CHANGE", + "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "type": "string", + "enum": [ + "REMOVE", + "ADD", + "NO_CHANGE" + ] + }, + "filterInQueueIds": { + "default": [], + "description": "The IDs of the queues the action is available in.", + "type": "array", + "items": { + "type": "string" + } + }, + "position": { + "default": "ALL_QUEUES", + "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "type": "string", + "enum": [ + "ALL_QUEUES", + "SOME_QUEUES", + "HIDDEN" + ] + }, + "possibleValues": { + "default": [], + "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the action." + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "valueRequired": { + "default": false, + "description": "Whether the action requires a value to be executed.", + "type": "boolean" + }, + "freeText": { + "default": false, + "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", + "type": "boolean" + } + }, + "required": [ + "id", + "createdAt", + "name", + "builtIn", + "queueBehaviour", + "filterInQueueIds", + "position", + "possibleValues", + "valueRequired", + "freeText" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "409": { + "description": "Action with this key already exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "actions", + "x-speakeasy-name-override": "create", + "x-speakeasy-mcp": { + "title": "Create an action", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/actions/{id}": { + "get": { + "operationId": "getAction", + "summary": "Get an action", + "description": "Get an action by ID.", + "tags": [ + "Actions" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the action to get." + }, + "required": true, + "description": "The ID of the action to get." + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Action retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the action." + }, + "key": { + "description": "User defined key of the action.", + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "description": "The date the action was created.", + "type": "string" + }, + "name": { + "type": "string", + "description": "The name of the action." + }, + "description": { + "description": "The description of the action.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the action.", + "anyOf": [ + { + "type": "string", + "enum": [ + "AUTHOR_BLOCK", + "AUTHOR_BLOCK_TEMP", + "AUTHOR_UNBLOCK", + "AUTHOR_DELETE", + "AUTHOR_REPORT", + "AUTHOR_WARN", + "AUTHOR_CUSTOM", + "ITEM_REJECT", + "ITEM_ALLOW", + "ITEM_CUSTOM" + ] + }, + { + "type": "null" + } + ] + }, + "builtIn": { + "default": false, + "description": "Whether the action is a built-in action or a custom one.", + "type": [ + "boolean", + "null" + ] + }, + "queueBehaviour": { + "default": "NO_CHANGE", + "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "type": "string", + "enum": [ + "REMOVE", + "ADD", + "NO_CHANGE" + ] + }, + "filterInQueueIds": { + "default": [], + "description": "The IDs of the queues the action is available in.", + "type": "array", + "items": { + "type": "string" + } + }, + "position": { + "default": "ALL_QUEUES", + "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "type": "string", + "enum": [ + "ALL_QUEUES", + "SOME_QUEUES", + "HIDDEN" + ] + }, + "possibleValues": { + "default": [], + "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the action." + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "valueRequired": { + "default": false, + "description": "Whether the action requires a value to be executed.", + "type": "boolean" + }, + "freeText": { + "default": false, + "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", + "type": "boolean" + } + }, + "required": [ + "id", + "createdAt", + "name", + "builtIn", + "queueBehaviour", + "filterInQueueIds", + "position", + "possibleValues", + "valueRequired", + "freeText" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "actions", + "x-speakeasy-name-override": "retrieve", + "x-speakeasy-mcp": { + "title": "Get an action", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + }, + "put": { + "operationId": "updateAction", + "summary": "Update an action", + "description": "Update an action.", + "tags": [ + "Actions" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the action to update." + }, + "required": true, + "description": "The ID of the action to update." + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "User defined key of the action.", + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string", + "description": "The name of the action." + }, + "description": { + "description": "The description of the action.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the action.", + "anyOf": [ + { + "type": "string", + "enum": [ + "AUTHOR_BLOCK", + "AUTHOR_BLOCK_TEMP", + "AUTHOR_UNBLOCK", + "AUTHOR_DELETE", + "AUTHOR_REPORT", + "AUTHOR_WARN", + "AUTHOR_CUSTOM", + "ITEM_REJECT", + "ITEM_ALLOW", + "ITEM_CUSTOM" + ] + }, + { + "type": "null" + } + ] + }, + "builtIn": { + "default": false, + "description": "Whether the action is a built-in action or a custom one.", + "type": [ + "boolean", + "null" + ] + }, + "queueBehaviour": { + "default": "NO_CHANGE", + "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "type": "string", + "enum": [ + "REMOVE", + "ADD", + "NO_CHANGE" + ] + }, + "filterInQueueIds": { + "default": [], + "description": "The IDs of the queues the action is available in.", + "type": "array", + "items": { + "type": "string" + } + }, + "position": { + "default": "ALL_QUEUES", + "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "type": "string", + "enum": [ + "ALL_QUEUES", + "SOME_QUEUES", + "HIDDEN" + ] + }, + "possibleValues": { + "default": [], + "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the action." + } + }, + "required": [ + "value" + ] + } + }, + "valueRequired": { + "default": false, + "description": "Whether the action requires a value to be executed.", + "type": "boolean" + }, + "freeText": { + "default": false, + "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Action updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the action." + }, + "key": { + "description": "User defined key of the action.", + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "description": "The date the action was created.", + "type": "string" + }, + "name": { + "type": "string", + "description": "The name of the action." + }, + "description": { + "description": "The description of the action.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the action.", + "anyOf": [ + { + "type": "string", + "enum": [ + "AUTHOR_BLOCK", + "AUTHOR_BLOCK_TEMP", + "AUTHOR_UNBLOCK", + "AUTHOR_DELETE", + "AUTHOR_REPORT", + "AUTHOR_WARN", + "AUTHOR_CUSTOM", + "ITEM_REJECT", + "ITEM_ALLOW", + "ITEM_CUSTOM" + ] + }, + { + "type": "null" + } + ] + }, + "builtIn": { + "default": false, + "description": "Whether the action is a built-in action or a custom one.", + "type": [ + "boolean", + "null" + ] + }, + "queueBehaviour": { + "default": "NO_CHANGE", + "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "type": "string", + "enum": [ + "REMOVE", + "ADD", + "NO_CHANGE" + ] + }, + "filterInQueueIds": { + "default": [], + "description": "The IDs of the queues the action is available in.", + "type": "array", + "items": { + "type": "string" + } + }, + "position": { + "default": "ALL_QUEUES", + "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "type": "string", + "enum": [ + "ALL_QUEUES", + "SOME_QUEUES", + "HIDDEN" + ] + }, + "possibleValues": { + "default": [], + "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the action." + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "valueRequired": { + "default": false, + "description": "Whether the action requires a value to be executed.", + "type": "boolean" + }, + "freeText": { + "default": false, + "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", + "type": "boolean" + } + }, + "required": [ + "id", + "createdAt", + "name", + "builtIn", + "queueBehaviour", + "filterInQueueIds", + "position", + "possibleValues", + "valueRequired", + "freeText" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "409": { + "description": "Action with this key already exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "actions", + "x-speakeasy-name-override": "update", + "x-speakeasy-mcp": { + "title": "Update an action", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + }, + "delete": { + "operationId": "deleteAction", + "summary": "Delete an action", + "description": "Delete an action and all of its webhooks.", + "tags": [ + "Actions" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the action to delete." + }, + "required": true, + "description": "The ID of the action to delete." + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Action deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deleted": { + "type": "boolean", + "description": "Whether the action was deleted." + }, + "id": { + "type": "string", + "description": "The ID of the action." + } + }, + "required": [ + "deleted", + "id" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "actions", + "x-speakeasy-name-override": "delete", + "x-speakeasy-mcp": { + "title": "Delete an action", + "scopes": [ + "destructive" + ], + "readOnlyHint": false, + "destructiveHint": true + } + } + }, + "/actions/execute": { + "post": { + "operationId": "executeAction", + "summary": "Execute moderation action", + "description": "Execute a moderation action on one or more content items.", + "tags": [ + "Actions" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "actionKey": { + "type": "string", + "description": "ID or key of the action to execute" + }, + "contentIds": { + "description": "IDs of the content items to apply the action to. Provide this or authorIds.", + "type": "array", + "items": { + "type": "string" + } + }, + "authorIds": { + "description": "IDs of the authors to apply the action to. Provide this or contentIds.", + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "description": "Optional value to provide with the action", + "type": "string" + }, + "queueId": { + "description": "Optional queue ID if the action is queue-specific", + "type": "string" + }, + "duration": { + "description": "Optional duration in milliseconds for actions with timeouts", + "type": "number", + "minimum": 0 + } + }, + "required": [ + "actionKey" + ], + "description": "Input parameters" + }, + "example": { + "actionKey": "suspend-24h", + "authorIds": [ + "user-1092" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Action executed successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Whether the action was executed successfully" + } + }, + "required": [ + "success" + ], + "additionalProperties": false, + "description": "Execution result" + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "actions", + "x-speakeasy-name-override": "execute", + "x-speakeasy-mcp": { + "title": "Execute moderation action", + "scopes": [ + "destructive" + ], + "readOnlyHint": false, + "destructiveHint": true + } + } + }, + "/actions/{actionId}/execute": { + "post": { + "operationId": "executeActionById", + "summary": "Execute an action", + "description": "Execute an action on a set of content items in a queue.", + "tags": [ + "Actions" + ], + "security": [ + { + "Authorization": [] + } + ], + "deprecated": true, + "parameters": [ + { + "in": "path", + "name": "actionId", + "schema": { + "type": "string", + "description": "The ID or key of the action to execute." + }, + "required": true, + "description": "The ID or key of the action to execute." + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "contentIds": { + "description": "The IDs of the content items to perform the action on.", + "type": "array", + "items": { + "type": "string" + } + }, + "authorIds": { + "description": "IDs of the authors to apply the action to", + "type": "array", + "items": { + "type": "string" + } + }, + "queueId": { + "description": "The ID of the queue the action was performed from if any.", + "type": "string" + }, + "value": { + "description": "The value of the action. Useful to set a reason for the action etc.", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Action executed successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Action executed successfully." + }, + "actionId": { + "type": "string", + "description": "The ID of the action." + }, + "ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The IDs of the content items." + } + }, + "required": [ + "success", + "actionId", + "ids" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-ignore": true + } + }, + "/webhooks": { + "get": { + "operationId": "listWebhooks", + "summary": "List webhooks", + "description": "List the webhooks of the project. The list is paginated.", + "tags": [ + "Webhooks" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "page", + "schema": { + "default": 1, + "description": "Page number, starting at 1.", + "type": "integer", + "minimum": 1, + "maximum": 100000 + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "default": 20, + "description": "Number of items per page. Maximum 100.", + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Webhooks retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the webhook." + }, + "name": { + "type": "string", + "description": "The webhook's name." + }, + "description": { + "description": "The webhook's description.", + "type": [ + "string", + "null" + ] + }, + "url": { + "type": "string", + "description": "The URL we call when a subscribed event occurs." + }, + "eventTypes": { + "default": [], + "description": "Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "QUEUE_ITEM_NEW", + "QUEUE_ITEM_COMPLETED", + "QUEUE_ITEM_ACTION", + "QUEUE_ITEM_REJECTED", + "QUEUE_ITEM_ALLOWED", + "AUTHOR_BLOCKED", + "AUTHOR_UNBLOCKED", + "AUTHOR_SUSPENDED", + "AUTHOR_UPDATED", + "AUTHOR_TRUST_LEVEL_CHANGED", + "AUTHOR_ACTION" + ] + } + }, + "payloadVersion": { + "type": "string", + "enum": [ + "V1", + "V2" + ], + "description": "Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API." + }, + "createdAt": { + "description": "The date the webhook was created.", + "type": "string" + } + }, + "required": [ + "id", + "name", + "url", + "eventTypes", + "payloadVersion", + "createdAt" + ], + "additionalProperties": false + }, + "description": "The items on this page." + }, + "pagination": { + "$ref": "#/components/schemas/Pagination" + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "webhooks", + "x-speakeasy-name-override": "list", + "x-speakeasy-mcp": { + "title": "List webhooks", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + }, + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "pageSize", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data", + "numPages": "$.pagination.totalPages" + } + } + }, + "post": { + "operationId": "createWebhook", + "summary": "Create a webhook", + "description": "Create a webhook subscribed to one or more event types. Deliveries use the v2 envelope and are signed with the project signing secret (see the signing secret endpoint).", + "tags": [ + "Webhooks" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "description": "The webhook's name, used to identify it in the dashboard" + }, + "description": { + "description": "The webhook's description", + "type": [ + "string", + "null" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The webhook's URL. We'll call this URL when an event occurs." + }, + "eventTypes": { + "minItems": 1, + "type": "array", + "items": { + "type": "string", + "enum": [ + "QUEUE_ITEM_NEW", + "QUEUE_ITEM_COMPLETED", + "QUEUE_ITEM_ACTION", + "QUEUE_ITEM_REJECTED", + "QUEUE_ITEM_ALLOWED", + "AUTHOR_BLOCKED", + "AUTHOR_UNBLOCKED", + "AUTHOR_SUSPENDED", + "AUTHOR_UPDATED", + "AUTHOR_TRUST_LEVEL_CHANGED", + "AUTHOR_ACTION" + ] + }, + "description": "Event types this webhook subscribes to. One webhook URL receives all events you list here." + } + }, + "required": [ + "name", + "url", + "eventTypes" + ] + }, + "example": { + "name": "Moderation events", + "url": "https://example.com/webhooks/moderation", + "eventTypes": [ + "QUEUE_ITEM_REJECTED", + "AUTHOR_BLOCKED" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Webhook created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the webhook." + }, + "name": { + "type": "string", + "description": "The webhook's name." + }, + "description": { + "description": "The webhook's description.", + "type": [ + "string", + "null" + ] + }, + "url": { + "type": "string", + "description": "The URL we call when a subscribed event occurs." + }, + "eventTypes": { + "default": [], + "description": "Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "QUEUE_ITEM_NEW", + "QUEUE_ITEM_COMPLETED", + "QUEUE_ITEM_ACTION", + "QUEUE_ITEM_REJECTED", + "QUEUE_ITEM_ALLOWED", + "AUTHOR_BLOCKED", + "AUTHOR_UNBLOCKED", + "AUTHOR_SUSPENDED", + "AUTHOR_UPDATED", + "AUTHOR_TRUST_LEVEL_CHANGED", + "AUTHOR_ACTION" + ] + } + }, + "payloadVersion": { + "type": "string", + "enum": [ + "V1", + "V2" + ], + "description": "Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API." + }, + "createdAt": { + "description": "The date the webhook was created.", + "type": "string" + } + }, + "required": [ + "id", + "name", + "url", + "eventTypes", + "payloadVersion", + "createdAt" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "webhooks", + "x-speakeasy-name-override": "create", + "x-speakeasy-mcp": { + "title": "Create a webhook", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/webhooks/{id}": { + "get": { + "operationId": "getWebhook", + "summary": "Get a webhook", + "description": "Get a webhook by ID.", + "tags": [ + "Webhooks" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the webhook to get." + }, + "required": true, + "description": "The ID of the webhook to get." + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Webhook retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the webhook." + }, + "name": { + "type": "string", + "description": "The webhook's name." + }, + "description": { + "description": "The webhook's description.", + "type": [ + "string", + "null" + ] + }, + "url": { + "type": "string", + "description": "The URL we call when a subscribed event occurs." + }, + "eventTypes": { + "default": [], + "description": "Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "QUEUE_ITEM_NEW", + "QUEUE_ITEM_COMPLETED", + "QUEUE_ITEM_ACTION", + "QUEUE_ITEM_REJECTED", + "QUEUE_ITEM_ALLOWED", + "AUTHOR_BLOCKED", + "AUTHOR_UNBLOCKED", + "AUTHOR_SUSPENDED", + "AUTHOR_UPDATED", + "AUTHOR_TRUST_LEVEL_CHANGED", + "AUTHOR_ACTION" + ] + } + }, + "payloadVersion": { + "type": "string", + "enum": [ + "V1", + "V2" + ], + "description": "Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API." + }, + "createdAt": { + "description": "The date the webhook was created.", + "type": "string" + } + }, + "required": [ + "id", + "name", + "url", + "eventTypes", + "payloadVersion", + "createdAt" + ], + "additionalProperties": false + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "webhooks", + "x-speakeasy-name-override": "retrieve", + "x-speakeasy-mcp": { + "title": "Get a webhook", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + }, + "put": { + "operationId": "updateWebhook", + "summary": "Update a webhook", + "description": "Update a webhook. Legacy v1 webhooks are read-only: delete them and create a new webhook instead.", + "tags": [ + "Webhooks" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the webhook to update." + }, + "required": true, + "description": "The ID of the webhook to update." + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "description": "The webhook's name, used to identify it in the dashboard" + }, + "description": { + "description": "The webhook's description", + "type": [ + "string", + "null" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The webhook's URL. We'll call this URL when an event occurs." + }, + "eventTypes": { + "minItems": 1, + "type": "array", + "items": { + "type": "string", + "enum": [ + "QUEUE_ITEM_NEW", + "QUEUE_ITEM_COMPLETED", + "QUEUE_ITEM_ACTION", + "QUEUE_ITEM_REJECTED", + "QUEUE_ITEM_ALLOWED", + "AUTHOR_BLOCKED", + "AUTHOR_UNBLOCKED", + "AUTHOR_SUSPENDED", + "AUTHOR_UPDATED", + "AUTHOR_TRUST_LEVEL_CHANGED", + "AUTHOR_ACTION" + ] + }, + "description": "Event types this webhook subscribes to. One webhook URL receives all events you list here." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Webhook updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the webhook." + }, + "name": { + "type": "string", + "description": "The webhook's name." + }, + "description": { + "description": "The webhook's description.", + "type": [ + "string", + "null" + ] + }, + "url": { + "type": "string", + "description": "The URL we call when a subscribed event occurs." + }, + "eventTypes": { + "default": [], + "description": "Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "QUEUE_ITEM_NEW", + "QUEUE_ITEM_COMPLETED", + "QUEUE_ITEM_ACTION", + "QUEUE_ITEM_REJECTED", + "QUEUE_ITEM_ALLOWED", + "AUTHOR_BLOCKED", + "AUTHOR_UNBLOCKED", + "AUTHOR_SUSPENDED", + "AUTHOR_UPDATED", + "AUTHOR_TRUST_LEVEL_CHANGED", + "AUTHOR_ACTION" + ] + } + }, + "payloadVersion": { + "type": "string", + "enum": [ + "V1", + "V2" + ], + "description": "Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API." + }, + "createdAt": { + "description": "The date the webhook was created.", + "type": "string" + } + }, + "required": [ + "id", + "name", + "url", + "eventTypes", + "payloadVersion", + "createdAt" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "webhooks", + "x-speakeasy-name-override": "update", + "x-speakeasy-mcp": { + "title": "Update a webhook", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + }, + "delete": { + "operationId": "deleteWebhook", + "summary": "Delete a webhook", + "description": "Delete a webhook.", + "tags": [ + "Webhooks" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the webhook to delete." + }, + "required": true, + "description": "The ID of the webhook to delete." + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Webhook deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deleted": { + "type": "boolean", + "description": "Whether the webhook was deleted." + }, + "id": { + "type": "string", + "description": "The ID of the webhook." + } + }, + "required": [ + "deleted", + "id" + ], + "additionalProperties": false + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "webhooks", + "x-speakeasy-name-override": "delete", + "x-speakeasy-mcp": { + "title": "Delete a webhook", + "scopes": [ + "destructive" + ], + "readOnlyHint": false, + "destructiveHint": true + } + } + }, + "/webhook-secret": { + "get": { + "operationId": "getWebhookSecret", + "summary": "Get the webhook signing secret", + "description": "Get the signing secret used to sign webhook deliveries for this project, creating one if none exists yet. Verify deliveries by comparing the `modapi-signature` header to HMAC-SHA256(raw request body, secret) hex-encoded.", + "tags": [ + "Webhooks" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Signing secret retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The signing secret for this project. Every webhook delivery is signed with HMAC-SHA256 over the raw JSON body, hex-encoded in the `modapi-signature` header." + } + }, + "required": [ + "secret" + ], + "additionalProperties": false + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "webhookSecret", + "x-speakeasy-name-override": "retrieve", + "x-speakeasy-mcp": { + "disabled": true + } + } + }, + "/moderate/text": { + "post": { + "operationId": "moderateText", + "summary": "Analyze text", + "description": "(Deprecated \u2014 use https://api.moderationapi.com/v1/moderate) Analyze text content. Runs the same policy engine as POST /moderate; the per-model result blocks are approximated from the policies it ran.", + "tags": [ + "Content" + ], + "security": [ + { + "Authorization": [] + } + ], + "deprecated": true, + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "contentId": { + "description": "The unique ID of the content in your database.", + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "channelKey": { + "description": "The key of the channel.", + "type": "string" + }, + "doNotStore": { + "description": "Do not store the content. The content won't enter the review queue", + "type": "boolean" + }, + "authorId": { + "description": "The author of the content.", + "type": "string" + }, + "contextId": { + "description": "For example the ID of a chat room or a post", + "type": "string" + }, + "metadata": { + "description": "Any metadata you want to store with the content", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "value": { + "type": "string", + "maxLength": 100000, + "description": "The text you'd like to analyze. We recommend to submit plain text or HTML" + } + }, + "required": [ + "value" + ], + "description": "Input parameters for text moderation" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Success if the request was successful" + }, + "contentId": { + "description": "The ID of the content.", + "type": "string" + }, + "request": { + "type": "object", + "properties": { + "timestamp": { + "type": "number", + "description": "The timestamp of the request" + }, + "quota_usage": { + "type": "number", + "description": "The quota usage of the request" + } + }, + "required": [ + "timestamp", + "quota_usage" + ], + "additionalProperties": false, + "description": "Information about the request" + }, + "flagged": { + "type": "boolean", + "description": "Whether the content was flagged by any models" + }, + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Author ID in Moderation API" + }, + "external_id": { + "description": "The author's ID from your system", + "type": [ + "string", + "null" + ] + }, + "block": { + "anyOf": [ + { + "type": "object", + "properties": { + "until": { + "description": "The timestamp until which they are blocked if the author is suspended.", + "type": [ + "number", + "null" + ] + }, + "reason": { + "description": "The moderators reason why the author was blocked or suspended.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "Block or suspension details, if applicable. Null if the author is enabled." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "suspended", + "blocked" + ], + "description": "Current author status" + }, + "trust_level": { + "type": "object", + "properties": { + "level": { + "type": "number", + "description": "Author trust level (-1, 0, 1, 2, 3, or 4)" + }, + "manual": { + "type": "boolean", + "description": "True if the trust level was set manually by a moderator" + } + }, + "required": [ + "level", + "manual" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "block", + "status", + "trust_level" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "The author of the content if your account has authors enabled. Requires you to send authorId when submitting content." + }, + "content_moderated": { + "type": "boolean", + "description": "Whether the content was moderated or not. Same as `content` !== `original`" + }, + "unicode_spoofing": { + "type": "boolean", + "description": "Whether the content is using look-alike characters. Often used by spammers." + }, + "data_found": { + "type": "boolean", + "description": "Whether any entity matchers found data for the content" + }, + "original": { + "type": "string", + "description": "The original content" + }, + "content": { + "type": "string", + "description": "The content after moderation. With all mask replacements applied and look-alike characters replaced with the original characters." + } + }, + "required": [ + "status", + "request", + "flagged", + "author", + "content_moderated", + "unicode_spoofing", + "data_found", + "original", + "content" + ], + "additionalProperties": false + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-ignore": true + } + }, + "/moderate/image": { + "post": { + "operationId": "moderateImage", + "summary": "Analyze image", + "description": "(Deprecated \u2014 use https://api.moderationapi.com/v1/moderate) Analyze an image. Runs the same policy engine as POST /moderate; `labels` is approximated from the policies it ran and `texts` is no longer populated.", + "tags": [ + "Content" + ], + "security": [ + { + "Authorization": [] + } + ], + "deprecated": true, + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "contentId": { + "description": "The unique ID of the content in your database.", + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "channelKey": { + "description": "The key of the channel.", + "type": "string" + }, + "doNotStore": { + "description": "Do not store the content. The content won't enter the review queue", + "type": "boolean" + }, + "authorId": { + "description": "The author of the content.", + "type": "string" + }, + "contextId": { + "description": "For example the ID of a chat room or a post", + "type": "string" + }, + "metadata": { + "description": "Any metadata you want to store with the content", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the image you want to analyze." + } + }, + "required": [ + "url" + ], + "description": "Input parameters for image moderation" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Success if the request was successful" + }, + "contentId": { + "description": "The ID of the content.", + "type": "string" + }, + "request": { + "type": "object", + "properties": { + "timestamp": { + "type": "number", + "description": "The timestamp of the request" + }, + "quota_usage": { + "type": "number", + "description": "The quota usage of the request" + } + }, + "required": [ + "timestamp", + "quota_usage" + ], + "additionalProperties": false, + "description": "Information about the request" + }, + "flagged": { + "type": "boolean", + "description": "Whether the content was flagged by any models" + }, + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Author ID in Moderation API" + }, + "external_id": { + "description": "The author's ID from your system", + "type": [ + "string", + "null" + ] + }, + "block": { + "anyOf": [ + { + "type": "object", + "properties": { + "until": { + "description": "The timestamp until which they are blocked if the author is suspended.", + "type": [ + "number", + "null" + ] + }, + "reason": { + "description": "The moderators reason why the author was blocked or suspended.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "Block or suspension details, if applicable. Null if the author is enabled." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "suspended", + "blocked" + ], + "description": "Current author status" + }, + "trust_level": { + "type": "object", + "properties": { + "level": { + "type": "number", + "description": "Author trust level (-1, 0, 1, 2, 3, or 4)" + }, + "manual": { + "type": "boolean", + "description": "True if the trust level was set manually by a moderator" + } + }, + "required": [ + "level", + "manual" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "block", + "status", + "trust_level" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "The author of the content if your account has authors enabled. Requires you to send authorId when submitting content." + }, + "data_found": { + "type": "boolean", + "description": "Whether any entity matchers found data for the content" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "score": { + "type": "number" + } + }, + "required": [ + "label", + "score" + ], + "additionalProperties": false + }, + "description": "Legacy image labels, approximated from the equivalent policies. Use POST /moderate for the policy probabilities themselves." + } + }, + "required": [ + "status", + "request", + "flagged", + "author", + "data_found", + "labels" + ], + "additionalProperties": false + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-ignore": true + } + }, + "/account": { + "get": { + "operationId": "getAccount", + "summary": "Get account details", + "description": "Get account details", + "tags": [ + "Account" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Account details retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the account" + }, + "paid_plan_name": { + "type": "string", + "description": "Name of the paid plan" + }, + "text_api_quota": { + "type": "number", + "description": "Text API quota" + }, + "remaining_quota": { + "type": "number", + "description": "Remaining quota" + }, + "current_project": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the current project" + }, + "name": { + "type": "string", + "description": "Name of the current project" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "paid_plan_name", + "text_api_quota", + "remaining_quota" + ], + "additionalProperties": false + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "account", + "x-speakeasy-name-override": "retrieve", + "x-speakeasy-mcp": { + "title": "Get account details", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + } + }, + "/auth": { + "get": { + "operationId": "getAuth", + "tags": [ + "Account" + ], + "security": [ + { + "Authorization": [] + } + ], + "deprecated": true, + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Status of the authentication" + }, + "message": { + "type": "string", + "description": "Message of the authentication" + } + }, + "required": [ + "status", + "message" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-ignore": true + }, + "post": { + "operationId": "createAuth", + "tags": [ + "Account" + ], + "security": [ + { + "Authorization": [] + } + ], + "deprecated": true, + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Status of the authentication" + }, + "message": { + "type": "string", + "description": "Message of the authentication" + }, + "project": { + "type": "string", + "description": "Name of the authenticated project" + } + }, + "required": [ + "status", + "message", + "project" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-ignore": true + } + }, + "/wordlist": { + "get": { + "operationId": "listWordlists", + "summary": "List wordlists", + "description": "List the wordlists of the organization. The list is paginated.", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "page", + "schema": { + "default": 1, + "description": "Page number, starting at 1.", + "type": "integer", + "minimum": 1, + "maximum": 100000 + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "default": 20, + "description": "Number of items per page. Maximum 100.", + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the wordlist" + }, + "name": { + "description": "Name of the wordlist", + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "Description of the wordlist", + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "description": "When the wordlist was created", + "type": [ + "string", + "null" + ] + }, + "userId": { + "description": "User who created the wordlist", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "name", + "description", + "createdAt", + "userId" + ], + "additionalProperties": false + }, + "description": "The items on this page." + }, + "pagination": { + "$ref": "#/components/schemas/Pagination" + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist", + "x-speakeasy-name-override": "list", + "x-speakeasy-mcp": { + "title": "List wordlists", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + }, + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "pageSize", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data", + "numPages": "$.pagination.totalPages" + } + } + } + }, + "/wordlist/{id}": { + "get": { + "operationId": "getWordlist", + "summary": "Get wordlist", + "description": "Get a specific wordlist by ID", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "ID of the wordlist to get" + }, + "required": true, + "description": "ID of the wordlist to get" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the wordlist" + }, + "name": { + "anyOf": [ + { + "type": "string", + "description": "Name of the wordlist" + }, + { + "type": "null" + } + ] + }, + "words": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Words in the wordlist" + }, + "createdAt": { + "description": "Creation date of the wordlist", + "type": "string" + }, + "organizationId": { + "type": "string", + "description": "ID of the organization" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "description": "ID of the user" + }, + { + "type": "null" + } + ] + }, + "strict": { + "type": "boolean", + "description": "Strict mode" + } + }, + "required": [ + "id", + "name", + "words", + "createdAt", + "organizationId", + "userId", + "strict" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist", + "x-speakeasy-name-override": "retrieve", + "x-speakeasy-mcp": { + "title": "Get wordlist", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + }, + "put": { + "operationId": "updateWordlist", + "summary": "Update wordlist", + "description": "Update a wordlist", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "ID of the wordlist to update" + }, + "required": true, + "description": "ID of the wordlist to update" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "New name for the wordlist", + "type": "string" + }, + "key": { + "description": "New key for the wordlist", + "type": "string" + }, + "description": { + "description": "New description for the wordlist", + "type": "string" + }, + "words": { + "description": "New words for the wordlist. Replace the existing words with these new ones. Duplicate words will be ignored.", + "type": "array", + "items": { + "type": "string" + } + }, + "strict": { + "description": "Deprecated. Now using threshold in project settings.", + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Wordlist updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the wordlist" + }, + "name": { + "anyOf": [ + { + "type": "string", + "description": "Name of the wordlist" + }, + { + "type": "null" + } + ] + }, + "words": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Words in the wordlist" + }, + "createdAt": { + "description": "Creation date of the wordlist", + "type": "string" + }, + "organizationId": { + "type": "string", + "description": "ID of the organization" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "description": "ID of the user" + }, + { + "type": "null" + } + ] + }, + "strict": { + "type": "boolean", + "description": "Strict mode" + } + }, + "required": [ + "id", + "name", + "words", + "createdAt", + "organizationId", + "userId", + "strict" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist", + "x-speakeasy-name-override": "update", + "x-speakeasy-mcp": { + "title": "Update wordlist", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/wordlist/{id}/embedding-status": { + "get": { + "operationId": "getWordlistEmbeddingStatus", + "summary": "Get embedding status", + "description": "Get the current embedding progress status for a wordlist", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "ID of the wordlist to check embedding status for" + }, + "required": true, + "description": "ID of the wordlist to check embedding status for" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "progress": { + "type": "number", + "description": "Percentage of words that have been embedded (0-100)" + }, + "totalWords": { + "type": "number", + "description": "Total number of words in the wordlist" + }, + "remainingWords": { + "type": "number", + "description": "Number of words still waiting to be embedded" + } + }, + "required": [ + "progress", + "totalWords", + "remainingWords" + ], + "additionalProperties": false, + "description": "Embedding status details" + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist", + "x-speakeasy-name-override": "getEmbeddingStatus", + "x-speakeasy-mcp": { + "title": "Get embedding status", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + } + }, + "/wordlist/{id}/words": { + "post": { + "operationId": "addWordlistWords", + "summary": "Add words to wordlist", + "description": "Add words to an existing wordlist", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "ID of the wordlist to add words to" + }, + "required": true, + "description": "ID of the wordlist to add words to" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "words": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of words to add to the wordlist. Duplicate words will be ignored." + } + }, + "required": [ + "words" + ] + }, + "example": { + "words": [ + "free money", + "click here" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Words successfully added to wordlist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "addedCount": { + "type": "number", + "description": "Number of words added" + }, + "totalCount": { + "type": "number", + "description": "Total number of words in wordlist" + }, + "addedWords": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of words that were added" + } + }, + "required": [ + "addedCount", + "totalCount", + "addedWords" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist.words", + "x-speakeasy-name-override": "add", + "x-speakeasy-mcp": { + "title": "Add words to wordlist", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + }, + "delete": { + "operationId": "removeWordlistWords", + "summary": "Remove words from wordlist", + "description": "Remove words from an existing wordlist", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "ID of the wordlist to remove words from" + }, + "required": true, + "description": "ID of the wordlist to remove words from" + }, + { + "in": "query", + "name": "words", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of words to remove from the wordlist" + }, + "required": true, + "description": "Array of words to remove from the wordlist" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "responses": { + "200": { + "description": "Words successfully removed from wordlist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "removedCount": { + "type": "number", + "description": "Number of words removed" + }, + "totalCount": { + "type": "number", + "description": "Total number of words in wordlist" + }, + "removedWords": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of words removed" + } + }, + "required": [ + "removedCount", + "totalCount", + "removedWords" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist.words", + "x-speakeasy-name-override": "remove", + "x-speakeasy-mcp": { + "title": "Remove words from wordlist", + "scopes": [ + "destructive" + ], + "readOnlyHint": false, + "destructiveHint": true + } + } + }, + "/moderate": { + "post": { + "operationId": "submitContent", + "summary": "Submit content", + "tags": [ + "Content" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text" + }, + "text": { + "type": "string", + "maxLength": 100000, + "description": "The content text" + } + }, + "required": [ + "type", + "text" + ], + "description": "Text", + "title": "Text" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "image" + }, + "url": { + "description": "A public URL of the image content. Either url or data must be provided.", + "type": "string", + "format": "uri" + }, + "data": { + "description": "Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue.", + "type": "string", + "maxLength": 5500000 + } + }, + "required": [ + "type" + ], + "description": "Image", + "title": "Image" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "video" + }, + "url": { + "type": "string", + "format": "uri", + "description": "A public URL of the video content" + } + }, + "required": [ + "type", + "url" + ], + "description": "Video", + "title": "Video" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "audio" + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the audio content" + } + }, + "required": [ + "type", + "url" + ], + "description": "Audio", + "title": "Audio" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "object" + }, + "data": { + "type": "object", + "propertyNames": { + "type": "string", + "description": "The key of the content node" + }, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text" + }, + "text": { + "type": "string", + "maxLength": 100000, + "description": "The content text" + } + }, + "required": [ + "type", + "text" + ], + "description": "Text", + "title": "Text" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "image" + }, + "url": { + "description": "A public URL of the image content. Either url or data must be provided.", + "type": "string", + "format": "uri" + }, + "data": { + "description": "Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue.", + "type": "string", + "maxLength": 5500000 + } + }, + "required": [ + "type" + ], + "description": "Image", + "title": "Image" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "video" + }, + "url": { + "type": "string", + "format": "uri", + "description": "A public URL of the video content" + } + }, + "required": [ + "type", + "url" + ], + "description": "Video", + "title": "Video" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "audio" + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the audio content" + } + }, + "required": [ + "type", + "url" + ], + "description": "Audio", + "title": "Audio" + } + ], + "title": "Content leaf", + "type": "object" + }, + "description": "Values in the object. Can be mixed content types." + } + }, + "required": [ + "type", + "data" + ], + "description": "Object", + "title": "Object" + } + ], + "description": "The content sent for moderation", + "type": "object" + }, + "timestamp": { + "description": "Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time.", + "type": "number" + }, + "channel": { + "description": "Provide a channel ID or key. Will use the project's default channel if not provided.", + "type": "string" + }, + "contentId": { + "description": "The unique ID of the content in your database.", + "type": "string", + "maxLength": 100 + }, + "metaType": { + "description": "The meta type of content being moderated", + "type": "string", + "enum": [ + "profile", + "message", + "post", + "comment", + "event", + "product", + "review", + "voice", + "other" + ] + }, + "authorId": { + "description": "The author of the content.", + "type": "string" + }, + "conversationId": { + "description": "For example the ID of a chat room or a post", + "type": "string" + }, + "metadata": { + "description": "Any metadata you want to store with the content", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "clientAction": { + "description": "A recommendation from your own client-side flagging (e.g. a banned-IP list or a third-party tool). Feeds the rules engine and can escalate or override the recommended action. Does not change whether our analysis flagged the content.", + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "review", + "allow", + "reject" + ], + "description": "Your recommendation for the content: allow, review, or reject." + }, + "behavior": { + "description": "How your recommendation combines with ours. Defaults to 'escalate', which only applies it when stricter than ours; 'override' replaces ours outright.", + "type": "string", + "enum": [ + "override", + "escalate" + ] + }, + "source": { + "description": "Where your recommendation came from, e.g. \"banned-ip\".", + "type": "string", + "maxLength": 100 + }, + "reason": { + "description": "A human-readable explanation for your recommendation.", + "type": "string", + "maxLength": 500 + } + }, + "required": [ + "action" + ] + }, + "doNotStore": { + "description": "Do not store the content. The content won't enter the review queue", + "type": "boolean" + }, + "policies": { + "description": "(Enterprise) override the channel policies for this moderation request only.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "toxicity" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Toxicity" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "personal_information" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Personal Information" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "hate" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Hate" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "illicit" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Illicit" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "illicit_drugs" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Illicit Drugs" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "illicit_alcohol" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Illicit Alcohol" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "illicit_firearms" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Illicit Firearms" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "illicit_tobacco" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Illicit Tobacco" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "illicit_gambling" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Illicit Gambling" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "cannabis" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Cannabis" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "adult" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Adult" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "crypto" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Crypto" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "sexual" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Sexual" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "sexual_minors" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Sexual Minors" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "profanity" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Profanity" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "violence" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Violence" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "self_harm" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Self Harm" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "spam" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Spam" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "low_quality" + }, + "minWords": { + "description": "Flag content with fewer than this many words as low-effort. Defaults to 3. Set to disable by omitting.", + "type": "integer", + "minimum": 1 + } + }, + "required": [ + "flag", + "id" + ], + "title": "Low-quality content" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "face_detection" + }, + "comparator": { + "description": "Flag images that contain \"at least\" or \"fewer than\" the configured number of faces. Defaults to at_least.", + "type": "string", + "enum": [ + "at_least", + "fewer_than" + ] + }, + "count": { + "description": "Number of faces the comparator applies to. Defaults to 1, so the default rule flags any image containing a face.", + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "flag", + "id" + ], + "title": "Face detection" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "self_promotion" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Self Promotion" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "political" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Political" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "religion" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Religion" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "threat" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Threat" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "sexual_solicitation" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Sexual Solicitation" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "channel_circumvent" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Channel Circumvention" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "illegal_trade" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Illegal Trade" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "alcohol" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Alcohol" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "drugs" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Drugs" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "gambling" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Gambling" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "tobacco" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Tobacco" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "weapons" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Weapons" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "promotion" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Promotion" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "extremism" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Extremism" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "code_abuse" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Code Abuse" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "unicode_spoofing" + }, + "signals": { + "description": "Per-signal flag toggles. Omitted spoofing signals are enabled; encoding_damage defaults to off because decode damage (U+FFFD) marks a broken pipeline, not an attack. A disabled signal is still detected and reported as a label, but does not by itself flag the policy.", + "type": "object", + "propertyNames": { + "type": "string", + "enum": [ + "mixed_script", + "confusable_word", + "invisible", + "zalgo", + "illegal", + "encoding_damage" + ] + }, + "additionalProperties": { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + } + } + } + } + }, + "required": [ + "flag", + "id" + ], + "title": "Unicode Spoofing" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "const": "pii" + }, + "entities": { + "type": "object", + "propertyNames": { + "type": "string", + "enum": [ + "email", + "phone", + "url", + "address", + "name", + "username", + "ip_address", + "credit_card", + "sensitive_other" + ] + }, + "additionalProperties": { + "type": "object", + "properties": { + "enable": { + "type": "boolean" + }, + "flag": { + "type": "boolean" + }, + "shouldMask": { + "type": "boolean" + }, + "mask": { + "type": "string" + } + }, + "additionalProperties": {} + } + } + }, + "required": [ + "id", + "entities" + ], + "title": "PII Masking" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "const": "url" + }, + "entities": { + "type": "object", + "propertyNames": { + "type": "string", + "enum": [ + "email", + "phone", + "url", + "address", + "name", + "username", + "ip_address", + "credit_card", + "sensitive_other" + ] + }, + "additionalProperties": { + "type": "object", + "properties": { + "enable": { + "type": "boolean" + }, + "flag": { + "type": "boolean" + }, + "shouldMask": { + "type": "boolean" + }, + "mask": { + "type": "string" + } + }, + "additionalProperties": {} + } + } + }, + "required": [ + "id", + "entities" + ], + "title": "URL Masking" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "url_risk" + }, + "allowlistWordlistIds": { + "description": "IDs of wordlists whose entries are treated as allowed URL domains. Matches short-circuit the risk model and are never flagged.", + "type": "array", + "items": { + "type": "string" + } + }, + "blocklistWordlistIds": { + "description": "IDs of wordlists whose entries are treated as blocked URL domains. Matches short-circuit the risk model and are always flagged. Blocklists take precedence over allowlists.", + "type": "array", + "items": { + "type": "string" + } + }, + "flagLinkShorteners": { + "description": "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.", + "type": "boolean" + } + }, + "required": [ + "flag", + "id" + ], + "title": "URL Risk" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "guideline" + }, + "instructions": { + "type": "string" + }, + "guidelineKey": { + "type": "string" + } + }, + "required": [ + "flag", + "id", + "instructions", + "guidelineKey" + ], + "title": "Guideline" + } + ], + "type": "object" + } + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": { + "type": "text", + "text": "Hey, check out my profile for a deal!" + }, + "contentId": "message-48213", + "authorId": "user-1092", + "conversationId": "room-general", + "metadata": { + "platform": "ios" + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the content. Either the contentId provided by you or an autogenerated ID." + }, + "masked": { + "type": "boolean", + "description": "Whether any values have been masked." + }, + "unicode_cleaned": { + "type": "boolean", + "description": "Whether Unicode spoofing normalization rewrote the content \u2014 confusables folded to their Latin lookalikes, invisible characters and combining-mark abuse stripped." + }, + "modified": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string", + "title": "Modified string content" + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {}, + "title": "Modified object content" + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text" + }, + "text": { + "type": "string", + "maxLength": 100000, + "description": "The content text" + } + }, + "required": [ + "type", + "text" + ], + "additionalProperties": false, + "description": "Text", + "title": "Text" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "image" + }, + "url": { + "description": "A public URL of the image content. Either url or data must be provided.", + "type": "string", + "format": "uri" + }, + "data": { + "description": "Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue.", + "type": "string", + "maxLength": 5500000 + } + }, + "required": [ + "type" + ], + "additionalProperties": false, + "description": "Image", + "title": "Image" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "video" + }, + "url": { + "type": "string", + "format": "uri", + "description": "A public URL of the video content" + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false, + "description": "Video", + "title": "Video" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "audio" + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the audio content" + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false, + "description": "Audio", + "title": "Audio" + } + ], + "title": "Content leaf", + "type": "object" + }, + "title": "Modified nested object content" + } + ] + }, + { + "type": "null" + } + ], + "description": "The modified content, if any." + }, + "transcript": { + "description": "The transcribed text from audio content. Only present when audio moderation is used and transcript inclusion is enabled on the channel.", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "masked", + "unicode_cleaned", + "modified" + ], + "additionalProperties": false, + "description": "Potentially modified content." + }, + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Author ID in Moderation API" + }, + "external_id": { + "description": "The author's ID from your system", + "type": [ + "string", + "null" + ] + }, + "block": { + "anyOf": [ + { + "type": "object", + "properties": { + "until": { + "description": "The timestamp until which they are blocked if the author is suspended.", + "type": [ + "number", + "null" + ] + }, + "reason": { + "description": "The moderators reason why the author was blocked or suspended.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "Block or suspension details, if applicable. Null if the author is enabled." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "suspended", + "blocked" + ], + "description": "Current author status" + }, + "trust_level": { + "type": "object", + "properties": { + "level": { + "type": "number", + "description": "Author trust level (-1, 0, 1, 2, 3, or 4)" + }, + "manual": { + "type": "boolean", + "description": "True if the trust level was set manually by a moderator" + } + }, + "required": [ + "level", + "manual" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "block", + "status", + "trust_level" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "The author of the content if your account has authors enabled. Requires you to send authorId when submitting content." + }, + "evaluation": { + "type": "object", + "properties": { + "flagged": { + "type": "boolean", + "description": "Whether the content was flagged by any policy." + }, + "flag_probability": { + "type": "number", + "description": "The probability that the content should be flagged." + }, + "severity_score": { + "type": "number", + "description": "The severity score of the content. A higher score indicates more severe content." + }, + "unicode_spoofed": { + "description": "Whether the content was flagged for Unicode spoofing.", + "type": "boolean" + }, + "shadow_flagged": { + "description": "Whether the content would have been flagged by analyze-only policies (flag: false).", + "type": "boolean" + } + }, + "required": [ + "flagged", + "flag_probability", + "severity_score" + ], + "additionalProperties": false, + "description": "The evaluation of the content after running the channel policies." + }, + "recommendation": { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "review", + "allow", + "reject" + ], + "description": "The action to take based on the recommendation" + }, + "reason_codes": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string", + "enum": [ + "severity_reject", + "severity_review", + "author_block", + "dry_run", + "trusted_allow", + "untrusted_severity", + "rule_match", + "rule_default", + "rule_fallback", + "client_override", + "casebook_match" + ] + }, + { + "type": "string", + "pattern": "^rule:[\\s\\S]{0,}$" + } + ] + }, + "description": "Reason codes for the recommendation. Standard codes plus a `rule:` code identifying the rule that produced the action. Can be used to display a reason to the user." + }, + "matched_rules": { + "description": "Rules that matched during evaluation, if rules engine is active.", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "key", + "name" + ], + "additionalProperties": false + } + } + }, + "required": [ + "action", + "reason_codes" + ], + "additionalProperties": false, + "description": "The recommendation for the content based on the evaluation." + }, + "casebook": { + "anyOf": [ + { + "type": "object", + "properties": { + "verdict": { + "type": "string", + "enum": [ + "allow", + "reject" + ], + "description": "The ruling your past decisions point to for this content." + }, + "similarity": { + "type": "number", + "description": "How close the nearest matching case is, from 0 to 1. 1 means the content is identical to something you have already decided." + }, + "agreement": { + "type": "number", + "description": "How unanimous the matching cases are, from 0 to 1: the share of them that decided this way, ignoring how many there are. Always at least 0.8 when a ruling is returned \u2014 below that the casebook reports a disagreement instead of picking a side \u2014 so it tells you how clean the consensus was, and is not a threshold to re-apply yourself." + }, + "confidence": { + "type": "number", + "description": "How strongly the casebook holds this ruling, from 0 to 1: the agreement scaled by how much evidence backs it, so a handful of close, recent cases outweighs one distant one. Older cases count for less, halving in weight roughly every 180 days. This is the number to use in rules when you want a strength condition." + }, + "case_count": { + "type": "number", + "description": "How many of your past cases backed this ruling." + }, + "topic": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + } + }, + "required": [ + "id", + "label" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "The topic the closest matching case is filed under, or null when it has not been grouped into one yet." + } + }, + "required": [ + "verdict", + "similarity", + "agreement", + "confidence", + "case_count", + "topic" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "What your casebook \u2014 the record of your past moderation decisions \u2014 found for this content, or null when it had nothing close enough to say, when the matching cases disagreed, or when casebook lookups are not switched on for this channel. Reports what the casebook found; whether it decided the outcome is shown in `recommendation`, where a higher-priority rule may have settled the item first." + }, + "policies": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the classifier output." + }, + "type": { + "type": "string", + "const": "classifier" + }, + "probability": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "flagged": { + "type": "boolean" + }, + "flagged_fields": { + "description": "The keys of the flagged fields if submitting an object.", + "type": "array", + "items": { + "type": "string" + } + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "probability": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "flagged": { + "type": "boolean" + }, + "shadowFlagged": { + "type": "boolean" + } + }, + "required": [ + "id", + "probability", + "flagged" + ], + "additionalProperties": false + } + }, + "data": { + "description": "Optional structured data produced by the policy. For face detection: { count, faces: [{ confidence, gender, age }] }.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "id", + "type", + "probability", + "flagged" + ], + "additionalProperties": false, + "description": "Classifier policy.", + "title": "Classifier output" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "entity_matcher" + }, + "probability": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "flagged": { + "type": "boolean" + }, + "flagged_fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "matches": { + "type": "array", + "items": { + "type": "object", + "properties": { + "probability": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "match": { + "type": "string" + }, + "span": { + "minItems": 2, + "maxItems": 2, + "type": "array", + "items": { + "type": "integer" + } + }, + "reasons": { + "description": "Stable codes explaining why a URL was flagged (URL Risk only).", + "type": "array", + "items": { + "type": "string" + } + }, + "signals": { + "description": "Observable properties of a URL (URL Risk only). Absent for allow/block list matches.", + "type": "object", + "properties": { + "brand_impersonation": { + "anyOf": [ + { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "method": { + "type": "string", + "enum": [ + "registered_domain_token", + "subdomain_token" + ] + } + }, + "required": [ + "brand", + "method" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "has_suspicious_characters": { + "type": "boolean" + }, + "is_link_shortener": { + "type": "boolean" + }, + "domain_age_days": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "has_email_setup": { + "type": [ + "boolean", + "null" + ] + }, + "redirect_count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "final_url": { + "type": [ + "string", + "null" + ] + }, + "bot_protection": { + "type": [ + "boolean", + "null" + ] + }, + "is_reported": { + "type": "boolean" + } + }, + "required": [ + "brand_impersonation", + "has_suspicious_characters", + "is_link_shortener", + "domain_age_days", + "has_email_setup", + "redirect_count", + "final_url", + "bot_protection", + "is_reported" + ], + "additionalProperties": false + }, + "entity_type": { + "description": "Sub-type of the entity match \u2014 e.g. the NER key (email, phone, name, \u2026) for PII matches. Absent for URL Risk and wordlist matches where the type is already encoded in the parent label.", + "type": "string" + } + }, + "required": [ + "probability", + "match", + "span" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "type", + "probability", + "flagged", + "matches" + ], + "additionalProperties": false, + "description": "Entity matcher policy.", + "title": "Entity matcher output" + } + ], + "description": "Policy output schema.", + "type": "object" + }, + "description": "Results of all policies in the channel. Sorted by highest probability." + }, + "insights": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "const": "sentiment" + }, + "type": { + "type": "string", + "const": "insight" + }, + "probability": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "value": { + "anyOf": [ + { + "type": "string", + "enum": [ + "positive", + "neutral", + "negative" + ] + }, + { + "type": "null" + } + ] + }, + "scores": { + "description": "Positive and negative scored independently: mixed content scores high on both. Present whenever `value` is set.", + "type": "object", + "properties": { + "positive": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "How positive the content is, 0 to 1." + }, + "negative": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "How negative the content is, 0 to 1." + } + }, + "required": [ + "positive", + "negative" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "type", + "probability", + "value" + ], + "additionalProperties": false, + "description": "Sentiment insight", + "title": "Sentiment insight" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "const": "language" + }, + "type": { + "type": "string", + "const": "insight" + }, + "probability": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "value": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "type", + "probability", + "value" + ], + "additionalProperties": false, + "description": "Language insight", + "title": "Language insight" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "const": "curiosity" + }, + "type": { + "type": "string", + "const": "insight" + }, + "probability": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "value": { + "description": "Whether the content shows curiosity.", + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "id", + "type", + "probability", + "value" + ], + "additionalProperties": false, + "description": "Curiosity insight. Attempts to clarify or ask follow-up questions to better understand another person or idea.", + "title": "Curiosity insight" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "const": "respect" + }, + "type": { + "type": "string", + "const": "insight" + }, + "probability": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "value": { + "description": "Whether the content shows respect.", + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "id", + "type", + "probability", + "value" + ], + "additionalProperties": false, + "description": "Respect insight. Shows deference or appreciation to others, or acknowledges the validity of another person.", + "title": "Respect insight" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "const": "personal_story" + }, + "type": { + "type": "string", + "const": "insight" + }, + "probability": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "value": { + "description": "Whether the content shows personal story.", + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "id", + "type", + "probability", + "value" + ], + "additionalProperties": false, + "description": "Personal story insight. Includes a personal experience or story as a source of support for the statements made in the comment.", + "title": "Personal story insight" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "const": "compassion" + }, + "type": { + "type": "string", + "const": "insight" + }, + "probability": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "value": { + "description": "Whether the content shows compassion.", + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "id", + "type", + "probability", + "value" + ], + "additionalProperties": false, + "description": "Compassion insight. Identifies with or shows concern, empathy, or support for the feelings/emotions of others.", + "title": "Compassion insight" + } + ], + "type": "object" + }, + "description": "Results of all insights enabled in the channel." + }, + "meta": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "success", + "partial_success" + ] + }, + "timestamp": { + "type": "number" + }, + "channel_key": { + "type": "string", + "description": "The unique key of the channel where the content was handled. Either the channel provided by you or automatically routed." + }, + "usage": { + "type": "number" + }, + "processing_time": { + "type": "string" + } + }, + "required": [ + "status", + "timestamp", + "channel_key", + "usage" + ], + "additionalProperties": false, + "description": "Metadata about the moderation request" + }, + "errors": { + "description": "Policies that had errors", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "id", + "message" + ], + "additionalProperties": false + } + } + }, + "required": [ + "content", + "author", + "evaluation", + "recommendation", + "casebook", + "policies", + "insights", + "meta" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "content", + "x-speakeasy-name-override": "submit", + "x-speakeasy-usage-example": true, + "x-speakeasy-mcp": { + "title": "Submit content", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/projects": { + "get": { + "operationId": "listProjects", + "summary": "List projects", + "description": "List the projects in the organization. The list is paginated. Needs the `projects:read` permission.", + "tags": [ + "Projects" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "page", + "schema": { + "default": 1, + "description": "Page number, starting at 1.", + "type": "integer", + "minimum": 1, + "maximum": 100000 + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "default": 20, + "description": "Number of items per page. Maximum 100.", + "type": "integer", + "minimum": 1, + "maximum": 100 + } + } + ], + "responses": { + "200": { + "description": "Projects retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Project" + }, + "description": "The items on this page." + }, + "pagination": { + "$ref": "#/components/schemas/Pagination" + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "projects", + "x-speakeasy-name-override": "list", + "x-speakeasy-mcp": { + "title": "List projects", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + }, + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "pageSize", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data", + "numPages": "$.pagination.totalPages" + } + } + }, + "post": { + "operationId": "createProject", + "summary": "Create a project", + "description": "Create a project with one channel, a review queue inbox and a secret API key. Give a domain or context and the project suggests policies for the platform. Needs the `projects:write` permission and a key that reaches all projects.", + "tags": [ + "Projects" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 35, + "description": "The project's name." + }, + "domain": { + "description": "The website or app the project moderates content for. Used to write the context when none is given.", + "type": "string", + "maxLength": 255 + }, + "context": { + "description": "What the platform is and who uses it.", + "type": "string", + "maxLength": 2000 + }, + "brief": { + "description": "What you moderate, the problems you see and your guidelines.", + "type": "string", + "maxLength": 2000 + }, + "usedByMinors": { + "default": false, + "description": "Whether children use the platform.", + "type": "boolean" + } + }, + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Project created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectWithKey" + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "projects", + "x-speakeasy-name-override": "create", + "x-speakeasy-mcp": { + "title": "Create a project", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/projects/{id}": { + "get": { + "operationId": "getProject", + "summary": "Get a project", + "description": "Get a project by ID. Needs the `projects:read` permission.", + "tags": [ + "Projects" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the project." + }, + "required": true, + "description": "The ID of the project." + } + ], + "responses": { + "200": { + "description": "Project retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "projects", + "x-speakeasy-name-override": "retrieve", + "x-speakeasy-mcp": { + "title": "Get a project", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + }, + "put": { + "operationId": "updateProject", + "summary": "Update a project", + "description": "Update a project. Fields you leave out keep their value. Needs the `projects:write` permission.", + "tags": [ + "Projects" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the project to update." + }, + "required": true, + "description": "The ID of the project to update." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "The project's name.", + "type": "string", + "minLength": 1, + "maxLength": 75 + }, + "description": { + "description": "The project's description.", + "anyOf": [ + { + "type": "string", + "maxLength": 500 + }, + { + "type": "null" + } + ] + }, + "domain": { + "description": "The website or app the project moderates content for. Setting it on a project without context writes one.", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "context": { + "description": "What the platform is and who uses it.", + "anyOf": [ + { + "type": "string", + "maxLength": 2000 + }, + { + "type": "null" + } + ] + }, + "globalFlaggingMode": { + "description": "`ACTIVE` flags content. `DRY_RUN` evaluates without flagging.", + "type": "string", + "enum": [ + "DRY_RUN", + "ACTIVE" + ] + }, + "enableRequestLogging": { + "description": "Whether moderated content is stored and shown in the dashboard.", + "type": "boolean" + }, + "casebookEnabled": { + "description": "Whether review queue decisions are recorded in the casebook.", + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Project updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "projects", + "x-speakeasy-name-override": "update", + "x-speakeasy-mcp": { + "title": "Update a project", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + }, + "delete": { + "operationId": "deleteProject", + "summary": "Delete a project", + "description": "Delete a project with everything in it: channels, queues, API keys and stored content. This can't be undone. The project's API keys stop working at once. Needs the `projects:write` permission.", + "tags": [ + "Projects" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the project." + }, + "required": true, + "description": "The ID of the project." + } + ], + "responses": { + "200": { + "description": "Project deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deleted": { + "type": "boolean", + "description": "Whether the project was deleted." + }, + "id": { + "type": "string", + "description": "The ID of the project." + } + }, + "required": [ + "deleted", + "id" + ], + "additionalProperties": false + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "projects", + "x-speakeasy-name-override": "delete", + "x-speakeasy-mcp": { + "title": "Delete a project", + "scopes": [ + "destructive" + ], + "readOnlyHint": false, + "destructiveHint": true + } + } + }, + "/projects/{id}/duplicate": { + "post": { + "operationId": "duplicateProject", + "summary": "Duplicate a project", + "description": "Copy a project's configuration into a new project: its settings, every channel with its policies, rules and wordlists, its moderation actions and its review queues. The copy gets its own secret API key. Webhooks, integrations, API keys and content are not copied. Needs the `projects:write` permission and a key that reaches all projects.", + "tags": [ + "Projects" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the project to copy." + }, + "required": true, + "description": "The ID of the project to copy." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Name of the copy. Defaults to the original name with \"(copy)\".", + "type": "string", + "minLength": 1, + "maxLength": 75 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Project duplicated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectWithKey" + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "projects", + "x-speakeasy-name-override": "duplicate", + "x-speakeasy-mcp": { + "title": "Duplicate a project", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/projects/{projectId}/channels": { + "get": { + "operationId": "listChannels", + "summary": "List channels", + "description": "List the channels in a project. The list is paginated. Needs the `channels:read` permission.", + "tags": [ + "Channels" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "projectId", + "schema": { + "type": "string", + "description": "The ID of the project." + }, + "required": true, + "description": "The ID of the project." + }, + { + "in": "query", + "name": "page", + "schema": { + "default": 1, + "description": "Page number, starting at 1.", + "type": "integer", + "minimum": 1, + "maximum": 100000 + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "default": 20, + "description": "Number of items per page. Maximum 100.", + "type": "integer", + "minimum": 1, + "maximum": 100 + } + } + ], + "responses": { + "200": { + "description": "Channels retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Channel" + }, + "description": "The items on this page." + }, + "pagination": { + "$ref": "#/components/schemas/Pagination" + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "channels", + "x-speakeasy-name-override": "list", + "x-speakeasy-mcp": { + "title": "List channels", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + }, + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "pageSize", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data", + "numPages": "$.pagination.totalPages" + } + } + }, + "post": { + "operationId": "createChannel", + "summary": "Create a channel", + "description": "Create a channel in a project, with the default rules. The project's first channel becomes its default. Needs the `channels:write` permission.", + "tags": [ + "Channels" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "projectId", + "schema": { + "type": "string", + "description": "The ID of the project to add the channel to." + }, + "required": true, + "description": "The ID of the project to add the channel to." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100, + "description": "The channel's name." + }, + "key": { + "description": "The key you pass as `channel` when you moderate content. Defaults to the name in lowercase with dashes. Must be unique in the project.", + "type": "string", + "minLength": 1, + "maxLength": 100, + "pattern": "^[A-Za-z0-9_-]+$" + }, + "description": { + "description": "The channel's description.", + "type": "string", + "maxLength": 500 + }, + "contentType": { + "type": "string", + "enum": [ + "profile", + "message", + "post", + "comment", + "event", + "product", + "review", + "voice", + "other" + ], + "description": "The kind of content the channel moderates." + } + }, + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Channel created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Channel" + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "channels", + "x-speakeasy-name-override": "create", + "x-speakeasy-mcp": { + "title": "Create a channel", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/channels/{id}": { + "get": { + "operationId": "getChannel", + "summary": "Get a channel", + "description": "Get a channel by ID. Needs the `channels:read` permission.", + "tags": [ + "Channels" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the channel." + }, + "required": true, + "description": "The ID of the channel." + } + ], + "responses": { + "200": { + "description": "Channel retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Channel" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "channels", + "x-speakeasy-name-override": "retrieve", + "x-speakeasy-mcp": { + "title": "Get a channel", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + }, + "put": { + "operationId": "updateChannel", + "summary": "Update a channel", + "description": "Update a channel. Fields you leave out keep their value. Needs the `channels:write` permission.", + "tags": [ + "Channels" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the channel to update." + }, + "required": true, + "description": "The ID of the channel to update." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "The channel's name.", + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "key": { + "description": "The key you pass as `channel` when you moderate content. Changing it breaks integrations that send the old key.", + "type": "string", + "minLength": 1, + "maxLength": 100, + "pattern": "^[A-Za-z0-9_-]+$" + }, + "description": { + "description": "The channel's description.", + "anyOf": [ + { + "type": "string", + "maxLength": 500 + }, + { + "type": "null" + } + ] + }, + "contentType": { + "type": "string", + "enum": [ + "profile", + "message", + "post", + "comment", + "event", + "product", + "review", + "voice", + "other" + ], + "description": "The kind of content the channel moderates." + }, + "flaggingMode": { + "type": "string", + "enum": [ + "DRY_RUN", + "ACTIVE" + ], + "description": "`ACTIVE` flags content. `DRY_RUN` evaluates content without flagging it." + }, + "contextEnabled": { + "type": "boolean", + "description": "Whether earlier messages in the conversation are read when moderating a message." + }, + "enableImageModeration": { + "type": "boolean", + "description": "Whether images are moderated." + }, + "enableVideoModeration": { + "type": "boolean", + "description": "Whether videos are moderated." + }, + "enableAudioModeration": { + "type": "boolean", + "description": "Whether audio is moderated." + }, + "enableVoiceModeration": { + "type": "boolean", + "description": "Whether real-time voice streams are moderated." + }, + "includeTranscriptInResponse": { + "type": "boolean", + "description": "Whether audio and video transcripts are returned in responses." + }, + "transcriptionQuality": { + "type": "string", + "enum": [ + "SPEED", + "BALANCED", + "ACCURACY" + ], + "description": "Trade-off between transcription speed and accuracy." + }, + "unicodeSpoofDetectionEnabled": { + "type": "boolean", + "description": "Whether look-alike Unicode characters are normalized before moderation." + }, + "frameCaptureInterval": { + "type": "number", + "minimum": 0.1, + "maximum": 60, + "description": "Seconds between frames captured from a video." + }, + "maxFramesPerVideo": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "description": "The most frames moderated per video." + }, + "spreadFrames": { + "type": "boolean", + "description": "Whether frames are spread evenly across the whole video." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Channel updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Channel" + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "channels", + "x-speakeasy-name-override": "update", + "x-speakeasy-mcp": { + "title": "Update a channel", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + }, + "delete": { + "operationId": "deleteChannel", + "summary": "Delete a channel", + "description": "Delete a channel. Its key is freed for a new channel. When it was the default, the oldest remaining channel becomes the default. A channel that still moderates a Slack workspace must be disconnected first. Needs the `channels:write` permission.", + "tags": [ + "Channels" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the channel." + }, + "required": true, + "description": "The ID of the channel." + } + ], + "responses": { + "200": { + "description": "Channel deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deleted": { + "type": "boolean", + "description": "Whether the channel was deleted." + }, + "id": { + "type": "string", + "description": "The ID of the channel." + } + }, + "required": [ + "deleted", + "id" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "channels", + "x-speakeasy-name-override": "delete", + "x-speakeasy-mcp": { + "title": "Delete a channel", + "scopes": [ + "destructive" + ], + "readOnlyHint": false, + "destructiveHint": true + } + } + }, + "/channels/{id}/duplicate": { + "post": { + "operationId": "duplicateChannel", + "summary": "Duplicate a channel", + "description": "Copy a channel in its project, with every setting, policy, rule and wordlist. Integrations (Discord, Slack, WordPress) are not copied. Needs the `channels:write` permission.", + "tags": [ + "Channels" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the channel to copy." + }, + "required": true, + "description": "The ID of the channel to copy." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Name of the copy. Defaults to the original name with \"(copy)\".", + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "key": { + "description": "Key of the copy. Defaults to the original key with a timestamp. Must be unique in the project.", + "type": "string", + "minLength": 1, + "maxLength": 100, + "pattern": "^[A-Za-z0-9_-]+$" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Channel duplicated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Channel" + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "channels", + "x-speakeasy-name-override": "duplicate", + "x-speakeasy-mcp": { + "title": "Duplicate a channel", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/stream": { + "get": { + "tags": [ + "Voice" + ], + "summary": "Real-time voice moderation stream (WebSocket)", + "description": "Open a WebSocket to moderate live voice/call audio in real time. Speech is transcribed and each finalized utterance is moderated by your enabled text policies; you receive a verdict per utterance as it's spoken.\n\n**This is a WebSocket upgrade, not a regular HTTP call.** The request body below documents the frames you *send* over the socket; the `101` response documents the events you *receive*.\n\n- **Auth:** `Authorization: Bearer ` on the upgrade. A missing/invalid key closes `4401`; voice not enabled on the plan/channel closes `4403`.\n- **Subprotocol:** request `moderationapi.v1`.\n- **Flow:** send one `start` frame, then `media` frames as audio arrives, then `stop` (or disconnect). You receive `session.started`, `utterance.final` per utterance, optional `utterance.partial`/`warning`, and `session.ended`.\n- **Close codes:** `1000` normal \u00b7 `1011` server error \u00b7 `4400` bad request \u00b7 `4401` auth failed \u00b7 `4403` voice not enabled \u00b7 `4429` concurrency limit.\n\nSee the [Real-time voice guide](https://docs.moderationapi.com/content-moderation/real-time-voice) for the full walkthrough and code examples.", + "servers": [ + { + "url": "wss://voice.moderationapi.com/v1", + "description": "Voice streaming gateway" + } + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "required": true, + "description": "Bearer ", + "schema": { + "type": "string" + } + }, + { + "name": "Sec-WebSocket-Protocol", + "in": "header", + "required": true, + "description": "Requested subprotocol.", + "schema": { + "type": "string", + "enum": [ + "moderationapi.v1" + ] + } + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "x-speakeasy-name-override": "projectId" + } + ], + "requestBody": { + "description": "Frames sent by the client over the socket (not an HTTP body).", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/VoiceStartFrame" + }, + { + "$ref": "#/components/schemas/VoiceMediaFrame" + }, + { + "$ref": "#/components/schemas/VoiceStopFrame" + } + ], + "discriminator": { + "propertyName": "event" + } + } + } + } + }, + "responses": { + "101": { + "description": "Switching Protocols. The server then streams event frames over the socket; the key one is `utterance.final`.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/VoiceSessionStarted" + }, + { + "$ref": "#/components/schemas/VoiceUtteranceFinal" + }, + { + "$ref": "#/components/schemas/VoiceSessionEnded" + } + ], + "discriminator": { + "propertyName": "event" + } + } + } + } + } + }, + "x-webSocket": true, + "operationId": "streamVoice", + "x-speakeasy-ignore": true + } + } + }, + "components": { + "schemas": { + "PublicAuthor": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Author ID in Moderation API" + }, + "external_id": { + "description": "The author's ID from your system", + "type": [ + "string", + "null" + ] + }, + "profile_picture": { + "description": "URL of the author's profile picture", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "external_link": { + "description": "URL of the author's external profile", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "name": { + "description": "Author name or identifier", + "type": [ + "string", + "null" + ] + }, + "email": { + "description": "Author email address", + "anyOf": [ + { + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, + { + "type": "null" + } + ] + }, + "company": { + "description": "The author's company or organization", + "type": [ + "string", + "null" + ] + }, + "first_seen": { + "type": "number", + "description": "Timestamp when author first appeared" + }, + "last_seen": { + "type": "number", + "description": "Timestamp of last activity" + }, + "last_incident": { + "description": "Timestamp of last incident", + "type": [ + "number", + "null" + ] + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "suspended", + "blocked" + ], + "description": "Current author status" + }, + "trust_level": { + "type": "object", + "properties": { + "level": { + "type": "number", + "description": "Author trust level (-1, 0, 1, 2, 3, or 4)" + }, + "manual": { + "type": "boolean", + "description": "True if the trust level was set manually by a moderator" + } + }, + "required": [ + "level", + "manual" + ], + "additionalProperties": false + }, + "block": { + "anyOf": [ + { + "type": "object", + "properties": { + "until": { + "description": "The timestamp until which they are blocked if the author is suspended.", + "type": [ + "number", + "null" + ] + }, + "reason": { + "description": "The moderators reason why the author was blocked or suspended.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "Block or suspension details, if applicable. Null if the author is enabled." + }, + "risk_evaluation": { + "anyOf": [ + { + "type": "object", + "properties": { + "risk_level": { + "description": "Calculated risk level based on more than 10 behavioral signals.", + "anyOf": [ + { + "type": "number", + "minimum": 0, + "maximum": 100 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "Risk assessment details, if available." + }, + "metrics": { + "type": "object", + "properties": { + "total_content": { + "type": "number", + "description": "Total pieces of content" + }, + "flagged_content": { + "type": "number", + "description": "Number of flagged content pieces" + }, + "average_sentiment": { + "description": "Average sentiment score of content (-1 to 1). Requires a sentiment model in your project.", + "type": [ + "number", + "null" + ] + } + }, + "required": [ + "total_content", + "flagged_content" + ], + "additionalProperties": false + }, + "metadata": { + "type": "object", + "properties": { + "email_verified": { + "description": "Whether the author's email is verified", + "type": [ + "boolean", + "null" + ] + }, + "phone_verified": { + "description": "Whether the author's phone number is verified", + "type": [ + "boolean", + "null" + ] + }, + "identity_verified": { + "description": "Whether the author's identity is verified", + "type": [ + "boolean", + "null" + ] + }, + "is_paying_customer": { + "description": "Whether the author is a paying customer", + "type": [ + "boolean", + "null" + ] + } + }, + "additionalProperties": {}, + "description": "Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process." + } + }, + "required": [ + "id", + "first_seen", + "last_seen", + "status", + "trust_level", + "block", + "risk_evaluation", + "metrics", + "metadata" + ], + "additionalProperties": false + }, + "Project": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the project." + }, + "name": { + "type": "string", + "description": "The project's name." + }, + "description": { + "description": "The project's description.", + "type": [ + "string", + "null" + ] + }, + "domain": { + "description": "The website or app the project moderates content for.", + "type": [ + "string", + "null" + ] + }, + "context": { + "description": "What the platform is and who uses it. AI moderation reads it to judge content in context.", + "type": [ + "string", + "null" + ] + }, + "globalFlaggingMode": { + "type": "string", + "enum": [ + "DRY_RUN", + "ACTIVE" + ], + "description": "`ACTIVE` flags content. `DRY_RUN` evaluates content without flagging it, for testing a setup." + }, + "enableRequestLogging": { + "type": "boolean", + "description": "Whether moderated content is stored and shown in the dashboard." + }, + "casebookEnabled": { + "type": "boolean", + "description": "Whether decisions made in the review queue are recorded in the project's casebook." + }, + "createdAt": { + "description": "When the project was created.", + "type": "string" + }, + "updatedAt": { + "description": "When the project was last changed.", + "type": "string" + } + }, + "required": [ + "id", + "name", + "description", + "domain", + "context", + "globalFlaggingMode", + "enableRequestLogging", + "casebookEnabled", + "createdAt", + "updatedAt" + ], + "additionalProperties": false + }, + "ProjectWithKey": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the project." + }, + "name": { + "type": "string", + "description": "The project's name." + }, + "description": { + "description": "The project's description.", + "type": [ + "string", + "null" + ] + }, + "domain": { + "description": "The website or app the project moderates content for.", + "type": [ + "string", + "null" + ] + }, + "context": { + "description": "What the platform is and who uses it. AI moderation reads it to judge content in context.", + "type": [ + "string", + "null" + ] + }, + "globalFlaggingMode": { + "type": "string", + "enum": [ + "DRY_RUN", + "ACTIVE" + ], + "description": "`ACTIVE` flags content. `DRY_RUN` evaluates content without flagging it, for testing a setup." + }, + "enableRequestLogging": { + "type": "boolean", + "description": "Whether moderated content is stored and shown in the dashboard." + }, + "casebookEnabled": { + "type": "boolean", + "description": "Whether decisions made in the review queue are recorded in the project's casebook." + }, + "createdAt": { + "description": "When the project was created.", + "type": "string" + }, + "updatedAt": { + "description": "When the project was last changed.", + "type": "string" + }, + "secretKey": { + "type": "string", + "description": "A secret API key for the new project. Use it to moderate content in this project. It is also shown in the project's settings." + } + }, + "required": [ + "id", + "name", + "description", + "domain", + "context", + "globalFlaggingMode", + "enableRequestLogging", + "casebookEnabled", + "createdAt", + "updatedAt", + "secretKey" + ], + "additionalProperties": false + }, + "Channel": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the channel." + }, + "projectId": { + "type": "string", + "description": "The ID of the project the channel is in." + }, + "key": { + "type": "string", + "description": "The key you pass as `channel` when you moderate content. Unique in the project." + }, + "name": { + "type": "string", + "description": "The channel's name." + }, + "description": { + "description": "The channel's description.", + "type": [ + "string", + "null" + ] + }, + "isDefault": { + "type": "boolean", + "description": "Whether requests that name no channel use this one. Each project has one default channel." + }, + "contentType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "profile", + "message", + "post", + "comment", + "event", + "product", + "review", + "voice", + "other" + ], + "description": "The kind of content the channel moderates." + }, + { + "type": "null" + } + ] + }, + "flaggingMode": { + "type": "string", + "enum": [ + "DRY_RUN", + "ACTIVE" + ], + "description": "`ACTIVE` flags content. `DRY_RUN` evaluates content without flagging it." + }, + "contextEnabled": { + "type": "boolean", + "description": "Whether earlier messages in the conversation are read when moderating a message." + }, + "enableImageModeration": { + "type": "boolean", + "description": "Whether images are moderated." + }, + "enableVideoModeration": { + "type": "boolean", + "description": "Whether videos are moderated." + }, + "enableAudioModeration": { + "type": "boolean", + "description": "Whether audio is moderated." + }, + "enableVoiceModeration": { + "type": "boolean", + "description": "Whether real-time voice streams are moderated." + }, + "includeTranscriptInResponse": { + "type": "boolean", + "description": "Whether audio and video transcripts are returned in responses." + }, + "transcriptionQuality": { + "type": "string", + "enum": [ + "SPEED", + "BALANCED", + "ACCURACY" + ], + "description": "Trade-off between transcription speed and accuracy." + }, + "unicodeSpoofDetectionEnabled": { + "type": "boolean", + "description": "Whether look-alike Unicode characters are normalized before moderation." + }, + "frameCaptureInterval": { + "type": "number", + "minimum": 0.1, + "maximum": 60, + "description": "Seconds between frames captured from a video." + }, + "maxFramesPerVideo": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "description": "The most frames moderated per video." + }, + "spreadFrames": { + "type": "boolean", + "description": "Whether frames are spread evenly across the whole video." + }, + "createdAt": { + "description": "When the channel was created.", + "type": "string" + }, + "updatedAt": { + "description": "When the channel was last changed.", + "type": "string" + } + }, + "required": [ + "id", + "projectId", + "key", + "name", + "description", + "isDefault", + "contentType", + "flaggingMode", + "contextEnabled", + "enableImageModeration", + "enableVideoModeration", + "enableAudioModeration", + "enableVoiceModeration", + "includeTranscriptInResponse", + "transcriptionQuality", + "unicodeSpoofDetectionEnabled", + "frameCaptureInterval", + "maxFramesPerVideo", + "spreadFrames", + "createdAt", + "updatedAt" + ], + "additionalProperties": false + }, + "AuthorBlockedEvent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stable event ID. Use this to dedupe retries.", + "example": "evt_clxxx..." + }, + "type": { + "type": "string", + "const": "author.blocked", + "description": "The event type.", + "example": "author.blocked" + }, + "api_version": { + "type": "string", + "const": "v2", + "example": "v2" + }, + "created": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the event was emitted." + }, + "data": { + "type": "object", + "properties": { + "object": { + "$ref": "#/components/schemas/PublicActionPerformedAuthor" + } + }, + "required": [ + "object" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "type", + "api_version", + "created", + "data" + ], + "additionalProperties": false, + "example": { + "id": "evt_clx9f2k0a0001abcd1234", + "type": "author.blocked", + "api_version": "v2", + "created": "2026-05-08T12:34:56.789Z", + "data": { + "object": { + "id": "act_block_123", + "key": "block", + "name": "Block author", + "value": null, + "created_at": "2026-05-08T12:38:00.000Z", + "author": { + "id": "auth_555", + "external_id": "user-555", + "profile_picture": null, + "external_link": null, + "name": "Jane Doe", + "email": "jane@example.com", + "company": null, + "first_seen": 1746792000000, + "last_seen": 1746792000000, + "last_incident": null, + "status": "blocked", + "trust_level": { + "level": -1, + "manual": false + }, + "block": { + "until": null, + "reason": "Repeated spam violations" + }, + "risk_evaluation": null, + "metrics": { + "total_content": 42, + "flagged_content": 7, + "average_sentiment": -0.1 + }, + "metadata": {} + } + } + } + } + }, + "PublicActionPerformedAuthor": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Moderation action ID" + }, + "key": { + "description": "Customer-defined key identifying this action", + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Display name of the action", + "type": [ + "string", + "null" + ] + }, + "value": { + "description": "The value passed to the action when it ran", + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the action was performed" + }, + "queue": { + "description": "The queue the item belongs to, if any", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "additionalProperties": false + }, + "author": { + "description": "The author the action was performed on", + "$ref": "#/components/schemas/PublicAuthor" + } + }, + "required": [ + "id", + "key", + "name", + "value", + "created_at", + "author" + ], + "additionalProperties": false + }, + "AuthorUnblockedEvent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stable event ID. Use this to dedupe retries.", + "example": "evt_clxxx..." + }, + "type": { + "type": "string", + "const": "author.unblocked", + "description": "The event type.", + "example": "author.unblocked" + }, + "api_version": { + "type": "string", + "const": "v2", + "example": "v2" + }, + "created": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the event was emitted." + }, + "data": { + "type": "object", + "properties": { + "object": { + "$ref": "#/components/schemas/PublicActionPerformedAuthor" + } + }, + "required": [ + "object" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "type", + "api_version", + "created", + "data" + ], + "additionalProperties": false, + "example": { + "id": "evt_clx9f2k0a0001abcd1234", + "type": "author.unblocked", + "api_version": "v2", + "created": "2026-05-08T12:34:56.789Z", + "data": { + "object": { + "id": "act_unblock_789", + "key": "auto_unblock", + "name": "Auto unblock", + "value": null, + "created_at": "2026-05-09T12:39:00.000Z", + "author": { + "id": "auth_555", + "external_id": "user-555", + "profile_picture": null, + "external_link": null, + "name": "Jane Doe", + "email": "jane@example.com", + "company": null, + "first_seen": 1746792000000, + "last_seen": 1746792000000, + "last_incident": null, + "status": "enabled", + "trust_level": { + "level": 0, + "manual": false + }, + "block": null, + "risk_evaluation": null, + "metrics": { + "total_content": 42, + "flagged_content": 7, + "average_sentiment": -0.1 + }, + "metadata": {} + } + } + } + } + }, + "AuthorSuspendedEvent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stable event ID. Use this to dedupe retries.", + "example": "evt_clxxx..." + }, + "type": { + "type": "string", + "const": "author.suspended", + "description": "The event type.", + "example": "author.suspended" + }, + "api_version": { + "type": "string", + "const": "v2", + "example": "v2" + }, + "created": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the event was emitted." + }, + "data": { + "type": "object", + "properties": { + "object": { + "$ref": "#/components/schemas/PublicActionPerformedAuthor" + } + }, + "required": [ + "object" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "type", + "api_version", + "created", + "data" + ], + "additionalProperties": false, + "example": { + "id": "evt_clx9f2k0a0001abcd1234", + "type": "author.suspended", + "api_version": "v2", + "created": "2026-05-08T12:34:56.789Z", + "data": { + "object": { + "id": "act_suspend_456", + "key": "suspend_24h", + "name": "Suspend (24h)", + "value": "24h", + "created_at": "2026-05-08T12:39:00.000Z", + "author": { + "id": "auth_555", + "external_id": "user-555", + "profile_picture": null, + "external_link": null, + "name": "Jane Doe", + "email": "jane@example.com", + "company": null, + "first_seen": 1746792000000, + "last_seen": 1746792000000, + "last_incident": null, + "status": "suspended", + "trust_level": { + "level": 0, + "manual": false + }, + "block": { + "until": 1746878400000, + "reason": "Cooling-off period" + }, + "risk_evaluation": null, + "metrics": { + "total_content": 42, + "flagged_content": 7, + "average_sentiment": -0.1 + }, + "metadata": {} + } + } + } + } + }, + "AuthorUpdatedEvent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stable event ID. Use this to dedupe retries.", + "example": "evt_clxxx..." + }, + "type": { + "type": "string", + "const": "author.updated", + "description": "The event type.", + "example": "author.updated" + }, + "api_version": { + "type": "string", + "const": "v2", + "example": "v2" + }, + "created": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the event was emitted." + }, + "data": { + "type": "object", + "properties": { + "object": { + "$ref": "#/components/schemas/PublicAuthor" + } + }, + "required": [ + "object" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "type", + "api_version", + "created", + "data" + ], + "additionalProperties": false, + "example": { + "id": "evt_clx9f2k0a0001abcd1234", + "type": "author.updated", + "api_version": "v2", + "created": "2026-05-08T12:34:56.789Z", + "data": { + "object": { + "id": "auth_555", + "external_id": "user-555", + "profile_picture": null, + "external_link": null, + "name": "Jane Doe", + "email": "jane@example.com", + "company": null, + "first_seen": 1746792000000, + "last_seen": 1746792000000, + "last_incident": null, + "status": "enabled", + "trust_level": { + "level": 1, + "manual": false + }, + "block": null, + "risk_evaluation": null, + "metrics": { + "total_content": 42, + "flagged_content": 7, + "average_sentiment": -0.1 + }, + "metadata": {} + } + } + } + }, + "AuthorTrustLevelChangedEvent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stable event ID. Use this to dedupe retries.", + "example": "evt_clxxx..." + }, + "type": { + "type": "string", + "const": "author.trust_level_changed", + "description": "The event type.", + "example": "author.trust_level_changed" + }, + "api_version": { + "type": "string", + "const": "v2", + "example": "v2" + }, + "created": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the event was emitted." + }, + "data": { + "type": "object", + "properties": { + "object": { + "$ref": "#/components/schemas/PublicAuthor" + } + }, + "required": [ + "object" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "type", + "api_version", + "created", + "data" + ], + "additionalProperties": false, + "example": { + "id": "evt_clx9f2k0a0001abcd1234", + "type": "author.trust_level_changed", + "api_version": "v2", + "created": "2026-05-08T12:34:56.789Z", + "data": { + "object": { + "id": "auth_555", + "external_id": "user-555", + "profile_picture": null, + "external_link": null, + "name": "Jane Doe", + "email": "jane@example.com", + "company": null, + "first_seen": 1746792000000, + "last_seen": 1746792000000, + "last_incident": null, + "status": "enabled", + "trust_level": { + "level": 3, + "manual": true + }, + "block": null, + "risk_evaluation": null, + "metrics": { + "total_content": 42, + "flagged_content": 7, + "average_sentiment": -0.1 + }, + "metadata": {} + } + } + } + }, + "AuthorActionEvent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stable event ID. Use this to dedupe retries.", + "example": "evt_clxxx..." + }, + "type": { + "type": "string", + "const": "author.action", + "description": "The event type.", + "example": "author.action" + }, + "api_version": { + "type": "string", + "const": "v2", + "example": "v2" + }, + "created": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the event was emitted." + }, + "data": { + "type": "object", + "properties": { + "object": { + "$ref": "#/components/schemas/PublicActionPerformedAuthor" + } + }, + "required": [ + "object" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "type", + "api_version", + "created", + "data" + ], + "additionalProperties": false, + "example": { + "id": "evt_clx9f2k0a0001abcd1234", + "type": "author.action", + "api_version": "v2", + "created": "2026-05-08T12:34:56.789Z", + "data": { + "object": { + "id": "act_warn_111", + "key": "send_warning", + "name": "Send warning email", + "value": "violation_notice", + "created_at": "2026-05-08T12:42:00.000Z", + "author": { + "id": "auth_555", + "external_id": "user-555", + "profile_picture": null, + "external_link": null, + "name": "Jane Doe", + "email": "jane@example.com", + "company": null, + "first_seen": 1746792000000, + "last_seen": 1746792000000, + "last_incident": null, + "status": "enabled", + "trust_level": { + "level": 1, + "manual": false + }, + "block": null, + "risk_evaluation": null, + "metrics": { + "total_content": 42, + "flagged_content": 7, + "average_sentiment": -0.1 + }, + "metadata": {} + } + } + } + } + }, + "QueueItemCompletedEvent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stable event ID. Use this to dedupe retries.", + "example": "evt_clxxx..." + }, + "type": { + "type": "string", + "const": "queue_item.resolved", + "description": "The event type.", + "example": "queue_item.resolved" + }, + "api_version": { + "type": "string", + "const": "v2", + "example": "v2" + }, + "created": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the event was emitted." + }, + "data": { + "type": "object", + "properties": { + "object": { + "$ref": "#/components/schemas/PublicQueueItemEvent" + } + }, + "required": [ + "object" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "type", + "api_version", + "created", + "data" + ], + "additionalProperties": false, + "example": { + "id": "evt_clx9f2k0a0001abcd1234", + "type": "queue_item.resolved", + "api_version": "v2", + "created": "2026-05-08T12:34:56.789Z", + "data": { + "object": { + "item": { + "id": "item_xyz789", + "flagged": true, + "labels": [ + { + "label": "classifier/spam", + "score": 0.94, + "flagged": true, + "manual": false + } + ], + "flagged_fields": [], + "language": "en", + "content": { + "type": "text", + "text": "Buy crypto now!" + }, + "timestamp": "2026-05-08T12:34:56.789Z", + "metadata": null, + "client_action": null, + "conversation_id": null, + "author_id": "user-555", + "channel_key": null, + "meta_type": "comment" + }, + "author": { + "id": "auth_555", + "external_id": "user-555", + "profile_picture": null, + "external_link": null, + "name": "Jane Doe", + "email": "jane@example.com", + "company": null, + "first_seen": 1746792000000, + "last_seen": 1746792000000, + "last_incident": null, + "status": "blocked", + "trust_level": { + "level": -1, + "manual": false + }, + "block": { + "until": null, + "reason": "Repeated spam violations" + }, + "risk_evaluation": null, + "metrics": { + "total_content": 42, + "flagged_content": 7, + "average_sentiment": -0.1 + }, + "metadata": {} + }, + "queue": { + "id": "que_abc123" + } + } + } + } + }, + "PublicQueueItemEvent": { + "type": "object", + "properties": { + "item": { + "$ref": "#/components/schemas/PublicQueueItem" + }, + "author": { + "$ref": "#/components/schemas/PublicAuthor" + }, + "queue": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "additionalProperties": false + } + }, + "required": [ + "item" + ], + "additionalProperties": false + }, + "PublicQueueItem": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Content ID from your system" + }, + "flagged": { + "description": "Whether the content was flagged by moderation", + "type": [ + "boolean", + "null" + ] + }, + "labels": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "The label name" + }, + "score": { + "type": "number", + "description": "Confidence score between 0 and 1" + }, + "manual": { + "description": "True if the label was applied manually by a moderator", + "type": "boolean" + }, + "flagged": { + "description": "Whether this label crossed its flagging threshold", + "type": "boolean" + }, + "shadow_flagged": { + "description": "Whether this label crossed its threshold under a shadowed policy \u2014 reported for visibility, never counted toward a flagging decision", + "type": "boolean" + }, + "matches": { + "type": "array", + "items": { + "type": "object", + "properties": { + "match": { + "type": "string", + "description": "The matched substring" + }, + "probability": { + "type": "number", + "description": "Match confidence between 0 and 1" + }, + "span": { + "type": "array", + "prefixItems": [ + { + "type": "number" + }, + { + "type": "number" + } + ], + "items": false, + "minItems": 2, + "maxItems": 2, + "description": "[start, end] character offsets in the source text" + }, + "mask": { + "type": [ + "string", + "null" + ] + }, + "reasons": { + "type": "array", + "items": { + "type": "string" + } + }, + "signals": { + "type": "object", + "properties": { + "brand_impersonation": { + "anyOf": [ + { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "method": { + "type": "string" + } + }, + "required": [ + "brand", + "method" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "has_suspicious_characters": { + "type": "boolean" + }, + "is_link_shortener": { + "type": "boolean" + }, + "domain_age_days": { + "type": [ + "number", + "null" + ] + }, + "has_email_setup": { + "type": [ + "boolean", + "null" + ] + }, + "redirect_count": { + "type": [ + "number", + "null" + ] + }, + "final_url": { + "type": [ + "string", + "null" + ] + }, + "bot_protection": { + "type": [ + "boolean", + "null" + ] + }, + "is_reported": { + "type": "boolean" + } + }, + "required": [ + "brand_impersonation", + "has_suspicious_characters", + "is_link_shortener", + "domain_age_days", + "has_email_setup", + "redirect_count", + "final_url", + "bot_protection", + "is_reported" + ], + "additionalProperties": false + }, + "entity_type": { + "type": "string" + }, + "scripts": { + "type": "array", + "items": { + "type": "string" + } + }, + "skeleton": { + "type": "string" + } + }, + "required": [ + "match", + "probability", + "span" + ], + "additionalProperties": false + } + } + }, + "required": [ + "label", + "score" + ], + "additionalProperties": false + } + }, + { + "type": "null" + } + ], + "description": "Moderation labels applied to the content" + }, + "flagged_fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "For object content, the field keys (e.g. \"bio\") that triggered a flag. Empty when no fields were flagged or the content is not an object." + }, + "language": { + "description": "Detected ISO language code, if available", + "type": [ + "string", + "null" + ] + }, + "content": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text" + }, + "text": { + "type": "string", + "maxLength": 100000, + "description": "The content text" + } + }, + "required": [ + "type", + "text" + ], + "additionalProperties": false, + "description": "Text", + "title": "Text" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "image" + }, + "url": { + "description": "A public URL of the image content. Either url or data must be provided.", + "type": "string", + "format": "uri" + }, + "data": { + "description": "Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue.", + "type": "string", + "maxLength": 5500000 + } + }, + "required": [ + "type" + ], + "additionalProperties": false, + "description": "Image", + "title": "Image" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "video" + }, + "url": { + "type": "string", + "format": "uri", + "description": "A public URL of the video content" + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false, + "description": "Video", + "title": "Video" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "audio" + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the audio content" + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false, + "description": "Audio", + "title": "Audio" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "object" + }, + "data": { + "type": "object", + "propertyNames": { + "type": "string", + "description": "The key of the content node" + }, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text" + }, + "text": { + "type": "string", + "maxLength": 100000, + "description": "The content text" + } + }, + "required": [ + "type", + "text" + ], + "additionalProperties": false, + "description": "Text", + "title": "Text" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "image" + }, + "url": { + "description": "A public URL of the image content. Either url or data must be provided.", + "type": "string", + "format": "uri" + }, + "data": { + "description": "Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue.", + "type": "string", + "maxLength": 5500000 + } + }, + "required": [ + "type" + ], + "additionalProperties": false, + "description": "Image", + "title": "Image" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "video" + }, + "url": { + "type": "string", + "format": "uri", + "description": "A public URL of the video content" + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false, + "description": "Video", + "title": "Video" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "audio" + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the audio content" + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false, + "description": "Audio", + "title": "Audio" + } + ], + "title": "Content leaf", + "type": "object" + }, + "description": "Values in the object. Can be mixed content types." + } + }, + "required": [ + "type", + "data" + ], + "additionalProperties": false, + "description": "Object", + "title": "Object" + } + ], + "description": "The original content payload", + "type": "object" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the content was submitted" + }, + "metadata": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {}, + "description": "Arbitrary key/value metadata. Top-level keys are strings." + }, + { + "type": "null" + } + ], + "description": "Customer-supplied metadata attached to the content (same shape as the moderation API `metadata` input)." + }, + "client_action": { + "anyOf": [ + { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "review", + "allow", + "reject" + ], + "description": "Your recommendation for the content: allow, review, or reject." + }, + "behavior": { + "description": "How your recommendation combines with ours. Defaults to 'escalate', which only applies it when stricter than ours; 'override' replaces ours outright.", + "type": "string", + "enum": [ + "override", + "escalate" + ] + }, + "source": { + "description": "Where your recommendation came from, e.g. \"banned-ip\".", + "type": "string", + "maxLength": 100 + }, + "reason": { + "description": "A human-readable explanation for your recommendation.", + "type": "string", + "maxLength": 500 + } + }, + "required": [ + "action" + ], + "additionalProperties": false, + "description": "A recommendation from your own client-side flagging." + }, + { + "type": "null" + } + ], + "description": "The recommendation you submitted via the moderation API `clientAction` input, if any." + }, + "conversation_id": { + "description": "Conversation grouping ID, if any", + "type": [ + "string", + "null" + ] + }, + "author_id": { + "description": "External author ID (the customer's identifier, not Moderation API's internal id)", + "type": [ + "string", + "null" + ] + }, + "channel_key": { + "description": "The channel the content was submitted to, identified by your customer-defined channel key.", + "type": [ + "string", + "null" + ] + }, + "meta_type": { + "anyOf": [ + { + "type": "string", + "enum": [ + "profile", + "message", + "post", + "comment", + "event", + "product", + "review", + "voice", + "other" + ] + }, + { + "type": "null" + } + ], + "description": "High-level content type (e.g. message, post, comment). Defaults to the channel's configured content type but can be overridden per request via the moderation API `type` field." + } + }, + "required": [ + "id", + "flagged", + "labels", + "flagged_fields", + "language", + "content", + "timestamp", + "metadata", + "client_action", + "conversation_id", + "author_id", + "channel_key", + "meta_type" + ], + "additionalProperties": false + }, + "QueueItemActionEvent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stable event ID. Use this to dedupe retries.", + "example": "evt_clxxx..." + }, + "type": { + "type": "string", + "const": "queue_item.action", + "description": "The event type.", + "example": "queue_item.action" + }, + "api_version": { + "type": "string", + "const": "v2", + "example": "v2" + }, + "created": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the event was emitted." + }, + "data": { + "type": "object", + "properties": { + "object": { + "$ref": "#/components/schemas/PublicActionPerformed" + } + }, + "required": [ + "object" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "type", + "api_version", + "created", + "data" + ], + "additionalProperties": false, + "example": { + "id": "evt_clx9f2k0a0001abcd1234", + "type": "queue_item.action", + "api_version": "v2", + "created": "2026-05-08T12:34:56.789Z", + "data": { + "object": { + "id": "act_99999", + "key": "shadow_ban", + "name": "Shadow ban", + "value": "24h", + "created_at": "2026-05-08T12:36:00.000Z", + "queue": { + "id": "que_abc123" + }, + "item": { + "id": "item_xyz791", + "flagged": true, + "labels": [ + { + "label": "classifier/spam", + "score": 0.94, + "flagged": true, + "manual": false + } + ], + "flagged_fields": [], + "language": "en", + "content": { + "type": "text", + "text": "Buy crypto now!" + }, + "timestamp": "2026-05-08T12:34:56.789Z", + "metadata": null, + "client_action": null, + "conversation_id": null, + "author_id": "user-555", + "channel_key": null, + "meta_type": "comment" + }, + "author": { + "id": "auth_555", + "external_id": "user-555", + "profile_picture": null, + "external_link": null, + "name": "Jane Doe", + "email": "jane@example.com", + "company": null, + "first_seen": 1746792000000, + "last_seen": 1746792000000, + "last_incident": null, + "status": "enabled", + "trust_level": { + "level": 1, + "manual": false + }, + "block": null, + "risk_evaluation": null, + "metrics": { + "total_content": 42, + "flagged_content": 7, + "average_sentiment": -0.1 + }, + "metadata": {} + } + } + } + } + }, + "PublicActionPerformed": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Moderation action ID" + }, + "key": { + "description": "Customer-defined key identifying this action", + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Display name of the action", + "type": [ + "string", + "null" + ] + }, + "value": { + "description": "The value passed to the action when it ran", + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the action was performed" + }, + "queue": { + "description": "The queue the item belongs to, if any", + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "additionalProperties": false + }, + "item": { + "description": "The content item the action was performed on, if any", + "$ref": "#/components/schemas/PublicQueueItem" + }, + "author": { + "description": "The author the action was performed on, if any", + "$ref": "#/components/schemas/PublicAuthor" + } + }, + "required": [ + "id", + "key", + "name", + "value", + "created_at" + ], + "additionalProperties": false + }, + "QueueItemRejectedEvent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stable event ID. Use this to dedupe retries.", + "example": "evt_clxxx..." + }, + "type": { + "type": "string", + "const": "queue_item.rejected", + "description": "The event type.", + "example": "queue_item.rejected" + }, + "api_version": { + "type": "string", + "const": "v2", + "example": "v2" + }, + "created": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the event was emitted." + }, + "data": { + "type": "object", + "properties": { + "object": { + "$ref": "#/components/schemas/PublicActionPerformed" + } + }, + "required": [ + "object" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "type", + "api_version", + "created", + "data" + ], + "additionalProperties": false, + "example": { + "id": "evt_clx9f2k0a0001abcd1234", + "type": "queue_item.rejected", + "api_version": "v2", + "created": "2026-05-08T12:34:56.789Z", + "data": { + "object": { + "id": "act_67890", + "key": "reject", + "name": "Reject", + "value": "spam", + "created_at": "2026-05-08T12:34:56.789Z", + "queue": { + "id": "que_abc123" + }, + "item": { + "id": "item_xyz789", + "flagged": true, + "labels": [ + { + "label": "classifier/spam", + "score": 0.94, + "flagged": true, + "manual": false + } + ], + "flagged_fields": [], + "language": "en", + "content": { + "type": "text", + "text": "Buy crypto now!" + }, + "timestamp": "2026-05-08T12:34:56.789Z", + "metadata": null, + "client_action": null, + "conversation_id": null, + "author_id": "user-555", + "channel_key": null, + "meta_type": "comment" + }, + "author": { + "id": "auth_555", + "external_id": "user-555", + "profile_picture": null, + "external_link": null, + "name": "Jane Doe", + "email": "jane@example.com", + "company": null, + "first_seen": 1746792000000, + "last_seen": 1746792000000, + "last_incident": null, + "status": "enabled", + "trust_level": { + "level": 1, + "manual": false + }, + "block": null, + "risk_evaluation": null, + "metrics": { + "total_content": 42, + "flagged_content": 7, + "average_sentiment": -0.1 + }, + "metadata": {} + } + } + } + } + }, + "QueueItemAllowedEvent": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stable event ID. Use this to dedupe retries.", + "example": "evt_clxxx..." + }, + "type": { + "type": "string", + "const": "queue_item.allowed", + "description": "The event type.", + "example": "queue_item.allowed" + }, + "api_version": { + "type": "string", + "const": "v2", + "example": "v2" + }, + "created": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$", + "description": "ISO 8601 timestamp of when the event was emitted." + }, + "data": { + "type": "object", + "properties": { + "object": { + "$ref": "#/components/schemas/PublicActionPerformed" + } + }, + "required": [ + "object" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "type", + "api_version", + "created", + "data" + ], + "additionalProperties": false, + "example": { + "id": "evt_clx9f2k0a0001abcd1234", + "type": "queue_item.allowed", + "api_version": "v2", + "created": "2026-05-08T12:34:56.789Z", + "data": { + "object": { + "id": "act_11111", + "key": "allow", + "name": "Allow", + "value": null, + "created_at": "2026-05-08T12:35:10.123Z", + "queue": { + "id": "que_abc123" + }, + "item": { + "id": "item_xyz790", + "flagged": false, + "labels": [], + "flagged_fields": [], + "language": "en", + "content": { + "type": "text", + "text": "Buy crypto now!" + }, + "timestamp": "2026-05-08T12:34:56.789Z", + "metadata": null, + "client_action": null, + "conversation_id": null, + "author_id": "user-555", + "channel_key": null, + "meta_type": "comment" + }, + "author": { + "id": "auth_555", + "external_id": "user-555", + "profile_picture": null, + "external_link": null, + "name": "Jane Doe", + "email": "jane@example.com", + "company": null, + "first_seen": 1746792000000, + "last_seen": 1746792000000, + "last_incident": null, + "status": "enabled", + "trust_level": { + "level": 1, + "manual": false + }, + "block": null, + "risk_evaluation": null, + "metrics": { + "total_content": 42, + "flagged_content": 7, + "average_sentiment": -0.1 + }, + "metadata": {} + } + } + } + } + }, + "WebhookEvent": { + "title": "WebhookEvent", + "description": "Discriminated union of every v2 webhook event. Switch on `type` to narrow to a specific event shape.", + "oneOf": [ + { + "$ref": "#/components/schemas/AuthorBlockedEvent" + }, + { + "$ref": "#/components/schemas/AuthorUnblockedEvent" + }, + { + "$ref": "#/components/schemas/AuthorSuspendedEvent" + }, + { + "$ref": "#/components/schemas/AuthorUpdatedEvent" + }, + { + "$ref": "#/components/schemas/AuthorTrustLevelChangedEvent" + }, + { + "$ref": "#/components/schemas/AuthorActionEvent" + }, + { + "$ref": "#/components/schemas/QueueItemCompletedEvent" + }, + { + "$ref": "#/components/schemas/QueueItemActionEvent" + }, + { + "$ref": "#/components/schemas/QueueItemRejectedEvent" + }, + { + "$ref": "#/components/schemas/QueueItemAllowedEvent" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "author.blocked": "#/components/schemas/AuthorBlockedEvent", + "author.unblocked": "#/components/schemas/AuthorUnblockedEvent", + "author.suspended": "#/components/schemas/AuthorSuspendedEvent", + "author.updated": "#/components/schemas/AuthorUpdatedEvent", + "author.trust_level_changed": "#/components/schemas/AuthorTrustLevelChangedEvent", + "author.action": "#/components/schemas/AuthorActionEvent", + "queue_item.resolved": "#/components/schemas/QueueItemCompletedEvent", + "queue_item.action": "#/components/schemas/QueueItemActionEvent", + "queue_item.rejected": "#/components/schemas/QueueItemRejectedEvent", + "queue_item.allowed": "#/components/schemas/QueueItemAllowedEvent" + } + } + }, + "VoiceStartFrame": { + "type": "object", + "description": "First frame the client sends. Declares the conversation, audio format, and tracks.", + "required": [ + "event", + "mediaFormat", + "tracks" + ], + "properties": { + "event": { + "type": "string", + "enum": [ + "start" + ] + }, + "conversationId": { + "type": "string", + "description": "Your external conversation id. Omit to have one generated and returned in `session.started`." + }, + "channel": { + "type": "string", + "description": "Optional. Selects which channel's policy configuration applies." + }, + "mediaFormat": { + "type": "object", + "required": [ + "encoding", + "sampleRate" + ], + "properties": { + "encoding": { + "type": "string", + "description": "audio/x-mulaw (PCMU), audio/x-alaw (PCMA), audio/l16 (linear16), or a common container (wav/mp3/ogg/flac).", + "example": "audio/x-mulaw" + }, + "sampleRate": { + "type": "integer", + "minimum": 8000, + "maximum": 48000, + "example": 8000 + } + } + }, + "tracks": { + "type": "array", + "description": "One or both tracks. Stream only the track(s) you have.", + "items": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "inbound", + "outbound" + ] + }, + "authorId": { + "type": "string", + "description": "Your identifier for the speaker on this track." + } + } + } + }, + "emitPartials": { + "type": "boolean", + "default": false, + "description": "Set true to also receive interim, non-final transcripts." + }, + "metadata": { + "type": "object", + "additionalProperties": true, + "description": "Arbitrary JSON attached to the conversation. Stored as-is and not interpreted by moderation." + } + } + }, + "VoiceMediaFrame": { + "type": "object", + "description": "Audio chunk for one track.", + "required": [ + "event", + "media" + ], + "properties": { + "event": { + "type": "string", + "enum": [ + "media" + ] + }, + "media": { + "type": "object", + "required": [ + "track", + "payload" + ], + "properties": { + "track": { + "type": "string", + "enum": [ + "inbound", + "outbound" + ] + }, + "payload": { + "type": "string", + "description": "Base64-encoded audio in the declared format." + } + } + } + } + }, + "VoiceStopFrame": { + "type": "object", + "description": "Ends the call gracefully (or just disconnect).", + "required": [ + "event" + ], + "properties": { + "event": { + "type": "string", + "enum": [ + "stop" + ] + } + } + }, + "VoiceSessionStarted": { + "type": "object", + "description": "Sent after the start frame is accepted.", + "required": [ + "v", + "event", + "sessionId", + "tracks" + ], + "properties": { + "v": { + "type": "integer", + "enum": [ + 1 + ] + }, + "event": { + "type": "string", + "enum": [ + "session.started" + ] + }, + "conversationId": { + "type": "string" + }, + "sessionId": { + "type": "string" + }, + "tracks": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "VoiceUtteranceFinal": { + "type": "object", + "description": "A finalized utterance with its moderation result. The evaluation/recommendation/policies match the standard moderation response.", + "required": [ + "v", + "event", + "contentId", + "track", + "text", + "recommendation" + ], + "properties": { + "v": { + "type": "integer", + "enum": [ + 1 + ] + }, + "event": { + "type": "string", + "enum": [ + "utterance.final" + ] + }, + "conversationId": { + "type": "string" + }, + "contentId": { + "type": "string" + }, + "track": { + "type": "string", + "enum": [ + "inbound", + "outbound" + ] + }, + "authorId": { + "type": "string" + }, + "text": { + "type": "string" + }, + "startMs": { + "type": "integer" + }, + "endMs": { + "type": "integer" + }, + "sttConfidence": { + "type": "number" + }, + "evaluation": { + "type": "object", + "additionalProperties": true + }, + "recommendation": { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "allow", + "review", + "reject" + ] + } + } + }, + "policies": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "VoiceSessionEnded": { + "type": "object", + "description": "Sent when the call ends, with summary stats.", + "required": [ + "v", + "event", + "stats" + ], + "properties": { + "v": { + "type": "integer", + "enum": [ + 1 + ] + }, + "event": { + "type": "string", + "enum": [ + "session.ended" + ] + }, + "conversationId": { + "type": "string" + }, + "sessionId": { + "type": "string" + }, + "stats": { + "type": "object", + "properties": { + "durationMs": { + "type": "integer" + }, + "utterances": { + "type": "integer" + }, + "actions": { + "type": "object", + "properties": { + "allow": { + "type": "integer" + }, + "review": { + "type": "integer" + }, + "reject": { + "type": "integer" + } + } + } + } + } + } + }, + "Pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "The current page, starting at 1." + }, + "pageSize": { + "type": "integer", + "description": "Number of items per page." + }, + "total": { + "type": "integer", + "description": "Total number of items." + }, + "totalPages": { + "type": "integer", + "description": "Total number of pages." + }, + "hasMore": { + "type": "boolean", + "description": "Whether there is a next page." + } + }, + "required": [ + "page", + "pageSize", + "total", + "totalPages", + "hasMore" + ], + "additionalProperties": false, + "description": "Where this page is in the full list." + }, + "ErrorIssue": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "What is wrong." + }, + "path": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "description": "Location of the invalid field in the request body." + }, + "code": { + "type": "string", + "description": "Validation rule that failed." + } + }, + "required": [ + "message" + ] + }, + "BadRequestError": { + "type": "object", + "description": "The request is malformed or a parameter is invalid.", + "properties": { + "type": { + "type": "string", + "const": "invalid_request_error", + "description": "Broad error category. Stable; safe to switch on." + }, + "code": { + "type": "string", + "enum": [ + "invalid_request", + "project_id_required", + "validation_failed" + ], + "x-speakeasy-unknown-values": "allow", + "description": "Exactly what went wrong. Stable; safe to branch on. New codes may be added.\n\n- `invalid_request`: A parameter is invalid. `message` says which one.\n- `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the organization has more than one project.\n- `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`.", + "example": "invalid_request" + }, + "message": { + "type": "string", + "description": "Human-readable explanation.", + "example": "Invalid input data" + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorIssue" + }, + "description": "Validation problems, when the request body is invalid." + }, + "request_id": { + "type": "string", + "description": "Identifies this request. Include it when you contact support.", + "example": "h8fkz6kkzoa446ffve37atys" + }, + "doc_url": { + "type": "string", + "format": "uri", + "description": "Documentation for this `code`." + } + }, + "required": [ + "type", + "code", + "message", + "request_id", + "doc_url" + ] + }, + "AuthenticationError": { + "type": "object", + "description": "The API key is missing, invalid or revoked.", + "properties": { + "type": { + "type": "string", + "const": "authentication_error", + "description": "Broad error category. Stable; safe to switch on." + }, + "code": { + "type": "string", + "enum": [ + "unauthorized", + "missing_api_key", + "malformed_api_key", + "invalid_api_key" + ], + "x-speakeasy-unknown-values": "allow", + "description": "Exactly what went wrong. Stable; safe to branch on. New codes may be added.\n\n- `unauthorized`: Authentication failed.\n- `missing_api_key`: No API key in the `Authorization` header.\n- `malformed_api_key`: The `Authorization` header does not contain a valid key format.\n- `invalid_api_key`: The API key does not exist or was revoked.", + "example": "unauthorized" + }, + "message": { + "type": "string", + "description": "Human-readable explanation.", + "example": "Authorization not provided" + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorIssue" + }, + "description": "Validation problems, when the request body is invalid." + }, + "request_id": { + "type": "string", + "description": "Identifies this request. Include it when you contact support.", + "example": "h8fkz6kkzoa446ffve37atys" + }, + "doc_url": { + "type": "string", + "format": "uri", + "description": "Documentation for this `code`." + } + }, + "required": [ + "type", + "code", + "message", + "request_id", + "doc_url" + ] + }, + "PermissionDeniedError": { + "type": "object", + "description": "The API key cannot do this, or the plan limit for this resource is reached.", + "properties": { + "type": { + "type": "string", + "const": "permission_error", + "description": "Broad error category. Stable; safe to switch on." + }, + "code": { + "type": "string", + "enum": [ + "permission_denied", + "account_disabled", + "quota_exceeded", + "plan_feature_unavailable", + "plan_limit_exceeded", + "organization_key_required", + "missing_key_permission", + "project_not_reachable" + ], + "x-speakeasy-unknown-values": "allow", + "description": "Exactly what went wrong. Stable; safe to branch on. New codes may be added.\n\n- `permission_denied`: The API key cannot perform this request.\n- `account_disabled`: The organization account is disabled.\n- `quota_exceeded`: The organization has used all API requests on its plan.\n- `plan_feature_unavailable`: The current plan does not include this feature.\n- `plan_limit_exceeded`: The request goes over a limit of the current plan.\n- `organization_key_required`: This endpoint needs an organization API key, but a project key was used.\n- `missing_key_permission`: The organization key does not have the permission this endpoint needs.\n- `project_not_reachable`: The organization key is limited to other projects.", + "example": "permission_denied" + }, + "message": { + "type": "string", + "description": "Human-readable explanation.", + "example": "Insufficient access" + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorIssue" + }, + "description": "Validation problems, when the request body is invalid." + }, + "request_id": { + "type": "string", + "description": "Identifies this request. Include it when you contact support.", + "example": "h8fkz6kkzoa446ffve37atys" + }, + "doc_url": { + "type": "string", + "format": "uri", + "description": "Documentation for this `code`." + } + }, + "required": [ + "type", + "code", + "message", + "request_id", + "doc_url" + ] + }, + "NotFoundError": { + "type": "object", + "description": "The resource does not exist or the key cannot see it.", + "properties": { + "type": { + "type": "string", + "const": "not_found_error", + "description": "Broad error category. Stable; safe to switch on." + }, + "code": { + "type": "string", + "enum": [ + "resource_not_found", + "action_not_found", + "author_not_found", + "queue_not_found", + "wordlist_not_found", + "webhook_not_found", + "project_not_found", + "channel_not_found" + ], + "x-speakeasy-unknown-values": "allow", + "description": "Exactly what went wrong. Stable; safe to branch on. New codes may be added.\n\n- `resource_not_found`: The resource does not exist.\n- `action_not_found`: The action does not exist.\n- `author_not_found`: The author does not exist.\n- `queue_not_found`: The review queue does not exist.\n- `wordlist_not_found`: The wordlist does not exist.\n- `webhook_not_found`: The webhook does not exist.\n- `project_not_found`: The project does not exist.\n- `channel_not_found`: The channel does not exist.", + "example": "resource_not_found" + }, + "message": { + "type": "string", + "description": "Human-readable explanation.", + "example": "Not found" + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorIssue" + }, + "description": "Validation problems, when the request body is invalid." + }, + "request_id": { + "type": "string", + "description": "Identifies this request. Include it when you contact support.", + "example": "h8fkz6kkzoa446ffve37atys" + }, + "doc_url": { + "type": "string", + "format": "uri", + "description": "Documentation for this `code`." + } + }, + "required": [ + "type", + "code", + "message", + "request_id", + "doc_url" + ] + }, + "ConflictError": { + "type": "object", + "description": "The request conflicts with the current state of a resource.", + "properties": { + "type": { + "type": "string", + "const": "conflict_error", + "description": "Broad error category. Stable; safe to switch on." + }, + "code": { + "type": "string", + "enum": [ + "resource_conflict" + ], + "x-speakeasy-unknown-values": "allow", + "description": "Exactly what went wrong. Stable; safe to branch on. New codes may be added.\n\n- `resource_conflict`: The request conflicts with an existing resource.", + "example": "resource_conflict" + }, + "message": { + "type": "string", + "description": "Human-readable explanation.", + "example": "Action with this key already exists" + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorIssue" + }, + "description": "Validation problems, when the request body is invalid." + }, + "request_id": { + "type": "string", + "description": "Identifies this request. Include it when you contact support.", + "example": "h8fkz6kkzoa446ffve37atys" + }, + "doc_url": { + "type": "string", + "format": "uri", + "description": "Documentation for this `code`." + } + }, + "required": [ + "type", + "code", + "message", + "request_id", + "doc_url" + ] + }, + "UnprocessableEntityError": { + "type": "object", + "description": "The request is valid JSON but cannot be processed.", + "properties": { + "type": { + "type": "string", + "const": "invalid_request_error", + "description": "Broad error category. Stable; safe to switch on." + }, + "code": { + "type": "string", + "enum": [ + "unprocessable_content" + ], + "x-speakeasy-unknown-values": "allow", + "description": "Exactly what went wrong. Stable; safe to branch on. New codes may be added.\n\n- `unprocessable_content`: The request is valid but cannot be processed.", + "example": "unprocessable_content" + }, + "message": { + "type": "string", + "description": "Human-readable explanation.", + "example": "Unprocessable content" + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorIssue" + }, + "description": "Validation problems, when the request body is invalid." + }, + "request_id": { + "type": "string", + "description": "Identifies this request. Include it when you contact support.", + "example": "h8fkz6kkzoa446ffve37atys" + }, + "doc_url": { + "type": "string", + "format": "uri", + "description": "Documentation for this `code`." + } + }, + "required": [ + "type", + "code", + "message", + "request_id", + "doc_url" + ] + }, + "RateLimitError": { + "type": "object", + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "properties": { + "type": { + "type": "string", + "const": "rate_limit_error", + "description": "Broad error category. Stable; safe to switch on." + }, + "code": { + "type": "string", + "enum": [ + "rate_limit_exceeded" + ], + "x-speakeasy-unknown-values": "allow", + "description": "Exactly what went wrong. Stable; safe to branch on. New codes may be added.\n\n- `rate_limit_exceeded`: Too many requests. Wait for the `Retry-After` seconds.", + "example": "rate_limit_exceeded" + }, + "message": { + "type": "string", + "description": "Human-readable explanation.", + "example": "Rate limit exceeded" + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorIssue" + }, + "description": "Validation problems, when the request body is invalid." + }, + "request_id": { + "type": "string", + "description": "Identifies this request. Include it when you contact support.", + "example": "h8fkz6kkzoa446ffve37atys" + }, + "doc_url": { + "type": "string", + "format": "uri", + "description": "Documentation for this `code`." + } + }, + "required": [ + "type", + "code", + "message", + "request_id", + "doc_url" + ] + }, + "InternalServerError": { + "type": "object", + "description": "Something went wrong on our side. Retry with backoff.", + "properties": { + "type": { + "type": "string", + "const": "api_error", + "description": "Broad error category. Stable; safe to switch on." + }, + "code": { + "type": "string", + "enum": [ + "internal_error" + ], + "x-speakeasy-unknown-values": "allow", + "description": "Exactly what went wrong. Stable; safe to branch on. New codes may be added.\n\n- `internal_error`: Something went wrong on our side. Retry with backoff.", + "example": "internal_error" + }, + "message": { + "type": "string", + "description": "Human-readable explanation.", + "example": "Internal server error" + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorIssue" + }, + "description": "Validation problems, when the request body is invalid." + }, + "request_id": { + "type": "string", + "description": "Identifies this request. Include it when you contact support.", + "example": "h8fkz6kkzoa446ffve37atys" + }, + "doc_url": { + "type": "string", + "format": "uri", + "description": "Documentation for this `code`." + } + }, + "required": [ + "type", + "code", + "message", + "request_id", + "doc_url" + ] + } + }, + "securitySchemes": { + "Authorization": { + "type": "http", + "scheme": "bearer", + "x-speakeasy-name-override": "secretKey" + } + } + }, + "webhooks": { + "author.blocked": { + "post": { + "operationId": "authorBlocked", + "summary": "Author was permanently blocked", + "description": "Fired when an author transitions to the `blocked` status. The `data.object` is the action_performed record that drove the transition, with the author and triggering action nested as inline resources.", + "tags": [ + "Webhooks" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorBlockedEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Acknowledge receipt. Any 2xx status closes the delivery as successful; non-2xx triggers retry with exponential backoff." + } + } + } + }, + "author.unblocked": { + "post": { + "operationId": "authorUnblocked", + "summary": "Author was unblocked", + "description": "Fired when an author transitions back to the `enabled` status. May fire automatically when a temporary suspension expires (the auto-unblock worker runs the `AUTHOR_UNBLOCK` action).", + "tags": [ + "Webhooks" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorUnblockedEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Acknowledge receipt. Any 2xx status closes the delivery as successful; non-2xx triggers retry with exponential backoff." + } + } + } + }, + "author.suspended": { + "post": { + "operationId": "authorSuspended", + "summary": "Author was temporarily suspended", + "description": "Fired when an author is suspended for a finite period. The `block.until` field on the nested author indicates when the suspension expires.", + "tags": [ + "Webhooks" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorSuspendedEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Acknowledge receipt. Any 2xx status closes the delivery as successful; non-2xx triggers retry with exponential backoff." + } + } + } + }, + "author.updated": { + "post": { + "operationId": "authorUpdated", + "summary": "Author profile or metadata changed", + "description": "Fired when public author fields (name, email, profile picture, metadata, etc.) change. Status transitions have their own dedicated events and do **not** trigger this.", + "tags": [ + "Webhooks" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorUpdatedEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Acknowledge receipt. Any 2xx status closes the delivery as successful; non-2xx triggers retry with exponential backoff." + } + } + } + }, + "author.trust_level_changed": { + "post": { + "operationId": "authorTrustLevelChanged", + "summary": "Author trust level transitioned", + "description": "Fired when an author's resolved trust level (manual override, falling back to computed) transitions to a new value. Does not fire for no-op recomputes.", + "tags": [ + "Webhooks" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorTrustLevelChangedEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Acknowledge receipt. Any 2xx status closes the delivery as successful; non-2xx triggers retry with exponential backoff." + } + } + } + }, + "author.action": { + "post": { + "operationId": "authorAction", + "summary": "A custom action was performed on an author", + "description": "Fired when an `AUTHOR_CUSTOM` moderation action runs against an author. Same shape as the lifecycle events (`author.blocked`, `author.suspended`, `author.unblocked`).", + "tags": [ + "Webhooks" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorActionEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Acknowledge receipt. Any 2xx status closes the delivery as successful; non-2xx triggers retry with exponential backoff." + } + } + } + }, + "queue_item.resolved": { + "post": { + "operationId": "queueItemResolved", + "summary": "A queue item was resolved", + "description": "Fired when a moderator marks a queue item as resolved (checked off the queue).", + "tags": [ + "Webhooks" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueItemCompletedEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Acknowledge receipt. Any 2xx status closes the delivery as successful; non-2xx triggers retry with exponential backoff." + } + } + } + }, + "queue_item.action": { + "post": { + "operationId": "queueItemAction", + "summary": "A custom action was performed on a queue item", + "description": "Fired when a **custom** moderation action runs against a queue item. The `data.object` is the action_performed record with the related action, item, author, and queue nested as inline resources. Built-in actions (reject, allow) have dedicated events \u2014 see `queue_item.rejected` and `queue_item.allowed` instead.", + "tags": [ + "Webhooks" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueItemActionEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Acknowledge receipt. Any 2xx status closes the delivery as successful; non-2xx triggers retry with exponential backoff." + } + } + } + }, + "queue_item.rejected": { + "post": { + "operationId": "queueItemRejected", + "summary": "A queue item was rejected", + "description": "Fired when the built-in **reject** action runs against a queue item. Same shape as `queue_item.action`. Customers who want every action firing should subscribe to both this and the other built-in/custom events; subscribing only to `queue_item.action` no longer catches built-in events.", + "tags": [ + "Webhooks" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueItemRejectedEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Acknowledge receipt. Any 2xx status closes the delivery as successful; non-2xx triggers retry with exponential backoff." + } + } + } + }, + "queue_item.allowed": { + "post": { + "operationId": "queueItemAllowed", + "summary": "A queue item was allowed", + "description": "Fired when the built-in **allow** action runs against a queue item. Same shape as `queue_item.action`. Customers who want every action firing should subscribe to both this and the other built-in/custom events.", + "tags": [ + "Webhooks" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueItemAllowedEvent" + } + } + } + }, + "responses": { + "200": { + "description": "Acknowledge receipt. Any 2xx status closes the delivery as successful; non-2xx triggers retry with exponential backoff." + } + } + } + } + }, + "x-speakeasy-webhooks": { + "security": { + "type": "signature", + "headerName": "modapi-signature", + "signatureTextEncoding": "hex", + "algorithm": "hmac-sha256" + } + } +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b1c062..8bae090 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,47 @@ # Changelog +## 1.1.0 (2026-10-22) + +Full Changelog: [v1.0.0...v1.1.0](https://github.com/moderation-api/sdk-php/compare/v1.0.0...v1.1.0) + +### API changes + +- Update to the latest API spec. + +## 1.0.0 (2026-10-22) + +The first stable version of the PHP SDK. Read the breaking changes before you upgrade. + +```bash +composer require moderation-api/sdk-php:^1.0 +``` + +### PHP-specific changes + +- Requires PHP 8.2 or later (was 8.1). +- The namespace is `ModerationApi` (was `ModerationAPI`). Create the client with `ModerationApi\ModerationApi::builder()->setSecurity($key)->build()`. +- Requests are typed objects, for example `new Operations\SubmitContentRequest(content: new Operations\TextRequest(text: '...'))`, and responses carry the result in `->object`. +- Verify webhooks with `ModerationApi\WebhookSignature::constructEvent($payload, $signature)`. +### What's new + +- **Covers the whole API**, including the management API (`projects`, `channels`), wordlists and the review queue. +- **Automatic pagination.** List methods return an iterator that fetches the next page for you. +- **Clear errors.** One error class per HTTP status (`BadRequestError`, `NotFoundError`, `RateLimitError`, ...). Every error has a specific `code` (for example `invalid_api_key`, `quota_exceeded` or `author_not_found`), a `request_id` and a `doc_url`. See [Errors](https://docs.moderationapi.com/api-reference/errors). +- **Retries** with exponential backoff on `429` and `5xx`, and timeouts per client or per request. +- **Webhook verification** that reads the secret from `MODAPI_WEBHOOK_SECRET`. + +### Breaking changes + +The SDK is now generated from our OpenAPI spec with a new generator. Most calls keep their names, but check these: + +- **List responses** are `{ data, pagination }` instead of a plain array or a resource-specific shape, and list methods take `page` and `pageSize`. +- **Errors** have a new body: `code` is the specific error code, not the HTTP category. The old `data` field is gone. +- **Renamed:** `account.list` is now `account.retrieve`, and `actions.execute.execute` is now `actions.execute`. +- **Removed:** `actions.execute.executeByID` (use `actions.execute` with `actionId` or `actionKey`), `auth.*`, and `content.stream` (see [Real-time voice](https://docs.moderationapi.com/content-moderation/real-time-voice)). +- **Organization keys** work only with `projects` and `channels`; project keys work with everything else. Use one client per key. See the README. + +The license is unchanged: Apache-2.0. + ## 0.41.0 (2026-09-15) Full Changelog: [v0.40.0...v0.41.0](https://github.com/moderation-api/sdk-php/compare/v0.40.0...v0.41.0) diff --git a/README.md b/README.md index 25fdb9a..d2a32f0 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ $sdk = ModerationApi\ModerationApi::builder() ) ->build(); -$request = new Operations\SubmitContentRequest( +$body = new Operations\SubmitContentRequestBody( content: new Operations\TextRequest( text: 'Hey, check out my profile for a deal!', ), @@ -82,7 +82,7 @@ $request = new Operations\SubmitContentRequest( ); $response = $sdk->content->submit( - request: $request + body: $body ); if ($response->object !== null) { @@ -314,7 +314,7 @@ Create the organization client only where you manage projects and channels, for ### [Content](docs/sdks/content/README.md) -* [submit](docs/sdks/content/README.md#submit) +* [submit](docs/sdks/content/README.md#submit) - Submit content ### [Projects](docs/sdks/projects/README.md) diff --git a/USAGE.md b/USAGE.md index 02c8ac7..8f6d614 100644 --- a/USAGE.md +++ b/USAGE.md @@ -13,7 +13,7 @@ $sdk = ModerationApi\ModerationApi::builder() ) ->build(); -$request = new Operations\SubmitContentRequest( +$body = new Operations\SubmitContentRequestBody( content: new Operations\TextRequest( text: 'Hey, check out my profile for a deal!', ), @@ -26,7 +26,7 @@ $request = new Operations\SubmitContentRequest( ); $response = $sdk->content->submit( - request: $request + body: $body ); if ($response->object !== null) { diff --git a/docs/Models/Components/BadRequestErrorCode.md b/docs/Models/Components/BadRequestErrorCode.md index 5dc7ec4..f1d83c8 100644 --- a/docs/Models/Components/BadRequestErrorCode.md +++ b/docs/Models/Components/BadRequestErrorCode.md @@ -3,12 +3,14 @@ Exactly what went wrong. Stable; safe to branch on. New codes may be added. - `invalid_request`: A parameter is invalid. `message` says which one. +- `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the organization has more than one project. - `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`. ## Values -| Name | Value | -| ------------------ | ------------------ | -| `InvalidRequest` | invalid_request | -| `ValidationFailed` | validation_failed | \ No newline at end of file +| Name | Value | +| ------------------- | ------------------- | +| `InvalidRequest` | invalid_request | +| `ProjectIdRequired` | project_id_required | +| `ValidationFailed` | validation_failed | \ No newline at end of file diff --git a/docs/Models/Components/PermissionDeniedErrorCode.md b/docs/Models/Components/PermissionDeniedErrorCode.md index a8de7e3..4762757 100644 --- a/docs/Models/Components/PermissionDeniedErrorCode.md +++ b/docs/Models/Components/PermissionDeniedErrorCode.md @@ -7,7 +7,6 @@ Exactly what went wrong. Stable; safe to branch on. New codes may be added. - `quota_exceeded`: The organization has used all API requests on its plan. - `plan_feature_unavailable`: The current plan does not include this feature. - `plan_limit_exceeded`: The request goes over a limit of the current plan. -- `project_key_required`: This endpoint needs a project API key, but an organization key was used. - `organization_key_required`: This endpoint needs an organization API key, but a project key was used. - `missing_key_permission`: The organization key does not have the permission this endpoint needs. - `project_not_reachable`: The organization key is limited to other projects. @@ -22,7 +21,6 @@ Exactly what went wrong. Stable; safe to branch on. New codes may be added. | `QuotaExceeded` | quota_exceeded | | `PlanFeatureUnavailable` | plan_feature_unavailable | | `PlanLimitExceeded` | plan_limit_exceeded | -| `ProjectKeyRequired` | project_key_required | | `OrganizationKeyRequired` | organization_key_required | | `MissingKeyPermission` | missing_key_permission | | `ProjectNotReachable` | project_not_reachable | \ No newline at end of file diff --git a/docs/Models/Errors/BadRequestError.md b/docs/Models/Errors/BadRequestError.md index 4d91d0a..500e7af 100644 --- a/docs/Models/Errors/BadRequestError.md +++ b/docs/Models/Errors/BadRequestError.md @@ -5,12 +5,12 @@ The request is malformed or a parameter is invalid. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | -| `code` | [Components\BadRequestErrorCode](../../Models/Components/BadRequestErrorCode.md) | :heavy_check_mark: | Exactly what went wrong. Stable; safe to branch on. New codes may be added.

- `invalid_request`: A parameter is invalid. `message` says which one.
- `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`. | invalid_request | -| `message` | *string* | :heavy_check_mark: | Human-readable explanation. | Invalid input data | -| `issues` | array<[Components\ErrorIssue](../../Models/Components/ErrorIssue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | -| `requestId` | *string* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | -| `docUrl` | *string* | :heavy_check_mark: | Documentation for this `code`. | | -| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *string* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | +| `code` | [Components\BadRequestErrorCode](../../Models/Components/BadRequestErrorCode.md) | :heavy_check_mark: | Exactly what went wrong. Stable; safe to branch on. New codes may be added.

- `invalid_request`: A parameter is invalid. `message` says which one.
- `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the organization has more than one project.
- `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`. | invalid_request | +| `message` | *string* | :heavy_check_mark: | Human-readable explanation. | Invalid input data | +| `issues` | array<[Components\ErrorIssue](../../Models/Components/ErrorIssue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | +| `requestId` | *string* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | +| `docUrl` | *string* | :heavy_check_mark: | Documentation for this `code`. | | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/Models/Errors/PermissionDeniedError.md b/docs/Models/Errors/PermissionDeniedError.md index 7ce9cee..f9a0c27 100644 --- a/docs/Models/Errors/PermissionDeniedError.md +++ b/docs/Models/Errors/PermissionDeniedError.md @@ -5,12 +5,12 @@ The API key cannot do this, or the plan limit for this resource is reached. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `type` | *string* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | -| `code` | [Components\PermissionDeniedErrorCode](../../Models/Components/PermissionDeniedErrorCode.md) | :heavy_check_mark: | Exactly what went wrong. Stable; safe to branch on. New codes may be added.

- `permission_denied`: The API key cannot perform this request.
- `account_disabled`: The organization account is disabled.
- `quota_exceeded`: The organization has used all API requests on its plan.
- `plan_feature_unavailable`: The current plan does not include this feature.
- `plan_limit_exceeded`: The request goes over a limit of the current plan.
- `project_key_required`: This endpoint needs a project API key, but an organization key was used.
- `organization_key_required`: This endpoint needs an organization API key, but a project key was used.
- `missing_key_permission`: The organization key does not have the permission this endpoint needs.
- `project_not_reachable`: The organization key is limited to other projects. | permission_denied | -| `message` | *string* | :heavy_check_mark: | Human-readable explanation. | Insufficient access | -| `issues` | array<[Components\ErrorIssue](../../Models/Components/ErrorIssue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | -| `requestId` | *string* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | -| `docUrl` | *string* | :heavy_check_mark: | Documentation for this `code`. | | -| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *string* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | +| `code` | [Components\PermissionDeniedErrorCode](../../Models/Components/PermissionDeniedErrorCode.md) | :heavy_check_mark: | Exactly what went wrong. Stable; safe to branch on. New codes may be added.

- `permission_denied`: The API key cannot perform this request.
- `account_disabled`: The organization account is disabled.
- `quota_exceeded`: The organization has used all API requests on its plan.
- `plan_feature_unavailable`: The current plan does not include this feature.
- `plan_limit_exceeded`: The request goes over a limit of the current plan.
- `organization_key_required`: This endpoint needs an organization API key, but a project key was used.
- `missing_key_permission`: The organization key does not have the permission this endpoint needs.
- `project_not_reachable`: The organization key is limited to other projects. | permission_denied | +| `message` | *string* | :heavy_check_mark: | Human-readable explanation. | Insufficient access | +| `issues` | array<[Components\ErrorIssue](../../Models/Components/ErrorIssue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | +| `requestId` | *string* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | +| `docUrl` | *string* | :heavy_check_mark: | Documentation for this `code`. | | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/Models/Operations/AddWordlistWordsRequest.md b/docs/Models/Operations/AddWordlistWordsRequest.md index c926c5e..afc946a 100644 --- a/docs/Models/Operations/AddWordlistWordsRequest.md +++ b/docs/Models/Operations/AddWordlistWordsRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to add words to | -| `body` | [Operations\AddWordlistWordsRequestBody](../../Models/Operations/AddWordlistWordsRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to add words to | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| `body` | [Operations\AddWordlistWordsRequestBody](../../Models/Operations/AddWordlistWordsRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/CreateActionRequest.md b/docs/Models/Operations/CreateActionRequest.md index 4a881ca..766426b 100644 --- a/docs/Models/Operations/CreateActionRequest.md +++ b/docs/Models/Operations/CreateActionRequest.md @@ -3,16 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `key` | *?string* | :heavy_minus_sign: | User defined key of the action. | -| `name` | *string* | :heavy_check_mark: | The name of the action. | -| `description` | *?string* | :heavy_minus_sign: | The description of the action. | -| `type` | [?Operations\CreateActionTypeRequest](../../Models/Operations/CreateActionTypeRequest.md) | :heavy_minus_sign: | The type of the action. | -| `builtIn` | *?bool* | :heavy_minus_sign: | Whether the action is a built-in action or a custom one. | -| `queueBehaviour` | [?Operations\CreateActionQueueBehaviourRequest](../../Models/Operations/CreateActionQueueBehaviourRequest.md) | :heavy_minus_sign: | Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status. | -| `filterInQueueIds` | array<*string*> | :heavy_minus_sign: | The IDs of the queues the action is available in. | -| `position` | [?Operations\CreateActionPositionRequest](../../Models/Operations/CreateActionPositionRequest.md) | :heavy_minus_sign: | Show the action in all queues, selected queues or no queues (to use via API only). | -| `possibleValues` | array<[Operations\CreateActionPossibleValueRequest](../../Models/Operations/CreateActionPossibleValueRequest.md)> | :heavy_minus_sign: | The possible values of the action. The user will be prompted to select one of these values when executing the action. | -| `valueRequired` | *?bool* | :heavy_minus_sign: | Whether the action requires a value to be executed. | -| `freeText` | *?bool* | :heavy_minus_sign: | Whether the action allows any text to be entered as a value or if it must be one of the possible values. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| `body` | [Operations\CreateActionRequestBody](../../Models/Operations/CreateActionRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/CreateActionRequestBody.md b/docs/Models/Operations/CreateActionRequestBody.md new file mode 100644 index 0000000..249741f --- /dev/null +++ b/docs/Models/Operations/CreateActionRequestBody.md @@ -0,0 +1,18 @@ +# CreateActionRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `key` | *?string* | :heavy_minus_sign: | User defined key of the action. | +| `name` | *string* | :heavy_check_mark: | The name of the action. | +| `description` | *?string* | :heavy_minus_sign: | The description of the action. | +| `type` | [?Operations\CreateActionTypeRequest](../../Models/Operations/CreateActionTypeRequest.md) | :heavy_minus_sign: | The type of the action. | +| `builtIn` | *?bool* | :heavy_minus_sign: | Whether the action is a built-in action or a custom one. | +| `queueBehaviour` | [?Operations\CreateActionQueueBehaviourRequest](../../Models/Operations/CreateActionQueueBehaviourRequest.md) | :heavy_minus_sign: | Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status. | +| `filterInQueueIds` | array<*string*> | :heavy_minus_sign: | The IDs of the queues the action is available in. | +| `position` | [?Operations\CreateActionPositionRequest](../../Models/Operations/CreateActionPositionRequest.md) | :heavy_minus_sign: | Show the action in all queues, selected queues or no queues (to use via API only). | +| `possibleValues` | array<[Operations\CreateActionPossibleValueRequest](../../Models/Operations/CreateActionPossibleValueRequest.md)> | :heavy_minus_sign: | The possible values of the action. The user will be prompted to select one of these values when executing the action. | +| `valueRequired` | *?bool* | :heavy_minus_sign: | Whether the action requires a value to be executed. | +| `freeText` | *?bool* | :heavy_minus_sign: | Whether the action allows any text to be entered as a value or if it must be one of the possible values. | \ No newline at end of file diff --git a/docs/Models/Operations/CreateAuthorRequest.md b/docs/Models/Operations/CreateAuthorRequest.md index 7809b64..4975827 100644 --- a/docs/Models/Operations/CreateAuthorRequest.md +++ b/docs/Models/Operations/CreateAuthorRequest.md @@ -3,15 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| `profilePicture` | *?string* | :heavy_minus_sign: | URL of the author's profile picture | -| `externalLink` | *?string* | :heavy_minus_sign: | URL of the author's external profile | -| `name` | *?string* | :heavy_minus_sign: | Author name or identifier | -| `email` | *?string* | :heavy_minus_sign: | Author email address | -| `company` | *?string* | :heavy_minus_sign: | The author's company or organization | -| `metadata` | [?Operations\CreateAuthorMetadata](../../Models/Operations/CreateAuthorMetadata.md) | :heavy_minus_sign: | Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process. | -| `firstSeen` | *?float* | :heavy_minus_sign: | Timestamp when author first appeared | -| `lastSeen` | *?float* | :heavy_minus_sign: | Timestamp of last activity | -| `manualTrustLevel` | *?float* | :heavy_minus_sign: | N/A | -| `externalId` | *string* | :heavy_check_mark: | External ID of the user, typically the ID of the author in your database. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| `body` | [Operations\CreateAuthorRequestBody](../../Models/Operations/CreateAuthorRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/CreateAuthorRequestBody.md b/docs/Models/Operations/CreateAuthorRequestBody.md new file mode 100644 index 0000000..4ad274f --- /dev/null +++ b/docs/Models/Operations/CreateAuthorRequestBody.md @@ -0,0 +1,17 @@ +# CreateAuthorRequestBody + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `profilePicture` | *?string* | :heavy_minus_sign: | URL of the author's profile picture | +| `externalLink` | *?string* | :heavy_minus_sign: | URL of the author's external profile | +| `name` | *?string* | :heavy_minus_sign: | Author name or identifier | +| `email` | *?string* | :heavy_minus_sign: | Author email address | +| `company` | *?string* | :heavy_minus_sign: | The author's company or organization | +| `metadata` | [?Operations\CreateAuthorMetadata](../../Models/Operations/CreateAuthorMetadata.md) | :heavy_minus_sign: | Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process. | +| `firstSeen` | *?float* | :heavy_minus_sign: | Timestamp when author first appeared | +| `lastSeen` | *?float* | :heavy_minus_sign: | Timestamp of last activity | +| `manualTrustLevel` | *?float* | :heavy_minus_sign: | N/A | +| `externalId` | *string* | :heavy_check_mark: | External ID of the user, typically the ID of the author in your database. | \ No newline at end of file diff --git a/docs/Models/Operations/CreateWebhookRequest.md b/docs/Models/Operations/CreateWebhookRequest.md index ad9cb31..3c1fba1 100644 --- a/docs/Models/Operations/CreateWebhookRequest.md +++ b/docs/Models/Operations/CreateWebhookRequest.md @@ -3,9 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | The webhook's name, used to identify it in the dashboard | -| `description` | *?string* | :heavy_minus_sign: | The webhook's description | -| `url` | *string* | :heavy_check_mark: | The webhook's URL. We'll call this URL when an event occurs. | -| `eventTypes` | array<[Operations\CreateWebhookEventTypeRequest](../../Models/Operations/CreateWebhookEventTypeRequest.md)> | :heavy_check_mark: | Event types this webhook subscribes to. One webhook URL receives all events you list here. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| `body` | [Operations\CreateWebhookRequestBody](../../Models/Operations/CreateWebhookRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/CreateWebhookRequestBody.md b/docs/Models/Operations/CreateWebhookRequestBody.md new file mode 100644 index 0000000..7665020 --- /dev/null +++ b/docs/Models/Operations/CreateWebhookRequestBody.md @@ -0,0 +1,11 @@ +# CreateWebhookRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | The webhook's name, used to identify it in the dashboard | +| `description` | *?string* | :heavy_minus_sign: | The webhook's description | +| `url` | *string* | :heavy_check_mark: | The webhook's URL. We'll call this URL when an event occurs. | +| `eventTypes` | array<[Operations\CreateWebhookEventTypeRequest](../../Models/Operations/CreateWebhookEventTypeRequest.md)> | :heavy_check_mark: | Event types this webhook subscribes to. One webhook URL receives all events you list here. | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteActionRequest.md b/docs/Models/Operations/DeleteActionRequest.md index c783605..dbd3ebb 100644 --- a/docs/Models/Operations/DeleteActionRequest.md +++ b/docs/Models/Operations/DeleteActionRequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the action to delete. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to delete. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteAuthorRequest.md b/docs/Models/Operations/DeleteAuthorRequest.md index c8b4a2b..cea8b19 100644 --- a/docs/Models/Operations/DeleteAuthorRequest.md +++ b/docs/Models/Operations/DeleteAuthorRequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteWebhookRequest.md b/docs/Models/Operations/DeleteWebhookRequest.md index 3715d6a..29e93dc 100644 --- a/docs/Models/Operations/DeleteWebhookRequest.md +++ b/docs/Models/Operations/DeleteWebhookRequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to delete. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to delete. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/ExecuteActionRequest.md b/docs/Models/Operations/ExecuteActionRequest.md index 6209c69..d401887 100644 --- a/docs/Models/Operations/ExecuteActionRequest.md +++ b/docs/Models/Operations/ExecuteActionRequest.md @@ -1,15 +1,9 @@ # ExecuteActionRequest -Input parameters - ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `actionKey` | *string* | :heavy_check_mark: | ID or key of the action to execute | -| `contentIds` | array<*string*> | :heavy_minus_sign: | IDs of the content items to apply the action to. Provide this or authorIds. | -| `authorIds` | array<*string*> | :heavy_minus_sign: | IDs of the authors to apply the action to. Provide this or contentIds. | -| `value` | *?string* | :heavy_minus_sign: | Optional value to provide with the action | -| `queueId` | *?string* | :heavy_minus_sign: | Optional queue ID if the action is queue-specific | -| `duration` | *?float* | :heavy_minus_sign: | Optional duration in milliseconds for actions with timeouts | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| `body` | [Operations\ExecuteActionRequestBody](../../Models/Operations/ExecuteActionRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/ExecuteActionRequestBody.md b/docs/Models/Operations/ExecuteActionRequestBody.md new file mode 100644 index 0000000..2e0c8c0 --- /dev/null +++ b/docs/Models/Operations/ExecuteActionRequestBody.md @@ -0,0 +1,15 @@ +# ExecuteActionRequestBody + +Input parameters + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `actionKey` | *string* | :heavy_check_mark: | ID or key of the action to execute | +| `contentIds` | array<*string*> | :heavy_minus_sign: | IDs of the content items to apply the action to. Provide this or authorIds. | +| `authorIds` | array<*string*> | :heavy_minus_sign: | IDs of the authors to apply the action to. Provide this or contentIds. | +| `value` | *?string* | :heavy_minus_sign: | Optional value to provide with the action | +| `queueId` | *?string* | :heavy_minus_sign: | Optional queue ID if the action is queue-specific | +| `duration` | *?float* | :heavy_minus_sign: | Optional duration in milliseconds for actions with timeouts | \ No newline at end of file diff --git a/docs/Models/Operations/GetAccountRequest.md b/docs/Models/Operations/GetAccountRequest.md new file mode 100644 index 0000000..a9c44a7 --- /dev/null +++ b/docs/Models/Operations/GetAccountRequest.md @@ -0,0 +1,8 @@ +# GetAccountRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/GetActionRequest.md b/docs/Models/Operations/GetActionRequest.md index 13c0401..6196302 100644 --- a/docs/Models/Operations/GetActionRequest.md +++ b/docs/Models/Operations/GetActionRequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the action to get. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to get. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/GetAuthorRequest.md b/docs/Models/Operations/GetAuthorRequest.md index 9ff24f0..1e67edc 100644 --- a/docs/Models/Operations/GetAuthorRequest.md +++ b/docs/Models/Operations/GetAuthorRequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/GetQueueRequest.md b/docs/Models/Operations/GetQueueRequest.md index f266eda..9b0dfb6 100644 --- a/docs/Models/Operations/GetQueueRequest.md +++ b/docs/Models/Operations/GetQueueRequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | The queue ID | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/GetQueueStatsRequest.md b/docs/Models/Operations/GetQueueStatsRequest.md index 95525f3..011ae07 100644 --- a/docs/Models/Operations/GetQueueStatsRequest.md +++ b/docs/Models/Operations/GetQueueStatsRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `withinDays` | *?int* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID | +| `withinDays` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/GetWebhookRequest.md b/docs/Models/Operations/GetWebhookRequest.md index a2bf1cb..7376be9 100644 --- a/docs/Models/Operations/GetWebhookRequest.md +++ b/docs/Models/Operations/GetWebhookRequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to get. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to get. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/GetWebhookSecretRequest.md b/docs/Models/Operations/GetWebhookSecretRequest.md new file mode 100644 index 0000000..a266473 --- /dev/null +++ b/docs/Models/Operations/GetWebhookSecretRequest.md @@ -0,0 +1,8 @@ +# GetWebhookSecretRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/GetWordlistEmbeddingStatusRequest.md b/docs/Models/Operations/GetWordlistEmbeddingStatusRequest.md index 2449a6d..d365ad9 100644 --- a/docs/Models/Operations/GetWordlistEmbeddingStatusRequest.md +++ b/docs/Models/Operations/GetWordlistEmbeddingStatusRequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to check embedding status for | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to check embedding status for | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/GetWordlistRequest.md b/docs/Models/Operations/GetWordlistRequest.md index 9363170..36bf8ca 100644 --- a/docs/Models/Operations/GetWordlistRequest.md +++ b/docs/Models/Operations/GetWordlistRequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to get | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to get | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/ListActionsRequest.md b/docs/Models/Operations/ListActionsRequest.md index ae6c5a8..06d1b9f 100644 --- a/docs/Models/Operations/ListActionsRequest.md +++ b/docs/Models/Operations/ListActionsRequest.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `queueId` | *?string* | :heavy_minus_sign: | N/A | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `queueId` | *?string* | :heavy_minus_sign: | N/A | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/ListAuthorsRequest.md b/docs/Models/Operations/ListAuthorsRequest.md index 326b765..b8673e1 100644 --- a/docs/Models/Operations/ListAuthorsRequest.md +++ b/docs/Models/Operations/ListAuthorsRequest.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | -| `sortBy` | [?Operations\SortBy](../../Models/Operations/SortBy.md) | :heavy_minus_sign: | N/A | -| `sortDirection` | [?Operations\ListAuthorsSortDirection](../../Models/Operations/ListAuthorsSortDirection.md) | :heavy_minus_sign: | Sort direction | -| `memberSinceDate` | *?string* | :heavy_minus_sign: | N/A | -| `lastActiveDate` | *?string* | :heavy_minus_sign: | N/A | -| `contentTypes` | array<*string*> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `sortBy` | [?Operations\SortBy](../../Models/Operations/SortBy.md) | :heavy_minus_sign: | N/A | +| `sortDirection` | [?Operations\ListAuthorsSortDirection](../../Models/Operations/ListAuthorsSortDirection.md) | :heavy_minus_sign: | Sort direction | +| `memberSinceDate` | *?string* | :heavy_minus_sign: | N/A | +| `lastActiveDate` | *?string* | :heavy_minus_sign: | N/A | +| `contentTypes` | array<*string*> | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/ListQueueItemsRequest.md b/docs/Models/Operations/ListQueueItemsRequest.md index 7a2ff96..b9f9bf7 100644 --- a/docs/Models/Operations/ListQueueItemsRequest.md +++ b/docs/Models/Operations/ListQueueItemsRequest.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | -| `sortField` | [?Operations\SortField](../../Models/Operations/SortField.md) | :heavy_minus_sign: | N/A | -| `sortDirection` | [?Operations\ListQueueItemsSortDirection](../../Models/Operations/ListQueueItemsSortDirection.md) | :heavy_minus_sign: | Sort direction | -| `conversationIds` | array<*string*> | :heavy_minus_sign: | N/A | -| `labels` | array<*string*> | :heavy_minus_sign: | N/A | -| `afterDate` | *?string* | :heavy_minus_sign: | N/A | -| `beforeDate` | *?string* | :heavy_minus_sign: | N/A | -| `includeResolved` | *?bool* | :heavy_minus_sign: | N/A | -| `authorId` | *?string* | :heavy_minus_sign: | N/A | -| `filteredActionIds` | array<*string*> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `sortField` | [?Operations\SortField](../../Models/Operations/SortField.md) | :heavy_minus_sign: | N/A | +| `sortDirection` | [?Operations\ListQueueItemsSortDirection](../../Models/Operations/ListQueueItemsSortDirection.md) | :heavy_minus_sign: | Sort direction | +| `conversationIds` | array<*string*> | :heavy_minus_sign: | N/A | +| `labels` | array<*string*> | :heavy_minus_sign: | N/A | +| `afterDate` | *?string* | :heavy_minus_sign: | N/A | +| `beforeDate` | *?string* | :heavy_minus_sign: | N/A | +| `includeResolved` | *?bool* | :heavy_minus_sign: | N/A | +| `authorId` | *?string* | :heavy_minus_sign: | N/A | +| `filteredActionIds` | array<*string*> | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/ListWebhooksRequest.md b/docs/Models/Operations/ListWebhooksRequest.md index 47eba62..8e2e5ba 100644 --- a/docs/Models/Operations/ListWebhooksRequest.md +++ b/docs/Models/Operations/ListWebhooksRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/ListWordlistsRequest.md b/docs/Models/Operations/ListWordlistsRequest.md index 16e4bf5..edafc20 100644 --- a/docs/Models/Operations/ListWordlistsRequest.md +++ b/docs/Models/Operations/ListWordlistsRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/RemoveWordlistWordsRequest.md b/docs/Models/Operations/RemoveWordlistWordsRequest.md index 1224942..3ac749d 100644 --- a/docs/Models/Operations/RemoveWordlistWordsRequest.md +++ b/docs/Models/Operations/RemoveWordlistWordsRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to remove words from | -| `words` | array<*string*> | :heavy_check_mark: | Array of words to remove from the wordlist | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to remove words from | +| `words` | array<*string*> | :heavy_check_mark: | Array of words to remove from the wordlist | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/Models/Operations/ResolveQueueItemRequest.md b/docs/Models/Operations/ResolveQueueItemRequest.md index fe3e92d..b62bc60 100644 --- a/docs/Models/Operations/ResolveQueueItemRequest.md +++ b/docs/Models/Operations/ResolveQueueItemRequest.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `itemId` | *string* | :heavy_check_mark: | The item ID to resolve | -| `body` | [Operations\ResolveQueueItemRequestBody](../../Models/Operations/ResolveQueueItemRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID | +| `itemId` | *string* | :heavy_check_mark: | The item ID to resolve | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| `body` | [Operations\ResolveQueueItemRequestBody](../../Models/Operations/ResolveQueueItemRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/SubmitContentRequest.md b/docs/Models/Operations/SubmitContentRequest.md index 324c738..81faf44 100644 --- a/docs/Models/Operations/SubmitContentRequest.md +++ b/docs/Models/Operations/SubmitContentRequest.md @@ -3,16 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `content` | [Operations\TextRequest\|Operations\ImageRequest\|Operations\VideoRequest\|Operations\AudioRequest\|Operations\ObjectT](../../Models/Operations/ContentRequest.md) | :heavy_check_mark: | The content sent for moderation | -| `timestamp` | *?float* | :heavy_minus_sign: | Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. | -| `channel` | *?string* | :heavy_minus_sign: | Provide a channel ID or key. Will use the project's default channel if not provided. | -| `contentId` | *?string* | :heavy_minus_sign: | The unique ID of the content in your database. | -| `metaType` | [?Operations\MetaType](../../Models/Operations/MetaType.md) | :heavy_minus_sign: | The meta type of content being moderated | -| `authorId` | *?string* | :heavy_minus_sign: | The author of the content. | -| `conversationId` | *?string* | :heavy_minus_sign: | For example the ID of a chat room or a post | -| `metadata` | array | :heavy_minus_sign: | Any metadata you want to store with the content | -| `clientAction` | [?Operations\ClientAction](../../Models/Operations/ClientAction.md) | :heavy_minus_sign: | A recommendation from your own client-side flagging (e.g. a banned-IP list or a third-party tool). Feeds the rules engine and can escalate or override the recommended action. Does not change whether our analysis flagged the content. | -| `doNotStore` | *?bool* | :heavy_minus_sign: | Do not store the content. The content won't enter the review queue | -| `policies` | array<[Operations\Toxicity\|Operations\PersonalInformation\|Operations\Hate\|Operations\Illicit\|Operations\IllicitDrugs\|Operations\IllicitAlcohol\|Operations\IllicitFirearms\|Operations\IllicitTobacco\|Operations\IllicitGambling\|Operations\Cannabis\|Operations\Adult\|Operations\Crypto\|Operations\Sexual\|Operations\SexualMinors\|Operations\Profanity\|Operations\Violence\|Operations\SelfHarm\|Operations\Spam\|Operations\LowQualityContent\|Operations\FaceDetection\|Operations\SelfPromotion\|Operations\Political\|Operations\Religion\|Operations\Threat\|Operations\SexualSolicitation\|Operations\ChannelCircumvention\|Operations\IllegalTrade\|Operations\Alcohol\|Operations\Drugs\|Operations\Gambling\|Operations\Tobacco\|Operations\Weapons\|Operations\Promotion\|Operations\Extremism\|Operations\CodeAbuse\|Operations\UnicodeSpoofing\|Operations\PIIMasking\|Operations\URLMasking\|Operations\URLRisk\|Operations\Guideline](../../Models/Operations/PolicyRequest.md)> | :heavy_minus_sign: | (Enterprise) override the channel policies for this moderation request only. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| `body` | [Operations\SubmitContentRequestBody](../../Models/Operations/SubmitContentRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/SubmitContentRequestBody.md b/docs/Models/Operations/SubmitContentRequestBody.md new file mode 100644 index 0000000..6779e09 --- /dev/null +++ b/docs/Models/Operations/SubmitContentRequestBody.md @@ -0,0 +1,18 @@ +# SubmitContentRequestBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content` | [Operations\TextRequest\|Operations\ImageRequest\|Operations\VideoRequest\|Operations\AudioRequest\|Operations\ObjectT](../../Models/Operations/ContentRequest.md) | :heavy_check_mark: | The content sent for moderation | +| `timestamp` | *?float* | :heavy_minus_sign: | Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. | +| `channel` | *?string* | :heavy_minus_sign: | Provide a channel ID or key. Will use the project's default channel if not provided. | +| `contentId` | *?string* | :heavy_minus_sign: | The unique ID of the content in your database. | +| `metaType` | [?Operations\MetaType](../../Models/Operations/MetaType.md) | :heavy_minus_sign: | The meta type of content being moderated | +| `authorId` | *?string* | :heavy_minus_sign: | The author of the content. | +| `conversationId` | *?string* | :heavy_minus_sign: | For example the ID of a chat room or a post | +| `metadata` | array | :heavy_minus_sign: | Any metadata you want to store with the content | +| `clientAction` | [?Operations\ClientAction](../../Models/Operations/ClientAction.md) | :heavy_minus_sign: | A recommendation from your own client-side flagging (e.g. a banned-IP list or a third-party tool). Feeds the rules engine and can escalate or override the recommended action. Does not change whether our analysis flagged the content. | +| `doNotStore` | *?bool* | :heavy_minus_sign: | Do not store the content. The content won't enter the review queue | +| `policies` | array<[Operations\Toxicity\|Operations\PersonalInformation\|Operations\Hate\|Operations\Illicit\|Operations\IllicitDrugs\|Operations\IllicitAlcohol\|Operations\IllicitFirearms\|Operations\IllicitTobacco\|Operations\IllicitGambling\|Operations\Cannabis\|Operations\Adult\|Operations\Crypto\|Operations\Sexual\|Operations\SexualMinors\|Operations\Profanity\|Operations\Violence\|Operations\SelfHarm\|Operations\Spam\|Operations\LowQualityContent\|Operations\FaceDetection\|Operations\SelfPromotion\|Operations\Political\|Operations\Religion\|Operations\Threat\|Operations\SexualSolicitation\|Operations\ChannelCircumvention\|Operations\IllegalTrade\|Operations\Alcohol\|Operations\Drugs\|Operations\Gambling\|Operations\Tobacco\|Operations\Weapons\|Operations\Promotion\|Operations\Extremism\|Operations\CodeAbuse\|Operations\UnicodeSpoofing\|Operations\PIIMasking\|Operations\URLMasking\|Operations\URLRisk\|Operations\Guideline](../../Models/Operations/PolicyRequest.md)> | :heavy_minus_sign: | (Enterprise) override the channel policies for this moderation request only. | \ No newline at end of file diff --git a/docs/Models/Operations/UnresolveQueueItemRequest.md b/docs/Models/Operations/UnresolveQueueItemRequest.md index 6092f03..9de10a7 100644 --- a/docs/Models/Operations/UnresolveQueueItemRequest.md +++ b/docs/Models/Operations/UnresolveQueueItemRequest.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `itemId` | *string* | :heavy_check_mark: | The item ID to unresolve | -| `body` | [Operations\UnresolveQueueItemRequestBody](../../Models/Operations/UnresolveQueueItemRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID | +| `itemId` | *string* | :heavy_check_mark: | The item ID to unresolve | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| `body` | [Operations\UnresolveQueueItemRequestBody](../../Models/Operations/UnresolveQueueItemRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateActionRequest.md b/docs/Models/Operations/UpdateActionRequest.md index b190882..02cc4f8 100644 --- a/docs/Models/Operations/UpdateActionRequest.md +++ b/docs/Models/Operations/UpdateActionRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the action to update. | -| `body` | [Operations\UpdateActionRequestBody](../../Models/Operations/UpdateActionRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to update. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| `body` | [Operations\UpdateActionRequestBody](../../Models/Operations/UpdateActionRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateAuthorRequest.md b/docs/Models/Operations/UpdateAuthorRequest.md index df4b8f9..b3e5c29 100644 --- a/docs/Models/Operations/UpdateAuthorRequest.md +++ b/docs/Models/Operations/UpdateAuthorRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `body` | [Operations\UpdateAuthorRequestBody](../../Models/Operations/UpdateAuthorRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| `body` | [Operations\UpdateAuthorRequestBody](../../Models/Operations/UpdateAuthorRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateWebhookRequest.md b/docs/Models/Operations/UpdateWebhookRequest.md index 549a98f..255005c 100644 --- a/docs/Models/Operations/UpdateWebhookRequest.md +++ b/docs/Models/Operations/UpdateWebhookRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to update. | -| `body` | [Operations\UpdateWebhookRequestBody](../../Models/Operations/UpdateWebhookRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to update. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| `body` | [Operations\UpdateWebhookRequestBody](../../Models/Operations/UpdateWebhookRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateWordlistRequest.md b/docs/Models/Operations/UpdateWordlistRequest.md index 02e2243..c071390 100644 --- a/docs/Models/Operations/UpdateWordlistRequest.md +++ b/docs/Models/Operations/UpdateWordlistRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to update | -| `body` | [Operations\UpdateWordlistRequestBody](../../Models/Operations/UpdateWordlistRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to update | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| `body` | [Operations\UpdateWordlistRequestBody](../../Models/Operations/UpdateWordlistRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/account/README.md b/docs/sdks/account/README.md index bd2ebc5..1826ff3 100644 --- a/docs/sdks/account/README.md +++ b/docs/sdks/account/README.md @@ -37,6 +37,12 @@ if ($response->object !== null) { } ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | + ### Response **[?Operations\GetAccountResponse](../../Models/Operations/GetAccountResponse.md)** diff --git a/docs/sdks/actions/README.md b/docs/sdks/actions/README.md index 0047130..3db0602 100644 --- a/docs/sdks/actions/README.md +++ b/docs/sdks/actions/README.md @@ -49,11 +49,12 @@ foreach ($responses as $response) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `queueId` | *?string* | :heavy_minus_sign: | N/A | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `queueId` | *?string* | :heavy_minus_sign: | N/A | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -92,7 +93,7 @@ $sdk = ModerationApi\ModerationApi::builder() ) ->build(); -$request = new Operations\CreateActionRequest( +$body = new Operations\CreateActionRequestBody( key: 'suspend-24h', name: 'Suspend for 24 hours', type: Operations\CreateActionTypeRequest::AuthorBlockTemp, @@ -100,7 +101,7 @@ $request = new Operations\CreateActionRequest( ); $response = $sdk->actions->create( - request: $request + body: $body ); if ($response->object !== null) { @@ -110,9 +111,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `$request` | [Operations\CreateActionRequest](../../Models/Operations/CreateActionRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Operations\CreateActionRequestBody](../../Models/Operations/CreateActionRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -161,9 +163,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the action to get. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to get. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -215,10 +218,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the action to update. | -| `body` | [Operations\UpdateActionRequestBody](../../Models/Operations/UpdateActionRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to update. | +| `body` | [Operations\UpdateActionRequestBody](../../Models/Operations/UpdateActionRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -268,9 +272,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the action to delete. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to delete. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -307,7 +312,7 @@ $sdk = ModerationApi\ModerationApi::builder() ) ->build(); -$request = new Operations\ExecuteActionRequest( +$body = new Operations\ExecuteActionRequestBody( actionKey: 'suspend-24h', authorIds: [ 'user-1092', @@ -315,7 +320,7 @@ $request = new Operations\ExecuteActionRequest( ); $response = $sdk->actions->execute( - request: $request + body: $body ); if ($response->object !== null) { @@ -325,9 +330,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `$request` | [Operations\ExecuteActionRequest](../../Models/Operations/ExecuteActionRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Operations\ExecuteActionRequestBody](../../Models/Operations/ExecuteActionRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/authors/README.md b/docs/sdks/authors/README.md index 8fdd88f..b7f87ce 100644 --- a/docs/sdks/authors/README.md +++ b/docs/sdks/authors/README.md @@ -88,7 +88,7 @@ $sdk = ModerationApi\ModerationApi::builder() ) ->build(); -$request = new Operations\CreateAuthorRequest( +$body = new Operations\CreateAuthorRequestBody( name: 'Jamie Rivera', email: 'jamie@example.com', metadata: new Operations\CreateAuthorMetadata( @@ -99,7 +99,7 @@ $request = new Operations\CreateAuthorRequest( ); $response = $sdk->authors->create( - request: $request + body: $body ); if ($response->publicAuthor !== null) { @@ -109,9 +109,10 @@ if ($response->publicAuthor !== null) { ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `$request` | [Operations\CreateAuthorRequest](../../Models/Operations/CreateAuthorRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Operations\CreateAuthorRequestBody](../../Models/Operations/CreateAuthorRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -161,9 +162,10 @@ if ($response->publicAuthor !== null) { ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -222,10 +224,11 @@ if ($response->publicAuthor !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `body` | [Operations\UpdateAuthorRequestBody](../../Models/Operations/UpdateAuthorRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `body` | [Operations\UpdateAuthorRequestBody](../../Models/Operations/UpdateAuthorRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -276,9 +279,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/content/README.md b/docs/sdks/content/README.md index 3daed3c..3c93b00 100644 --- a/docs/sdks/content/README.md +++ b/docs/sdks/content/README.md @@ -4,10 +4,12 @@ ### Available Operations -* [submit](#submit) +* [submit](#submit) - Submit content ## submit +Submit content + ### Example Usage @@ -25,7 +27,7 @@ $sdk = ModerationApi\ModerationApi::builder() ) ->build(); -$request = new Operations\SubmitContentRequest( +$body = new Operations\SubmitContentRequestBody( content: new Operations\TextRequest( text: 'Hey, check out my profile for a deal!', ), @@ -38,7 +40,7 @@ $request = new Operations\SubmitContentRequest( ); $response = $sdk->content->submit( - request: $request + body: $body ); if ($response->object !== null) { @@ -48,9 +50,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `$request` | [Operations\SubmitContentRequest](../../Models/Operations/SubmitContentRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Operations\SubmitContentRequestBody](../../Models/Operations/SubmitContentRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/items/README.md b/docs/sdks/items/README.md index 31e031a..bd4394a 100644 --- a/docs/sdks/items/README.md +++ b/docs/sdks/items/README.md @@ -106,11 +106,12 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `itemId` | *string* | :heavy_check_mark: | The item ID to resolve | -| `body` | [Operations\ResolveQueueItemRequestBody](../../Models/Operations/ResolveQueueItemRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID | +| `itemId` | *string* | :heavy_check_mark: | The item ID to resolve | +| `body` | [Operations\ResolveQueueItemRequestBody](../../Models/Operations/ResolveQueueItemRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -166,11 +167,12 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `itemId` | *string* | :heavy_check_mark: | The item ID to unresolve | -| `body` | [Operations\UnresolveQueueItemRequestBody](../../Models/Operations/UnresolveQueueItemRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID | +| `itemId` | *string* | :heavy_check_mark: | The item ID to unresolve | +| `body` | [Operations\UnresolveQueueItemRequestBody](../../Models/Operations/UnresolveQueueItemRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/queue/README.md b/docs/sdks/queue/README.md index 273dd2b..7c5bb09 100644 --- a/docs/sdks/queue/README.md +++ b/docs/sdks/queue/README.md @@ -40,9 +40,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | The queue ID | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -95,10 +96,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `withinDays` | *?int* | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID | +| `withinDays` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index a5b7eb1..3d5f5ea 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -48,10 +48,11 @@ foreach ($responses as $response) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -86,7 +87,7 @@ $sdk = ModerationApi\ModerationApi::builder() ) ->build(); -$request = new Operations\CreateWebhookRequest( +$body = new Operations\CreateWebhookRequestBody( name: 'Moderation events', url: 'https://example.com/webhooks/moderation', eventTypes: [ @@ -96,7 +97,7 @@ $request = new Operations\CreateWebhookRequest( ); $response = $sdk->webhooks->create( - request: $request + body: $body ); if ($response->object !== null) { @@ -106,9 +107,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `$request` | [Operations\CreateWebhookRequest](../../Models/Operations/CreateWebhookRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Operations\CreateWebhookRequestBody](../../Models/Operations/CreateWebhookRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -156,9 +158,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to get. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to get. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -209,10 +212,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to update. | -| `body` | [Operations\UpdateWebhookRequestBody](../../Models/Operations/UpdateWebhookRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to update. | +| `body` | [Operations\UpdateWebhookRequestBody](../../Models/Operations/UpdateWebhookRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -261,9 +265,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to delete. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to delete. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/webhooksecret/README.md b/docs/sdks/webhooksecret/README.md index b3d5a8c..db83ff2 100644 --- a/docs/sdks/webhooksecret/README.md +++ b/docs/sdks/webhooksecret/README.md @@ -37,6 +37,12 @@ if ($response->object !== null) { } ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | + ### Response **[?Operations\GetWebhookSecretResponse](../../Models/Operations/GetWebhookSecretResponse.md)** diff --git a/docs/sdks/wordlist/README.md b/docs/sdks/wordlist/README.md index bbc6fd8..81e2725 100644 --- a/docs/sdks/wordlist/README.md +++ b/docs/sdks/wordlist/README.md @@ -47,10 +47,11 @@ foreach ($responses as $response) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -101,9 +102,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to get | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to get | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -157,10 +159,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to update | -| `body` | [Operations\UpdateWordlistRequestBody](../../Models/Operations/UpdateWordlistRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to update | +| `body` | [Operations\UpdateWordlistRequestBody](../../Models/Operations/UpdateWordlistRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -209,9 +212,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to check embedding status for | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to check embedding status for | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/words/README.md b/docs/sdks/words/README.md index c4333dc..276fae5 100644 --- a/docs/sdks/words/README.md +++ b/docs/sdks/words/README.md @@ -48,10 +48,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to add words to | -| `body` | [Operations\AddWordlistWordsRequestBody](../../Models/Operations/AddWordlistWordsRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to add words to | +| `body` | [Operations\AddWordlistWordsRequestBody](../../Models/Operations/AddWordlistWordsRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -106,10 +107,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to remove words from | -| `words` | array<*string*> | :heavy_check_mark: | Array of words to remove from the wordlist | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to remove words from | +| `words` | array<*string*> | :heavy_check_mark: | Array of words to remove from the wordlist | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/src/Account.php b/src/Account.php index fcf6e1c..eddb2be 100644 --- a/src/Account.php +++ b/src/Account.php @@ -49,15 +49,23 @@ public function getUrl(string $baseUrl, array $urlVariables): string * * Get account details * + * @param ?string $projectId * @return \ModerationApi\Models\Operations\GetAccountResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function retrieve(?Options $options = null): Operations\GetAccountResponse + public function retrieve(?string $projectId = null, ?Options $options = null): Operations\GetAccountResponse { + $request = new Operations\GetAccountRequest( + projectId: $projectId, + ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/account'); $urlOverride = null; $httpOptions = ['http_errors' => false]; + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); diff --git a/src/Actions.php b/src/Actions.php index 4ea922c..ca7f4ed 100644 --- a/src/Actions.php +++ b/src/Actions.php @@ -49,21 +49,30 @@ public function getUrl(string $baseUrl, array $urlVariables): string * * Create an action. * - * @param \ModerationApi\Models\Operations\CreateActionRequest $request + * @param \ModerationApi\Models\Operations\CreateActionRequestBody $body + * @param ?string $projectId * @return \ModerationApi\Models\Operations\CreateActionResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function create(Operations\CreateActionRequest $request, ?Options $options = null): Operations\CreateActionResponse + public function create(Operations\CreateActionRequestBody $body, ?string $projectId = null, ?Options $options = null): Operations\CreateActionResponse { + $request = new Operations\CreateActionRequest( + body: $body, + projectId: $projectId, + ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/actions'); $urlOverride = null; $httpOptions = ['http_errors' => false]; - $body = Utils\Utils::serializeRequestBody($request, 'request', 'json'); + $body = Utils\Utils::serializeRequestBody($request, 'body', 'json'); if ($body === null) { throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); @@ -165,18 +174,24 @@ public function create(Operations\CreateActionRequest $request, ?Options $option * Delete an action and all of its webhooks. * * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\DeleteActionResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function delete(string $id, ?Options $options = null): Operations\DeleteActionResponse + public function delete(string $id, ?string $projectId = null, ?Options $options = null): Operations\DeleteActionResponse { $request = new Operations\DeleteActionRequest( id: $id, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/actions/{id}', Operations\DeleteActionRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); @@ -277,21 +292,30 @@ public function delete(string $id, ?Options $options = null): Operations\DeleteA * * Execute a moderation action on one or more content items. * - * @param \ModerationApi\Models\Operations\ExecuteActionRequest $request + * @param \ModerationApi\Models\Operations\ExecuteActionRequestBody $body + * @param ?string $projectId * @return \ModerationApi\Models\Operations\ExecuteActionResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function execute(Operations\ExecuteActionRequest $request, ?Options $options = null): Operations\ExecuteActionResponse + public function execute(Operations\ExecuteActionRequestBody $body, ?string $projectId = null, ?Options $options = null): Operations\ExecuteActionResponse { + $request = new Operations\ExecuteActionRequest( + body: $body, + projectId: $projectId, + ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/actions/execute'); $urlOverride = null; $httpOptions = ['http_errors' => false]; - $body = Utils\Utils::serializeRequestBody($request, 'request', 'json'); + $body = Utils\Utils::serializeRequestBody($request, 'body', 'json'); if ($body === null) { throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); @@ -393,18 +417,24 @@ public function execute(Operations\ExecuteActionRequest $request, ?Options $opti * Get an action by ID. * * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\GetActionResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function retrieve(string $id, ?Options $options = null): Operations\GetActionResponse + public function retrieve(string $id, ?string $projectId = null, ?Options $options = null): Operations\GetActionResponse { $request = new Operations\GetActionRequest( id: $id, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/actions/{id}', Operations\GetActionRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -508,15 +538,17 @@ public function retrieve(string $id, ?Options $options = null): Operations\GetAc * @param ?string $queueId * @param ?int $page * @param ?int $pageSize + * @param ?string $projectId * @return \ModerationApi\Models\Operations\ListActionsResponse * @throws \ModerationApi\Models\Errors\APIException */ - private function listIndividual(?string $queueId = null, ?int $page = null, ?int $pageSize = null, ?Options $options = null): Operations\ListActionsResponse + private function listIndividual(?string $queueId = null, ?int $page = null, ?int $pageSize = null, ?string $projectId = null, ?Options $options = null): Operations\ListActionsResponse { $request = new Operations\ListActionsRequest( queueId: $queueId, page: $page, pageSize: $pageSize, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/actions'); @@ -524,6 +556,10 @@ private function listIndividual(?string $queueId = null, ?int $page = null, ?int $httpOptions = ['http_errors' => false]; $qp = Utils\Utils::getQueryParams(Operations\ListActionsRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -589,6 +625,7 @@ private function listIndividual(?string $queueId = null, ?int $page = null, ?int queueId: $request != null ? $request->queueId : null, page: $nextPage, pageSize: $request != null ? $request->pageSize : null, + projectId: $request != null ? $request->projectId : null, ); }; @@ -685,12 +722,13 @@ private function listIndividual(?string $queueId = null, ?int $page = null, ?int * @param ?string $queueId * @param ?int $page * @param ?int $pageSize + * @param ?string $projectId * @return \Generator<\ModerationApi\Models\Operations\ListActionsResponse> * @throws \ModerationApi\Models\Errors\APIException */ - public function list(?string $queueId = null, ?int $page = null, ?int $pageSize = null, ?Options $options = null): \Generator + public function list(?string $queueId = null, ?int $page = null, ?int $pageSize = null, ?string $projectId = null, ?Options $options = null): \Generator { - $res = $this->listIndividual($queueId, $page, $pageSize, $options); + $res = $this->listIndividual($queueId, $page, $pageSize, $projectId, $options); while ($res !== null) { yield $res; $res = $res->next($res); @@ -704,14 +742,16 @@ public function list(?string $queueId = null, ?int $page = null, ?int $pageSize * * @param \ModerationApi\Models\Operations\UpdateActionRequestBody $body * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\UpdateActionResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function update(Operations\UpdateActionRequestBody $body, string $id, ?Options $options = null): Operations\UpdateActionResponse + public function update(Operations\UpdateActionRequestBody $body, string $id, ?string $projectId = null, ?Options $options = null): Operations\UpdateActionResponse { $request = new Operations\UpdateActionRequest( id: $id, body: $body, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/actions/{id}', Operations\UpdateActionRequest::class, $request); @@ -722,6 +762,10 @@ public function update(Operations\UpdateActionRequestBody $body, string $id, ?Op throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('PUT', $url); diff --git a/src/Authors.php b/src/Authors.php index 24f17af..42c64dd 100644 --- a/src/Authors.php +++ b/src/Authors.php @@ -49,21 +49,30 @@ public function getUrl(string $baseUrl, array $urlVariables): string * * Create a new author. Typically not needed as authors are created automatically when content is moderated. * - * @param \ModerationApi\Models\Operations\CreateAuthorRequest $request + * @param \ModerationApi\Models\Operations\CreateAuthorRequestBody $body + * @param ?string $projectId * @return \ModerationApi\Models\Operations\CreateAuthorResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function create(Operations\CreateAuthorRequest $request, ?Options $options = null): Operations\CreateAuthorResponse + public function create(Operations\CreateAuthorRequestBody $body, ?string $projectId = null, ?Options $options = null): Operations\CreateAuthorResponse { + $request = new Operations\CreateAuthorRequest( + body: $body, + projectId: $projectId, + ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/authors'); $urlOverride = null; $httpOptions = ['http_errors' => false]; - $body = Utils\Utils::serializeRequestBody($request, 'request', 'json'); + $body = Utils\Utils::serializeRequestBody($request, 'body', 'json'); if ($body === null) { throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); @@ -177,18 +186,24 @@ public function create(Operations\CreateAuthorRequest $request, ?Options $option * Delete a specific author. This resets the author: status, blocks, trust level, metrics and action history are removed. The author is created again with a clean record the next time content is moderated for the same ID. * * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\DeleteAuthorResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function delete(string $id, ?Options $options = null): Operations\DeleteAuthorResponse + public function delete(string $id, ?string $projectId = null, ?Options $options = null): Operations\DeleteAuthorResponse { $request = new Operations\DeleteAuthorRequest( id: $id, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/authors/{id}', Operations\DeleteAuthorRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); @@ -314,18 +329,24 @@ public function delete(string $id, ?Options $options = null): Operations\DeleteA * Get detailed information about a specific author including historical data and analysis * * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\GetAuthorResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function retrieve(string $id, ?Options $options = null): Operations\GetAuthorResponse + public function retrieve(string $id, ?string $projectId = null, ?Options $options = null): Operations\GetAuthorResponse { $request = new Operations\GetAuthorRequest( id: $id, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/authors/{id}', Operations\GetAuthorRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -462,6 +483,10 @@ private function listIndividual(?Operations\ListAuthorsRequest $request = null, $httpOptions = ['http_errors' => false]; $qp = Utils\Utils::getQueryParams(Operations\ListAuthorsRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -532,6 +557,7 @@ private function listIndividual(?Operations\ListAuthorsRequest $request = null, memberSinceDate: $request != null ? $request->memberSinceDate : null, lastActiveDate: $request != null ? $request->lastActiveDate : null, contentTypes: $request != null ? $request->contentTypes : null, + projectId: $request != null ? $request->projectId : null, ), ); }; @@ -646,14 +672,16 @@ public function list(?Operations\ListAuthorsRequest $request = null, ?Options $o * * @param \ModerationApi\Models\Operations\UpdateAuthorRequestBody $body * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\UpdateAuthorResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function update(Operations\UpdateAuthorRequestBody $body, string $id, ?Options $options = null): Operations\UpdateAuthorResponse + public function update(Operations\UpdateAuthorRequestBody $body, string $id, ?string $projectId = null, ?Options $options = null): Operations\UpdateAuthorResponse { $request = new Operations\UpdateAuthorRequest( id: $id, body: $body, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/authors/{id}', Operations\UpdateAuthorRequest::class, $request); @@ -664,6 +692,10 @@ public function update(Operations\UpdateAuthorRequestBody $body, string $id, ?Op throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('PUT', $url); diff --git a/src/Content.php b/src/Content.php index 09dda20..8af6896 100644 --- a/src/Content.php +++ b/src/Content.php @@ -45,23 +45,32 @@ public function getUrl(string $baseUrl, array $urlVariables): string } /** - * submit + * Submit content * - * @param \ModerationApi\Models\Operations\SubmitContentRequest $request + * @param \ModerationApi\Models\Operations\SubmitContentRequestBody $body + * @param ?string $projectId * @return \ModerationApi\Models\Operations\SubmitContentResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function submit(Operations\SubmitContentRequest $request, ?Options $options = null): Operations\SubmitContentResponse + public function submit(Operations\SubmitContentRequestBody $body, ?string $projectId = null, ?Options $options = null): Operations\SubmitContentResponse { + $request = new Operations\SubmitContentRequest( + body: $body, + projectId: $projectId, + ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/moderate'); $urlOverride = null; $httpOptions = ['http_errors' => false]; - $body = Utils\Utils::serializeRequestBody($request, 'request', 'json'); + $body = Utils\Utils::serializeRequestBody($request, 'body', 'json'); if ($body === null) { throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); diff --git a/src/Items.php b/src/Items.php index 2d08c7b..05995e3 100644 --- a/src/Items.php +++ b/src/Items.php @@ -61,6 +61,10 @@ private function listIndividual(Operations\ListQueueItemsRequest $request, ?Opti $httpOptions = ['http_errors' => false]; $qp = Utils\Utils::getQueryParams(Operations\ListQueueItemsRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -136,6 +140,7 @@ private function listIndividual(Operations\ListQueueItemsRequest $request, ?Opti includeResolved: $request != null ? $request->includeResolved : null, authorId: $request != null ? $request->authorId : null, filteredActionIds: $request != null ? $request->filteredActionIds : null, + projectId: $request != null ? $request->projectId : null, ), ); }; @@ -251,15 +256,17 @@ public function list(Operations\ListQueueItemsRequest $request, ?Options $option * @param \ModerationApi\Models\Operations\ResolveQueueItemRequestBody $body * @param string $id * @param string $itemId + * @param ?string $projectId * @return \ModerationApi\Models\Operations\ResolveQueueItemResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function resolve(Operations\ResolveQueueItemRequestBody $body, string $id, string $itemId, ?Options $options = null): Operations\ResolveQueueItemResponse + public function resolve(Operations\ResolveQueueItemRequestBody $body, string $id, string $itemId, ?string $projectId = null, ?Options $options = null): Operations\ResolveQueueItemResponse { $request = new Operations\ResolveQueueItemRequest( id: $id, itemId: $itemId, body: $body, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/queue/{id}/items/{itemId}/resolve', Operations\ResolveQueueItemRequest::class, $request); @@ -270,6 +277,10 @@ public function resolve(Operations\ResolveQueueItemRequestBody $body, string $id throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); @@ -385,15 +396,17 @@ public function resolve(Operations\ResolveQueueItemRequestBody $body, string $id * @param \ModerationApi\Models\Operations\UnresolveQueueItemRequestBody $body * @param string $id * @param string $itemId + * @param ?string $projectId * @return \ModerationApi\Models\Operations\UnresolveQueueItemResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function unresolve(Operations\UnresolveQueueItemRequestBody $body, string $id, string $itemId, ?Options $options = null): Operations\UnresolveQueueItemResponse + public function unresolve(Operations\UnresolveQueueItemRequestBody $body, string $id, string $itemId, ?string $projectId = null, ?Options $options = null): Operations\UnresolveQueueItemResponse { $request = new Operations\UnresolveQueueItemRequest( id: $id, itemId: $itemId, body: $body, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/queue/{id}/items/{itemId}/unresolve', Operations\UnresolveQueueItemRequest::class, $request); @@ -404,6 +417,10 @@ public function unresolve(Operations\UnresolveQueueItemRequestBody $body, string throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); diff --git a/src/Models/Components/BadRequestErrorCode.php b/src/Models/Components/BadRequestErrorCode.php index 1002908..1d45d13 100644 --- a/src/Models/Components/BadRequestErrorCode.php +++ b/src/Models/Components/BadRequestErrorCode.php @@ -14,10 +14,12 @@ * * * - `invalid_request`: A parameter is invalid. `message` says which one. + * - `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the organization has more than one project. * - `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`. */ enum BadRequestErrorCode: string { case InvalidRequest = 'invalid_request'; + case ProjectIdRequired = 'project_id_required'; case ValidationFailed = 'validation_failed'; } diff --git a/src/Models/Components/PermissionDeniedErrorCode.php b/src/Models/Components/PermissionDeniedErrorCode.php index b094637..1c9745d 100644 --- a/src/Models/Components/PermissionDeniedErrorCode.php +++ b/src/Models/Components/PermissionDeniedErrorCode.php @@ -18,7 +18,6 @@ * - `quota_exceeded`: The organization has used all API requests on its plan. * - `plan_feature_unavailable`: The current plan does not include this feature. * - `plan_limit_exceeded`: The request goes over a limit of the current plan. - * - `project_key_required`: This endpoint needs a project API key, but an organization key was used. * - `organization_key_required`: This endpoint needs an organization API key, but a project key was used. * - `missing_key_permission`: The organization key does not have the permission this endpoint needs. * - `project_not_reachable`: The organization key is limited to other projects. @@ -30,7 +29,6 @@ enum PermissionDeniedErrorCode: string case QuotaExceeded = 'quota_exceeded'; case PlanFeatureUnavailable = 'plan_feature_unavailable'; case PlanLimitExceeded = 'plan_limit_exceeded'; - case ProjectKeyRequired = 'project_key_required'; case OrganizationKeyRequired = 'organization_key_required'; case MissingKeyPermission = 'missing_key_permission'; case ProjectNotReachable = 'project_not_reachable'; diff --git a/src/Models/Errors/BadRequestError.php b/src/Models/Errors/BadRequestError.php index 663f451..9eba859 100644 --- a/src/Models/Errors/BadRequestError.php +++ b/src/Models/Errors/BadRequestError.php @@ -26,6 +26,7 @@ class BadRequestError * * * - `invalid_request`: A parameter is invalid. `message` says which one. + * - `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the organization has more than one project. * - `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`. * * @var \ModerationApi\Models\Components\BadRequestErrorCode $code diff --git a/src/Models/Errors/PermissionDeniedError.php b/src/Models/Errors/PermissionDeniedError.php index 7a4a2be..5f4981c 100644 --- a/src/Models/Errors/PermissionDeniedError.php +++ b/src/Models/Errors/PermissionDeniedError.php @@ -30,7 +30,6 @@ class PermissionDeniedError * - `quota_exceeded`: The organization has used all API requests on its plan. * - `plan_feature_unavailable`: The current plan does not include this feature. * - `plan_limit_exceeded`: The request goes over a limit of the current plan. - * - `project_key_required`: This endpoint needs a project API key, but an organization key was used. * - `organization_key_required`: This endpoint needs an organization API key, but a project key was used. * - `missing_key_permission`: The organization key does not have the permission this endpoint needs. * - `project_not_reachable`: The organization key is limited to other projects. diff --git a/src/Models/Operations/AddWordlistWordsRequest.php b/src/Models/Operations/AddWordlistWordsRequest.php index 59b9e0e..4b83231 100644 --- a/src/Models/Operations/AddWordlistWordsRequest.php +++ b/src/Models/Operations/AddWordlistWordsRequest.php @@ -26,14 +26,24 @@ class AddWordlistWordsRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public AddWordlistWordsRequestBody $body; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id * @param \ModerationApi\Models\Operations\AddWordlistWordsRequestBody $body + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, AddWordlistWordsRequestBody $body) + public function __construct(string $id, AddWordlistWordsRequestBody $body, ?string $projectId = null) { $this->id = $id; $this->body = $body; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateActionRequest.php b/src/Models/Operations/CreateActionRequest.php index d795c32..0a38986 100644 --- a/src/Models/Operations/CreateActionRequest.php +++ b/src/Models/Operations/CreateActionRequest.php @@ -8,138 +8,32 @@ namespace ModerationApi\Models\Operations; - +use ModerationApi\Utils\SpeakeasyMetadata; class CreateActionRequest { /** - * The name of the action. - * - * @var string $name - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('name')] - public string $name; - - /** - * The IDs of the queues the action is available in. - * - * @var ?array $filterInQueueIds - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('filterInQueueIds')] - #[\Speakeasy\Serializer\Annotation\Type('array|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $filterInQueueIds = null; - - /** - * The possible values of the action. The user will be prompted to select one of these values when executing the action. - * - * @var ?array<\ModerationApi\Models\Operations\CreateActionPossibleValueRequest> $possibleValues - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('possibleValues')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\CreateActionPossibleValueRequest>|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $possibleValues = null; - - /** - * User defined key of the action. - * - * @var ?string $key - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('key')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $key = null; - - /** - * The description of the action. - * - * @var ?string $description - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('description')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $description = null; - - /** - * The type of the action. - * - * @var ?\ModerationApi\Models\Operations\CreateActionTypeRequest $type - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('type')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\CreateActionTypeRequest|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CreateActionTypeRequest $type = null; - - /** - * Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status. - * - * @var ?\ModerationApi\Models\Operations\CreateActionQueueBehaviourRequest $queueBehaviour - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('queueBehaviour')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\CreateActionQueueBehaviourRequest|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CreateActionQueueBehaviourRequest $queueBehaviour = null; - - /** - * Show the action in all queues, selected queues or no queues (to use via API only). - * - * @var ?\ModerationApi\Models\Operations\CreateActionPositionRequest $position - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('position')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\CreateActionPositionRequest|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CreateActionPositionRequest $position = null; - - /** - * Whether the action requires a value to be executed. - * - * @var ?bool $valueRequired - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('valueRequired')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?bool $valueRequired = null; - - /** - * Whether the action allows any text to be entered as a value or if it must be one of the possible values. * - * @var ?bool $freeText + * @var \ModerationApi\Models\Operations\CreateActionRequestBody $body */ - #[\Speakeasy\Serializer\Annotation\SerializedName('freeText')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?bool $freeText = null; + #[SpeakeasyMetadata('request:mediaType=application/json')] + public CreateActionRequestBody $body; /** - * Whether the action is a built-in action or a custom one. + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. * - * @var ?bool $builtIn + * @var ?string $projectId */ - #[\Speakeasy\Serializer\Annotation\SerializedName('builtIn')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?bool $builtIn = null; + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; /** - * @param string $name - * @param ?\ModerationApi\Models\Operations\CreateActionQueueBehaviourRequest $queueBehaviour - * @param ?array $filterInQueueIds - * @param ?\ModerationApi\Models\Operations\CreateActionPositionRequest $position - * @param ?array<\ModerationApi\Models\Operations\CreateActionPossibleValueRequest> $possibleValues - * @param ?bool $valueRequired - * @param ?bool $freeText - * @param ?string $key - * @param ?string $description - * @param ?\ModerationApi\Models\Operations\CreateActionTypeRequest $type - * @param ?bool $builtIn + * @param \ModerationApi\Models\Operations\CreateActionRequestBody $body + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $name, ?array $filterInQueueIds = null, ?array $possibleValues = null, ?string $key = null, ?string $description = null, ?CreateActionTypeRequest $type = null, ?CreateActionQueueBehaviourRequest $queueBehaviour = CreateActionQueueBehaviourRequest::NoChange, ?CreateActionPositionRequest $position = CreateActionPositionRequest::AllQueues, ?bool $valueRequired = false, ?bool $freeText = false, ?bool $builtIn = false) + public function __construct(CreateActionRequestBody $body, ?string $projectId = null) { - $this->name = $name; - $this->filterInQueueIds = $filterInQueueIds; - $this->possibleValues = $possibleValues; - $this->key = $key; - $this->description = $description; - $this->type = $type; - $this->queueBehaviour = $queueBehaviour; - $this->position = $position; - $this->valueRequired = $valueRequired; - $this->freeText = $freeText; - $this->builtIn = $builtIn; + $this->body = $body; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateActionRequestBody.php b/src/Models/Operations/CreateActionRequestBody.php new file mode 100644 index 0000000..2157c16 --- /dev/null +++ b/src/Models/Operations/CreateActionRequestBody.php @@ -0,0 +1,145 @@ + $filterInQueueIds + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('filterInQueueIds')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $filterInQueueIds = null; + + /** + * The possible values of the action. The user will be prompted to select one of these values when executing the action. + * + * @var ?array<\ModerationApi\Models\Operations\CreateActionPossibleValueRequest> $possibleValues + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('possibleValues')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\CreateActionPossibleValueRequest>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $possibleValues = null; + + /** + * User defined key of the action. + * + * @var ?string $key + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('key')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $key = null; + + /** + * The description of the action. + * + * @var ?string $description + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('description')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $description = null; + + /** + * The type of the action. + * + * @var ?\ModerationApi\Models\Operations\CreateActionTypeRequest $type + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('type')] + #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\CreateActionTypeRequest|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?CreateActionTypeRequest $type = null; + + /** + * Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status. + * + * @var ?\ModerationApi\Models\Operations\CreateActionQueueBehaviourRequest $queueBehaviour + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('queueBehaviour')] + #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\CreateActionQueueBehaviourRequest|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?CreateActionQueueBehaviourRequest $queueBehaviour = null; + + /** + * Show the action in all queues, selected queues or no queues (to use via API only). + * + * @var ?\ModerationApi\Models\Operations\CreateActionPositionRequest $position + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('position')] + #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\CreateActionPositionRequest|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?CreateActionPositionRequest $position = null; + + /** + * Whether the action requires a value to be executed. + * + * @var ?bool $valueRequired + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('valueRequired')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $valueRequired = null; + + /** + * Whether the action allows any text to be entered as a value or if it must be one of the possible values. + * + * @var ?bool $freeText + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('freeText')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $freeText = null; + + /** + * Whether the action is a built-in action or a custom one. + * + * @var ?bool $builtIn + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('builtIn')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $builtIn = null; + + /** + * @param string $name + * @param ?\ModerationApi\Models\Operations\CreateActionQueueBehaviourRequest $queueBehaviour + * @param ?array $filterInQueueIds + * @param ?\ModerationApi\Models\Operations\CreateActionPositionRequest $position + * @param ?array<\ModerationApi\Models\Operations\CreateActionPossibleValueRequest> $possibleValues + * @param ?bool $valueRequired + * @param ?bool $freeText + * @param ?string $key + * @param ?string $description + * @param ?\ModerationApi\Models\Operations\CreateActionTypeRequest $type + * @param ?bool $builtIn + * @phpstan-pure + */ + public function __construct(string $name, ?array $filterInQueueIds = null, ?array $possibleValues = null, ?string $key = null, ?string $description = null, ?CreateActionTypeRequest $type = null, ?CreateActionQueueBehaviourRequest $queueBehaviour = CreateActionQueueBehaviourRequest::NoChange, ?CreateActionPositionRequest $position = CreateActionPositionRequest::AllQueues, ?bool $valueRequired = false, ?bool $freeText = false, ?bool $builtIn = false) + { + $this->name = $name; + $this->filterInQueueIds = $filterInQueueIds; + $this->possibleValues = $possibleValues; + $this->key = $key; + $this->description = $description; + $this->type = $type; + $this->queueBehaviour = $queueBehaviour; + $this->position = $position; + $this->valueRequired = $valueRequired; + $this->freeText = $freeText; + $this->builtIn = $builtIn; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateAuthorRequest.php b/src/Models/Operations/CreateAuthorRequest.php index a57c89c..5c4e3e5 100644 --- a/src/Models/Operations/CreateAuthorRequest.php +++ b/src/Models/Operations/CreateAuthorRequest.php @@ -8,122 +8,32 @@ namespace ModerationApi\Models\Operations; - +use ModerationApi\Utils\SpeakeasyMetadata; class CreateAuthorRequest { /** - * External ID of the user, typically the ID of the author in your database. - * - * @var string $externalId - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('external_id')] - public string $externalId; - - /** - * Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process. - * - * @var ?\ModerationApi\Models\Operations\CreateAuthorMetadata $metadata - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\CreateAuthorMetadata|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CreateAuthorMetadata $metadata = null; - - /** - * Timestamp when author first appeared - * - * @var ?float $firstSeen - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('first_seen')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?float $firstSeen = null; - - /** - * Timestamp of last activity - * - * @var ?float $lastSeen - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('last_seen')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?float $lastSeen = null; - - /** - * URL of the author's profile picture - * - * @var ?string $profilePicture - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('profile_picture')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $profilePicture = null; - - /** - * URL of the author's external profile - * - * @var ?string $externalLink - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('external_link')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $externalLink = null; - - /** - * Author name or identifier - * - * @var ?string $name - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('name')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $name = null; - - /** - * Author email address - * - * @var ?string $email - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('email')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $email = null; - - /** - * The author's company or organization * - * @var ?string $company + * @var \ModerationApi\Models\Operations\CreateAuthorRequestBody $body */ - #[\Speakeasy\Serializer\Annotation\SerializedName('company')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $company = null; + #[SpeakeasyMetadata('request:mediaType=application/json')] + public CreateAuthorRequestBody $body; /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. * - * @var ?float $manualTrustLevel + * @var ?string $projectId */ - #[\Speakeasy\Serializer\Annotation\SerializedName('manual_trust_level')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?float $manualTrustLevel = null; + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; /** - * @param string $externalId - * @param ?\ModerationApi\Models\Operations\CreateAuthorMetadata $metadata - * @param ?float $firstSeen - * @param ?float $lastSeen - * @param ?string $profilePicture - * @param ?string $externalLink - * @param ?string $name - * @param ?string $email - * @param ?string $company - * @param ?float $manualTrustLevel + * @param \ModerationApi\Models\Operations\CreateAuthorRequestBody $body + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $externalId, ?CreateAuthorMetadata $metadata = null, ?float $firstSeen = null, ?float $lastSeen = null, ?string $profilePicture = null, ?string $externalLink = null, ?string $name = null, ?string $email = null, ?string $company = null, ?float $manualTrustLevel = null) + public function __construct(CreateAuthorRequestBody $body, ?string $projectId = null) { - $this->externalId = $externalId; - $this->metadata = $metadata; - $this->firstSeen = $firstSeen; - $this->lastSeen = $lastSeen; - $this->profilePicture = $profilePicture; - $this->externalLink = $externalLink; - $this->name = $name; - $this->email = $email; - $this->company = $company; - $this->manualTrustLevel = $manualTrustLevel; + $this->body = $body; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateAuthorRequestBody.php b/src/Models/Operations/CreateAuthorRequestBody.php new file mode 100644 index 0000000..68fb930 --- /dev/null +++ b/src/Models/Operations/CreateAuthorRequestBody.php @@ -0,0 +1,129 @@ +externalId = $externalId; + $this->metadata = $metadata; + $this->firstSeen = $firstSeen; + $this->lastSeen = $lastSeen; + $this->profilePicture = $profilePicture; + $this->externalLink = $externalLink; + $this->name = $name; + $this->email = $email; + $this->company = $company; + $this->manualTrustLevel = $manualTrustLevel; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateWebhookRequest.php b/src/Models/Operations/CreateWebhookRequest.php index a9c6294..057b59e 100644 --- a/src/Models/Operations/CreateWebhookRequest.php +++ b/src/Models/Operations/CreateWebhookRequest.php @@ -8,55 +8,32 @@ namespace ModerationApi\Models\Operations; - +use ModerationApi\Utils\SpeakeasyMetadata; class CreateWebhookRequest { /** - * The webhook's name, used to identify it in the dashboard - * - * @var string $name - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('name')] - public string $name; - - /** - * The webhook's URL. We'll call this URL when an event occurs. - * - * @var string $url - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('url')] - public string $url; - - /** - * Event types this webhook subscribes to. One webhook URL receives all events you list here. * - * @var array<\ModerationApi\Models\Operations\CreateWebhookEventTypeRequest> $eventTypes + * @var \ModerationApi\Models\Operations\CreateWebhookRequestBody $body */ - #[\Speakeasy\Serializer\Annotation\SerializedName('eventTypes')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\CreateWebhookEventTypeRequest>')] - public array $eventTypes; + #[SpeakeasyMetadata('request:mediaType=application/json')] + public CreateWebhookRequestBody $body; /** - * The webhook's description + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. * - * @var ?string $description + * @var ?string $projectId */ - #[\Speakeasy\Serializer\Annotation\SerializedName('description')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $description = null; + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; /** - * @param string $name - * @param string $url - * @param array<\ModerationApi\Models\Operations\CreateWebhookEventTypeRequest> $eventTypes - * @param ?string $description + * @param \ModerationApi\Models\Operations\CreateWebhookRequestBody $body + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $name, string $url, array $eventTypes, ?string $description = null) + public function __construct(CreateWebhookRequestBody $body, ?string $projectId = null) { - $this->name = $name; - $this->url = $url; - $this->eventTypes = $eventTypes; - $this->description = $description; + $this->body = $body; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateWebhookRequestBody.php b/src/Models/Operations/CreateWebhookRequestBody.php new file mode 100644 index 0000000..43ac745 --- /dev/null +++ b/src/Models/Operations/CreateWebhookRequestBody.php @@ -0,0 +1,62 @@ + $eventTypes + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('eventTypes')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\CreateWebhookEventTypeRequest>')] + public array $eventTypes; + + /** + * The webhook's description + * + * @var ?string $description + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('description')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $description = null; + + /** + * @param string $name + * @param string $url + * @param array<\ModerationApi\Models\Operations\CreateWebhookEventTypeRequest> $eventTypes + * @param ?string $description + * @phpstan-pure + */ + public function __construct(string $name, string $url, array $eventTypes, ?string $description = null) + { + $this->name = $name; + $this->url = $url; + $this->eventTypes = $eventTypes; + $this->description = $description; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteActionRequest.php b/src/Models/Operations/DeleteActionRequest.php index eb3b89c..2a50c92 100644 --- a/src/Models/Operations/DeleteActionRequest.php +++ b/src/Models/Operations/DeleteActionRequest.php @@ -19,12 +19,22 @@ class DeleteActionRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=id')] public string $id; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id) + public function __construct(string $id, ?string $projectId = null) { $this->id = $id; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/DeleteAuthorRequest.php b/src/Models/Operations/DeleteAuthorRequest.php index 1423090..8b7f4e6 100644 --- a/src/Models/Operations/DeleteAuthorRequest.php +++ b/src/Models/Operations/DeleteAuthorRequest.php @@ -19,12 +19,22 @@ class DeleteAuthorRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=id')] public string $id; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id) + public function __construct(string $id, ?string $projectId = null) { $this->id = $id; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/DeleteWebhookRequest.php b/src/Models/Operations/DeleteWebhookRequest.php index c0145c3..f879c14 100644 --- a/src/Models/Operations/DeleteWebhookRequest.php +++ b/src/Models/Operations/DeleteWebhookRequest.php @@ -19,12 +19,22 @@ class DeleteWebhookRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=id')] public string $id; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id) + public function __construct(string $id, ?string $projectId = null) { $this->id = $id; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/ExecuteActionRequest.php b/src/Models/Operations/ExecuteActionRequest.php index 60cdacc..ce6a22b 100644 --- a/src/Models/Operations/ExecuteActionRequest.php +++ b/src/Models/Operations/ExecuteActionRequest.php @@ -8,81 +8,32 @@ namespace ModerationApi\Models\Operations; - -/** ExecuteActionRequest - Input parameters */ +use ModerationApi\Utils\SpeakeasyMetadata; class ExecuteActionRequest { /** - * ID or key of the action to execute - * - * @var string $actionKey - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('actionKey')] - public string $actionKey; - - /** - * IDs of the content items to apply the action to. Provide this or authorIds. - * - * @var ?array $contentIds - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('contentIds')] - #[\Speakeasy\Serializer\Annotation\Type('array|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $contentIds = null; - - /** - * IDs of the authors to apply the action to. Provide this or contentIds. - * - * @var ?array $authorIds - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('authorIds')] - #[\Speakeasy\Serializer\Annotation\Type('array|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $authorIds = null; - - /** - * Optional value to provide with the action - * - * @var ?string $value - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('value')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $value = null; - - /** - * Optional queue ID if the action is queue-specific * - * @var ?string $queueId + * @var \ModerationApi\Models\Operations\ExecuteActionRequestBody $body */ - #[\Speakeasy\Serializer\Annotation\SerializedName('queueId')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $queueId = null; + #[SpeakeasyMetadata('request:mediaType=application/json')] + public ExecuteActionRequestBody $body; /** - * Optional duration in milliseconds for actions with timeouts + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. * - * @var ?float $duration + * @var ?string $projectId */ - #[\Speakeasy\Serializer\Annotation\SerializedName('duration')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?float $duration = null; + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; /** - * @param string $actionKey - * @param ?array $contentIds - * @param ?array $authorIds - * @param ?string $value - * @param ?string $queueId - * @param ?float $duration + * @param \ModerationApi\Models\Operations\ExecuteActionRequestBody $body + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $actionKey, ?array $contentIds = null, ?array $authorIds = null, ?string $value = null, ?string $queueId = null, ?float $duration = null) + public function __construct(ExecuteActionRequestBody $body, ?string $projectId = null) { - $this->actionKey = $actionKey; - $this->contentIds = $contentIds; - $this->authorIds = $authorIds; - $this->value = $value; - $this->queueId = $queueId; - $this->duration = $duration; + $this->body = $body; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/ExecuteActionRequestBody.php b/src/Models/Operations/ExecuteActionRequestBody.php new file mode 100644 index 0000000..642198c --- /dev/null +++ b/src/Models/Operations/ExecuteActionRequestBody.php @@ -0,0 +1,88 @@ + $contentIds + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('contentIds')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $contentIds = null; + + /** + * IDs of the authors to apply the action to. Provide this or contentIds. + * + * @var ?array $authorIds + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('authorIds')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $authorIds = null; + + /** + * Optional value to provide with the action + * + * @var ?string $value + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('value')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $value = null; + + /** + * Optional queue ID if the action is queue-specific + * + * @var ?string $queueId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('queueId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $queueId = null; + + /** + * Optional duration in milliseconds for actions with timeouts + * + * @var ?float $duration + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('duration')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $duration = null; + + /** + * @param string $actionKey + * @param ?array $contentIds + * @param ?array $authorIds + * @param ?string $value + * @param ?string $queueId + * @param ?float $duration + * @phpstan-pure + */ + public function __construct(string $actionKey, ?array $contentIds = null, ?array $authorIds = null, ?string $value = null, ?string $queueId = null, ?float $duration = null) + { + $this->actionKey = $actionKey; + $this->contentIds = $contentIds; + $this->authorIds = $authorIds; + $this->value = $value; + $this->queueId = $queueId; + $this->duration = $duration; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAccountRequest.php b/src/Models/Operations/GetAccountRequest.php new file mode 100644 index 0000000..9f23b2a --- /dev/null +++ b/src/Models/Operations/GetAccountRequest.php @@ -0,0 +1,30 @@ +projectId = $projectId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetActionRequest.php b/src/Models/Operations/GetActionRequest.php index c526ba6..f61298a 100644 --- a/src/Models/Operations/GetActionRequest.php +++ b/src/Models/Operations/GetActionRequest.php @@ -19,12 +19,22 @@ class GetActionRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=id')] public string $id; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id) + public function __construct(string $id, ?string $projectId = null) { $this->id = $id; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/GetAuthorRequest.php b/src/Models/Operations/GetAuthorRequest.php index 92194ed..5c88e1c 100644 --- a/src/Models/Operations/GetAuthorRequest.php +++ b/src/Models/Operations/GetAuthorRequest.php @@ -19,12 +19,22 @@ class GetAuthorRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=id')] public string $id; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id) + public function __construct(string $id, ?string $projectId = null) { $this->id = $id; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/GetQueueRequest.php b/src/Models/Operations/GetQueueRequest.php index 89aa420..866a07c 100644 --- a/src/Models/Operations/GetQueueRequest.php +++ b/src/Models/Operations/GetQueueRequest.php @@ -19,12 +19,22 @@ class GetQueueRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=id')] public string $id; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id) + public function __construct(string $id, ?string $projectId = null) { $this->id = $id; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/GetQueueStatsRequest.php b/src/Models/Operations/GetQueueStatsRequest.php index 5ab6014..9c52168 100644 --- a/src/Models/Operations/GetQueueStatsRequest.php +++ b/src/Models/Operations/GetQueueStatsRequest.php @@ -19,6 +19,14 @@ class GetQueueStatsRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=id')] public string $id; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * * @var ?int $withinDays @@ -29,11 +37,13 @@ class GetQueueStatsRequest /** * @param string $id * @param ?int $withinDays + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, ?int $withinDays = 30) + public function __construct(string $id, ?string $projectId = null, ?int $withinDays = 30) { $this->id = $id; + $this->projectId = $projectId; $this->withinDays = $withinDays; } } \ No newline at end of file diff --git a/src/Models/Operations/GetWebhookRequest.php b/src/Models/Operations/GetWebhookRequest.php index a6e0818..9e3141f 100644 --- a/src/Models/Operations/GetWebhookRequest.php +++ b/src/Models/Operations/GetWebhookRequest.php @@ -19,12 +19,22 @@ class GetWebhookRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=id')] public string $id; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id) + public function __construct(string $id, ?string $projectId = null) { $this->id = $id; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/GetWebhookSecretRequest.php b/src/Models/Operations/GetWebhookSecretRequest.php new file mode 100644 index 0000000..7fdf322 --- /dev/null +++ b/src/Models/Operations/GetWebhookSecretRequest.php @@ -0,0 +1,30 @@ +projectId = $projectId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetWordlistEmbeddingStatusRequest.php b/src/Models/Operations/GetWordlistEmbeddingStatusRequest.php index 319846b..2ff8340 100644 --- a/src/Models/Operations/GetWordlistEmbeddingStatusRequest.php +++ b/src/Models/Operations/GetWordlistEmbeddingStatusRequest.php @@ -19,12 +19,22 @@ class GetWordlistEmbeddingStatusRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=id')] public string $id; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id) + public function __construct(string $id, ?string $projectId = null) { $this->id = $id; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/GetWordlistRequest.php b/src/Models/Operations/GetWordlistRequest.php index e68f9ac..409fd7e 100644 --- a/src/Models/Operations/GetWordlistRequest.php +++ b/src/Models/Operations/GetWordlistRequest.php @@ -19,12 +19,22 @@ class GetWordlistRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=id')] public string $id; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id) + public function __construct(string $id, ?string $projectId = null) { $this->id = $id; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/ListActionsRequest.php b/src/Models/Operations/ListActionsRequest.php index e86357c..cb0a8f5 100644 --- a/src/Models/Operations/ListActionsRequest.php +++ b/src/Models/Operations/ListActionsRequest.php @@ -18,6 +18,14 @@ class ListActionsRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=queueId')] public ?string $queueId = null; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * * @var ?int $page @@ -36,11 +44,13 @@ class ListActionsRequest * @param ?string $queueId * @param ?int $page * @param ?int $pageSize + * @param ?string $projectId * @phpstan-pure */ - public function __construct(?string $queueId = null, ?int $page = 1, ?int $pageSize = 20) + public function __construct(?string $queueId = null, ?string $projectId = null, ?int $page = 1, ?int $pageSize = 20) { $this->queueId = $queueId; + $this->projectId = $projectId; $this->page = $page; $this->pageSize = $pageSize; } diff --git a/src/Models/Operations/ListAuthorsRequest.php b/src/Models/Operations/ListAuthorsRequest.php index aafddc4..a6dff2c 100644 --- a/src/Models/Operations/ListAuthorsRequest.php +++ b/src/Models/Operations/ListAuthorsRequest.php @@ -40,6 +40,14 @@ class ListAuthorsRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=contentTypes')] public ?array $contentTypes = null; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * * @var ?int $page @@ -70,14 +78,16 @@ class ListAuthorsRequest * @param ?string $memberSinceDate * @param ?string $lastActiveDate * @param ?array $contentTypes + * @param ?string $projectId * @phpstan-pure */ - public function __construct(?SortBy $sortBy = null, ?string $memberSinceDate = null, ?string $lastActiveDate = null, ?array $contentTypes = null, ?int $page = 1, ?int $pageSize = 20, ?ListAuthorsSortDirection $sortDirection = ListAuthorsSortDirection::Desc) + public function __construct(?SortBy $sortBy = null, ?string $memberSinceDate = null, ?string $lastActiveDate = null, ?array $contentTypes = null, ?string $projectId = null, ?int $page = 1, ?int $pageSize = 20, ?ListAuthorsSortDirection $sortDirection = ListAuthorsSortDirection::Desc) { $this->sortBy = $sortBy; $this->memberSinceDate = $memberSinceDate; $this->lastActiveDate = $lastActiveDate; $this->contentTypes = $contentTypes; + $this->projectId = $projectId; $this->page = $page; $this->pageSize = $pageSize; $this->sortDirection = $sortDirection; diff --git a/src/Models/Operations/ListQueueItemsRequest.php b/src/Models/Operations/ListQueueItemsRequest.php index 375290f..138da00 100644 --- a/src/Models/Operations/ListQueueItemsRequest.php +++ b/src/Models/Operations/ListQueueItemsRequest.php @@ -78,6 +78,14 @@ class ListQueueItemsRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=filteredActionIds')] public ?array $filteredActionIds = null; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * * @var ?int $page @@ -113,9 +121,10 @@ class ListQueueItemsRequest * @param ?bool $includeResolved * @param ?string $authorId * @param ?array $filteredActionIds + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, ?SortField $sortField = null, ?array $conversationIds = null, ?array $labels = null, ?string $afterDate = null, ?string $beforeDate = null, ?bool $includeResolved = null, ?string $authorId = null, ?array $filteredActionIds = null, ?int $page = 1, ?int $pageSize = 20, ?ListQueueItemsSortDirection $sortDirection = ListQueueItemsSortDirection::Desc) + public function __construct(string $id, ?SortField $sortField = null, ?array $conversationIds = null, ?array $labels = null, ?string $afterDate = null, ?string $beforeDate = null, ?bool $includeResolved = null, ?string $authorId = null, ?array $filteredActionIds = null, ?string $projectId = null, ?int $page = 1, ?int $pageSize = 20, ?ListQueueItemsSortDirection $sortDirection = ListQueueItemsSortDirection::Desc) { $this->id = $id; $this->sortField = $sortField; @@ -126,6 +135,7 @@ public function __construct(string $id, ?SortField $sortField = null, ?array $co $this->includeResolved = $includeResolved; $this->authorId = $authorId; $this->filteredActionIds = $filteredActionIds; + $this->projectId = $projectId; $this->page = $page; $this->pageSize = $pageSize; $this->sortDirection = $sortDirection; diff --git a/src/Models/Operations/ListWebhooksRequest.php b/src/Models/Operations/ListWebhooksRequest.php index d52e6f5..076c2d0 100644 --- a/src/Models/Operations/ListWebhooksRequest.php +++ b/src/Models/Operations/ListWebhooksRequest.php @@ -11,6 +11,14 @@ use ModerationApi\Utils\SpeakeasyMetadata; class ListWebhooksRequest { + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * * @var ?int $page @@ -28,10 +36,12 @@ class ListWebhooksRequest /** * @param ?int $page * @param ?int $pageSize + * @param ?string $projectId * @phpstan-pure */ - public function __construct(?int $page = 1, ?int $pageSize = 20) + public function __construct(?string $projectId = null, ?int $page = 1, ?int $pageSize = 20) { + $this->projectId = $projectId; $this->page = $page; $this->pageSize = $pageSize; } diff --git a/src/Models/Operations/ListWordlistsRequest.php b/src/Models/Operations/ListWordlistsRequest.php index d7374d4..9ce7bdf 100644 --- a/src/Models/Operations/ListWordlistsRequest.php +++ b/src/Models/Operations/ListWordlistsRequest.php @@ -11,6 +11,14 @@ use ModerationApi\Utils\SpeakeasyMetadata; class ListWordlistsRequest { + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * * @var ?int $page @@ -28,10 +36,12 @@ class ListWordlistsRequest /** * @param ?int $page * @param ?int $pageSize + * @param ?string $projectId * @phpstan-pure */ - public function __construct(?int $page = 1, ?int $pageSize = 20) + public function __construct(?string $projectId = null, ?int $page = 1, ?int $pageSize = 20) { + $this->projectId = $projectId; $this->page = $page; $this->pageSize = $pageSize; } diff --git a/src/Models/Operations/RemoveWordlistWordsRequest.php b/src/Models/Operations/RemoveWordlistWordsRequest.php index eb2b20c..ad55e37 100644 --- a/src/Models/Operations/RemoveWordlistWordsRequest.php +++ b/src/Models/Operations/RemoveWordlistWordsRequest.php @@ -27,14 +27,24 @@ class RemoveWordlistWordsRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=words')] public array $words; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id * @param array $words + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, array $words) + public function __construct(string $id, array $words, ?string $projectId = null) { $this->id = $id; $this->words = $words; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/ResolveQueueItemRequest.php b/src/Models/Operations/ResolveQueueItemRequest.php index 6e14275..ae449f8 100644 --- a/src/Models/Operations/ResolveQueueItemRequest.php +++ b/src/Models/Operations/ResolveQueueItemRequest.php @@ -34,16 +34,26 @@ class ResolveQueueItemRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public ResolveQueueItemRequestBody $body; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id * @param string $itemId * @param \ModerationApi\Models\Operations\ResolveQueueItemRequestBody $body + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, string $itemId, ResolveQueueItemRequestBody $body) + public function __construct(string $id, string $itemId, ResolveQueueItemRequestBody $body, ?string $projectId = null) { $this->id = $id; $this->itemId = $itemId; $this->body = $body; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/SubmitContentRequest.php b/src/Models/Operations/SubmitContentRequest.php index f0282d3..4afd9db 100644 --- a/src/Models/Operations/SubmitContentRequest.php +++ b/src/Models/Operations/SubmitContentRequest.php @@ -8,139 +8,32 @@ namespace ModerationApi\Models\Operations; - +use ModerationApi\Utils\SpeakeasyMetadata; class SubmitContentRequest { /** - * The content sent for moderation - * - * @var \ModerationApi\Models\Operations\TextRequest|\ModerationApi\Models\Operations\ImageRequest|\ModerationApi\Models\Operations\VideoRequest|\ModerationApi\Models\Operations\AudioRequest|\ModerationApi\Models\Operations\ObjectT $content - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('content')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\TextRequest|\ModerationApi\Models\Operations\ImageRequest|\ModerationApi\Models\Operations\VideoRequest|\ModerationApi\Models\Operations\AudioRequest|\ModerationApi\Models\Operations\ObjectT')] - #[\Speakeasy\Serializer\Annotation\UnionDiscriminator(field: 'type', map: ['text' => '\ModerationApi\Models\Operations\TextRequest', 'image' => '\ModerationApi\Models\Operations\ImageRequest', 'video' => '\ModerationApi\Models\Operations\VideoRequest', 'audio' => '\ModerationApi\Models\Operations\AudioRequest', 'object' => '\ModerationApi\Models\Operations\ObjectT'])] - public TextRequest|ImageRequest|VideoRequest|AudioRequest|ObjectT $content; - - /** - * Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. - * - * @var ?float $timestamp - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('timestamp')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?float $timestamp = null; - - /** - * Provide a channel ID or key. Will use the project's default channel if not provided. - * - * @var ?string $channel - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('channel')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $channel = null; - - /** - * The unique ID of the content in your database. - * - * @var ?string $contentId - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('contentId')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $contentId = null; - - /** - * The meta type of content being moderated - * - * @var ?\ModerationApi\Models\Operations\MetaType $metaType - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('metaType')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\MetaType|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?MetaType $metaType = null; - - /** - * The author of the content. - * - * @var ?string $authorId - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('authorId')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $authorId = null; - - /** - * For example the ID of a chat room or a post - * - * @var ?string $conversationId - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('conversationId')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $conversationId = null; - - /** - * Any metadata you want to store with the content - * - * @var ?array $metadata - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('metadata')] - #[\Speakeasy\Serializer\Annotation\Type('array|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $metadata = null; - - /** - * A recommendation from your own client-side flagging (e.g. a banned-IP list or a third-party tool). Feeds the rules engine and can escalate or override the recommended action. Does not change whether our analysis flagged the content. - * - * @var ?\ModerationApi\Models\Operations\ClientAction $clientAction - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('clientAction')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\ClientAction|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?ClientAction $clientAction = null; - - /** - * Do not store the content. The content won't enter the review queue * - * @var ?bool $doNotStore + * @var \ModerationApi\Models\Operations\SubmitContentRequestBody $body */ - #[\Speakeasy\Serializer\Annotation\SerializedName('doNotStore')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?bool $doNotStore = null; + #[SpeakeasyMetadata('request:mediaType=application/json')] + public SubmitContentRequestBody $body; /** - * (Enterprise) override the channel policies for this moderation request only. + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. * - * @var ?array<\ModerationApi\Models\Operations\Toxicity|\ModerationApi\Models\Operations\PersonalInformation|\ModerationApi\Models\Operations\Hate|\ModerationApi\Models\Operations\Illicit|\ModerationApi\Models\Operations\IllicitDrugs|\ModerationApi\Models\Operations\IllicitAlcohol|\ModerationApi\Models\Operations\IllicitFirearms|\ModerationApi\Models\Operations\IllicitTobacco|\ModerationApi\Models\Operations\IllicitGambling|\ModerationApi\Models\Operations\Cannabis|\ModerationApi\Models\Operations\Adult|\ModerationApi\Models\Operations\Crypto|\ModerationApi\Models\Operations\Sexual|\ModerationApi\Models\Operations\SexualMinors|\ModerationApi\Models\Operations\Profanity|\ModerationApi\Models\Operations\Violence|\ModerationApi\Models\Operations\SelfHarm|\ModerationApi\Models\Operations\Spam|\ModerationApi\Models\Operations\LowQualityContent|\ModerationApi\Models\Operations\FaceDetection|\ModerationApi\Models\Operations\SelfPromotion|\ModerationApi\Models\Operations\Political|\ModerationApi\Models\Operations\Religion|\ModerationApi\Models\Operations\Threat|\ModerationApi\Models\Operations\SexualSolicitation|\ModerationApi\Models\Operations\ChannelCircumvention|\ModerationApi\Models\Operations\IllegalTrade|\ModerationApi\Models\Operations\Alcohol|\ModerationApi\Models\Operations\Drugs|\ModerationApi\Models\Operations\Gambling|\ModerationApi\Models\Operations\Tobacco|\ModerationApi\Models\Operations\Weapons|\ModerationApi\Models\Operations\Promotion|\ModerationApi\Models\Operations\Extremism|\ModerationApi\Models\Operations\CodeAbuse|\ModerationApi\Models\Operations\UnicodeSpoofing|\ModerationApi\Models\Operations\PIIMasking|\ModerationApi\Models\Operations\URLMasking|\ModerationApi\Models\Operations\URLRisk|\ModerationApi\Models\Operations\Guideline> $policies + * @var ?string $projectId */ - #[\Speakeasy\Serializer\Annotation\SerializedName('policies')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\Toxicity|\ModerationApi\Models\Operations\PersonalInformation|\ModerationApi\Models\Operations\Hate|\ModerationApi\Models\Operations\Illicit|\ModerationApi\Models\Operations\IllicitDrugs|\ModerationApi\Models\Operations\IllicitAlcohol|\ModerationApi\Models\Operations\IllicitFirearms|\ModerationApi\Models\Operations\IllicitTobacco|\ModerationApi\Models\Operations\IllicitGambling|\ModerationApi\Models\Operations\Cannabis|\ModerationApi\Models\Operations\Adult|\ModerationApi\Models\Operations\Crypto|\ModerationApi\Models\Operations\Sexual|\ModerationApi\Models\Operations\SexualMinors|\ModerationApi\Models\Operations\Profanity|\ModerationApi\Models\Operations\Violence|\ModerationApi\Models\Operations\SelfHarm|\ModerationApi\Models\Operations\Spam|\ModerationApi\Models\Operations\LowQualityContent|\ModerationApi\Models\Operations\FaceDetection|\ModerationApi\Models\Operations\SelfPromotion|\ModerationApi\Models\Operations\Political|\ModerationApi\Models\Operations\Religion|\ModerationApi\Models\Operations\Threat|\ModerationApi\Models\Operations\SexualSolicitation|\ModerationApi\Models\Operations\ChannelCircumvention|\ModerationApi\Models\Operations\IllegalTrade|\ModerationApi\Models\Operations\Alcohol|\ModerationApi\Models\Operations\Drugs|\ModerationApi\Models\Operations\Gambling|\ModerationApi\Models\Operations\Tobacco|\ModerationApi\Models\Operations\Weapons|\ModerationApi\Models\Operations\Promotion|\ModerationApi\Models\Operations\Extremism|\ModerationApi\Models\Operations\CodeAbuse|\ModerationApi\Models\Operations\UnicodeSpoofing|\ModerationApi\Models\Operations\PIIMasking|\ModerationApi\Models\Operations\URLMasking|\ModerationApi\Models\Operations\URLRisk|\ModerationApi\Models\Operations\Guideline>|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $policies = null; + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; /** - * @param \ModerationApi\Models\Operations\TextRequest|\ModerationApi\Models\Operations\ImageRequest|\ModerationApi\Models\Operations\VideoRequest|\ModerationApi\Models\Operations\AudioRequest|\ModerationApi\Models\Operations\ObjectT $content - * @param ?float $timestamp - * @param ?string $channel - * @param ?string $contentId - * @param ?\ModerationApi\Models\Operations\MetaType $metaType - * @param ?string $authorId - * @param ?string $conversationId - * @param ?array $metadata - * @param ?\ModerationApi\Models\Operations\ClientAction $clientAction - * @param ?bool $doNotStore - * @param ?array<\ModerationApi\Models\Operations\Toxicity|\ModerationApi\Models\Operations\PersonalInformation|\ModerationApi\Models\Operations\Hate|\ModerationApi\Models\Operations\Illicit|\ModerationApi\Models\Operations\IllicitDrugs|\ModerationApi\Models\Operations\IllicitAlcohol|\ModerationApi\Models\Operations\IllicitFirearms|\ModerationApi\Models\Operations\IllicitTobacco|\ModerationApi\Models\Operations\IllicitGambling|\ModerationApi\Models\Operations\Cannabis|\ModerationApi\Models\Operations\Adult|\ModerationApi\Models\Operations\Crypto|\ModerationApi\Models\Operations\Sexual|\ModerationApi\Models\Operations\SexualMinors|\ModerationApi\Models\Operations\Profanity|\ModerationApi\Models\Operations\Violence|\ModerationApi\Models\Operations\SelfHarm|\ModerationApi\Models\Operations\Spam|\ModerationApi\Models\Operations\LowQualityContent|\ModerationApi\Models\Operations\FaceDetection|\ModerationApi\Models\Operations\SelfPromotion|\ModerationApi\Models\Operations\Political|\ModerationApi\Models\Operations\Religion|\ModerationApi\Models\Operations\Threat|\ModerationApi\Models\Operations\SexualSolicitation|\ModerationApi\Models\Operations\ChannelCircumvention|\ModerationApi\Models\Operations\IllegalTrade|\ModerationApi\Models\Operations\Alcohol|\ModerationApi\Models\Operations\Drugs|\ModerationApi\Models\Operations\Gambling|\ModerationApi\Models\Operations\Tobacco|\ModerationApi\Models\Operations\Weapons|\ModerationApi\Models\Operations\Promotion|\ModerationApi\Models\Operations\Extremism|\ModerationApi\Models\Operations\CodeAbuse|\ModerationApi\Models\Operations\UnicodeSpoofing|\ModerationApi\Models\Operations\PIIMasking|\ModerationApi\Models\Operations\URLMasking|\ModerationApi\Models\Operations\URLRisk|\ModerationApi\Models\Operations\Guideline> $policies + * @param \ModerationApi\Models\Operations\SubmitContentRequestBody $body + * @param ?string $projectId * @phpstan-pure */ - public function __construct(TextRequest|ImageRequest|VideoRequest|AudioRequest|ObjectT $content, ?float $timestamp = null, ?string $channel = null, ?string $contentId = null, ?MetaType $metaType = null, ?string $authorId = null, ?string $conversationId = null, ?array $metadata = null, ?ClientAction $clientAction = null, ?bool $doNotStore = null, ?array $policies = null) + public function __construct(SubmitContentRequestBody $body, ?string $projectId = null) { - $this->content = $content; - $this->timestamp = $timestamp; - $this->channel = $channel; - $this->contentId = $contentId; - $this->metaType = $metaType; - $this->authorId = $authorId; - $this->conversationId = $conversationId; - $this->metadata = $metadata; - $this->clientAction = $clientAction; - $this->doNotStore = $doNotStore; - $this->policies = $policies; + $this->body = $body; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/SubmitContentRequestBody.php b/src/Models/Operations/SubmitContentRequestBody.php new file mode 100644 index 0000000..e58589e --- /dev/null +++ b/src/Models/Operations/SubmitContentRequestBody.php @@ -0,0 +1,146 @@ + '\ModerationApi\Models\Operations\TextRequest', 'image' => '\ModerationApi\Models\Operations\ImageRequest', 'video' => '\ModerationApi\Models\Operations\VideoRequest', 'audio' => '\ModerationApi\Models\Operations\AudioRequest', 'object' => '\ModerationApi\Models\Operations\ObjectT'])] + public TextRequest|ImageRequest|VideoRequest|AudioRequest|ObjectT $content; + + /** + * Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. + * + * @var ?float $timestamp + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('timestamp')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $timestamp = null; + + /** + * Provide a channel ID or key. Will use the project's default channel if not provided. + * + * @var ?string $channel + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('channel')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $channel = null; + + /** + * The unique ID of the content in your database. + * + * @var ?string $contentId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('contentId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $contentId = null; + + /** + * The meta type of content being moderated + * + * @var ?\ModerationApi\Models\Operations\MetaType $metaType + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('metaType')] + #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\MetaType|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?MetaType $metaType = null; + + /** + * The author of the content. + * + * @var ?string $authorId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('authorId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $authorId = null; + + /** + * For example the ID of a chat room or a post + * + * @var ?string $conversationId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('conversationId')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $conversationId = null; + + /** + * Any metadata you want to store with the content + * + * @var ?array $metadata + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('metadata')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $metadata = null; + + /** + * A recommendation from your own client-side flagging (e.g. a banned-IP list or a third-party tool). Feeds the rules engine and can escalate or override the recommended action. Does not change whether our analysis flagged the content. + * + * @var ?\ModerationApi\Models\Operations\ClientAction $clientAction + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('clientAction')] + #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\ClientAction|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?ClientAction $clientAction = null; + + /** + * Do not store the content. The content won't enter the review queue + * + * @var ?bool $doNotStore + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('doNotStore')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $doNotStore = null; + + /** + * (Enterprise) override the channel policies for this moderation request only. + * + * @var ?array<\ModerationApi\Models\Operations\Toxicity|\ModerationApi\Models\Operations\PersonalInformation|\ModerationApi\Models\Operations\Hate|\ModerationApi\Models\Operations\Illicit|\ModerationApi\Models\Operations\IllicitDrugs|\ModerationApi\Models\Operations\IllicitAlcohol|\ModerationApi\Models\Operations\IllicitFirearms|\ModerationApi\Models\Operations\IllicitTobacco|\ModerationApi\Models\Operations\IllicitGambling|\ModerationApi\Models\Operations\Cannabis|\ModerationApi\Models\Operations\Adult|\ModerationApi\Models\Operations\Crypto|\ModerationApi\Models\Operations\Sexual|\ModerationApi\Models\Operations\SexualMinors|\ModerationApi\Models\Operations\Profanity|\ModerationApi\Models\Operations\Violence|\ModerationApi\Models\Operations\SelfHarm|\ModerationApi\Models\Operations\Spam|\ModerationApi\Models\Operations\LowQualityContent|\ModerationApi\Models\Operations\FaceDetection|\ModerationApi\Models\Operations\SelfPromotion|\ModerationApi\Models\Operations\Political|\ModerationApi\Models\Operations\Religion|\ModerationApi\Models\Operations\Threat|\ModerationApi\Models\Operations\SexualSolicitation|\ModerationApi\Models\Operations\ChannelCircumvention|\ModerationApi\Models\Operations\IllegalTrade|\ModerationApi\Models\Operations\Alcohol|\ModerationApi\Models\Operations\Drugs|\ModerationApi\Models\Operations\Gambling|\ModerationApi\Models\Operations\Tobacco|\ModerationApi\Models\Operations\Weapons|\ModerationApi\Models\Operations\Promotion|\ModerationApi\Models\Operations\Extremism|\ModerationApi\Models\Operations\CodeAbuse|\ModerationApi\Models\Operations\UnicodeSpoofing|\ModerationApi\Models\Operations\PIIMasking|\ModerationApi\Models\Operations\URLMasking|\ModerationApi\Models\Operations\URLRisk|\ModerationApi\Models\Operations\Guideline> $policies + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('policies')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\Toxicity|\ModerationApi\Models\Operations\PersonalInformation|\ModerationApi\Models\Operations\Hate|\ModerationApi\Models\Operations\Illicit|\ModerationApi\Models\Operations\IllicitDrugs|\ModerationApi\Models\Operations\IllicitAlcohol|\ModerationApi\Models\Operations\IllicitFirearms|\ModerationApi\Models\Operations\IllicitTobacco|\ModerationApi\Models\Operations\IllicitGambling|\ModerationApi\Models\Operations\Cannabis|\ModerationApi\Models\Operations\Adult|\ModerationApi\Models\Operations\Crypto|\ModerationApi\Models\Operations\Sexual|\ModerationApi\Models\Operations\SexualMinors|\ModerationApi\Models\Operations\Profanity|\ModerationApi\Models\Operations\Violence|\ModerationApi\Models\Operations\SelfHarm|\ModerationApi\Models\Operations\Spam|\ModerationApi\Models\Operations\LowQualityContent|\ModerationApi\Models\Operations\FaceDetection|\ModerationApi\Models\Operations\SelfPromotion|\ModerationApi\Models\Operations\Political|\ModerationApi\Models\Operations\Religion|\ModerationApi\Models\Operations\Threat|\ModerationApi\Models\Operations\SexualSolicitation|\ModerationApi\Models\Operations\ChannelCircumvention|\ModerationApi\Models\Operations\IllegalTrade|\ModerationApi\Models\Operations\Alcohol|\ModerationApi\Models\Operations\Drugs|\ModerationApi\Models\Operations\Gambling|\ModerationApi\Models\Operations\Tobacco|\ModerationApi\Models\Operations\Weapons|\ModerationApi\Models\Operations\Promotion|\ModerationApi\Models\Operations\Extremism|\ModerationApi\Models\Operations\CodeAbuse|\ModerationApi\Models\Operations\UnicodeSpoofing|\ModerationApi\Models\Operations\PIIMasking|\ModerationApi\Models\Operations\URLMasking|\ModerationApi\Models\Operations\URLRisk|\ModerationApi\Models\Operations\Guideline>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $policies = null; + + /** + * @param \ModerationApi\Models\Operations\TextRequest|\ModerationApi\Models\Operations\ImageRequest|\ModerationApi\Models\Operations\VideoRequest|\ModerationApi\Models\Operations\AudioRequest|\ModerationApi\Models\Operations\ObjectT $content + * @param ?float $timestamp + * @param ?string $channel + * @param ?string $contentId + * @param ?\ModerationApi\Models\Operations\MetaType $metaType + * @param ?string $authorId + * @param ?string $conversationId + * @param ?array $metadata + * @param ?\ModerationApi\Models\Operations\ClientAction $clientAction + * @param ?bool $doNotStore + * @param ?array<\ModerationApi\Models\Operations\Toxicity|\ModerationApi\Models\Operations\PersonalInformation|\ModerationApi\Models\Operations\Hate|\ModerationApi\Models\Operations\Illicit|\ModerationApi\Models\Operations\IllicitDrugs|\ModerationApi\Models\Operations\IllicitAlcohol|\ModerationApi\Models\Operations\IllicitFirearms|\ModerationApi\Models\Operations\IllicitTobacco|\ModerationApi\Models\Operations\IllicitGambling|\ModerationApi\Models\Operations\Cannabis|\ModerationApi\Models\Operations\Adult|\ModerationApi\Models\Operations\Crypto|\ModerationApi\Models\Operations\Sexual|\ModerationApi\Models\Operations\SexualMinors|\ModerationApi\Models\Operations\Profanity|\ModerationApi\Models\Operations\Violence|\ModerationApi\Models\Operations\SelfHarm|\ModerationApi\Models\Operations\Spam|\ModerationApi\Models\Operations\LowQualityContent|\ModerationApi\Models\Operations\FaceDetection|\ModerationApi\Models\Operations\SelfPromotion|\ModerationApi\Models\Operations\Political|\ModerationApi\Models\Operations\Religion|\ModerationApi\Models\Operations\Threat|\ModerationApi\Models\Operations\SexualSolicitation|\ModerationApi\Models\Operations\ChannelCircumvention|\ModerationApi\Models\Operations\IllegalTrade|\ModerationApi\Models\Operations\Alcohol|\ModerationApi\Models\Operations\Drugs|\ModerationApi\Models\Operations\Gambling|\ModerationApi\Models\Operations\Tobacco|\ModerationApi\Models\Operations\Weapons|\ModerationApi\Models\Operations\Promotion|\ModerationApi\Models\Operations\Extremism|\ModerationApi\Models\Operations\CodeAbuse|\ModerationApi\Models\Operations\UnicodeSpoofing|\ModerationApi\Models\Operations\PIIMasking|\ModerationApi\Models\Operations\URLMasking|\ModerationApi\Models\Operations\URLRisk|\ModerationApi\Models\Operations\Guideline> $policies + * @phpstan-pure + */ + public function __construct(TextRequest|ImageRequest|VideoRequest|AudioRequest|ObjectT $content, ?float $timestamp = null, ?string $channel = null, ?string $contentId = null, ?MetaType $metaType = null, ?string $authorId = null, ?string $conversationId = null, ?array $metadata = null, ?ClientAction $clientAction = null, ?bool $doNotStore = null, ?array $policies = null) + { + $this->content = $content; + $this->timestamp = $timestamp; + $this->channel = $channel; + $this->contentId = $contentId; + $this->metaType = $metaType; + $this->authorId = $authorId; + $this->conversationId = $conversationId; + $this->metadata = $metadata; + $this->clientAction = $clientAction; + $this->doNotStore = $doNotStore; + $this->policies = $policies; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UnresolveQueueItemRequest.php b/src/Models/Operations/UnresolveQueueItemRequest.php index 691116a..c48457e 100644 --- a/src/Models/Operations/UnresolveQueueItemRequest.php +++ b/src/Models/Operations/UnresolveQueueItemRequest.php @@ -34,16 +34,26 @@ class UnresolveQueueItemRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public UnresolveQueueItemRequestBody $body; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id * @param string $itemId * @param \ModerationApi\Models\Operations\UnresolveQueueItemRequestBody $body + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, string $itemId, UnresolveQueueItemRequestBody $body) + public function __construct(string $id, string $itemId, UnresolveQueueItemRequestBody $body, ?string $projectId = null) { $this->id = $id; $this->itemId = $itemId; $this->body = $body; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateActionRequest.php b/src/Models/Operations/UpdateActionRequest.php index 5adc7e7..7e0ef4e 100644 --- a/src/Models/Operations/UpdateActionRequest.php +++ b/src/Models/Operations/UpdateActionRequest.php @@ -26,14 +26,24 @@ class UpdateActionRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public UpdateActionRequestBody $body; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id * @param \ModerationApi\Models\Operations\UpdateActionRequestBody $body + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, UpdateActionRequestBody $body) + public function __construct(string $id, UpdateActionRequestBody $body, ?string $projectId = null) { $this->id = $id; $this->body = $body; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateAuthorRequest.php b/src/Models/Operations/UpdateAuthorRequest.php index 0f31d94..4494636 100644 --- a/src/Models/Operations/UpdateAuthorRequest.php +++ b/src/Models/Operations/UpdateAuthorRequest.php @@ -26,14 +26,24 @@ class UpdateAuthorRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public UpdateAuthorRequestBody $body; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id * @param \ModerationApi\Models\Operations\UpdateAuthorRequestBody $body + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, UpdateAuthorRequestBody $body) + public function __construct(string $id, UpdateAuthorRequestBody $body, ?string $projectId = null) { $this->id = $id; $this->body = $body; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateWebhookRequest.php b/src/Models/Operations/UpdateWebhookRequest.php index 0bc46f1..674ae61 100644 --- a/src/Models/Operations/UpdateWebhookRequest.php +++ b/src/Models/Operations/UpdateWebhookRequest.php @@ -26,14 +26,24 @@ class UpdateWebhookRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public UpdateWebhookRequestBody $body; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id * @param \ModerationApi\Models\Operations\UpdateWebhookRequestBody $body + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, UpdateWebhookRequestBody $body) + public function __construct(string $id, UpdateWebhookRequestBody $body, ?string $projectId = null) { $this->id = $id; $this->body = $body; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateWordlistRequest.php b/src/Models/Operations/UpdateWordlistRequest.php index 7b2665c..5249ce3 100644 --- a/src/Models/Operations/UpdateWordlistRequest.php +++ b/src/Models/Operations/UpdateWordlistRequest.php @@ -26,14 +26,24 @@ class UpdateWordlistRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public UpdateWordlistRequestBody $body; + /** + * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * + * @var ?string $projectId + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=Project-Id')] + public ?string $projectId = null; + /** * @param string $id * @param \ModerationApi\Models\Operations\UpdateWordlistRequestBody $body + * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, UpdateWordlistRequestBody $body) + public function __construct(string $id, UpdateWordlistRequestBody $body, ?string $projectId = null) { $this->id = $id; $this->body = $body; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Queue.php b/src/Queue.php index dcc6307..ef3fad1 100644 --- a/src/Queue.php +++ b/src/Queue.php @@ -53,18 +53,24 @@ public function getUrl(string $baseUrl, array $urlVariables): string * Get a queue * * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\GetQueueResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function retrieve(string $id, ?Options $options = null): Operations\GetQueueResponse + public function retrieve(string $id, ?string $projectId = null, ?Options $options = null): Operations\GetQueueResponse { $request = new Operations\GetQueueRequest( id: $id, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/queue/{id}', Operations\GetQueueRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -191,14 +197,16 @@ public function retrieve(string $id, ?Options $options = null): Operations\GetQu * * @param string $id * @param ?int $withinDays + * @param ?string $projectId * @return \ModerationApi\Models\Operations\GetQueueStatsResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function getStats(string $id, ?int $withinDays = null, ?Options $options = null): Operations\GetQueueStatsResponse + public function getStats(string $id, ?int $withinDays = null, ?string $projectId = null, ?Options $options = null): Operations\GetQueueStatsResponse { $request = new Operations\GetQueueStatsRequest( id: $id, withinDays: $withinDays, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/queue/{id}/stats', Operations\GetQueueStatsRequest::class, $request); @@ -206,6 +214,10 @@ public function getStats(string $id, ?int $withinDays = null, ?Options $options $httpOptions = ['http_errors' => false]; $qp = Utils\Utils::getQueryParams(Operations\GetQueueStatsRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index a3d1392..15ed7c6 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.0.0'; + public string $sdkVersion = '1.1.0'; public string $genVersion = 'internal'; - public string $userAgent = 'speakeasy-sdk/php 1.0.0 internal 1.1.0 moderation-api/sdk-php'; + public string $userAgent = 'speakeasy-sdk/php 1.1.0 internal 1.1.0 moderation-api/sdk-php'; public ?RetryConfig $retryConfig = null; diff --git a/src/WebhookSecret.php b/src/WebhookSecret.php index 35910a4..3f77821 100644 --- a/src/WebhookSecret.php +++ b/src/WebhookSecret.php @@ -49,15 +49,23 @@ public function getUrl(string $baseUrl, array $urlVariables): string * * Get the signing secret used to sign webhook deliveries for this project, creating one if none exists yet. Verify deliveries by comparing the `modapi-signature` header to HMAC-SHA256(raw request body, secret) hex-encoded. * + * @param ?string $projectId * @return \ModerationApi\Models\Operations\GetWebhookSecretResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function retrieve(?Options $options = null): Operations\GetWebhookSecretResponse + public function retrieve(?string $projectId = null, ?Options $options = null): Operations\GetWebhookSecretResponse { + $request = new Operations\GetWebhookSecretRequest( + projectId: $projectId, + ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/webhook-secret'); $urlOverride = null; $httpOptions = ['http_errors' => false]; + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); diff --git a/src/Webhooks.php b/src/Webhooks.php index 2793e9f..58a80a0 100644 --- a/src/Webhooks.php +++ b/src/Webhooks.php @@ -49,21 +49,30 @@ public function getUrl(string $baseUrl, array $urlVariables): string * * Create a webhook subscribed to one or more event types. Deliveries use the v2 envelope and are signed with the project signing secret (see the signing secret endpoint). * - * @param \ModerationApi\Models\Operations\CreateWebhookRequest $request + * @param \ModerationApi\Models\Operations\CreateWebhookRequestBody $body + * @param ?string $projectId * @return \ModerationApi\Models\Operations\CreateWebhookResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function create(Operations\CreateWebhookRequest $request, ?Options $options = null): Operations\CreateWebhookResponse + public function create(Operations\CreateWebhookRequestBody $body, ?string $projectId = null, ?Options $options = null): Operations\CreateWebhookResponse { + $request = new Operations\CreateWebhookRequest( + body: $body, + projectId: $projectId, + ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/webhooks'); $urlOverride = null; $httpOptions = ['http_errors' => false]; - $body = Utils\Utils::serializeRequestBody($request, 'request', 'json'); + $body = Utils\Utils::serializeRequestBody($request, 'body', 'json'); if ($body === null) { throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); @@ -153,18 +162,24 @@ public function create(Operations\CreateWebhookRequest $request, ?Options $optio * Delete a webhook. * * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\DeleteWebhookResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function delete(string $id, ?Options $options = null): Operations\DeleteWebhookResponse + public function delete(string $id, ?string $projectId = null, ?Options $options = null): Operations\DeleteWebhookResponse { $request = new Operations\DeleteWebhookRequest( id: $id, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/webhooks/{id}', Operations\DeleteWebhookRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); @@ -254,18 +269,24 @@ public function delete(string $id, ?Options $options = null): Operations\DeleteW * Get a webhook by ID. * * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\GetWebhookResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function retrieve(string $id, ?Options $options = null): Operations\GetWebhookResponse + public function retrieve(string $id, ?string $projectId = null, ?Options $options = null): Operations\GetWebhookResponse { $request = new Operations\GetWebhookRequest( id: $id, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/webhooks/{id}', Operations\GetWebhookRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -356,14 +377,16 @@ public function retrieve(string $id, ?Options $options = null): Operations\GetWe * * @param ?int $page * @param ?int $pageSize + * @param ?string $projectId * @return \ModerationApi\Models\Operations\ListWebhooksResponse * @throws \ModerationApi\Models\Errors\APIException */ - private function listIndividual(?int $page = null, ?int $pageSize = null, ?Options $options = null): Operations\ListWebhooksResponse + private function listIndividual(?int $page = null, ?int $pageSize = null, ?string $projectId = null, ?Options $options = null): Operations\ListWebhooksResponse { $request = new Operations\ListWebhooksRequest( page: $page, pageSize: $pageSize, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/webhooks'); @@ -371,6 +394,10 @@ private function listIndividual(?int $page = null, ?int $pageSize = null, ?Optio $httpOptions = ['http_errors' => false]; $qp = Utils\Utils::getQueryParams(Operations\ListWebhooksRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -435,6 +462,7 @@ private function listIndividual(?int $page = null, ?int $pageSize = null, ?Optio return $sdk->listIndividual( page: $nextPage, pageSize: $request != null ? $request->pageSize : null, + projectId: $request != null ? $request->projectId : null, ); }; @@ -482,12 +510,13 @@ private function listIndividual(?int $page = null, ?int $pageSize = null, ?Optio * * @param ?int $page * @param ?int $pageSize + * @param ?string $projectId * @return \Generator<\ModerationApi\Models\Operations\ListWebhooksResponse> * @throws \ModerationApi\Models\Errors\APIException */ - public function list(?int $page = null, ?int $pageSize = null, ?Options $options = null): \Generator + public function list(?int $page = null, ?int $pageSize = null, ?string $projectId = null, ?Options $options = null): \Generator { - $res = $this->listIndividual($page, $pageSize, $options); + $res = $this->listIndividual($page, $pageSize, $projectId, $options); while ($res !== null) { yield $res; $res = $res->next($res); @@ -501,14 +530,16 @@ public function list(?int $page = null, ?int $pageSize = null, ?Options $options * * @param \ModerationApi\Models\Operations\UpdateWebhookRequestBody $body * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\UpdateWebhookResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function update(Operations\UpdateWebhookRequestBody $body, string $id, ?Options $options = null): Operations\UpdateWebhookResponse + public function update(Operations\UpdateWebhookRequestBody $body, string $id, ?string $projectId = null, ?Options $options = null): Operations\UpdateWebhookResponse { $request = new Operations\UpdateWebhookRequest( id: $id, body: $body, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/webhooks/{id}', Operations\UpdateWebhookRequest::class, $request); @@ -519,6 +550,10 @@ public function update(Operations\UpdateWebhookRequestBody $body, string $id, ?O throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('PUT', $url); diff --git a/src/Wordlist.php b/src/Wordlist.php index c5b2791..a5aab9b 100644 --- a/src/Wordlist.php +++ b/src/Wordlist.php @@ -53,18 +53,24 @@ public function getUrl(string $baseUrl, array $urlVariables): string * Get a specific wordlist by ID * * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\GetWordlistResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function retrieve(string $id, ?Options $options = null): Operations\GetWordlistResponse + public function retrieve(string $id, ?string $projectId = null, ?Options $options = null): Operations\GetWordlistResponse { $request = new Operations\GetWordlistRequest( id: $id, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/wordlist/{id}', Operations\GetWordlistRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -190,18 +196,24 @@ public function retrieve(string $id, ?Options $options = null): Operations\GetWo * Get the current embedding progress status for a wordlist * * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\GetWordlistEmbeddingStatusResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function getEmbeddingStatus(string $id, ?Options $options = null): Operations\GetWordlistEmbeddingStatusResponse + public function getEmbeddingStatus(string $id, ?string $projectId = null, ?Options $options = null): Operations\GetWordlistEmbeddingStatusResponse { $request = new Operations\GetWordlistEmbeddingStatusRequest( id: $id, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/wordlist/{id}/embedding-status', Operations\GetWordlistEmbeddingStatusRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -328,14 +340,16 @@ public function getEmbeddingStatus(string $id, ?Options $options = null): Operat * * @param ?int $page * @param ?int $pageSize + * @param ?string $projectId * @return \ModerationApi\Models\Operations\ListWordlistsResponse * @throws \ModerationApi\Models\Errors\APIException */ - private function listIndividual(?int $page = null, ?int $pageSize = null, ?Options $options = null): Operations\ListWordlistsResponse + private function listIndividual(?int $page = null, ?int $pageSize = null, ?string $projectId = null, ?Options $options = null): Operations\ListWordlistsResponse { $request = new Operations\ListWordlistsRequest( page: $page, pageSize: $pageSize, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/wordlist'); @@ -343,6 +357,10 @@ private function listIndividual(?int $page = null, ?int $pageSize = null, ?Optio $httpOptions = ['http_errors' => false]; $qp = Utils\Utils::getQueryParams(Operations\ListWordlistsRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -407,6 +425,7 @@ private function listIndividual(?int $page = null, ?int $pageSize = null, ?Optio return $sdk->listIndividual( page: $nextPage, pageSize: $request != null ? $request->pageSize : null, + projectId: $request != null ? $request->projectId : null, ); }; @@ -502,12 +521,13 @@ private function listIndividual(?int $page = null, ?int $pageSize = null, ?Optio * * @param ?int $page * @param ?int $pageSize + * @param ?string $projectId * @return \Generator<\ModerationApi\Models\Operations\ListWordlistsResponse> * @throws \ModerationApi\Models\Errors\APIException */ - public function list(?int $page = null, ?int $pageSize = null, ?Options $options = null): \Generator + public function list(?int $page = null, ?int $pageSize = null, ?string $projectId = null, ?Options $options = null): \Generator { - $res = $this->listIndividual($page, $pageSize, $options); + $res = $this->listIndividual($page, $pageSize, $projectId, $options); while ($res !== null) { yield $res; $res = $res->next($res); @@ -521,14 +541,16 @@ public function list(?int $page = null, ?int $pageSize = null, ?Options $options * * @param \ModerationApi\Models\Operations\UpdateWordlistRequestBody $body * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\UpdateWordlistResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function update(Operations\UpdateWordlistRequestBody $body, string $id, ?Options $options = null): Operations\UpdateWordlistResponse + public function update(Operations\UpdateWordlistRequestBody $body, string $id, ?string $projectId = null, ?Options $options = null): Operations\UpdateWordlistResponse { $request = new Operations\UpdateWordlistRequest( id: $id, body: $body, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/wordlist/{id}', Operations\UpdateWordlistRequest::class, $request); @@ -539,6 +561,10 @@ public function update(Operations\UpdateWordlistRequestBody $body, string $id, ? throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('PUT', $url); diff --git a/src/Words.php b/src/Words.php index aa2e9bd..39d391d 100644 --- a/src/Words.php +++ b/src/Words.php @@ -51,14 +51,16 @@ public function getUrl(string $baseUrl, array $urlVariables): string * * @param \ModerationApi\Models\Operations\AddWordlistWordsRequestBody $body * @param string $id + * @param ?string $projectId * @return \ModerationApi\Models\Operations\AddWordlistWordsResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function add(Operations\AddWordlistWordsRequestBody $body, string $id, ?Options $options = null): Operations\AddWordlistWordsResponse + public function add(Operations\AddWordlistWordsRequestBody $body, string $id, ?string $projectId = null, ?Options $options = null): Operations\AddWordlistWordsResponse { $request = new Operations\AddWordlistWordsRequest( id: $id, body: $body, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/wordlist/{id}/words', Operations\AddWordlistWordsRequest::class, $request); @@ -69,6 +71,10 @@ public function add(Operations\AddWordlistWordsRequestBody $body, string $id, ?O throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); @@ -171,14 +177,16 @@ public function add(Operations\AddWordlistWordsRequestBody $body, string $id, ?O * * @param string $id * @param array $words + * @param ?string $projectId * @return \ModerationApi\Models\Operations\RemoveWordlistWordsResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function remove(string $id, array $words, ?Options $options = null): Operations\RemoveWordlistWordsResponse + public function remove(string $id, array $words, ?string $projectId = null, ?Options $options = null): Operations\RemoveWordlistWordsResponse { $request = new Operations\RemoveWordlistWordsRequest( id: $id, words: $words, + projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/wordlist/{id}/words', Operations\RemoveWordlistWordsRequest::class, $request); @@ -186,6 +194,10 @@ public function remove(string $id, array $words, ?Options $options = null): Oper $httpOptions = ['http_errors' => false]; $qp = Utils\Utils::getQueryParams(Operations\RemoveWordlistWordsRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url);