diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index eb9d9eb..d20b281 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 9620bfba-8df9-4d0e-8796-8423b39f97f0 management: - docChecksum: 38730339aa1da77855e86c169896f12f + docChecksum: 1f41f7f3f1f9652138167d27f8b4518c docVersion: 1.1.0 speakeasyVersion: internal generationVersion: internal - releaseVersion: 2.1.1 - configChecksum: 3d9a12333f71c39e9fb299bc45245b92 + releaseVersion: 2.2.0 + configChecksum: da63d9409ef6e27083aab8b1d6def56f repoURL: https://github.com/moderation-api/sdk-python installationURL: https://github.com/moderation-api/sdk-python.git published: true @@ -47,7 +47,7 @@ trackedFiles: docs/errors/authenticationerror.md: last_write_checksum: sha1:cdb9eaf19220813ba7f8e63c39807eec5fb8f95f docs/errors/badrequesterror.md: - last_write_checksum: sha1:16a33340e3ef30ac7277ff3083ebd9867fd9ce7b + last_write_checksum: sha1:75edb4b6b9a193e6c7055b9e7106191b38acabf5 docs/errors/conflicterror.md: last_write_checksum: sha1:f5e67eedc35f8a93c2ba9675a5bdf7ebd696e446 docs/errors/internalservererror.md: @@ -63,7 +63,7 @@ trackedFiles: docs/models/actionstat.md: last_write_checksum: sha1:dd4e71ad441cb258bb22a3823e1b334637635546 docs/models/addwordlistwordsrequest.md: - last_write_checksum: sha1:151b2ddef58b9281db21c8ef97c77531bcc239fb + last_write_checksum: sha1:7b265e94c71b165ab0123f198dbc28bc66645963 docs/models/addwordlistwordsrequestbody.md: last_write_checksum: sha1:2c2d0ee0bddfafe1779220ee07aee53179e3b6fe docs/models/addwordlistwordsresponse.md: @@ -83,7 +83,7 @@ trackedFiles: docs/models/authorstatus.md: last_write_checksum: sha1:7d7a67666c6ec82daa47ba9726c4d92792314ce1 docs/models/badrequesterrorcode.md: - last_write_checksum: sha1:2da41def3827487b66d4ce2008312eedf98df9fc + last_write_checksum: sha1:c04f6b8cc50257203e9df45a36f95f86a8d6f270 docs/models/block.md: last_write_checksum: sha1:a59f8f13228667d39879853ad05332c707c0afc8 docs/models/cannabis.md: @@ -133,7 +133,7 @@ trackedFiles: docs/models/createactionqueuebehaviourresponse.md: last_write_checksum: sha1:661904e9ebeff0db3f2fbb3db788c585ec3abb52 docs/models/createactionrequest.md: - last_write_checksum: sha1:26e01e3c84f4835a9d20cb4587cc491fbf2c189a + last_write_checksum: sha1:e5da0e8e4c4727b8b295428764c24d572b766a7a docs/models/createactionrequestbody.md: last_write_checksum: sha1:7379ce37b676bbd8cb605846560593ef698eecf4 docs/models/createactionresponse.md: @@ -145,7 +145,7 @@ trackedFiles: docs/models/createauthormetadata.md: last_write_checksum: sha1:ed6f2bb159071080f1ddde183b7e09a0033a693b docs/models/createauthorrequest.md: - last_write_checksum: sha1:cb9b5e36c24363526d703384ffbffb539a6c2cff + last_write_checksum: sha1:b4a9b35a8bc909862a043fd63db695fe14e8bf53 docs/models/createauthorrequestbody.md: last_write_checksum: sha1:4accf2383553031d511b646f7e6c265d24c28a3d docs/models/createchannelcontenttype.md: @@ -154,6 +154,10 @@ trackedFiles: last_write_checksum: sha1:379cd7d7d019aa16fa349d08fd340f9d761ef3d9 docs/models/createchannelrequestbody.md: last_write_checksum: sha1:a716f74f46bb226942ba825a5365762920dc0143 + docs/models/createprojectapikeyrequest.md: + last_write_checksum: sha1:2bc60aee79bf33184c381d21d490e02ac382ff8d + docs/models/createprojectapikeyrequestbody.md: + last_write_checksum: sha1:ea1bbb2713f18910c7e84f660099f37253754cc0 docs/models/createprojectrequest.md: last_write_checksum: sha1:3002ce5c3ad3795024e372370dfb648e4d437c49 docs/models/createwebhookeventtyperequest.md: @@ -163,7 +167,7 @@ trackedFiles: docs/models/createwebhookpayloadversion.md: last_write_checksum: sha1:fc2b9c87fa4930fea544ebf72a0491d9ee5c2c77 docs/models/createwebhookrequest.md: - last_write_checksum: sha1:c81d03ae02e67bf4c844d2acf73daa8da3ca4ed8 + last_write_checksum: sha1:c968209d10a8f5906342a5e19ea96e50766df5ed docs/models/createwebhookrequestbody.md: last_write_checksum: sha1:0ada491dab35eb0baccb75dafa0628f034ad55e0 docs/models/createwebhookresponse.md: @@ -185,11 +189,11 @@ trackedFiles: docs/models/datavideorequest.md: last_write_checksum: sha1:948cd457b3bc2ed3c352ae6d4331807883a349f9 docs/models/deleteactionrequest.md: - last_write_checksum: sha1:fbad846593f5c5cdbfecbbec1b6ea4a49de69a54 + last_write_checksum: sha1:c215bfd31f9d86eb358301f1a7d6a70222338857 docs/models/deleteactionresponse.md: last_write_checksum: sha1:d8128ce2a339c801bfa0c91ed1b1243cc974a3d1 docs/models/deleteauthorrequest.md: - last_write_checksum: sha1:a5728a965732ade72520ddab82c56050e20c5356 + last_write_checksum: sha1:219a9007c3ac0b7a037c4b05be6ecd792b9d6411 docs/models/deleteauthorresponse.md: last_write_checksum: sha1:470ec6b2dd0f1e3fa81c9b67bdf00524270de610 docs/models/deletechannelrequest.md: @@ -201,7 +205,7 @@ trackedFiles: docs/models/deleteprojectresponse.md: last_write_checksum: sha1:57597dca05a2fcd6f6b1ef129f7cd834cc5316ba docs/models/deletewebhookrequest.md: - last_write_checksum: sha1:9dbb85c90303baca11b0c01ae365ab3931d0778b + last_write_checksum: sha1:f72533a66e9b9c50ee17bcde04ac8db58bb129d0 docs/models/deletewebhookresponse.md: last_write_checksum: sha1:9c274b660824d02e9fc18bab98ef18fd9027add1 docs/models/drugs.md: @@ -227,7 +231,7 @@ trackedFiles: docs/models/evaluation.md: last_write_checksum: sha1:dc81ec6315567fca488efc6da9a16b4ca6899925 docs/models/executeactionrequest.md: - last_write_checksum: sha1:5d7370245564436d96d25779cdadaa17c1b8d83b + last_write_checksum: sha1:0abecf77c13cb692445ccdfcea1b5959da107f0f docs/models/executeactionrequestbody.md: last_write_checksum: sha1:0d3920ab521ccbdb6a396510bcc6e626ffd634b7 docs/models/executeactionresponse.md: @@ -247,7 +251,7 @@ trackedFiles: docs/models/gambling.md: last_write_checksum: sha1:343bbfe2f0a7f12e50f78e0c6da7eda073de026d docs/models/getaccountrequest.md: - last_write_checksum: sha1:67a196a0b7940e0262cca727ab5dc8c1de909271 + last_write_checksum: sha1:6fec30c934161c0e100e8465cec3f3f76f9cef1d docs/models/getaccountresponse.md: last_write_checksum: sha1:7f88c1b881320e8cf86763cd05088e75e549a22e docs/models/getactionposition.md: @@ -257,13 +261,13 @@ trackedFiles: docs/models/getactionqueuebehaviour.md: last_write_checksum: sha1:3f1e1988781d3f52fec875063ee677bfba485db2 docs/models/getactionrequest.md: - last_write_checksum: sha1:faf3a88059f30078a2fbb0f106d8f2a91905d9c6 + last_write_checksum: sha1:c4c9f8aa63612d05fde6dccaa207945fb09b6165 docs/models/getactionresponse.md: last_write_checksum: sha1:bad30829267fbc4ba772be0f905f4a6537ec164f docs/models/getactiontype.md: last_write_checksum: sha1:2c93577a65ac4a4e32889986e486b5efd0848646 docs/models/getauthorrequest.md: - last_write_checksum: sha1:1f95a36d459b88f81511f18433ac1b58778955c6 + last_write_checksum: sha1:c384eac5bb2e8c8da0c335f80c5ac547b7c15d24 docs/models/getchannelrequest.md: last_write_checksum: sha1:6f995844a8ce5166bcb1994a0d2ebe2458e98fa9 docs/models/getprojectrequest.md: @@ -275,11 +279,11 @@ trackedFiles: docs/models/getqueuerecommendationaction.md: last_write_checksum: sha1:bc6702b02de201c183034d644f701aa1afbd6901 docs/models/getqueuerequest.md: - last_write_checksum: sha1:1eda4e3dfdc20027253291f438aa1841d005e6b8 + last_write_checksum: sha1:4848efecb4f07fe634e7f8e90fe58b8460424e87 docs/models/getqueueresponse.md: last_write_checksum: sha1:92fbe19cabcc7751157bd1043491e26bed955085 docs/models/getqueuestatsrequest.md: - last_write_checksum: sha1:98538d9432b43fbabefd4a278f7ad7bd8432f194 + last_write_checksum: sha1:259c90317c0946463a4502797872a3fa6847c742 docs/models/getqueuestatsresponse.md: last_write_checksum: sha1:fcbe4d64e0d11aa962ba42bdad4fb15c09a08d48 docs/models/getqueuetype.md: @@ -289,19 +293,19 @@ trackedFiles: docs/models/getwebhookpayloadversion.md: last_write_checksum: sha1:60b692ba995e47aa4a6207788a11c118717b48b9 docs/models/getwebhookrequest.md: - last_write_checksum: sha1:e93633db06a13556c00c384f27805b2d5421ceca + last_write_checksum: sha1:d6499c34e7a20c6988e15c66409643c1e43999a7 docs/models/getwebhookresponse.md: last_write_checksum: sha1:aab2bc255c774bcb7e7c7f21fb349be95f021e98 docs/models/getwebhooksecretrequest.md: - last_write_checksum: sha1:ada90bc34a17c3529199b7f8b0b15c1120f8ed35 + last_write_checksum: sha1:aacb17fb70a7453d77cbacc7d7cc00abea95429d docs/models/getwebhooksecretresponse.md: last_write_checksum: sha1:2b522faf79d9aeb7a83d515b6f9a9caf7e5c3e7e docs/models/getwordlistembeddingstatusrequest.md: - last_write_checksum: sha1:07638073c137b10148987b07c7d7866ad70e3706 + last_write_checksum: sha1:26c37676d80ae5efbc549e0277dc2ec20eee574d docs/models/getwordlistembeddingstatusresponse.md: last_write_checksum: sha1:8a14bd9f775b10af8cc179aa5e7a072775c4e956 docs/models/getwordlistrequest.md: - last_write_checksum: sha1:684c0944558456fe2f2a2d13c4099d646c0f99fc + last_write_checksum: sha1:d4ed2aa5b6046c0635ba90dd884ace16439ea901 docs/models/getwordlistresponse.md: last_write_checksum: sha1:47a1730eb606700aba8d367e0f3613f741c9a31b docs/models/guideline.md: @@ -343,7 +347,7 @@ trackedFiles: docs/models/listactionsqueuebehaviour.md: last_write_checksum: sha1:64482ff4675f11131fce0dc1279544a67a94ee3a docs/models/listactionsrequest.md: - last_write_checksum: sha1:c458b34df82f4783d638c5c47e7e2a79d0a726db + last_write_checksum: sha1:5f69f511891432550d15d5b60f00b87dca3b8427 docs/models/listactionsresponse.md: last_write_checksum: sha1:58f2ed5f656ee6cf7cd83b0565dc21d1a23ac034 docs/models/listactionsresponsebody.md: @@ -351,7 +355,7 @@ trackedFiles: docs/models/listactionstype.md: last_write_checksum: sha1:0acfca31cf44c1d30a705feb78bafa018407152c docs/models/listauthorsrequest.md: - last_write_checksum: sha1:3763ad95bb74fdd85c3c5fbd617d01fc053368e3 + last_write_checksum: sha1:5e29ee6f2304c04e1476b01f42768aaae61133aa docs/models/listauthorsresponse.md: last_write_checksum: sha1:54190f4a9d6e175bcb07946f024079d9d75f73a1 docs/models/listauthorsresponsebody.md: @@ -377,7 +381,7 @@ trackedFiles: docs/models/listqueueitemslabel.md: last_write_checksum: sha1:0c4fcb2565877c1ba680c14f5931e031bb8d01e3 docs/models/listqueueitemsrequest.md: - last_write_checksum: sha1:356a48e77490eb1e9514e5d040ea6a5893d73005 + last_write_checksum: sha1:900987e235dbc6547718f1f61d87e4584a0c39db docs/models/listqueueitemsresponse.md: last_write_checksum: sha1:e64d55d94911de55deceb1229745943edbd32f81 docs/models/listqueueitemsresponsebody.md: @@ -393,7 +397,7 @@ trackedFiles: docs/models/listwebhookspayloadversion.md: last_write_checksum: sha1:1e5703533be94f7611a849073310f8472c877b45 docs/models/listwebhooksrequest.md: - last_write_checksum: sha1:02d4e1a8fcc9707517094ef9f61a3d0f8b1c0d4e + last_write_checksum: sha1:d1f97b364eef69030b4ea73d36e24d9b90b78041 docs/models/listwebhooksresponse.md: last_write_checksum: sha1:0d455d264c8f505d8ece9be38a7eabf0296241cc docs/models/listwebhooksresponsebody.md: @@ -401,7 +405,7 @@ trackedFiles: docs/models/listwordlistsdata.md: last_write_checksum: sha1:c494cff76fdb516204f6e9e8e3b7c31648d36f12 docs/models/listwordlistsrequest.md: - last_write_checksum: sha1:96c18cb532e49cb86d0fea0feab40368f266c854 + last_write_checksum: sha1:e3c73911abada9a4a910582f2a9f5002764ca7b1 docs/models/listwordlistsresponse.md: last_write_checksum: sha1:42695dbad3b56ec850f5f607f68932de9ceaffac docs/models/listwordlistsresponsebody.md: @@ -450,6 +454,8 @@ trackedFiles: last_write_checksum: sha1:c7552728b6eef5b380a57e9a4c1c3216c5b74805 docs/models/project.md: last_write_checksum: sha1:9c90aec9e27e572b30379a6f44fc78d746dabf7e + docs/models/projectapikey.md: + last_write_checksum: sha1:0b451a661ae175160635a7127a08b16544121f13 docs/models/projectglobalflaggingmode.md: last_write_checksum: sha1:e849c01b3b79fd799d4f74664020a06b849d7c2b docs/models/projectwithkey.md: @@ -471,11 +477,11 @@ trackedFiles: docs/models/religion.md: last_write_checksum: sha1:5759f26a6aa19140b1595347d3284cfd22fa7a27 docs/models/removewordlistwordsrequest.md: - last_write_checksum: sha1:ae339bbf9b8b3c3f9c72477f9106500bfb5b8400 + last_write_checksum: sha1:87aad649088d7808d7b267086c2ec5aa96dc5f2c docs/models/removewordlistwordsresponse.md: last_write_checksum: sha1:5efef48f1d38df8e532615c71c4f05de2b0e28f8 docs/models/resolvequeueitemrequest.md: - last_write_checksum: sha1:ac952995d1bdd7d90a43194bea9efb28e613b36f + last_write_checksum: sha1:103170e93f85fbfdd54570c81db530b4bcbb9fdb docs/models/resolvequeueitemrequestbody.md: last_write_checksum: sha1:d9aa0601044346030a10359a0e1c42108aa116c7 docs/models/resolvequeueitemresponse.md: @@ -533,9 +539,9 @@ trackedFiles: docs/models/submitcontentrecommendationaction.md: last_write_checksum: sha1:06144cc93759541217b52422e5824aea219a3b79 docs/models/submitcontentrequest.md: - last_write_checksum: sha1:aba3be182385a7d35fbfc8f914adb951169f096a + last_write_checksum: sha1:8860c6a21d8f97574f194579b29d4edb775ecedd docs/models/submitcontentrequestbody.md: - last_write_checksum: sha1:4efef96df742c08c58a789ac10466bde0078deb2 + last_write_checksum: sha1:01adf09cb69e6c8bd137ddbc2f54fac25de70927 docs/models/submitcontentresponse.md: last_write_checksum: sha1:5ee6a1d316786c81e73bef8dfbd3dc83ef0bd4e2 docs/models/submitcontenttrustlevel.md: @@ -565,7 +571,7 @@ trackedFiles: docs/models/unicodespoofing.md: last_write_checksum: sha1:f226ab0193558bada5d79ae06526d468409f932e docs/models/unresolvequeueitemrequest.md: - last_write_checksum: sha1:ffc8cff20a7c6e938c7336bfaaa3e160223e5135 + last_write_checksum: sha1:fd7bd30ee752953b4e7c03d68285b4ebf8707ddc docs/models/unresolvequeueitemrequestbody.md: last_write_checksum: sha1:c15925f824a99518690275583046a1a12bd8ac6f docs/models/unresolvequeueitemresponse.md: @@ -583,7 +589,7 @@ trackedFiles: docs/models/updateactionqueuebehaviourresponse.md: last_write_checksum: sha1:205931c65c91088e37bb6149a19dda68e5707747 docs/models/updateactionrequest.md: - last_write_checksum: sha1:a5cee74f1520eaaab8a5a67013ab375a1565c03f + last_write_checksum: sha1:57f3671fc3aba6734c3ea4aaa12fbe8b8e938921 docs/models/updateactionrequestbody.md: last_write_checksum: sha1:7e85045ea6a3b5572f4adacca145739c4162bb04 docs/models/updateactionresponse.md: @@ -595,7 +601,7 @@ trackedFiles: docs/models/updateauthormetadata.md: last_write_checksum: sha1:315bcc1ec596952c947cf2051dd69def9007069c docs/models/updateauthorrequest.md: - last_write_checksum: sha1:906a01d465821e9172a9e9498eb8af2e115e1830 + last_write_checksum: sha1:8bd29a2df2ca5471b989c370e487e4fc00a28f0b docs/models/updateauthorrequestbody.md: last_write_checksum: sha1:16944b8b257aff425b8eb79ef1e22d0832801e55 docs/models/updatechannelcontenttype.md: @@ -621,13 +627,13 @@ trackedFiles: docs/models/updatewebhookpayloadversion.md: last_write_checksum: sha1:3fb625590fd0e45de0ed945c6de287de6a411202 docs/models/updatewebhookrequest.md: - last_write_checksum: sha1:66f1f66f60a762e1dd08cc9f8a6fd4e975fc6164 + last_write_checksum: sha1:7976400f8705d5150e648087912e0f6e0d5610eb docs/models/updatewebhookrequestbody.md: last_write_checksum: sha1:b7a27316af235c9c6cab03dd8424da0d42a5d95d docs/models/updatewebhookresponse.md: last_write_checksum: sha1:f9e9209f9c2ae24296c9349c891ef2bc2592f167 docs/models/updatewordlistrequest.md: - last_write_checksum: sha1:99eeed30ea0922542fe10a34e141367fa934b47c + last_write_checksum: sha1:6eefdd58cc1a9e722d97d57f459118e427d9047d docs/models/updatewordlistrequestbody.md: last_write_checksum: sha1:3f7ae7eee8f69e4f566d07bee25f7a4e9700b648 docs/models/updatewordlistresponse.md: @@ -653,35 +659,37 @@ trackedFiles: docs/models/withinunit.md: last_write_checksum: sha1:ca17d9ca4c86ddfec9b1808b0c10228fd81ac2c3 docs/sdks/account/README.md: - last_write_checksum: sha1:2451b51ed183ab247d05c5044df4c7a9a8be3573 + last_write_checksum: sha1:c32364abb6cabbbee7f5bf82fe310cacd7413f8e docs/sdks/actions/README.md: - last_write_checksum: sha1:e00bb473366b6437b8e0ee78f162a2fc78e718d7 + last_write_checksum: sha1:07376377faa14d3c68ca073e3022836a766a1c29 + docs/sdks/apikeys/README.md: + last_write_checksum: sha1:7c2084b4693e79cbe12a987e1c524e7d6802fb0c docs/sdks/authors/README.md: - last_write_checksum: sha1:eed884a739b5df009fea277bc141689eb9db6b22 + last_write_checksum: sha1:fe564d23656d63b48a13b8ac7fc82006594fa210 docs/sdks/channels/README.md: last_write_checksum: sha1:01c0e51bc630e4f5cb937e39faf535e894547fd3 docs/sdks/contentsdk/README.md: - last_write_checksum: sha1:b50dd8d8a1872e957df3da4fa36d189d7bb126d4 + last_write_checksum: sha1:ae7567227195c2042169e7821e2dec64c311bebe docs/sdks/items/README.md: - last_write_checksum: sha1:994cd5aa1e04b3646e24922f8b16a76e12e17942 + last_write_checksum: sha1:266ed6260dbc791fa06997b61dca6aeb37d83b04 docs/sdks/projects/README.md: last_write_checksum: sha1:a256679120b221c4cabb8026f7ccceaea7ca22c7 docs/sdks/queuesdk/README.md: - last_write_checksum: sha1:9b7055228c0acc9e38f2796ed188fe6f5343bcc4 + last_write_checksum: sha1:59ab19afc5041ce84fc5996a0c53c6c26ac92c7e docs/sdks/webhooks/README.md: - last_write_checksum: sha1:306d9f6587191c859ff953ce731eebc3ccece232 + last_write_checksum: sha1:010e87f943933a75a26a82152767953f8f489533 docs/sdks/webhooksecret/README.md: - last_write_checksum: sha1:891943f7d09a8b3cfd886342e1d2fe169ad1a670 + last_write_checksum: sha1:4d0b1dc7b8d78b321e15d45ec039a0786ae44c45 docs/sdks/wordlist/README.md: - last_write_checksum: sha1:47467527cf6316a4a5a09c7275f1abde64554b8d + last_write_checksum: sha1:379f2e123937ad929ff7dd0714fbfb051fd65770 docs/sdks/words/README.md: - last_write_checksum: sha1:3f411237e8fb54e99aafa7b6cdfb3fbcf9046286 + last_write_checksum: sha1:6c81772f1cc8e8a8e09289b29f2bd7b5f1eeba9e py.typed: last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pylintrc: last_write_checksum: sha1:cb40e5fd2885dcf20f7c572a590b2656efe282a0 pyproject.toml: - last_write_checksum: sha1:194d3d0511d59ba7a0fc47a58ed0253a3d74922d + last_write_checksum: sha1:d22ee36bb66dd2ff46a523fdf3a7ab3ec9d19fe0 scripts/prepare_readme.py: last_write_checksum: sha1:7b330dc0eb57c916a1158fd90c6227f8dc517c83 scripts/publish.sh: @@ -695,25 +703,27 @@ trackedFiles: src/moderation_api/_hooks/types.py: last_write_checksum: sha1:bb2a67c388c536a910bd205bd9582065c5d2de39 src/moderation_api/_version.py: - last_write_checksum: sha1:3846cc0f16d9c62f387bc8ee9b1f3f7911ad8e49 + last_write_checksum: sha1:b53e0176440b60608a08fc1969b89e3be0c31739 src/moderation_api/account.py: - last_write_checksum: sha1:b83155ed2e9ddea53715fef16adf03683ea99006 + last_write_checksum: sha1:184d7da98d57398f23b83a572d3105e361ba430f src/moderation_api/actions.py: - last_write_checksum: sha1:1286e7aad3a4ceefc7e4577739dd69aca56d1187 + last_write_checksum: sha1:857f21700842ddcf2db17d4636ea07911312c080 + src/moderation_api/apikeys.py: + last_write_checksum: sha1:c8a66456925ce3c5837af354536f49485fd71967 src/moderation_api/authors.py: - last_write_checksum: sha1:cf4951338154371c5b5cfd4c538b95f8782fb812 + last_write_checksum: sha1:b74e240f7e15feadd407092452d9d3d447194677 src/moderation_api/basesdk.py: last_write_checksum: sha1:026fbd5780e5d5c70d00c0e8503e124ce2cf9779 src/moderation_api/channels.py: last_write_checksum: sha1:427f7ba3e717e4cdadbff8bca70a602c9a2a9c81 src/moderation_api/content_sdk.py: - last_write_checksum: sha1:48fe6b376029b2cde3070cc39b062cb8e37cd536 + last_write_checksum: sha1:5aa0a894d0ee19d44a783a38b6778e3709c333ac src/moderation_api/errors/__init__.py: last_write_checksum: sha1:043e566785713d1aee1f2709cf3083cb51df01f6 src/moderation_api/errors/authenticationerror.py: last_write_checksum: sha1:25027f18db3e06adcae00114d10d346e19c47914 src/moderation_api/errors/badrequesterror.py: - last_write_checksum: sha1:22b41329268d5e4f7101ca76891ee3c94895b077 + last_write_checksum: sha1:3154f9151b284c0b386cbce1deb07a344013d4f9 src/moderation_api/errors/conflicterror.py: last_write_checksum: sha1:752e430486a83a8cc9b48bbf13a507dacc9607dd src/moderation_api/errors/internalservererror.py: @@ -735,39 +745,41 @@ trackedFiles: src/moderation_api/httpclient.py: last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7 src/moderation_api/items.py: - last_write_checksum: sha1:b4d7bab76c059007d3b3ef5adf3e2050ca94ebc8 + last_write_checksum: sha1:d1dd8a88abf20eeb2d43c93ab8973f89a1aa2f31 src/moderation_api/models/__init__.py: - last_write_checksum: sha1:3824295e85fd397dac661d261f1dfb3b2df193b0 + last_write_checksum: sha1:a0061f09f1939f05593a6ec9d08428f2548cad2e src/moderation_api/models/addwordlistwordsop.py: - last_write_checksum: sha1:870752f7f9f29e5430b3beeecbd1bb7b158ab175 + last_write_checksum: sha1:45d3dd92a286fa5b17f4eb79b5ed12062d019f4d src/moderation_api/models/authenticationerror.py: last_write_checksum: sha1:63c299ddbc05b97c083d497836594c1619815fab src/moderation_api/models/badrequesterror.py: - last_write_checksum: sha1:ea326d388bb1339930b2141d857571b470c711e4 + last_write_checksum: sha1:c259e6e34c6c5d53f479ee4ae1125d49441d001a src/moderation_api/models/channel.py: last_write_checksum: sha1:3f3a27e1b1c4d719244f22748c0af2b043729b27 src/moderation_api/models/conflicterror.py: last_write_checksum: sha1:43e729d2dcf16ae6791a6c4ee1b5cab373611296 src/moderation_api/models/createactionop.py: - last_write_checksum: sha1:75512203ad595c2880c67ca595cc5d275f518d28 + last_write_checksum: sha1:9340ac9faed8f02d991ce698b714bed24ce283e8 src/moderation_api/models/createauthorop.py: - last_write_checksum: sha1:4928b8e9fc27f72ba565c1e5266824efd05c080e + last_write_checksum: sha1:ea6d2517d34754fb72a008fcf2f6cd180f54975d src/moderation_api/models/createchannelop.py: last_write_checksum: sha1:19f3857bbc2c1d66f906465518a4ae26e34ea666 + src/moderation_api/models/createprojectapikeyop.py: + last_write_checksum: sha1:ead74822c855d5d27185a89d0766c04f48235b4f src/moderation_api/models/createprojectop.py: last_write_checksum: sha1:dc16578de2a09db059dccfe18712b42d767f1a62 src/moderation_api/models/createwebhookop.py: - last_write_checksum: sha1:abe6642f63eba52524e5c1654dd65ee4d9fe761f + last_write_checksum: sha1:9b21670eafa242702f8a7cc543b1b9081e95fe1f src/moderation_api/models/deleteactionop.py: - last_write_checksum: sha1:180aa4fa98d90dad14da78dbefb521f387bc0841 + last_write_checksum: sha1:6da8c2822a5dc5b44584961e6f2d286723eba68c src/moderation_api/models/deleteauthorop.py: - last_write_checksum: sha1:5d1b8c36891f1b7247fe77b5de1f6bab1de98d1a + last_write_checksum: sha1:5d692cc19ca5243b490003b2e76614bc593d30f0 src/moderation_api/models/deletechannelop.py: last_write_checksum: sha1:b1798fa3342ed1d046d89f40ae7f72a41c6a9e87 src/moderation_api/models/deleteprojectop.py: last_write_checksum: sha1:2e84a7999f679a87ef393eb0c44805bd687d2e7d src/moderation_api/models/deletewebhookop.py: - last_write_checksum: sha1:9e829c2b8f89f5801902f0dd6a78e7e83ec4f8bd + last_write_checksum: sha1:97c6f00957de3ac31a7a50533faa3040771622d6 src/moderation_api/models/duplicatechannelop.py: last_write_checksum: sha1:ac62e5fe7064a3b241935390d57002ed98bcc1e1 src/moderation_api/models/duplicateprojectop.py: @@ -775,45 +787,45 @@ trackedFiles: src/moderation_api/models/errorissue.py: last_write_checksum: sha1:12ac40f4f3533dad0cb604a67f2f70e6b07254f0 src/moderation_api/models/executeactionop.py: - last_write_checksum: sha1:6dff012c5267ec742e7f5ea852245d41bc881d8f + last_write_checksum: sha1:a9333bbe8bb479afc965f2472ce055d02760cfeb src/moderation_api/models/getaccountop.py: - last_write_checksum: sha1:2307dcddd805f86cf3cfc37a7754fc31da185191 + last_write_checksum: sha1:d71cab397b15d4514f7c585fe89669cfc815a75b src/moderation_api/models/getactionop.py: - last_write_checksum: sha1:29badfdfa294cbfff429ce5f156cfed15084469b + last_write_checksum: sha1:450920cda7969d1955cfe355c23d3666b9248383 src/moderation_api/models/getauthorop.py: - last_write_checksum: sha1:19551cefcdda8f89fa073ad4a7907d41cb154ded + last_write_checksum: sha1:dd7b2a70171289444cf99a7c99c177bc83c4b0ab src/moderation_api/models/getchannelop.py: last_write_checksum: sha1:1ee37733cbe95895109c9e6c1d38b6d6bfd75b68 src/moderation_api/models/getprojectop.py: last_write_checksum: sha1:66b15cd300d9810dbb258211e2bb77f7d08fb2bd src/moderation_api/models/getqueueop.py: - last_write_checksum: sha1:9dee8b4291f66c5528d25a379a15f139ee119c14 + last_write_checksum: sha1:7b33a9cc08c535a4e9d5aed93e8f081334058825 src/moderation_api/models/getqueuestatsop.py: - last_write_checksum: sha1:76e8d5d3b43288793e3a586d2e5053ec008a2bef + last_write_checksum: sha1:b4522570056b3fa7098e5ca1cac92199a4cb7649 src/moderation_api/models/getwebhookop.py: - last_write_checksum: sha1:3bd33c8c94a39d956340f3251ff69badd27e3102 + last_write_checksum: sha1:b95ed0cd15a4b280727db23139a11903161e92b5 src/moderation_api/models/getwebhooksecretop.py: - last_write_checksum: sha1:dc87f26e4c211a3a876f4e569d445b5ab91b6883 + last_write_checksum: sha1:fcc1daba7bf3cdc955e2c71d8b612ddef42a4514 src/moderation_api/models/getwordlistembeddingstatusop.py: - last_write_checksum: sha1:e0940ba3f64232c17cb7b5634099c21bf1309c1e + last_write_checksum: sha1:e7c9de3abd6a0a739d3a9059734fb3b138f03075 src/moderation_api/models/getwordlistop.py: - last_write_checksum: sha1:f2a2503cad43bcc383f16215d0751d1b571021b7 + last_write_checksum: sha1:ed3bc2252157b06bb9e5cbf219a43da89e50c21d src/moderation_api/models/internalservererror.py: last_write_checksum: sha1:aa2999b9b9209cf1a43bdf0d065ccf890f79007b src/moderation_api/models/listactionsop.py: - last_write_checksum: sha1:17a8344a068530cc0c46d0b726a7b62c73bcc6b7 + last_write_checksum: sha1:3798d5c43d638bc609537341135d09765327bf25 src/moderation_api/models/listauthorsop.py: - last_write_checksum: sha1:5b6e792705e6077f35db579fdbc2644636dabeff + last_write_checksum: sha1:d899b52a0734463ea604b43b60152874f98f0162 src/moderation_api/models/listchannelsop.py: last_write_checksum: sha1:cf3ab07af3ad06ae35fa6e3ed6783f292d77e914 src/moderation_api/models/listprojectsop.py: last_write_checksum: sha1:71cf5c9825f4f7e2a6aa31149946079f7a45cb08 src/moderation_api/models/listqueueitemsop.py: - last_write_checksum: sha1:874a4353f6732e5d4dc523975c000b6c2cc042ab + last_write_checksum: sha1:30f64b25403600d47c094b1d60a6a165ca813041 src/moderation_api/models/listwebhooksop.py: - last_write_checksum: sha1:5dd067d74745d7d832474830e75edc3e2fd3a16f + last_write_checksum: sha1:513b6d9b7b8c86d93452fe10f01c3df6e7bbb727 src/moderation_api/models/listwordlistsop.py: - last_write_checksum: sha1:4cb88caafa938d3b648f8a8833ae05eff67f0d8d + last_write_checksum: sha1:40dd2840356e753f6b855b6e5537e43ffc5f8bb3 src/moderation_api/models/notfounderror.py: last_write_checksum: sha1:a44e99269c4be4942eb84a4d9fa364a9b17f90db src/moderation_api/models/pagination.py: @@ -822,6 +834,8 @@ trackedFiles: last_write_checksum: sha1:10b6b6a23e0c8c67612ca46253ba07fc5c27f0f5 src/moderation_api/models/project.py: last_write_checksum: sha1:8b63414b298ed52321834567de4da1f6becb40e9 + src/moderation_api/models/projectapikey.py: + last_write_checksum: sha1:ea093f509107ba03a06007a4b140831e27e74443 src/moderation_api/models/projectwithkey.py: last_write_checksum: sha1:6517b6324c0193f660d410d1a9d0b392e3ff6203 src/moderation_api/models/publicauthor.py: @@ -829,33 +843,33 @@ trackedFiles: src/moderation_api/models/ratelimiterror.py: last_write_checksum: sha1:0e2a9611cd0b938fcdcab514d2f667fb6286bfe1 src/moderation_api/models/removewordlistwordsop.py: - last_write_checksum: sha1:d677c10b4b7ff4ba1c017b1acece737bf4266476 + last_write_checksum: sha1:7cb9e8a08223096df7ffece80ff363b0208a56fe src/moderation_api/models/resolvequeueitemop.py: - last_write_checksum: sha1:664e811f1c8599aaa192272e3ad262fc79a371bf + last_write_checksum: sha1:6eea03a525f5e6b3657235207536357dcd531e14 src/moderation_api/models/security.py: last_write_checksum: sha1:dc71db919301e2ed408358e7b2066a8cb30c581b src/moderation_api/models/submitcontentop.py: - last_write_checksum: sha1:748596299c2ae4a9ce0c11812adb73a502489e2d + last_write_checksum: sha1:9e9513e4b49b3d97fdc40672a54ab07e170f2248 src/moderation_api/models/unresolvequeueitemop.py: - last_write_checksum: sha1:045ee159e02dad90f660dff7c733bd8f5f34aab3 + last_write_checksum: sha1:a7957e95f3e51d7c38b788d0f89640208c1f0212 src/moderation_api/models/updateactionop.py: - last_write_checksum: sha1:f43fb150a406c10f214416daa3c5af645f11411e + last_write_checksum: sha1:bfd702ef0dbf1544fdd8aaeadca0887aaa108200 src/moderation_api/models/updateauthorop.py: - last_write_checksum: sha1:e2867179b9158e38fc8433e32db233399c2b1824 + last_write_checksum: sha1:25e9912c1961b87d0bc3dcf54ee0867f20258bb4 src/moderation_api/models/updatechannelop.py: last_write_checksum: sha1:444b3b5c68884d846d8db28f07b031fdc4a27c76 src/moderation_api/models/updateprojectop.py: last_write_checksum: sha1:700ccc086f59950dcbbf78d2f52796064fa63c12 src/moderation_api/models/updatewebhookop.py: - last_write_checksum: sha1:52c4f9e3432d4fadf70d54d0ad82882a80323616 + last_write_checksum: sha1:48de08773e7f5d13d92bf33e77ae2648a68eb339 src/moderation_api/models/updatewordlistop.py: - last_write_checksum: sha1:6be4160c8a8ae9f64d2937e63075dd5d23c72aa5 + last_write_checksum: sha1:815a21f660128e2455a6b0b42a90a03766f409dc src/moderation_api/projects.py: - last_write_checksum: sha1:a4aece7aba0496936fd398d185c0de035fe4828f + last_write_checksum: sha1:b77f9726cc282d48d7a2adfa2803b68b8e26548c src/moderation_api/py.typed: last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 src/moderation_api/queue_sdk.py: - last_write_checksum: sha1:83aa4d12c49541e692cf28eb5c93feef283e5833 + last_write_checksum: sha1:c5d568c0aad5206bb12944568e423607871ad668 src/moderation_api/sdk.py: last_write_checksum: sha1:580ff8ec9ef32cc4f9a4e488a4a4f319f3a0304c src/moderation_api/sdkconfiguration.py: @@ -905,13 +919,13 @@ trackedFiles: src/moderation_api/utils/values.py: last_write_checksum: sha1:c0eaaf8779a4ba3ae068579a57182667efef0cb7 src/moderation_api/webhooks.py: - last_write_checksum: sha1:151dc8211b7dc7dec6e5a8c3e67baee3cbfe2ade + last_write_checksum: sha1:91e77617ae1f143a25c614bae8bb2d0832561f1d src/moderation_api/webhooksecret.py: - last_write_checksum: sha1:168033acf81ec6f9d7feff2a7956f9db9fc58ed2 + last_write_checksum: sha1:df2b346a770a6c777b2fbab21d4c189c2c196d2f src/moderation_api/wordlist.py: - last_write_checksum: sha1:ed4062ea524540feffe978990340a296b6c08b98 + last_write_checksum: sha1:e751b1c846ade928668c1aceb03fdf35deade5be src/moderation_api/words.py: - last_write_checksum: sha1:d589167bc24d375b66088de2407faeb1a2209c5e + last_write_checksum: sha1:27f34da4c40657bedee24f2b1d885811b4db0b58 examples: listAuthors: speakeasy-default-list-authors: @@ -1662,4 +1676,24 @@ examples: application/json: {"type": "not_found_error", "code": "resource_not_found", "message": "Not found", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://insecure-premium.com/"} "429": application/json: {"type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://upset-hydrant.info/"} + createProjectApiKey: + speakeasy-default-create-project-api-key: + parameters: + path: + id: "" + requestBody: + application/json: {"name": "API key"} + responses: + "200": + application/json: {"id": "", "name": "", "projectId": "", "createdAt": "1711588645112", "secretKey": ""} + "400": + application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://rusty-responsibility.com"} + "401": + application/json: {"type": "authentication_error", "code": "unauthorized", "message": "Authorization not provided", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://compassionate-chow.net"} + "403": + application/json: {"type": "permission_error", "code": "permission_denied", "message": "Insufficient access", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://buzzing-convection.com/"} + "404": + application/json: {"type": "not_found_error", "code": "resource_not_found", "message": "Not found", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://impractical-bin.info/"} + "429": + application/json: {"type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://damaged-bandwidth.name"} examplesVersion: 1.0.2 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 979bf98..ddcef65 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false python: - version: 2.1.1 + version: 2.2.0 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/openapi.json b/.speakeasy/openapi.json index 31ff464..db3f0fc 100644 --- a/.speakeasy/openapi.json +++ b/.speakeasy/openapi.json @@ -153,7 +153,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -296,7 +296,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -539,7 +539,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -656,7 +656,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -897,7 +897,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -1025,7 +1025,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -1440,7 +1440,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -1843,7 +1843,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -2120,7 +2120,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -2276,7 +2276,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -2442,7 +2442,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -2713,7 +2713,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -3065,7 +3065,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -3290,7 +3290,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -3641,7 +3641,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -3745,7 +3745,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -3909,7 +3909,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -4068,7 +4068,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -4234,7 +4234,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -4449,7 +4449,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -4599,7 +4599,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -4809,7 +4809,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -4903,7 +4903,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -4978,7 +4978,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -5000,7 +5000,7 @@ "type": "string" }, "doNotStore": { - "description": "Do not store the content. The content won't enter the review queue", + "description": "Process the content without saving it on our servers. The item is still created and appears in the review queue, analytics and author history with its moderation results, but its content is empty, so reviewers cannot see what was submitted.", "type": "boolean" }, "authorId": { @@ -5282,7 +5282,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -5304,7 +5304,7 @@ "type": "string" }, "doNotStore": { - "description": "Do not store the content. The content won't enter the review queue", + "description": "Process the content without saving it on our servers. The item is still created and appears in the review queue, analytics and author history with its moderation results, but its content is empty, so reviewers cannot see what was submitted.", "type": "boolean" }, "authorId": { @@ -5586,7 +5586,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -5697,7 +5697,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -5799,7 +5799,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -5932,7 +5932,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -6129,7 +6129,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -6303,7 +6303,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -6494,7 +6494,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -6634,7 +6634,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -6795,7 +6795,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -6906,7 +6906,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -7201,7 +7201,7 @@ ] }, "doNotStore": { - "description": "Do not store the content. The content won't enter the review queue", + "description": "Process the content without saving it on our servers. The item is still created and appears in the review queue, analytics and author history with its moderation results, but its content is empty, so reviewers cannot see what was submitted.", "type": "boolean" }, "policies": { @@ -10002,6 +10002,124 @@ } } }, + "/projects/{id}/api-keys": { + "post": { + "operationId": "createProjectApiKey", + "summary": "Create a project API key", + "description": "Create a new secret API key for a project and return it. Give each app or computer its own key, so you can revoke one without breaking the others. The project's existing keys keep working. 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." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "default": "API key", + "description": "A name for the key, shown on the API keys page of the dashboard. Name it after where the key is used, for example the app or the computer.", + "type": "string", + "minLength": 1, + "maxLength": 50 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "API key created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectApiKey" + } + } + } + }, + "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.apiKeys", + "x-speakeasy-name-override": "create", + "x-speakeasy-mcp": { + "title": "Create a project API key", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, "/projects/{projectId}/channels": { "get": { "operationId": "listChannels", @@ -10871,7 +10989,7 @@ "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.", + "description": "The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.", "x-speakeasy-name-override": "projectId" } ], @@ -11314,6 +11432,39 @@ ], "additionalProperties": false }, + "ProjectApiKey": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the API key." + }, + "name": { + "type": "string", + "description": "The key's name." + }, + "projectId": { + "type": "string", + "description": "The ID of the project the key belongs to." + }, + "createdAt": { + "description": "When the key was created.", + "type": "string" + }, + "secretKey": { + "type": "string", + "description": "The new secret API key. Use it to moderate content in this project. It is also shown in the project's settings." + } + }, + "required": [ + "id", + "name", + "projectId", + "createdAt", + "secretKey" + ], + "additionalProperties": false + }, "Channel": { "type": "object", "properties": { @@ -13555,10 +13706,11 @@ "enum": [ "invalid_request", "project_id_required", + "project_name_ambiguous", "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`.", + "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 key reaches more than one project. `message` lists the projects it reaches.\n- `project_name_ambiguous`: The name in `Project-Id` fits more than one project the key reaches. `message` lists them; name the project by ID instead.\n- `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`.", "example": "invalid_request" }, "message": { diff --git a/CHANGELOG.md b/CHANGELOG.md index a5479e3..53a3550 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,51 @@ # Changelog +## 2.2.0 (2026-10-23) + +Full Changelog: [v2.1.1...v2.2.0](https://github.com/moderation-api/sdk-python/compare/v2.1.1...v2.2.0) + +### API changes + +- `GET /actions`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /actions`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /actions/execute`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /actions/{actionId}/execute`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `DELETE /actions/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /actions/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `PUT /actions/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /auth`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /auth`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /authors`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /authors`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `DELETE /authors/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /authors/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `PUT /authors/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `DELETE /channels/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `PUT /channels/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /channels/{id}/duplicate`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /moderate`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /moderate/image`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /moderate/text`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /projects`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `PUT /projects/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /projects/{id}/duplicate`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /projects/{projectId}/channels`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /queue/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /queue/{id}/items`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /queue/{id}/items/{itemId}/resolve`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /queue/{id}/items/{itemId}/unresolve`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /queue/{id}/stats`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /webhooks`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `PUT /webhooks/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /wordlist`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /wordlist/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `PUT /wordlist/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /wordlist/{id}/embedding-status`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `DELETE /wordlist/{id}/words`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `POST /wordlist/{id}/words`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- a breaking change was detected but the version is still `1.1.0` +- `POST /projects/{id}/api-keys`: endpoint added + ## 2.1.1 (2026-10-22) Full Changelog: [v2.1.0...v2.1.1](https://github.com/moderation-api/sdk-python/compare/v2.1.0...v2.1.1) diff --git a/README.md b/README.md index f3652aa..3e83eb4 100644 --- a/README.md +++ b/README.md @@ -309,9 +309,9 @@ with ModerationAPI( Moderation API has two kinds of API keys: - A **project key** works with one project: content, authors, review queues, actions, wordlists, webhooks and the account. Most integrations need only this key. -- An **organization key** works with the [management API](https://docs.moderationapi.com/api-reference/management-api): projects and channels. The management API is available on Enterprise plans. +- An **organization key** works with the [management API](https://docs.moderationapi.com/api-reference/management-api): projects and channels. It can also use any project's endpoints: name the project with `projectId`. -Each key works only with its own endpoints. With the wrong key the API returns `403` with the code `project_key_required` or `organization_key_required`. If you use both, create one client for each key: +A project key can't call the management API: the API returns `403` with the code `organization_key_required`. If you use both kinds of key, create one client for each: ```python import os @@ -383,6 +383,10 @@ Create the organization client only where you manage projects and channels, for * [delete](docs/sdks/projects/README.md#delete) - Delete a project * [duplicate](docs/sdks/projects/README.md#duplicate) - Duplicate a project +#### [Projects.ApiKeys](docs/sdks/apikeys/README.md) + +* [create](docs/sdks/apikeys/README.md#create) - Create a project API key + ### [Queue](docs/sdks/queuesdk/README.md) * [retrieve](docs/sdks/queuesdk/README.md#retrieve) - Get a queue @@ -565,11 +569,11 @@ with ModerationAPI( **Inherit from [`ModerationAPIError`](./src/moderation_api/errors/moderationapierror.py)**: -* [`BadRequestError`](./src/moderation_api/errors/badrequesterror.py): The request is malformed or a parameter is invalid. Status code `400`. Applicable to 32 of 42 methods.* -* [`NotFoundError`](./src/moderation_api/errors/notfounderror.py): The resource does not exist or the key cannot see it. Status code `404`. Applicable to 31 of 42 methods.* -* [`PermissionDeniedError`](./src/moderation_api/errors/permissiondeniederror.py): The API key cannot do this, or the plan limit for this resource is reached. Status code `403`. Applicable to 27 of 42 methods.* -* [`InternalServerError`](./src/moderation_api/errors/internalservererror.py): Something went wrong on our side. Retry with backoff. Status code `500`. Applicable to 15 of 42 methods.* -* [`ConflictError`](./src/moderation_api/errors/conflicterror.py): The request conflicts with the current state of a resource. Status code `409`. Applicable to 2 of 42 methods.* +* [`BadRequestError`](./src/moderation_api/errors/badrequesterror.py): The request is malformed or a parameter is invalid. Status code `400`. Applicable to 33 of 43 methods.* +* [`NotFoundError`](./src/moderation_api/errors/notfounderror.py): The resource does not exist or the key cannot see it. Status code `404`. Applicable to 32 of 43 methods.* +* [`PermissionDeniedError`](./src/moderation_api/errors/permissiondeniederror.py): The API key cannot do this, or the plan limit for this resource is reached. Status code `403`. Applicable to 28 of 43 methods.* +* [`InternalServerError`](./src/moderation_api/errors/internalservererror.py): Something went wrong on our side. Retry with backoff. Status code `500`. Applicable to 15 of 43 methods.* +* [`ConflictError`](./src/moderation_api/errors/conflicterror.py): The request conflicts with the current state of a resource. Status code `409`. Applicable to 2 of 43 methods.* * [`ResponseValidationError`](./src/moderation_api/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/docs/errors/badrequesterror.md b/docs/errors/badrequesterror.md index a90fb4f..3d56af1 100644 --- a/docs/errors/badrequesterror.md +++ b/docs/errors/badrequesterror.md @@ -5,11 +5,11 @@ The request is malformed or a parameter is invalid. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *Literal["invalid_request_error"]* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | -| `code` | [models.BadRequestErrorCode](../models/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` | *str* | :heavy_check_mark: | Human-readable explanation. | Invalid input data | -| `issues` | List[[models.ErrorIssue](../models/errorissue.md)] | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | -| `request_id` | *str* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | -| `doc_url` | *str* | :heavy_check_mark: | Documentation for this `code`. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *Literal["invalid_request_error"]* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | +| `code` | [models.BadRequestErrorCode](../models/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 key reaches more than one project. `message` lists the projects it reaches.
- `project_name_ambiguous`: The name in `Project-Id` fits more than one project the key reaches. `message` lists them; name the project by ID instead.
- `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`. | invalid_request | +| `message` | *str* | :heavy_check_mark: | Human-readable explanation. | Invalid input data | +| `issues` | List[[models.ErrorIssue](../models/errorissue.md)] | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | +| `request_id` | *str* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | +| `doc_url` | *str* | :heavy_check_mark: | Documentation for this `code`. | | \ No newline at end of file diff --git a/docs/models/addwordlistwordsrequest.md b/docs/models/addwordlistwordsrequest.md index a790814..f11fa8a 100644 --- a/docs/models/addwordlistwordsrequest.md +++ b/docs/models/addwordlistwordsrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | ID of the wordlist to add words to | -| `project_id` | *Optional[str]* | :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.AddWordlistWordsRequestBody](../models/addwordlistwordsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the wordlist to add words to | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `body` | [models.AddWordlistWordsRequestBody](../models/addwordlistwordsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/badrequesterrorcode.md b/docs/models/badrequesterrorcode.md index 6d6f2eb..2d0009d 100644 --- a/docs/models/badrequesterrorcode.md +++ b/docs/models/badrequesterrorcode.md @@ -3,7 +3,8 @@ 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. +- `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the key reaches more than one project. `message` lists the projects it reaches. +- `project_name_ambiguous`: The name in `Project-Id` fits more than one project the key reaches. `message` lists them; name the project by ID instead. - `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`. ## Example Usage @@ -22,4 +23,5 @@ This is an open enum. Unrecognized values will not fail type checks. - `"invalid_request"` - `"project_id_required"` +- `"project_name_ambiguous"` - `"validation_failed"` diff --git a/docs/models/createactionrequest.md b/docs/models/createactionrequest.md index fe4debe..03e997e 100644 --- a/docs/models/createactionrequest.md +++ b/docs/models/createactionrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *Optional[str]* | :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.CreateActionRequestBody](../models/createactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `body` | [models.CreateActionRequestBody](../models/createactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createauthorrequest.md b/docs/models/createauthorrequest.md index fe82824..996ca48 100644 --- a/docs/models/createauthorrequest.md +++ b/docs/models/createauthorrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *Optional[str]* | :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.CreateAuthorRequestBody](../models/createauthorrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `body` | [models.CreateAuthorRequestBody](../models/createauthorrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createprojectapikeyrequest.md b/docs/models/createprojectapikeyrequest.md new file mode 100644 index 0000000..f796310 --- /dev/null +++ b/docs/models/createprojectapikeyrequest.md @@ -0,0 +1,9 @@ +# CreateProjectAPIKeyRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `id` | *str* | :heavy_check_mark: | The ID of the project. | +| `body` | [models.CreateProjectAPIKeyRequestBody](../models/createprojectapikeyrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createprojectapikeyrequestbody.md b/docs/models/createprojectapikeyrequestbody.md new file mode 100644 index 0000000..7682c5e --- /dev/null +++ b/docs/models/createprojectapikeyrequestbody.md @@ -0,0 +1,8 @@ +# CreateProjectAPIKeyRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *Optional[str]* | :heavy_minus_sign: | A name for the key, shown on the API keys page of the dashboard. Name it after where the key is used, for example the app or the computer. | \ No newline at end of file diff --git a/docs/models/createwebhookrequest.md b/docs/models/createwebhookrequest.md index f27a707..a03dac3 100644 --- a/docs/models/createwebhookrequest.md +++ b/docs/models/createwebhookrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *Optional[str]* | :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.CreateWebhookRequestBody](../models/createwebhookrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `body` | [models.CreateWebhookRequestBody](../models/createwebhookrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deleteactionrequest.md b/docs/models/deleteactionrequest.md index d93ca0a..1992e7b 100644 --- a/docs/models/deleteactionrequest.md +++ b/docs/models/deleteactionrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the action to delete. | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the action to delete. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/deleteauthorrequest.md b/docs/models/deleteauthorrequest.md index b157a10..d093ee4 100644 --- a/docs/models/deleteauthorrequest.md +++ b/docs/models/deleteauthorrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/deletewebhookrequest.md b/docs/models/deletewebhookrequest.md index a696f83..5ad2622 100644 --- a/docs/models/deletewebhookrequest.md +++ b/docs/models/deletewebhookrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the webhook to delete. | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the webhook to delete. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/executeactionrequest.md b/docs/models/executeactionrequest.md index 21db116..cea445b 100644 --- a/docs/models/executeactionrequest.md +++ b/docs/models/executeactionrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *Optional[str]* | :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.ExecuteActionRequestBody](../models/executeactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `body` | [models.ExecuteActionRequestBody](../models/executeactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getaccountrequest.md b/docs/models/getaccountrequest.md index f9607c0..9d93122 100644 --- a/docs/models/getaccountrequest.md +++ b/docs/models/getaccountrequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/getactionrequest.md b/docs/models/getactionrequest.md index 0a6a6df..fe66dc3 100644 --- a/docs/models/getactionrequest.md +++ b/docs/models/getactionrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the action to get. | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the action to get. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/getauthorrequest.md b/docs/models/getauthorrequest.md index 8bf053e..ea7ea50 100644 --- a/docs/models/getauthorrequest.md +++ b/docs/models/getauthorrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/getqueuerequest.md b/docs/models/getqueuerequest.md index c23c1b9..5dad4ed 100644 --- a/docs/models/getqueuerequest.md +++ b/docs/models/getqueuerequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The queue ID | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The queue ID | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/getqueuestatsrequest.md b/docs/models/getqueuestatsrequest.md index 4e0fe04..c6eecca 100644 --- a/docs/models/getqueuestatsrequest.md +++ b/docs/models/getqueuestatsrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The queue ID | -| `within_days` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The queue ID | +| `within_days` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/getwebhookrequest.md b/docs/models/getwebhookrequest.md index 3872a90..36084e6 100644 --- a/docs/models/getwebhookrequest.md +++ b/docs/models/getwebhookrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the webhook to get. | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the webhook to get. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/getwebhooksecretrequest.md b/docs/models/getwebhooksecretrequest.md index 23cddfb..a575b12 100644 --- a/docs/models/getwebhooksecretrequest.md +++ b/docs/models/getwebhooksecretrequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/getwordlistembeddingstatusrequest.md b/docs/models/getwordlistembeddingstatusrequest.md index 98ffd59..e824dcf 100644 --- a/docs/models/getwordlistembeddingstatusrequest.md +++ b/docs/models/getwordlistembeddingstatusrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | ID of the wordlist to check embedding status for | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the wordlist to check embedding status for | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/getwordlistrequest.md b/docs/models/getwordlistrequest.md index 227adc7..3caf7cf 100644 --- a/docs/models/getwordlistrequest.md +++ b/docs/models/getwordlistrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | ID of the wordlist to get | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the wordlist to get | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/listactionsrequest.md b/docs/models/listactionsrequest.md index 21f188c..c76a91f 100644 --- a/docs/models/listactionsrequest.md +++ b/docs/models/listactionsrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `queue_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `queue_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/listauthorsrequest.md b/docs/models/listauthorsrequest.md index 6fbf789..53159df 100644 --- a/docs/models/listauthorsrequest.md +++ b/docs/models/listauthorsrequest.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `sort_by` | [Optional[models.SortBy]](../models/sortby.md) | :heavy_minus_sign: | N/A | -| `sort_direction` | [Optional[models.ListAuthorsSortDirection]](../models/listauthorssortdirection.md) | :heavy_minus_sign: | Sort direction | -| `member_since_date` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `last_active_date` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `content_types` | List[*str*] | :heavy_minus_sign: | N/A | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `sort_by` | [Optional[models.SortBy]](../models/sortby.md) | :heavy_minus_sign: | N/A | +| `sort_direction` | [Optional[models.ListAuthorsSortDirection]](../models/listauthorssortdirection.md) | :heavy_minus_sign: | Sort direction | +| `member_since_date` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `last_active_date` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `content_types` | List[*str*] | :heavy_minus_sign: | N/A | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/listqueueitemsrequest.md b/docs/models/listqueueitemsrequest.md index f00198f..1884122 100644 --- a/docs/models/listqueueitemsrequest.md +++ b/docs/models/listqueueitemsrequest.md @@ -3,18 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The queue ID | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `sort_field` | [Optional[models.SortField]](../models/sortfield.md) | :heavy_minus_sign: | N/A | -| `sort_direction` | [Optional[models.ListQueueItemsSortDirection]](../models/listqueueitemssortdirection.md) | :heavy_minus_sign: | Sort direction | -| `conversation_ids` | List[*str*] | :heavy_minus_sign: | N/A | -| `labels` | List[*str*] | :heavy_minus_sign: | N/A | -| `after_date` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `before_date` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `include_resolved` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `author_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `filtered_action_ids` | List[*str*] | :heavy_minus_sign: | N/A | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The queue ID | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `sort_field` | [Optional[models.SortField]](../models/sortfield.md) | :heavy_minus_sign: | N/A | +| `sort_direction` | [Optional[models.ListQueueItemsSortDirection]](../models/listqueueitemssortdirection.md) | :heavy_minus_sign: | Sort direction | +| `conversation_ids` | List[*str*] | :heavy_minus_sign: | N/A | +| `labels` | List[*str*] | :heavy_minus_sign: | N/A | +| `after_date` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `before_date` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `include_resolved` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `author_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `filtered_action_ids` | List[*str*] | :heavy_minus_sign: | N/A | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/listwebhooksrequest.md b/docs/models/listwebhooksrequest.md index 7f580a8..157250c 100644 --- a/docs/models/listwebhooksrequest.md +++ b/docs/models/listwebhooksrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/listwordlistsrequest.md b/docs/models/listwordlistsrequest.md index f9a69e4..e32c7e5 100644 --- a/docs/models/listwordlistsrequest.md +++ b/docs/models/listwordlistsrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/projectapikey.md b/docs/models/projectapikey.md new file mode 100644 index 0000000..1daddab --- /dev/null +++ b/docs/models/projectapikey.md @@ -0,0 +1,12 @@ +# ProjectAPIKey + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the API key. | +| `name` | *str* | :heavy_check_mark: | The key's name. | +| `project_id` | *str* | :heavy_check_mark: | The ID of the project the key belongs to. | +| `created_at` | *str* | :heavy_check_mark: | When the key was created. | +| `secret_key` | *str* | :heavy_check_mark: | The new secret API key. Use it to moderate content in this project. It is also shown in the project's settings. | \ No newline at end of file diff --git a/docs/models/removewordlistwordsrequest.md b/docs/models/removewordlistwordsrequest.md index dbe27f0..3371b2d 100644 --- a/docs/models/removewordlistwordsrequest.md +++ b/docs/models/removewordlistwordsrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | ID of the wordlist to remove words from | -| `words` | List[*str*] | :heavy_check_mark: | Array of words to remove from the wordlist | -| `project_id` | *Optional[str]* | :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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the wordlist to remove words from | +| `words` | List[*str*] | :heavy_check_mark: | Array of words to remove from the wordlist | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | \ No newline at end of file diff --git a/docs/models/resolvequeueitemrequest.md b/docs/models/resolvequeueitemrequest.md index 1482340..d3657ea 100644 --- a/docs/models/resolvequeueitemrequest.md +++ b/docs/models/resolvequeueitemrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The queue ID | -| `item_id` | *str* | :heavy_check_mark: | The item ID to resolve | -| `project_id` | *Optional[str]* | :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.ResolveQueueItemRequestBody](../models/resolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The queue ID | +| `item_id` | *str* | :heavy_check_mark: | The item ID to resolve | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `body` | [models.ResolveQueueItemRequestBody](../models/resolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/submitcontentrequest.md b/docs/models/submitcontentrequest.md index 0b7d63d..74389f0 100644 --- a/docs/models/submitcontentrequest.md +++ b/docs/models/submitcontentrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *Optional[str]* | :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.SubmitContentRequestBody](../models/submitcontentrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `body` | [models.SubmitContentRequestBody](../models/submitcontentrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/submitcontentrequestbody.md b/docs/models/submitcontentrequestbody.md index d6f65e4..9a98ed2 100644 --- a/docs/models/submitcontentrequestbody.md +++ b/docs/models/submitcontentrequestbody.md @@ -3,16 +3,16 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `content` | [models.ContentRequest](../models/contentrequest.md) | :heavy_check_mark: | The content sent for moderation | -| `timestamp` | *Optional[float]* | :heavy_minus_sign: | Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. | -| `channel` | *Optional[str]* | :heavy_minus_sign: | Provide a channel ID or key. Will use the project's default channel if not provided. | -| `content_id` | *Optional[str]* | :heavy_minus_sign: | The unique ID of the content in your database. | -| `meta_type` | [Optional[models.SubmitContentMetaType]](../models/submitcontentmetatype.md) | :heavy_minus_sign: | The meta type of content being moderated | -| `author_id` | *Optional[str]* | :heavy_minus_sign: | The author of the content. | -| `conversation_id` | *Optional[str]* | :heavy_minus_sign: | For example the ID of a chat room or a post | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Any metadata you want to store with the content | -| `client_action` | [Optional[models.SubmitContentClientAction]](../models/submitcontentclientaction.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` | *Optional[bool]* | :heavy_minus_sign: | Do not store the content. The content won't enter the review queue | -| `policies` | List[[models.PolicyRequest](../models/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 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `content` | [models.ContentRequest](../models/contentrequest.md) | :heavy_check_mark: | The content sent for moderation | +| `timestamp` | *Optional[float]* | :heavy_minus_sign: | Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. | +| `channel` | *Optional[str]* | :heavy_minus_sign: | Provide a channel ID or key. Will use the project's default channel if not provided. | +| `content_id` | *Optional[str]* | :heavy_minus_sign: | The unique ID of the content in your database. | +| `meta_type` | [Optional[models.SubmitContentMetaType]](../models/submitcontentmetatype.md) | :heavy_minus_sign: | The meta type of content being moderated | +| `author_id` | *Optional[str]* | :heavy_minus_sign: | The author of the content. | +| `conversation_id` | *Optional[str]* | :heavy_minus_sign: | For example the ID of a chat room or a post | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Any metadata you want to store with the content | +| `client_action` | [Optional[models.SubmitContentClientAction]](../models/submitcontentclientaction.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` | *Optional[bool]* | :heavy_minus_sign: | Process the content without saving it on our servers. The item is still created and appears in the review queue, analytics and author history with its moderation results, but its content is empty, so reviewers cannot see what was submitted. | +| `policies` | List[[models.PolicyRequest](../models/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/unresolvequeueitemrequest.md b/docs/models/unresolvequeueitemrequest.md index b3a0e3b..6bb93ca 100644 --- a/docs/models/unresolvequeueitemrequest.md +++ b/docs/models/unresolvequeueitemrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The queue ID | -| `item_id` | *str* | :heavy_check_mark: | The item ID to unresolve | -| `project_id` | *Optional[str]* | :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.UnresolveQueueItemRequestBody](../models/unresolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The queue ID | +| `item_id` | *str* | :heavy_check_mark: | The item ID to unresolve | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `body` | [models.UnresolveQueueItemRequestBody](../models/unresolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updateactionrequest.md b/docs/models/updateactionrequest.md index 690ab2a..5fb0c33 100644 --- a/docs/models/updateactionrequest.md +++ b/docs/models/updateactionrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the action to update. | -| `project_id` | *Optional[str]* | :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.UpdateActionRequestBody](../models/updateactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the action to update. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `body` | [models.UpdateActionRequestBody](../models/updateactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updateauthorrequest.md b/docs/models/updateauthorrequest.md index a3bf2c9..9b0d56e 100644 --- a/docs/models/updateauthorrequest.md +++ b/docs/models/updateauthorrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `project_id` | *Optional[str]* | :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.UpdateAuthorRequestBody](../models/updateauthorrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `body` | [models.UpdateAuthorRequestBody](../models/updateauthorrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updatewebhookrequest.md b/docs/models/updatewebhookrequest.md index bfdc84a..bb0cada 100644 --- a/docs/models/updatewebhookrequest.md +++ b/docs/models/updatewebhookrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the webhook to update. | -| `project_id` | *Optional[str]* | :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.UpdateWebhookRequestBody](../models/updatewebhookrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the webhook to update. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `body` | [models.UpdateWebhookRequestBody](../models/updatewebhookrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updatewordlistrequest.md b/docs/models/updatewordlistrequest.md index 41f281f..00c51aa 100644 --- a/docs/models/updatewordlistrequest.md +++ b/docs/models/updatewordlistrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | ID of the wordlist to update | -| `project_id` | *Optional[str]* | :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.UpdateWordlistRequestBody](../models/updatewordlistrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the wordlist to update | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `body` | [models.UpdateWordlistRequestBody](../models/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 a39f4f8..6fbdb15 100644 --- a/docs/sdks/account/README.md +++ b/docs/sdks/account/README.md @@ -31,10 +31,10 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/actions/README.md b/docs/sdks/actions/README.md index baf82d7..d7ca661 100644 --- a/docs/sdks/actions/README.md +++ b/docs/sdks/actions/README.md @@ -38,13 +38,13 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `queue_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `queue_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -87,21 +87,21 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | The name of the action. | -| `project_id` | *Optional[str]* | :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. | -| `key` | *OptionalNullable[str]* | :heavy_minus_sign: | User defined key of the action. | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the action. | -| `type` | [OptionalNullable[models.CreateActionTypeRequest]](../../models/createactiontyperequest.md) | :heavy_minus_sign: | The type of the action. | -| `built_in` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the action is a built-in action or a custom one. | -| `queue_behaviour` | [Optional[models.CreateActionQueueBehaviourRequest]](../../models/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` | List[*str*] | :heavy_minus_sign: | The IDs of the queues the action is available in. | -| `position` | [Optional[models.CreateActionPositionRequest]](../../models/createactionpositionrequest.md) | :heavy_minus_sign: | Show the action in all queues, selected queues or no queues (to use via API only). | -| `possible_values` | List[[models.CreateActionPossibleValueRequest](../../models/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` | *Optional[bool]* | :heavy_minus_sign: | Whether the action requires a value to be executed. | -| `free_text` | *Optional[bool]* | :heavy_minus_sign: | Whether the action allows any text to be entered as a value or if it must be one of the possible values. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | The name of the action. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `key` | *OptionalNullable[str]* | :heavy_minus_sign: | User defined key of the action. | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the action. | +| `type` | [OptionalNullable[models.CreateActionTypeRequest]](../../models/createactiontyperequest.md) | :heavy_minus_sign: | The type of the action. | +| `built_in` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the action is a built-in action or a custom one. | +| `queue_behaviour` | [Optional[models.CreateActionQueueBehaviourRequest]](../../models/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` | List[*str*] | :heavy_minus_sign: | The IDs of the queues the action is available in. | +| `position` | [Optional[models.CreateActionPositionRequest]](../../models/createactionpositionrequest.md) | :heavy_minus_sign: | Show the action in all queues, selected queues or no queues (to use via API only). | +| `possible_values` | List[[models.CreateActionPossibleValueRequest](../../models/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` | *Optional[bool]* | :heavy_minus_sign: | Whether the action requires a value to be executed. | +| `free_text` | *Optional[bool]* | :heavy_minus_sign: | Whether the action allows any text to be entered as a value or if it must be one of the possible values. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -142,11 +142,11 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the action to get. | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the action to get. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -187,22 +187,22 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the action to update. | -| `project_id` | *Optional[str]* | :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. | -| `key` | *OptionalNullable[str]* | :heavy_minus_sign: | User defined key of the action. | -| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the action. | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the action. | -| `type` | [OptionalNullable[models.UpdateActionTypeRequest]](../../models/updateactiontyperequest.md) | :heavy_minus_sign: | The type of the action. | -| `built_in` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the action is a built-in action or a custom one. | -| `queue_behaviour` | [Optional[models.UpdateActionQueueBehaviourRequest]](../../models/updateactionqueuebehaviourrequest.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` | List[*str*] | :heavy_minus_sign: | The IDs of the queues the action is available in. | -| `position` | [Optional[models.UpdateActionPositionRequest]](../../models/updateactionpositionrequest.md) | :heavy_minus_sign: | Show the action in all queues, selected queues or no queues (to use via API only). | -| `possible_values` | List[[models.UpdateActionPossibleValueRequest](../../models/updateactionpossiblevaluerequest.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` | *Optional[bool]* | :heavy_minus_sign: | Whether the action requires a value to be executed. | -| `free_text` | *Optional[bool]* | :heavy_minus_sign: | Whether the action allows any text to be entered as a value or if it must be one of the possible values. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the action to update. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `key` | *OptionalNullable[str]* | :heavy_minus_sign: | User defined key of the action. | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the action. | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the action. | +| `type` | [OptionalNullable[models.UpdateActionTypeRequest]](../../models/updateactiontyperequest.md) | :heavy_minus_sign: | The type of the action. | +| `built_in` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the action is a built-in action or a custom one. | +| `queue_behaviour` | [Optional[models.UpdateActionQueueBehaviourRequest]](../../models/updateactionqueuebehaviourrequest.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` | List[*str*] | :heavy_minus_sign: | The IDs of the queues the action is available in. | +| `position` | [Optional[models.UpdateActionPositionRequest]](../../models/updateactionpositionrequest.md) | :heavy_minus_sign: | Show the action in all queues, selected queues or no queues (to use via API only). | +| `possible_values` | List[[models.UpdateActionPossibleValueRequest](../../models/updateactionpossiblevaluerequest.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` | *Optional[bool]* | :heavy_minus_sign: | Whether the action requires a value to be executed. | +| `free_text` | *Optional[bool]* | :heavy_minus_sign: | Whether the action allows any text to be entered as a value or if it must be one of the possible values. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -244,11 +244,11 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the action to delete. | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the action to delete. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -291,16 +291,16 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `action_key` | *str* | :heavy_check_mark: | ID or key of the action to execute | -| `project_id` | *Optional[str]* | :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. | -| `content_ids` | List[*str*] | :heavy_minus_sign: | IDs of the content items to apply the action to. Provide this or authorIds. | -| `author_ids` | List[*str*] | :heavy_minus_sign: | IDs of the authors to apply the action to. Provide this or contentIds. | -| `value` | *Optional[str]* | :heavy_minus_sign: | Optional value to provide with the action | -| `queue_id` | *Optional[str]* | :heavy_minus_sign: | Optional queue ID if the action is queue-specific | -| `duration` | *Optional[float]* | :heavy_minus_sign: | Optional duration in milliseconds for actions with timeouts | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `action_key` | *str* | :heavy_check_mark: | ID or key of the action to execute | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `content_ids` | List[*str*] | :heavy_minus_sign: | IDs of the content items to apply the action to. Provide this or authorIds. | +| `author_ids` | List[*str*] | :heavy_minus_sign: | IDs of the authors to apply the action to. Provide this or contentIds. | +| `value` | *Optional[str]* | :heavy_minus_sign: | Optional value to provide with the action | +| `queue_id` | *Optional[str]* | :heavy_minus_sign: | Optional queue ID if the action is queue-specific | +| `duration` | *Optional[float]* | :heavy_minus_sign: | Optional duration in milliseconds for actions with timeouts | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/apikeys/README.md b/docs/sdks/apikeys/README.md new file mode 100644 index 0000000..86b36a2 --- /dev/null +++ b/docs/sdks/apikeys/README.md @@ -0,0 +1,53 @@ +# Projects.ApiKeys + +## Overview + +### Available Operations + +* [create](#create) - Create a project API key + +## create + +Create a new secret API key for a project and return it. Give each app or computer its own key, so you can revoke one without breaking the others. The project's existing keys keep working. Needs the `projects:write` permission. + +### Example Usage + + +```python +from moderation_api import ModerationAPI +import os + + +with ModerationAPI( + secret_key=os.getenv("MODAPI_SECRET_KEY", ""), +) as ma_client: + + res = ma_client.projects.api_keys.create(id="", name="API key") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *str* | :heavy_check_mark: | The ID of the project. | +| `name` | *Optional[str]* | :heavy_minus_sign: | A name for the key, shown on the API keys page of the dashboard. Name it after where the key is used, for example the app or the computer. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ProjectAPIKey](../../models/projectapikey.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.BadRequestError | 400 | application/json | +| errors.AuthenticationError | 401 | application/json | +| errors.PermissionDeniedError | 403 | application/json | +| errors.NotFoundError | 404 | application/json | +| errors.RateLimitError | 429 | application/json | +| errors.ModerationAPIDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/authors/README.md b/docs/sdks/authors/README.md index 881a732..64625c1 100644 --- a/docs/sdks/authors/README.md +++ b/docs/sdks/authors/README.md @@ -86,20 +86,20 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `external_id` | *str* | :heavy_check_mark: | External ID of the user, typically the ID of the author in your database. | -| `project_id` | *Optional[str]* | :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. | -| `profile_picture` | *OptionalNullable[str]* | :heavy_minus_sign: | URL of the author's profile picture | -| `external_link` | *OptionalNullable[str]* | :heavy_minus_sign: | URL of the author's external profile | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Author name or identifier | -| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | Author email address | -| `company` | *OptionalNullable[str]* | :heavy_minus_sign: | The author's company or organization | -| `metadata` | [Optional[models.CreateAuthorMetadata]](../../models/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` | *Optional[float]* | :heavy_minus_sign: | Timestamp when author first appeared | -| `last_seen` | *Optional[float]* | :heavy_minus_sign: | Timestamp of last activity | -| `manual_trust_level` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `external_id` | *str* | :heavy_check_mark: | External ID of the user, typically the ID of the author in your database. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `profile_picture` | *OptionalNullable[str]* | :heavy_minus_sign: | URL of the author's profile picture | +| `external_link` | *OptionalNullable[str]* | :heavy_minus_sign: | URL of the author's external profile | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Author name or identifier | +| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | Author email address | +| `company` | *OptionalNullable[str]* | :heavy_minus_sign: | The author's company or organization | +| `metadata` | [Optional[models.CreateAuthorMetadata]](../../models/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` | *Optional[float]* | :heavy_minus_sign: | Timestamp when author first appeared | +| `last_seen` | *Optional[float]* | :heavy_minus_sign: | Timestamp of last activity | +| `manual_trust_level` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -141,11 +141,11 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -190,20 +190,20 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `project_id` | *Optional[str]* | :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. | -| `profile_picture` | *OptionalNullable[str]* | :heavy_minus_sign: | URL of the author's profile picture | -| `external_link` | *OptionalNullable[str]* | :heavy_minus_sign: | URL of the author's external profile | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Author name or identifier | -| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | Author email address | -| `company` | *OptionalNullable[str]* | :heavy_minus_sign: | The author's company or organization | -| `metadata` | [Optional[models.UpdateAuthorMetadata]](../../models/updateauthormetadata.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` | *Optional[float]* | :heavy_minus_sign: | Timestamp when author first appeared | -| `last_seen` | *Optional[float]* | :heavy_minus_sign: | Timestamp of last activity | -| `manual_trust_level` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `profile_picture` | *OptionalNullable[str]* | :heavy_minus_sign: | URL of the author's profile picture | +| `external_link` | *OptionalNullable[str]* | :heavy_minus_sign: | URL of the author's external profile | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Author name or identifier | +| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | Author email address | +| `company` | *OptionalNullable[str]* | :heavy_minus_sign: | The author's company or organization | +| `metadata` | [Optional[models.UpdateAuthorMetadata]](../../models/updateauthormetadata.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` | *Optional[float]* | :heavy_minus_sign: | Timestamp when author first appeared | +| `last_seen` | *Optional[float]* | :heavy_minus_sign: | Timestamp of last activity | +| `manual_trust_level` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -246,11 +246,11 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/contentsdk/README.md b/docs/sdks/contentsdk/README.md index b19f6c9..1400bad 100644 --- a/docs/sdks/contentsdk/README.md +++ b/docs/sdks/contentsdk/README.md @@ -36,21 +36,21 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `content` | [models.ContentRequest](../../models/contentrequest.md) | :heavy_check_mark: | The content sent for moderation | -| `project_id` | *Optional[str]* | :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. | -| `timestamp` | *Optional[float]* | :heavy_minus_sign: | Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. | -| `channel` | *Optional[str]* | :heavy_minus_sign: | Provide a channel ID or key. Will use the project's default channel if not provided. | -| `content_id` | *Optional[str]* | :heavy_minus_sign: | The unique ID of the content in your database. | -| `meta_type` | [Optional[models.SubmitContentMetaType]](../../models/submitcontentmetatype.md) | :heavy_minus_sign: | The meta type of content being moderated | -| `author_id` | *Optional[str]* | :heavy_minus_sign: | The author of the content. | -| `conversation_id` | *Optional[str]* | :heavy_minus_sign: | For example the ID of a chat room or a post | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Any metadata you want to store with the content | -| `client_action` | [Optional[models.SubmitContentClientAction]](../../models/submitcontentclientaction.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` | *Optional[bool]* | :heavy_minus_sign: | Do not store the content. The content won't enter the review queue | -| `policies` | List[[models.PolicyRequest](../../models/policyrequest.md)] | :heavy_minus_sign: | (Enterprise) override the channel policies for this moderation request only. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `content` | [models.ContentRequest](../../models/contentrequest.md) | :heavy_check_mark: | The content sent for moderation | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `timestamp` | *Optional[float]* | :heavy_minus_sign: | Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. | +| `channel` | *Optional[str]* | :heavy_minus_sign: | Provide a channel ID or key. Will use the project's default channel if not provided. | +| `content_id` | *Optional[str]* | :heavy_minus_sign: | The unique ID of the content in your database. | +| `meta_type` | [Optional[models.SubmitContentMetaType]](../../models/submitcontentmetatype.md) | :heavy_minus_sign: | The meta type of content being moderated | +| `author_id` | *Optional[str]* | :heavy_minus_sign: | The author of the content. | +| `conversation_id` | *Optional[str]* | :heavy_minus_sign: | For example the ID of a chat room or a post | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Any metadata you want to store with the content | +| `client_action` | [Optional[models.SubmitContentClientAction]](../../models/submitcontentclientaction.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` | *Optional[bool]* | :heavy_minus_sign: | Process the content without saving it on our servers. The item is still created and appears in the review queue, analytics and author history with its moderation results, but its content is empty, so reviewers cannot see what was submitted. | +| `policies` | List[[models.PolicyRequest](../../models/policyrequest.md)] | :heavy_minus_sign: | (Enterprise) override the channel policies for this moderation request only. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/items/README.md b/docs/sdks/items/README.md index bf242aa..4648a9e 100644 --- a/docs/sdks/items/README.md +++ b/docs/sdks/items/README.md @@ -35,22 +35,22 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The queue ID | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `sort_field` | [Optional[models.SortField]](../../models/sortfield.md) | :heavy_minus_sign: | N/A | -| `sort_direction` | [Optional[models.ListQueueItemsSortDirection]](../../models/listqueueitemssortdirection.md) | :heavy_minus_sign: | Sort direction | -| `conversation_ids` | List[*str*] | :heavy_minus_sign: | N/A | -| `labels` | List[*str*] | :heavy_minus_sign: | N/A | -| `after_date` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `before_date` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `include_resolved` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `author_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `filtered_action_ids` | List[*str*] | :heavy_minus_sign: | N/A | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The queue ID | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `sort_field` | [Optional[models.SortField]](../../models/sortfield.md) | :heavy_minus_sign: | N/A | +| `sort_direction` | [Optional[models.ListQueueItemsSortDirection]](../../models/listqueueitemssortdirection.md) | :heavy_minus_sign: | Sort direction | +| `conversation_ids` | List[*str*] | :heavy_minus_sign: | N/A | +| `labels` | List[*str*] | :heavy_minus_sign: | N/A | +| `after_date` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `before_date` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `include_resolved` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `author_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `filtered_action_ids` | List[*str*] | :heavy_minus_sign: | N/A | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -93,13 +93,13 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The queue ID | -| `item_id` | *str* | :heavy_check_mark: | The item ID to resolve | -| `project_id` | *Optional[str]* | :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. | -| `comment` | *Optional[str]* | :heavy_minus_sign: | Optional comment | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The queue ID | +| `item_id` | *str* | :heavy_check_mark: | The item ID to resolve | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `comment` | *Optional[str]* | :heavy_minus_sign: | Optional comment | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -141,13 +141,13 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The queue ID | -| `item_id` | *str* | :heavy_check_mark: | The item ID to unresolve | -| `project_id` | *Optional[str]* | :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. | -| `comment` | *Optional[str]* | :heavy_minus_sign: | Optional reason for unresolving the item | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The queue ID | +| `item_id` | *str* | :heavy_check_mark: | The item ID to unresolve | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `comment` | *Optional[str]* | :heavy_minus_sign: | Optional reason for unresolving the item | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/queuesdk/README.md b/docs/sdks/queuesdk/README.md index e129804..6ed2726 100644 --- a/docs/sdks/queuesdk/README.md +++ b/docs/sdks/queuesdk/README.md @@ -32,11 +32,11 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The queue ID | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The queue ID | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -79,12 +79,12 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The queue ID | -| `within_days` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The queue ID | +| `within_days` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 6b82957..6c8d8d2 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -37,12 +37,12 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -84,14 +84,14 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | The webhook's name, used to identify it in the dashboard | -| `url` | *str* | :heavy_check_mark: | The webhook's URL. We'll call this URL when an event occurs. | -| `event_types` | List[[models.CreateWebhookEventTypeRequest](../../models/createwebhookeventtyperequest.md)] | :heavy_check_mark: | Event types this webhook subscribes to. One webhook URL receives all events you list here. | -| `project_id` | *Optional[str]* | :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. | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The webhook's description | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | The webhook's name, used to identify it in the dashboard | +| `url` | *str* | :heavy_check_mark: | The webhook's URL. We'll call this URL when an event occurs. | +| `event_types` | List[[models.CreateWebhookEventTypeRequest](../../models/createwebhookeventtyperequest.md)] | :heavy_check_mark: | Event types this webhook subscribes to. One webhook URL receives all events you list here. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The webhook's description | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -131,11 +131,11 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the webhook to get. | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the webhook to get. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -175,15 +175,15 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the webhook to update. | -| `project_id` | *Optional[str]* | :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. | -| `name` | *Optional[str]* | :heavy_minus_sign: | The webhook's name, used to identify it in the dashboard | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The webhook's description | -| `url` | *Optional[str]* | :heavy_minus_sign: | The webhook's URL. We'll call this URL when an event occurs. | -| `event_types` | List[[models.UpdateWebhookEventTypeRequest](../../models/updatewebhookeventtyperequest.md)] | :heavy_minus_sign: | Event types this webhook subscribes to. One webhook URL receives all events you list here. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the webhook to update. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `name` | *Optional[str]* | :heavy_minus_sign: | The webhook's name, used to identify it in the dashboard | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The webhook's description | +| `url` | *Optional[str]* | :heavy_minus_sign: | The webhook's URL. We'll call this URL when an event occurs. | +| `event_types` | List[[models.UpdateWebhookEventTypeRequest](../../models/updatewebhookeventtyperequest.md)] | :heavy_minus_sign: | Event types this webhook subscribes to. One webhook URL receives all events you list here. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -224,11 +224,11 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the webhook to delete. | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the webhook to delete. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/webhooksecret/README.md b/docs/sdks/webhooksecret/README.md index 70c4307..b242afb 100644 --- a/docs/sdks/webhooksecret/README.md +++ b/docs/sdks/webhooksecret/README.md @@ -31,10 +31,10 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/wordlist/README.md b/docs/sdks/wordlist/README.md index 370a982..d4e037e 100644 --- a/docs/sdks/wordlist/README.md +++ b/docs/sdks/wordlist/README.md @@ -36,12 +36,12 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -84,11 +84,11 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | ID of the wordlist to get | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the wordlist to get | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -131,16 +131,16 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | ID of the wordlist to update | -| `project_id` | *Optional[str]* | :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. | -| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the wordlist | -| `key` | *Optional[str]* | :heavy_minus_sign: | New key for the wordlist | -| `description` | *Optional[str]* | :heavy_minus_sign: | New description for the wordlist | -| `words` | List[*str*] | :heavy_minus_sign: | New words for the wordlist. Replace the existing words with these new ones. Duplicate words will be ignored. | -| `strict` | *Optional[bool]* | :heavy_minus_sign: | Deprecated. Now using threshold in project settings. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the wordlist to update | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the wordlist | +| `key` | *Optional[str]* | :heavy_minus_sign: | New key for the wordlist | +| `description` | *Optional[str]* | :heavy_minus_sign: | New description for the wordlist | +| `words` | List[*str*] | :heavy_minus_sign: | New words for the wordlist. Replace the existing words with these new ones. Duplicate words will be ignored. | +| `strict` | *Optional[bool]* | :heavy_minus_sign: | Deprecated. Now using threshold in project settings. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -181,11 +181,11 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | ID of the wordlist to check embedding status for | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the wordlist to check embedding status for | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/words/README.md b/docs/sdks/words/README.md index 422e61b..aadc6f9 100644 --- a/docs/sdks/words/README.md +++ b/docs/sdks/words/README.md @@ -35,12 +35,12 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | ID of the wordlist to add words to | -| `words` | List[*str*] | :heavy_check_mark: | Array of words to add to the wordlist. Duplicate words will be ignored. | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the wordlist to add words to | +| `words` | List[*str*] | :heavy_check_mark: | Array of words to add to the wordlist. Duplicate words will be ignored. | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -85,12 +85,12 @@ with ModerationAPI( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | ID of the wordlist to remove words from | -| `words` | List[*str*] | :heavy_check_mark: | Array of words to remove from the wordlist | -| `project_id` | *Optional[str]* | :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. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the wordlist to remove words from | +| `words` | List[*str*] | :heavy_check_mark: | Array of words to remove from the wordlist | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/pyproject.toml b/pyproject.toml index e9a9871..344d2e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "moderation_api" -version = "2.1.1" +version = "2.2.0" description = "The official Python library for the Moderation API" authors = [{ name = "Moderation API" },] readme = "README-PYPI.md" diff --git a/src/moderation_api/_version.py b/src/moderation_api/_version.py index 678d88a..ddddf70 100644 --- a/src/moderation_api/_version.py +++ b/src/moderation_api/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "moderation_api" -__version__: str = "2.1.1" +__version__: str = "2.2.0" __openapi_doc_version__: str = "1.1.0" __gen_version__: str = "internal" -__user_agent__: str = "speakeasy-sdk/python 2.1.1 internal 1.1.0 moderation_api" +__user_agent__: str = "speakeasy-sdk/python 2.2.0 internal 1.1.0 moderation_api" try: if __package__ is not None: diff --git a/src/moderation_api/account.py b/src/moderation_api/account.py index 63326e9..09ee5f9 100644 --- a/src/moderation_api/account.py +++ b/src/moderation_api/account.py @@ -23,7 +23,7 @@ def retrieve( Get account details - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -122,7 +122,7 @@ async def retrieve_async( Get account details - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds diff --git a/src/moderation_api/actions.py b/src/moderation_api/actions.py index fcdf8d6..278bc07 100644 --- a/src/moderation_api/actions.py +++ b/src/moderation_api/actions.py @@ -30,7 +30,7 @@ def list( :param queue_id: :param page: :param page_size: - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -191,7 +191,7 @@ async def list_async( :param queue_id: :param page: :param page_size: - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -368,7 +368,7 @@ def create( Create an action. :param name: The name of the action. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param key: User defined key of the action. :param description: The description of the action. :param type: The type of the action. @@ -525,7 +525,7 @@ async def create_async( Create an action. :param name: The name of the action. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param key: User defined key of the action. :param description: The description of the action. :param type: The type of the action. @@ -665,7 +665,7 @@ def retrieve( Get an action by ID. :param id: The ID of the action to get. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -775,7 +775,7 @@ async def retrieve_async( Get an action by ID. :param id: The ID of the action to get. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -903,7 +903,7 @@ def update( Update an action. :param id: The ID of the action to update. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param key: User defined key of the action. :param name: The name of the action. :param description: The description of the action. @@ -1066,7 +1066,7 @@ async def update_async( Update an action. :param id: The ID of the action to update. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param key: User defined key of the action. :param name: The name of the action. :param description: The description of the action. @@ -1211,7 +1211,7 @@ def delete( Delete an action and all of its webhooks. :param id: The ID of the action to delete. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1321,7 +1321,7 @@ async def delete_async( Delete an action and all of its webhooks. :param id: The ID of the action to delete. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1436,7 +1436,7 @@ def execute( Execute a moderation action on one or more content items. :param action_key: ID or key of the action to execute - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param content_ids: IDs of the content items to apply the action to. Provide this or authorIds. :param author_ids: IDs of the authors to apply the action to. Provide this or contentIds. :param value: Optional value to provide with the action @@ -1566,7 +1566,7 @@ async def execute_async( Execute a moderation action on one or more content items. :param action_key: ID or key of the action to execute - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param content_ids: IDs of the content items to apply the action to. Provide this or authorIds. :param author_ids: IDs of the authors to apply the action to. Provide this or contentIds. :param value: Optional value to provide with the action diff --git a/src/moderation_api/apikeys.py b/src/moderation_api/apikeys.py new file mode 100644 index 0000000..43d23a1 --- /dev/null +++ b/src/moderation_api/apikeys.py @@ -0,0 +1,259 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from moderation_api import errors, models, utils +from moderation_api._hooks import HookContext +from moderation_api.types import OptionalNullable, UNSET +from moderation_api.utils import get_security_from_env +from moderation_api.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional + + +class APIKeys(BaseSDK): + def create( + self, + *, + id: str, + name: Optional[str] = "API key", + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ProjectAPIKey: + r"""Create a project API key + + Create a new secret API key for a project and return it. Give each app or computer its own key, so you can revoke one without breaking the others. The project's existing keys keep working. Needs the `projects:write` permission. + + :param id: The ID of the project. + :param name: A name for the key, shown on the API keys page of the dashboard. Name it after where the key is used, for example the app or the computer. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateProjectAPIKeyRequest( + id=id, + body=models.CreateProjectAPIKeyRequestBody( + name=name, + ), + ) + + req = self._build_request( + method="POST", + path="/projects/{id}/api-keys", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.body, + False, + False, + "json", + models.CreateProjectAPIKeyRequestBody, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="createProjectApiKey", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Projects"], + extensions=None, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ProjectAPIKey, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestErrorData, http_res + ) + raise errors.BadRequestError(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + errors.AuthenticationErrorData, http_res + ) + raise errors.AuthenticationError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.PermissionDeniedErrorData, http_res + ) + raise errors.PermissionDeniedError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response(errors.NotFoundErrorData, http_res) + raise errors.NotFoundError(response_data, http_res) + if utils.match_response(http_res, "429", "application/json"): + response_data = unmarshal_json_response(errors.RateLimitErrorData, http_res) + raise errors.RateLimitError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.ModerationAPIDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.ModerationAPIDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.ModerationAPIDefaultError("Unexpected response received", http_res) + + async def create_async( + self, + *, + id: str, + name: Optional[str] = "API key", + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ProjectAPIKey: + r"""Create a project API key + + Create a new secret API key for a project and return it. Give each app or computer its own key, so you can revoke one without breaking the others. The project's existing keys keep working. Needs the `projects:write` permission. + + :param id: The ID of the project. + :param name: A name for the key, shown on the API keys page of the dashboard. Name it after where the key is used, for example the app or the computer. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateProjectAPIKeyRequest( + id=id, + body=models.CreateProjectAPIKeyRequestBody( + name=name, + ), + ) + + req = self._build_request_async( + method="POST", + path="/projects/{id}/api-keys", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.body, + False, + False, + "json", + models.CreateProjectAPIKeyRequestBody, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="createProjectApiKey", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Projects"], + extensions=None, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ProjectAPIKey, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestErrorData, http_res + ) + raise errors.BadRequestError(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + errors.AuthenticationErrorData, http_res + ) + raise errors.AuthenticationError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.PermissionDeniedErrorData, http_res + ) + raise errors.PermissionDeniedError(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response(errors.NotFoundErrorData, http_res) + raise errors.NotFoundError(response_data, http_res) + if utils.match_response(http_res, "429", "application/json"): + response_data = unmarshal_json_response(errors.RateLimitErrorData, http_res) + raise errors.RateLimitError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.ModerationAPIDefaultError( + "API error occurred", http_res, http_res_text + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.ModerationAPIDefaultError( + "API error occurred", http_res, http_res_text + ) + + raise errors.ModerationAPIDefaultError("Unexpected response received", http_res) diff --git a/src/moderation_api/authors.py b/src/moderation_api/authors.py index 752a7c4..ca716f9 100644 --- a/src/moderation_api/authors.py +++ b/src/moderation_api/authors.py @@ -360,7 +360,7 @@ def create( Create a new author. Typically not needed as authors are created automatically when content is moderated. :param external_id: External ID of the user, typically the ID of the author in your database. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param profile_picture: URL of the author's profile picture :param external_link: URL of the author's external profile :param name: Author name or identifier @@ -513,7 +513,7 @@ async def create_async( Create a new author. Typically not needed as authors are created automatically when content is moderated. :param external_id: External ID of the user, typically the ID of the author in your database. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param profile_picture: URL of the author's profile picture :param external_link: URL of the author's external profile :param name: Author name or identifier @@ -655,7 +655,7 @@ def retrieve( Get detailed information about a specific author including historical data and analysis :param id: Either external ID or the ID assigned by moderation API. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -775,7 +775,7 @@ async def retrieve_async( Get detailed information about a specific author including historical data and analysis :param id: Either external ID or the ID assigned by moderation API. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -906,7 +906,7 @@ def update( Update the details of a specific author :param id: Either external ID or the ID assigned by moderation API. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param profile_picture: URL of the author's profile picture :param external_link: URL of the author's external profile :param name: Author name or identifier @@ -1062,7 +1062,7 @@ async def update_async( Update the details of a specific author :param id: Either external ID or the ID assigned by moderation API. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param profile_picture: URL of the author's profile picture :param external_link: URL of the author's external profile :param name: Author name or identifier @@ -1207,7 +1207,7 @@ def delete( Delete a specific author. This resets the author: status, blocks, trust level, metrics and action history are removed. The author is created again with a clean record the next time content is moderated for the same ID. :param id: Either external ID or the ID assigned by moderation API. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1327,7 +1327,7 @@ async def delete_async( Delete a specific author. This resets the author: status, blocks, trust level, metrics and action history are removed. The author is created again with a clean record the next time content is moderated for the same ID. :param id: Either external ID or the ID assigned by moderation API. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds diff --git a/src/moderation_api/content_sdk.py b/src/moderation_api/content_sdk.py index f9f63f7..2e1a280 100644 --- a/src/moderation_api/content_sdk.py +++ b/src/moderation_api/content_sdk.py @@ -42,7 +42,7 @@ def submit( r"""Submit content :param content: The content sent for moderation - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param timestamp: Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. :param channel: Provide a channel ID or key. Will use the project's default channel if not provided. :param content_id: The unique ID of the content in your database. @@ -51,7 +51,7 @@ def submit( :param conversation_id: For example the ID of a chat room or a post :param metadata: Any metadata you want to store with the content :param client_action: 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. - :param do_not_store: Do not store the content. The content won't enter the review queue + :param do_not_store: Process the content without saving it on our servers. The item is still created and appears in the review queue, analytics and author history with its moderation results, but its content is empty, so reviewers cannot see what was submitted. :param policies: (Enterprise) override the channel policies for this moderation request only. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -205,7 +205,7 @@ async def submit_async( r"""Submit content :param content: The content sent for moderation - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param timestamp: Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time. :param channel: Provide a channel ID or key. Will use the project's default channel if not provided. :param content_id: The unique ID of the content in your database. @@ -214,7 +214,7 @@ async def submit_async( :param conversation_id: For example the ID of a chat room or a post :param metadata: Any metadata you want to store with the content :param client_action: 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. - :param do_not_store: Do not store the content. The content won't enter the review queue + :param do_not_store: Process the content without saving it on our servers. The item is still created and appears in the review queue, analytics and author history with its moderation results, but its content is empty, so reviewers cannot see what was submitted. :param policies: (Enterprise) override the channel policies for this moderation request only. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method diff --git a/src/moderation_api/errors/badrequesterror.py b/src/moderation_api/errors/badrequesterror.py index 7534826..7332862 100644 --- a/src/moderation_api/errors/badrequesterror.py +++ b/src/moderation_api/errors/badrequesterror.py @@ -21,7 +21,8 @@ class BadRequestErrorData(BaseModel): r"""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. + - `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the key reaches more than one project. `message` lists the projects it reaches. + - `project_name_ambiguous`: The name in `Project-Id` fits more than one project the key reaches. `message` lists them; name the project by ID instead. - `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`. """ message: str diff --git a/src/moderation_api/items.py b/src/moderation_api/items.py index 4ec3080..cb34bcb 100644 --- a/src/moderation_api/items.py +++ b/src/moderation_api/items.py @@ -48,7 +48,7 @@ def list( :param include_resolved: :param author_id: :param filtered_action_ids: - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -247,7 +247,7 @@ async def list_async( :param include_resolved: :param author_id: :param filtered_action_ids: - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -430,7 +430,7 @@ def resolve( :param id: The queue ID :param item_id: The item ID to resolve - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param comment: Optional comment :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -558,7 +558,7 @@ async def resolve_async( :param id: The queue ID :param item_id: The item ID to resolve - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param comment: Optional comment :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -686,7 +686,7 @@ def unresolve( :param id: The queue ID :param item_id: The item ID to unresolve - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param comment: Optional reason for unresolving the item :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -814,7 +814,7 @@ async def unresolve_async( :param id: The queue ID :param item_id: The item ID to unresolve - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param comment: Optional reason for unresolving the item :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method diff --git a/src/moderation_api/models/__init__.py b/src/moderation_api/models/__init__.py index 308e486..7b95084 100644 --- a/src/moderation_api/models/__init__.py +++ b/src/moderation_api/models/__init__.py @@ -56,6 +56,12 @@ CreateChannelRequestBodyTypedDict, CreateChannelRequestTypedDict, ) + from .createprojectapikeyop import ( + CreateProjectAPIKeyRequest, + CreateProjectAPIKeyRequestBody, + CreateProjectAPIKeyRequestBodyTypedDict, + CreateProjectAPIKeyRequestTypedDict, + ) from .createprojectop import CreateProjectRequest, CreateProjectRequestTypedDict from .createwebhookop import ( CreateWebhookEventTypeRequest, @@ -295,6 +301,7 @@ from .pagination import Pagination, PaginationTypedDict from .permissiondeniederror import PermissionDeniedErrorCode from .project import Project, ProjectGlobalFlaggingMode, ProjectTypedDict + from .projectapikey import ProjectAPIKey, ProjectAPIKeyTypedDict from .projectwithkey import ( ProjectWithKey, ProjectWithKeyGlobalFlaggingMode, @@ -681,6 +688,10 @@ "CreateChannelRequestBody", "CreateChannelRequestBodyTypedDict", "CreateChannelRequestTypedDict", + "CreateProjectAPIKeyRequest", + "CreateProjectAPIKeyRequestBody", + "CreateProjectAPIKeyRequestBodyTypedDict", + "CreateProjectAPIKeyRequestTypedDict", "CreateProjectRequest", "CreateProjectRequestTypedDict", "CreateWebhookEventTypeRequest", @@ -949,6 +960,8 @@ "Profanity", "ProfanityTypedDict", "Project", + "ProjectAPIKey", + "ProjectAPIKeyTypedDict", "ProjectGlobalFlaggingMode", "ProjectTypedDict", "ProjectWithKey", @@ -1170,6 +1183,10 @@ "CreateChannelRequestBody": ".createchannelop", "CreateChannelRequestBodyTypedDict": ".createchannelop", "CreateChannelRequestTypedDict": ".createchannelop", + "CreateProjectAPIKeyRequest": ".createprojectapikeyop", + "CreateProjectAPIKeyRequestBody": ".createprojectapikeyop", + "CreateProjectAPIKeyRequestBodyTypedDict": ".createprojectapikeyop", + "CreateProjectAPIKeyRequestTypedDict": ".createprojectapikeyop", "CreateProjectRequest": ".createprojectop", "CreateProjectRequestTypedDict": ".createprojectop", "CreateWebhookEventTypeRequest": ".createwebhookop", @@ -1371,6 +1388,8 @@ "Project": ".project", "ProjectGlobalFlaggingMode": ".project", "ProjectTypedDict": ".project", + "ProjectAPIKey": ".projectapikey", + "ProjectAPIKeyTypedDict": ".projectapikey", "ProjectWithKey": ".projectwithkey", "ProjectWithKeyGlobalFlaggingMode": ".projectwithkey", "ProjectWithKeyTypedDict": ".projectwithkey", diff --git a/src/moderation_api/models/addwordlistwordsop.py b/src/moderation_api/models/addwordlistwordsop.py index d63e343..c98f888 100644 --- a/src/moderation_api/models/addwordlistwordsop.py +++ b/src/moderation_api/models/addwordlistwordsop.py @@ -29,7 +29,7 @@ class AddWordlistWordsRequestTypedDict(TypedDict): r"""ID of the wordlist to add words to""" body: AddWordlistWordsRequestBodyTypedDict project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class AddWordlistWordsRequest(BaseModel): @@ -48,7 +48,7 @@ class AddWordlistWordsRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/badrequesterror.py b/src/moderation_api/models/badrequesterror.py index ebaa94c..67f2d33 100644 --- a/src/moderation_api/models/badrequesterror.py +++ b/src/moderation_api/models/badrequesterror.py @@ -9,6 +9,7 @@ Literal[ "invalid_request", "project_id_required", + "project_name_ambiguous", "validation_failed", ], UnrecognizedStr, @@ -16,6 +17,7 @@ r"""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. +- `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the key reaches more than one project. `message` lists the projects it reaches. +- `project_name_ambiguous`: The name in `Project-Id` fits more than one project the key reaches. `message` lists them; name the project by ID instead. - `validation_failed`: The request body does not match the schema. `issues` lists each problem with its `path`. """ diff --git a/src/moderation_api/models/createactionop.py b/src/moderation_api/models/createactionop.py index c622ab3..d806580 100644 --- a/src/moderation_api/models/createactionop.py +++ b/src/moderation_api/models/createactionop.py @@ -167,7 +167,7 @@ def serialize_model(self, handler): class CreateActionRequestTypedDict(TypedDict): body: CreateActionRequestBodyTypedDict project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class CreateActionRequest(BaseModel): @@ -181,7 +181,7 @@ class CreateActionRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/createauthorop.py b/src/moderation_api/models/createauthorop.py index ef93ed7..87f7cd6 100644 --- a/src/moderation_api/models/createauthorop.py +++ b/src/moderation_api/models/createauthorop.py @@ -201,7 +201,7 @@ def serialize_model(self, handler): class CreateAuthorRequestTypedDict(TypedDict): body: CreateAuthorRequestBodyTypedDict project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class CreateAuthorRequest(BaseModel): @@ -215,7 +215,7 @@ class CreateAuthorRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/createprojectapikeyop.py b/src/moderation_api/models/createprojectapikeyop.py new file mode 100644 index 0000000..7ef8a18 --- /dev/null +++ b/src/moderation_api/models/createprojectapikeyop.py @@ -0,0 +1,52 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from moderation_api.types import BaseModel, UNSET_SENTINEL +from moderation_api.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CreateProjectAPIKeyRequestBodyTypedDict(TypedDict): + name: NotRequired[str] + r"""A name for the key, shown on the API keys page of the dashboard. Name it after where the key is used, for example the app or the computer.""" + + +class CreateProjectAPIKeyRequestBody(BaseModel): + name: Optional[str] = "API key" + r"""A name for the key, shown on the API keys page of the dashboard. Name it after where the key is used, for example the app or the computer.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["name"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class CreateProjectAPIKeyRequestTypedDict(TypedDict): + id: str + r"""The ID of the project.""" + body: CreateProjectAPIKeyRequestBodyTypedDict + + +class CreateProjectAPIKeyRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The ID of the project.""" + + body: Annotated[ + CreateProjectAPIKeyRequestBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/moderation_api/models/createwebhookop.py b/src/moderation_api/models/createwebhookop.py index f8910db..b168f52 100644 --- a/src/moderation_api/models/createwebhookop.py +++ b/src/moderation_api/models/createwebhookop.py @@ -86,7 +86,7 @@ def serialize_model(self, handler): class CreateWebhookRequestTypedDict(TypedDict): body: CreateWebhookRequestBodyTypedDict project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class CreateWebhookRequest(BaseModel): @@ -100,7 +100,7 @@ class CreateWebhookRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/deleteactionop.py b/src/moderation_api/models/deleteactionop.py index 4d66a08..487068d 100644 --- a/src/moderation_api/models/deleteactionop.py +++ b/src/moderation_api/models/deleteactionop.py @@ -13,7 +13,7 @@ class DeleteActionRequestTypedDict(TypedDict): id: str r"""The ID of the action to delete.""" project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class DeleteActionRequest(BaseModel): @@ -27,7 +27,7 @@ class DeleteActionRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/deleteauthorop.py b/src/moderation_api/models/deleteauthorop.py index 801be30..b8e542e 100644 --- a/src/moderation_api/models/deleteauthorop.py +++ b/src/moderation_api/models/deleteauthorop.py @@ -13,7 +13,7 @@ class DeleteAuthorRequestTypedDict(TypedDict): id: str r"""Either external ID or the ID assigned by moderation API.""" project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class DeleteAuthorRequest(BaseModel): @@ -27,7 +27,7 @@ class DeleteAuthorRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/deletewebhookop.py b/src/moderation_api/models/deletewebhookop.py index ee1073c..38c462b 100644 --- a/src/moderation_api/models/deletewebhookop.py +++ b/src/moderation_api/models/deletewebhookop.py @@ -13,7 +13,7 @@ class DeleteWebhookRequestTypedDict(TypedDict): id: str r"""The ID of the webhook to delete.""" project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class DeleteWebhookRequest(BaseModel): @@ -27,7 +27,7 @@ class DeleteWebhookRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/executeactionop.py b/src/moderation_api/models/executeactionop.py index 868b983..feab8d3 100644 --- a/src/moderation_api/models/executeactionop.py +++ b/src/moderation_api/models/executeactionop.py @@ -71,7 +71,7 @@ def serialize_model(self, handler): class ExecuteActionRequestTypedDict(TypedDict): body: ExecuteActionRequestBodyTypedDict project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class ExecuteActionRequest(BaseModel): @@ -85,7 +85,7 @@ class ExecuteActionRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/getaccountop.py b/src/moderation_api/models/getaccountop.py index 921d3b1..6d04fc0 100644 --- a/src/moderation_api/models/getaccountop.py +++ b/src/moderation_api/models/getaccountop.py @@ -11,7 +11,7 @@ class GetAccountRequestTypedDict(TypedDict): project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class GetAccountRequest(BaseModel): @@ -20,7 +20,7 @@ class GetAccountRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/getactionop.py b/src/moderation_api/models/getactionop.py index d89cd51..c052cd5 100644 --- a/src/moderation_api/models/getactionop.py +++ b/src/moderation_api/models/getactionop.py @@ -20,7 +20,7 @@ class GetActionRequestTypedDict(TypedDict): id: str r"""The ID of the action to get.""" project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class GetActionRequest(BaseModel): @@ -34,7 +34,7 @@ class GetActionRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/getauthorop.py b/src/moderation_api/models/getauthorop.py index e3f0abf..6055831 100644 --- a/src/moderation_api/models/getauthorop.py +++ b/src/moderation_api/models/getauthorop.py @@ -13,7 +13,7 @@ class GetAuthorRequestTypedDict(TypedDict): id: str r"""Either external ID or the ID assigned by moderation API.""" project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class GetAuthorRequest(BaseModel): @@ -27,7 +27,7 @@ class GetAuthorRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/getqueueop.py b/src/moderation_api/models/getqueueop.py index a1461f0..aa2ca79 100644 --- a/src/moderation_api/models/getqueueop.py +++ b/src/moderation_api/models/getqueueop.py @@ -20,7 +20,7 @@ class GetQueueRequestTypedDict(TypedDict): id: str r"""The queue ID""" project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class GetQueueRequest(BaseModel): @@ -34,7 +34,7 @@ class GetQueueRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/getqueuestatsop.py b/src/moderation_api/models/getqueuestatsop.py index 9c28e90..f2d88cc 100644 --- a/src/moderation_api/models/getqueuestatsop.py +++ b/src/moderation_api/models/getqueuestatsop.py @@ -19,7 +19,7 @@ class GetQueueStatsRequestTypedDict(TypedDict): r"""The queue ID""" within_days: NotRequired[int] project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class GetQueueStatsRequest(BaseModel): @@ -39,7 +39,7 @@ class GetQueueStatsRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/getwebhookop.py b/src/moderation_api/models/getwebhookop.py index 6ac685a..69e0f50 100644 --- a/src/moderation_api/models/getwebhookop.py +++ b/src/moderation_api/models/getwebhookop.py @@ -20,7 +20,7 @@ class GetWebhookRequestTypedDict(TypedDict): id: str r"""The ID of the webhook to get.""" project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class GetWebhookRequest(BaseModel): @@ -34,7 +34,7 @@ class GetWebhookRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/getwebhooksecretop.py b/src/moderation_api/models/getwebhooksecretop.py index b2e0885..3a2396e 100644 --- a/src/moderation_api/models/getwebhooksecretop.py +++ b/src/moderation_api/models/getwebhooksecretop.py @@ -11,7 +11,7 @@ class GetWebhookSecretRequestTypedDict(TypedDict): project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class GetWebhookSecretRequest(BaseModel): @@ -20,7 +20,7 @@ class GetWebhookSecretRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/getwordlistembeddingstatusop.py b/src/moderation_api/models/getwordlistembeddingstatusop.py index 63ca82b..3f1af8d 100644 --- a/src/moderation_api/models/getwordlistembeddingstatusop.py +++ b/src/moderation_api/models/getwordlistembeddingstatusop.py @@ -13,7 +13,7 @@ class GetWordlistEmbeddingStatusRequestTypedDict(TypedDict): id: str r"""ID of the wordlist to check embedding status for""" project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class GetWordlistEmbeddingStatusRequest(BaseModel): @@ -27,7 +27,7 @@ class GetWordlistEmbeddingStatusRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/getwordlistop.py b/src/moderation_api/models/getwordlistop.py index 2af7f9e..4fa89c1 100644 --- a/src/moderation_api/models/getwordlistop.py +++ b/src/moderation_api/models/getwordlistop.py @@ -13,7 +13,7 @@ class GetWordlistRequestTypedDict(TypedDict): id: str r"""ID of the wordlist to get""" project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class GetWordlistRequest(BaseModel): @@ -27,7 +27,7 @@ class GetWordlistRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/listactionsop.py b/src/moderation_api/models/listactionsop.py index f67b900..0abc3e0 100644 --- a/src/moderation_api/models/listactionsop.py +++ b/src/moderation_api/models/listactionsop.py @@ -22,7 +22,7 @@ class ListActionsRequestTypedDict(TypedDict): page: NotRequired[int] page_size: NotRequired[int] project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class ListActionsRequest(BaseModel): @@ -48,7 +48,7 @@ class ListActionsRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/listauthorsop.py b/src/moderation_api/models/listauthorsop.py index 9dd87b5..0e84d05 100644 --- a/src/moderation_api/models/listauthorsop.py +++ b/src/moderation_api/models/listauthorsop.py @@ -40,7 +40,7 @@ class ListAuthorsRequestTypedDict(TypedDict): last_active_date: NotRequired[str] content_types: NotRequired[List[str]] project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class ListAuthorsRequest(BaseModel): @@ -91,7 +91,7 @@ class ListAuthorsRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/listqueueitemsop.py b/src/moderation_api/models/listqueueitemsop.py index fee4c87..2e99ecc 100644 --- a/src/moderation_api/models/listqueueitemsop.py +++ b/src/moderation_api/models/listqueueitemsop.py @@ -45,7 +45,7 @@ class ListQueueItemsRequestTypedDict(TypedDict): author_id: NotRequired[str] filtered_action_ids: NotRequired[List[str]] project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class ListQueueItemsRequest(BaseModel): @@ -124,7 +124,7 @@ class ListQueueItemsRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/listwebhooksop.py b/src/moderation_api/models/listwebhooksop.py index 056efec..f2f24d6 100644 --- a/src/moderation_api/models/listwebhooksop.py +++ b/src/moderation_api/models/listwebhooksop.py @@ -21,7 +21,7 @@ class ListWebhooksRequestTypedDict(TypedDict): page: NotRequired[int] page_size: NotRequired[int] project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class ListWebhooksRequest(BaseModel): @@ -41,7 +41,7 @@ class ListWebhooksRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/listwordlistsop.py b/src/moderation_api/models/listwordlistsop.py index 8c89abb..4d07b6f 100644 --- a/src/moderation_api/models/listwordlistsop.py +++ b/src/moderation_api/models/listwordlistsop.py @@ -14,7 +14,7 @@ class ListWordlistsRequestTypedDict(TypedDict): page: NotRequired[int] page_size: NotRequired[int] project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class ListWordlistsRequest(BaseModel): @@ -34,7 +34,7 @@ class ListWordlistsRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/projectapikey.py b/src/moderation_api/models/projectapikey.py new file mode 100644 index 0000000..cd2c71e --- /dev/null +++ b/src/moderation_api/models/projectapikey.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from moderation_api.types import BaseModel +import pydantic +from typing_extensions import Annotated, TypedDict + + +class ProjectAPIKeyTypedDict(TypedDict): + id: str + r"""The ID of the API key.""" + name: str + r"""The key's name.""" + project_id: str + r"""The ID of the project the key belongs to.""" + created_at: str + r"""When the key was created.""" + secret_key: str + r"""The new secret API key. Use it to moderate content in this project. It is also shown in the project's settings.""" + + +class ProjectAPIKey(BaseModel): + id: str + r"""The ID of the API key.""" + + name: str + r"""The key's name.""" + + project_id: Annotated[str, pydantic.Field(alias="projectId")] + r"""The ID of the project the key belongs to.""" + + created_at: Annotated[str, pydantic.Field(alias="createdAt")] + r"""When the key was created.""" + + secret_key: Annotated[str, pydantic.Field(alias="secretKey")] + r"""The new secret API key. Use it to moderate content in this project. It is also shown in the project's settings.""" + + +try: + ProjectAPIKey.model_rebuild() +except NameError: + pass diff --git a/src/moderation_api/models/removewordlistwordsop.py b/src/moderation_api/models/removewordlistwordsop.py index 9936fe8..853a985 100644 --- a/src/moderation_api/models/removewordlistwordsop.py +++ b/src/moderation_api/models/removewordlistwordsop.py @@ -20,7 +20,7 @@ class RemoveWordlistWordsRequestTypedDict(TypedDict): words: List[str] r"""Array of words to remove from the wordlist""" project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class RemoveWordlistWordsRequest(BaseModel): @@ -39,7 +39,7 @@ class RemoveWordlistWordsRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/resolvequeueitemop.py b/src/moderation_api/models/resolvequeueitemop.py index 1e666b7..19e800a 100644 --- a/src/moderation_api/models/resolvequeueitemop.py +++ b/src/moderation_api/models/resolvequeueitemop.py @@ -47,7 +47,7 @@ class ResolveQueueItemRequestTypedDict(TypedDict): r"""The item ID to resolve""" body: ResolveQueueItemRequestBodyTypedDict project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class ResolveQueueItemRequest(BaseModel): @@ -73,7 +73,7 @@ class ResolveQueueItemRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/submitcontentop.py b/src/moderation_api/models/submitcontentop.py index 35d7231..bb6fce2 100644 --- a/src/moderation_api/models/submitcontentop.py +++ b/src/moderation_api/models/submitcontentop.py @@ -1972,7 +1972,7 @@ class SubmitContentRequestBodyTypedDict(TypedDict): client_action: NotRequired[SubmitContentClientActionTypedDict] r"""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: NotRequired[bool] - r"""Do not store the content. The content won't enter the review queue""" + r"""Process the content without saving it on our servers. The item is still created and appears in the review queue, analytics and author history with its moderation results, but its content is empty, so reviewers cannot see what was submitted.""" policies: NotRequired[List[PolicyRequestTypedDict]] r"""(Enterprise) override the channel policies for this moderation request only.""" @@ -2012,7 +2012,7 @@ class SubmitContentRequestBody(BaseModel): r"""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: Annotated[Optional[bool], pydantic.Field(alias="doNotStore")] = None - r"""Do not store the content. The content won't enter the review queue""" + r"""Process the content without saving it on our servers. The item is still created and appears in the review queue, analytics and author history with its moderation results, but its content is empty, so reviewers cannot see what was submitted.""" policies: Optional[List[PolicyRequest]] = None r"""(Enterprise) override the channel policies for this moderation request only.""" @@ -2050,7 +2050,7 @@ def serialize_model(self, handler): class SubmitContentRequestTypedDict(TypedDict): body: SubmitContentRequestBodyTypedDict project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class SubmitContentRequest(BaseModel): @@ -2064,7 +2064,7 @@ class SubmitContentRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/unresolvequeueitemop.py b/src/moderation_api/models/unresolvequeueitemop.py index 40a8d5f..5f8908b 100644 --- a/src/moderation_api/models/unresolvequeueitemop.py +++ b/src/moderation_api/models/unresolvequeueitemop.py @@ -47,7 +47,7 @@ class UnresolveQueueItemRequestTypedDict(TypedDict): r"""The item ID to unresolve""" body: UnresolveQueueItemRequestBodyTypedDict project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class UnresolveQueueItemRequest(BaseModel): @@ -73,7 +73,7 @@ class UnresolveQueueItemRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/updateactionop.py b/src/moderation_api/models/updateactionop.py index fe787ed..86aca2b 100644 --- a/src/moderation_api/models/updateactionop.py +++ b/src/moderation_api/models/updateactionop.py @@ -175,7 +175,7 @@ class UpdateActionRequestTypedDict(TypedDict): r"""The ID of the action to update.""" body: UpdateActionRequestBodyTypedDict project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class UpdateActionRequest(BaseModel): @@ -194,7 +194,7 @@ class UpdateActionRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/updateauthorop.py b/src/moderation_api/models/updateauthorop.py index 60a12f4..a8098c6 100644 --- a/src/moderation_api/models/updateauthorop.py +++ b/src/moderation_api/models/updateauthorop.py @@ -203,7 +203,7 @@ class UpdateAuthorRequestTypedDict(TypedDict): r"""Either external ID or the ID assigned by moderation API.""" body: UpdateAuthorRequestBodyTypedDict project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class UpdateAuthorRequest(BaseModel): @@ -222,7 +222,7 @@ class UpdateAuthorRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/updatewebhookop.py b/src/moderation_api/models/updatewebhookop.py index 19bb062..45dbd80 100644 --- a/src/moderation_api/models/updatewebhookop.py +++ b/src/moderation_api/models/updatewebhookop.py @@ -94,7 +94,7 @@ class UpdateWebhookRequestTypedDict(TypedDict): r"""The ID of the webhook to update.""" body: UpdateWebhookRequestBodyTypedDict project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class UpdateWebhookRequest(BaseModel): @@ -113,7 +113,7 @@ class UpdateWebhookRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/models/updatewordlistop.py b/src/moderation_api/models/updatewordlistop.py index 02201b1..b453ed1 100644 --- a/src/moderation_api/models/updatewordlistop.py +++ b/src/moderation_api/models/updatewordlistop.py @@ -65,7 +65,7 @@ class UpdateWordlistRequestTypedDict(TypedDict): r"""ID of the wordlist to update""" body: UpdateWordlistRequestBodyTypedDict project_id: NotRequired[str] - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" class UpdateWordlistRequest(BaseModel): @@ -84,7 +84,7 @@ class UpdateWordlistRequest(BaseModel): pydantic.Field(alias="Project-Id"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None - r"""The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.""" + r"""The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/moderation_api/projects.py b/src/moderation_api/projects.py index f962195..cda9067 100644 --- a/src/moderation_api/projects.py +++ b/src/moderation_api/projects.py @@ -1,9 +1,11 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from .basesdk import BaseSDK +from .sdkconfiguration import SDKConfiguration from jsonpath import JSONPath from moderation_api import errors, models, utils from moderation_api._hooks import HookContext +from moderation_api.apikeys import APIKeys from moderation_api.types import OptionalNullable, UNSET from moderation_api.utils import get_security_from_env from moderation_api.utils.unmarshal_json_response import unmarshal_json_response @@ -11,6 +13,18 @@ class Projects(BaseSDK): + api_keys: APIKeys + + def __init__( + self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None + ) -> None: + BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref) + self.sdk_configuration = sdk_config + self._init_sdks() + + def _init_sdks(self): + self.api_keys = APIKeys(self.sdk_configuration, parent_ref=self.parent_ref) + def list( self, *, diff --git a/src/moderation_api/queue_sdk.py b/src/moderation_api/queue_sdk.py index a85d82b..0eb0d05 100644 --- a/src/moderation_api/queue_sdk.py +++ b/src/moderation_api/queue_sdk.py @@ -39,7 +39,7 @@ def retrieve( Get a queue :param id: The queue ID - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -159,7 +159,7 @@ async def retrieve_async( Get a queue :param id: The queue ID - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -281,7 +281,7 @@ def get_stats( :param id: The queue ID :param within_days: - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -404,7 +404,7 @@ async def get_stats_async( :param id: The queue ID :param within_days: - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds diff --git a/src/moderation_api/webhooks.py b/src/moderation_api/webhooks.py index 8a13457..afc1f63 100644 --- a/src/moderation_api/webhooks.py +++ b/src/moderation_api/webhooks.py @@ -28,7 +28,7 @@ def list( :param page: :param page_size: - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -167,7 +167,7 @@ async def list_async( :param page: :param page_size: - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -312,7 +312,7 @@ def create( :param name: The webhook's name, used to identify it in the dashboard :param url: The webhook's URL. We'll call this URL when an event occurs. :param event_types: Event types this webhook subscribes to. One webhook URL receives all events you list here. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param description: The webhook's description :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -435,7 +435,7 @@ async def create_async( :param name: The webhook's name, used to identify it in the dashboard :param url: The webhook's URL. We'll call this URL when an event occurs. :param event_types: Event types this webhook subscribes to. One webhook URL receives all events you list here. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param description: The webhook's description :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -553,7 +553,7 @@ def retrieve( Get a webhook by ID. :param id: The ID of the webhook to get. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -658,7 +658,7 @@ async def retrieve_async( Get a webhook by ID. :param id: The ID of the webhook to get. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -767,7 +767,7 @@ def update( Update a webhook. Legacy v1 webhooks are read-only: delete them and create a new webhook instead. :param id: The ID of the webhook to update. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param name: The webhook's name, used to identify it in the dashboard :param description: The webhook's description :param url: The webhook's URL. We'll call this URL when an event occurs. @@ -896,7 +896,7 @@ async def update_async( Update a webhook. Legacy v1 webhooks are read-only: delete them and create a new webhook instead. :param id: The ID of the webhook to update. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param name: The webhook's name, used to identify it in the dashboard :param description: The webhook's description :param url: The webhook's URL. We'll call this URL when an event occurs. @@ -1021,7 +1021,7 @@ def delete( Delete a webhook. :param id: The ID of the webhook to delete. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1126,7 +1126,7 @@ async def delete_async( Delete a webhook. :param id: The ID of the webhook to delete. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds diff --git a/src/moderation_api/webhooksecret.py b/src/moderation_api/webhooksecret.py index 4ed0bb0..97a7237 100644 --- a/src/moderation_api/webhooksecret.py +++ b/src/moderation_api/webhooksecret.py @@ -23,7 +23,7 @@ def retrieve( Get the signing secret used to sign webhook deliveries for this project, creating one if none exists yet. Verify deliveries by comparing the `modapi-signature` header to HMAC-SHA256(raw request body, secret) hex-encoded. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -122,7 +122,7 @@ async def retrieve_async( Get the signing secret used to sign webhook deliveries for this project, creating one if none exists yet. Verify deliveries by comparing the `modapi-signature` header to HMAC-SHA256(raw request body, secret) hex-encoded. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds diff --git a/src/moderation_api/wordlist.py b/src/moderation_api/wordlist.py index 6cefbf9..61c6ded 100644 --- a/src/moderation_api/wordlist.py +++ b/src/moderation_api/wordlist.py @@ -42,7 +42,7 @@ def list( :param page: :param page_size: - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -199,7 +199,7 @@ async def list_async( :param page: :param page_size: - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -357,7 +357,7 @@ def retrieve( Get a specific wordlist by ID :param id: ID of the wordlist to get - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -477,7 +477,7 @@ async def retrieve_async( Get a specific wordlist by ID :param id: ID of the wordlist to get - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -602,7 +602,7 @@ def update( Update a wordlist :param id: ID of the wordlist to update - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param name: New name for the wordlist :param key: New key for the wordlist :param description: New description for the wordlist @@ -732,7 +732,7 @@ async def update_async( Update a wordlist :param id: ID of the wordlist to update - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param name: New name for the wordlist :param key: New key for the wordlist :param description: New description for the wordlist @@ -857,7 +857,7 @@ def get_embedding_status( Get the current embedding progress status for a wordlist :param id: ID of the wordlist to check embedding status for - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -979,7 +979,7 @@ async def get_embedding_status_async( Get the current embedding progress status for a wordlist :param id: ID of the wordlist to check embedding status for - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds diff --git a/src/moderation_api/words.py b/src/moderation_api/words.py index 085378a..0a507c5 100644 --- a/src/moderation_api/words.py +++ b/src/moderation_api/words.py @@ -27,7 +27,7 @@ def add( :param id: ID of the wordlist to add words to :param words: Array of words to add to the wordlist. Duplicate words will be ignored. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -145,7 +145,7 @@ async def add_async( :param id: ID of the wordlist to add words to :param words: Array of words to add to the wordlist. Duplicate words will be ignored. - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -263,7 +263,7 @@ def remove( :param id: ID of the wordlist to remove words from :param words: Array of words to remove from the wordlist - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -376,7 +376,7 @@ async def remove_async( :param id: ID of the wordlist to remove words from :param words: Array of words to remove from the wordlist - :param project_id: The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + :param project_id: The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds