From 45d27970e708445410c3e0ff1391ae7a89c527ce Mon Sep 17 00:00:00 2001 From: chrisdengso <8185683+chrisdengso@users.noreply.github.com> Date: Thu, 22 Oct 2026 12:48:41 +0000 Subject: [PATCH] feat: v5.1.0, API changes --- .github/workflows/publish-npm.yml | 13 +- .speakeasy/gen.lock | 258 +- .speakeasy/gen.yaml | 2 +- .speakeasy/openapi.json | 14224 ++++++++++++++++ CHANGELOG.md | 42 + README.md | 4 +- docs/models/bad-request-error-code.md | 3 +- docs/models/errors/bad-request-error.md | 16 +- docs/models/errors/permission-denied-error.md | 16 +- .../operations/add-wordlist-words-request.md | 9 +- .../operations/create-action-request-body.md | 27 + .../operations/create-action-request.md | 21 +- .../operations/create-author-request-body.md | 26 + .../operations/create-author-request.md | 20 +- .../operations/create-webhook-request-body.md | 22 + .../operations/create-webhook-request.md | 18 +- .../operations/delete-action-request.md | 7 +- .../operations/delete-author-request.md | 7 +- .../operations/delete-webhook-request.md | 7 +- .../operations/execute-action-request-body.md | 24 + .../operations/execute-action-request.md | 18 +- docs/models/operations/get-account-request.md | 15 + docs/models/operations/get-action-request.md | 7 +- docs/models/operations/get-author-request.md | 7 +- docs/models/operations/get-queue-request.md | 7 +- .../operations/get-queue-stats-request.md | 9 +- docs/models/operations/get-webhook-request.md | 7 +- .../operations/get-webhook-secret-request.md | 15 + .../get-wordlist-embedding-status-request.md | 7 +- .../models/operations/get-wordlist-request.md | 7 +- .../models/operations/list-actions-request.md | 11 +- .../models/operations/list-authors-request.md | 19 +- .../operations/list-queue-items-request.md | 29 +- .../operations/list-webhooks-request.md | 9 +- .../operations/list-wordlists-request.md | 9 +- .../remove-wordlist-words-request.md | 9 +- .../operations/resolve-queue-item-request.md | 11 +- .../operations/submit-content-request-body.md | 29 + .../operations/submit-content-request.md | 25 +- .../unresolve-queue-item-request.md | 11 +- .../operations/update-action-request.md | 9 +- .../operations/update-author-request.md | 9 +- .../operations/update-webhook-request.md | 9 +- .../operations/update-wordlist-request.md | 9 +- docs/models/permission-denied-error-code.md | 3 +- docs/sdks/account/README.md | 11 +- docs/sdks/actions/README.md | 84 +- docs/sdks/authors/README.md | 54 +- docs/sdks/content/README.md | 17 +- docs/sdks/items/README.md | 34 +- docs/sdks/queue/README.md | 28 +- docs/sdks/webhooks/README.md | 69 +- docs/sdks/webhooksecret/README.md | 11 +- docs/sdks/wordlist/README.md | 56 +- docs/sdks/words/README.md | 30 +- jsr.json | 2 +- package.json | 2 +- src/funcs/account-retrieve.ts | 27 + src/funcs/actions-create.ts | 26 +- src/funcs/actions-delete.ts | 8 + src/funcs/actions-execute.ts | 26 +- src/funcs/actions-list.ts | 11 +- src/funcs/actions-retrieve.ts | 8 + src/funcs/actions-update.ts | 8 + src/funcs/authors-create.ts | 26 +- src/funcs/authors-delete.ts | 8 + src/funcs/authors-list.ts | 6 +- src/funcs/authors-retrieve.ts | 8 + src/funcs/authors-update.ts | 8 + src/funcs/content-submit.ts | 29 +- src/funcs/queue-get-stats.ts | 8 + src/funcs/queue-items-list.ts | 4 + src/funcs/queue-items-resolve.ts | 8 + src/funcs/queue-items-unresolve.ts | 8 + src/funcs/queue-retrieve.ts | 8 + src/funcs/webhook-secret-retrieve.ts | 30 + src/funcs/webhooks-create.ts | 26 +- src/funcs/webhooks-delete.ts | 8 + src/funcs/webhooks-list.ts | 11 +- src/funcs/webhooks-retrieve.ts | 8 + src/funcs/webhooks-update.ts | 8 + src/funcs/wordlist-get-embedding-status.ts | 8 + src/funcs/wordlist-list.ts | 11 +- src/funcs/wordlist-retrieve.ts | 8 + src/funcs/wordlist-update.ts | 8 + src/funcs/wordlist-words-add.ts | 8 + src/funcs/wordlist-words-remove.ts | 8 + src/lib/config.ts | 4 +- src/models/bad-request-error.ts | 3 + src/models/errors/bad-request-error.ts | 2 + src/models/errors/permission-denied-error.ts | 2 - src/models/operations/add-wordlist-words.ts | 6 + src/models/operations/create-action.ts | 41 +- src/models/operations/create-author.ts | 41 +- src/models/operations/create-webhook.ts | 41 +- src/models/operations/delete-action.ts | 6 + src/models/operations/delete-author.ts | 6 + src/models/operations/delete-webhook.ts | 6 + src/models/operations/execute-action.ts | 41 +- src/models/operations/get-account.ts | 28 + src/models/operations/get-action.ts | 6 + src/models/operations/get-author.ts | 6 + src/models/operations/get-queue-stats.ts | 6 + src/models/operations/get-queue.ts | 6 + src/models/operations/get-webhook-secret.ts | 28 + src/models/operations/get-webhook.ts | 6 + .../get-wordlist-embedding-status.ts | 6 + src/models/operations/get-wordlist.ts | 6 + src/models/operations/list-actions.ts | 6 + src/models/operations/list-authors.ts | 6 + src/models/operations/list-queue-items.ts | 6 + src/models/operations/list-webhooks.ts | 6 + src/models/operations/list-wordlists.ts | 6 + .../operations/remove-wordlist-words.ts | 6 + src/models/operations/resolve-queue-item.ts | 6 + src/models/operations/submit-content.ts | 41 +- src/models/operations/unresolve-queue-item.ts | 6 + src/models/operations/update-action.ts | 6 + src/models/operations/update-author.ts | 6 + src/models/operations/update-webhook.ts | 6 + src/models/operations/update-wordlist.ts | 6 + src/models/permission-denied-error.ts | 3 - src/sdk/account.ts | 2 + src/sdk/actions.ts | 20 +- src/sdk/authors.ts | 12 +- src/sdk/content.ts | 9 +- src/sdk/items.ts | 4 + src/sdk/queue.ts | 4 + src/sdk/webhook-secret.ts | 2 + src/sdk/webhooks.ts | 14 +- src/sdk/wordlist.ts | 8 + src/sdk/words.ts | 4 + 132 files changed, 15756 insertions(+), 577 deletions(-) create mode 100644 .speakeasy/openapi.json create mode 100644 docs/models/operations/create-action-request-body.md create mode 100644 docs/models/operations/create-author-request-body.md create mode 100644 docs/models/operations/create-webhook-request-body.md create mode 100644 docs/models/operations/execute-action-request-body.md create mode 100644 docs/models/operations/get-account-request.md create mode 100644 docs/models/operations/get-webhook-secret-request.md create mode 100644 docs/models/operations/submit-content-request-body.md diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index af6de4f..f05a956 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -1,7 +1,6 @@ # Maintained in moderation-api/sdk-generator (custom/typescript). 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). # npm trusted publishing is configured on npmjs.com for this file name. name: Publish NPM on: @@ -48,8 +47,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 6885693..8a5cff7 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 2331670b-5789-4489-85ed-fb316d2d6d7e management: - docChecksum: 9e61a5512adcd4b1e0a74112ed775731 + docChecksum: c27787b45fc5b72aafff31ba945a9e61 docVersion: 1.1.0 speakeasyVersion: internal generationVersion: internal - releaseVersion: 5.0.0 - configChecksum: defab1f47dfa0a8ff9d566cd53126d94 + releaseVersion: 5.1.0 + configChecksum: 0fc8e088f19e83ce192d82bee6690fae repoURL: https://github.com/moderation-api/sdk-typescript installationURL: https://github.com/moderation-api/sdk-typescript published: true @@ -54,7 +54,7 @@ trackedFiles: docs/models/authentication-error-code.md: last_write_checksum: sha1:ded523611ede5428ec082227fc531295a34bc352 docs/models/bad-request-error-code.md: - last_write_checksum: sha1:d2fe00d0790203b26ef64e55c85e015b49e3d9b3 + last_write_checksum: sha1:c42953467ceb19d3016430f022801e7534eb225e docs/models/block.md: last_write_checksum: sha1:be375b2175db97656f912eb434592a8c292a26c2 docs/models/channel.md: @@ -68,7 +68,7 @@ trackedFiles: docs/models/errors/authentication-error.md: last_write_checksum: sha1:4cdad20cb9444299f43bc605a5c3c77c70710f37 docs/models/errors/bad-request-error.md: - last_write_checksum: sha1:ee95159e4a83451838ed1a27cfab196b73399d3a + last_write_checksum: sha1:9b330660c65d9df7df3cbe9f3fbe526586577382 docs/models/errors/conflict-error.md: last_write_checksum: sha1:dbce58e55529fb66d58147140881b8915ed6f5ad docs/models/errors/internal-server-error.md: @@ -76,7 +76,7 @@ trackedFiles: docs/models/errors/not-found-error.md: last_write_checksum: sha1:eb685f9ec1e5988222ce5e78c285bb7791b8c58f docs/models/errors/permission-denied-error.md: - last_write_checksum: sha1:79278191ab64e4aa8d3af254786f342969cb053d + last_write_checksum: sha1:4f8634c5835b32c836d054ddf8b323d216f18fad docs/models/errors/rate-limit-error.md: last_write_checksum: sha1:bd1c4d8d35ec643da246cd47fe05c6328ce88e8c docs/models/flagging-mode.md: @@ -96,7 +96,7 @@ trackedFiles: docs/models/operations/add-wordlist-words-request-body.md: last_write_checksum: sha1:3fd7ca492410ff345db45fe8b9fe3bdc64953f28 docs/models/operations/add-wordlist-words-request.md: - last_write_checksum: sha1:99825e6fb78da152705eb09e8bd75200a31af3cf + last_write_checksum: sha1:c347e9285b0378e2f450e84447b107ecd04f547d docs/models/operations/add-wordlist-words-response.md: last_write_checksum: sha1:cf1267a9dc5c51917004eeb674372308e5a82c6d docs/models/operations/adult.md: @@ -159,8 +159,10 @@ trackedFiles: last_write_checksum: sha1:358823fe345eea8af757ecd8d84ba795d173f11c docs/models/operations/create-action-queue-behaviour-response.md: last_write_checksum: sha1:937e5acd22243e0bec9763d7d3b021722fb8f3ff + docs/models/operations/create-action-request-body.md: + last_write_checksum: sha1:5618312af9e159916ed0faa89b6059325c6892b8 docs/models/operations/create-action-request.md: - last_write_checksum: sha1:73a56b38697e0d80c750ef31d3b31944ad070cc3 + last_write_checksum: sha1:665b1deb92d23202a149bcdc2fe5ffcc2f71208b docs/models/operations/create-action-response.md: last_write_checksum: sha1:bbb0d0ac31b00fd6decf12fb2249913e53b2d30d docs/models/operations/create-action-type-request.md: @@ -169,8 +171,10 @@ trackedFiles: last_write_checksum: sha1:a2505c2a823a99c00577247825e71ad94976990f docs/models/operations/create-author-metadata.md: last_write_checksum: sha1:e6e1140be3e8681c0ffbaf27fd8b712b9767bb54 + docs/models/operations/create-author-request-body.md: + last_write_checksum: sha1:7df7ceed9c42d185ed2b58990deb10019e98e673 docs/models/operations/create-author-request.md: - last_write_checksum: sha1:98e9de39dae2801d3d0c56e228dc18653b131668 + last_write_checksum: sha1:b68d1ac9f50761a4e14405484a5004a3505699f3 docs/models/operations/create-channel-content-type.md: last_write_checksum: sha1:f72f71a57fad0c33b8cb4bdcdd06ae5697cde2ca docs/models/operations/create-channel-request-body.md: @@ -185,8 +189,10 @@ trackedFiles: last_write_checksum: sha1:6a6e2694799ac01f6a39e7f1606fef8b7446b9db docs/models/operations/create-webhook-payload-version.md: last_write_checksum: sha1:011b9ab90ce0844ef9b1950bbda3ccac963e4b06 + docs/models/operations/create-webhook-request-body.md: + last_write_checksum: sha1:669bd2cfe24389708e54b2f92aa65236807c384e docs/models/operations/create-webhook-request.md: - last_write_checksum: sha1:b00001abb16a47bd433b2b6e71d24aeb12850008 + last_write_checksum: sha1:8390d5d666dc4560dcb5242b23daaf471a459cdf docs/models/operations/create-webhook-response.md: last_write_checksum: sha1:6af3559e4f3da8f630519cd54d6d59e138b4b973 docs/models/operations/crypto.md: @@ -206,11 +212,11 @@ trackedFiles: docs/models/operations/data-video.md: last_write_checksum: sha1:207610c44fe94cf119f3cfcdf4471bd26f69b807 docs/models/operations/delete-action-request.md: - last_write_checksum: sha1:bdc61b6037ccf5f0117f7798ed447219adb9e693 + last_write_checksum: sha1:f4193a4879d4d2388406d855cc25673307a22cfb docs/models/operations/delete-action-response.md: last_write_checksum: sha1:21cd2fa0c991db8cec40b50f4f6888f71a205224 docs/models/operations/delete-author-request.md: - last_write_checksum: sha1:a62599d674cf15f8858c7001d9a916f501051c7e + last_write_checksum: sha1:c69ddc97f3580f6e6aaa448d234239e5b37eab73 docs/models/operations/delete-author-response.md: last_write_checksum: sha1:c22d767de93db6b894e82418a4defe9e0872f909 docs/models/operations/delete-channel-request.md: @@ -222,7 +228,7 @@ trackedFiles: docs/models/operations/delete-project-response.md: last_write_checksum: sha1:443f2a7cf9042e2c1f0b51e708c5529c2920c44e docs/models/operations/delete-webhook-request.md: - last_write_checksum: sha1:fd0aaf06f38b66204bf2bd09c3e007362b39ee99 + last_write_checksum: sha1:74dc626c3e0cb958a817386dd8a63bcd7f83e8aa docs/models/operations/delete-webhook-response.md: last_write_checksum: sha1:3f8bc3d81daac532d4f63bb291139ab5c10c8f89 docs/models/operations/drugs.md: @@ -245,8 +251,10 @@ trackedFiles: last_write_checksum: sha1:230a1bb60a45d4549a2efeadc8c5ee12689dbf69 docs/models/operations/evaluation.md: last_write_checksum: sha1:aee5c69f547a5f5b2b338f973a425e3cce1d7ed5 + docs/models/operations/execute-action-request-body.md: + last_write_checksum: sha1:9d7b79817b40f70a62dc09087042d390e14101b3 docs/models/operations/execute-action-request.md: - last_write_checksum: sha1:2bdbe320358d56683fb296a8c4cab6f80a4537e0 + last_write_checksum: sha1:a9b52afea20cb95aba9c5d993479cdfcd1e7c49a docs/models/operations/execute-action-response.md: last_write_checksum: sha1:12fce10184bdd16e84f51b1d373bc6723e2e6010 docs/models/operations/extremism.md: @@ -263,6 +271,8 @@ trackedFiles: last_write_checksum: sha1:6f1c3627e482e2d3739526db111630e453f50ab2 docs/models/operations/gambling.md: last_write_checksum: sha1:5adc5517572e154a7f084fb5612f8e0c5561ca29 + docs/models/operations/get-account-request.md: + last_write_checksum: sha1:24f9d3814ed5deab735ed981f9b2e123cba5414e docs/models/operations/get-account-response.md: last_write_checksum: sha1:1a24bc7fe2224e7b7ba178683098868c4778639a docs/models/operations/get-action-position.md: @@ -272,13 +282,13 @@ trackedFiles: docs/models/operations/get-action-queue-behaviour.md: last_write_checksum: sha1:5d4317a80d04053d1e4fcf18134247cc4c9a8a74 docs/models/operations/get-action-request.md: - last_write_checksum: sha1:63565b177fa772da0e8f667a293209e6ec6f45d1 + last_write_checksum: sha1:fea15cb2796dded792f1b43fc7aa631c4350dfbf docs/models/operations/get-action-response.md: last_write_checksum: sha1:63ac4982855e7f06eeea646e25d87ba91d91b5ff docs/models/operations/get-action-type.md: last_write_checksum: sha1:d4716096df59c144490f7b4cc6d58a06f191962d docs/models/operations/get-author-request.md: - last_write_checksum: sha1:621ba1725be83fcd4bbdb7bc6edaa97e8705fd40 + last_write_checksum: sha1:961a5a53eacb473e3450dadbc7a9d00d061b13a7 docs/models/operations/get-channel-request.md: last_write_checksum: sha1:707bf453a85565b21625b1e66753cd6e8f6dc8fc docs/models/operations/get-project-request.md: @@ -288,11 +298,11 @@ trackedFiles: docs/models/operations/get-queue-recommendation-action.md: last_write_checksum: sha1:bdf2011f8cdf34284d9748e7620b783b16c62070 docs/models/operations/get-queue-request.md: - last_write_checksum: sha1:e77c226593be0c86b3fe453075d38455ef81bcd7 + last_write_checksum: sha1:3be9c63068a132fa53c1a421baac82290b33bba9 docs/models/operations/get-queue-response.md: last_write_checksum: sha1:fb935318459b57d7da6645a22b00782674a79cf2 docs/models/operations/get-queue-stats-request.md: - last_write_checksum: sha1:ec2a790f78a434288f43546edaf2278afb2df122 + last_write_checksum: sha1:e660366fb8873bbc016cbadccafa9f3e6abed1ef docs/models/operations/get-queue-stats-response.md: last_write_checksum: sha1:a95741c07cf693575f6a90ba1981c694658f0a44 docs/models/operations/get-queue-type.md: @@ -302,17 +312,19 @@ trackedFiles: docs/models/operations/get-webhook-payload-version.md: last_write_checksum: sha1:d1b0b75f6b51b2bcdeb8553af6ac8741feae8332 docs/models/operations/get-webhook-request.md: - last_write_checksum: sha1:0797a537c18a0e856d2e934291d1c26b34e8e16c + last_write_checksum: sha1:c9231ec12af924747548244c73f965923ee500f8 docs/models/operations/get-webhook-response.md: last_write_checksum: sha1:ff29e0e0ad67e8cc282c47067121995dfade58c9 + docs/models/operations/get-webhook-secret-request.md: + last_write_checksum: sha1:5889e9f67aa651f6b8c3b422c15c49408aa9a060 docs/models/operations/get-webhook-secret-response.md: last_write_checksum: sha1:3f86ae7f31c748d5615acb06659535a8b581764f docs/models/operations/get-wordlist-embedding-status-request.md: - last_write_checksum: sha1:350b0bfe1d2c989b2d3a1a20033361bb0569b623 + last_write_checksum: sha1:878dc7b223480b885504702368a8a2439d265583 docs/models/operations/get-wordlist-embedding-status-response.md: last_write_checksum: sha1:9116183c49fbdb044bab989a17d6b6d763661d11 docs/models/operations/get-wordlist-request.md: - last_write_checksum: sha1:ba1b1da4106c7afeb2e1b3c91546c8735e9aa7d8 + last_write_checksum: sha1:0a100e48ba26f9d6faf1853167daec6ba8ca13a4 docs/models/operations/get-wordlist-response.md: last_write_checksum: sha1:6f0275935b0a9f159c34f8b047af58860649e5f7 docs/models/operations/global-flagging-mode.md: @@ -354,7 +366,7 @@ trackedFiles: docs/models/operations/list-actions-queue-behaviour.md: last_write_checksum: sha1:d9a1752d254d17207c1b252fc51530a4ed724f6d docs/models/operations/list-actions-request.md: - last_write_checksum: sha1:eb80f61cad83fcaab5b257b196e745d3fd03fa33 + last_write_checksum: sha1:b21e810e95530e94fd18ac6932479806b7b03227 docs/models/operations/list-actions-response-body.md: last_write_checksum: sha1:70db78b9dc061a12bb97c9c60fddc1e53dd638da docs/models/operations/list-actions-response.md: @@ -362,7 +374,7 @@ trackedFiles: docs/models/operations/list-actions-type.md: last_write_checksum: sha1:e3df5f195fd93649db3ce08ce2fd001dbb29f9ed docs/models/operations/list-authors-request.md: - last_write_checksum: sha1:f339e7c4705a33e9c334bd34fb08440fe4ee4afe + last_write_checksum: sha1:f3b3ec693372fb2a77f5c8509cc70bf9932996a4 docs/models/operations/list-authors-response-body.md: last_write_checksum: sha1:15ba61c20108439a81dde996e9f11b08819f80ae docs/models/operations/list-authors-response.md: @@ -388,7 +400,7 @@ trackedFiles: docs/models/operations/list-queue-items-label.md: last_write_checksum: sha1:f03b855ca94682df4f46f351156e2be9923173a6 docs/models/operations/list-queue-items-request.md: - last_write_checksum: sha1:0ea094ee0ce48eaeda8897bfb71fcccfdd3ceb8e + last_write_checksum: sha1:b6c6707a379a5635f912c4687a161ad0b8827192 docs/models/operations/list-queue-items-response-body.md: last_write_checksum: sha1:c5181c6e52d0cfc4a4f99386f2eaef1ffbead3d7 docs/models/operations/list-queue-items-response.md: @@ -404,7 +416,7 @@ trackedFiles: docs/models/operations/list-webhooks-payload-version.md: last_write_checksum: sha1:96ac775d5025e05cd94afa91b7cab7ec6fab076a docs/models/operations/list-webhooks-request.md: - last_write_checksum: sha1:94e869b985a4c024a88b8a437adf078149060740 + last_write_checksum: sha1:2ec3733c6fe2e4b4f76404ce51ac5acc418ec123 docs/models/operations/list-webhooks-response-body.md: last_write_checksum: sha1:1f607ad9e6009ad425af44ef5cc1ebd2b2a82ddf docs/models/operations/list-webhooks-response.md: @@ -412,7 +424,7 @@ trackedFiles: docs/models/operations/list-wordlists-data.md: last_write_checksum: sha1:0a710da678fb4956280502641ba9756b756e5981 docs/models/operations/list-wordlists-request.md: - last_write_checksum: sha1:7adde830d13726e2c167e89bbd0f2583ec676b05 + last_write_checksum: sha1:fae07bf6f9d9d6e430bace62e1e4bbc02f2f6696 docs/models/operations/list-wordlists-response-body.md: last_write_checksum: sha1:eb7932e4f58dabf7597c5e5ccb4f50e9af534103 docs/models/operations/list-wordlists-response.md: @@ -466,13 +478,13 @@ trackedFiles: docs/models/operations/religion.md: last_write_checksum: sha1:ebb4d54c6e5080e8cc95379858faba8ad981c8d0 docs/models/operations/remove-wordlist-words-request.md: - last_write_checksum: sha1:e44acc3e0553d728230e737275ba34564fd6203c + last_write_checksum: sha1:eb747ee8460bcd139b97b8cce9d5a12878f20ae9 docs/models/operations/remove-wordlist-words-response.md: last_write_checksum: sha1:e23252b42245e21a8ef0934a68b7cb04de441274 docs/models/operations/resolve-queue-item-request-body.md: last_write_checksum: sha1:eb50a2fdbfc1786137121facf2d7cb7c397509df docs/models/operations/resolve-queue-item-request.md: - last_write_checksum: sha1:5f8eb841d5f0ea99098dcc415205c28baf3cc64e + last_write_checksum: sha1:2d7c9e1c95eee1cfc0f3d8e7ed09e691e8ad06c0 docs/models/operations/resolve-queue-item-response.md: last_write_checksum: sha1:2a0cf0a5df0ee5cd0bc10a99d58295a58f2c3aec docs/models/operations/respect-insight.md: @@ -507,8 +519,10 @@ trackedFiles: last_write_checksum: sha1:7d1ff73d106e8307b162d63feae1b606ede9c0bd docs/models/operations/submit-content-recommendation-action.md: last_write_checksum: sha1:2514acb074b6a84b552457d939fac38caeaff726 + docs/models/operations/submit-content-request-body.md: + last_write_checksum: sha1:a4e3f3af74a58590cfb9974632ddc6d4efc6786b docs/models/operations/submit-content-request.md: - last_write_checksum: sha1:328296c493c3faa23592efc1831f4607d11f5464 + last_write_checksum: sha1:4a3d8248a9cee74c3435f8454c7521fd419a552c docs/models/operations/submit-content-response.md: last_write_checksum: sha1:bc242c48c0b2d816c144783c7d19545e09626d59 docs/models/operations/text-request.md: @@ -538,7 +552,7 @@ trackedFiles: docs/models/operations/unresolve-queue-item-request-body.md: last_write_checksum: sha1:befb3650deba6f87ae978ff6a020705d022e3d15 docs/models/operations/unresolve-queue-item-request.md: - last_write_checksum: sha1:2f61f89474ae2790f0e9710edb33f6df358959a5 + last_write_checksum: sha1:2e170734b0d8b0e16fa13fa0c3036d8998a05b2d docs/models/operations/unresolve-queue-item-response.md: last_write_checksum: sha1:914a833cb3fe2c7be241e1811b320a53f7617343 docs/models/operations/update-action-position-request.md: @@ -556,7 +570,7 @@ trackedFiles: docs/models/operations/update-action-request-body.md: last_write_checksum: sha1:d6db2adee9cef0d7baf847844de5580fb10e8ca9 docs/models/operations/update-action-request.md: - last_write_checksum: sha1:233a06fa5f59ac8b831b6680f54f81e55f209ea1 + last_write_checksum: sha1:a4b16210e48a1bf783ff6b78a190a8db66e8ac09 docs/models/operations/update-action-response.md: last_write_checksum: sha1:c26128748689722552d4db4c7a27e94b71a27d45 docs/models/operations/update-action-type-request.md: @@ -568,7 +582,7 @@ trackedFiles: docs/models/operations/update-author-request-body.md: last_write_checksum: sha1:fd1591a0367da42fe5b6f34e64c8d8bbb584b84b docs/models/operations/update-author-request.md: - last_write_checksum: sha1:0a8e0f90cf284c92ef016c27ddad7e38759a331a + last_write_checksum: sha1:d03e75866f856aad5a31ce1b554ba100bf7a9149 docs/models/operations/update-channel-content-type.md: last_write_checksum: sha1:93f08aceb660f34d40fc6bafe973725b7fcf3b08 docs/models/operations/update-channel-request-body.md: @@ -588,13 +602,13 @@ trackedFiles: docs/models/operations/update-webhook-request-body.md: last_write_checksum: sha1:da06b19a591b9f3644401bc459f1e54e19dc7e16 docs/models/operations/update-webhook-request.md: - last_write_checksum: sha1:23f9d06120fb5a12a6d8d0c1d25e497892340cda + last_write_checksum: sha1:849f4669e91ae80666783175806005a892e8c2bd docs/models/operations/update-webhook-response.md: last_write_checksum: sha1:7a4027d284b8b754474eeafbefe720c1f5405415 docs/models/operations/update-wordlist-request-body.md: last_write_checksum: sha1:a10650e6b0e045034bc1c366867f66bb4c0cc791 docs/models/operations/update-wordlist-request.md: - last_write_checksum: sha1:88eaccb20bdaed2da35d7c2c859d6ca6cb12ee92 + last_write_checksum: sha1:bf0836f660c81547a17bed9d5e5e91d2934d5a39 docs/models/operations/update-wordlist-response.md: last_write_checksum: sha1:d1bcfa842e01f00e817271692c356bbb61aabca8 docs/models/operations/url-masking.md: @@ -620,7 +634,7 @@ trackedFiles: docs/models/path.md: last_write_checksum: sha1:000f66a8cdd02ed7c05e8e80aa1fd09a1ed2d2ee docs/models/permission-denied-error-code.md: - last_write_checksum: sha1:ca37c258786a87850f0c02d4cb2c51995a8c46b6 + last_write_checksum: sha1:a0c3b391ec07d6a0632478a2042f111f92dc5663 docs/models/project-global-flagging-mode.md: last_write_checksum: sha1:d2c5e7e20fe2c4128e5a954355381bb0ad2eb9fd docs/models/project-with-key-global-flagging-mode.md: @@ -644,29 +658,29 @@ trackedFiles: docs/models/trust-level.md: last_write_checksum: sha1:fbd2f87580c0a6f92a88899ab764c9aa97d562a8 docs/sdks/account/README.md: - last_write_checksum: sha1:2b008cfbb0a507288d2fb5dd5c70cf154e9bf041 + last_write_checksum: sha1:c362f326561e234bfd195d45d6aa4f653de7ab7a docs/sdks/actions/README.md: - last_write_checksum: sha1:905d48ac49a64fa0f72a0a795a614c11dc005760 + last_write_checksum: sha1:fc74c894b10d3ed4f5f04effdbc261d223618fc0 docs/sdks/authors/README.md: - last_write_checksum: sha1:c2d8192dfd5fdc0f5ffe91e945468d64210d48c2 + last_write_checksum: sha1:bb82e264379aa8169ccfc97f6ff879567e49aee0 docs/sdks/channels/README.md: last_write_checksum: sha1:0dc23f6f60598b2cbd22b0437e671cfda686562c docs/sdks/content/README.md: - last_write_checksum: sha1:c0cdf480312724ca237af71a4563396757fd78ba + last_write_checksum: sha1:f99c782a1bab737590c4795949b9aaaacbf2afd8 docs/sdks/items/README.md: - last_write_checksum: sha1:7dab9bcc1712590ef6260a1ba28bfc31f5403eb4 + last_write_checksum: sha1:049c5c291a257599b7c93cab133dea4e12a53df0 docs/sdks/projects/README.md: last_write_checksum: sha1:5099f84c9c94c5588cc8c8b646ae74054d4be863 docs/sdks/queue/README.md: - last_write_checksum: sha1:7f399191e1755eda23e92df7b4a752b838225231 + last_write_checksum: sha1:ff03507002d7ec54bb21e2e9dd4418434b273856 docs/sdks/webhooks/README.md: - last_write_checksum: sha1:4f0703436e65c78187502991352a2660672c5799 + last_write_checksum: sha1:e51d6d77e2ce0e07dc0f58703bed11e3a1ea9a09 docs/sdks/webhooksecret/README.md: - last_write_checksum: sha1:069a6ab26f29dbdd3aa6981b0e4c7d141576e372 + last_write_checksum: sha1:55f458a9214267e58990b23823c7944b1f3ef83f docs/sdks/wordlist/README.md: - last_write_checksum: sha1:32d639d913e3513e747a1e37e7a4a780d1a6fc4e + last_write_checksum: sha1:cfb69280acc8ae3adaeb1d567c0ae15b40af6b66 docs/sdks/words/README.md: - last_write_checksum: sha1:e9e8865998f9965f1b4825759f6bbec72b9ce2f6 + last_write_checksum: sha1:2feb2b2b8f5e2060ba638cb7e8fbea64afaf846a examples/.env.template: last_write_checksum: sha1:b9b5c0aa9e791535de9c5f1c75634faef4b4b030 examples/README.md: @@ -676,35 +690,35 @@ trackedFiles: examples/package.json: last_write_checksum: sha1:72d702bad23c84698d27164ca08d5f0ff931af65 jsr.json: - last_write_checksum: sha1:076019fb5c9ea4f7001a52e86fcd5ff0f03a1a90 + last_write_checksum: sha1:b23ce6c990b2ad0091b304725048ea11b9fc9738 package.json: - last_write_checksum: sha1:6fc93a774f11cd8a8cc48a949370fdc3653e0b90 + last_write_checksum: sha1:8fe6185a672bc6314cb6caa2982f4bab802022a0 src/core.ts: last_write_checksum: sha1:72b4c09e9228c63a9cc3335baa0ae5be47c2bc9c src/funcs/account-retrieve.ts: - last_write_checksum: sha1:8a93ebd6da34a2983e6e4885882286189e4eb92c + last_write_checksum: sha1:f57bf974c15da45a521e31f73de568b3c6abbffa src/funcs/actions-create.ts: - last_write_checksum: sha1:eab536b2ee7933e148c701c6de88c5fd6e9b06a1 + last_write_checksum: sha1:67272b456cbe1512dc771132f779755ca03980fa src/funcs/actions-delete.ts: - last_write_checksum: sha1:090836956fbec5b3b821f11d619188e30ccfdfe5 + last_write_checksum: sha1:5f2505a3ada18c2ea0a4932952297e7c20236388 src/funcs/actions-execute.ts: - last_write_checksum: sha1:5aa2bc1a7c494a1a1f11c3f5ce24aa846092f2b1 + last_write_checksum: sha1:0e9d2cfe64a9109c1cf68802fb43c26da02649f2 src/funcs/actions-list.ts: - last_write_checksum: sha1:e03f45df1be59b0d002e56225bdabb63b12b43b5 + last_write_checksum: sha1:0dea40faff481938b555819bdcc61f0b9ab78857 src/funcs/actions-retrieve.ts: - last_write_checksum: sha1:af27ebf6b0ae085b58c91ab99d8bb96a0707ae1b + last_write_checksum: sha1:352c4bc9b37efc482a45cb06fa66ac73c2bdcef4 src/funcs/actions-update.ts: - last_write_checksum: sha1:ff6a7b7444136ac1f8d0d04e783ecc93dc6dee94 + last_write_checksum: sha1:2efd3a0254a88bdfab2400094668acbb5c55afbc src/funcs/authors-create.ts: - last_write_checksum: sha1:e6ce013bd0b70e9826e709ebd08a3afb01aa9687 + last_write_checksum: sha1:926d3251f649dc8e8a301acbed96427e712db3b1 src/funcs/authors-delete.ts: - last_write_checksum: sha1:7678a2bf9a569dc3d1fcc9540a3f4fbc5aad47fd + last_write_checksum: sha1:5b89d5be1f1de7530b3ccdf54fda5f92f7d74bb3 src/funcs/authors-list.ts: - last_write_checksum: sha1:bfec725bd82f55ef64d9474347488f851f484157 + last_write_checksum: sha1:772f322623e813cb312c9f8503c6525955538479 src/funcs/authors-retrieve.ts: - last_write_checksum: sha1:c4316004a2b942ddcb832c9757c95eccb760fbd2 + last_write_checksum: sha1:2b7dab0749ee6eeb86204e14bd794dbac65b9ace src/funcs/authors-update.ts: - last_write_checksum: sha1:6e047656e0cdb51ec843917fa58744f4e1495402 + last_write_checksum: sha1:61397530220919796adea8763dce45a8fbc0d858 src/funcs/channels-create.ts: last_write_checksum: sha1:ed4e4018367d80d9b4de7a22902f26b3d3fd9656 src/funcs/channels-delete.ts: @@ -718,7 +732,7 @@ trackedFiles: src/funcs/channels-update.ts: last_write_checksum: sha1:d28482419848661dc8a626a089112e73d1f8134e src/funcs/content-submit.ts: - last_write_checksum: sha1:865711749d7c26b2d2d11d61282703b6096c982c + last_write_checksum: sha1:fdca5b9045341128939058fb21071d48d2c01eb0 src/funcs/projects-create.ts: last_write_checksum: sha1:1d5128fe44c57de6e610339e681d17dece464c8c src/funcs/projects-delete.ts: @@ -732,39 +746,39 @@ trackedFiles: src/funcs/projects-update.ts: last_write_checksum: sha1:4ef61801136131f80690ebd5a1a0c16acc4a43f8 src/funcs/queue-get-stats.ts: - last_write_checksum: sha1:07c9b2194dbb6879bd63683f88ec1e096c21dc8a + last_write_checksum: sha1:0c7d4ba3424f7b1fa32325a8f58551951b9857b6 src/funcs/queue-items-list.ts: - last_write_checksum: sha1:a4f3ab7c908c3e6f7de2be81fc2fe1efac4cab2b + last_write_checksum: sha1:41e37714a624e3454112aaebc95e211e44d752a3 src/funcs/queue-items-resolve.ts: - last_write_checksum: sha1:e35d4c9c1f9b7861d4c888b078a44fba82840324 + last_write_checksum: sha1:c2dd25d9e59921c30a029a9ec7f6f5c2eba5da6c src/funcs/queue-items-unresolve.ts: - last_write_checksum: sha1:0a120b89cb2923bbb99b4dd804e10d9fb54ea7a7 + last_write_checksum: sha1:b11867b188626362bc68df053029bd47dbe36240 src/funcs/queue-retrieve.ts: - last_write_checksum: sha1:a4966964d64251a16cda051261a72551b4b2312c + last_write_checksum: sha1:79aa33a78055bae924d0e737f28d79553bad8ef8 src/funcs/webhook-secret-retrieve.ts: - last_write_checksum: sha1:d71575e8bb4d03e58b93189ee39806eb563ac59b + last_write_checksum: sha1:07bc465157648defa15c9832db1fc6dd3c1a699d src/funcs/webhooks-create.ts: - last_write_checksum: sha1:68816b1d4124e1b76d63421f5f5daed74ecd985a + last_write_checksum: sha1:09646106bf55f3fce128f4cd54e93d939df17fde src/funcs/webhooks-delete.ts: - last_write_checksum: sha1:5a77a69c1f1cc419bffe60403869d4450b9ef6b6 + last_write_checksum: sha1:ecbda917feeb184e58d075172605db2221dd2f26 src/funcs/webhooks-list.ts: - last_write_checksum: sha1:d75596833e52b03f2f5da1760064ac8225e9d249 + last_write_checksum: sha1:4e49d4961ad488e16ff238b71527ec2ff22bd37a src/funcs/webhooks-retrieve.ts: - last_write_checksum: sha1:3631dac66262a504ce2653f2f1851cd281bda176 + last_write_checksum: sha1:8ea9dc79cb031bf6655acbafec397570f3c9ec87 src/funcs/webhooks-update.ts: - last_write_checksum: sha1:c3a51685e9f4687d1a48c73c82a25e66200ce015 + last_write_checksum: sha1:4d3f0ae4628a57342d8a7c4bbf727787c7346f23 src/funcs/wordlist-get-embedding-status.ts: - last_write_checksum: sha1:3f0aba96752da94c65cccc5028ae3fa2c64ce55b + last_write_checksum: sha1:738292d954d7d25e91906d4e53df02f7671da44a src/funcs/wordlist-list.ts: - last_write_checksum: sha1:098f8ca595dc3b34e1440e305e29b33e34334135 + last_write_checksum: sha1:f26e26b54b85e8099f18701d3f3390877abe4b9c src/funcs/wordlist-retrieve.ts: - last_write_checksum: sha1:8cd623167df2a43490aef0c24d20d683f1ce40f8 + last_write_checksum: sha1:96f1e2b3a83bca1b51ac8e4769d49112b0c5d9a3 src/funcs/wordlist-update.ts: - last_write_checksum: sha1:68841cc1457925ca0e92aaf9146319a6a2f0a954 + last_write_checksum: sha1:ce8693657b7b6f8379d01c17e2955613dee2a515 src/funcs/wordlist-words-add.ts: - last_write_checksum: sha1:7a7516139c72538bdd955cf94a8b9fecda8128e0 + last_write_checksum: sha1:9b0a83ce2267519aec8e443d031594a92b155fb7 src/funcs/wordlist-words-remove.ts: - last_write_checksum: sha1:d21ab7b4a4f328b753d94c396b852866a0e85022 + last_write_checksum: sha1:d77bcbcb3f912a6b7d34c3c51f22f462ec590a8c src/hooks/hooks.ts: last_write_checksum: sha1:3a90d88b4c6c07247db8e5f6441a79538232394e src/hooks/index.ts: @@ -776,7 +790,7 @@ trackedFiles: src/lib/base64.ts: last_write_checksum: sha1:8c94164f2f78e6041c853186fa01f659591f5913 src/lib/config.ts: - last_write_checksum: sha1:621e62e1902e174cb0fc58031550cdcecadf7bf0 + last_write_checksum: sha1:5073bebb0237180a976797fb24284028ae846208 src/lib/encodings.ts: last_write_checksum: sha1:4481b2a380f8a16856ef92c66fb370299f56d135 src/lib/env.ts: @@ -804,7 +818,7 @@ trackedFiles: src/models/authentication-error.ts: last_write_checksum: sha1:9040431089f953dc7918ac6a919803e6bdcdf1a1 src/models/bad-request-error.ts: - last_write_checksum: sha1:fdde77a2e5cec730cb1381359a84c97de7838c0c + last_write_checksum: sha1:7fab44fcda0f75a44dcb14bd581d1ce3e5479bf2 src/models/channel.ts: last_write_checksum: sha1:18563c2ea4d555d86e6f3058b869e07d3562cf35 src/models/conflict-error.ts: @@ -814,7 +828,7 @@ trackedFiles: src/models/errors/authentication-error.ts: last_write_checksum: sha1:9eb1e70491b83c8549b9e670c0cd82abe182584d src/models/errors/bad-request-error.ts: - last_write_checksum: sha1:64ca47c49658a35f963e01c21b0221ece0a16e98 + last_write_checksum: sha1:80f6fca704345fca0b2a5aeb093bdca3c7b0dcbc src/models/errors/conflict-error.ts: last_write_checksum: sha1:31a0683d7e721a3e08e4a0d53e9247b11e621732 src/models/errors/http-client-errors.ts: @@ -830,7 +844,7 @@ trackedFiles: src/models/errors/not-found-error.ts: last_write_checksum: sha1:96491fb201f8b00bac0baa90f52013821c9442a3 src/models/errors/permission-denied-error.ts: - last_write_checksum: sha1:a74eb3d66a13b5a35b1ad0f7a0b5af6ea67658bb + last_write_checksum: sha1:a7f2ccb2f0960afa276e4966f1c4872e6ed28c0f src/models/errors/rate-limit-error.ts: last_write_checksum: sha1:37a21f40b5ebca05b3b988ba43626f0353901a1e src/models/errors/response-validation-error.ts: @@ -844,95 +858,95 @@ trackedFiles: src/models/not-found-error.ts: last_write_checksum: sha1:e529ab165b42ef34e33fb4ebcf5ec244f916d7d5 src/models/operations/add-wordlist-words.ts: - last_write_checksum: sha1:c6d056d32aca19facd53ae4496bd9f6608c6f3aa + last_write_checksum: sha1:54527ccc2d4491e2718f7dcbdb53055640e0e7a6 src/models/operations/create-action.ts: - last_write_checksum: sha1:5df01d4731a8491a8f6f9a53c17c444d5b127f7a + last_write_checksum: sha1:54a2c326251775a7089e95328660aad0cbdecb89 src/models/operations/create-author.ts: - last_write_checksum: sha1:bee10d9397858258d46666439ed41a0a17b2136c + last_write_checksum: sha1:28fde3888b923d9434426b731d2c77f283bedfe1 src/models/operations/create-channel.ts: last_write_checksum: sha1:cabc482911728dd312e75fb1f3b2ffd0721b45e2 src/models/operations/create-project.ts: last_write_checksum: sha1:147c8396e20ae365554d1bd3a9cf82094b5d6957 src/models/operations/create-webhook.ts: - last_write_checksum: sha1:522b14f9d29e0799ee32d47b7ca924faa6e34413 + last_write_checksum: sha1:81d7e3c315e7a79aa76617bf3fb5c86f292a0365 src/models/operations/delete-action.ts: - last_write_checksum: sha1:92c6e87fb94778f09f927c781e2c61a03df1061d + last_write_checksum: sha1:76e057d379c9f5df4f0e5953fc2aafea71fdfe50 src/models/operations/delete-author.ts: - last_write_checksum: sha1:f0ac01723f626af5d8e1a7c268e693e2ad316f4a + last_write_checksum: sha1:2249b7539fb89ff293c69dd17f1f86220daaaa79 src/models/operations/delete-channel.ts: last_write_checksum: sha1:152a14565d6146a631789cefc6d4bcaecace08f6 src/models/operations/delete-project.ts: last_write_checksum: sha1:1b89d788b30bda054ddb0832e8099ed31b78a2a0 src/models/operations/delete-webhook.ts: - last_write_checksum: sha1:a36c592bd2c1cfb14fa61956274de95c7e49b796 + last_write_checksum: sha1:3f5dc13439e7206673547d5ca77240a7607d536a src/models/operations/duplicate-channel.ts: last_write_checksum: sha1:1992ab1dec599b6c6751fa259119fc6ccf4d2974 src/models/operations/duplicate-project.ts: last_write_checksum: sha1:111826d4d5e53c6622cce8be741c81b39b13d1d7 src/models/operations/execute-action.ts: - last_write_checksum: sha1:ae00c162ede4e71d25695d9a8332a53ac13697dc + last_write_checksum: sha1:8621e5b5565830bbf348a3a071401db8f25fa5bf src/models/operations/get-account.ts: - last_write_checksum: sha1:eeb7fc591573e56b61c55957d8fedc9bcc010c1c + last_write_checksum: sha1:dbb94046a69604a6b60e9afb25ef03d8c58632c7 src/models/operations/get-action.ts: - last_write_checksum: sha1:1e857b69dc9098b073ac6dd97a987cb0ce8c97a0 + last_write_checksum: sha1:c1ae06915429e2c3298043346d3e3b521716887d src/models/operations/get-author.ts: - last_write_checksum: sha1:4bbfbaa2bbd1b5c59464816092fd4fa59a0cc97b + last_write_checksum: sha1:38cf61572641cd12bf6a9d1ca329b20e989b8ca8 src/models/operations/get-channel.ts: last_write_checksum: sha1:2379dbe5480531f8afc81e18f7645e2fb3367b23 src/models/operations/get-project.ts: last_write_checksum: sha1:f2398da115bc20dfd88f8b56cc34ab4744ae09b8 src/models/operations/get-queue-stats.ts: - last_write_checksum: sha1:ca1bfada0adf7a5406a27a6ef476101b434e2d4e + last_write_checksum: sha1:f8e31d9aaa8f4b09d0c51c70789ac1b1f92071e9 src/models/operations/get-queue.ts: - last_write_checksum: sha1:01ec8b488068d63bb23476d6ad098c2e3ed3d9fe + last_write_checksum: sha1:cddcd5751e5d5ed4aa849d0d8704e005579f1faf src/models/operations/get-webhook-secret.ts: - last_write_checksum: sha1:db1bfc3593c3e630d781990ef4aeef95b3429d70 + last_write_checksum: sha1:b1130791d1fb2cbeca443ae277c702d665f32daa src/models/operations/get-webhook.ts: - last_write_checksum: sha1:38279d67675838553349812fd8359264cacbe222 + last_write_checksum: sha1:a5126442e1520aacfac1469e58a896013ad3244b src/models/operations/get-wordlist-embedding-status.ts: - last_write_checksum: sha1:3656ea953c427b291acc76a2a6feeb3f76fe6111 + last_write_checksum: sha1:3d49b8496f4f0f1585952ad768addb96c8819c8b src/models/operations/get-wordlist.ts: - last_write_checksum: sha1:c4a58d06d5b99dba0f5a444458b591dc8e56e2f2 + last_write_checksum: sha1:3dc8da3c97b367a7c6de937cfc4baf5d5b8b9c47 src/models/operations/index.ts: last_write_checksum: sha1:ea0b8356e80095f33a542d7ca190af965a681c65 src/models/operations/list-actions.ts: - last_write_checksum: sha1:39427658888ae526eefb796458ba73b1885f3b5b + last_write_checksum: sha1:31caed7f3cef0dc36f2a9b53614bb8dd71ff526b src/models/operations/list-authors.ts: - last_write_checksum: sha1:2a9008a170e5bf85c3d0ccfb5e871d0094ba1809 + last_write_checksum: sha1:7ce4521cbd7ccb0e923854d6563f59e9e7eb4ade src/models/operations/list-channels.ts: last_write_checksum: sha1:7552a7851b969bea092d45e6db748aa11b2bf18d src/models/operations/list-projects.ts: last_write_checksum: sha1:0c1cf0e09f7c0ae20c42b1707947474386d11ab9 src/models/operations/list-queue-items.ts: - last_write_checksum: sha1:f7a065144ebf3d72ac640489aa88a7c624ee8ce4 + last_write_checksum: sha1:33b798e8fe1d37ee6fab361d3eb91dca0f0e9703 src/models/operations/list-webhooks.ts: - last_write_checksum: sha1:c9fb2736460a709b16a57c56b636a98554d1d4c5 + last_write_checksum: sha1:3020f3ae92e40817168a546d2dcc8f19fdeca452 src/models/operations/list-wordlists.ts: - last_write_checksum: sha1:26081bc67840e67bdfa7f1c528bcf14e013c680b + last_write_checksum: sha1:b5d9e320705feff178d04ff556f1f835b367eec8 src/models/operations/remove-wordlist-words.ts: - last_write_checksum: sha1:78f85de626b2561a22e2639e45a2bbbaa03cff03 + last_write_checksum: sha1:c172df18b3e4eb7574f6a0eceb86138c10294641 src/models/operations/resolve-queue-item.ts: - last_write_checksum: sha1:7899da3febcf438526914bb9d9860477b469b748 + last_write_checksum: sha1:cc0c6b0b26d1b242010592882c054f5a8319bd8d src/models/operations/submit-content.ts: - last_write_checksum: sha1:4d4b5d234c23ad82fd647c5fe4c08e6c7a9b2fe1 + last_write_checksum: sha1:b21588210b0a83679b1561ab2f73dee1bf909f74 src/models/operations/unresolve-queue-item.ts: - last_write_checksum: sha1:0fbb39d556ff8238447f9928cc3633852cb1ccb9 + last_write_checksum: sha1:cfdb1409a28455beb758cb9b7f817eab92635943 src/models/operations/update-action.ts: - last_write_checksum: sha1:8743ee4a8e6fe837ceca46f816dd2f0f2a189127 + last_write_checksum: sha1:eb850a459c462444caf46e436490cc8af2b14cc1 src/models/operations/update-author.ts: - last_write_checksum: sha1:0f371c7fef39cd3344dbc34176ad51774d6c65c7 + last_write_checksum: sha1:a09c8738c241f8aaa9dfd409fbbb59a986303641 src/models/operations/update-channel.ts: last_write_checksum: sha1:19c31967441efd4cc33f2b2d4eb2c93961b4fe5f src/models/operations/update-project.ts: last_write_checksum: sha1:79d26d42ab8a8220eccb1270ae771bb9922c407a src/models/operations/update-webhook.ts: - last_write_checksum: sha1:a32fa4500740ffc2537e4290c5865bde0de56a77 + last_write_checksum: sha1:d5be48cddff706c174946272029e55541a2b2e74 src/models/operations/update-wordlist.ts: - last_write_checksum: sha1:590737d07638fde1ca34428a02e2abf714715845 + last_write_checksum: sha1:768058d8ffaa2e2826496eeede6d0a3a3c141f9c src/models/pagination.ts: last_write_checksum: sha1:8652b1b5bd88e5f1505c99836ed9ab906d2de6b6 src/models/permission-denied-error.ts: - last_write_checksum: sha1:938da4870c6bf83b15d56e6bcc88430e86897040 + last_write_checksum: sha1:10b45009baf666d78072f06f0136e229ccd99e75 src/models/project-with-key.ts: last_write_checksum: sha1:4cfe9bc82338a25ac5f0b9871caa3bfb2968a71d src/models/project.ts: @@ -944,33 +958,33 @@ trackedFiles: src/models/security.ts: last_write_checksum: sha1:f12af7291ebb0b6712532520d82e8d34fa86885a src/sdk/account.ts: - last_write_checksum: sha1:efcd45c666f6f054e505e9a356e756781ce25371 + last_write_checksum: sha1:af45ed201b0dba505aa28dd9669afeb5ad9a9fb9 src/sdk/actions.ts: - last_write_checksum: sha1:c57f2fc08bd7159bf3aa63c08e2082529a23434e + last_write_checksum: sha1:7533f896c27b4343d8ae84ba15399fda3569abb3 src/sdk/authors.ts: - last_write_checksum: sha1:b5ed1b80bc430d195ae5b104c870f640786cae98 + last_write_checksum: sha1:ac017c586ca8100b30fe03bfdf04e45e65a054f8 src/sdk/channels.ts: last_write_checksum: sha1:30ea1fc231cc208918a776570e51d37b21969e01 src/sdk/content.ts: - last_write_checksum: sha1:5890d0267612700e36e20ae2529768d35455f581 + last_write_checksum: sha1:7a941de88ba8482161ee358018d683b4e8cac9fd src/sdk/index.ts: last_write_checksum: sha1:ed6d64f2a6135349aa8498b8d8cff9ba85c7fb8f src/sdk/items.ts: - last_write_checksum: sha1:362521406e701b6ab16355007038a7a47559aabf + last_write_checksum: sha1:0f07549211c8c74f8c8fb58d535cf8dc10c132f6 src/sdk/projects.ts: last_write_checksum: sha1:48a2494349c8196a94d46ff5204485a2c2020e80 src/sdk/queue.ts: - last_write_checksum: sha1:d209a7c4bbd7d4e37492b2072e2507d518657b7f + last_write_checksum: sha1:90f5da61236b0b72552412c512f1d17f34116425 src/sdk/sdk.ts: last_write_checksum: sha1:c5587883135f0b6fcf0ee0f17688abf0eadd7d5c src/sdk/webhook-secret.ts: - last_write_checksum: sha1:76880adb8a034d77e849cc0c29e1ec599ff339a3 + last_write_checksum: sha1:47978211eeb6939caf86d3c42fb241a6c0501f09 src/sdk/webhooks.ts: - last_write_checksum: sha1:87f579ca0dad9b0aa875e9a9e09bc6de2aaf0c58 + last_write_checksum: sha1:f881d70a682584be49f29e421c23b1c1e0ba0a79 src/sdk/wordlist.ts: - last_write_checksum: sha1:16713b1b53ddcc908658e3b8f1f92c4d12d35567 + last_write_checksum: sha1:0b0bf03ee5be860cef59bf6b4d0acfad09564baa src/sdk/words.ts: - last_write_checksum: sha1:41c13db3f6fd4969fd895df3b4fb0c50fb4126c4 + last_write_checksum: sha1:6ee7d96e5571a9d5bea929d3b49a252d522879f6 src/types/async.ts: last_write_checksum: sha1:675d04bb4b4081dc3482f18de98674f9b446e7b4 src/types/blobs.ts: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 4e3eb0d..a1e2ca8 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false typescript: - version: 5.0.0 + version: 5.1.0 acceptHeaderEnum: false additionalDependencies: dependencies: {} 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 9db3cbb..4c6ec20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,47 @@ # Changelog +## 5.1.0 (2026-10-22) + +Full Changelog: [v5.0.0...v5.1.0](https://github.com/moderation-api/sdk-typescript/compare/v5.0.0...v5.1.0) + +### API changes + +- Update to the latest API spec. + +## 5.0.0 (2026-10-22) + +A new major version of the TypeScript SDK. Read the breaking changes before you upgrade. + +```bash +npm install @moderation-api/sdk@5 +``` + +### TypeScript-specific changes + +- The client is `ModerationApi` (was `ModerationAPI`). It is also the default export, so `import ModerationApi from "@moderation-api/sdk"` keeps working. +- Types moved from `@moderation-api/sdk/resources` to `@moderation-api/sdk/models/operations` (requests and responses), `@moderation-api/sdk/models` (shared types) and `@moderation-api/sdk/models/errors`. Some type names changed, for example `ContentSubmitResponse` is now `SubmitContentResponse`. +- `webhooks.constructEvent(rawBody, signature, secret)` is now `validateWebhook({ request, secret })`, exported from the package root. It accepts a Fetch `Request` or a Node.js request (Express, Next.js Pages Router) and is async. +- Runs on Node.js 18+, Bun, Deno and Cloudflare Workers, as ESM and CommonJS. +### 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. + ## 4.22.0 (2026-09-15) Full Changelog: [v4.21.0...v4.22.0](https://github.com/moderation-api/sdk-typescript/compare/v4.21.0...v4.22.0) diff --git a/README.md b/README.md index 74ac0d7..e1f3994 100644 --- a/README.md +++ b/README.md @@ -370,7 +370,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) @@ -452,7 +452,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`channelsList`](docs/sdks/channels/README.md#list) - List channels - [`channelsRetrieve`](docs/sdks/channels/README.md#retrieve) - Get a channel - [`channelsUpdate`](docs/sdks/channels/README.md#update) - Update a channel -- [`contentSubmit`](docs/sdks/content/README.md#submit) +- [`contentSubmit`](docs/sdks/content/README.md#submit) - Submit content - [`projectsCreate`](docs/sdks/projects/README.md#create) - Create a project - [`projectsDelete`](docs/sdks/projects/README.md#delete) - Delete a project - [`projectsDuplicate`](docs/sdks/projects/README.md#duplicate) - Duplicate a project diff --git a/docs/models/bad-request-error-code.md b/docs/models/bad-request-error-code.md index 499ce4b..76f5708 100644 --- a/docs/models/bad-request-error-code.md +++ b/docs/models/bad-request-error-code.md @@ -3,6 +3,7 @@ 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`. ## Example Usage @@ -18,5 +19,5 @@ let value: BadRequestErrorCode = "invalid_request"; ## Values ```typescript -"invalid_request" | "validation_failed" | Unrecognized +"invalid_request" | "project_id_required" | "validation_failed" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/errors/bad-request-error.md b/docs/models/errors/bad-request-error.md index 1774f06..8c4be77 100644 --- a/docs/models/errors/bad-request-error.md +++ b/docs/models/errors/bad-request-error.md @@ -12,11 +12,11 @@ import { BadRequestError } from "@moderation-api/sdk/models/errors"; ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *"invalid_request_error"* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | -| `code` | [models.BadRequestErrorCode](../../models/bad-request-error-code.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` | [models.ErrorIssue](../../models/error-issue.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`. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *"invalid_request_error"* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | +| `code` | [models.BadRequestErrorCode](../../models/bad-request-error-code.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` | [models.ErrorIssue](../../models/error-issue.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`. | | \ No newline at end of file diff --git a/docs/models/errors/permission-denied-error.md b/docs/models/errors/permission-denied-error.md index 4666379..3f8b887 100644 --- a/docs/models/errors/permission-denied-error.md +++ b/docs/models/errors/permission-denied-error.md @@ -12,11 +12,11 @@ import { PermissionDeniedError } from "@moderation-api/sdk/models/errors"; ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `type` | *"permission_error"* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | -| `code` | [models.PermissionDeniedErrorCode](../../models/permission-denied-error-code.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` | [models.ErrorIssue](../../models/error-issue.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`. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *"permission_error"* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | +| `code` | [models.PermissionDeniedErrorCode](../../models/permission-denied-error-code.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` | [models.ErrorIssue](../../models/error-issue.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`. | | \ No newline at end of file diff --git a/docs/models/operations/add-wordlist-words-request.md b/docs/models/operations/add-wordlist-words-request.md index 1d27f55..04b4a9c 100644 --- a/docs/models/operations/add-wordlist-words-request.md +++ b/docs/models/operations/add-wordlist-words-request.md @@ -18,7 +18,8 @@ let value: AddWordlistWordsRequest = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to add words to | -| `body` | [operations.AddWordlistWordsRequestBody](../../models/operations/add-wordlist-words-request-body.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/add-wordlist-words-request-body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/create-action-request-body.md b/docs/models/operations/create-action-request-body.md new file mode 100644 index 0000000..0f9b2bf --- /dev/null +++ b/docs/models/operations/create-action-request-body.md @@ -0,0 +1,27 @@ +# CreateActionRequestBody + +## Example Usage + +```typescript +import { CreateActionRequestBody } from "@moderation-api/sdk/models/operations"; + +let value: CreateActionRequestBody = { + name: "", +}; +``` + +## 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/create-action-type-request.md) | :heavy_minus_sign: | The type of the action. | +| `builtIn` | *boolean* | :heavy_minus_sign: | Whether the action is a built-in action or a custom one. | +| `queueBehaviour` | [operations.CreateActionQueueBehaviourRequest](../../models/operations/create-action-queue-behaviour-request.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` | *string*[] | :heavy_minus_sign: | The IDs of the queues the action is available in. | +| `position` | [operations.CreateActionPositionRequest](../../models/operations/create-action-position-request.md) | :heavy_minus_sign: | Show the action in all queues, selected queues or no queues (to use via API only). | +| `possibleValues` | [operations.CreateActionPossibleValueRequest](../../models/operations/create-action-possible-value-request.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` | *boolean* | :heavy_minus_sign: | Whether the action requires a value to be executed. | +| `freeText` | *boolean* | :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/create-action-request.md b/docs/models/operations/create-action-request.md index 86d963b..8296efd 100644 --- a/docs/models/operations/create-action-request.md +++ b/docs/models/operations/create-action-request.md @@ -6,22 +6,15 @@ import { CreateActionRequest } from "@moderation-api/sdk/models/operations"; let value: CreateActionRequest = { - name: "", + body: { + name: "", + }, }; ``` ## 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/create-action-type-request.md) | :heavy_minus_sign: | The type of the action. | -| `builtIn` | *boolean* | :heavy_minus_sign: | Whether the action is a built-in action or a custom one. | -| `queueBehaviour` | [operations.CreateActionQueueBehaviourRequest](../../models/operations/create-action-queue-behaviour-request.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` | *string*[] | :heavy_minus_sign: | The IDs of the queues the action is available in. | -| `position` | [operations.CreateActionPositionRequest](../../models/operations/create-action-position-request.md) | :heavy_minus_sign: | Show the action in all queues, selected queues or no queues (to use via API only). | -| `possibleValues` | [operations.CreateActionPossibleValueRequest](../../models/operations/create-action-possible-value-request.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` | *boolean* | :heavy_minus_sign: | Whether the action requires a value to be executed. | -| `freeText` | *boolean* | :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/create-action-request-body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/create-author-request-body.md b/docs/models/operations/create-author-request-body.md new file mode 100644 index 0000000..4b7f390 --- /dev/null +++ b/docs/models/operations/create-author-request-body.md @@ -0,0 +1,26 @@ +# CreateAuthorRequestBody + +## Example Usage + +```typescript +import { CreateAuthorRequestBody } from "@moderation-api/sdk/models/operations"; + +let value: CreateAuthorRequestBody = { + externalId: "", +}; +``` + +## 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/create-author-metadata.md) | :heavy_minus_sign: | Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process. | +| `firstSeen` | *number* | :heavy_minus_sign: | Timestamp when author first appeared | +| `lastSeen` | *number* | :heavy_minus_sign: | Timestamp of last activity | +| `manualTrustLevel` | *number* | :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/create-author-request.md b/docs/models/operations/create-author-request.md index fa9cc55..4b6a3c7 100644 --- a/docs/models/operations/create-author-request.md +++ b/docs/models/operations/create-author-request.md @@ -6,21 +6,15 @@ import { CreateAuthorRequest } from "@moderation-api/sdk/models/operations"; let value: CreateAuthorRequest = { - externalId: "", + body: { + externalId: "", + }, }; ``` ## 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/create-author-metadata.md) | :heavy_minus_sign: | Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process. | -| `firstSeen` | *number* | :heavy_minus_sign: | Timestamp when author first appeared | -| `lastSeen` | *number* | :heavy_minus_sign: | Timestamp of last activity | -| `manualTrustLevel` | *number* | :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/create-author-request-body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/create-webhook-request-body.md b/docs/models/operations/create-webhook-request-body.md new file mode 100644 index 0000000..c3b87e8 --- /dev/null +++ b/docs/models/operations/create-webhook-request-body.md @@ -0,0 +1,22 @@ +# CreateWebhookRequestBody + +## Example Usage + +```typescript +import { CreateWebhookRequestBody } from "@moderation-api/sdk/models/operations"; + +let value: CreateWebhookRequestBody = { + name: "", + url: "https://thin-gazebo.name", + eventTypes: [], +}; +``` + +## 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` | [operations.CreateWebhookEventTypeRequest](../../models/operations/create-webhook-event-type-request.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/create-webhook-request.md b/docs/models/operations/create-webhook-request.md index 6f2e598..1b741d0 100644 --- a/docs/models/operations/create-webhook-request.md +++ b/docs/models/operations/create-webhook-request.md @@ -6,17 +6,17 @@ import { CreateWebhookRequest } from "@moderation-api/sdk/models/operations"; let value: CreateWebhookRequest = { - name: "", - url: "https://passionate-season.net", - eventTypes: [], + body: { + name: "", + url: "https://passionate-season.net", + eventTypes: [], + }, }; ``` ## 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` | [operations.CreateWebhookEventTypeRequest](../../models/operations/create-webhook-event-type-request.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/create-webhook-request-body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/delete-action-request.md b/docs/models/operations/delete-action-request.md index 9dbadef..0304a9b 100644 --- a/docs/models/operations/delete-action-request.md +++ b/docs/models/operations/delete-action-request.md @@ -12,6 +12,7 @@ let value: DeleteActionRequest = { ## 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/delete-author-request.md b/docs/models/operations/delete-author-request.md index 78e6d87..3f925af 100644 --- a/docs/models/operations/delete-author-request.md +++ b/docs/models/operations/delete-author-request.md @@ -12,6 +12,7 @@ let value: DeleteAuthorRequest = { ## 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/delete-webhook-request.md b/docs/models/operations/delete-webhook-request.md index b22f768..d4d9836 100644 --- a/docs/models/operations/delete-webhook-request.md +++ b/docs/models/operations/delete-webhook-request.md @@ -12,6 +12,7 @@ let value: DeleteWebhookRequest = { ## 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/execute-action-request-body.md b/docs/models/operations/execute-action-request-body.md new file mode 100644 index 0000000..bfe93d8 --- /dev/null +++ b/docs/models/operations/execute-action-request-body.md @@ -0,0 +1,24 @@ +# ExecuteActionRequestBody + +Input parameters + +## Example Usage + +```typescript +import { ExecuteActionRequestBody } from "@moderation-api/sdk/models/operations"; + +let value: ExecuteActionRequestBody = { + actionKey: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `actionKey` | *string* | :heavy_check_mark: | ID or key of the action to execute | +| `contentIds` | *string*[] | :heavy_minus_sign: | IDs of the content items to apply the action to. Provide this or authorIds. | +| `authorIds` | *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` | *number* | :heavy_minus_sign: | Optional duration in milliseconds for actions with timeouts | \ No newline at end of file diff --git a/docs/models/operations/execute-action-request.md b/docs/models/operations/execute-action-request.md index 4dbeaf4..402b25d 100644 --- a/docs/models/operations/execute-action-request.md +++ b/docs/models/operations/execute-action-request.md @@ -1,24 +1,20 @@ # ExecuteActionRequest -Input parameters - ## Example Usage ```typescript import { ExecuteActionRequest } from "@moderation-api/sdk/models/operations"; let value: ExecuteActionRequest = { - actionKey: "", + body: { + actionKey: "", + }, }; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `actionKey` | *string* | :heavy_check_mark: | ID or key of the action to execute | -| `contentIds` | *string*[] | :heavy_minus_sign: | IDs of the content items to apply the action to. Provide this or authorIds. | -| `authorIds` | *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` | *number* | :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/execute-action-request-body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/get-account-request.md b/docs/models/operations/get-account-request.md new file mode 100644 index 0000000..ec1ba87 --- /dev/null +++ b/docs/models/operations/get-account-request.md @@ -0,0 +1,15 @@ +# GetAccountRequest + +## Example Usage + +```typescript +import { GetAccountRequest } from "@moderation-api/sdk/models/operations"; + +let value: 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/get-action-request.md b/docs/models/operations/get-action-request.md index 5bb0ab3..d3d8c00 100644 --- a/docs/models/operations/get-action-request.md +++ b/docs/models/operations/get-action-request.md @@ -12,6 +12,7 @@ let value: GetActionRequest = { ## 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/get-author-request.md b/docs/models/operations/get-author-request.md index 6e96a4f..67309d2 100644 --- a/docs/models/operations/get-author-request.md +++ b/docs/models/operations/get-author-request.md @@ -12,6 +12,7 @@ let value: GetAuthorRequest = { ## 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/get-queue-request.md b/docs/models/operations/get-queue-request.md index 14ea4c1..d14077b 100644 --- a/docs/models/operations/get-queue-request.md +++ b/docs/models/operations/get-queue-request.md @@ -12,6 +12,7 @@ let value: GetQueueRequest = { ## 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/get-queue-stats-request.md b/docs/models/operations/get-queue-stats-request.md index 90ba95a..48b9045 100644 --- a/docs/models/operations/get-queue-stats-request.md +++ b/docs/models/operations/get-queue-stats-request.md @@ -12,7 +12,8 @@ let value: GetQueueStatsRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `withinDays` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID | +| `withinDays` | *number* | :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/get-webhook-request.md b/docs/models/operations/get-webhook-request.md index 339f6ba..ee09ad2 100644 --- a/docs/models/operations/get-webhook-request.md +++ b/docs/models/operations/get-webhook-request.md @@ -12,6 +12,7 @@ let value: GetWebhookRequest = { ## 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/get-webhook-secret-request.md b/docs/models/operations/get-webhook-secret-request.md new file mode 100644 index 0000000..57cf3fe --- /dev/null +++ b/docs/models/operations/get-webhook-secret-request.md @@ -0,0 +1,15 @@ +# GetWebhookSecretRequest + +## Example Usage + +```typescript +import { GetWebhookSecretRequest } from "@moderation-api/sdk/models/operations"; + +let value: 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/get-wordlist-embedding-status-request.md b/docs/models/operations/get-wordlist-embedding-status-request.md index 70c1ca6..af317d9 100644 --- a/docs/models/operations/get-wordlist-embedding-status-request.md +++ b/docs/models/operations/get-wordlist-embedding-status-request.md @@ -12,6 +12,7 @@ let value: GetWordlistEmbeddingStatusRequest = { ## 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/get-wordlist-request.md b/docs/models/operations/get-wordlist-request.md index 18b2662..67e7400 100644 --- a/docs/models/operations/get-wordlist-request.md +++ b/docs/models/operations/get-wordlist-request.md @@ -12,6 +12,7 @@ let value: GetWordlistRequest = { ## 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/list-actions-request.md b/docs/models/operations/list-actions-request.md index b4521d6..aa5d4ea 100644 --- a/docs/models/operations/list-actions-request.md +++ b/docs/models/operations/list-actions-request.md @@ -10,8 +10,9 @@ let value: ListActionsRequest = {}; ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `queueId` | *string* | :heavy_minus_sign: | N/A | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `pageSize` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `queueId` | *string* | :heavy_minus_sign: | N/A | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `pageSize` | *number* | :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/list-authors-request.md b/docs/models/operations/list-authors-request.md index 327fc0c..80f4846 100644 --- a/docs/models/operations/list-authors-request.md +++ b/docs/models/operations/list-authors-request.md @@ -10,12 +10,13 @@ let value: ListAuthorsRequest = {}; ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `pageSize` | *number* | :heavy_minus_sign: | N/A | -| `sortBy` | [operations.SortBy](../../models/operations/sort-by.md) | :heavy_minus_sign: | N/A | -| `sortDirection` | [operations.ListAuthorsSortDirection](../../models/operations/list-authors-sort-direction.md) | :heavy_minus_sign: | Sort direction | -| `memberSinceDate` | *string* | :heavy_minus_sign: | N/A | -| `lastActiveDate` | *string* | :heavy_minus_sign: | N/A | -| `contentTypes` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `pageSize` | *number* | :heavy_minus_sign: | N/A | +| `sortBy` | [operations.SortBy](../../models/operations/sort-by.md) | :heavy_minus_sign: | N/A | +| `sortDirection` | [operations.ListAuthorsSortDirection](../../models/operations/list-authors-sort-direction.md) | :heavy_minus_sign: | Sort direction | +| `memberSinceDate` | *string* | :heavy_minus_sign: | N/A | +| `lastActiveDate` | *string* | :heavy_minus_sign: | N/A | +| `contentTypes` | *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/list-queue-items-request.md b/docs/models/operations/list-queue-items-request.md index c2db082..6bdb757 100644 --- a/docs/models/operations/list-queue-items-request.md +++ b/docs/models/operations/list-queue-items-request.md @@ -12,17 +12,18 @@ let value: ListQueueItemsRequest = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `pageSize` | *number* | :heavy_minus_sign: | N/A | -| `sortField` | [operations.SortField](../../models/operations/sort-field.md) | :heavy_minus_sign: | N/A | -| `sortDirection` | [operations.ListQueueItemsSortDirection](../../models/operations/list-queue-items-sort-direction.md) | :heavy_minus_sign: | Sort direction | -| `conversationIds` | *string*[] | :heavy_minus_sign: | N/A | -| `labels` | *string*[] | :heavy_minus_sign: | N/A | -| `afterDate` | *string* | :heavy_minus_sign: | N/A | -| `beforeDate` | *string* | :heavy_minus_sign: | N/A | -| `includeResolved` | *boolean* | :heavy_minus_sign: | N/A | -| `authorId` | *string* | :heavy_minus_sign: | N/A | -| `filteredActionIds` | *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` | *number* | :heavy_minus_sign: | N/A | +| `pageSize` | *number* | :heavy_minus_sign: | N/A | +| `sortField` | [operations.SortField](../../models/operations/sort-field.md) | :heavy_minus_sign: | N/A | +| `sortDirection` | [operations.ListQueueItemsSortDirection](../../models/operations/list-queue-items-sort-direction.md) | :heavy_minus_sign: | Sort direction | +| `conversationIds` | *string*[] | :heavy_minus_sign: | N/A | +| `labels` | *string*[] | :heavy_minus_sign: | N/A | +| `afterDate` | *string* | :heavy_minus_sign: | N/A | +| `beforeDate` | *string* | :heavy_minus_sign: | N/A | +| `includeResolved` | *boolean* | :heavy_minus_sign: | N/A | +| `authorId` | *string* | :heavy_minus_sign: | N/A | +| `filteredActionIds` | *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/list-webhooks-request.md b/docs/models/operations/list-webhooks-request.md index 2c527cb..a0e4c8a 100644 --- a/docs/models/operations/list-webhooks-request.md +++ b/docs/models/operations/list-webhooks-request.md @@ -10,7 +10,8 @@ let value: ListWebhooksRequest = {}; ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `pageSize` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `pageSize` | *number* | :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/list-wordlists-request.md b/docs/models/operations/list-wordlists-request.md index 1f1f0d6..1d8222b 100644 --- a/docs/models/operations/list-wordlists-request.md +++ b/docs/models/operations/list-wordlists-request.md @@ -10,7 +10,8 @@ let value: ListWordlistsRequest = {}; ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `pageSize` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `pageSize` | *number* | :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/remove-wordlist-words-request.md b/docs/models/operations/remove-wordlist-words-request.md index 476f5b7..6ab6400 100644 --- a/docs/models/operations/remove-wordlist-words-request.md +++ b/docs/models/operations/remove-wordlist-words-request.md @@ -13,7 +13,8 @@ let value: RemoveWordlistWordsRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to remove words from | -| `words` | *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` | *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/resolve-queue-item-request.md b/docs/models/operations/resolve-queue-item-request.md index 0e6110d..bdc891d 100644 --- a/docs/models/operations/resolve-queue-item-request.md +++ b/docs/models/operations/resolve-queue-item-request.md @@ -14,8 +14,9 @@ let value: ResolveQueueItemRequest = { ## 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/resolve-queue-item-request-body.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/resolve-queue-item-request-body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/submit-content-request-body.md b/docs/models/operations/submit-content-request-body.md new file mode 100644 index 0000000..4ab6043 --- /dev/null +++ b/docs/models/operations/submit-content-request-body.md @@ -0,0 +1,29 @@ +# SubmitContentRequestBody + +## Example Usage + +```typescript +import { SubmitContentRequestBody } from "@moderation-api/sdk/models/operations"; + +let value: SubmitContentRequestBody = { + content: { + type: "image", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content` | *operations.ContentRequest* | :heavy_check_mark: | The content sent for moderation | +| `timestamp` | *number* | :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/meta-type.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` | Record | :heavy_minus_sign: | Any metadata you want to store with the content | +| `clientAction` | [operations.ClientAction](../../models/operations/client-action.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` | *boolean* | :heavy_minus_sign: | Do not store the content. The content won't enter the review queue | +| `policies` | *operations.PolicyRequest*[] | :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/submit-content-request.md b/docs/models/operations/submit-content-request.md index a148855..ed23c48 100644 --- a/docs/models/operations/submit-content-request.md +++ b/docs/models/operations/submit-content-request.md @@ -6,25 +6,18 @@ import { SubmitContentRequest } from "@moderation-api/sdk/models/operations"; let value: SubmitContentRequest = { - content: { - type: "video", - url: "https://pessimistic-plain.com/", + body: { + content: { + type: "video", + url: "https://pessimistic-plain.com/", + }, }, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `content` | *operations.ContentRequest* | :heavy_check_mark: | The content sent for moderation | -| `timestamp` | *number* | :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/meta-type.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` | Record | :heavy_minus_sign: | Any metadata you want to store with the content | -| `clientAction` | [operations.ClientAction](../../models/operations/client-action.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` | *boolean* | :heavy_minus_sign: | Do not store the content. The content won't enter the review queue | -| `policies` | *operations.PolicyRequest*[] | :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/submit-content-request-body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/unresolve-queue-item-request.md b/docs/models/operations/unresolve-queue-item-request.md index a31d10c..e149b83 100644 --- a/docs/models/operations/unresolve-queue-item-request.md +++ b/docs/models/operations/unresolve-queue-item-request.md @@ -14,8 +14,9 @@ let value: UnresolveQueueItemRequest = { ## 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/unresolve-queue-item-request-body.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/unresolve-queue-item-request-body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/update-action-request.md b/docs/models/operations/update-action-request.md index e5faf87..e1c8e8a 100644 --- a/docs/models/operations/update-action-request.md +++ b/docs/models/operations/update-action-request.md @@ -13,7 +13,8 @@ let value: UpdateActionRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the action to update. | -| `body` | [operations.UpdateActionRequestBody](../../models/operations/update-action-request-body.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/update-action-request-body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/update-author-request.md b/docs/models/operations/update-author-request.md index fd503a1..f8d6d6d 100644 --- a/docs/models/operations/update-author-request.md +++ b/docs/models/operations/update-author-request.md @@ -13,7 +13,8 @@ let value: UpdateAuthorRequest = { ## 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/update-author-request-body.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/update-author-request-body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/update-webhook-request.md b/docs/models/operations/update-webhook-request.md index 34301d7..3a75aae 100644 --- a/docs/models/operations/update-webhook-request.md +++ b/docs/models/operations/update-webhook-request.md @@ -13,7 +13,8 @@ let value: UpdateWebhookRequest = { ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to update. | -| `body` | [operations.UpdateWebhookRequestBody](../../models/operations/update-webhook-request-body.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/update-webhook-request-body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/update-wordlist-request.md b/docs/models/operations/update-wordlist-request.md index 37b32a9..43fe25c 100644 --- a/docs/models/operations/update-wordlist-request.md +++ b/docs/models/operations/update-wordlist-request.md @@ -13,7 +13,8 @@ let value: UpdateWordlistRequest = { ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to update | -| `body` | [operations.UpdateWordlistRequestBody](../../models/operations/update-wordlist-request-body.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/update-wordlist-request-body.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/permission-denied-error-code.md b/docs/models/permission-denied-error-code.md index 1690055..a55f551 100644 --- a/docs/models/permission-denied-error-code.md +++ b/docs/models/permission-denied-error-code.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. @@ -25,5 +24,5 @@ let value: PermissionDeniedErrorCode = "permission_denied"; ## Values ```typescript -"permission_denied" | "account_disabled" | "quota_exceeded" | "plan_feature_unavailable" | "plan_limit_exceeded" | "project_key_required" | "organization_key_required" | "missing_key_permission" | "project_not_reachable" | Unrecognized +"permission_denied" | "account_disabled" | "quota_exceeded" | "plan_feature_unavailable" | "plan_limit_exceeded" | "organization_key_required" | "missing_key_permission" | "project_not_reachable" | Unrecognized ``` \ No newline at end of file diff --git a/docs/sdks/account/README.md b/docs/sdks/account/README.md index e51d6e8..005fb11 100644 --- a/docs/sdks/account/README.md +++ b/docs/sdks/account/README.md @@ -58,11 +58,12 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/docs/sdks/actions/README.md b/docs/sdks/actions/README.md index 2c2b92d..a00da79 100644 --- a/docs/sdks/actions/README.md +++ b/docs/sdks/actions/README.md @@ -67,14 +67,15 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `queueId` | *string* | :heavy_minus_sign: | N/A | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `pageSize` | *number* | :heavy_minus_sign: | N/A | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `queueId` | *string* | :heavy_minus_sign: | N/A | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `pageSize` | *number* | :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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -154,12 +155,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateActionRequest](../../models/operations/create-action-request.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [operations.CreateActionRequestBody](../../models/operations/create-action-request-body.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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -227,12 +229,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The ID of the action to get. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -300,13 +303,14 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The ID of the action to update. | -| `body` | [operations.UpdateActionRequestBody](../../models/operations/update-action-request-body.md) | :heavy_check_mark: | N/A | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to update. | +| `body` | [operations.UpdateActionRequestBody](../../models/operations/update-action-request-body.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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -375,12 +379,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The ID of the action to delete. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -458,12 +463,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ExecuteActionRequest](../../models/operations/execute-action-request.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [operations.ExecuteActionRequestBody](../../models/operations/execute-action-request-body.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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/docs/sdks/authors/README.md b/docs/sdks/authors/README.md index 709206c..fc89162 100644 --- a/docs/sdks/authors/README.md +++ b/docs/sdks/authors/README.md @@ -157,12 +157,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateAuthorRequest](../../models/operations/create-author-request.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [operations.CreateAuthorRequestBody](../../models/operations/create-author-request-body.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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -231,12 +232,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -316,13 +318,14 @@ run(); ### 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/update-author-request-body.md) | :heavy_check_mark: | N/A | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `body` | [operations.UpdateAuthorRequestBody](../../models/operations/update-author-request-body.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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -392,12 +395,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/docs/sdks/content/README.md b/docs/sdks/content/README.md index 7f1ba1b..61d71f9 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 @@ -78,12 +80,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.SubmitContentRequest](../../models/operations/submit-content-request.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [operations.SubmitContentRequestBody](../../models/operations/submit-content-request-body.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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/docs/sdks/items/README.md b/docs/sdks/items/README.md index 95bb800..8b11f6e 100644 --- a/docs/sdks/items/README.md +++ b/docs/sdks/items/README.md @@ -147,14 +147,15 @@ run(); ### 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/resolve-queue-item-request-body.md) | :heavy_check_mark: | N/A | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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/resolve-queue-item-request-body.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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -227,14 +228,15 @@ run(); ### 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/unresolve-queue-item-request-body.md) | :heavy_check_mark: | N/A | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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/unresolve-queue-item-request-body.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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/docs/sdks/queue/README.md b/docs/sdks/queue/README.md index 2bdd1bb..a164a0b 100644 --- a/docs/sdks/queue/README.md +++ b/docs/sdks/queue/README.md @@ -59,12 +59,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -134,13 +135,14 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `withinDays` | *number* | :heavy_minus_sign: | N/A | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID | +| `withinDays` | *number* | :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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index de89035..caa1605 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -66,13 +66,14 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `pageSize` | *number* | :heavy_minus_sign: | N/A | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `pageSize` | *number* | :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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -152,12 +153,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateWebhookRequest](../../models/operations/create-webhook-request.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [operations.CreateWebhookRequestBody](../../models/operations/create-webhook-request-body.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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -224,12 +226,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to get. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -296,13 +299,14 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to update. | -| `body` | [operations.UpdateWebhookRequestBody](../../models/operations/update-webhook-request-body.md) | :heavy_check_mark: | N/A | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to update. | +| `body` | [operations.UpdateWebhookRequestBody](../../models/operations/update-webhook-request-body.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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -370,12 +374,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to delete. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/docs/sdks/webhooksecret/README.md b/docs/sdks/webhooksecret/README.md index 05599a7..b301b53 100644 --- a/docs/sdks/webhooksecret/README.md +++ b/docs/sdks/webhooksecret/README.md @@ -58,11 +58,12 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/docs/sdks/wordlist/README.md b/docs/sdks/wordlist/README.md index 0c44efd..ff72465 100644 --- a/docs/sdks/wordlist/README.md +++ b/docs/sdks/wordlist/README.md @@ -65,13 +65,14 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `pageSize` | *number* | :heavy_minus_sign: | N/A | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `pageSize` | *number* | :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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -141,12 +142,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to get | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -216,13 +218,14 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to update | -| `body` | [operations.UpdateWordlistRequestBody](../../models/operations/update-wordlist-request-body.md) | :heavy_check_mark: | N/A | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to update | +| `body` | [operations.UpdateWordlistRequestBody](../../models/operations/update-wordlist-request-body.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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -290,12 +293,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to check embedding status for | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| 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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/docs/sdks/words/README.md b/docs/sdks/words/README.md index 6aed9de..cd9f648 100644 --- a/docs/sdks/words/README.md +++ b/docs/sdks/words/README.md @@ -69,13 +69,14 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to add words to | -| `body` | [operations.AddWordlistWordsRequestBody](../../models/operations/add-wordlist-words-request-body.md) | :heavy_check_mark: | N/A | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to add words to | +| `body` | [operations.AddWordlistWordsRequestBody](../../models/operations/add-wordlist-words-request-body.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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response @@ -151,13 +152,14 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to remove words from | -| `words` | *string*[] | :heavy_check_mark: | Array of words to remove from the wordlist | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to remove words from | +| `words` | *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. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/jsr.json b/jsr.json index 484d4e8..73592ca 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@moderation-api/sdk", - "version": "5.0.0", + "version": "5.1.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index 484a2a6..0fbc5a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@moderation-api/sdk", - "version": "5.0.0", + "version": "5.1.0", "author": "Moderation API", "license": "Apache-2.0", "type": "module", diff --git a/src/funcs/account-retrieve.ts b/src/funcs/account-retrieve.ts index b427b63..3302235 100644 --- a/src/funcs/account-retrieve.ts +++ b/src/funcs/account-retrieve.ts @@ -2,10 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod/v4-mini"; import { ModerationApiCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -32,6 +35,7 @@ import { Result } from "../types/fp.js"; */ export function accountRetrieve( client: ModerationApiCore, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -50,12 +54,14 @@ export function accountRetrieve( > { return new APIPromise($do( client, + projectId, options, )); } async function $do( client: ModerationApiCore, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -75,10 +81,30 @@ async function $do( APICall, ] > { + const input: operations.GetAccountRequest | undefined = { + projectId: projectId, + }; + + const parsed = safeParse( + input, + (value) => + z.parse(z.optional(operations.GetAccountRequest$outboundSchema), value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + const path = pathToFunc("/account")(); const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload?.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); @@ -106,6 +132,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + body: body, userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); diff --git a/src/funcs/actions-create.ts b/src/funcs/actions-create.ts index ae2bbf4..b590830 100644 --- a/src/funcs/actions-create.ts +++ b/src/funcs/actions-create.ts @@ -4,7 +4,7 @@ import * as z from "zod/v4-mini"; import { ModerationApiCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -35,7 +35,8 @@ import { Result } from "../types/fp.js"; */ export function actionsCreate( client: ModerationApiCore, - request: operations.CreateActionRequest, + body: operations.CreateActionRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -56,14 +57,16 @@ export function actionsCreate( > { return new APIPromise($do( client, - request, + body, + projectId, options, )); } async function $do( client: ModerationApiCore, - request: operations.CreateActionRequest, + body: operations.CreateActionRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -85,8 +88,13 @@ async function $do( APICall, ] > { + const input: operations.CreateActionRequest = { + body: body, + projectId: projectId, + }; + const parsed = safeParse( - request, + input, (value) => z.parse(operations.CreateActionRequest$outboundSchema, value), "Input validation failed", ); @@ -94,13 +102,17 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); + const body$ = encodeJSON("body", payload.body, { explode: true }); const path = pathToFunc("/actions")(); const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); @@ -128,7 +140,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, - body: body, + body: body$, userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); diff --git a/src/funcs/actions-delete.ts b/src/funcs/actions-delete.ts index cd90a49..531704a 100644 --- a/src/funcs/actions-delete.ts +++ b/src/funcs/actions-delete.ts @@ -36,6 +36,7 @@ import { Result } from "../types/fp.js"; export function actionsDelete( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -57,6 +58,7 @@ export function actionsDelete( return new APIPromise($do( client, id, + projectId, options, )); } @@ -64,6 +66,7 @@ export function actionsDelete( async function $do( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -87,6 +90,7 @@ async function $do( > { const input: operations.DeleteActionRequest = { id: id, + projectId: projectId, }; const parsed = safeParse( @@ -110,6 +114,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/actions-execute.ts b/src/funcs/actions-execute.ts index 4209b9c..46ed705 100644 --- a/src/funcs/actions-execute.ts +++ b/src/funcs/actions-execute.ts @@ -4,7 +4,7 @@ import * as z from "zod/v4-mini"; import { ModerationApiCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -35,7 +35,8 @@ import { Result } from "../types/fp.js"; */ export function actionsExecute( client: ModerationApiCore, - request: operations.ExecuteActionRequest, + body: operations.ExecuteActionRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -56,14 +57,16 @@ export function actionsExecute( > { return new APIPromise($do( client, - request, + body, + projectId, options, )); } async function $do( client: ModerationApiCore, - request: operations.ExecuteActionRequest, + body: operations.ExecuteActionRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -85,8 +88,13 @@ async function $do( APICall, ] > { + const input: operations.ExecuteActionRequest = { + body: body, + projectId: projectId, + }; + const parsed = safeParse( - request, + input, (value) => z.parse(operations.ExecuteActionRequest$outboundSchema, value), "Input validation failed", ); @@ -94,13 +102,17 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); + const body$ = encodeJSON("body", payload.body, { explode: true }); const path = pathToFunc("/actions/execute")(); const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); @@ -128,7 +140,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, - body: body, + body: body$, userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); diff --git a/src/funcs/actions-list.ts b/src/funcs/actions-list.ts index b4e432f..11b66df 100644 --- a/src/funcs/actions-list.ts +++ b/src/funcs/actions-list.ts @@ -4,7 +4,7 @@ import * as z from "zod/v4-mini"; import { ModerationApiCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -44,6 +44,7 @@ export function actionsList( queueId?: string | undefined, page?: number | undefined, pageSize?: number | undefined, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< PageIterator< @@ -72,6 +73,7 @@ export function actionsList( queueId, page, pageSize, + projectId, options, )); } @@ -81,6 +83,7 @@ async function $do( queueId?: string | undefined, page?: number | undefined, pageSize?: number | undefined, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -111,6 +114,7 @@ async function $do( queueId: queueId, page: page, pageSize: pageSize, + projectId: projectId, }; const parsed = safeParse( @@ -135,6 +139,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload?.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); @@ -276,6 +284,7 @@ async function $do( queueId, nextPage, pageSize, + projectId, options, ); diff --git a/src/funcs/actions-retrieve.ts b/src/funcs/actions-retrieve.ts index 9302ca7..38a706e 100644 --- a/src/funcs/actions-retrieve.ts +++ b/src/funcs/actions-retrieve.ts @@ -36,6 +36,7 @@ import { Result } from "../types/fp.js"; export function actionsRetrieve( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -57,6 +58,7 @@ export function actionsRetrieve( return new APIPromise($do( client, id, + projectId, options, )); } @@ -64,6 +66,7 @@ export function actionsRetrieve( async function $do( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -87,6 +90,7 @@ async function $do( > { const input: operations.GetActionRequest = { id: id, + projectId: projectId, }; const parsed = safeParse( @@ -110,6 +114,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/actions-update.ts b/src/funcs/actions-update.ts index 898dc3f..46b9b67 100644 --- a/src/funcs/actions-update.ts +++ b/src/funcs/actions-update.ts @@ -37,6 +37,7 @@ export function actionsUpdate( client: ModerationApiCore, id: string, body: operations.UpdateActionRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -60,6 +61,7 @@ export function actionsUpdate( client, id, body, + projectId, options, )); } @@ -68,6 +70,7 @@ async function $do( client: ModerationApiCore, id: string, body: operations.UpdateActionRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -93,6 +96,7 @@ async function $do( const input: operations.UpdateActionRequest = { id: id, body: body, + projectId: projectId, }; const parsed = safeParse( @@ -117,6 +121,10 @@ async function $do( const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/authors-create.ts b/src/funcs/authors-create.ts index da6b984..5ef96da 100644 --- a/src/funcs/authors-create.ts +++ b/src/funcs/authors-create.ts @@ -4,7 +4,7 @@ import * as z from "zod/v4-mini"; import { ModerationApiCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -36,7 +36,8 @@ import { Result } from "../types/fp.js"; */ export function authorsCreate( client: ModerationApiCore, - request: operations.CreateAuthorRequest, + body: operations.CreateAuthorRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -58,14 +59,16 @@ export function authorsCreate( > { return new APIPromise($do( client, - request, + body, + projectId, options, )); } async function $do( client: ModerationApiCore, - request: operations.CreateAuthorRequest, + body: operations.CreateAuthorRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -88,8 +91,13 @@ async function $do( APICall, ] > { + const input: operations.CreateAuthorRequest = { + body: body, + projectId: projectId, + }; + const parsed = safeParse( - request, + input, (value) => z.parse(operations.CreateAuthorRequest$outboundSchema, value), "Input validation failed", ); @@ -97,13 +105,17 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); + const body$ = encodeJSON("body", payload.body, { explode: true }); const path = pathToFunc("/authors")(); const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); @@ -131,7 +143,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, - body: body, + body: body$, userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); diff --git a/src/funcs/authors-delete.ts b/src/funcs/authors-delete.ts index 29b67f6..846f318 100644 --- a/src/funcs/authors-delete.ts +++ b/src/funcs/authors-delete.ts @@ -36,6 +36,7 @@ import { Result } from "../types/fp.js"; export function authorsDelete( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -59,6 +60,7 @@ export function authorsDelete( return new APIPromise($do( client, id, + projectId, options, )); } @@ -66,6 +68,7 @@ export function authorsDelete( async function $do( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -91,6 +94,7 @@ async function $do( > { const input: operations.DeleteAuthorRequest = { id: id, + projectId: projectId, }; const parsed = safeParse( @@ -114,6 +118,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/authors-list.ts b/src/funcs/authors-list.ts index fd7d7b0..a6ecac4 100644 --- a/src/funcs/authors-list.ts +++ b/src/funcs/authors-list.ts @@ -4,7 +4,7 @@ import * as z from "zod/v4-mini"; import { ModerationApiCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -127,6 +127,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload?.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/authors-retrieve.ts b/src/funcs/authors-retrieve.ts index 6f374b2..46cf3de 100644 --- a/src/funcs/authors-retrieve.ts +++ b/src/funcs/authors-retrieve.ts @@ -37,6 +37,7 @@ import { Result } from "../types/fp.js"; export function authorsRetrieve( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -60,6 +61,7 @@ export function authorsRetrieve( return new APIPromise($do( client, id, + projectId, options, )); } @@ -67,6 +69,7 @@ export function authorsRetrieve( async function $do( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -92,6 +95,7 @@ async function $do( > { const input: operations.GetAuthorRequest = { id: id, + projectId: projectId, }; const parsed = safeParse( @@ -115,6 +119,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/authors-update.ts b/src/funcs/authors-update.ts index 6d096b4..c388f37 100644 --- a/src/funcs/authors-update.ts +++ b/src/funcs/authors-update.ts @@ -38,6 +38,7 @@ export function authorsUpdate( client: ModerationApiCore, id: string, body: operations.UpdateAuthorRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -62,6 +63,7 @@ export function authorsUpdate( client, id, body, + projectId, options, )); } @@ -70,6 +72,7 @@ async function $do( client: ModerationApiCore, id: string, body: operations.UpdateAuthorRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -96,6 +99,7 @@ async function $do( const input: operations.UpdateAuthorRequest = { id: id, body: body, + projectId: projectId, }; const parsed = safeParse( @@ -120,6 +124,10 @@ async function $do( const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/content-submit.ts b/src/funcs/content-submit.ts index 93d9b80..5913733 100644 --- a/src/funcs/content-submit.ts +++ b/src/funcs/content-submit.ts @@ -4,7 +4,7 @@ import * as z from "zod/v4-mini"; import { ModerationApiCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -27,9 +27,13 @@ import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; +/** + * Submit content + */ export function contentSubmit( client: ModerationApiCore, - request: operations.SubmitContentRequest, + body: operations.SubmitContentRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -51,14 +55,16 @@ export function contentSubmit( > { return new APIPromise($do( client, - request, + body, + projectId, options, )); } async function $do( client: ModerationApiCore, - request: operations.SubmitContentRequest, + body: operations.SubmitContentRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -81,8 +87,13 @@ async function $do( APICall, ] > { + const input: operations.SubmitContentRequest = { + body: body, + projectId: projectId, + }; + const parsed = safeParse( - request, + input, (value) => z.parse(operations.SubmitContentRequest$outboundSchema, value), "Input validation failed", ); @@ -90,13 +101,17 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); + const body$ = encodeJSON("body", payload.body, { explode: true }); const path = pathToFunc("/moderate")(); const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); @@ -124,7 +139,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, - body: body, + body: body$, userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); diff --git a/src/funcs/queue-get-stats.ts b/src/funcs/queue-get-stats.ts index b68b319..a266809 100644 --- a/src/funcs/queue-get-stats.ts +++ b/src/funcs/queue-get-stats.ts @@ -37,6 +37,7 @@ export function queueGetStats( client: ModerationApiCore, id: string, withinDays?: number | undefined, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -61,6 +62,7 @@ export function queueGetStats( client, id, withinDays, + projectId, options, )); } @@ -69,6 +71,7 @@ async function $do( client: ModerationApiCore, id: string, withinDays?: number | undefined, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -95,6 +98,7 @@ async function $do( const input: operations.GetQueueStatsRequest = { id: id, withinDays: withinDays, + projectId: projectId, }; const parsed = safeParse( @@ -122,6 +126,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/queue-items-list.ts b/src/funcs/queue-items-list.ts index 9daf488..70ae588 100644 --- a/src/funcs/queue-items-list.ts +++ b/src/funcs/queue-items-list.ts @@ -136,6 +136,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/queue-items-resolve.ts b/src/funcs/queue-items-resolve.ts index 53f6c16..d90c415 100644 --- a/src/funcs/queue-items-resolve.ts +++ b/src/funcs/queue-items-resolve.ts @@ -38,6 +38,7 @@ export function queueItemsResolve( id: string, itemId: string, body: operations.ResolveQueueItemRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -62,6 +63,7 @@ export function queueItemsResolve( id, itemId, body, + projectId, options, )); } @@ -71,6 +73,7 @@ async function $do( id: string, itemId: string, body: operations.ResolveQueueItemRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -97,6 +100,7 @@ async function $do( id: id, itemId: itemId, body: body, + projectId: projectId, }; const parsed = safeParse( @@ -126,6 +130,10 @@ async function $do( const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/queue-items-unresolve.ts b/src/funcs/queue-items-unresolve.ts index 59eb387..7b84d2d 100644 --- a/src/funcs/queue-items-unresolve.ts +++ b/src/funcs/queue-items-unresolve.ts @@ -38,6 +38,7 @@ export function queueItemsUnresolve( id: string, itemId: string, body: operations.UnresolveQueueItemRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -62,6 +63,7 @@ export function queueItemsUnresolve( id, itemId, body, + projectId, options, )); } @@ -71,6 +73,7 @@ async function $do( id: string, itemId: string, body: operations.UnresolveQueueItemRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -97,6 +100,7 @@ async function $do( id: id, itemId: itemId, body: body, + projectId: projectId, }; const parsed = safeParse( @@ -126,6 +130,10 @@ async function $do( const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/queue-retrieve.ts b/src/funcs/queue-retrieve.ts index 63e6b94..c8e5d52 100644 --- a/src/funcs/queue-retrieve.ts +++ b/src/funcs/queue-retrieve.ts @@ -36,6 +36,7 @@ import { Result } from "../types/fp.js"; export function queueRetrieve( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -59,6 +60,7 @@ export function queueRetrieve( return new APIPromise($do( client, id, + projectId, options, )); } @@ -66,6 +68,7 @@ export function queueRetrieve( async function $do( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -91,6 +94,7 @@ async function $do( > { const input: operations.GetQueueRequest = { id: id, + projectId: projectId, }; const parsed = safeParse( @@ -114,6 +118,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/webhook-secret-retrieve.ts b/src/funcs/webhook-secret-retrieve.ts index 8a4e1d2..218951c 100644 --- a/src/funcs/webhook-secret-retrieve.ts +++ b/src/funcs/webhook-secret-retrieve.ts @@ -2,10 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod/v4-mini"; import { ModerationApiCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -32,6 +35,7 @@ import { Result } from "../types/fp.js"; */ export function webhookSecretRetrieve( client: ModerationApiCore, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -50,12 +54,14 @@ export function webhookSecretRetrieve( > { return new APIPromise($do( client, + projectId, options, )); } async function $do( client: ModerationApiCore, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -75,10 +81,33 @@ async function $do( APICall, ] > { + const input: operations.GetWebhookSecretRequest | undefined = { + projectId: projectId, + }; + + const parsed = safeParse( + input, + (value) => + z.parse( + z.optional(operations.GetWebhookSecretRequest$outboundSchema), + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + const path = pathToFunc("/webhook-secret")(); const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload?.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); @@ -106,6 +135,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + body: body, userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); diff --git a/src/funcs/webhooks-create.ts b/src/funcs/webhooks-create.ts index 7f54c55..1739c13 100644 --- a/src/funcs/webhooks-create.ts +++ b/src/funcs/webhooks-create.ts @@ -4,7 +4,7 @@ import * as z from "zod/v4-mini"; import { ModerationApiCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -35,7 +35,8 @@ import { Result } from "../types/fp.js"; */ export function webhooksCreate( client: ModerationApiCore, - request: operations.CreateWebhookRequest, + body: operations.CreateWebhookRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -55,14 +56,16 @@ export function webhooksCreate( > { return new APIPromise($do( client, - request, + body, + projectId, options, )); } async function $do( client: ModerationApiCore, - request: operations.CreateWebhookRequest, + body: operations.CreateWebhookRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -83,8 +86,13 @@ async function $do( APICall, ] > { + const input: operations.CreateWebhookRequest = { + body: body, + projectId: projectId, + }; + const parsed = safeParse( - request, + input, (value) => z.parse(operations.CreateWebhookRequest$outboundSchema, value), "Input validation failed", ); @@ -92,13 +100,17 @@ async function $do( return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); + const body$ = encodeJSON("body", payload.body, { explode: true }); const path = pathToFunc("/webhooks")(); const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); @@ -126,7 +138,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, - body: body, + body: body$, userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); diff --git a/src/funcs/webhooks-delete.ts b/src/funcs/webhooks-delete.ts index bd0d100..2db7498 100644 --- a/src/funcs/webhooks-delete.ts +++ b/src/funcs/webhooks-delete.ts @@ -36,6 +36,7 @@ import { Result } from "../types/fp.js"; export function webhooksDelete( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -56,6 +57,7 @@ export function webhooksDelete( return new APIPromise($do( client, id, + projectId, options, )); } @@ -63,6 +65,7 @@ export function webhooksDelete( async function $do( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -85,6 +88,7 @@ async function $do( > { const input: operations.DeleteWebhookRequest = { id: id, + projectId: projectId, }; const parsed = safeParse( @@ -108,6 +112,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/webhooks-list.ts b/src/funcs/webhooks-list.ts index c3e2746..9bab5f6 100644 --- a/src/funcs/webhooks-list.ts +++ b/src/funcs/webhooks-list.ts @@ -4,7 +4,7 @@ import * as z from "zod/v4-mini"; import { ModerationApiCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -43,6 +43,7 @@ export function webhooksList( client: ModerationApiCore, page?: number | undefined, pageSize?: number | undefined, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< PageIterator< @@ -66,6 +67,7 @@ export function webhooksList( client, page, pageSize, + projectId, options, )); } @@ -74,6 +76,7 @@ async function $do( client: ModerationApiCore, page?: number | undefined, pageSize?: number | undefined, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -99,6 +102,7 @@ async function $do( const input: operations.ListWebhooksRequest | undefined = { page: page, pageSize: pageSize, + projectId: projectId, }; const parsed = safeParse( @@ -122,6 +126,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload?.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); @@ -250,6 +258,7 @@ async function $do( client, nextPage, pageSize, + projectId, options, ); diff --git a/src/funcs/webhooks-retrieve.ts b/src/funcs/webhooks-retrieve.ts index 0d6d931..66e3c88 100644 --- a/src/funcs/webhooks-retrieve.ts +++ b/src/funcs/webhooks-retrieve.ts @@ -36,6 +36,7 @@ import { Result } from "../types/fp.js"; export function webhooksRetrieve( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -56,6 +57,7 @@ export function webhooksRetrieve( return new APIPromise($do( client, id, + projectId, options, )); } @@ -63,6 +65,7 @@ export function webhooksRetrieve( async function $do( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -85,6 +88,7 @@ async function $do( > { const input: operations.GetWebhookRequest = { id: id, + projectId: projectId, }; const parsed = safeParse( @@ -108,6 +112,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/webhooks-update.ts b/src/funcs/webhooks-update.ts index 5e96d95..10da31d 100644 --- a/src/funcs/webhooks-update.ts +++ b/src/funcs/webhooks-update.ts @@ -37,6 +37,7 @@ export function webhooksUpdate( client: ModerationApiCore, id: string, body: operations.UpdateWebhookRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -59,6 +60,7 @@ export function webhooksUpdate( client, id, body, + projectId, options, )); } @@ -67,6 +69,7 @@ async function $do( client: ModerationApiCore, id: string, body: operations.UpdateWebhookRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -91,6 +94,7 @@ async function $do( const input: operations.UpdateWebhookRequest = { id: id, body: body, + projectId: projectId, }; const parsed = safeParse( @@ -115,6 +119,10 @@ async function $do( const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/wordlist-get-embedding-status.ts b/src/funcs/wordlist-get-embedding-status.ts index a6978c2..614e4e5 100644 --- a/src/funcs/wordlist-get-embedding-status.ts +++ b/src/funcs/wordlist-get-embedding-status.ts @@ -36,6 +36,7 @@ import { Result } from "../types/fp.js"; export function wordlistGetEmbeddingStatus( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -59,6 +60,7 @@ export function wordlistGetEmbeddingStatus( return new APIPromise($do( client, id, + projectId, options, )); } @@ -66,6 +68,7 @@ export function wordlistGetEmbeddingStatus( async function $do( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -91,6 +94,7 @@ async function $do( > { const input: operations.GetWordlistEmbeddingStatusRequest = { id: id, + projectId: projectId, }; const parsed = safeParse( @@ -118,6 +122,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/wordlist-list.ts b/src/funcs/wordlist-list.ts index d967ffb..f2539f3 100644 --- a/src/funcs/wordlist-list.ts +++ b/src/funcs/wordlist-list.ts @@ -4,7 +4,7 @@ import * as z from "zod/v4-mini"; import { ModerationApiCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; @@ -43,6 +43,7 @@ export function wordlistList( client: ModerationApiCore, page?: number | undefined, pageSize?: number | undefined, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< PageIterator< @@ -70,6 +71,7 @@ export function wordlistList( client, page, pageSize, + projectId, options, )); } @@ -78,6 +80,7 @@ async function $do( client: ModerationApiCore, page?: number | undefined, pageSize?: number | undefined, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -107,6 +110,7 @@ async function $do( const input: operations.ListWordlistsRequest | undefined = { page: page, pageSize: pageSize, + projectId: projectId, }; const parsed = safeParse( @@ -133,6 +137,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload?.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); @@ -273,6 +281,7 @@ async function $do( client, nextPage, pageSize, + projectId, options, ); diff --git a/src/funcs/wordlist-retrieve.ts b/src/funcs/wordlist-retrieve.ts index 4275336..68cec4d 100644 --- a/src/funcs/wordlist-retrieve.ts +++ b/src/funcs/wordlist-retrieve.ts @@ -36,6 +36,7 @@ import { Result } from "../types/fp.js"; export function wordlistRetrieve( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -59,6 +60,7 @@ export function wordlistRetrieve( return new APIPromise($do( client, id, + projectId, options, )); } @@ -66,6 +68,7 @@ export function wordlistRetrieve( async function $do( client: ModerationApiCore, id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -91,6 +94,7 @@ async function $do( > { const input: operations.GetWordlistRequest = { id: id, + projectId: projectId, }; const parsed = safeParse( @@ -114,6 +118,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/wordlist-update.ts b/src/funcs/wordlist-update.ts index 14c058c..a7f42b0 100644 --- a/src/funcs/wordlist-update.ts +++ b/src/funcs/wordlist-update.ts @@ -37,6 +37,7 @@ export function wordlistUpdate( client: ModerationApiCore, id: string, body: operations.UpdateWordlistRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -59,6 +60,7 @@ export function wordlistUpdate( client, id, body, + projectId, options, )); } @@ -67,6 +69,7 @@ async function $do( client: ModerationApiCore, id: string, body: operations.UpdateWordlistRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -91,6 +94,7 @@ async function $do( const input: operations.UpdateWordlistRequest = { id: id, body: body, + projectId: projectId, }; const parsed = safeParse( @@ -115,6 +119,10 @@ async function $do( const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/wordlist-words-add.ts b/src/funcs/wordlist-words-add.ts index bfaf79a..b154c54 100644 --- a/src/funcs/wordlist-words-add.ts +++ b/src/funcs/wordlist-words-add.ts @@ -37,6 +37,7 @@ export function wordlistWordsAdd( client: ModerationApiCore, id: string, body: operations.AddWordlistWordsRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -59,6 +60,7 @@ export function wordlistWordsAdd( client, id, body, + projectId, options, )); } @@ -67,6 +69,7 @@ async function $do( client: ModerationApiCore, id: string, body: operations.AddWordlistWordsRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -91,6 +94,7 @@ async function $do( const input: operations.AddWordlistWordsRequest = { id: id, body: body, + projectId: projectId, }; const parsed = safeParse( @@ -116,6 +120,10 @@ async function $do( const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/funcs/wordlist-words-remove.ts b/src/funcs/wordlist-words-remove.ts index 3baba4b..72a4544 100644 --- a/src/funcs/wordlist-words-remove.ts +++ b/src/funcs/wordlist-words-remove.ts @@ -37,6 +37,7 @@ export function wordlistWordsRemove( client: ModerationApiCore, id: string, words: Array, + projectId?: string | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -59,6 +60,7 @@ export function wordlistWordsRemove( client, id, words, + projectId, options, )); } @@ -67,6 +69,7 @@ async function $do( client: ModerationApiCore, id: string, words: Array, + projectId?: string | undefined, options?: RequestOptions, ): Promise< [ @@ -91,6 +94,7 @@ async function $do( const input: operations.RemoveWordlistWordsRequest = { id: id, words: words, + projectId: projectId, }; const parsed = safeParse( @@ -119,6 +123,10 @@ async function $do( const headers = new Headers(compactMap({ Accept: "application/json", + "Project-Id": encodeSimple("Project-Id", payload.projectId, { + explode: false, + charEncoding: "none", + }), })); const secConfig = await extractSecurity(client._options.secretKey); diff --git a/src/lib/config.ts b/src/lib/config.ts index 4450d75..123216d 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -58,8 +58,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.1.0", - sdkVersion: "5.0.0", + sdkVersion: "5.1.0", genVersion: "internal", userAgent: - "speakeasy-sdk/typescript 5.0.0 internal 1.1.0 @moderation-api/sdk", + "speakeasy-sdk/typescript 5.1.0 internal 1.1.0 @moderation-api/sdk", } as const; diff --git a/src/models/bad-request-error.ts b/src/models/bad-request-error.ts index 19e81e9..3b11744 100644 --- a/src/models/bad-request-error.ts +++ b/src/models/bad-request-error.ts @@ -12,10 +12,12 @@ import { OpenEnum } from "../types/enums.js"; * @remarks * * - `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`. */ export const BadRequestErrorCode = { InvalidRequest: "invalid_request", + ProjectIdRequired: "project_id_required", ValidationFailed: "validation_failed", } as const; /** @@ -24,6 +26,7 @@ export const BadRequestErrorCode = { * @remarks * * - `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`. */ export type BadRequestErrorCode = OpenEnum; diff --git a/src/models/errors/bad-request-error.ts b/src/models/errors/bad-request-error.ts index 75ca3c6..04da000 100644 --- a/src/models/errors/bad-request-error.ts +++ b/src/models/errors/bad-request-error.ts @@ -22,6 +22,7 @@ export type BadRequestErrorData = { * @remarks * * - `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`. */ code: models.BadRequestErrorCode; @@ -57,6 +58,7 @@ export class BadRequestError extends ModerationAPIError { * @remarks * * - `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`. */ code: models.BadRequestErrorCode; diff --git a/src/models/errors/permission-denied-error.ts b/src/models/errors/permission-denied-error.ts index f90cba7..cf968c3 100644 --- a/src/models/errors/permission-denied-error.ts +++ b/src/models/errors/permission-denied-error.ts @@ -26,7 +26,6 @@ export type PermissionDeniedErrorData = { * - `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. @@ -68,7 +67,6 @@ export class PermissionDeniedError extends ModerationAPIError { * - `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/add-wordlist-words.ts b/src/models/operations/add-wordlist-words.ts index 0dc6dde..6c88bbf 100644 --- a/src/models/operations/add-wordlist-words.ts +++ b/src/models/operations/add-wordlist-words.ts @@ -20,6 +20,10 @@ export type AddWordlistWordsRequest = { * ID of the wordlist to add words to */ id: string; + /** + * 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. + */ + projectId?: string | undefined; body: AddWordlistWordsRequestBody; }; @@ -67,6 +71,7 @@ export function addWordlistWordsRequestBodyToJSON( /** @internal */ export type AddWordlistWordsRequest$Outbound = { id: string; + projectId?: string | undefined; body: AddWordlistWordsRequestBody$Outbound; }; @@ -76,6 +81,7 @@ export const AddWordlistWordsRequest$outboundSchema: z.ZodMiniType< AddWordlistWordsRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), body: z.lazy(() => AddWordlistWordsRequestBody$outboundSchema), }); diff --git a/src/models/operations/create-action.ts b/src/models/operations/create-action.ts index 73dc075..4809a87 100644 --- a/src/models/operations/create-action.ts +++ b/src/models/operations/create-action.ts @@ -63,7 +63,7 @@ export type CreateActionPossibleValueRequest = { value: string; }; -export type CreateActionRequest = { +export type CreateActionRequestBody = { /** * User defined key of the action. */ @@ -110,6 +110,14 @@ export type CreateActionRequest = { freeText?: boolean | undefined; }; +export type CreateActionRequest = { + /** + * 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. + */ + projectId?: string | undefined; + body: CreateActionRequestBody; +}; + export const CreateActionTypeResponse = { AuthorBlock: "AUTHOR_BLOCK", AuthorBlockTemp: "AUTHOR_BLOCK_TEMP", @@ -260,7 +268,7 @@ export function createActionPossibleValueRequestToJSON( } /** @internal */ -export type CreateActionRequest$Outbound = { +export type CreateActionRequestBody$Outbound = { key?: string | null | undefined; name: string; description?: string | null | undefined; @@ -275,9 +283,9 @@ export type CreateActionRequest$Outbound = { }; /** @internal */ -export const CreateActionRequest$outboundSchema: z.ZodMiniType< - CreateActionRequest$Outbound, - CreateActionRequest +export const CreateActionRequestBody$outboundSchema: z.ZodMiniType< + CreateActionRequestBody$Outbound, + CreateActionRequestBody > = z.object({ key: z.optional(z.nullable(z.string())), name: z.string(), @@ -300,6 +308,29 @@ export const CreateActionRequest$outboundSchema: z.ZodMiniType< freeText: z._default(z.boolean(), false), }); +export function createActionRequestBodyToJSON( + createActionRequestBody: CreateActionRequestBody, +): string { + return JSON.stringify( + CreateActionRequestBody$outboundSchema.parse(createActionRequestBody), + ); +} + +/** @internal */ +export type CreateActionRequest$Outbound = { + projectId?: string | undefined; + body: CreateActionRequestBody$Outbound; +}; + +/** @internal */ +export const CreateActionRequest$outboundSchema: z.ZodMiniType< + CreateActionRequest$Outbound, + CreateActionRequest +> = z.object({ + projectId: z.optional(z.string()), + body: z.lazy(() => CreateActionRequestBody$outboundSchema), +}); + export function createActionRequestToJSON( createActionRequest: CreateActionRequest, ): string { diff --git a/src/models/operations/create-author.ts b/src/models/operations/create-author.ts index 1c07441..44f4a03 100644 --- a/src/models/operations/create-author.ts +++ b/src/models/operations/create-author.ts @@ -28,7 +28,7 @@ export type CreateAuthorMetadata = { [additionalProperties: string]: unknown; }; -export type CreateAuthorRequest = { +export type CreateAuthorRequestBody = { /** * URL of the author's profile picture */ @@ -68,6 +68,14 @@ export type CreateAuthorRequest = { externalId: string; }; +export type CreateAuthorRequest = { + /** + * 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. + */ + projectId?: string | undefined; + body: CreateAuthorRequestBody; +}; + /** @internal */ export type CreateAuthorMetadata$Outbound = { email_verified?: boolean | null | undefined; @@ -112,7 +120,7 @@ export function createAuthorMetadataToJSON( } /** @internal */ -export type CreateAuthorRequest$Outbound = { +export type CreateAuthorRequestBody$Outbound = { profile_picture?: string | null | undefined; external_link?: string | null | undefined; name?: string | null | undefined; @@ -126,9 +134,9 @@ export type CreateAuthorRequest$Outbound = { }; /** @internal */ -export const CreateAuthorRequest$outboundSchema: z.ZodMiniType< - CreateAuthorRequest$Outbound, - CreateAuthorRequest +export const CreateAuthorRequestBody$outboundSchema: z.ZodMiniType< + CreateAuthorRequestBody$Outbound, + CreateAuthorRequestBody > = z.pipe( z.object({ profilePicture: z.optional(z.nullable(z.string())), @@ -154,6 +162,29 @@ export const CreateAuthorRequest$outboundSchema: z.ZodMiniType< }), ); +export function createAuthorRequestBodyToJSON( + createAuthorRequestBody: CreateAuthorRequestBody, +): string { + return JSON.stringify( + CreateAuthorRequestBody$outboundSchema.parse(createAuthorRequestBody), + ); +} + +/** @internal */ +export type CreateAuthorRequest$Outbound = { + projectId?: string | undefined; + body: CreateAuthorRequestBody$Outbound; +}; + +/** @internal */ +export const CreateAuthorRequest$outboundSchema: z.ZodMiniType< + CreateAuthorRequest$Outbound, + CreateAuthorRequest +> = z.object({ + projectId: z.optional(z.string()), + body: z.lazy(() => CreateAuthorRequestBody$outboundSchema), +}); + export function createAuthorRequestToJSON( createAuthorRequest: CreateAuthorRequest, ): string { diff --git a/src/models/operations/create-webhook.ts b/src/models/operations/create-webhook.ts index df1cbdc..e1e8158 100644 --- a/src/models/operations/create-webhook.ts +++ b/src/models/operations/create-webhook.ts @@ -27,7 +27,7 @@ export type CreateWebhookEventTypeRequest = ClosedEnum< typeof CreateWebhookEventTypeRequest >; -export type CreateWebhookRequest = { +export type CreateWebhookRequestBody = { /** * The webhook's name, used to identify it in the dashboard */ @@ -46,6 +46,14 @@ export type CreateWebhookRequest = { eventTypes: Array; }; +export type CreateWebhookRequest = { + /** + * 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. + */ + projectId?: string | undefined; + body: CreateWebhookRequestBody; +}; + export const CreateWebhookEventTypeResponse = { QueueItemNew: "QUEUE_ITEM_NEW", QueueItemCompleted: "QUEUE_ITEM_COMPLETED", @@ -117,7 +125,7 @@ export const CreateWebhookEventTypeRequest$outboundSchema: z.ZodMiniEnum< > = z.enum(CreateWebhookEventTypeRequest); /** @internal */ -export type CreateWebhookRequest$Outbound = { +export type CreateWebhookRequestBody$Outbound = { name: string; description?: string | null | undefined; url: string; @@ -125,9 +133,9 @@ export type CreateWebhookRequest$Outbound = { }; /** @internal */ -export const CreateWebhookRequest$outboundSchema: z.ZodMiniType< - CreateWebhookRequest$Outbound, - CreateWebhookRequest +export const CreateWebhookRequestBody$outboundSchema: z.ZodMiniType< + CreateWebhookRequestBody$Outbound, + CreateWebhookRequestBody > = z.object({ name: z.string(), description: z.optional(z.nullable(z.string())), @@ -135,6 +143,29 @@ export const CreateWebhookRequest$outboundSchema: z.ZodMiniType< eventTypes: z.array(CreateWebhookEventTypeRequest$outboundSchema), }); +export function createWebhookRequestBodyToJSON( + createWebhookRequestBody: CreateWebhookRequestBody, +): string { + return JSON.stringify( + CreateWebhookRequestBody$outboundSchema.parse(createWebhookRequestBody), + ); +} + +/** @internal */ +export type CreateWebhookRequest$Outbound = { + projectId?: string | undefined; + body: CreateWebhookRequestBody$Outbound; +}; + +/** @internal */ +export const CreateWebhookRequest$outboundSchema: z.ZodMiniType< + CreateWebhookRequest$Outbound, + CreateWebhookRequest +> = z.object({ + projectId: z.optional(z.string()), + body: z.lazy(() => CreateWebhookRequestBody$outboundSchema), +}); + export function createWebhookRequestToJSON( createWebhookRequest: CreateWebhookRequest, ): string { diff --git a/src/models/operations/delete-action.ts b/src/models/operations/delete-action.ts index 4bcc968..f714e20 100644 --- a/src/models/operations/delete-action.ts +++ b/src/models/operations/delete-action.ts @@ -13,6 +13,10 @@ export type DeleteActionRequest = { * The ID of the action to delete. */ id: string; + /** + * 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. + */ + projectId?: string | undefined; }; /** @@ -32,6 +36,7 @@ export type DeleteActionResponse = { /** @internal */ export type DeleteActionRequest$Outbound = { id: string; + projectId?: string | undefined; }; /** @internal */ @@ -40,6 +45,7 @@ export const DeleteActionRequest$outboundSchema: z.ZodMiniType< DeleteActionRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), }); export function deleteActionRequestToJSON( diff --git a/src/models/operations/delete-author.ts b/src/models/operations/delete-author.ts index ee0fdba..ab669f1 100644 --- a/src/models/operations/delete-author.ts +++ b/src/models/operations/delete-author.ts @@ -13,6 +13,10 @@ export type DeleteAuthorRequest = { * Either external ID or the ID assigned by moderation API. */ id: string; + /** + * 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. + */ + projectId?: string | undefined; }; /** @@ -25,6 +29,7 @@ export type DeleteAuthorResponse = { /** @internal */ export type DeleteAuthorRequest$Outbound = { id: string; + projectId?: string | undefined; }; /** @internal */ @@ -33,6 +38,7 @@ export const DeleteAuthorRequest$outboundSchema: z.ZodMiniType< DeleteAuthorRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), }); export function deleteAuthorRequestToJSON( diff --git a/src/models/operations/delete-webhook.ts b/src/models/operations/delete-webhook.ts index 44f6867..1f26216 100644 --- a/src/models/operations/delete-webhook.ts +++ b/src/models/operations/delete-webhook.ts @@ -13,6 +13,10 @@ export type DeleteWebhookRequest = { * The ID of the webhook to delete. */ id: string; + /** + * 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. + */ + projectId?: string | undefined; }; /** @@ -32,6 +36,7 @@ export type DeleteWebhookResponse = { /** @internal */ export type DeleteWebhookRequest$Outbound = { id: string; + projectId?: string | undefined; }; /** @internal */ @@ -40,6 +45,7 @@ export const DeleteWebhookRequest$outboundSchema: z.ZodMiniType< DeleteWebhookRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), }); export function deleteWebhookRequestToJSON( diff --git a/src/models/operations/execute-action.ts b/src/models/operations/execute-action.ts index 004f395..9fdf3f5 100644 --- a/src/models/operations/execute-action.ts +++ b/src/models/operations/execute-action.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdk-validation-error.js"; /** * Input parameters */ -export type ExecuteActionRequest = { +export type ExecuteActionRequestBody = { /** * ID or key of the action to execute */ @@ -38,6 +38,14 @@ export type ExecuteActionRequest = { duration?: number | undefined; }; +export type ExecuteActionRequest = { + /** + * 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. + */ + projectId?: string | undefined; + body: ExecuteActionRequestBody; +}; + /** * Execution result */ @@ -49,7 +57,7 @@ export type ExecuteActionResponse = { }; /** @internal */ -export type ExecuteActionRequest$Outbound = { +export type ExecuteActionRequestBody$Outbound = { actionKey: string; contentIds?: Array | undefined; authorIds?: Array | undefined; @@ -59,9 +67,9 @@ export type ExecuteActionRequest$Outbound = { }; /** @internal */ -export const ExecuteActionRequest$outboundSchema: z.ZodMiniType< - ExecuteActionRequest$Outbound, - ExecuteActionRequest +export const ExecuteActionRequestBody$outboundSchema: z.ZodMiniType< + ExecuteActionRequestBody$Outbound, + ExecuteActionRequestBody > = z.object({ actionKey: z.string(), contentIds: z.optional(z.array(z.string())), @@ -71,6 +79,29 @@ export const ExecuteActionRequest$outboundSchema: z.ZodMiniType< duration: z.optional(z.number()), }); +export function executeActionRequestBodyToJSON( + executeActionRequestBody: ExecuteActionRequestBody, +): string { + return JSON.stringify( + ExecuteActionRequestBody$outboundSchema.parse(executeActionRequestBody), + ); +} + +/** @internal */ +export type ExecuteActionRequest$Outbound = { + projectId?: string | undefined; + body: ExecuteActionRequestBody$Outbound; +}; + +/** @internal */ +export const ExecuteActionRequest$outboundSchema: z.ZodMiniType< + ExecuteActionRequest$Outbound, + ExecuteActionRequest +> = z.object({ + projectId: z.optional(z.string()), + body: z.lazy(() => ExecuteActionRequestBody$outboundSchema), +}); + export function executeActionRequestToJSON( executeActionRequest: ExecuteActionRequest, ): string { diff --git a/src/models/operations/get-account.ts b/src/models/operations/get-account.ts index 56151ec..001e196 100644 --- a/src/models/operations/get-account.ts +++ b/src/models/operations/get-account.ts @@ -9,6 +9,13 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdk-validation-error.js"; +export type GetAccountRequest = { + /** + * 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. + */ + projectId?: string | undefined; +}; + export type CurrentProject = { /** * ID of the current project @@ -43,6 +50,27 @@ export type GetAccountResponse = { currentProject?: CurrentProject | undefined; }; +/** @internal */ +export type GetAccountRequest$Outbound = { + projectId?: string | undefined; +}; + +/** @internal */ +export const GetAccountRequest$outboundSchema: z.ZodMiniType< + GetAccountRequest$Outbound, + GetAccountRequest +> = z.object({ + projectId: z.optional(z.string()), +}); + +export function getAccountRequestToJSON( + getAccountRequest: GetAccountRequest, +): string { + return JSON.stringify( + GetAccountRequest$outboundSchema.parse(getAccountRequest), + ); +} + /** @internal */ export const CurrentProject$inboundSchema: z.ZodMiniType< CurrentProject, diff --git a/src/models/operations/get-action.ts b/src/models/operations/get-action.ts index 406794e..27b21b7 100644 --- a/src/models/operations/get-action.ts +++ b/src/models/operations/get-action.ts @@ -15,6 +15,10 @@ export type GetActionRequest = { * The ID of the action to get. */ id: string; + /** + * 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. + */ + projectId?: string | undefined; }; export const GetActionType = { @@ -125,6 +129,7 @@ export type GetActionResponse = { /** @internal */ export type GetActionRequest$Outbound = { id: string; + projectId?: string | undefined; }; /** @internal */ @@ -133,6 +138,7 @@ export const GetActionRequest$outboundSchema: z.ZodMiniType< GetActionRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), }); export function getActionRequestToJSON( diff --git a/src/models/operations/get-author.ts b/src/models/operations/get-author.ts index 9c49297..6e77389 100644 --- a/src/models/operations/get-author.ts +++ b/src/models/operations/get-author.ts @@ -9,11 +9,16 @@ export type GetAuthorRequest = { * Either external ID or the ID assigned by moderation API. */ id: string; + /** + * 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. + */ + projectId?: string | undefined; }; /** @internal */ export type GetAuthorRequest$Outbound = { id: string; + projectId?: string | undefined; }; /** @internal */ @@ -22,6 +27,7 @@ export const GetAuthorRequest$outboundSchema: z.ZodMiniType< GetAuthorRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), }); export function getAuthorRequestToJSON( diff --git a/src/models/operations/get-queue-stats.ts b/src/models/operations/get-queue-stats.ts index 5fbfcba..b56d988 100644 --- a/src/models/operations/get-queue-stats.ts +++ b/src/models/operations/get-queue-stats.ts @@ -14,6 +14,10 @@ export type GetQueueStatsRequest = { */ id: string; withinDays?: number | undefined; + /** + * 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. + */ + projectId?: string | undefined; }; export type ReviewStats = { @@ -136,6 +140,7 @@ export type GetQueueStatsResponse = { export type GetQueueStatsRequest$Outbound = { id: string; withinDays: number; + projectId?: string | undefined; }; /** @internal */ @@ -145,6 +150,7 @@ export const GetQueueStatsRequest$outboundSchema: z.ZodMiniType< > = z.object({ id: z.string(), withinDays: z._default(z.int(), 30), + projectId: z.optional(z.string()), }); export function getQueueStatsRequestToJSON( diff --git a/src/models/operations/get-queue.ts b/src/models/operations/get-queue.ts index 0d8afa7..7b44d16 100644 --- a/src/models/operations/get-queue.ts +++ b/src/models/operations/get-queue.ts @@ -15,6 +15,10 @@ export type GetQueueRequest = { * The queue ID */ id: string; + /** + * 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. + */ + projectId?: string | undefined; }; export const IsFlagged = { @@ -156,6 +160,7 @@ export type GetQueueResponse = { /** @internal */ export type GetQueueRequest$Outbound = { id: string; + projectId?: string | undefined; }; /** @internal */ @@ -164,6 +169,7 @@ export const GetQueueRequest$outboundSchema: z.ZodMiniType< GetQueueRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), }); export function getQueueRequestToJSON( diff --git a/src/models/operations/get-webhook-secret.ts b/src/models/operations/get-webhook-secret.ts index fc4980b..9ba9f0f 100644 --- a/src/models/operations/get-webhook-secret.ts +++ b/src/models/operations/get-webhook-secret.ts @@ -8,6 +8,13 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdk-validation-error.js"; +export type GetWebhookSecretRequest = { + /** + * 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. + */ + projectId?: string | undefined; +}; + /** * Signing secret retrieved successfully */ @@ -18,6 +25,27 @@ export type GetWebhookSecretResponse = { secret: string; }; +/** @internal */ +export type GetWebhookSecretRequest$Outbound = { + projectId?: string | undefined; +}; + +/** @internal */ +export const GetWebhookSecretRequest$outboundSchema: z.ZodMiniType< + GetWebhookSecretRequest$Outbound, + GetWebhookSecretRequest +> = z.object({ + projectId: z.optional(z.string()), +}); + +export function getWebhookSecretRequestToJSON( + getWebhookSecretRequest: GetWebhookSecretRequest, +): string { + return JSON.stringify( + GetWebhookSecretRequest$outboundSchema.parse(getWebhookSecretRequest), + ); +} + /** @internal */ export const GetWebhookSecretResponse$inboundSchema: z.ZodMiniType< GetWebhookSecretResponse, diff --git a/src/models/operations/get-webhook.ts b/src/models/operations/get-webhook.ts index 8f166eb..c969415 100644 --- a/src/models/operations/get-webhook.ts +++ b/src/models/operations/get-webhook.ts @@ -15,6 +15,10 @@ export type GetWebhookRequest = { * The ID of the webhook to get. */ id: string; + /** + * 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. + */ + projectId?: string | undefined; }; export const GetWebhookEventType = { @@ -83,6 +87,7 @@ export type GetWebhookResponse = { /** @internal */ export type GetWebhookRequest$Outbound = { id: string; + projectId?: string | undefined; }; /** @internal */ @@ -91,6 +96,7 @@ export const GetWebhookRequest$outboundSchema: z.ZodMiniType< GetWebhookRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), }); export function getWebhookRequestToJSON( diff --git a/src/models/operations/get-wordlist-embedding-status.ts b/src/models/operations/get-wordlist-embedding-status.ts index b83dbeb..915834d 100644 --- a/src/models/operations/get-wordlist-embedding-status.ts +++ b/src/models/operations/get-wordlist-embedding-status.ts @@ -13,6 +13,10 @@ export type GetWordlistEmbeddingStatusRequest = { * ID of the wordlist to check embedding status for */ id: string; + /** + * 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. + */ + projectId?: string | undefined; }; /** @@ -36,6 +40,7 @@ export type GetWordlistEmbeddingStatusResponse = { /** @internal */ export type GetWordlistEmbeddingStatusRequest$Outbound = { id: string; + projectId?: string | undefined; }; /** @internal */ @@ -44,6 +49,7 @@ export const GetWordlistEmbeddingStatusRequest$outboundSchema: z.ZodMiniType< GetWordlistEmbeddingStatusRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), }); export function getWordlistEmbeddingStatusRequestToJSON( diff --git a/src/models/operations/get-wordlist.ts b/src/models/operations/get-wordlist.ts index aa6a391..ac948d7 100644 --- a/src/models/operations/get-wordlist.ts +++ b/src/models/operations/get-wordlist.ts @@ -13,6 +13,10 @@ export type GetWordlistRequest = { * ID of the wordlist to get */ id: string; + /** + * 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. + */ + projectId?: string | undefined; }; /** @@ -46,6 +50,7 @@ export type GetWordlistResponse = { /** @internal */ export type GetWordlistRequest$Outbound = { id: string; + projectId?: string | undefined; }; /** @internal */ @@ -54,6 +59,7 @@ export const GetWordlistRequest$outboundSchema: z.ZodMiniType< GetWordlistRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), }); export function getWordlistRequestToJSON( diff --git a/src/models/operations/list-actions.ts b/src/models/operations/list-actions.ts index 503b915..ab8f378 100644 --- a/src/models/operations/list-actions.ts +++ b/src/models/operations/list-actions.ts @@ -16,6 +16,10 @@ export type ListActionsRequest = { queueId?: string | undefined; page?: number | undefined; pageSize?: number | undefined; + /** + * 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. + */ + projectId?: string | undefined; }; export const ListActionsType = { @@ -145,6 +149,7 @@ export type ListActionsRequest$Outbound = { queueId?: string | undefined; page: number; pageSize: number; + projectId?: string | undefined; }; /** @internal */ @@ -155,6 +160,7 @@ export const ListActionsRequest$outboundSchema: z.ZodMiniType< queueId: z.optional(z.string()), page: z._default(z.int(), 1), pageSize: z._default(z.int(), 20), + projectId: z.optional(z.string()), }); export function listActionsRequestToJSON( diff --git a/src/models/operations/list-authors.ts b/src/models/operations/list-authors.ts index 45f5083..c16e63f 100644 --- a/src/models/operations/list-authors.ts +++ b/src/models/operations/list-authors.ts @@ -47,6 +47,10 @@ export type ListAuthorsRequest = { memberSinceDate?: string | undefined; lastActiveDate?: string | undefined; contentTypes?: Array | undefined; + /** + * 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. + */ + projectId?: string | undefined; }; /** @@ -86,6 +90,7 @@ export type ListAuthorsRequest$Outbound = { memberSinceDate?: string | undefined; lastActiveDate?: string | undefined; contentTypes?: Array | undefined; + projectId?: string | undefined; }; /** @internal */ @@ -100,6 +105,7 @@ export const ListAuthorsRequest$outboundSchema: z.ZodMiniType< memberSinceDate: z.optional(z.string()), lastActiveDate: z.optional(z.string()), contentTypes: z.optional(z.array(z.string())), + projectId: z.optional(z.string()), }); export function listAuthorsRequestToJSON( diff --git a/src/models/operations/list-queue-items.ts b/src/models/operations/list-queue-items.ts index c5fc9a3..d78a142 100644 --- a/src/models/operations/list-queue-items.ts +++ b/src/models/operations/list-queue-items.ts @@ -52,6 +52,10 @@ export type ListQueueItemsRequest = { includeResolved?: boolean | undefined; authorId?: string | undefined; filteredActionIds?: Array | undefined; + /** + * 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. + */ + projectId?: string | undefined; }; export type ListQueueItemsLabel = { @@ -190,6 +194,7 @@ export type ListQueueItemsRequest$Outbound = { includeResolved?: boolean | undefined; authorId?: string | undefined; filteredActionIds?: Array | undefined; + projectId?: string | undefined; }; /** @internal */ @@ -209,6 +214,7 @@ export const ListQueueItemsRequest$outboundSchema: z.ZodMiniType< includeResolved: z.optional(z.boolean()), authorId: z.optional(z.string()), filteredActionIds: z.optional(z.array(z.string())), + projectId: z.optional(z.string()), }); export function listQueueItemsRequestToJSON( diff --git a/src/models/operations/list-webhooks.ts b/src/models/operations/list-webhooks.ts index 88f761d..42d8140 100644 --- a/src/models/operations/list-webhooks.ts +++ b/src/models/operations/list-webhooks.ts @@ -15,6 +15,10 @@ import * as models from "../index.js"; export type ListWebhooksRequest = { page?: number | undefined; pageSize?: number | undefined; + /** + * 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. + */ + projectId?: string | undefined; }; export const ListWebhooksEventType = { @@ -99,6 +103,7 @@ export type ListWebhooksResponse = { export type ListWebhooksRequest$Outbound = { page: number; pageSize: number; + projectId?: string | undefined; }; /** @internal */ @@ -108,6 +113,7 @@ export const ListWebhooksRequest$outboundSchema: z.ZodMiniType< > = z.object({ page: z._default(z.int(), 1), pageSize: z._default(z.int(), 20), + projectId: z.optional(z.string()), }); export function listWebhooksRequestToJSON( diff --git a/src/models/operations/list-wordlists.ts b/src/models/operations/list-wordlists.ts index 7175918..ed620c0 100644 --- a/src/models/operations/list-wordlists.ts +++ b/src/models/operations/list-wordlists.ts @@ -13,6 +13,10 @@ import * as models from "../index.js"; export type ListWordlistsRequest = { page?: number | undefined; pageSize?: number | undefined; + /** + * 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. + */ + projectId?: string | undefined; }; export type ListWordlistsData = { @@ -60,6 +64,7 @@ export type ListWordlistsResponse = { export type ListWordlistsRequest$Outbound = { page: number; pageSize: number; + projectId?: string | undefined; }; /** @internal */ @@ -69,6 +74,7 @@ export const ListWordlistsRequest$outboundSchema: z.ZodMiniType< > = z.object({ page: z._default(z.int(), 1), pageSize: z._default(z.int(), 20), + projectId: z.optional(z.string()), }); export function listWordlistsRequestToJSON( diff --git a/src/models/operations/remove-wordlist-words.ts b/src/models/operations/remove-wordlist-words.ts index 88af3bd..b931f64 100644 --- a/src/models/operations/remove-wordlist-words.ts +++ b/src/models/operations/remove-wordlist-words.ts @@ -17,6 +17,10 @@ export type RemoveWordlistWordsRequest = { * Array of words to remove from the wordlist */ words: Array; + /** + * 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. + */ + projectId?: string | undefined; }; /** @@ -41,6 +45,7 @@ export type RemoveWordlistWordsResponse = { export type RemoveWordlistWordsRequest$Outbound = { id: string; words: Array; + projectId?: string | undefined; }; /** @internal */ @@ -50,6 +55,7 @@ export const RemoveWordlistWordsRequest$outboundSchema: z.ZodMiniType< > = z.object({ id: z.string(), words: z.array(z.string()), + projectId: z.optional(z.string()), }); export function removeWordlistWordsRequestToJSON( diff --git a/src/models/operations/resolve-queue-item.ts b/src/models/operations/resolve-queue-item.ts index 5f7a192..0e35252 100644 --- a/src/models/operations/resolve-queue-item.ts +++ b/src/models/operations/resolve-queue-item.ts @@ -24,6 +24,10 @@ export type ResolveQueueItemRequest = { * The item ID to resolve */ itemId: string; + /** + * 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. + */ + projectId?: string | undefined; body: ResolveQueueItemRequestBody; }; @@ -69,6 +73,7 @@ export function resolveQueueItemRequestBodyToJSON( export type ResolveQueueItemRequest$Outbound = { id: string; itemId: string; + projectId?: string | undefined; body: ResolveQueueItemRequestBody$Outbound; }; @@ -79,6 +84,7 @@ export const ResolveQueueItemRequest$outboundSchema: z.ZodMiniType< > = z.object({ id: z.string(), itemId: z.string(), + projectId: z.optional(z.string()), body: z.lazy(() => ResolveQueueItemRequestBody$outboundSchema), }); diff --git a/src/models/operations/submit-content.ts b/src/models/operations/submit-content.ts index ee879f7..4694232 100644 --- a/src/models/operations/submit-content.ts +++ b/src/models/operations/submit-content.ts @@ -541,7 +541,7 @@ export type PolicyRequest = | URLRisk | Guideline; -export type SubmitContentRequest = { +export type SubmitContentRequestBody = { /** * The content sent for moderation */ @@ -631,6 +631,14 @@ export type SubmitContentRequest = { | undefined; }; +export type SubmitContentRequest = { + /** + * 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. + */ + projectId?: string | undefined; + body: SubmitContentRequestBody; +}; + /** * Audio */ @@ -2486,7 +2494,7 @@ export function policyRequestToJSON(policyRequest: PolicyRequest): string { } /** @internal */ -export type SubmitContentRequest$Outbound = { +export type SubmitContentRequestBody$Outbound = { content: | TextRequest$Outbound | ImageRequest$Outbound @@ -2549,9 +2557,9 @@ export type SubmitContentRequest$Outbound = { }; /** @internal */ -export const SubmitContentRequest$outboundSchema: z.ZodMiniType< - SubmitContentRequest$Outbound, - SubmitContentRequest +export const SubmitContentRequestBody$outboundSchema: z.ZodMiniType< + SubmitContentRequestBody$Outbound, + SubmitContentRequestBody > = z.object({ content: z.union([ z.lazy(() => TextRequest$outboundSchema), @@ -2617,6 +2625,29 @@ export const SubmitContentRequest$outboundSchema: z.ZodMiniType< ), }); +export function submitContentRequestBodyToJSON( + submitContentRequestBody: SubmitContentRequestBody, +): string { + return JSON.stringify( + SubmitContentRequestBody$outboundSchema.parse(submitContentRequestBody), + ); +} + +/** @internal */ +export type SubmitContentRequest$Outbound = { + projectId?: string | undefined; + body: SubmitContentRequestBody$Outbound; +}; + +/** @internal */ +export const SubmitContentRequest$outboundSchema: z.ZodMiniType< + SubmitContentRequest$Outbound, + SubmitContentRequest +> = z.object({ + projectId: z.optional(z.string()), + body: z.lazy(() => SubmitContentRequestBody$outboundSchema), +}); + export function submitContentRequestToJSON( submitContentRequest: SubmitContentRequest, ): string { diff --git a/src/models/operations/unresolve-queue-item.ts b/src/models/operations/unresolve-queue-item.ts index 2292110..0eb0ee8 100644 --- a/src/models/operations/unresolve-queue-item.ts +++ b/src/models/operations/unresolve-queue-item.ts @@ -24,6 +24,10 @@ export type UnresolveQueueItemRequest = { * The item ID to unresolve */ itemId: string; + /** + * 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. + */ + projectId?: string | undefined; body: UnresolveQueueItemRequestBody; }; @@ -69,6 +73,7 @@ export function unresolveQueueItemRequestBodyToJSON( export type UnresolveQueueItemRequest$Outbound = { id: string; itemId: string; + projectId?: string | undefined; body: UnresolveQueueItemRequestBody$Outbound; }; @@ -79,6 +84,7 @@ export const UnresolveQueueItemRequest$outboundSchema: z.ZodMiniType< > = z.object({ id: z.string(), itemId: z.string(), + projectId: z.optional(z.string()), body: z.lazy(() => UnresolveQueueItemRequestBody$outboundSchema), }); diff --git a/src/models/operations/update-action.ts b/src/models/operations/update-action.ts index 4ec7446..549b22f 100644 --- a/src/models/operations/update-action.ts +++ b/src/models/operations/update-action.ts @@ -115,6 +115,10 @@ export type UpdateActionRequest = { * The ID of the action to update. */ id: string; + /** + * 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. + */ + projectId?: string | undefined; body: UpdateActionRequestBody; }; @@ -319,6 +323,7 @@ export function updateActionRequestBodyToJSON( /** @internal */ export type UpdateActionRequest$Outbound = { id: string; + projectId?: string | undefined; body: UpdateActionRequestBody$Outbound; }; @@ -328,6 +333,7 @@ export const UpdateActionRequest$outboundSchema: z.ZodMiniType< UpdateActionRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), body: z.lazy(() => UpdateActionRequestBody$outboundSchema), }); diff --git a/src/models/operations/update-author.ts b/src/models/operations/update-author.ts index 74ffba6..6dbe928 100644 --- a/src/models/operations/update-author.ts +++ b/src/models/operations/update-author.ts @@ -69,6 +69,10 @@ export type UpdateAuthorRequest = { * Either external ID or the ID assigned by moderation API. */ id: string; + /** + * 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. + */ + projectId?: string | undefined; body: UpdateAuthorRequestBody; }; @@ -166,6 +170,7 @@ export function updateAuthorRequestBodyToJSON( /** @internal */ export type UpdateAuthorRequest$Outbound = { id: string; + projectId?: string | undefined; body: UpdateAuthorRequestBody$Outbound; }; @@ -175,6 +180,7 @@ export const UpdateAuthorRequest$outboundSchema: z.ZodMiniType< UpdateAuthorRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), body: z.lazy(() => UpdateAuthorRequestBody$outboundSchema), }); diff --git a/src/models/operations/update-webhook.ts b/src/models/operations/update-webhook.ts index 401b6cc..7284b52 100644 --- a/src/models/operations/update-webhook.ts +++ b/src/models/operations/update-webhook.ts @@ -51,6 +51,10 @@ export type UpdateWebhookRequest = { * The ID of the webhook to update. */ id: string; + /** + * 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. + */ + projectId?: string | undefined; body: UpdateWebhookRequestBody; }; @@ -154,6 +158,7 @@ export function updateWebhookRequestBodyToJSON( /** @internal */ export type UpdateWebhookRequest$Outbound = { id: string; + projectId?: string | undefined; body: UpdateWebhookRequestBody$Outbound; }; @@ -163,6 +168,7 @@ export const UpdateWebhookRequest$outboundSchema: z.ZodMiniType< UpdateWebhookRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), body: z.lazy(() => UpdateWebhookRequestBody$outboundSchema), }); diff --git a/src/models/operations/update-wordlist.ts b/src/models/operations/update-wordlist.ts index 366d3f3..3833c3d 100644 --- a/src/models/operations/update-wordlist.ts +++ b/src/models/operations/update-wordlist.ts @@ -36,6 +36,10 @@ export type UpdateWordlistRequest = { * ID of the wordlist to update */ id: string; + /** + * 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. + */ + projectId?: string | undefined; body: UpdateWordlistRequestBody; }; @@ -99,6 +103,7 @@ export function updateWordlistRequestBodyToJSON( /** @internal */ export type UpdateWordlistRequest$Outbound = { id: string; + projectId?: string | undefined; body: UpdateWordlistRequestBody$Outbound; }; @@ -108,6 +113,7 @@ export const UpdateWordlistRequest$outboundSchema: z.ZodMiniType< UpdateWordlistRequest > = z.object({ id: z.string(), + projectId: z.optional(z.string()), body: z.lazy(() => UpdateWordlistRequestBody$outboundSchema), }); diff --git a/src/models/permission-denied-error.ts b/src/models/permission-denied-error.ts index 01d9104..f582208 100644 --- a/src/models/permission-denied-error.ts +++ b/src/models/permission-denied-error.ts @@ -16,7 +16,6 @@ import { OpenEnum } from "../types/enums.js"; * - `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. @@ -27,7 +26,6 @@ export const PermissionDeniedErrorCode = { 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", @@ -42,7 +40,6 @@ export const PermissionDeniedErrorCode = { * - `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/sdk/account.ts b/src/sdk/account.ts index b0e4ed4..9015a22 100644 --- a/src/sdk/account.ts +++ b/src/sdk/account.ts @@ -15,10 +15,12 @@ export class Account extends ClientSDK { * Get account details */ async retrieve( + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(accountRetrieve( this, + projectId, options, )); } diff --git a/src/sdk/actions.ts b/src/sdk/actions.ts index 5a346e6..613bffc 100644 --- a/src/sdk/actions.ts +++ b/src/sdk/actions.ts @@ -24,6 +24,7 @@ export class Actions extends ClientSDK { queueId?: string | undefined, page?: number | undefined, pageSize?: number | undefined, + projectId?: string | undefined, options?: RequestOptions, ): Promise> { return unwrapResultIterator(actionsList( @@ -31,6 +32,7 @@ export class Actions extends ClientSDK { queueId, page, pageSize, + projectId, options, )); } @@ -42,12 +44,14 @@ export class Actions extends ClientSDK { * Create an action. */ async create( - request: operations.CreateActionRequest, + body: operations.CreateActionRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(actionsCreate( this, - request, + body, + projectId, options, )); } @@ -60,11 +64,13 @@ export class Actions extends ClientSDK { */ async retrieve( id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(actionsRetrieve( this, id, + projectId, options, )); } @@ -78,12 +84,14 @@ export class Actions extends ClientSDK { async update( id: string, body: operations.UpdateActionRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(actionsUpdate( this, id, body, + projectId, options, )); } @@ -96,11 +104,13 @@ export class Actions extends ClientSDK { */ async delete( id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(actionsDelete( this, id, + projectId, options, )); } @@ -112,12 +122,14 @@ export class Actions extends ClientSDK { * Execute a moderation action on one or more content items. */ async execute( - request: operations.ExecuteActionRequest, + body: operations.ExecuteActionRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(actionsExecute( this, - request, + body, + projectId, options, )); } diff --git a/src/sdk/authors.ts b/src/sdk/authors.ts index 5aae247..1c0f207 100644 --- a/src/sdk/authors.ts +++ b/src/sdk/authors.ts @@ -38,12 +38,14 @@ export class Authors extends ClientSDK { * Create a new author. Typically not needed as authors are created automatically when content is moderated. */ async create( - request: operations.CreateAuthorRequest, + body: operations.CreateAuthorRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(authorsCreate( this, - request, + body, + projectId, options, )); } @@ -56,11 +58,13 @@ export class Authors extends ClientSDK { */ async retrieve( id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(authorsRetrieve( this, id, + projectId, options, )); } @@ -74,12 +78,14 @@ export class Authors extends ClientSDK { async update( id: string, body: operations.UpdateAuthorRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(authorsUpdate( this, id, body, + projectId, options, )); } @@ -92,11 +98,13 @@ export class Authors extends ClientSDK { */ async delete( id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(authorsDelete( this, id, + projectId, options, )); } diff --git a/src/sdk/content.ts b/src/sdk/content.ts index 2539558..6bfb9f2 100644 --- a/src/sdk/content.ts +++ b/src/sdk/content.ts @@ -8,13 +8,18 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Content extends ClientSDK { + /** + * Submit content + */ async submit( - request: operations.SubmitContentRequest, + body: operations.SubmitContentRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(contentSubmit( this, - request, + body, + projectId, options, )); } diff --git a/src/sdk/items.ts b/src/sdk/items.ts index 7542b65..971a625 100644 --- a/src/sdk/items.ts +++ b/src/sdk/items.ts @@ -40,6 +40,7 @@ export class Items extends ClientSDK { id: string, itemId: string, body: operations.ResolveQueueItemRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(queueItemsResolve( @@ -47,6 +48,7 @@ export class Items extends ClientSDK { id, itemId, body, + projectId, options, )); } @@ -61,6 +63,7 @@ export class Items extends ClientSDK { id: string, itemId: string, body: operations.UnresolveQueueItemRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(queueItemsUnresolve( @@ -68,6 +71,7 @@ export class Items extends ClientSDK { id, itemId, body, + projectId, options, )); } diff --git a/src/sdk/queue.ts b/src/sdk/queue.ts index 699f089..0cfb114 100644 --- a/src/sdk/queue.ts +++ b/src/sdk/queue.ts @@ -23,11 +23,13 @@ export class Queue extends ClientSDK { */ async retrieve( id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(queueRetrieve( this, id, + projectId, options, )); } @@ -41,12 +43,14 @@ export class Queue extends ClientSDK { async getStats( id: string, withinDays?: number | undefined, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(queueGetStats( this, id, withinDays, + projectId, options, )); } diff --git a/src/sdk/webhook-secret.ts b/src/sdk/webhook-secret.ts index 3b07ebd..ca0aadf 100644 --- a/src/sdk/webhook-secret.ts +++ b/src/sdk/webhook-secret.ts @@ -15,10 +15,12 @@ export class WebhookSecret extends ClientSDK { * 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. */ async retrieve( + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(webhookSecretRetrieve( this, + projectId, options, )); } diff --git a/src/sdk/webhooks.ts b/src/sdk/webhooks.ts index 6216140..8474a25 100644 --- a/src/sdk/webhooks.ts +++ b/src/sdk/webhooks.ts @@ -22,12 +22,14 @@ export class Webhooks extends ClientSDK { async list( page?: number | undefined, pageSize?: number | undefined, + projectId?: string | undefined, options?: RequestOptions, ): Promise> { return unwrapResultIterator(webhooksList( this, page, pageSize, + projectId, options, )); } @@ -39,12 +41,14 @@ export class Webhooks extends ClientSDK { * 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). */ async create( - request: operations.CreateWebhookRequest, + body: operations.CreateWebhookRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(webhooksCreate( this, - request, + body, + projectId, options, )); } @@ -57,11 +61,13 @@ export class Webhooks extends ClientSDK { */ async retrieve( id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(webhooksRetrieve( this, id, + projectId, options, )); } @@ -75,12 +81,14 @@ export class Webhooks extends ClientSDK { async update( id: string, body: operations.UpdateWebhookRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(webhooksUpdate( this, id, body, + projectId, options, )); } @@ -93,11 +101,13 @@ export class Webhooks extends ClientSDK { */ async delete( id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(webhooksDelete( this, id, + projectId, options, )); } diff --git a/src/sdk/wordlist.ts b/src/sdk/wordlist.ts index 19f01fd..8933a04 100644 --- a/src/sdk/wordlist.ts +++ b/src/sdk/wordlist.ts @@ -27,12 +27,14 @@ export class Wordlist extends ClientSDK { async list( page?: number | undefined, pageSize?: number | undefined, + projectId?: string | undefined, options?: RequestOptions, ): Promise> { return unwrapResultIterator(wordlistList( this, page, pageSize, + projectId, options, )); } @@ -45,11 +47,13 @@ export class Wordlist extends ClientSDK { */ async retrieve( id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(wordlistRetrieve( this, id, + projectId, options, )); } @@ -63,12 +67,14 @@ export class Wordlist extends ClientSDK { async update( id: string, body: operations.UpdateWordlistRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(wordlistUpdate( this, id, body, + projectId, options, )); } @@ -81,11 +87,13 @@ export class Wordlist extends ClientSDK { */ async getEmbeddingStatus( id: string, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(wordlistGetEmbeddingStatus( this, id, + projectId, options, )); } diff --git a/src/sdk/words.ts b/src/sdk/words.ts index 5f26cf5..de12dea 100644 --- a/src/sdk/words.ts +++ b/src/sdk/words.ts @@ -18,12 +18,14 @@ export class Words extends ClientSDK { async add( id: string, body: operations.AddWordlistWordsRequestBody, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(wordlistWordsAdd( this, id, body, + projectId, options, )); } @@ -37,12 +39,14 @@ export class Words extends ClientSDK { async remove( id: string, words: Array, + projectId?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(wordlistWordsRemove( this, id, words, + projectId, options, )); }