From fa1544e11cbea6715804eda96ca0cf47e8400028 Mon Sep 17 00:00:00 2001 From: chrisdengso <8185683+chrisdengso@users.noreply.github.com> Date: Thu, 22 Oct 2026 12:48:20 +0000 Subject: [PATCH] feat: v3.1.0, API changes --- .github/workflows/publish-gem.yml | 13 +- .speakeasy/gen.lock | 282 +- .speakeasy/gen.yaml | 2 +- .speakeasy/openapi.json | 14224 ++++++++++++++++ CHANGELOG.md | 41 + Gemfile.lock | 2 +- README.md | 28 +- USAGE.md | 26 +- docs/models/components/badrequesterrorcode.md | 10 +- .../components/permissiondeniederrorcode.md | 2 - docs/models/errors/badrequesterror.md | 18 +- docs/models/errors/permissiondeniederror.md | 18 +- .../operations/addwordlistwordsrequest.md | 9 +- docs/models/operations/createactionrequest.md | 17 +- .../operations/createactionrequestbody.md | 18 + docs/models/operations/createauthorrequest.md | 16 +- .../operations/createauthorrequestbody.md | 17 + .../models/operations/createwebhookrequest.md | 10 +- .../operations/createwebhookrequestbody.md | 11 + docs/models/operations/deleteactionrequest.md | 7 +- docs/models/operations/deleteauthorrequest.md | 7 +- .../models/operations/deletewebhookrequest.md | 7 +- .../models/operations/executeactionrequest.md | 14 +- .../operations/executeactionrequestbody.md | 15 + docs/models/operations/getaccountrequest.md | 8 + docs/models/operations/getactionrequest.md | 7 +- docs/models/operations/getauthorrequest.md | 7 +- docs/models/operations/getqueuerequest.md | 7 +- .../models/operations/getqueuestatsrequest.md | 9 +- docs/models/operations/getwebhookrequest.md | 7 +- .../operations/getwebhooksecretrequest.md | 8 + .../getwordlistembeddingstatusrequest.md | 7 +- docs/models/operations/getwordlistrequest.md | 7 +- docs/models/operations/listactionsrequest.md | 11 +- docs/models/operations/listauthorsrequest.md | 19 +- .../operations/listqueueitemsrequest.md | 29 +- docs/models/operations/listwebhooksrequest.md | 9 +- .../models/operations/listwordlistsrequest.md | 9 +- .../operations/removewordlistwordsrequest.md | 9 +- .../operations/resolvequeueitemrequest.md | 11 +- .../models/operations/submitcontentrequest.md | 17 +- .../operations/submitcontentrequestbody.md | 18 + .../operations/unresolvequeueitemrequest.md | 11 +- docs/models/operations/updateactionrequest.md | 9 +- docs/models/operations/updateauthorrequest.md | 9 +- .../models/operations/updatewebhookrequest.md | 9 +- .../operations/updatewordlistrequest.md | 9 +- docs/sdks/account/README.md | 6 + docs/sdks/actions/README.md | 60 +- docs/sdks/authors/README.md | 36 +- docs/sdks/content/README.md | 17 +- docs/sdks/items/README.md | 22 +- docs/sdks/queue/README.md | 16 +- docs/sdks/webhooks/README.md | 45 +- docs/sdks/webhooksecret/README.md | 6 + docs/sdks/wordlist/README.md | 32 +- docs/sdks/words/README.md | 18 +- lib/moderation_api/account.rb | 14 +- lib/moderation_api/actions.rb | 59 +- lib/moderation_api/authors.rb | 42 +- lib/moderation_api/content.rb | 15 +- lib/moderation_api/items.rb | 21 +- .../models/components/badrequesterror_code.rb | 2 + .../components/permissiondeniederror_code.rb | 2 - .../models/errors/badrequesterror.rb | 1 + .../models/errors/permissiondeniederror.rb | 1 - lib/moderation_api/models/operations.rb | 7 + .../operations/addwordlistwords_request.rb | 15 +- .../operations/addwordlistwords_request.rbi | 6 + .../models/operations/createaction_request.rb | 142 +- .../operations/createaction_request.rbi | 62 +- .../operations/createaction_requestbody.rb | 160 + .../operations/createaction_requestbody.rbi | 74 + .../models/operations/createauthor_request.rb | 114 +- .../operations/createauthor_request.rbi | 56 +- .../operations/createauthor_requestbody.rb | 132 + .../operations/createauthor_requestbody.rbi | 68 + .../operations/createwebhook_request.rb | 45 +- .../operations/createwebhook_request.rbi | 20 +- .../operations/createwebhook_requestbody.rb | 63 + .../operations/createwebhook_requestbody.rbi | 32 + .../models/operations/deleteaction_request.rb | 12 +- .../operations/deleteaction_request.rbi | 6 + .../models/operations/deleteauthor_request.rb | 12 +- .../operations/deleteauthor_request.rbi | 6 + .../operations/deletewebhook_request.rb | 12 +- .../operations/deletewebhook_request.rbi | 6 + .../operations/executeaction_request.rb | 69 +- .../operations/executeaction_request.rbi | 32 +- .../operations/executeaction_requestbody.rb | 85 + .../operations/executeaction_requestbody.rbi | 44 + .../models/operations/getaccount_request.rb | 35 + .../models/operations/getaccount_request.rbi | 14 + .../models/operations/getaction_request.rb | 12 +- .../models/operations/getaction_request.rbi | 6 + .../models/operations/getauthor_request.rb | 12 +- .../models/operations/getauthor_request.rbi | 6 + .../models/operations/getqueue_request.rb | 12 +- .../models/operations/getqueue_request.rbi | 6 + .../operations/getqueuestats_request.rb | 12 +- .../operations/getqueuestats_request.rbi | 6 + .../models/operations/getwebhook_request.rb | 12 +- .../models/operations/getwebhook_request.rbi | 6 + .../operations/getwebhooksecret_request.rb | 35 + .../operations/getwebhooksecret_request.rbi | 14 + .../models/operations/getwordlist_request.rb | 12 +- .../models/operations/getwordlist_request.rbi | 6 + .../getwordlistembeddingstatus_request.rb | 12 +- .../getwordlistembeddingstatus_request.rbi | 6 + .../models/operations/listactions_request.rb | 20 +- .../models/operations/listactions_request.rbi | 6 + .../models/operations/listauthors_request.rb | 10 + .../models/operations/listauthors_request.rbi | 6 + .../operations/listqueueitems_request.rb | 10 + .../operations/listqueueitems_request.rbi | 6 + .../models/operations/listwebhooks_request.rb | 15 +- .../operations/listwebhooks_request.rbi | 6 + .../operations/listwordlists_request.rb | 15 +- .../operations/listwordlists_request.rbi | 6 + .../operations/removewordlistwords_request.rb | 12 +- .../removewordlistwords_request.rbi | 6 + .../operations/resolvequeueitem_request.rb | 20 +- .../operations/resolvequeueitem_request.rbi | 6 + .../operations/submitcontent_request.rb | 241 +- .../operations/submitcontent_request.rbi | 62 +- .../operations/submitcontent_requestbody.rb | 259 + .../operations/submitcontent_requestbody.rbi | 74 + .../operations/unresolvequeueitem_request.rb | 20 +- .../operations/unresolvequeueitem_request.rbi | 6 + .../models/operations/updateaction_request.rb | 14 +- .../operations/updateaction_request.rbi | 6 + .../models/operations/updateauthor_request.rb | 14 +- .../operations/updateauthor_request.rbi | 6 + .../operations/updatewebhook_request.rb | 14 +- .../operations/updatewebhook_request.rbi | 6 + .../operations/updatewordlist_request.rb | 15 +- .../operations/updatewordlist_request.rbi | 6 + lib/moderation_api/queue.rb | 16 +- lib/moderation_api/sdkconfiguration.rb | 4 +- lib/moderation_api/webhooks.rb | 46 +- lib/moderation_api/webhooksecret.rb | 14 +- lib/moderation_api/wordlist.rb | 33 +- lib/moderation_api/words.rb | 16 +- moderation_api.gemspec | 2 +- 144 files changed, 16635 insertions(+), 1362 deletions(-) create mode 100644 .speakeasy/openapi.json create mode 100644 docs/models/operations/createactionrequestbody.md create mode 100644 docs/models/operations/createauthorrequestbody.md create mode 100644 docs/models/operations/createwebhookrequestbody.md create mode 100644 docs/models/operations/executeactionrequestbody.md create mode 100644 docs/models/operations/getaccountrequest.md create mode 100644 docs/models/operations/getwebhooksecretrequest.md create mode 100644 docs/models/operations/submitcontentrequestbody.md create mode 100644 lib/moderation_api/models/operations/createaction_requestbody.rb create mode 100644 lib/moderation_api/models/operations/createaction_requestbody.rbi create mode 100644 lib/moderation_api/models/operations/createauthor_requestbody.rb create mode 100644 lib/moderation_api/models/operations/createauthor_requestbody.rbi create mode 100644 lib/moderation_api/models/operations/createwebhook_requestbody.rb create mode 100644 lib/moderation_api/models/operations/createwebhook_requestbody.rbi create mode 100644 lib/moderation_api/models/operations/executeaction_requestbody.rb create mode 100644 lib/moderation_api/models/operations/executeaction_requestbody.rbi create mode 100644 lib/moderation_api/models/operations/getaccount_request.rb create mode 100644 lib/moderation_api/models/operations/getaccount_request.rbi create mode 100644 lib/moderation_api/models/operations/getwebhooksecret_request.rb create mode 100644 lib/moderation_api/models/operations/getwebhooksecret_request.rbi create mode 100644 lib/moderation_api/models/operations/submitcontent_requestbody.rb create mode 100644 lib/moderation_api/models/operations/submitcontent_requestbody.rbi diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml index 820455f7..f197d813 100644 --- a/.github/workflows/publish-gem.yml +++ b/.github/workflows/publish-gem.yml @@ -1,7 +1,6 @@ # Maintained in moderation-api/sdk-generator (custom/ruby). 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). name: Publish Gem on: push: @@ -44,8 +43,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 54564933..7d092e52 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: a78f35a2-6d8d-4b9f-8962-89b8103f2924 management: - docChecksum: 9e61a5512adcd4b1e0a74112ed775731 + docChecksum: c27787b45fc5b72aafff31ba945a9e61 docVersion: 1.1.0 speakeasyVersion: internal generationVersion: internal - releaseVersion: 3.0.0 - configChecksum: 96571fc789a5241bf43ea33d2ada495f + releaseVersion: 3.1.0 + configChecksum: d394a681c78d7e75a42f9911e6bba463 repoURL: https://github.com/moderation-api/sdk-ruby installationURL: https://github.com/moderation-api/sdk-ruby published: true @@ -38,15 +38,15 @@ trackedFiles: Gemfile: last_write_checksum: sha1:8c1b6fa9505f61abd0fb6741f8094e9655a55495 Gemfile.lock: - last_write_checksum: sha1:7988b48d711b2c19be1de58fdfc4af54b624b52b + last_write_checksum: sha1:845cf20712b81ec8ccacfdb698fa691e7f776ff5 Rakefile: last_write_checksum: sha1:c572639efdae8c7b24141ee5c02d8f009e101ed8 USAGE.md: - last_write_checksum: sha1:9ab3fdf1f1d6c8130977eb9e812b0587313a905f + last_write_checksum: sha1:9373aa620e1d460c34506c8d5356796ed699bdff docs/models/components/authenticationerrorcode.md: last_write_checksum: sha1:ab6bc60a32b0b9ee2508c85248f5fe17162e2fc2 docs/models/components/badrequesterrorcode.md: - last_write_checksum: sha1:b2a989dadc2b47532e51c236ede1e7e18b6e6c31 + last_write_checksum: sha1:f0eb9e75043798b942f88622ede2a0b09f12727d docs/models/components/block.md: last_write_checksum: sha1:85e7f9959076166397c429e3ad1b86f11e5f84e0 docs/models/components/channel.md: @@ -72,7 +72,7 @@ trackedFiles: docs/models/components/path.md: last_write_checksum: sha1:cc4aff32a3ad21813b6b79bea1030b11d8d1c2fa docs/models/components/permissiondeniederrorcode.md: - last_write_checksum: sha1:90a4acfe5145a829a9e43292e10b2fa2386a25ac + last_write_checksum: sha1:c55f494d299483ea9dce99df0eddff34152d61a4 docs/models/components/project.md: last_write_checksum: sha1:546b2ac41dbbaa231c9425edfd4ab5d1b7ae422b docs/models/components/projectglobalflaggingmode.md: @@ -98,7 +98,7 @@ trackedFiles: docs/models/errors/authenticationerror.md: last_write_checksum: sha1:e665b3ccf19b24995501bef53595800c18b0be1b docs/models/errors/badrequesterror.md: - last_write_checksum: sha1:4843e4488abf939ad7fd37ecb15eefe8a05f9df0 + last_write_checksum: sha1:2c07c6230e69b001c23eb6cc3287811c3aac31c9 docs/models/errors/conflicterror.md: last_write_checksum: sha1:21019744a14180a109cbd78fb4e3089bcca9c79c docs/models/errors/internalservererror.md: @@ -106,7 +106,7 @@ trackedFiles: docs/models/errors/notfounderror.md: last_write_checksum: sha1:a3bccac304cb8f1441443df778cf3ed9d8fa72ce docs/models/errors/permissiondeniederror.md: - last_write_checksum: sha1:90d71a4dfa5b10c7ec75509d3cd286c27d061eec + last_write_checksum: sha1:1c9f0f5443b8faeed3b6501b8e1eab335fe0514d docs/models/errors/ratelimiterror.md: last_write_checksum: sha1:1d8b6a1512a9df27fe36a1b613b459d65c4ff1cb docs/models/operations/actionrequest.md: @@ -114,7 +114,7 @@ trackedFiles: docs/models/operations/actionstat.md: last_write_checksum: sha1:f188e87a8fa8cae052d60d784c316942c7fdb75b docs/models/operations/addwordlistwordsrequest.md: - last_write_checksum: sha1:b8a055113ac0f8072836cb469e85359da64af118 + last_write_checksum: sha1:f6f1d0181d8009571df899966c9b93a9d16ac1ac docs/models/operations/addwordlistwordsrequestbody.md: last_write_checksum: sha1:ba31b2426a81f08bb6484ef0cacb405e62dccfd1 docs/models/operations/addwordlistwordsresponse.md: @@ -182,7 +182,9 @@ trackedFiles: docs/models/operations/createactionqueuebehaviourresponse.md: last_write_checksum: sha1:a4655369b37d81aa27fa502f46bda8100fddf3f6 docs/models/operations/createactionrequest.md: - last_write_checksum: sha1:f1053469a8756f45923044d1e053ad9bfbc4ca7a + last_write_checksum: sha1:7743448a5916c85b0d789929df7d271b275ab6c7 + docs/models/operations/createactionrequestbody.md: + last_write_checksum: sha1:1516597659e6b1e55b319adc80b42c4cc0f7872c docs/models/operations/createactionresponse.md: last_write_checksum: sha1:513ccdfb7ccfb7b99470787bd487fc054ae53a67 docs/models/operations/createactionresponsebody.md: @@ -194,7 +196,9 @@ trackedFiles: docs/models/operations/createauthormetadata.md: last_write_checksum: sha1:cd50f9487a224d86aa8236fc9bf2bbe64b5dc3eb docs/models/operations/createauthorrequest.md: - last_write_checksum: sha1:892a605d521468bfd4edbfdb3871a643096fdeea + last_write_checksum: sha1:9fb933fefebfb642140a3ceadaaf0623b56d4195 + docs/models/operations/createauthorrequestbody.md: + last_write_checksum: sha1:4b73a4bda1a3cb251241c794f37657100bbacd26 docs/models/operations/createauthorresponse.md: last_write_checksum: sha1:a0be0d1ee50fe47d5b58b6c0627d58b7324a8adc docs/models/operations/createchannelcontenttype.md: @@ -216,7 +220,9 @@ trackedFiles: docs/models/operations/createwebhookpayloadversion.md: last_write_checksum: sha1:aae6bb9390f85bbafb6196605c4cf558923a59ac docs/models/operations/createwebhookrequest.md: - last_write_checksum: sha1:19676f87b6ec4f6cb004b697d2112a541e5fa472 + last_write_checksum: sha1:5dac547f31659bc1973b60b327558f101dd3d55f + docs/models/operations/createwebhookrequestbody.md: + last_write_checksum: sha1:9ae7470fcb6826673d743cab2f1bad6270c84f82 docs/models/operations/createwebhookresponse.md: last_write_checksum: sha1:a5b8d09529cf528175f605fe5040193a348db0ee docs/models/operations/createwebhookresponsebody.md: @@ -238,13 +244,13 @@ trackedFiles: docs/models/operations/datavideo.md: last_write_checksum: sha1:8ca3c16b6d36c67adda213bfe9fa68a0c05b027a docs/models/operations/deleteactionrequest.md: - last_write_checksum: sha1:d07732b4a90377ccd7e25b2a1b4bc992b55f4cdc + last_write_checksum: sha1:09aed25fa0803ccd1a2200781f411ff3b60fd300 docs/models/operations/deleteactionresponse.md: last_write_checksum: sha1:c6e16fae8cc555eae48242534b93b7350c10c93e docs/models/operations/deleteactionresponsebody.md: last_write_checksum: sha1:51b002f6e472af8731cd199c5c8970625b3ba21c docs/models/operations/deleteauthorrequest.md: - last_write_checksum: sha1:d2c270f0efbf5a484779268c34d4fd0919aee1e8 + last_write_checksum: sha1:2f64761a88283063e8ab342e70c031fbb143625f docs/models/operations/deleteauthorresponse.md: last_write_checksum: sha1:5d3c8e9f23ed73b9ee1ce64eaebca94bd9e8ef5e docs/models/operations/deleteauthorresponsebody.md: @@ -262,7 +268,7 @@ trackedFiles: docs/models/operations/deleteprojectresponsebody.md: last_write_checksum: sha1:277d4123ad842747896f48dbbc0dddad1faa5873 docs/models/operations/deletewebhookrequest.md: - last_write_checksum: sha1:00afa991c420075e48600280257a7659e18b91b1 + last_write_checksum: sha1:baf3ccb3b469723f9dae5c8d22164643a61b3735 docs/models/operations/deletewebhookresponse.md: last_write_checksum: sha1:710b4cf0e9c349d8477ddc7e2e9816104dd8dccf docs/models/operations/deletewebhookresponsebody.md: @@ -292,7 +298,9 @@ trackedFiles: docs/models/operations/evaluation.md: last_write_checksum: sha1:eb47f434922dfc46bb6e4fb408e67b2fb7a99ab2 docs/models/operations/executeactionrequest.md: - last_write_checksum: sha1:c4b7db9057e0e0fef3dba99851b8ee37464b4b97 + last_write_checksum: sha1:d61b0cb8cb5a072145631bcdc669928079486cb7 + docs/models/operations/executeactionrequestbody.md: + last_write_checksum: sha1:f5f76dfd308978b06c0afbaa7fcc71ab9f6b98cc docs/models/operations/executeactionresponse.md: last_write_checksum: sha1:7f09f76bb4556f2710c60479a59f18b24c0c3671 docs/models/operations/executeactionresponsebody.md: @@ -311,6 +319,8 @@ trackedFiles: last_write_checksum: sha1:3733a02c68813acfa9c645a3675867473b079129 docs/models/operations/gambling.md: last_write_checksum: sha1:ebc6c39238132eae65e501f2cb48aa64c3e4c7b8 + docs/models/operations/getaccountrequest.md: + last_write_checksum: sha1:f5f2db556a4e58b12d986abfa4af8ae0a0cb1d6d docs/models/operations/getaccountresponse.md: last_write_checksum: sha1:fd3ffbb9ee36b3dd4d0019db44b9eb9fc0c5cda0 docs/models/operations/getaccountresponsebody.md: @@ -322,7 +332,7 @@ trackedFiles: docs/models/operations/getactionqueuebehaviour.md: last_write_checksum: sha1:932ba354f0755a846d65e07e92974bf2e9e2d81d docs/models/operations/getactionrequest.md: - last_write_checksum: sha1:2fc0d4c8fc44b362e4622cf6fa9119b8bf280607 + last_write_checksum: sha1:f8c17199401ab9cd4dbfa9f930c9d6179870343d docs/models/operations/getactionresponse.md: last_write_checksum: sha1:42381e7a7d68b3ef8bdf0bb56f1d6a7e53664813 docs/models/operations/getactionresponsebody.md: @@ -330,7 +340,7 @@ trackedFiles: docs/models/operations/getactiontype.md: last_write_checksum: sha1:454036f9132b409bc60bba6041b195bbc36551ca docs/models/operations/getauthorrequest.md: - last_write_checksum: sha1:6a3a7865aa8e06869264279d44cf966ed93ca764 + last_write_checksum: sha1:5899cc7b22eb87c11981f72a5c670b0b3253ff2d docs/models/operations/getauthorresponse.md: last_write_checksum: sha1:15e8a7b14a3e9964cc48fd4a42982fef8d3dd4ec docs/models/operations/getchannelrequest.md: @@ -346,13 +356,13 @@ trackedFiles: docs/models/operations/getqueuerecommendationaction.md: last_write_checksum: sha1:c548382ffde40a84cd230bfee0bedf80e04f9ab9 docs/models/operations/getqueuerequest.md: - last_write_checksum: sha1:5515a9fc16f636d20448b1b1e88976b232c8b533 + last_write_checksum: sha1:5a1db94bbd3a08a7fe62bfacb1c5149c2c6915db docs/models/operations/getqueueresponse.md: last_write_checksum: sha1:bc2deff964aaef49da56b6389b8e67b948381dd5 docs/models/operations/getqueueresponsebody.md: last_write_checksum: sha1:5e28b0f7a8b49b753ceca4b190c96e48aeecc619 docs/models/operations/getqueuestatsrequest.md: - last_write_checksum: sha1:4ac2a6aedf4db492d97cfb606ba2ce236f9bab56 + last_write_checksum: sha1:896e9a9f220b0691c573dbaacba15c938f242f9a docs/models/operations/getqueuestatsresponse.md: last_write_checksum: sha1:8fe3a6b0cdfa15f8231d6c46adeac5a441648556 docs/models/operations/getqueuestatsresponsebody.md: @@ -364,23 +374,25 @@ trackedFiles: docs/models/operations/getwebhookpayloadversion.md: last_write_checksum: sha1:6c6876d8f42cc44b92f79164bbbcbbd26121669a docs/models/operations/getwebhookrequest.md: - last_write_checksum: sha1:2eeaa09c66e9a20c0513f144fa19591ab41857fd + last_write_checksum: sha1:021a1529d2d5d6658370db87238bbfff2c9533c8 docs/models/operations/getwebhookresponse.md: last_write_checksum: sha1:d88448911d8fe6345249520cc7dc0a719ff6ab1f docs/models/operations/getwebhookresponsebody.md: last_write_checksum: sha1:f36ce817e93a60189f120dd6f9e5b53ea075804c + docs/models/operations/getwebhooksecretrequest.md: + last_write_checksum: sha1:89959e08d613773890548277e568faf2ce12dace docs/models/operations/getwebhooksecretresponse.md: last_write_checksum: sha1:c05845a3d22d532a4caac45edd3a7eaa59218a78 docs/models/operations/getwebhooksecretresponsebody.md: last_write_checksum: sha1:df2febc57a34365bff65d3c9218d60957c95a0f9 docs/models/operations/getwordlistembeddingstatusrequest.md: - last_write_checksum: sha1:8661ff0fe5c4270aff68a0912291a522c1b70611 + last_write_checksum: sha1:31ce26a1833681875e9d28b74604451e3b48a4ce docs/models/operations/getwordlistembeddingstatusresponse.md: last_write_checksum: sha1:76b4490efc7cc5afa40133555662ba674ebd854d docs/models/operations/getwordlistembeddingstatusresponsebody.md: last_write_checksum: sha1:a7e9788805217893b58f157d805c9218ff75d1c7 docs/models/operations/getwordlistrequest.md: - last_write_checksum: sha1:16440859d5b3bb2c6dad23b75c6e16b16b3ad579 + last_write_checksum: sha1:c19458eb164fc604bab836512cbb76360ed79c14 docs/models/operations/getwordlistresponse.md: last_write_checksum: sha1:340168e7438d7ba4b138ede2dcfda48c43af2875 docs/models/operations/getwordlistresponsebody.md: @@ -424,7 +436,7 @@ trackedFiles: docs/models/operations/listactionsqueuebehaviour.md: last_write_checksum: sha1:c45c55b748d0a1f643527f4d2212398024e84841 docs/models/operations/listactionsrequest.md: - last_write_checksum: sha1:dc9df6a7cf5b7231794c2bdc4b48906d822979f1 + last_write_checksum: sha1:ef66a392e5055de3a14dee220d31dc6709d1d096 docs/models/operations/listactionsresponse.md: last_write_checksum: sha1:f226965d72e0a1ccb696dc3299b28301a9744d85 docs/models/operations/listactionsresponsebody.md: @@ -432,7 +444,7 @@ trackedFiles: docs/models/operations/listactionstype.md: last_write_checksum: sha1:b0124bdff2185a8b2b098222116b506ebd6bbc5b docs/models/operations/listauthorsrequest.md: - last_write_checksum: sha1:e5b67cf41d02ab25e4da777f08b56c4450199007 + last_write_checksum: sha1:28cf4664e566213db4b7799faf7639d00f348df4 docs/models/operations/listauthorsresponse.md: last_write_checksum: sha1:f3fc55319ff6a6dfb11dd98b724aafbed49fed31 docs/models/operations/listauthorsresponsebody.md: @@ -458,7 +470,7 @@ trackedFiles: docs/models/operations/listqueueitemslabel.md: last_write_checksum: sha1:a003f86f14293731007260266918c992dc011fee docs/models/operations/listqueueitemsrequest.md: - last_write_checksum: sha1:7cc1d957607de87b9b17ddf8eee73efc202c8486 + last_write_checksum: sha1:fb25737d0de2c007a91e7e5e31724f3d3f915a73 docs/models/operations/listqueueitemsresponse.md: last_write_checksum: sha1:742d2e294f44d0f537cf4eaa8dc1b2252b5363f4 docs/models/operations/listqueueitemsresponsebody.md: @@ -474,7 +486,7 @@ trackedFiles: docs/models/operations/listwebhookspayloadversion.md: last_write_checksum: sha1:7a0d6ff7cf56f1bffaf77661e74b5b7faa96773c docs/models/operations/listwebhooksrequest.md: - last_write_checksum: sha1:551b5a78542f46b91ef8c7772ee1d3440f1a201e + last_write_checksum: sha1:ac7089005d2ec61d52885238aa643a647308a5c2 docs/models/operations/listwebhooksresponse.md: last_write_checksum: sha1:7f02894a48288acfa3c406ed08007258f391d7a3 docs/models/operations/listwebhooksresponsebody.md: @@ -482,7 +494,7 @@ trackedFiles: docs/models/operations/listwordlistsdata.md: last_write_checksum: sha1:b367fd60cd4567cf0d6ac35f87118fa82cd682d4 docs/models/operations/listwordlistsrequest.md: - last_write_checksum: sha1:8f1e064b6c3a08980f08bfa4823533b19e239df6 + last_write_checksum: sha1:dc119062930464fa521085f0441782b77f6a04dd docs/models/operations/listwordlistsresponse.md: last_write_checksum: sha1:d33aad0d459ed94a16f2e99196cdfa08fc404039 docs/models/operations/listwordlistsresponsebody.md: @@ -536,13 +548,13 @@ trackedFiles: docs/models/operations/religion.md: last_write_checksum: sha1:60a7524aee8d44058881d8a10476e8ba57c7d461 docs/models/operations/removewordlistwordsrequest.md: - last_write_checksum: sha1:423ebbb91d546eb7e65ab8e0a354f44615a7ec11 + last_write_checksum: sha1:8b02f557f76724083a5dfb65a8dcf98517dea1cc docs/models/operations/removewordlistwordsresponse.md: last_write_checksum: sha1:37952680c9ae4ddd92d0f937e2461bb4b67b8023 docs/models/operations/removewordlistwordsresponsebody.md: last_write_checksum: sha1:def6fad308c85268f2497306789d01bbd6def4bf docs/models/operations/resolvequeueitemrequest.md: - last_write_checksum: sha1:fcb6e6d8f107141525cc14f9ceec5e0290b9e66c + last_write_checksum: sha1:e6dd0fead0acf3b8e03383b9b9b8abc623a68059 docs/models/operations/resolvequeueitemrequestbody.md: last_write_checksum: sha1:5d9c9ecc2d27f1273a86d3d53339a33679ce4657 docs/models/operations/resolvequeueitemresponse.md: @@ -582,7 +594,9 @@ trackedFiles: docs/models/operations/submitcontentrecommendationaction.md: last_write_checksum: sha1:6bfd5d79248f31aabbc398a94fc7f86212e914dc docs/models/operations/submitcontentrequest.md: - last_write_checksum: sha1:4a74b63a60c76cded86d070e9cd4c661c7b2cf1a + last_write_checksum: sha1:9a9a6c2c9d6d8ef67121a5ea7f218b10b5570251 + docs/models/operations/submitcontentrequestbody.md: + last_write_checksum: sha1:787c85ccd1bd99790a05ed652b5fc61c11a37a4a docs/models/operations/submitcontentresponse.md: last_write_checksum: sha1:c7f8c3160bb9f0334022cd29f35780cada7e2a22 docs/models/operations/submitcontentresponsebody.md: @@ -612,7 +626,7 @@ trackedFiles: docs/models/operations/unicodespoofing.md: last_write_checksum: sha1:79534af1086c3960979eeadb5a132cbba08a993a docs/models/operations/unresolvequeueitemrequest.md: - last_write_checksum: sha1:d0eb50151cb16164746267ecbd4d52a319981057 + last_write_checksum: sha1:2f2a77cb45f830ce1c4c0af3c0157648ed1a6b15 docs/models/operations/unresolvequeueitemrequestbody.md: last_write_checksum: sha1:e3bc1ac8ae2c278f883964a8a04beb4af0ccd7d3 docs/models/operations/unresolvequeueitemresponse.md: @@ -632,7 +646,7 @@ trackedFiles: docs/models/operations/updateactionqueuebehaviourresponse.md: last_write_checksum: sha1:59ae0036f1021859681cd67d605936219ec9ff2e docs/models/operations/updateactionrequest.md: - last_write_checksum: sha1:377658dddae1306fd12974358879cd2298207b51 + last_write_checksum: sha1:4af425d4edd0355e92debec1b365b9bbb8d06323 docs/models/operations/updateactionrequestbody.md: last_write_checksum: sha1:bf288fb88758ed516fc055ae541ae171a3db848c docs/models/operations/updateactionresponse.md: @@ -646,7 +660,7 @@ trackedFiles: docs/models/operations/updateauthormetadata.md: last_write_checksum: sha1:19f1c36225459beae124087d1919a5f20373db33 docs/models/operations/updateauthorrequest.md: - last_write_checksum: sha1:d6b7212630faac1e1bc8a305131269b4bd464c72 + last_write_checksum: sha1:b196806fae40d5230a273bea3da9629c4bbacb61 docs/models/operations/updateauthorrequestbody.md: last_write_checksum: sha1:6ac6aed5642dd8b5ad732df5ebdcd90c3b318c8e docs/models/operations/updateauthorresponse.md: @@ -672,7 +686,7 @@ trackedFiles: docs/models/operations/updatewebhookpayloadversion.md: last_write_checksum: sha1:0e7216f64eb36beaf459a533edc2f454cb55c910 docs/models/operations/updatewebhookrequest.md: - last_write_checksum: sha1:6ee2e26b8ea7c1302507909f1fe4481541445cc3 + last_write_checksum: sha1:55e62c24b5dca07c95558de543594f47e45849f6 docs/models/operations/updatewebhookrequestbody.md: last_write_checksum: sha1:2227e58ef090e34aa938a855fd852af5fc854d3a docs/models/operations/updatewebhookresponse.md: @@ -680,7 +694,7 @@ trackedFiles: docs/models/operations/updatewebhookresponsebody.md: last_write_checksum: sha1:c9ae9ad53cf50e0505407e7148372645b332ebd9 docs/models/operations/updatewordlistrequest.md: - last_write_checksum: sha1:eea5ac6f2ec61d093168b1860105e8781fc4569d + last_write_checksum: sha1:fa89e751dfb41bea23cdaf1df37d380bf3b52eab docs/models/operations/updatewordlistrequestbody.md: last_write_checksum: sha1:3087cb17ef97b5adc13488d30fc6a80ad59030f6 docs/models/operations/updatewordlistresponse.md: @@ -706,29 +720,29 @@ trackedFiles: docs/models/operations/withinunit.md: last_write_checksum: sha1:466d94909b10b82969067ddba11085bb507fb3d4 docs/sdks/account/README.md: - last_write_checksum: sha1:c827ed210a5b14e78ad8ac5fe7bff8c7b81f2fd0 + last_write_checksum: sha1:13beaa2b1485bdfcef8887acc5b942bc935ae616 docs/sdks/actions/README.md: - last_write_checksum: sha1:0204521d0498074ed7c0b838bb138f00a52e0665 + last_write_checksum: sha1:7095a9b9d529f8249d59ed8d87a8176d12893e15 docs/sdks/authors/README.md: - last_write_checksum: sha1:2655cdf6a6a03a4baaa4c4ddec2cd4909ea5d572 + last_write_checksum: sha1:5dc3fef30800c9cfd3e2a5ddba7ecf52c48affb4 docs/sdks/channels/README.md: last_write_checksum: sha1:ed1f37cd92ff8ef60df01de8567e533f4c2adf26 docs/sdks/content/README.md: - last_write_checksum: sha1:9b4d93c86c13742aea2429ebbb3fb7fc9f5f503f + last_write_checksum: sha1:cceebfb98c4eb56acb37772c5cd4388e18480c02 docs/sdks/items/README.md: - last_write_checksum: sha1:6a69a96684b38faf9d6d73ab93b990f04b04a45b + last_write_checksum: sha1:4eed53ce5c58e2a96404e4b225ae1a3c7ada8e94 docs/sdks/projects/README.md: last_write_checksum: sha1:623605cf28283e448ae1c5a1137bb3005725b6cf docs/sdks/queue/README.md: - last_write_checksum: sha1:59a4690991d711f19e32b055c1ee8d5906150476 + last_write_checksum: sha1:8e7baf61d3b5633a3e526720abc387e9b922d145 docs/sdks/webhooks/README.md: - last_write_checksum: sha1:ee6d998dc6f14d48ca64a0a03188f08bb0d75e85 + last_write_checksum: sha1:d503ea75c0567888596497454f0ee806769c8882 docs/sdks/webhooksecret/README.md: - last_write_checksum: sha1:ecd7113636171d245200cf13b734155cfac6ae4b + last_write_checksum: sha1:1b5b1c9b94a72c4953c237fc155ade56aa2fc26d docs/sdks/wordlist/README.md: - last_write_checksum: sha1:1075eaac7fd574ab14f39ea7703c4a7cc93b8622 + last_write_checksum: sha1:4ed5429220a895ff28d2da524c95db24e4e10a70 docs/sdks/words/README.md: - last_write_checksum: sha1:1db444ac51e24a35f57b2bf702c2c8f2f5c5c6d9 + last_write_checksum: sha1:25b059bb7ffac5ad5e42f61719dd99235971bd03 lib/crystalline.rb: last_write_checksum: sha1:b6ec0a2833f58ba9a6f07c9637fdca05e59006d3 lib/crystalline/enum.rbi: @@ -744,17 +758,17 @@ trackedFiles: lib/moderation_api.rb: last_write_checksum: sha1:763da34902f08acf7a9d8e7924a5b6c5393bfffa lib/moderation_api/account.rb: - last_write_checksum: sha1:2c4e3b0d811e0ad99e425a0342a6256c8a1eb604 + last_write_checksum: sha1:ea3cfe55787ecb7cc8ed798b76d4036b1aa3d3bc lib/moderation_api/actions.rb: - last_write_checksum: sha1:4c1f9a74fd6ee6462e1fbac9dc73ba5047b69949 + last_write_checksum: sha1:176a1320c5e48a9a9198fa2f934aea4719173fbe lib/moderation_api/authors.rb: - last_write_checksum: sha1:633509139be7aa4b6e2ead60ecc79728fb8e8988 + last_write_checksum: sha1:47b399a9643de6d98227d66b044096be24e1e9af lib/moderation_api/channels.rb: last_write_checksum: sha1:8d995eac91d890d34e95f9c6120c503337bda145 lib/moderation_api/content.rb: - last_write_checksum: sha1:a8546b5b5701ec4cbdd6bc5c877d6237b02e2e6b + last_write_checksum: sha1:f167674cc2738936de6ea0d3d2da6a9bf76cf918 lib/moderation_api/items.rb: - last_write_checksum: sha1:8de45ed736912a96b5cb88f919237e4ae4694ba4 + last_write_checksum: sha1:82a08cca3366a7ca3ba4cd8fcdb000eef26441c8 lib/moderation_api/models/callbacks.rb: last_write_checksum: sha1:00479d36cc70b26d311a89c2162e1eecd7986e77 lib/moderation_api/models/components.rb: @@ -764,7 +778,7 @@ trackedFiles: lib/moderation_api/models/components/authenticationerror_code.rbi: last_write_checksum: sha1:a1a0028346f661780407ec3c9c34637d1c0ec430 lib/moderation_api/models/components/badrequesterror_code.rb: - last_write_checksum: sha1:639da08d2fc2194c7a6ce76cb78423828faf409d + last_write_checksum: sha1:50c6b6feb5cf6032640091167d8252c511c3269b lib/moderation_api/models/components/badrequesterror_code.rbi: last_write_checksum: sha1:b8873c1661cf42e27ff7442421c0767fe3f59634 lib/moderation_api/models/components/block.rb: @@ -816,7 +830,7 @@ trackedFiles: lib/moderation_api/models/components/path.rbi: last_write_checksum: sha1:4be829f458e8e386941b7a16126e5e24b4db2c84 lib/moderation_api/models/components/permissiondeniederror_code.rb: - last_write_checksum: sha1:f3d3075c46dd693731463cb2bad865b7822f0da8 + last_write_checksum: sha1:b2a2a154b4bf66756830928aee6443f9f6ef57a4 lib/moderation_api/models/components/permissiondeniederror_code.rbi: last_write_checksum: sha1:68fdd8eca128e2541d41f34ee535f787be26a471 lib/moderation_api/models/components/project.rb: @@ -874,7 +888,7 @@ trackedFiles: lib/moderation_api/models/errors/authenticationerror.rbi: last_write_checksum: sha1:ae0e6dd56230d6baf55a5296d2919658868019e6 lib/moderation_api/models/errors/badrequesterror.rb: - last_write_checksum: sha1:82b4f5236b893a06666a1bc42b31ce4a338429af + last_write_checksum: sha1:2d1897a71c7eaaf353dc8638937ca04d36a63b6c lib/moderation_api/models/errors/badrequesterror.rbi: last_write_checksum: sha1:02ffdc87b1bd37f7308a67f19be1d108c8998ef2 lib/moderation_api/models/errors/conflicterror.rb: @@ -890,7 +904,7 @@ trackedFiles: lib/moderation_api/models/errors/notfounderror.rbi: last_write_checksum: sha1:a79456942da7d91ab6a36ac8477d6b165c776e61 lib/moderation_api/models/errors/permissiondeniederror.rb: - last_write_checksum: sha1:f65d1f2f59ad91c5f0f50f8f4de2b3d7160721a7 + last_write_checksum: sha1:014bfb6d350b80dd7b22bb41d0fad2533ada741b lib/moderation_api/models/errors/permissiondeniederror.rbi: last_write_checksum: sha1:40154e330952ff9ce2e8f849ef8b9ece27e9b911 lib/moderation_api/models/errors/ratelimiterror.rb: @@ -898,7 +912,7 @@ trackedFiles: lib/moderation_api/models/errors/ratelimiterror.rbi: last_write_checksum: sha1:87922693e4ec7f67110e261b50d041d6591d3a6b lib/moderation_api/models/operations.rb: - last_write_checksum: sha1:2e8b032e1e39008d36eaf415bee0ddd0a142c74a + last_write_checksum: sha1:ba6fa597055216584d0e48fc8e618713b9189190 lib/moderation_api/models/operations/action_request.rb: last_write_checksum: sha1:dfab71edc86fbc3977a4b8a8a5b781c24536b087 lib/moderation_api/models/operations/action_request.rbi: @@ -908,9 +922,9 @@ trackedFiles: lib/moderation_api/models/operations/actionstat.rbi: last_write_checksum: sha1:635fbf99142aa22e216389ef0ff639f4f1411986 lib/moderation_api/models/operations/addwordlistwords_request.rb: - last_write_checksum: sha1:c1edcae4172e7346250d86883331bbe2d0ac2adb + last_write_checksum: sha1:411f623a6eb4d75ea16b29702f048b23fd0fd33f lib/moderation_api/models/operations/addwordlistwords_request.rbi: - last_write_checksum: sha1:1ed57e299dedb792ed8f32420cade61aadd18523 + last_write_checksum: sha1:8f48366985fba9cd2f86b47f52eecbcaf6c2ac9e lib/moderation_api/models/operations/addwordlistwords_requestbody.rb: last_write_checksum: sha1:5dc513bcfba2f83e79291121945356d0f9f8f616 lib/moderation_api/models/operations/addwordlistwords_requestbody.rbi: @@ -1044,9 +1058,13 @@ trackedFiles: lib/moderation_api/models/operations/createaction_queuebehaviour_response.rbi: last_write_checksum: sha1:853a04df51eb97327381a7d4d027942838808e3d lib/moderation_api/models/operations/createaction_request.rb: - last_write_checksum: sha1:0fb4bc55f78f95268c6d53e555d1e0a9d40afad0 + last_write_checksum: sha1:49b3bcdddf66b5d5879fd128721aed8e388538bc lib/moderation_api/models/operations/createaction_request.rbi: - last_write_checksum: sha1:710c402063f88e254b6fb54f62e917cc45647b1e + last_write_checksum: sha1:2c392fdeb47841ebee364e6d71782a7ad1af6130 + lib/moderation_api/models/operations/createaction_requestbody.rb: + last_write_checksum: sha1:654bb7c247e18fb31d61f6c114b2b7fe023bbe7c + lib/moderation_api/models/operations/createaction_requestbody.rbi: + last_write_checksum: sha1:1d963dbaaeb617f7df0bab61772d2f87cf9f24e9 lib/moderation_api/models/operations/createaction_response.rb: last_write_checksum: sha1:33da5aeb1f7ab8025ad717199d3e8cb5808edc65 lib/moderation_api/models/operations/createaction_response.rbi: @@ -1068,9 +1086,13 @@ trackedFiles: lib/moderation_api/models/operations/createauthor_metadata.rbi: last_write_checksum: sha1:dd2823e16e0e18fd338752e2ff0211cb7f15a8aa lib/moderation_api/models/operations/createauthor_request.rb: - last_write_checksum: sha1:9a53e07f79c947afbf8b3fe29c59ead8bf07207b + last_write_checksum: sha1:967c3e9b27ee8dddbff5c2da3073e1dc079e2b3d lib/moderation_api/models/operations/createauthor_request.rbi: - last_write_checksum: sha1:294487213bc64d4416d2ef4e426525c6a43b180a + last_write_checksum: sha1:805fa3bcbddbd26d9f598c3f93fef8a8bf1c2662 + lib/moderation_api/models/operations/createauthor_requestbody.rb: + last_write_checksum: sha1:1610feed671e2ce05d87561869b996a573e30831 + lib/moderation_api/models/operations/createauthor_requestbody.rbi: + last_write_checksum: sha1:06115bef07f2aa46c104dcc5c1ed5197426ea94f lib/moderation_api/models/operations/createauthor_response.rb: last_write_checksum: sha1:d2163c72dbcb59104fadc04ff1411d39d84ad359 lib/moderation_api/models/operations/createauthor_response.rbi: @@ -1112,9 +1134,13 @@ trackedFiles: lib/moderation_api/models/operations/createwebhook_payloadversion.rbi: last_write_checksum: sha1:2e45b0084d0ed4e0434f63850dbb48a556cde35c lib/moderation_api/models/operations/createwebhook_request.rb: - last_write_checksum: sha1:6d924f88260762e704f01bf00dc20f86e7a82926 + last_write_checksum: sha1:2964f4d5be1ef160de6c458469bee322f3c74a81 lib/moderation_api/models/operations/createwebhook_request.rbi: - last_write_checksum: sha1:8f2237118d7bd6191a0c30cf032d6ed0af1340a2 + last_write_checksum: sha1:a9ae7fc24c82acdfd0630aea9317abd7a5f9da5d + lib/moderation_api/models/operations/createwebhook_requestbody.rb: + last_write_checksum: sha1:23648115740d3147a0c36a0b38da33af109f9f44 + lib/moderation_api/models/operations/createwebhook_requestbody.rbi: + last_write_checksum: sha1:edc8a4343f05c37bf2ffa0c1bb3987d938dff465 lib/moderation_api/models/operations/createwebhook_response.rb: last_write_checksum: sha1:f7af74f2f34b2a32af7b0f3f6a6bad862717cbd3 lib/moderation_api/models/operations/createwebhook_response.rbi: @@ -1156,9 +1182,9 @@ trackedFiles: lib/moderation_api/models/operations/data_video.rbi: last_write_checksum: sha1:a12143277ab2373c81cd11e614de744ece622ca8 lib/moderation_api/models/operations/deleteaction_request.rb: - last_write_checksum: sha1:7272c747ca6397d6fcb55d4bb7ca33f681f0513c + last_write_checksum: sha1:84a02b04a6a133dd057ad6ad7e9f4da812dc7ab1 lib/moderation_api/models/operations/deleteaction_request.rbi: - last_write_checksum: sha1:7786932f0b0eb4d866a55b1b9a5cc2a79af680b5 + last_write_checksum: sha1:77890b6b725e85d390a3032108aa9677c234a4c3 lib/moderation_api/models/operations/deleteaction_response.rb: last_write_checksum: sha1:2cd62c515e3de0f88fc7b4c691aa06caf37f3dea lib/moderation_api/models/operations/deleteaction_response.rbi: @@ -1168,9 +1194,9 @@ trackedFiles: lib/moderation_api/models/operations/deleteaction_responsebody.rbi: last_write_checksum: sha1:42d7625788ac5d314387ccb47c555c828dd55210 lib/moderation_api/models/operations/deleteauthor_request.rb: - last_write_checksum: sha1:973d362f3a3a36558c083828dd3bd8e08bda71ba + last_write_checksum: sha1:d7be7f01c9ef396b304e34a3b8c6ea9a60a703a4 lib/moderation_api/models/operations/deleteauthor_request.rbi: - last_write_checksum: sha1:8a3e6b8308afb73955fa393df815cecf006fe139 + last_write_checksum: sha1:beed1a4dbf318b0e36d2e989d2fb8b487eb539d1 lib/moderation_api/models/operations/deleteauthor_response.rb: last_write_checksum: sha1:49e79f5e40d77fdae6ea3996988b6c856e532466 lib/moderation_api/models/operations/deleteauthor_response.rbi: @@ -1204,9 +1230,9 @@ trackedFiles: lib/moderation_api/models/operations/deleteproject_responsebody.rbi: last_write_checksum: sha1:b3d8297878bddf23e6de4f27658aee9b839489a4 lib/moderation_api/models/operations/deletewebhook_request.rb: - last_write_checksum: sha1:5b812d5de6adb8b80a8082ccac6e36a3701a42e4 + last_write_checksum: sha1:1ab558b8baa3a1881d0429d445269273428d9b9a lib/moderation_api/models/operations/deletewebhook_request.rbi: - last_write_checksum: sha1:5de250983f03e57fe75bd777d0f4253b15e89a82 + last_write_checksum: sha1:7084ee1fb42b359c6460a0ff99c668e81c13158f lib/moderation_api/models/operations/deletewebhook_response.rb: last_write_checksum: sha1:b0157eb932f790b22c8648d55b123c70fb80c37d lib/moderation_api/models/operations/deletewebhook_response.rbi: @@ -1264,9 +1290,13 @@ trackedFiles: lib/moderation_api/models/operations/evaluation.rbi: last_write_checksum: sha1:7ede0a62266263475bbf0f6ec4ff029f180e1d2b lib/moderation_api/models/operations/executeaction_request.rb: - last_write_checksum: sha1:284dc648138d8bb2356e92a7ac24de77b5ec6ff0 + last_write_checksum: sha1:8567a7443c5252f089055364426c75909f3f39a2 lib/moderation_api/models/operations/executeaction_request.rbi: - last_write_checksum: sha1:3ccef1f5e1852b76d86829c5ae93fed18d0557b7 + last_write_checksum: sha1:42184359c803c8c4b96ced107032b9c114ab4712 + lib/moderation_api/models/operations/executeaction_requestbody.rb: + last_write_checksum: sha1:4b49ead8234cc17e317fdfcc3667bf7f469e093c + lib/moderation_api/models/operations/executeaction_requestbody.rbi: + last_write_checksum: sha1:e742bb1d237260f36f8b2b3b5006a9763c766733 lib/moderation_api/models/operations/executeaction_response.rb: last_write_checksum: sha1:da59db1849ef77e0bf76977365fa7f09f1aba52e lib/moderation_api/models/operations/executeaction_response.rbi: @@ -1303,6 +1333,10 @@ trackedFiles: last_write_checksum: sha1:7aea31107d581302bd1d13c17c68d43631c8c813 lib/moderation_api/models/operations/gambling.rbi: last_write_checksum: sha1:3c0dca992e2a39fe1477750ca106948527a73016 + lib/moderation_api/models/operations/getaccount_request.rb: + last_write_checksum: sha1:58f3c3c9c410180d71d7ade2ce6a45bdcb2fae22 + lib/moderation_api/models/operations/getaccount_request.rbi: + last_write_checksum: sha1:7f7a1bb1a805283bd9daaaf9313ea298060d7dd3 lib/moderation_api/models/operations/getaccount_response.rb: last_write_checksum: sha1:5fc0170954a792776ddfb8d515494dad652305e1 lib/moderation_api/models/operations/getaccount_response.rbi: @@ -1324,9 +1358,9 @@ trackedFiles: lib/moderation_api/models/operations/getaction_queuebehaviour.rbi: last_write_checksum: sha1:c0c32f0051a476d112ad505e50be9517375d5286 lib/moderation_api/models/operations/getaction_request.rb: - last_write_checksum: sha1:46fa64cd5646a22a75ed12fcf6c89d1044b1e446 + last_write_checksum: sha1:2897effc5129abae6be25719f8f2eaeb490b1385 lib/moderation_api/models/operations/getaction_request.rbi: - last_write_checksum: sha1:9bf34d6850f0256523924baca8f35c33fa97a666 + last_write_checksum: sha1:dc30593aac4412b1d073846a3c1348faf94d86eb lib/moderation_api/models/operations/getaction_response.rb: last_write_checksum: sha1:3151d35644fe5c81e17c079cf2eb5a5f36fe00e1 lib/moderation_api/models/operations/getaction_response.rbi: @@ -1340,9 +1374,9 @@ trackedFiles: lib/moderation_api/models/operations/getaction_type.rbi: last_write_checksum: sha1:394a433ae22d77a213ba8d2ef7863f41e723eed2 lib/moderation_api/models/operations/getauthor_request.rb: - last_write_checksum: sha1:ace6bf7dc2a9460e046136ab38c8e61327dc96ac + last_write_checksum: sha1:ce67f1209125893fe60e15ce9734b2ccfa9854f7 lib/moderation_api/models/operations/getauthor_request.rbi: - last_write_checksum: sha1:fbc1ec4a50f603b7e335e3d0cc90e1cedbd04ffa + last_write_checksum: sha1:95b5b3e3490f09981497712109a857dbdeb69352 lib/moderation_api/models/operations/getauthor_response.rb: last_write_checksum: sha1:d74e5faf867afe8f64cbd0b5accedc57c509bd3e lib/moderation_api/models/operations/getauthor_response.rbi: @@ -1372,9 +1406,9 @@ trackedFiles: lib/moderation_api/models/operations/getqueue_recommendationaction.rbi: last_write_checksum: sha1:c954bc135e25e58683bed62e31de157fe586139a lib/moderation_api/models/operations/getqueue_request.rb: - last_write_checksum: sha1:fcb7d14ea4ba727ec002e69bc810854d1430dbed + last_write_checksum: sha1:bb1a07d7db19610b23e8db63da8d46a95f8790ca lib/moderation_api/models/operations/getqueue_request.rbi: - last_write_checksum: sha1:1a86a1f2f0346746e127b7f2d8209522f2693b82 + last_write_checksum: sha1:6acb645e5d88c97807bc0975a0d01c76256410ac lib/moderation_api/models/operations/getqueue_response.rb: last_write_checksum: sha1:b4634c35bac1d582a3b01efa6d75299b79954cd3 lib/moderation_api/models/operations/getqueue_response.rbi: @@ -1388,9 +1422,9 @@ trackedFiles: lib/moderation_api/models/operations/getqueue_type.rbi: last_write_checksum: sha1:077545165e946578e697d7663bfd89d006f05f75 lib/moderation_api/models/operations/getqueuestats_request.rb: - last_write_checksum: sha1:a5ad808317aecb93eb30120359f1b8e3177ad4c8 + last_write_checksum: sha1:5de733b214a6e71ce38a68489cfe42e8404914b2 lib/moderation_api/models/operations/getqueuestats_request.rbi: - last_write_checksum: sha1:9f609cd174f7938a7839ec24a7b2cf69608e0aef + last_write_checksum: sha1:cfb5359880a18a56742dda21c9dd1e4900035905 lib/moderation_api/models/operations/getqueuestats_response.rb: last_write_checksum: sha1:990d9a88096821ab8f60fdcc2b8665b1f3ff514c lib/moderation_api/models/operations/getqueuestats_response.rbi: @@ -1408,9 +1442,9 @@ trackedFiles: lib/moderation_api/models/operations/getwebhook_payloadversion.rbi: last_write_checksum: sha1:6b50974441d14d33f34e3737b7163330e8675b44 lib/moderation_api/models/operations/getwebhook_request.rb: - last_write_checksum: sha1:81037556f00e3256613849b2cc113c805c1cc4ce + last_write_checksum: sha1:4da030ca28a75b12324a2ec724c9013edbbbc17e lib/moderation_api/models/operations/getwebhook_request.rbi: - last_write_checksum: sha1:65a3eb0585f23cf6f962dd6b8be9645e5391693f + last_write_checksum: sha1:1be6e7ee51b03784d3a26e3003d9eb1402401019 lib/moderation_api/models/operations/getwebhook_response.rb: last_write_checksum: sha1:ba64499e52581a7272465eecc2ee08f6d7828563 lib/moderation_api/models/operations/getwebhook_response.rbi: @@ -1419,6 +1453,10 @@ trackedFiles: last_write_checksum: sha1:5c8f484feba7fa5e366edac51f69171a00fce5c1 lib/moderation_api/models/operations/getwebhook_responsebody.rbi: last_write_checksum: sha1:5655f9ab43c4c522fb653dd1883bbb56f2c3d9cb + lib/moderation_api/models/operations/getwebhooksecret_request.rb: + last_write_checksum: sha1:08e6ae64fe305548120076138d7354d3e8781006 + lib/moderation_api/models/operations/getwebhooksecret_request.rbi: + last_write_checksum: sha1:75d65f809d33b94299ec409df3781eb4d9cfdede lib/moderation_api/models/operations/getwebhooksecret_response.rb: last_write_checksum: sha1:0cd9020ca4a4533dcef841ce223ff2566f036daf lib/moderation_api/models/operations/getwebhooksecret_response.rbi: @@ -1428,9 +1466,9 @@ trackedFiles: lib/moderation_api/models/operations/getwebhooksecret_responsebody.rbi: last_write_checksum: sha1:252bd188afed0a23c0f5cbb9339d14d905dbec1c lib/moderation_api/models/operations/getwordlist_request.rb: - last_write_checksum: sha1:c3d51a9149c6d3f99867385c46bca66a3e1f5e60 + last_write_checksum: sha1:694da865e0e4bba4a795f8f04de653e9c4d469f0 lib/moderation_api/models/operations/getwordlist_request.rbi: - last_write_checksum: sha1:9b3c5f558311c488833efc04da0531cf644039c6 + last_write_checksum: sha1:1fa9f26e488a8bec156ab52ae7d7b85f5cedeae3 lib/moderation_api/models/operations/getwordlist_response.rb: last_write_checksum: sha1:ff5945c2f923c6e982c9d43ad61b07ac8c1e9628 lib/moderation_api/models/operations/getwordlist_response.rbi: @@ -1440,9 +1478,9 @@ trackedFiles: lib/moderation_api/models/operations/getwordlist_responsebody.rbi: last_write_checksum: sha1:dd7cb338ff0927708f3a523f3bd0e487f056b975 lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rb: - last_write_checksum: sha1:df6904cd7c1bcec7de418b59606ac45450c9c206 + last_write_checksum: sha1:3724b2f947d2925431d5655022442ccceee65a78 lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rbi: - last_write_checksum: sha1:6d8c11b3f533d1f3234a169d65b8ab9f34bfb51a + last_write_checksum: sha1:d3681a5f35da54bde86e69b277b0db35a576b113 lib/moderation_api/models/operations/getwordlistembeddingstatus_response.rb: last_write_checksum: sha1:be9808e6812bbc42cad3366a5dd06f3c4e153409 lib/moderation_api/models/operations/getwordlistembeddingstatus_response.rbi: @@ -1528,9 +1566,9 @@ trackedFiles: lib/moderation_api/models/operations/listactions_queuebehaviour.rbi: last_write_checksum: sha1:d6764692ddbd8f19451e8a1c08f44266b46b2ec3 lib/moderation_api/models/operations/listactions_request.rb: - last_write_checksum: sha1:fc26d2f1106adc3a495672df766a060a01a6318b + last_write_checksum: sha1:b8d3fc8686d609b3541f8ecff7d6698ae8769734 lib/moderation_api/models/operations/listactions_request.rbi: - last_write_checksum: sha1:d51513303bca2d298d7a303f4fb6b15006259255 + last_write_checksum: sha1:96de8eb3f442d4738b09d843882e4bd8773669f3 lib/moderation_api/models/operations/listactions_response.rb: last_write_checksum: sha1:ed6e3b428ea9954f35bfe0359e841720f6307d8b lib/moderation_api/models/operations/listactions_response.rbi: @@ -1544,9 +1582,9 @@ trackedFiles: lib/moderation_api/models/operations/listactions_type.rbi: last_write_checksum: sha1:66c5ffe83807695824181754cf0d2fe709659f99 lib/moderation_api/models/operations/listauthors_request.rb: - last_write_checksum: sha1:0e837626e310df7c6744741975896ba668070cc9 + last_write_checksum: sha1:e7c2b180302a8bbb0c1ead32c24abdc8386988ae lib/moderation_api/models/operations/listauthors_request.rbi: - last_write_checksum: sha1:54ae7332fdeeea02061588a7d9d6356c6fb4b064 + last_write_checksum: sha1:f20ad14b2c5d195c9efb331f310444c2fde9b7aa lib/moderation_api/models/operations/listauthors_response.rb: last_write_checksum: sha1:5cfcfb662f34f24cd6ef58bead5d7a575570be65 lib/moderation_api/models/operations/listauthors_response.rbi: @@ -1596,9 +1634,9 @@ trackedFiles: lib/moderation_api/models/operations/listqueueitems_label.rbi: last_write_checksum: sha1:83d777ef7ae4c7839fc6138384dbbb56f0fd3e08 lib/moderation_api/models/operations/listqueueitems_request.rb: - last_write_checksum: sha1:78dbcc950eec059116af7bef3abed196e1143a47 + last_write_checksum: sha1:1b691b3b6bdf2fcdb5d9a12e912bb8a1ee558587 lib/moderation_api/models/operations/listqueueitems_request.rbi: - last_write_checksum: sha1:1b983600092e467f3a744f6dedb7083ab57e6578 + last_write_checksum: sha1:fa8af0ac6d0a61ef7e56a3e0ffee21b48758c09e lib/moderation_api/models/operations/listqueueitems_response.rb: last_write_checksum: sha1:1dbdccc4868d6177bfd8d85b16ade10ceca76f7f lib/moderation_api/models/operations/listqueueitems_response.rbi: @@ -1628,9 +1666,9 @@ trackedFiles: lib/moderation_api/models/operations/listwebhooks_payloadversion.rbi: last_write_checksum: sha1:c2e21de84fb31da5f26358faac088e192dd9d97c lib/moderation_api/models/operations/listwebhooks_request.rb: - last_write_checksum: sha1:ca01cb3006143e3082e2745de5747836726e6da6 + last_write_checksum: sha1:98a4b3219d6c5cac1b92f0627ec912c81792b3ec lib/moderation_api/models/operations/listwebhooks_request.rbi: - last_write_checksum: sha1:a6c313c406fd5a356c3042e3568c194542131a53 + last_write_checksum: sha1:32acd2c709bfd051fb2a9287d25dbebc8a465a37 lib/moderation_api/models/operations/listwebhooks_response.rb: last_write_checksum: sha1:fdb790a1bb0138145237318ad691928a69ee5483 lib/moderation_api/models/operations/listwebhooks_response.rbi: @@ -1644,9 +1682,9 @@ trackedFiles: lib/moderation_api/models/operations/listwordlists_data.rbi: last_write_checksum: sha1:af42bf5e255857f2eb738670969b63c1cf5df9cb lib/moderation_api/models/operations/listwordlists_request.rb: - last_write_checksum: sha1:eae93f932ade11ec153d97538b2583332a36abc4 + last_write_checksum: sha1:80e16e9366dc16d5d77886f35be6ab0a1a6fb2c3 lib/moderation_api/models/operations/listwordlists_request.rbi: - last_write_checksum: sha1:fe2c9e36e5c343909ddbcb28deaad5053e0bf3e1 + last_write_checksum: sha1:3d6e197819c666694c217269e305d14da5099651 lib/moderation_api/models/operations/listwordlists_response.rb: last_write_checksum: sha1:f4f343b64de5e2fc13aeb8a1e2945c41534d99d8 lib/moderation_api/models/operations/listwordlists_response.rbi: @@ -1752,9 +1790,9 @@ trackedFiles: lib/moderation_api/models/operations/religion.rbi: last_write_checksum: sha1:879ecea96ee34baca3a0cf1d8c5f1f71cd09c42f lib/moderation_api/models/operations/removewordlistwords_request.rb: - last_write_checksum: sha1:84486be04fe8f6a49286082caa4c3cadba26e7a8 + last_write_checksum: sha1:673da90836382c4575557a7dd9ab68ad8c4029f9 lib/moderation_api/models/operations/removewordlistwords_request.rbi: - last_write_checksum: sha1:eab0b511f75ed228bd77e324867e5f5563e7fb59 + last_write_checksum: sha1:5c5d2de1447ac486aae455b77f2ade25d2b2f24a lib/moderation_api/models/operations/removewordlistwords_response.rb: last_write_checksum: sha1:cc044b603654e01f48a343f041ef9ed49656055e lib/moderation_api/models/operations/removewordlistwords_response.rbi: @@ -1764,9 +1802,9 @@ trackedFiles: lib/moderation_api/models/operations/removewordlistwords_responsebody.rbi: last_write_checksum: sha1:356759040681697022af0658456acc63000fd0dc lib/moderation_api/models/operations/resolvequeueitem_request.rb: - last_write_checksum: sha1:ba417596b06ef4c84cfdd087035b380a085e4d42 + last_write_checksum: sha1:4c35076b641fbbf1a97686f55d18c2db197a6c26 lib/moderation_api/models/operations/resolvequeueitem_request.rbi: - last_write_checksum: sha1:5efc70f0fae264e79bf8884412197a5aa367c4fe + last_write_checksum: sha1:5e192c3d41533fa5ee5002ad512bac8562be6197 lib/moderation_api/models/operations/resolvequeueitem_requestbody.rb: last_write_checksum: sha1:b4869b07ac0e9f8d146828388cab29da8b4cb40e lib/moderation_api/models/operations/resolvequeueitem_requestbody.rbi: @@ -1844,9 +1882,13 @@ trackedFiles: lib/moderation_api/models/operations/submitcontent_recommendation_action.rbi: last_write_checksum: sha1:5d19a64d3e146b8ec755d4cc48f0dd3a8753c5b6 lib/moderation_api/models/operations/submitcontent_request.rb: - last_write_checksum: sha1:4f699149c1dc50b50d1ae11a9aed4f5b02163b34 + last_write_checksum: sha1:1f2e3b87c7199c321d498f3b5a5ce68626a143df lib/moderation_api/models/operations/submitcontent_request.rbi: - last_write_checksum: sha1:43687c98c8281c611f26cd9118f4e116e5d6f334 + last_write_checksum: sha1:371659a98c66d09b055e065cb49b37173f269f9d + lib/moderation_api/models/operations/submitcontent_requestbody.rb: + last_write_checksum: sha1:effc5149aa7426b873fc9e1019d6a90925d3a080 + lib/moderation_api/models/operations/submitcontent_requestbody.rbi: + last_write_checksum: sha1:27e861b58d9151813aec8e458248467b68864944 lib/moderation_api/models/operations/submitcontent_response.rb: last_write_checksum: sha1:3029db8f04ceb75f80f33034573e4639b8468274 lib/moderation_api/models/operations/submitcontent_response.rbi: @@ -1904,9 +1946,9 @@ trackedFiles: lib/moderation_api/models/operations/unicode_spoofing.rbi: last_write_checksum: sha1:7656bced8fbc58bd5d5acd35faf840f724c02f2f lib/moderation_api/models/operations/unresolvequeueitem_request.rb: - last_write_checksum: sha1:296429b92295622e1d69e93b1fe9df22834ab505 + last_write_checksum: sha1:141b913c0998aaadcce96428c572c04ddd8333cd lib/moderation_api/models/operations/unresolvequeueitem_request.rbi: - last_write_checksum: sha1:db2170c43aa9acdb4bba2800ff0b3c8d673cd707 + last_write_checksum: sha1:fc8381c7576bee1f35c0f6d80b8b96bec161e843 lib/moderation_api/models/operations/unresolvequeueitem_requestbody.rb: last_write_checksum: sha1:5abd72cc8d7303023982e8ba5815e58b6170c071 lib/moderation_api/models/operations/unresolvequeueitem_requestbody.rbi: @@ -1944,9 +1986,9 @@ trackedFiles: lib/moderation_api/models/operations/updateaction_queuebehaviour_response.rbi: last_write_checksum: sha1:fcf4ef617b2df643481b62f4f12bdfdbb6ad85bf lib/moderation_api/models/operations/updateaction_request.rb: - last_write_checksum: sha1:ad1caf0b73322633b5a6dbf42a483463f1c4e06a + last_write_checksum: sha1:9f1fb217dca8e0aacd75184ba66146ea96f1394a lib/moderation_api/models/operations/updateaction_request.rbi: - last_write_checksum: sha1:76ce102b12d37d0a8f200514ccea15f0d8d4b3b5 + last_write_checksum: sha1:01a5c57caeced31d14de9b45f035c8c3d2d45bb3 lib/moderation_api/models/operations/updateaction_requestbody.rb: last_write_checksum: sha1:6afea12f92cbc6f21f282032a6f6799b78cee47b lib/moderation_api/models/operations/updateaction_requestbody.rbi: @@ -1972,9 +2014,9 @@ trackedFiles: lib/moderation_api/models/operations/updateauthor_metadata.rbi: last_write_checksum: sha1:7ca981866b53c4f7d35053bb4364138553074e25 lib/moderation_api/models/operations/updateauthor_request.rb: - last_write_checksum: sha1:3aeb4235c0047518041bd23b394edcd06e129743 + last_write_checksum: sha1:9af165fe1ae9014126444f608266933fd0438335 lib/moderation_api/models/operations/updateauthor_request.rbi: - last_write_checksum: sha1:4bd392cd8a4c1241f7fa5913fcfddbe08766219f + last_write_checksum: sha1:31ee44478048914ff07ec9f0ca465e2a3a1ba075 lib/moderation_api/models/operations/updateauthor_requestbody.rb: last_write_checksum: sha1:0ee72aa167f4c71c99a01757b36240bab84c1c4f lib/moderation_api/models/operations/updateauthor_requestbody.rbi: @@ -2024,9 +2066,9 @@ trackedFiles: lib/moderation_api/models/operations/updatewebhook_payloadversion.rbi: last_write_checksum: sha1:e290a3d66acbb9d0e7222ad1a8c553dded8dc137 lib/moderation_api/models/operations/updatewebhook_request.rb: - last_write_checksum: sha1:c33fb4d9557560983f3e6b05dc09dbafba7a7ddd + last_write_checksum: sha1:183b29459951538b7695284901d915d2b7cee6e8 lib/moderation_api/models/operations/updatewebhook_request.rbi: - last_write_checksum: sha1:7bbc89d33a6e4d28fc5e5350c8acfc9361d54227 + last_write_checksum: sha1:57935796ee6cfc633d8ac0518084580b693f3728 lib/moderation_api/models/operations/updatewebhook_requestbody.rb: last_write_checksum: sha1:014e32b0b7a7b5d0eeb599051d276528baafa548 lib/moderation_api/models/operations/updatewebhook_requestbody.rbi: @@ -2040,9 +2082,9 @@ trackedFiles: lib/moderation_api/models/operations/updatewebhook_responsebody.rbi: last_write_checksum: sha1:64c63cab1792f0b0338902ba2956315e447b1e83 lib/moderation_api/models/operations/updatewordlist_request.rb: - last_write_checksum: sha1:ee03cc65430eb26bd5826c43927543815092c489 + last_write_checksum: sha1:f5b84285d3aabf8e69d804e523bce35c9543e6f7 lib/moderation_api/models/operations/updatewordlist_request.rbi: - last_write_checksum: sha1:2186c460adb42d3bc2d6bd7fc395320cafdeec70 + last_write_checksum: sha1:d43f6585589b790ee86d04f7d1a979fdc9e1bdd8 lib/moderation_api/models/operations/updatewordlist_requestbody.rb: last_write_checksum: sha1:7ec0910e339404fc82c78efd7b67dc0fde58e22e lib/moderation_api/models/operations/updatewordlist_requestbody.rbi: @@ -2096,13 +2138,13 @@ trackedFiles: lib/moderation_api/projects.rb: last_write_checksum: sha1:1257d22a0c8172739041b3f86fa36a9347d747e5 lib/moderation_api/queue.rb: - last_write_checksum: sha1:2e562d5891cc29e53618c0ddf19eb142af87489c + last_write_checksum: sha1:9bf462b0535a72d255acd2bf2681649c797ad18b lib/moderation_api/sdk_hooks/hooks.rb: last_write_checksum: sha1:5b983b37647a1a8a2c35dd4cd4bc68bbde83906f lib/moderation_api/sdk_hooks/types.rb: last_write_checksum: sha1:4c965332c50ba795946cf8df50a6202e89db0a45 lib/moderation_api/sdkconfiguration.rb: - last_write_checksum: sha1:39164d01c276c1066afd589443e19e26bb2e10b9 + last_write_checksum: sha1:6903a5aaac8e69fc9c4980b3c4d058956e905469 lib/moderation_api/sdkconfiguration.rbi: last_write_checksum: sha1:0ff7c53716ae2b6668c84ad4f83b9a8697482c33 lib/moderation_api/utils/forms.rb: @@ -2122,15 +2164,15 @@ trackedFiles: lib/moderation_api/utils/utils.rb: last_write_checksum: sha1:3c34cf92cf1e72373dc5ea07493b6af559df8e4c lib/moderation_api/webhooks.rb: - last_write_checksum: sha1:7f8e5738d0c40c2f101866b6c3c326c7b1ead192 + last_write_checksum: sha1:ce364aefbd28a115bed16eae71741c0945dd3999 lib/moderation_api/webhooksecret.rb: - last_write_checksum: sha1:abe50afd77daec174c0c48b3675d1e0e48c05c8f + last_write_checksum: sha1:233f69692169d89c8b9c7a02f67dfb43437bbd3e lib/moderation_api/wordlist.rb: - last_write_checksum: sha1:6c5b36ba48a0f4549fb9693f245e0e92f0408d25 + last_write_checksum: sha1:ce2f83b2a436579623bd3e83ffc8114eb5c19458 lib/moderation_api/words.rb: - last_write_checksum: sha1:a03506834e2710a829573b48f24a404a6828307a + last_write_checksum: sha1:1caff3b1db9983d6cd6d76e0f90d47a39e376842 moderation_api.gemspec: - last_write_checksum: sha1:975375ed18f35086a7e013e0b10f6a08276cc6fe + last_write_checksum: sha1:9cd7f7552878319cf4c9ce64e4fe6fadb40050f9 sorbet/config: last_write_checksum: sha1:d02b32628dad70edc5929a9b9801d5e2dca15d40 sorbet/rbi/annotations/.gitattributes: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 201aea84..7bd157a2 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false ruby: - version: 3.0.0 + version: 3.1.0 additionalDependencies: development: {} runtime: {} diff --git a/.speakeasy/openapi.json b/.speakeasy/openapi.json new file mode 100644 index 00000000..88ae723f --- /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 03694967..b7867dfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,46 @@ # Changelog +## 3.1.0 (2026-10-22) + +Full Changelog: [v3.0.0...v3.1.0](https://github.com/moderation-api/sdk-ruby/compare/v3.0.0...v3.1.0) + +### API changes + +- Update to the latest API spec. + +## 3.0.0 (2026-10-22) + +A new major version of the Ruby SDK. Read the breaking changes before you upgrade. + +```bash +gem install moderation_api -v "~> 3.0" +``` + +### Ruby-specific changes + +- The module is `ModerationApi` (was `ModerationAPI`). Create the client with `ModerationApi::ModerationApi.new(secret_key: ENV.fetch("MODAPI_SECRET_KEY"))`. +- Requests are typed objects, for example `Operations::SubmitContentRequest.new(content: Operations::TextRequest.new(text: "..."))`, and responses carry the result in `.object`. Sorbet type signatures are included. +- Verify webhooks with `require "moderation_api/webhook_signature"` and `ModerationApi::WebhookSignature.construct_event(payload, signature)`. +### What's new + +- **Covers the whole API**, including the management API (`projects`, `channels`), wordlists and the review queue. +- **Automatic pagination.** List methods return an iterator that fetches the next page for you. +- **Clear errors.** One error class per HTTP status (`BadRequestError`, `NotFoundError`, `RateLimitError`, ...). Every error has a specific `code` (for example `invalid_api_key`, `quota_exceeded` or `author_not_found`), a `request_id` and a `doc_url`. See [Errors](https://docs.moderationapi.com/api-reference/errors). +- **Retries** with exponential backoff on `429` and `5xx`, and timeouts per client or per request. +- **Webhook verification** that reads the secret from `MODAPI_WEBHOOK_SECRET`. + +### Breaking changes + +The SDK is now generated from our OpenAPI spec with a new generator. Most calls keep their names, but check these: + +- **List responses** are `{ data, pagination }` instead of a plain array or a resource-specific shape, and list methods take `page` and `pageSize`. +- **Errors** have a new body: `code` is the specific error code, not the HTTP category. The old `data` field is gone. +- **Renamed:** `account.list` is now `account.retrieve`, and `actions.execute.execute` is now `actions.execute`. +- **Removed:** `actions.execute.executeByID` (use `actions.execute` with `actionId` or `actionKey`), `auth.*`, and `content.stream` (see [Real-time voice](https://docs.moderationapi.com/content-moderation/real-time-voice)). +- **Organization keys** work only with `projects` and `channels`; project keys work with everything else. Use one client per key. See the README. + +The license is unchanged: Apache-2.0. + ## 2.41.0 (2026-09-14) Full Changelog: [v2.40.0...v2.41.0](https://github.com/moderation-api/sdk-ruby/compare/v2.40.0...v2.41.0) diff --git a/Gemfile.lock b/Gemfile.lock index 9739d6a2..47d2fb34 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - moderation_api (3.0.0) + moderation_api (3.1.0) faraday faraday-multipart faraday-retry diff --git a/README.md b/README.md index 5febe652..02cd5e10 100644 --- a/README.md +++ b/README.md @@ -60,20 +60,20 @@ Models = ::ModerationApi::Models s = ::ModerationApi::ModerationApi.new( secret_key: "" ) - -req = Models::Operations::SubmitContentRequest.new( - content: Models::Operations::TextRequest.new( - type: "text", - text: "Hey, check out my profile for a deal!" - ), - content_id: "message-48213", - author_id: "user-1092", - conversation_id: "room-general", - metadata: { - "platform" => "ios" - } +res = s.content.submit( + body: Models::Operations::SubmitContentRequestBody.new( + content: Models::Operations::TextRequest.new( + type: "text", + text: "Hey, check out my profile for a deal!" + ), + content_id: "message-48213", + author_id: "user-1092", + conversation_id: "room-general", + metadata: { + "platform" => "ios" + } + ) ) -res = s.content.submit(request: req) unless res.object.nil? # handle response @@ -275,7 +275,7 @@ Create the organization client only where you manage projects and channels, for ### [Content](docs/sdks/content/README.md) -* [submit](docs/sdks/content/README.md#submit) +* [submit](docs/sdks/content/README.md#submit) - Submit content ### [Projects](docs/sdks/projects/README.md) diff --git a/USAGE.md b/USAGE.md index b95f03ca..91ffaf8d 100644 --- a/USAGE.md +++ b/USAGE.md @@ -6,20 +6,20 @@ Models = ::ModerationApi::Models s = ::ModerationApi::ModerationApi.new( secret_key: "" ) - -req = Models::Operations::SubmitContentRequest.new( - content: Models::Operations::TextRequest.new( - type: "text", - text: "Hey, check out my profile for a deal!" - ), - content_id: "message-48213", - author_id: "user-1092", - conversation_id: "room-general", - metadata: { - "platform" => "ios" - } +res = s.content.submit( + body: Models::Operations::SubmitContentRequestBody.new( + content: Models::Operations::TextRequest.new( + type: "text", + text: "Hey, check out my profile for a deal!" + ), + content_id: "message-48213", + author_id: "user-1092", + conversation_id: "room-general", + metadata: { + "platform" => "ios" + } + ) ) -res = s.content.submit(request: req) unless res.object.nil? # handle response diff --git a/docs/models/components/badrequesterrorcode.md b/docs/models/components/badrequesterrorcode.md index 0125f391..c0b14325 100644 --- a/docs/models/components/badrequesterrorcode.md +++ b/docs/models/components/badrequesterrorcode.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 @@ -19,7 +20,8 @@ custom = BadRequestErrorCode.deserialize("custom_value") ## Values -| Name | Value | -| ------------------- | ------------------- | -| `INVALID_REQUEST` | invalid_request | -| `VALIDATION_FAILED` | validation_failed | \ No newline at end of file +| Name | Value | +| --------------------- | --------------------- | +| `INVALID_REQUEST` | invalid_request | +| `PROJECT_ID_REQUIRED` | project_id_required | +| `VALIDATION_FAILED` | validation_failed | \ No newline at end of file diff --git a/docs/models/components/permissiondeniederrorcode.md b/docs/models/components/permissiondeniederrorcode.md index a57cc36c..dc1dce05 100644 --- a/docs/models/components/permissiondeniederrorcode.md +++ b/docs/models/components/permissiondeniederrorcode.md @@ -7,7 +7,6 @@ Exactly what went wrong. Stable; safe to branch on. New codes may be added. - `quota_exceeded`: The organization has used all API requests on its plan. - `plan_feature_unavailable`: The current plan does not include this feature. - `plan_limit_exceeded`: The request goes over a limit of the current plan. -- `project_key_required`: This endpoint needs a project API key, but an organization key was used. - `organization_key_required`: This endpoint needs an organization API key, but a project key was used. - `missing_key_permission`: The organization key does not have the permission this endpoint needs. - `project_not_reachable`: The organization key is limited to other projects. @@ -33,7 +32,6 @@ custom = PermissionDeniedErrorCode.deserialize("custom_value") | `QUOTA_EXCEEDED` | quota_exceeded | | `PLAN_FEATURE_UNAVAILABLE` | plan_feature_unavailable | | `PLAN_LIMIT_EXCEEDED` | plan_limit_exceeded | -| `PROJECT_KEY_REQUIRED` | project_key_required | | `ORGANIZATION_KEY_REQUIRED` | organization_key_required | | `MISSING_KEY_PERMISSION` | missing_key_permission | | `PROJECT_NOT_REACHABLE` | project_not_reachable | \ No newline at end of file diff --git a/docs/models/errors/badrequesterror.md b/docs/models/errors/badrequesterror.md index d25ced46..7c4d632c 100644 --- a/docs/models/errors/badrequesterror.md +++ b/docs/models/errors/badrequesterror.md @@ -5,12 +5,12 @@ The request is malformed or a parameter is invalid. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *::String* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | -| `code` | [Models::Components::BadRequestErrorCode](../../models/shared/badrequesterrorcode.md) | :heavy_check_mark: | Exactly what went wrong. Stable; safe to branch on. New codes may be added.

- `invalid_request`: A parameter is invalid. `message` says which one.
- `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`. | invalid_request | -| `message` | *::String* | :heavy_check_mark: | Human-readable explanation. | Invalid input data | -| `issues` | T::Array<[Models::Components::ErrorIssue](../../models/shared/errorissue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | -| `request_id` | *::String* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | -| `doc_url` | *::String* | :heavy_check_mark: | Documentation for this `code`. | | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | +| `code` | [Models::Components::BadRequestErrorCode](../../models/shared/badrequesterrorcode.md) | :heavy_check_mark: | Exactly what went wrong. Stable; safe to branch on. New codes may be added.

- `invalid_request`: A parameter is invalid. `message` says which one.
- `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the organization has more than one project.
- `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`. | invalid_request | +| `message` | *::String* | :heavy_check_mark: | Human-readable explanation. | Invalid input data | +| `issues` | T::Array<[Models::Components::ErrorIssue](../../models/shared/errorissue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | +| `request_id` | *::String* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | +| `doc_url` | *::String* | :heavy_check_mark: | Documentation for this `code`. | | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/models/errors/permissiondeniederror.md b/docs/models/errors/permissiondeniederror.md index 46d5c38d..8eeb77dc 100644 --- a/docs/models/errors/permissiondeniederror.md +++ b/docs/models/errors/permissiondeniederror.md @@ -5,12 +5,12 @@ The API key cannot do this, or the plan limit for this resource is reached. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `type` | *::String* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | -| `code` | [Models::Components::PermissionDeniedErrorCode](../../models/shared/permissiondeniederrorcode.md) | :heavy_check_mark: | Exactly what went wrong. Stable; safe to branch on. New codes may be added.

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

- `permission_denied`: The API key cannot perform this request.
- `account_disabled`: The organization account is disabled.
- `quota_exceeded`: The organization has used all API requests on its plan.
- `plan_feature_unavailable`: The current plan does not include this feature.
- `plan_limit_exceeded`: The request goes over a limit of the current plan.
- `organization_key_required`: This endpoint needs an organization API key, but a project key was used.
- `missing_key_permission`: The organization key does not have the permission this endpoint needs.
- `project_not_reachable`: The organization key is limited to other projects. | permission_denied | +| `message` | *::String* | :heavy_check_mark: | Human-readable explanation. | Insufficient access | +| `issues` | T::Array<[Models::Components::ErrorIssue](../../models/shared/errorissue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | +| `request_id` | *::String* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | +| `doc_url` | *::String* | :heavy_check_mark: | Documentation for this `code`. | | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/models/operations/addwordlistwordsrequest.md b/docs/models/operations/addwordlistwordsrequest.md index d9971ba3..bd54365e 100644 --- a/docs/models/operations/addwordlistwordsrequest.md +++ b/docs/models/operations/addwordlistwordsrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to add words to | -| `body` | [Models::Operations::AddWordlistWordsRequestBody](../../models/operations/addwordlistwordsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to add words to | +| `project_id` | *T.nilable(::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` | [Models::Operations::AddWordlistWordsRequestBody](../../models/operations/addwordlistwordsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createactionrequest.md b/docs/models/operations/createactionrequest.md index 818bcc84..d0785f07 100644 --- a/docs/models/operations/createactionrequest.md +++ b/docs/models/operations/createactionrequest.md @@ -3,16 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `key` | *T.nilable(::String)* | :heavy_minus_sign: | User defined key of the action. | -| `name` | *::String* | :heavy_check_mark: | The name of the action. | -| `description` | *T.nilable(::String)* | :heavy_minus_sign: | The description of the action. | -| `type` | [T.nilable(Models::Operations::CreateActionTypeRequest)](../../models/operations/createactiontyperequest.md) | :heavy_minus_sign: | The type of the action. | -| `built_in` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether the action is a built-in action or a custom one. | -| `queue_behaviour` | [T.nilable(Models::Operations::CreateActionQueueBehaviourRequest)](../../models/operations/createactionqueuebehaviourrequest.md) | :heavy_minus_sign: | Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status. | -| `filter_in_queue_ids` | T::Array<*::String*> | :heavy_minus_sign: | The IDs of the queues the action is available in. | -| `position` | [T.nilable(Models::Operations::CreateActionPositionRequest)](../../models/operations/createactionpositionrequest.md) | :heavy_minus_sign: | Show the action in all queues, selected queues or no queues (to use via API only). | -| `possible_values` | T::Array<[Models::Operations::CreateActionPossibleValueRequest](../../models/operations/createactionpossiblevaluerequest.md)> | :heavy_minus_sign: | The possible values of the action. The user will be prompted to select one of these values when executing the action. | -| `value_required` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether the action requires a value to be executed. | -| `free_text` | *T.nilable(T::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 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::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` | [Models::Operations::CreateActionRequestBody](../../models/operations/createactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createactionrequestbody.md b/docs/models/operations/createactionrequestbody.md new file mode 100644 index 00000000..e3a67afa --- /dev/null +++ b/docs/models/operations/createactionrequestbody.md @@ -0,0 +1,18 @@ +# CreateActionRequestBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `key` | *T.nilable(::String)* | :heavy_minus_sign: | User defined key of the action. | +| `name` | *::String* | :heavy_check_mark: | The name of the action. | +| `description` | *T.nilable(::String)* | :heavy_minus_sign: | The description of the action. | +| `type` | [T.nilable(Models::Operations::CreateActionTypeRequest)](../../models/operations/createactiontyperequest.md) | :heavy_minus_sign: | The type of the action. | +| `built_in` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether the action is a built-in action or a custom one. | +| `queue_behaviour` | [T.nilable(Models::Operations::CreateActionQueueBehaviourRequest)](../../models/operations/createactionqueuebehaviourrequest.md) | :heavy_minus_sign: | Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status. | +| `filter_in_queue_ids` | T::Array<*::String*> | :heavy_minus_sign: | The IDs of the queues the action is available in. | +| `position` | [T.nilable(Models::Operations::CreateActionPositionRequest)](../../models/operations/createactionpositionrequest.md) | :heavy_minus_sign: | Show the action in all queues, selected queues or no queues (to use via API only). | +| `possible_values` | T::Array<[Models::Operations::CreateActionPossibleValueRequest](../../models/operations/createactionpossiblevaluerequest.md)> | :heavy_minus_sign: | The possible values of the action. The user will be prompted to select one of these values when executing the action. | +| `value_required` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether the action requires a value to be executed. | +| `free_text` | *T.nilable(T::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/createauthorrequest.md b/docs/models/operations/createauthorrequest.md index 40e65131..668219cf 100644 --- a/docs/models/operations/createauthorrequest.md +++ b/docs/models/operations/createauthorrequest.md @@ -3,15 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| `profile_picture` | *T.nilable(::String)* | :heavy_minus_sign: | URL of the author's profile picture | -| `external_link` | *T.nilable(::String)* | :heavy_minus_sign: | URL of the author's external profile | -| `name` | *T.nilable(::String)* | :heavy_minus_sign: | Author name or identifier | -| `email` | *T.nilable(::String)* | :heavy_minus_sign: | Author email address | -| `company` | *T.nilable(::String)* | :heavy_minus_sign: | The author's company or organization | -| `metadata` | [T.nilable(Models::Operations::CreateAuthorMetadata)](../../models/operations/createauthormetadata.md) | :heavy_minus_sign: | Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process. | -| `first_seen` | *T.nilable(::Float)* | :heavy_minus_sign: | Timestamp when author first appeared | -| `last_seen` | *T.nilable(::Float)* | :heavy_minus_sign: | Timestamp of last activity | -| `manual_trust_level` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | -| `external_id` | *::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 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::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` | [Models::Operations::CreateAuthorRequestBody](../../models/operations/createauthorrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createauthorrequestbody.md b/docs/models/operations/createauthorrequestbody.md new file mode 100644 index 00000000..7b23aada --- /dev/null +++ b/docs/models/operations/createauthorrequestbody.md @@ -0,0 +1,17 @@ +# CreateAuthorRequestBody + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `profile_picture` | *T.nilable(::String)* | :heavy_minus_sign: | URL of the author's profile picture | +| `external_link` | *T.nilable(::String)* | :heavy_minus_sign: | URL of the author's external profile | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | Author name or identifier | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | Author email address | +| `company` | *T.nilable(::String)* | :heavy_minus_sign: | The author's company or organization | +| `metadata` | [T.nilable(Models::Operations::CreateAuthorMetadata)](../../models/operations/createauthormetadata.md) | :heavy_minus_sign: | Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process. | +| `first_seen` | *T.nilable(::Float)* | :heavy_minus_sign: | Timestamp when author first appeared | +| `last_seen` | *T.nilable(::Float)* | :heavy_minus_sign: | Timestamp of last activity | +| `manual_trust_level` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | +| `external_id` | *::String* | :heavy_check_mark: | External ID of the user, typically the ID of the author in your database. | \ No newline at end of file diff --git a/docs/models/operations/createwebhookrequest.md b/docs/models/operations/createwebhookrequest.md index d181df5a..86bcf8e6 100644 --- a/docs/models/operations/createwebhookrequest.md +++ b/docs/models/operations/createwebhookrequest.md @@ -3,9 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `name` | *::String* | :heavy_check_mark: | The webhook's name, used to identify it in the dashboard | -| `description` | *T.nilable(::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. | -| `event_types` | T::Array<[Models::Operations::CreateWebhookEventTypeRequest](../../models/operations/createwebhookeventtyperequest.md)> | :heavy_check_mark: | Event types this webhook subscribes to. One webhook URL receives all events you list here. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::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` | [Models::Operations::CreateWebhookRequestBody](../../models/operations/createwebhookrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createwebhookrequestbody.md b/docs/models/operations/createwebhookrequestbody.md new file mode 100644 index 00000000..fe6b55ba --- /dev/null +++ b/docs/models/operations/createwebhookrequestbody.md @@ -0,0 +1,11 @@ +# CreateWebhookRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `name` | *::String* | :heavy_check_mark: | The webhook's name, used to identify it in the dashboard | +| `description` | *T.nilable(::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. | +| `event_types` | T::Array<[Models::Operations::CreateWebhookEventTypeRequest](../../models/operations/createwebhookeventtyperequest.md)> | :heavy_check_mark: | Event types this webhook subscribes to. One webhook URL receives all events you list here. | \ No newline at end of file diff --git a/docs/models/operations/deleteactionrequest.md b/docs/models/operations/deleteactionrequest.md index a1776765..cd36c32c 100644 --- a/docs/models/operations/deleteactionrequest.md +++ b/docs/models/operations/deleteactionrequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the action to delete. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the action to delete. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/deleteauthorrequest.md b/docs/models/operations/deleteauthorrequest.md index be733074..8024e1be 100644 --- a/docs/models/operations/deleteauthorrequest.md +++ b/docs/models/operations/deleteauthorrequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/deletewebhookrequest.md b/docs/models/operations/deletewebhookrequest.md index 05d52974..93fd669e 100644 --- a/docs/models/operations/deletewebhookrequest.md +++ b/docs/models/operations/deletewebhookrequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to delete. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to delete. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/executeactionrequest.md b/docs/models/operations/executeactionrequest.md index e0eb3d4e..05327d01 100644 --- a/docs/models/operations/executeactionrequest.md +++ b/docs/models/operations/executeactionrequest.md @@ -1,15 +1,9 @@ # ExecuteActionRequest -Input parameters - ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `action_key` | *::String* | :heavy_check_mark: | ID or key of the action to execute | -| `content_ids` | T::Array<*::String*> | :heavy_minus_sign: | IDs of the content items to apply the action to. Provide this or authorIds. | -| `author_ids` | T::Array<*::String*> | :heavy_minus_sign: | IDs of the authors to apply the action to. Provide this or contentIds. | -| `value` | *T.nilable(::String)* | :heavy_minus_sign: | Optional value to provide with the action | -| `queue_id` | *T.nilable(::String)* | :heavy_minus_sign: | Optional queue ID if the action is queue-specific | -| `duration` | *T.nilable(::Float)* | :heavy_minus_sign: | Optional duration in milliseconds for actions with timeouts | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::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` | [Models::Operations::ExecuteActionRequestBody](../../models/operations/executeactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/executeactionrequestbody.md b/docs/models/operations/executeactionrequestbody.md new file mode 100644 index 00000000..65e454b6 --- /dev/null +++ b/docs/models/operations/executeactionrequestbody.md @@ -0,0 +1,15 @@ +# ExecuteActionRequestBody + +Input parameters + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `action_key` | *::String* | :heavy_check_mark: | ID or key of the action to execute | +| `content_ids` | T::Array<*::String*> | :heavy_minus_sign: | IDs of the content items to apply the action to. Provide this or authorIds. | +| `author_ids` | T::Array<*::String*> | :heavy_minus_sign: | IDs of the authors to apply the action to. Provide this or contentIds. | +| `value` | *T.nilable(::String)* | :heavy_minus_sign: | Optional value to provide with the action | +| `queue_id` | *T.nilable(::String)* | :heavy_minus_sign: | Optional queue ID if the action is queue-specific | +| `duration` | *T.nilable(::Float)* | :heavy_minus_sign: | Optional duration in milliseconds for actions with timeouts | \ No newline at end of file diff --git a/docs/models/operations/getaccountrequest.md b/docs/models/operations/getaccountrequest.md new file mode 100644 index 00000000..f4b1f2ce --- /dev/null +++ b/docs/models/operations/getaccountrequest.md @@ -0,0 +1,8 @@ +# GetAccountRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/getactionrequest.md b/docs/models/operations/getactionrequest.md index e53c84cc..7dfa98d5 100644 --- a/docs/models/operations/getactionrequest.md +++ b/docs/models/operations/getactionrequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the action to get. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the action to get. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/getauthorrequest.md b/docs/models/operations/getauthorrequest.md index 199b5096..b2cce0d5 100644 --- a/docs/models/operations/getauthorrequest.md +++ b/docs/models/operations/getauthorrequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/getqueuerequest.md b/docs/models/operations/getqueuerequest.md index 105139e9..884a218e 100644 --- a/docs/models/operations/getqueuerequest.md +++ b/docs/models/operations/getqueuerequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *::String* | :heavy_check_mark: | The queue ID | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/getqueuestatsrequest.md b/docs/models/operations/getqueuestatsrequest.md index 555ba738..a58dff4b 100644 --- a/docs/models/operations/getqueuestatsrequest.md +++ b/docs/models/operations/getqueuestatsrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `within_days` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID | +| `within_days` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/getwebhookrequest.md b/docs/models/operations/getwebhookrequest.md index 1aec7fdf..198cae65 100644 --- a/docs/models/operations/getwebhookrequest.md +++ b/docs/models/operations/getwebhookrequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to get. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to get. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/getwebhooksecretrequest.md b/docs/models/operations/getwebhooksecretrequest.md new file mode 100644 index 00000000..b226b3fb --- /dev/null +++ b/docs/models/operations/getwebhooksecretrequest.md @@ -0,0 +1,8 @@ +# GetWebhookSecretRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/getwordlistembeddingstatusrequest.md b/docs/models/operations/getwordlistembeddingstatusrequest.md index 51285567..d2a7c907 100644 --- a/docs/models/operations/getwordlistembeddingstatusrequest.md +++ b/docs/models/operations/getwordlistembeddingstatusrequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to check embedding status for | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to check embedding status for | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/getwordlistrequest.md b/docs/models/operations/getwordlistrequest.md index c88b8cb1..40b159dd 100644 --- a/docs/models/operations/getwordlistrequest.md +++ b/docs/models/operations/getwordlistrequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to get | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to get | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/listactionsrequest.md b/docs/models/operations/listactionsrequest.md index 7fa75047..9c1c1d50 100644 --- a/docs/models/operations/listactionsrequest.md +++ b/docs/models/operations/listactionsrequest.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `queue_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `queue_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/listauthorsrequest.md b/docs/models/operations/listauthorsrequest.md index 03bf087f..e2a6d580 100644 --- a/docs/models/operations/listauthorsrequest.md +++ b/docs/models/operations/listauthorsrequest.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `sort_by` | [T.nilable(Models::Operations::SortBy)](../../models/operations/sortby.md) | :heavy_minus_sign: | N/A | -| `sort_direction` | [T.nilable(Models::Operations::ListAuthorsSortDirection)](../../models/operations/listauthorssortdirection.md) | :heavy_minus_sign: | Sort direction | -| `member_since_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `last_active_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `content_types` | T::Array<*::String*> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `sort_by` | [T.nilable(Models::Operations::SortBy)](../../models/operations/sortby.md) | :heavy_minus_sign: | N/A | +| `sort_direction` | [T.nilable(Models::Operations::ListAuthorsSortDirection)](../../models/operations/listauthorssortdirection.md) | :heavy_minus_sign: | Sort direction | +| `member_since_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `last_active_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `content_types` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/listqueueitemsrequest.md b/docs/models/operations/listqueueitemsrequest.md index 6a3065ba..f4e1413b 100644 --- a/docs/models/operations/listqueueitemsrequest.md +++ b/docs/models/operations/listqueueitemsrequest.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `sort_field` | [T.nilable(Models::Operations::SortField)](../../models/operations/sortfield.md) | :heavy_minus_sign: | N/A | -| `sort_direction` | [T.nilable(Models::Operations::ListQueueItemsSortDirection)](../../models/operations/listqueueitemssortdirection.md) | :heavy_minus_sign: | Sort direction | -| `conversation_ids` | T::Array<*::String*> | :heavy_minus_sign: | N/A | -| `labels` | T::Array<*::String*> | :heavy_minus_sign: | N/A | -| `after_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `before_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `include_resolved` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | -| `author_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `filtered_action_ids` | T::Array<*::String*> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `sort_field` | [T.nilable(Models::Operations::SortField)](../../models/operations/sortfield.md) | :heavy_minus_sign: | N/A | +| `sort_direction` | [T.nilable(Models::Operations::ListQueueItemsSortDirection)](../../models/operations/listqueueitemssortdirection.md) | :heavy_minus_sign: | Sort direction | +| `conversation_ids` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `labels` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `after_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `before_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `include_resolved` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | +| `author_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `filtered_action_ids` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/listwebhooksrequest.md b/docs/models/operations/listwebhooksrequest.md index ad5b15c1..a36c3d42 100644 --- a/docs/models/operations/listwebhooksrequest.md +++ b/docs/models/operations/listwebhooksrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/listwordlistsrequest.md b/docs/models/operations/listwordlistsrequest.md index 63d39566..0ebdd2a0 100644 --- a/docs/models/operations/listwordlistsrequest.md +++ b/docs/models/operations/listwordlistsrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/removewordlistwordsrequest.md b/docs/models/operations/removewordlistwordsrequest.md index 556b9c89..409c03fd 100644 --- a/docs/models/operations/removewordlistwordsrequest.md +++ b/docs/models/operations/removewordlistwordsrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to remove words from | -| `words` | T::Array<*::String*> | :heavy_check_mark: | Array of words to remove from the wordlist | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to remove words from | +| `words` | T::Array<*::String*> | :heavy_check_mark: | Array of words to remove from the wordlist | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/operations/resolvequeueitemrequest.md b/docs/models/operations/resolvequeueitemrequest.md index abac39c2..c91d0aff 100644 --- a/docs/models/operations/resolvequeueitemrequest.md +++ b/docs/models/operations/resolvequeueitemrequest.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `item_id` | *::String* | :heavy_check_mark: | The item ID to resolve | -| `body` | [Models::Operations::ResolveQueueItemRequestBody](../../models/operations/resolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID | +| `item_id` | *::String* | :heavy_check_mark: | The item ID to resolve | +| `project_id` | *T.nilable(::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` | [Models::Operations::ResolveQueueItemRequestBody](../../models/operations/resolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/submitcontentrequest.md b/docs/models/operations/submitcontentrequest.md index d4bfeb49..b4a97672 100644 --- a/docs/models/operations/submitcontentrequest.md +++ b/docs/models/operations/submitcontentrequest.md @@ -3,16 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `content` | [T.any(Models::Operations::TextRequest, Models::Operations::ImageRequest, Models::Operations::VideoRequest, Models::Operations::AudioRequest, Models::Operations::Object)](../../models/operations/contentrequest.md) | :heavy_check_mark: | The content sent for moderation | -| `timestamp` | *T.nilable(::Float)* | :heavy_minus_sign: | Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. | -| `channel` | *T.nilable(::String)* | :heavy_minus_sign: | Provide a channel ID or key. Will use the project's default channel if not provided. | -| `content_id` | *T.nilable(::String)* | :heavy_minus_sign: | The unique ID of the content in your database. | -| `meta_type` | [T.nilable(Models::Operations::MetaType)](../../models/operations/metatype.md) | :heavy_minus_sign: | The meta type of content being moderated | -| `author_id` | *T.nilable(::String)* | :heavy_minus_sign: | The author of the content. | -| `conversation_id` | *T.nilable(::String)* | :heavy_minus_sign: | For example the ID of a chat room or a post | -| `metadata` | T::Hash[Symbol, *::Object*] | :heavy_minus_sign: | Any metadata you want to store with the content | -| `client_action` | [T.nilable(Models::Operations::ClientAction)](../../models/operations/clientaction.md) | :heavy_minus_sign: | A recommendation from your own client-side flagging (e.g. a banned-IP list or a third-party tool). Feeds the rules engine and can escalate or override the recommended action. Does not change whether our analysis flagged the content. | -| `do_not_store` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Do not store the content. The content won't enter the review queue | -| `policies` | T::Array<[T.any(Models::Operations::Toxicity, Models::Operations::PersonalInformation, Models::Operations::Hate, Models::Operations::Illicit, Models::Operations::IllicitDrugs, Models::Operations::IllicitAlcohol, Models::Operations::IllicitFirearms, Models::Operations::IllicitTobacco, Models::Operations::IllicitGambling, Models::Operations::Cannabis, Models::Operations::Adult, Models::Operations::Crypto, Models::Operations::Sexual, Models::Operations::SexualMinors, Models::Operations::Profanity, Models::Operations::Violence, Models::Operations::SelfHarm, Models::Operations::Spam, Models::Operations::LowQualityContent, Models::Operations::FaceDetection, Models::Operations::SelfPromotion, Models::Operations::Political, Models::Operations::Religion, Models::Operations::Threat, Models::Operations::SexualSolicitation, Models::Operations::ChannelCircumvention, Models::Operations::IllegalTrade, Models::Operations::Alcohol, Models::Operations::Drugs, Models::Operations::Gambling, Models::Operations::Tobacco, Models::Operations::Weapons, Models::Operations::Promotion, Models::Operations::Extremism, Models::Operations::CodeAbuse, Models::Operations::UnicodeSpoofing, Models::Operations::PIIMasking, Models::Operations::URLMasking, Models::Operations::URLRisk, Models::Operations::Guideline)](../../models/operations/policyrequest.md)> | :heavy_minus_sign: | (Enterprise) override the channel policies for this moderation request only. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::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` | [Models::Operations::SubmitContentRequestBody](../../models/operations/submitcontentrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/submitcontentrequestbody.md b/docs/models/operations/submitcontentrequestbody.md new file mode 100644 index 00000000..bb0ee6ed --- /dev/null +++ b/docs/models/operations/submitcontentrequestbody.md @@ -0,0 +1,18 @@ +# SubmitContentRequestBody + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content` | [T.any(Models::Operations::TextRequest, Models::Operations::ImageRequest, Models::Operations::VideoRequest, Models::Operations::AudioRequest, Models::Operations::Object)](../../models/operations/contentrequest.md) | :heavy_check_mark: | The content sent for moderation | +| `timestamp` | *T.nilable(::Float)* | :heavy_minus_sign: | Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. | +| `channel` | *T.nilable(::String)* | :heavy_minus_sign: | Provide a channel ID or key. Will use the project's default channel if not provided. | +| `content_id` | *T.nilable(::String)* | :heavy_minus_sign: | The unique ID of the content in your database. | +| `meta_type` | [T.nilable(Models::Operations::MetaType)](../../models/operations/metatype.md) | :heavy_minus_sign: | The meta type of content being moderated | +| `author_id` | *T.nilable(::String)* | :heavy_minus_sign: | The author of the content. | +| `conversation_id` | *T.nilable(::String)* | :heavy_minus_sign: | For example the ID of a chat room or a post | +| `metadata` | T::Hash[Symbol, *::Object*] | :heavy_minus_sign: | Any metadata you want to store with the content | +| `client_action` | [T.nilable(Models::Operations::ClientAction)](../../models/operations/clientaction.md) | :heavy_minus_sign: | A recommendation from your own client-side flagging (e.g. a banned-IP list or a third-party tool). Feeds the rules engine and can escalate or override the recommended action. Does not change whether our analysis flagged the content. | +| `do_not_store` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Do not store the content. The content won't enter the review queue | +| `policies` | T::Array<[T.any(Models::Operations::Toxicity, Models::Operations::PersonalInformation, Models::Operations::Hate, Models::Operations::Illicit, Models::Operations::IllicitDrugs, Models::Operations::IllicitAlcohol, Models::Operations::IllicitFirearms, Models::Operations::IllicitTobacco, Models::Operations::IllicitGambling, Models::Operations::Cannabis, Models::Operations::Adult, Models::Operations::Crypto, Models::Operations::Sexual, Models::Operations::SexualMinors, Models::Operations::Profanity, Models::Operations::Violence, Models::Operations::SelfHarm, Models::Operations::Spam, Models::Operations::LowQualityContent, Models::Operations::FaceDetection, Models::Operations::SelfPromotion, Models::Operations::Political, Models::Operations::Religion, Models::Operations::Threat, Models::Operations::SexualSolicitation, Models::Operations::ChannelCircumvention, Models::Operations::IllegalTrade, Models::Operations::Alcohol, Models::Operations::Drugs, Models::Operations::Gambling, Models::Operations::Tobacco, Models::Operations::Weapons, Models::Operations::Promotion, Models::Operations::Extremism, Models::Operations::CodeAbuse, Models::Operations::UnicodeSpoofing, Models::Operations::PIIMasking, Models::Operations::URLMasking, Models::Operations::URLRisk, Models::Operations::Guideline)](../../models/operations/policyrequest.md)> | :heavy_minus_sign: | (Enterprise) override the channel policies for this moderation request only. | \ No newline at end of file diff --git a/docs/models/operations/unresolvequeueitemrequest.md b/docs/models/operations/unresolvequeueitemrequest.md index 6d5810a3..c6f932a5 100644 --- a/docs/models/operations/unresolvequeueitemrequest.md +++ b/docs/models/operations/unresolvequeueitemrequest.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `item_id` | *::String* | :heavy_check_mark: | The item ID to unresolve | -| `body` | [Models::Operations::UnresolveQueueItemRequestBody](../../models/operations/unresolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID | +| `item_id` | *::String* | :heavy_check_mark: | The item ID to unresolve | +| `project_id` | *T.nilable(::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` | [Models::Operations::UnresolveQueueItemRequestBody](../../models/operations/unresolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateactionrequest.md b/docs/models/operations/updateactionrequest.md index e117c2eb..94449906 100644 --- a/docs/models/operations/updateactionrequest.md +++ b/docs/models/operations/updateactionrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the action to update. | -| `body` | [Models::Operations::UpdateActionRequestBody](../../models/operations/updateactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the action to update. | +| `project_id` | *T.nilable(::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` | [Models::Operations::UpdateActionRequestBody](../../models/operations/updateactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateauthorrequest.md b/docs/models/operations/updateauthorrequest.md index 6fbb0474..a197064b 100644 --- a/docs/models/operations/updateauthorrequest.md +++ b/docs/models/operations/updateauthorrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `body` | [Models::Operations::UpdateAuthorRequestBody](../../models/operations/updateauthorrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *T.nilable(::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` | [Models::Operations::UpdateAuthorRequestBody](../../models/operations/updateauthorrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatewebhookrequest.md b/docs/models/operations/updatewebhookrequest.md index 827ecff7..9d1e0c39 100644 --- a/docs/models/operations/updatewebhookrequest.md +++ b/docs/models/operations/updatewebhookrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to update. | -| `body` | [Models::Operations::UpdateWebhookRequestBody](../../models/operations/updatewebhookrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to update. | +| `project_id` | *T.nilable(::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` | [Models::Operations::UpdateWebhookRequestBody](../../models/operations/updatewebhookrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatewordlistrequest.md b/docs/models/operations/updatewordlistrequest.md index 05bb8a43..03be13ff 100644 --- a/docs/models/operations/updatewordlistrequest.md +++ b/docs/models/operations/updatewordlistrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to update | -| `body` | [Models::Operations::UpdateWordlistRequestBody](../../models/operations/updatewordlistrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to update | +| `project_id` | *T.nilable(::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` | [Models::Operations::UpdateWordlistRequestBody](../../models/operations/updatewordlistrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/account/README.md b/docs/sdks/account/README.md index c5237bc2..41a23828 100644 --- a/docs/sdks/account/README.md +++ b/docs/sdks/account/README.md @@ -28,6 +28,12 @@ end ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | + ### Response **[T.nilable(Models::Operations::GetAccountResponse)](../../models/operations/getaccountresponse.md)** diff --git a/docs/sdks/actions/README.md b/docs/sdks/actions/README.md index 6e86ed29..5ac1bb6a 100644 --- a/docs/sdks/actions/README.md +++ b/docs/sdks/actions/README.md @@ -35,11 +35,12 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `queue_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `queue_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -71,14 +72,12 @@ Models = ::ModerationApi::Models s = ::ModerationApi::ModerationApi.new( secret_key: '' ) - -req = Models::Operations::CreateActionRequest.new( +res = s.actions.create(body: Models::Operations::CreateActionRequestBody.new( key: 'suspend-24h', name: 'Suspend for 24 hours', type: Models::Operations::CreateActionTypeRequest::AUTHOR_BLOCK_TEMP, queue_behaviour: Models::Operations::CreateActionQueueBehaviourRequest::REMOVE -) -res = s.actions.create(request: req) +)) unless res.object.nil? # handle response @@ -88,9 +87,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `request` | [Models::Operations::CreateActionRequest](../../models/operations/createactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Models::Operations::CreateActionRequestBody](../../models/operations/createactionrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -130,9 +130,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the action to get. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the action to get. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -172,10 +173,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the action to update. | -| `body` | [Models::Operations::UpdateActionRequestBody](../../models/operations/updateactionrequestbody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the action to update. | +| `body` | [Models::Operations::UpdateActionRequestBody](../../models/operations/updateactionrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -216,9 +218,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the action to delete. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the action to delete. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -248,14 +251,12 @@ Models = ::ModerationApi::Models s = ::ModerationApi::ModerationApi.new( secret_key: '' ) - -req = Models::Operations::ExecuteActionRequest.new( +res = s.actions.execute(body: Models::Operations::ExecuteActionRequestBody.new( action_key: 'suspend-24h', author_ids: [ 'user-1092', ] -) -res = s.actions.execute(request: req) +)) unless res.object.nil? # handle response @@ -265,9 +266,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `request` | [Models::Operations::ExecuteActionRequest](../../models/operations/executeactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Models::Operations::ExecuteActionRequestBody](../../models/operations/executeactionrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/authors/README.md b/docs/sdks/authors/README.md index 1712fd18..50c90090 100644 --- a/docs/sdks/authors/README.md +++ b/docs/sdks/authors/README.md @@ -70,8 +70,7 @@ Models = ::ModerationApi::Models s = ::ModerationApi::ModerationApi.new( secret_key: '' ) - -req = Models::Operations::CreateAuthorRequest.new( +res = s.authors.create(body: Models::Operations::CreateAuthorRequestBody.new( name: 'Jamie Rivera', email: 'jamie@example.com', metadata: Models::Operations::CreateAuthorMetadata.new( @@ -79,8 +78,7 @@ req = Models::Operations::CreateAuthorRequest.new( is_paying_customer: false ), external_id: 'user-1092' -) -res = s.authors.create(request: req) +)) unless res.public_author.nil? # handle response @@ -90,9 +88,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `request` | [Models::Operations::CreateAuthorRequest](../../models/operations/createauthorrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Models::Operations::CreateAuthorRequestBody](../../models/operations/createauthorrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -133,9 +132,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -182,10 +182,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `body` | [Models::Operations::UpdateAuthorRequestBody](../../models/operations/updateauthorrequestbody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `body` | [Models::Operations::UpdateAuthorRequestBody](../../models/operations/updateauthorrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -227,9 +228,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/content/README.md b/docs/sdks/content/README.md index d5a368b3..e5c3426f 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 @@ -18,8 +20,7 @@ Models = ::ModerationApi::Models s = ::ModerationApi::ModerationApi.new( secret_key: '' ) - -req = Models::Operations::SubmitContentRequest.new( +res = s.content.submit(body: Models::Operations::SubmitContentRequestBody.new( content: Models::Operations::TextRequest.new( type: 'text', text: 'Hey, check out my profile for a deal!' @@ -30,8 +31,7 @@ req = Models::Operations::SubmitContentRequest.new( metadata: { 'platform' => 'ios', } -) -res = s.content.submit(request: req) +)) unless res.object.nil? # handle response @@ -41,9 +41,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `request` | [Models::Operations::SubmitContentRequest](../../models/operations/submitcontentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Models::Operations::SubmitContentRequestBody](../../models/operations/submitcontentrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/items/README.md b/docs/sdks/items/README.md index 8f054970..699084e3 100644 --- a/docs/sdks/items/README.md +++ b/docs/sdks/items/README.md @@ -82,11 +82,12 @@ end ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `item_id` | *::String* | :heavy_check_mark: | The item ID to resolve | -| `body` | [Models::Operations::ResolveQueueItemRequestBody](../../models/operations/resolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID | +| `item_id` | *::String* | :heavy_check_mark: | The item ID to resolve | +| `body` | [Models::Operations::ResolveQueueItemRequestBody](../../models/operations/resolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -129,11 +130,12 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `item_id` | *::String* | :heavy_check_mark: | The item ID to unresolve | -| `body` | [Models::Operations::UnresolveQueueItemRequestBody](../../models/operations/unresolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID | +| `item_id` | *::String* | :heavy_check_mark: | The item ID to unresolve | +| `body` | [Models::Operations::UnresolveQueueItemRequestBody](../../models/operations/unresolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/queue/README.md b/docs/sdks/queue/README.md index 16a04aab..1487478a 100644 --- a/docs/sdks/queue/README.md +++ b/docs/sdks/queue/README.md @@ -31,9 +31,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *::String* | :heavy_check_mark: | The queue ID | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -75,10 +76,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `within_days` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID | +| `within_days` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index e1f6561d..d12cc446 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -34,10 +34,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -65,16 +66,14 @@ Models = ::ModerationApi::Models s = ::ModerationApi::ModerationApi.new( secret_key: '' ) - -req = Models::Operations::CreateWebhookRequest.new( +res = s.webhooks.create(body: Models::Operations::CreateWebhookRequestBody.new( name: 'Moderation events', url: 'https://example.com/webhooks/moderation', event_types: [ Models::Operations::CreateWebhookEventTypeRequest::QUEUE_ITEM_REJECTED, Models::Operations::CreateWebhookEventTypeRequest::AUTHOR_BLOCKED, ] -) -res = s.webhooks.create(request: req) +)) unless res.object.nil? # handle response @@ -84,9 +83,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `request` | [Models::Operations::CreateWebhookRequest](../../models/operations/createwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Models::Operations::CreateWebhookRequestBody](../../models/operations/createwebhookrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -125,9 +125,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to get. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to get. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -166,10 +167,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to update. | -| `body` | [Models::Operations::UpdateWebhookRequestBody](../../models/operations/updatewebhookrequestbody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to update. | +| `body` | [Models::Operations::UpdateWebhookRequestBody](../../models/operations/updatewebhookrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -209,9 +211,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to delete. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to delete. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/webhooksecret/README.md b/docs/sdks/webhooksecret/README.md index 10c749a6..b2e91e4d 100644 --- a/docs/sdks/webhooksecret/README.md +++ b/docs/sdks/webhooksecret/README.md @@ -28,6 +28,12 @@ end ``` +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | + ### Response **[T.nilable(Models::Operations::GetWebhookSecretResponse)](../../models/operations/getwebhooksecretresponse.md)** diff --git a/docs/sdks/wordlist/README.md b/docs/sdks/wordlist/README.md index 3ab97d7e..3cddafef 100644 --- a/docs/sdks/wordlist/README.md +++ b/docs/sdks/wordlist/README.md @@ -33,10 +33,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -78,9 +79,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to get | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to get | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -122,10 +124,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to update | -| `body` | [Models::Operations::UpdateWordlistRequestBody](../../models/operations/updatewordlistrequestbody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to update | +| `body` | [Models::Operations::UpdateWordlistRequestBody](../../models/operations/updatewordlistrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -165,9 +168,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to check embedding status for | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to check embedding status for | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/docs/sdks/words/README.md b/docs/sdks/words/README.md index 05b9cd7b..de72ed67 100644 --- a/docs/sdks/words/README.md +++ b/docs/sdks/words/README.md @@ -36,10 +36,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to add words to | -| `body` | [Models::Operations::AddWordlistWordsRequestBody](../../models/operations/addwordlistwordsrequestbody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to add words to | +| `body` | [Models::Operations::AddWordlistWordsRequestBody](../../models/operations/addwordlistwordsrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response @@ -83,10 +84,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to remove words from | -| `words` | T::Array<*::String*> | :heavy_check_mark: | Array of words to remove from the wordlist | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to remove words from | +| `words` | T::Array<*::String*> | :heavy_check_mark: | Array of words to remove from the wordlist | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | ### Response diff --git a/lib/moderation_api/account.rb b/lib/moderation_api/account.rb index ed9163f4..337982c8 100644 --- a/lib/moderation_api/account.rb +++ b/lib/moderation_api/account.rb @@ -38,17 +38,23 @@ def get_url(base_url:, url_variables: nil) end sig { - params(timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns( - Models::Operations::GetAccountResponse + params( + project_id: T.nilable(::String), + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) + .returns(Models::Operations::GetAccountResponse) } - def retrieve(timeout_ms: nil, http_headers: nil) + def retrieve(project_id: nil, timeout_ms: nil, http_headers: nil) # retrieve - Get account details # Get account details + request = Models::Operations::GetAccountRequest.new( + project_id: project_id + ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/account" - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) headers["Accept"] = "application/json" headers["user-agent"] = @sdk_configuration.user_agent diff --git a/lib/moderation_api/actions.rb b/lib/moderation_api/actions.rb index 1f750836..8d260cd5 100644 --- a/lib/moderation_api/actions.rb +++ b/lib/moderation_api/actions.rb @@ -43,23 +43,25 @@ def get_url(base_url:, url_variables: nil) queue_id: T.nilable(::String), page: T.nilable(::Integer), page_size: T.nilable(::Integer), + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::ListActionsResponse) } - def list(queue_id: nil, page: nil, page_size: nil, timeout_ms: nil, http_headers: nil) + def list(queue_id: nil, page: nil, page_size: nil, project_id: nil, timeout_ms: nil, http_headers: nil) # list - List moderation actions # List the moderation actions of the project. The list is paginated. request = Models::Operations::ListActionsRequest.new( queue_id: queue_id, page: page, - page_size: page_size + page_size: page_size, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/actions" - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) query_params = Utils.get_query_params(Models::Operations::ListActionsRequest, request, nil) headers["Accept"] = "application/json" @@ -176,6 +178,7 @@ def list(queue_id: nil, page: nil, page_size: nil, timeout_ms: nil, http_headers queue_id: request.queue_id, page: next_page, page_size: request.page_size, + project_id: request.project_id, http_headers: http_headers ) end @@ -356,21 +359,26 @@ def list(queue_id: nil, page: nil, page_size: nil, timeout_ms: nil, http_headers sig { params( - request: Models::Operations::CreateActionRequest, + body: Models::Operations::CreateActionRequestBody, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::CreateActionResponse) } - def create(request:, timeout_ms: nil, http_headers: nil) + def create(body:, project_id: nil, timeout_ms: nil, http_headers: nil) # create - Create an action # Create an action. + request = Models::Operations::CreateActionRequest.new( + body: body, + project_id: project_id + ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/actions" - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) - req_content_type, data, form = Utils.serialize_request_body(request, false, false, :request, :json) + req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type raise StandardError, "request body is required" if data.nil? && form.nil? @@ -598,16 +606,18 @@ def create(request:, timeout_ms: nil, http_headers: nil) sig { params( id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::GetActionResponse) } - def retrieve(id:, timeout_ms: nil, http_headers: nil) + def retrieve(id:, project_id: nil, timeout_ms: nil, http_headers: nil) # retrieve - Get an action # Get an action by ID. request = Models::Operations::GetActionRequest.new( - id: id + id: id, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -617,7 +627,7 @@ def retrieve(id:, timeout_ms: nil, http_headers: nil) "/actions/{id}", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) headers["Accept"] = "application/json" headers["user-agent"] = @sdk_configuration.user_agent @@ -835,17 +845,19 @@ def retrieve(id:, timeout_ms: nil, http_headers: nil) params( body: Models::Operations::UpdateActionRequestBody, id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::UpdateActionResponse) } - def update(body:, id:, timeout_ms: nil, http_headers: nil) + def update(body:, id:, project_id: nil, timeout_ms: nil, http_headers: nil) # update - Update an action # Update an action. request = Models::Operations::UpdateActionRequest.new( id: id, - body: body + body: body, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -855,7 +867,7 @@ def update(body:, id:, timeout_ms: nil, http_headers: nil) "/actions/{id}", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type @@ -1107,16 +1119,18 @@ def update(body:, id:, timeout_ms: nil, http_headers: nil) sig { params( id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::DeleteActionResponse) } - def delete(id:, timeout_ms: nil, http_headers: nil) + def delete(id:, project_id: nil, timeout_ms: nil, http_headers: nil) # delete - Delete an action # Delete an action and all of its webhooks. request = Models::Operations::DeleteActionRequest.new( - id: id + id: id, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -1126,7 +1140,7 @@ def delete(id:, timeout_ms: nil, http_headers: nil) "/actions/{id}", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) headers["Accept"] = "application/json" headers["user-agent"] = @sdk_configuration.user_agent @@ -1342,21 +1356,26 @@ def delete(id:, timeout_ms: nil, http_headers: nil) sig { params( - request: Models::Operations::ExecuteActionRequest, + body: Models::Operations::ExecuteActionRequestBody, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::ExecuteActionResponse) } - def execute(request:, timeout_ms: nil, http_headers: nil) + def execute(body:, project_id: nil, timeout_ms: nil, http_headers: nil) # execute - Execute moderation action # Execute a moderation action on one or more content items. + request = Models::Operations::ExecuteActionRequest.new( + body: body, + project_id: project_id + ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/actions/execute" - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) - req_content_type, data, form = Utils.serialize_request_body(request, false, false, :request, :json) + req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type raise StandardError, "request body is required" if data.nil? && form.nil? diff --git a/lib/moderation_api/authors.rb b/lib/moderation_api/authors.rb index 73eb5e8c..360eee7d 100644 --- a/lib/moderation_api/authors.rb +++ b/lib/moderation_api/authors.rb @@ -52,7 +52,7 @@ def list(request:, timeout_ms: nil, http_headers: nil) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/authors" - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) query_params = Utils.get_query_params(Models::Operations::ListAuthorsRequest, request, nil) headers["Accept"] = "application/json" @@ -173,7 +173,8 @@ def list(request:, timeout_ms: nil, http_headers: nil) sort_direction: request.sort_direction, member_since_date: request.member_since_date, last_active_date: request.last_active_date, - content_types: request.content_types + content_types: request.content_types, + project_id: request.project_id ), http_headers: http_headers ) @@ -355,21 +356,26 @@ def list(request:, timeout_ms: nil, http_headers: nil) sig { params( - request: Models::Operations::CreateAuthorRequest, + body: Models::Operations::CreateAuthorRequestBody, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::CreateAuthorResponse) } - def create(request:, timeout_ms: nil, http_headers: nil) + def create(body:, project_id: nil, timeout_ms: nil, http_headers: nil) # create - Create a new author # Create a new author. Typically not needed as authors are created automatically when content is moderated. + request = Models::Operations::CreateAuthorRequest.new( + body: body, + project_id: project_id + ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/authors" - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) - req_content_type, data, form = Utils.serialize_request_body(request, false, false, :request, :json) + req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type raise StandardError, "request body is required" if data.nil? && form.nil? @@ -619,16 +625,18 @@ def create(request:, timeout_ms: nil, http_headers: nil) sig { params( id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::GetAuthorResponse) } - def retrieve(id:, timeout_ms: nil, http_headers: nil) + def retrieve(id:, project_id: nil, timeout_ms: nil, http_headers: nil) # retrieve - Get author details # Get detailed information about a specific author including historical data and analysis request = Models::Operations::GetAuthorRequest.new( - id: id + id: id, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -638,7 +646,7 @@ def retrieve(id:, timeout_ms: nil, http_headers: nil) "/authors/{id}", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) headers["Accept"] = "application/json" headers["user-agent"] = @sdk_configuration.user_agent @@ -900,17 +908,19 @@ def retrieve(id:, timeout_ms: nil, http_headers: nil) params( body: Models::Operations::UpdateAuthorRequestBody, id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::UpdateAuthorResponse) } - def update(body:, id:, timeout_ms: nil, http_headers: nil) + def update(body:, id:, project_id: nil, timeout_ms: nil, http_headers: nil) # update - Update author details # Update the details of a specific author request = Models::Operations::UpdateAuthorRequest.new( id: id, - body: body + body: body, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -920,7 +930,7 @@ def update(body:, id:, timeout_ms: nil, http_headers: nil) "/authors/{id}", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type @@ -1194,16 +1204,18 @@ def update(body:, id:, timeout_ms: nil, http_headers: nil) sig { params( id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::DeleteAuthorResponse) } - def delete(id:, timeout_ms: nil, http_headers: nil) + def delete(id:, project_id: nil, timeout_ms: nil, http_headers: nil) # delete - Delete an author # 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. request = Models::Operations::DeleteAuthorRequest.new( - id: id + id: id, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -1213,7 +1225,7 @@ def delete(id:, timeout_ms: nil, http_headers: nil) "/authors/{id}", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) headers["Accept"] = "application/json" headers["user-agent"] = @sdk_configuration.user_agent diff --git a/lib/moderation_api/content.rb b/lib/moderation_api/content.rb index 66e1c5da..31999acc 100644 --- a/lib/moderation_api/content.rb +++ b/lib/moderation_api/content.rb @@ -39,20 +39,25 @@ def get_url(base_url:, url_variables: nil) sig { params( - request: Models::Operations::SubmitContentRequest, + body: Models::Operations::SubmitContentRequestBody, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::SubmitContentResponse) } - def submit(request:, timeout_ms: nil, http_headers: nil) - + def submit(body:, project_id: nil, timeout_ms: nil, http_headers: nil) + # submit - Submit content + request = Models::Operations::SubmitContentRequest.new( + body: body, + project_id: project_id + ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/moderate" - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) - req_content_type, data, form = Utils.serialize_request_body(request, false, false, :request, :json) + req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type raise StandardError, "request body is required" if data.nil? && form.nil? diff --git a/lib/moderation_api/items.rb b/lib/moderation_api/items.rb index c7f440f2..e1cfdfbc 100644 --- a/lib/moderation_api/items.rb +++ b/lib/moderation_api/items.rb @@ -57,7 +57,7 @@ def list(request:, timeout_ms: nil, http_headers: nil) "/queue/{id}/items", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) query_params = Utils.get_query_params(Models::Operations::ListQueueItemsRequest, request, nil) headers["Accept"] = "application/json" @@ -183,7 +183,8 @@ def list(request:, timeout_ms: nil, http_headers: nil) before_date: request.before_date, include_resolved: request.include_resolved, author_id: request.author_id, - filtered_action_ids: request.filtered_action_ids + filtered_action_ids: request.filtered_action_ids, + project_id: request.project_id ), http_headers: http_headers ) @@ -368,18 +369,20 @@ def list(request:, timeout_ms: nil, http_headers: nil) body: Models::Operations::ResolveQueueItemRequestBody, id: ::String, item_id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::ResolveQueueItemResponse) } - def resolve(body:, id:, item_id:, timeout_ms: nil, http_headers: nil) + def resolve(body:, id:, item_id:, project_id: nil, timeout_ms: nil, http_headers: nil) # resolve - Resolve a queue item # Mark a queue item as resolved with a specific moderation action request = Models::Operations::ResolveQueueItemRequest.new( id: id, item_id: item_id, - body: body + body: body, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -389,7 +392,7 @@ def resolve(body:, id:, item_id:, timeout_ms: nil, http_headers: nil) "/queue/{id}/items/{itemId}/resolve", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type @@ -643,18 +646,20 @@ def resolve(body:, id:, item_id:, timeout_ms: nil, http_headers: nil) body: Models::Operations::UnresolveQueueItemRequestBody, id: ::String, item_id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::UnresolveQueueItemResponse) } - def unresolve(body:, id:, item_id:, timeout_ms: nil, http_headers: nil) + def unresolve(body:, id:, item_id:, project_id: nil, timeout_ms: nil, http_headers: nil) # unresolve - Unresolve a queue item # Mark a previously resolved queue item as unresolved/pending request = Models::Operations::UnresolveQueueItemRequest.new( id: id, item_id: item_id, - body: body + body: body, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -664,7 +669,7 @@ def unresolve(body:, id:, item_id:, timeout_ms: nil, http_headers: nil) "/queue/{id}/items/{itemId}/unresolve", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type diff --git a/lib/moderation_api/models/components/badrequesterror_code.rb b/lib/moderation_api/models/components/badrequesterror_code.rb index 93645a2b..0f3de809 100644 --- a/lib/moderation_api/models/components/badrequesterror_code.rb +++ b/lib/moderation_api/models/components/badrequesterror_code.rb @@ -9,11 +9,13 @@ module Components # BadRequestErrorCode - 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`. class BadRequestErrorCode include ::Crystalline::Enum enums do INVALID_REQUEST = new("invalid_request") + PROJECT_ID_REQUIRED = new("project_id_required") VALIDATION_FAILED = new("validation_failed") end diff --git a/lib/moderation_api/models/components/permissiondeniederror_code.rb b/lib/moderation_api/models/components/permissiondeniederror_code.rb index 5c2bc42b..a458db8e 100644 --- a/lib/moderation_api/models/components/permissiondeniederror_code.rb +++ b/lib/moderation_api/models/components/permissiondeniederror_code.rb @@ -13,7 +13,6 @@ module Components # - `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,7 +24,6 @@ class PermissionDeniedErrorCode QUOTA_EXCEEDED = new("quota_exceeded") PLAN_FEATURE_UNAVAILABLE = new("plan_feature_unavailable") PLAN_LIMIT_EXCEEDED = new("plan_limit_exceeded") - PROJECT_KEY_REQUIRED = new("project_key_required") ORGANIZATION_KEY_REQUIRED = new("organization_key_required") MISSING_KEY_PERMISSION = new("missing_key_permission") PROJECT_NOT_REACHABLE = new("project_not_reachable") diff --git a/lib/moderation_api/models/errors/badrequesterror.rb b/lib/moderation_api/models/errors/badrequesterror.rb index dcba2196..8011158b 100644 --- a/lib/moderation_api/models/errors/badrequesterror.rb +++ b/lib/moderation_api/models/errors/badrequesterror.rb @@ -14,6 +14,7 @@ class BadRequestError < StandardError # 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`. field( :code, diff --git a/lib/moderation_api/models/errors/permissiondeniederror.rb b/lib/moderation_api/models/errors/permissiondeniederror.rb index 61e1a26e..ea7218b7 100644 --- a/lib/moderation_api/models/errors/permissiondeniederror.rb +++ b/lib/moderation_api/models/errors/permissiondeniederror.rb @@ -18,7 +18,6 @@ class PermissionDeniedError < StandardError # - `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/lib/moderation_api/models/operations.rb b/lib/moderation_api/models/operations.rb index 280b8126..0e733276 100644 --- a/lib/moderation_api/models/operations.rb +++ b/lib/moderation_api/models/operations.rb @@ -84,6 +84,7 @@ module Operations autoload :Comparator, "moderation_api/models/operations/comparator.rb" autoload :ContentRequest, "moderation_api/models/operations/content_request.rb" autoload :ContentResponse, "moderation_api/models/operations/content_response.rb" + autoload :CreateActionRequestBody, "moderation_api/models/operations/createaction_requestbody.rb" autoload :CreateActionResponseBody, "moderation_api/models/operations/createaction_responsebody.rb" autoload :CreateActionPositionRequest, "moderation_api/models/operations/createaction_position_request.rb" autoload :CreateActionPositionResponse, "moderation_api/models/operations/createaction_position_response.rb" @@ -107,6 +108,7 @@ module Operations autoload :CreateActionResponse, "moderation_api/models/operations/createaction_response.rb" autoload :CreateActionTypeRequest, "moderation_api/models/operations/createaction_type_request.rb" autoload :CreateActionTypeResponse, "moderation_api/models/operations/createaction_type_response.rb" + autoload :CreateAuthorRequestBody, "moderation_api/models/operations/createauthor_requestbody.rb" autoload :CreateAuthorMetadata, "moderation_api/models/operations/createauthor_metadata.rb" autoload :CreateAuthorRequest, "moderation_api/models/operations/createauthor_request.rb" autoload :CreateAuthorResponse, "moderation_api/models/operations/createauthor_response.rb" @@ -116,6 +118,7 @@ module Operations autoload :CreateChannelResponse, "moderation_api/models/operations/createchannel_response.rb" autoload :CreateProjectRequest, "moderation_api/models/operations/createproject_request.rb" autoload :CreateProjectResponse, "moderation_api/models/operations/createproject_response.rb" + autoload :CreateWebhookRequestBody, "moderation_api/models/operations/createwebhook_requestbody.rb" autoload :CreateWebhookResponseBody, "moderation_api/models/operations/createwebhook_responsebody.rb" autoload :CreateWebhookEventTypeRequest, "moderation_api/models/operations/createwebhook_eventtype_request.rb" autoload :CreateWebhookEventTypeResponse, "moderation_api/models/operations/createwebhook_eventtype_response.rb" @@ -153,6 +156,7 @@ module Operations autoload :Entities2, "moderation_api/models/operations/entities_2.rb" autoload :Error, "moderation_api/models/operations/error.rb" autoload :Evaluation, "moderation_api/models/operations/evaluation.rb" + autoload :ExecuteActionRequestBody, "moderation_api/models/operations/executeaction_requestbody.rb" autoload :ExecuteActionResponseBody, "moderation_api/models/operations/executeaction_responsebody.rb" autoload :ExecuteActionRequest, "moderation_api/models/operations/executeaction_request.rb" autoload :ExecuteActionResponse, "moderation_api/models/operations/executeaction_response.rb" @@ -161,6 +165,7 @@ module Operations autoload :FlaggedContentTrend, "moderation_api/models/operations/flaggedcontenttrend.rb" autoload :FlaggingMode, "moderation_api/models/operations/flaggingmode.rb" autoload :GetAccountResponseBody, "moderation_api/models/operations/getaccount_responsebody.rb" + autoload :GetAccountRequest, "moderation_api/models/operations/getaccount_request.rb" autoload :GetAccountResponse, "moderation_api/models/operations/getaccount_response.rb" autoload :GetActionResponseBody, "moderation_api/models/operations/getaction_responsebody.rb" autoload :GetActionPosition, "moderation_api/models/operations/getaction_position.rb" @@ -185,6 +190,7 @@ module Operations autoload :GetQueueResponse, "moderation_api/models/operations/getqueue_response.rb" autoload :GetQueueType, "moderation_api/models/operations/getqueue_type.rb" autoload :GetWebhookSecretResponseBody, "moderation_api/models/operations/getwebhooksecret_responsebody.rb" + autoload :GetWebhookSecretRequest, "moderation_api/models/operations/getwebhooksecret_request.rb" autoload :GetWebhookSecretResponse, "moderation_api/models/operations/getwebhooksecret_response.rb" autoload :GetWebhookResponseBody, "moderation_api/models/operations/getwebhook_responsebody.rb" autoload :GetWebhookEventType, "moderation_api/models/operations/getwebhook_eventtype.rb" @@ -273,6 +279,7 @@ module Operations autoload :SignalsResponse, "moderation_api/models/operations/signals_response.rb" autoload :SortBy, "moderation_api/models/operations/sortby.rb" autoload :SortField, "moderation_api/models/operations/sortfield.rb" + autoload :SubmitContentRequestBody, "moderation_api/models/operations/submitcontent_requestbody.rb" autoload :SubmitContentResponseBody, "moderation_api/models/operations/submitcontent_responsebody.rb" autoload :SubmitContentLabel, "moderation_api/models/operations/submitcontent_label.rb" autoload( diff --git a/lib/moderation_api/models/operations/addwordlistwords_request.rb b/lib/moderation_api/models/operations/addwordlistwords_request.rb index a8a3bf98..7b8fc312 100644 --- a/lib/moderation_api/models/operations/addwordlistwords_request.rb +++ b/lib/moderation_api/models/operations/addwordlistwords_request.rb @@ -15,11 +15,21 @@ class AddWordlistWordsRequest field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} field :body, Models::Operations::AddWordlistWordsRequestBody, {'request': {'media_type': "application/json"}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String, body: Models::Operations::AddWordlistWordsRequestBody).void } - def initialize(id:, body:) + sig { + params(id: ::String, body: Models::Operations::AddWordlistWordsRequestBody, project_id: T.nilable(::String)) + .void + } + def initialize(id:, body:, project_id: nil) @id = id @body = body + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } @@ -27,6 +37,7 @@ def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id return false unless @body == other.body + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/addwordlistwords_request.rbi b/lib/moderation_api/models/operations/addwordlistwords_request.rbi index 5c4585ed..af6100af 100644 --- a/lib/moderation_api/models/operations/addwordlistwords_request.rbi +++ b/lib/moderation_api/models/operations/addwordlistwords_request.rbi @@ -17,4 +17,10 @@ class ModerationApi::Models::Operations::AddWordlistWordsRequest def body=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/createaction_request.rb b/lib/moderation_api/models/operations/createaction_request.rb index d173dcea..acd6aef0 100644 --- a/lib/moderation_api/models/operations/createaction_request.rb +++ b/lib/moderation_api/models/operations/createaction_request.rb @@ -11,147 +11,25 @@ class CreateActionRequest extend T::Sig include Crystalline::MetadataFields - # The name of the action. + field :body, Models::Operations::CreateActionRequestBody, {'request': {'media_type': "application/json"}} + # 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. field( - :name, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} - ) - # The IDs of the queues the action is available in. - field( - :filter_in_queue_ids, - Crystalline::Nilable.new(Crystalline::Array.new(::String)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("filterInQueueIds")}} - ) - # The possible values of the action. The user will be prompted to select one of these values when executing the action. - field( - :possible_values, - Crystalline::Nilable.new(Crystalline::Array.new(Models::Operations::CreateActionPossibleValueRequest)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("possibleValues")}} - ) - # User defined key of the action. - field( - :key, + :project_id, Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("key")}} - ) - # The description of the action. - field( - :description, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description")}} - ) - # The type of the action. - field( - :type, - Crystalline::Nilable.new(Models::Operations::CreateActionTypeRequest), - { - 'format_json': { - 'letter_case': ::ModerationApi::Utils.field_name("type"), - 'decoder': ::ModerationApi::Utils.enum_from_string(Models::Operations::CreateActionTypeRequest, true) - } - } - ) - # Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status. - field( - :queue_behaviour, - Crystalline::Nilable.new(Models::Operations::CreateActionQueueBehaviourRequest), - { - 'format_json': { - 'letter_case': ::ModerationApi::Utils.field_name("queueBehaviour"), - 'decoder': ::ModerationApi::Utils.enum_from_string( - Models::Operations::CreateActionQueueBehaviourRequest, - true - ) - } - } - ) - # Show the action in all queues, selected queues or no queues (to use via API only). - field( - :position, - Crystalline::Nilable.new(Models::Operations::CreateActionPositionRequest), - { - 'format_json': { - 'letter_case': ::ModerationApi::Utils.field_name("position"), - 'decoder': ::ModerationApi::Utils.enum_from_string(Models::Operations::CreateActionPositionRequest, true) - } - } - ) - # Whether the action requires a value to be executed. - field( - :value_required, - Crystalline::Nilable.new(Crystalline::Boolean.new), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("valueRequired")}} - ) - # Whether the action allows any text to be entered as a value or if it must be one of the possible values. - field( - :free_text, - Crystalline::Nilable.new(Crystalline::Boolean.new), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("freeText")}} - ) - # Whether the action is a built-in action or a custom one. - field( - :built_in, - Crystalline::Nilable.new(Crystalline::Boolean.new), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("builtIn")}} + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} ) - sig { - params( - name: ::String, - filter_in_queue_ids: T.nilable(T::Array[::String]), - possible_values: T.nilable(T::Array[Models::Operations::CreateActionPossibleValueRequest]), - key: T.nilable(::String), - description: T.nilable(::String), - type: T.nilable(Models::Operations::CreateActionTypeRequest), - queue_behaviour: T.nilable(Models::Operations::CreateActionQueueBehaviourRequest), - position: T.nilable(Models::Operations::CreateActionPositionRequest), - value_required: T.nilable(T::Boolean), - free_text: T.nilable(T::Boolean), - built_in: T.nilable(T::Boolean) - ) - .void - } - def initialize( - name:, - filter_in_queue_ids: nil, - possible_values: nil, - key: nil, - description: nil, - type: nil, - queue_behaviour: Models::Operations::CreateActionQueueBehaviourRequest::NO_CHANGE, - position: Models::Operations::CreateActionPositionRequest::ALL_QUEUES, - value_required: false, - free_text: false, - built_in: false - ) - @name = name - @filter_in_queue_ids = filter_in_queue_ids - @possible_values = possible_values - @key = key - @description = description - @type = type - @queue_behaviour = queue_behaviour - @position = position - @value_required = value_required - @free_text = free_text - @built_in = built_in + sig { params(body: Models::Operations::CreateActionRequestBody, project_id: T.nilable(::String)).void } + def initialize(body:, project_id: nil) + @body = body + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) - return false unless @name == other.name - return false unless @filter_in_queue_ids == other.filter_in_queue_ids - return false unless @possible_values == other.possible_values - return false unless @key == other.key - return false unless @description == other.description - return false unless @type == other.type - return false unless @queue_behaviour == other.queue_behaviour - return false unless @position == other.position - return false unless @value_required == other.value_required - return false unless @free_text == other.free_text - return false unless @built_in == other.built_in + return false unless @body == other.body + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/createaction_request.rbi b/lib/moderation_api/models/operations/createaction_request.rbi index 1d947d60..f3c96950 100644 --- a/lib/moderation_api/models/operations/createaction_request.rbi +++ b/lib/moderation_api/models/operations/createaction_request.rbi @@ -6,69 +6,15 @@ class ModerationApi::Models::Operations::CreateActionRequest end class ModerationApi::Models::Operations::CreateActionRequest - def name + def body end - def name=(str_) + def body=(str_) end - def filter_in_queue_ids + def project_id end - def filter_in_queue_ids=(str_) - end - - def possible_values - end - - def possible_values=(str_) - end - - def key - end - - def key=(str_) - end - - def description - end - - def description=(str_) - end - - def type - end - - def type=(str_) - end - - def queue_behaviour - end - - def queue_behaviour=(str_) - end - - def position - end - - def position=(str_) - end - - def value_required - end - - def value_required=(str_) - end - - def free_text - end - - def free_text=(str_) - end - - def built_in - end - - def built_in=(str_) + def project_id=(str_) end end diff --git a/lib/moderation_api/models/operations/createaction_requestbody.rb b/lib/moderation_api/models/operations/createaction_requestbody.rb new file mode 100644 index 00000000..60bd6d07 --- /dev/null +++ b/lib/moderation_api/models/operations/createaction_requestbody.rb @@ -0,0 +1,160 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class CreateActionRequestBody + extend T::Sig + include Crystalline::MetadataFields + + # The name of the action. + field( + :name, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} + ) + # The IDs of the queues the action is available in. + field( + :filter_in_queue_ids, + Crystalline::Nilable.new(Crystalline::Array.new(::String)), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("filterInQueueIds")}} + ) + # The possible values of the action. The user will be prompted to select one of these values when executing the action. + field( + :possible_values, + Crystalline::Nilable.new(Crystalline::Array.new(Models::Operations::CreateActionPossibleValueRequest)), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("possibleValues")}} + ) + # User defined key of the action. + field( + :key, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("key")}} + ) + # The description of the action. + field( + :description, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description")}} + ) + # The type of the action. + field( + :type, + Crystalline::Nilable.new(Models::Operations::CreateActionTypeRequest), + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("type"), + 'decoder': ::ModerationApi::Utils.enum_from_string(Models::Operations::CreateActionTypeRequest, true) + } + } + ) + # Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status. + field( + :queue_behaviour, + Crystalline::Nilable.new(Models::Operations::CreateActionQueueBehaviourRequest), + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("queueBehaviour"), + 'decoder': ::ModerationApi::Utils.enum_from_string( + Models::Operations::CreateActionQueueBehaviourRequest, + true + ) + } + } + ) + # Show the action in all queues, selected queues or no queues (to use via API only). + field( + :position, + Crystalline::Nilable.new(Models::Operations::CreateActionPositionRequest), + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("position"), + 'decoder': ::ModerationApi::Utils.enum_from_string(Models::Operations::CreateActionPositionRequest, true) + } + } + ) + # Whether the action requires a value to be executed. + field( + :value_required, + Crystalline::Nilable.new(Crystalline::Boolean.new), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("valueRequired")}} + ) + # Whether the action allows any text to be entered as a value or if it must be one of the possible values. + field( + :free_text, + Crystalline::Nilable.new(Crystalline::Boolean.new), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("freeText")}} + ) + # Whether the action is a built-in action or a custom one. + field( + :built_in, + Crystalline::Nilable.new(Crystalline::Boolean.new), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("builtIn")}} + ) + + sig { + params( + name: ::String, + filter_in_queue_ids: T.nilable(T::Array[::String]), + possible_values: T.nilable(T::Array[Models::Operations::CreateActionPossibleValueRequest]), + key: T.nilable(::String), + description: T.nilable(::String), + type: T.nilable(Models::Operations::CreateActionTypeRequest), + queue_behaviour: T.nilable(Models::Operations::CreateActionQueueBehaviourRequest), + position: T.nilable(Models::Operations::CreateActionPositionRequest), + value_required: T.nilable(T::Boolean), + free_text: T.nilable(T::Boolean), + built_in: T.nilable(T::Boolean) + ) + .void + } + def initialize( + name:, + filter_in_queue_ids: nil, + possible_values: nil, + key: nil, + description: nil, + type: nil, + queue_behaviour: Models::Operations::CreateActionQueueBehaviourRequest::NO_CHANGE, + position: Models::Operations::CreateActionPositionRequest::ALL_QUEUES, + value_required: false, + free_text: false, + built_in: false + ) + @name = name + @filter_in_queue_ids = filter_in_queue_ids + @possible_values = possible_values + @key = key + @description = description + @type = type + @queue_behaviour = queue_behaviour + @position = position + @value_required = value_required + @free_text = free_text + @built_in = built_in + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @name == other.name + return false unless @filter_in_queue_ids == other.filter_in_queue_ids + return false unless @possible_values == other.possible_values + return false unless @key == other.key + return false unless @description == other.description + return false unless @type == other.type + return false unless @queue_behaviour == other.queue_behaviour + return false unless @position == other.position + return false unless @value_required == other.value_required + return false unless @free_text == other.free_text + return false unless @built_in == other.built_in + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createaction_requestbody.rbi b/lib/moderation_api/models/operations/createaction_requestbody.rbi new file mode 100644 index 00000000..45bbfc64 --- /dev/null +++ b/lib/moderation_api/models/operations/createaction_requestbody.rbi @@ -0,0 +1,74 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateActionRequestBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateActionRequestBody + def name + end + + def name=(str_) + end + + def filter_in_queue_ids + end + + def filter_in_queue_ids=(str_) + end + + def possible_values + end + + def possible_values=(str_) + end + + def key + end + + def key=(str_) + end + + def description + end + + def description=(str_) + end + + def type + end + + def type=(str_) + end + + def queue_behaviour + end + + def queue_behaviour=(str_) + end + + def position + end + + def position=(str_) + end + + def value_required + end + + def value_required=(str_) + end + + def free_text + end + + def free_text=(str_) + end + + def built_in + end + + def built_in=(str_) + end +end diff --git a/lib/moderation_api/models/operations/createauthor_request.rb b/lib/moderation_api/models/operations/createauthor_request.rb index 88d701e0..8e8fdca3 100644 --- a/lib/moderation_api/models/operations/createauthor_request.rb +++ b/lib/moderation_api/models/operations/createauthor_request.rb @@ -11,119 +11,25 @@ class CreateAuthorRequest extend T::Sig include Crystalline::MetadataFields - # External ID of the user, typically the ID of the author in your database. + field :body, Models::Operations::CreateAuthorRequestBody, {'request': {'media_type': "application/json"}} + # 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. field( - :external_id, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("external_id"), required: true}} - ) - # Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process. - field( - :metadata, - Crystalline::Nilable.new(Models::Operations::CreateAuthorMetadata), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("metadata")}} - ) - # Timestamp when author first appeared - field( - :first_seen, - Crystalline::Nilable.new(::Float), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("first_seen")}} - ) - # Timestamp of last activity - field( - :last_seen, - Crystalline::Nilable.new(::Float), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("last_seen")}} - ) - # URL of the author's profile picture - field( - :profile_picture, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("profile_picture")}} - ) - # URL of the author's external profile - field( - :external_link, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("external_link")}} - ) - # Author name or identifier - field( - :name, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name")}} - ) - # Author email address - field( - :email, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("email")}} - ) - # The author's company or organization - field( - :company, + :project_id, Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("company")}} - ) - - field( - :manual_trust_level, - Crystalline::Nilable.new(::Float), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("manual_trust_level")}} + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} ) - sig { - params( - external_id: ::String, - metadata: T.nilable(Models::Operations::CreateAuthorMetadata), - first_seen: T.nilable(::Float), - last_seen: T.nilable(::Float), - profile_picture: T.nilable(::String), - external_link: T.nilable(::String), - name: T.nilable(::String), - email: T.nilable(::String), - company: T.nilable(::String), - manual_trust_level: T.nilable(::Float) - ) - .void - } - def initialize( - external_id:, - metadata: nil, - first_seen: nil, - last_seen: nil, - profile_picture: nil, - external_link: nil, - name: nil, - email: nil, - company: nil, - manual_trust_level: nil - ) - @external_id = external_id - @metadata = metadata - @first_seen = first_seen - @last_seen = last_seen - @profile_picture = profile_picture - @external_link = external_link - @name = name - @email = email - @company = company - @manual_trust_level = manual_trust_level + sig { params(body: Models::Operations::CreateAuthorRequestBody, project_id: T.nilable(::String)).void } + def initialize(body:, project_id: nil) + @body = body + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) - return false unless @external_id == other.external_id - return false unless @metadata == other.metadata - return false unless @first_seen == other.first_seen - return false unless @last_seen == other.last_seen - return false unless @profile_picture == other.profile_picture - return false unless @external_link == other.external_link - return false unless @name == other.name - return false unless @email == other.email - return false unless @company == other.company - return false unless @manual_trust_level == other.manual_trust_level + return false unless @body == other.body + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/createauthor_request.rbi b/lib/moderation_api/models/operations/createauthor_request.rbi index 79c82c1f..4c935ba7 100644 --- a/lib/moderation_api/models/operations/createauthor_request.rbi +++ b/lib/moderation_api/models/operations/createauthor_request.rbi @@ -6,63 +6,15 @@ class ModerationApi::Models::Operations::CreateAuthorRequest end class ModerationApi::Models::Operations::CreateAuthorRequest - def external_id + def body end - def external_id=(str_) + def body=(str_) end - def metadata + def project_id end - def metadata=(str_) - end - - def first_seen - end - - def first_seen=(str_) - end - - def last_seen - end - - def last_seen=(str_) - end - - def profile_picture - end - - def profile_picture=(str_) - end - - def external_link - end - - def external_link=(str_) - end - - def name - end - - def name=(str_) - end - - def email - end - - def email=(str_) - end - - def company - end - - def company=(str_) - end - - def manual_trust_level - end - - def manual_trust_level=(str_) + def project_id=(str_) end end diff --git a/lib/moderation_api/models/operations/createauthor_requestbody.rb b/lib/moderation_api/models/operations/createauthor_requestbody.rb new file mode 100644 index 00000000..704114fe --- /dev/null +++ b/lib/moderation_api/models/operations/createauthor_requestbody.rb @@ -0,0 +1,132 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class CreateAuthorRequestBody + extend T::Sig + include Crystalline::MetadataFields + + # External ID of the user, typically the ID of the author in your database. + field( + :external_id, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("external_id"), required: true}} + ) + # Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process. + field( + :metadata, + Crystalline::Nilable.new(Models::Operations::CreateAuthorMetadata), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("metadata")}} + ) + # Timestamp when author first appeared + field( + :first_seen, + Crystalline::Nilable.new(::Float), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("first_seen")}} + ) + # Timestamp of last activity + field( + :last_seen, + Crystalline::Nilable.new(::Float), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("last_seen")}} + ) + # URL of the author's profile picture + field( + :profile_picture, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("profile_picture")}} + ) + # URL of the author's external profile + field( + :external_link, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("external_link")}} + ) + # Author name or identifier + field( + :name, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name")}} + ) + # Author email address + field( + :email, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("email")}} + ) + # The author's company or organization + field( + :company, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("company")}} + ) + + field( + :manual_trust_level, + Crystalline::Nilable.new(::Float), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("manual_trust_level")}} + ) + + sig { + params( + external_id: ::String, + metadata: T.nilable(Models::Operations::CreateAuthorMetadata), + first_seen: T.nilable(::Float), + last_seen: T.nilable(::Float), + profile_picture: T.nilable(::String), + external_link: T.nilable(::String), + name: T.nilable(::String), + email: T.nilable(::String), + company: T.nilable(::String), + manual_trust_level: T.nilable(::Float) + ) + .void + } + def initialize( + external_id:, + metadata: nil, + first_seen: nil, + last_seen: nil, + profile_picture: nil, + external_link: nil, + name: nil, + email: nil, + company: nil, + manual_trust_level: nil + ) + @external_id = external_id + @metadata = metadata + @first_seen = first_seen + @last_seen = last_seen + @profile_picture = profile_picture + @external_link = external_link + @name = name + @email = email + @company = company + @manual_trust_level = manual_trust_level + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @external_id == other.external_id + return false unless @metadata == other.metadata + return false unless @first_seen == other.first_seen + return false unless @last_seen == other.last_seen + return false unless @profile_picture == other.profile_picture + return false unless @external_link == other.external_link + return false unless @name == other.name + return false unless @email == other.email + return false unless @company == other.company + return false unless @manual_trust_level == other.manual_trust_level + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createauthor_requestbody.rbi b/lib/moderation_api/models/operations/createauthor_requestbody.rbi new file mode 100644 index 00000000..ddcbdd6f --- /dev/null +++ b/lib/moderation_api/models/operations/createauthor_requestbody.rbi @@ -0,0 +1,68 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateAuthorRequestBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateAuthorRequestBody + def external_id + end + + def external_id=(str_) + end + + def metadata + end + + def metadata=(str_) + end + + def first_seen + end + + def first_seen=(str_) + end + + def last_seen + end + + def last_seen=(str_) + end + + def profile_picture + end + + def profile_picture=(str_) + end + + def external_link + end + + def external_link=(str_) + end + + def name + end + + def name=(str_) + end + + def email + end + + def email=(str_) + end + + def company + end + + def company=(str_) + end + + def manual_trust_level + end + + def manual_trust_level=(str_) + end +end diff --git a/lib/moderation_api/models/operations/createwebhook_request.rb b/lib/moderation_api/models/operations/createwebhook_request.rb index c0b371f5..ffca28b8 100644 --- a/lib/moderation_api/models/operations/createwebhook_request.rb +++ b/lib/moderation_api/models/operations/createwebhook_request.rb @@ -11,50 +11,25 @@ class CreateWebhookRequest extend T::Sig include Crystalline::MetadataFields - # The webhook's name, used to identify it in the dashboard + field :body, Models::Operations::CreateWebhookRequestBody, {'request': {'media_type': "application/json"}} + # 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. field( - :name, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} - ) - # The webhook's URL. We'll call this URL when an event occurs. - field :url, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("url"), required: true}} - # Event types this webhook subscribes to. One webhook URL receives all events you list here. - field( - :event_types, - Crystalline::Array.new(Models::Operations::CreateWebhookEventTypeRequest), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("eventTypes"), required: true}} - ) - # The webhook's description - field( - :description, + :project_id, Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description")}} + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} ) - sig { - params( - name: ::String, - url: ::String, - event_types: T::Array[Models::Operations::CreateWebhookEventTypeRequest], - description: T.nilable(::String) - ) - .void - } - def initialize(name:, url:, event_types:, description: nil) - @name = name - @url = url - @event_types = event_types - @description = description + sig { params(body: Models::Operations::CreateWebhookRequestBody, project_id: T.nilable(::String)).void } + def initialize(body:, project_id: nil) + @body = body + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) - return false unless @name == other.name - return false unless @url == other.url - return false unless @event_types == other.event_types - return false unless @description == other.description + return false unless @body == other.body + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/createwebhook_request.rbi b/lib/moderation_api/models/operations/createwebhook_request.rbi index a8c135ba..24329bdd 100644 --- a/lib/moderation_api/models/operations/createwebhook_request.rbi +++ b/lib/moderation_api/models/operations/createwebhook_request.rbi @@ -6,27 +6,15 @@ class ModerationApi::Models::Operations::CreateWebhookRequest end class ModerationApi::Models::Operations::CreateWebhookRequest - def name + def body end - def name=(str_) + def body=(str_) end - def url + def project_id end - def url=(str_) - end - - def event_types - end - - def event_types=(str_) - end - - def description - end - - def description=(str_) + def project_id=(str_) end end diff --git a/lib/moderation_api/models/operations/createwebhook_requestbody.rb b/lib/moderation_api/models/operations/createwebhook_requestbody.rb new file mode 100644 index 00000000..421e14be --- /dev/null +++ b/lib/moderation_api/models/operations/createwebhook_requestbody.rb @@ -0,0 +1,63 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class CreateWebhookRequestBody + extend T::Sig + include Crystalline::MetadataFields + + # The webhook's name, used to identify it in the dashboard + field( + :name, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} + ) + # The webhook's URL. We'll call this URL when an event occurs. + field :url, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("url"), required: true}} + # Event types this webhook subscribes to. One webhook URL receives all events you list here. + field( + :event_types, + Crystalline::Array.new(Models::Operations::CreateWebhookEventTypeRequest), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("eventTypes"), required: true}} + ) + # The webhook's description + field( + :description, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description")}} + ) + + sig { + params( + name: ::String, + url: ::String, + event_types: T::Array[Models::Operations::CreateWebhookEventTypeRequest], + description: T.nilable(::String) + ) + .void + } + def initialize(name:, url:, event_types:, description: nil) + @name = name + @url = url + @event_types = event_types + @description = description + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @name == other.name + return false unless @url == other.url + return false unless @event_types == other.event_types + return false unless @description == other.description + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createwebhook_requestbody.rbi b/lib/moderation_api/models/operations/createwebhook_requestbody.rbi new file mode 100644 index 00000000..ed685874 --- /dev/null +++ b/lib/moderation_api/models/operations/createwebhook_requestbody.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateWebhookRequestBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateWebhookRequestBody + def name + end + + def name=(str_) + end + + def url + end + + def url=(str_) + end + + def event_types + end + + def event_types=(str_) + end + + def description + end + + def description=(str_) + end +end diff --git a/lib/moderation_api/models/operations/deleteaction_request.rb b/lib/moderation_api/models/operations/deleteaction_request.rb index 80280b8b..0d86491f 100644 --- a/lib/moderation_api/models/operations/deleteaction_request.rb +++ b/lib/moderation_api/models/operations/deleteaction_request.rb @@ -13,16 +13,24 @@ class DeleteActionRequest # The ID of the action to delete. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String).void } - def initialize(id:) + sig { params(id: ::String, project_id: T.nilable(::String)).void } + def initialize(id:, project_id: nil) @id = id + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/deleteaction_request.rbi b/lib/moderation_api/models/operations/deleteaction_request.rbi index e3e26ae7..89def8a5 100644 --- a/lib/moderation_api/models/operations/deleteaction_request.rbi +++ b/lib/moderation_api/models/operations/deleteaction_request.rbi @@ -11,4 +11,10 @@ class ModerationApi::Models::Operations::DeleteActionRequest def id=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/deleteauthor_request.rb b/lib/moderation_api/models/operations/deleteauthor_request.rb index 367a8f4f..30002842 100644 --- a/lib/moderation_api/models/operations/deleteauthor_request.rb +++ b/lib/moderation_api/models/operations/deleteauthor_request.rb @@ -13,16 +13,24 @@ class DeleteAuthorRequest # Either external ID or the ID assigned by moderation API. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String).void } - def initialize(id:) + sig { params(id: ::String, project_id: T.nilable(::String)).void } + def initialize(id:, project_id: nil) @id = id + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/deleteauthor_request.rbi b/lib/moderation_api/models/operations/deleteauthor_request.rbi index 6649262f..06a13c41 100644 --- a/lib/moderation_api/models/operations/deleteauthor_request.rbi +++ b/lib/moderation_api/models/operations/deleteauthor_request.rbi @@ -11,4 +11,10 @@ class ModerationApi::Models::Operations::DeleteAuthorRequest def id=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/deletewebhook_request.rb b/lib/moderation_api/models/operations/deletewebhook_request.rb index 4e777d4d..b5d56ace 100644 --- a/lib/moderation_api/models/operations/deletewebhook_request.rb +++ b/lib/moderation_api/models/operations/deletewebhook_request.rb @@ -13,16 +13,24 @@ class DeleteWebhookRequest # The ID of the webhook to delete. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String).void } - def initialize(id:) + sig { params(id: ::String, project_id: T.nilable(::String)).void } + def initialize(id:, project_id: nil) @id = id + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/deletewebhook_request.rbi b/lib/moderation_api/models/operations/deletewebhook_request.rbi index 378fd7d6..e573e007 100644 --- a/lib/moderation_api/models/operations/deletewebhook_request.rbi +++ b/lib/moderation_api/models/operations/deletewebhook_request.rbi @@ -11,4 +11,10 @@ class ModerationApi::Models::Operations::DeleteWebhookRequest def id=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/executeaction_request.rb b/lib/moderation_api/models/operations/executeaction_request.rb index 7a2c8572..3af79446 100644 --- a/lib/moderation_api/models/operations/executeaction_request.rb +++ b/lib/moderation_api/models/operations/executeaction_request.rb @@ -6,77 +6,30 @@ module ModerationApi module Models module Operations - # Input parameters + class ExecuteActionRequest extend T::Sig include Crystalline::MetadataFields - # ID or key of the action to execute - field( - :action_key, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("actionKey"), required: true}} - ) - # IDs of the content items to apply the action to. Provide this or authorIds. - field( - :content_ids, - Crystalline::Nilable.new(Crystalline::Array.new(::String)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("contentIds")}} - ) - # IDs of the authors to apply the action to. Provide this or contentIds. - field( - :author_ids, - Crystalline::Nilable.new(Crystalline::Array.new(::String)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("authorIds")}} - ) - # Optional value to provide with the action - field( - :value, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("value")}} - ) - # Optional queue ID if the action is queue-specific + field :body, Models::Operations::ExecuteActionRequestBody, {'request': {'media_type': "application/json"}} + # 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. field( - :queue_id, + :project_id, Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("queueId")}} - ) - # Optional duration in milliseconds for actions with timeouts - field( - :duration, - Crystalline::Nilable.new(::Float), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("duration")}} + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} ) - sig { - params( - action_key: ::String, - content_ids: T.nilable(T::Array[::String]), - author_ids: T.nilable(T::Array[::String]), - value: T.nilable(::String), - queue_id: T.nilable(::String), - duration: T.nilable(::Float) - ) - .void - } - def initialize(action_key:, content_ids: nil, author_ids: nil, value: nil, queue_id: nil, duration: nil) - @action_key = action_key - @content_ids = content_ids - @author_ids = author_ids - @value = value - @queue_id = queue_id - @duration = duration + sig { params(body: Models::Operations::ExecuteActionRequestBody, project_id: T.nilable(::String)).void } + def initialize(body:, project_id: nil) + @body = body + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) - return false unless @action_key == other.action_key - return false unless @content_ids == other.content_ids - return false unless @author_ids == other.author_ids - return false unless @value == other.value - return false unless @queue_id == other.queue_id - return false unless @duration == other.duration + return false unless @body == other.body + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/executeaction_request.rbi b/lib/moderation_api/models/operations/executeaction_request.rbi index 533b4d84..0d4cd801 100644 --- a/lib/moderation_api/models/operations/executeaction_request.rbi +++ b/lib/moderation_api/models/operations/executeaction_request.rbi @@ -6,39 +6,15 @@ class ModerationApi::Models::Operations::ExecuteActionRequest end class ModerationApi::Models::Operations::ExecuteActionRequest - def action_key + def body end - def action_key=(str_) + def body=(str_) end - def content_ids + def project_id end - def content_ids=(str_) - end - - def author_ids - end - - def author_ids=(str_) - end - - def value - end - - def value=(str_) - end - - def queue_id - end - - def queue_id=(str_) - end - - def duration - end - - def duration=(str_) + def project_id=(str_) end end diff --git a/lib/moderation_api/models/operations/executeaction_requestbody.rb b/lib/moderation_api/models/operations/executeaction_requestbody.rb new file mode 100644 index 00000000..87942c89 --- /dev/null +++ b/lib/moderation_api/models/operations/executeaction_requestbody.rb @@ -0,0 +1,85 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Input parameters + class ExecuteActionRequestBody + extend T::Sig + include Crystalline::MetadataFields + + # ID or key of the action to execute + field( + :action_key, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("actionKey"), required: true}} + ) + # IDs of the content items to apply the action to. Provide this or authorIds. + field( + :content_ids, + Crystalline::Nilable.new(Crystalline::Array.new(::String)), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("contentIds")}} + ) + # IDs of the authors to apply the action to. Provide this or contentIds. + field( + :author_ids, + Crystalline::Nilable.new(Crystalline::Array.new(::String)), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("authorIds")}} + ) + # Optional value to provide with the action + field( + :value, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("value")}} + ) + # Optional queue ID if the action is queue-specific + field( + :queue_id, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("queueId")}} + ) + # Optional duration in milliseconds for actions with timeouts + field( + :duration, + Crystalline::Nilable.new(::Float), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("duration")}} + ) + + sig { + params( + action_key: ::String, + content_ids: T.nilable(T::Array[::String]), + author_ids: T.nilable(T::Array[::String]), + value: T.nilable(::String), + queue_id: T.nilable(::String), + duration: T.nilable(::Float) + ) + .void + } + def initialize(action_key:, content_ids: nil, author_ids: nil, value: nil, queue_id: nil, duration: nil) + @action_key = action_key + @content_ids = content_ids + @author_ids = author_ids + @value = value + @queue_id = queue_id + @duration = duration + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @action_key == other.action_key + return false unless @content_ids == other.content_ids + return false unless @author_ids == other.author_ids + return false unless @value == other.value + return false unless @queue_id == other.queue_id + return false unless @duration == other.duration + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/executeaction_requestbody.rbi b/lib/moderation_api/models/operations/executeaction_requestbody.rbi new file mode 100644 index 00000000..129a6323 --- /dev/null +++ b/lib/moderation_api/models/operations/executeaction_requestbody.rbi @@ -0,0 +1,44 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::ExecuteActionRequestBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::ExecuteActionRequestBody + def action_key + end + + def action_key=(str_) + end + + def content_ids + end + + def content_ids=(str_) + end + + def author_ids + end + + def author_ids=(str_) + end + + def value + end + + def value=(str_) + end + + def queue_id + end + + def queue_id=(str_) + end + + def duration + end + + def duration=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getaccount_request.rb b/lib/moderation_api/models/operations/getaccount_request.rb new file mode 100644 index 00000000..00689803 --- /dev/null +++ b/lib/moderation_api/models/operations/getaccount_request.rb @@ -0,0 +1,35 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAccountRequest + extend T::Sig + include Crystalline::MetadataFields + + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + + sig { params(project_id: T.nilable(::String)).void } + def initialize(project_id: nil) + @project_id = project_id + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @project_id == other.project_id + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getaccount_request.rbi b/lib/moderation_api/models/operations/getaccount_request.rbi new file mode 100644 index 00000000..850603b1 --- /dev/null +++ b/lib/moderation_api/models/operations/getaccount_request.rbi @@ -0,0 +1,14 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAccountRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAccountRequest + def project_id + end + + def project_id=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getaction_request.rb b/lib/moderation_api/models/operations/getaction_request.rb index c36959c6..4cc0b101 100644 --- a/lib/moderation_api/models/operations/getaction_request.rb +++ b/lib/moderation_api/models/operations/getaction_request.rb @@ -13,16 +13,24 @@ class GetActionRequest # The ID of the action to get. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String).void } - def initialize(id:) + sig { params(id: ::String, project_id: T.nilable(::String)).void } + def initialize(id:, project_id: nil) @id = id + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/getaction_request.rbi b/lib/moderation_api/models/operations/getaction_request.rbi index 883a76ac..42515f81 100644 --- a/lib/moderation_api/models/operations/getaction_request.rbi +++ b/lib/moderation_api/models/operations/getaction_request.rbi @@ -11,4 +11,10 @@ class ModerationApi::Models::Operations::GetActionRequest def id=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/getauthor_request.rb b/lib/moderation_api/models/operations/getauthor_request.rb index 8cd4418c..02dbe929 100644 --- a/lib/moderation_api/models/operations/getauthor_request.rb +++ b/lib/moderation_api/models/operations/getauthor_request.rb @@ -13,16 +13,24 @@ class GetAuthorRequest # Either external ID or the ID assigned by moderation API. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String).void } - def initialize(id:) + sig { params(id: ::String, project_id: T.nilable(::String)).void } + def initialize(id:, project_id: nil) @id = id + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/getauthor_request.rbi b/lib/moderation_api/models/operations/getauthor_request.rbi index c0341d62..54ee7955 100644 --- a/lib/moderation_api/models/operations/getauthor_request.rbi +++ b/lib/moderation_api/models/operations/getauthor_request.rbi @@ -11,4 +11,10 @@ class ModerationApi::Models::Operations::GetAuthorRequest def id=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/getqueue_request.rb b/lib/moderation_api/models/operations/getqueue_request.rb index e6a27b94..ee676eba 100644 --- a/lib/moderation_api/models/operations/getqueue_request.rb +++ b/lib/moderation_api/models/operations/getqueue_request.rb @@ -13,16 +13,24 @@ class GetQueueRequest # The queue ID field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String).void } - def initialize(id:) + sig { params(id: ::String, project_id: T.nilable(::String)).void } + def initialize(id:, project_id: nil) @id = id + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/getqueue_request.rbi b/lib/moderation_api/models/operations/getqueue_request.rbi index ab07f153..541e1b4a 100644 --- a/lib/moderation_api/models/operations/getqueue_request.rbi +++ b/lib/moderation_api/models/operations/getqueue_request.rbi @@ -11,4 +11,10 @@ class ModerationApi::Models::Operations::GetQueueRequest def id=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/getqueuestats_request.rb b/lib/moderation_api/models/operations/getqueuestats_request.rb index aefc8c79..a76e15b1 100644 --- a/lib/moderation_api/models/operations/getqueuestats_request.rb +++ b/lib/moderation_api/models/operations/getqueuestats_request.rb @@ -13,6 +13,12 @@ class GetQueueStatsRequest # The queue ID field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) field( :within_days, @@ -20,9 +26,10 @@ class GetQueueStatsRequest {'query_param': {'field_name': "withinDays", 'style': "form", 'explode': true}} ) - sig { params(id: ::String, within_days: T.nilable(::Integer)).void } - def initialize(id:, within_days: 30) + sig { params(id: ::String, project_id: T.nilable(::String), within_days: T.nilable(::Integer)).void } + def initialize(id:, project_id: nil, within_days: 30) @id = id + @project_id = project_id @within_days = within_days end @@ -30,6 +37,7 @@ def initialize(id:, within_days: 30) def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id + return false unless @project_id == other.project_id return false unless @within_days == other.within_days true end diff --git a/lib/moderation_api/models/operations/getqueuestats_request.rbi b/lib/moderation_api/models/operations/getqueuestats_request.rbi index c4750313..16354d39 100644 --- a/lib/moderation_api/models/operations/getqueuestats_request.rbi +++ b/lib/moderation_api/models/operations/getqueuestats_request.rbi @@ -12,6 +12,12 @@ class ModerationApi::Models::Operations::GetQueueStatsRequest def id=(str_) end + def project_id + end + + def project_id=(str_) + end + def within_days end diff --git a/lib/moderation_api/models/operations/getwebhook_request.rb b/lib/moderation_api/models/operations/getwebhook_request.rb index e16cd37c..ffce400d 100644 --- a/lib/moderation_api/models/operations/getwebhook_request.rb +++ b/lib/moderation_api/models/operations/getwebhook_request.rb @@ -13,16 +13,24 @@ class GetWebhookRequest # The ID of the webhook to get. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String).void } - def initialize(id:) + sig { params(id: ::String, project_id: T.nilable(::String)).void } + def initialize(id:, project_id: nil) @id = id + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/getwebhook_request.rbi b/lib/moderation_api/models/operations/getwebhook_request.rbi index fd69f94f..44da4e96 100644 --- a/lib/moderation_api/models/operations/getwebhook_request.rbi +++ b/lib/moderation_api/models/operations/getwebhook_request.rbi @@ -11,4 +11,10 @@ class ModerationApi::Models::Operations::GetWebhookRequest def id=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/getwebhooksecret_request.rb b/lib/moderation_api/models/operations/getwebhooksecret_request.rb new file mode 100644 index 00000000..e46a58ba --- /dev/null +++ b/lib/moderation_api/models/operations/getwebhooksecret_request.rb @@ -0,0 +1,35 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetWebhookSecretRequest + extend T::Sig + include Crystalline::MetadataFields + + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + + sig { params(project_id: T.nilable(::String)).void } + def initialize(project_id: nil) + @project_id = project_id + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @project_id == other.project_id + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getwebhooksecret_request.rbi b/lib/moderation_api/models/operations/getwebhooksecret_request.rbi new file mode 100644 index 00000000..b7ad8ba8 --- /dev/null +++ b/lib/moderation_api/models/operations/getwebhooksecret_request.rbi @@ -0,0 +1,14 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetWebhookSecretRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetWebhookSecretRequest + def project_id + end + + def project_id=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getwordlist_request.rb b/lib/moderation_api/models/operations/getwordlist_request.rb index 02bbe8c5..711f0418 100644 --- a/lib/moderation_api/models/operations/getwordlist_request.rb +++ b/lib/moderation_api/models/operations/getwordlist_request.rb @@ -13,16 +13,24 @@ class GetWordlistRequest # ID of the wordlist to get field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String).void } - def initialize(id:) + sig { params(id: ::String, project_id: T.nilable(::String)).void } + def initialize(id:, project_id: nil) @id = id + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/getwordlist_request.rbi b/lib/moderation_api/models/operations/getwordlist_request.rbi index 2596683c..f9c84238 100644 --- a/lib/moderation_api/models/operations/getwordlist_request.rbi +++ b/lib/moderation_api/models/operations/getwordlist_request.rbi @@ -11,4 +11,10 @@ class ModerationApi::Models::Operations::GetWordlistRequest def id=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rb b/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rb index a244e591..316e104d 100644 --- a/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rb +++ b/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rb @@ -13,16 +13,24 @@ class GetWordlistEmbeddingStatusRequest # ID of the wordlist to check embedding status for field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String).void } - def initialize(id:) + sig { params(id: ::String, project_id: T.nilable(::String)).void } + def initialize(id:, project_id: nil) @id = id + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rbi b/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rbi index 0bb55d6b..f885c3cc 100644 --- a/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rbi +++ b/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rbi @@ -11,4 +11,10 @@ class ModerationApi::Models::Operations::GetWordlistEmbeddingStatusRequest def id=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/listactions_request.rb b/lib/moderation_api/models/operations/listactions_request.rb index 2500543d..568ddb30 100644 --- a/lib/moderation_api/models/operations/listactions_request.rb +++ b/lib/moderation_api/models/operations/listactions_request.rb @@ -16,6 +16,12 @@ class ListActionsRequest Crystalline::Nilable.new(::String), {'query_param': {'field_name': "queueId", 'style': "form", 'explode': true}} ) + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) field( :page, @@ -29,9 +35,18 @@ class ListActionsRequest {'query_param': {'field_name': "pageSize", 'style': "form", 'explode': true}} ) - sig { params(queue_id: T.nilable(::String), page: T.nilable(::Integer), page_size: T.nilable(::Integer)).void } - def initialize(queue_id: nil, page: 1, page_size: 20) + sig { + params( + queue_id: T.nilable(::String), + project_id: T.nilable(::String), + page: T.nilable(::Integer), + page_size: T.nilable(::Integer) + ) + .void + } + def initialize(queue_id: nil, project_id: nil, page: 1, page_size: 20) @queue_id = queue_id + @project_id = project_id @page = page @page_size = page_size end @@ -40,6 +55,7 @@ def initialize(queue_id: nil, page: 1, page_size: 20) def ==(other) return false unless other.is_a?(self.class) return false unless @queue_id == other.queue_id + return false unless @project_id == other.project_id return false unless @page == other.page return false unless @page_size == other.page_size true diff --git a/lib/moderation_api/models/operations/listactions_request.rbi b/lib/moderation_api/models/operations/listactions_request.rbi index 3169de01..a31f4d6f 100644 --- a/lib/moderation_api/models/operations/listactions_request.rbi +++ b/lib/moderation_api/models/operations/listactions_request.rbi @@ -12,6 +12,12 @@ class ModerationApi::Models::Operations::ListActionsRequest def queue_id=(str_) end + def project_id + end + + def project_id=(str_) + end + def page end diff --git a/lib/moderation_api/models/operations/listauthors_request.rb b/lib/moderation_api/models/operations/listauthors_request.rb index 5b22fbe2..60215830 100644 --- a/lib/moderation_api/models/operations/listauthors_request.rb +++ b/lib/moderation_api/models/operations/listauthors_request.rb @@ -34,6 +34,12 @@ class ListAuthorsRequest Crystalline::Nilable.new(Crystalline::Array.new(::String)), {'query_param': {'field_name': "contentTypes", 'style': "form", 'explode': true}} ) + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) field( :page, @@ -59,6 +65,7 @@ class ListAuthorsRequest member_since_date: T.nilable(::String), last_active_date: T.nilable(::String), content_types: T.nilable(T::Array[::String]), + project_id: T.nilable(::String), page: T.nilable(::Integer), page_size: T.nilable(::Integer), sort_direction: T.nilable(Models::Operations::ListAuthorsSortDirection) @@ -70,6 +77,7 @@ def initialize( member_since_date: nil, last_active_date: nil, content_types: nil, + project_id: nil, page: 1, page_size: 20, sort_direction: Models::Operations::ListAuthorsSortDirection::DESC @@ -78,6 +86,7 @@ def initialize( @member_since_date = member_since_date @last_active_date = last_active_date @content_types = content_types + @project_id = project_id @page = page @page_size = page_size @sort_direction = sort_direction @@ -90,6 +99,7 @@ def ==(other) return false unless @member_since_date == other.member_since_date return false unless @last_active_date == other.last_active_date return false unless @content_types == other.content_types + return false unless @project_id == other.project_id return false unless @page == other.page return false unless @page_size == other.page_size return false unless @sort_direction == other.sort_direction diff --git a/lib/moderation_api/models/operations/listauthors_request.rbi b/lib/moderation_api/models/operations/listauthors_request.rbi index a339d7d9..b56f7430 100644 --- a/lib/moderation_api/models/operations/listauthors_request.rbi +++ b/lib/moderation_api/models/operations/listauthors_request.rbi @@ -30,6 +30,12 @@ class ModerationApi::Models::Operations::ListAuthorsRequest def content_types=(str_) end + def project_id + end + + def project_id=(str_) + end + def page end diff --git a/lib/moderation_api/models/operations/listqueueitems_request.rb b/lib/moderation_api/models/operations/listqueueitems_request.rb index 9122d792..aed83282 100644 --- a/lib/moderation_api/models/operations/listqueueitems_request.rb +++ b/lib/moderation_api/models/operations/listqueueitems_request.rb @@ -61,6 +61,12 @@ class ListQueueItemsRequest Crystalline::Nilable.new(Crystalline::Array.new(::String)), {'query_param': {'field_name': "filteredActionIds", 'style': "form", 'explode': true}} ) + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) field( :page, @@ -91,6 +97,7 @@ class ListQueueItemsRequest include_resolved: T.nilable(T::Boolean), author_id: T.nilable(::String), filtered_action_ids: T.nilable(T::Array[::String]), + project_id: T.nilable(::String), page: T.nilable(::Integer), page_size: T.nilable(::Integer), sort_direction: T.nilable(Models::Operations::ListQueueItemsSortDirection) @@ -107,6 +114,7 @@ def initialize( include_resolved: nil, author_id: nil, filtered_action_ids: nil, + project_id: nil, page: 1, page_size: 20, sort_direction: Models::Operations::ListQueueItemsSortDirection::DESC @@ -120,6 +128,7 @@ def initialize( @include_resolved = include_resolved @author_id = author_id @filtered_action_ids = filtered_action_ids + @project_id = project_id @page = page @page_size = page_size @sort_direction = sort_direction @@ -137,6 +146,7 @@ def ==(other) return false unless @include_resolved == other.include_resolved return false unless @author_id == other.author_id return false unless @filtered_action_ids == other.filtered_action_ids + return false unless @project_id == other.project_id return false unless @page == other.page return false unless @page_size == other.page_size return false unless @sort_direction == other.sort_direction diff --git a/lib/moderation_api/models/operations/listqueueitems_request.rbi b/lib/moderation_api/models/operations/listqueueitems_request.rbi index 5f2e08e5..b01dd507 100644 --- a/lib/moderation_api/models/operations/listqueueitems_request.rbi +++ b/lib/moderation_api/models/operations/listqueueitems_request.rbi @@ -60,6 +60,12 @@ class ModerationApi::Models::Operations::ListQueueItemsRequest def filtered_action_ids=(str_) end + def project_id + end + + def project_id=(str_) + end + def page end diff --git a/lib/moderation_api/models/operations/listwebhooks_request.rb b/lib/moderation_api/models/operations/listwebhooks_request.rb index 48080ecb..b0f2b88a 100644 --- a/lib/moderation_api/models/operations/listwebhooks_request.rb +++ b/lib/moderation_api/models/operations/listwebhooks_request.rb @@ -11,6 +11,13 @@ class ListWebhooksRequest extend T::Sig include Crystalline::MetadataFields + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + field( :page, Crystalline::Nilable.new(::Integer), @@ -23,8 +30,11 @@ class ListWebhooksRequest {'query_param': {'field_name': "pageSize", 'style': "form", 'explode': true}} ) - sig { params(page: T.nilable(::Integer), page_size: T.nilable(::Integer)).void } - def initialize(page: 1, page_size: 20) + sig { + params(project_id: T.nilable(::String), page: T.nilable(::Integer), page_size: T.nilable(::Integer)).void + } + def initialize(project_id: nil, page: 1, page_size: 20) + @project_id = project_id @page = page @page_size = page_size end @@ -32,6 +42,7 @@ def initialize(page: 1, page_size: 20) sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) + return false unless @project_id == other.project_id return false unless @page == other.page return false unless @page_size == other.page_size true diff --git a/lib/moderation_api/models/operations/listwebhooks_request.rbi b/lib/moderation_api/models/operations/listwebhooks_request.rbi index ea930148..295782c4 100644 --- a/lib/moderation_api/models/operations/listwebhooks_request.rbi +++ b/lib/moderation_api/models/operations/listwebhooks_request.rbi @@ -6,6 +6,12 @@ class ModerationApi::Models::Operations::ListWebhooksRequest end class ModerationApi::Models::Operations::ListWebhooksRequest + def project_id + end + + def project_id=(str_) + end + def page end diff --git a/lib/moderation_api/models/operations/listwordlists_request.rb b/lib/moderation_api/models/operations/listwordlists_request.rb index d37cc999..0b4457c8 100644 --- a/lib/moderation_api/models/operations/listwordlists_request.rb +++ b/lib/moderation_api/models/operations/listwordlists_request.rb @@ -11,6 +11,13 @@ class ListWordlistsRequest extend T::Sig include Crystalline::MetadataFields + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + field( :page, Crystalline::Nilable.new(::Integer), @@ -23,8 +30,11 @@ class ListWordlistsRequest {'query_param': {'field_name': "pageSize", 'style': "form", 'explode': true}} ) - sig { params(page: T.nilable(::Integer), page_size: T.nilable(::Integer)).void } - def initialize(page: 1, page_size: 20) + sig { + params(project_id: T.nilable(::String), page: T.nilable(::Integer), page_size: T.nilable(::Integer)).void + } + def initialize(project_id: nil, page: 1, page_size: 20) + @project_id = project_id @page = page @page_size = page_size end @@ -32,6 +42,7 @@ def initialize(page: 1, page_size: 20) sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) + return false unless @project_id == other.project_id return false unless @page == other.page return false unless @page_size == other.page_size true diff --git a/lib/moderation_api/models/operations/listwordlists_request.rbi b/lib/moderation_api/models/operations/listwordlists_request.rbi index bbdddd36..7455d1b9 100644 --- a/lib/moderation_api/models/operations/listwordlists_request.rbi +++ b/lib/moderation_api/models/operations/listwordlists_request.rbi @@ -6,6 +6,12 @@ class ModerationApi::Models::Operations::ListWordlistsRequest end class ModerationApi::Models::Operations::ListWordlistsRequest + def project_id + end + + def project_id=(str_) + end + def page end diff --git a/lib/moderation_api/models/operations/removewordlistwords_request.rb b/lib/moderation_api/models/operations/removewordlistwords_request.rb index 0a283dc7..c559d7fe 100644 --- a/lib/moderation_api/models/operations/removewordlistwords_request.rb +++ b/lib/moderation_api/models/operations/removewordlistwords_request.rb @@ -19,11 +19,18 @@ class RemoveWordlistWordsRequest Crystalline::Array.new(::String), {'query_param': {'field_name': "words", 'style': "form", 'explode': true}} ) + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String, words: T::Array[::String]).void } - def initialize(id:, words:) + sig { params(id: ::String, words: T::Array[::String], project_id: T.nilable(::String)).void } + def initialize(id:, words:, project_id: nil) @id = id @words = words + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } @@ -31,6 +38,7 @@ def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id return false unless @words == other.words + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/removewordlistwords_request.rbi b/lib/moderation_api/models/operations/removewordlistwords_request.rbi index 522dc8b1..074bfb65 100644 --- a/lib/moderation_api/models/operations/removewordlistwords_request.rbi +++ b/lib/moderation_api/models/operations/removewordlistwords_request.rbi @@ -17,4 +17,10 @@ class ModerationApi::Models::Operations::RemoveWordlistWordsRequest def words=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/resolvequeueitem_request.rb b/lib/moderation_api/models/operations/resolvequeueitem_request.rb index 8400a580..7624153f 100644 --- a/lib/moderation_api/models/operations/resolvequeueitem_request.rb +++ b/lib/moderation_api/models/operations/resolvequeueitem_request.rb @@ -17,12 +17,27 @@ class ResolveQueueItemRequest field :item_id, ::String, {'path_param': {'field_name': "itemId", 'style': "simple", 'explode': false}} field :body, Models::Operations::ResolveQueueItemRequestBody, {'request': {'media_type': "application/json"}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String, item_id: ::String, body: Models::Operations::ResolveQueueItemRequestBody).void } - def initialize(id:, item_id:, body:) + sig { + params( + id: ::String, + item_id: ::String, + body: Models::Operations::ResolveQueueItemRequestBody, + project_id: T.nilable(::String) + ) + .void + } + def initialize(id:, item_id:, body:, project_id: nil) @id = id @item_id = item_id @body = body + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } @@ -31,6 +46,7 @@ def ==(other) return false unless @id == other.id return false unless @item_id == other.item_id return false unless @body == other.body + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/resolvequeueitem_request.rbi b/lib/moderation_api/models/operations/resolvequeueitem_request.rbi index 97dbaf97..ebd0d3b7 100644 --- a/lib/moderation_api/models/operations/resolvequeueitem_request.rbi +++ b/lib/moderation_api/models/operations/resolvequeueitem_request.rbi @@ -23,4 +23,10 @@ class ModerationApi::Models::Operations::ResolveQueueItemRequest def body=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/submitcontent_request.rb b/lib/moderation_api/models/operations/submitcontent_request.rb index 5533666f..4b5aafcf 100644 --- a/lib/moderation_api/models/operations/submitcontent_request.rb +++ b/lib/moderation_api/models/operations/submitcontent_request.rb @@ -11,246 +11,25 @@ class SubmitContentRequest extend T::Sig include Crystalline::MetadataFields - # The content sent for moderation + field :body, Models::Operations::SubmitContentRequestBody, {'request': {'media_type': "application/json"}} + # 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. field( - :content, - Crystalline::Union.new( - Models::Operations::TextRequest, - Models::Operations::ImageRequest, - Models::Operations::VideoRequest, - Models::Operations::AudioRequest, - Models::Operations::Object - ), - { - 'format_json': {'letter_case': ::ModerationApi::Utils.field_name("content"), required: true}, - 'discriminator': "type", - 'discriminator_mapping': { - "text" => Models::Operations::TextRequest, - "image" => Models::Operations::ImageRequest, - "video" => Models::Operations::VideoRequest, - "audio" => Models::Operations::AudioRequest, - "object" => Models::Operations::Object - } - } - ) - # Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. - field( - :timestamp, - Crystalline::Nilable.new(::Float), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("timestamp")}} - ) - # Provide a channel ID or key. Will use the project's default channel if not provided. - field( - :channel, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("channel")}} - ) - # The unique ID of the content in your database. - field( - :content_id, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("contentId")}} - ) - # The meta type of content being moderated - field( - :meta_type, - Crystalline::Nilable.new(Models::Operations::MetaType), - { - 'format_json': { - 'letter_case': ::ModerationApi::Utils.field_name("metaType"), - 'decoder': ::ModerationApi::Utils.enum_from_string(Models::Operations::MetaType, true) - } - } - ) - # The author of the content. - field( - :author_id, + :project_id, Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("authorId")}} - ) - # For example the ID of a chat room or a post - field( - :conversation_id, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("conversationId")}} - ) - # Any metadata you want to store with the content - field( - :metadata, - Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, ::Object)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("metadata")}} - ) - # 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. - field( - :client_action, - Crystalline::Nilable.new(Models::Operations::ClientAction), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("clientAction")}} - ) - # Do not store the content. The content won't enter the review queue - field( - :do_not_store, - Crystalline::Nilable.new(Crystalline::Boolean.new), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("doNotStore")}} - ) - # (Enterprise) override the channel policies for this moderation request only. - field( - :policies, - Crystalline::Nilable.new( - Crystalline::Array.new( - Crystalline::Union.new( - Models::Operations::Toxicity, - Models::Operations::PersonalInformation, - Models::Operations::Hate, - Models::Operations::Illicit, - Models::Operations::IllicitDrugs, - Models::Operations::IllicitAlcohol, - Models::Operations::IllicitFirearms, - Models::Operations::IllicitTobacco, - Models::Operations::IllicitGambling, - Models::Operations::Cannabis, - Models::Operations::Adult, - Models::Operations::Crypto, - Models::Operations::Sexual, - Models::Operations::SexualMinors, - Models::Operations::Profanity, - Models::Operations::Violence, - Models::Operations::SelfHarm, - Models::Operations::Spam, - Models::Operations::LowQualityContent, - Models::Operations::FaceDetection, - Models::Operations::SelfPromotion, - Models::Operations::Political, - Models::Operations::Religion, - Models::Operations::Threat, - Models::Operations::SexualSolicitation, - Models::Operations::ChannelCircumvention, - Models::Operations::IllegalTrade, - Models::Operations::Alcohol, - Models::Operations::Drugs, - Models::Operations::Gambling, - Models::Operations::Tobacco, - Models::Operations::Weapons, - Models::Operations::Promotion, - Models::Operations::Extremism, - Models::Operations::CodeAbuse, - Models::Operations::UnicodeSpoofing, - Models::Operations::PIIMasking, - Models::Operations::URLMasking, - Models::Operations::URLRisk, - Models::Operations::Guideline - ) - ) - ), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("policies")}} + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} ) - sig { - params( - content: T.any( - Models::Operations::TextRequest, - Models::Operations::ImageRequest, - Models::Operations::VideoRequest, - Models::Operations::AudioRequest, - Models::Operations::Object - ), - timestamp: T.nilable(::Float), - channel: T.nilable(::String), - content_id: T.nilable(::String), - meta_type: T.nilable(Models::Operations::MetaType), - author_id: T.nilable(::String), - conversation_id: T.nilable(::String), - metadata: T.nilable(T::Hash[Symbol, ::Object]), - client_action: T.nilable(Models::Operations::ClientAction), - do_not_store: T.nilable(T::Boolean), - policies: T.nilable( - T::Array[ - T.any( - Models::Operations::Toxicity, - Models::Operations::PersonalInformation, - Models::Operations::Hate, - Models::Operations::Illicit, - Models::Operations::IllicitDrugs, - Models::Operations::IllicitAlcohol, - Models::Operations::IllicitFirearms, - Models::Operations::IllicitTobacco, - Models::Operations::IllicitGambling, - Models::Operations::Cannabis, - Models::Operations::Adult, - Models::Operations::Crypto, - Models::Operations::Sexual, - Models::Operations::SexualMinors, - Models::Operations::Profanity, - Models::Operations::Violence, - Models::Operations::SelfHarm, - Models::Operations::Spam, - Models::Operations::LowQualityContent, - Models::Operations::FaceDetection, - Models::Operations::SelfPromotion, - Models::Operations::Political, - Models::Operations::Religion, - Models::Operations::Threat, - Models::Operations::SexualSolicitation, - Models::Operations::ChannelCircumvention, - Models::Operations::IllegalTrade, - Models::Operations::Alcohol, - Models::Operations::Drugs, - Models::Operations::Gambling, - Models::Operations::Tobacco, - Models::Operations::Weapons, - Models::Operations::Promotion, - Models::Operations::Extremism, - Models::Operations::CodeAbuse, - Models::Operations::UnicodeSpoofing, - Models::Operations::PIIMasking, - Models::Operations::URLMasking, - Models::Operations::URLRisk, - Models::Operations::Guideline - ) - ] - ) - ) - .void - } - def initialize( - content:, - timestamp: nil, - channel: nil, - content_id: nil, - meta_type: nil, - author_id: nil, - conversation_id: nil, - metadata: nil, - client_action: nil, - do_not_store: nil, - policies: nil - ) - @content = content - @timestamp = timestamp - @channel = channel - @content_id = content_id - @meta_type = meta_type - @author_id = author_id - @conversation_id = conversation_id - @metadata = metadata - @client_action = client_action - @do_not_store = do_not_store - @policies = policies + sig { params(body: Models::Operations::SubmitContentRequestBody, project_id: T.nilable(::String)).void } + def initialize(body:, project_id: nil) + @body = body + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) - return false unless @content == other.content - return false unless @timestamp == other.timestamp - return false unless @channel == other.channel - return false unless @content_id == other.content_id - return false unless @meta_type == other.meta_type - return false unless @author_id == other.author_id - return false unless @conversation_id == other.conversation_id - return false unless @metadata == other.metadata - return false unless @client_action == other.client_action - return false unless @do_not_store == other.do_not_store - return false unless @policies == other.policies + return false unless @body == other.body + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/submitcontent_request.rbi b/lib/moderation_api/models/operations/submitcontent_request.rbi index 2427a7d3..9ae29a4a 100644 --- a/lib/moderation_api/models/operations/submitcontent_request.rbi +++ b/lib/moderation_api/models/operations/submitcontent_request.rbi @@ -6,69 +6,15 @@ class ModerationApi::Models::Operations::SubmitContentRequest end class ModerationApi::Models::Operations::SubmitContentRequest - def content + def body end - def content=(str_) + def body=(str_) end - def timestamp + def project_id end - def timestamp=(str_) - end - - def channel - end - - def channel=(str_) - end - - def content_id - end - - def content_id=(str_) - end - - def meta_type - end - - def meta_type=(str_) - end - - def author_id - end - - def author_id=(str_) - end - - def conversation_id - end - - def conversation_id=(str_) - end - - def metadata - end - - def metadata=(str_) - end - - def client_action - end - - def client_action=(str_) - end - - def do_not_store - end - - def do_not_store=(str_) - end - - def policies - end - - def policies=(str_) + def project_id=(str_) end end diff --git a/lib/moderation_api/models/operations/submitcontent_requestbody.rb b/lib/moderation_api/models/operations/submitcontent_requestbody.rb new file mode 100644 index 00000000..c6aa831e --- /dev/null +++ b/lib/moderation_api/models/operations/submitcontent_requestbody.rb @@ -0,0 +1,259 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class SubmitContentRequestBody + extend T::Sig + include Crystalline::MetadataFields + + # The content sent for moderation + field( + :content, + Crystalline::Union.new( + Models::Operations::TextRequest, + Models::Operations::ImageRequest, + Models::Operations::VideoRequest, + Models::Operations::AudioRequest, + Models::Operations::Object + ), + { + 'format_json': {'letter_case': ::ModerationApi::Utils.field_name("content"), required: true}, + 'discriminator': "type", + 'discriminator_mapping': { + "text" => Models::Operations::TextRequest, + "image" => Models::Operations::ImageRequest, + "video" => Models::Operations::VideoRequest, + "audio" => Models::Operations::AudioRequest, + "object" => Models::Operations::Object + } + } + ) + # Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. + field( + :timestamp, + Crystalline::Nilable.new(::Float), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("timestamp")}} + ) + # Provide a channel ID or key. Will use the project's default channel if not provided. + field( + :channel, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("channel")}} + ) + # The unique ID of the content in your database. + field( + :content_id, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("contentId")}} + ) + # The meta type of content being moderated + field( + :meta_type, + Crystalline::Nilable.new(Models::Operations::MetaType), + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("metaType"), + 'decoder': ::ModerationApi::Utils.enum_from_string(Models::Operations::MetaType, true) + } + } + ) + # The author of the content. + field( + :author_id, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("authorId")}} + ) + # For example the ID of a chat room or a post + field( + :conversation_id, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("conversationId")}} + ) + # Any metadata you want to store with the content + field( + :metadata, + Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, ::Object)), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("metadata")}} + ) + # 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. + field( + :client_action, + Crystalline::Nilable.new(Models::Operations::ClientAction), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("clientAction")}} + ) + # Do not store the content. The content won't enter the review queue + field( + :do_not_store, + Crystalline::Nilable.new(Crystalline::Boolean.new), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("doNotStore")}} + ) + # (Enterprise) override the channel policies for this moderation request only. + field( + :policies, + Crystalline::Nilable.new( + Crystalline::Array.new( + Crystalline::Union.new( + Models::Operations::Toxicity, + Models::Operations::PersonalInformation, + Models::Operations::Hate, + Models::Operations::Illicit, + Models::Operations::IllicitDrugs, + Models::Operations::IllicitAlcohol, + Models::Operations::IllicitFirearms, + Models::Operations::IllicitTobacco, + Models::Operations::IllicitGambling, + Models::Operations::Cannabis, + Models::Operations::Adult, + Models::Operations::Crypto, + Models::Operations::Sexual, + Models::Operations::SexualMinors, + Models::Operations::Profanity, + Models::Operations::Violence, + Models::Operations::SelfHarm, + Models::Operations::Spam, + Models::Operations::LowQualityContent, + Models::Operations::FaceDetection, + Models::Operations::SelfPromotion, + Models::Operations::Political, + Models::Operations::Religion, + Models::Operations::Threat, + Models::Operations::SexualSolicitation, + Models::Operations::ChannelCircumvention, + Models::Operations::IllegalTrade, + Models::Operations::Alcohol, + Models::Operations::Drugs, + Models::Operations::Gambling, + Models::Operations::Tobacco, + Models::Operations::Weapons, + Models::Operations::Promotion, + Models::Operations::Extremism, + Models::Operations::CodeAbuse, + Models::Operations::UnicodeSpoofing, + Models::Operations::PIIMasking, + Models::Operations::URLMasking, + Models::Operations::URLRisk, + Models::Operations::Guideline + ) + ) + ), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("policies")}} + ) + + sig { + params( + content: T.any( + Models::Operations::TextRequest, + Models::Operations::ImageRequest, + Models::Operations::VideoRequest, + Models::Operations::AudioRequest, + Models::Operations::Object + ), + timestamp: T.nilable(::Float), + channel: T.nilable(::String), + content_id: T.nilable(::String), + meta_type: T.nilable(Models::Operations::MetaType), + author_id: T.nilable(::String), + conversation_id: T.nilable(::String), + metadata: T.nilable(T::Hash[Symbol, ::Object]), + client_action: T.nilable(Models::Operations::ClientAction), + do_not_store: T.nilable(T::Boolean), + policies: T.nilable( + T::Array[ + T.any( + Models::Operations::Toxicity, + Models::Operations::PersonalInformation, + Models::Operations::Hate, + Models::Operations::Illicit, + Models::Operations::IllicitDrugs, + Models::Operations::IllicitAlcohol, + Models::Operations::IllicitFirearms, + Models::Operations::IllicitTobacco, + Models::Operations::IllicitGambling, + Models::Operations::Cannabis, + Models::Operations::Adult, + Models::Operations::Crypto, + Models::Operations::Sexual, + Models::Operations::SexualMinors, + Models::Operations::Profanity, + Models::Operations::Violence, + Models::Operations::SelfHarm, + Models::Operations::Spam, + Models::Operations::LowQualityContent, + Models::Operations::FaceDetection, + Models::Operations::SelfPromotion, + Models::Operations::Political, + Models::Operations::Religion, + Models::Operations::Threat, + Models::Operations::SexualSolicitation, + Models::Operations::ChannelCircumvention, + Models::Operations::IllegalTrade, + Models::Operations::Alcohol, + Models::Operations::Drugs, + Models::Operations::Gambling, + Models::Operations::Tobacco, + Models::Operations::Weapons, + Models::Operations::Promotion, + Models::Operations::Extremism, + Models::Operations::CodeAbuse, + Models::Operations::UnicodeSpoofing, + Models::Operations::PIIMasking, + Models::Operations::URLMasking, + Models::Operations::URLRisk, + Models::Operations::Guideline + ) + ] + ) + ) + .void + } + def initialize( + content:, + timestamp: nil, + channel: nil, + content_id: nil, + meta_type: nil, + author_id: nil, + conversation_id: nil, + metadata: nil, + client_action: nil, + do_not_store: nil, + policies: nil + ) + @content = content + @timestamp = timestamp + @channel = channel + @content_id = content_id + @meta_type = meta_type + @author_id = author_id + @conversation_id = conversation_id + @metadata = metadata + @client_action = client_action + @do_not_store = do_not_store + @policies = policies + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @content == other.content + return false unless @timestamp == other.timestamp + return false unless @channel == other.channel + return false unless @content_id == other.content_id + return false unless @meta_type == other.meta_type + return false unless @author_id == other.author_id + return false unless @conversation_id == other.conversation_id + return false unless @metadata == other.metadata + return false unless @client_action == other.client_action + return false unless @do_not_store == other.do_not_store + return false unless @policies == other.policies + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/submitcontent_requestbody.rbi b/lib/moderation_api/models/operations/submitcontent_requestbody.rbi new file mode 100644 index 00000000..67bd19e9 --- /dev/null +++ b/lib/moderation_api/models/operations/submitcontent_requestbody.rbi @@ -0,0 +1,74 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::SubmitContentRequestBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::SubmitContentRequestBody + def content + end + + def content=(str_) + end + + def timestamp + end + + def timestamp=(str_) + end + + def channel + end + + def channel=(str_) + end + + def content_id + end + + def content_id=(str_) + end + + def meta_type + end + + def meta_type=(str_) + end + + def author_id + end + + def author_id=(str_) + end + + def conversation_id + end + + def conversation_id=(str_) + end + + def metadata + end + + def metadata=(str_) + end + + def client_action + end + + def client_action=(str_) + end + + def do_not_store + end + + def do_not_store=(str_) + end + + def policies + end + + def policies=(str_) + end +end diff --git a/lib/moderation_api/models/operations/unresolvequeueitem_request.rb b/lib/moderation_api/models/operations/unresolvequeueitem_request.rb index e7eff7eb..003b3a8d 100644 --- a/lib/moderation_api/models/operations/unresolvequeueitem_request.rb +++ b/lib/moderation_api/models/operations/unresolvequeueitem_request.rb @@ -17,12 +17,27 @@ class UnresolveQueueItemRequest field :item_id, ::String, {'path_param': {'field_name': "itemId", 'style': "simple", 'explode': false}} field :body, Models::Operations::UnresolveQueueItemRequestBody, {'request': {'media_type': "application/json"}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String, item_id: ::String, body: Models::Operations::UnresolveQueueItemRequestBody).void } - def initialize(id:, item_id:, body:) + sig { + params( + id: ::String, + item_id: ::String, + body: Models::Operations::UnresolveQueueItemRequestBody, + project_id: T.nilable(::String) + ) + .void + } + def initialize(id:, item_id:, body:, project_id: nil) @id = id @item_id = item_id @body = body + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } @@ -31,6 +46,7 @@ def ==(other) return false unless @id == other.id return false unless @item_id == other.item_id return false unless @body == other.body + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/unresolvequeueitem_request.rbi b/lib/moderation_api/models/operations/unresolvequeueitem_request.rbi index 153346fa..cd64af74 100644 --- a/lib/moderation_api/models/operations/unresolvequeueitem_request.rbi +++ b/lib/moderation_api/models/operations/unresolvequeueitem_request.rbi @@ -23,4 +23,10 @@ class ModerationApi::Models::Operations::UnresolveQueueItemRequest def body=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/updateaction_request.rb b/lib/moderation_api/models/operations/updateaction_request.rb index 39b81694..c84250f5 100644 --- a/lib/moderation_api/models/operations/updateaction_request.rb +++ b/lib/moderation_api/models/operations/updateaction_request.rb @@ -15,11 +15,20 @@ class UpdateActionRequest field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} field :body, Models::Operations::UpdateActionRequestBody, {'request': {'media_type': "application/json"}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String, body: Models::Operations::UpdateActionRequestBody).void } - def initialize(id:, body:) + sig { + params(id: ::String, body: Models::Operations::UpdateActionRequestBody, project_id: T.nilable(::String)).void + } + def initialize(id:, body:, project_id: nil) @id = id @body = body + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } @@ -27,6 +36,7 @@ def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id return false unless @body == other.body + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/updateaction_request.rbi b/lib/moderation_api/models/operations/updateaction_request.rbi index 503955ab..094a52dc 100644 --- a/lib/moderation_api/models/operations/updateaction_request.rbi +++ b/lib/moderation_api/models/operations/updateaction_request.rbi @@ -17,4 +17,10 @@ class ModerationApi::Models::Operations::UpdateActionRequest def body=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/updateauthor_request.rb b/lib/moderation_api/models/operations/updateauthor_request.rb index e4a7296d..ee192dae 100644 --- a/lib/moderation_api/models/operations/updateauthor_request.rb +++ b/lib/moderation_api/models/operations/updateauthor_request.rb @@ -15,11 +15,20 @@ class UpdateAuthorRequest field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} field :body, Models::Operations::UpdateAuthorRequestBody, {'request': {'media_type': "application/json"}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String, body: Models::Operations::UpdateAuthorRequestBody).void } - def initialize(id:, body:) + sig { + params(id: ::String, body: Models::Operations::UpdateAuthorRequestBody, project_id: T.nilable(::String)).void + } + def initialize(id:, body:, project_id: nil) @id = id @body = body + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } @@ -27,6 +36,7 @@ def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id return false unless @body == other.body + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/updateauthor_request.rbi b/lib/moderation_api/models/operations/updateauthor_request.rbi index 15da73af..3dd08ff0 100644 --- a/lib/moderation_api/models/operations/updateauthor_request.rbi +++ b/lib/moderation_api/models/operations/updateauthor_request.rbi @@ -17,4 +17,10 @@ class ModerationApi::Models::Operations::UpdateAuthorRequest def body=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/updatewebhook_request.rb b/lib/moderation_api/models/operations/updatewebhook_request.rb index b201f9a4..ebe5c9b8 100644 --- a/lib/moderation_api/models/operations/updatewebhook_request.rb +++ b/lib/moderation_api/models/operations/updatewebhook_request.rb @@ -15,11 +15,20 @@ class UpdateWebhookRequest field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} field :body, Models::Operations::UpdateWebhookRequestBody, {'request': {'media_type': "application/json"}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String, body: Models::Operations::UpdateWebhookRequestBody).void } - def initialize(id:, body:) + sig { + params(id: ::String, body: Models::Operations::UpdateWebhookRequestBody, project_id: T.nilable(::String)).void + } + def initialize(id:, body:, project_id: nil) @id = id @body = body + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } @@ -27,6 +36,7 @@ def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id return false unless @body == other.body + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/updatewebhook_request.rbi b/lib/moderation_api/models/operations/updatewebhook_request.rbi index 8827d1b0..ffc03508 100644 --- a/lib/moderation_api/models/operations/updatewebhook_request.rbi +++ b/lib/moderation_api/models/operations/updatewebhook_request.rbi @@ -17,4 +17,10 @@ class ModerationApi::Models::Operations::UpdateWebhookRequest def body=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/models/operations/updatewordlist_request.rb b/lib/moderation_api/models/operations/updatewordlist_request.rb index c29f57da..9662b093 100644 --- a/lib/moderation_api/models/operations/updatewordlist_request.rb +++ b/lib/moderation_api/models/operations/updatewordlist_request.rb @@ -15,11 +15,21 @@ class UpdateWordlistRequest field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} field :body, Models::Operations::UpdateWordlistRequestBody, {'request': {'media_type': "application/json"}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) - sig { params(id: ::String, body: Models::Operations::UpdateWordlistRequestBody).void } - def initialize(id:, body:) + sig { + params(id: ::String, body: Models::Operations::UpdateWordlistRequestBody, project_id: T.nilable(::String)) + .void + } + def initialize(id:, body:, project_id: nil) @id = id @body = body + @project_id = project_id end sig { params(other: T.untyped).returns(T::Boolean) } @@ -27,6 +37,7 @@ def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id return false unless @body == other.body + return false unless @project_id == other.project_id true end end diff --git a/lib/moderation_api/models/operations/updatewordlist_request.rbi b/lib/moderation_api/models/operations/updatewordlist_request.rbi index 17d85741..5176849a 100644 --- a/lib/moderation_api/models/operations/updatewordlist_request.rbi +++ b/lib/moderation_api/models/operations/updatewordlist_request.rbi @@ -17,4 +17,10 @@ class ModerationApi::Models::Operations::UpdateWordlistRequest def body=(str_) end + + def project_id + end + + def project_id=(str_) + end end diff --git a/lib/moderation_api/queue.rb b/lib/moderation_api/queue.rb index c613ef59..eb527d62 100644 --- a/lib/moderation_api/queue.rb +++ b/lib/moderation_api/queue.rb @@ -47,16 +47,18 @@ def get_url(base_url:, url_variables: nil) sig { params( id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::GetQueueResponse) } - def retrieve(id:, timeout_ms: nil, http_headers: nil) + def retrieve(id:, project_id: nil, timeout_ms: nil, http_headers: nil) # retrieve - Get a queue # Get a queue request = Models::Operations::GetQueueRequest.new( - id: id + id: id, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -66,7 +68,7 @@ def retrieve(id:, timeout_ms: nil, http_headers: nil) "/queue/{id}", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) headers["Accept"] = "application/json" headers["user-agent"] = @sdk_configuration.user_agent @@ -328,17 +330,19 @@ def retrieve(id:, timeout_ms: nil, http_headers: nil) params( id: ::String, within_days: T.nilable(::Integer), + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::GetQueueStatsResponse) } - def get_stats(id:, within_days: nil, timeout_ms: nil, http_headers: nil) + def get_stats(id:, within_days: nil, project_id: nil, timeout_ms: nil, http_headers: nil) # get_stats - Get queue statistics # Get detailed statistics about a moderation queue including review times, action counts, and trends request = Models::Operations::GetQueueStatsRequest.new( id: id, - within_days: within_days + within_days: within_days, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -348,7 +352,7 @@ def get_stats(id:, within_days: nil, timeout_ms: nil, http_headers: nil) "/queue/{id}/stats", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) query_params = Utils.get_query_params(Models::Operations::GetQueueStatsRequest, request, nil) headers["Accept"] = "application/json" diff --git a/lib/moderation_api/sdkconfiguration.rb b/lib/moderation_api/sdkconfiguration.rb index 339e54f5..566287c1 100644 --- a/lib/moderation_api/sdkconfiguration.rb +++ b/lib/moderation_api/sdkconfiguration.rb @@ -93,9 +93,9 @@ def initialize(client, hooks, retry_config, timeout_ms, secret_key, security_sou @language = "ruby" @openapi_doc_version = "1.1.0" - @sdk_version = "3.0.0" + @sdk_version = "3.1.0" @gen_version = "internal" - @user_agent = "speakeasy-sdk/ruby 3.0.0 internal 1.1.0 moderation_api" + @user_agent = "speakeasy-sdk/ruby 3.1.0 internal 1.1.0 moderation_api" end sig { returns([String, T::Hash[Symbol, String]]) } diff --git a/lib/moderation_api/webhooks.rb b/lib/moderation_api/webhooks.rb index 711132fa..830d72b2 100644 --- a/lib/moderation_api/webhooks.rb +++ b/lib/moderation_api/webhooks.rb @@ -42,22 +42,24 @@ def get_url(base_url:, url_variables: nil) params( page: T.nilable(::Integer), page_size: T.nilable(::Integer), + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::ListWebhooksResponse) } - def list(page: nil, page_size: nil, timeout_ms: nil, http_headers: nil) + def list(page: nil, page_size: nil, project_id: nil, timeout_ms: nil, http_headers: nil) # list - List webhooks # List the webhooks of the project. The list is paginated. request = Models::Operations::ListWebhooksRequest.new( page: page, - page_size: page_size + page_size: page_size, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/webhooks" - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) query_params = Utils.get_query_params(Models::Operations::ListWebhooksRequest, request, nil) headers["Accept"] = "application/json" @@ -173,6 +175,7 @@ def list(page: nil, page_size: nil, timeout_ms: nil, http_headers: nil) sdk.list( page: next_page, page_size: request.page_size, + project_id: request.project_id, http_headers: http_headers ) end @@ -265,21 +268,26 @@ def list(page: nil, page_size: nil, timeout_ms: nil, http_headers: nil) sig { params( - request: Models::Operations::CreateWebhookRequest, + body: Models::Operations::CreateWebhookRequestBody, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::CreateWebhookResponse) } - def create(request:, timeout_ms: nil, http_headers: nil) + def create(body:, project_id: nil, timeout_ms: nil, http_headers: nil) # create - Create a webhook # 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). + request = Models::Operations::CreateWebhookRequest.new( + body: body, + project_id: project_id + ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/webhooks" - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) - req_content_type, data, form = Utils.serialize_request_body(request, false, false, :request, :json) + req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type raise StandardError, "request body is required" if data.nil? && form.nil? @@ -485,16 +493,18 @@ def create(request:, timeout_ms: nil, http_headers: nil) sig { params( id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::GetWebhookResponse) } - def retrieve(id:, timeout_ms: nil, http_headers: nil) + def retrieve(id:, project_id: nil, timeout_ms: nil, http_headers: nil) # retrieve - Get a webhook # Get a webhook by ID. request = Models::Operations::GetWebhookRequest.new( - id: id + id: id, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -504,7 +514,7 @@ def retrieve(id:, timeout_ms: nil, http_headers: nil) "/webhooks/{id}", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) headers["Accept"] = "application/json" headers["user-agent"] = @sdk_configuration.user_agent @@ -700,17 +710,19 @@ def retrieve(id:, timeout_ms: nil, http_headers: nil) params( body: Models::Operations::UpdateWebhookRequestBody, id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::UpdateWebhookResponse) } - def update(body:, id:, timeout_ms: nil, http_headers: nil) + def update(body:, id:, project_id: nil, timeout_ms: nil, http_headers: nil) # update - Update a webhook # Update a webhook. Legacy v1 webhooks are read-only: delete them and create a new webhook instead. request = Models::Operations::UpdateWebhookRequest.new( id: id, - body: body + body: body, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -720,7 +732,7 @@ def update(body:, id:, timeout_ms: nil, http_headers: nil) "/webhooks/{id}", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type @@ -950,16 +962,18 @@ def update(body:, id:, timeout_ms: nil, http_headers: nil) sig { params( id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::DeleteWebhookResponse) } - def delete(id:, timeout_ms: nil, http_headers: nil) + def delete(id:, project_id: nil, timeout_ms: nil, http_headers: nil) # delete - Delete a webhook # Delete a webhook. request = Models::Operations::DeleteWebhookRequest.new( - id: id + id: id, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -969,7 +983,7 @@ def delete(id:, timeout_ms: nil, http_headers: nil) "/webhooks/{id}", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) headers["Accept"] = "application/json" headers["user-agent"] = @sdk_configuration.user_agent diff --git a/lib/moderation_api/webhooksecret.rb b/lib/moderation_api/webhooksecret.rb index 2740bb05..6cf22cc2 100644 --- a/lib/moderation_api/webhooksecret.rb +++ b/lib/moderation_api/webhooksecret.rb @@ -38,17 +38,23 @@ def get_url(base_url:, url_variables: nil) end sig { - params(timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns( - Models::Operations::GetWebhookSecretResponse + params( + project_id: T.nilable(::String), + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) + .returns(Models::Operations::GetWebhookSecretResponse) } - def retrieve(timeout_ms: nil, http_headers: nil) + def retrieve(project_id: nil, timeout_ms: nil, http_headers: nil) # retrieve - Get the webhook signing secret # 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. + request = Models::Operations::GetWebhookSecretRequest.new( + project_id: project_id + ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/webhook-secret" - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) headers["Accept"] = "application/json" headers["user-agent"] = @sdk_configuration.user_agent diff --git a/lib/moderation_api/wordlist.rb b/lib/moderation_api/wordlist.rb index aa2a5393..83bbff0d 100644 --- a/lib/moderation_api/wordlist.rb +++ b/lib/moderation_api/wordlist.rb @@ -49,22 +49,24 @@ def get_url(base_url:, url_variables: nil) params( page: T.nilable(::Integer), page_size: T.nilable(::Integer), + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::ListWordlistsResponse) } - def list(page: nil, page_size: nil, timeout_ms: nil, http_headers: nil) + def list(page: nil, page_size: nil, project_id: nil, timeout_ms: nil, http_headers: nil) # list - List wordlists # List the wordlists of the organization. The list is paginated. request = Models::Operations::ListWordlistsRequest.new( page: page, - page_size: page_size + page_size: page_size, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/wordlist" - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) query_params = Utils.get_query_params(Models::Operations::ListWordlistsRequest, request, nil) headers["Accept"] = "application/json" @@ -180,6 +182,7 @@ def list(page: nil, page_size: nil, timeout_ms: nil, http_headers: nil) sdk.list( page: next_page, page_size: request.page_size, + project_id: request.project_id, http_headers: http_headers ) end @@ -361,16 +364,18 @@ def list(page: nil, page_size: nil, timeout_ms: nil, http_headers: nil) sig { params( id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::GetWordlistResponse) } - def retrieve(id:, timeout_ms: nil, http_headers: nil) + def retrieve(id:, project_id: nil, timeout_ms: nil, http_headers: nil) # retrieve - Get wordlist # Get a specific wordlist by ID request = Models::Operations::GetWordlistRequest.new( - id: id + id: id, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -380,7 +385,7 @@ def retrieve(id:, timeout_ms: nil, http_headers: nil) "/wordlist/{id}", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) headers["Accept"] = "application/json" headers["user-agent"] = @sdk_configuration.user_agent @@ -642,17 +647,19 @@ def retrieve(id:, timeout_ms: nil, http_headers: nil) params( body: Models::Operations::UpdateWordlistRequestBody, id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::UpdateWordlistResponse) } - def update(body:, id:, timeout_ms: nil, http_headers: nil) + def update(body:, id:, project_id: nil, timeout_ms: nil, http_headers: nil) # update - Update wordlist # Update a wordlist request = Models::Operations::UpdateWordlistRequest.new( id: id, - body: body + body: body, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -662,7 +669,7 @@ def update(body:, id:, timeout_ms: nil, http_headers: nil) "/wordlist/{id}", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type @@ -892,16 +899,18 @@ def update(body:, id:, timeout_ms: nil, http_headers: nil) sig { params( id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::GetWordlistEmbeddingStatusResponse) } - def get_embedding_status(id:, timeout_ms: nil, http_headers: nil) + def get_embedding_status(id:, project_id: nil, timeout_ms: nil, http_headers: nil) # get_embedding_status - Get embedding status # Get the current embedding progress status for a wordlist request = Models::Operations::GetWordlistEmbeddingStatusRequest.new( - id: id + id: id, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -911,7 +920,7 @@ def get_embedding_status(id:, timeout_ms: nil, http_headers: nil) "/wordlist/{id}/embedding-status", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) headers["Accept"] = "application/json" headers["user-agent"] = @sdk_configuration.user_agent diff --git a/lib/moderation_api/words.rb b/lib/moderation_api/words.rb index 09e85bd2..2c79030b 100644 --- a/lib/moderation_api/words.rb +++ b/lib/moderation_api/words.rb @@ -41,17 +41,19 @@ def get_url(base_url:, url_variables: nil) params( body: Models::Operations::AddWordlistWordsRequestBody, id: ::String, + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::AddWordlistWordsResponse) } - def add(body:, id:, timeout_ms: nil, http_headers: nil) + def add(body:, id:, project_id: nil, timeout_ms: nil, http_headers: nil) # add - Add words to wordlist # Add words to an existing wordlist request = Models::Operations::AddWordlistWordsRequest.new( id: id, - body: body + body: body, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -61,7 +63,7 @@ def add(body:, id:, timeout_ms: nil, http_headers: nil) "/wordlist/{id}/words", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type @@ -292,17 +294,19 @@ def add(body:, id:, timeout_ms: nil, http_headers: nil) params( id: ::String, words: T::Array[::String], + project_id: T.nilable(::String), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) ) .returns(Models::Operations::RemoveWordlistWordsResponse) } - def remove(id:, words:, timeout_ms: nil, http_headers: nil) + def remove(id:, words:, project_id: nil, timeout_ms: nil, http_headers: nil) # remove - Remove words from wordlist # Remove words from an existing wordlist request = Models::Operations::RemoveWordlistWordsRequest.new( id: id, - words: words + words: words, + project_id: project_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) @@ -312,7 +316,7 @@ def remove(id:, words:, timeout_ms: nil, http_headers: nil) "/wordlist/{id}/words", request ) - headers = {} + headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) query_params = Utils.get_query_params(Models::Operations::RemoveWordlistWordsRequest, request, nil) headers["Accept"] = "application/json" diff --git a/moderation_api.gemspec b/moderation_api.gemspec index 7dc1ed1c..964b27d3 100644 --- a/moderation_api.gemspec +++ b/moderation_api.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__) Gem::Specification.new do |s| s.name = 'moderation_api' - s.version = '3.0.0' + s.version = '3.1.0' s.platform = Gem::Platform::RUBY s.licenses = ['Apache-2.0'] s.summary = ''